/* ==========================================
   DESIGN TOKENS & CSS CUSTOM PROPERTIES
   ========================================== */
:root {
    /* Colors - Royal Light Theme */
    --bg-primary: #faf8f4;
    --bg-secondary: #f0ece4;
    --bg-tertiary: #e4ddcf;
    --bg-card: rgba(250, 248, 244, 0.95);

    /* Accent Colors */
    --accent-primary: #1a1a1a;
    --accent-secondary: #4a4a4a;
    --accent-highlight: #000000;

    /* Text Colors */
    --text-primary: #1a1a1a;
    --text-secondary: #413728;
    --text-tertiary: #5a5048;

    /* Professional Accent */
    --accent-cyan: #3d6b6b;
    --accent-purple: #000000;
    --accent-pink: #a04f6b;
    --accent-blue: #2a5aa0;

    /* Royal Gold Accent */
    --royal-gold: #c49e0e;
    --royal-gold-light: #d4af37;

    /* Status Colors */
    --status-success: #059669;
    --status-success-text: #047857;
    --status-success-bg: rgba(5, 150, 105, 0.12);
    --status-success-border: rgba(5, 150, 105, 0.30);
    --status-warning: #d97706;
    --status-warning-text: #b45309;
    --status-warning-bg: rgba(217, 119, 6, 0.12);
    --status-warning-border: rgba(217, 119, 6, 0.30);

    /* Glass Effect */
    --glass-bg: rgba(250, 248, 244, 0.95);
    --glass-border: rgba(0, 0, 0, 0.12);
    --glass-shadow: rgba(0, 0, 0, 0.12);

    /* Dark surface (used in dark mode, defined here for reference) */
    --dark-surface: rgba(23, 32, 51, 0.6);
    --dark-border: rgba(148, 163, 184, 0.1);
    --dark-border-hover: rgba(148, 163, 184, 0.2);

    /* Typography */
    --font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    --font-size-xs: 0.75rem;
    --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: 1.875rem;
    --font-size-4xl: 2.25rem;
    --font-size-5xl: 3rem;
    --font-size-6xl: 3.75rem;
    --font-size-7xl: 4.5rem;

    /* Spacing */
    --space-1: 0.25rem;
    --space-2: 0.5rem;
    --space-3: 0.75rem;
    --space-4: 1rem;
    --space-5: 1.25rem;
    --space-6: 1.5rem;
    --space-8: 2rem;
    --space-10: 2.5rem;
    --space-12: 3rem;
    --space-16: 4rem;
    --space-20: 5rem;
    --space-24: 6rem;
    --space-navbar: 80px;

    /* Border Radius */
    --radius-sm: 0.375rem;
    --radius-md: 0.5rem;
    --radius-lg: 0.75rem;
    --radius-xl: 1rem;
    --radius-2xl: 1.5rem;
    --radius-full: 9999px;

    /* Transitions */
    --transition-fast: 200ms ease;
    --transition-base: 200ms ease;
    --transition-slow: 200ms ease;
    --transition-smooth: 500ms cubic-bezier(0.4, 0, 0.2, 1);
}

/* ==========================================
   RESET & BASE STYLES
   ========================================== */
*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
    scroll-padding-top: 80px;
    scrollbar-gutter: stable;
}

/* Respect user's reduced motion preference */
@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }

    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

body {
    font-family: var(--font-family);
    font-size: var(--font-size-base);
    line-height: 1.6;
    color: var(--text-primary);
    background: var(--bg-primary);
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Accessibility */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.skip-link {
    position: absolute;
    top: -100%;
    left: var(--space-4);
    z-index: 100000;
    padding: var(--space-3) var(--space-5);
    background: var(--text-primary);
    color: var(--bg-primary);
    font-weight: 600;
    border-radius: var(--radius-md);
    transition: top 0.2s ease;
}

.skip-link:focus {
    top: var(--space-4);
}

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

ul,
ol {
    list-style: none;
}

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

button {
    font-family: inherit;
    cursor: pointer;
    border: none;
    background: none;
}

/* ==========================================
   UTILITY CLASSES
   ========================================== */
.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 var(--space-6);
}

.highlight {
    color: var(--royal-gold);
    font-weight: 700;
}

.glass-card {
    background: var(--glass-bg);
    border: 1.5px solid var(--glass-border);
    border-radius: var(--radius-xl);
    transition: background-color 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease, color 0.2s ease, transform 0.2s ease;
}

/*
 * PERF: kill backdrop-filter EVERYWHERE. It was the lag.
 * On the scroll path it re-blurred ~20 glass-cards + the fixed navbar every
 * frame; on modal/lightbox overlays it blurred the ENTIRE page on open, which
 * made opening modals janky. Every glass surface here is 88–97% opaque, so the
 * blur is visually imperceptible anyway — the translucency + border + shadow
 * carry the look on their own. Nuke it globally.
 */
*,
*::before,
*::after {
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
}

/* Hover effects — no motion, only color/shadow changes */


/* ==========================================
   NAVIGATION
   ========================================== */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    padding: var(--space-4) 0;
    background: transparent;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    border-bottom: 1px solid transparent;
    box-shadow: none;
    transition: background-color var(--transition-base), backdrop-filter var(--transition-base), border-bottom var(--transition-base), box-shadow var(--transition-base);
}

.navbar.scrolled {
    background: rgba(250, 248, 244, 0.97);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(0, 0, 0, 0.08);
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.06);
}

/* Fix for subpages: Disable transition to prevent resize glitch on load */
.detail-page .navbar {
    transition: none !important;
    background: rgba(250, 248, 244, 0.97);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(0, 0, 0, 0.08);
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.06);
    padding: var(--space-4) 0;
    /* Ensure padding matches if modified by JS */
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 var(--space-6);
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
}

.nav-logo {
    display: flex;
    align-items: center;
    gap: var(--space-3);
    text-decoration: none;
    transition: all var(--transition-base);
    width: fit-content;
}

.logo-symbol {
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform var(--transition-base);
}

.nav-logo:hover .logo-symbol {
    transform: none;
}

.logo-symbol svg {
    width: 100%;
    height: 100%;
}

@media (max-width: 480px) {
    .nav-logo {
        gap: 0;
    }
}

.nav-menu {
    display: flex;
    align-items: center;
    gap: var(--space-8);
    justify-self: center;
}

.nav-right {
    display: flex;
    align-items: center;
    gap: var(--space-4);
    justify-self: end;
}

.mobile-only {
    display: none;
}

.desktop-only {
    display: flex;
}

.nav-link {
    font-size: var(--font-size-sm);
    font-weight: 500;
    color: var(--text-tertiary);
    position: relative;
    padding: var(--space-2) 0;
    transition: color var(--transition-fast);
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--text-primary);
    transition: width var(--transition-base);
}

.nav-link:hover,
.nav-link.active {
    color: var(--text-primary);
}

.nav-link:hover::after,
.nav-link.active::after {
    width: 100%;
}

/* Navigation CTA Buttons */
.nav-cta {
    padding: var(--space-2) var(--space-5) !important;
    border-radius: var(--radius-full);
    font-weight: 600;
    transition: all var(--transition-fast);
}

/* Primary CTA (Resume) - Prominent */
.nav-cta.primary {
    background: var(--text-primary);
    color: var(--bg-primary) !important;
    border: 2px solid var(--text-primary);
}

.nav-cta.primary:hover {
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.1);
    background: var(--text-secondary);
    border-color: var(--text-secondary);
}

/* Secondary CTA (Contact) - Subtle */
.nav-cta.secondary {
    background: transparent;
    color: var(--text-primary) !important;
    border: 2px solid var(--accent-secondary);
}

.nav-cta.secondary:hover {
    border-color: var(--text-primary);
    background: var(--bg-tertiary);
}

.nav-cta::after {
    display: none;
}

.nav-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    padding: var(--space-2);
}

.nav-toggle span {
    display: block;
    width: 24px;
    height: 2px;
    background: var(--text-primary);
    border-radius: var(--radius-full);
    transition: all var(--transition-base);
}

/* ==========================================
   HERO SECTION
   ========================================== */
.hero {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
    padding: var(--space-20) var(--space-6);
}

.hero-bg {
    position: absolute;
    inset: 0;
    z-index: -1;
}

.hero-gradient {
    position: absolute;
    inset: 0;
    background:
        radial-gradient(ellipse 80% 50% at 50% -20%, rgba(196, 158, 14, 0.08), transparent),
        radial-gradient(ellipse 60% 40% at 80% 60%, rgba(107, 79, 160, 0.06), transparent),
        radial-gradient(ellipse 50% 30% at 20% 80%, rgba(196, 158, 14, 0.04), transparent);
}

.hero-particles {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image:
        radial-gradient(2px 2px at 20px 30px, rgba(196, 158, 14, 0.4), transparent),
        radial-gradient(2px 2px at 40px 70px, rgba(107, 79, 160, 0.3), transparent),
        radial-gradient(1px 1px at 90px 40px, rgba(196, 158, 14, 0.35), transparent),
        radial-gradient(2px 2px at 130px 80px, rgba(42, 90, 160, 0.15), transparent),
        radial-gradient(1px 1px at 160px 120px, rgba(196, 158, 14, 0.25), transparent);
    background-size: 200px 200px;
    animation: float 20s linear infinite;
    will-change: transform;
}

@keyframes float {
    0% {
        transform: translateY(0);
    }

    100% {
        transform: translateY(-200px);
    }
}

.hero-content {
    text-align: center;
    max-width: 900px;
}

.hero-greeting {
    font-size: var(--font-size-lg);
    color: var(--text-secondary);
    font-weight: 500;
    margin-bottom: var(--space-4);
    letter-spacing: 0.1em;
    text-transform: uppercase;
}

.hero-name {
    font-size: clamp(2.5rem, 10vw, var(--font-size-7xl));
    font-weight: 800;
    line-height: 1.1;
    margin-bottom: var(--space-6);
    background: linear-gradient(135deg, var(--text-primary) 0%, var(--text-tertiary) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Animated sheen sweeping across the name (gold in light, cyan in dark) */
.hero-name-shimmer {
    background: linear-gradient(100deg,
            var(--text-primary) 0%,
            var(--text-primary) 38%,
            var(--royal-gold-light) 50%,
            var(--text-primary) 62%,
            var(--text-primary) 100%);
    background-size: 220% auto;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: hero-shimmer 6.5s linear infinite;
}

@keyframes hero-shimmer {
    0% {
        background-position: 220% center;
    }

    100% {
        background-position: -220% center;
    }
}

.hero-tagline {
    font-size: clamp(var(--font-size-lg), 3vw, var(--font-size-xl));
    color: var(--text-secondary);
    max-width: 700px;
    margin: 0 auto var(--space-10);
    line-height: 1.7;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-4);
    flex-wrap: wrap;
}

.hero-role {
    position: relative;
    font-weight: 600;
    letter-spacing: 0.01em;
    color: var(--text-secondary);
}

.hero-role-sep {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--royal-gold);
    box-shadow: 0 0 0 4px rgba(196, 158, 14, 0.14);
    animation: hero-dot-pulse 2.4s ease-in-out infinite;
}

@keyframes hero-dot-pulse {

    0%,
    100% {
        transform: scale(1);
        opacity: 1;
    }

    50% {
        transform: scale(1.35);
        opacity: 0.7;
    }
}

body.dark-mode .hero-role-sep {
    box-shadow: 0 0 0 4px rgba(96, 182, 216, 0.18);
}

.hero-links {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-4);
    justify-content: center;
    margin-bottom: var(--space-10);
}

.hero-btn {
    display: inline-flex;
    align-items: center;
    gap: var(--space-2);
    padding: var(--space-3) var(--space-6);
    font-size: var(--font-size-sm);
    font-weight: 500;
    border-radius: var(--radius-full);
    transition: all var(--transition-base);
    border: 1px solid transparent;
}

/* GitHub Button - Black */
.hero-btn.github-btn,
.hero-btn.linkedin-btn {
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    color: var(--text-secondary);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
}

.hero-btn.github-btn:hover,
.hero-btn.linkedin-btn:hover {
    background: var(--bg-secondary);
    border-color: var(--text-primary);
    color: var(--text-primary);
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.1);
}

.hero-btn.primary {
    background: var(--text-primary);
    color: var(--bg-primary);
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.06);
}

.hero-btn.primary:hover {
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.1);
}

.hero-btn.secondary {
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    color: var(--text-primary);
    backdrop-filter: blur(10px);
}

.hero-btn.secondary:hover {
    background: rgba(0, 0, 0, 0.05);
    border-color: var(--text-secondary);
}

.hero-social {
    display: flex;
    gap: var(--space-6);
    justify-content: center;
    margin-bottom: var(--space-16);
}

.hero-social a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    border-radius: var(--radius-full);
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    color: var(--text-secondary);
    transition: all var(--transition-base);
}

.hero-social a:hover {
    color: var(--text-primary);
    border-color: var(--text-secondary);
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.1);
}

.hero-scroll {
    position: absolute;
    bottom: var(--space-8);
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--space-3);
    color: var(--text-tertiary);
    font-size: var(--font-size-sm);
}

.scroll-indicator {
    width: 24px;
    height: 40px;
    border: 2px solid var(--text-tertiary);
    border-radius: var(--radius-full);
    position: relative;
}

.scroll-indicator::before {
    content: '';
    position: absolute;
    top: 8px;
    left: 50%;
    transform: translateX(-50%);
    width: 4px;
    height: 8px;
    background: var(--text-secondary);
    border-radius: var(--radius-full);
    animation: scroll 1.5s ease-in-out infinite;
}

@keyframes scroll {

    0%,
    100% {
        opacity: 1;
        transform: translateX(-50%) translateY(0);
    }

    50% {
        opacity: 0.5;
        transform: translateX(-50%) translateY(10px);
    }
}

/* ==========================================
   ANIMATIONS
   ========================================== */
.animate-fade-in {
    animation: fadeIn 0.8s ease forwards;
}

.animate-slide-up {
    animation: slideUp 0.8s ease forwards;
}

.animate-fade-in-delayed {
    animation: fadeIn 0.8s ease 0.3s forwards;
    opacity: 0;
}

.animate-fade-in-delayed-2 {
    animation: fadeIn 0.8s ease 0.6s forwards;
    opacity: 0;
}

.animate-fade-in-delayed-3 {
    animation: fadeIn 0.8s ease 0.9s forwards;
    opacity: 0;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Scroll Animations */
.scroll-animate {
    opacity: 0;
    transform: translateY(40px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.scroll-animate.in-view {
    opacity: 1;
    transform: translateY(0);
    /* Remove will-change after animation to save memory, though simpler to leave it or use JS to remove. 
       For now, we keep it simple or remove it if we could via JS. But CSS only here. */
}

/* ==========================================
   SECTIONS
   ========================================== */
.section {
    padding: var(--space-24) 0;
    position: relative;
    content-visibility: auto;
    contain-intrinsic-size: auto 800px;
    /* Estimate height to prevent scrollbar jumping */
}

/* Subtle gradient border at top of each section */
.section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(0, 0, 0, 0.15), transparent);
}

.section-title {
    font-size: clamp(var(--font-size-3xl), 5vw, var(--font-size-4xl));
    font-weight: 700;
    text-align: center;
    margin-bottom: var(--space-16);
    position: relative;
}

.section-title::after {
    content: '';
    display: block;
    width: 60px;
    height: 4px;
    background: linear-gradient(90deg, var(--royal-gold), var(--royal-gold-light));
    border-radius: var(--radius-full);
    margin: var(--space-4) auto 0;
}

/* ==========================================
   ABOUT SECTION
   ========================================== */
.about {
    background: var(--bg-secondary);
}

.about-content {
    max-width: 1000px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 0.8fr 1.2fr;
    gap: var(--space-8);
    align-items: center;
}

.about-details {
    text-align: left;
    order: 2;
}

.about-text p {
    font-size: var(--font-size-lg);
    color: var(--text-secondary);
    margin-bottom: var(--space-4);
    line-height: 1.7;
}

.about-intro {
    font-size: var(--font-size-xl);
    font-weight: 500;
    margin-bottom: var(--space-6);
    color: var(--text-primary);
    line-height: 1.5;
}

.about-stats {
    display: flex;
    justify-content: flex-start;
    gap: var(--space-12);
    margin-top: var(--space-10);
    flex-wrap: wrap;
}

.about-visual {
    display: flex;
    justify-content: center;
    position: relative;
    order: 1;
}

.about-image-wrapper {
    position: relative;
    width: 320px;
    height: 400px;
    border-radius: var(--radius-2xl);
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    overflow: hidden;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.06);
    transition: transform var(--transition-base);
}



