/* ========================================
   CSS Custom Properties (Design Tokens)
   ======================================== */
:root {
    /* Colors - Light Theme (based on CIF Lettermark gradient) */
    --primary-color: #6c5ce7;
    --primary-dark: #5b4bc4;
    --secondary-color: #4ecdc4;
    --accent-color: #ff6b9d;
    --text-color: #1f2937;
    --text-light: #6b7280;
    --bg-color: #ffffff;
    --bg-gray: #f9fafb;
    --bg-dark: #111827;
    --border-color: #e5e7eb;

    /* Gradients - Inspired by CIF Lettermark */
    --gradient-primary: linear-gradient(135deg, #6c5ce7 0%, #ff6b9d 50%, #4ecdc4 100%);
    --gradient-secondary: linear-gradient(135deg, #4ecdc4 0%, #6c5ce7 50%, #0a1b76 100%);
    
    /* Spacing */
    --spacing-xs: 0.5rem;
    --spacing-sm: 1rem;
    --spacing-md: 2rem;
    --spacing-lg: 4rem;
    --spacing-xl: 6rem;
    
    /* Typography */
    --font-primary: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    --font-display: 'Sen', 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    --font-mono: 'JetBrains Mono', 'Courier New', 'Courier', monospace;
    --font-size-sm: 0.875rem;
    --font-size-base: 1rem;
    --font-size-lg: 1.125rem;
    --font-size-xl: 1.25rem;
    --font-size-2xl: 1.5rem;
    --font-size-3xl: 2rem;
    --font-size-4xl: 2.5rem;
    --font-size-5xl: 3rem;
    
    /* Effects */
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1);
    --border-radius: 0.5rem;
    --transition: all 0.3s ease;
}

/* ========================================
   Dark Theme
   ======================================== */
[data-theme="dark"] {
    /* Colors - Dark Theme (based on CIF Lettermark gradient) */
    --primary-color: #6c5ce7;
    --primary-dark: #5b4bc4;
    --secondary-color: #4ecdc4;
    --accent-color: #ff6b9d;
    --text-color: #f9fafb;
    --text-light: #d1d5db;
    --bg-color: #18181b;
    --bg-gray: #27272a;
    --bg-dark: #09090b;
    --border-color: #52525b;

    /* Gradients - CIF Lettermark inspired for dark mode */
    --gradient-primary: linear-gradient(135deg, #6c5ce7 0%, #ff6b9d 50%, #4ecdc4 100%);
    --gradient-secondary: linear-gradient(135deg, #4ecdc4 0%, #6c5ce7 50%, #0a1b76 100%);

    /* Effects - Adjusted for dark mode with more definition */
    --shadow-sm: 0 1px 3px 0 rgba(0, 0, 0, 0.5);
    --shadow-md: 0 4px 8px -1px rgba(0, 0, 0, 0.6);
    --shadow-lg: 0 10px 20px -3px rgba(0, 0, 0, 0.7);
    --shadow-xl: 0 20px 30px -5px rgba(0, 0, 0, 0.8);
}

/* ========================================
   Reset & Base Styles
   ======================================== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-primary);
    font-size: var(--font-size-base);
    line-height: 1.6;
    color: var(--text-color);
    background-color: var(--bg-color);
    /* Background image is set dynamically via JavaScript */
    background-repeat: repeat;
    background-size: auto;
    background-attachment: fixed;
    overflow-x: hidden;
    font-feature-settings: "liga" 1, "calt" 1, "kern" 1;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

a {
    text-decoration: none;
    color: inherit;
    transition: var(--transition);
}

img {
    max-width: 100%;
    height: auto;
}

/* ========================================
   Utility Classes
   ======================================== */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 var(--spacing-md);
}

.gradient-text {
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.section-title {
    font-family: var(--font-display);
    font-size: clamp(1.75rem, 5vw, 3rem);
    font-weight: 800;
    text-align: center;
    margin-bottom: var(--spacing-md);
    position: relative;
    font-feature-settings: "liga" 1, "dlig" 1, "calt" 1, "kern" 1, "ss01" 1;
}

.section-title::after {
    content: '';
    display: block;
    width: 80px;
    height: 4px;
    background: var(--gradient-primary);
    margin: var(--spacing-sm) auto 0;
    border-radius: 2px;
}

.middle-initial {
    font-family: var(--font-mono);
    font-weight: 500;
}

/* ========================================
   Navigation
   ======================================== */
.navbar {
    position: fixed;
    top: 0;
    width: 100%;
    background-color: var(--bg-color);
    backdrop-filter: blur(10px);
    border-bottom: none;
    box-shadow: var(--shadow-sm);
    z-index: 1000;
    transition: transform 0.3s ease-in-out, box-shadow 0.3s ease;
    transform: translateY(-100%);
}

[data-theme="dark"] .navbar {
    box-shadow: var(--shadow-md);
}

.navbar.scrolled {
    box-shadow: var(--shadow-md);
    transform: translateY(0);
}

.navbar.hovered {
    transform: translateY(0);
}

[data-theme="dark"] .navbar.scrolled {
    box-shadow: var(--shadow-lg);
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: var(--spacing-sm) var(--spacing-md);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.nav-logo {
    font-family: var(--font-display);
    font-size: var(--font-size-xl);
    font-weight: 700;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    font-feature-settings: "liga" 1, "dlig" 1, "calt" 1, "kern" 1;
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: var(--spacing-md);
    border-radius: .3rem;
}

.nav-link {
    color: var(--text-color);
    font-weight: 500;
    padding: var(--spacing-xs) var(--spacing-sm);
    border-radius: var(--border-radius);
    transition: var(--transition);
}

.nav-link:hover {
    color: var(--primary-color);
    background-color: var(--bg-gray);
}

.nav-actions {
    display: flex;
    align-items: center;
    gap: var(--spacing-sm);
}

.hamburger {
    display: none;
    flex-direction: column;
    cursor: pointer;
    gap: 4px;
}

.bar {
    width: 25px;
    height: 3px;
    background-color: var(--text-color);
    border-radius: 2px;
    transition: var(--transition);
}

/* ========================================
   Hero Section
   ======================================== */
.hero {
    height: min(100vh, 1000px);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    padding: var(--spacing-xl) var(--spacing-md);
    background: linear-gradient(135deg, rgba(249, 250, 251, 0.95) 0%, rgba(255, 255, 255, 0.95) 50%, rgba(243, 244, 246, 0.95) 100%);
    position: relative;
    overflow: hidden;
    z-index: 1;
}

.hero-background {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
}

.hero-particles {
    position: absolute;
    width: 100%;
    height: 100%;
    background-image:
        radial-gradient(circle at 20% 30%, rgba(192, 132, 252, 0.15) 0%, transparent 50%),
        radial-gradient(circle at 80% 70%, rgba(236, 72, 153, 0.15) 0%, transparent 50%),
        radial-gradient(circle at 50% 50%, rgba(20, 184, 166, 0.1) 0%, transparent 50%);
    animation: particleFloat 20s ease-in-out infinite;
}

.hero-content {
    max-width: 900px;
    position: relative;
    z-index: 1;
}

.hero-badge {
    display: inline-block;
    padding: 0.5rem 1.25rem;
    background: var(--gradient-secondary);
    color: white;
    border-radius: 2rem;
    font-size: var(--font-size-sm);
    font-weight: 600;
    margin-bottom: var(--spacing-md);
    animation: fadeInDown 0.8s ease-out;
    box-shadow: var(--shadow-md);
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

.hero-title {
    font-family: var(--font-display);
    font-size: clamp(2.5rem, 8vw, 5rem);
    font-weight: 800;
    margin-bottom: var(--spacing-sm);
    line-height: 1.1;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    font-feature-settings: "liga" 1, "dlig" 1, "calt" 1, "kern" 1, "ss01" 1;
}

.hero-greeting {
    font-size: clamp(1.5rem, 4vw, 2.5rem);
    font-weight: 600;
    color: var(--text-light);
    animation: fadeInLeft 0.8s ease-out;
}

.hero-name {
    animation: fadeInRight 1s ease-out;
    letter-spacing: -0.02em;
    color: var(--primary-color);
    position: relative;
}

.hero-name::before {
    content: attr(data-text);
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    background-size: 200% auto;
    background-position: 200% center;
    opacity: 0.8;
}

.hero-name.shimmer-loaded::before {
    animation-name: shimmerOnce;
    animation-duration: 10s;
    animation-timing-function: ease-in-out;
    animation-delay: 0s;
    animation-iteration-count: 1;
    animation-fill-mode: forwards;
}

.hero-tagline {
    font-family: var(--font-display);
    font-size: clamp(1.5rem, 4vw, 2.5rem);
    font-weight: 600;
    margin: var(--spacing-sm) 0;
    color: var(--text-color);
    font-feature-settings: "liga" 1, "dlig" 1, "calt" 1, "kern" 1;
}

.rotating-text {
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    position: relative;
    display: inline-block;
    animation: textGlow 3s ease-in-out infinite;
    transition: opacity 0.3s ease;
}

.hero-subtitle {
    font-size: clamp(1rem, 2vw, 1.25rem);
    color: var(--text-light);
    margin-bottom: var(--spacing-lg);
    line-height: 1.6;
    max-width: min(100%, 45ch);
    margin-left: auto;
    margin-right: auto;
    animation: fadeInUp 1s ease-out;
}

.hero-buttons {
    display: flex;
    gap: var(--spacing-sm);
    justify-content: center;
    flex-wrap: wrap;
    margin-bottom: var(--spacing-lg);
    animation: fadeInUp 1.2s ease-out;
}

.btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 1rem 2rem;
    border-radius: 0.75rem;
    font-weight: 600;
    font-size: var(--font-size-base);
    transition: all 0.3s ease;
    cursor: pointer;
    border: 2px solid transparent;
    position: relative;
    overflow: hidden;
    letter-spacing: -0.01em;
}

.btn::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.3);
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

.btn:hover::before {
    width: 800px;
    height: 800px;
}

.btn-primary {
    background: var(--gradient-primary);
    color: #1f2937;
    box-shadow: 0 4px 15px rgba(192, 132, 252, 0.4);
}

.btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(192, 132, 252, 0.5);
}

.btn-primary svg {
    transition: transform 0.3s ease;
}

.btn-primary:hover svg {
    transform: translateX(5px);
}

.btn-secondary {
    background: rgba(192, 132, 252, 0.1);
    color: var(--primary-color);
    border-color: var(--primary-color);
    backdrop-filter: blur(10px);
}

.btn-secondary:hover {
    background: var(--primary-color);
    color: white;
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(192, 132, 252, 0.3);
}

.hero-stats {
    display: flex;
    gap: var(--spacing-lg);
    justify-content: center;
    margin-top: var(--spacing-lg);
    flex-wrap: wrap;
    animation: fadeInUp 1.4s ease-out;
}

.hero-stat {
    text-align: center;
    padding: var(--spacing-sm);
    min-width: 100px;
}

.stat-value {
    font-size: clamp(2rem, 4vw, 3rem);
    font-weight: 800;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    line-height: 1;
    margin-bottom: 0.25rem;
}

.stat-label {
    font-family: var(--font-primary);
    font-size: var(--font-size-sm);
    color: var(--text-light);
    text-transform: uppercase;
    letter-spacing: 0.1em;
    font-weight: 600;
}

.hero-scroll {
    position: absolute;
    bottom: var(--spacing-md);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--spacing-xs);
    color: var(--primary-color);
    font-size: var(--font-size-sm);
    animation: bounce 2s infinite;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: 500;
}

.hero-scroll:hover {
    color: var(--primary-dark);
    transform: translateY(-4px);
}

.scroll-arrow {
    width: 24px;
    height: 24px;
    border-left: 3px solid currentColor;
    border-bottom: 3px solid currentColor;
    transform: rotate(-45deg);
    border-radius: 2px;
}

/* ========================================
   About Section
   ======================================== */
.about {
    padding: var(--spacing-xl) 0;
    background: rgba(255, 255, 255, 0.85);
    position: relative;
    z-index: 2;
}

[data-theme="dark"] .about {
    background: rgba(24, 24, 27, 0.85);
}

.about-header {
    text-align: center;
    margin-bottom: var(--spacing-md);
}

.about-intro {
    font-size: clamp(1rem, 2vw, 1.25rem);
    color: var(--text-light);
    max-width: 800px;
    margin: 0 auto;
    line-height: 1.8;
    margin-bottom: 0;
}

.about-content {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-md);
}

