/* ==========================================================================
   Portfolio — refactored from "Luna UI — Design Studio"
   Preserved: color tokens, Outfit/General Sans typography, glitch effect,
   selection tint, pill button language, dark immersive aesthetic.
   ========================================================================== */

/* ---------- Fonts (same woff2 files the original site loads) ---------- */
@font-face {
    font-family: "Outfit";
    src: url("https://framerusercontent.com/third-party-assets/fontshare/wf/HGVZO4W7MOWSOT5FITRR2LXJL4LPEVKA/JGNFYTACJN27RPO2O5AUTRRZD4FNRJPI/W7JHARPQSG6P4YAUJKIMUM6JNAX2RFW3.woff2") format("woff2");
    font-style: normal;
    font-weight: 300;
    font-display: swap;
}
@font-face {
    font-family: "General Sans";
    src: url("https://framerusercontent.com/third-party-assets/fontshare/wf/HFTXPYOBEE22ON2ZH2TDSTBQLGERA7LU/4AOH2PGTMHZO2YX5HMTOAV52ONC3WIXE/TW4KNQIPR4LNP4I6I6C6HKQ23B2EQAU5.woff2") format("woff2");
    font-style: normal;
    font-weight: 300;
    font-display: swap;
}
@font-face {
    font-family: "General Sans";
    src: url("https://framerusercontent.com/third-party-assets/fontshare/wf/MFQT7HFGCR2L5ULQTW6YXYZXXHMPKLJ3/YWQ244D6TACUX5JBKATPOW5I5MGJ3G73/7YY3ZAAE3TRV2LANYOLXNHTPHLXVWTKH.woff2") format("woff2");
    font-style: normal;
    font-weight: 400;
    font-display: swap;
}
@font-face {
    font-family: "General Sans";
    src: url("https://framerusercontent.com/third-party-assets/fontshare/wf/3RZHWSNONLLWJK3RLPEKUZOMM56GO4LJ/BPDRY7AHVI3MCDXXVXTQQ76H3UXA63S3/SB2OEB6IKZPRR6JT4GFJ2TFT6HBB6AZN.woff2") format("woff2");
    font-style: normal;
    font-weight: 500;
    font-display: swap;
}

/* ---------- Design tokens (extracted from the original) ---------- */
:root {
    /* Pure black to match the black the Unicorn Studio hero scene fades to */
    --bg: rgb(0, 0, 0);
    --surface: rgb(13, 13, 13);
    --text: rgb(250, 250, 250);
    --muted: rgb(202, 202, 202);
    --dim: rgb(51, 51, 51);
    --border: rgba(255, 255, 255, 0.16);
    --border-soft: rgba(255, 255, 255, 0.08);
    --accent: rgb(0, 170, 255);
    --accent-deep: rgb(0, 105, 200);

    --font-display: "Outfit", sans-serif;
    --font-body: "General Sans", sans-serif;

    --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
    --section-gap: clamp(7rem, 14vh, 11rem);
    --content-width: 72rem;

    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* ---------- Base ---------- */
*,
*::before,
*::after {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    background: var(--bg);
    color: var(--text);
    font-family: var(--font-body);
    font-weight: 300;
    font-size: 1.0625rem;
    line-height: 1.6;
    overflow-x: hidden;
}

h1, h2, h3, p, figure, blockquote, ul, ol {
    margin: 0;
}

ul, ol {
    padding: 0;
    list-style: none;
}

a {
    color: inherit;
    text-decoration: none;
}

::selection {
    background: rgba(0, 170, 255, 0.3);
    color: #fff;
}

:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 3px;
    border-radius: 4px;
}

.skip-link {
    position: absolute;
    top: -100%;
    left: 1rem;
    z-index: 100;
    padding: 0.6rem 1rem;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 8px;
    font-size: 0.875rem;
}
.skip-link:focus {
    top: 1rem;
}

.text-bright { color: var(--text); }
.text-muted { color: var(--muted); }

/* ---------- Starfield canvas ---------- */
#starfield {
    position: fixed;
    inset: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    display: block;
}

/* ---------- Glitch effect (preserved from original, lightly adapted) ---------- */
.glitch-text {
    position: relative;
    display: inline-block;
    background: linear-gradient(360deg, var(--text), rgba(74, 74, 74, 0.13));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.glitch-text::before,
.glitch-text::after {
    content: attr(data-text);
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    /* Chromatic electric-blue slices for the glitch layers */
    background: linear-gradient(360deg, var(--accent), rgba(0, 105, 200, 0.35));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    overflow: hidden;
    font: inherit;
    letter-spacing: inherit;
    line-height: inherit;
    text-align: inherit;
    opacity: 0;
    pointer-events: none;
}

.glitch-text::before {
    left: 4px;
    clip-path: polygon(0 0, 100% 0, 100% 45%, 0 45%);
}

.glitch-text::after {
    left: -4px;
    clip-path: polygon(0 60%, 100% 60%, 100% 100%, 0 100%);
}

.glitch-active::before {
    animation: glitch-before 0.5s infinite linear alternate-reverse;
    opacity: 1;
}

.glitch-active::after {
    animation: glitch-after 0.75s infinite linear alternate-reverse;
    opacity: 1;
}

@keyframes glitch-before {
    0% { clip-path: polygon(0 0, 100% 0, 100% 10%, 0 10%); }
    5% { clip-path: polygon(0 30%, 100% 30%, 100% 30%, 0 30%); }
    10% { clip-path: polygon(0 20%, 100% 20%, 100% 40%, 0 40%); }
    15% { clip-path: polygon(0 2%, 100% 2%, 100% 4%, 0 4%); }
    20% { clip-path: polygon(0 66%, 100% 66%, 100% 66%, 0 66%); }
    25% { clip-path: polygon(0 88%, 100% 88%, 100% 88%, 0 88%); }
    30% { clip-path: polygon(0 100%, 100% 100%, 100% 40%, 0 40%); }
    35% { clip-path: polygon(0 140%, 100% 140%, 100% 140%, 0 140%); }
    40% { clip-path: polygon(0 160%, 100% 160%, 100% 160%, 0 160%); }
    45% { clip-path: polygon(0 100%, 100% 100%, 100% 110%, 0 110%); }
    50% { clip-path: polygon(0 140%, 100% 140%, 100% 160%, 0 160%); }
    55% { clip-path: polygon(0 4%, 100% 4%, 100% 80%, 0 80%); }
    60% { clip-path: polygon(0 30%, 100% 30%, 100% 30%, 0 30%); }
    65% { clip-path: polygon(0 20%, 100% 20%, 100% 20%, 0 20%); }
    70% { clip-path: polygon(0 10%, 100% 10%, 100% 84%, 0 84%); }
    75% { clip-path: polygon(0 130%, 100% 130%, 100% 80%, 0 80%); }
    80% { clip-path: polygon(0 86%, 100% 86%, 100% 86%, 0 86%); }
    85% { clip-path: polygon(0 38%, 100% 38%, 100% 38%, 0 38%); }
    90% { clip-path: polygon(0 108%, 100% 108%, 100% 108%, 0 108%); }
    95% { clip-path: polygon(0 90%, 100% 90%, 100% 90%, 0 90%); }
    100% { clip-path: polygon(0 22%, 100% 22%, 100% 22%, 0 22%); }
}

@keyframes glitch-after {
    0% { clip-path: polygon(0 120%, 100% 120%, 100% 100%, 0 100%); }
    5% { clip-path: polygon(0 164%, 100% 164%, 100% 100%, 0 100%); }
    10% { clip-path: polygon(0 156%, 100% 156%, 100% 100%, 0 100%); }
    15% { clip-path: polygon(0 88%, 100% 88%, 100% 108%, 0 108%); }
    20% { clip-path: polygon(0 182%, 100% 182%, 100% 100%, 0 100%); }
    25% { clip-path: polygon(0 130%, 100% 130%, 100% 170%, 0 170%); }
    30% { clip-path: polygon(0 120%, 100% 120%, 100% 130%, 0 130%); }
    35% { clip-path: polygon(0 80%, 100% 80%, 100% 190%, 0 190%); }
    40% { clip-path: polygon(0 90%, 100% 90%, 100% 100%, 0 100%); }
    45% { clip-path: polygon(0 152%, 100% 152%, 100% 100%, 0 100%); }
    50% { clip-path: polygon(0 140%, 100% 140%, 100% 180%, 0 180%); }
    55% { clip-path: polygon(0 160%, 100% 160%, 100% 100%, 0 100%); }
    60% { clip-path: polygon(0 138%, 100% 138%, 100% 146%, 0 146%); }
    65% { clip-path: polygon(0 120%, 100% 120%, 100% 170%, 0 170%); }
    70% { clip-path: polygon(0 102%, 100% 102%, 100% 100%, 0 100%); }
    75% { clip-path: polygon(0 116%, 100% 116%, 100% 100%, 0 100%); }
    80% { clip-path: polygon(0 150%, 100% 150%, 100% 100%, 0 100%); }
    85% { clip-path: polygon(0 130%, 100% 130%, 100% 100%, 0 100%); }
    90% { clip-path: polygon(0 90%, 100% 90%, 100% 150%, 0 150%); }
    95% { clip-path: polygon(0 120%, 100% 120%, 100% 100%, 0 100%); }
    100% { clip-path: polygon(0 140%, 100% 140%, 100% 160%, 0 160%); }
}

/* ---------- Buttons ---------- */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 0.6rem;
    padding: 0.85rem 1.75rem;
    font-family: var(--font-body);
    font-size: 0.9375rem;
    font-weight: 400;
    letter-spacing: 0.01em;
    border-radius: 32px;
    transition: background-color 0.35s var(--ease-out),
                color 0.35s var(--ease-out),
                border-color 0.35s var(--ease-out),
                transform 0.35s var(--ease-out),
                box-shadow 0.35s var(--ease-out);
    will-change: transform;
}

