/* ─────────────────────────────────────────────────────────────
   Akira · portfolio of Rudranshu Ray Chandra
   Visual language: Vyoma Group 2026 (warm paper, ink, saffron)
   ───────────────────────────────────────────────────────────── */

:root {
  --accent: #E8622A;
  --accent-ink: #B4461A;
  --accent-soft: #EE7A45;
  --paper: #FAF8F5;
  --paper-2: #F2EDE7;
  --paper-3: #EAE3DA;
  --card: #FDFCFA;
  --ink: #1A1714;
  --ink-2: #4A4540;
  --ink-3: #6B6560;
  --line: #E0DDD8;
  --night: #0F0E0C;
  --night-2: #1C1A17;
  --on-night: #F0ECE6;
  --on-night-2: #B5AEA6;
  --ok: #23805A;
  --ease: cubic-bezier(.2, .7, .2, 1);
  --ease-out: cubic-bezier(.16, 1, .3, 1);
  --serif: 'Newsreader', Georgia, 'Times New Roman', serif;
  --sans: 'Instrument Sans', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --mono: 'JetBrains Mono', ui-monospace, 'Cascadia Mono', monospace;
  --jp: 'Noto Serif JP', 'Yu Mincho', 'Hiragino Mincho ProN', serif;
}

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; scroll-padding-top: 80px; }
html.building { scroll-behavior: auto; }
html.prebuild body { opacity: 0; }
body { margin: 0; position: relative; }
.v {
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  min-height: 100vh;
  overflow-x: hidden;
  overflow-x: clip; /* clip, not hidden: keeps the sticky nav working when the menu locks scrolling */
}
.v *, .v *::before, .v *::after { box-sizing: border-box; }
.v img, .v svg { display: block; }
.v h1, .v h2, .v h3, .v h4, .v p, .v ul, .v ol { margin: 0; }
.v ul, .v ol { padding: 0; list-style: none; }
a { color: inherit; }
::selection { background: rgba(232, 98, 42, .22); color: var(--ink); }
.defs { position: absolute; width: 0; height: 0; overflow: hidden; }

/* ── paper texture (two fixed click-through layers) ── */
html::before, html::after {
  content: ""; position: fixed; inset: 0; pointer-events: none; z-index: 2147483000;
}
html::before {
  opacity: .9; mix-blend-mode: multiply;
  background-image:
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='600' height='600'%3E%3Cfilter id='m'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.008 .012' numOctaves='4' seed='7' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 .55  0 0 0 0 .42  0 0 0 0 .3  0 0 0 .24 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23m)'/%3E%3C/svg%3E"),
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='300' height='300'%3E%3Cfilter id='f'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.04 .9' numOctaves='2' seed='3' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 .35  0 0 0 0 .3  0 0 0 0 .25  0 0 0 .11 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23f)'/%3E%3C/svg%3E");
  background-size: 600px 600px, 300px 300px;
}
html::after {
  opacity: .42; mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='200' height='200'%3E%3Cfilter id='g'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.95' numOctaves='3' stitchTiles='stitch' seed='11'/%3E%3CfeColorMatrix type='saturate' values='0'/%3E%3CfeComponentTransfer%3E%3CfeFuncR type='linear' slope='2.2' intercept='-.6'/%3E%3CfeFuncG type='linear' slope='2.2' intercept='-.6'/%3E%3CfeFuncB type='linear' slope='2.2' intercept='-.6'/%3E%3C/feComponentTransfer%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23g)'/%3E%3C/svg%3E");
  background-size: 200px 200px;
}
@media print, (forced-colors: active) { html::before, html::after { display: none; } }

/* ── layout ── */
.wrap { max-width: 1200px; margin: 0 auto; padding: 0 32px; }
@media (max-width: 640px) { .wrap { padding: 0 20px; } }
.section { padding: 128px 0; position: relative; }
.tint { background: var(--paper-2); }
@media (max-width: 760px) { .section { padding: 88px 0; } }

/* ── type ── */
.serif { font-family: var(--serif); font-weight: 400; letter-spacing: -0.02em; }
.mono { font-family: var(--mono); font-size: 12px; letter-spacing: .08em; text-transform: uppercase; }
.h-display { font-size: clamp(64px, 11vw, 168px); line-height: .9; letter-spacing: -0.045em; }
.h2 { font-size: clamp(36px, 4.4vw, 60px); line-height: 1.05; }
.h3 { font-size: clamp(22px, 2vw, 27px); line-height: 1.2; }
.h4 { font-size: 20px; line-height: 1.3; font-weight: 600; letter-spacing: -0.01em; }
.serif.h4 { font-weight: 500; font-size: 23px; letter-spacing: -0.015em; }
.lede { font-size: clamp(18px, 1.55vw, 21px); line-height: 1.55; color: var(--ink-2); max-width: 640px; }
.body { color: var(--ink-2); }
.small { font-size: 14px; color: var(--ink-3); line-height: 1.55; }
.eyebrow { color: var(--accent-ink); display: inline-flex; align-items: center; gap: 10px; }
.eyebrow::before { content: ""; width: 18px; height: 1px; background: currentColor; }
em.i { font-style: italic; color: var(--accent); }
strong { font-weight: 600; color: var(--ink); }
.num { font-family: var(--mono); font-size: 12px; color: var(--accent-ink); letter-spacing: .08em; }

