/* ============================================================
   1.  DESIGN TOKENS
   ============================================================ */
:root {
    /* ----- Colors ----- */
    --color-bg: #0a0a0d;
    --color-bg-elevated: #101118;
    --color-surface-1: #12121a;
    --color-surface-2: #181822;
    --color-surface-3: #1f1f2c;
    --color-surface-4: #29293a;

    --color-border: rgba(255, 255, 255, 0.07);
    --color-border-strong: rgba(255, 255, 255, 0.14);
    --color-border-accent: rgba(212, 167, 106, 0.25);

    --color-text-primary: #f1f1f5;
    --color-text-secondary: #b0b0be;
    --color-text-muted: #7b7b8a;
    --color-text-inverse: #0a0a0d;

    --color-accent-primary: #d4a76a;
    --color-accent-warm: #e8c88a;
    --color-accent-bronze: #8e7354;
    --color-accent-soft: rgba(212, 167, 106, 0.14);
    --color-accent-glow: rgba(212, 167, 106, 0.22);

    --color-accent-secondary: #5f8ea0;
    --color-accent-secondary-soft: rgba(95, 142, 160, 0.16);
    --color-accent-secondary-glow: rgba(95, 142, 160, 0.20);

    --color-status-live: #4ad37a;
    --color-status-live-soft: rgba(74, 211, 122, 0.18);

    --white-soft: rgba(255, 255, 255, 0.06);
    --white-subtle: rgba(255, 255, 255, 0.025);

    /* ----- Typography ----- */
    --font-display: 'Fraunces', 'Iowan Old Style', Georgia, serif;
    --font-body: 'Inter', 'Segoe UI', 'Helvetica Neue', sans-serif;
    --font-mono: 'JetBrains Mono', 'SF Mono', 'Consolas', monospace;

    --type-ratio: 1.25;
    --text-2xs: 0.64rem;
    --text-xs: 0.72rem;
    --text-sm: 0.82rem;
    --text-md: 1rem;
    --text-lg: calc(var(--text-md) * var(--type-ratio));
    --text-xl: calc(var(--text-lg) * var(--type-ratio));
    --text-2xl: calc(var(--text-xl) * var(--type-ratio));
    --text-3xl: calc(var(--text-2xl) * var(--type-ratio));
    --text-4xl: calc(var(--text-3xl) * var(--type-ratio));
    --text-5xl: calc(var(--text-4xl) * var(--type-ratio));

    /* ----- Spacing (4px base) ----- */
    --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-32: 8rem;

    /* ----- Radius ----- */
    --radius-sm: 8px;
    --radius-md: 16px;
    --radius-lg: 24px;
    --radius-xl: 32px;
    --radius-full: 9999px;

    /* ----- Shadows ----- */
    --shadow-sm: 0 4px 12px rgba(0, 0, 0, 0.20);
    --shadow-md: 0 12px 32px rgba(0, 0, 0, 0.28);
    --shadow-lg: 0 24px 56px rgba(0, 0, 0, 0.36);
    --shadow-xl: 0 36px 80px rgba(0, 0, 0, 0.48);

    /* ----- Transitions ----- */
    --ease-out-expo: cubic-bezier(0.16, 1, 0.3, 1);
    --ease-spring: cubic-bezier(0.34, 1.56, 0.64, 1);
    --ease-smooth: cubic-bezier(0.22, 1, 0.36, 1);

    --duration-fast: 0.18s;
    --duration-smooth: 0.35s;
    --duration-elegant: 0.6s;
    --duration-bounce: 0.55s;

    /* ----- Z-index ----- */
    --z-nav: 1000;
    --z-cursor: 9999;
    --z-loader: 10000;
    --z-modal: 800;
    --z-chat: 900;

    /* ----- Layout ----- */
    --section-pad-x: clamp(1.25rem, 4vw, 2.5rem);
    --section-pad-y: clamp(4rem, 8vh, 6rem);
    --nav-width: 70px;
}

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

html {
    scroll-behavior: smooth;
    scrollbar-width: thin;
    scrollbar-color: #2b2b37 var(--color-bg);
    font-size: 16px;
    color-scheme: dark;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-rendering: optimizeLegibility;
}

::-webkit-scrollbar {
    width: 4px;
}
::-webkit-scrollbar-track {
    background: var(--color-bg);
}
::-webkit-scrollbar-thumb {
    background: #2a2a35;
    border-radius: 10px;
}
::-webkit-scrollbar-thumb:hover {
    background: #3a3a48;
}

body {
    background: var(--color-bg);
    color: var(--color-text-primary);
    font-family: var(--font-body);
    line-height: 1.6;
    overflow-x: hidden;
    cursor: none;
    min-height: 100vh;
    position: relative;
    isolation: isolate;
}

/* ---- Global background texture + gradient mesh ---- */
body::before {
    content: '';
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: -1;
    background:
        radial-gradient(circle at 18% 12%, rgba(212, 167, 106, 0.07), transparent 28%),
        radial-gradient(circle at 82% 16%, rgba(95, 142, 160, 0.06), transparent 22%),
        radial-gradient(circle at 50% 84%, rgba(212, 167, 106, 0.04), transparent 30%),
        linear-gradient(180deg, #0b0b10 0%, #0a0a0d 48%, #09090c 100%);
    filter: blur(2px);
}
body::after {
    content: '';
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: -1;
    background-image:
        radial-gradient(circle at 1px 1px, rgba(255, 255, 255, 0.055) 1px, transparent 0),
        radial-gradient(circle at 1px 1px, rgba(255, 255, 255, 0.025) 1px, transparent 0);
    background-size: 40px 40px, 84px 84px;
    opacity: 0.5;
    mix-blend-mode: soft-light;
}

/* ---- Grain overlay (applied globally via pseudo) ---- */
.grain-overlay {
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 0;
    opacity: 0.035;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.5'/%3E%3C/svg%3E");
    background-size: 256px 256px;
    mix-blend-mode: overlay;
}

/* ============================================================
   3.  CUSTOM CURSOR
   ============================================================ */
.cursor-dot,
.cursor-ring {
    position: fixed;
    top: 0;
    left: 0;
    pointer-events: none;
    z-index: var(--z-cursor);
    opacity: 0;
    transform: translate(-50%, -50%);
    transition: opacity var(--duration-fast), transform var(--duration-fast), background-color var(--duration-fast), border-color var(--duration-fast), box-shadow var(--duration-fast);
    will-change: transform, opacity;
}
.cursor-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--color-accent-primary);
    box-shadow: 0 0 14px rgba(212, 167, 106, 0.48);
}
.cursor-ring {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    border: 1px solid rgba(212, 167, 106, 0.34);
    box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.02) inset;
}
body.cursor-ready .cursor-dot,
body.cursor-ready .cursor-ring {
    opacity: 1;
}
body.cursor-hover .cursor-dot {
    transform: translate(-50%, -50%) scale(2.15);
    background: var(--color-accent-secondary);
    box-shadow: 0 0 18px rgba(95, 142, 160, 0.52);
}
body.cursor-hover .cursor-ring {
    transform: translate(-50%, -50%) scale(1.55);
    border-color: rgba(95, 142, 160, 0.5);
    box-shadow: 0 0 0 1px rgba(95, 142, 160, 0.08) inset, 0 0 24px rgba(95, 142, 160, 0.12);
}
body.cursor-press .cursor-dot {
    transform: translate(-50%, -50%) scale(0.85);
}

/* ============================================================
   4.  LOADING SCREEN
   ============================================================ */
.loader {
    position: fixed;
    inset: 0;
    z-index: var(--z-loader);
    background: var(--color-bg);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    transition: opacity 0.7s ease, visibility 0.7s ease;
    pointer-events: all;
}
.loader.hidden {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}
.loader-logo {
    width: 50px;
    height: 50px;
    border: 2px solid var(--color-accent-primary);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: var(--font-display);
    font-size: 1.4rem;
    color: var(--color-accent-primary);
    animation: loaderPulse 2s ease-in-out infinite;
    margin-bottom: 24px;
    letter-spacing: 1px;
}
@keyframes loaderPulse {
    0%, 100% {
        box-shadow: 0 0 0 0 var(--color-accent-glow);
        transform: scale(1);
    }
    50% {
        box-shadow: 0 0 0 20px transparent;
        transform: scale(1.05);
    }
}
.loader-percentage {
    font-family: var(--font-mono);
    font-size: 0.85rem;
    color: var(--color-text-muted);
    letter-spacing: 0.2em;
}

/* ============================================================
   5.  FLOATING NAV — REFINED PILL
   ============================================================ */
.floating-nav {
    position: fixed;
    right: 24px;
    top: 50%;
    transform: translateY(-50%) translateX(40px);
    z-index: var(--z-nav);
    opacity: 0;
    animation: navEntrance 0.6s var(--ease-out-expo) 0.7s forwards;

    background: rgba(18, 18, 22, 0.55);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 32px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
    padding: 20px 24px;
}