.about-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-tertiary);
    color: var(--text-tertiary);
    position: relative;
    z-index: 1;
}

.about-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center top;
    display: block;
    position: relative;
    z-index: 1;
}

.about-decoration {
    position: absolute;
    inset: 10px;
    border: 1px solid rgba(0, 0, 0, 0.08);
    border-radius: var(--radius-xl);
    z-index: 2;
}

.stat {
    text-align: center;
}

.stat-number {
    display: block;
    font-size: var(--font-size-4xl);
    font-weight: 800;
    color: var(--text-primary);
}

.stat-label {
    font-size: var(--font-size-sm);
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.1em;
}

/* ==========================================
   EDUCATION SECTION
   ========================================== */
.education {
    background: var(--bg-secondary);
}

.edu-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: var(--space-6);
    max-width: 1200px;
    margin: 0 auto;
    align-items: stretch;
}

.edu-card {
    padding: var(--space-6);
    display: flex;
    flex-direction: column;
    position: relative;
    z-index: 10;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.06);
    transition: transform var(--transition-base), box-shadow var(--transition-base), border-color var(--transition-base);
}

.edu-card:hover {
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.1);
    z-index: 20;
}

.edu-certs-card {
    padding: 0;
    overflow: hidden;
}

.edu-cert-feed {
    border: none;
    border-radius: 0;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.edu-cert-feed .xp-row:last-child {
    border-bottom: none;
}

.modal-cert-placeholder {
    border-radius: var(--radius-lg);
    border: 1.5px dashed rgba(0, 0, 0, 0.15);
    height: 160px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: var(--space-2);
    color: var(--text-tertiary);
    background: rgba(0, 0, 0, 0.02);
}

.modal-cert-placeholder svg {
    opacity: 0.35;
}

.modal-cert-placeholder span {
    font-size: var(--font-size-sm);
    opacity: 0.7;
}

.timeline {
    max-width: 800px;
    margin: 0 auto;
    position: relative;
}

.timeline::before {
    content: '';
    position: absolute;
    left: 20px;
    top: 0;
    bottom: 0;
    width: 2px;
    background: linear-gradient(180deg, var(--text-secondary), var(--text-tertiary));
    z-index: 0;
}

.timeline-item {
    position: relative;
    padding-left: 60px;
    padding-bottom: var(--space-10);
    pointer-events: none;
}

.timeline-item .timeline-content,
.timeline-item .timeline-marker {
    pointer-events: auto;
}

.timeline-item:last-child {
    padding-bottom: 0;
}

.timeline-marker {
    position: absolute;
    left: 12px;
    top: 2rem;
    /* Align with card content top */
    width: 18px;
    height: 18px;
    border-radius: var(--radius-full);
    background: var(--bg-primary);
    border: 3px solid var(--text-secondary);
    box-shadow: 0 0 6px rgba(0, 0, 0, 0.15);
    z-index: 2;
    transition: all var(--transition-base);
}

/* Horizontal Connector */
.timeline-marker::after {
    content: '';
    position: absolute;
    left: 15px;
    top: 50%;
    transform: translateY(-50%);
    width: 34px;
    height: 2px;
    background: var(--text-secondary);
    z-index: 1;
    transition: width var(--transition-base), background-color var(--transition-base);
}

.timeline-item:has(.timeline-content:hover) .timeline-marker {
    background: var(--text-primary);
    border-color: var(--text-primary);
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.25);
}

.timeline-item:has(.timeline-content:hover) .timeline-marker::after {
    background: var(--text-primary);
}

.timeline-content {
    padding: var(--space-6);
    position: relative;
    /* Ensure card is above timeline line */
    z-index: 10;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.06);
    transition: transform var(--transition-base), box-shadow var(--transition-base), border-color var(--transition-base);
}

.timeline-content:hover {
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.1);
    z-index: 20;
}

a.edu-link {
    display: block;
    text-decoration: none;
    color: inherit;
    cursor: pointer;
}

a.edu-link:hover {
    border-color: rgba(0, 0, 0, 0.22);
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.1);
    z-index: 20;
}

.education-logo {
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    border: 1px solid rgba(0, 0, 0, 0.12);
    border-radius: var(--radius-lg);
    color: var(--text-primary);
    margin-bottom: var(--space-4);
    padding: 4px;
    /* Add some padding for the logo */
    overflow: hidden;
}

.education-logo img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.timeline-date {
    position: absolute;
    top: var(--space-6);
    right: var(--space-6);
    font-size: var(--font-size-sm);
    color: var(--text-tertiary);
    /* Make date more subtle */
    font-weight: 500;
}

.timeline-content h3 {
    font-size: var(--font-size-xl);
    font-weight: 700;
    margin-bottom: var(--space-1);
}

.timeline-content h4 {
    font-size: var(--font-size-base);
    font-weight: 500;
    color: var(--text-secondary);
    margin-bottom: var(--space-2);
}

.institution {
    color: var(--text-tertiary);
    font-size: var(--font-size-sm);
    margin-bottom: var(--space-3);
}

.education-detail {
    margin-top: var(--space-3);
}

.badge {
    display: inline-block;
    padding: var(--space-1) var(--space-3);
    background: rgba(0, 0, 0, 0.06);
    border: 1px solid rgba(0, 0, 0, 0.14);
    border-radius: var(--radius-full);
    font-size: var(--font-size-sm);
    font-weight: 500;
    color: var(--text-secondary);
}

/* ==========================================
   EXPERIENCE SECTION
   ========================================== */
.experience {
    background: var(--bg-secondary);
}

/* Timeline markers — unified theme color */
.exp-marker {
    border-color: var(--text-secondary);
}

.timeline-item:hover .exp-marker {
    background: var(--text-primary);
    border-color: var(--text-primary);
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.25);
}

/* Experience node card content */
.exp-node {
    position: relative;
    padding: var(--space-5) var(--space-6);
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: var(--space-1);
}

/* Compact cards for projects/hackathons/competitions */
.exp-node.exp-compact {
    padding: var(--space-3) var(--space-5);
    max-width: 75%;
}

/* exp-compact inherits the flex header from parent */

.exp-node.exp-compact .exp-title {
    font-size: var(--font-size-base);
}

.exp-node.exp-compact .exp-desc {
    font-size: var(--font-size-xs);
    line-height: 1.5;
}

/* Top row: pill left, date right */
.exp-tags {
    display: flex;
    align-items: center;
    gap: var(--space-2);
    order: -1;
    margin-bottom: var(--space-2);
}

.exp-header {
    display: flex;
    align-items: center;
    margin-left: auto;
}

/* Title and desc span full width below the top row */
.exp-node .exp-title,
.exp-node .exp-desc,
.exp-node .exp-company,
.exp-node .exp-divider,
.exp-node .exp-arrow {
    width: 100%;
}

/* Type badge pill — themed warm tint */
.exp-type {
    display: inline-flex;
    align-items: center;
    padding: 2px 10px;
    border-radius: var(--radius-full);
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.03em;
    text-transform: uppercase;
    background: rgba(74, 63, 54, 0.08);
    color: var(--text-secondary);
    border: 1px solid rgba(74, 63, 54, 0.16);
}

/* Internship pill — same as default */
.exp-type.internship {
    background: rgba(74, 63, 54, 0.08);
    color: var(--text-secondary);
    border: 1px solid rgba(74, 63, 54, 0.16);
}

/* Status badge */
.exp-status {
    display: inline-flex;
    align-items: center;
    padding: 2px 10px;
    border-radius: var(--radius-full);
    font-size: 11px;
    font-weight: 600;
    background: rgba(59, 130, 246, 0.08);
    color: var(--text-secondary);
    border: 1px solid rgba(0, 0, 0, 0.12);
    letter-spacing: 0.02em;
}

.exp-status::before {
    content: '';
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #3b82f6;
    margin-right: 6px;
    animation: statusPulse 2s ease-in-out infinite;
}

@keyframes statusPulse {

    0%,
    100% {
        opacity: 1;
    }

    50% {
        opacity: 0.4;
    }
}

/* Award badge */
.exp-award {
    display: inline-flex;
    align-items: center;
    padding: 2px 10px;
    border-radius: var(--radius-full);
    font-size: 11px;
    font-weight: 600;
    background: rgba(0, 0, 0, 0.06);
    color: var(--text-secondary);
    border: 1px solid rgba(0, 0, 0, 0.12);
}

/* Gold 1st Place badge */
.exp-award.gold {
    background: rgba(184, 150, 12, 0.1);
    color: #9a7d0a;
    border-color: rgba(184, 150, 12, 0.3);
}

/* Internship featured card */
.exp-node.exp-featured {
    position: relative;
    border: 1.5px solid rgba(0, 0, 0, 0.15);
    border-left: 3px solid var(--royal-gold);
    padding: var(--space-6);
}

.exp-node.exp-featured .exp-title {
    font-size: var(--font-size-xl);
}

.exp-node.exp-featured .exp-arrow {
    font-weight: 700;
    color: var(--text-secondary);
}

/* Divider above View Details */
.exp-divider {
    height: 1px;
    background: rgba(0, 0, 0, 0.12);
    margin-top: var(--space-4);
}

/* Date */
.exp-date {
    font-size: var(--font-size-xs);
    font-weight: 500;
    color: var(--text-tertiary);
    white-space: nowrap;
}

/* Title */
.exp-title {
    font-size: var(--font-size-lg);
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: var(--space-1);
    line-height: 1.3;
}

/* Company name (for internship) */
.exp-company {
    font-size: var(--font-size-sm);
    color: var(--text-secondary);
    margin-bottom: var(--space-1);
}

/* Description */
.exp-desc {
    font-size: var(--font-size-sm);
    color: var(--text-secondary);
    line-height: 1.6;
    margin: 0;
}

/* Link arrow (for internship card) */
.exp-arrow {
    display: inline-block;
    margin-top: var(--space-3);
    font-size: var(--font-size-sm);
    font-weight: 600;
    color: var(--text-tertiary);
    transition: color var(--transition-fast), transform var(--transition-fast);
}

.exp-link:hover .exp-arrow,
.exp-node:hover .exp-arrow {
    color: var(--text-primary);
}

/* Responsive */
@media (max-width: 600px) {
    .exp-node {
        padding: var(--space-4);
    }

    .exp-node.exp-compact {
        max-width: 100%;
    }

    .exp-header {
        flex-direction: column;
        align-items: flex-start;
    }

    .exp-date {
        order: -1;
        margin-bottom: var(--space-1);
    }

    .exp-title {
        font-size: var(--font-size-base);
    }
}

/* Keep old experience page classes for subpage */
.experience-list {
    padding-left: var(--space-5);
}

.experience-list li {
    position: relative;
    padding-left: var(--space-4);
    margin-bottom: var(--space-3);
    color: var(--text-secondary);
    font-size: var(--font-size-base);
    line-height: 1.7;
}

.experience-list li::before {
    content: '';
    position: absolute;
    left: 0;
    top: 10px;
    width: 6px;
    height: 6px;
    border-radius: var(--radius-full);
    background: var(--accent-cyan);
}

/* ==========================================
   PROJECTS SECTION
   ========================================== */
.projects {
    background: var(--bg-primary);
}

/* Slider Container */
.projects-slider-container {
    display: flex;
    align-items: center;
    gap: var(--space-4);
    position: relative;
}

.projects-slider-wrapper {
    overflow: hidden;
    flex: 1;
    padding-top: var(--space-8);
    margin-top: calc(-1 * var(--space-8));
    padding-left: var(--space-4);
    margin-left: calc(-1 * var(--space-4));
    padding-right: var(--space-4);
    margin-right: calc(-1 * var(--space-4));
    padding-bottom: var(--space-12);
    margin-bottom: calc(-1 * var(--space-12));
}

.projects-grid {
    display: flex;
    gap: var(--space-6);
    transition: transform 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.projects-grid .project-card {
    flex: 0 0 calc((100% - 2 * var(--space-6)) / 3);
    min-width: 0;
}

/* Slider Navigation Arrows */
.slider-arrow {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all var(--transition-fast);
    color: var(--text-primary);
    flex-shrink: 0;
    z-index: 10;
}

.slider-arrow:hover {
    background: var(--text-primary);
    color: var(--bg-primary);
}

.slider-arrow:active {
    opacity: 0.8;
}

/* Slider Dots */
.slider-dots {
    display: flex;
    justify-content: center;
    gap: var(--space-2);
    margin-top: var(--space-6);
}

.slider-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: var(--bg-tertiary);
    border: none;
    cursor: pointer;
    transition: all var(--transition-fast);
}

.slider-dot.active {
    background: var(--text-primary);
}

.slider-dot:hover:not(.active) {
    background: var(--text-secondary);
}

/* Responsive Slider */
@media (max-width: 1024px) {
    .projects-grid .project-card {
        flex: 0 0 calc((100% - var(--space-6)) / 2);
    }
}

@media (max-width: 768px) {
    .projects-slider-container {
        gap: var(--space-2);
    }

    .slider-arrow {
        width: 36px;
        height: 36px;
    }

    .projects-grid .project-card {
        flex: 0 0 100%;
    }
}

.project-card {
    padding: 0;
    display: flex;
    flex-direction: column;
    cursor: pointer;
    border: 2px solid rgba(0, 0, 0, 0.12);
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.06);
    overflow: hidden;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    -webkit-backdrop-filter: none;
    transition: transform 0.4s ease, border-color 0.4s ease, box-shadow 0.4s ease, background 0.4s ease;
}

/* Unique tinted card backgrounds — light mode */
.project-card:has(.preview-finance) {
    background: rgba(196, 158, 14, 0.06);
    border-color: rgba(0, 0, 0, 0.15);
}
.project-card:has(.preview-tech) {
    background: rgba(37, 99, 165, 0.06);
    border-color: rgba(0, 0, 0, 0.15);
}
.project-card:has(.preview-health) {
    background: rgba(16, 163, 127, 0.06);
    border-color: rgba(0, 0, 0, 0.15);
}
.project-card:has(.preview-ai) {
    background: rgba(142, 68, 173, 0.06);
    border-color: rgba(0, 0, 0, 0.15);
}
.project-card:has(.preview-security) {
    background: rgba(100, 100, 120, 0.06);
    border-color: rgba(0, 0, 0, 0.15);
}

.project-card:hover {
    border-color: var(--text-primary);
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.1);
    z-index: 20;
}

.project-card:has(.preview-finance):hover {
    background: rgba(196, 158, 14, 0.11);
}
.project-card:has(.preview-tech):hover {
    background: rgba(37, 99, 165, 0.11);
}
.project-card:has(.preview-health):hover {
    background: rgba(16, 163, 127, 0.11);
}
.project-card:has(.preview-ai):hover {
    background: rgba(142, 68, 173, 0.11);
}
.project-card:has(.preview-security):hover {
    background: rgba(100, 100, 120, 0.11);
}

.project-body {
    padding: var(--space-5) var(--space-5) var(--space-5);
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}



.project-card:hover .project-arrow {
    color: var(--text-primary);
}

.project-title {
    font-size: var(--font-size-xl);
    font-weight: 700;
    margin-bottom: var(--space-2);
    color: var(--text-primary);
    line-height: 1.2;
}

.project-description {
    color: var(--text-secondary);
    line-height: 1.6;
    font-size: var(--font-size-sm);
    margin-bottom: var(--space-4);
    flex-grow: 1;
}