.btn:hover {
    transform: translateY(-2px);
}

.btn:active {
    transform: translateY(0);
}

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

.btn-primary:hover {
    box-shadow: 0 8px 32px rgba(0, 170, 255, 0.35);
}

.btn-pill {
    border: 1px solid var(--border);
    color: var(--text);
    background: rgba(255, 255, 255, 0.02);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

.btn-pill:hover {
    border-color: rgba(0, 170, 255, 0.55);
    background: rgba(0, 170, 255, 0.08);
}

/* Accent pills: always show the blue outline/tint (former hover state) */
.btn-pill-accent {
    border-color: rgba(0, 170, 255, 0.55);
    background: rgba(0, 170, 255, 0.08);
}

.btn-pill-accent:hover {
    border-color: var(--accent);
    background: rgba(0, 170, 255, 0.2);
    box-shadow: 0 0 28px rgba(0, 170, 255, 0.4),
                inset 0 0 0 1px rgba(0, 170, 255, 0.15);
    color: var(--text);
}

.btn-small {
    padding: 0.55rem 1.25rem;
    font-size: 0.875rem;
}

.btn-dot {
    width: 6px;
    height: 6px;
    border-radius: 100%;
    background: var(--accent);
    box-shadow: 0 0 8px rgba(0, 170, 255, 0.6);
    transition: background-color 0.35s var(--ease-out), transform 0.35s var(--ease-out);
}

.btn-pill:hover .btn-dot {
    transform: scale(1.35);
}

/* ---------- Navigation ---------- */
.site-nav {
    position: fixed;
    top: 1.25rem;
    left: 0;
    right: 0;
    margin-inline: auto;
    z-index: 50;
    width: min(calc(100% - 2.5rem), 44rem);
}

.nav-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.6rem 0.75rem 0.6rem 1.5rem;
    border: 1px solid var(--border-soft);
    border-radius: 100px;
    background: rgba(0, 0, 0, 0.55);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
}

.nav-logo {
    font-family: var(--font-display);
    font-weight: 300;
    font-size: 1.25rem;
    letter-spacing: -0.02em;
}

.nav-links {
    display: flex;
    gap: 2rem;
    /* Offsets the links' underline padding so the labels read as optically
       centered between the top and bottom edges of the pill */
    transform: translateY(-2px);
}

.nav-links a {
    position: relative;
    font-size: 0.9375rem;
    color: var(--muted);
    padding-bottom: 0.35em;
    transition: color 0.3s var(--ease-out);
}

.nav-links a::after {
    content: "";
    position: absolute;
    left: 0;
    bottom: 0;
    width: 100%;
    height: 2px;
    border-radius: 2px;
    background: var(--text);
    transform: scaleX(0);
    transform-origin: left;
    pointer-events: none;
}

.nav-links a.nav-underline-draw::after {
    box-shadow:
        0 0 2px rgb(250, 250, 250),
        0 0 6px rgba(250, 250, 250, 0.65),
        0 0 14px rgba(250, 250, 250, 0.35),
        0 0 28px rgba(250, 250, 250, 0.18);
    animation:
        nav-underline-draw 0.5s var(--ease-out) forwards,
        saber-glow-white 3.5s ease-in-out 0s infinite;
}

@keyframes nav-underline-draw {
    from { transform: scaleX(0); }
    to { transform: scaleX(1); }
}

@keyframes saber-glow-white {
    0%, 100% {
        opacity: 0.9;
        box-shadow:
            0 0 2px rgb(250, 250, 250),
            0 0 6px rgba(250, 250, 250, 0.65),
            0 0 14px rgba(250, 250, 250, 0.35),
            0 0 28px rgba(250, 250, 250, 0.18);
    }
    50% {
        opacity: 1;
        box-shadow:
            0 0 2px rgb(255, 255, 255),
            0 0 9px rgba(255, 255, 255, 0.8),
            0 0 18px rgba(255, 255, 255, 0.5),
            0 0 36px rgba(255, 255, 255, 0.22);
    }
}

.nav-links a:hover {
    color: var(--accent);
}

.nav-links a.is-active {
    color: var(--accent);
}

/* ---------- Hero ---------- */
.hero {
    min-height: 100svh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 6.5rem 1.5rem 4rem;
    position: relative;
}

/* Unicorn Studio scene: deepest layer (z -2), so the fixed starfield
   canvas (z -1) draws its stars on top of it. Bottom edge fades to
   transparent to blend into the page background */