@keyframes navEntrance {
    to {
        opacity: 1;
        transform: translateY(-50%) translateX(0);
    }
}

.nav-inner {
    position: relative;
    display: flex;
    flex-direction: column;
    gap: 20px;          /* consistent vertical spacing */
    align-items: flex-start;
}




.nav-item {
    position: relative;
    display: flex;
    align-items: center;
    padding: 2px 0 2px 16px;
    color: rgba(255, 255, 255, 0.5);
    text-decoration: none;
    font-family: var(--font-body);
    font-size: 15px;
    font-weight: 400;
    transition: color 0.25s ease, transform 0.25s ease, text-shadow 0.25s ease;
    cursor: none;
    will-change: transform;
}
.nav-dot {
    position: absolute;
    left: -8px;
    top: 0;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--color-accent-primary);
    box-shadow: 0 0 12px rgba(212, 167, 106, 0.35);
    transition: transform 0.6s var(--ease-out-expo), opacity 0.3s ease;
    transform: translateY(0);
    will-change: transform;
}

.nav-item:hover {
    color: #fff;
    transform: scale(1.02);
    text-shadow: 0 0 12px rgba(212, 167, 106, 0.3);
}

.nav-item.active {
    color: var(--color-accent-primary);
    font-weight: 600;
}

/* ============================================================
   5.  FLOATING NAV — RIGHT EDGE
   ============================================================ */
.floating-nav {
    position: fixed;
    right: 0;                     /* flush against right edge */
    top: 50%;
    transform: translateY(-50%) translateX(40px);
    z-index: var(--z-nav);
    opacity: 0;
    animation: navEntrance 0.6s var(--ease-out-expo) 0.7s forwards;

    background: rgba(18, 18, 22, 0.55);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 32px 0 0 32px;  /* rounded on left, straight on right */
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
    padding: 20px 16px 20px 24px;  /* less padding on the right side */
}
/* Make the navbar more transparent when the cursor is anywhere on the page */
body:hover .floating-nav {
    opacity: 0.3; /* adjust this value (0–1) to control transparency */
    transition: opacity 0.3s ease;
}

/* Keep the navbar fully visible when hovering directly over it */
.floating-nav:hover {
    opacity: 1 !important;
    transition: opacity 0.15s ease;
}

/* responsive adjustments */
@media (max-width: 768px) {
    .floating-nav {
        right: 0;
        padding: 14px 12px 14px 16px;
        border-radius: 24px 0 0 24px;
    }
}

@media (max-width: 480px) {
    .floating-nav {
        right: 0;
        padding: 12px 10px 12px 12px;
        border-radius: 20px 0 0 20px;
    }
}

/* Hide any stray indicators from old design */
.nav-active-indicator,
.nav-tooltip,
.nav-active-dot,
.nav-icon {
    display: none !important;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .floating-nav {
        right: 12px;
        padding: 14px 16px;
        border-radius: 24px;
    }
    .nav-inner {
        gap: 16px;
    }
    .nav-item {
        font-size: 13px;
    }
    .nav-dot {
        left: -8px;
        width: 6px;
        height: 6px;
    }
    .nav-dot::after {
        inset: -3px;
    }
}

@media (max-width: 480px) {
    .floating-nav {
        right: 8px;
        padding: 12px 12px;
        border-radius: 20px;
    }
    .nav-inner {
        gap: 12px;
    }
    .nav-item {
        font-size: 12px;
    }
}

/* ============================================================
   6.  SECTION BASE
   ============================================================ */
.section {
    position: relative;
    padding: var(--section-pad-y) var(--section-pad-x);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}
.section-label {
    font-family: var(--font-mono);
    font-size: var(--text-2xs);
    text-transform: uppercase;
    letter-spacing: 0.25em;
    color: var(--color-accent-primary);
    margin-bottom: var(--space-4);
    opacity: 0.8;
}
.section-title {
    font-family: var(--font-display);
    font-size: clamp(2.4rem, 5vw, 4rem);
    font-weight: 500;
    color: var(--color-text-primary);
    letter-spacing: -0.02em;
    line-height: 1.1;
    margin-bottom: var(--space-5);
}
#certificates .section-title {
    position: relative;
}
#certificates .section-title::after {
    content: '';
    display: block;
    width: 92px;
    height: 2px;
    margin: var(--space-4) auto 0;
    border-radius: var(--radius-full);
    background: linear-gradient(90deg, transparent, var(--color-accent-primary), transparent);
    box-shadow: 0 0 18px rgba(212, 167, 106, 0.28);
    animation: certUnderline 2.8s ease-in-out infinite;
}
@keyframes certUnderline {
    0%, 100% {
        transform: scaleX(0.82);
        opacity: 0.65;
    }
    50% {
        transform: scaleX(1);
        opacity: 1;
    }
}

@media (max-width: 768px) {
    .section {
        padding: 60px 20px;
    }
}

/* ============================================================
   7.  HOME
   ============================================================ */
