/* ==========================================================================
   Portfolio v2: soft neo-brutalism + bento
   Standalone stylesheet (plain CSS, no Vite/Tailwind build needed).
   ========================================================================== */

/* ---------- Tokens ---------- */
:root {
    --bg: #fbf6ee;
    --bg-dot: rgba(20, 20, 20, 0.1);
    --surface: #ffffff;
    --surface-2: #f4ede1;
    --ink: #141414;
    --muted: #57534c;
    --line: #141414;
    --shadow: #141414;
    --hl: #c9f25a;

    --lime: #c9f25a;
    --pink: #ff9ecf;
    --lilac: #c8b8ff;
    --sun: #ffd84a;
    --mint: #7ee2c8;
    --orange: #ffae70;
    --on-accent: #141414;
    --on-accent-muted: rgba(20, 20, 20, 0.74);

    --footer-bg: #141414;
    --footer-ink: #fbf6ee;
    --star: #c9f25a;
    --error: #c4320a;

    --font-sans: "Bricolage Grotesque", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
    --font-serif: "Instrument Serif", ui-serif, Georgia, "Times New Roman", serif;
    --font-mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;

    --radius: 22px;
    --radius-sm: 14px;
    --bw: 2.5px;
    --border: var(--bw) solid var(--line);
    --shadow-sm: 3px 3px 0 var(--shadow);
    --shadow-md: 5px 5px 0 var(--shadow);
    --shadow-lg: 8px 8px 0 var(--shadow);
    --ease: cubic-bezier(.2, .7, .2, 1);
    --wrap: 1200px;
    --gutter: clamp(16px, 4vw, 40px);

    color-scheme: light;
}

html.dark {
    --bg: #131217;
    --bg-dot: rgba(246, 241, 231, 0.08);
    --surface: #1d1c23;
    --surface-2: #18171d;
    --ink: #f6f1e7;
    --muted: #b8b1a5;
    --line: #f6f1e7;
    --shadow: #f6f1e7;
    --hl: rgba(200, 184, 255, 0.4);

    --footer-bg: #0b0a0e;
    --footer-ink: #f6f1e7;
    --star: #8b6cff;
    --error: #ff9a85;

    color-scheme: dark;
}

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

html {
    scroll-behavior: smooth;
    scroll-padding-top: 96px;
    -webkit-text-size-adjust: 100%;
    overflow-x: hidden;
    overflow-x: clip;
}

body {
    margin: 0;
    background: var(--bg);
    color: var(--ink);
    font-family: var(--font-sans);
    font-size: 17px;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
    overflow-x: clip;
}

img { max-width: 100%; display: block; }
a { color: inherit; }
h1, h2, h3, h4 { font-weight: 800; }
p { margin: 0 0 1em; }
p:last-child { margin-bottom: 0; }

::selection { background: var(--lime); color: var(--on-accent); }

:focus-visible {
    outline: 3px solid var(--ink);
    outline-offset: 3px;
    border-radius: 8px;
}

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

.skip-link {
    position: absolute; left: 16px; top: -60px; z-index: 100;
    padding: 10px 16px; background: var(--lime); color: var(--on-accent);
    border: var(--border); border-radius: 999px; font-weight: 700; text-decoration: none;
}
.skip-link:focus { top: 16px; }

.wrap {
    width: 100%;
    max-width: var(--wrap);
    margin-inline: auto;
    padding-inline: var(--gutter);
}

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

mark {
    background: var(--lime);
    color: var(--on-accent);
    padding: 0 .22em;
    border-radius: 6px;
    font-weight: 700;
    -webkit-box-decoration-break: clone;
    box-decoration-break: clone;
}

/* Serif italic accent words inside headings */
h1 em, h2 em, .sec-title em {
    font-family: var(--font-serif);
    font-style: italic;
    font-weight: 400;
    letter-spacing: -0.01em;
}

.accent-lime   { --accent: var(--lime); }
.accent-pink   { --accent: var(--pink); }
.accent-lilac  { --accent: var(--lilac); }
.accent-sun    { --accent: var(--sun); }
.accent-mint   { --accent: var(--mint); }
.accent-orange { --accent: var(--orange); }

/* ---------- Icons ---------- */
.ico {
    width: 1.2em;
    height: 1.2em;
    flex-shrink: 0;
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}

/* ---------- Buttons ---------- */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: .5em;
    padding: .78em 1.25em;
    font: 650 1rem/1.1 var(--font-sans);
    text-decoration: none;
    white-space: nowrap;
    color: var(--on-accent);
    background: var(--surface);
    border: var(--border);
    border-radius: 999px;
    box-shadow: var(--shadow-sm);
    cursor: pointer;
    transition: transform .15s var(--ease), box-shadow .15s var(--ease), background-color .2s;
}
.btn:hover { transform: translate(-2px, -2px); box-shadow: var(--shadow-md); }
.btn:active { transform: translate(2px, 2px); box-shadow: 0 0 0 var(--shadow); }
.btn-surface { background: var(--surface); color: var(--ink); }
.btn-ink { background: var(--ink); color: var(--bg); }
.btn-lime { background: var(--lime); }
.btn-pink { background: var(--pink); }
.btn-sm { padding: .62em 1.05em; font-size: .92rem; }
.btn-block { width: 100%; }

.icon-btn {
    display: inline-grid;
    place-items: center;
    width: 42px;
    height: 42px;
    padding: 0;
    color: var(--ink);
    background: var(--surface);
    border: var(--border);
    border-radius: 50%;
    cursor: pointer;
    transition: transform .2s var(--ease), background-color .2s, color .2s;
}
.icon-btn:hover { transform: rotate(-12deg); background: var(--sun); color: var(--on-accent); }
.icon-btn .ico { width: 20px; height: 20px; }

/* ---------- Navigation ---------- */
.nav {
    position: fixed;
    inset: 14px 0 auto;
    z-index: 50;
    padding-inline: var(--gutter);
    pointer-events: none;
}

.nav-inner {
    position: relative;
    display: flex;
    align-items: center;
    gap: 10px;
    max-width: calc(var(--wrap) - 2 * 40px);
    margin-inline: auto;
    padding: 7px 7px 7px 8px;
    background: var(--surface);
    background: color-mix(in srgb, var(--surface) 86%, transparent);
    -webkit-backdrop-filter: blur(14px);
    backdrop-filter: blur(14px);
    border: var(--border);
    border-radius: 999px;
    box-shadow: var(--shadow-sm);
    pointer-events: auto;
    transition: box-shadow .2s;
}
.nav.is-scrolled .nav-inner { box-shadow: var(--shadow-md); }

.nav-brand {
    display: flex;
    align-items: center;
    gap: 10px;
    padding-right: 6px;
    font-size: 1.2rem;
    font-weight: 800;
    letter-spacing: -0.03em;
    text-decoration: none;
    border-radius: 999px;
}
.nav-brand img {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: 2px solid var(--line);
    object-fit: cover;
}

.brand-dot {
    display: inline-block;
    width: .4em;
    height: .4em;
    margin-left: 2px;
    background: var(--lime);
    border: 2px solid var(--line);
    border-radius: 50%;
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 2px;
    margin-inline: auto;
}
.nav-links a {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 8px 14px;
    color: var(--muted);
    font-weight: 550;
    font-size: .96rem;
    text-decoration: none;
    border-radius: 999px;
    transition: background-color .2s, color .2s;
}
.nav-links a:hover { color: var(--ink); background: var(--surface-2); }
.nav-links a.is-active {
    color: var(--on-accent);
    background: var(--lime);
    box-shadow: inset 0 0 0 2px var(--line);
}
.nav-links .ico { width: 15px; height: 15px; }

.nav-actions { display: flex; align-items: center; gap: 8px; }

.icon-btn .i-sun, html.dark .icon-btn .i-moon { display: none; }
html.dark .icon-btn .i-sun { display: block; }

.nav-burger { display: none; }
.nav-burger .i-close, .nav.is-open .nav-burger .i-menu { display: none; }
.nav.is-open .nav-burger .i-close { display: block; }

