            /* ─────────────────────────────────────────────
               RESET + TOKENS
            ───────────────────────────────────────────── */
            *,
            *::before,
            *::after {
                margin: 0;
                padding: 0;
                box-sizing: border-box;
            }
            html {
                font-size: 16px;
            }
            /* Smooth scroll only turns on after full page load, so a
               cross-page hash landing (e.g. ../index.html#process) jumps
               instantly instead of animating through every section in
               between and making the scroll-spy pill flicker mid-flight. */
            html.smooth-scroll {
                scroll-behavior: smooth;
            }
            svg {
                cursor: inherit;
            }

            :root {
                color-scheme: light;
                /* Monochromatic — built from the Pinarello Prince's blue
                   (~#0061b6, sampled from the frame) plus tints/shades of
                   the same hue. No secondary accent color anywhere. */
                --bg: #f7f9fb;
                --panel: #ffffff;
                --bg-alt: #eef2f6;
                --ink: #0f1e2e;
                --ink-soft: #33455a;
                --muted: #5b6b7c;
                --faint: #6b7684;
                --border: #dbe3ea;
                --border-soft: #e7edf2;
                --teal: #0061b6;
                --teal-deep: #00457f;
                --teal-bright: #5aa8ea;
                --teal-bg: #e2eefb;
                --teal-border: rgba(0, 97, 182, 0.32);
                --nav-h: 76px;
                --gutter: clamp(1.25rem, 5vw, 3.5rem);
                --radius-sm: 10px;
                --radius-md: 16px;
                --radius-lg: 26px;
                --radius-pill: 999px;
                --shadow-card: 0 1px 2px rgba(15, 30, 46, 0.04), 0 1px 1px
                    rgba(15, 30, 46, 0.03);
                --shadow-float: 0 30px 70px rgba(6, 20, 34, 0.22), 0 4px 16px
                    rgba(6, 20, 34, 0.1);

                /* Type scale — Perfect Fourth (×1.333), base 1rem/16px */
                --text-2: 0.563rem;
                --text-1: 0.75rem;
                --text0: 1rem;
                --text1: 1.333rem;
                --text2: 1.777rem;
                --text3: 2.369rem;
                --text4: 3.16rem;
                --text5: 4.213rem;
                --text6: 5.617rem;

                /* Spacing scale — base 8, with a single 4px half-step */
                --space-4: 0.25rem;
                --space-8: 0.5rem;
                --space-16: 1rem;
                --space-24: 1.5rem;
                --space-32: 2rem;
                --space-40: 2.5rem;
                --space-48: 3rem;
                --space-56: 3.5rem;
                --space-64: 4rem;
                --space-72: 4.5rem;
                --space-80: 5rem;
                --space-96: 6rem;
                --space-112: 7rem;
                --space-128: 8rem;
            }

            body {
                font-family:
                    "Inter",
                    system-ui,
                    -apple-system,
                    "Segoe UI",
                    sans-serif;
                background: var(--bg);
                color: var(--ink);
                overflow-x: hidden;
                -webkit-font-smoothing: antialiased;
                -moz-osx-font-smoothing: grayscale;
            }

            ::selection {
                background: var(--teal-bright);
                color: var(--ink);
            }

            body::after {
                content: "";
                position: fixed;
                inset: 0;
                background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='300' height='300'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.75' numOctaves='4' stitchTiles='stitch'/%3E%3CfeColorMatrix type='saturate' values='0'/%3E%3C/filter%3E%3Crect width='300' height='300' filter='url(%23n)' opacity='0.4'/%3E%3C/svg%3E");
                opacity: 0.02;
                pointer-events: none;
                z-index: 9000;
            }

            a {
                color: inherit;
                /* Without this, some mobile browsers wait to see if a
                   second tap follows (in case it's a double-tap-to-zoom
                   gesture) before committing to the click — which can
                   read as needing to tap twice to activate a link. This
                   tells the browser a single tap should act immediately. */
                touch-action: manipulation;
            }
            button {
                touch-action: manipulation;
            }
            img {
                max-width: 100%;
                display: block;
            }

            .mono {
                font-family: "JetBrains Mono", ui-monospace, monospace;
            }


            /* ─────────────────────────────────────────────
               SHARED: eyebrow pill / headings / buttons
            ───────────────────────────────────────────── */
            .eyebrow {
                display: inline-flex;
                align-items: center;
                gap: 0.5rem;
                background: var(--teal);
                color: #fff;
                font-family: "JetBrains Mono", monospace;
                font-size: 0.75rem;
                font-weight: 600;
                letter-spacing: 0.14em;
                text-transform: uppercase;
                padding: 0.5rem 1rem;
                border-radius: var(--radius-pill);
                width: max-content;
            }
            .eyebrow.on-dark {
                background: rgba(250, 250, 249, 0.12);
                color: var(--teal-bright);
                border: 1px solid rgba(250, 250, 249, 0.16);
            }

            .heading-lg {
                font-family: "Playfair Display", serif;
                font-size: clamp(2.369rem, 4.2vw, 3.16rem);
                font-weight: 700;
                line-height: 1.12;
                letter-spacing: -0.025em;
                color: var(--ink);
            }
            .hero-name {
                font-family: "Playfair Display", serif;
                font-weight: 700;
            }
            .heading-lg .hl {
                color: var(--teal);
            }
            .on-dark .heading-lg,
            .heading-lg.on-dark {
                color: var(--bg);
            }
            .on-dark .heading-lg .hl,
            .heading-lg.on-dark .hl {
                color: var(--teal-bright);
            }

            .lede {
                font-size: 1rem;
                line-height: 1.8;
                color: var(--muted);
                max-width: 620px;
            }

            .btn {
                display: inline-flex;
                align-items: center;
                gap: 0.5rem;
                font-family: "Inter", sans-serif;
                font-size: 1rem;
                font-weight: 600;
                text-decoration: none;
                padding: 1rem 1.5rem;
                border-radius: var(--radius-pill);
                border: 1.5px solid transparent;
                transition:
                    transform 0.2s ease,
                    box-shadow 0.2s ease,
                    background 0.2s ease,
                    border-color 0.2s ease,
                    color 0.2s ease;
                cursor: pointer;
                will-change: transform;
            }
            .btn:hover {
                transform: translateY(-2px);
            }
            .btn-arrow {
                transition: transform 0.2s ease;
                font-size: 0.85em;
            }
            .btn:hover .btn-arrow {
                transform: translateX(3px);
            }

            .btn-solid {
                background: var(--teal);
                color: #fff;
                box-shadow: 0 10px 26px rgba(0, 97, 182, 0.3);
            }
            .btn-solid:hover {
                background: var(--teal-deep);
                box-shadow: 0 12px 30px rgba(0, 97, 182, 0.38);
            }

            .btn-outline {
                background: transparent;
                border-color: var(--border);
                color: var(--ink);
            }
            .btn-outline:hover {
                border-color: var(--ink);
            }

            .btn-outline.on-dark {
                border-color: rgba(250, 250, 249, 0.28);
                color: var(--bg);
            }
            .btn-outline.on-dark:hover {
                border-color: rgba(250, 250, 249, 0.6);
                background: rgba(255, 255, 255, 0.05);
            }

            .btn-dark {
                background: var(--ink);
                color: var(--bg);
            }
            .btn-dark:hover {
                background: var(--teal-deep);
            }


            /* ─────────────────────────────────────────────
               NAV
            ───────────────────────────────────────────── */
            .nav {
                position: fixed;
                top: 0;
                left: 50%;
                transform: translateX(-50%);
                z-index: 800;
                height: var(--nav-h);
                width: 100%;
                max-width: 100%;
                display: flex;
                align-items: center;
                justify-content: space-between;
                padding: 0 var(--gutter);
                background: rgba(250, 250, 249, 0.82);
                backdrop-filter: blur(16px);
                -webkit-backdrop-filter: blur(16px);
                border: 1px solid transparent;
                border-radius: 0;
                overflow: hidden;
                box-shadow: 0 0 0 0 rgba(15, 30, 46, 0);
                transition:
                    top 0.45s cubic-bezier(0.23, 1, 0.32, 1),
                    width 0.45s cubic-bezier(0.23, 1, 0.32, 1),
                    max-width 0.45s cubic-bezier(0.23, 1, 0.32, 1),
                    height 0.45s cubic-bezier(0.23, 1, 0.32, 1),
                    border-radius 0.45s cubic-bezier(0.23, 1, 0.32, 1),
                    border-color 0.45s ease,
                    box-shadow 0.45s ease,
                    padding 0.45s ease;
            }
            .nav.scrolled {
                top: 14px;
                width: calc(100% - 2.5rem);
                max-width: 1180px;
                height: calc(var(--nav-h) - 12px);
                padding: 0 1.5rem;
                border-radius: 20px;
                border-color: var(--border-soft);
                box-shadow:
                    0 12px 32px rgba(15, 30, 46, 0.13),
                    0 2px 10px rgba(15, 30, 46, 0.07);
            }

            .nav-progress {
                position: absolute;
                bottom: -1px;
                left: 0;
                height: 2px;
                width: 0%;
                background: var(--teal);
                transition: width 0.08s linear, opacity 0.3s ease;
                opacity: 1;
            }
            .nav.scrolled .nav-progress {
                opacity: 0;
            }

            .nav-logo {
                display: inline-flex;
                align-items: center;
                text-decoration: none;
            }
            .nav-logo img {
                display: block;
                width: 11.0625rem;
                height: auto;
            }

            .nav-right {
                display: flex;
                align-items: center;
                gap: 2.5rem;
            }

            .nav-links-wrap {
                position: relative;
                display: flex;
            }
            .nav-links {
                display: flex;
                gap: 0.25rem;
                list-style: none;
            }
            .nav-pill {
                position: absolute;
                top: 0;
                left: 0;
                background: var(--teal-bg);
                border-radius: var(--radius-pill);
                z-index: 0;
                opacity: 0;
                pointer-events: none;
                transition:
                    transform 0.35s cubic-bezier(0.23, 1, 0.32, 1),
                    width 0.35s cubic-bezier(0.23, 1, 0.32, 1),
                    height 0.35s cubic-bezier(0.23, 1, 0.32, 1),
                    opacity 0.25s ease;
            }
            .nav-links li {
                position: relative;
                z-index: 1;
            }
            .nav-links a {
                position: relative;
                z-index: 1;
                display: inline-flex;
                align-items: center;
                padding: 0.5rem 1rem;
                border-radius: var(--radius-pill);
                font-size: 1rem;
                font-weight: 700;
                color: var(--muted);
                text-decoration: none;
                transition: color 0.2s ease;
            }
            .nav-links a:hover {
                color: var(--ink);
            }
            .nav-links a.active {
                color: var(--teal-deep);
                font-weight: 600;
            }

            .nav-cta {
                padding: 0.5rem 1.5rem;
                font-size: 0.75rem;
                -webkit-appearance: none;
                appearance: none;
                font-family: inherit;
            }
            .ask-ai-sparkle {
                color: var(--teal-bright);
            }

            /* Ask-AI dropdown (rendered outside the nav so it isn't
               clipped by the nav's rounded/overflow-hidden shape) */
            .ask-ai-menu {
                position: fixed;
                top: 0;
                right: 0;
                min-width: 200px;
                background: var(--panel);
                border: 1px solid var(--border);
                border-radius: var(--radius-md);
                box-shadow: var(--shadow-float);
                padding: 0.5rem;
                display: flex;
                flex-direction: column;
                gap: 0.25rem;
                z-index: 900;
                opacity: 0;
                transform: translateY(-8px);
                pointer-events: none;
                transition: opacity 0.18s ease, transform 0.18s ease;
            }
            .ask-ai-menu.open {
                opacity: 1;
                transform: translateY(0);
                pointer-events: auto;
            }
            .ask-ai-menu-label {
                font-size: 0.75rem;
                letter-spacing: 0.08em;
                text-transform: uppercase;
                color: var(--faint);
                padding: 0.5rem 1rem 0.25rem;
            }
            .ask-ai-item {
                display: flex;
                align-items: center;
                gap: 0.5rem;
                padding: 0.5rem 1rem;
                border-radius: 10px;
                font-size: 1rem;
                font-weight: 600;
                color: var(--ink);
                text-decoration: none;
                transition: background 0.15s ease, color 0.15s ease;
            }
            .ask-ai-item:hover {
                background: var(--teal-bg);
                color: var(--teal-deep);
            }
            .ask-ai-item::before {
                content: "→";
                color: var(--faint);
                transition: color 0.15s ease;
            }
            .ask-ai-item:hover::before {
                color: var(--teal);
            }


            /* ─────────────────────────────────────────────
               PANEL (rounded card sections)
            ───────────────────────────────────────────── */
            .panel-wrap {
                max-width: 1180px;
                margin: 2.5rem auto;
                padding: 0 var(--gutter);
            }
            .panel {
                background: var(--panel);
                border: 1px solid var(--border);
                border-radius: var(--radius-lg);
                padding: clamp(2.5rem, 6vw, 4.5rem);
                box-shadow: var(--shadow-card);
            }
            .panel.dark {
                background: linear-gradient(
                    155deg,
                    #0e2c47 0%,
                    #0a1a30 55%,
                    #090c14 100%
                );
                color: var(--bg);
                border-color: transparent;
                position: relative;
                overflow: hidden;
            }
            .panel.dark::before {
                content: "";
                position: absolute;
                right: -10%;
                bottom: -35%;
                width: 65%;
                height: 110%;
                background: radial-gradient(
                    circle at center,
                    rgba(90, 168, 234, 0.16),
                    rgba(90, 168, 234, 0) 65%
                );
                pointer-events: none;
            }
            .panel.tight {
                padding: clamp(2rem, 5vw, 3rem);
            }


            /* ─────────────────────────────────────────────
               CONTACT
            ───────────────────────────────────────────── */
            .contact-inner {
                display: grid;
                grid-template-columns: 1.2fr 0.8fr;
                gap: 4rem;
                align-items: center;
                position: relative;
                z-index: 1;
            }
            .contact-left {
                display: flex;
                flex-direction: column;
                gap: 1.5rem;
            }
            .contact-sub {
                font-size: 1rem;
                line-height: 1.8;
                color: rgba(250, 250, 249, 0.68);
                max-width: 460px;
            }
            .contact-email-link {
                display: inline-flex;
                align-items: center;
                gap: 0.5rem;
                font-size: 1rem;
                font-weight: 600;
                color: var(--bg);
                text-decoration: none;
                width: max-content;
                border-bottom: 1.5px solid rgba(250, 250, 249, 0.3);
                padding-bottom: 4px;
                transition: color 0.2s ease, border-color 0.2s ease;
            }
            .contact-email-link:hover {
                color: var(--teal-bright);
                border-color: var(--teal-bright);
            }
            .contact-right {
                display: flex;
                flex-direction: column;
                gap: 1rem;
            }
            .social-link {
                display: flex;
                align-items: center;
                gap: 0.5rem;
                font-family: "JetBrains Mono", monospace;
                font-size: 0.75rem;
                letter-spacing: 0.04em;
                text-transform: uppercase;
                color: rgba(250, 250, 249, 0.55);
                text-decoration: none;
                padding: 1rem 1rem;
                border: 1px solid rgba(250, 250, 249, 0.14);
                border-radius: var(--radius-sm);
                transition: all 0.2s ease;
                margin-top: 0.5rem;
            }
            .social-link:hover {
                color: var(--bg);
                border-color: rgba(250, 250, 249, 0.32);
                background: rgba(255, 255, 255, 0.05);
            }


            /* ─────────────────────────────────────────────
               SCROLL REVEAL
            ───────────────────────────────────────────── */
            .reveal {
                opacity: 0;
                transform: translateY(18px);
                transition:
                    opacity 0.7s cubic-bezier(0.23, 1, 0.32, 1),
                    transform 0.7s cubic-bezier(0.23, 1, 0.32, 1);
            }
            .reveal.in {
                opacity: 1;
                transform: none;
            }
            .d1 {
                transition-delay: 0.08s;
            }
            .d2 {
                transition-delay: 0.16s;
            }
            .d3 {
                transition-delay: 0.24s;
            }
            .d4 {
                transition-delay: 0.32s;
            }


            /* ─────────────────────────────────────────────
               ACCESSIBILITY: focus, active, reduced motion
            ───────────────────────────────────────────── */
            a:focus-visible,
            button:focus-visible {
                outline: 2px solid var(--teal);
                outline-offset: 3px;
                border-radius: var(--radius-sm);
            }
            .btn:active {
                transform: translateY(0) scale(0.98);
            }
            .skill-tag:active {
                transform: scale(0.96);
            }
            .cs-footnav-link:active {
                transform: translateY(0) scale(0.99);
            }
            .detail-link:active {
                transform: translateY(0) scale(0.98);
            }
            .project-item:has(.project-card-link:active) {
                border-color: var(--teal-border);
                box-shadow: var(--shadow-card);
            }
            @media (prefers-reduced-motion: reduce) {
                html {
                    scroll-behavior: auto;
                }
                .reveal {
                    transition: none;
                    opacity: 1;
                    transform: none;
                }
                .marquee-track {
                    animation: none;
                }
                .avail-dot {
                    animation: none;
                }
            }

            /* ─────────────────────────────────────────────
               FOOTER
            ───────────────────────────────────────────── */
            footer.site-footer {
                max-width: 1180px;
                margin: 0 auto 2.5rem;
                padding: 1.5rem var(--gutter);
                display: flex;
                justify-content: space-between;
                align-items: center;
                flex-wrap: wrap;
                gap: 0.5rem;
            }
            footer.site-footer span {
                font-family: "JetBrains Mono", monospace;
                font-size: 0.75rem;
                letter-spacing: 0.06em;
                color: var(--faint);
            }

            /* ─────────────────────────────────────────────
               FAB: Back to Case Studies (persistent, bottom-right)
            ───────────────────────────────────────────── */
            .fab-back {
                position: fixed;
                right: 1.5rem;
                bottom: 1.5rem;
                z-index: 700;
                display: inline-flex;
                align-items: center;
                gap: 0.5rem;
                background: var(--ink);
                color: var(--bg);
                font-family: "Inter", sans-serif;
                font-size: 1rem;
                font-weight: 600;
                text-decoration: none;
                padding: 1rem 1.5rem;
                border-radius: var(--radius-pill);
                box-shadow: var(--shadow-float);
                transition:
                    background 0.2s ease,
                    transform 0.2s ease,
                    box-shadow 0.2s ease,
                    padding 0.2s ease;
            }
            /* Hover styles only for devices that truly support hovering —
               on iOS Safari, a link whose ancestor (or itself) changes
               appearance on :hover needs a first tap just to "activate"
               the hover state, and only follows the link on a second tap.
               Scoping :hover to (hover: hover) devices skips that trap
               entirely on touch, so the first tap always just navigates. */
            @media (hover: hover) and (pointer: fine) {
                .fab-back:hover {
                    background: var(--teal-deep);
                    transform: translateY(-3px);
                    box-shadow:
                        0 16px 40px rgba(6, 20, 34, 0.28),
                        0 4px 16px rgba(6, 20, 34, 0.14);
                }
                .fab-back:hover .fab-back-arrow {
                    transform: translateX(-3px);
                }
            }
            .fab-back:active {
                transform: translateY(0) scale(0.97);
            }
            .fab-back-arrow {
                font-size: 1rem;
                transition: transform 0.2s ease;
            }
            @media (max-width: 640px) {
                .fab-back {
                    right: 1rem;
                    bottom: 1rem;
                    width: 56px;
                    height: 56px;
                    padding: 0;
                    justify-content: center;
                    border-radius: 50%;
                }
                .fab-back-label {
                    display: none;
                }
            }


            /* ─────────────────────────────────────────────
               RESPONSIVE (shared)
            ───────────────────────────────────────────── */
            @media (max-width: 1000px) {
                .nav-links-wrap {
                    display: none;
                }
                .contact-inner {
                    grid-template-columns: 1fr;
                    gap: 2.5rem;
                }
                .stat-cell {
                    min-width: 45%;
                    border-right: none !important;
                    border-bottom: 1px solid var(--border-soft);
                }
                /* Comfortable touch targets (Apple HIG / Material both
                   recommend ~44-48px minimum) — these measured 33px and
                   36px tall at mobile widths. */
                .nav-cta {
                    min-height: 44px;
                }
                .ask-ai-item {
                    min-height: 44px;
                }
            }
            @media (max-width: 540px) {
                .stat-cell {
                    min-width: 100%;
                }
            }