#home {
    height: 100vh;
    min-height: 100vh;
    padding: 0;
    position: relative;
    display: flex;
    align-items: flex-end;
    justify-content: center;
    overflow: hidden;
}
.hero-image-wrapper {
    position: absolute;
    max-width: 100%;
    overflow: hidden;
    inset: 0;
    z-index: -1;
    transform: translate3d(var(--hero-image-shift-x, 0px), var(--hero-image-shift-y, 0px), 0) scale(1.07);
    will-change: transform;
}
.hero-image-placeholder {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    opacity: 0.88;
    filter: brightness(0.58) saturate(0.92) contrast(1.02);
    object-position: center 18%;
}
.hero-image-fallback {
    width: 100%;
    height: 100%;
    background: linear-gradient(160deg, #0d0d18 0%, #111122 30%, #0a0a14 60%, #0d0d1a 100%);
    position: absolute;
    inset: 0;
    z-index: -2;
}
.hero-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg,
            rgba(8, 8, 12, 0.26) 0%,
            rgba(8, 8, 12, 0.08) 36%,
            rgba(8, 8, 12, 0.36) 72%,
            rgba(8, 8, 12, 0.9) 100%);
    z-index: 0;
    pointer-events: none;
}
.hero-gradient-overlay {
    position: absolute;
    inset: -8%;
    z-index: 1;
    pointer-events: none;
    background:
        radial-gradient(circle at 42% 34%, rgba(30, 37, 68, 0.22), transparent 34%),
        radial-gradient(circle at 58% 24%, rgba(96, 63, 126, 0.18), transparent 28%),
        linear-gradient(135deg, rgba(18, 18, 28, 0.18) 0%, rgba(8, 8, 12, 0.14) 42%, rgba(20, 17, 36, 0.26) 100%);
    background-size: 120% 120%, 120% 120%, 140% 140%;
    mix-blend-mode: screen;
    opacity: 0.72;
    animation: heroGradientShift 18s ease-in-out infinite alternate;
}
.hero-vignette {
    position: absolute;
    inset: 0;
    z-index: 2;
    pointer-events: none;
    background: radial-gradient(circle at 46% 34%, rgba(255, 255, 255, 0.06) 0%, rgba(255, 255, 255, 0.02) 20%, rgba(0, 0, 0, 0.18) 58%, rgba(0, 0, 0, 0.62) 100%);
}
.hero-grain {
    position: absolute;
    inset: 0;
    z-index: 3;
    pointer-events: none;
    opacity: 0.045;
    background-image:
        radial-gradient(circle at 20% 20%, rgba(255, 255, 255, 0.9) 0 1px, transparent 1.3px),
        radial-gradient(circle at 80% 40%, rgba(255, 255, 255, 0.55) 0 1px, transparent 1.4px),
        radial-gradient(circle at 40% 75%, rgba(255, 255, 255, 0.65) 0 1px, transparent 1.3px),
        radial-gradient(circle at 65% 60%, rgba(255, 255, 255, 0.45) 0 1px, transparent 1.2px);
    background-size: 140px 140px, 180px 180px, 220px 220px, 260px 260px;
    mix-blend-mode: soft-light;
    animation: grainDrift 10s steps(8) infinite;
}
.hero-content {
    position: relative;
    z-index: 4;
    max-width: 640px;
    width: min(100%, 640px);
    padding: 40px clamp(24px, 8vw, 92px) 0 clamp(24px, 8vw, 92px);
    margin: 0 auto 0 0;
    text-align: left;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 14px;
    transform: translate3d(var(--hero-content-shift-x, 0px), var(--hero-content-shift-y, 0px), 0);
    will-change: transform;
}
.hero-chip {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 14px;
    border-radius: var(--radius-full);
    border: 1px solid rgba(212, 167, 106, 0.28);
    background: rgba(14, 14, 20, 0.45);
    color: var(--color-accent-primary);
    font-family: var(--font-mono);
    font-size: var(--text-2xs);
    letter-spacing: 0.14em;
    text-transform: uppercase;
    box-shadow: var(--shadow-sm);
    animation: heroRise 0.9s var(--ease-out-expo) both;
}
.hero-name {
    font-family: var(--font-display);
    font-size: clamp(3.5rem, 8vw, 7rem);
    font-weight: 500;
    letter-spacing: -0.03em;
    line-height: 1;
    color: #fff;
    margin-bottom: 6px;
    text-shadow: 0 2px 40px rgba(0, 0, 0, 0.5);
    max-width: 6.5ch;
    animation: heroRise 0.95s var(--ease-out-expo) 0.05s both;
}
.hero-subtitle {
    font-family: var(--font-body);
    font-size: clamp(0.95rem, 1.4vw, 1.15rem);
    color: rgba(255, 255, 255, 0.75);
    font-weight: 350;
    letter-spacing: 0.02em;
    margin-bottom: 12px;
    line-height: 1.42;
    max-width: 430px;
    animation: heroRise 1s var(--ease-out-expo) 0.12s both;
}
.hero-buttons {
    display: flex;
    gap: 18px;
    flex-wrap: wrap;
    justify-content: flex-start;
    padding-top: 8px;
    animation: heroRise 1s var(--ease-out-expo) 0.18s both;
}
@media (max-width: 768px) {
   /* Ensure the picture and its image fill the hero wrapper */
    .hero-image-wrapper picture,
    .hero-image-wrapper picture img {
        display: block;
        width: 100%;
        height: 100%;
        object-fit: cover;
    }

    body:has(.nav-item[data-section="home"].active) .floating-nav {
        display: none;
    }

    .hero-image-placeholder {
        width: 100%;
        height: 100%;
        object-fit: cover;
        object-position: center 20%;  /* keep face visible */
        filter: brightness(0.6) saturate(0.9);
    }

    /* Adjust hero content to sit below/over the image */
    #home {
        align-items: flex-end;        /* push content to bottom */
        justify-content: center;
        padding-top: 0;
    }

    .hero-content {
        margin: 0 auto;
        padding: 20px 24px 40px;
        width: 100%;
        text-align: center;
        align-items: center;
        background: linear-gradient(0deg, rgba(10,10,13,0.9) 0%, transparent 100%);
        position: relative;
        z-index: 4;
    }

    /* Ensure the gradient overlays still cover the image */
    .hero-overlay,
    .hero-gradient-overlay,
    .hero-vignette {
        z-index: 1;
    }
    .hero-content {
        z-index: 3;
    }
}
.btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 13px 28px;
    border-radius: var(--radius-full);
    font-family: var(--font-body);
    font-size: var(--text-sm);
    font-weight: 500;
    letter-spacing: 0.02em;
    cursor: none;
    transition: all var(--duration-smooth);
    text-decoration: none;
    border: none;
    position: relative;
    overflow: hidden;
    isolation: isolate;
}
.btn-primary {
    background: var(--color-accent-primary);
    color: var(--color-text-inverse);
    box-shadow: 0 4px 24px var(--color-accent-glow);
}
.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 14px 40px rgba(212, 167, 106, 0.34), 0 0 0 1px rgba(255, 255, 255, 0.04);
}
.btn-primary::before {
    content: '';
    position: absolute;
    inset: -30%;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.45), transparent 60%);
    opacity: 0;
    transform: scale(0.75);
    transition: opacity var(--duration-smooth), transform var(--duration-smooth);
    z-index: -1;
}
.btn-primary:hover::before {
    opacity: 0.45;
    transform: scale(1);
}
.btn-outline {
    background: transparent;
    color: #fff;
    border: 1.5px solid rgba(255, 255, 255, 0.3);
}
.btn-outline:hover {
    border-color: rgba(255, 255, 255, 0.7);
    background: rgba(255, 255, 255, 0.04);
    transform: translateY(-2px);
}
.btn-outline::after {
    content: '';
    position: absolute;
    left: 18px;
    right: 18px;
    bottom: 10px;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.92), transparent);
    transform: scaleX(0);
    transform-origin: center;
    transition: transform var(--duration-smooth);
    opacity: 0.8;
}
.btn-outline:hover::after {
    transform: scaleX(1);
}
.scroll-indicator {
    position: absolute;
    bottom: 40px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 3;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    opacity: 0.6;
    animation: bounceDown 2s ease-in-out infinite;
}
@keyframes bounceDown {
    0%, 100% {
        transform: translateX(-50%) translateY(0);
    }
    50% {
        transform: translateX(-50%) translateY(10px);
    }
}
.scroll-indicator span {
    font-family: var(--font-mono);
    font-size: var(--text-2xs);
    letter-spacing: 0.2em;
    color: var(--color-text-muted);
}
.scroll-line {
    width: 1px;
    height: 40px;
    background: linear-gradient(to bottom, var(--color-accent-primary), transparent);
}
.particles-container {
    position: absolute;
    inset: 0;
    z-index: 2;
    pointer-events: none;
    overflow: hidden;
}
.particle {
    position: absolute;
    width: 2px;
    height: 2px;
    background: rgba(255, 255, 255, 0.4);
    border-radius: 50%;
    animation: floatDrift var(--particle-duration, 12s) ease-in-out infinite;
    animation-delay: var(--particle-delay, 0s);
    will-change: transform, opacity;
}
@keyframes heroRise {
    from {
        opacity: 0;
        transform: translateY(18px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}
@keyframes heroGradientShift {
    from {
        transform: translate3d(-1.5%, -1%, 0) scale(1.02);
    }
    to {
        transform: translate3d(1.5%, 1%, 0) scale(1.06);
    }
}
@keyframes grainDrift {
    0% {
        transform: translate3d(0, 0, 0);
    }
    25% {
        transform: translate3d(-1%, 1%, 0);
    }
    50% {
        transform: translate3d(1%, -1%, 0);
    }
    75% {
        transform: translate3d(-1%, -0.5%, 0);
    }
    100% {
        transform: translate3d(0, 0, 0);
    }
}
@keyframes floatDrift {
    0% {
        transform: translate3d(0, 0, 0);
        opacity: 0;
    }
    15% {
        opacity: 0.55;
    }
    50% {
        transform: translate3d(calc(var(--drift-x, 0px) * 0.5), calc(var(--drift-y, 0px) * 0.5), 0);
        opacity: 0.45;
    }
    100% {
        transform: translate3d(var(--drift-x, 0px), var(--drift-y, 0px), 0);
        opacity: 0;
    }
}

@media (max-width: 768px) {
    .hero-content {
        margin-left: 0;
        width: 100%;
        max-width: 100%;
        padding: 24px 24px 10vh;
        text-align: center;
        align-items: center;
    }
    .hero-chip {
        letter-spacing: 0.12em;
    }
    .hero-name {
        max-width: none;
    }
    .hero-subtitle {
        max-width: 100%;
    }
    .hero-buttons {
        justify-content: center;
    }
}

/* ============================================================
   8.  CERTIFICATES
   ============================================================ */
#certificates {
    padding: var(--space-24) 0;
    overflow: hidden;
}
.cert-carousel {
    width: 100%;
    max-width: 1480px;
    margin: 0 auto;
    padding: 8px 24px 0;
}
.cert-carousel-shell {
    position: relative;
}
.cert-scroll-wrapper {
    width: 100%;
    position: relative;
    overflow: hidden;
    padding: 10px 0 20px;
    mask-image: linear-gradient(to right, transparent 0%, black 7%, black 93%, transparent 100%);
    -webkit-mask-image: linear-gradient(to right, transparent 0%, black 7%, black 93%, transparent 100%);
}
.cert-track {
    display: flex;
    gap: 28px;
    padding: 8px 8px 18px;
    width: max-content;
    will-change: transform;
}
.cert-card {
    flex-shrink: 0;
    width: 280px;
    min-height: 360px;
    background: linear-gradient(180deg, rgba(18, 18, 28, 0.82), rgba(12, 12, 18, 0.95));
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
    border: 1px solid var(--color-border);
    border-top: 3px solid var(--cert-accent, var(--color-accent-primary));
    border-radius: var(--radius-xl);
    padding: var(--space-4);
    cursor: none;
    transition: transform var(--duration-smooth), box-shadow var(--duration-smooth), border-color var(--duration-smooth), background var(--duration-smooth);
    text-align: left;
    scroll-snap-align: center;
    scroll-snap-stop: always;
    display: flex;
    flex-direction: column;
    gap: var(--space-4);
    position: relative;
    overflow: hidden;
    box-shadow: var(--shadow-md);
}
.cert-card:hover {
    transform: translateY(-6px) scale(1.04);
    box-shadow: var(--shadow-xl), 0 0 0 1px rgba(255, 255, 255, 0.05);
    border-color: rgba(255, 255, 255, 0.16);
    background: linear-gradient(180deg, rgba(20, 20, 30, 0.9), rgba(12, 12, 18, 0.98));
}
.cert-card::before {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at 50% 0%, var(--cert-accent-soft, rgba(212, 167, 106, 0.14)), transparent 52%);
    opacity: 0.7;
    pointer-events: none;
}
.cert-card > * {
    position: relative;
    z-index: 1;
}
.cert-image {
    width: 100%;
    min-height: 164px;
    border-radius: var(--radius-lg);
    background: radial-gradient(circle at 30% 20%, var(--cert-accent-soft, rgba(212, 167, 106, 0.14)), transparent 54%), linear-gradient(180deg, rgba(22, 22, 34, 0.92), rgba(12, 12, 18, 0.98));
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 3rem;
    margin-bottom: 2px;
    overflow: hidden;
    position: relative;
    border: 1px solid rgba(255, 255, 255, 0.06);
}
.cert-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.cert-image-icon {
    width: 82px;
    height: 82px;
    border-radius: var(--radius-lg);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 2rem;
    font-family: var(--font-mono);
    background: var(--cert-icon-bg, rgba(255, 255, 255, 0.08));
    box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.08), var(--shadow-md);
}
.cert-platform-badge {
    position: absolute;
    top: 14px;
    left: 14px;
    padding: 6px 10px;
    border-radius: var(--radius-full);
    background: rgba(7, 7, 10, 0.72);
    border: 1px solid rgba(255, 255, 255, 0.08);
    color: var(--cert-accent, var(--color-accent-primary));
    font-family: var(--font-mono);
    font-size: var(--text-2xs);
    letter-spacing: 0.14em;
    text-transform: uppercase;
}
.cert-accent-bar {
    position: absolute;
    inset: 0 0 auto;
    height: 4px;
    background: linear-gradient(90deg, var(--cert-accent, var(--color-accent-primary)), rgba(255, 255, 255, 0.18));
}
.cert-title {
    font-weight: 600;
    font-size: var(--text-md);
    color: var(--color-text-primary);
    line-height: 1.25;
}
.cert-issuer {
    font-size: var(--text-sm);
    color: var(--color-text-secondary);
}
.cert-year {
    font-size: var(--text-2xs);
    color: var(--color-text-muted);
    font-family: var(--font-mono);
}
.cert-copy {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 6px;
}
.cert-body {
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.cert-view-btn {
    margin-top: auto;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 14px;
    border-radius: var(--radius-full);
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.08);
    color: var(--color-text-primary);
    font-size: var(--text-sm);
    text-decoration: none;
    transition: all var(--duration-fast);
}
.cert-card:hover .cert-view-btn {
    background: var(--cert-accent-soft, rgba(212, 167, 106, 0.12));
    border-color: var(--cert-accent, var(--color-accent-primary));
    color: #fff;
}
.cert-nav-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 44px;
    height: 44px;
    border-radius: 50%;
    border: 1px solid var(--color-border);
    background: rgba(12, 12, 18, 0.68);
    color: var(--color-text-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    cursor: none;
    z-index: 2;
    transition: all var(--duration-fast);
    box-shadow: var(--shadow-sm);
}
.cert-nav-btn span {
    font-size: 1.6rem;
    line-height: 1;
}
.cert-nav-btn:hover {
    background: rgba(212, 167, 106, 0.16);
    border-color: rgba(212, 167, 106, 0.28);
    color: var(--color-accent-primary);
    transform: translateY(-50%) scale(1.05);
}
.cert-nav-prev {
    left: -16px;
}
.cert-nav-next {
    right: -16px;
}
.cert-pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-top: var(--space-4);
    flex-wrap: wrap;
}
.cert-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.18);
    border: 1px solid rgba(255, 255, 255, 0.08);
    transition: all var(--duration-fast);
    cursor: none;
}
.cert-dot.active {
    width: 22px;
    border-radius: var(--radius-full);
    background: var(--color-accent-primary);
    border-color: rgba(255, 255, 255, 0.12);
    box-shadow: 0 0 0 5px rgba(212, 167, 106, 0.1);
}
.cert-dot:hover {
    background: rgba(212, 167, 106, 0.7);
}
.cert-carousel.is-paused .cert-track {
    will-change: auto;
}