@media (max-width: 920px) {
    .nav-burger { display: inline-grid; }
    .nav-actions { margin-left: auto; }
    .nav-links {
        display: none;
        position: absolute;
        top: calc(100% + 10px);
        left: 0;
        right: 0;
        flex-direction: column;
        align-items: stretch;
        gap: 4px;
        padding: 12px;
        background: var(--surface);
        border: var(--border);
        border-radius: var(--radius);
        box-shadow: var(--shadow-md);
    }
    .nav.is-open .nav-links { display: flex; }
    .nav-links a { padding: 12px 16px; font-size: 1.15rem; }
}

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

/* ---------- Hero ---------- */
.hero {
    position: relative;
    padding: clamp(120px, 16vw, 168px) 0 clamp(64px, 8vw, 96px);
    overflow: hidden;
    isolation: isolate;
}

.hero::before {
    content: "";
    position: absolute;
    inset: 0;
    z-index: -1;
    background-image: radial-gradient(var(--bg-dot) 1.3px, transparent 1.3px);
    background-size: 22px 22px;
    -webkit-mask-image: radial-gradient(ellipse 80% 70% at 50% 40%, #000 30%, transparent 80%);
    mask-image: radial-gradient(ellipse 80% 70% at 50% 40%, #000 30%, transparent 80%);
}

.hero-bg { position: absolute; inset: 0; z-index: -2; pointer-events: none; }
.blob {
    position: absolute;
    border-radius: 50%;
    filter: blur(70px);
    opacity: .55;
}
.blob-1 { width: 420px; height: 420px; background: var(--lilac); top: -80px; right: 6%; }
.blob-2 { width: 360px; height: 360px; background: var(--lime); bottom: -60px; left: -80px; opacity: .45; }
.blob-3 { width: 300px; height: 300px; background: var(--pink); top: 40%; right: 30%; opacity: .35; }
html.dark .blob { opacity: .18; }

.hero-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.3fr) minmax(0, .9fr);
    gap: clamp(36px, 6vw, 80px);
    align-items: center;
}

.status-pill {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    margin: 0 0 26px;
    padding: 7px 14px 7px 11px;
    font: 500 .84rem/1.2 var(--font-mono);
    background: var(--surface);
    border: 2px solid var(--line);
    border-radius: 999px;
}
.pulse {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: #22c55e;
    box-shadow: 0 0 0 0 rgba(34, 197, 94, .6);
    animation: pulse 2s infinite;
}
@keyframes pulse {
    70% { box-shadow: 0 0 0 10px rgba(34, 197, 94, 0); }
    100% { box-shadow: 0 0 0 0 rgba(34, 197, 94, 0); }
}

.hero-hi {
    margin: 0 0 4px;
    font-size: clamp(1.25rem, 2.4vw, 1.65rem);
    font-weight: 600;
    letter-spacing: -0.02em;
}
.wave { display: inline-block; transform-origin: 70% 70%; animation: wave 2.6s ease-in-out infinite; }
@keyframes wave {
    0%, 60%, 100% { transform: rotate(0); }
    10%, 30% { transform: rotate(14deg); }
    20% { transform: rotate(-8deg); }
    40% { transform: rotate(-4deg); }
    50% { transform: rotate(10deg); }
}

.hero-name {
    margin: 0 0 24px;
    font-size: clamp(3rem, 7.6vw, 6.4rem);
    line-height: .9;
    letter-spacing: -0.05em;
    font-variation-settings: "opsz" 96;
}
.hero-name em { display: inline-block; padding-right: .08em; font-size: 1.06em; }

.hero-line {
    max-width: 30ch;
    margin: 0 0 18px;
    font-size: clamp(1.25rem, 2.3vw, 1.6rem);
    font-weight: 600;
    line-height: 1.4;
    letter-spacing: -0.02em;
}
.rotator {
    display: inline-block;
    margin-left: .1em;
    padding: 0 .35em;
    color: var(--on-accent);
    background: var(--lime);
    border: var(--border);
    border-radius: 10px;
    box-shadow: var(--shadow-sm);
    rotate: -2deg;
}
.rotator-word { display: inline-block; transition: opacity .28s var(--ease), transform .28s var(--ease); }
.rotator-word.is-out { opacity: 0; transform: translateY(-45%); }

.hero-bio {
    max-width: 52ch;
    margin: 0 0 30px;
    color: var(--muted);
    font-size: 1.08rem;
}

.hero-ctas { display: flex; flex-wrap: wrap; gap: 12px; margin-bottom: 30px; }

.socials {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    margin: 0;
    padding: 0;
    list-style: none;
}
.socials-label { margin-right: 4px; color: var(--muted); font: 500 .8rem var(--font-mono); }
.social {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    font: 500 .82rem/1.2 var(--font-mono);
    text-decoration: none;
    background: var(--surface);
    border: 2px solid var(--line);
    border-radius: 999px;
    transition: background-color .2s, color .2s, transform .15s var(--ease);
}
.social:hover { color: var(--on-accent); background: var(--sun); transform: translateY(-2px) rotate(-2deg); }
.social .ico { width: 15px; height: 15px; }

/* Polaroid + stickers */
.hero-visual { position: relative; padding: 20px 10px; }

.polaroid {
    margin: 0;
    padding: 12px 12px 0;
    background: var(--surface);
    border: var(--border);
    border-radius: 20px;
    box-shadow: var(--shadow-lg);
    rotate: 2.5deg;
    transition: rotate .4s var(--ease), transform .4s var(--ease);
}
.polaroid:hover { rotate: 0deg; transform: scale(1.01); }
.polaroid img {
    width: 100%;
    height: auto;
    aspect-ratio: 4 / 5;
    object-fit: cover;
    border: 2px solid var(--line);
    border-radius: 12px;
}
.polaroid figcaption {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 10px;
    padding: 12px 6px 14px;
    font: italic 400 1.7rem/1 var(--font-serif);
}
.polaroid figcaption span { color: var(--muted); font: 500 .74rem var(--font-mono); }

.sticker {
    position: absolute;
    z-index: 2;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 14px;
    font-weight: 700;
    font-size: .95rem;
    white-space: nowrap;
    border: var(--bw) solid #141414;
    border-radius: 999px;
    box-shadow: 3px 3px 0 #141414;
    animation: float 6s ease-in-out infinite;
}
.sticker-1 { top: 7%;     left: -7%;   rotate: -8deg; }
.sticker-2 { top: 34%;    right: -9%;  rotate: 6deg;  animation-delay: -1.5s; }
.sticker-3 { bottom: 28%; left: -11%;  rotate: -4deg; animation-delay: -3s; }
.sticker-4 { bottom: 6%;  right: -5%;  rotate: 5deg;  animation-delay: -4.5s; }
@keyframes float { 50% { translate: 0 -9px; } }

@media (max-width: 920px) {
    .hero-grid { grid-template-columns: 1fr; }
    .hero-visual { width: min(400px, 100%); margin-inline: auto; padding: 20px 28px; }
}
@media (max-width: 520px) {
    .sticker { font-size: .8rem; padding: 6px 11px; }
    .sticker-1 { left: 0; }
    .sticker-2 { right: 0; }
    .sticker-3 { left: 0; }
    .sticker-4 { right: 4px; }
}

/* ---------- Marquee ---------- */
.marquee {
    position: relative;
    z-index: 2;
    margin: 0 -24px;
    padding: 16px 0;
    overflow: hidden;
    color: var(--bg);
    background: var(--ink);
    border-block: var(--border);
    rotate: -1.2deg;
}
.marquee-track { display: flex; width: max-content; animation: marquee 50s linear infinite; }
.marquee:hover .marquee-track { animation-play-state: paused; }
.marquee-list { display: flex; flex-shrink: 0; margin: 0; padding: 0; list-style: none; }
.marquee-list li {
    display: flex;
    align-items: center;
    gap: 24px;
    padding-right: 24px;
    font-size: clamp(1.1rem, 2vw, 1.5rem);
    font-weight: 700;
    letter-spacing: -0.01em;
    white-space: nowrap;
}
.ico-star { width: 20px; height: 20px; color: var(--star); }
@keyframes marquee { to { transform: translateX(-50%); } }

/* ---------- Sections ---------- */
.section { position: relative; padding: clamp(80px, 11vw, 136px) 0; }
.section-alt { background: var(--surface-2); border-block: var(--border); }