.project-tech {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-2);
    margin-bottom: var(--space-4);
    margin-top: auto;
}

.tech-tag {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: fit-content;
    padding: var(--space-1) var(--space-3);
    background: rgba(74, 63, 54, 0.08);
    border: 1px solid rgba(74, 63, 54, 0.18);
    border-radius: var(--radius-full);
    font-size: var(--font-size-xs);
    font-weight: 500;
    color: var(--text-secondary);
    transition: all 0.2s ease;
}

.tech-tag-more {
    background: transparent;
    border: 1px dashed rgba(74, 63, 54, 0.28);
    color: var(--text-tertiary);
    font-size: 0.7rem;
}

.tech-tag:hover {
    background: var(--text-primary);
    color: var(--bg-primary);
    border-color: var(--text-primary);
}

.project-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: var(--space-4);
    border-top: 1px solid rgba(0, 0, 0, 0.10);
    transition: border-color 0.2s ease;
}

.project-status-group {
    display: flex;
    align-items: center;
    gap: var(--space-2);
}

.project-type {
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-tertiary);
    background: rgba(0, 0, 0, 0.06);
    padding: 2px 6px;
    border-radius: 4px;
}

.project-card:hover .project-footer {
    border-top-color: rgba(0, 0, 0, 0.20);
}

.project-preview {
    width: 100%;
    aspect-ratio: 16 / 9;
    border-radius: 0;
    overflow: hidden;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    border: none;
    border-bottom: 1px solid rgba(0, 0, 0, 0.10);
}

/* Preview floating icon */
.preview-icon {
    position: relative;
    z-index: 2;
    opacity: 0.35;
    opacity: 0.35;
    transition: all 0.4s ease;
    filter: drop-shadow(0 2px 8px rgba(0, 0, 0, 0.1));
}

.project-card:hover .preview-icon {
    opacity: 0.7;
    filter: drop-shadow(0 4px 12px rgba(0, 0, 0, 0.2));
}

/* Preview decorative pattern */
.preview-pattern {
    position: absolute;
    inset: 0;
    z-index: 1;
    opacity: 0.5;
}

.preview-pattern::before,
.preview-pattern::after {
    content: '';
    position: absolute;
    border-radius: 50%;
    transition: all 0.4s ease;
}

.preview-pattern::before {
    width: 120px;
    height: 120px;
    top: -30px;
    right: -20px;
    background: rgba(255, 255, 255, 0.12);
}

.preview-pattern::after {
    width: 80px;
    height: 80px;
    bottom: -20px;
    left: -15px;
    background: rgba(255, 255, 255, 0.08);
}

/* Preview pattern hover — no motion */

/* Unique gradient per project type — light mode */
.preview-finance {
    background: linear-gradient(135deg, #ede0bc 0%, #d9c47a 40%, #c9ad3a 100%);
    color: #5c4310;
}

.preview-ai {
    background: linear-gradient(135deg, #ded2e8 0%, #c8aed6 40%, #ad7ec4 100%);
    color: #4a1a6b;
}

.preview-health {
    background: linear-gradient(135deg, #bfead8 0%, #8ad4b8 40%, #4dbe9a 100%);
    color: #0a5c48;
}

.preview-security {
    background: linear-gradient(135deg, #d3d1d8 0%, #b8b4c0 40%, #9894a2 100%);
    color: #3a3848;
}

.preview-tech {
    background: linear-gradient(135deg, #c6dced 0%, #96c0de 40%, #5290c0 100%);
    color: #12335c;
}

.preview-research {
    background: linear-gradient(135deg, #bfe8e2 0%, #84d3c8 40%, #3dbdac 100%);
    color: #0a5650;
}

.project-preview img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
    position: relative;
    z-index: 3;
}

/* Project preview img hover — no motion */

.detail-preview {
    width: 100%;
    aspect-ratio: 16 / 9;
    max-height: 500px;
    background: rgba(0, 0, 0, 0.05);
    border-radius: var(--radius-xl);
    overflow: hidden;
    margin-bottom: var(--space-10);
    border: 1px solid rgba(0, 0, 0, 0.08);
}

.detail-preview img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.project-arrow {
    font-size: var(--font-size-sm);
    font-weight: 600;
    color: var(--text-tertiary);
    transition: all 0.2s ease;
}

.project-features {
    margin-bottom: var(--space-6);
    padding-left: var(--space-4);
    flex-grow: 1;
}

.project-features li {
    position: relative;
    padding-left: var(--space-4);
    margin-bottom: var(--space-2);
    color: var(--text-secondary);
    font-size: var(--font-size-sm);
    line-height: 1.6;
}

.project-features li::before {
    content: '→';
    position: absolute;
    left: 0;
    color: var(--text-secondary);
}

.detail-content .project-tech {
    display: grid;
    grid-template-columns: repeat(3, max-content);
    gap: var(--space-2);
    margin-top: auto;
}

.tech-tag {
    padding: var(--space-1) var(--space-3);
    background: rgba(74, 63, 54, 0.08);
    border: 1px solid rgba(74, 63, 54, 0.18);
    border-radius: var(--radius-full);
    font-size: var(--font-size-xs);
    font-weight: 500;
    color: var(--text-secondary);
}

.project-status {
    display: inline-flex;
    align-items: center;
    gap: var(--space-1);
    padding: var(--space-1) var(--space-3);
    border-radius: var(--radius-full);
    font-size: var(--font-size-xs);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.project-status.completed {
    background: var(--status-success-bg);
    color: var(--status-success-text);
    border: 1px solid var(--status-success-border);
}

.project-status.in-progress {
    background: var(--status-warning-bg);
    color: var(--status-warning-text);
    border: 1px solid var(--status-warning-border);
}

.project-btn {
    display: inline-flex;
    align-items: center;
    gap: var(--space-2);
    margin-top: var(--space-4);
    padding: var(--space-3) var(--space-5);
    background: var(--text-primary);
    color: var(--bg-primary);
    border-radius: var(--radius-full);
    font-size: var(--font-size-sm);
    font-weight: 600;
    transition: all var(--transition-base);
}

.project-btn:hover {
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.1);
}

/* ==========================================
   SKILLS SECTION
   ========================================== */
.skills {
    background: var(--bg-primary);
}

.skills-grid {
    display: flex;
    flex-direction: column;
    gap: var(--space-6);
}

.skill-category {
    padding: var(--space-4);
    transition: all var(--transition-base);
}

.skill-category:hover {
    z-index: 20;
}

.skill-category-header {
    display: flex;
    align-items: center;
    gap: var(--space-3);
    margin-bottom: var(--space-4);
    color: var(--text-secondary);
}

.skill-category-header h3 {
    font-size: var(--font-size-lg);
    font-weight: 600;
    color: var(--text-primary);
}

.skill-cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
    gap: var(--space-4);
    justify-content: center;
}

.skill-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: var(--space-4);
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(0, 0, 0, 0.12);
    /* Matches education logos */
    border-radius: var(--radius-lg);
    transition: all var(--transition-base);
    cursor: default;
    aspect-ratio: 1 / 1;
    justify-content: center;
}

.skill-card:hover {
    transform: translateY(-2px);
    background: rgba(255, 255, 255, 0.95);
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.1), 0 0 10px var(--brand-color, rgba(0, 0, 0, 0.1));
    border-color: var(--brand-color, var(--text-primary));
}

.skill-icon {
    width: 28px;
    height: 28px;
    margin-bottom: var(--space-2);
    color: var(--text-secondary);
    transition: color var(--transition-fast);
}

.skill-icon svg {
    width: 100%;
    height: 100%;
}

.skill-card:hover .skill-icon {
    color: var(--brand-color, var(--text-primary));
}

.skill-name {
    font-size: var(--font-size-sm);
    font-weight: 500;
    color: var(--text-secondary);
}

/* Hide original tags */
.skill-tags {
    display: none;
}

/* ==========================================
   ACHIEVEMENTS SECTION
   ========================================== */
.achievements {
    background: var(--bg-secondary);
}

.achievements-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: var(--space-6);
    max-width: 1200px;
    margin: 0 auto;
}

.achievement-card {
    padding: var(--space-8);
    text-align: center;
    position: relative;
}

.achievement-badge {
    display: inline-block;
    padding: var(--space-1) var(--space-3);
    border-radius: var(--radius-full);
    font-size: var(--font-size-xs);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    margin-bottom: var(--space-3);
}

.achievement-badge.winner {
    background: rgba(0, 0, 0, 0.06);
    color: var(--text-secondary);
    border: 1px solid rgba(0, 0, 0, 0.14);
}

.achievement-badge.participant {
    background: rgba(0, 0, 0, 0.06);
    color: var(--text-secondary);
    border: 1px solid rgba(0, 0, 0, 0.14);
}

.achievement-icon {
    width: 80px;
    height: 80px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto var(--space-5);
    border-radius: var(--radius-full);
}

/* Winner Achievement - Black trophy */
.achievement-icon.trophy {
    background: rgba(196, 158, 14, 0.08);
    color: var(--royal-gold);
    border: 2px solid rgba(196, 158, 14, 0.25);
}

/* Participant Achievement - Match trophy styling */
.achievement-icon.medal {
    background: rgba(107, 79, 160, 0.06);
    color: var(--accent-purple);
    border: 2px solid rgba(107, 79, 160, 0.18);
}

.achievement-card h3 {
    font-size: var(--font-size-lg);
    font-weight: 600;
    margin-bottom: var(--space-3);
}

.achievement-card p {
    color: var(--text-secondary);
    font-size: var(--font-size-base);
}

/* ==========================================
   CONTACT SECTION
   ========================================== */
.contact {
    background: var(--bg-secondary);
}

.contact-intro {
    text-align: center;
    font-size: var(--font-size-lg);
    color: var(--text-secondary);
    max-width: 900px;
    margin: -var(--space-8) auto var(--space-12);
}

.contact-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: var(--space-6);
    max-width: 1000px;
    margin: 0 auto;
}

.contact-card {
    padding: var(--space-8);
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--space-4);
}

.contact-card svg {
    color: var(--accent-cyan);
}

.contact-card h3 {
    font-size: var(--font-size-lg);
    font-weight: 600;
}

.contact-card p {
    color: var(--text-secondary);
    font-size: var(--font-size-sm);
    word-break: break-word;
}

/* ==========================================
   BEYOND THE CODE SECTION
   ========================================== */
.beyond-code {
    background: var(--bg-primary);
}

.beyond-content {
    max-width: 1000px;
    margin: 0 auto;
}

.beyond-intro {
    text-align: center;
    margin-bottom: var(--space-12);
}

.beyond-intro p {
    font-size: var(--font-size-lg);
    color: var(--text-secondary);
    line-height: 1.8;
    max-width: 600px;
    margin: 0 auto;
}

.beyond-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: var(--space-6);
    margin-bottom: var(--space-12);
}

.beyond-card {
    padding: var(--space-8);
    text-align: center;
    position: relative;
    overflow: hidden;
    transition: all var(--transition-base);
}

.beyond-card:hover {
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.1);
    z-index: 20;
}

.beyond-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 3px;
    background: linear-gradient(90deg, var(--royal-gold), var(--accent-purple));
    border-radius: var(--radius-full);
    opacity: 0;
    transition: opacity var(--transition-base);
}

.beyond-card:hover::before {
    opacity: 1;
}

.beyond-icon {
    width: 72px;
    height: 72px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto var(--space-5);
    border-radius: var(--radius-xl);
    background: linear-gradient(135deg, rgba(107, 79, 160, 0.06), rgba(196, 158, 14, 0.08));
    color: var(--text-secondary);
    border: 1px solid rgba(0, 0, 0, 0.08);
    transition: all var(--transition-base);
}

.beyond-card:hover .beyond-icon {
    background: linear-gradient(135deg, rgba(107, 79, 160, 0.10), rgba(196, 158, 14, 0.12));
}

.beyond-card h3 {
    font-size: var(--font-size-lg);
    font-weight: 700;
    margin-bottom: var(--space-5);
    color: var(--text-primary);
}

.learning-list {
    text-align: left;
    list-style: none;
    padding: 0;
    margin: 0;
}

.learning-list li {
    padding: var(--space-3) var(--space-4);
    padding-left: var(--space-8);
    position: relative;
    color: var(--text-secondary);
    font-size: var(--font-size-sm);
    background: rgba(0, 0, 0, 0.04);
    border-radius: var(--radius-md);
    margin-bottom: var(--space-2);
    transition: all var(--transition-fast);
}

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

.learning-list li:hover {
    background: rgba(0, 0, 0, 0.07);
}

.learning-list li::before {
    content: "▸";
    position: absolute;
    left: var(--space-4);
    color: var(--text-tertiary);
    font-size: var(--font-size-xs);
}

.interests-tags {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-2);
    justify-content: center;
}

.interest-tag {
    padding: var(--space-2) var(--space-4);
    background: rgba(0, 0, 0, 0.05);
    border: 1px solid rgba(0, 0, 0, 0.12);
    border-radius: var(--radius-full);
    font-size: var(--font-size-sm);
    font-weight: 500;
    color: var(--text-secondary);
    transition: all var(--transition-base);
    cursor: default;
}

.interest-tag:hover {
    background: var(--text-primary);
    border-color: var(--text-primary);
    color: var(--bg-primary);
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.1);
}

.philosophy-quote {
    font-size: var(--font-size-lg);
    font-style: italic;
    color: var(--text-secondary);
    line-height: 1.6;
    padding: var(--space-4) var(--space-2);
    text-align: center;
    margin: 0;
    margin-top: -10px;
    /* Lift text slightly */
    position: relative;
    z-index: 1;
}

.fun-stats {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: var(--space-4);
    padding: var(--space-8);
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-xl);
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.06);
}

.fun-stat {
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--space-2);
    padding: var(--space-4);
    border-radius: var(--radius-lg);
    transition: all var(--transition-base);
}

.fun-stat:hover {
    background: rgba(0, 0, 0, 0.02);
}

.fun-stat-icon {
    font-size: 2.5rem;
    line-height: 1;
    filter: grayscale(0);
    transition: transform var(--transition-base);
}

/* fun-stat-icon hover — no motion */

.fun-stat-number {
    font-size: var(--font-size-2xl);
    font-weight: 800;
    color: var(--text-primary);
    letter-spacing: -0.02em;
}

.fun-stat-label {
    font-size: var(--font-size-xs);
    color: var(--text-tertiary);
    text-transform: uppercase;
    letter-spacing: 0.08em;
    font-weight: 500;
}

/* ==========================================
   FOOTER
   ========================================== */
/* Contact Form Row (Side by Side) */
.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--space-4);
}

@media (max-width: 640px) {
    .form-row {
        grid-template-columns: 1fr;
    }
}

.footer {
    padding: var(--space-8) 0;
    border-top: 1px solid var(--glass-border);
    background: var(--bg-secondary);
}

/* ==========================================
   RESPONSIVE DESIGN
   ========================================== */
@media (max-width: 768px) {
    .nav-container {
        display: flex;
        justify-content: space-between;
    }

    .mobile-only {
        display: block;
    }

    .desktop-only {
        display: none;
    }

    /* Nav menu styles moved to MOBILE NAVIGATION section below */

    .nav-toggle {
        display: flex;
        z-index: 1001;
    }

    .hero-links {
        flex-direction: column;
        align-items: center;
    }

    .hero-btn {
        width: 100%;
        max-width: 280px;
        justify-content: center;
    }

    .about-stats {
        gap: var(--space-8);
        justify-content: center;
    }

    .about-content {
        grid-template-columns: 1fr;
        gap: var(--space-10);
        text-align: center;
    }

    .about-details {
        text-align: center;
    }

    .about-visual {
        order: -1;
    }

    .about-image-wrapper {
        width: 260px;
        height: 320px;
    }

    .edu-grid {
        grid-template-columns: 1fr;
        max-width: 600px;
    }

    .timeline::before {
        left: 10px;
    }

    .timeline-item {
        padding-left: 40px;
    }

    .timeline-marker {
        left: 2px;
    }

    /* Slider styles handled in main section */

    .experience-header {
        flex-direction: column;
        align-items: flex-start;
    }

    .experience-meta {
        align-items: flex-start;
        text-align: left;
    }

    /* Mobile Performance Optimizations */
    .glass-card {
        backdrop-filter: blur(10px);
        -webkit-backdrop-filter: blur(10px);
    }

    .navbar.scrolled {
        backdrop-filter: blur(10px);
        -webkit-backdrop-filter: blur(10px);
    }

    /* Simplify transitions on mobile for better performance */
    .glass-card,
    .skill-tag,
    .interest-tag,
    .beyond-card,
    .learning-list li {
        transition: none;
    }

    /* Ensure smooth scrolling */
    .section {
        touch-action: pan-y;
    }
}

