:root {
  --bg: #000; --surface: rgba(255, 255, 255, .03); --surface2: rgba(255, 255, 255, .07);
  --text: #f3f1ec; --muted: #9b988f; --line: rgba(255, 255, 255, .12); --line2: rgba(255, 255, 255, .28);
  --accent: #ff8a5c;
  --display: 'Inter Tight', 'Inter', system-ui, sans-serif;
  --body: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --mono: 'JetBrains Mono', ui-monospace, 'Courier New', monospace;
  --bar: 64px;
}
* { box-sizing: border-box; }
html { scroll-padding-top: calc(var(--bar) + 12px); background: var(--bg); }
@media (prefers-reduced-motion: no-preference) { html { scroll-behavior: smooth; } }
body { margin: 0; background: var(--bg); color: var(--text); font: 400 1.0625rem/1.65 var(--body); counter-reset: sec; overflow-x: hidden; -webkit-font-smoothing: antialiased; }
.wrap { width: min(1120px, 100% - 2rem); margin-inline: auto; }
h1, h2, h3 { margin: 0; overflow-wrap: anywhere; }
h2 { font: 600 clamp(1.8rem, 5vw, 3rem)/1.05 var(--display); letter-spacing: -.035em; }
h2::before { counter-increment: sec; content: '0' counter(sec); display: block; margin-bottom: .9rem; font: 500 .8rem/1 var(--mono); letter-spacing: .12em; color: var(--muted); }
h3 { font: 600 1rem/1.3 var(--display); letter-spacing: -.01em; color: var(--text); }
a { color: var(--text); text-underline-offset: 3px; }
.lead { color: var(--muted); max-width: 56ch; margin: .9rem 0 0; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 4px; }
.skip { position: absolute; left: -999px; top: 0; background: var(--text); color: #000; padding: .6rem 1rem; z-index: 200; }
.skip:focus { left: 0; }

/* header */
.top { position: sticky; top: 0; z-index: 50; background: rgba(0, 0, 0, .7); backdrop-filter: blur(14px); border-bottom: 1px solid var(--line); }
.bar { height: var(--bar); display: flex; align-items: center; gap: 1rem; }
.logo { display: flex; align-items: center; gap: .6rem; color: var(--text); text-decoration: none; font: 600 1rem var(--display); letter-spacing: -.02em; margin-right: auto; }
.logo-px svg { width: 34px; height: auto; display: block; }
.nav { display: flex; gap: .15rem; padding: .25rem; border: 1px solid var(--line); border-radius: 999px; background: var(--surface); }
.nav a { color: var(--muted); text-decoration: none; padding: .4rem .95rem; font: 500 .9rem var(--body); border-radius: 999px; transition: color .2s, background .2s; }
.nav a:hover { color: var(--text); }
.nav a[aria-current="true"] { color: var(--text); background: var(--surface2); }
.lang { display: flex; padding: .2rem; border: 1px solid var(--line); border-radius: 999px; }
.lang button { font: 500 .78rem var(--mono); letter-spacing: .06em; padding: .35rem .65rem; background: transparent; color: var(--muted); border: 0; border-radius: 999px; cursor: pointer; transition: color .2s, background .2s; }
.lang button:hover { color: var(--text); }
.lang button[aria-pressed="true"] { background: var(--text); color: #000; }
.burger { display: none; background: none; border: 1px solid var(--line); border-radius: 12px; padding: .6rem .55rem; cursor: pointer; flex-direction: column; gap: 4px; }
.burger span { display: block; width: 18px; height: 2px; background: var(--text); }

/* hero */
.hero { padding: clamp(2rem, 6vw, 4.5rem) 0 clamp(1rem, 3vw, 2rem); background: radial-gradient(60% 45% at 50% 78%, rgba(255, 255, 255, .06), transparent 70%); }
.hero-text { text-align: center; display: flex; flex-direction: column; align-items: center; }
.eyebrow { margin: 0 0 1rem; font: 400 .85rem var(--mono); letter-spacing: .12em; text-transform: uppercase; color: var(--muted); }
.hero h1 { font: 600 clamp(2.4rem, 9vw, 6.6rem)/.98 var(--display); letter-spacing: -.045em; }
.hero .lead { font-size: 1.15rem; text-align: center; }
.cta { display: flex; flex-wrap: wrap; justify-content: center; gap: .75rem; margin-top: 1.8rem; }
.btn { display: inline-block; font: 500 .95rem/1 var(--body); text-decoration: none; color: var(--text); padding: .95rem 1.5rem; border: 1px solid var(--line2); border-radius: 999px; background: transparent; cursor: pointer; transition: background .2s, color .2s, border-color .2s, transform .15s; }
.btn:hover { background: var(--surface2); border-color: var(--text); }
.btn:active { transform: scale(.98); }
.btn-main { background: var(--text); color: #000; border-color: var(--text); }
.btn-main:hover { background: #fff; color: #000; }
.btn.sm { font-size: .82rem; padding: .6rem 1rem; }
.hero-stage { position: relative; margin-top: 1.5rem; width: 100vw; margin-left: calc(50% - 50vw); }
.hero-stage canvas { display: block; width: 100%; }
.hero-mascot { position: absolute; left: 0; right: 0; bottom: 0; margin-inline: auto; width: clamp(64px, 9vw, 104px); }

/* sections */
.mascot { position: relative; }
.sec { padding: clamp(3rem, 8vw, 6rem) 0; }
.sec.alt { border-block: 1px solid var(--line); }
.sec-head { position: relative; margin-bottom: 2.2rem; padding-right: clamp(90px, 16vw, 160px); }
.head-mascot { position: absolute; right: 0; bottom: 0; width: clamp(64px, 10vw, 104px); }
.grid { display: grid; gap: 1rem; }
.about-grid { grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr)); }
.works-grid { grid-template-columns: repeat(auto-fill, minmax(min(100%, 320px), 1fr)); }
.links-grid { grid-template-columns: repeat(auto-fill, minmax(min(100%, 260px), 1fr)); }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: 18px; padding: 1.4rem; transition: transform .25s, border-color .25s, background .25s; }
.card:hover { transform: translateY(-2px); border-color: var(--line2); background: var(--surface2); }
.card.ph { border-style: dashed; color: var(--muted); }
.card h3 { margin-bottom: .8rem; font: 500 .8rem var(--mono); letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }
.card p { margin: 0 0 .6rem; overflow-wrap: anywhere; }
.chips { display: flex; flex-wrap: wrap; gap: .4rem; padding: 0; margin: 0; list-style: none; }
.chip { font: 400 .82rem var(--mono); padding: .25rem .7rem; border: 1px solid var(--line2); border-radius: 999px; color: var(--text); overflow-wrap: anywhere; }
.state { color: var(--muted); font-size: .95rem; margin: 0 0 1rem; min-height: 1.2em; }

/* works */
.tabs { display: inline-flex; padding: .25rem; gap: .15rem; border: 1px solid var(--line); border-radius: 999px; margin-bottom: 1.5rem; }
.tabs button { font: 500 .9rem var(--body); padding: .55rem 1.2rem; color: var(--muted); background: transparent; border: 0; border-radius: 999px; cursor: pointer; transition: color .2s, background .2s; }
.tabs button:hover { color: var(--text); }
.tabs button[aria-selected="true"] { background: var(--text); color: #000; }
.work { padding: 0; display: flex; flex-direction: column; overflow: hidden; }
.work .shot { aspect-ratio: 16/10; background: #050505; border-bottom: 1px solid var(--line); display: grid; place-items: center; overflow: hidden; }
.work .shot img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .5s; }
.work:hover .shot img { transform: scale(1.04); }
.work .shot .glyph { width: 64px; opacity: .8; }
.work .shot small { color: var(--muted); font-size: .8rem; display: block; text-align: center; }
.work .body { padding: 1.3rem; display: flex; flex-direction: column; gap: .8rem; flex: 1; }
.work .body h3 { font: 600 1.15rem var(--display); letter-spacing: -.02em; text-transform: none; color: var(--text); }
.work .row { display: flex; flex-wrap: wrap; gap: .5rem; margin-top: auto; }
.empty { grid-column: 1 / -1; display: flex; align-items: center; gap: 1.2rem; color: var(--muted); border: 1px dashed var(--line2); border-radius: 18px; padding: 1.4rem; }
.empty .clawd-svg { width: 84px; flex: none; }
.empty p { margin: 0; }

/* links */
.link-card { display: flex; gap: 1rem; align-items: center; text-decoration: none; color: var(--text); }
.link-card .ic { flex: none; width: 2.9rem; height: 2.9rem; display: grid; place-items: center; border: 1px solid var(--line2); border-radius: 50%; font: 500 .72rem var(--mono); color: var(--text); transition: background .2s, color .2s; }
.link-card:hover .ic { background: var(--text); color: #000; }
.link-card strong { display: block; font: 600 1.05rem var(--display); letter-spacing: -.015em; overflow-wrap: anywhere; }
.link-card span { color: var(--muted); font-size: .9rem; overflow-wrap: anywhere; }

/* footer */
.foot { border-top: 1px solid var(--line); padding: 2rem 0 2.5rem; margin-top: 1rem; }
.foot-in { display: grid; gap: 1.2rem; justify-items: start; }
.foot .nav { border: 0; background: none; padding: 0; }
.foot .nav a { padding-left: 0; }
.copy { margin: 0; color: var(--muted); font: 400 .8rem var(--mono); }

/* mascot + hints */
.mascot svg { width: 100%; height: auto; display: block; }
.mascot[data-hint]::after { content: attr(data-hint-text); position: absolute; bottom: 100%; right: 0; width: max-content; max-width: 240px; background: var(--text); color: #000; font-size: .85rem; line-height: 1.35; padding: .5rem .8rem; border-radius: 12px; opacity: 0; transform: translateY(6px); pointer-events: none; transition: opacity .2s, transform .2s; z-index: 5; }
.mascot[data-hint]:hover::after { opacity: 1; transform: none; }
.peek { position: fixed; right: 0; bottom: 0; z-index: 40; width: 110px; transform: translateY(110%); transition: transform .5s steps(6); pointer-events: none; }
.peek:not(.show) { visibility: hidden; }
.peek.show { transform: none; }
.peek .bubble { position: absolute; right: 100%; bottom: 40%; margin-right: .4rem; width: max-content; max-width: 220px; background: var(--text); color: #000; font-size: .85rem; line-height: 1.35; padding: .5rem .8rem; border-radius: 12px; }

/* motion */
@keyframes bob { 50% { transform: translateY(-3px); } }
.hero-mascot, .head-mascot { animation: bob 2.6s steps(2) infinite; }
.blink { animation: blink 1.4s steps(1) infinite; }
@keyframes blink { 50% { opacity: 0; } }
.reveal { opacity: 0; transform: translateY(16px); transition: opacity .6s ease, transform .6s ease; }
.reveal.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .reveal { opacity: 1; transform: none; }
}

/* responsive */
@media (max-width: 820px) {
  .burger { display: flex; }
  .nav { display: none; position: absolute; top: var(--bar); left: 0; right: 0; flex-direction: column; border-radius: 0 0 18px 18px; background: #000; padding: .5rem 1rem 1rem; border-width: 0 0 1px; }
  .nav.open { display: flex; }
  .nav a { padding: .9rem .4rem; border-radius: 8px; }
  .sec-head { padding-right: 0; }
  .head-mascot { position: relative; right: auto; width: 84px; margin-top: 1rem; }
  .foot .nav { display: flex; flex-direction: row; flex-wrap: wrap; position: static; padding: 0; background: none; }
}
@media (min-width: 821px) { .foot-in { grid-template-columns: 1fr auto auto; align-items: center; } .foot .copy { grid-column: 1 / -1; } }