.sec-head { max-width: 780px; margin-bottom: clamp(36px, 5vw, 60px); }
.kicker {
    display: inline-block;
    margin-bottom: 18px;
    padding: 7px 13px;
    font: 700 .76rem/1 var(--font-mono);
    letter-spacing: .07em;
    text-transform: uppercase;
    background: var(--surface);
    border: 2px solid var(--line);
    border-radius: 999px;
}
.sec-title {
    margin: 0 0 16px;
    font-size: clamp(2.5rem, 6.4vw, 4.75rem);
    line-height: .95;
    letter-spacing: -0.045em;
    font-variation-settings: "opsz" 96;
}
.sec-title em {
    padding: 0 .1em;
    background: linear-gradient(transparent 60%, var(--hl) 60%, var(--hl) 90%, transparent 90%);
}
.sec-sub { max-width: 56ch; margin: 0; color: var(--muted); font-size: 1.15rem; }

/* ---------- Cards ---------- */
[data-reveal] {
    transition: opacity .7s var(--ease) var(--d, 0s), translate .7s var(--ease) var(--d, 0s);
}

.card {
    position: relative;
    background: var(--surface);
    border: var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow-md);
    transition: transform .2s var(--ease), box-shadow .2s var(--ease),
                opacity .7s var(--ease) var(--d, 0s), translate .7s var(--ease) var(--d, 0s);
}
.card-hover:hover { transform: translate(-3px, -3px); box-shadow: var(--shadow-lg); }

.chips { display: flex; flex-wrap: wrap; gap: 8px; margin: 0; padding: 0; list-style: none; }
.chip {
    padding: 5px 11px;
    font: 500 .78rem/1.25 var(--font-mono);
    background: var(--surface);
    border: 2px solid var(--line);
    border-radius: 999px;
}

.num { font: 700 .8rem var(--font-mono); letter-spacing: .06em; color: var(--muted); }

.card-title { margin: 0 0 16px; font-size: 1.3rem; letter-spacing: -0.02em; }
.mini-label {
    margin: 0 0 8px;
    color: var(--muted);
    font: 700 .72rem var(--font-mono);
    letter-spacing: .08em;
    text-transform: uppercase;
}

/* ---------- Bento ---------- */
.bento {
    display: grid;
    gap: 18px;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    grid-template-areas:
        "intro   intro   intro   stats"
        "data    dev     founder stats"
        "tools   tools   certs   cta";
}
.bento > * { padding: clamp(22px, 2.6vw, 30px); }
.b-intro   { grid-area: intro; }
.b-stats   { grid-area: stats; }
.b-data    { grid-area: data; }
.b-dev     { grid-area: dev; }
.b-founder { grid-area: founder; }
.b-tools   { grid-area: tools; }
.b-certs   { grid-area: certs; }
.b-cta     { grid-area: cta; }

.b-intro { display: flex; flex-direction: column; justify-content: center; }
.intro-big {
    margin: 0 0 14px;
    font-size: clamp(1.4rem, 2.7vw, 2.1rem);
    font-weight: 650;
    line-height: 1.22;
    letter-spacing: -0.025em;
}
.b-intro .muted { max-width: 60ch; font-size: 1.05rem; }

.tag-sticker {
    position: absolute;
    top: -17px;
    right: 26px;
    padding: 6px 12px;
    font: 700 .78rem var(--font-mono);
    border: var(--bw) solid #141414;
    border-radius: 999px;
    box-shadow: 3px 3px 0 #141414;
    rotate: 3deg;
}

.b-stats { display: flex; flex-direction: column; justify-content: space-between; gap: 6px; }
.stat { padding-bottom: 14px; border-bottom: 2px dashed var(--line); }
.stat:last-child { padding-bottom: 0; border-bottom: 0; }
.stat-num {
    margin: 0;
    font-size: clamp(2.3rem, 3.8vw, 3.1rem);
    font-weight: 800;
    line-height: 1;
    letter-spacing: -0.05em;
}
.stat-label { margin: 6px 0 0; color: var(--muted); font: 500 .8rem/1.35 var(--font-mono); }

.era { --line: #141414; border-color: var(--line); }
.era h3 { margin: 14px 0 8px; font-size: 1.3rem; line-height: 1.15; letter-spacing: -0.02em; }
.era p { margin: 0; color: var(--on-accent-muted); font-size: .96rem; line-height: 1.55; }
.era-icon {
    display: grid;
    place-items: center;
    width: 50px;
    height: 50px;
    font-size: 1.5rem;
    background: #fff;
    border: var(--bw) solid #141414;
    border-radius: 14px;
    rotate: -6deg;
}

.tool-groups { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px 24px; }

.certs { display: flex; flex-direction: column; margin: 0; padding: 0; list-style: none; }
.certs li {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 12px 0;
    font-weight: 600;
    line-height: 1.35;
    border-top: 2px dashed var(--line);
}
.certs li:first-child { padding-top: 0; border-top: 0; }
.certs .ico { margin-top: 2px; }

.b-cta {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    gap: 18px;
    font-size: 1.45rem;
    font-weight: 800;
    line-height: 1.1;
    letter-spacing: -0.03em;
    text-decoration: none;
    --line: #141414;
    border-color: var(--line);
}
.b-cta:hover { transform: translate(-3px, -3px); box-shadow: var(--shadow-lg); }
.cta-arrow {
    display: grid;
    place-items: center;
    align-self: flex-end;
    width: 54px;
    height: 54px;
    background: #fff;
    border: var(--bw) solid #141414;
    border-radius: 50%;
    transition: transform .25s var(--ease);
}
.b-cta:hover .cta-arrow { transform: translateY(4px) rotate(-12deg); }

@media (max-width: 1023px) {
    .bento {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        grid-template-areas:
            "intro   intro"
            "data    dev"
            "founder certs"
            "stats   stats"
            "tools   tools"
            "cta     cta";
    }
    .b-stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 18px; }
    .stat, .stat:last-child { padding: 0 0 0 16px; border-bottom: 0; border-left: 2px dashed var(--line); }
    .stat:first-child { padding-left: 0; border-left: 0; }
    .b-cta { flex-direction: row; align-items: center; }
    .cta-arrow { align-self: auto; }
}
@media (max-width: 639px) {
    .bento {
        grid-template-columns: minmax(0, 1fr);
        grid-template-areas: "intro" "data" "dev" "founder" "stats" "tools" "certs" "cta";
    }
    .b-intro { padding-top: 36px; }
    .b-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .stat:nth-child(3) { padding-left: 0; border-left: 0; }
    .tool-groups { grid-template-columns: minmax(0, 1fr); }
}

/* ---------- Data projects ---------- */
.grid-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 26px; }

.project { display: flex; flex-direction: column; overflow: hidden; }
.project-media {
    aspect-ratio: 16 / 10;
    overflow: hidden;
    background: #fff;
    border-bottom: var(--border);
}
.project-media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform .5s var(--ease);
}
.project:hover .project-media img { transform: scale(1.04); }
.project-body { display: flex; flex: 1; flex-direction: column; gap: 10px; padding: 22px 24px 26px; }
.project h3 { margin: 0; font-size: 1.45rem; line-height: 1.15; letter-spacing: -0.025em; }
.project p { margin: 0; color: var(--muted); }
.project .chips { margin-top: auto; padding-top: 8px; }

@media (max-width: 760px) {
    .grid-2 { grid-template-columns: minmax(0, 1fr); }
}

/* ---------- Web projects ---------- */
.web-list { display: flex; flex-direction: column; gap: clamp(56px, 8vw, 96px); }

.web-item {
    display: grid;
    grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr);
    gap: clamp(28px, 5vw, 64px);
    align-items: center;
}
.web-item:nth-child(even) .web-media { order: 2; }

.web-media { display: block; text-decoration: none; }
.browser {
    overflow: hidden;
    background: var(--surface);
    border: var(--border);
    border-radius: 18px;
    box-shadow: var(--shadow-lg);
    rotate: -1.5deg;
    transition: rotate .35s var(--ease), transform .35s var(--ease);
}
.web-item:nth-child(even) .browser { rotate: 1.5deg; }
.web-item:hover .browser { rotate: 0deg; transform: translateY(-4px); }