.hero-bg {
    position: absolute;
    inset: 0;
    z-index: -2;
    overflow: hidden;
    pointer-events: none;
    /* Eased fade kept low on the hero so the animated wave has room to
       flow downward before dissolving into the page background */
    -webkit-mask-image: linear-gradient(to bottom,
        black 0%,
        black 58%,
        rgba(0, 0, 0, 0.9) 68%,
        rgba(0, 0, 0, 0.7) 76%,
        rgba(0, 0, 0, 0.48) 84%,
        rgba(0, 0, 0, 0.26) 90%,
        rgba(0, 0, 0, 0.1) 95%,
        transparent 99%);
    mask-image: linear-gradient(to bottom,
        black 0%,
        black 58%,
        rgba(0, 0, 0, 0.9) 68%,
        rgba(0, 0, 0, 0.7) 76%,
        rgba(0, 0, 0, 0.48) 84%,
        rgba(0, 0, 0, 0.26) 90%,
        rgba(0, 0, 0, 0.1) 95%,
        transparent 99%);
}

.hero-bg [data-us-project] {
    width: 100%;
    height: 100%;
}

.hero-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    position: relative;
    z-index: 1;
}

.hero-title-wrap {
    position: relative;
    display: inline-block;
    max-width: 100%;
    padding-bottom: 0.1em;
    margin-bottom: 0.25rem;
}

/* Tube-light underline: lives on the wrapper so it doesn't compete with
   the glitch effect's ::before/::after on the title itself */
.hero-title-wrap::after {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    height: 2px;
    border-radius: 2px;
    background: var(--accent);
    transform: scaleX(0);
    transform-origin: left;
    box-shadow:
        0 0 2px var(--accent),
        0 0 8px rgba(0, 170, 255, 0.9),
        0 0 18px rgba(0, 170, 255, 0.55),
        0 0 36px rgba(0, 170, 255, 0.3);
    animation:
        hero-underline-draw 1.15s var(--ease-out) forwards,
        tube-flicker 1.4s ease-in-out 1.15s forwards,
        saber-glow 3.5s ease-in-out 2.55s infinite;
}

@keyframes hero-underline-draw {
    from { transform: scaleX(0); }
    to { transform: scaleX(1); }
}

@keyframes tube-flicker {
    0% { opacity: 1; }
    6% { opacity: 0.12; }
    11% { opacity: 0.82; }
    16% { opacity: 0.18; }
    21% { opacity: 0.6; }
    27% { opacity: 0.08; }
    32% { opacity: 0.72; }
    40% { opacity: 0.28; }
    47% { opacity: 0.92; }
    54% { opacity: 0.45; }
    62% { opacity: 1; }
    70% { opacity: 0.55; }
    80% { opacity: 0.95; }
    100% { opacity: 1; }
}

@keyframes saber-glow {
    0%, 100% {
        opacity: 0.88;
        box-shadow:
            0 0 2px var(--accent),
            0 0 8px rgba(0, 170, 255, 0.85),
            0 0 18px rgba(0, 170, 255, 0.5),
            0 0 36px rgba(0, 170, 255, 0.25);
    }
    50% {
        opacity: 1;
        box-shadow:
            0 0 3px var(--accent),
            0 0 12px rgba(0, 170, 255, 1),
            0 0 24px rgba(0, 170, 255, 0.7),
            0 0 48px rgba(0, 170, 255, 0.35);
    }
}

.hero-title {
    font-family: var(--font-display);
    font-feature-settings: "cv11", "cv06", "salt";
    font-size: clamp(2.75rem, 8.5vw, 9rem);
    font-weight: 300;
    letter-spacing: -0.03em;
    line-height: 1em;
    cursor: default;
    user-select: none;
    width: max-content;
    max-width: 100%;
}

.hero-description {
    max-width: 36rem;
    margin-top: 2.25rem;
    font-size: clamp(1.0625rem, 1.5vw, 1.1875rem);
    line-height: 1.55;
}

.hero-role-line {
    display: flex;
    justify-content: center;
    align-items: baseline;
    margin-bottom: 0.4rem;
    line-height: 1.55;
    transform: translateX(.65rem);
}

.hero-role-prefix {
    flex: 0 0 auto;
}

.hero-role-slot {
    display: inline-grid;
    flex: 0 0 auto;
    align-items: baseline;
    margin-left: 0.35rem;
}

.hero-role-sizer,
.hero-role-wrap {
    grid-area: 1 / 1;
}

.hero-role-sizer {
    visibility: hidden;
    white-space: nowrap;
    pointer-events: none;
}

.hero-role-wrap {
    position: relative;
    justify-self: start;
    align-self: baseline;
    padding-bottom: 0.02em;
}

.hero-role-wrap::after {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0.04em;
    height: 1px;
    border-radius: 1px;
    background: var(--accent);
    box-shadow:
        0 0 1px var(--accent),
        0 0 3px rgba(0, 170, 255, 0.45),
        0 0 6px rgba(0, 170, 255, 0.2);
    animation: role-saber-glow 3.5s ease-in-out infinite;
}

.hero-role-wrap.is-flickering-out::after,
.hero-role-wrap.is-flickering-in::after {
    animation: none;
}

@keyframes role-saber-glow {
    0%, 100% {
        opacity: 0.85;
        box-shadow:
            0 0 1px var(--accent),
            0 0 3px rgba(0, 170, 255, 0.4),
            0 0 6px rgba(0, 170, 255, 0.18);
    }
    50% {
        opacity: 1;
        box-shadow:
            0 0 1px var(--accent),
            0 0 4px rgba(0, 170, 255, 0.55),
            0 0 8px rgba(0, 170, 255, 0.28);
    }
}

.hero-desc-rest {
    display: block;
}

.hero-role {
    display: inline-block;
    vertical-align: baseline;
    position: relative;
    white-space: nowrap;
    color: var(--text);
}

.hero-role::before,
.hero-role::after {
    content: attr(data-text);
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(360deg, var(--accent), rgba(0, 105, 200, 0.35));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    overflow: hidden;
    font: inherit;
    letter-spacing: inherit;
    line-height: inherit;
    opacity: 0;
    pointer-events: none;
}

.hero-role::before {
    left: 3px;
    clip-path: polygon(0 0, 100% 0, 100% 45%, 0 45%);
}

.hero-role::after {
    left: -3px;
    clip-path: polygon(0 60%, 100% 60%, 100% 100%, 0 100%);
}

.hero-role.glitch-active::before {
    animation: glitch-before 0.5s infinite linear alternate-reverse;
    opacity: 1;
}

.hero-role.glitch-active::after {
    animation: glitch-after 0.75s infinite linear alternate-reverse;
    opacity: 1;
}

.hero-role-wrap.is-flickering-out {
    animation: role-flicker-out 0.5s ease forwards;
}

.hero-role-wrap.is-flickering-in {
    animation: role-flicker-in 0.55s ease forwards;
}

@keyframes role-flicker-out {
    0%, 5% { opacity: 1; }
    14% { opacity: 0.22; }
    24% { opacity: 0.78; }
    34% { opacity: 0.12; }
    44% { opacity: 0.52; }
    54% { opacity: 0.08; }
    66% { opacity: 0.38; }
    76% { opacity: 0; }
    88% { opacity: 0; }
    100% { opacity: 0; }
}

