:root {
    --bg: #F4F2ED;
    --bg-dot: rgba(20, 20, 18, 0.10);
    --surface: #FFFFFF;
    --surface-2: #ECE9E2;
    --ink: #141413;
    --ink-2: #4B4A46;
    --ink-3: #8C8A84;
    --line: rgba(20, 20, 18, 0.10);
    --line-2: rgba(20, 20, 18, 0.18);
    --accent: #2D5BFF;
    --accent-soft: rgba(45, 91, 255, 0.10);
    --on-accent: #FFFFFF;
    --pop: #FF5A36;
    --ok: #16A34A;
    --dark: #121211;
    --dark-2: #1C1C1A;
    --on-dark: #F4F2ED;
    --on-dark-2: #A3A19A;
    --shadow-sm: 0 1px 2px rgba(20, 20, 18, .06), 0 2px 8px rgba(20, 20, 18, .04);
    --shadow: 0 1px 2px rgba(20, 20, 18, .05), 0 12px 32px -8px rgba(20, 20, 18, .14);
    --shadow-lg: 0 30px 80px -20px rgba(20, 20, 18, .28);

    --f-display: 'Bricolage Grotesque', ui-sans-serif, system-ui, sans-serif;
    --f-serif: 'Instrument Serif', ui-serif, Georgia, serif;
    --f-mono: 'JetBrains Mono', ui-monospace, Menlo, monospace;

    --r-sm: 10px;
    --r: 16px;
    --r-lg: 24px;
    --wrap: 1240px;
    --gutter: clamp(16px, 4vw, 40px);
    --ease: cubic-bezier(.16, 1, .3, 1);
    --nav-h: 76px;
    color-scheme: light;
}

:root[data-theme="dark"] {
    --bg: #0F0F0E;
    --bg-dot: rgba(244, 242, 237, 0.07);
    --surface: #181816;
    --surface-2: #22221F;
    --ink: #F4F2ED;
    --ink-2: #BDBAB2;
    --ink-3: #807E77;
    --line: rgba(244, 242, 237, 0.09);
    --line-2: rgba(244, 242, 237, 0.16);
    --accent: #6B8AFF;
    --accent-soft: rgba(107, 138, 255, 0.14);
    --on-accent: #0B0B0A;
    --pop: #FF7A5C;
    --ok: #34D399;
    --dark: #080807;
    --dark-2: #151513;
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, .3);
    --shadow: 0 12px 32px -8px rgba(0, 0, 0, .5);
    --shadow-lg: 0 30px 80px -20px rgba(0, 0, 0, .7);
    color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; scroll-padding-top: 90px; overflow-x: clip; }
body {
    font-family: var(--f-display);
    font-size: 17px;
    line-height: 1.6;
    color: var(--ink);
    background: var(--bg);
    -webkit-font-smoothing: antialiased;
    overflow-x: clip;
    transition: background-color .4s var(--ease), color .4s var(--ease);
}
img { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
input, textarea, select { font: inherit; color: inherit; }
svg { width: 1em; height: 1em; flex-shrink: 0; }
::selection { background: var(--accent); color: var(--on-accent); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 6px; }

.wrap { width: 100%; max-width: var(--wrap); margin: 0 auto; padding: 0 var(--gutter); }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.mono { font-family: var(--f-mono); }
em, .serif { font-family: var(--f-serif); font-style: italic; font-weight: 400; letter-spacing: -0.01em; }

.skip-link {
    position: fixed; top: 12px; left: 12px; z-index: 200;
    background: var(--ink); color: var(--bg); padding: 10px 16px; border-radius: 10px;
    transform: translateY(-200%); transition: transform .2s;
}
.skip-link:focus { transform: none; }

/* Canvas background */
.canvas-bg {
    background-image: radial-gradient(var(--bg-dot) 1.2px, transparent 1.2px);
    background-size: 24px 24px;
    background-position: -12px -12px;
}

/* Buttons */
.btn {
    --b-bg: var(--ink); --b-fg: var(--bg);
    display: inline-flex; align-items: center; gap: .6em;
    height: 52px; padding: 0 24px;
    border-radius: 999px;
    background: var(--b-bg); color: var(--b-fg);
    font-weight: 600; font-size: 15px; letter-spacing: -0.01em;
    position: relative; overflow: hidden; isolation: isolate;
    transition: transform .4s var(--ease), box-shadow .4s var(--ease), background-color .3s;
    white-space: nowrap;
}
.btn svg { width: 18px; height: 18px; transition: transform .4s var(--ease); }
.btn::before {
    content: ''; position: absolute; inset: 0; z-index: -1;
    background: var(--accent);
    transform: translateY(101%); border-radius: 50% 50% 0 0;
    transition: transform .5s var(--ease), border-radius .5s var(--ease);
}
.btn:hover { transform: translateY(-2px); box-shadow: var(--shadow); color: var(--on-accent); }
.btn:hover::before { transform: translateY(0); border-radius: 0; }
.btn:hover svg { transform: translateX(3px); }
.btn-ghost { --b-bg: transparent; --b-fg: var(--ink); box-shadow: inset 0 0 0 1.5px var(--line-2); }
.btn-ghost::before { background: var(--ink); }
.btn-ghost:hover { color: var(--bg); }
.btn-sm { height: 40px; padding: 0 16px; font-size: 14px; }
.btn[disabled] { opacity: .6; pointer-events: none; }

.link-arrow {
    display: inline-flex; align-items: center; gap: .45em;
    font-weight: 600; font-size: 15px;
    border-bottom: 1.5px solid currentColor; padding-bottom: 2px;
    transition: gap .3s var(--ease), color .2s;
}
.link-arrow svg { width: 16px; height: 16px; }
.link-arrow:hover { gap: .8em; color: var(--accent); }

.sel {
    position: relative; display: inline-block;
    padding: 0 .06em; margin: 0 .02em;
    outline: 1.5px solid var(--accent); outline-offset: 0;
    background: var(--accent-soft);
    font-style: normal;
}
.sel .h {
    position: absolute; width: 9px; height: 9px;
    background: var(--surface); border: 1.5px solid var(--accent); border-radius: 1px;
}
.sel .tl { top: -5px; left: -5px; } .sel .tr { top: -5px; right: -5px; }
.sel .bl { bottom: -5px; left: -5px; } .sel .br { bottom: -5px; right: -5px; }
.sel-size {
    position: absolute; left: 50%; top: calc(100% + 10px); transform: translateX(-50%);
    font: 600 11px/1 var(--f-mono); letter-spacing: 0;
    background: var(--accent); color: var(--on-accent);
    padding: 4px 6px; border-radius: 4px; white-space: nowrap;
}
.sel-size:empty { display: none; }

/* Hover selection for cards */
.selectable { position: relative; }
.selectable::after {
    content: ''; position: absolute; inset: -1px; border-radius: inherit;
    border: 1.5px solid var(--accent); opacity: 0; pointer-events: none;
    transition: opacity .25s;
}
.selectable::before {
    content: ''; position: absolute; inset: -5px; z-index: 2; pointer-events: none;
    background:
        linear-gradient(var(--accent), var(--accent)) 0 0 / 9px 9px no-repeat,
        linear-gradient(var(--accent), var(--accent)) 100% 0 / 9px 9px no-repeat,
        linear-gradient(var(--accent), var(--accent)) 0 100% / 9px 9px no-repeat,
        linear-gradient(var(--accent), var(--accent)) 100% 100% / 9px 9px no-repeat;
    opacity: 0; transform: scale(.98); transition: opacity .25s, transform .35s var(--ease);
}
.selectable:hover::after, .selectable:focus-within::after,
.selectable:hover::before, .selectable:focus-within::before { opacity: 1; transform: none; }

/* Frame labels & section headers */
.section { position: relative; padding: clamp(88px, 12vw, 160px) 0; }
.frame-label {
    display: inline-flex; align-items: center; gap: 8px;
    font: 500 12px/1 var(--f-mono); color: var(--ink-3);
    text-transform: uppercase; letter-spacing: .08em;
    margin-bottom: 22px;
}
.frame-label::before {
    content: ''; width: 10px; height: 10px; border: 1.5px solid currentColor; border-radius: 2px;
}
.frame-label b { color: var(--accent); font-weight: 600; }
.section-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 32px; margin-bottom: clamp(40px, 6vw, 72px); flex-wrap: wrap; }
.section-title {
    font-size: clamp(2.4rem, 5.6vw, 4.6rem);
    line-height: .98; letter-spacing: -0.045em; font-weight: 700;
    max-width: 14ch;
}
.section-title em { font-size: 1.08em; letter-spacing: -0.02em; }
.section-sub { color: var(--ink-2); max-width: 46ch; font-size: 18px; }