@media (max-width: 480px) {
    .section {
        padding: var(--space-16) 0;
    }

    .container {
        padding: 0 var(--space-5);
    }

    .modal-content {
        padding: var(--space-5);
        width: 90%;
    }

    .modal-link {
        padding: var(--space-3) var(--space-4);
        font-size: var(--font-size-sm);
    }

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

    .hero-scroll {
        display: none;
    }

    .stat-number {
        font-size: var(--font-size-3xl);
    }

    .hero-social {
        margin-bottom: var(--space-8);
    }

    .hero-social a {
        width: 44px;
        height: 44px;
    }

    /* Slider styles handled in main section */

    .skills-grid {
        grid-template-columns: 1fr;
    }

    .contact-grid {
        grid-template-columns: 1fr;
    }

    .achievements-grid {
        grid-template-columns: 1fr;
    }

    .beyond-grid {
        grid-template-columns: 1fr;
    }

    .fun-stats {
        grid-template-columns: repeat(2, 1fr);
        gap: var(--space-4);
        padding: var(--space-6);
    }

    .fun-stat {
        padding: var(--space-3);
    }

    .fun-stat-icon {
        font-size: 2rem;
    }

    .fun-stat-number {
        font-size: var(--font-size-xl);
    }

    .timeline-content {
        padding: var(--space-4);
    }

    .experience-card,
    .project-card,
    .achievement-card,
    .contact-card {
        padding: var(--space-6);
    }
}

/* ==========================================
   CONTACT MODAL
   ========================================== */
.modal-overlay {
    position: fixed;
    inset: 0;
    z-index: 2000;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: all var(--transition-base);
}

.modal-overlay.active {
    opacity: 1;
    visibility: visible;
}

/* Match scrollbar gutter to modal backdrop when modal is open */
html:has(.modal-overlay.active) {
    background: rgba(0, 0, 0, 0.8);
}

html:has(.lightbox-overlay.active) {
    background: rgba(0, 0, 0, 0.92);
}

.modal-content {
    position: relative;
    max-width: 520px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
    padding: var(--space-10);
    text-align: center;
    transform: translateY(20px) scale(0.95);
    transition: transform var(--transition-base);
    background: var(--bg-primary);
    border-radius: var(--radius-2xl);
    border: 1px solid rgba(0, 0, 0, 0.06);
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.1);
}

.modal-overlay.active .modal-content {
    transform: translateY(0) scale(1);
}

.modal-close {
    position: absolute;
    top: var(--space-4);
    right: var(--space-4);
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--radius-full);
    color: var(--text-secondary);
    transition: all var(--transition-fast);
}

.modal-close:hover {
    color: var(--text-primary);
    background: rgba(0, 0, 0, 0.05);
}

.modal-title {
    font-size: var(--font-size-2xl);
    font-weight: 700;
    margin-bottom: var(--space-3);
    color: var(--text-primary);
}

.modal-date {
    display: inline-block;
    font-size: var(--font-size-sm);
    font-weight: 500;
    color: var(--text-tertiary);
    margin-bottom: var(--space-4);
}

.modal-intro {
    font-size: var(--font-size-base);
    color: var(--text-secondary);
    margin-bottom: var(--space-8);
}

/* Certificate image in modal */
.modal-cert {
    margin-top: var(--space-4);
    margin-bottom: var(--space-4);
    border-radius: var(--radius-lg);
    overflow: hidden;
    border: 1px solid rgba(0, 0, 0, 0.10);
}

.modal-cert img {
    width: 100%;
    height: auto;
    display: block;
    border-radius: var(--radius-lg);
}

body.dark-mode .modal-cert {
    border-color: rgba(148, 163, 184, 0.18);
}

body.dark-mode .modal-cert-placeholder {
    border-color: rgba(148, 163, 184, 0.2);
    background: rgba(255, 255, 255, 0.02);
}

.modal-links {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--space-4);
}

.modal-link {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-3);
    padding: var(--space-4);
    background: rgba(0, 0, 0, 0.04);
    border: 1px solid rgba(0, 0, 0, 0.10);
    border-radius: var(--radius-lg);
    color: var(--text-primary);
    font-size: var(--font-size-base);
    font-weight: 500;
    transition: all var(--transition-fast);
    text-decoration: none;
}

.modal-link:hover {
    background: rgba(0, 0, 0, 0.07);
}

.modal-link svg {
    width: 20px;
    height: 20px;
    flex-shrink: 0;
    color: var(--text-secondary);
}

/* Specific Link Styling */
.modal-link.email-copy {
    grid-column: span 2;
    cursor: pointer;
    position: relative;
    justify-content: space-between;
}

/* Make Resume span full width too for balance, or keep it in grid? 
/* GitHub and LinkedIn will naturally fall into 1fr 1fr */

/* GitHub and LinkedIn will naturally fall into 1fr 1fr if they are middle children */

.modal-link .copy-hint {
    /* margin-left: auto; */
    /* No longer needed with space-between */
    font-size: var(--font-size-xs);
    color: var(--text-tertiary);
    /* Removed absolute positioning to prevent overlap */
    transition: color var(--transition-fast);
}



/* Email Copy Layout Fix */
.email-copy {
    grid-column: 1 / -1;
}

.modal-link.email-copy.copied .copy-hint {
    color: transparent;
}

.modal-link.email-copy.copied .copy-hint::before {
    content: '✓ Copied!';
    position: absolute;
    right: 20px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--brand-color, #10b981);
    font-weight: 600;

    font-size: var(--font-size-xs);
    white-space: nowrap;
}

/* Contact Form Styles */
.contact-form {
    margin-top: var(--space-6);
    margin-bottom: var(--space-6);
    display: flex;
    flex-direction: column;
    gap: var(--space-4);
}

.form-input {
    width: 100%;
    padding: var(--space-3) var(--space-4);
    border-radius: var(--radius-lg);
    background: rgba(0, 0, 0, 0.04);
    border: 1px solid rgba(0, 0, 0, 0.12);
    color: var(--text-primary);
    font-family: inherit;
    font-size: var(--font-size-base);
    transition: all var(--transition-fast);
}

textarea.form-input {
    resize: vertical;
    min-height: 100px;
}

.form-input:focus {
    background: rgba(0, 0, 0, 0.06);
    border-color: var(--text-primary);
    outline: none;
}

.form-input::placeholder {
    color: var(--text-tertiary);
}

.form-submit {
    padding: var(--space-3) var(--space-6);
    background: var(--text-primary);
    color: var(--bg-primary);
    border: none;
    border-radius: var(--radius-lg);
    font-weight: 600;
    cursor: pointer;
    transition: all var(--transition-fast);
}

.form-submit:hover {
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.1);
    background: var(--text-secondary);
}

/* Dark Mode Form Overrides */
body.dark-mode .form-input {
    background: rgba(23, 32, 51, 0.5);
    border-color: var(--glass-border);
}

body.dark-mode .form-input:focus {
    background: rgba(23, 32, 51, 0.7);
    border-color: var(--text-primary);
}

/* ==========================================
   DARK MODE
   ========================================== */
body.dark-mode {
    --bg-primary: #0b1120;
    --bg-secondary: #131c2f;
    --bg-tertiary: #1a2540;
    --bg-card: rgba(25, 35, 55, 0.6);

    --text-primary: #f1f5f9;
    --text-secondary: #b4c4d8;
    --text-tertiary: #8a9bb2;

    --accent-primary: #f1f5f9;
    --accent-secondary: #e2e8f0;
    --accent-highlight: #ffffff;

    /* Professional Accent — light variants for dark mode */
    --accent-cyan: #a1b1c7;
    --accent-purple: #ffffff;
    --accent-pink: #d4a9c0;
    --accent-blue: #93b4e8;

    /* Royal Gold Accent (replaced in dark mode with cool-cyan) */
    --royal-gold: #60b6d8;
    --royal-gold-light: #9fe6f5;

    /* Status Colors */
    --status-success: #34d399;
    --status-success-text: #34d399;
    --status-success-bg: rgba(16, 185, 129, 0.15);
    --status-success-border: rgba(16, 185, 129, 0.3);
    --status-warning: #fbbf24;
    --status-warning-text: #fbbf24;
    --status-warning-bg: rgba(245, 158, 11, 0.15);
    --status-warning-border: rgba(245, 158, 11, 0.3);

    --glass-bg: rgba(19, 28, 47, 0.88);
    --glass-border: rgba(148, 163, 184, 0.18);
    --glass-shadow: rgba(0, 0, 0, 0.5);

    --dark-surface: rgba(23, 32, 51, 0.7);
    --dark-border: rgba(148, 163, 184, 0.16);
    --dark-border-hover: rgba(148, 163, 184, 0.28);
}

/* Dark-mode override for section underline */
body.dark-mode .section-title::after {
    background: linear-gradient(90deg, var(--royal-gold), var(--royal-gold-light));
}

/* ==========================================
   SCROLLBAR - Dark Mode (dim appearance)
   ========================================== */
/* Firefox */
body.dark-mode {
    scrollbar-color: rgba(255, 255, 255, 0.16) rgba(255, 255, 255, 0.03);
}

/* WebKit/Blink */
body.dark-mode::-webkit-scrollbar {
    width: 12px;
    height: 12px;
}

body.dark-mode::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.03);
}

body.dark-mode::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.16);
    border-radius: 9999px;
    border: 3px solid transparent;
    background-clip: padding-box;
}

body.dark-mode::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.24);
}


/* --- Dark Mode Specific Overrides --- */

/* Fix Text Colors */
body.dark-mode .nav-logo,
body.dark-mode .project-title,
body.dark-mode .exp-title,
body.dark-mode .section-title,
body.dark-mode .stat-number,
body.dark-mode .fun-stat-number,
body.dark-mode .hero-name {
    color: var(--text-primary);
}

/* Section separator — override light mode */
body.dark-mode .section::before {
    background: linear-gradient(90deg, transparent, rgba(148, 163, 184, 0.15), transparent);
}

/* Hero Section & Gradients */
body.dark-mode .hero-gradient {
    background:
        radial-gradient(ellipse 80% 50% at 50% -20%, rgba(56, 89, 160, 0.08), transparent),
        radial-gradient(ellipse 60% 40% at 80% 60%, rgba(100, 130, 200, 0.05), transparent),
        radial-gradient(ellipse 50% 30% at 20% 80%, rgba(56, 89, 160, 0.04), transparent);
}

body.dark-mode .hero-particles {
    opacity: 0.3;
}

/* Cards & Backgrounds */
body.dark-mode .skill-card,
body.dark-mode .about-image-wrapper,
body.dark-mode .fun-stats,
body.dark-mode .beyond-icon,
body.dark-mode .education-logo {
    background: rgba(148, 163, 184, 0.06);
    border-color: var(--dark-border);
    color: var(--text-primary);
}

/* Achievements (Trophies/Medals) */
body.dark-mode .achievement-icon.trophy,
body.dark-mode .achievement-icon.medal {
    background: rgba(148, 163, 184, 0.10);
    color: var(--text-primary);
    border-color: var(--glass-border);
}

/* Tags, Badges & Lists */
body.dark-mode .tech-tag,
body.dark-mode .achievement-badge,
body.dark-mode .interest-tag,
body.dark-mode .learning-list li {
    background: rgba(147, 180, 232, 0.12);
    border-color: rgba(147, 180, 232, 0.22);
    color: var(--text-secondary);
}

body.dark-mode .badge {
    background: rgba(148, 163, 184, 0.12);
    border-color: rgba(148, 163, 184, 0.22);
    color: var(--text-secondary);
}

body.dark-mode .interest-tag:hover {
    background: var(--text-primary);
    color: var(--bg-primary);
}

body.dark-mode .learning-list li:hover {
    background: rgba(148, 163, 184, 0.14);
}

/* Project Status */
body.dark-mode .project-status.completed {
    background: var(--status-success-bg);
    color: var(--status-success-text);
    border-color: var(--status-success-border);
}

body.dark-mode .project-status.in-progress {
    background: var(--status-warning-bg);
    color: var(--status-warning-text);
    border-color: var(--status-warning-border);
}

/* Previews */
body.dark-mode .project-preview {
    border-bottom-color: rgba(148, 163, 184, 0.12);
}

body.dark-mode .project-preview,
body.dark-mode .detail-preview {
    border-color: rgba(148, 163, 184, 0.12);
}

body.dark-mode .preview-finance {
    background: linear-gradient(135deg, #5c3d1a 0%, #8b6914 40%, #c49e0e 100%);
    color: #ffffff;
}

body.dark-mode .preview-ai {
    background: linear-gradient(135deg, #5b2c6f 0%, #8e44ad 40%, #c39bd3 100%);
    color: #ffffff;
}

body.dark-mode .preview-health {
    background: linear-gradient(135deg, #0e6251 0%, #148f77 40%, #1abc9c 100%);
    color: #ffffff;
}

body.dark-mode .preview-security {
    background: linear-gradient(135deg, #1b2631 0%, #2c3e50 40%, #5d6d7e 100%);
    color: #ffffff;
}

body.dark-mode .preview-tech {
    background: linear-gradient(135deg, #154360 0%, #1a5276 40%, #2e86c1 100%);
    color: #ffffff;
}

body.dark-mode .preview-research {
    background: linear-gradient(135deg, #0c4a44 0%, #0d9488 40%, #2dd4bf 100%);
    color: #ffffff;
}

/* Slider Dark Mode */
body.dark-mode .slider-arrow {
    background: var(--dark-surface);
    border-color: var(--glass-border);
    color: var(--text-primary);
}

body.dark-mode .slider-arrow:hover {
    background: var(--text-primary);
    color: var(--bg-primary);
}

body.dark-mode .slider-dot {
    background: rgba(255, 255, 255, 0.25);
}

body.dark-mode .slider-dot.active {
    background: var(--text-primary);
}

body.dark-mode .slider-dot:hover:not(.active) {
    background: rgba(255, 255, 255, 0.4);
}

/* Navbar Scrolled Dark Mode */
@media (max-width: 768px) {
    body.dark-mode .nav-menu {
        background: rgba(11, 17, 32, 0.98);
        border-left: 1px solid rgba(148, 163, 184, 0.12);
    }
}

body.dark-mode .navbar {
    background: transparent;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
}

body.dark-mode .navbar.scrolled {
    background: rgba(11, 17, 32, 0.97);
    border-bottom: 1px solid rgba(148, 163, 184, 0.12);
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.4);
}

/* Detail page navbar dark mode */
body.dark-mode .detail-page .navbar {
    background: rgba(11, 17, 32, 0.97);
    border-bottom: 1px solid rgba(148, 163, 184, 0.12);
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.4);
}

/* Dark Mode Hero Buttons */
body.dark-mode .hero-btn.github-btn,
body.dark-mode .hero-btn.linkedin-btn {
    background: rgba(148, 163, 184, 0.08);
    border-color: rgba(148, 163, 184, 0.18);
    color: var(--text-secondary);
}

body.dark-mode .hero-btn.github-btn:hover,
body.dark-mode .hero-btn.linkedin-btn:hover {
    background: rgba(148, 163, 184, 0.14);
    border-color: var(--text-primary);
    color: var(--text-primary);
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.5);
}



/* Theme Toggle Button */
.theme-toggle {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    width: 3rem;
    height: 3rem;
    border-radius: 50%;
    background: var(--text-primary);
    color: var(--bg-primary);
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 10000;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.06);
    transition: transform 0.2s ease, background 0.2s ease;
}

.theme-toggle:hover {
    transform: scale(1.1);
}



body.dark-mode .theme-toggle {
    background: var(--accent-secondary);
    color: var(--bg-primary);
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.4);
}

body.dark-mode .project-btn:hover {
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.5);
}