@media (max-width: 768px) {
    .cert-carousel {
        padding: 8px 8px 0;
    }
    .cert-track {
        gap: 18px;
    }
    .cert-card {
        width: 250px;
        min-height: 344px;
    }
    .cert-nav-btn {
        display: none;
    }
}

/* Cert Modal */
.modal-overlay {
    position: fixed;
    inset: 0;
    z-index: var(--z-modal);
    background: rgba(0, 0, 0, 0.75);
    backdrop-filter: blur(8px);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: all var(--duration-elegant);
}
.modal-overlay.active {
    opacity: 1;
    visibility: visible;
}
.modal-content {
    background: var(--color-bg-elevated);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-xl);
    padding: var(--space-8);
    max-width: 500px;
    width: 90%;
    text-align: center;
    transform: scale(0.9);
    transition: transform var(--duration-elegant);
}
.modal-overlay.active .modal-content {
    transform: scale(1);
}
.modal-close {
    background: var(--white-soft);
    border: none;
    color: var(--color-text-primary);
    padding: 10px 24px;
    border-radius: var(--radius-full);
    cursor: none;
    margin-top: var(--space-4);
    font-family: var(--font-body);
    transition: all var(--duration-fast);
}
.modal-close:hover {
    background: var(--color-accent-soft);
    color: var(--color-accent-primary);
}

/* ============================================================
   9.  JOURNEY
   ============================================================ */