@keyframes role-flicker-in {
    0% { opacity: 0; }
    8% { opacity: 0.45; }
    16% { opacity: 0.9; }
    24% { opacity: 0.18; }
    34% { opacity: 0.72; }
    44% { opacity: 0.3; }
    56% { opacity: 0.95; }
    68% { opacity: 0.55; }
    80% { opacity: 1; }
    90% { opacity: 0.82; }
    100% { opacity: 1; }
}

.hero-actions {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 1rem;
    margin-top: 2.75rem;
}

.scroll-hint {
    position: fixed;
    bottom: 2.5rem;
    left: 0;
    right: 0;
    margin-inline: auto;
    width: max-content;
    z-index: 40;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.75rem;
    font-size: 0.75rem;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: var(--muted);
    transition: opacity 0.2s linear;
    pointer-events: none;
}

.scroll-line {
    width: 1px;
    height: 3rem;
    background: linear-gradient(to bottom, var(--accent), transparent);
    animation: scroll-pulse 2.4s ease-in-out infinite;
    transform-origin: top;
}

@keyframes scroll-pulse {
    0%, 100% { transform: scaleY(0.4); opacity: 0.4; }
    50% { transform: scaleY(1); opacity: 1; }
}

/* ---------- Sections (shared) ---------- */
.section {
    padding: var(--section-gap) 1.5rem;
}

.section-inner {
    max-width: var(--content-width);
    margin: 0 auto;
}

.section-label {
    font-size: 0.8125rem;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: var(--accent);
    margin-bottom: 1.25rem;
    text-align: center;
}

.section-title {
    font-family: var(--font-display);
    font-feature-settings: "cv11", "cv06", "salt";
    font-size: clamp(2.25rem, 5vw, 3.5rem);
    font-weight: 300;
    letter-spacing: -0.03em;
    line-height: 1.05;
    margin-bottom: 3.5rem;
    text-align: center;
}

/* ---------- Scroll reveal ---------- */
.reveal {
    opacity: 0;
    transform: translateY(28px);
    transition: opacity 0.9s var(--ease-out), transform 0.9s var(--ease-out);
}

.reveal.in-view {
    opacity: 1;
    transform: none;
}

/* ---------- About ---------- */
.about-portrait {
    display: flex;
    justify-content: center;
    margin-top: 0.5rem;
    margin-bottom: 2.5rem;
}

.about-portrait img {
    width: clamp(13.5rem, 24vw, 18rem);
    height: clamp(13.5rem, 24vw, 18rem);
    object-fit: cover;
    border-radius: 50%;
    border: 2px solid var(--accent);
    box-shadow:
        0 0 2px var(--accent),
        0 0 5px rgba(0, 170, 255, 0.45),
        0 0 10px rgba(0, 170, 255, 0.25),
        0 0 18px rgba(0, 170, 255, 0.12),
        0 24px 64px rgba(0, 0, 0, 0.5);
    animation: saber-glow-soft 3.5s ease-in-out infinite;
}

@keyframes saber-glow-soft {
    0%, 100% {
        opacity: 0.92;
        box-shadow:
            0 0 2px var(--accent),
            0 0 5px rgba(0, 170, 255, 0.4),
            0 0 10px rgba(0, 170, 255, 0.22),
            0 0 18px rgba(0, 170, 255, 0.1),
            0 24px 64px rgba(0, 0, 0, 0.5);
    }
    50% {
        opacity: 1;
        box-shadow:
            0 0 2px var(--accent),
            0 0 7px rgba(0, 170, 255, 0.55),
            0 0 14px rgba(0, 170, 255, 0.32),
            0 0 22px rgba(0, 170, 255, 0.16),
            0 24px 64px rgba(0, 0, 0, 0.5);
    }
}

.about-statement {
    font-family: var(--font-body);
    font-size: clamp(1.5rem, 3.2vw, 2.25rem);
    font-weight: 300;
    letter-spacing: -0.02em;
    line-height: 1.25;
    max-width: 46rem;
    margin-inline: auto;
    margin-bottom: 4.5rem;
    text-align: center;
}

/* Word-by-word reveal (preserved pattern from original About intro) */
.word-reveal .word {
    color: var(--dim);
    transition: color 0.7s var(--ease-out), filter 0.7s var(--ease-out);
    filter: blur(1px);
}

.word-reveal.in-view .word {
    color: var(--text);
    filter: blur(0);
    transition-delay: var(--word-delay, 0s);
}

.about-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.25rem;
}

.about-card {
    padding: 2rem;
    background: var(--surface);
    border: 1px solid var(--border-soft);
    border-radius: 16px;
    transition: border-color 0.4s var(--ease-out), transform 0.4s var(--ease-out),
                opacity 0.9s var(--ease-out);
}

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

.about-card h3 {
    font-family: var(--font-display);
    font-size: 1.125rem;
    font-weight: 300;
    letter-spacing: -0.01em;
    margin-bottom: 0.9rem;
}

.about-card p {
    font-size: 0.9375rem;
    color: var(--muted);
}

.about-card p + p {
    margin-top: 0.9rem;
}

.about-card-wide {
    grid-column: 1 / -1;
}

.about-card-philosophy {
    grid-column: span 2;
}

.about-list {
    display: flex;
    flex-direction: column;
    gap: 0.55rem;
    margin-bottom: 0.9rem;
}

.about-list li {
    font-size: 0.9375rem;
    color: var(--muted);
    padding-left: 1rem;
    position: relative;
}

.about-list li::before {
    content: "";
    position: absolute;
    left: 0;
    top: 0.55em;
    width: 4px;
    height: 4px;
    border-radius: 50%;
    background: var(--accent);
}

.work-intro {
    text-align: center;
    color: var(--muted);
    margin: -2rem auto 3rem;
    max-width: 32rem;
}

.about-stats {
    grid-column: 1 / -1;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.25rem;
    margin-top: 0.5rem;
}

.stat {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    padding: 1.75rem 2rem;
    border: 1px solid var(--border-soft);
    border-radius: 16px;
    background: linear-gradient(-45deg, rgba(12, 12, 12, 0.5) 0%, rgba(48, 48, 48, 0.35) 100%);
}

.stat-number {
    font-family: var(--font-display);
    font-size: 2.5rem;
    font-weight: 300;
    letter-spacing: -0.03em;
    background: linear-gradient(135deg, var(--text), var(--accent-deep));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.stat-label {
    font-size: 0.875rem;
    color: var(--muted);
}

/* ---------- Projects ---------- */
.project-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.5rem;
}

.project-card {
    display: flex;
    flex-direction: column;
    background: var(--surface);
    border: 1px solid var(--border-soft);
    border-radius: 20px;
    overflow: hidden;
    transition: border-color 0.45s var(--ease-out), transform 0.45s var(--ease-out),
                box-shadow 0.45s var(--ease-out), opacity 0.9s var(--ease-out);
}

a.project-card {
    text-decoration: none;
    color: inherit;
    cursor: pointer;
}

.project-card:hover {
    border-color: var(--border);
    transform: translateY(-6px);
    box-shadow: 0 24px 64px rgba(0, 0, 0, 0.5),
                0 0 0 1px rgba(0, 170, 255, 0.14);
}