/* Dark Mode Hover Fixes */
body.dark-mode .nav-link:hover {
    color: var(--text-primary);
}

body.dark-mode .modal-link:hover {
    background: rgba(148, 163, 184, 0.08);
    color: var(--text-primary);
}

body.dark-mode .modal-link:hover svg {
    color: var(--text-primary);
}

/* Dark Mode: Modals */
body.dark-mode .modal-content {
    background: rgba(15, 23, 41, 0.96);
    border-color: var(--dark-border);
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.5);
}

body.dark-mode .modal-close {
    color: var(--text-secondary);
}

body.dark-mode .modal-close:hover {
    color: var(--text-primary);
    background: rgba(148, 163, 184, 0.1);
}

body.dark-mode .modal-link {
    background: var(--dark-surface);
    border-color: var(--dark-border);
    color: var(--text-secondary);
}

body.dark-mode .form-submit {
    background: var(--text-primary);
    color: var(--bg-primary);
}

body.dark-mode .skill-card:hover {
    border-color: var(--brand-color, var(--text-primary));
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.5), 0 0 10px var(--brand-color, rgba(148, 163, 184, 0.15));
}

body.dark-mode .about-image-wrapper {
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.4);
}

body.dark-mode .fun-stats {
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.4);
}

body.dark-mode .project-card {
    border-color: rgba(148, 163, 184, 0.14);
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.4);
}

/* Unique tinted card backgrounds — dark mode */
body.dark-mode .project-card:has(.preview-finance) {
    background: rgba(92, 61, 26, 0.18);
    border-color: rgba(255, 255, 255, 0.14);
}
body.dark-mode .project-card:has(.preview-tech) {
    background: rgba(21, 67, 96, 0.18);
    border-color: rgba(255, 255, 255, 0.14);
}
body.dark-mode .project-card:has(.preview-health) {
    background: rgba(14, 98, 81, 0.18);
    border-color: rgba(255, 255, 255, 0.14);
}
body.dark-mode .project-card:has(.preview-ai) {
    background: rgba(91, 44, 111, 0.18);
    border-color: rgba(255, 255, 255, 0.14);
}
body.dark-mode .project-card:has(.preview-security) {
    background: rgba(27, 38, 49, 0.22);
    border-color: rgba(255, 255, 255, 0.14);
}

body.dark-mode .project-card:hover {
    border-color: var(--accent-primary);
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.5);
    z-index: 20;
}

body.dark-mode .project-card:has(.preview-finance):hover {
    background: rgba(92, 61, 26, 0.32);
}
body.dark-mode .project-card:has(.preview-tech):hover {
    background: rgba(21, 67, 96, 0.32);
}
body.dark-mode .project-card:has(.preview-health):hover {
    background: rgba(14, 98, 81, 0.32);
}
body.dark-mode .project-card:has(.preview-ai):hover {
    background: rgba(91, 44, 111, 0.32);
}
body.dark-mode .project-card:has(.preview-security):hover {
    background: rgba(27, 38, 49, 0.38);
}

body.dark-mode .beyond-card:hover,
body.dark-mode .timeline-content:hover {
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.5);
    border-color: var(--dark-border-hover);
    z-index: 20;
}

body.dark-mode .skill-category:hover {
    border-color: var(--dark-border-hover);
    z-index: 20;
}

body.dark-mode a.edu-link:hover {
    border-color: var(--dark-border-hover);
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.5);
}

body.dark-mode .timeline-content {
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.4);
}

/* Dark Mode: Timeline line */
body.dark-mode .timeline::before {
    background: linear-gradient(180deg, rgba(148, 163, 184, 0.30), rgba(148, 163, 184, 0.14));
}

body.dark-mode .timeline-marker {
    box-shadow: 0 0 6px rgba(255, 255, 255, 0.15);
}

body.dark-mode .timeline-marker::after {
    background: var(--text-secondary);
}

body.dark-mode .timeline-item:has(.timeline-content:hover) .timeline-marker {
    box-shadow: 0 0 10px rgba(255, 255, 255, 0.2);
}

body.dark-mode .tech-tag:hover,
body.dark-mode .interest-tag:hover {
    background: var(--text-primary);
    color: var(--bg-primary);
}

/* Fix Subpage Buttons in Dark Mode */
body.dark-mode .detail-btn.primary {
    background: var(--text-primary);
    color: var(--bg-primary);
}

body.dark-mode .detail-btn.secondary {
    background: rgba(148, 163, 184, 0.05);
    border-color: var(--glass-border);
    color: var(--text-primary);
}

body.dark-mode .detail-btn.secondary:hover {
    background: rgba(148, 163, 184, 0.1);
}

/* Fix Divider Lines in Dark Mode */
body.dark-mode .detail-header {
    border-bottom-color: var(--dark-border);
}

body.dark-mode .skill-category-header {
    border-bottom-color: var(--dark-border);
}

body.dark-mode .project-footer {
    border-top-color: var(--dark-border);
}

/* Dark Mode: Experience Timeline */
body.dark-mode .exp-marker {
    border-color: var(--text-tertiary);
}

body.dark-mode .timeline-item:hover .exp-marker {
    background: var(--text-primary);
    border-color: var(--text-primary);
    box-shadow: 0 0 10px rgba(255, 255, 255, 0.2);
}

body.dark-mode .exp-type {
    background: rgba(147, 180, 232, 0.12);
    color: var(--text-secondary);
    border-color: rgba(147, 180, 232, 0.22);
}

body.dark-mode .exp-type.internship {
    background: rgba(147, 180, 232, 0.12);
    color: var(--text-secondary);
    border-color: rgba(147, 180, 232, 0.22);
}

body.dark-mode .exp-status {
    background: rgba(148, 163, 184, 0.10);
    border-color: var(--glass-border);
    color: var(--text-secondary);
}

body.dark-mode .exp-award {
    background: rgba(148, 163, 184, 0.12);
    color: var(--text-secondary);
    border-color: var(--dark-border-hover);
}

body.dark-mode .exp-award.gold {
    background: rgba(96, 182, 216, 0.12);
    color: var(--royal-gold-light);
    border-color: rgba(96, 182, 216, 0.30);
}

body.dark-mode .exp-node.exp-featured {
    border-color: var(--dark-border-hover);
    border-left-color: var(--royal-gold);
}

body.dark-mode .exp-node.exp-featured .exp-arrow {
    color: var(--text-secondary);
}

body.dark-mode .exp-divider {
    background: var(--dark-border);
}

/* ==========================================
   PROJECT DETAIL PAGES
   ========================================== */
.detail-page {
    min-height: 100vh;
    padding-top: 80px;
    background: var(--bg-primary);
}

.detail-header {
    padding: var(--space-12) 0 var(--space-8);
    border-bottom: 1px solid rgba(0, 0, 0, 0.10);
    margin-bottom: var(--space-10);
}

.detail-nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: var(--space-6);
}

.back-link {
    display: inline-flex;
    align-items: center;
    gap: var(--space-2);
    color: var(--text-secondary);
    font-weight: 500;
    font-size: var(--font-size-sm);
    transition: color var(--transition-fast);
}

.back-link:hover {
    color: var(--text-primary);
}

.detail-badge {
    display: inline-flex;
    align-items: center;
    padding: var(--space-1) var(--space-3);
    border-radius: var(--radius-full);
    font-size: var(--font-size-xs);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    background: rgba(0, 0, 0, 0.06);
    color: var(--text-secondary);
    border: 1px solid rgba(0, 0, 0, 0.12);
}

.detail-status {
    display: inline-flex;
    align-items: center;
    padding: var(--space-1) var(--space-3);
    border-radius: var(--radius-full);
    font-size: var(--font-size-xs);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.detail-status.completed {
    background: var(--status-success-bg);
    color: var(--status-success-text);
    border: 1px solid var(--status-success-border);
}

.detail-status.in-progress {
    background: var(--status-warning-bg);
    color: var(--status-warning-text);
    border: 1px solid var(--status-warning-border);
}

.detail-status.beta {
    background: rgba(31, 161, 255, 0.1);
    color: #1fa1ff;
    border: 1px solid rgba(31, 161, 255, 0.25);
}

.detail-title {
    font-size: clamp(2rem, 5vw, 3rem);
    font-weight: 800;
    margin-bottom: var(--space-2);
    color: var(--text-primary);
}

.detail-subtitle {
    font-size: var(--font-size-lg);
    color: var(--text-secondary);
    margin-bottom: var(--space-2);
}

.detail-date {
    font-size: var(--font-size-base);
    color: var(--text-tertiary);
    margin-bottom: var(--space-6);
}

.detail-actions {
    display: flex;
    gap: var(--space-3);
    flex-wrap: wrap;
}

.detail-btn {
    display: inline-flex;
    align-items: center;
    gap: var(--space-2);
    padding: var(--space-3) var(--space-5);
    border-radius: var(--radius-full);
    font-size: var(--font-size-sm);
    font-weight: 600;
    transition: all var(--transition-base);
    text-decoration: none;
}

.detail-btn.primary {
    background: var(--text-primary);
    color: var(--bg-primary);
}

.detail-btn.primary:hover {
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.1);
}

.detail-btn.secondary {
    background: rgba(0, 0, 0, 0.06);
    color: var(--text-primary);
    border: 1px solid rgba(0, 0, 0, 0.14);
}

.detail-btn.secondary:hover {
    background: rgba(0, 0, 0, 0.10);
}

.detail-btn.completed {
    background: var(--status-success-bg);
    color: var(--status-success-text);
    border: 1px solid var(--status-success-border);
}

.detail-btn.completed:hover {
    background: rgba(34, 197, 94, 0.15);
    transform: translateY(-2px);
}

.detail-content {
    display: grid;
    grid-template-columns: 1fr 300px;
    gap: var(--space-12);
    padding-bottom: var(--space-16);
}

.detail-main h2 {
    font-size: var(--font-size-xl);
    font-weight: 700;
    margin-bottom: var(--space-4);
    margin-top: var(--space-8);
    color: var(--text-primary);
}

.detail-main h2:first-child {
    margin-top: 0;
}

.detail-main p {
    font-size: var(--font-size-base);
    color: var(--text-secondary);
    line-height: 1.8;
    margin-bottom: var(--space-4);
}

.feature-list {
    list-style: none;
    padding: 0;
    margin-bottom: var(--space-6);
}

.feature-list li {
    position: relative;
    padding-left: var(--space-6);
    margin-bottom: var(--space-3);
    color: var(--text-secondary);
    line-height: 1.7;
}

.feature-list li::before {
    content: '→';
    position: absolute;
    left: 0;
    color: var(--text-tertiary);
    font-weight: 600;
}

/* Skills list (for internship page) */
.skills-list {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-2);
    margin-bottom: var(--space-6);
}

.skill-item {
    padding: var(--space-1) var(--space-3);
    background: rgba(0, 0, 0, 0.04);
    border: 1px solid rgba(0, 0, 0, 0.12);
    border-radius: var(--radius-full);
    font-size: var(--font-size-xs);
    font-weight: 500;
    color: var(--text-secondary);
}

.detail-sidebar {
    position: sticky;
    top: 100px;
    align-self: start;
}

.detail-sidebar .sidebar-card {
    padding: var(--space-6);
    margin-bottom: var(--space-4);
}

.sidebar-card h3 {
    font-size: var(--font-size-sm);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-tertiary);
    margin-bottom: var(--space-3);
}

.tech-list {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-2);
}

.tech-item {
    padding: var(--space-1) var(--space-3);
    background: rgba(0, 0, 0, 0.04);
    border: 1px solid rgba(0, 0, 0, 0.12);
    border-radius: var(--radius-full);
    font-size: var(--font-size-xs);
    font-weight: 500;
    color: var(--text-secondary);
}

.sidebar-info {
    font-size: var(--font-size-sm);
    color: var(--text-primary);
    font-weight: 500;
}

/* Certificate display in detail pages */
.detail-cert {
    margin-top: var(--space-4);
    border-radius: var(--radius-xl);
    overflow: hidden;
    border: 1px solid rgba(0, 0, 0, 0.10);
}

.detail-cert img {
    width: 100%;
    height: auto;
    display: block;
}

body.dark-mode .detail-cert {
    border-color: rgba(148, 163, 184, 0.18);
}

/* Hero Banner for project detail pages */
.detail-hero {
    width: 100%;
    aspect-ratio: 21 / 9;
    border-radius: var(--radius-xl);
    overflow: hidden;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid rgba(0, 0, 0, 0.10);
    margin-bottom: var(--space-10);
}

.detail-hero .preview-icon {
    position: relative;
    z-index: 2;
    opacity: 0.4;
    filter: drop-shadow(0 4px 12px rgba(0, 0, 0, 0.15));
    width: 80px;
    height: 80px;
}

.detail-hero .preview-pattern {
    position: absolute;
    inset: 0;
    z-index: 1;
    opacity: 0.5;
}

.detail-hero .preview-pattern::before,
.detail-hero .preview-pattern::after {
    content: '';
    position: absolute;
    border-radius: 50%;
}

.detail-hero .preview-pattern::before {
    width: 200px;
    height: 200px;
    top: -60px;
    right: -40px;
    background: rgba(255, 255, 255, 0.12);
}

.detail-hero .preview-pattern::after {
    width: 140px;
    height: 140px;
    bottom: -40px;
    left: -30px;
    background: rgba(255, 255, 255, 0.08);
}

.detail-hero .hero-label {
    position: absolute;
    bottom: var(--space-4);
    right: var(--space-4);
    font-size: var(--font-size-xs);
    font-weight: 500;
    color: rgba(255, 255, 255, 0.5);
    letter-spacing: 0.05em;
    z-index: 3;
}

body.dark-mode .detail-hero {
    border-color: rgba(148, 163, 184, 0.18);
}

/* Site Preview Iframe Hero */
.site-preview-hero {
    position: relative;
    padding: 0;
    background: #0b1120;
}

.site-preview-wrapper {
    position: absolute;
    inset: 0;
    overflow: hidden;
    z-index: 1;
}

.site-preview-iframe {
    width: 1440px;
    height: 900px;
    border: none;
    transform-origin: top left;
    pointer-events: none;
}

.site-preview-fallback {
    position: absolute;
    inset: 0;
    display: none;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    gap: var(--space-3);
    z-index: 2;
}

.site-preview-fallback .preview-icon {
    opacity: 0.4;
    filter: drop-shadow(0 4px 12px rgba(0, 0, 0, 0.15));
}

.site-preview-fallback .hero-label {
    position: static;
    font-size: var(--font-size-xs);
    font-weight: 500;
    color: rgba(255, 255, 255, 0.5);
    letter-spacing: 0.05em;
}

.preview-failed .site-preview-wrapper {
    display: none;
}

.preview-failed .site-preview-fallback {
    display: flex;
}

.site-preview-overlay {
    position: absolute;
    inset: 0;
    z-index: 4;
    display: flex;
    align-items: flex-end;
    justify-content: flex-end;
    padding: var(--space-4);
    background: linear-gradient(to top, rgba(0,0,0,0.35) 0%, transparent 40%);
    opacity: 0;
    transition: opacity 0.3s ease;
    text-decoration: none;
    cursor: pointer;
}

.site-preview-hero:hover .site-preview-overlay {
    opacity: 1;
}

.site-preview-overlay-label {
    font-size: var(--font-size-sm);
    font-weight: 600;
    color: #fff;
    background: rgba(0,0,0,0.55);
    backdrop-filter: blur(8px);
    padding: 6px 14px;
    border-radius: var(--radius-md);
    letter-spacing: 0.02em;
}

/* Key Metrics Strip */
.detail-metrics {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: var(--space-4);
    margin-bottom: var(--space-8);
}

