/* ---------- Fonts (self-hosted, no third-party requests) ---------- */
@font-face { font-family: "Inter Tight"; src: url("/assets/fonts/inter-tight-latin-wght-normal.woff2") format("woff2"); font-weight: 100 900; font-display: swap; }
@font-face { font-family: "Instrument Serif"; src: url("/assets/fonts/instrument-serif-latin-400-italic.woff2") format("woff2"); font-style: italic; font-weight: 400; font-display: swap; }
@font-face { font-family: "Instrument Serif"; src: url("/assets/fonts/instrument-serif-latin-400-normal.woff2") format("woff2"); font-style: normal; font-weight: 400; font-display: swap; }
@font-face { font-family: "JetBrains Mono"; src: url("/assets/fonts/jetbrains-mono-latin-wght-normal.woff2") format("woff2"); font-weight: 100 800; font-display: swap; }

/* ---------- Tokens ---------- */
:root {
  --bg: #0b0b0e;
  --bg-2: #111116;
  --surface: #141419;
  --surface-2: #1b1b22;
  --line: rgba(255, 255, 255, 0.08);
  --line-strong: rgba(255, 255, 255, 0.16);
  --text: #f3f2ee;
  --muted: #9b9aa6;
  --faint: #5f5e6a;
  --accent: #c6f24e;
  --accent-ink: #0b0b0e;
  --needle: 255, 255, 255;
  --shadow: 0 1px 0 rgba(255,255,255,.04) inset, 0 20px 50px -30px rgba(0,0,0,.8);
  --radius: 22px;
  --gap: 14px;
  --sans: "Inter Tight", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  --serif: "Instrument Serif", ui-serif, Georgia, serif;
  --mono: "JetBrains Mono", ui-monospace, "Cascadia Code", Consolas, monospace;
  --ease: cubic-bezier(.2, .8, .2, 1);
  color-scheme: dark;
}
@media (prefers-color-scheme: light) {
  :root:not([data-theme="dark"]) {
    --bg: #f3f1ec; --bg-2: #ebe8e1; --surface: #ffffff; --surface-2: #f6f4ef;
    --line: rgba(17, 17, 20, 0.08); --line-strong: rgba(17, 17, 20, 0.16);
    --text: #121216; --muted: #5d5c66; --faint: #a3a1aa;
    --accent: #3d2bff; --accent-ink: #ffffff; --needle: 18, 18, 22;
    --shadow: 0 1px 2px rgba(0,0,0,.04), 0 20px 40px -28px rgba(30,20,60,.25);
    color-scheme: light;
  }
}
:root[data-theme="light"] {
  --bg: #f3f1ec; --bg-2: #ebe8e1; --surface: #ffffff; --surface-2: #f6f4ef;
  --line: rgba(17, 17, 20, 0.08); --line-strong: rgba(17, 17, 20, 0.16);
  --text: #121216; --muted: #5d5c66; --faint: #a3a1aa;
  --accent: #3d2bff; --accent-ink: #ffffff; --needle: 18, 18, 22;
  --shadow: 0 1px 2px rgba(0,0,0,.04), 0 20px 40px -28px rgba(30,20,60,.25);
  color-scheme: light;
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 84px; }
body {
  margin: 0; background: var(--bg); color: var(--text);
  font: 400 16px/1.55 var(--sans); letter-spacing: -0.005em;
  -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility;
  overflow-x: hidden;
}
body::after { /* film grain */
  content: ""; position: fixed; inset: 0; pointer-events: none; z-index: 100; opacity: .05; mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}