.about-intro {
    text-align: center;
    max-width: 900px;
    margin: 0 auto;
}

.about-lead {
    font-size: clamp(1.1rem, 2.5vw, 1.35rem);
    line-height: 1.7;
    color: var(--text-color);
    font-weight: 500;
}

.about-main {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: var(--spacing-sm);
}

.about-card {
    background: var(--bg-color);
    padding: var(--spacing-sm) var(--spacing-md);
    border-radius: var(--border-radius);
    border: 1px solid transparent;
    box-shadow: var(--shadow-sm);
}

[data-theme="dark"] .about-card {
    border-color: var(--border-color);
    box-shadow: var(--shadow-md);
}

.about-card h3 {
    font-family: var(--font-display);
    font-size: var(--font-size-xl);
    margin-bottom: var(--spacing-sm);
    color: var(--text-color);
    font-weight: 600;
    letter-spacing: -0.02em;
}

.about-card p {
    color: var(--text-light);
    line-height: 1.7;
}

.about-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.about-list li {
    color: var(--text-light);
    line-height: 1.7;
    padding-left: 1.5rem;
    position: relative;
    margin-bottom: 0.75rem;
}

.about-list li:last-child {
    margin-bottom: 0;
}

.about-list li::before {
    content: '→';
    position: absolute;
    left: 0;
    color: var(--primary-color);
    font-weight: 700;
}

