/* GENERATED FILE - do not edit.
 *
 * Built by scripts/build-bundles.js from assets/css/site/
 * Edit the partials there and run: node scripts/build-bundles.js
 *
 * One file rather than eight stylesheets because nine pages load it.
 */
/* tokens */
:root {
    /* Mocha ground with an ember spot. The base is warm-neutral rather than the
       blue-black it replaced, so the accent can be warm without fighting it.
       Mocha carries the everyday surface (links, CTAs, borders); ember is the
       hint, reserved for state that means something - live, active, urgent. */
    --bg-primary: #0D0A08;
    --bg-secondary: #14100C;
    --bg-card: rgba(255, 246, 238, 0.038);
    --bg-card-hover: rgba(255, 246, 238, 0.075);
    --text-primary: #F3EBE2;
    --text-secondary: #A99584;
    --text-tertiary: #6B5D51;
    --accent: #C08457;
    --accent-secondary: #E0521F;
    --accent-tertiary: #D9A441;
    --accent-glow: rgba(224, 82, 31, 0.38);
    --border: rgba(255, 240, 228, 0.09);
    /* Ink for anything filled with the accent gradient. White was used on most of
       these controls and near-black on one, and the measurements settle it rather
       than taste: against the gold end of the gradient, #D9A441, white contrasts
       at 2.25, under the 3.0 floor for large UI text. This ink measures 8.32
       there, 5.96 on mocha and 4.81 on ember, so it clears AA on every stop. */
    --on-accent: #1a1008;
    --border-hover: rgba(224, 82, 31, 0.34);
    --gradient: linear-gradient(120deg, #D9A441 0%, #C08457 46%, #E0521F 100%);
    --gradient-subtle: linear-gradient(135deg, rgba(217, 164, 65, 0.09) 0%, rgba(192, 132, 87, 0.09) 55%, rgba(224, 82, 31, 0.10) 100%);
    /* Kept for the handful of places that call it directly. */
    --accent-warm: #E0521F;
    --gradient-warm: linear-gradient(120deg, #D9A441 0%, #E0521F 100%);
    --glass: rgba(255, 255, 255, 0.025);
    --glass-border: rgba(255, 255, 255, 0.06);
    /* motion + depth tokens for silky interactions */
    --ease-silk: cubic-bezier(0.22, 1, 0.36, 1);
    --ease-expo: cubic-bezier(0.16, 1, 0.3, 1);
    --dur-fast: 0.22s;
    --dur: 0.4s;
    --dur-slow: 0.7s;
    --shadow-card: 0 10px 40px -12px rgba(0, 0, 0, 0.55);
    --shadow-glow: 0 0 48px -10px var(--accent-glow);
    --radius: 18px;

    /* Three roles instead of one. Inter set every word on the site, which is
       why the palette change alone did not change its character. The display
       face is a system serif, so it costs no request and cannot silently fall
       back to something unintended. */
    --font-display: "Iowan Old Style", "Palatino Linotype", Palatino, "Book Antiqua", Georgia, serif;
    --font-body: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    --font-mono: ui-monospace, 'SF Mono', SFMono-Regular, Menlo, Consolas, monospace;

    /* One scale, used everywhere, instead of per-component values. */
    --t-xs: 0.72rem;
    --t-sm: 0.84rem;
    --t-base: 1rem;
    --t-lg: 1.15rem;
    --t-xl: clamp(1.5rem, 2.4vw, 1.9rem);
    --t-2xl: clamp(2rem, 4.2vw, 2.9rem);
    --t-3xl: clamp(2.4rem, 6vw, 4rem);
}

[data-theme="light"] {
    /* Warm paper rather than pure white, so the mocha accent sits on a ground of
       the same temperature. Both accents darken here to hold contrast on light. */
    --bg-primary: #FBF7F2;
    --bg-secondary: #F3ECE3;
    --bg-card: rgba(61, 40, 26, 0.028);
    --bg-card-hover: rgba(61, 40, 26, 0.06);
    --text-primary: #1B1410;
    --text-secondary: #6A5849;
    --text-tertiary: #9A8878;
    --accent: #8A5230;
    --accent-secondary: #B23A15;
    --accent-tertiary: #9A6B15;
    --accent-glow: rgba(178, 58, 21, 0.28);
    --border: rgba(61, 40, 26, 0.12);
    --border-hover: rgba(178, 58, 21, 0.32);
    --glass: rgba(61, 40, 26, 0.02);
    --glass-border: rgba(61, 40, 26, 0.06);
    --gradient: linear-gradient(120deg, #9A6B15 0%, #8A5230 46%, #B23A15 100%);
    --accent-warm: #B23A15;
    /* The light-mode gradient is darker, so the ink flips. Measured against its
       three stops, paper reads 4.39 / 5.91 / 5.61 and the dark ink 4.00 / 2.97 /
       3.13 - so near-black actually fails the 3.0 floor on the mocha stop here,
       which is a stronger reason to flip than the one first written down. */
    --on-accent: #FBF7F2;
}

/* base */
        [data-theme="light"] .gradient-bg::before {
            background:
                radial-gradient(ellipse 70% 50% at 18% 30%, rgba(217, 164, 65, 0.09) 0%, transparent 55%),
                radial-gradient(ellipse 65% 45% at 82% 18%, rgba(192, 132, 87, 0.09) 0%, transparent 55%),
                radial-gradient(ellipse 55% 60% at 60% 82%, rgba(224, 82, 31, 0.07) 0%, transparent 55%);
        }

        [data-theme="light"] .grid-pattern {
            background-image:
                linear-gradient(rgba(0, 0, 0, 0.03) 1px, transparent 1px),
                linear-gradient(90deg, rgba(0, 0, 0, 0.03) 1px, transparent 1px);
        }

        [data-theme="light"] nav.scrolled {
            background: rgba(255, 255, 255, 0.8);
        }

        [data-theme="light"] .mobile-menu {
            background: rgba(251, 247, 242, 0.98);
        }

        /* Theme Toggle */
        .theme-toggle {
            display: flex;
            align-items: center;
            justify-content: center;
            width: 40px;
            height: 40px;
            background: var(--glass);
            border: 1px solid var(--border);
            border-radius: 10px;
            color: var(--text-secondary);
            cursor: pointer;
            transition: all 0.2s;
            margin-right: 12px;
        }

        .theme-toggle:hover {
            background: var(--bg-card-hover);
            border-color: var(--border-hover);
            color: var(--text-primary);
        }

        .theme-toggle .sun { display: none; }
        .theme-toggle .moon { display: block; }

        [data-theme="light"] .theme-toggle .sun { display: block; }
        [data-theme="light"] .theme-toggle .moon { display: none; }

        * {
            margin: 0;
            padding: 0;
            box-sizing: border-box;
        }

        /* Skip to Content - Accessibility */
        .skip-link {
            position: absolute;
            top: -100%;
            left: 50%;
            transform: translateX(-50%);
            padding: 12px 24px;
            background: var(--gradient);
            color: var(--on-accent);
            text-decoration: none;
            border-radius: 8px;
            font-weight: 500;
            z-index: 1000;
            transition: top 0.3s;
        }

        .skip-link:focus {
            top: 16px;
        }

        /* Focus States - Accessibility */
        *:focus-visible {
            outline: 2px solid var(--accent);
            outline-offset: 2px;
        }

        button:focus-visible,
        a:focus-visible,
        input:focus-visible {
            outline: 2px solid var(--accent);
            outline-offset: 2px;
        }

        /* Reduce Motion - Accessibility */
        @media (prefers-reduced-motion: reduce) {
            *, *::before, *::after {
                animation-duration: 0.01ms !important;
                animation-iteration-count: 1 !important;
                transition-duration: 0.01ms !important;
                scroll-behavior: auto !important;
            }

            .gradient-bg::before {
                animation: none;
            }

            .typing-cursor {
                animation: none;
                opacity: 1;
            }
        }

        html {
            scroll-behavior: smooth;
            /* Match body so navigation never flashes the browser's default white
               between pages on this dark theme. Follows the theme via the token. */
            background: var(--bg-primary);
            /* Offset anchor targets (#skills, #experience, #services…) so their
               headings land below the fixed navbar instead of tucked underneath it. */
            scroll-padding-top: 90px;
        }

        /* Cross-document view transitions - a smooth fade between pages in
           supporting browsers (Chrome/Edge/Safari). Ignored elsewhere, so it's a
           pure progressive enhancement; the flash fix above covers every browser. */
        @view-transition { navigation: auto; }
        @media (prefers-reduced-motion: reduce) {
            @view-transition { navigation: none; }
        }

        body {
            font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
            background: var(--bg-primary);
            color: var(--text-primary);
            line-height: 1.6;
            min-height: 100vh;
            overflow-x: hidden;
            -webkit-font-smoothing: antialiased;
            -moz-osx-font-smoothing: grayscale;
        }

        /* Animated Gradient Mesh Background */
        .gradient-bg {
            position: fixed;
            inset: 0;
            z-index: -1;
            overflow: hidden;
        }

        .gradient-bg::before {
            content: '';
            position: absolute;
            top: -50%;
            left: -50%;
            width: 200%;
            height: 200%;
            background:
                radial-gradient(ellipse 70% 50% at 18% 30%, rgba(217, 164, 65, 0.13) 0%, transparent 55%),
                radial-gradient(ellipse 65% 45% at 82% 18%, rgba(192, 132, 87, 0.15) 0%, transparent 55%),
                radial-gradient(ellipse 55% 60% at 60% 82%, rgba(224, 82, 31, 0.12) 0%, transparent 55%);
            animation: gradientMove 24s ease-in-out infinite;
        }

        @keyframes gradientMove {
            0%, 100% { transform: translate(0, 0) rotate(0deg); }
            25% { transform: translate(2%, 2%) rotate(1deg); }
            50% { transform: translate(-1%, 3%) rotate(-1deg); }
            75% { transform: translate(1%, -2%) rotate(0.5deg); }
        }

        /* Grid Pattern Overlay */
        .grid-pattern {
            position: fixed;
            inset: 0;
            z-index: -1;
            background-image:
                linear-gradient(rgba(255, 255, 255, 0.02) 1px, transparent 1px),
                linear-gradient(90deg, rgba(255, 255, 255, 0.02) 1px, transparent 1px);
            background-size: 60px 60px;
            mask-image: radial-gradient(ellipse 80% 60% at 50% 30%, black 20%, transparent 70%);
        }

        .container {
            max-width: 1280px;
            margin: 0 auto;
            padding: 0 24px;
        }

        /* Navigation */

/* nav */
        /*
         * `body > nav`, not `nav`. As a bare element selector this pinned every
         * nav on the site to the top of the viewport, including ones nested in
         * content: the reader lifts an article's `<nav class="post-toc">`
         * contents strip into this document, and it landed on top of the
         * reader's own bar, overlapping Close and Open-as-a-page. The site
         * chrome this is for is always a direct child of body, verified across
         * all 13 pages that have one, and .rd-next was already demoted from a
         * nav to a div to dodge this same rule.
         */
        body > nav {
            position: fixed;
            top: 0;
            left: 0;
            right: 0;
            z-index: 100;
            padding: 20px 0;
            transition: all 0.3s ease;
        }

        nav.scrolled {
            background: rgba(3, 3, 3, 0.8);
            backdrop-filter: blur(20px);
            border-bottom: 1px solid var(--border);
        }

        .nav-content {
            display: flex;
            align-items: center;
            justify-content: space-between;
        }

        .nav-logo {
            font-weight: 700;
            font-size: 1.25rem;
            background: var(--gradient);
            -webkit-background-clip: text;
            -webkit-text-fill-color: transparent;
            background-clip: text;
        }

        .nav-links {
            display: flex;
            gap: 32px;
            list-style: none;
        }

        .nav-links a {
            color: var(--text-secondary);
            text-decoration: none;
            font-size: 0.875rem;
            font-weight: 500;
            transition: color 0.2s;
        }

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

        .nav-links a.active {
            position: relative;
        }

        .nav-links a.active::after {
            content: '';
            position: absolute;
            bottom: -4px;
            left: 0;
            right: 0;
            height: 2px;
            background: var(--gradient);
            border-radius: 1px;
        }

        .nav-cta {
            padding: 10px 20px;
            background: var(--gradient);
            color: var(--on-accent);
            text-decoration: none;
            border-radius: 8px;
            font-size: 0.875rem;
            font-weight: 500;
            transition: all 0.2s;
        }

        .nav-cta:hover {
            transform: translateY(-1px);
            box-shadow: 0 4px 20px var(--accent-glow);
        }

        /* Mobile Menu */
        /* Interior pages open straight into content, so the hero-sized 80px top padding
           left ~142px of empty space under the fixed nav. Pages with a hero keep it. */
        body:not(:has(.hero)) main > section:first-of-type,
        body:not(:has(.hero)) > section:first-of-type {
            padding-top: 28px;
        }

        /* Findings band: the landing's curiosity hooks. Each card is a real count and
           a link to the evidence, so the claim and the proof are the same object. */
        .findings-grid {
            display: grid;
            grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
            gap: 1px;
            background: var(--border);
            border: 1px solid var(--border);
            border-radius: 4px;
            overflow: hidden;
        }
        .findings-loading { padding: 28px; color: var(--text-tertiary); grid-column: 1 / -1; background: var(--bg-primary); }
        .finding-card {
            display: block;
            background: var(--bg-primary);
            padding: 22px 20px 18px;
            text-decoration: none;
            color: inherit;
            transition: background var(--dur-fast) var(--ease-silk);
        }
        .finding-card:hover { background: var(--bg-card-hover); }
        .fc-n {
            font-family: var(--font-mono);
            font-size: 2.1rem;
            font-variant-numeric: tabular-nums;
            letter-spacing: -0.03em;
            line-height: 1;
        }
        .tone-bad .fc-n { color: #d1616a; }
        .tone-warn .fc-n { color: var(--accent-tertiary); }
        .tone-good .fc-n { color: #6d9e70; }
        .fc-l {
            font-size: 0.9rem;
            font-weight: 500;
            margin-top: 8px;
            text-wrap: balance;
        }
        .fc-s {
            font-size: 0.82rem;
            color: var(--text-secondary);
            margin: 6px 0 12px;
            line-height: 1.55;
        }
        .fc-go {
            font-family: var(--font-mono);
            font-size: 0.66rem;
            letter-spacing: 0.1em;
            text-transform: uppercase;
            color: var(--accent);
        }

        .about-body {
            max-width: 68ch;
            display: flex;
            flex-direction: column;
            gap: 18px;
        }
        .about-body p {
            color: var(--text-secondary);
            font-size: 1.03rem;
            line-height: 1.75;
            margin: 0;
        }
        .about-cta {
            display: flex;
            flex-wrap: wrap;
            gap: 26px;
            margin-top: 6px !important;
        }
        .about-cta a {
            color: var(--accent);
            text-decoration: none;
            font-weight: 500;
        }
        .about-cta a:hover { color: var(--accent-secondary); }

        /* Section labels inside the menu: the list is grouped now, not a flat run. */
        .menu-group {
            font-size: 0.68rem;
            letter-spacing: 0.16em;
            text-transform: uppercase;
            color: var(--text-tertiary);
            margin: 22px 0 2px;
        }
        .menu-group:first-child { margin-top: 0; }

        /* Visible at every width now: the full navigation lives in the menu, and the
           bar keeps only the six destinations people actually came for. */
        .nav-toggle {
            display: flex;
            flex-direction: column;
            gap: 5px;
            background: none;
            border: none;
            cursor: pointer;
            padding: 8px;
            z-index: 101;
        }

        .nav-toggle span {
            width: 24px;
            height: 2px;
            background: var(--text-primary);
            transition: all 0.3s ease;
        }

        .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);
        }

        /* Was display:none until a 768px media query flipped it, so the menu could never
           open on desktop. It now renders at every width and stays hidden via
           opacity/visibility until .active, which is what the transition already used. */
        .mobile-menu {
            display: flex;
            position: fixed;
            top: 0;
            left: 0;
            right: 0;
            bottom: 0;
            background: color-mix(in srgb, var(--bg-primary) 97%, transparent);
            backdrop-filter: blur(20px);
            z-index: 99;
            flex-direction: column;
            align-items: flex-start;
            justify-content: center;
            gap: 6px;
            padding: 96px clamp(24px, 8vw, 120px) 48px;
            overflow-y: auto;
            opacity: 0;
            visibility: hidden;
            transition: all 0.3s ease;
        }

        .mobile-menu.active {
            opacity: 1;
            visibility: visible;
        }

        .mobile-menu a {
            color: var(--text-primary);
            text-decoration: none;
            font-size: 1.28rem;
            font-weight: 500;
            transition: color 0.2s;
        }

        .mobile-menu a:hover {
            color: var(--accent);
        }

        /* Hero Section */

/* hero */
        .hero {
            min-height: 100vh;
            display: flex;
            align-items: center;
            justify-content: center;
            position: relative;
            padding: 120px 0 80px;
        }

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

        .hero-badge {
            display: inline-flex;
            align-items: center;
            gap: 8px;
            padding: 8px 16px;
            background: var(--glass);
            border: 1px solid var(--glass-border);
            border-radius: 100px;
            font-size: 0.8rem;
            color: var(--text-secondary);
            margin-bottom: 32px;
            backdrop-filter: blur(10px);
        }

        .hero-badge .dot {
            width: 8px;
            height: 8px;
            background: #22c55e;
            border-radius: 50%;
            animation: pulse 2s infinite;
        }

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

        .hero-kicker {
            font-size: clamp(0.95rem, 2vw, 1.15rem);
            font-weight: 600;
            color: var(--text-secondary);
            letter-spacing: 0.01em;
            margin: 0 0 14px;
        }

        .hero h1 {
            /* Now a value-proposition sentence rather than a two-word name,
               so it reads as a headline instead of a billboard. */
            font-family: var(--font-display);
            font-size: var(--t-3xl);
            font-weight: 600;
            line-height: 1.1;
            letter-spacing: -0.018em;
            text-wrap: balance;
            margin-bottom: 24px;
            max-width: 900px;
            margin-left: auto;
            margin-right: auto;
        }

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

        .hero .tagline {
            font-size: clamp(1.25rem, 3vw, 1.5rem);
            color: var(--text-secondary);
            font-weight: 400;
            margin-bottom: 24px;
            line-height: 1.5;
        }

        /* Typing Animation */
        .typing-text {
            display: inline;
        }

        .typing-cursor {
            display: inline-block;
            width: 3px;
            height: 1.2em;
            background: var(--accent);
            margin-left: 4px;
            animation: blink 1s infinite;
            vertical-align: text-bottom;
        }

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

        .hero .bio {
            font-size: 1.1rem;
            color: var(--text-tertiary);
            max-width: 600px;
            margin: 0 auto 40px;
            line-height: 1.8;
        }

        .hero-buttons {
            display: flex;
            gap: 16px;
            justify-content: center;
            align-items: center;
            flex-wrap: wrap;
            margin-bottom: 48px;
        }

        /* Quiet tertiary action - present but visually subordinate to the two buttons. */
        .hero-textlink {
            color: var(--text-secondary);
            text-decoration: none;
            font-weight: 600;
            font-size: 0.95rem;
            transition: color 0.2s;
        }
        .hero-textlink:hover { color: var(--accent); }

        .btn {
            display: inline-flex;
            align-items: center;
            gap: 8px;
            padding: 14px 28px;
            border-radius: 12px;
            font-size: 0.95rem;
            font-weight: 500;
            text-decoration: none;
            transition: all 0.2s ease;
            cursor: pointer;
            border: none;
        }

        .btn-primary {
            background: var(--gradient);
            color: var(--on-accent);
        }

        .btn-primary:hover {
            transform: translateY(-2px);
            box-shadow: 0 8px 30px var(--accent-glow);
        }

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

        .btn-secondary:hover {
            background: var(--bg-card-hover);
            border-color: var(--border-hover);
        }

        .social-links {
            display: flex;
            gap: 12px;
            justify-content: center;
        }

        .social-links a {
            display: flex;
            align-items: center;
            justify-content: center;
            width: 44px;
            height: 44px;
            border-radius: 12px;
            background: var(--glass);
            border: 1px solid var(--border);
            color: var(--text-secondary);
            text-decoration: none;
            transition: all 0.2s ease;
            backdrop-filter: blur(10px);
        }

        .social-links a:hover {
            background: var(--bg-card-hover);
            border-color: var(--accent);
            color: var(--text-primary);
            transform: translateY(-2px);
        }

        .scroll-indicator {
            position: absolute;
            bottom: 40px;
            left: 50%;
            transform: translateX(-50%);
            display: flex;
            flex-direction: column;
            align-items: center;
            gap: 8px;
            color: var(--text-tertiary);
            font-size: 0.75rem;
            text-transform: uppercase;
            letter-spacing: 0.1em;
        }

        .scroll-indicator .mouse {
            width: 24px;
            height: 40px;
            border: 2px solid var(--border);
            border-radius: 12px;
            display: flex;
            justify-content: center;
            padding-top: 8px;
        }

        .scroll-indicator .wheel {
            width: 4px;
            height: 8px;
            background: var(--text-tertiary);
            border-radius: 2px;
            animation: scroll 2s infinite;
        }

        @keyframes scroll {
            0%, 100% { transform: translateY(0); opacity: 1; }
            50% { transform: translateY(8px); opacity: 0.3; }
        }

        /* GitNexus-inspired animations */
        @keyframes breathe {
            0%, 100% {
                border-color: var(--border);
                box-shadow: 0 0 0 rgba(99, 102, 241, 0);
            }
            50% {
                border-color: var(--accent);
                box-shadow: 0 0 20px rgba(99, 102, 241, 0.15);
            }
        }

        @keyframes slide-in {
            from { opacity: 0; transform: translateX(20px); }
            to { opacity: 1; transform: translateX(0); }
        }

        @keyframes fade-up {
            from { opacity: 0; transform: translateY(20px); }
            to { opacity: 1; transform: translateY(0); }
        }

        /* Custom scrollbar (GitNexus style) */
        ::-webkit-scrollbar {
            width: 10px;
            height: 10px;
        }

        ::-webkit-scrollbar-track {
            background: var(--bg-secondary);
        }

        ::-webkit-scrollbar-thumb {
            background: var(--text-tertiary);
            border-radius: 5px;
        }

        ::-webkit-scrollbar-thumb:hover {
            background: var(--accent);
        }

        /* Enhanced glow shadows */
        .shadow-glow {
            box-shadow: 0 0 40px rgba(99, 102, 241, 0.4);
        }

        .shadow-subtle {
            box-shadow: 0 0 20px rgba(99, 102, 241, 0.15);
        }

        /* GitHub Contribution Heatmap */
        .github-heatmap {
            padding: 60px 0;
            background: var(--bg-secondary);
        }

/* widgets */
        .heatmap-container {
            background: var(--glass);
            border: 1px solid var(--border);
            border-radius: 16px;
            padding: 32px;
            overflow-x: auto;
        }

        .heatmap-header {
            display: flex;
            justify-content: space-between;
            align-items: center;
            margin-bottom: 24px;
            flex-wrap: wrap;
            gap: 16px;
        }

        .heatmap-title {
            font-size: 1.25rem;
            font-weight: 600;
            color: var(--text-primary);
        }

        .heatmap-subtitle {
            font-size: 0.875rem;
            color: var(--text-secondary);
        }

        .heatmap-legend {
            display: flex;
            align-items: center;
            gap: 8px;
            font-size: 0.75rem;
            color: var(--text-secondary);
        }

        .heatmap-legend-squares {
            display: flex;
            gap: 3px;
        }

        .heatmap-legend-square {
            width: 12px;
            height: 12px;
            border-radius: 3px;
        }

        .heatmap-grid {
            display: flex;
            gap: 4px;
        }

        .heatmap-week {
            display: flex;
            flex-direction: column;
            gap: 4px;
        }

        .heatmap-day {
            width: 12px;
            height: 12px;
            border-radius: 3px;
            background: var(--bg-card);
            transition: transform 0.2s;
        }

        .heatmap-day:hover {
            transform: scale(1.3);
        }

        .heatmap-day[data-level="0"] { background: var(--bg-card); }
        .heatmap-day[data-level="1"] { background: rgba(99, 102, 241, 0.25); }
        .heatmap-day[data-level="2"] { background: rgba(99, 102, 241, 0.5); }
        .heatmap-day[data-level="3"] { background: rgba(99, 102, 241, 0.75); }
        .heatmap-day[data-level="4"] { background: rgba(99, 102, 241, 1); }

        .heatmap-months {
            display: flex;
            gap: 4px;
            margin-bottom: 8px;
            padding-left: 0;
        }

        .heatmap-month {
            font-size: 0.65rem;
            color: var(--text-tertiary);
            text-transform: uppercase;
            width: calc(4 * 12px + 3 * 4px);
        }

        .heatmap-loading {
            display: flex;
            align-items: center;
            justify-content: center;
            min-height: 120px;
            color: var(--text-secondary);
        }

        /* Stats Bar */
        .stats-bar {
            display: flex;
            gap: 48px;
            justify-content: center;
            flex-wrap: wrap;
            margin-top: 48px;
            padding-top: 48px;
            border-top: 1px solid var(--border);
        }

        .stat-item {
            text-align: center;
        }

        .stat-number {
            font-family: var(--font-mono);
            font-size: 2.15rem;
            font-weight: 600;
            font-variant-numeric: tabular-nums;
            letter-spacing: -0.02em;
            color: var(--accent);
            line-height: 1;
        }

        .stat-label {
            font-size: 0.85rem;
            color: var(--text-tertiary);
            margin-top: 8px;
        }

        /* Search & Filter */
        .projects-controls {
            display: flex;
            gap: 16px;
            margin-bottom: 32px;
            flex-wrap: wrap;
            align-items: center;
        }

        .search-box {
            flex: 1;
            min-width: 200px;
            max-width: 400px;
            position: relative;
        }

        .search-box input {
            width: 100%;
            padding: 14px 20px 14px 48px;
            background: var(--bg-card);
            border: 1px solid var(--border);
            border-radius: 12px;
            color: var(--text-primary);
            font-size: 0.95rem;
            font-family: inherit;
            transition: all 0.2s;
        }

        .search-box input:focus {
            outline: none;
            border-color: var(--accent);
            box-shadow: 0 0 0 3px var(--accent-glow);
        }

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

        .search-box svg {
            position: absolute;
            left: 16px;
            top: 50%;
            transform: translateY(-50%);
            color: var(--text-tertiary);
        }

        .filter-chips {
            display: flex;
            gap: 8px;
            flex-wrap: wrap;
        }

        .filter-chip {
            padding: 10px 18px;
            background: var(--bg-card);
            border: 1px solid var(--border);
            border-radius: 100px;
            color: var(--text-secondary);
            font-size: 0.85rem;
            font-weight: 500;
            cursor: pointer;
            transition: all 0.2s;
        }

        .filter-chip:hover {
            border-color: var(--border-hover);
            color: var(--text-primary);
        }

        .filter-chip.active {
            background: var(--accent);
            border-color: var(--accent);
            color: white;
        }

        /* Sort Dropdown */
        .sort-dropdown {
            position: relative;
            margin-left: auto;
        }

        .sort-btn {
            display: flex;
            align-items: center;
            gap: 8px;
            padding: 10px 16px;
            background: var(--bg-card);
            border: 1px solid var(--border);
            border-radius: 10px;
            color: var(--text-secondary);
            font-size: 0.85rem;
            font-weight: 500;
            cursor: pointer;
            transition: all 0.2s;
        }

        .sort-btn:hover {
            border-color: var(--border-hover);
            color: var(--text-primary);
        }

        .sort-menu {
            position: absolute;
            top: calc(100% + 8px);
            right: 0;
            min-width: 160px;
            background: var(--bg-secondary);
            border: 1px solid var(--border);
            border-radius: 12px;
            padding: 8px;
            opacity: 0;
            visibility: hidden;
            transform: translateY(-10px);
            transition: all 0.2s;
            z-index: 50;
        }

        .sort-menu.open {
            opacity: 1;
            visibility: visible;
            transform: translateY(0);
        }

        .sort-option {
            display: block;
            width: 100%;
            padding: 10px 12px;
            background: none;
            border: none;
            border-radius: 8px;
            color: var(--text-secondary);
            font-size: 0.85rem;
            text-align: left;
            cursor: pointer;
            transition: all 0.2s;
        }

        .sort-option:hover,
        .sort-option.active {
            background: var(--bg-card-hover);
            color: var(--text-primary);
        }

        .sort-option.active {
            color: var(--accent);
        }

        /* Experience Timeline */

/* timeline */
        .timeline-section {
            background: var(--bg-secondary);
        }

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

        .timeline::before {
            content: '';
            position: absolute;
            left: 50%;
            transform: translateX(-50%);
            width: 2px;
            height: 100%;
            background: var(--border);
        }

        .timeline-item {
            position: relative;
            width: 50%;
            padding: 0 40px 48px;
        }

        .timeline-item:nth-child(odd) {
            left: 0;
            text-align: right;
            padding-right: 60px;
        }

        .timeline-item:nth-child(even) {
            left: 50%;
            text-align: left;
            padding-left: 60px;
        }

        .timeline-item::before {
            content: '';
            position: absolute;
            top: 8px;
            width: 16px;
            height: 16px;
            background: var(--bg-primary);
            border: 3px solid var(--accent);
            border-radius: 50%;
            z-index: 1;
        }

        .timeline-item:nth-child(odd)::before {
            right: -8px;
        }

        .timeline-item:nth-child(even)::before {
            left: -8px;
        }

        .timeline-content {
            background: var(--glass);
            border: 1px solid var(--border);
            border-radius: 12px;
            padding: 24px;
            transition: all 0.3s;
        }

        .timeline-content:hover {
            border-color: var(--accent);
            transform: translateY(-4px);
        }

        .timeline-date {
            display: inline-block;
            font-size: 0.75rem;
            font-weight: 600;
            color: var(--accent);
            background: rgba(99, 102, 241, 0.1);
            padding: 4px 12px;
            border-radius: 12px;
            margin-bottom: 12px;
        }

        .timeline-title {
            font-size: 1.125rem;
            font-weight: 600;
            color: var(--text-primary);
            margin-bottom: 4px;
        }

        .timeline-company {
            font-size: 0.875rem;
            color: var(--text-secondary);
            margin-bottom: 12px;
        }

        .timeline-description {
            font-size: 0.875rem;
            color: var(--text-tertiary);
            line-height: 1.6;
        }

        .timeline-tags {
            display: flex;
            flex-wrap: wrap;
            gap: 8px;
            margin-top: 16px;
            justify-content: flex-end;
        }

        .timeline-item:nth-child(even) .timeline-tags {
            justify-content: flex-start;
        }

        .timeline-tag {
            font-size: 0.7rem;
            padding: 3px 10px;
            background: var(--bg-card);
            border: 1px solid var(--border);
            border-radius: 10px;
            color: var(--text-secondary);
        }

        @media (max-width: 768px) {
            .timeline::before {
                left: 20px;
            }

            .timeline-item {
                width: 100%;
                padding: 0 0 32px 50px;
                text-align: left;
            }

            .timeline-item:nth-child(odd),
            .timeline-item:nth-child(even) {
                left: 0;
                padding: 0 0 32px 50px;
                text-align: left;
            }

            .timeline-item::before,
            .timeline-item:nth-child(odd)::before,
            .timeline-item:nth-child(even)::before {
                left: 12px;
            }

            .timeline-tags,
            .timeline-item:nth-child(even) .timeline-tags {
                justify-content: flex-start;
            }
        }

        /* Featured Projects */
        .featured-section {
            margin-bottom: 48px;
        }

        .featured-header {
            display: flex;
            align-items: center;
            gap: 12px;
            margin-bottom: 24px;
        }

        .featured-header h3 {
            font-size: 1.1rem;
            font-weight: 600;
            color: var(--text-primary);
        }

        .featured-badge {
            padding: 4px 10px;
            background: var(--gradient);
            border-radius: 100px;
            font-size: 0.7rem;
            font-weight: 600;
            text-transform: uppercase;
            letter-spacing: 0.05em;
        }

        .featured-grid {
            display: grid;
            grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
            gap: 20px;
        }

        .featured-card {
            position: relative;
        }

        .featured-card::before {
            content: '';
            position: absolute;
            inset: -2px;
        }

        /* View Toggle */
        .view-toggle {
            display: flex;
            gap: 4px;
            padding: 4px;
            background: var(--bg-card);
            border: 1px solid var(--border);
            border-radius: 10px;
        }

        .view-btn {
            display: flex;
            align-items: center;
            justify-content: center;
            width: 36px;
            height: 36px;
            background: none;
            border: none;
            border-radius: 8px;
            color: var(--text-tertiary);
            cursor: pointer;
            transition: all 0.2s;
        }

        .view-btn:hover {
            color: var(--text-secondary);
        }

        .view-btn.active {
            background: var(--accent);
            color: white;
        }

        /* List View */
        .projects-grid.list-view {
            display: flex;
            flex-direction: column;
            gap: 16px;
        }

        .projects-grid.list-view .project-card {
            display: grid;
            grid-template-columns: 200px 1fr;
            border-radius: 16px;
        }

        .projects-grid.list-view .project-card .image-wrap {
            aspect-ratio: 4/3;
            border-radius: 16px 0 0 16px;
        }

        .projects-grid.list-view .project-card .content {
            display: flex;
            flex-direction: column;
            justify-content: center;
        }

        .projects-grid.list-view .project-card .summary {
            -webkit-line-clamp: 2;
        }

        /* Image Loading Effect */
        .project-card .image {
            background: linear-gradient(135deg, var(--bg-card) 0%, var(--bg-card-hover) 100%);
            opacity: 0;
            transition: opacity 0.5s ease;
        }

        .project-card .image.loaded {
            opacity: 1;
        }

        .project-card .image-placeholder {
            position: absolute;
            inset: 0;
            background: linear-gradient(90deg, var(--bg-card) 25%, var(--bg-card-hover) 50%, var(--bg-card) 75%);
            background-size: 200% 100%;
            animation: shimmer 1.5s infinite;
        }

        .project-card .image.loaded + .image-placeholder {
            opacity: 0;
        }

        /* Tooltip */
        [data-tooltip] {
            position: relative;
        }

        [data-tooltip]::after {
            content: attr(data-tooltip);
            position: absolute;
            bottom: calc(100% + 8px);
            left: 50%;
            transform: translateX(-50%) translateY(4px);
            padding: 8px 12px;
            background: var(--bg-secondary);
            border: 1px solid var(--border);
            border-radius: 8px;
            font-size: 0.8rem;
            color: var(--text-primary);
            white-space: nowrap;
            opacity: 0;
            visibility: hidden;
            transition: all 0.2s;
            pointer-events: none;
            z-index: 100;
        }

        [data-tooltip]:hover::after {
            opacity: 1;
            visibility: visible;
            transform: translateX(-50%) translateY(0);
        }
            background: var(--gradient);
            border-radius: 22px;
            z-index: -1;
            opacity: 0.5;
        }

        /* Back to Top */
        .back-to-top {
            position: fixed;
            bottom: 32px;
            right: 32px;
            width: 48px;
            height: 48px;
            background: var(--gradient);
            border: none;
            border-radius: 50%;
            color: var(--on-accent);
            cursor: pointer;
            display: flex;
            align-items: center;
            justify-content: center;
            opacity: 0;
            visibility: hidden;
            transform: translateY(20px);
            transition: all 0.3s ease;
            z-index: 50;
            box-shadow: 0 4px 20px var(--accent-glow);
        }

        /* The arrow drew with the UA default black rather than the button's ink. */
        .back-to-top svg { stroke: currentColor; }

        .back-to-top.visible {
            opacity: 1;
            visibility: visible;
            transform: translateY(0);
        }

        .back-to-top:hover {
            transform: translateY(-4px);
            box-shadow: 0 8px 30px var(--accent-glow);
        }

        /* Skeleton Loading */
        .skeleton-card {
            background: var(--bg-card);
            border: 1px solid var(--border);
            border-radius: 20px;
            overflow: hidden;
        }

        .skeleton-image {
            aspect-ratio: 16/9;
            background: linear-gradient(90deg, var(--bg-card) 25%, var(--bg-card-hover) 50%, var(--bg-card) 75%);
            background-size: 200% 100%;
            animation: shimmer 1.5s infinite;
        }

        .skeleton-content {
            padding: 24px;
        }

        .skeleton-line {
            height: 16px;
            background: linear-gradient(90deg, var(--bg-card) 25%, var(--bg-card-hover) 50%, var(--bg-card) 75%);
            background-size: 200% 100%;
            animation: shimmer 1.5s infinite;
            border-radius: 8px;
            margin-bottom: 12px;
        }

        .skeleton-line.short { width: 60%; }
        .skeleton-line.medium { width: 80%; }
        .skeleton-line.long { width: 100%; }

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

        /* Section Styles */
        section {

/* cards */
            padding: 80px 0;
            position: relative;
        }

        .section-header {
            text-align: center;
            margin-bottom: 48px;
        }

        /* Left-aligned with a hairline rule, rather than three centred lines stacked in
           the middle of the page. The eyebrow sits on the rule as a caption would. */
        .section-header {
            text-align: left;
            border-top: 1px solid var(--border);
            padding-top: 18px;
        }

        .section-label {
            display: inline-block;
            font-family: var(--font-mono);
            font-size: var(--t-xs);
            font-weight: 500;
            text-transform: uppercase;
            letter-spacing: 0.16em;
            color: var(--accent-warm);
            margin-bottom: 10px;
        }

        .section-title {
            font-family: var(--font-display);
            font-size: var(--t-2xl);
            font-weight: 600;
            letter-spacing: -0.012em;
            line-height: 1.14;
            text-wrap: balance;
            margin-bottom: 12px;
        }

        .section-subtitle {
            font-size: var(--t-lg);
            color: var(--text-secondary);
            max-width: 62ch;
            margin: 0;
        }

        /* Bento Grid - Skills */
        .bento-grid {
            display: grid;
            grid-template-columns: repeat(3, 1fr);
            gap: 16px;
        }

        .bento-card {
            background: var(--bg-card);
            border: 1px solid var(--border);
            border-radius: 20px;
            padding: 28px;
            min-height: 160px;
            display: flex;
            flex-direction: column;
            justify-content: space-between;
            transition: all 0.3s ease;
            position: relative;
            overflow: hidden;
        }

        .bento-card::before {
            content: '';
            position: absolute;
            inset: 0;
            background: var(--gradient-subtle);
            opacity: 0;
            transition: opacity 0.3s;
        }

        .bento-card:hover {
            border-color: var(--border-hover);
            transform: translateY(-4px);
            box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
        }

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

        .bento-card .icon {
            width: 40px;
            height: 40px;
            display: flex;
            align-items: center;
            justify-content: center;
            background: var(--gradient-subtle);
            border-radius: 10px;
            margin-bottom: 16px;
            position: relative;
            z-index: 1;
        }

        .bento-card .icon svg {
            width: 20px;
            height: 20px;
            stroke: var(--accent);
        }

        .bento-card .info {
            position: relative;
            z-index: 1;
        }

        .bento-card h3 {
            font-size: 1.1rem;
            font-weight: 600;
            margin-bottom: 6px;
            color: var(--text-primary);
        }

        .bento-card p {
            font-size: 0.85rem;
            color: var(--text-secondary);
            line-height: 1.5;
        }

        /* Glass Cards */
        .glass-card {
            background: var(--bg-card);
            border: 1px solid var(--border);
            border-radius: 24px;
            padding: 32px;
            backdrop-filter: blur(20px);
            transition: all 0.3s ease;
        }

        .glass-card:hover {
            border-color: var(--border-hover);
            transform: translateY(-4px);
            box-shadow: 0 20px 40px rgba(0, 0, 0, 0.2);
        }

        /* Projects Feed */
        .projects-section {
            background: linear-gradient(180deg, var(--bg-primary) 0%, var(--bg-secondary) 100%);
        }

        .projects-grid {
            display: grid;
            grid-template-columns: repeat(auto-fill, minmax(360px, 1fr));
            gap: 20px;
        }

        .project-card {
            background: var(--bg-card);
            border: 1px solid var(--border);
            border-radius: 20px;
            overflow: hidden;
            transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
            position: relative;
        }

        .project-card:hover {
            border-color: var(--border-hover);
            transform: translateY(-8px);
            box-shadow:
                0 20px 40px rgba(0, 0, 0, 0.3),
                0 0 0 1px var(--border-hover);
        }

        .project-card .image-wrap {
            position: relative;
            overflow: hidden;
            aspect-ratio: 16/9;
        }

        .project-card .image {
            width: 100%;
            height: 100%;
            object-fit: cover;
            transition: transform 0.5s cubic-bezier(0.4, 0, 0.2, 1);
        }

        .project-card:hover .image {
            transform: scale(1.08);
        }

        .project-card .image-overlay {
            position: absolute;
            inset: 0;
            background: linear-gradient(180deg, transparent 40%, rgba(0,0,0,0.9) 100%);
        }

        .project-card .type-badge {
            position: absolute;
            top: 16px;
            left: 16px;
            padding: 6px 12px;
            border-radius: 8px;
            font-size: 0.7rem;
            font-weight: 600;
            text-transform: uppercase;
            letter-spacing: 0.05em;
            backdrop-filter: blur(10px);
        }

        .project-card .type-badge.original {
            background: rgba(34, 197, 94, 0.2);
            color: #4ade80;
            border: 1px solid rgba(34, 197, 94, 0.3);
        }

        .project-card .type-badge.fork {
            background: rgba(139, 92, 246, 0.2);
            color: #a78bfa;
            border: 1px solid rgba(139, 92, 246, 0.3);
        }

        .project-card .content {
            padding: 24px;
        }

        .project-card .meta {
            display: flex;
            align-items: center;
            gap: 16px;
            margin-bottom: 12px;
            font-size: 0.8rem;
            color: var(--text-tertiary);
        }

        .project-card .meta-item {
            display: flex;
            align-items: center;
            gap: 6px;
        }

        .project-card h3 {
            font-size: 1.25rem;
            font-weight: 600;
            margin-bottom: 12px;
            line-height: 1.3;
        }

        .project-card h3 a {
            color: var(--text-primary);
            text-decoration: none;
            transition: color 0.2s;
        }

        .project-card h3 a:hover {
            color: var(--accent);
        }

        .project-card .summary {
            color: var(--text-secondary);
            font-size: 0.95rem;
            line-height: 1.7;
            margin-bottom: 16px;
        }

        .project-card .summary.collapsed {
            display: -webkit-box;
            -webkit-line-clamp: 4;
            -webkit-box-orient: vertical;
            overflow: hidden;
        }

        /* Markdown styling in summaries */
        .summary .md-heading {
            font-size: 1rem;
            font-weight: 600;
            color: var(--text-primary);
            margin: 16px 0 8px 0;
        }

        .summary .md-heading:first-child {
            margin-top: 0;
        }

        .summary .md-subheading {
            font-size: 0.9rem;
            font-weight: 600;
            color: var(--text-primary);
            margin: 12px 0 6px 0;
        }

        .summary .md-para {
            margin: 0 0 12px 0;
        }

        .summary .md-para:last-child {
            margin-bottom: 0;
        }

        .summary .md-inline {
            background: var(--bg-card);
            padding: 2px 6px;
            border-radius: 4px;
            font-family: 'SF Mono', Monaco, 'Courier New', monospace;
            font-size: 0.85em;
            color: var(--accent);
        }

        .summary .md-code {
            background: var(--bg-secondary);
            border: 1px solid var(--border);
            border-radius: 8px;
            padding: 12px 16px;
            margin: 12px 0;
            overflow-x: auto;
            font-family: 'SF Mono', Monaco, 'Courier New', monospace;
            font-size: 0.85rem;
            line-height: 1.5;
        }

        .summary .md-code code {
            background: none;
            padding: 0;
        }

        .summary strong {
            color: var(--text-primary);
            font-weight: 600;
        }

        .project-card .read-toggle {
            color: var(--accent);
            font-size: 0.85rem;
            font-weight: 500;
            cursor: pointer;
            display: inline-flex;
            align-items: center;
            gap: 6px;
            margin-bottom: 16px;
            background: none;
            border: none;
            padding: 0;
            transition: gap 0.2s;
        }

        .project-card .read-toggle:hover {
            gap: 10px;
        }

        .project-card .footer {
            display: flex;
            align-items: center;
            justify-content: space-between;
            padding-top: 16px;
            border-top: 1px solid var(--border);
        }

        .project-card .tech {
            display: flex;
            align-items: center;
            gap: 12px;
        }

        .project-card .language {
            display: flex;
            align-items: center;
            gap: 6px;
            font-size: 0.8rem;
            color: var(--text-secondary);
        }

        .project-card .lang-dot {
            width: 10px;
            height: 10px;
            border-radius: 50%;
        }

        .project-card .stars {
            display: flex;
            align-items: center;
            gap: 4px;
            font-size: 0.8rem;
            color: var(--text-secondary);
        }

        .project-card .view-btn {
            display: inline-flex;
            align-items: center;
            gap: 6px;
            padding: 8px 16px;
            background: var(--glass);
            border: 1px solid var(--border);
            border-radius: 8px;
            color: var(--text-primary);
            font-size: 0.8rem;
            font-weight: 500;
            text-decoration: none;
            transition: all 0.2s;
        }

        .project-card .view-btn:hover {
            background: var(--accent);
            border-color: var(--accent);
        }

        .projects-loading {
            grid-column: 1 / -1;

/* services */
            text-align: center;
            padding: 80px 40px;
            color: var(--text-secondary);
        }

        .loader {
            width: 40px;
            height: 40px;
            border: 3px solid var(--border);
            border-top-color: var(--accent);
            border-radius: 50%;
            animation: spin 1s linear infinite;
            margin: 0 auto 16px;
        }

        @keyframes spin {
            to { transform: rotate(360deg); }
        }

        .last-updated {
            text-align: center;
            margin-top: 48px;
            color: var(--text-tertiary);
            font-size: 0.8rem;
        }

        /* Pagination */
        .pagination {
            display: flex;
            align-items: center;
            justify-content: center;
            gap: 16px;
            margin-top: 48px;
        }

        .pagination-btn {
            display: inline-flex;
            align-items: center;
            gap: 8px;
            padding: 12px 24px;
            background: var(--bg-card);
            border: 1px solid var(--border);
            border-radius: 12px;
            color: var(--text-primary);
            font-size: 0.9rem;
            font-weight: 500;
            cursor: pointer;
            transition: all 0.2s ease;
        }

        .pagination-btn:hover:not(:disabled) {
            background: var(--bg-card-hover);
            border-color: var(--accent);
            transform: translateY(-2px);
        }

        .pagination-btn:disabled {
            opacity: 0.4;
            cursor: not-allowed;
        }

        .pagination-info {
            display: flex;
            flex-direction: column;
            align-items: center;
            gap: 4px;
            min-width: 120px;
        }

        .pagination-current {
            font-size: 1.1rem;
            font-weight: 600;
            color: var(--text-primary);
        }

        .pagination-total {
            font-size: 0.8rem;
            color: var(--text-tertiary);
        }

        /* Services Grid */
        .services-grid {
            display: grid;
            grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
            gap: 20px;
        }

        .service-card {
            background: var(--bg-card);
            border: 1px solid var(--border);
            border-radius: 24px;
            padding: 40px;
            position: relative;
            overflow: hidden;
            transition: all 0.3s ease;
        }

        .service-card::before {
            content: '';
            position: absolute;
            top: 0;
            left: 0;
            right: 0;
            height: 4px;
            background: var(--gradient);
            transform: scaleX(0);
            transition: transform 0.3s;
        }

        .service-card:hover {
            border-color: var(--border-hover);
            transform: translateY(-4px);
        }

        .service-card:hover::before {
            transform: scaleX(1);
        }

        .service-card.featured {
            border-color: var(--accent);
            background: linear-gradient(135deg, rgba(99, 102, 241, 0.05) 0%, rgba(139, 92, 246, 0.05) 100%);
        }

        .service-card.featured::before {
            transform: scaleX(1);
        }

        .service-card .popular-badge {
            position: absolute;
            top: 24px;
            right: 24px;
            padding: 6px 12px;
            background: var(--gradient-warm);
            color: #1a1206;
            border-radius: 100px;
            font-size: 0.7rem;
            font-weight: 700;
            text-transform: uppercase;
            letter-spacing: 0.05em;
        }

        .service-card h3 {
            font-size: 1.25rem;
            font-weight: 600;
            margin-bottom: 8px;
        }

        .service-card .price {
            font-size: 3rem;
            font-weight: 700;
            background: var(--gradient);
            -webkit-background-clip: text;
            -webkit-text-fill-color: transparent;
            background-clip: text;
            margin-bottom: 8px;
        }

        .service-card .price span {
            font-size: 1rem;
            font-weight: 400;
            -webkit-text-fill-color: var(--text-secondary);
        }

        .service-card .description {
            color: var(--text-secondary);
            margin-bottom: 24px;
        }

        .service-card ul {
            list-style: none;
            margin-bottom: 32px;
        }

        .service-card li {
            display: flex;
            align-items: center;
            gap: 12px;
            padding: 10px 0;
            color: var(--text-secondary);
            font-size: 0.95rem;
        }

        .service-card li svg {
            color: var(--accent);
            flex-shrink: 0;
        }

        .service-card .cta {
            display: block;
            width: 100%;
            padding: 16px;
            background: var(--glass);
            border: 1px solid var(--border);
            border-radius: 12px;
            color: var(--text-primary);
            font-size: 0.95rem;
            font-weight: 500;
            text-align: center;
            text-decoration: none;
            transition: all 0.2s;
        }

        .service-card .cta:hover {
            background: var(--accent);
            border-color: var(--accent);
        }

        .service-card.featured .cta {
            /* Filled with the gradient and inheriting the page's near-white ink,
               which contrasts at about 2.2 against the gold end of it. */
            color: var(--on-accent);
            background: var(--gradient);
            border: none;
        }

        /* Opportunities */
        .opp-grid {
            display: grid;
            grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
            gap: 24px;
        }

        .opp-card {
            background: var(--bg-card);
            border: 1px solid var(--border);
            border-radius: 20px;
            padding: 32px;
            text-align: center;
            transition: all 0.3s ease;
        }

        .opp-card:hover {
            border-color: var(--border-hover);
            transform: translateY(-4px);
        }

        .opp-card .icon-wrap {
            width: 56px;
            height: 56px;
            margin: 0 auto 20px;
            background: var(--gradient-subtle);
            border-radius: 16px;
            display: flex;
            align-items: center;
            justify-content: center;
        }

        .opp-card h3 {
            font-size: 1.1rem;
            font-weight: 600;
            margin-bottom: 12px;
        }

        .opp-card p {
            color: var(--text-secondary);
            font-size: 0.95rem;
            margin-bottom: 20px;
        }

        .tags {
            display: flex;
            flex-wrap: wrap;
            gap: 8px;
            justify-content: center;
        }

        .tag {
            padding: 8px 14px;
            background: var(--glass);
            border: 1px solid var(--border);
            border-radius: 100px;
            font-size: 0.8rem;
            color: var(--text-secondary);
            transition: all 0.2s;
        }

        .tag:hover {
            border-color: var(--accent);
            color: var(--accent);
        }

        /* Contact */
        .contact-section {
            text-align: center;
        }

        .contact-grid {
            display: flex;
            gap: 16px;
            justify-content: center;
            flex-wrap: wrap;
        }

        .contact-btn {
            display: inline-flex;
            align-items: center;
            gap: 10px;
            padding: 16px 28px;
            background: var(--bg-card);
            border: 1px solid var(--border);
            border-radius: 12px;
            color: var(--text-primary);
            font-size: 0.95rem;
            font-weight: 500;
            text-decoration: none;
            transition: all 0.2s;
        }

        .contact-btn:hover {
            border-color: var(--accent);
            background: var(--bg-card-hover);
            transform: translateY(-2px);
        }

        .contact-btn svg {
            color: var(--text-secondary);
            transition: color 0.2s;
        }

        .contact-btn:hover svg {
            color: var(--accent);
        }

        /* Contact Form */
        .contact-wrapper {
            display: grid;
            grid-template-columns: 1fr 1fr;
            gap: 48px;
            text-align: left;
            max-width: 900px;
            margin: 0 auto;
        }

        .contact-info h3 {
            font-size: 1.25rem;
            font-weight: 600;
            color: var(--text-primary);
            margin-bottom: 16px;
        }

        .contact-info p {
            color: var(--text-secondary);
            margin-bottom: 24px;
            line-height: 1.7;
        }

        .contact-form {
            background: var(--glass);
            border: 1px solid var(--border);
            border-radius: 16px;
            padding: 32px;
        }

        .form-group {
            margin-bottom: 20px;
        }

        .form-group label {
            display: block;
            font-size: 0.875rem;
            font-weight: 500;
            color: var(--text-primary);
            margin-bottom: 8px;
        }

        .form-group input,
        .form-group textarea {
            width: 100%;
            padding: 12px 16px;
            background: var(--bg-primary);
            border: 1px solid var(--border);
            border-radius: 10px;
            color: var(--text-primary);
            font-family: inherit;
            font-size: 0.95rem;
            transition: all 0.2s;
        }

        .form-group input:focus,
        .form-group textarea:focus {
            outline: none;
            border-color: var(--accent);
            box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
        }

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

        .form-submit {
            width: 100%;
            padding: 14px 24px;
            background: var(--gradient);
            border: none;
            border-radius: 10px;
            color: var(--on-accent);
            font-size: 1rem;
            font-weight: 600;
            cursor: pointer;
            transition: all 0.2s;
        }

        .form-submit:hover {
            transform: translateY(-2px);
            box-shadow: 0 8px 20px rgba(99, 102, 241, 0.3);
        }

        .form-submit:disabled {
            opacity: 0.7;
            cursor: not-allowed;
            transform: none;
        }

        .form-status {
            margin-top: 16px;
            padding: 12px;
            border-radius: 8px;
            font-size: 0.875rem;
            display: none;
        }

        .form-status.success {
            display: block;
            background: rgba(34, 197, 94, 0.1);
            color: #22c55e;
            border: 1px solid rgba(34, 197, 94, 0.2);
        }

        .form-status.error {
            display: block;
            background: rgba(239, 68, 68, 0.1);
            color: #ef4444;
            border: 1px solid rgba(239, 68, 68, 0.2);
        }

        @media (max-width: 768px) {

/* polish */
            .contact-wrapper {
                grid-template-columns: 1fr;
                gap: 32px;
            }

            .contact-grid {
                flex-direction: column;
                align-items: stretch;
            }

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

        /* Footer */
        footer {
            padding: 40px 0;
            text-align: center;
            color: var(--text-tertiary);
            font-size: 0.85rem;
            border-top: 1px solid var(--border);
        }

        footer a {
            color: var(--text-secondary);
            text-decoration: none;
        }

        footer a:hover {
            color: var(--accent);
        }

        /* Reveal Animation */
        .reveal {
            opacity: 0;
            transform: translateY(30px);
            /* Scoped to the two properties the reveal actually animates. With `all`,
               switching theme dragged every section's text and border colour through a
               0.8s crossfade, and put colour on the compositor's critical path. */
            transition: opacity 0.8s cubic-bezier(0.4, 0, 0.2, 1),
                        transform 0.8s cubic-bezier(0.4, 0, 0.2, 1);
        }

        .reveal.visible {
            opacity: 1;
            transform: translateY(0);
        }

        /* Responsive */
        @media (max-width: 1024px) {
            .bento-grid {
                grid-template-columns: repeat(2, 1fr);
            }
        }

        @media (max-width: 768px) {
            .nav-links { display: none; }
            .nav-toggle { display: flex; }
            .mobile-menu { display: flex; }
            .nav-cta { display: none; }

            section { padding: 60px 0; }

            .hero { padding: 80px 0 40px; }

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

            .bento-card {
                min-height: auto;
                padding: 24px;
            }

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

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

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

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

            .stats-bar {
                gap: 24px;
            }

            .stat-number {
                font-size: 2rem;
            }

            .projects-controls {
                flex-direction: column;
                align-items: stretch;
            }

            .search-box {
                max-width: none;
            }

            .filter-chips {
                justify-content: center;
            }

            .back-to-top {
                bottom: 20px;
                right: 20px;
                width: 44px;
                height: 44px;
            }

            .pagination {
                flex-wrap: wrap;
                gap: 12px;
            }

            .pagination-btn {
                padding: 10px 16px;
                font-size: 0.85rem;
            }
        }

/* ============================================================
   SILKY POLISH LAYER  (appended - premium micro-interactions)
   Additive only: overrides transitions/hover feel, respects
   prefers-reduced-motion, and never hides content.
   ============================================================ */
@media (prefers-reduced-motion: no-preference) {
    html { scroll-behavior: smooth; }

    /* Unified silky easing on interactive surfaces */
    .btn, .bento-card, .service-card, .timeline-content,
    .project-card, .nav-link, .timeline-tag, .theme-toggle,
    .cta, .hero-buttons a {
        transition: transform var(--dur) var(--ease-silk),
                    box-shadow var(--dur) var(--ease-silk),
                    border-color var(--dur) var(--ease-silk),
                    background var(--dur) var(--ease-silk),
                    color var(--dur-fast) var(--ease-silk) !important;
        will-change: transform;
    }

    /* Cards: lift + aurora glow + brightening border */
    .bento-card:hover, .service-card:hover, .project-card:hover {
        transform: translateY(-6px);
        box-shadow: var(--shadow-card), var(--shadow-glow);
        border-color: var(--border-hover);
    }
    .timeline-content:hover { transform: translateX(4px); }

    /* Buttons: gentle rise + glow */
    .btn-primary:hover, .cta:hover {
        transform: translateY(-3px);
        box-shadow: var(--shadow-glow);
    }
    .btn-secondary:hover { transform: translateY(-3px); }

    /* Tags: springy pop */
    .timeline-tag:hover { transform: translateY(-2px) scale(1.04); }
}

/* Animated aurora gradient text (used on .gradient-text) */
.gradient-text {
    background: var(--gradient);
    background-size: 220% 220%;
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    animation: auroraText 8s var(--ease-silk) infinite;
}
@media (prefers-reduced-motion: no-preference) {
    @keyframes auroraText {
        0%, 100% { background-position: 0% 50%; }
        50%      { background-position: 100% 50%; }
    }
}

/* Glassmorphism on nav + cards */
nav.scrolled {
    backdrop-filter: blur(18px) saturate(160%);
    -webkit-backdrop-filter: blur(18px) saturate(160%);
    border-bottom: 1px solid var(--glass-border);
}
.bento-card, .service-card, .project-card {
    backdrop-filter: blur(8px) saturate(120%);
    -webkit-backdrop-filter: blur(8px) saturate(120%);
}

/* Featured service card gets an aurora edge */
.service-card.featured {
    border: 1px solid transparent;
    background:
        linear-gradient(var(--bg-secondary), var(--bg-secondary)) padding-box,
        var(--gradient) border-box;
}

/* Premium scrollbar */
::-webkit-scrollbar { width: 11px; height: 11px; }
::-webkit-scrollbar-track { background: var(--bg-secondary); }
::-webkit-scrollbar-thumb {
    background: linear-gradient(var(--accent), var(--accent-secondary));
    border-radius: 20px;
    border: 3px solid var(--bg-secondary);
}
::-webkit-scrollbar-thumb:hover { background: linear-gradient(var(--accent-tertiary), var(--accent)); }
* { scrollbar-color: var(--accent) var(--bg-secondary); scrollbar-width: thin; }

/* Accessible, on-brand focus ring */
a:focus-visible, button:focus-visible, .btn:focus-visible, .cta:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 3px;
    border-radius: 8px;
}

/* Text selection */
::selection { background: rgba(224, 82, 31, 0.35); color: #fff; }

        /* Deep-link notice: says what was filtered and how to leave. */
        .flag-notice {
            display: flex; flex-wrap: wrap; align-items: center; gap: 14px;
            border: 1px solid var(--border-hover); border-radius: 4px;
            background: var(--bg-card); padding: 12px 16px; margin-bottom: 22px;
            font-size: 0.9rem; color: var(--text-secondary);
        }
        .flag-notice strong { color: var(--text-primary); }
        .flag-notice a {
            font-family: var(--font-mono); font-size: 0.68rem; letter-spacing: 0.1em;
            text-transform: uppercase; color: var(--accent); text-decoration: none; margin-left: auto;
        }
        .flag-notice a:hover { color: var(--accent-secondary); }

        /* Live hero map: the semantic layout drawn behind the thesis. */
        #hero-map {
            position: absolute; inset: 0; width: 100%; height: 100%;
            z-index: 0; opacity: 0.62; pointer-events: none;
        }
        .hero .container { position: relative; z-index: 1; }
        .hero-map-cta {
            /* An anchor with no colour of its own inherits the browser's link blue.
               Nothing renders in it here because every word sits in a child span,
               but a bare word added later would arrive bright blue on a mocha page. */
            color: var(--text-secondary);
            position: absolute; right: 26px; bottom: 26px; z-index: 2;
            display: flex; flex-direction: column; gap: 3px; text-decoration: none;
            padding: 10px 14px; border: 1px solid var(--border); border-radius: 4px;
            background: color-mix(in srgb, var(--bg-primary) 72%, transparent);
            backdrop-filter: blur(8px);
            transition: border-color var(--dur-fast) var(--ease-silk);
        }
        .hero-map-cta:hover { border-color: var(--border-hover); }
        .hero-map-cta span {
            font-family: var(--font-mono); font-size: 0.64rem; letter-spacing: 0.1em;
            text-transform: uppercase; color: var(--text-tertiary);
        }
        .hero-map-cta em {
            font-style: normal; font-family: var(--font-mono); font-size: 0.68rem;
            letter-spacing: 0.08em; text-transform: uppercase; color: var(--accent);
        }
        @media (max-width: 768px) { .hero-map-cta { display: none; } }

        /* Split-door: two explicit paths at the decision point, not the arrival point. */
        .paths-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 18px; }
        .path-card {
            display: block; text-decoration: none; color: inherit;
            border: 1px solid var(--border); border-radius: 6px;
            padding: 26px 24px; background: var(--bg-card);
            transition: border-color var(--dur-fast) var(--ease-silk), background var(--dur-fast) var(--ease-silk);
        }
        .path-card:hover { border-color: var(--border-hover); background: var(--bg-card-hover); }
        .path-tag {
            font-family: var(--font-mono); font-size: 0.64rem; letter-spacing: 0.14em;
            text-transform: uppercase; color: var(--accent-warm);
        }
        .path-card h3 {
            font-family: var(--font-display); font-size: 1.3rem; font-weight: 600;
            margin: 10px 0 10px; text-wrap: balance;
        }
        .path-card p { color: var(--text-secondary); font-size: 0.92rem; line-height: 1.65; margin: 0 0 14px; }
        .path-go {
            font-family: var(--font-mono); font-size: 0.68rem; letter-spacing: 0.1em;
            text-transform: uppercase; color: var(--accent);
        }