#journey {
    padding: var(--space-24) var(--section-pad-x);
    position: relative;
}
#journey::before {
    content: '';
    position: absolute;
    inset: 0;
    background:
        radial-gradient(circle at 12% 18%, rgba(212, 167, 106, 0.08), transparent 20%),
        radial-gradient(circle at 82% 28%, rgba(212, 167, 106, 0.06), transparent 18%),
        repeating-linear-gradient(0deg, rgba(255, 255, 255, 0.025) 0 1px, transparent 1px 42px),
        repeating-linear-gradient(90deg, rgba(255, 255, 255, 0.018) 0 1px, transparent 1px 42px),
        radial-gradient(circle at 50% 50%, rgba(255, 255, 255, 0.02), transparent 60%);
    opacity: 0.72;
    pointer-events: none;
}
.journey-map-shell {
    position: relative;
    width: 100%;
    max-width: 1200px;
    margin: var(--space-4) auto 0;
    padding: var(--space-6) var(--space-4) var(--space-5);
    border-radius: var(--radius-xl);
    background: linear-gradient(180deg, rgba(12, 12, 18, 0.76), rgba(10, 10, 16, 0.88));
    border: 1px solid rgba(255, 255, 255, 0.05);
    overflow: hidden;
    box-shadow: var(--shadow-lg);
}
.journey-map-texture,
.journey-map-glow,
.journey-route {
    position: absolute;
    inset: 0;
    pointer-events: none;
}
.journey-map-texture {
    opacity: 0.3;
    background:
        repeating-linear-gradient(135deg, rgba(212, 167, 106, 0.03) 0 1px, transparent 1px 26px),
        repeating-radial-gradient(circle at 50% 50%, rgba(212, 167, 106, 0.022) 0 1px, transparent 1px 18px);
    mix-blend-mode: screen;
}
.journey-map-glow {
    filter: blur(18px);
    opacity: 0.85;
}
.journey-map-glow-a {
    inset: 12% auto auto 18%;
    width: 180px;
    height: 180px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(212, 167, 106, 0.16), transparent 68%);
}
.journey-map-glow-b {
    inset: auto 14% 18% auto;
    width: 220px;
    height: 220px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(95, 142, 160, 0.08), transparent 70%);
}
.journey-map-corner {
    position: absolute;
    top: 20px;
    right: 22px;
    z-index: 1;
    font-family: var(--font-mono);
    font-size: var(--text-2xs);
    letter-spacing: 0.28em;
    color: rgba(229, 225, 216, 0.42);
    text-transform: uppercase;
}
.journey-progress-chip {
    position: absolute;
    top: 20px;
    left: 22px;
    z-index: 1;
    padding: 8px 12px;
    border-radius: var(--radius-full);
    background: rgba(16, 16, 24, 0.68);
    border: 1px solid rgba(212, 167, 106, 0.2);
    color: var(--color-accent-primary);
    font-family: var(--font-mono);
    font-size: var(--text-2xs);
    letter-spacing: 0.16em;
    text-transform: uppercase;
    box-shadow: var(--shadow-sm);
}
.journey-route {
    z-index: 2;
    overflow: visible;
}
.journey-route path {
    fill: none;
    vector-effect: non-scaling-stroke;
    stroke-linecap: round;
    stroke-linejoin: round;
}
#journeyRouteBase {
    stroke: rgba(212, 167, 106, 0.18);
    stroke-width: 18;
}
#journeyRouteProgress {
    stroke: var(--color-accent-primary);
    stroke-width: 8;
    filter: drop-shadow(0 0 10px rgba(212, 167, 106, 0.18));
}
#journeyRouteDash {
    stroke: rgba(255, 232, 190, 0.9);
    stroke-width: 2.5;
    stroke-dasharray: 2 18;
    stroke-dashoffset: 0;
    opacity: 0.8;
    color: rgba(255, 232, 190, 0.9);
    marker-mid: url(#journeyArrow);
    marker-end: url(#journeyArrow);
}
.journey-roadmap {
    position: relative;
    z-index: 3;
    display: flex;
    flex-direction: column;
    gap: var(--space-6);
    width: 100%;
    min-height: 1000px;
    padding: 116px 12px 42px;
}
.journey-milestone {
    position: relative;
    width: 100%;
    min-height: 184px;
    opacity: 0;
    transition: opacity 0.7s var(--ease-out-expo), transform 0.7s var(--ease-out-expo);
}
.journey-milestone[data-side="left"] {
    transform: translateX(-42px);
}
.journey-milestone[data-side="right"] {
    transform: translateX(42px);
}
.journey-milestone.visible {
    opacity: 1;
    transform: translateX(0);
}
.journey-pin {
    position: absolute;
    top: 18px;
    left: var(--pin-x, 50%);
    transform: translateX(-50%);
    width: 34px;
    height: 48px;
    z-index: 4;
    display: flex;
    align-items: center;
    justify-content: center;
    filter: drop-shadow(0 10px 10px rgba(0, 0, 0, 0.36));
}
.journey-pin::after {
    content: '';
    position: absolute;
    bottom: -6px;
    left: 50%;
    width: 24px;
    height: 8px;
    transform: translateX(-50%);
    background: radial-gradient(ellipse at center, rgba(0, 0, 0, 0.4) 0%, transparent 72%);
    filter: blur(2px);
}
.journey-pin-body {
    position: relative;
    width: 34px;
    height: 46px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: radial-gradient(circle at 50% 28%, rgba(255, 243, 214, 0.98) 0 36%, rgba(212, 167, 106, 1) 37% 70%, rgba(142, 115, 84, 1) 71% 100%);
    clip-path: polygon(50% 100%, 18% 58%, 18% 27%, 35% 9%, 65% 9%, 82% 27%, 82% 58%);
    border: 1px solid rgba(255, 241, 211, 0.28);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.15), 0 0 0 6px rgba(212, 167, 106, 0.08);
}
.journey-pin-badge {
    position: absolute;
    top: 7px;
    left: 50%;
    transform: translateX(-50%);
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: rgba(12, 12, 18, 0.96);
    color: rgba(255, 241, 211, 0.96);
    border: 1px solid rgba(255, 241, 211, 0.28);
    font-size: var(--text-2xs);
    font-family: var(--font-mono);
    line-height: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 0 0 6px rgba(12, 12, 18, 0.45), 0 0 0 8px rgba(212, 167, 106, 0.08);
}
.journey-pin-shadow {
    position: absolute;
    inset: auto auto -9px 50%;
    width: 38px;
    height: 10px;
    transform: translateX(-50%);
    background: radial-gradient(ellipse at center, rgba(0, 0, 0, 0.45) 0%, transparent 74%);
    filter: blur(3px);
}
.journey-pin-current::before,
.journey-pin-current::after {
    content: '';
    position: absolute;
    inset: -6px;
    border-radius: 50%;
    border: 1px solid rgba(212, 167, 106, 0.35);
    animation: journeyPulse 2.6s ease-out infinite;
}
.journey-pin-current::after {
    inset: -14px;
    animation-delay: 1.1s;
}
.journey-link {
    position: absolute;
    top: 49px;
    height: 2px;
    width: var(--leader-length, clamp(56px, 8vw, 100px));
    background: linear-gradient(90deg, rgba(212, 167, 106, 0.85), rgba(212, 167, 106, 0.18));
    opacity: 0.9;
}
.journey-milestone[data-side="left"] .journey-link {
    left: calc(var(--pin-x, 50%) - 2px);
}
.journey-milestone[data-side="right"] .journey-link {
    right: calc(100% - var(--pin-x, 50%) - 2px);
    background: linear-gradient(90deg, rgba(212, 167, 106, 0.18), rgba(212, 167, 106, 0.85));
}
.journey-card {
    position: relative;
    width: min(42vw, 430px);
    padding: var(--space-5) var(--space-5) var(--space-4);
    background: linear-gradient(180deg, rgba(20, 20, 30, 0.84), rgba(14, 14, 22, 0.96));
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
    cursor: none;
}
.journey-milestone[data-side="left"] .journey-card {
    margin-left: 0;
    margin-right: auto;
    transform-origin: left center;
    margin-top: 56px;
}
.journey-milestone[data-side="right"] .journey-card {
    margin-left: auto;
    margin-right: 0;
    transform-origin: right center;
    margin-top: 56px;
}
.journey-card::before {
    content: '';
    position: absolute;
    top: 20px;
    width: clamp(36px, 6vw, 88px);
    height: 1px;
    background: rgba(212, 167, 106, 0.28);
}
.journey-milestone[data-side="left"] .journey-card::before {
    right: -68px;
}
.journey-milestone[data-side="right"] .journey-card::before {
    left: -68px;
}
.journey-card::after {
    content: '';
    position: absolute;
    top: 19px;
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--color-accent-primary);
    box-shadow: 0 0 0 8px rgba(212, 167, 106, 0.08);
}
.journey-milestone[data-side="left"] .journey-card::after {
    right: -74px;
}
.journey-milestone[data-side="right"] .journey-card::after {
    left: -74px;
}
.journey-card-head {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-bottom: 12px;
}
.journey-icon-badge {
    width: 42px;
    height: 42px;
    flex-shrink: 0;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(8, 8, 12, 0.8);
    border: 1px solid var(--milestone-ring, var(--color-accent-primary));
    box-shadow: 0 0 0 5px rgba(212, 167, 106, 0.08), inset 0 1px 0 rgba(255, 255, 255, 0.08);
    font-size: 1.1rem;
}
.journey-card-body {
    flex: 1;
}
.journey-card-year {
    display: inline-flex;
    margin-bottom: 4px;
    padding: 4px 8px;
    border-radius: var(--radius-full);
    background: rgba(212, 167, 106, 0.1);
    color: var(--color-accent-primary);
    font-family: var(--font-mono);
    font-size: var(--text-2xs);
    letter-spacing: 0.16em;
    text-transform: uppercase;
}
.journey-card-title {
    font-weight: 600;
    font-size: var(--text-md);
    color: var(--color-text-primary);
    line-height: 1.15;
}
.journey-card-desc {
    font-size: var(--text-sm);
    color: var(--color-text-muted);
    line-height: 1.55;
}

@keyframes journeyPulse {
    0% {
        transform: scale(0.72);
        opacity: 0.72;
    }
    70% {
        transform: scale(1.25);
        opacity: 0;
    }
    100% {
        transform: scale(1.25);
        opacity: 0;
    }
}

@media (max-width: 980px) {
    .journey-roadmap {
        min-height: 1180px;
    }
    .journey-card {
        width: min(48vw, 400px);
    }
}

@media (max-width: 768px) {
    #journey {
        padding: var(--space-20) var(--section-pad-x);
    }
    .journey-map-shell {
        padding: var(--space-5) var(--space-3) var(--space-4);
        border-radius: var(--radius-lg);
    }
    .journey-map-corner {
        top: 14px;
        right: 14px;
        letter-spacing: 0.18em;
    }
    .journey-progress-chip {
        top: 14px;
        left: 14px;
    }
    .journey-roadmap {
        padding-top: 84px;
        min-height: 1320px;
    }
    .journey-milestone {
        min-height: 182px;
    }
    .journey-milestone[data-side="left"],
    .journey-milestone[data-side="right"] {
        transform: translateX(0);
    }
    .journey-pin {
        left: 18px;
    }
    .journey-link,
    .journey-card::before,
    .journey-card::after {
        display: none;
    }
    .journey-card {
        width: calc(100% - 58px);
        margin-left: 58px !important;
        margin-right: 0 !important;
        margin-top: 42px !important;
    }
    .journey-card::before,
    .journey-card::after {
        display: none;
    }
    .journey-milestone[data-side="left"] .journey-card,
    .journey-milestone[data-side="right"] .journey-card {
        transform-origin: left center;
    }
    .journey-card-head {
        gap: 12px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .journey-pin-current::before,
    .journey-pin-current::after,
    .journey-map-glow,
    .journey-map-texture {
        animation: none;
    }
}

/* ============================================================
   10. SKILLS
   ============================================================ */