.browser-bar {
    display: flex;
    align-items: center;
    gap: 7px;
    padding: 10px 14px;
    background: var(--surface-2);
    border-bottom: var(--border);
}
.browser-bar span { width: 12px; height: 12px; border: 2px solid var(--line); border-radius: 50%; }
.browser-bar span:nth-child(1) { background: var(--pink); }
.browser-bar span:nth-child(2) { background: var(--sun); }
.browser-bar span:nth-child(3) { background: var(--mint); }
.browser-bar p {
    flex: 1;
    min-width: 0;
    margin: 0 0 0 8px;
    padding: 3px 12px;
    overflow: hidden;
    font: 500 .76rem var(--font-mono);
    text-overflow: ellipsis;
    white-space: nowrap;
    background: var(--surface);
    border: 2px solid var(--line);
    border-radius: 999px;
}
.browser img { width: 100%; aspect-ratio: 16 / 10; object-fit: cover; object-position: left top; }

.web-copy h3 {
    margin: 8px 0 12px;
    font-size: clamp(1.75rem, 3.2vw, 2.5rem);
    line-height: 1.02;
    letter-spacing: -0.035em;
}
.web-copy p { margin: 0 0 18px; color: var(--muted); }
.web-copy .chips { margin-bottom: 24px; }

@media (max-width: 860px) {
    .web-item { grid-template-columns: minmax(0, 1fr); }
    .web-item:nth-child(even) .web-media { order: 0; }
}

/* ---------- Startups ---------- */
.grid-3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px; }

.startup { display: flex; flex-direction: column; overflow: hidden; }
.startup:hover { transform: translate(-3px, -3px) rotate(-.6deg); box-shadow: 8px 8px 0 var(--shadow); }
.startup:focus-within { outline: 3px solid var(--ink); outline-offset: 4px; }

.startup-media {
    position: relative;
    aspect-ratio: 16 / 10;
    overflow: hidden;
    background: #fff;
    border-bottom: var(--border);
}
.startup-media img { width: 100%; height: 100%; object-fit: cover; object-position: left top; transition: transform .5s var(--ease); }
.startup:hover .startup-media img { transform: scale(1.05); }
.startup-cat {
    position: absolute;
    left: 12px;
    bottom: 12px;
    padding: 5px 11px;
    font: 700 .74rem var(--font-mono);
    color: var(--on-accent);
    background: var(--accent);
    border: 2px solid #141414;
    border-radius: 999px;
    box-shadow: 2px 2px 0 #141414;
    rotate: -3deg;
}

.startup-body { display: flex; flex: 1; flex-direction: column; gap: 10px; padding: 20px 22px 24px; }
.startup h3 {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin: 0;
    font-size: 1.45rem;
    letter-spacing: -0.03em;
}
.startup h3 a { text-decoration: none; }
.startup h3 a.stretched:focus-visible { outline: none; }
.stretched::after { content: ""; position: absolute; inset: 0; z-index: 1; }
/* The round arrow opens the live site and sits above the card-wide link */
.go {
    position: relative;
    z-index: 2;
    display: grid;
    place-items: center;
    flex-shrink: 0;
    width: 38px;
    height: 38px;
    color: var(--on-accent);
    background: var(--accent);
    border: 2px solid #141414;
    border-radius: 50%;
    transition: rotate .25s var(--ease), transform .15s var(--ease);
}
.go .ico { width: 18px; height: 18px; }
.go:hover { transform: scale(1.12); }
.go:focus-visible { outline: 3px solid var(--ink); outline-offset: 2px; }
.startup:hover .go { rotate: 45deg; }
.startup p { margin: 0; color: var(--muted); font-size: .97rem; }
.startup p strong { color: var(--ink); }
.startup .chips { margin-top: auto; padding-top: 6px; }

@media (max-width: 1023px) { .grid-3 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 639px)  { .grid-3 { grid-template-columns: minmax(0, 1fr); } }

/* ---------- Business band ---------- */
.biz {
    /* Always light-on-lime, regardless of theme */
    --ink: #141414;
    --bg: #fbf6ee;
    --surface: #ffffff;
    --line: #141414;
    --shadow: #141414;
    --muted: rgba(20, 20, 20, .76);
    /* composite tokens resolve at :root, so redeclare them with the local values */
    --border: var(--bw) solid var(--line);
    --shadow-sm: 3px 3px 0 var(--shadow);
    --shadow-md: 5px 5px 0 var(--shadow);
    --shadow-lg: 8px 8px 0 var(--shadow);

    position: relative;
    padding: clamp(64px, 9vw, 112px) 0;
    color: var(--ink);
    background: var(--lime);
    border-block: var(--border);
    overflow: hidden;
}
.biz::after {
    content: "✦";
    position: absolute;
    right: -30px;
    bottom: -90px;
    font-size: 340px;
    line-height: 1;
    color: rgba(20, 20, 20, .07);
    pointer-events: none;
}
.biz-inner {
    position: relative;
    z-index: 1;
    display: grid;
    grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr);
    gap: clamp(32px, 5vw, 64px);
    align-items: center;
}
.biz h2 {
    margin: 0 0 16px;
    font-size: clamp(2.3rem, 5.4vw, 4.2rem);
    line-height: .95;
    letter-spacing: -0.045em;
}
.biz h2 em { display: block; }
.biz p { max-width: 46ch; margin: 0 0 26px; color: var(--muted); font-size: 1.12rem; }
.biz-ctas { display: flex; flex-wrap: wrap; gap: 12px; }
.biz-chips { display: flex; flex-wrap: wrap; gap: 12px; margin: 0; padding: 0; list-style: none; }
.biz-chips li {
    padding: 11px 18px;
    font-weight: 700;
    font-size: 1.05rem;
    background: #fff;
    border: var(--border);
    border-radius: 999px;
    box-shadow: var(--shadow-sm);
    transition: rotate .2s var(--ease);
}
.biz-chips li:nth-child(odd)  { rotate: -2deg; }
.biz-chips li:nth-child(even) { rotate: 2deg; }
.biz-chips li:nth-child(3n)   { background: var(--pink); }
.biz-chips li:nth-child(4n)   { background: var(--lilac); }
.biz-chips li:hover { rotate: 0deg; }

@media (max-width: 860px) {
    .biz-inner { grid-template-columns: minmax(0, 1fr); }
}

/* ---------- Wins ---------- */
.wins { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 26px; }

.win { display: flex; flex-direction: column; gap: 22px; padding: clamp(20px, 2.6vw, 28px); }
.win-head { display: flex; align-items: flex-start; gap: 16px; }
.win-num {
    display: grid;
    place-items: center;
    flex-shrink: 0;
    width: 48px;
    height: 48px;
    font-size: 1.35rem;
    font-weight: 800;
    color: var(--on-accent);
    background: var(--accent);
    border: var(--bw) solid #141414;
    border-radius: 14px;
    rotate: -6deg;
}
.win h3 { margin: 2px 0 8px; font-size: 1.3rem; line-height: 1.2; letter-spacing: -0.02em; }
.win p { margin: 0; color: var(--muted); font-size: .97rem; }

.dump {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 12px;
    margin: auto 0 0;
    padding: 6px 4px 4px;
    list-style: none;
}
.shot {
    position: relative;
    display: block;
    width: 100%;
    padding: 5px 5px 14px;
    background: #fff;
    border: 2px solid #141414;
    border-radius: 8px;
    box-shadow: var(--shadow-sm);
    cursor: zoom-in;
    transition: rotate .2s var(--ease), transform .2s var(--ease);
}
.dump li:nth-child(4n+1) .shot { rotate: -4deg; }
.dump li:nth-child(4n+2) .shot { rotate: 3deg; }
.dump li:nth-child(4n+3) .shot { rotate: -2deg; }
.dump li:nth-child(4n+4) .shot { rotate: 4deg; }
.shot:hover, .shot:focus-visible { z-index: 2; rotate: 0deg; transform: scale(1.08); }
.shot img { width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: 4px; }

@media (max-width: 860px) {
    .wins { grid-template-columns: minmax(0, 1fr); }
}

/* ---------- Contact ---------- */
.contact-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: clamp(36px, 6vw, 72px);
    align-items: start;
}
.contact-copy > p { max-width: 48ch; color: var(--muted); font-size: 1.1rem; }
.contact-copy > p em { font-family: var(--font-serif); font-size: 1.15em; color: var(--ink); }