.metric-card {
    padding: var(--space-5);
    border: 1px solid rgba(0, 0, 0, 0.10);
    border-radius: var(--radius-lg);
    text-align: center;
    background: rgba(0, 0, 0, 0.02);
}

.metric-value {
    font-size: var(--font-size-2xl);
    font-weight: 800;
    color: var(--text-primary);
    line-height: 1.2;
    margin-bottom: var(--space-1);
}

.metric-label {
    font-size: var(--font-size-xs);
    font-weight: 500;
    color: var(--text-tertiary);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

body.dark-mode .metric-card {
    border-color: rgba(148, 163, 184, 0.15);
    background: rgba(255, 255, 255, 0.03);
}

/* Screenshot Gallery Placeholders */
.detail-gallery {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: var(--space-4);
    margin-top: var(--space-4);
    margin-bottom: var(--space-4);
}

.gallery-placeholder {
    aspect-ratio: 16 / 10;
    border-radius: var(--radius-lg);
    border: 1px dashed rgba(0, 0, 0, 0.15);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: var(--space-2);
    color: var(--text-tertiary);
    background: rgba(0, 0, 0, 0.02);
}

.gallery-placeholder span {
    font-size: var(--font-size-xs);
    font-weight: 500;
}

body.dark-mode .gallery-placeholder {
    border-color: rgba(148, 163, 184, 0.15);
    background: rgba(255, 255, 255, 0.02);
}

@media (max-width: 600px) {
    .detail-metrics {
        grid-template-columns: 1fr;
    }

    .detail-gallery {
        grid-template-columns: 1fr;
    }

    .detail-hero {
        aspect-ratio: 16 / 9;
    }
}

@media (max-width: 900px) {
    .detail-content {
        grid-template-columns: 1fr;
    }

    .detail-sidebar {
        position: static;
    }
}

@media (max-width: 480px) {
    .detail-header {
        padding: var(--space-8) 0 var(--space-6);
    }

    .detail-title {
        font-size: clamp(1.5rem, 6vw, 2rem);
    }

    .detail-subtitle {
        font-size: var(--font-size-base);
    }

    .detail-actions {
        flex-direction: column;
    }

    .detail-btn {
        justify-content: center;
        width: 100%;
    }

    .detail-content {
        gap: var(--space-8);
        padding-bottom: var(--space-10);
    }

    .detail-main h2 {
        font-size: var(--font-size-lg);
    }

    .sidebar-card {
        padding: var(--space-4);
    }
}

/* Detail Page Dark Mode Overrides */
body.dark-mode .detail-header {
    border-bottom-color: var(--dark-border);
}

body.dark-mode .detail-btn.secondary {
    background: rgba(148, 163, 184, 0.05);
    color: var(--text-primary);
    border-color: var(--glass-border);
}

body.dark-mode .detail-btn.secondary:hover {
    background: rgba(148, 163, 184, 0.1);
}

body.dark-mode .sidebar-card {
    background: var(--dark-surface);
    border-color: rgba(148, 163, 184, 0.14);
}

body.dark-mode .tech-item {
    background: var(--dark-surface);
    border-color: rgba(148, 163, 184, 0.14);
    color: var(--text-secondary);
}

body.dark-mode .detail-status.completed {
    background: var(--status-success-bg);
    color: var(--status-success-text);
    border-color: var(--status-success-border);
}

body.dark-mode .detail-status.in-progress {
    background: var(--status-warning-bg);
    color: var(--status-warning-text);
    border-color: var(--status-warning-border);
}

body.dark-mode .detail-badge {
    background: rgba(148, 163, 184, 0.12);
    color: var(--text-secondary);
    border-color: rgba(148, 163, 184, 0.20);
}

body.dark-mode .skill-item {
    background: var(--dark-surface);
    border-color: rgba(148, 163, 184, 0.14);
    color: var(--text-secondary);
}

body.dark-mode .detail-btn.completed {
    background: var(--status-success-bg);
    color: var(--status-success-text);
    border-color: var(--status-success-border);
}

body.dark-mode .detail-btn.completed:hover {
    background: rgba(16, 185, 129, 0.2);
}

body.dark-mode .feature-list li::before {
    color: var(--text-tertiary);
}

/* View Transitions API */
::view-transition-group(root) {
    animation-duration: 0.5s;
}

::view-transition-new(root),
::view-transition-old(root) {
    /* Prevent the default cross-fade */
    animation: none;
    mix-blend-mode: normal;
}

::view-transition-new(root) {
    /* Ensure the new view is on top */
    z-index: 9999;
}

/* Fallback for when JS doesn't control the animation */
::view-transition-old(root) {
    z-index: 1;
}

::view-transition-group(root) {
    animation-duration: 0s;
}

/* ==========================================
   PERSONAL SECTION
   ========================================== */
.section-subtitle {
    text-align: center;
    color: var(--text-secondary);
    font-size: var(--font-size-lg);
    margin-top: -3rem;
    margin-bottom: var(--space-12);
}

@media (max-width: 768px) {
    .section-subtitle {
        margin-top: -1.5rem;
        font-size: var(--font-size-base);
        margin-bottom: var(--space-8);
    }
}

@media (max-width: 480px) {
    .section-subtitle {
        margin-top: -1rem;
        font-size: var(--font-size-sm);
    }
}

.personal {
    background: var(--bg-primary);
}

/* Two-column layout: quote + interests side by side */
.personal-layout {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--space-6);
    max-width: 900px;
    margin: 0 auto;
    align-items: stretch;
}

@media (max-width: 768px) {
    .personal-layout {
        grid-template-columns: 1fr;
        gap: var(--space-4);
    }
}

/* --- Quote Card --- */
.personal-quote-card {
    padding: var(--space-8);
    display: flex;
    flex-direction: column;
    justify-content: center;
    position: relative;
    overflow: hidden;
}

.quote-decoration {
    color: var(--text-tertiary);
    opacity: 0.3;
    margin-bottom: var(--space-4);
    line-height: 1;
}

.featured-quote {
    font-size: var(--font-size-xl);
    font-weight: 500;
    line-height: 1.5;
    color: var(--text-primary);
    font-style: italic;
    margin-bottom: var(--space-6);
}

.quote-footer {
    display: flex;
    align-items: center;
    gap: var(--space-3);
}

.quote-line {
    flex: 0 0 32px;
    height: 2px;
    background: var(--text-tertiary);
    border-radius: 1px;
}

.quote-label {
    font-size: var(--font-size-xs);
    font-weight: 600;
    color: var(--text-tertiary);
    text-transform: uppercase;
    letter-spacing: 1.5px;
}

/* --- Interests Card --- */
.personal-interests-card {
    padding: var(--space-6);
    display: flex;
    flex-direction: column;
}

.interests-title {
    font-size: var(--font-size-lg);
    font-weight: 700;
    color: var(--text-primary);
    margin: 0 0 var(--space-5) 0;
}

.interests-grid-clean {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: var(--space-3);
    flex: 1;
}

.interest-chip {
    display: flex;
    align-items: center;
    gap: var(--space-3);
    padding: var(--space-3) var(--space-4);
    border-radius: var(--radius-lg);
    background: var(--bg-primary);
    border: 1px solid var(--glass-border);
    transition: all var(--transition-base);
    cursor: default;
}

.interest-chip svg {
    flex-shrink: 0;
    color: var(--text-tertiary);
    transition: color var(--transition-base);
}

.interest-chip span {
    font-size: var(--font-size-sm);
    font-weight: 500;
    color: var(--text-secondary);
    transition: color var(--transition-base);
}

.interest-chip:hover {
    border-color: var(--text-primary);
    background: var(--bg-secondary);
}

.interest-chip:hover svg {
    color: var(--text-primary);
}

.interest-chip:hover span {
    color: var(--text-primary);
}

/* Dark mode - interest chips */
body.dark-mode .interest-chip {
    background: rgba(23, 32, 51, 0.5);
    border-color: rgba(148, 163, 184, 0.14);
}

body.dark-mode .interest-chip:hover {
    background: rgba(148, 163, 184, 0.08);
    border-color: var(--dark-border-hover);
}

/* Responsive: stack chips single column on small screens */
@media (max-width: 480px) {
    .interests-grid-clean {
        grid-template-columns: 1fr;
    }

    .personal-quote-card {
        padding: var(--space-6);
    }

    .featured-quote {
        font-size: var(--font-size-base);
        line-height: 1.6;
    }
}

/* --- Photo Gallery --- */
.personal-photos {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: var(--space-4);
    margin-top: var(--space-6);
    max-width: 900px;
    margin-left: auto;
    margin-right: auto;
}

.photo-item {
    aspect-ratio: 4 / 3;
    border-radius: var(--radius-xl);
    overflow: hidden;
    background: var(--bg-secondary);
    border: 1px solid rgba(0, 0, 0, 0.05);
    transition: transform var(--transition-base), box-shadow var(--transition-base);
}

.photo-item:hover {
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.1);
    z-index: 20;
}

.photo-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.photo-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-tertiary);
    background: linear-gradient(135deg, var(--bg-secondary), var(--bg-tertiary));
    opacity: 0.6;
}

/* Dark mode */
body.dark-mode .photo-item {
    background: var(--dark-surface);
    border-color: rgba(148, 163, 184, 0.12);
}

body.dark-mode .hero-btn.primary {
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.4);
}

body.dark-mode .hero-btn.primary:hover {
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.5);
}

body.dark-mode .photo-item:hover {
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.5);
}

body.dark-mode .photo-placeholder {
    background: linear-gradient(135deg, rgba(23, 32, 51, 0.5), rgba(56, 89, 160, 0.05));
}

/* --- Gallery Slider --- */
.gallery-slider {
    margin-top: var(--space-6);
    max-width: 900px;
    margin-left: auto;
    margin-right: auto;
}

.gallery-slider-track {
    position: relative;
    overflow: hidden;
    padding-top: var(--space-8);
    margin-top: calc(-1 * var(--space-8));
    padding-left: var(--space-12);
    margin-left: calc(-1 * var(--space-12));
    padding-right: var(--space-12);
    margin-right: calc(-1 * var(--space-12));
    padding-bottom: var(--space-12);
    margin-bottom: calc(-1 * var(--space-12));
}

.gallery-page {
    display: none;
    margin-top: 0;
}

.gallery-page.active {
    display: grid;
    animation: gallerySlideIn 0.5s cubic-bezier(0.25, 0.46, 0.45, 0.94) forwards;
}

.gallery-page.slide-out-left {
    display: grid;
    animation: gallerySlideOutLeft 0.35s ease forwards;
}

.gallery-page.slide-out-right {
    display: grid;
    animation: gallerySlideOutRight 0.35s ease forwards;
}

@keyframes gallerySlideIn {
    from {
        opacity: 0;
        transform: translateX(30px);
    }

    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes gallerySlideOutLeft {
    from {
        opacity: 1;
        transform: translateX(0);
    }

    to {
        opacity: 0;
        transform: translateX(-30px);
    }
}

@keyframes gallerySlideOutRight {
    from {
        opacity: 1;
        transform: translateX(0);
    }

    to {
        opacity: 0;
        transform: translateX(30px);
    }
}

/* Slider Controls */
.gallery-slider-controls {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-4);
    margin-top: var(--space-5);
    position: relative;
    z-index: 10;
}

.gallery-arrow {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: 1px solid rgba(0, 0, 0, 0.1);
    background: var(--bg-secondary);
    color: var(--text-secondary);
    cursor: pointer;
    transition: all var(--transition-base);
}

.gallery-arrow:hover {
    background: var(--accent-primary);
    color: #fff;
    border-color: var(--accent-primary);
}

.gallery-arrow:disabled {
    opacity: 0.35;
    cursor: not-allowed;
    transform: none;
}

.gallery-arrow:disabled:hover {
    background: var(--bg-secondary);
    color: var(--text-secondary);
    border-color: rgba(0, 0, 0, 0.1);
}

.gallery-dots {
    display: flex;
    align-items: center;
    gap: var(--space-2);
}

.gallery-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    border: none;
    background: var(--text-tertiary);
    opacity: 0.35;
    cursor: pointer;
    transition: all var(--transition-base);
    padding: 0;
}

.gallery-dot:hover {
    opacity: 0.6;
}

.gallery-dot.active {
    opacity: 1;
    background: var(--accent-primary);
}

/* Dark mode slider */
body.dark-mode .gallery-arrow {
    background: var(--dark-surface);
    border-color: var(--glass-border);
    color: var(--text-secondary);
}

body.dark-mode .gallery-arrow:hover {
    background: var(--accent-primary);
    color: var(--bg-primary);
    border-color: var(--accent-primary);
}

body.dark-mode .gallery-arrow:disabled:hover {
    background: var(--dark-surface);
    color: var(--text-secondary);
    border-color: var(--glass-border);
}

body.dark-mode .gallery-dot {
    background: var(--text-tertiary);
}

body.dark-mode .gallery-dot.active {
    background: var(--accent-primary);
}

@media (max-width: 768px) {
    .personal-photos {
        grid-template-columns: repeat(2, 1fr);
        gap: var(--space-3);
    }
}

@media (max-width: 480px) {
    .personal-photos {
        grid-template-columns: repeat(2, 1fr);
        gap: var(--space-2);
    }

    .photo-item {
        border-radius: var(--radius-lg);
    }

    .gallery-arrow {
        width: 34px;
        height: 34px;
    }
}

/* --- Lightbox --- */
.lightbox-overlay {
    position: fixed;
    inset: 0;
    z-index: 10000;
    background: rgba(0, 0, 0, 0.92);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
}

.lightbox-overlay.active {
    opacity: 1;
    visibility: visible;
}

.lightbox-content {
    max-width: 85vw;
    max-height: 80vh;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

.lightbox-content img {
    max-width: 100%;
    max-height: 80vh;
    border-radius: var(--radius-xl);
    object-fit: contain;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
    transition: transform 0.3s ease;
}

.lightbox-content img[src=""] {
    display: none;
}

.lightbox-placeholder {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: var(--space-4);
    width: 420px;
    height: 320px;
    max-width: 85vw;
    max-height: 70vh;
    border-radius: var(--radius-xl);
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.5);
}

.lightbox-placeholder span {
    font-size: var(--font-size-lg);
    font-weight: 500;
    color: rgba(255, 255, 255, 0.6);
}

.lightbox-content img:not([src=""])~.lightbox-placeholder {
    display: none;
}

.lightbox-close {
    position: absolute;
    top: 20px;
    right: 24px;
    background: rgba(255, 255, 255, 0.1);
    border: none;
    color: #fff;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
    z-index: 10001;
}

.lightbox-close:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: scale(1.1);
}

.lightbox-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255, 255, 255, 0.1);
    border: none;
    color: #fff;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
    z-index: 10001;
}

.lightbox-arrow:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: translateY(-50%) scale(1.1);
}

.lightbox-prev {
    left: 20px;
}

.lightbox-next {
    right: 20px;
}

.lightbox-counter {
    position: absolute;
    bottom: 24px;
    left: 50%;
    transform: translateX(-50%);
    color: rgba(255, 255, 255, 0.6);
    font-size: var(--font-size-sm);
    font-weight: 500;
    letter-spacing: 0.05em;
}

@media (max-width: 480px) {
    .lightbox-arrow {
        width: 38px;
        height: 38px;
    }

    .lightbox-prev {
        left: 8px;
    }

    .lightbox-next {
        right: 8px;
    }

    .lightbox-placeholder {
        width: 280px;
        height: 220px;
    }
}

/* ============================================
   Golden Trophy for First Place
   ============================================ */

/* Light mode: Darker amber gold for better visibility */
.achievement-icon.trophy.gold svg {
    color: var(--royal-gold);
    fill: var(--royal-gold);
}

/* Dark mode: Bright gold stands out well */
body.dark-mode .achievement-icon.trophy.gold svg {
    color: var(--royal-gold-light);
    fill: var(--royal-gold-light);
}

/* ============================================
   Disable Hover Motion on Touch Devices
   ============================================ */