/* Nav */
.nav {
    position: fixed; top: 14px; left: 0; right: 0; z-index: 100;
    pointer-events: none;
}
.nav-inner {
    pointer-events: auto;
    display: flex; align-items: center; justify-content: space-between; gap: 12px;
    max-width: calc(var(--wrap) - 2 * var(--gutter) + 24px); margin: 0 auto;
    width: calc(100% - 2 * var(--gutter) + 24px);
    height: 60px; padding: 0 8px 0 12px;
    background: color-mix(in srgb, var(--surface) 78%, transparent);
    backdrop-filter: saturate(1.6) blur(18px); -webkit-backdrop-filter: saturate(1.6) blur(18px);
    border: 1px solid var(--line); border-radius: 999px;
    box-shadow: var(--shadow-sm);
    transition: transform .5s var(--ease), box-shadow .3s;
}
.nav.hidden .nav-inner { transform: translateY(-130%); }
.logo { display: inline-flex; align-items: center; gap: 10px; font-weight: 700; letter-spacing: -0.02em; font-size: 16px; }
.logo-mark {
    position: relative; display: grid; place-items: center;
    width: 36px; height: 36px; border-radius: 10px;
    background: var(--ink); color: var(--bg);
    font: 600 13px/1 var(--f-mono); letter-spacing: -.02em;
    transition: transform .5s var(--ease), background-color .3s;
}
.logo:hover .logo-mark { transform: rotate(-8deg) scale(1.05); background: var(--accent); color: var(--on-accent); }
.logo-name { display: none; }
@media (min-width: 560px) { .logo-name { display: inline; } }
.nav-links { display: flex; gap: 2px; list-style: none; }
.nav-links a {
    display: block; padding: 8px 13px; white-space: nowrap; border-radius: 999px;
    font-size: 14.5px; font-weight: 500; color: var(--ink-2);
    transition: background-color .2s, color .2s;
}
.nav-links a:hover, .nav-links a.active { color: var(--ink); background: var(--surface-2); }
.nav-actions { display: flex; align-items: center; gap: 6px; }
.icon-btn {
    display: grid; place-items: center; width: 42px; height: 42px; border-radius: 999px;
    color: var(--ink-2); transition: background-color .2s, color .2s, transform .3s var(--ease);
}
.icon-btn svg { width: 19px; height: 19px; }
.icon-btn:hover { background: var(--surface-2); color: var(--ink); }
.icon-btn:active { transform: scale(.92); }
.theme-toggle .moon { display: none; }
:root[data-theme="dark"] .theme-toggle .sun { display: none; }
:root[data-theme="dark"] .theme-toggle .moon { display: block; }
.nav .btn { height: 44px; }
.menu-btn { display: none; }

.mobile-menu {
    position: fixed; inset: 0; z-index: 99;
    background: var(--bg);
    display: flex; flex-direction: column; justify-content: center; gap: 4px;
    padding: 100px var(--gutter) 40px;
    opacity: 0; visibility: hidden; transition: opacity .35s var(--ease), visibility .35s;
}
.mobile-menu.open { opacity: 1; visibility: visible; }
.mobile-menu a {
    font-size: clamp(2.2rem, 10vw, 3.4rem); font-weight: 700; letter-spacing: -0.04em; line-height: 1.15;
    transform: translateY(20px); opacity: 0; transition: transform .5s var(--ease), opacity .5s var(--ease), color .2s;
}
.mobile-menu a:hover, .mobile-menu a.active { color: var(--accent); }
.mobile-menu.open a { transform: none; opacity: 1; }
.mobile-menu.open a:nth-child(2) { transition-delay: .04s; } .mobile-menu.open a:nth-child(3) { transition-delay: .08s; }
.mobile-menu.open a:nth-child(4) { transition-delay: .12s; } .mobile-menu.open a:nth-child(5) { transition-delay: .16s; }
.mobile-menu.open a:nth-child(6) { transition-delay: .2s; }
.mobile-menu .mm-foot { margin-top: 32px; display: flex; gap: 12px; flex-wrap: wrap; }

@media (max-width: 1100px) {
    .nav-links, .nav .btn { display: none; }
    .menu-btn { display: grid; }
}