.project-thumb {
    position: relative;
    aspect-ratio: 16 / 9;
    overflow: hidden;
    display: flex;
    align-items: flex-end;
    padding: 1.25rem;
    transition: filter 0.5s var(--ease-out);
}

/* Gradient placeholders in the palette of the original logo/shader */
.thumb-1 { background: radial-gradient(120% 120% at 20% 10%, rgba(0, 105, 200, 0.55), rgba(8, 8, 8, 0.9) 70%), var(--surface); }
.thumb-2 { background: radial-gradient(120% 120% at 80% 20%, rgba(0, 170, 255, 0.35), rgba(8, 8, 8, 0.92) 70%), var(--surface); }
.thumb-utd-trends {
    background:
        linear-gradient(180deg, rgba(0, 0, 0, 0.15), rgba(0, 0, 0, 0.55)),
        url("../assets/utd-trends/landing.png") center / cover no-repeat,
        var(--surface);
}
.thumb-3 { background: radial-gradient(140% 140% at 50% 110%, rgba(0, 140, 230, 0.45), rgba(8, 8, 8, 0.9) 72%), var(--surface); }
.thumb-ux-club {
    background:
        linear-gradient(180deg, rgba(0, 0, 0, 0.15), rgba(0, 0, 0, 0.55)),
        url("../assets/ux-club/home.png") center top / cover no-repeat,
        var(--surface);
}
.thumb-4 { background: radial-gradient(120% 120% at 10% 90%, rgba(0, 120, 215, 0.4), rgba(8, 8, 8, 0.92) 70%), var(--surface); }
.thumb-5 { background: radial-gradient(130% 130% at 90% 80%, rgba(0, 105, 200, 0.5), rgba(8, 8, 8, 0.9) 72%), var(--surface); }

.project-thumb::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(8, 8, 8, 0.55), transparent 55%);
    transition: opacity 0.5s var(--ease-out);
}

.project-card:hover .project-thumb {
    filter: saturate(1.3) brightness(1.1);
}

.thumb-mark {
    position: relative;
    z-index: 1;
    font-family: var(--font-display);
    font-size: 3.5rem;
    font-weight: 300;
    letter-spacing: -0.03em;
    color: rgba(250, 250, 250, 0.22);
    transition: color 0.5s var(--ease-out), transform 0.5s var(--ease-out);
}

.project-card:hover .thumb-mark {
    color: rgba(250, 250, 250, 0.55);
    transform: translateY(-4px);
}

.project-body {
    display: flex;
    flex-direction: column;
    flex: 1;
    padding: 1.75rem;
    gap: 0.9rem;
}

.project-title {
    font-family: var(--font-display);
    font-size: 1.5rem;
    font-weight: 300;
    letter-spacing: -0.02em;
}

.project-desc {
    font-size: 0.9375rem;
    color: var(--muted);
    flex: 1;
}

.project-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.project-tags li {
    font-size: 0.75rem;
    letter-spacing: 0.04em;
    color: var(--muted);
    padding: 0.3rem 0.75rem;
    border: 1px solid var(--border-soft);
    border-radius: 100px;
    background: rgba(255, 255, 255, 0.02);
}

.project-link {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    margin-top: 0.4rem;
    font-size: 0.9375rem;
    font-weight: 400;
    color: var(--text);
    width: fit-content;
}

.link-arrow {
    display: inline-block;
    color: var(--accent);
    transition: transform 0.35s var(--ease-out);
}

.project-card:hover .project-link .link-arrow {
    transform: translateX(5px);
}

.project-link:hover .link-arrow {
    transform: translateX(5px);
}

/* ---------- Skills ---------- */
.skills-groups {
    display: flex;
    flex-direction: column;
    gap: 2.5rem;
}

.skill-group {
    display: grid;
    grid-template-columns: 10rem 1fr;
    gap: 1.5rem;
    align-items: start;
    padding-top: 2rem;
    border-top: 1px solid var(--border-soft);
}

.skill-group-title {
    font-family: var(--font-display);
    font-size: 1.125rem;
    font-weight: 300;
    color: var(--muted);
}

.skill-list {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
}

.skill-list li {
    padding: 0.6rem 1.3rem;
    font-size: 0.9375rem;
    color: var(--muted);
    border: 1px solid var(--border-soft);
    border-radius: 100px;
    background: rgba(255, 255, 255, 0.02);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    transition: color 0.35s var(--ease-out), border-color 0.35s var(--ease-out),
                transform 0.35s var(--ease-out), background-color 0.35s var(--ease-out);
    cursor: default;
}

.skill-list li:hover {
    color: var(--text);
    border-color: rgba(0, 170, 255, 0.45);
    background: rgba(0, 170, 255, 0.08);
    transform: translateY(-3px);
}

/* ---------- Process ---------- */
.process-steps {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1.25rem;
    counter-reset: step;
}

.process-step {
    position: relative;
    padding: 2rem 1.75rem;
    background: var(--surface);
    border: 1px solid var(--border-soft);
    border-radius: 16px;
    overflow: hidden;
    transition: border-color 0.4s var(--ease-out), transform 0.4s var(--ease-out),
                opacity 0.9s var(--ease-out);
}

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

/* Progress line that draws in as each step reveals */
.process-step::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    height: 1px;
    width: 100%;
    background: linear-gradient(90deg, var(--accent-deep), transparent);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 1.1s var(--ease-out) 0.25s;
}

.process-step.in-view::before {
    transform: scaleX(1);
}

.step-number {
    display: block;
    font-family: var(--font-display);
    font-size: 2.25rem;
    font-weight: 300;
    letter-spacing: -0.03em;
    color: var(--dim);
    margin-bottom: 1.25rem;
    transition: color 0.4s var(--ease-out);
}

.process-step:hover .step-number {
    color: var(--accent);
}

.process-step h3 {
    font-family: var(--font-display);
    font-size: 1.25rem;
    font-weight: 300;
    margin-bottom: 0.75rem;
}

.process-step p {
    font-size: 0.9rem;
    color: var(--muted);
}

/* Stagger the step reveals */
.process-step:nth-child(2) { transition-delay: 0.1s; }
.process-step:nth-child(3) { transition-delay: 0.2s; }
.process-step:nth-child(4) { transition-delay: 0.3s; }

/* ---------- Testimonials ---------- */
.testimonial-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.25rem;
}

.testimonial-card {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    gap: 2rem;
    padding: 2rem;
    background: var(--surface);
    border: 1px solid var(--border-soft);
    border-radius: 16px;
    transition: border-color 0.4s var(--ease-out), transform 0.4s var(--ease-out),
                opacity 0.9s var(--ease-out);
}

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

.testimonial-card blockquote p {
    font-size: 1rem;
    line-height: 1.65;
    color: var(--muted);
}

.testimonial-card figcaption {
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
}

.testimonial-name {
    font-weight: 400;
    color: var(--text);
}

.testimonial-role {
    font-size: 0.8125rem;
    color: var(--muted);
}

.testimonial-card:nth-child(2) { transition-delay: 0.1s; }
.testimonial-card:nth-child(3) { transition-delay: 0.2s; }