/* ========================================
   Skills Section
   ======================================== */
.skills {
    padding: var(--spacing-xl) 0;
    background: rgba(249, 250, 251, 0.95);
    position: relative;
    z-index: 3;
}

[data-theme="dark"] .skills {
    background: rgba(39, 39, 42, 0.95);
}

.skills-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: var(--spacing-md);
}

.skill-card {
    background: var(--bg-color);
    padding: var(--spacing-md);
    border-radius: var(--border-radius);
    border: 1px solid transparent;
    box-shadow: var(--shadow-sm);
}

[data-theme="dark"] .skill-card {
    border-color: var(--border-color);
    box-shadow: var(--shadow-md);
}

.skill-card h3 {
    font-family: var(--font-display);
    font-size: var(--font-size-xl);
    margin-bottom: var(--spacing-sm);
    color: var(--text-color);
    font-weight: 600;
    letter-spacing: -0.02em;
}

.skill-card p {
    color: var(--text-light);
    margin-bottom: var(--spacing-md);
}

.skill-tags {
    display: flex;
    flex-wrap: wrap;
    gap: var(--spacing-xs);
}

.tag {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    background-color: #f3e8ff;
    color: var(--primary-color);
    border-radius: 1rem;
    font-size: var(--font-size-sm);
    font-weight: 500;
    border: 1px solid #e9d5ff;
    transition: var(--transition);
}