.contact-links { display: flex; flex-direction: column; gap: 12px; margin: 30px 0 0; padding: 0; list-style: none; }
.contact-link {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 10px 16px 10px 10px;
    text-decoration: none;
    background: var(--surface);
    border: var(--border);
    border-radius: 18px;
    box-shadow: var(--shadow-sm);
    transition: transform .15s var(--ease), box-shadow .15s var(--ease);
}
.contact-link:hover { transform: translate(-2px, -2px); box-shadow: var(--shadow-md); }
.cl-icon {
    display: grid;
    place-items: center;
    flex-shrink: 0;
    width: 44px;
    height: 44px;
    border: 2px solid #141414;
    border-radius: 12px;
}
.cl-text { min-width: 0; font-weight: 650; overflow-wrap: anywhere; }
.cl-text small {
    display: block;
    color: var(--muted);
    font: 500 .7rem var(--font-mono);
    letter-spacing: .08em;
    text-transform: uppercase;
}
.cl-arrow { margin-left: auto; transition: transform .2s var(--ease); }
.contact-link:hover .cl-arrow { transform: translate(3px, -3px); }

.form-card { padding: clamp(24px, 3.2vw, 36px); }
.form-card h3 { margin: 0 0 4px; font-size: 1.7rem; letter-spacing: -0.03em; }
.form-card > .muted { margin: 0 0 24px; }

.field { display: block; margin-bottom: 16px; }
.field span { display: block; margin-bottom: 6px; font: 700 .78rem var(--font-mono); letter-spacing: .02em; }
.field input,
.field textarea {
    width: 100%;
    padding: 13px 15px;
    font: 500 1rem/1.5 var(--font-sans);
    color: var(--ink);
    background: var(--bg);
    border: var(--border);
    border-radius: var(--radius-sm);
    transition: box-shadow .15s var(--ease), background-color .15s;
}
.field textarea { min-height: 140px; resize: vertical; }
.field input:focus,
.field textarea:focus {
    outline: none;
    background: var(--surface);
    box-shadow: 4px 4px 0 var(--pink);
}
.field-error { margin: -8px 0 14px; color: var(--error); font: 600 .8rem var(--font-mono); }
.form .btn { margin-top: 6px; font-size: 1.05rem; }

@media (max-width: 900px) {
    .contact-grid { grid-template-columns: minmax(0, 1fr); }
}

/* ---------- Hero: news pill ---------- */
.hero-pills { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-bottom: 26px; }
.hero-pills .status-pill { margin: 0; }
.news-pill {
    display: inline-flex;
    align-items: center;
    gap: 9px;
    max-width: 100%;
    padding: 5px 13px 5px 6px;
    font-weight: 650;
    font-size: .9rem;
    line-height: 1.25;
    color: var(--on-accent);
    text-decoration: none;
    background: var(--lime);
    border: var(--border);
    border-color: #141414;
    border-radius: 999px;
    box-shadow: var(--shadow-sm);
    transition: transform .15s var(--ease), box-shadow .15s var(--ease);
}
.news-pill:hover { transform: translate(-2px, -2px); box-shadow: var(--shadow-md); }
.news-pill .ico { width: 16px; height: 16px; }

.new-badge {
    display: inline-block;
    padding: 3px 9px;
    font: 700 .68rem/1.2 var(--font-mono);
    letter-spacing: .08em;
    text-transform: uppercase;
    color: #fff;
    background: #e8336d;
    border: 2px solid #141414;
    border-radius: 999px;
    rotate: -3deg;
}
.new-badge-alt { color: var(--on-accent); background: var(--sun); }

/* Section header with a button on the right */
.sec-head-row { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 20px 32px; max-width: none; }
.sec-head-row > div { max-width: 780px; }

/* "See all" under a trimmed section, only once the cards stack and the header button scrolls out of view */
.sec-foot { display: none; margin-top: 32px; text-align: center; }
@media (max-width: 860px) { .sec-foot { display: block; } }

/* ---------- Spotlight (featured win) ---------- */
.spotlight {
    display: grid;
    grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr);
    margin-bottom: 28px;
    overflow: hidden;
    background: var(--surface);
    border: var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow-lg);
}
.spotlight-media { position: relative; display: block; min-height: 320px; background: var(--surface-2); border-right: var(--border); }
.spotlight-media img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transition: transform .6s var(--ease); }
.spotlight:hover .spotlight-media img { transform: scale(1.03); }
.spotlight-award {
    position: absolute;
    left: 16px;
    bottom: 16px;
    padding: 8px 14px;
    font-weight: 800;
    border: var(--bw) solid #141414;
    border-radius: 999px;
    box-shadow: 3px 3px 0 #141414;
    rotate: -3deg;
}
.spotlight-body { display: flex; flex-direction: column; gap: 12px; padding: clamp(22px, 3vw, 36px); }
.spotlight-meta { display: flex; align-items: center; gap: 10px; margin: 0; color: var(--muted); font: 500 .8rem var(--font-mono); }
.spotlight-title { margin: 0; font-size: clamp(1.7rem, 3vw, 2.4rem); line-height: 1.05; letter-spacing: -0.035em; }
.spotlight-title a { text-decoration: none; }
.spotlight-title a:hover { text-decoration: underline; text-decoration-thickness: 3px; text-underline-offset: 4px; }
.spotlight-event { margin: 0; font: 600 .82rem var(--font-mono); color: var(--muted); }
.spotlight-summary { margin: 0; color: var(--muted); font-size: 1.05rem; }
.spotlight-ctas { display: flex; flex-wrap: wrap; gap: 10px; margin-top: auto; padding-top: 6px; }

@media (max-width: 860px) {
    .spotlight { grid-template-columns: minmax(0, 1fr); }
    .spotlight-media { min-height: 0; aspect-ratio: 3 / 2; border-right: 0; border-bottom: var(--border); }
}

.win h3 a { text-decoration: none; }
.win h3 a:hover { text-decoration: underline; text-underline-offset: 3px; }

/* ---------- Inner pages ---------- */
.page-head { padding: clamp(120px, 15vw, 160px) 0 clamp(28px, 4vw, 44px); }
.crumb {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin-bottom: 22px;
    color: var(--muted);
    font: 500 .82rem var(--font-mono);
    text-decoration: none;
}
.crumb:hover { color: var(--ink); }
.crumb .ico { width: 16px; height: 16px; }
.page-head .kicker { display: table; }
.page-title {
    max-width: 18ch;
    margin: 0 0 16px;
    font-size: clamp(2.8rem, 7.5vw, 5.8rem);
    line-height: .95;
    letter-spacing: -0.045em;
    font-variation-settings: "opsz" 96;
}
.page-title em {
    font-family: var(--font-serif);
    font-style: italic;
    font-weight: 400;
    padding: 0 .1em;
    background: linear-gradient(transparent 60%, var(--hl) 60%, var(--hl) 90%, transparent 90%);
}
.page-sub { max-width: 58ch; margin: 0; color: var(--muted); font-size: 1.15rem; }
.page-count { margin: 16px 0 0; color: var(--muted); font: 500 .8rem var(--font-mono); }
.section-tight { padding: 0 0 clamp(56px, 8vw, 96px); }

.win-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px; }
.win-card { display: flex; flex-direction: column; overflow: hidden; }
.win-card-media { position: relative; aspect-ratio: 16 / 10; overflow: hidden; background: var(--surface-2); border-bottom: var(--border); }
.win-card-media img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s var(--ease); }
.win-card:hover .win-card-media img { transform: scale(1.05); }
.win-card-award {
    position: absolute;
    left: 12px;
    bottom: 12px;
    padding: 5px 11px;
    font: 700 .74rem var(--font-mono);
    border: 2px solid #141414;
    border-radius: 999px;
    rotate: -2deg;
}
.win-card-body { display: flex; flex: 1; flex-direction: column; gap: 10px; padding: 18px 20px 22px; }
.win-card-date { display: flex; align-items: center; gap: 8px; min-height: 1.2em; margin: 0; color: var(--muted); font: 500 .76rem var(--font-mono); }
.win-card h3 { margin: 0; font-size: 1.3rem; line-height: 1.15; letter-spacing: -0.025em; }
.win-card h3 a { text-decoration: none; }
.win-card p { margin: 0; color: var(--muted); font-size: .96rem; }
.win-card .chips { margin-top: auto; padding-top: 4px; }