/* ── skip link & progress ── */
.skip { position: absolute; left: 12px; top: -60px; z-index: 100; background: var(--ink); color: var(--paper); padding: 10px 16px; border-radius: 999px; text-decoration: none; }
.skip:focus { top: 12px; }
.progress { position: fixed; left: 0; right: 0; top: 0; height: 3px; z-index: 60; pointer-events: none; }
.progress span { display: block; height: 100%; width: 100%; background: var(--accent); transform-origin: 0 50%; transform: scaleX(var(--p, 0)); border-radius: 0 3px 3px 0; filter: url(#ink-brush); }

/* ── buttons ── */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 10px; min-height: 50px; padding: 0 24px; border-radius: 999px; font: 500 16px/1 var(--sans); text-decoration: none; cursor: pointer; border: 1px solid transparent; transition: background .25s, color .25s, border-color .25s, box-shadow .3s; position: relative; will-change: transform; -webkit-tap-highlight-color: transparent; white-space: nowrap; }
.btn .arr { transition: transform .35s var(--ease); display: inline-block; }
.btn:hover .arr { transform: translateX(4px); }
.btn-dark { background: var(--ink); color: var(--paper); box-shadow: 0 10px 24px -14px rgba(26, 23, 20, .7); }
.btn-dark:hover { background: #2a2520; box-shadow: 0 16px 30px -14px rgba(26, 23, 20, .75); }
.btn-line { background: transparent; color: var(--ink); border-color: rgba(26, 23, 20, .22); }
.btn-line:hover { border-color: var(--ink); background: rgba(255, 255, 255, .5); }
.btn:focus-visible, .chip:focus-visible, a:focus-visible, button:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
.tlink { display: inline-flex; align-items: center; gap: 8px; color: var(--ink); font-weight: 500; text-decoration: none; background: linear-gradient(var(--accent), var(--accent)) 0 100% / 0 1.5px no-repeat; padding-bottom: 2px; transition: background-size .45s var(--ease); }
.tlink:hover { background-size: 100% 1.5px; }
.tlink .arr { transition: transform .35s var(--ease); }
.tlink:hover .arr { transform: translate(3px, -3px); }

/* ── tags ── */
.tag { display: inline-flex; align-items: center; gap: 6px; padding: 5px 11px; border-radius: 999px; background: var(--paper-2); color: var(--ink-2); font: 500 12px/1.2 var(--sans); border: 1px solid var(--line); white-space: nowrap; }
.tag.live::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--ok); box-shadow: 0 0 0 3px rgba(35, 128, 90, .15); }
.tint .tag { background: var(--card); }