img { max-width: 100%; display: block; }
a { color: inherit; }
h1, h2, h3, p { margin: 0; }
ul, ol { margin: 0; padding: 0; list-style: none; }
::selection { background: var(--accent); color: var(--accent-ink); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 8px; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.mono { font-family: var(--mono); font-size: .78em; letter-spacing: 0; }
.skip { position: absolute; left: 16px; top: -60px; z-index: 200; background: var(--accent); color: var(--accent-ink); padding: 10px 14px; border-radius: 10px; text-decoration: none; font-weight: 600; }
.skip:focus { top: 12px; }

/* ---------- Top bar ---------- */
.bar {
  position: fixed; top: 12px; left: 50%; transform: translateX(-50%); z-index: 50;
  width: min(1240px, calc(100% - 24px));
  display: flex; align-items: center; gap: 12px; padding: 8px 8px 8px 14px;
  background: color-mix(in srgb, var(--bg) 70%, transparent);
  backdrop-filter: blur(14px) saturate(140%); -webkit-backdrop-filter: blur(14px) saturate(140%);
  border: 1px solid var(--line); border-radius: 999px;
}
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; font-weight: 600; letter-spacing: -0.02em; }
.brand-mark {
  display: grid; place-items: center; width: 30px; height: 30px; border-radius: 50%;
  background: var(--text); color: var(--bg); font: 600 13px/1 var(--mono); letter-spacing: -0.04em;
  transition: transform .5s var(--ease);
}
.brand:hover .brand-mark { transform: rotate(-12deg) scale(1.06); }
.nav { margin-left: auto; display: flex; gap: 4px; }
.nav a { text-decoration: none; color: var(--muted); font-size: 14px; padding: 8px 12px; border-radius: 999px; transition: color .2s, background .2s; }
.nav a:hover { color: var(--text); background: var(--surface-2); }
.theme-btn {
  width: 38px; height: 38px; border-radius: 50%; border: 1px solid var(--line); background: var(--surface);
  color: var(--text); display: grid; place-items: center; cursor: pointer; transition: transform .4s var(--ease), border-color .2s;
}
.theme-btn:hover { transform: rotate(25deg); border-color: var(--line-strong); }
.theme-btn svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; grid-area: 1 / 1; transition: opacity .3s, transform .4s var(--ease); }
.theme-btn .i-moon { fill: currentColor; stroke: none; }
:root .theme-btn .i-sun { opacity: 1; } :root .theme-btn .i-moon { opacity: 0; transform: scale(.6); }
@media (prefers-color-scheme: light) { :root:not([data-theme="dark"]) .theme-btn .i-sun { opacity: 0; transform: scale(.6); } :root:not([data-theme="dark"]) .theme-btn .i-moon { opacity: 1; transform: none; } }
:root[data-theme="light"] .theme-btn .i-sun { opacity: 0; transform: scale(.6); }
:root[data-theme="light"] .theme-btn .i-moon { opacity: 1; transform: none; }

/* ---------- Hero ---------- */
.hero { position: relative; min-height: min(100svh, 920px); display: grid; align-items: center; overflow: hidden; isolation: isolate; }
.field { position: absolute; inset: 0; width: 100%; height: 100%; z-index: -1; }
.hero::before { /* soften the field behind the text */
  content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none;
  background: radial-gradient(70% 60% at 30% 55%, var(--bg) 20%, transparent 75%), linear-gradient(to bottom, transparent 70%, var(--bg));
}
.hero-inner { width: min(1240px, calc(100% - 32px)); margin: 0 auto; padding: 132px 0 96px; }
.eyebrow { display: inline-flex; align-items: center; gap: 10px; font: 500 13px/1 var(--mono); color: var(--muted); padding: 8px 12px; border: 1px solid var(--line); border-radius: 999px; background: color-mix(in srgb, var(--surface) 60%, transparent); }
.pulse { width: 8px; height: 8px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 0 0 var(--accent); animation: pulse 2.4s infinite; }
@keyframes pulse { 0% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--accent) 60%, transparent); } 70%, 100% { box-shadow: 0 0 0 10px transparent; } }
.hero-title { margin-top: 28px; font-weight: 600; font-size: clamp(44px, 8.4vw, 124px); line-height: .94; letter-spacing: -0.045em; }
.hero-title .line { display: block; }
.hero-title em { font-family: var(--serif); font-style: italic; font-weight: 400; letter-spacing: -0.02em; color: var(--accent); padding-right: .06em; }
.js .hero-title .line { opacity: 0; transform: translateY(40%); filter: blur(8px); animation: rise .9s var(--ease) forwards; }
.js .hero-title .line:nth-child(2) { animation-delay: .12s; }
@keyframes rise { to { opacity: 1; transform: none; filter: none; } }
.hero-lede { margin-top: 28px; max-width: 640px; font-size: clamp(17px, 1.6vw, 20px); line-height: 1.55; color: var(--muted); }
.hero-lede strong { color: var(--text); font-weight: 600; }
.hero-cta { margin-top: 32px; display: flex; flex-wrap: wrap; gap: 10px; }
.btn { display: inline-flex; align-items: center; gap: 8px; height: 46px; padding: 0 20px; border-radius: 999px; font: 600 15px/1 var(--sans); text-decoration: none; cursor: pointer; border: 1px solid transparent; transition: transform .3s var(--ease), background .2s, border-color .2s, color .2s; }
.btn:hover { transform: translateY(-2px); }
.btn-solid { background: var(--text); color: var(--bg); }
.btn-solid:hover { background: var(--accent); color: var(--accent-ink); }
.btn-ghost { background: transparent; color: var(--text); border-color: var(--line-strong); }
.btn-ghost:hover { border-color: var(--text); }
.hero-meta { margin: 56px 0 0; display: flex; flex-wrap: wrap; gap: 10px 36px; }
.hero-meta div { display: grid; gap: 4px; }
.hero-meta dt { font: 500 11px/1 var(--mono); text-transform: uppercase; letter-spacing: .08em; color: var(--faint); }
.hero-meta dd { margin: 0; font-size: 15px; }
.hero-hint { position: absolute; right: max(16px, calc((100% - 1240px) / 2)); bottom: 28px; font: 500 11px/1 var(--mono); color: var(--faint); letter-spacing: .04em; }
@media (hover: none) { .hero-hint { display: none; } }