a.tag:hover {
    background: var(--gradient-primary);
    color: #1f2937;
    border-color: transparent;
    transform: translateY(-2px);
    box-shadow: var(--shadow-sm);
}

[data-theme="dark"] .tag {
    background-color: rgba(192, 132, 252, 0.15);
    border-color: rgba(192, 132, 252, 0.3);
}

[data-theme="dark"] a.tag:hover {
    background: var(--gradient-primary);
    border-color: transparent;
    box-shadow: 0 4px 12px rgba(192, 132, 252, 0.4);
}

/* ========================================
   Projects Section
   ======================================== */
.projects {
    padding: var(--spacing-xl) 0;
    background: rgba(255, 255, 255, 0.85);
    position: relative;
    z-index: 4;
}

[data-theme="dark"] .projects {
    background: rgba(24, 24, 27, 0.85);
}

.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: var(--spacing-md);
}

.project-card {
    background: var(--bg-gray);
    border-radius: var(--border-radius);
    border: 1px solid transparent;
    overflow: hidden;
    box-shadow: var(--shadow-md);
}

[data-theme="dark"] .project-card {
    border-color: var(--border-color);
    box-shadow: var(--shadow-lg);
}

.project-image {
    width: 100%;
    height: 200px;
    background: var(--gradient-secondary);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    transition: var(--transition);
    cursor: pointer;
}