@media (hover: none) {

    .glass-card:hover,
    .project-card:hover,
    .skill-tag:hover,
    .nav-link:hover,
    .hero-btn:hover,
    .modal-link:hover,
    .modal-close:hover {
        transform: none !important;
    }
}

/* ============================================
   DEEP MOBILE OPTIMIZATIONS
   ============================================ */

/* Tablet Breakpoint - 768px */
@media (max-width: 768px) {

    /* Hero Section improvements */
    .hero-name {
        font-size: clamp(2rem, 8vw, 3rem);
        line-height: 1.1;
    }

    .hero-tagline {
        font-size: var(--font-size-base);
        padding: 0 var(--space-4);
    }

    /* Skills grid - 3 columns on tablet */
    .skill-cards-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: var(--space-3);
    }

    .skill-card {
        padding: var(--space-3);
    }

    .skill-icon {
        width: 36px;
        height: 36px;
    }

    .skill-name {
        font-size: var(--font-size-xs);
    }

    /* Section titles */
    .section-title {
        font-size: var(--font-size-2xl);
        margin-bottom: var(--space-10);
    }

    /* Achievement modal */
    .achievement-modal {
        padding: var(--space-6);
        margin: var(--space-4);
    }

    .achievement-modal-title {
        font-size: var(--font-size-xl);
    }
}

/* Mobile Breakpoint - 480px */
@media (max-width: 480px) {

    /* Smaller font sizes for mobile */
    :root {
        --font-size-base: 0.9375rem;
    }

    /* Hero section - compact */
    .hero {
        padding: 0 var(--space-4);
        min-height: 100vh;
        min-height: 100svh;
    }

    .hero-name {
        font-size: clamp(1.75rem, 10vw, 2.5rem);
    }

    .hero-greeting {
        font-size: var(--font-size-sm);
        letter-spacing: 0.05em;
    }

    .hero-tagline {
        font-size: var(--font-size-sm);
        line-height: 1.5;
    }

    .hero-sub {
        font-size: var(--font-size-xs);
    }

    .hero-btn {
        padding: var(--space-3) var(--space-5);
        font-size: var(--font-size-sm);
    }

    .terminal-body {
        font-size: 11px;
        padding: 14px;
    }

    /* Skills grid - 3 columns on mobile for compact display */
    .skill-cards-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: var(--space-2);
    }

    .skill-card {
        padding: var(--space-2);
    }

    .skill-icon {
        width: 28px;
        height: 28px;
    }

    .skill-name {
        font-size: 10px;
    }

    /* Skill category header */
    .skill-category-header {
        gap: var(--space-2);
        margin-bottom: var(--space-3);
    }

    .skill-category-header h3 {
        font-size: var(--font-size-sm);
    }

    /* Timeline compact */
    .timeline-content {
        padding: var(--space-3);
    }

    .timeline-content h3 {
        font-size: var(--font-size-sm);
    }

    .timeline-content p {
        font-size: var(--font-size-xs);
    }

    .achievement-badge {
        font-size: 10px;
        padding: var(--space-1) var(--space-2);
    }

    /* Project cards compact */
    .project-card {
        padding: 0;
    }

    .project-body {
        padding: var(--space-3);
    }

    .project-title {
        font-size: var(--font-size-base);
    }

    .project-description {
        font-size: var(--font-size-sm);
        line-height: 1.5;
    }

    .tech-tag {
        font-size: 10px;
        padding: 2px 6px;
    }

    /* Footer compact */
    .footer {
        padding: var(--space-6) 0;
    }

    .footer-tagline {
        font-size: var(--font-size-sm);
    }

    .footer-copyright {
        font-size: var(--font-size-xs);
    }

    /* Touch targets - minimum 44px */
    .nav-toggle {
        min-width: 44px;
        min-height: 44px;
    }

    .theme-toggle {
        min-width: 44px;
        min-height: 44px;
    }

    /* About section */
    .about-intro {
        font-size: var(--font-size-base);
    }

    .about-text p {
        font-size: var(--font-size-sm);
    }

    .stat-number {
        font-size: var(--font-size-2xl);
    }

    .stat-label {
        font-size: var(--font-size-xs);
    }

}

/* ============================================
   MOBILE NAVIGATION & OVERRIDES
   ============================================ */
@media (max-width: 768px) {

    /* Navbar Layout */
    .nav-container {
        padding: 0 var(--space-4);
    }

    .nav-link {
        font-size: var(--font-size-lg);
        /* Larger touch targets */
        padding: var(--space-3) 0;
        text-align: center;
        display: block;
    }

    /* Mobile Menu Overlay */
    .nav-menu {
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        background: rgba(250, 248, 244, 0.98);
        /* Royal ivory bg for light mode */
        backdrop-filter: blur(10px);
        -webkit-backdrop-filter: blur(10px);
        flex-direction: column;
        justify-content: center;
        align-items: center;
        z-index: 999;
        gap: var(--space-6);
        transform: translateY(-100%);
        transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.4s ease;
        display: flex !important;
        /* Override display:none from generic styles if any */
        opacity: 0;
        pointer-events: none;
        padding: var(--space-8);
        height: 100vh;
        width: 100vw;
    }

    .nav-menu.active {
        transform: translateY(0);
        opacity: 1;
        pointer-events: all;
    }

    /* Dark mode support */
    body.dark-mode .nav-menu {
        background: rgba(11, 17, 32, 0.98);
    }

    /* Toggle visibility */
    .nav-toggle {
        display: flex;
        z-index: 1000;
    }

    .nav-toggle.active span:nth-child(1) {
        transform: rotate(45deg) translate(5px, 5px);
    }

    .nav-toggle.active span:nth-child(2) {
        opacity: 0;
    }

    .nav-toggle.active span:nth-child(3) {
        transform: rotate(-45deg) translate(5px, -5px);
    }

    /* Content Visibility */
    .desktop-only {
        display: none !important;
    }

    .mobile-only {
        display: block !important;
    }

    /* About Section Stacking */
    .about-content {
        grid-template-columns: 1fr;
        text-align: center;
        gap: var(--space-8);
    }

    .about-details {
        order: 2;
        /* Text after image */
    }

    .about-visual {
        order: 1;
        margin-bottom: var(--space-6);
        justify-content: center;
    }

    .about-stats {
        justify-content: center;
        gap: var(--space-8);
    }

    /* Experience Timeline */
    .timeline::before {
        left: 10px;
    }

    .timeline-item {
        padding-left: 40px;
        padding-bottom: var(--space-8);
    }

    .timeline-marker {
        left: 2px;
        width: 18px;
        height: 18px;
    }

    /* Timeline date — make static on mobile to avoid overlap */
    .timeline-date {
        position: static;
        display: block;
        margin-bottom: var(--space-2);
        font-size: var(--font-size-xs);
    }

    /* Reduce contain-intrinsic-size for short mobile sections */
    .section {
        contain-intrinsic-size: auto 500px;
    }

    /* Full-viewport sections on mobile */
    .section,
    .hero {
        min-height: 100vh;
        min-height: 100svh;
        display: flex;
        flex-direction: column;
        justify-content: center;
        box-sizing: border-box;
    }

    /* Content-heavy sections: start from top, grow naturally */
    .section.projects,
    .section.experience,
    .section.skills,
    .section.personal {
        justify-content: flex-start;
        padding-top: 80px;
    }

    /* Hero needs no top padding — it self-centers */
    .hero {
        padding-top: 0;
        padding-bottom: 0;
    }

    /* Modal links stack on mobile */
    .modal-links {
        grid-template-columns: 1fr;
    }
}

/* Scroll-snap removed — causes poor mobile UX with forced section stops */

/* ==========================================
   IMAGE VIEWER OVERLAY
   ========================================== */
.modal-cert img,
.detail-cert img {
    cursor: pointer;
    transition: opacity 0.2s ease;
}

.modal-cert img:hover,
.detail-cert img:hover {
    opacity: 0.85;
}

.image-viewer-overlay {
    position: fixed;
    inset: 0;
    z-index: 10000;
    background: rgba(0, 0, 0, 0.92);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
}

.image-viewer-overlay.active {
    opacity: 1;
    pointer-events: auto;
}

.image-viewer-img {
    max-width: 90vw;
    max-height: 90vh;
    object-fit: contain;
    border-radius: var(--radius-lg);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
    transform: scale(0.92);
    transition: transform 0.3s ease;
}

.image-viewer-overlay.active .image-viewer-img {
    transform: scale(1);
}

.image-viewer-close {
    position: fixed;
    top: 20px;
    right: 20px;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: white;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    z-index: 10001;
}

.image-viewer-close:hover {
    background: rgba(255, 255, 255, 0.25);
}

/* ==========================================
   HERO TYPING ANIMATION
   ========================================== */
.hero-typed-wrapper {
    display: inline;
}

.hero-typed {
    color: var(--royal-gold-light);
    font-weight: 600;
}

.hero-cursor {
    display: inline-block;
    color: var(--royal-gold-light);
    font-weight: 300;
    animation: blink 1s step-end infinite;
    margin-left: 1px;
}

@keyframes blink {
    0%, 100% { opacity: 1; }
    50% { opacity: 0; }
}

.hero-sub {
    font-size: clamp(var(--font-size-sm), 2vw, var(--font-size-base));
    color: var(--text-tertiary);
    max-width: 500px;
    margin: 0 auto var(--space-10);
    line-height: 1.6;
    opacity: 0.8;
}

/* Hero Contact Button */
.hero-btn.contact-hero-btn {
    background: var(--text-primary);
    color: var(--bg-primary);
    border: 1px solid var(--text-primary);
}

.hero-btn.contact-hero-btn:hover {
    background: transparent;
    color: var(--text-primary);
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.1);
}

/* ==========================================
   ABOUT TERMINAL
   ========================================== */
.about-terminal {
    width: 100%;
    height: 100%;
    border-radius: var(--radius-xl);
    overflow: hidden;
    background: #1e1e2e;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.15);
    position: relative;
    z-index: 1;
}

.terminal-bar {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 16px;
    background: #181825;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.terminal-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
}

.terminal-dot.red { background: #f38ba8; }
.terminal-dot.yellow { background: #f9e2af; }
.terminal-dot.green { background: #a6e3a1; }

.terminal-title {
    margin-left: auto;
    font-size: 12px;
    color: rgba(255, 255, 255, 0.35);
    font-family: 'SF Mono', 'Fira Code', 'Cascadia Code', monospace;
}

.terminal-body {
    padding: 20px;
    font-family: 'SF Mono', 'Fira Code', 'Cascadia Code', monospace;
    font-size: 13px;
    line-height: 1.7;
    color: #cdd6f4;
}

.terminal-body code {
    font-family: inherit;
}

.terminal-body pre {
    margin: 0;
    white-space: pre;
    font-family: inherit;
}

.t-keyword { color: #cba6f7; }
.t-var { color: #89b4fa; }
.t-key { color: #89dceb; }
.t-string { color: #a6e3a1; }

/* ==========================================
   FUN FACTS GRID
   ========================================== */
.fun-facts-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: var(--space-4);
    margin-top: var(--space-8);
}

.fun-fact-card {
    text-align: center;
    padding: var(--space-6) var(--space-4);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--space-2);
    transition: transform var(--transition-base), box-shadow var(--transition-base);
}

.fun-fact-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 32px var(--glass-shadow);
}

.fun-fact-icon {
    color: var(--royal-gold-light);
    margin-bottom: var(--space-2);
}

.fun-fact-label {
    font-size: var(--font-size-xs);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-tertiary);
}

.fun-fact-value {
    font-size: var(--font-size-sm);
    color: var(--text-secondary);
    line-height: 1.5;
}

@media (max-width: 768px) {
    .fun-facts-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 480px) {
    .fun-facts-grid {
        grid-template-columns: 1fr;
    }
}

/* ==========================================
   FOOTER REWORK
   ========================================== */
.footer-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--space-6);
}

.footer-brand {
    display: flex;
}

.footer-logo {
    display: flex;
    align-items: center;
    gap: var(--space-3);
    text-decoration: none;
    color: var(--text-primary);
}

.footer-logo .logo-symbol {
    width: 40px;
    height: 40px;
    flex-shrink: 0;
    transition: transform var(--transition-base);
}

.footer-logo:hover .logo-symbol {
    transform: translateY(-2px) scale(1.05);
}

.footer-brand-text {
    display: flex;
    flex-direction: column;
}

.footer-links {
    display: flex;
    gap: var(--space-4);
}

.footer-tagline {
    font-size: var(--font-size-sm);
    font-weight: 500;
    color: var(--text-primary);
    margin-bottom: 2px;
}

.footer-copyright {
    font-size: var(--font-size-xs);
    color: var(--text-tertiary);
}

.footer-link {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--radius-full);
    color: var(--text-tertiary);
    border: 1px solid var(--glass-border);
    transition: all var(--transition-base);
}

.footer-link:hover {
    color: var(--text-primary);
    border-color: var(--text-primary);
    transform: translateY(-2px);
}

@media (max-width: 640px) {
    .footer-content {
        flex-direction: column;
        gap: var(--space-5);
        text-align: center;
    }

    .footer-logo {
        flex-direction: column;
        text-align: center;
    }

    .footer-brand-text {
        align-items: center;
    }
}

/* ==========================================
   PROJECTS V2 — FEATURED + GRID
   ========================================== */

/* --- Featured Project Card --- */
.proj-featured {
    position: relative;
    display: flex;
    align-items: stretch;
    overflow: hidden;
    padding: 0;
    margin-bottom: var(--space-6);
    border: 1px solid var(--glass-border);
    transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
    cursor: pointer;
    text-decoration: none;
    color: inherit;
}

.proj-featured:hover {
    transform: translateY(-4px);
    box-shadow: 0 16px 48px rgba(0, 0, 0, 0.12);
    border-color: var(--text-primary);
}

.proj-featured-accent {
    position: absolute;
    top: 0;
    left: 0;
    width: 5px;
    height: 100%;
    border-radius: var(--radius-lg) 0 0 var(--radius-lg);
}

.proj-featured-content {
    flex: 1;
    padding: var(--space-8);
    display: flex;
    flex-direction: column;
    gap: var(--space-3);
}

.proj-featured-visual {
    width: 260px;
    min-height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    position: relative;
    overflow: hidden;
}

.proj-featured-icon {
    opacity: 0.3;
    transition: opacity 0.3s ease, transform 0.3s ease;
}

.proj-featured:hover .proj-featured-icon {
    opacity: 0.5;
    transform: scale(1.1);
}

.proj-featured-top {
    display: flex;
    align-items: center;
    gap: var(--space-3);
    flex-wrap: wrap;
}

.proj-featured-title {
    font-size: var(--font-size-2xl);
    font-weight: 800;
    color: var(--text-primary);
    line-height: 1.2;
}

.proj-featured-desc {
    color: var(--text-secondary);
    line-height: 1.7;
    font-size: var(--font-size-base);
    max-width: 600px;
}

.proj-featured:hover .proj-view-link {
    color: var(--text-primary);
    gap: var(--space-2);
}

/* --- Project Grid --- */
.proj-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: var(--space-5);
}

/* --- Project Card --- */
.proj-card {
    position: relative;
    overflow: hidden;
    padding: 0;
    border: 1px solid var(--glass-border);
    transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
    cursor: pointer;
    text-decoration: none;
    color: inherit;
    display: flex;
}

.proj-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 36px rgba(0, 0, 0, 0.1);
    border-color: var(--text-primary);
}

.proj-card-accent {
    position: absolute;
    top: 0;
    left: 0;
    width: 4px;
    height: 100%;
    border-radius: var(--radius-lg) 0 0 var(--radius-lg);
}

.proj-card-body {
    padding: var(--space-6);
    display: flex;
    flex-direction: column;
    gap: var(--space-2);
    flex: 1;
}

.proj-card-top {
    display: flex;
    align-items: center;
    gap: var(--space-3);
    flex-wrap: wrap;
    margin-bottom: var(--space-1);
}