@media (max-width: 1023px) { .win-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 639px)  { .win-grid { grid-template-columns: minmax(0, 1fr); } }

.empty { padding: 40px 28px; text-align: center; }
.empty-title { margin: 0 0 6px; font-size: 1.4rem; font-weight: 800; }

/* Story / detail pages */
.story-badges { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-bottom: 18px; }
.story-award {
    padding: 7px 14px;
    font-weight: 800;
    border: var(--bw) solid #141414;
    border-radius: 999px;
    box-shadow: 3px 3px 0 #141414;
    rotate: -2deg;
}
.story-title { max-width: 22ch; }
.story-meta { display: flex; flex-wrap: wrap; gap: 8px 22px; margin: 18px 0 0; padding: 0; list-style: none; color: var(--muted); font: 500 .84rem var(--font-mono); }
.story-meta li { display: inline-flex; align-items: center; gap: 7px; }
.story-meta .ico { width: 16px; height: 16px; }

.story-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 320px);
    gap: clamp(28px, 4vw, 56px);
    align-items: start;
    padding-bottom: clamp(56px, 8vw, 96px);
}
.story-cover { margin: 0 0 28px; }
.story-cover-btn {
    display: block;
    width: 100%;
    padding: 10px 10px 0;
    background: var(--surface);
    border: var(--border);
    border-radius: 18px;
    box-shadow: var(--shadow-lg);
    cursor: zoom-in;
}
.story-cover-btn img { width: 100%; max-height: 560px; object-fit: cover; border: 2px solid var(--line); border-radius: 10px; }
.story-cover .story-cover-btn { padding-bottom: 10px; }
.story-lede { margin: 0 0 24px; font-size: clamp(1.2rem, 2vw, 1.45rem); font-weight: 600; line-height: 1.4; letter-spacing: -0.015em; }
.story-subhead { margin: 40px 0 16px; font-size: 1.5rem; letter-spacing: -0.02em; }
.dump-lg { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 16px; margin-top: 0; }

.prose { max-width: 68ch; font-size: 1.06rem; }
.prose h2 { margin: 36px 0 12px; font-size: 1.6rem; line-height: 1.15; letter-spacing: -0.025em; }
.prose h3 { margin: 28px 0 10px; font-size: 1.25rem; }
.prose p, .prose ul, .prose ol { margin: 0 0 16px; }
.prose ul, .prose ol { padding-left: 1.3em; }
.prose li { margin-bottom: 6px; }
.prose li::marker { color: var(--muted); font-weight: 700; }
.prose a { text-decoration-thickness: 2px; text-underline-offset: 3px; }
.prose strong { font-weight: 750; }
.prose code { padding: .1em .35em; font-family: var(--font-mono); font-size: .9em; background: var(--surface-2); border-radius: 6px; }
.prose blockquote { margin: 20px 0; padding: 4px 0 4px 18px; color: var(--muted); border-left: 4px solid var(--lime); }