/* ---------- Work section ---------- */
.work { width: min(1240px, calc(100% - 32px)); margin: 0 auto; padding: 24px 0 64px; }
.work-head { display: flex; flex-wrap: wrap; align-items: end; justify-content: space-between; gap: 16px; margin-bottom: 22px; }
.section-title { font-size: clamp(28px, 3.4vw, 40px); font-weight: 600; letter-spacing: -0.035em; }
.filters { display: flex; flex-wrap: wrap; gap: 6px; padding: 4px; border: 1px solid var(--line); border-radius: 999px; background: var(--bg-2); }
.filter { font: 500 13px/1 var(--sans); color: var(--muted); background: transparent; border: 0; height: 34px; padding: 0 14px; border-radius: 999px; cursor: pointer; transition: color .2s, background .25s; }
.filter:hover { color: var(--text); }
.filter[aria-pressed="true"] { background: var(--text); color: var(--bg); }

/* ---------- Bento grid ---------- */
.grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); grid-auto-rows: 236px; grid-auto-flow: dense; gap: var(--gap); }
.s-1x1 { grid-column: span 1; grid-row: span 1; }
.s-2x1 { grid-column: span 2; grid-row: span 1; }
.s-2x2 { grid-column: span 2; grid-row: span 2; }

.tile {
  --c: var(--accent);            /* per-tile colour */
  --mx: 50%; --my: 50%; --rx: 0deg; --ry: 0deg;
  position: relative; overflow: hidden; isolation: isolate;
  border-radius: var(--radius); background: var(--surface); border: 1px solid var(--line);
  box-shadow: var(--shadow);
  transform: perspective(1000px) rotateX(var(--rx)) rotateY(var(--ry));
  transition: transform .5s var(--ease), border-color .3s, box-shadow .4s;
  display: flex; flex-direction: column; justify-content: flex-end;
}
.tile[hidden] { display: none; }
.tile::before { /* spotlight that follows the cursor */
  content: ""; position: absolute; inset: 0; z-index: -1; opacity: 0; transition: opacity .4s;
  background: radial-gradient(420px circle at var(--mx) var(--my), color-mix(in srgb, var(--c) 18%, transparent), transparent 60%);
}
.tile::after { /* glowing border that follows the cursor */
  content: ""; position: absolute; inset: 0; border-radius: inherit; padding: 1px; pointer-events: none; opacity: 0; transition: opacity .4s;
  background: radial-gradient(260px circle at var(--mx) var(--my), color-mix(in srgb, var(--c) 85%, transparent), transparent 70%);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0); -webkit-mask-composite: xor;
  mask: linear-gradient(#000 0 0) content-box exclude, linear-gradient(#000 0 0);
}
.tile:hover, .tile:focus-within { border-color: var(--line-strong); box-shadow: var(--shadow), 0 30px 60px -36px color-mix(in srgb, var(--c) 55%, transparent); }
.tile:hover::before, .tile:hover::after, .tile:focus-within::before { opacity: 1; }
.js .tile.pre { opacity: 0; transform: translateY(26px) scale(.98); }
.js .tile.in { opacity: 1; transition: opacity .8s var(--ease), transform .8s var(--ease), border-color .3s, box-shadow .4s; transition-delay: var(--d, 0s); }