/* ---------- Contact ---------- */
.contact-inner {
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.contact-heading {
    font-family: var(--font-display);
    font-feature-settings: "cv11", "cv06", "salt";
    font-size: clamp(2.5rem, 7vw, 5.5rem);
    font-weight: 300;
    letter-spacing: -0.03em;
    line-height: 1.15;
    cursor: default;
    /* Extra painted area below the baseline: background-clip: text only
       renders glyphs where the element box has background, so descenders
       (like the "g") get cropped without this padding */
    padding-bottom: 0.15em;
    margin-bottom: 1.35rem;
}

.contact-sub {
    max-width: 30rem;
    color: var(--muted);
    margin-bottom: 2.75rem;
}

.contact-actions {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 1rem;
}

/* ---------- Footer ---------- */
.site-footer {
    border-top: 1px solid var(--border-soft);
    padding: 2.5rem 1.5rem;
}

.footer-inner {
    max-width: var(--content-width);
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1.5rem;
    flex-wrap: wrap;
}

.footer-copy {
    font-size: 0.875rem;
    color: var(--muted);
}

.footer-links {
    display: flex;
    gap: 1.75rem;
}

.footer-links a {
    font-size: 0.875rem;
    color: var(--muted);
    transition: color 0.3s var(--ease-out);
}

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

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
    .about-grid,
    .project-grid {
        grid-template-columns: 1fr;
    }

    .about-card-philosophy {
        grid-column: span 1;
    }

    .about-stats {
        grid-template-columns: 1fr;
    }

    .process-steps {
        grid-template-columns: repeat(2, 1fr);
    }

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

    .skill-group {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
}

@media (max-width: 600px) {
    .nav-links {
        display: none;
    }

    .site-nav {
        width: calc(100% - 2rem);
    }

    .process-steps {
        grid-template-columns: 1fr;
    }

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

/* ---------- Reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }

    .reveal,
    .process-step,
    .testimonial-card {
        opacity: 1;
        transform: none;
        transition: none;
    }

    .word-reveal .word {
        color: var(--text);
        filter: none;
        transition: none;
    }

    .glitch-active::before,
    .glitch-active::after {
        animation: none;
        opacity: 0;
    }

    .scroll-line {
        animation: none;
    }

    .hero-title-wrap::after {
        animation: none;
        transform: scaleX(1);
        opacity: 1;
        box-shadow:
            0 0 2px var(--accent),
            0 0 8px rgba(0, 170, 255, 0.7),
            0 0 18px rgba(0, 170, 255, 0.4);
    }

    .hero-role.glitch-active::before,
    .hero-role.glitch-active::after {
        animation: none;
        opacity: 0;
    }

    .hero-role-wrap.is-flickering-out,
    .hero-role-wrap.is-flickering-in {
        animation: none;
        opacity: 1;
    }

    .hero-role-wrap::after {
        animation: none;
    }

    .about-portrait img {
        animation: none;
        box-shadow:
            0 0 2px var(--accent),
            0 0 6px rgba(0, 170, 255, 0.35),
            0 0 12px rgba(0, 170, 255, 0.18),
            0 24px 64px rgba(0, 0, 0, 0.5);
    }

    .nav-links a.nav-underline-draw::after {
        animation: none;
        transform: scaleX(1);
        box-shadow:
            0 0 2px rgb(250, 250, 250),
            0 0 6px rgba(250, 250, 250, 0.55),
            0 0 14px rgba(250, 250, 250, 0.3);
    }

    .process-step::before {
        transition: none;
        transform: scaleX(1);
    }
}

/* ---------- Case study pages ---------- */
.case-study-page .scroll-hint {
    display: none;
}

.case-study {
    padding-top: 5.5rem;
}

.case-hero-compact.section {
    padding-bottom: clamp(1.5rem, 3vh, 2.5rem);
}

.case-hero-inner {
    max-width: 46rem;
    margin-inline: auto;
    text-align: center;
}

.case-back {
    display: inline-block;
    font-size: 0.875rem;
    color: var(--muted);
    margin-bottom: 2rem;
    transition: color 0.3s var(--ease-out);
}

.case-back:hover {
    color: var(--accent);
}

.case-eyebrow {
    font-size: 0.8125rem;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--accent);
    margin-bottom: 1rem;
}

.case-title {
    font-family: var(--font-display);
    font-size: clamp(2.5rem, 7vw, 4.5rem);
    font-weight: 300;
    letter-spacing: -0.03em;
    line-height: 1.05;
    margin-bottom: 1.5rem;
}

.case-lede {
    font-size: clamp(1.0625rem, 1.6vw, 1.25rem);
    color: var(--muted);
    line-height: 1.65;
    margin-bottom: 1.5rem;
}

.case-meta {
    display: flex;
    flex-wrap: nowrap;
    justify-content: center;
    gap: 1.5rem 2rem;
    margin-bottom: 1.5rem;
    font-size: 0.9375rem;
}

.case-meta li {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.35rem;
    text-align: center;
    flex: 0 0 auto;
}

.case-meta-label {
    display: block;
    font-size: 0.75rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--text);
    margin-bottom: 0;
}

.case-meta-line {
    display: block;
    width: 2.5rem;
    height: 1px;
    border-radius: 1px;
    background: var(--accent);
    box-shadow: 0 0 4px rgba(0, 170, 255, 0.35);
}

.case-meta-value {
    color: var(--muted);
    white-space: nowrap;
}

.case-tags {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.5rem;
    margin-bottom: 2rem;
}

.case-tags li {
    font-size: 0.8125rem;
    padding: 0.35rem 0.75rem;
    border: 1px solid var(--border-soft);
    border-radius: 999px;
    color: var(--muted);
}

.case-actions {
    display: flex;
    justify-content: center;
    gap: 1rem;
}

.case-cover,
.case-figure {
    margin: 0;
    padding: 0 1.5rem;
}

.case-cover img,
.case-figure img {
    display: block;
    width: min(100%, var(--content-width));
    height: auto;
    margin-inline: auto;
    border-radius: 16px;
    border: 1px solid var(--border-soft);
    object-fit: contain;
}

.case-cover {
    margin-bottom: var(--section-gap);
}

.case-cover figcaption,
.case-figure figcaption {
    width: min(100%, 42rem);
    margin: 1rem auto 0;
    text-align: center;
    font-size: 0.875rem;
    color: var(--muted);
    line-height: 1.5;
}

.case-figure {
    margin-bottom: clamp(4rem, 8vh, 6rem);
}

.case-block-tight.section {
    padding: clamp(2.25rem, 4.5vh, 3.5rem) 1.5rem;
}

.case-content-wide {
    max-width: 72rem;
    margin-inline: auto;
}

.case-block-inner {
    max-width: 42rem;
    margin-inline: auto;
}

.case-split,
.case-split-reverse {
    display: grid;
    gap: 2rem 3rem;
    align-items: center;
    margin-top: 4rem;
}

.case-heading + .case-split,
.case-heading + .case-split-reverse {
    margin-top: 1.5rem;
}

.case-split {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1.35fr);
}

.case-split-reverse {
    grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr);
}

.case-split-media {
    margin: 0;
}