/* Hero */
.hero {
    position: relative; min-height: 100svh;
    display: flex; align-items: center;
    padding: calc(var(--nav-h) + 48px) 0 96px;
    overflow: hidden; text-align: center;
}
.hero-bg { position: absolute; inset: 0; pointer-events: none; }
.hero-bg::before {
    content: ''; position: absolute; inset: 0;
    background-image: radial-gradient(var(--bg-dot) 1.2px, transparent 1.2px);
    background-size: 26px 26px;
    -webkit-mask-image: radial-gradient(ellipse 60% 55% at 50% 48%, #000 20%, transparent 75%);
    mask-image: radial-gradient(ellipse 60% 55% at 50% 48%, #000 20%, transparent 75%);
}
.hero-bg::after {
    content: ''; position: absolute; left: 50%; top: 46%; width: min(900px, 120vw); aspect-ratio: 1.6;
    transform: translate(-50%, -50%);
    background:
        radial-gradient(closest-side, color-mix(in srgb, var(--accent) 16%, transparent), transparent 70%),
        radial-gradient(closest-side at 70% 60%, color-mix(in srgb, var(--pop) 12%, transparent), transparent 70%);
    filter: blur(20px);
}
.hero-inner { position: relative; display: flex; flex-direction: column; align-items: center; }
.hero-status {
    display: inline-flex; align-items: center; gap: 10px;
    padding: 7px 14px 7px 12px; border-radius: 999px;
    background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow-sm);
    font-size: 14px; font-weight: 500; color: var(--ink-2);
    margin-bottom: 36px;
}
.dot-live { position: relative; width: 8px; height: 8px; border-radius: 50%; background: var(--ok); }
.dot-live::after {
    content: ''; position: absolute; inset: -4px; border-radius: 50%; border: 2px solid var(--ok);
    animation: ping 2s var(--ease) infinite; opacity: 0;
}
.dot-live.off { background: var(--ink-3); } .dot-live.off::after { display: none; }
@keyframes ping { 0% { transform: scale(.6); opacity: .8; } 100% { transform: scale(1.6); opacity: 0; } }

.hero-title {
    font-size: clamp(2.8rem, 8.2vw, 7.4rem);
    line-height: .98; letter-spacing: -0.055em; font-weight: 700;
    max-width: 13ch; margin: 0 auto;
    text-wrap: balance;
}
.hero-title em { font-size: 1.1em; letter-spacing: -0.03em; color: var(--accent); padding-right: .04em; }
.hero-title .sel { margin: 0 .04em; }
.hero-title .word { display: inline-block; }
.hero-intro { max-width: 40ch; margin: 32px auto 0; color: var(--ink-2); font-size: clamp(17px, 1.5vw, 19px); text-wrap: balance; }
.hero-cta { display: flex; gap: 12px; flex-wrap: wrap; justify-content: center; margin-top: 36px; }

.cursor-bot { position: absolute; top: 0; left: 0; z-index: 4; pointer-events: none; color: var(--pop); transition: transform 1.6s var(--ease); will-change: transform; }
.cursor-bot svg { width: 22px; height: 22px; display: block; filter: drop-shadow(0 2px 4px rgba(0,0,0,.18)); }
.cursor-tag { position: absolute; left: 16px; top: 18px; padding: 4px 9px; border-radius: 4px 999px 999px 999px; font: 600 12px/1.2 var(--f-mono); white-space: nowrap; color: #fff; background: var(--pop); }

.scroll-hint {
    position: absolute; left: 50%; bottom: 24px; transform: translateX(-50%);
    font: 500 11px/1 var(--f-mono); letter-spacing: .14em; text-transform: uppercase; color: var(--ink-3);
    display: flex; flex-direction: column; align-items: center; gap: 10px;
}
.scroll-hint i { width: 1.5px; height: 34px; background: linear-gradient(var(--ink-3), transparent); animation: drip 2s var(--ease) infinite; transform-origin: top; }
@keyframes drip { 0% { transform: scaleY(0); } 50% { transform: scaleY(1); } 100% { transform: scaleY(1); opacity: 0; } }
@keyframes pinIn { from { opacity: 0; transform: translateY(10px) scale(.96); } to { opacity: 1; transform: none; } }

@media (max-width: 640px) {
    .hero { min-height: 92svh; padding-bottom: 72px; }
    .scroll-hint { display: none; }
    .hero-cta { width: 100%; }
    .hero-cta .btn { flex: 1; justify-content: center; }
}

/* Marquee */
.marquee {
    background: var(--dark); color: var(--on-dark);
    padding: 18px 0; overflow: hidden; position: relative;
    transform: rotate(-1.2deg) scale(1.02); margin: 10px 0;
}
.marquee-track { display: flex; width: max-content; animation: marquee 40s linear infinite; }
.marquee:hover .marquee-track { animation-play-state: paused; }
.marquee-track span {
    display: inline-flex; align-items: center; gap: 28px; padding-right: 28px;
    font-size: clamp(20px, 2.4vw, 28px); font-weight: 600; letter-spacing: -0.03em; white-space: nowrap;
}
.marquee-track span::after { content: '✦'; color: var(--pop); font-size: .7em; }
.marquee-track span:nth-child(3n+2) { font-family: var(--f-serif); font-style: italic; font-weight: 400; letter-spacing: -0.01em; }
@keyframes marquee { to { transform: translateX(-50%); } }

/* About */
.about-grid {
    display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
    gap: clamp(32px, 6vw, 88px);
    align-items: stretch;
}
.portrait {
    position: relative; align-self: stretch; min-height: 460px;
    perspective: 1200px;
}
.portrait-frame {
    position: absolute; inset: 0;
    border-radius: var(--r-lg); overflow: hidden;
    background: var(--surface-2);
    transform-style: preserve-3d;
    transition: transform .6s var(--ease), box-shadow .6s var(--ease), border-radius .6s var(--ease);
    box-shadow: var(--shadow);
}
.portrait-frame img {
    position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: center 20%;
    filter: grayscale(1) contrast(1.05);
    transform: scale(1.06);
    transition: filter .8s var(--ease), transform 1.2s var(--ease);
}
.portrait:hover .portrait-frame img, .portrait:focus-within .portrait-frame img { filter: grayscale(0); transform: scale(1); }
.portrait:hover .portrait-frame { box-shadow: var(--shadow-lg); }
.portrait-frame .shine {
    position: absolute; inset: 0; pointer-events: none; z-index: 2;
    background: radial-gradient(600px circle at var(--mx, 50%) var(--my, 50%), rgba(255,255,255,.22), transparent 40%);
    opacity: 0; transition: opacity .4s;
}
.portrait:hover .shine { opacity: 1; }
.portrait-mono {
    position: absolute; inset: 0; display: grid; place-items: center;
    background:
        radial-gradient(circle at 30% 20%, color-mix(in srgb, var(--accent) 55%, transparent), transparent 60%),
        radial-gradient(circle at 80% 90%, color-mix(in srgb, var(--pop) 50%, transparent), transparent 55%),
        var(--dark);
    color: #fff;
}
.portrait-mono span { font-family: var(--f-serif); font-style: italic; font-size: clamp(7rem, 16vw, 12rem); line-height: 1; letter-spacing: -0.04em; }
.portrait-sel {
    position: absolute; inset: -8px; pointer-events: none; z-index: 3;
    border: 1.5px solid var(--accent); border-radius: calc(var(--r-lg) + 6px);
    opacity: 0; transform: scale(1.03); transition: opacity .35s, transform .6s var(--ease);
}
.portrait-sel .h { position: absolute; width: 11px; height: 11px; background: var(--surface); border: 1.5px solid var(--accent); border-radius: 2px; }
.portrait-sel .tl { top: -6px; left: -6px; } .portrait-sel .tr { top: -6px; right: -6px; }
.portrait-sel .bl { bottom: -6px; left: -6px; } .portrait-sel .br { bottom: -6px; right: -6px; }
.portrait:hover .portrait-sel { opacity: 1; transform: none; }
.portrait-sticker {
    position: absolute; z-index: 4; top: -18px; right: -14px;
    width: 104px; height: 104px; border-radius: 50%;
    display: grid; place-items: center;
    background: var(--pop); color: #fff;
    font: 600 11px/1 var(--f-mono); letter-spacing: .12em; text-transform: uppercase;
    animation: spin 18s linear infinite;
    box-shadow: var(--shadow);
}
.portrait-sticker svg { width: 100%; height: 100%; position: absolute; inset: 0; }
.portrait-sticker b { font-family: var(--f-serif); font-style: italic; font-size: 30px; letter-spacing: 0; text-transform: none; animation: spin 18s linear infinite reverse; font-weight: 400; }
@keyframes spin { to { transform: rotate(360deg); } }

.about-text { display: flex; flex-direction: column; justify-content: center; }
.about-lead { font-size: clamp(1.7rem, 3vw, 2.6rem); line-height: 1.12; letter-spacing: -0.04em; font-weight: 650; margin-bottom: 24px; text-wrap: balance; }
.about-lead em { color: var(--accent); font-size: 1.06em; }
.about-body p { color: var(--ink-2); margin-bottom: 1em; max-width: 54ch; font-size: 17.5px; }
.about-facts { list-style: none; display: grid; grid-template-columns: auto auto minmax(0, 1fr); gap: 14px 40px; margin: 20px 0 32px; padding-top: 24px; border-top: 1px solid var(--line); }
@media (max-width: 560px) { .about-facts { grid-template-columns: 1fr 1fr; } .about-facts li:nth-child(3) { grid-column: 1 / -1; } }
.about-facts small { display: block; font: 500 11px/1 var(--f-mono); text-transform: uppercase; letter-spacing: .1em; color: var(--ink-3); margin-bottom: 8px; }
.about-facts span { font-weight: 600; font-size: 15.5px; }
.about-actions { display: flex; gap: 12px; flex-wrap: wrap; }

@media (max-width: 900px) {
    .about-grid { grid-template-columns: 1fr; }
    .portrait { width: 100%; max-width: 520px; height: calc(min(100vw - 2 * var(--gutter), 520px) * 1.15); min-height: 0; justify-self: start; }
}
@media (max-width: 480px) { .portrait-sticker { width: 84px; height: 84px; right: -6px; } }

.chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: auto; padding-top: 8px; }
.chip {
    display: inline-flex; align-items: center; height: 32px; padding: 0 12px;
    border-radius: 999px; border: 1px solid var(--line-2);
    font-size: 13.5px; font-weight: 500; color: var(--ink-2);
}
.chip-sm { height: 26px; padding: 0 10px; font-size: 12.5px; }

/* Work */
.filters { display: flex; gap: 6px; padding: 5px; background: var(--surface); border: 1px solid var(--line); border-radius: 999px; max-width: 100%; overflow-x: auto; scrollbar-width: none; }
.filters::-webkit-scrollbar { display: none; }
.filter {
    height: 38px; padding: 0 16px; border-radius: 999px; white-space: nowrap; flex: none;
    font-size: 14px; font-weight: 600; color: var(--ink-2);
    transition: background-color .25s, color .25s;
}
.filter:hover { color: var(--ink); }
.filter[aria-pressed="true"] { background: var(--ink); color: var(--bg); }
.filter sup { font: 500 10px/1 var(--f-mono); margin-left: 3px; opacity: .6; }

.work-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: clamp(20px, 3vw, 36px); }
.work-card { display: flex; flex-direction: column; gap: 18px; }
.work-card .cover { aspect-ratio: 4 / 3; transition: transform .7s var(--ease), box-shadow .7s var(--ease); }
.work-card:hover .cover { transform: translateY(-6px); box-shadow: var(--shadow-lg); }
.work-card-info { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; padding: 0 4px; }
.work-card h3 { font-size: clamp(1.25rem, 2vw, 1.6rem); letter-spacing: -0.035em; line-height: 1.15; margin-bottom: 4px; }
.work-card-info span:not(.card-arrow) { color: var(--ink-3); font-size: 14.5px; }
.work-card:hover .card-arrow { background: var(--accent); border-color: var(--accent); color: var(--on-accent); transform: rotate(45deg); }
@media (max-width: 720px) { .work-grid { grid-template-columns: 1fr; } }