.story-side { position: sticky; top: 96px; display: flex; flex-direction: column; gap: 18px; }
.side-card { display: flex; flex-direction: column; gap: 14px; padding: 22px; }
.side-title { margin: 0; font-size: 1.15rem; font-weight: 800; letter-spacing: -0.02em; }
.glance { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 8px 14px; margin: 0; }
.glance dt { color: var(--muted); font: 500 .74rem/1.9 var(--font-mono); text-transform: uppercase; letter-spacing: .05em; }
.glance dd { margin: 0; font-weight: 600; overflow-wrap: anywhere; }
.side-card.bg-lilac .btn-ink { color: #fbf6ee; background: #141414; border-color: #141414; }
.more-title { margin: 0; font-size: clamp(1.8rem, 4vw, 2.6rem); letter-spacing: -0.035em; }
.more-title em { font-family: var(--font-serif); font-style: italic; font-weight: 400; }

@media (max-width: 960px) {
    .story-layout { grid-template-columns: minmax(0, 1fr); }
    .story-side { position: static; }
}

/* Research list */
.paper-list { display: flex; flex-direction: column; gap: 16px; }
.paper {
    position: relative;
    display: grid;
    grid-template-columns: 96px minmax(0, 1fr) auto;
    gap: 20px;
    align-items: start;
    padding: 22px 24px;
    background: var(--surface);
    border: var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow-md);
    transition: transform .2s var(--ease), box-shadow .2s var(--ease),
                opacity .7s var(--ease) var(--d, 0s), translate .7s var(--ease) var(--d, 0s);
}
.paper:hover { transform: translate(-3px, -3px); box-shadow: var(--shadow-lg); }
.paper:focus-within { outline: 3px solid var(--ink); outline-offset: 4px; }
.paper-year { font-size: 2rem; font-weight: 800; line-height: 1; letter-spacing: -0.04em; }
.paper-main { display: flex; flex-direction: column; gap: 8px; }
.paper-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; margin: 0; color: var(--muted); font: 500 .78rem var(--font-mono); }
.paper h3 { margin: 0; font-size: 1.3rem; line-height: 1.2; letter-spacing: -0.02em; }
.paper h3 a { text-decoration: none; }
.paper h3 a:focus-visible { outline: none; }
.paper-authors { margin: 0; color: var(--muted); font-size: .95rem; }
.paper-go {
    display: grid;
    place-items: center;
    width: 40px;
    height: 40px;
    color: var(--on-accent);
    background: var(--mint);
    border: 2px solid #141414;
    border-radius: 50%;
    transition: rotate .25s var(--ease);
}
.paper-go .ico { width: 18px; height: 18px; }
.paper:hover .paper-go { rotate: 45deg; }
.chip-solid { color: var(--on-accent); background: var(--mint); border-color: #141414; }
.chip-ico { display: inline-flex; align-items: center; gap: 5px; }
.chip-ico .ico { width: 13px; height: 13px; }
.btn-publication { padding-block: .95em; font-size: 1.05rem; box-shadow: var(--shadow-md); }
.btn-publication:hover { box-shadow: var(--shadow-lg); }
.paper-title { max-width: 30ch; font-size: clamp(2rem, 4.6vw, 3.4rem); line-height: 1.05; }
.paper-byline { margin: 0; font-size: 1.1rem; font-weight: 600; }
.abstract { padding: 24px 26px; margin-bottom: 28px; }
.abstract p { margin: 12px 0 0; color: var(--muted); line-height: 1.7; }
.paper-cover { margin: 0; }
.paper-cover .story-cover-btn { padding-bottom: 10px; }

@media (max-width: 640px) {
    .paper { grid-template-columns: minmax(0, 1fr); gap: 10px; }
    .paper-year { font-size: 1.4rem; }
    .paper-go { position: absolute; top: 18px; right: 18px; }
}

/* ---------- Project cards: links to detail pages ---------- */
/* Optional highlight label, e.g. "hackathon · 2nd runner-up" */
.proj-badge {
    display: inline-block;
    padding: 4px 11px;
    font: 700 .72rem/1.2 var(--font-mono);
    color: var(--on-accent);
    background: var(--sun);
    border: 2px solid #141414;
    border-radius: 999px;
    rotate: -2deg;
}
.num + .proj-badge { margin-left: 10px; }
.case-copy .proj-badge { align-self: flex-start; }
.project h3 a, .web-copy h3 a { text-decoration: none; }
.project h3 a.stretched:focus-visible { outline: none; }
.project:focus-within { outline: 3px solid var(--ink); outline-offset: 4px; }
.web-copy h3 a:hover { text-decoration: underline; text-decoration-thickness: 3px; text-underline-offset: 4px; }
.card-more {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin-top: 2px;
    font: 700 .78rem var(--font-mono);
    text-transform: uppercase;
    letter-spacing: .05em;
}
.card-more .ico { width: 15px; height: 15px; transition: transform .2s var(--ease); }
.project:hover .card-more .ico { transform: translateX(4px); }
.web-ctas { display: flex; flex-wrap: wrap; gap: 10px; }

/* Category switcher on /data, /systems, /startups */
.cat-tabs { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 26px; }
.cat-tab {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 8px 8px 16px;
    font-weight: 650;
    text-decoration: none;
    background: var(--surface);
    border: var(--border);
    border-radius: 999px;
    transition: transform .15s var(--ease), box-shadow .15s var(--ease);
}
.cat-tab span {
    min-width: 26px;
    padding: 2px 8px;
    font: 700 .74rem/1.5 var(--font-mono);
    text-align: center;
    background: var(--surface-2);
    border-radius: 999px;
}
.cat-tab:hover { transform: translate(-2px, -2px); box-shadow: var(--shadow-sm); }
.cat-tab.is-active { color: var(--on-accent); background: var(--lime); box-shadow: var(--shadow-sm); }
.cat-tab.is-active span { background: rgba(255, 255, 255, .7); }

/* Project detail */
.story-meta a { text-decoration-thickness: 2px; text-underline-offset: 3px; }
.cover-browser {
    display: block;
    width: 100%;
    padding: 0;
    overflow: hidden;
    text-align: left;
    background: var(--surface);
    border: var(--border);
    border-radius: 18px;
    box-shadow: var(--shadow-lg);
    cursor: zoom-in;
}
.cover-browser img { width: 100%; max-height: 620px; object-fit: cover; object-position: left top; }
.story-lede mark { font-weight: 700; }
.story-lede strong { font-weight: 800; }

.metric-card { padding: 22px 24px; --line: #141414; border-color: #141414; }
.metric-num { margin: 0; font-size: clamp(3rem, 6vw, 4.2rem); font-weight: 800; line-height: .95; letter-spacing: -0.05em; }
.metric-label { margin: 8px 0 0; font: 600 .84rem/1.35 var(--font-mono); }

.prev-next { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; margin-top: 44px; }
.prev-next-link {
    display: flex;
    flex-direction: column;
    gap: 4px;
    padding: 16px 18px;
    text-decoration: none;
    background: var(--surface);
    border: var(--border);
    border-radius: var(--radius-sm);
    box-shadow: var(--shadow-sm);
    transition: transform .15s var(--ease), box-shadow .15s var(--ease);
}
.prev-next-link:hover { transform: translate(-2px, -2px); box-shadow: var(--shadow-md); }
.prev-next-link small { color: var(--muted); font: 600 .74rem var(--font-mono); text-transform: uppercase; letter-spacing: .05em; }
.prev-next-link span { font-weight: 750; line-height: 1.25; }
.prev-next-next { grid-column: 2; text-align: right; }

@media (max-width: 560px) {
    .prev-next { grid-template-columns: minmax(0, 1fr); }
    .prev-next-next { grid-column: auto; }
}

/* ---------- Services page ---------- */
.svc-ctas { margin: 30px 0 0; }
.svc-proof {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
    gap: 14px;
    margin: clamp(36px, 5vw, 52px) 0 0;
    padding: 0;
    list-style: none;
}
.svc-proof a {
    display: flex;
    align-items: center;
    gap: 14px;
    height: 100%;
    padding: 16px 18px;
    text-decoration: none;
    background: var(--surface);
    border: var(--border);
    border-radius: var(--radius-sm);
    box-shadow: var(--shadow-sm);
    transition: transform .15s var(--ease), box-shadow .15s var(--ease);
}
.svc-proof a:hover { transform: translate(-2px, -2px); box-shadow: var(--shadow-md); }
.svc-proof-num { font-size: 2.3rem; font-weight: 800; line-height: 1; letter-spacing: -0.05em; }
.svc-proof-label { font-weight: 650; line-height: 1.25; }
.svc-proof-label small { display: block; margin-top: 3px; color: var(--muted); font: 500 .72rem var(--font-mono); }

.svc-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px; }
.svc-card { display: flex; flex-direction: column; gap: 12px; padding: 24px; }
.svc-top { display: flex; align-items: center; justify-content: space-between; margin-bottom: 4px; }
.svc-icon {
    display: grid;
    place-items: center;
    width: 56px;
    height: 56px;
    border: var(--bw) solid #141414;
    border-radius: 16px;
    box-shadow: 3px 3px 0 #141414;
    rotate: -6deg;
    transition: rotate .25s var(--ease);
}
.svc-icon .ico { width: 26px; height: 26px; }
.svc-card:hover .svc-icon { rotate: 4deg; }
.svc-card h3 { margin: 0; font-size: 1.35rem; line-height: 1.15; letter-spacing: -0.025em; }
.svc-card > p { margin: 0; color: var(--muted); }
.svc-card > .svc-example { font: 500 .78rem/1.5 var(--font-mono); }
.svc-benefits { display: flex; flex-direction: column; gap: 6px; margin: 4px 0 0; padding: 0; list-style: none; }
.svc-benefits li { display: flex; align-items: center; gap: 8px; font-weight: 600; font-size: .95rem; }
.svc-benefits .ico { width: 17px; height: 17px; color: var(--muted); }
.svc-ask {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    align-self: flex-start;
    margin-top: auto;
    padding-top: 10px;
    font: 700 .8rem var(--font-mono);
    letter-spacing: .04em;
    text-transform: uppercase;
    text-decoration: none;
    border-bottom: 2px solid transparent;
}
.svc-ask .ico { width: 15px; height: 15px; transition: transform .2s var(--ease); }
.svc-ask:hover { border-bottom-color: currentColor; }
.svc-ask:hover .ico { transform: translateX(4px); }

.steps { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 18px; margin: 0; padding: 0; list-style: none; counter-reset: none; }
.step {
    position: relative;
    padding: 24px 22px;
    background: var(--surface);
    border: var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow-md);
    transition: opacity .7s var(--ease) var(--d, 0s), translate .7s var(--ease) var(--d, 0s);
}
.step-num {
    display: inline-grid;
    place-items: center;
    width: 48px;
    height: 48px;
    margin-bottom: 14px;
    font: 800 1.05rem var(--font-mono);
    border: var(--bw) solid #141414;
    border-radius: 50%;
}
.step h3 { margin: 0 0 8px; font-size: 1.3rem; letter-spacing: -0.02em; }
.step p { margin: 0; color: var(--muted); font-size: .97rem; }

.case-list { display: flex; flex-direction: column; gap: 16px; }
.case {
    display: grid;
    grid-template-columns: 180px minmax(0, 1fr) auto auto;
    gap: 22px;
    align-items: center;
    padding: 14px 20px 14px 14px;
    text-decoration: none;
}
.case-media { display: block; aspect-ratio: 16 / 10; overflow: hidden; background: var(--surface-2); border: 2px solid var(--line); border-radius: 12px; }
.case-media img { width: 100%; height: 100%; object-fit: cover; object-position: left top; }
.case-copy { display: flex; flex-direction: column; gap: 6px; }
.case-title { font-size: 1.3rem; font-weight: 800; line-height: 1.15; letter-spacing: -0.02em; }
.case-desc { color: var(--muted); font-size: .95rem; }
.case-metric {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    padding: 10px 14px;
    color: var(--on-accent);
    background: var(--lime);
    border: 2px solid #141414;
    border-radius: 14px;
    rotate: 2deg;
}
.case-metric strong { font-size: 1.9rem; line-height: 1; letter-spacing: -0.04em; }
.case-metric small { font: 600 .7rem var(--font-mono); text-align: right; }
.case-go { display: grid; place-items: center; width: 40px; height: 40px; border: 2px solid var(--line); border-radius: 50%; transition: rotate .25s var(--ease); }
.case-go .ico { width: 18px; height: 18px; }
.case:hover .case-go { rotate: 45deg; }