.case-split-media img {
    display: block;
    width: 100%;
    height: auto;
    border-radius: 12px;
    border: 1px solid var(--border-soft);
    object-fit: contain;
}

.case-split-copy {
    color: var(--muted);
    font-size: 0.9375rem;
    line-height: 1.6;
}

.case-split-copy p + p {
    margin-top: 0.75rem;
}

.case-split-copy a {
    color: var(--accent);
    text-decoration: underline;
    text-underline-offset: 3px;
}

.case-split-title {
    font-family: var(--font-display);
    font-size: 1.0625rem;
    font-weight: 300;
    color: var(--text);
    margin-bottom: 0.45rem;
}

.case-heading {
    font-family: var(--font-display);
    font-size: clamp(1.75rem, 4vw, 2.25rem);
    font-weight: 300;
    letter-spacing: -0.02em;
    margin-bottom: 1.25rem;
    text-align: center;
}

.case-subheading {
    text-align: center;
    color: var(--muted);
    margin-bottom: 1.25rem;
}

.case-copy {
    color: var(--muted);
}

.case-copy p + p {
    margin-top: 1rem;
}

.case-copy a {
    color: var(--accent);
    text-decoration: underline;
    text-underline-offset: 3px;
}

.case-copy a:hover {
    color: var(--text);
}

.case-points {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    margin-top: 1.5rem;
    /* Bullets stay left-aligned for readability, but the block itself is
       centered so the section doesn't sit left-heavy under a centered heading */
    width: fit-content;
    max-width: 100%;
    margin-inline: auto;
}

.case-points li {
    position: relative;
    padding-left: 1.1rem;
    color: var(--muted);
    font-size: 0.9375rem;
}

.case-points li::before {
    content: "";
    position: absolute;
    left: 0;
    top: 0.55em;
    width: 4px;
    height: 4px;
    border-radius: 50%;
    background: var(--accent);
}

.case-research-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.25rem;
    margin-top: 1.25rem;
}

.case-research-wide {
    margin-top: 0;
}

.case-research-card strong {
    color: var(--text);
    font-weight: 500;
}

.case-research-card {
    padding: 1.35rem;
    background: var(--surface);
    border: 1px solid var(--border-soft);
    border-radius: 16px;
}

.case-research-card h3 {
    font-family: var(--font-display);
    font-size: 1.125rem;
    font-weight: 300;
    margin-bottom: 0.75rem;
}

.case-research-card p {
    font-size: 0.9375rem;
    color: var(--muted);
}

.case-research-card p + p {
    margin-top: 0.85rem;
}

.case-features {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    margin-top: 1.5rem;
}

.case-features h3 {
    font-family: var(--font-display);
    font-size: 1.0625rem;
    font-weight: 300;
    margin-bottom: 0.4rem;
}

.case-features p {
    font-size: 0.9375rem;
    color: var(--muted);
}

.case-outcome {
    text-align: center;
    margin-bottom: 1.5rem;
}

.case-stat {
    font-family: var(--font-display);
    font-size: clamp(2.5rem, 6vw, 3.5rem);
    font-weight: 300;
    letter-spacing: -0.03em;
    color: var(--accent);
    line-height: 1;
}

.case-stat-label {
    margin-top: 0.5rem;
    font-size: 0.9375rem;
    color: var(--muted);
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.case-footer {
    padding-bottom: 5rem;
}

.case-footer-inner {
    text-align: center;
}

.case-footer-label {
    font-size: 0.8125rem;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--dim);
    margin-bottom: 0.75rem;
}

.case-footer-link {
    font-family: var(--font-display);
    font-size: 1.25rem;
    color: var(--text);
    transition: color 0.3s var(--ease-out);
}

.case-footer-link:hover {
    color: var(--accent);
}

@media (max-width: 768px) {
    .case-research-grid {
        grid-template-columns: 1fr;
    }

    .case-meta {
        flex-wrap: wrap;
        gap: 1rem 1.25rem;
    }

    .case-split,
    .case-split-reverse {
        grid-template-columns: 1fr;
    }

    .case-split-media {
        max-width: 100%;
        margin-inline: auto;
    }

    .case-split-reverse .case-split-media {
        order: -1;
    }
}

/* ---------- Coming soon project cards ---------- */
.project-card-soon {
    cursor: default;
}

/* Neutralize the interactive lift so the card doesn't read as clickable */
.project-card-soon:hover {
    transform: none;
    border-color: var(--border-soft);
    box-shadow: none;
}

.project-card-soon .project-thumb,
.project-card-soon:hover .project-thumb {
    filter: saturate(0.5) brightness(0.75);
}

/* Frosted veil with faint scanlines over the unreleased thumbnail */
.project-thumb-soon::before {
    content: "";
    position: absolute;
    inset: 0;
    z-index: 1;
    background:
        repeating-linear-gradient(
            180deg,
            rgba(0, 170, 255, 0.05) 0 1px,
            transparent 1px 5px
        ),
        rgba(4, 8, 14, 0.5);
    backdrop-filter: blur(3px);
    -webkit-backdrop-filter: blur(3px);
}

.soon-badge {
    position: absolute;
    z-index: 2;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    display: inline-flex;
    align-items: center;
    gap: 0.6rem;
    padding: 0.55rem 1.15rem;
    border-radius: 999px;
    border: 1px solid rgba(0, 170, 255, 0.55);
    background: rgba(0, 170, 255, 0.08);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    font-size: 0.6875rem;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: var(--text);
    white-space: nowrap;
    animation: soon-glow 3.5s ease-in-out infinite;
}

.soon-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--accent);
    animation: soon-pulse 2.4s ease-in-out infinite;
}

@keyframes soon-glow {
    0%, 100% { box-shadow: 0 0 16px rgba(0, 170, 255, 0.18); }
    50% { box-shadow: 0 0 30px rgba(0, 170, 255, 0.38); }
}

@keyframes soon-pulse {
    0%, 100% {
        opacity: 0.45;
        transform: scale(0.85);
        box-shadow: 0 0 6px rgba(0, 170, 255, 0.5);
    }
    50% {
        opacity: 1;
        transform: scale(1.15);
        box-shadow: 0 0 10px rgba(0, 170, 255, 0.9);
    }
}

.project-link-soon {
    font-size: 0.875rem;
    letter-spacing: 0.06em;
    color: rgba(202, 202, 202, 0.5);
}

/* ---------- ACM graphics conveyor belt ---------- */
.acm-strip {
    margin-top: clamp(3.5rem, 7vh, 5.5rem);
}