#skills {
    padding: var(--space-24) var(--section-pad-x);
    position: relative;
    overflow: hidden;
}
#skills::before {
    content: '';
    position: absolute;
    inset: -18%;
    background:
        radial-gradient(circle at 50% 28%, rgba(212, 167, 106, 0.12), transparent 26%),
        radial-gradient(circle at 18% 28%, rgba(212, 167, 106, 0.05), transparent 18%),
        radial-gradient(circle at 82% 72%, rgba(212, 167, 106, 0.05), transparent 16%);
    filter: blur(14px);
    opacity: 0.9;
    pointer-events: none;
    animation: skillsAura 16s ease-in-out infinite alternate;
}
#skills::after {
    content: '';
    position: absolute;
    inset: 0;
    background-image: radial-gradient(circle at 1px 1px, rgba(255, 255, 255, 0.08) 1px, transparent 0);
    background-size: 46px 46px;
    opacity: 0.08;
    pointer-events: none;
    animation: skillsDust 20s linear infinite;
}
.skills-cloud {
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    gap: var(--space-5);
    justify-content: flex-start;
    align-items: stretch;
    max-width: 1100px;
    margin: 0 auto;
    width: 100%;
}
.skill-group {
    padding: var(--space-4) var(--space-4) var(--space-5);
    border-radius: var(--radius-lg);
    background: linear-gradient(180deg, rgba(18, 18, 28, 0.58), rgba(10, 10, 16, 0.76));
    border: 1px solid var(--color-border);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    box-shadow: var(--shadow-sm);
}
.skill-group-label {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: var(--space-4);
    font-family: var(--font-mono);
    font-size: var(--text-2xs);
    letter-spacing: 0.22em;
    text-transform: uppercase;
    color: var(--color-accent-primary);
    opacity: 0.85;
}
.skill-group-label::after {
    content: '';
    height: 1px;
    flex: 1;
    background: linear-gradient(90deg, rgba(212, 167, 106, 0.6), transparent);
}
.skill-group-bubbles {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-3);
    align-items: center;
}
.skill-bubble {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 12px;
    padding: 13px 18px;
    background: linear-gradient(180deg, rgba(23, 23, 34, 0.86), rgba(14, 14, 20, 0.94));
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-full);
    cursor: pointer !important;
    transition: transform 0.38s var(--ease-spring), box-shadow 0.38s var(--ease-spring), border-color 0.38s var(--ease-spring), background 0.38s var(--ease-spring);
    font-size: var(--text-sm);
    font-weight: 500;
    color: var(--color-text-primary);
    white-space: nowrap;
    user-select: none;
    overflow: hidden;
    opacity: 0;
    transform: translateY(18px) scale(var(--bubble-scale, 1));
    will-change: transform, box-shadow;
}
.skill-bubble:hover {
    transform: translateY(-6px) scale(calc(var(--bubble-scale, 1) * 1.08));
    box-shadow: var(--shadow-md), 0 0 0 1px rgba(255, 255, 255, 0.06), 0 0 28px var(--skill-accent-soft, rgba(212, 167, 106, 0.14));
    border-color: var(--skill-accent, var(--color-accent-primary));
    background: linear-gradient(180deg, rgba(26, 26, 38, 0.94), rgba(16, 16, 24, 0.98));
}
.skill-bubble:focus-visible {
    outline: 2px solid var(--skill-accent, var(--color-accent-primary));
    outline-offset: 2px;
}
.skill-bubble.is-featured {
    box-shadow: 0 0 0 1px rgba(212, 167, 106, 0.18), var(--shadow-md);
}
.skill-bubble.is-featured::before {
    content: '';
    position: absolute;
    inset: -30%;
    background: radial-gradient(circle, var(--skill-accent-soft, rgba(212, 167, 106, 0.14)), transparent 60%);
    opacity: 0.72;
    animation: skillPulse 3.8s ease-in-out infinite;
    pointer-events: none;
}
.skill-bubble.is-popped {
    animation: skillPop 0.34s var(--ease-spring);
}
.skill-bubble-float {
    position: absolute;
    inset: 0;
    pointer-events: none;
    animation: skillFloat var(--bubble-duration, 12s) ease-in-out infinite;
    animation-delay: var(--bubble-delay, 0s);
}
.skill-bubble-inner {
    position: relative;
    z-index: 1;
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 0;
}
.skill-bubble-ripple {
    position: absolute;
    inset: 0;
    border-radius: inherit;
    opacity: 0;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.22), transparent 60%);
    pointer-events: none;
}
.skill-bubble.is-popped .skill-bubble-ripple {
    animation: skillRipple 0.34s ease-out;
}
.skill-icon {
    width: 30px;
    height: 30px;
    flex-shrink: 0;
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--skill-accent, var(--color-accent-primary));
    background: rgba(255, 255, 255, 0.06);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08), 0 0 0 1px rgba(255, 255, 255, 0.06);
}
.skill-icon svg {
    width: 17px;
    height: 17px;
    fill: currentColor;
    stroke: currentColor;
}
.skill-text {
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
}
.skill-name {
    font-size: clamp(0.86rem, 1.1vw, 0.98rem);
    font-weight: var(--skill-weight, 600);
    line-height: 1.1;
}
.skill-meta {
    font-family: var(--font-mono);
    font-size: var(--text-2xs);
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: rgba(228, 228, 234, 0.58);
}
.skill-group.reveal.visible .skill-bubble {
    opacity: 1;
    transform: translateY(0) scale(var(--bubble-scale, 1));
}
.skill-group.reveal.visible .skill-group-bubbles .skill-bubble:nth-child(1) {
    transition-delay: 0.02s;
}
.skill-group.reveal.visible .skill-group-bubbles .skill-bubble:nth-child(2) {
    transition-delay: 0.08s;
}
.skill-group.reveal.visible .skill-group-bubbles .skill-bubble:nth-child(3) {
    transition-delay: 0.14s;
}
.skill-group.reveal.visible .skill-group-bubbles .skill-bubble:nth-child(4) {
    transition-delay: 0.2s;
}
.skill-group.reveal.visible .skill-group-bubbles .skill-bubble:nth-child(5) {
    transition-delay: 0.26s;
}
.skill-group.reveal.visible .skill-group-bubbles .skill-bubble:nth-child(6) {
    transition-delay: 0.32s;
}
.skill-group.reveal.visible .skill-group-bubbles .skill-bubble:nth-child(7) {
    transition-delay: 0.38s;
}
.skill-group.reveal.visible .skill-group-bubbles .skill-bubble:nth-child(8) {
    transition-delay: 0.44s;
}

@keyframes skillFloat {
    0%,
    100% {
        transform: translateY(0) rotate(0deg);
    }
    50% {
        transform: translateY(calc(var(--float-distance, 8px) * -1)) rotate(var(--float-rotate, 0deg));
    }
}
@keyframes skillPulse {
    0%,
    100% {
        transform: scale(0.92);
        opacity: 0.35;
    }
    50% {
        transform: scale(1.04);
        opacity: 0.7;
    }
}
@keyframes skillPop {
    0% {
        transform: translateY(-2px) scale(calc(var(--bubble-scale, 1) * 1.02));
    }
    45% {
        transform: translateY(-7px) scale(calc(var(--bubble-scale, 1) * 1.12));
    }
    100% {
        transform: translateY(-6px) scale(calc(var(--bubble-scale, 1) * 1.08));
    }
}
@keyframes skillRipple {
    0% {
        opacity: 0;
        transform: scale(0.65);
    }
    35% {
        opacity: 0.35;
    }
    100% {
        opacity: 0;
        transform: scale(1.2);
    }
}
@keyframes skillsAura {
    0% {
        transform: translate3d(-1%, -1%, 0) scale(1);
    }
    100% {
        transform: translate3d(1%, 1%, 0) scale(1.02);
    }
}
@keyframes skillsDust {
    from {
        background-position: 0 0;
    }
    to {
        background-position: 46px 46px;
    }
}

/* Skill Popup */
.skill-popup {
    position: fixed;
    z-index: var(--z-modal);
    background: var(--color-bg-elevated);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-xl);
    padding: var(--space-6) var(--space-8);
    max-width: 380px;
    width: 90%;
    box-shadow: var(--shadow-xl);
    opacity: 0;
    visibility: hidden;
    transform: scale(0.85);
    transition: all var(--duration-elegant);
    pointer-events: none;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0.85);
}
.skill-popup.active {
    opacity: 1;
    visibility: visible;
    transform: translate(-50%, -50%) scale(1);
    pointer-events: all;
}
.skill-popup-close {
    position: absolute;
    top: 12px;
    right: 16px;
    background: none;
    border: none;
    color: var(--color-text-muted);
    font-size: 1.4rem;
    cursor: none;
    transition: color var(--duration-fast);
}
.skill-popup-close:hover {
    color: var(--color-text-primary);
}
.skill-popup-name {
    font-family: var(--font-display);
    font-size: var(--text-2xl);
    margin-bottom: 12px;
    color: var(--color-text-primary);
}
.skill-popup-detail {
    font-size: var(--text-sm);
    color: var(--color-text-secondary);
    margin-bottom: 6px;
    line-height: 1.5;
}
.skill-popup-detail strong {
    color: var(--color-accent-primary);
    font-weight: 500;
}
.popup-backdrop {
    position: fixed;
    inset: 0;
    z-index: calc(var(--z-modal) - 1);
    background: rgba(0, 0, 0, 0.5);
    opacity: 0;
    visibility: hidden;
    transition: all var(--duration-elegant);
}
.popup-backdrop.active {
    opacity: 1;
    visibility: visible;
}

/* ============================================================
   11. PROJECTS
   ============================================================ */