/* Covers */
.cover {
    position: relative; overflow: hidden; border-radius: var(--r-lg);
    background: color-mix(in srgb, var(--c) 14%, var(--surface));
    isolation: isolate;
}
.cover.is-mock::before {
    content: ''; position: absolute; inset: 0; z-index: -1;
    background-image: radial-gradient(color-mix(in srgb, var(--c) 30%, transparent) 1.2px, transparent 1.2px);
    background-size: 18px 18px;
}
.cover.is-mock::after {
    content: ''; position: absolute; width: 60%; aspect-ratio: 1; right: -15%; top: -25%; z-index: -1;
    background: radial-gradient(circle, color-mix(in srgb, var(--c) 45%, transparent), transparent 65%);
    transition: transform 1s var(--ease);
}
.cover img { width: 100%; height: 100%; object-fit: cover; transition: transform 1.2s var(--ease); }
a:hover > .cover img { transform: scale(1.04); }
a:hover > .cover.is-mock::after { transform: translate(-20%, 20%); }

.mock-browser {
    position: absolute; left: 9%; right: 9%; top: 13%; bottom: -8%;
    background: var(--surface); border-radius: 12px 12px 0 0;
    box-shadow: 0 30px 60px -20px color-mix(in srgb, var(--c) 60%, transparent), 0 0 0 1px var(--line);
    overflow: hidden; display: flex; flex-direction: column;
    transition: transform .9s var(--ease);
}
a:hover .mock-browser { transform: translateY(-4%); }
.mb-top { display: flex; align-items: center; gap: 5px; padding: 9px 12px; border-bottom: 1px solid var(--line); }
.mb-top i { width: 8px; height: 8px; border-radius: 50%; background: var(--line-2); }
.mb-url { margin: 0 auto; font: 500 10px/1 var(--f-mono); color: var(--ink-3); background: var(--surface-2); padding: 4px 12px; border-radius: 6px; }
.mb-body { flex: 1; display: grid; grid-template-columns: 22% 1fr; }
.mb-side { border-right: 1px solid var(--line); padding: 12px 10px; display: flex; flex-direction: column; gap: 8px; }
.mb-side b { height: 14px; width: 60%; border-radius: 4px; background: var(--c); margin-bottom: 8px; }
.mb-side span { height: 8px; border-radius: 4px; background: var(--surface-2); }
.mb-side span.on { background: color-mix(in srgb, var(--c) 30%, var(--surface)); }
.mb-main { padding: 14px; display: flex; flex-direction: column; gap: 12px; min-width: 0; }
.mb-head { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.mb-head strong { font-size: clamp(10px, 1.3vw, 14px); letter-spacing: -0.02em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; color: var(--ink); }
.mb-head em { width: 44px; height: 16px; border-radius: 999px; background: var(--c); flex: none; }
.mb-cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.mb-cards div { border: 1px solid var(--line); border-radius: 8px; padding: 8px; display: flex; flex-direction: column; gap: 6px; }
.mb-cards small { height: 5px; width: 50%; border-radius: 3px; background: var(--surface-2); }
.mb-cards b { font: 700 clamp(10px, 1.2vw, 14px)/1 var(--f-display); letter-spacing: -0.02em; color: var(--ink); }
.mb-cards .accent { background: var(--c); border-color: transparent; }
.mb-cards .accent b { color: #fff; } .mb-cards .accent small { background: rgba(255,255,255,.4); }
.mb-chart { flex: 1; min-height: 40px; display: flex; align-items: flex-end; gap: 6%; padding: 8px; border: 1px solid var(--line); border-radius: 8px; }
.mb-chart span { flex: 1; border-radius: 3px 3px 0 0; background: color-mix(in srgb, var(--c) 35%, var(--surface)); }
.mb-chart span:nth-child(5) { background: var(--c); }

.mock-phones { position: absolute; inset: 0; display: flex; justify-content: center; align-items: flex-end; }
.mp-phone {
    position: absolute; bottom: -12%; width: 30%; aspect-ratio: 9 / 18.5;
    background: var(--surface); border-radius: 22px; padding: 18px 10px 10px;
    box-shadow: 0 30px 60px -20px color-mix(in srgb, var(--c) 60%, transparent), 0 0 0 5px var(--ink), 0 0 0 6px var(--line-2);
    display: flex; flex-direction: column; gap: 7px;
    transition: transform .9s var(--ease);
}
.mp-phone.front { left: 50%; transform: translateX(-12%) rotate(4deg); z-index: 2; }
.mp-phone.back { left: 50%; transform: translateX(-92%) rotate(-6deg) translateY(10%); opacity: .95; }
a:hover .mp-phone.front { transform: translateX(-8%) rotate(2deg) translateY(-6%); }
a:hover .mp-phone.back { transform: translateX(-100%) rotate(-9deg) translateY(4%); }
.mp-notch { position: absolute; top: 6px; left: 50%; transform: translateX(-50%); width: 34%; height: 7px; border-radius: 6px; background: var(--ink); }
.mp-hero { border-radius: 10px; background: var(--c); color: #fff; padding: 14px 8px 18px; }
.mp-hero strong { font-size: clamp(8px, 1vw, 12px); line-height: 1.15; letter-spacing: -0.02em; display: block; }
.mp-row { height: 7px; border-radius: 4px; background: var(--surface-2); }
.mp-row.a { height: 40%; border-radius: 10px; background: color-mix(in srgb, var(--c) 25%, var(--surface)); }
.mp-row.short { width: 60%; }
.mp-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
.mp-grid span { aspect-ratio: 1; border-radius: 8px; background: var(--surface-2); }
.mp-grid span:first-child { background: var(--c); }
.mp-list { display: flex; flex-direction: column; gap: 6px; }
.mp-list span { height: 18px; border-radius: 6px; border: 1px solid var(--line); }
.mp-btn { margin-top: auto; height: 18px; border-radius: 999px; background: var(--ink); }

/* Experience */
.xp-layout { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: clamp(40px, 6vw, 96px); align-items: start; }
.xp-intro { position: sticky; top: 120px; }
.xp-stats { display: flex; gap: 40px; margin-top: 40px; padding-top: 28px; border-top: 1px solid var(--line-2); }
.xp-stat b { display: block; font-family: var(--f-serif); font-style: italic; font-weight: 400; font-size: clamp(3rem, 5vw, 4.4rem); line-height: 1; color: var(--accent); letter-spacing: -0.02em; }
.xp-stat span { display: block; margin-top: 10px; font: 500 12px/1 var(--f-mono); text-transform: uppercase; letter-spacing: .12em; color: var(--ink-3); }

.xp-timeline { position: relative; padding-left: 40px; display: grid; gap: 24px; }
.xp-timeline::before, .xp-timeline::after {
    content: ''; position: absolute; left: 11px; top: 30px; width: 2px; border-radius: 2px;
}
.xp-timeline::before { bottom: 30px; background: var(--line-2); }
.xp-timeline::after {
    height: var(--xp-fill, 12px);
    background: linear-gradient(var(--accent), color-mix(in srgb, var(--accent) 70%, transparent));
    box-shadow: 0 0 10px color-mix(in srgb, var(--accent) 45%, transparent);
}
.tl-item { position: relative; }
.tl-node {
    position: absolute; left: -36px; top: 34px; width: 16px; height: 16px; border-radius: 50%;
    background: var(--bg); border: 2px solid var(--line-2);
    transition: border-color .4s, background-color .4s, box-shadow .4s, transform .4s var(--ease);
}
.tl-item.is-reached .tl-node { border-color: var(--accent); background: var(--accent); box-shadow: 0 0 0 5px var(--accent-soft); }
.tl-item.is-current .tl-node { box-shadow: 0 0 0 5px var(--accent-soft), 0 0 18px color-mix(in srgb, var(--accent) 60%, transparent); }
.tl-item.is-current .tl-node::after {
    content: ''; position: absolute; inset: -6px; border-radius: 50%; border: 2px solid var(--accent);
    animation: ping 2.4s var(--ease) infinite; opacity: 0;
}
.tl-item:hover .tl-node { border-color: var(--accent); transform: scale(1.15); }
.tl-item.is-current .tl-card { border-color: color-mix(in srgb, var(--accent) 45%, var(--line)); }

.tl-card {
    background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg);
    padding: clamp(22px, 3vw, 32px);
    transition: transform .6s var(--ease), box-shadow .6s var(--ease), border-color .4s;
}
.tl-item:hover .tl-card { transform: translateY(-4px); box-shadow: var(--shadow); }
.tl-top { display: flex; justify-content: space-between; align-items: center; gap: 16px; margin-bottom: 22px; }
.tl-logo {
    display: grid; place-items: center; flex: none; min-width: 52px; height: 52px; padding: 0 10px; border-radius: 16px;
    background: color-mix(in srgb, var(--c) 14%, var(--surface)); color: var(--c);
    font: 700 15px/1 var(--f-mono); letter-spacing: .02em;
    transition: transform .5s var(--ease);
}
.tl-item:hover .tl-logo { transform: rotate(-6deg); }
.tl-logo.has-img { width: 52px; padding: 7px; background: #fff; border: 1px solid var(--line); overflow: hidden; }
.tl-logo img { width: 100%; height: 100%; object-fit: contain; }
.tl-when { display: flex; flex-direction: column; align-items: flex-end; gap: 8px; text-align: right; }
.tl-dates { font: 500 13px/1.3 var(--f-mono); color: var(--ink-2); }
.tl-dur { font: 600 11.5px/1 var(--f-mono); padding: 5px 9px; border-radius: 999px; background: var(--surface-2); color: var(--ink-2); }
.tl-role { font-size: clamp(1.5rem, 2.4vw, 2rem); line-height: 1.1; letter-spacing: -0.04em; }
.tl-co { margin-top: 6px; font-weight: 600; color: var(--ink-2); }
.tl-co span { font-weight: 500; color: var(--ink-3); }
.tl-points { list-style: none; display: grid; gap: 10px; margin-top: 20px; padding-top: 20px; border-top: 1px dashed var(--line-2); }
.tl-points li { position: relative; padding-left: 30px; color: var(--ink-2); font-size: 15.5px; line-height: 1.55; }
.tl-points li::before {
    content: ''; position: absolute; left: 0; top: 3px; width: 18px; height: 18px; border-radius: 50%;
    background: var(--accent-soft) center / 11px no-repeat url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%232D5BFF' stroke-width='3.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 6 9 17l-5-5'/%3E%3C/svg%3E");
}
:root[data-theme="dark"] .tl-points li::before {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%236B8AFF' stroke-width='3.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 6 9 17l-5-5'/%3E%3C/svg%3E");
}
.tl-tags { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 22px; }
.tl-badge {
    display: inline-flex; align-items: center; gap: 7px; height: 26px; padding: 0 11px; border-radius: 999px;
    background: color-mix(in srgb, var(--ok) 14%, transparent); color: var(--ok); font-size: 12.5px; font-weight: 600;
}
.tl-badge::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }

@media (max-width: 900px) {
    .xp-layout { grid-template-columns: 1fr; }
    .xp-intro { position: static; }
    .xp-stats { margin-top: 28px; }
}
@media (max-width: 520px) {
    .xp-timeline { padding-left: 28px; }
    .xp-timeline::before, .xp-timeline::after { left: 6px; }
    .tl-node { left: -29px; }
    .tl-top { align-items: flex-start; }
}

/* Card grids */
.card-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; }
.card-grid.two { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px; }
@media (max-width: 960px) { .card-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 640px) { .card-grid, .card-grid.two { grid-template-columns: 1fr; } }
.card-arrow {
    display: grid; place-items: center; width: 40px; height: 40px; border-radius: 50%; flex: none;
    border: 1px solid var(--line-2); color: var(--ink-2);
    transition: transform .5s var(--ease), background-color .25s, color .25s, border-color .25s;
}
.card-arrow svg { width: 17px; height: 17px; }

/* Publication: printed paper */
.paper {
    position: relative; display: flex; flex-direction: column; gap: 14px; min-width: 0;
    padding: clamp(28px, 3vw, 40px);
    background:
        repeating-linear-gradient(180deg, transparent 0 31px, color-mix(in srgb, var(--accent) 7%, transparent) 31px 32px),
        var(--surface);
    border: 1px solid var(--line);
    border-radius: 6px var(--r-lg) var(--r-lg) var(--r-lg);
    box-shadow: var(--shadow-sm);
    clip-path: polygon(0 0, calc(100% - 44px) 0, 100% 44px, 100% 100%, 0 100%);
    transition: transform .6s var(--ease), box-shadow .6s var(--ease), clip-path .6s var(--ease);
}
.paper::before {
    content: ''; position: absolute; top: 0; right: 0; width: 44px; height: 44px;
    background: linear-gradient(225deg, transparent 50%, var(--surface-2) 50%);
    border-bottom-left-radius: 8px;
    box-shadow: -3px 3px 8px rgba(0, 0, 0, .06);
    transition: width .6s var(--ease), height .6s var(--ease);
}
.paper::after {
    content: ''; position: absolute; top: 0; bottom: 0; left: clamp(14px, 1.6vw, 20px); width: 1.5px;
    background: color-mix(in srgb, var(--pop) 35%, transparent);
}
.paper:hover { transform: translateY(-6px) rotate(-.4deg); box-shadow: var(--shadow-lg); clip-path: polygon(0 0, calc(100% - 64px) 0, 100% 64px, 100% 100%, 0 100%); }
.paper:hover::before { width: 64px; height: 64px; }
.paper-top { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding-right: 36px; }
.paper-journal {
    font: 600 12px/1 var(--f-mono); letter-spacing: .14em; text-transform: uppercase; color: var(--accent);
    padding: 7px 10px; border: 1.5px solid currentColor; border-radius: 6px;
}
.paper-no { font-family: var(--f-serif); font-style: italic; font-size: 20px; color: var(--ink-3); }
.paper-title {
    font-family: var(--f-serif); font-weight: 400; font-style: normal;
    font-size: clamp(1.6rem, 2.4vw, 2.1rem); line-height: 1.12; letter-spacing: -0.01em;
    margin-top: 8px;
}
.paper-sub { font-family: var(--f-serif); font-style: italic; font-size: 18px; color: var(--ink-2); }
.paper-foot {
    display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap;
    margin-top: auto; padding-top: 20px; border-top: 1px dashed var(--line-2);
}
.paper-meta { font: 500 12.5px/1.4 var(--f-mono); color: var(--ink-3); }
.paper-read { display: inline-flex; align-items: center; gap: 8px; font-weight: 600; font-size: 14.5px; transition: gap .3s var(--ease), color .2s; }
.paper-read svg { width: 16px; height: 16px; }
.paper:hover .paper-read { gap: 12px; color: var(--accent); }

/* Open source: code repository */
.repo {
    position: relative; display: flex; flex-direction: column; gap: 12px; min-width: 0; overflow: hidden;
    padding: 26px; border-radius: var(--r-lg);
    background: var(--dark); color: var(--on-dark);
    border: 1px solid rgba(255, 255, 255, .08);
    isolation: isolate;
    transition: transform .6s var(--ease), box-shadow .6s var(--ease), border-color .3s;
}
.repo::before {
    content: ''; position: absolute; inset: 0; z-index: -1; opacity: .5;
    background-image: linear-gradient(rgba(255,255,255,.05) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,.05) 1px, transparent 1px);
    background-size: 22px 22px;
    -webkit-mask-image: linear-gradient(160deg, #000, transparent 70%); mask-image: linear-gradient(160deg, #000, transparent 70%);
}
.repo::after {
    content: ''; position: absolute; inset: 0; z-index: -1; opacity: 0; transition: opacity .4s;
    background: radial-gradient(420px circle at var(--mx, 80%) var(--my, 0%), rgba(107, 138, 255, .28), transparent 45%);
}
.repo:hover { transform: translateY(-6px); box-shadow: var(--shadow-lg); border-color: rgba(107, 138, 255, .45); }
.repo:hover::after { opacity: 1; }
.repo-top { display: flex; align-items: center; gap: 12px; min-width: 0; }
.repo-icon { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 12px; background: rgba(255,255,255,.08); flex: none; }
.repo-icon svg { width: 20px; height: 20px; }
.repo-path { font: 500 12.5px/1.3 var(--f-mono); color: var(--on-dark-2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.repo-path b { color: #8EA6FF; font-weight: 600; }
.repo-title { font-size: 21px; letter-spacing: -0.03em; line-height: 1.2; margin-top: 8px; }
.repo-desc { color: var(--on-dark-2); font-size: 15px; line-height: 1.55; }
.repo-foot { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-top: auto; padding-top: 16px; border-top: 1px solid rgba(255,255,255,.08); }
.repo-langs { display: flex; flex-wrap: wrap; gap: 6px 14px; }
.repo-langs span { display: inline-flex; align-items: center; gap: 7px; font: 500 12.5px/1 var(--f-mono); color: var(--on-dark-2); }
.repo-langs i { width: 10px; height: 10px; border-radius: 50%; }
.repo-go { display: grid; place-items: center; width: 36px; height: 36px; border-radius: 50%; background: rgba(255,255,255,.08); color: var(--on-dark); flex: none; transition: transform .5s var(--ease), background-color .25s, color .25s; }
.repo-go svg { width: 16px; height: 16px; }
.repo:hover .repo-go { background: var(--on-dark); color: var(--dark); transform: rotate(45deg); }
:root[data-theme="dark"] .repo { background: var(--dark-2); }

/* Contact */
.contact { background: var(--dark); color: var(--on-dark); border-radius: clamp(24px, 4vw, 48px) clamp(24px, 4vw, 48px) 0 0; overflow: hidden; }
.contact .frame-label { color: var(--on-dark-2); }
.contact-grid { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); gap: clamp(40px, 6vw, 96px); align-items: start; }
.contact-title { font-size: clamp(2.6rem, 6vw, 5.4rem); line-height: .98; letter-spacing: -0.05em; margin-bottom: 24px; }
.contact-title em { color: var(--pop); font-size: 1.08em; }
.contact-text { color: var(--on-dark-2); max-width: 42ch; margin-bottom: 40px; font-size: 18px; }
.mail-big {
    display: inline-flex; align-items: center; gap: 14px; flex-wrap: wrap;
    font-size: clamp(1.15rem, 2.4vw, 1.8rem); font-weight: 600; letter-spacing: -0.03em;
    border-bottom: 2px solid rgba(255,255,255,.2); padding-bottom: 8px; transition: border-color .3s;
    word-break: break-all;
}
.mail-big:hover { border-color: var(--pop); }
.copy-btn {
    display: inline-flex; align-items: center; gap: 6px; height: 34px; padding: 0 12px; border-radius: 999px;
    border: 1px solid rgba(255,255,255,.18); color: var(--on-dark-2); font: 500 12px/1 var(--f-mono);
    transition: background-color .2s, color .2s; margin-left: 10px; vertical-align: middle;
}
.copy-btn svg { width: 14px; height: 14px; }
.copy-btn:hover { background: rgba(255,255,255,.08); color: #fff; }
.socials { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 36px; }
.social {
    display: grid; place-items: center; width: 48px; height: 48px; border-radius: 50%;
    border: 1px solid rgba(255,255,255,.16); color: var(--on-dark);
    transition: background-color .25s, color .25s, transform .4s var(--ease), border-color .25s;
}
.social svg { width: 19px; height: 19px; }
.social:hover { background: var(--on-dark); color: var(--dark); transform: translateY(-3px); border-color: var(--on-dark); }
.cv-link { display: inline-flex; align-items: center; gap: 8px; margin-top: 28px; font-weight: 600; color: var(--on-dark); border-bottom: 1.5px solid rgba(255,255,255,.3); padding-bottom: 3px; transition: border-color .2s, gap .3s var(--ease); }
.cv-link svg { width: 16px; height: 16px; }
.cv-link:hover { border-color: var(--pop); gap: 12px; }
.cv-link[hidden] { display: none; }
.nav-cv[hidden] { display: none; }

.form {
    background: var(--dark-2); border: 1px solid rgba(255,255,255,.08); border-radius: var(--r-lg);
    padding: clamp(24px, 3vw, 36px); display: grid; gap: 18px; position: relative;
}
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
@media (max-width: 560px) { .form-row { grid-template-columns: 1fr; } }
.field { display: grid; gap: 8px; }
.field > label, .field .label { font: 500 12px/1 var(--f-mono); text-transform: uppercase; letter-spacing: .1em; color: var(--on-dark-2); }
.field input, .field textarea {
    width: 100%; padding: 14px 16px; border-radius: 12px;
    background: rgba(255,255,255,.04); border: 1px solid rgba(255,255,255,.1); color: var(--on-dark);
    font-size: 16px; outline: none; transition: border-color .2s, background-color .2s, box-shadow .2s;
}
.field textarea { resize: vertical; min-height: 130px; }
.field input::placeholder, .field textarea::placeholder { color: rgba(244,242,237,.35); }
.field input:focus, .field textarea:focus { border-color: var(--accent); background: rgba(255,255,255,.06); box-shadow: 0 0 0 4px rgba(107, 138, 255, .18); }
.choice-group { display: flex; flex-wrap: wrap; gap: 8px; }
.choice input { position: absolute; opacity: 0; pointer-events: none; }
.choice span {
    display: inline-flex; align-items: center; height: 38px; padding: 0 14px; border-radius: 999px;
    border: 1px solid rgba(255,255,255,.14); font-size: 14px; font-weight: 500; color: var(--on-dark-2);
    cursor: pointer; transition: all .2s;
}
.choice span:hover { color: var(--on-dark); border-color: rgba(255,255,255,.3); }
.choice input:checked + span { background: var(--on-dark); color: var(--dark); border-color: var(--on-dark); }
.choice input:focus-visible + span { outline: 2px solid var(--accent); outline-offset: 2px; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; }
.form .btn { --b-bg: var(--on-dark); --b-fg: var(--dark); justify-content: center; width: 100%; }
.form .btn:hover { color: #fff; }
.form-status { font-size: 14.5px; padding: 12px 14px; border-radius: 12px; display: none; }
.form-status.err { display: block; background: rgba(255, 90, 54, .12); color: #FF9F8A; }
.form-success {
    position: absolute; inset: 0; border-radius: inherit; background: var(--dark-2);
    display: none; flex-direction: column; align-items: center; justify-content: center; text-align: center; gap: 14px; padding: 32px;
}
.form.sent .form-success { display: flex; animation: pinIn .6s var(--ease); }
.form-success .tick { width: 64px; height: 64px; border-radius: 50%; display: grid; place-items: center; background: var(--ok); color: #fff; }
.form-success .tick svg { width: 30px; height: 30px; }
.form-success h3 { font-size: 28px; }
.form-success p { color: var(--on-dark-2); max-width: 32ch; }
@media (max-width: 900px) { .contact-grid { grid-template-columns: 1fr; } }

/* Footer */
.footer { background: var(--dark); color: var(--on-dark); padding: 0 0 28px; overflow: hidden; }
.footer-top { display: flex; justify-content: space-between; gap: 32px; flex-wrap: wrap; padding: 56px 0 36px; border-top: 1px solid rgba(255,255,255,.08); }
.footer-links { display: flex; gap: 6px 24px; flex-wrap: wrap; }
.footer-links a { color: var(--on-dark-2); font-weight: 500; transition: color .2s; }
.footer-links a:hover { color: var(--on-dark); }
.to-top { display: inline-flex; align-items: center; gap: 8px; color: var(--on-dark-2); font-weight: 500; transition: color .2s; }
.to-top svg { transform: rotate(-90deg); width: 16px; height: 16px; }
.to-top:hover { color: var(--on-dark); }
.wordmark {
    font-size: clamp(3.6rem, 15.5vw, 15rem); line-height: .85; letter-spacing: -0.065em; font-weight: 800;
    white-space: nowrap; text-align: center;
    background: linear-gradient(180deg, var(--on-dark) 20%, rgba(244,242,237,.08) 100%);
    -webkit-background-clip: text; background-clip: text; color: transparent;
    user-select: none; margin: 0 -2vw;
}
.footer-bottom { display: flex; justify-content: space-between; gap: 12px 24px; flex-wrap: wrap; margin-top: 28px; font-size: 14px; color: var(--on-dark-2); }
kbd { font: 600 12px/1 var(--f-mono); padding: 3px 7px; border-radius: 6px; border: 1px solid currentColor; border-bottom-width: 2px; }

/* Sub pages */
.page-hero {
    position: relative; overflow: hidden; text-align: center;
    padding: calc(var(--nav-h) + 96px) 0 clamp(40px, 6vw, 72px);
}
.page-hero .wrap { position: relative; display: flex; flex-direction: column; align-items: center; }
.page-hero h1 { font-size: clamp(2.8rem, 7.4vw, 6.4rem); line-height: .98; letter-spacing: -0.055em; margin-bottom: 22px; max-width: 14ch; text-wrap: balance; }
.page-hero h1 em { color: var(--accent); font-size: 1.1em; letter-spacing: -0.03em; }
.page-hero p { color: var(--ink-2); max-width: 46ch; font-size: clamp(17px, 1.5vw, 19px); text-wrap: balance; }
.crumbs { display: inline-flex; gap: 8px; align-items: center; font: 500 13px/1 var(--f-mono); color: var(--ink-3); margin-bottom: 32px; padding: 9px 14px; border-radius: 999px; background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow-sm); }
.crumbs a:hover { color: var(--accent); }
.toolbar { display: flex; gap: 14px; justify-content: space-between; align-items: center; flex-wrap: wrap; margin-bottom: 36px; }
.search {
    position: relative; flex: 0 1 340px;
}
@media (max-width: 640px) { .search { flex: 1 1 100%; } }
.search input {
    width: 100%; height: 48px; padding: 0 16px 0 44px; border-radius: 999px;
    background: var(--surface); border: 1px solid var(--line); outline: none; font-size: 15px;
    transition: border-color .2s, box-shadow .2s;
}
.search input:focus { border-color: var(--accent); box-shadow: 0 0 0 4px var(--accent-soft); }
.search svg { position: absolute; left: 16px; top: 50%; transform: translateY(-50%); color: var(--ink-3); width: 18px; height: 18px; }
.page-hero .filters { margin-top: 36px; }

.view-section.view-first { padding-top: 24px; }
.view-section.view-single .section-head { display: none; }
.filter { display: inline-flex; align-items: center; }
.empty { padding: 64px 24px; text-align: center; color: var(--ink-3); border: 1.5px dashed var(--line-2); border-radius: var(--r-lg); grid-column: 1 / -1; }

/* Case study */
.page-hero .cs-specs, .page-hero .cs-cover { width: 100%; text-align: left; }
.page-hero .cs-specs { margin-top: 44px; }
.cs-specs { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); border: 1px solid var(--line); border-radius: var(--r); background: var(--surface); overflow: hidden; margin-bottom: 28px; }
.cs-specs div { padding: 18px 20px; border-right: 1px solid var(--line); min-width: 0; }
.cs-specs div:last-child { border-right: 0; }
.cs-specs small { display: block; font: 500 11px/1 var(--f-mono); text-transform: uppercase; letter-spacing: .1em; color: var(--ink-3); margin-bottom: 8px; }
.cs-specs span { font-weight: 600; }
.cs-cover .cover { aspect-ratio: 16 / 9; border-radius: var(--r-lg); }
.cs-body { display: grid; grid-template-columns: 260px minmax(0, 1fr); gap: clamp(32px, 6vw, 96px); padding: clamp(64px, 9vw, 120px) 0; }
.cs-aside { position: sticky; top: 110px; align-self: start; display: grid; gap: 12px; }
.cs-aside .btn { justify-content: center; }
.cs-content h2 { font-size: clamp(1.7rem, 3vw, 2.4rem); letter-spacing: -0.04em; line-height: 1.1; margin: 0 0 18px; }
.cs-content h2 em { color: var(--accent); }
.cs-content section + section { margin-top: 56px; padding-top: 56px; border-top: 1px solid var(--line); }
.cs-content p { color: var(--ink-2); font-size: 18px; margin-bottom: 1em; max-width: 64ch; }
.cs-gallery { display: grid; gap: 20px; margin-top: 8px; }
.cs-gallery img { border-radius: var(--r); border: 1px solid var(--line); width: 100%; }
.next-project { display: block; padding: clamp(48px, 7vw, 96px) 0; border-top: 1px solid var(--line); }
.next-project small { font: 500 12px/1 var(--f-mono); text-transform: uppercase; letter-spacing: .12em; color: var(--ink-3); }
.next-project strong { display: flex; align-items: center; gap: 20px; font-size: clamp(2.2rem, 6vw, 5rem); letter-spacing: -0.05em; line-height: 1; margin-top: 16px; transition: color .3s, gap .4s var(--ease); }
.next-project strong svg { width: .7em; height: .7em; }
.next-project:hover strong { color: var(--accent); gap: 32px; }
@media (max-width: 900px) {
    .cs-body { grid-template-columns: 1fr; }
    .cs-specs { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .cs-specs div:nth-child(2) { border-right: 0; }
    .cs-specs div:nth-child(-n+2) { border-bottom: 1px solid var(--line); }
    .cs-aside { position: static; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); }
}

/* Reveal animations */
.js [data-reveal] { opacity: 0; transform: translateY(28px); transition: opacity .9s var(--ease), transform .9s var(--ease); transition-delay: var(--d, 0s); }
.js [data-reveal].in { opacity: 1; transform: none; }
.js .hero-title .word { opacity: 0; transform: translateY(40%) rotate(3deg); transition: opacity .9s var(--ease), transform 1s var(--ease); }
.js .hero-title.in .word { opacity: 1; transform: none; }


/* Toast */
.toast {
    position: fixed; left: 50%; bottom: 24px; z-index: 300; transform: translate(-50%, 140%);
    background: var(--ink); color: var(--bg); padding: 12px 18px; border-radius: 999px; font-weight: 500; font-size: 14.5px;
    box-shadow: var(--shadow-lg); transition: transform .5s var(--ease);
}
.toast.show { transform: translate(-50%, 0); }

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; scroll-behavior: auto !important; }
    .js [data-reveal], .js .hero-title .word { opacity: 1; transform: none; }
}

.term-overlay {
    position: fixed; inset: 0; z-index: 400; display: grid; place-items: center; padding: 16px;
    background: rgba(10, 10, 9, .45); backdrop-filter: blur(6px);
    opacity: 0; visibility: hidden; transition: opacity .3s, visibility .3s;
}
.term-overlay.open { opacity: 1; visibility: visible; }
.term {
    width: min(820px, 100%); height: min(560px, 82vh);
    display: flex; flex-direction: column;
    background: #121211; color: #E8E6E0; border-radius: 16px; overflow: hidden;
    border: 1px solid rgba(255,255,255,.1); box-shadow: 0 40px 100px -20px rgba(0,0,0,.6);
    transform: translateY(20px) scale(.97); transition: transform .45s var(--ease);
    font: 14px/1.65 var(--f-mono);
}
.term-overlay.open .term { transform: none; }
.term-bar { display: flex; align-items: center; gap: 8px; padding: 12px 14px; border-bottom: 1px solid rgba(255,255,255,.08); background: #1A1A18; }
.term-bar button { width: 13px; height: 13px; border-radius: 50%; }
.term-bar .t-close { background: #FF5F57; } .term-bar .t-min { background: #FEBC2E; } .term-bar .t-max { background: #28C840; }
.term-bar span { margin: 0 auto; color: #8C8A84; font-size: 12.5px; transform: translateX(-24px); }
.term-body { flex: 1; overflow-y: auto; padding: 16px 18px; }
.term-line { white-space: pre-wrap; word-break: break-word; }
.term-line.dim { color: #8C8A84; } .term-line.acc { color: #8EA6FF; } .term-line.ok { color: #6EE7A0; } .term-line.err { color: #FF8A73; } .term-line.pop { color: #FF9F7A; }
.term-line a { color: #8EA6FF; text-decoration: underline; text-underline-offset: 3px; }
.term-input { display: flex; gap: 10px; align-items: center; }
.term-input .ps { color: #6EE7A0; white-space: nowrap; }
.term-input .ps b { color: #8EA6FF; font-weight: 500; }
.term-input input { flex: 1; min-width: 0; background: transparent; border: 0; outline: none; color: #fff; font: inherit; caret-color: #FF9F7A; }
.term.max { width: 100%; height: 100%; border-radius: 0; }
@media (max-width: 600px) { .term { font-size: 12.5px; height: 86vh; } }