.acm-marquee {
    --acm-w: 190px;
    --acm-w-hover: 250px;
    --acm-gap: 26px;
    /* Half the growth: the lane slides by this so the hovered graphic
       expands around its own centre instead of only pushing rightward */
    --acm-nudge: calc((var(--acm-w-hover) - var(--acm-w)) / 2);
    position: relative;
    overflow: hidden;
    width: 100%;
    /* One set of graphics is ~2570px wide. Keeping the visible window below
       that guarantees the same graphic is never on screen twice. */
    max-width: 2300px;
    /* Tall enough for a graphic at full hover size, so nothing below shifts.
       The extra room keeps the border beam and its bloom from being clipped
       as they travel along the top and bottom edges. */
    height: calc(var(--acm-w-hover) * 1024 / 819 + 30px);
    margin-inline: auto;
    -webkit-mask-image: linear-gradient(90deg, transparent, #000 7%, #000 93%, transparent);
    mask-image: linear-gradient(90deg, transparent, #000 7%, #000 93%, transparent);
}

.acm-marquee-track {
    width: max-content;
    height: 100%;
    animation: acm-scroll 60s linear infinite;
}

/* Freeze the belt only while the cursor is over an actual graphic */
.acm-marquee-track:has(.acm-marquee-item:hover) {
    animation-play-state: paused;
}

/* Travels exactly one set plus one gap, so the loop has no seam. Measured in
   pixels rather than percent so a graphic growing on hover cannot shift it. */
@keyframes acm-scroll {
    from { transform: translateX(0); }
    to { transform: translateX(calc(-12 * (var(--acm-w) + var(--acm-gap)))); }
}

.acm-marquee-lane {
    display: flex;
    align-items: center;
    height: 100%;
    gap: var(--acm-gap);
    transition: transform 0.45s var(--ease-out);
}

.acm-marquee-lane:has(.acm-marquee-item:hover) {
    transform: translateX(calc(var(--acm-nudge) * -1));
}

.acm-marquee-set {
    display: flex;
    align-items: center;
    height: 100%;
    gap: var(--acm-gap);
}

.acm-marquee-item {
    position: relative;
    flex: 0 0 auto;
    width: var(--acm-w);
    transition: width 0.45s var(--ease-out);
}

.acm-marquee-item:hover {
    width: var(--acm-w-hover);
}

.acm-marquee-item img {
    display: block;
    width: 100%;
    height: auto;
    border-radius: 12px;
    border: 1px solid var(--border-soft);
}

/* Two comets of light lapping the graphic's border while it is hovered, bright
   at the head and fading along the tail. A single conic gradient carries both
   heads 180deg apart, so they travel together and can never meet. The gradient
   is masked down to a thin ring around the edge. */
@property --acm-angle {
    syntax: "<angle>";
    initial-value: 0turn;
    inherits: false;
}

.acm-marquee-item::before,
.acm-marquee-item::after {
    content: "";
    position: absolute;
    inset: -2px;
    z-index: 1;
    border-radius: 14px;
    padding: 2px;
    background: conic-gradient(
        from var(--acm-angle),
        transparent 0deg,
        transparent 90deg,
        rgba(0, 170, 255, 0.06) 107deg,
        rgba(0, 170, 255, 0.22) 129deg,
        rgba(0, 170, 255, 0.55) 151deg,
        rgba(0, 170, 255, 0.95) 168deg,
        rgb(175, 233, 255) 180deg,
        transparent 180deg,
        transparent 270deg,
        rgba(0, 170, 255, 0.06) 287deg,
        rgba(0, 170, 255, 0.22) 309deg,
        rgba(0, 170, 255, 0.55) 331deg,
        rgba(0, 170, 255, 0.95) 348deg,
        rgb(175, 233, 255) 360deg
    );
    /* Punches out the middle so only the border ring paints */
    -webkit-mask:
        linear-gradient(#000 0 0) content-box,
        linear-gradient(#000 0 0);
    -webkit-mask-composite: xor;
    mask:
        linear-gradient(#000 0 0) content-box,
        linear-gradient(#000 0 0);
    mask-composite: exclude;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s var(--ease-out);
}

.acm-marquee-item::before {
    filter: drop-shadow(0 0 5px rgba(0, 170, 255, 0.9));
}

/* Second, blurred pass gives the heads their tube-light bloom */
.acm-marquee-item::after {
    inset: -4px;
    padding: 4px;
    border-radius: 16px;
    filter: blur(7px);
}

.acm-marquee-item:hover::before,
.acm-marquee-item:hover::after {
    animation-name: acm-beam;
    animation-duration: 3.4s;
    animation-iteration-count: infinite;
    /* A conic gradient sweeps at a constant *angular* rate, which drags the
       head across a rectangle's corners about 2.5x faster than its mid-edges.
       This curve is the inverse of that, so the heads hold an even pace. */
    animation-timing-function: linear(0, 0.0237, 0.0464, 0.0674, 0.0861, 0.1025, 0.1158, 0.1303, 0.1477, 0.1686, 0.193, 0.2205, 0.25, 0.2795, 0.307, 0.3314, 0.3523, 0.3697, 0.3842, 0.3975, 0.4139, 0.4326, 0.4536, 0.4763, 0.5, 0.5237, 0.5464, 0.5674, 0.5861, 0.6025, 0.6158, 0.6303, 0.6477, 0.6686, 0.693, 0.7205, 0.75, 0.7795, 0.807, 0.8314, 0.8523, 0.8697, 0.8842, 0.8975, 0.9139, 0.9326, 0.9536, 0.9763, 1);
}

.acm-marquee-item:hover::before {
    opacity: 1;
}

.acm-marquee-item:hover::after {
    opacity: 0.9;
}

@keyframes acm-beam {
    to { --acm-angle: 1turn; }
}

.acm-note {
    max-width: 40rem;
    margin: 2.25rem auto 0;
    text-align: center;
}

.acm-note-title {
    font-family: var(--font-display);
    font-size: clamp(1.125rem, 2vw, 1.375rem);
    font-weight: 300;
    letter-spacing: -0.01em;
    margin-bottom: 0.6rem;
}

.acm-note p {
    font-size: 0.9375rem;
    color: var(--muted);
}

@media (max-width: 768px) {
    .acm-marquee {
        --acm-w: 150px;
        --acm-w-hover: 190px;
        --acm-gap: 18px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .acm-marquee-track {
        animation: none;
    }

    .acm-marquee {
        overflow-x: auto;
    }

    .acm-marquee-item,
    .acm-marquee-lane {
        transition: none;
    }

    /* Steady ring instead of a travelling one */
    .acm-marquee-item:hover::before {
        animation: none;
        background: var(--accent);
    }

    .acm-marquee-item:hover::after {
        animation: none;
        background: rgba(0, 170, 255, 0.55);
    }
}

/* ---------- Kind words (awaiting recommendations) ---------- */
.kind-words {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 1.25rem;
    max-width: 44rem;
    margin-inline: auto;
    padding: 3rem 2rem;
    background: var(--surface);
    border: 1px solid var(--border-soft);
    border-radius: 20px;
}

/* Static variant of the coming-soon pill, centered in normal flow */
.kind-words-badge {
    position: static;
    transform: none;
}

.kind-words-lede {
    font-size: clamp(1.0625rem, 1.6vw, 1.1875rem);
    line-height: 1.6;
    color: var(--text);
}

.kind-words-note {
    font-size: 0.9375rem;
    color: var(--muted);
    max-width: 34rem;
}

@media (prefers-reduced-motion: reduce) {
    .soon-badge,
    .soon-dot {
        animation: none;
    }

    .soon-badge {
        box-shadow: 0 0 18px rgba(0, 170, 255, 0.22);
    }

    .soon-dot {
        opacity: 1;
        box-shadow: 0 0 8px rgba(0, 170, 255, 0.7);
    }
}