.tile-body { position: relative; z-index: 1; padding: 22px 24px 22px; display: grid; gap: 8px; }
.kicker { font: 500 11.5px/1.3 var(--mono); text-transform: uppercase; letter-spacing: .07em; color: var(--muted); }
.tile-title { font-size: 24px; font-weight: 600; letter-spacing: -0.03em; line-height: 1.1; display: flex; align-items: center; gap: 8px; }
.s-2x2 .tile-title { font-size: clamp(26px, 2.6vw, 34px); }
.tile-title.big { font-size: clamp(28px, 3vw, 40px); }
.tile-text { color: var(--muted); font-size: 14.5px; line-height: 1.5; max-width: 52ch; }
.s-2x2 .tile-text { font-size: 15.5px; }
.tags { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; }
.tags li { font: 500 12px/1 var(--mono); padding: 6px 9px; border-radius: 999px; border: 1px solid var(--line); color: var(--muted); background: color-mix(in srgb, var(--surface) 70%, transparent); backdrop-filter: blur(6px); transition: border-color .3s, color .3s; }
.tile:hover .tags li { border-color: color-mix(in srgb, var(--c) 40%, var(--line)); color: var(--text); }
.arrow { display: inline-grid; place-items: center; width: 28px; height: 28px; border-radius: 50%; border: 1px solid var(--line-strong); font-size: 14px; transition: transform .45s var(--ease), background .3s, color .3s, border-color .3s; }
.tile:hover .arrow { transform: rotate(45deg); background: var(--c); color: #fff; border-color: var(--c); }
.stretch { position: absolute; inset: 0; z-index: 3; border-radius: inherit; }
.stretch:focus-visible { outline-offset: -3px; }
.art { position: absolute; inset: 0; z-index: 0; pointer-events: none; }

/* fade art under the text so copy stays readable */
.s-2x2 .art::after, .s-2x1 .art::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(to top, var(--surface) 22%, color-mix(in srgb, var(--surface) 70%, transparent) 45%, transparent 75%);
}