.project-image:hover {
    opacity: 0.9;
    transform: scale(1.02);
}

.project-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    transition: var(--transition);
}

/* Use contain for architecture diagrams and screenshots that need to show full content */
.project-card:first-child .project-image img {
    object-fit: contain;
    background-color: #1a1a1a;
}

/* Also use contain for the RAG architecture diagram (second card) */
.project-card:nth-child(2) .project-image img {
    object-fit: contain;
    background-color: #ffffff;
}

[data-theme="dark"] .project-card:nth-child(2) .project-image img {
    background-color: #1a1a1a;
}

/* RAG Frontend screenshot (third card) */
.project-card:nth-child(3) .project-image img {
    object-fit: cover;
    object-position: bottom;
    background-color: #ffffff;
}

[data-theme="dark"] .project-card:nth-child(3) .project-image img {
    background-color: #1a1a1a;
}

.project-image h3 {
    font-size: 1.5rem;
    padding: var(--spacing-md);
    text-align: center;
}

.project-content {
    padding: var(--spacing-md);
}

.project-content h3 {
    font-family: var(--font-display);
    font-size: var(--font-size-xl);
    margin-bottom: var(--spacing-sm);
    font-weight: 600;
    letter-spacing: -0.02em;
}

.project-content h3 a {
    color: var(--text-color);
    text-decoration: none;
    transition: var(--transition);
}

.project-content h3 a:hover {
    color: var(--primary-color);
}

.project-content p {
    color: var(--text-light);
    margin-bottom: var(--spacing-md);
}

.project-tech {
    display: flex;
    flex-wrap: wrap;
    gap: var(--spacing-xs);
    margin-bottom: var(--spacing-md);
}

.tech-tag {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    background-color: #f3e8ff;
    color: var(--primary-color);
    border-radius: 1rem;
    font-size: var(--font-size-sm);
    font-weight: 500;
    border: 1px solid #e9d5ff;
    transition: var(--transition);
}

a.tech-tag:hover {
    background: var(--gradient-primary);
    color: #1f2937;
    border-color: transparent;
    transform: translateY(-2px);
    box-shadow: var(--shadow-sm);
}

[data-theme="dark"] .tech-tag {
    background-color: rgba(192, 132, 252, 0.15);
    border-color: rgba(192, 132, 252, 0.3);
}

[data-theme="dark"] a.tech-tag:hover {
    background: var(--gradient-primary);
    border-color: transparent;
    box-shadow: 0 4px 12px rgba(192, 132, 252, 0.4);
}

/* ========================================
   Contact Section
   ======================================== */
.contact {
    padding: var(--spacing-xl) 0;
    background: rgba(249, 250, 251, 0.95);
    position: relative;
    z-index: 5;
}

[data-theme="dark"] .contact {
    background: rgba(39, 39, 42, 0.95);
}

.contact-header {
    text-align: center;
    margin-bottom: var(--spacing-md);
}

.contact-subtitle {
    font-size: clamp(1rem, 2vw, 1.2rem);
    color: var(--text-light);
    max-width: 700px;
    margin: var(--spacing-sm) auto 0;
    line-height: 1.6;
}

.contact-wrapper {
    max-width: 800px;
    margin: 0 auto;
}

.contact-form {
    background: var(--bg-color);
    padding: var(--spacing-md);
    border-radius: var(--border-radius);
    border: 1px solid transparent;
    box-shadow: var(--shadow-md);
    margin-bottom: var(--spacing-md);
}

[data-theme="dark"] .contact-form {
    border-color: var(--border-color);
    box-shadow: var(--shadow-lg);
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--spacing-sm);
    margin-bottom: var(--spacing-sm);
}

.form-group {
    display: flex;
    flex-direction: column;
}

.form-group input,
.form-group textarea {
    padding: 0.875rem;
    border: 2px solid var(--border-color);
    border-radius: var(--border-radius);
    font-family: var(--font-primary);
    font-size: var(--font-size-base);
    transition: var(--transition);
    color: var(--text-color);
    background-color: var(--bg-gray);
}