/* ── seal (hanko) ── */
.seal { display: inline-grid; place-items: center; background: var(--accent); color: var(--paper); font-family: var(--jp); font-weight: 700; border-radius: 22%; position: relative; filter: url(#ink-rough); box-shadow: inset 0 0 0 2px rgba(250, 248, 245, .25); }
.seal span { line-height: 1; transform: translateY(-.04em); }
.seal-sm { width: 30px; height: 30px; font-size: 18px; border-radius: 8px; transition: transform .7s var(--ease); }
.brand:hover .seal-sm { transform: rotate(-12deg) scale(1.06); }

/* ── nav ── */
.nav { position: sticky; top: 0; z-index: 50; background: rgba(250, 248, 245, .82); backdrop-filter: blur(14px) saturate(1.2); -webkit-backdrop-filter: blur(14px) saturate(1.2); border-bottom: 1px solid rgba(224, 221, 216, .7); transition: box-shadow .3s; }
.nav.scrolled { box-shadow: 0 10px 30px -24px rgba(26, 23, 20, .5); }
.nav-in { display: flex; align-items: center; gap: 20px; min-height: 70px; }
.brand { display: inline-flex; align-items: center; gap: 11px; font: 600 19px/1 var(--sans); letter-spacing: -.01em; color: var(--ink); text-decoration: none; }
.links { display: flex; gap: 2px; margin-left: auto; }
.links a { position: relative; padding: 10px 15px; border-radius: 999px; color: var(--ink-2); text-decoration: none; font-size: 15px; transition: background .2s, color .2s; }
.links a:hover { background: var(--paper-2); color: var(--ink); }
.links a.on { color: var(--ink); }
.links a.on::after { content: ""; position: absolute; left: 15px; right: 15px; bottom: 5px; height: 2px; border-radius: 2px; background: var(--accent); filter: url(#ink-brush); }
.links .menu-only { display: none; }
.nav-cta { min-height: 42px; padding: 0 18px; font-size: 15px; }
.menu-btn { display: none; }
@media (max-width: 900px) {
  .nav-in { min-height: 64px; gap: 12px; }
  .nav-cta { margin-left: auto; }
  .menu-btn { display: inline-flex; flex-direction: column; justify-content: center; align-items: center; gap: 6px; width: 46px; height: 46px; margin-right: -8px; border: 0; border-radius: 999px; background: transparent; cursor: pointer; color: var(--ink); -webkit-tap-highlight-color: transparent; }
  .menu-btn span { display: block; width: 20px; height: 1.6px; background: currentColor; border-radius: 2px; transition: transform .35s var(--ease); }
  .nav.open .menu-btn span:first-child { transform: translateY(3.8px) rotate(45deg); }
  .nav.open .menu-btn span:last-child { transform: translateY(-3.8px) rotate(-45deg); }
  .links { position: fixed; left: 0; right: 0; top: 64px; height: calc(100dvh - 64px); z-index: 40; margin: 0; padding: 20px 20px calc(32px + env(safe-area-inset-bottom)); flex-direction: column; gap: 0; overflow-y: auto; overscroll-behavior: contain; background: var(--paper); visibility: hidden; opacity: 0; transform: translateY(-10px); transition: opacity .3s, transform .35s var(--ease), visibility 0s .35s; }
  .nav.open .links { visibility: visible; opacity: 1; transform: none; transition: opacity .3s, transform .35s var(--ease), visibility 0s; }
  .links a, .links .menu-only { display: flex; font-family: var(--serif); font-size: 36px; letter-spacing: -.02em; color: var(--ink); padding: 14px 0; border-radius: 0; border-bottom: 1px solid var(--line); min-height: 68px; align-items: center; justify-content: space-between; }
  .links a::after { content: "→"; position: static; font-family: var(--sans); font-size: 18px; color: var(--ink-3); background: none; filter: none; height: auto; }
  .links a:hover, .links a.on { background: transparent; color: var(--accent-ink); }
  .links a.on::after { position: static; background: none; filter: none; height: auto; color: var(--accent-ink); }
  .nav.open .links a { animation: rise .55s var(--ease) both; }
  .nav.open .links a:nth-child(2) { animation-delay: .05s } .nav.open .links a:nth-child(3) { animation-delay: .1s }
  .nav.open .links a:nth-child(4) { animation-delay: .15s } .nav.open .links a:nth-child(5) { animation-delay: .2s } .nav.open .links a:nth-child(6) { animation-delay: .25s }
  html.menu-open { overflow: hidden; }
}
@media (max-width: 380px) { .nav-cta { padding: 0 14px; } .nav-cta .arr { display: none; } }

/* ── hero ── */
.hero { position: relative; padding: clamp(48px, 7vw, 96px) 0 clamp(56px, 7vw, 104px); overflow: hidden; }
.hero-grid { display: grid; grid-template-columns: 1.08fr .92fr; gap: 48px; align-items: center; }
.hero-copy { display: flex; flex-direction: column; gap: 26px; align-items: flex-start; position: relative; z-index: 2; }
.pill { display: inline-flex; align-items: center; gap: 10px; padding: 7px 14px 7px 12px; border-radius: 999px; background: var(--card); border: 1px solid var(--line); font-size: 14px; color: var(--ink-2); box-shadow: 0 6px 18px -14px rgba(26, 23, 20, .5); }
.pulse { width: 8px; height: 8px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 0 0 rgba(232, 98, 42, .5); animation: pulse 2.2s infinite; }
.ink-title { filter: url(#ink-rough); margin-left: -.04em; margin-bottom: -6px; }
.dot-accent { color: var(--accent); }
.h-tag { font-size: clamp(26px, 3vw, 40px); line-height: 1.15; max-width: 560px; }
.cta-row { display: flex; flex-wrap: wrap; gap: 12px; }
.hint { max-width: 420px; display: inline-flex; gap: 8px; }
.hero-art { position: relative; aspect-ratio: 1 / 1; width: 100%; max-width: 560px; justify-self: end; }
.hero-art .art { width: 100%; height: 100%; transition: transform .9s var(--ease-out); }
.float-card { position: absolute; left: -6%; bottom: 8%; width: min(300px, 70%); padding: 18px 20px; display: flex; flex-direction: column; gap: 8px; box-shadow: 0 30px 60px -32px rgba(26, 23, 20, .45); animation: drift 7s ease-in-out infinite; }
.fc-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.fc-row .mono { color: var(--ink-3); }
.fc-title { font-size: 24px; line-height: 1.15; }
.seal-hero { position: absolute; right: 2%; top: 4%; width: 74px; height: 74px; font-size: 44px; border-radius: 16px; opacity: 0; transform: scale(2.4) rotate(-18deg); }
.seal-hero.stamped { animation: stamp .55s var(--ease-out) forwards; }
html:not(.building) .seal-hero:not(.stamped) { opacity: .95; transform: rotate(-8deg); }
@media (max-width: 900px) {
  .hero-grid { grid-template-columns: 1fr; gap: 24px; }
  .hero-art { max-width: 460px; justify-self: center; margin-top: 8px; }
  .float-card { left: 0; bottom: 2%; }
}
@media (max-width: 520px) {
  .hero-art { margin-right: -10px; }
  .seal-hero { width: 58px; height: 58px; font-size: 34px; }
  .float-card { width: 76%; padding: 14px 16px; }
  .fc-title { font-size: 21px; }
}

/* ── line art ── */
.art .ink { stroke: var(--ink); stroke-linecap: round; stroke-linejoin: round; stroke-width: 1.8; fill: none; }
.art .ink.thin { stroke-width: 1.2; stroke: var(--ink-2); }
.art .ink.accent { stroke: var(--accent); }
.art .ink.brush { stroke: var(--ink); filter: url(#ink-brush); opacity: .88; }
.art .wash { transition: opacity 1.2s var(--ease); }
.art g { transition: transform 1.2s var(--ease-out); }
.layer-sun { animation: breathe 9s ease-in-out infinite; transform-origin: 318px 214px; transform-box: view-box; }

/* ── cards ── */
.card { background: var(--card); border: 1px solid var(--line); border-radius: 22px; position: relative; }
.tilt { transform-style: preserve-3d; transition: transform .6s var(--ease-out), box-shadow .5s, border-color .4s; will-change: transform; }
.tilt::before { content: ""; position: absolute; inset: 0; border-radius: inherit; pointer-events: none; opacity: 0; transition: opacity .45s; background: radial-gradient(420px circle at var(--mx, 50%) var(--my, 50%), rgba(232, 98, 42, .1), transparent 55%); }
.tilt:hover::before { opacity: 1; }
.tilt:hover { box-shadow: 0 34px 60px -40px rgba(26, 23, 20, .5); border-color: #d6cfc6; }

/* ── marquee ── */
.marquee-sec { padding: 22px 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); background: var(--paper); overflow: hidden; }
.marquee { overflow: hidden; -webkit-mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent); mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent); }
.marquee-track { display: flex; width: max-content; gap: 28px; align-items: center; animation: marquee 38s linear infinite; }
.marquee-track span { font-family: var(--serif); font-size: clamp(22px, 2.6vw, 34px); letter-spacing: -.02em; white-space: nowrap; color: var(--ink); }
.marquee-track span:nth-of-type(even) { font-style: italic; color: var(--ink-3); }
.marquee-track i { font-style: normal; color: var(--accent); font-size: 16px; }
.marquee-sec:hover .marquee-track { animation-play-state: paused; }

/* ── night ── */
.night { background: var(--night); color: var(--on-night); position: relative; padding: 128px 0; }
.night .lede, .on-night { color: var(--on-night-2); }
.night .eyebrow { color: var(--accent-soft); }
.night em.i { color: var(--accent-soft); }
.brush-edge { position: absolute; left: 0; width: 100%; height: 44px; fill: var(--night); pointer-events: none; filter: url(#ink-brush); }
.brush-edge.top { top: -43px; }
.brush-edge.bottom { bottom: -43px; transform: none; }
.night-in { display: flex; flex-direction: column; gap: 48px; }
.ascii { font-family: var(--mono); white-space: pre; line-height: 1.15; font-size: 14px; color: #8F8880; overflow: hidden; }
.ascii-big { font-size: clamp(9px, 2.1vw, 26px); color: var(--on-night); line-height: 1.12; }
.shine div { background: linear-gradient(100deg, var(--on-night) 30%, var(--accent-soft) 50%, var(--on-night) 70%) 0 0 / 300% 100%; -webkit-background-clip: text; background-clip: text; color: transparent; animation: shine 6s linear infinite; }
.tw { animation: twinkle 3s ease-in-out infinite; animation-delay: var(--d, 0s); color: var(--accent-soft); }
.g2 { display: grid; grid-template-columns: 1fr 1fr; gap: 48px; align-items: center; }
@media (max-width: 860px) { .g2 { grid-template-columns: 1fr; gap: 32px; } }
.term { background: var(--night-2); border: 1px solid #2c2925; border-radius: 16px; padding: 18px 22px 22px; font-family: var(--mono); font-size: 14px; line-height: 1.9; color: var(--on-night); box-shadow: 0 30px 60px -30px #000; overflow: hidden; }
.term-bar { display: flex; align-items: center; gap: 7px; margin: -2px 0 10px; }
.term-bar i { width: 10px; height: 10px; border-radius: 50%; background: #3a3631; }
.term-bar i:first-child { background: var(--accent); }
.term-bar .mono { margin-left: 8px; color: #7d766e; font-size: 11px; }
.term .pr { color: var(--accent-soft); }
.term .dim { color: #8F8880; white-space: pre; }
.term .type { display: inline-block; overflow: hidden; white-space: nowrap; vertical-align: bottom; width: 0; animation: typing calc(var(--n) * .055s) steps(var(--n)) var(--d) forwards; }
.term.b-done .type, html:not(.building) .term .type { animation-play-state: running; }
html.building .term:not(.b-done) .type { animation-play-state: paused; }
.caret { color: var(--accent-soft); animation: blink 1s steps(1) infinite; }

/* ── split heading ── */
.split { display: grid; grid-template-columns: 280px 1fr; gap: 40px; margin-bottom: 64px; align-items: start; }
.split > .eyebrow { padding-top: 14px; }
.split-r { display: flex; flex-direction: column; gap: 20px; }
@media (max-width: 860px) { .split { grid-template-columns: 1fr; gap: 18px; margin-bottom: 44px; } .split > .eyebrow { padding-top: 0; } }

/* ── work grid ── */
.work-grid { display: grid; grid-template-columns: repeat(6, 1fr); gap: 20px; }
.work-card { padding: 30px; display: flex; flex-direction: column; gap: 16px; grid-column: span 2; }
.work-card.feature { grid-column: span 6; display: grid; grid-template-columns: 1fr 1.2fr; grid-template-rows: auto auto auto 1fr auto; column-gap: 56px; padding: 40px; }
.work-card.feature .wc-top { grid-column: 1 / -1; }
.work-card.feature .wc-art { grid-column: 1; grid-row: 2 / 6; width: min(300px, 100%); justify-self: center; align-self: center; }
.work-card.feature > :not(.wc-top):not(.wc-art) { grid-column: 2; }
.work-card.feature .h3 { font-size: clamp(34px, 3.6vw, 52px); }
.work-card:nth-child(2), .work-card:nth-child(3) { grid-column: span 3; }
.wc-top { display: flex; align-items: center; justify-content: space-between; }
.wc-art { width: 88px; height: 88px; }
.work-card .tlink { margin-top: auto; align-self: flex-start; }
.ticks { display: flex; flex-direction: column; gap: 10px; }
.ticks li { position: relative; padding-left: 26px; color: var(--ink-2); font-size: 15.5px; }
.ticks li::before { content: ""; position: absolute; left: 2px; top: .58em; width: 13px; height: 7px; border-left: 1.6px solid var(--accent); border-bottom: 1.6px solid var(--accent); transform: rotate(-45deg); }
@media (max-width: 960px) {
  .work-card, .work-card:nth-child(2), .work-card:nth-child(3) { grid-column: span 3; }
  .work-card.feature { grid-column: span 6; grid-template-columns: 1fr; padding: 32px; }
  .work-card.feature .wc-art, .work-card.feature > :not(.wc-top):not(.wc-art) { grid-column: 1; grid-row: auto; }
  .work-card.feature .wc-art { width: 140px; justify-self: start; }
}
@media (max-width: 640px) {
  .work-grid { grid-template-columns: 1fr; gap: 16px; }
  .work-card, .work-card:nth-child(2), .work-card:nth-child(3), .work-card.feature { grid-column: auto; padding: 26px 22px; }
}

/* ── lab ── */
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 32px; }
.chip { font: 500 14px/1 var(--sans); padding: 11px 16px; border-radius: 999px; border: 1px solid var(--line); background: var(--card); color: var(--ink-2); cursor: pointer; transition: background .25s, color .25s, border-color .25s, transform .25s; min-height: 42px; -webkit-tap-highlight-color: transparent; }
.chip:hover { border-color: var(--ink-3); color: var(--ink); }
.chip.on { background: var(--ink); color: var(--paper); border-color: var(--ink); }
.lab-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.lab-card { padding: 24px 24px 22px; display: flex; flex-direction: column; gap: 12px; overflow: hidden; transition: transform .5s var(--ease-out), box-shadow .45s, opacity .4s, border-color .35s; }
.lab-card::after { content: ""; position: absolute; inset: auto 0 0 0; height: 3px; background: var(--accent); transform: scaleX(0); transform-origin: 0 50%; transition: transform .55s var(--ease); filter: url(#ink-brush); }
.lab-card:hover { transform: translateY(-4px); box-shadow: 0 28px 50px -36px rgba(26, 23, 20, .55); border-color: #d6cfc6; }
.lab-card:hover::after { transform: scaleX(1); }
.lc-top { display: flex; justify-content: space-between; align-items: center; }
.lc-cat { color: var(--accent-ink); font-size: 11px; }
.lc-arrow { color: var(--ink-3); transition: transform .4s var(--ease), color .3s; }
.lab-card:hover .lc-arrow { transform: translate(3px, -3px) rotate(0); color: var(--accent); }
.small-body { font-size: 15.5px; line-height: 1.55; }
.tags { display: flex; flex-wrap: wrap; gap: 6px; margin-top: auto; padding-top: 6px; }
.lab-card.hide { display: none; }
.lab-card.pop { animation: pop .5s var(--ease-out) both; }
@media (max-width: 960px) { .lab-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 600px) {
  .lab-grid { grid-template-columns: 1fr; gap: 14px; }
  .chips { flex-wrap: nowrap; overflow-x: auto; margin: 0 -20px 26px; padding: 2px 20px; scrollbar-width: none; }
  .chips::-webkit-scrollbar { display: none; }
  .chip { flex: none; }
}

/* ── numbers ── */
.numbers { padding: 72px 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.num-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }
.stat { display: flex; flex-direction: column; gap: 8px; padding: 8px 0 8px 24px; border-left: 1px solid var(--line); }
.stat-n { font-size: clamp(54px, 6vw, 88px); line-height: 1; color: var(--ink); }
.stat:nth-child(odd) .stat-n { font-style: italic; color: var(--accent); }
.stat-l { color: var(--ink-3); font-size: 11px; }
@media (max-width: 760px) { .num-grid { grid-template-columns: repeat(2, 1fr); gap: 32px 16px; } .stat { padding-left: 16px; } }

/* ── about ── */
.about-grid { display: grid; grid-template-columns: .85fr 1.15fr; gap: 72px; align-items: center; }
.about-art { position: relative; max-width: 420px; width: 100%; }
.portrait { width: 100%; height: auto; }
.seal-about { position: absolute; right: 6%; bottom: 14%; width: 64px; height: 64px; font-size: 38px; border-radius: 14px; transform: rotate(6deg); }
.about-copy { display: flex; flex-direction: column; gap: 24px; }
.principles { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-top: 12px; }
.pr-item { padding: 20px; border-radius: 18px; border: 1px solid var(--line); background: var(--card); display: flex; flex-direction: column; gap: 8px; transition: transform .45s var(--ease-out), border-color .3s; }
.pr-item:hover { transform: translateY(-3px); border-color: rgba(232, 98, 42, .45); }
@media (max-width: 900px) { .about-grid { grid-template-columns: 1fr; gap: 40px; } .about-art { max-width: 300px; margin: 0 auto; } }
@media (max-width: 480px) { .principles { grid-template-columns: 1fr; } }

/* ── craft ── */
.craft-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; }
.craft { padding: 28px 24px; display: flex; flex-direction: column; gap: 16px; transition: transform .45s var(--ease-out), box-shadow .4s; }
.craft:hover { transform: translateY(-4px); box-shadow: 0 26px 46px -34px rgba(26, 23, 20, .5); }
.craft-ico { width: 46px; height: 46px; display: grid; place-items: center; border-radius: 14px; background: rgba(232, 98, 42, .1); color: var(--accent-ink); }
.craft-ico svg { width: 22px; height: 22px; transition: transform .8s var(--ease); }
.craft:hover .craft-ico svg { transform: rotate(90deg); }
.craft-list { display: flex; flex-direction: column; gap: 9px; }
.craft-list li { color: var(--ink-2); font-size: 15px; padding-bottom: 9px; border-bottom: 1px dashed var(--line); }
.craft-list li:last-child { border-bottom: 0; padding-bottom: 0; }
@media (max-width: 1020px) { .craft-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px) { .craft-grid { grid-template-columns: 1fr; } }

/* ── timeline ── */
.timeline { position: relative; display: flex; flex-direction: column; gap: 0; margin-left: 320px; }
.timeline::before { content: ""; position: absolute; left: 7px; top: 12px; bottom: 12px; width: 1.5px; background: linear-gradient(var(--accent), var(--line) 60%); filter: url(#ink-brush); }
.tl-item { position: relative; display: grid; grid-template-columns: 120px 1fr; gap: 24px; padding: 0 0 48px 44px; }
.tl-item:last-child { padding-bottom: 0; }
.tl-item > div { display: flex; flex-direction: column; gap: 10px; }
.tl-dot { position: absolute; left: 0; top: 7px; width: 16px; height: 16px; border-radius: 50%; background: var(--paper); border: 2px solid var(--accent); }
.tl-item:first-child .tl-dot { background: var(--accent); box-shadow: 0 0 0 6px rgba(232, 98, 42, .15); animation: pulse 2.2s infinite; }
.tl-when { color: var(--accent-ink); padding-top: 6px; }
@media (max-width: 860px) { .timeline { margin-left: 0; } .tl-item { grid-template-columns: 1fr; gap: 8px; padding-left: 40px; } .tl-when { padding-top: 0; } }

/* ── contact ── */
.contact { padding: 150px 0 120px; overflow: hidden; }
.contact-in { display: flex; flex-direction: column; gap: 28px; align-items: flex-start; }
.contact-title { color: var(--on-night); font-size: clamp(52px, 8.4vw, 128px); max-width: 1000px; }
.mail { display: inline-flex; align-items: center; gap: 18px; margin-top: 12px; font: 400 clamp(22px, 3.4vw, 42px)/1.2 var(--serif); letter-spacing: -.02em; color: var(--on-night); text-decoration: none; padding-bottom: 10px; border-bottom: 1.5px solid #3a3631; transition: border-color .4s, color .3s; max-width: 100%; }
.mail-t { overflow-wrap: anywhere; }
.mail:hover { border-color: var(--accent); color: #fff; }
.mail .arr { color: var(--accent-soft); transition: transform .4s var(--ease); }
.mail:hover .arr { transform: translateX(8px); }
.socials { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 8px; }
.socials a { padding: 12px 18px; border-radius: 999px; border: 1px solid #34302b; color: var(--on-night-2); text-decoration: none; font-size: 15px; transition: background .25s, color .25s, border-color .25s; min-height: 44px; display: inline-flex; align-items: center; }
.socials a:hover { background: var(--on-night); color: var(--night); border-color: var(--on-night); }

/* ── footer ── */
.foot { background: var(--night); color: var(--on-night-2); padding: 0 0 calc(40px + env(safe-area-inset-bottom)); }
.foot-in { display: flex; flex-direction: column; gap: 22px; border-top: 1px solid #2a2722; padding-top: 32px; }
.foot-stars { color: #5f5952; }
.foot-row { display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap; }
.foot .small { color: #8F8880; }
.foot .serif { color: var(--on-night); font-size: 16px; }
.foot .btn-line { color: var(--on-night); border-color: #3a3631; min-height: 44px; }
.foot .btn-line:hover { background: var(--on-night); color: var(--night); border-color: var(--on-night); }
.credit a { color: var(--on-night-2); }

/* ── to top ── */
.to-top { position: fixed; right: 20px; bottom: calc(20px + env(safe-area-inset-bottom)); width: 48px; height: 48px; border-radius: 50%; border: 1px solid var(--line); background: var(--card); color: var(--ink); font-size: 18px; cursor: pointer; z-index: 45; opacity: 0; transform: translateY(12px); pointer-events: none; transition: opacity .3s, transform .4s var(--ease); box-shadow: 0 14px 30px -18px rgba(26, 23, 20, .6); }
.to-top.show { opacity: 1; transform: none; pointer-events: auto; }
html.building .to-top { display: none; }

/* ── ink canvas (clicks, brush trail) ── */
.ink-canvas { position: fixed; inset: 0; width: 100%; height: 100%; pointer-events: none; z-index: 55; }

/* ── post-build reveal for skip / reduced motion ── */
.rv { opacity: 0; transform: translateY(18px); transition: opacity .8s var(--ease), transform .9s var(--ease-out); transition-delay: var(--rd, 0s); }
.rv.in { opacity: 1; transform: none; }

/* ── keyframes ── */
@keyframes rise { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
@keyframes pulse { 0% { box-shadow: 0 0 0 0 rgba(232, 98, 42, .45); } 70% { box-shadow: 0 0 0 10px rgba(232, 98, 42, 0); } 100% { box-shadow: 0 0 0 0 rgba(232, 98, 42, 0); } }
@keyframes drift { 0%, 100% { transform: translateY(0) rotate(-.6deg); } 50% { transform: translateY(-10px) rotate(.6deg); } }
@keyframes breathe { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.035); } }
@keyframes marquee { to { transform: translateX(-50%); } }
@keyframes shine { to { background-position: -300% 0; } }
@keyframes twinkle { 0%, 100% { opacity: .25; } 50% { opacity: 1; } }
@keyframes typing { to { width: calc(var(--n) * 1ch); } }
@keyframes blink { 50% { opacity: 0; } }
@keyframes pop { from { opacity: 0; transform: translateY(14px) scale(.98); } to { opacity: 1; transform: none; } }
@keyframes stamp { 0% { opacity: 0; transform: scale(2.4) rotate(-18deg); } 60% { opacity: 1; transform: scale(.92) rotate(-6deg); } 100% { opacity: .95; transform: scale(1) rotate(-8deg); } }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; scroll-behavior: auto !important; }
  .term .type { width: calc(var(--n) * 1ch); }
}

/* ─────────────────────────────────────────────────────────────
   PHONES & TOUCH · smooth-scroll performance + layout polish.
   Desktop is untouched: everything below only applies to small
   or touch screens.
   ───────────────────────────────────────────────────────────── */
@media (max-width: 760px), (hover: none) and (pointer: coarse) {
  /* paper texture painted once into the page instead of two blended full-screen overlays */
  :root { --tex: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='600' height='600'%3E%3Cfilter id='m'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.008 .012' numOctaves='4' seed='7' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 .55  0 0 0 0 .42  0 0 0 0 .3  0 0 0 .24 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23m)'/%3E%3C/svg%3E"), url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='300' height='300'%3E%3Cfilter id='f'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.04 .9' numOctaves='2' seed='3' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 .35  0 0 0 0 .3  0 0 0 0 .25  0 0 0 .11 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23f)'/%3E%3C/svg%3E"); }
  html::before, html::after { display: none; }
  .v, .tint, .marquee-sec { background-image: var(--tex); background-size: 600px 600px, 300px 300px; background-blend-mode: multiply; }
  .v { background-color: var(--paper); }
  .tint { background-color: var(--paper-2); }
  .marquee-sec { background-color: var(--paper); }

  /* no live SVG filters on anything that moves or redraws */
  .progress span, .links a.on::after, .lab-card::after, .timeline::before, .brush-edge, .art .ink.brush { filter: none; }
  .progress span { will-change: transform; }
  .art .ink.brush { stroke-width: 6; opacity: .82; }

  /* solid paper instead of frosted blur */
  .nav { background: rgba(250, 248, 245, .97); backdrop-filter: none; -webkit-backdrop-filter: none; }

  /* stop endless repaints */
  .layer-sun { animation: none; }
  .shine div { animation: none; background: none; color: var(--on-night); -webkit-background-clip: border-box; background-clip: border-box; }
  .float-card { animation-duration: 9s; }
  .float-card, .marquee-track, .hero-art .art { will-change: transform; }
  .tilt, .btn { will-change: auto; }
  .card { box-shadow: none; }
  .float-card { box-shadow: 0 18px 36px -24px rgba(26, 23, 20, .4); }

  /* calmer taps, no grey flash */
  a, button { -webkit-tap-highlight-color: transparent; touch-action: manipulation; }
  .btn:active, .chip:active, .lab-card:active, .socials a:active { transform: scale(.97); transition: transform .15s; }
}

@media (max-width: 760px) {
  /* rhythm */
  .section { padding: 76px 0; }
  .night { padding: 96px 0; }
  .contact { padding: 110px 0 92px; }
  .split { margin-bottom: 36px; }
  .hero { padding: 28px 0 56px; }
  .hero-copy { gap: 20px; }
  .h-display { font-size: clamp(76px, 24vw, 120px); }
  .h-tag { font-size: clamp(26px, 7.4vw, 34px); }
  .lede { font-size: 18px; }
  .cta-row { width: 100%; }
  .cta-row .btn { flex: 1 1 auto; min-height: 54px; }
  .hint { font-size: 13.5px; }
  .hero-art { max-width: 420px; margin: 4px auto 0; }
  .float-card { width: 82%; left: 0; bottom: -2%; }
  .marquee-sec { padding: 16px 0; }
  .marquee-track { animation-duration: 30s; gap: 20px; }
  .ascii-big { font-size: clamp(8px, 3.1vw, 14px); }
  .term { font-size: 12.5px; padding: 16px 16px 18px; }
  .work-card .h3 { font-size: 26px; }
  .work-card.feature .h3 { font-size: 38px; }
  .wc-art { width: 72px; height: 72px; }
  .work-card.feature .wc-art { width: 112px; }
  .lab-card { padding: 22px 20px 20px; border-radius: 20px; }
  .num-grid { gap: 26px 12px; }
  .stat-n { font-size: 58px; }
  .principles { gap: 10px; }
  .pr-item { padding: 18px; }
  .craft { padding: 24px 20px; }
  .tl-item { padding-bottom: 36px; }
  .contact-title { font-size: clamp(50px, 14.5vw, 76px); }
  .mail { font-size: clamp(19px, 5.8vw, 26px); gap: 12px; }
  .socials a { flex: 1 1 calc(50% - 10px); justify-content: center; }
  .foot-row { flex-direction: column; align-items: flex-start; }
  .to-top { right: 14px; width: 46px; height: 46px; }
  .brush-edge { height: 28px; }
  .brush-edge.top { top: -27px; } .brush-edge.bottom { bottom: -27px; }
}