/* ---------- Nostos ---------- */
.t-nostos { --c: #42e8e0; }
.art-nostos svg { position: absolute; width: 118%; height: 118%; left: -9%; top: -26%; }
.art-nostos .lines circle { fill: none; stroke: color-mix(in srgb, var(--c) 30%, transparent); stroke-width: 1; transition: stroke .6s; }
.art-nostos .flow circle { fill: none; stroke: var(--c); stroke-width: 1.6; stroke-dasharray: 6 18; opacity: .35; animation: flow 6s linear infinite; transition: opacity .5s; }
.art-nostos .flow circle:nth-child(2) { animation-direction: reverse; }
.tile.t-nostos:hover .flow circle { opacity: 1; animation-duration: 1.6s; }
.tile.t-nostos:hover .lines circle { stroke: color-mix(in srgb, var(--c) 55%, transparent); }
@keyframes flow { to { stroke-dashoffset: -240; } }
.art-nostos .pole-n { fill: var(--c); } .art-nostos .pole-s { fill: color-mix(in srgb, var(--text) 85%, transparent); }
.art-nostos .magnet { transform-origin: 200px 200px; transition: transform .9s var(--ease); }
.tile.t-nostos:hover .magnet { transform: scale(1.15); }
.art-nostos .dial { fill: color-mix(in srgb, var(--surface) 80%, transparent); stroke: var(--line-strong); }
.art-nostos .pointer { fill: var(--c); transform: rotate(35deg); transition: transform 1.2s cubic-bezier(.3, 1.6, .4, 1); }
.tile.t-nostos:hover .pointer { transform: rotate(-60deg); }
.art-nostos .drone { fill: var(--text); offset-path: path("M200 200 A100 100 0 1 1 200.01 200"); offset-rotate: 0deg; animation: orbit 9s linear infinite; filter: drop-shadow(0 0 6px var(--c)); }
.tile.t-nostos:hover .drone { animation-duration: 3s; }
@keyframes orbit { from { offset-distance: 0%; } to { offset-distance: 100%; } }

/* ---------- EVA ---------- */
.t-eva { --c: #13b5c9; }
.art-eva img { position: absolute; height: 82%; width: auto; top: 4%; filter: drop-shadow(0 30px 40px rgba(0,0,0,.45)); transition: transform .9s var(--ease); }
.art-eva .phone-front { right: 12%; transform: rotate(4deg); }
.art-eva .phone-back { right: 34%; top: 8%; height: 74%; opacity: .9; transform: rotate(-8deg) scale(.96); }
.tile.t-eva:hover .phone-front { transform: translateY(-18px) rotate(1deg) scale(1.03); }
.tile.t-eva:hover .phone-back { transform: translate(-26px, -6px) rotate(-12deg) scale(.96); }

/* ---------- Liebherr ---------- */
.t-liebherr { --c: #ffd000; }
.stat { font-size: clamp(46px, 4.4vw, 60px); font-weight: 600; letter-spacing: -0.05em; line-height: 1; font-variant-numeric: tabular-nums; }
.stat .plus { color: var(--c); }
.scan { position: absolute; inset: 0; z-index: 0; pointer-events: none; opacity: 0; transition: opacity .3s;
  background: linear-gradient(to bottom, transparent, color-mix(in srgb, var(--c) 22%, transparent) 50%, transparent) 0 -100% / 100% 40% no-repeat,
              repeating-linear-gradient(to right, color-mix(in srgb, var(--c) 12%, transparent) 0 1px, transparent 1px 18px);
}
.tile.t-liebherr:hover .scan { opacity: 1; animation: scan 1.8s var(--ease) infinite; }
@keyframes scan { to { background-position: 0 260%, 0 0; } }

/* ---------- Clock ---------- */
.t-clock { --c: var(--accent); }
.art-clock svg { position: absolute; right: -26px; top: -26px; width: 150px; height: 150px; transform: rotate(-90deg); }
.art-clock .ring-bg { fill: none; stroke: var(--line); stroke-width: 2; }
.art-clock .ring { fill: none; stroke: var(--c); stroke-width: 2.5; stroke-linecap: round; stroke-dasharray: var(--sec, 0) 60; transition: stroke-dasharray .4s linear, stroke-width .4s; }
.tile.t-clock:hover .ring { stroke-width: 5; }
.clock { font-size: 52px; font-weight: 600; letter-spacing: -0.05em; line-height: 1; font-variant-numeric: tabular-nums; }

/* ---------- hyve up ---------- */
.t-hyve { --c: #7b2cff; }
.art-hyve { background: radial-gradient(120% 80% at 70% 0%, color-mix(in srgb, #620cf6 30%, transparent), transparent 60%); }
.art-hyve .phone {
  position: absolute; right: 9%; top: 6%; width: 44%; aspect-ratio: 480 / 900; border-radius: 30px; overflow: hidden;
  border: 6px solid #17141f; background: #17141f; box-shadow: 0 30px 60px -20px rgba(98, 12, 246, .55);
  transform: rotate(6deg); transition: transform .9s var(--ease);
}
.art-hyve .phone img { width: 100%; height: 108%; object-fit: cover; object-position: top; transition: transform 1.4s var(--ease); }
.tile.t-hyve:hover .phone { transform: rotate(2deg) translateY(-14px) scale(1.03); }
.tile.t-hyve:hover .phone img { transform: translateY(-6%); }
.art-hyve .pin { position: absolute; width: 12px; height: 12px; border-radius: 50%; background: #620cf6; box-shadow: 0 0 0 0 rgba(98,12,246,.6); opacity: 0; transform: scale(.4); transition: opacity .4s, transform .5s var(--ease); }
.art-hyve .p1 { left: 18%; top: 22%; } .art-hyve .p2 { left: 34%; top: 12%; } .art-hyve .p3 { left: 26%; top: 40%; }
.tile.t-hyve:hover .pin { opacity: 1; transform: none; animation: ping 1.6s infinite; }
.tile.t-hyve:hover .p2 { transition-delay: .1s; animation-delay: .3s; } .tile.t-hyve:hover .p3 { transition-delay: .2s; animation-delay: .6s; }
@keyframes ping { 70%, 100% { box-shadow: 0 0 0 14px rgba(98,12,246,0); } }

/* ---------- Claim to Fame ---------- */
.t-c2f { --c: #34d399; }
.art-c2f svg { position: absolute; right: 0; top: 0; width: 62%; height: 62%; }
.art-c2f .grid-l { stroke: var(--line); stroke-width: 1; fill: none; vector-effect: non-scaling-stroke; }
.art-c2f .ghost { fill: none; stroke: var(--line-strong); stroke-width: 1.5; vector-effect: non-scaling-stroke; }
.art-c2f .draw { fill: none; stroke: var(--c); stroke-width: 2.5; vector-effect: non-scaling-stroke; stroke-dasharray: 1; stroke-dashoffset: 1; transition: stroke-dashoffset 1.4s var(--ease); filter: drop-shadow(0 0 6px color-mix(in srgb, var(--c) 70%, transparent)); }
.tile.t-c2f:hover .draw { stroke-dashoffset: 0; }

/* ---------- Agnes ---------- */
.t-agnes { --c: #ff8a3d; }
.art-agnes svg { position: absolute; right: 14px; top: 16px; width: 58%; }
.art-agnes .edge { fill: none; stroke: var(--line-strong); stroke-width: 1.5; stroke-dasharray: 4 6; transition: stroke .4s; }
.tile.t-agnes:hover .edge { stroke: var(--c); animation: dash 1s linear infinite; }
@keyframes dash { to { stroke-dashoffset: -20; } }
.art-agnes .node { fill: var(--surface-2); stroke: var(--line-strong); stroke-width: 1.5; transform-box: fill-box; transform-origin: center; transition: transform .5s var(--ease), fill .4s, stroke .4s; }
.tile.t-agnes:hover .node { stroke: var(--c); transform: scale(1.2); }
.tile.t-agnes:hover .node.hub { fill: var(--c); }
.tile.t-agnes:hover .node.ok { fill: #34d399; stroke: #34d399; }

/* ---------- SmartNotes ---------- */
.t-notes { --c: #4d8dff; }
.art-notes { display: flex; gap: 8px; padding: 22px 24px; }
.art-notes .key { height: 40px; min-width: 46px; padding: 0 12px; display: grid; place-items: center; font: 600 12px/1 var(--mono); color: var(--muted); border-radius: 10px; background: var(--surface-2); border: 1px solid var(--line-strong); box-shadow: 0 4px 0 var(--line-strong); transition: transform .15s, box-shadow .15s, color .2s, border-color .2s; }
.art-notes .key-wide { min-width: 96px; }
.tile.t-notes:hover .key { animation: press 1.6s infinite; color: var(--text); border-color: var(--c); }
.tile.t-notes:hover .key-wide { animation-delay: .08s; }
@keyframes press { 0%, 30%, 100% { transform: none; box-shadow: 0 4px 0 var(--line-strong); } 10%, 20% { transform: translateY(3px); box-shadow: 0 1px 0 var(--line-strong); } }
.art-notes .memo { position: absolute; right: 22px; top: 20px; width: 54px; height: 38px; border-radius: 8px; background: color-mix(in srgb, var(--c) 20%, var(--surface-2)); border: 1px solid color-mix(in srgb, var(--c) 40%, transparent); opacity: 0; }
.tile.t-notes:hover .memo { animation: memo 1.6s var(--ease) infinite; }
.tile.t-notes:hover .m2 { animation-delay: .2s; right: 40px; } .tile.t-notes:hover .m3 { animation-delay: .4s; right: 58px; }
@keyframes memo { 0%, 15% { opacity: 0; transform: translateY(20px) scale(.8); } 40%, 70% { opacity: 1; transform: none; } 100% { opacity: 0; transform: translateY(-14px); } }

/* ---------- Experience ---------- */
.t-xp { --c: var(--accent); justify-content: flex-start; }
.t-xp .tile-body { height: 100%; align-content: start; }
.timeline { margin-top: 14px; display: grid; gap: 2px; }
.timeline li { display: grid; grid-template-columns: 86px 1fr; gap: 2px 14px; padding: 12px 12px; border-radius: 14px; position: relative; transition: background .3s; }
.timeline li::before { content: ""; position: absolute; left: 0; top: 14px; bottom: 14px; width: 2px; border-radius: 2px; background: var(--c); transform: scaleY(0); transition: transform .35s var(--ease); }
.timeline li:hover { background: var(--surface-2); }
.timeline li:hover::before { transform: none; }
.timeline .when { font: 500 12px/1.6 var(--mono); color: var(--faint); grid-row: span 2; }
.timeline .what { font-size: 15px; } .timeline .what b { font-weight: 600; margin-right: 6px; }
.timeline .what { color: var(--muted); }
.timeline .what b { color: var(--text); }
.timeline .note { font-size: 13.5px; color: var(--muted); line-height: 1.45; transition: color .3s; }
.timeline li:hover .note { color: var(--text); }
.timeline li:hover .when { color: var(--c); }

/* ---------- Pothole ---------- */
.t-oak { --c: #f43f5e; }
.art-oak svg { position: absolute; right: 0; top: 0; width: 62%; height: 58%; }
.art-oak .road { fill: var(--surface-2); }
.art-oak .lane { stroke: var(--faint); stroke-width: 2; fill: none; }
.art-oak .hole { fill: color-mix(in srgb, var(--text) 18%, transparent); }
.art-oak .box { fill: none; stroke: var(--c); stroke-width: 1.5; stroke-dasharray: 4 3; opacity: 0; transition: opacity .3s .5s; }
.art-oak .sweep { fill: var(--c); opacity: 0; filter: drop-shadow(0 0 6px var(--c)); }
.tile.t-oak:hover .box { opacity: 1; }
.tile.t-oak:hover .sweep { animation: sweep 1.6s var(--ease) infinite; }
@keyframes sweep { 0% { opacity: .9; transform: translateY(0); } 90% { opacity: .9; transform: translateY(117px); } 100% { opacity: 0; transform: translateY(117px); } }

/* ---------- Dispatch ---------- */
.t-dispatch { --c: #e879f9; }
.art-dispatch .env { position: absolute; right: 34px; top: 26px; width: 64px; height: 44px; border-radius: 6px; background: var(--surface-2); border: 1px solid var(--line-strong); transition: transform .7s var(--ease), border-color .3s; }
.art-dispatch .env::before { content: ""; position: absolute; inset: 0; background: linear-gradient(to bottom right, transparent calc(50% - 1px), var(--line-strong) 50%, transparent calc(50% + 1px)) left / 50% 100% no-repeat, linear-gradient(to bottom left, transparent calc(50% - 1px), var(--line-strong) 50%, transparent calc(50% + 1px)) right / 50% 100% no-repeat; background-size: 50% 70%; }
.art-dispatch .e2 { transform: translate(-6px, 6px); } .art-dispatch .e3 { transform: translate(-12px, 12px); }
.tile.t-dispatch:hover .env { border-color: var(--c); }
.tile.t-dispatch:hover .e1 { transform: translate(14px, -10px) rotate(10deg); }
.tile.t-dispatch:hover .e2 { transform: translate(-46px, -4px) rotate(-6deg); }
.tile.t-dispatch:hover .e3 { transform: translate(-100px, 10px) rotate(-16deg); }

/* ---------- HR ---------- */
.t-hr { --c: #a3e635; }
.art-hr .cv { position: absolute; right: 30px; top: 22px; width: 50px; height: 64px; border-radius: 7px; background: var(--surface-2); border: 1px solid var(--line-strong); padding: 10px 8px; display: grid; gap: 6px; align-content: start; transition: transform .7s var(--ease), border-color .3s; }
.art-hr .cv i { display: block; height: 4px; border-radius: 2px; background: var(--line-strong); }
.art-hr .cv i:nth-child(2) { width: 70%; } .art-hr .cv i:nth-child(3) { width: 50%; }
.art-hr .c2 { transform: translate(-10px, 4px) rotate(-6deg); } .art-hr .c3 { transform: translate(-20px, 8px) rotate(-12deg); }
.tile.t-hr:hover .c1 { transform: translate(6px, -6px) rotate(6deg); border-color: var(--c); }
.tile.t-hr:hover .c2 { transform: translate(-44px, 0) rotate(-4deg); }
.tile.t-hr:hover .c3 { transform: translate(-94px, 6px) rotate(-10deg); }

/* ---------- Languages ---------- */
.t-lang { --c: #fb7185; justify-content: flex-start; }
.t-lang .tile-body { height: 100%; align-content: space-between; }
.greet { font-family: var(--serif); font-style: italic; font-size: 46px; line-height: 1; letter-spacing: -0.01em; color: var(--c); min-height: 50px; }
.greet span { display: inline-block; transition: opacity .3s, transform .3s var(--ease), filter .3s; }
.greet span.out { opacity: 0; transform: translateY(-30%); filter: blur(4px); }
.langs { display: grid; gap: 4px; }
.langs li { display: flex; justify-content: space-between; font-size: 13.5px; color: var(--muted); border-bottom: 1px dashed var(--line); padding-bottom: 3px; }
.langs li span:last-child { font: 500 12px/1.6 var(--mono); color: var(--faint); }

/* ---------- Education ---------- */
.t-edu { --c: #60a5fa; }
.edu { display: grid; gap: 12px; margin-top: 4px; }
.edu li { display: grid; gap: 2px; padding-left: 14px; border-left: 2px solid var(--line-strong); transition: border-color .3s, transform .4s var(--ease); }
.edu li:hover { border-color: var(--c); transform: translateX(4px); }
.edu b { font-size: 17px; font-weight: 600; letter-spacing: -0.02em; }
.edu span { font-size: 14px; color: var(--muted); }

/* ---------- Stack ---------- */
.t-stack { --c: var(--accent); justify-content: space-between; }
.t-stack .tile-body { padding-bottom: 0; }
.marquee { display: flex; overflow: hidden; padding: 0 0 26px; -webkit-mask: linear-gradient(to right, transparent, #000 12%, #000 88%, transparent); mask: linear-gradient(to right, transparent, #000 12%, #000 88%, transparent); }
.track { display: flex; gap: 10px; padding-right: 10px; flex-shrink: 0; animation: marquee 32s linear infinite; }
.t-stack:hover .track { animation-duration: 12s; }
.track li { font-size: clamp(20px, 2vw, 26px); font-weight: 600; letter-spacing: -0.03em; padding: 10px 18px; border-radius: 999px; border: 1px solid var(--line); white-space: nowrap; transition: color .3s, border-color .3s; }
.track li:nth-child(3n+1) { font-family: var(--serif); font-style: italic; font-weight: 400; }
.t-stack:hover .track li:nth-child(odd) { border-color: color-mix(in srgb, var(--c) 50%, var(--line)); }
@keyframes marquee { to { transform: translateX(-100%); } }

/* ---------- Contact ---------- */
.t-contact { --c: var(--accent); background: radial-gradient(120% 140% at 100% 100%, color-mix(in srgb, var(--accent) 16%, var(--surface)), var(--surface) 60%); }
.contact-row { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 18px; margin-top: 12px; }
.icon-link { text-decoration: none; font-weight: 500; color: var(--muted); transition: color .2s; }
.icon-link:hover { color: var(--text); }
.icon-link span { display: inline-block; transition: transform .3s var(--ease); }
.icon-link:hover span { transform: translate(2px, -2px); }

/* ---------- Footer ---------- */
.foot { width: min(1240px, calc(100% - 32px)); margin: 0 auto; padding: 28px 0 40px; border-top: 1px solid var(--line); display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px; color: var(--faint); font: 500 12.5px/1.5 var(--mono); }

/* ---------- Responsive ---------- */
@media (max-width: 1080px) {
  .grid { grid-template-columns: repeat(2, minmax(0, 1fr)); grid-auto-rows: 228px; }
}
@media (max-width: 720px) {
  .nav { display: none; }
  .theme-btn { margin-left: auto; }
  .hero-inner { width: calc(100% - 32px); padding: 116px 0 72px; }
  .hero-meta { margin-top: 40px; gap: 16px 28px; }
  .work, .foot { width: calc(100% - 32px); }
  .grid { grid-template-columns: minmax(0, 1fr); grid-auto-rows: auto; }
  .tile, .s-1x1, .s-2x1, .s-2x2 { grid-column: auto; grid-row: auto; }
  .s-1x1, .s-2x1 { min-height: 228px; }
  .s-2x2 { min-height: 470px; }
  .t-xp, .t-lang { min-height: 0; }
  .timeline li { grid-template-columns: 1fr; }
  .timeline .when { grid-row: auto; }
  .art-hyve .phone { width: 52%; right: 6%; }
  .art-eva .phone-front { right: 6%; } .art-eva .phone-back { right: 36%; }
  .tile-body { padding: 20px; }
  .clock { font-size: 46px; }
  .work-head { align-items: start; }
  .filters { width: 100%; justify-content: space-between; }
  .filter { padding: 0 10px; flex: 1 0 auto; }
}

/* ---------- Motion preferences ---------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; scroll-behavior: auto !important; }
  .tile { transform: none !important; }
  .js .hero-title .line { opacity: 1; transform: none; filter: none; }
  .track { animation: none; }
  .marquee { overflow-x: auto; }
}

/* ---------- 404 ---------- */
.lost { min-height: 100svh; display: grid; align-content: center; gap: 0; width: min(900px, calc(100% - 32px)); margin: 0 auto; }
.lost .hero-title { margin-top: 18px; }