[data-theme="dark"] .form-group input,
[data-theme="dark"] .form-group textarea {
    background-color: rgba(39, 39, 42, 0.5);
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(124, 58, 237, 0.1);
}

.form-group textarea {
    resize: vertical;
    min-height: 140px;
}

.form-status {
    margin-top: var(--spacing-sm);
    text-align: center;
    font-size: var(--font-size-sm);
}

.contact-form .btn {
    margin-top: var(--spacing-sm);
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.contact-links {
    text-align: center;
}

.contact-links-label {
    color: var(--text-light);
    font-size: var(--font-size-base);
    margin-bottom: var(--spacing-sm);
}

.contact-options {
    display: flex;
    justify-content: center;
    gap: var(--spacing-sm);
    flex-wrap: wrap;
}

.contact-link {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    background: var(--bg-color);
    color: var(--text-color);
    border: 2px solid var(--border-color);
    border-radius: var(--border-radius);
    font-weight: 500;
    transition: var(--transition);
    box-shadow: var(--shadow-sm);
}

[data-theme="dark"] .contact-link {
    border-color: var(--border-color);
}

.contact-link:hover {
    border-color: var(--primary-color);
    color: var(--primary-color);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.contact-link svg {
    flex-shrink: 0;
}

/* ========================================
   Footer
   ======================================== */
.footer {
    background-color: var(--bg-color);
    color: var(--text-color);
    padding: var(--spacing-md) 0;
    border-top: none;
    backdrop-filter: blur(10px);
    box-shadow: var(--shadow-sm);
}

[data-theme="dark"] .footer {
    box-shadow: var(--shadow-md);
}

.footer-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 var(--spacing-md);
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: var(--spacing-sm);
}

.social-links {
    display: flex;
    gap: var(--spacing-md);
}

.social-links a {
    color: var(--text-color);
    opacity: 0.8;
    transition: var(--transition);
}

.social-links a:hover {
    opacity: 1;
    color: var(--primary-color);
}

/* ========================================
   Animations
   ======================================== */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes bounce {
    0%, 20%, 50%, 80%, 100% {
        transform: translateY(0);
    }
    40% {
        transform: translateY(-10px);
    }
    60% {
        transform: translateY(-5px);
    }
}

@keyframes fadeInDown {
    from {
        opacity: 0;
        transform: translateY(-30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeInLeft {
    from {
        opacity: 0;
        transform: translateX(-30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes fadeInRight {
    from {
        opacity: 0;
        transform: translateX(30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes particleFloat {
    0%, 100% {
        transform: translate(0, 0) scale(1);
    }
    33% {
        transform: translate(30px, -30px) scale(1.1);
    }
    66% {
        transform: translate(-20px, 20px) scale(0.9);
    }
}

@keyframes textGlow {
    0%, 100% {
        filter: brightness(1);
    }
    50% {
        filter: brightness(1.2);
    }
}

@keyframes shimmerOnce {
    0% {
        background-position: 200% center;
    }
    100% {
        background-position: -200% center;
    }
}

/* Initial state for sections before they come into view */
section.about:not(.fade-in),
section.skills:not(.fade-in),
section.projects:not(.fade-in),
section.contact:not(.fade-in) {
    opacity: 0 !important;
    transform: translateY(30px) !important;
}

/* Cards start hidden too */
.skill-card:not(.fade-in),
.project-card:not(.fade-in),
.about-card:not(.fade-in),
.stat-card:not(.fade-in) {
    opacity: 0 !important;
    transform: translateY(20px) !important;
}

/* Animation when element comes into view */
section.fade-in,
.skill-card.fade-in,
.project-card.fade-in,
.about-card.fade-in,
.stat-card.fade-in {
    animation: fadeInUp 0.6s ease-out forwards !important;
    opacity: 1 !important;
}

/* ========================================
   Responsive Design
   ======================================== */
@media (max-width: 768px) {
    .nav-menu {
        position: fixed;
        left: -100%;
        top: 70px;
        flex-direction: column;
        background-color: var(--accent-color);
        width: 100%;
        text-align: center;
        transition: 0.3s;
        box-shadow: var(--shadow-lg);
        padding: var(--spacing-md);
        border-radius: .3rem;
    }

    .nav-menu.active {
        left: 0;
    }

    .hamburger {
        display: flex;
    }

    .hamburger.active .bar:nth-child(2) {
        opacity: 0;
    }

    .hamburger.active .bar:nth-child(1) {
        transform: translateY(7px) rotate(45deg);
    }

    .hamburger.active .bar:nth-child(3) {
        transform: translateY(-7px) rotate(-45deg);
    }

    .hero-greeting {
        font-size: clamp(1.25rem, 3.5vw, 1.75rem);
        font-weight: 500;
    }

    .hero-name {
        font-size: clamp(3rem, 10vw, 4.5rem) !important;
        font-weight: 900;
        margin-bottom: 1rem;
    }

    .hero-tagline {
        font-size: clamp(1.25rem, 3.5vw, 1.75rem);
        font-weight: 600;
        margin-top: 1.5rem;
    }

    .hero-subtitle {
        font-size: clamp(0.95rem, 2.5vw, 1.1rem);
        opacity: 0.85;
        margin-top: 1rem;
    }

    .section-title {
        font-size: var(--font-size-3xl);
    }

    .form-row {
        grid-template-columns: 1fr;
    }

    .contact-options {
        flex-direction: column;
    }

    .contact-link {
        justify-content: center;
    }

    .hero-buttons {
        flex-direction: column;
        align-items: stretch;
        max-width: 420px;
        margin-left: auto;
        margin-right: auto;
    }

    .hero-stats {
        gap: var(--spacing-md);
    }

    .hero-stat {
        min-width: 80px;
    }
}

@media (max-width: 480px) {
    :root {
        --spacing-lg: 3rem;
        --spacing-xl: 4rem;
    }

    .container {
        padding: 0 var(--spacing-sm);
    }

    .hero {
        padding: var(--spacing-lg) var(--spacing-sm);
    }

    .about-main,
    .skills-grid,
    .projects-grid {
        grid-template-columns: 1fr;
    }

    .hero-title {
        font-size: var(--font-size-3xl);
    }

    .section-title {
        font-size: var(--font-size-2xl);
    }
}

/* ========================================
   Theme Toggle Button
   ======================================== */
.theme-toggle {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--gradient-primary);
    border: none;
    box-shadow: var(--shadow-sm);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    transition: all 0.3s ease;
    flex-shrink: 0;
}

.theme-toggle:hover {
    transform: scale(1.1) rotate(15deg);
    box-shadow: var(--shadow-md);
}

.theme-toggle:active {
    transform: scale(0.95);
}

[data-theme="dark"] .theme-toggle {
    box-shadow: var(--shadow-md);
}

[data-theme="dark"] .theme-toggle:hover {
    box-shadow: var(--shadow-lg);
}

/* Dark theme specific adjustments */
[data-theme="dark"] body {
    /* Background image is set dynamically via JavaScript */
    background-size: auto;
}

[data-theme="dark"] .nav-menu {
    background-color: var(--bg-gray);
}

[data-theme="dark"] .hero {
    background: linear-gradient(135deg, rgba(39, 39, 42, 0.95) 0%, rgba(24, 24, 27, 0.95) 50%, rgba(39, 39, 42, 0.95) 100%);
}

[data-theme="dark"] .hero-particles {
    background-image:
        radial-gradient(circle at 20% 30%, rgba(192, 132, 252, 0.2) 0%, transparent 50%),
        radial-gradient(circle at 80% 70%, rgba(244, 114, 182, 0.2) 0%, transparent 50%),
        radial-gradient(circle at 50% 50%, rgba(45, 212, 191, 0.15) 0%, transparent 50%);
}

[data-theme="dark"] .hero-badge {
    box-shadow: 0 4px 15px rgba(192, 132, 252, 0.3);
}

[data-theme="dark"] .btn-primary {
    color: white;
    box-shadow: 0 4px 15px rgba(192, 132, 252, 0.5);
}

[data-theme="dark"] .btn-primary:hover {
    box-shadow: 0 8px 30px rgba(192, 132, 252, 0.6);
}