.why-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 22px; }
.why { padding: 26px; --line: #141414; border-color: #141414; }
.why-emoji {
    display: grid;
    place-items: center;
    width: 52px;
    height: 52px;
    margin-bottom: 16px;
    font-size: 1.5rem;
    background: #fff;
    border: var(--bw) solid #141414;
    border-radius: 14px;
    rotate: -6deg;
}
.why h3 { margin: 0 0 8px; font-size: 1.35rem; line-height: 1.15; letter-spacing: -0.02em; }
.why p { margin: 0; color: var(--on-accent-muted); }

@media (max-width: 1023px) {
    .svc-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .steps { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 760px) {
    .case { grid-template-columns: 110px minmax(0, 1fr); }
    .case-metric { grid-column: 2; justify-self: start; align-items: flex-start; rotate: -1deg; }
    .case-metric small { text-align: left; }
    .case-go { display: none; }
    .why-grid { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 639px) {
    .svc-grid, .steps { grid-template-columns: minmax(0, 1fr); }
}

/* ---------- Footer ---------- */
.footer { padding: clamp(56px, 8vw, 96px) 0 28px; overflow: hidden; color: var(--footer-ink); background: var(--footer-bg); }
:where(.footer) a { color: inherit; } /* zero-specificity so .btn colors still win */

.footer-cta {
    /* Always light-on-lime, regardless of theme */
    --ink: #141414;
    --bg: #fbf6ee;
    --surface: #ffffff;
    --line: #141414;
    --shadow: #141414;
    --border: var(--bw) solid var(--line);
    --shadow-sm: 3px 3px 0 var(--shadow);
    --shadow-md: 5px 5px 0 var(--shadow);

    position: relative;
    display: flex;
    flex-wrap: wrap;
    align-items: flex-end;
    justify-content: space-between;
    gap: 24px;
    margin-bottom: clamp(48px, 7vw, 72px);
    padding: clamp(28px, 4vw, 48px);
    color: #141414;
    background: var(--lime);
    border: var(--bw) solid #141414;
    border-radius: var(--radius);
    box-shadow: 8px 8px 0 var(--footer-ink);
}
.footer-sticker {
    position: absolute;
    top: -18px;
    right: clamp(18px, 5vw, 48px);
    padding: 7px 14px;
    font: 700 .82rem var(--font-mono);
    border: var(--bw) solid #141414;
    border-radius: 999px;
    box-shadow: 3px 3px 0 #141414;
    rotate: 4deg;
}
.footer-kicker { margin: 0 0 8px; font: 600 .85rem var(--font-mono); }
.footer-cta-title { max-width: 18ch; margin: 0; font-size: clamp(1.9rem, 4.4vw, 3.2rem); line-height: 1; letter-spacing: -0.04em; }
.footer-cta-title em { font-family: var(--font-serif); font-style: italic; font-weight: 400; }
.footer-cta-actions { display: flex; flex-wrap: wrap; gap: 10px; }

.footer-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr) minmax(0, 1fr);
    gap: 40px;
    padding-bottom: clamp(40px, 6vw, 56px);
}
.footer-id { display: flex; align-items: center; gap: 14px; margin-bottom: 14px; }
.footer-id img { width: 56px; height: 56px; object-fit: cover; border: 2px solid var(--footer-ink); border-radius: 50%; }
.footer-name { margin: 0; font-size: 1.15rem; font-weight: 800; letter-spacing: -0.02em; }
.footer-role { margin: 0; opacity: .65; font: 500 .78rem var(--font-mono); }
.footer-blurb { max-width: 34ch; margin: 0 0 16px; opacity: .8; }
.footer-status {
    display: inline-flex;
    align-items: center;
    gap: 9px;
    margin: 0;
    padding: 6px 13px 6px 10px;
    font: 500 .78rem var(--font-mono);
    border: 1px solid rgba(246, 241, 231, .3);
    border-radius: 999px;
}
.footer-win {
    display: flex;
    align-items: center;
    gap: 12px;
    max-width: 380px;
    margin-top: 16px;
    padding: 12px 14px;
    text-decoration: none;
    border: 2px solid var(--footer-ink);
    border-radius: 16px;
    transition: background-color .2s, color .2s, transform .15s var(--ease);
}
.footer-win small { display: block; opacity: .65; font: 500 .7rem var(--font-mono); text-transform: uppercase; letter-spacing: .08em; }
.footer-win span { flex: 1; font-weight: 650; line-height: 1.3; }
.footer-win:hover { color: #141414; background: var(--lime); border-color: var(--lime); transform: translateY(-2px); }
.footer-win-arrow { width: 18px; height: 18px; }

.footer-col h3 { margin: 6px 0 14px; opacity: .55; font: 700 .74rem var(--font-mono); letter-spacing: .1em; text-transform: uppercase; }
.footer-col ul { display: flex; flex-direction: column; gap: 8px; margin: 0; padding: 0; list-style: none; }
.footer-col a { font-weight: 600; text-decoration: none; transition: color .15s; }
.footer-col a:hover { color: var(--lime); }

.footer-big {
    margin: 0 0 28px;
    font-size: clamp(5rem, 21vw, 17rem);
    font-weight: 800;
    line-height: .78;
    letter-spacing: -0.065em;
    font-variation-settings: "opsz" 96;
}
.footer-big span { color: var(--lime); }
.footer-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 12px 24px;
    padding-top: 20px;
    font: 500 .8rem var(--font-mono);
    border-top: 2px solid rgba(246, 241, 231, .2);
}
.footer-row p { margin: 0; opacity: .75; }
.footer-top { display: inline-flex; align-items: center; gap: 6px; text-decoration: none; }
.footer-top:hover { color: var(--lime); }
.footer-top .ico { width: 16px; height: 16px; }

@media (max-width: 860px) {
    .footer-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .footer-about { grid-column: 1 / -1; }
}

/* ---------- Toast ---------- */
.toast {
    position: fixed;
    right: 16px;
    bottom: 16px;
    z-index: 60;
    display: flex;
    align-items: center;
    gap: 10px;
    max-width: calc(100vw - 32px);
    padding: 12px 10px 12px 16px;
    font-weight: 650;
    color: var(--on-accent);
    background: var(--lime);
    border: var(--bw) solid #141414;
    border-radius: 16px;
    box-shadow: 4px 4px 0 #141414;
    animation: toast-in .45s var(--ease);
    transition: opacity .3s, translate .3s;
}
.toast.is-hidden { opacity: 0; translate: 0 16px; pointer-events: none; }
.toast button { display: grid; padding: 4px; color: inherit; background: none; border: 0; cursor: pointer; }
@keyframes toast-in { from { opacity: 0; translate: 0 24px; } }

/* ---------- Lightbox ---------- */
.lightbox {
    width: 100%;
    max-width: none;
    height: 100%;
    max-height: none;
    margin: 0;
    padding: 72px 16px 24px;
    color: #fff;
    background: rgba(12, 11, 15, .9);
    border: 0;
}
.lightbox[open] { display: grid; place-items: center; }
.lightbox::backdrop { background: transparent; }
.lightbox figure { display: flex; flex-direction: column; align-items: center; gap: 12px; margin: 0; }
.lightbox img {
    width: auto;
    max-width: min(1000px, calc(100vw - 140px));
    max-height: calc(100dvh - 150px);
    background: #fff;
    border: 3px solid #fff;
    border-radius: 12px;
}
.lightbox figcaption { font: 500 .85rem var(--font-mono); opacity: .85; }
.lightbox .icon-btn { position: fixed; color: #141414; background: #fff; border-color: #141414; }
.lightbox-close { top: 16px; right: 16px; }
.lightbox-prev { top: 50%; left: 16px; translate: 0 -50%; }
.lightbox-next { top: 50%; right: 16px; translate: 0 -50%; }
.lightbox [hidden] { display: none; }

@media (max-width: 640px) {
    .lightbox img { max-width: calc(100vw - 32px); }
    .lightbox-prev, .lightbox-next { top: auto; bottom: 16px; translate: none; }
}

/* ---------- Accent fills (last, so they win over .card etc.) ----------
   Always dark text so they read in both themes. */
.bg-lime   { background: var(--lime);   color: var(--on-accent); }
.bg-pink   { background: var(--pink);   color: var(--on-accent); }
.bg-lilac  { background: var(--lilac);  color: var(--on-accent); }
.bg-sun    { background: var(--sun);    color: var(--on-accent); }
.bg-mint   { background: var(--mint);   color: var(--on-accent); }
.bg-orange { background: var(--orange); color: var(--on-accent); }

/* ---------- Scroll reveal (only when JS is on) ---------- */
.js [data-reveal] { opacity: 0; translate: 0 26px; }
.js [data-reveal].is-in { opacity: 1; translate: none; }

/* ---------- Reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    *, *::before, *::after {
        animation-duration: .01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: .01ms !important;
        transition-delay: 0s !important;
    }
    .js [data-reveal] { opacity: 1; translate: none; }
}