#projects {
    padding: var(--space-20) 0;
    overflow: hidden;
    position: relative;
}
#projects::before {
    content: '';
    position: absolute;
    inset: 0;
    background:
        radial-gradient(circle at 15% 20%, rgba(212, 167, 106, 0.08), transparent 18%),
        radial-gradient(circle at 85% 30%, rgba(212, 167, 106, 0.05), transparent 16%),
        radial-gradient(circle at 55% 75%, rgba(212, 167, 106, 0.05), transparent 20%);
    pointer-events: none;
    opacity: 0.8;
}
.projects-horizontal {
    position: relative;
    z-index: 1;
    display: grid;
    grid-template-columns: repeat(12, minmax(0, 1fr));
    gap: var(--space-6);
    padding: var(--space-5) var(--section-pad-x) var(--space-10);
    max-width: 1400px;
    margin: 0 auto;
}
.project-card {
    grid-column: span 6;
    background: linear-gradient(180deg, rgba(18, 18, 28, 0.84), rgba(12, 12, 18, 0.96));
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-xl);
    overflow: hidden;
    transition: transform 0.45s var(--ease-spring), box-shadow 0.45s var(--ease-spring), border-color 0.45s var(--ease-spring), filter 0.45s var(--ease-spring);
    display: flex;
    flex-direction: column;
    position: relative;
    min-height: 100%;
    box-shadow: var(--shadow-md);
    cursor: pointer !important;
    opacity: 0;
    transform: translateY(28px);
    will-change: transform, box-shadow;
}
.project-card.reveal.visible {
    opacity: 1;
    transform: translateY(0);
}
.project-card:hover {
    transform: translateY(-8px);
    border-color: var(--project-accent, var(--color-accent-primary));
    box-shadow: var(--shadow-xl), 0 0 0 1px rgba(255, 255, 255, 0.06), 0 0 0 1px rgba(212, 167, 106, 0.08) inset;
    filter: saturate(1.05);
}
.project-card::before {
    content: '';
    position: absolute;
    inset: 0;
    padding: 1px;
    border-radius: inherit;
    background: linear-gradient(135deg, rgba(212, 167, 106, 0.12), transparent 35%, rgba(212, 167, 106, 0.22));
    mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    mask-composite: exclude;
    opacity: 0;
    transition: opacity 0.45s ease;
    pointer-events: none;
}
.project-card:hover::before {
    opacity: 1;
}
.project-card-featured {
    grid-column: 1 / -1;
    min-height: 620px;
}
.project-card-tall {
    grid-column: span 6;
    min-height: 520px;
}
.project-accent-glow {
    position: absolute;
    inset: -20% auto auto -12%;
    width: 220px;
    height: 220px;
    border-radius: 50%;
    background: radial-gradient(circle, var(--project-soft, rgba(212, 167, 106, 0.14)), transparent 72%);
    filter: blur(12px);
    opacity: 0.75;
    pointer-events: none;
}
.project-number {
    position: absolute;
    top: 18px;
    left: 20px;
    z-index: 3;
    padding: 6px 10px;
    border-radius: var(--radius-full);
    background: rgba(7, 7, 10, 0.72);
    border: 1px solid var(--color-border);
    color: var(--color-text-muted);
    font-family: var(--font-mono);
    font-size: var(--text-2xs);
    letter-spacing: 0.16em;
    text-transform: uppercase;
}
.project-feature-tag {
    position: absolute;
    top: 18px;
    right: 20px;
    z-index: 3;
    padding: 6px 10px;
    border-radius: var(--radius-full);
    background: rgba(212, 167, 106, 0.12);
    border: 1px solid rgba(212, 167, 106, 0.24);
    color: var(--color-accent-primary);
    font-family: var(--font-mono);
    font-size: var(--text-2xs);
    letter-spacing: 0.16em;
    text-transform: uppercase;
}
.project-preview {
    width: 100%;
    aspect-ratio: 16 / 10;
    overflow: hidden;
    position: relative;
    background: linear-gradient(145deg, rgba(12, 12, 18, 0.95), rgba(16, 16, 24, 0.98));
}
.project-card-featured .project-preview {
    aspect-ratio: 21 / 9;
}
.project-preview img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.75s var(--ease-out-expo);
}
.project-card:hover .project-preview img {
    transform: scale(1.08);
}
.project-mockup {
    width: 100%;
    height: 100%;
    padding: var(--space-4);
    display: flex;
    flex-direction: column;
    gap: 12px;
    background: var(--project-mesh);
    color: #fff;
}
.mockup-browser {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    border-radius: var(--radius-md);
    background: rgba(8, 8, 12, 0.78);
    border: 1px solid rgba(255, 255, 255, 0.08);
}
.mockup-dots {
    display: inline-flex;
    gap: 6px;
}
.mockup-dots i {
    width: 9px;
    height: 9px;
    border-radius: 50%;
    display: block;
    background: var(--project-accent, var(--color-accent-primary));
    opacity: 0.72;
}
.mockup-address {
    flex: 1;
    font-family: var(--font-mono);
    font-size: var(--text-2xs);
    color: rgba(255, 255, 255, 0.62);
    letter-spacing: 0.12em;
    text-transform: uppercase;
}
.mockup-canvas {
    position: relative;
    flex: 1;
    overflow: hidden;
    border-radius: var(--radius-lg);
    background: linear-gradient(180deg, rgba(12, 12, 18, 0.84), rgba(18, 18, 28, 0.98));
    border: 1px solid rgba(255, 255, 255, 0.05);
}
.mockup-hero {
    position: absolute;
    inset: 0;
    background:
        radial-gradient(circle at 18% 24%, var(--project-accent, var(--color-accent-primary)), transparent 26%),
        radial-gradient(circle at 82% 26%, rgba(255, 255, 255, 0.16), transparent 20%),
        linear-gradient(145deg, rgba(255, 255, 255, 0.04), transparent 38%);
    opacity: 0.85;
}
.mockup-panel {
    position: absolute;
    border-radius: var(--radius-md);
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.05);
}
.mockup-panel-a {
    left: 14px;
    bottom: 18px;
    width: 46%;
    height: 28%;
}
.mockup-panel-b {
    right: 14px;
    top: 20px;
    width: 34%;
    height: 18%;
}
.mockup-panel-c {
    right: 14px;
    bottom: 18px;
    width: 28%;
    height: 34%;
}
.mockup-code {
    position: absolute;
    left: 14px;
    top: 54px;
    width: 52%;
    height: 34%;
    border-radius: var(--radius-md);
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.08), rgba(255, 255, 255, 0.02));
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.04);
}
.project-preview-fade {
    position: absolute;
    inset: auto 0 0;
    height: 96px;
    background: linear-gradient(180deg, transparent, rgba(12, 12, 18, 0.94));
    pointer-events: none;
}
.project-info {
    padding: var(--space-6) var(--space-6) var(--space-6);
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 10px;
}
.project-title-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}
.project-title {
    font-family: var(--font-display);
    font-size: clamp(1.5rem, 2vw, 1.9rem);
    font-weight: 500;
    color: var(--color-text-primary);
    line-height: 1.1;
}
.project-role {
    font-family: var(--font-mono);
    font-size: var(--text-2xs);
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: var(--color-accent-primary);
    opacity: 0.9;
}
.project-desc {
    font-size: var(--text-sm);
    color: var(--color-text-secondary);
    line-height: 1.65;
    max-width: 60ch;
}
.project-status {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-family: var(--font-mono);
    font-size: var(--text-2xs);
    letter-spacing: 0.16em;
    text-transform: uppercase;
    color: rgba(228, 228, 234, 0.72);
}
.project-status span,
.live-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--color-status-live);
    box-shadow: 0 0 0 0 rgba(74, 211, 122, 0.45);
    animation: livePulse 1.8s ease-in-out infinite;
}
.live-dot {
    margin-right: 2px;
}
.project-tech {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-2);
    margin-top: 6px;
}
.project-tech span {
    font-size: var(--text-2xs);
    padding: 6px 12px;
    border-radius: var(--radius-full);
    background: rgba(255, 255, 255, 0.05);
    color: rgba(228, 228, 234, 0.78);
    font-family: var(--font-mono);
    letter-spacing: 0.04em;
    border: 1px solid var(--color-border);
    opacity: 0;
    transform: translateY(8px);
    transition: transform 0.35s var(--ease-out-expo), background 0.35s ease, border-color 0.35s ease, color 0.35s ease, opacity 0.35s ease;
}
.project-card.reveal.visible .project-tech span {
    opacity: 1;
    transform: translateY(0);
}
.project-tech span:hover {
    background: rgba(212, 167, 106, 0.12);
    border-color: rgba(212, 167, 106, 0.24);
    color: #fff;
}
.project-links {
    display: flex;
    gap: 12px;
    margin-top: auto;
    padding-top: 12px;
    flex-wrap: wrap;
}
.project-btn {
    padding: 11px 18px;
    font-size: var(--text-sm);
    box-shadow: var(--shadow-sm);
}
.project-live-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}
.project-btn:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-md);
}
.project-card-featured .project-info {
    padding-top: var(--space-6);
}
.project-card-tall .project-preview {
    aspect-ratio: 16 / 11;
}
.project-card-featured .project-preview-fade {
    height: 120px;
}
.project-card:hover .project-preview {
    transform: translateY(0);
}
.project-card .project-preview {
    transition: transform 0.6s var(--ease-out-expo);
}
.project-card:hover .project-preview .project-mockup {
    transform: scale(1.06);
}
@keyframes livePulse {
    0%,
    100% {
        transform: scale(1);
        box-shadow: 0 0 0 0 rgba(74, 211, 122, 0.44);
    }
    50% {
        transform: scale(1.1);
        box-shadow: 0 0 0 8px rgba(74, 211, 122, 0);
    }
}