.proj-card-title {
    font-size: var(--font-size-xl);
    font-weight: 700;
    color: var(--text-primary);
    line-height: 1.2;
}

.proj-card-desc {
    color: var(--text-secondary);
    line-height: 1.6;
    font-size: var(--font-size-sm);
    flex-grow: 1;
}

.proj-card:hover .proj-view-link {
    color: var(--text-primary);
    gap: var(--space-2);
}

/* --- Shared Styles --- */
.proj-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 12px;
    border-radius: var(--radius-full);
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.proj-badge-done {
    background: var(--status-success-bg);
    color: var(--status-success-text);
    border: 1px solid var(--status-success-border);
}

.proj-badge-dev {
    background: rgba(59, 130, 246, 0.1);
    color: #3b82f6;
    border: 1px solid rgba(59, 130, 246, 0.2);
}

.proj-badge-progress {
    background: rgba(224, 94, 0, 0.1);
    color: #e05e00;
    border: 1px solid rgba(224, 94, 0, 0.2);
}

.proj-pulse {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: currentColor;
    animation: proj-pulse-anim 2s ease-in-out infinite;
}

@keyframes proj-pulse-anim {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.3; }
}

.proj-metric {
    font-size: var(--font-size-xs);
    color: var(--text-tertiary);
}

.proj-metric strong {
    color: var(--text-primary);
    font-weight: 700;
}

.proj-tags {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-2);
    margin-top: var(--space-1);
}

.proj-tag {
    padding: 3px 10px;
    background: rgba(74, 63, 54, 0.07);
    border: 1px solid rgba(74, 63, 54, 0.15);
    border-radius: var(--radius-full);
    font-size: var(--font-size-xs);
    font-weight: 500;
    color: var(--text-secondary);
    transition: all 0.2s ease;
}

.proj-tag:hover {
    background: var(--text-primary);
    color: var(--bg-primary);
    border-color: var(--text-primary);
}

.proj-view-link {
    display: inline-flex;
    align-items: center;
    gap: var(--space-1);
    font-size: var(--font-size-sm);
    font-weight: 600;
    color: var(--text-tertiary);
    margin-top: var(--space-2);
    transition: all 0.2s ease;
}

/* --- Accent Colors --- */
.proj-accent-gold { background: linear-gradient(180deg, #c49e0e, #e8c840); }
.proj-accent-blue { background: linear-gradient(180deg, #2563a5, #4a9ede); }
.proj-accent-green { background: linear-gradient(180deg, #10a37f, #34d399); }
.proj-accent-purple { background: linear-gradient(180deg, #8e44ad, #bb6bd9); }
.proj-accent-slate { background: linear-gradient(180deg, #64748b, #94a3b8); }
.proj-accent-teal { background: linear-gradient(180deg, #0d9488, #2dd4bf); }

/* --- Featured Visual Backgrounds --- */
.proj-visual-gold {
    background: linear-gradient(135deg, #fdf6e3 0%, #ede0bc 40%, #d9c47a 100%);
}

/* --- Responsive --- */
@media (max-width: 900px) {
    .proj-featured {
        flex-direction: column;
    }

    .proj-featured-visual {
        width: 100%;
        min-height: 120px;
    }

    .proj-featured-content {
        padding: var(--space-6);
    }

    .proj-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 480px) {
    .proj-featured-content {
        padding: var(--space-5);
    }

    .proj-featured-title {
        font-size: var(--font-size-xl);
    }

    .proj-card-body {
        padding: var(--space-5);
    }
}

/* --- Dark Mode --- */
body.dark-mode .proj-featured {
    border-color: var(--dark-border);
}

body.dark-mode .proj-featured:hover {
    border-color: var(--text-primary);
    box-shadow: 0 16px 48px rgba(0, 0, 0, 0.4);
}

body.dark-mode .proj-card {
    border-color: var(--dark-border);
}

body.dark-mode .proj-card:hover {
    border-color: var(--text-primary);
    box-shadow: 0 12px 36px rgba(0, 0, 0, 0.4);
}

body.dark-mode .proj-tag {
    background: rgba(148, 163, 184, 0.1);
    border-color: rgba(148, 163, 184, 0.2);
    color: var(--text-secondary);
}

body.dark-mode .proj-tag:hover {
    background: var(--text-primary);
    color: var(--bg-primary);
    border-color: var(--text-primary);
}

body.dark-mode .proj-badge-dev {
    background: rgba(59, 130, 246, 0.15);
    border-color: rgba(59, 130, 246, 0.3);
}

body.dark-mode .proj-visual-gold {
    background: linear-gradient(135deg, rgba(196, 158, 14, 0.15) 0%, rgba(196, 158, 14, 0.08) 100%);
}

/* ==========================================
   EXPERIENCE DASHBOARD — XP LAYOUT
   ========================================== */

.xp-dashboard {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--space-8);
    align-items: stretch;
}

/* --- Left: Internship Panel --- */
.xp-internship {
    position: relative;
    padding: var(--space-8) var(--space-8) var(--space-8) calc(var(--space-8) + 14px);
    background: rgba(196, 158, 14, 0.04);
    border-radius: var(--radius-xl);
    border: 1px solid rgba(196, 158, 14, 0.12);
}

.xp-internship::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 3px;
    background: linear-gradient(180deg, var(--royal-gold), var(--royal-gold-light));
    border-radius: var(--radius-xl) 0 0 var(--radius-xl);
}

.xp-type-label {
    display: block;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--royal-gold);
    margin-bottom: var(--space-3);
}

.xp-role {
    font-size: var(--font-size-2xl);
    font-weight: 800;
    color: var(--text-primary);
    line-height: 1.25;
    margin-bottom: var(--space-2);
}

.xp-company {
    font-size: var(--font-size-sm);
    color: var(--text-secondary);
    margin-bottom: var(--space-4);
}

.xp-date-chip {
    display: inline-block;
    padding: 3px 12px;
    background: rgba(196, 158, 14, 0.08);
    border: 1px solid rgba(196, 158, 14, 0.18);
    border-radius: var(--radius-full);
    font-size: 11px;
    font-weight: 600;
    color: var(--royal-gold);
    margin-bottom: var(--space-5);
}

.xp-desc {
    font-size: var(--font-size-sm);
    color: var(--text-secondary);
    line-height: 1.75;
    margin-bottom: var(--space-5);
}

.xp-tags {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-2);
    margin-bottom: var(--space-6);
}

.xp-tag {
    display: inline-block;
    padding: 3px 11px;
    border-radius: var(--radius-full);
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.02em;
    background: rgba(196, 158, 14, 0.06);
    color: var(--royal-gold);
    border: 1px solid rgba(196, 158, 14, 0.15);
}

.xp-cta-link {
    display: inline-flex;
    align-items: center;
    gap: var(--space-2);
    font-size: var(--font-size-sm);
    font-weight: 700;
    color: var(--royal-gold);
    text-decoration: none;
    transition: gap var(--transition-fast);
}

.xp-cta-link:hover {
    gap: var(--space-3);
}

/* --- Right: Achievement Feed --- */
.xp-feed {
    border: 1.5px solid var(--glass-border);
    border-radius: var(--radius-xl);
    overflow: hidden;
}

.xp-feed-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: var(--space-4) var(--space-6);
    font-size: var(--font-size-xs);
    font-weight: 700;
    letter-spacing: 0.07em;
    text-transform: uppercase;
    color: var(--text-tertiary);
    border-bottom: 1px solid var(--glass-border);
    background: rgba(0, 0, 0, 0.02);
}

.xp-feed-count {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: var(--glass-border);
    font-size: 11px;
    font-weight: 700;
    color: var(--text-secondary);
}

/* --- Achievement Row --- */
.xp-row {
    display: grid;
    grid-template-columns: 36px 1fr auto;
    align-items: center;
    gap: var(--space-4);
    padding: var(--space-4) var(--space-6);
    border-bottom: 1px solid var(--glass-border);
    transition: background var(--transition-fast);
}

.xp-row:last-child {
    border-bottom: none;
}

.xp-row:hover {
    background: rgba(196, 158, 14, 0.03);
}

/* --- "View more" button (certifications feed footer) --- */
.xp-more-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    width: 100%;
    padding: var(--space-4) var(--space-6);
    background: rgba(0, 0, 0, 0.02);
    border: none;
    color: var(--text-secondary);
    font-family: inherit;
    font-size: var(--font-size-xs);
    font-weight: 700;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    cursor: pointer;
    transition: background var(--transition-fast), color var(--transition-fast);
}

.xp-more-btn:hover {
    background: rgba(196, 158, 14, 0.05);
    color: var(--text-primary);
}

.xp-more-btn svg {
    transition: transform var(--transition-fast);
}

.xp-more-btn:hover svg {
    transform: translateY(2px);
}

/* --- More Certifications modal --- */
#certsModal {
    /* Sit just below the achievement modal so it can stack on top when a row is opened */
    z-index: 1990;
}

.certs-modal-content {
    max-width: 540px;
    width: 100%;
    text-align: left;
}

.certs-modal-content .modal-title {
    margin-bottom: var(--space-6);
}

.certs-modal-feed {
    margin-top: 0;
}

/* --- Row Icons --- */
.xp-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: var(--radius-lg);
    flex-shrink: 0;
}

.xp-icon-progress {
    background: rgba(59, 130, 246, 0.1);
    color: #3b82f6;
    border: 1px solid rgba(59, 130, 246, 0.18);
}

.xp-icon-hackathon {
    background: rgba(16, 185, 129, 0.1);
    color: #059669;
    border: 1px solid rgba(16, 185, 129, 0.18);
}

.xp-icon-award {
    background: rgba(196, 158, 14, 0.1);
    color: var(--royal-gold);
    border: 1px solid rgba(196, 158, 14, 0.18);
}

.xp-pulse-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #3b82f6;
    animation: statusPulse 2s ease-in-out infinite;
}

/* --- Row Body --- */
.xp-row-body {
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
}

.xp-row-title {
    font-size: var(--font-size-sm);
    font-weight: 600;
    color: var(--text-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.xp-row-date {
    font-size: var(--font-size-xs);
    color: var(--text-tertiary);
}

/* --- Row Badges --- */
.xp-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 3px 10px;
    border-radius: var(--radius-full);
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    white-space: nowrap;
}

.xp-badge-progress {
    background: rgba(59, 130, 246, 0.08);
    color: #3b82f6;
    border: 1px solid rgba(59, 130, 246, 0.2);
}

.xp-badge-hackathon {
    background: rgba(16, 185, 129, 0.08);
    color: #059669;
    border: 1px solid rgba(16, 185, 129, 0.2);
}

.xp-badge-award {
    background: rgba(196, 158, 14, 0.1);
    color: #9a7d0a;
    border: 1px solid rgba(196, 158, 14, 0.2);
}

/* --- Pending CTA (e.g. Euclid write-up coming soon) --- */
.xp-cta-pending {
    color: var(--text-tertiary);
    cursor: default;
    opacity: 0.85;
}

.xp-cta-pending:hover {
    gap: var(--space-2);
}

/* --- Clickable certificate rows --- */
.xp-row-clickable {
    position: relative;
}

.xp-row-clickable:hover {
    background: rgba(196, 158, 14, 0.06);
}

.xp-row-clickable::after {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 3px;
    background: var(--royal-gold);
    opacity: 0;
    transition: opacity var(--transition-fast);
}

.xp-row-clickable:hover::after {
    opacity: 1;
}

/* Certificate thumbnail used as the row icon */
.xp-icon-cert {
    position: relative;
    overflow: hidden;
    padding: 0;
    border: 1px solid var(--glass-border);
    background: var(--bg-secondary);
}

.xp-icon-cert img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform var(--transition-base), filter var(--transition-base);
}

.xp-icon-cert .xp-cert-zoom {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    background: rgba(0, 0, 0, 0.45);
    opacity: 0;
    transition: opacity var(--transition-fast);
}

.xp-row-clickable:hover .xp-icon-cert img {
    transform: scale(1.08);
}

.xp-row-clickable:hover .xp-icon-cert .xp-cert-zoom {
    opacity: 1;
}

/* Right-side meta: badge stacked over a "view" hint */
.xp-row-meta {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 4px;
}

.xp-cert-hint {
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.03em;
    text-transform: uppercase;
    color: var(--royal-gold);
    opacity: 0.55;
    transition: opacity var(--transition-fast), transform var(--transition-fast);
}

.xp-row-clickable:hover .xp-cert-hint {
    opacity: 1;
    transform: translateX(-1px);
}

/* --- Responsive --- */
@media (max-width: 900px) {
    .xp-dashboard {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 640px) {
    .xp-internship {
        padding: var(--space-6) var(--space-5) var(--space-6) calc(var(--space-5) + 14px);
    }

    .xp-role {
        font-size: var(--font-size-xl);
    }

    .xp-row {
        grid-template-columns: 36px 1fr;
        grid-template-rows: auto auto;
        padding: var(--space-4) var(--space-4);
    }

    .xp-badge {
        grid-column: 2;
    }

    .xp-row-meta {
        grid-column: 2;
        flex-direction: row;
        align-items: center;
        gap: var(--space-2);
    }
}

/* --- Dark Mode --- */
body.dark-mode .xp-internship {
    background: rgba(196, 158, 14, 0.06);
    border-color: rgba(196, 158, 14, 0.18);
}

body.dark-mode .xp-date-chip {
    background: rgba(212, 175, 55, 0.1);
    border-color: rgba(212, 175, 55, 0.2);
    color: var(--royal-gold-light);
}

body.dark-mode .xp-type-label,
body.dark-mode .xp-cta-link {
    color: var(--royal-gold-light);
}

body.dark-mode .xp-tag {
    background: rgba(212, 175, 55, 0.08);
    border-color: rgba(212, 175, 55, 0.15);
    color: var(--royal-gold-light);
}

body.dark-mode .xp-feed {
    border-color: var(--dark-border);
}

body.dark-mode .xp-feed-header {
    border-color: var(--dark-border);
    background: rgba(255, 255, 255, 0.02);
}

body.dark-mode .xp-more-btn {
    background: rgba(255, 255, 255, 0.02);
}

body.dark-mode .xp-more-btn:hover {
    background: rgba(196, 158, 14, 0.08);
}

body.dark-mode .xp-feed-count {
    background: rgba(255, 255, 255, 0.08);
}

body.dark-mode .xp-row {
    border-color: var(--dark-border);
}

body.dark-mode .xp-row:hover {
    background: rgba(196, 158, 14, 0.05);
}

body.dark-mode .xp-icon-progress {
    background: rgba(59, 130, 246, 0.15);
    color: #60a5fa;
    border-color: rgba(59, 130, 246, 0.2);
}

body.dark-mode .xp-icon-hackathon {
    background: rgba(16, 185, 129, 0.15);
    color: #34d399;
    border-color: rgba(16, 185, 129, 0.2);
}

body.dark-mode .xp-icon-award {
    background: rgba(212, 175, 55, 0.12);
    color: var(--royal-gold-light);
    border-color: rgba(212, 175, 55, 0.2);
}

body.dark-mode .xp-icon-cert {
    background: var(--bg-tertiary);
    border-color: var(--dark-border);
}

body.dark-mode .xp-row-clickable:hover {
    background: rgba(96, 182, 216, 0.06);
}

body.dark-mode .xp-row-clickable::after,
body.dark-mode .xp-cert-hint {
    color: var(--royal-gold-light);
}

body.dark-mode .xp-row-clickable::after {
    background: var(--royal-gold-light);
}

body.dark-mode .xp-badge-progress {
    background: rgba(59, 130, 246, 0.12);
    color: #60a5fa;
    border-color: rgba(59, 130, 246, 0.2);
}

body.dark-mode .xp-badge-hackathon {
    background: rgba(16, 185, 129, 0.12);
    color: #34d399;
    border-color: rgba(16, 185, 129, 0.2);
}

body.dark-mode .xp-badge-award {
    background: rgba(212, 175, 55, 0.12);
    color: var(--royal-gold-light);
    border-color: rgba(212, 175, 55, 0.2);
}