@media (max-width: 1100px) {
    .project-card,
    .project-card-tall {
        grid-column: span 12;
    }
    .project-card-featured {
        min-height: 560px;
    }
}

@media (max-width: 768px) {
    .projects-horizontal {
        grid-template-columns: 1fr;
        padding: var(--space-5) var(--section-pad-x) var(--space-10);
        gap: var(--space-4);
    }
    .project-card,
    .project-card-featured,
    .project-card-tall {
        grid-column: auto;
        min-height: 0;
    }
    .project-preview {
        aspect-ratio: 16 / 11;
    }
    .project-card-featured .project-preview {
        aspect-ratio: 16 / 10;
    }
    .project-title-row {
        align-items: flex-start;
        flex-direction: column;
    }
    .project-links {
        gap: 10px;
    }
    .project-btn {
        width: 100%;
        justify-content: center;
    }
}

/* ============================================================
   12. CONTACT
   ============================================================ */
#contact {
    padding: var(--space-24) var(--section-pad-x);
    min-height: auto;
}
.contact-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--space-12);
    max-width: 900px;
    width: 100%;
    align-items: start;
}
.contact-form {
    display: flex;
    flex-direction: column;
    gap: var(--space-4);
}
.contact-form input,
.contact-form textarea {
    width: 100%;
    padding: 14px 18px;
    background: var(--white-subtle);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    color: var(--color-text-primary);
    font-family: var(--font-body);
    font-size: var(--text-sm);
    resize: vertical;
    transition: all var(--duration-fast);
    outline: none;
    cursor: none;
}
.contact-form input:focus,
.contact-form textarea:focus {
    border-color: var(--color-accent-primary);
    background: var(--white-soft);
    box-shadow: 0 0 0 6px var(--color-accent-soft);
}
.contact-form textarea {
    min-height: 120px;
}
.social-icons {
    display: flex;
    gap: var(--space-4);
    flex-wrap: wrap;
    margin-top: 12px;
}
.social-icon {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: var(--white-soft);
    border: 1px solid var(--color-border);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--color-text-secondary);
    text-decoration: none;
    font-size: 1.1rem;
    transition: all var(--duration-bounce);
    cursor: none;
}
.social-icon:hover {
    transform: translateY(-6px);
    color: var(--color-accent-primary);
    border-color: var(--color-accent-primary);
    box-shadow: 0 8px 24px var(--color-accent-glow);
}
.contact-info-text {
    color: var(--color-text-secondary);
    font-size: var(--text-sm);
    line-height: 1.8;
}
.contact-info-text a {
    color: var(--color-accent-primary);
    text-decoration: none;
}

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

/* ============================================================
   13. AI ASSISTANT
   ============================================================ */
.ai-assistant {
    position: fixed;
    bottom: 28px;
    right: 28px;
    z-index: var(--z-chat);
}
.ai-orb {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: var(--color-bg-elevated);
    border: 1.5px solid var(--color-border);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.3rem;
    cursor: none;
    transition: all var(--duration-bounce);
    box-shadow: var(--shadow-md);
    position: relative;
    z-index: 2;
}
.ai-orb:hover {
    transform: scale(1.08);
    border-color: var(--color-accent-primary);
    box-shadow: 0 12px 36px var(--color-accent-glow);
}
.ai-orb-pulse {
    position: absolute;
    inset: -6px;
    border-radius: 50%;
    border: 1px solid var(--color-accent-primary);
    animation: orbPulse 2.5s ease-out infinite;
    pointer-events: none;
}
@keyframes orbPulse {
    0%,
    100% {
        transform: scale(1);
        opacity: 0.3;
    }
    50% {
        transform: scale(1.5);
        opacity: 0;
    }
}
.chat-window {
    position: absolute;
    bottom: 64px;
    right: 0;
    width: 340px;
    max-height: 440px;
    background: rgba(18, 18, 26, 0.62);
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-xl);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    opacity: 0;
    visibility: hidden;
    transform: translateY(20px) scale(0.9);
    transition: all var(--duration-elegant);
    pointer-events: none;
    box-shadow: var(--shadow-xl);
}
.chat-window.open {
    opacity: 1;
    visibility: visible;
    transform: translateY(0) scale(1);
    pointer-events: all;
}
.chat-header {
    padding: var(--space-4) var(--space-4);
    border-bottom: 1px solid var(--color-border);
    font-weight: 600;
    font-size: var(--text-sm);
    display: flex;
    align-items: center;
    justify-content: space-between;
    color: var(--color-text-primary);
}
.chat-close {
    background: none;
    border: none;
    color: var(--color-text-muted);
    font-size: 1.2rem;
    cursor: none;
    transition: color var(--duration-fast);
}
.chat-close:hover {
    color: var(--color-text-primary);
}
.chat-messages {
    flex: 1;
    padding: var(--space-4);
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 10px;
    max-height: 280px;
}
.chat-msg {
    padding: 10px 14px;
    border-radius: var(--radius-md);
    font-size: var(--text-sm);
    line-height: 1.5;
    max-width: 85%;
    animation: msgIn 0.3s ease;
}
@keyframes msgIn {
    from {
        opacity: 0;
        transform: translateY(8px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}
.chat-msg.bot {
    background: var(--white-soft);
    color: var(--color-text-primary);
    align-self: flex-start;
    border: 1px solid var(--color-border);
}
.chat-msg.user {
    background: var(--color-accent-soft);
    color: var(--color-text-primary);
    align-self: flex-end;
    border: 1px solid rgba(212, 167, 106, 0.2);
}
.chat-typing {
    font-size: var(--text-sm);
    color: var(--color-text-muted);
    padding: 6px 14px;
    font-style: italic;
    display: none;
}
.chat-typing.active {
    display: block;
    animation: msgIn 0.3s ease;
}
.chat-input-row {
    display: flex;
    border-top: 1px solid var(--color-border);
    padding: 10px;
    gap: 8px;
}
.chat-input-row input {
    flex: 1;
    padding: 10px 14px;
    background: var(--white-subtle);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-full);
    color: var(--color-text-primary);
    font-size: var(--text-sm);
    outline: none;
    cursor: none;
    font-family: var(--font-body);
}
.chat-input-row input:focus {
    border-color: var(--color-accent-primary);
}
.chat-send {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: var(--color-accent-primary);
    border: none;
    color: var(--color-text-inverse);
    cursor: none;
    font-size: 1rem;
    flex-shrink: 0;
    transition: all var(--duration-fast);
}
.chat-send:hover {
    transform: scale(1.1);
}

@media (max-width: 480px) {
    .chat-window {
        width: 280px;
        right: -10px;
    }
    .ai-assistant {
        bottom: 16px;
        right: 12px;
    }
}

/* ============================================================
   14. UTILITY – ANIMATE ON SCROLL
   ============================================================ */
.reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.8s var(--ease-out-expo), transform 0.8s var(--ease-out-expo);
}
.reveal.visible {
    opacity: 1;
    transform: translateY(0);
}
.reveal-left {
    opacity: 0;
    transform: translateX(-40px);
    transition: opacity 0.8s var(--ease-out-expo), transform 0.8s var(--ease-out-expo);
}
.reveal-left.visible {
    opacity: 1;
    transform: translateX(0);
}
.stagger-children>* {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.6s var(--ease-out-expo), transform 0.6s var(--ease-out-expo);
}
.stagger-children.visible>*:nth-child(1) {
    transition-delay: 0s;
}
.stagger-children.visible>*:nth-child(2) {
    transition-delay: 0.08s;
}
.stagger-children.visible>*:nth-child(3) {
    transition-delay: 0.16s;
}
.stagger-children.visible>*:nth-child(4) {
    transition-delay: 0.24s;
}
.stagger-children.visible>*:nth-child(5) {
    transition-delay: 0.32s;
}
.stagger-children.visible>*:nth-child(6) {
    transition-delay: 0.40s;
}
.stagger-children.visible>*:nth-child(7) {
    transition-delay: 0.48s;
}
.stagger-children.visible>*:nth-child(8) {
    transition-delay: 0.56s;
}
.stagger-children.visible>* {
    opacity: 1;
    transform: translateY(0);
}

/* Force cursor for interactive elements */
body,
* {
    cursor: none !important;
}
.skill-bubble,
.skill-bubble * {
    cursor: pointer !important;
}