/* =========================================================================
   Personal website — design system
   Colors, font choice, corner radius and motion are set in the editor
   (/admin → Appearance) and arrive as variables from /theme.css.
   Everything else lives here. Edit freely in VS Code.
   ========================================================================= */

@font-face { font-family: "Bricolage Grotesque"; src: url(/fonts/bricolage.woff2) format("woff2"); font-weight: 200 800; font-display: swap; }
@font-face { font-family: "JetBrains Mono"; src: url(/fonts/jetbrains-mono.woff2) format("woff2"); font-weight: 400 700; font-display: swap; }
@font-face { font-family: "Fraunces"; src: url(/fonts/fraunces.woff2) format("woff2"); font-weight: 300 700; font-display: swap; }

/* ---------- Tokens ---------- */
:root {
  /* color (defaults; overridden by /theme.css) */
  --bg: #121110;
  --text: #f2efe8;
  --accent: #ff6a5c;
  --accent-2: #8ba7c7;
  --muted: color-mix(in srgb, var(--text) 62%, var(--bg));
  --faint: color-mix(in srgb, var(--text) 38%, var(--bg));
  --line: color-mix(in srgb, var(--text) 14%, var(--bg));
  --surface: color-mix(in srgb, var(--text) 5%, var(--bg));
  --surface-2: color-mix(in srgb, var(--text) 9%, var(--bg));
  --on-accent: #121110;

  /* type */
  --font-display: "Bricolage Grotesque", ui-sans-serif, system-ui, sans-serif;
  --font-body: var(--font-display);
  --font-mono: "JetBrains Mono", ui-monospace, Menlo, monospace;
  --step--1: clamp(.8rem, .78rem + .1vw, .86rem);
  --step-0: clamp(1rem, .96rem + .2vw, 1.1rem);
  --step-1: clamp(1.2rem, 1.1rem + .5vw, 1.45rem);
  --step-2: clamp(1.5rem, 1.3rem + 1vw, 2.1rem);
  --step-3: clamp(2rem, 1.5rem + 2.4vw, 3.6rem);
  --step-4: clamp(2.8rem, 1.8rem + 5vw, 6.5rem);
  --step-hero: clamp(5rem, 1rem + 19vw, 17rem);

  /* space */
  --s-1: .25rem; --s-2: .5rem; --s-3: .75rem; --s-4: 1rem; --s-5: 1.5rem;
  --s-6: 2.5rem; --s-7: 4rem; --s-8: 7rem;
  --gutter: clamp(1rem, 4vw, 3rem);
  --max: 1320px;
  --edge: max(var(--gutter), calc((100vw - var(--max)) / 2 + var(--gutter))); /* lines header/footer up with content */

  /* shape & motion */
  --radius: 14px;
  --radius-pill: 999px;
  --ease-out: cubic-bezier(.22, 1, .36, 1);
  --ease-spring: cubic-bezier(.34, 1.56, .64, 1);
  --dur-1: 160ms; --dur-2: 320ms; --dur-3: 700ms;
}
/* breakpoints used below: 760px (phone → tablet), 1100px (tablet → desktop) */

html[data-font="serif"] { --font-body: "Bricolage Grotesque", ui-sans-serif, system-ui, sans-serif; }
html[data-theme="dark"] { color-scheme: dark; }
html[data-theme="light"] { color-scheme: light; --on-accent: #fff; }
html[data-motion="calm"] { --dur-2: 220ms; --dur-3: 420ms; }

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0; overflow-x: clip; background: var(--bg); color: var(--text);
  font: 400 var(--step-0)/1.6 var(--font-body);
  -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility;
  min-height: 100vh; display: flex; flex-direction: column;
}
main { flex: 1; width: 100%; max-width: var(--max); margin: 0 auto; padding: 0 var(--gutter); }
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration-thickness: 1px; text-underline-offset: .2em; }
h1, h2, h3 { font-family: var(--font-display); font-weight: 700; line-height: 1; letter-spacing: -.035em; margin: 0; }
p { margin: 0 0 var(--s-4); }
::selection { background: var(--accent); color: var(--on-accent); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 4px; }
.mono { font-family: var(--font-mono); font-size: var(--step--1); letter-spacing: .02em; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: var(--s-4); top: -4rem; z-index: 100; background: var(--accent); color: var(--on-accent); padding: var(--s-2) var(--s-4); border-radius: var(--radius-pill); }
.skip:focus { top: var(--s-4); }
.preview-bar { background: var(--accent); color: var(--on-accent); text-align: center; padding: var(--s-2); font-family: var(--font-mono); font-size: var(--step--1); }

/* ---------- Header & navigation ---------- */
.site-head {
  position: sticky; top: 0; z-index: 50;
  display: flex; align-items: center; justify-content: space-between; gap: var(--s-4);
  padding: var(--s-4) var(--edge);
  background: linear-gradient(var(--bg) 30%, color-mix(in srgb, var(--bg) 0%, transparent));
}
.brand { display: inline-flex; align-items: center; gap: var(--s-2); font-weight: 700; text-decoration: none; letter-spacing: -.02em; }
.brand-dot { width: .7em; height: .7em; border-radius: 50%; background: var(--accent); transition: transform var(--dur-2) var(--ease-spring); }
.brand:hover .brand-dot { transform: scale(1.5); }
.pill-nav {
  display: flex; gap: 2px; padding: 4px; border-radius: var(--radius-pill);
  background: color-mix(in srgb, var(--surface-2) 82%, transparent);
  border: 1px solid var(--line);
  -webkit-backdrop-filter: blur(16px); backdrop-filter: blur(16px);
}
.pill-nav a {
  padding: .45rem .95rem; border-radius: var(--radius-pill); text-decoration: none; font-size: var(--step--1);
  font-weight: 500; color: var(--muted); transition: color var(--dur-1), background-color var(--dur-1);
}
.pill-nav a:hover { color: var(--text); background: var(--surface); }
.pill-nav a[aria-current="page"] { color: var(--on-accent); background: var(--text); }
.menu-btn { display: none; }

@media (max-width: 760px) {
  .pill-nav { display: none; }
  .menu-btn {
    display: grid; place-content: center; gap: 6px; width: 46px; height: 46px; z-index: 70;
    border-radius: var(--radius-pill); border: 1px solid var(--line); background: var(--surface-2); color: var(--text); cursor: pointer;
  }
  .menu-btn i { display: block; width: 18px; height: 2px; background: currentColor; transition: transform var(--dur-2) var(--ease-out); }
  .menu-btn[aria-expanded="true"] i:first-of-type { transform: translateY(4px) rotate(45deg); }
  .menu-btn[aria-expanded="true"] i:last-of-type { transform: translateY(-4px) rotate(-45deg); }
}
.menu-panel {
  position: fixed; inset: 0; z-index: 40; background: var(--bg);
  display: flex; align-items: flex-end; padding: var(--s-8) var(--gutter) var(--s-6);
  clip-path: inset(0 0 0 100%); transition: clip-path var(--dur-2) var(--ease-out);
}
.menu-panel.open { clip-path: inset(0 0 0 0); }
.menu-panel nav { display: grid; gap: var(--s-2); width: 100%; }
.menu-panel a {
  font: 700 var(--step-4)/1 var(--font-display); letter-spacing: -.05em; text-decoration: none;
  display: flex; align-items: baseline; gap: var(--s-3);
  opacity: 0; transform: translateY(20px);
  transition: opacity var(--dur-2) var(--ease-out), transform var(--dur-3) var(--ease-out);
  transition-delay: calc(var(--i) * 40ms + 80ms);
}
.menu-panel a small { font: var(--step--1) var(--font-mono); color: var(--accent); letter-spacing: 0; }
.menu-panel.open a { opacity: 1; transform: none; }

/* ---------- Buttons, links, tags ---------- */
.btn {
  display: inline-flex; align-items: center; gap: var(--s-2); padding: .8rem 1.4rem; border: 0; cursor: pointer;
  border-radius: var(--radius-pill); background: var(--accent); color: var(--on-accent);
  font: 600 var(--step-0)/1 var(--font-body); text-decoration: none;
  transition: transform var(--dur-2) var(--ease-spring), background-color var(--dur-1);
}
.btn:hover { transform: translateY(-2px) rotate(-1deg); }
.btn:active { transform: scale(.97); }
.link-arrow { text-decoration: none; font-weight: 500; display: inline-flex; gap: .4em; align-items: center; }
.link-arrow::after { content: "→"; transition: transform var(--dur-2) var(--ease-out); }
.link-arrow:hover::after { transform: translateX(5px); }
.link-back { text-decoration: none; color: var(--muted); display: inline-block; margin-bottom: var(--s-5); }
.link-back:hover { color: var(--accent); }
.tag {
  display: inline-block; padding: .2rem .6rem; border-radius: var(--radius-pill); border: 1px solid var(--line);
  font: 500 .72rem/1.4 var(--font-mono); text-transform: uppercase; letter-spacing: .06em; color: var(--muted);
}
.tag-completed { color: var(--text); }
.tag-concept { color: var(--accent-2); border-color: color-mix(in srgb, var(--accent-2) 40%, transparent); }
.tag-experiment, .tag-in-progress { color: var(--accent); border-color: color-mix(in srgb, var(--accent) 40%, transparent); }
.tag-demo { border-style: dashed; color: var(--faint); }
.tag-pin { background: var(--text); color: var(--bg); border-color: var(--text); }
.eyebrow { color: var(--accent); margin-bottom: var(--s-3); }
.lede { font-size: var(--step-1); color: var(--muted); max-width: 40ch; line-height: 1.45; }
.empty { padding: var(--s-6); border: 1px dashed var(--line); border-radius: var(--radius); color: var(--muted); text-align: center; }

/* ---------- Hero ---------- */
.hero { padding: var(--s-6) 0 var(--s-7); }
.hero-top { display: flex; justify-content: space-between; color: var(--muted); border-bottom: 1px solid var(--line); padding-bottom: var(--s-3); }
.greeting { font-size: var(--step-hero); font-weight: 800; letter-spacing: -.045em; line-height: .86; margin: var(--s-5) 0 var(--s-6) -.04em; }
.bounce { all: unset; cursor: pointer; display: inline-flex; flex-wrap: wrap; }
.bounce span { display: inline-block; transform-origin: 50% 100%; transition: color var(--dur-1); }
.bounce span:hover { color: var(--accent); }
.bounce.play span { animation: hop .7s var(--ease-spring) calc(var(--i) * 55ms) 2 alternate; }
@keyframes hop { 40% { transform: translateY(-.18em) rotate(-4deg) scaleY(1.06); } 100% { transform: none; } }
.hero-grid { display: grid; grid-template-columns: minmax(120px, 220px) 1fr; gap: var(--s-6); align-items: start; }
.hero-avatar img, .avatar-ph { width: 100%; aspect-ratio: 1; border-radius: 50%; object-fit: cover; }
.avatar-ph {
  display: grid; place-items: center; font: 800 clamp(3rem, 8vw, 6rem)/1 var(--font-display); color: var(--on-accent);
  background: conic-gradient(from 200deg, var(--accent), var(--accent-2), var(--accent));
}
.avatar-ph.big { border-radius: var(--radius); aspect-ratio: 4/5; font-size: 8rem; }
.headline { font: 600 var(--step-3)/1.02 var(--font-display); letter-spacing: -.04em; margin-bottom: var(--s-5); max-width: 20ch; }
.hero-cta { display: flex; flex-wrap: wrap; gap: var(--s-5); align-items: center; margin-top: var(--s-5); }
@media (max-width: 760px) {
  .hero-grid { grid-template-columns: 1fr; gap: var(--s-5); }
  .hero-avatar { width: 120px; }
}

/* ---------- Sections ---------- */
.section { padding: var(--s-7) 0; }
.section-head { display: flex; justify-content: space-between; align-items: baseline; gap: var(--s-4); margin-bottom: var(--s-5); }
.section-head h2 { font-size: var(--step-3); }
.h-small { font-size: var(--step--1); font-weight: 500; color: var(--muted); text-transform: uppercase; letter-spacing: .08em; margin-bottom: var(--s-4); }
.page-head { padding: var(--s-6) 0 var(--s-6); }
.page-head h1 { font-size: var(--step-4); letter-spacing: -.055em; margin-bottom: var(--s-4); }
.page-head h1 sup { font-size: var(--step-0); color: var(--accent); vertical-align: top; margin-left: .3em; letter-spacing: 0; }
.page-head.narrow { max-width: 50rem; margin: 0 auto; }

/* Editorial index list (homepage) */
.index-list { list-style: none; margin: 0; padding: 0; border-bottom: 1px solid var(--line); }
.index-row {
  position: relative; display: grid; grid-template-columns: 3.5rem 1fr auto auto; gap: var(--s-4); align-items: center;
  padding: var(--s-5) 0; border-top: 1px solid var(--line); text-decoration: none;
}
.index-num { color: var(--faint); }
.index-title { font: 700 var(--step-2)/1.05 var(--font-display); letter-spacing: -.035em; transition: transform var(--dur-2) var(--ease-out), color var(--dur-1); }
.index-meta { color: var(--muted); }
.index-tags { display: flex; gap: var(--s-1); }
.index-thumb {
  position: absolute; right: 18%; top: 50%; width: 240px; z-index: 5; pointer-events: none;
  border-radius: var(--radius); overflow: hidden; opacity: 0;
  transform: translateY(-50%) scale(.85) rotate(4deg);
  transition: opacity var(--dur-2) var(--ease-out), transform var(--dur-3) var(--ease-out);
  box-shadow: 0 20px 60px rgb(0 0 0 / .4);
}
.index-thumb img, .index-thumb .ph-art { aspect-ratio: 4/3; width: 100%; object-fit: cover; }
.index-row:hover .index-title, .index-row:focus-visible .index-title { transform: translateX(.5rem); color: var(--accent); }
.index-row:hover .index-thumb { opacity: 1; transform: translateY(-50%) scale(1) rotate(-2deg); }
@media (max-width: 760px) {
  .index-row { grid-template-columns: 2.2rem 1fr 72px; grid-template-areas: "n t i" "n m i" "n g i"; row-gap: var(--s-1); }
  .index-num { grid-area: n; align-self: start; padding-top: .3rem; }
  .index-title { grid-area: t; } .index-meta { grid-area: m; } .index-tags { grid-area: g; }
  .index-thumb { grid-area: i; position: static; width: 72px; opacity: 1; transform: none; box-shadow: none; border-radius: calc(var(--radius) / 2); }
  .index-row:hover .index-thumb { transform: none; }
  .index-thumb img, .index-thumb .ph-art { aspect-ratio: 1; }
}

/* Interests marquee */
.interests { padding: var(--s-5) 0; overflow: hidden; border-block: 1px solid var(--line); margin-inline: calc(50% - 50vw); }
.marquee > div { display: flex; gap: var(--s-5); width: max-content; animation: marquee 40s linear infinite; }
.marquee span { font: 600 var(--step-3)/1.1 var(--font-display); letter-spacing: -.04em; white-space: nowrap; }
.marquee b { color: var(--accent); font-size: var(--step-2); align-self: center; }
.marquee:hover > div { animation-play-state: paused; }
@keyframes marquee { to { transform: translateX(-50%); } }

.split { display: grid; grid-template-columns: 1fr 1fr; gap: var(--s-7); }
.split:empty { display: none; }
@media (max-width: 760px) { .split { grid-template-columns: 1fr; gap: var(--s-6); } }
.fav-list, .note-mini { list-style: none; margin: 0; padding: 0; }
.fav-list li, .note-mini li { border-top: 1px solid var(--line); }
.fav-list li { padding: var(--s-3) 0; font-size: var(--step-1); }
.fav-list a { text-decoration: none; display: flex; justify-content: space-between; }
.fav-list a:hover { color: var(--accent); }
.note-mini a { display: flex; justify-content: space-between; gap: var(--s-4); padding: var(--s-3) 0; text-decoration: none; font-size: var(--step-1); }
.note-mini a:hover span { color: var(--accent); }
.note-mini time { color: var(--muted); white-space: nowrap; padding-top: .3em; }

/* ---------- Work grid ---------- */
.filters { display: flex; flex-wrap: wrap; gap: var(--s-2); margin-bottom: var(--s-6); }
.chip {
  font: 500 var(--step--1) var(--font-mono); padding: .45rem .9rem; border-radius: var(--radius-pill);
  border: 1px solid var(--line); background: transparent; color: var(--muted); cursor: pointer; transition: all var(--dur-1);
}
.chip:hover { color: var(--text); border-color: var(--text); }
.chip[aria-pressed="true"] { background: var(--text); color: var(--bg); border-color: var(--text); }
.work-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: var(--s-7) var(--s-5); padding-bottom: var(--s-7); }
.card-wide { grid-column: span 2; }
.card-wide .card-media { aspect-ratio: 21/9; }
.card[hidden] { display: none; }
.card a { text-decoration: none; display: block; }
.card-media { aspect-ratio: 4/3; border-radius: var(--radius); overflow: hidden; background: var(--surface); }
.card-media img, .card-media .ph-art { width: 100%; height: 100%; object-fit: cover; transition: transform var(--dur-3) var(--ease-out); }
.card a:hover .card-media img, .card a:hover .card-media .ph-art { transform: scale(1.04); }
.card-body { padding-top: var(--s-4); }
.card-tags { display: flex; flex-wrap: wrap; gap: var(--s-1); margin-bottom: var(--s-3); }
.card h2 { font-size: var(--step-2); margin-bottom: var(--s-2); transition: color var(--dur-1); }
.card a:hover h2 { color: var(--accent); }
.card p { color: var(--muted); max-width: 52ch; margin-bottom: var(--s-2); }
.card-foot { color: var(--faint); }
@media (max-width: 760px) { .work-grid { grid-template-columns: 1fr; gap: var(--s-6); } .card-wide { grid-column: auto; } .card-wide .card-media { aspect-ratio: 4/3; } }

/* Generated placeholder art (when an item has no image) */
.ph-art { position: relative; overflow: hidden; background: hsl(var(--h) 25% 16%); }
.ph-art span { position: absolute; border-radius: 50%; mix-blend-mode: screen; }
.ph-art span:nth-child(1) { width: 70%; aspect-ratio: 1; left: -10%; top: 10%; background: hsl(var(--h) 80% 60%); }
.ph-art span:nth-child(2) { width: 50%; aspect-ratio: 1; right: 5%; top: -15%; background: hsl(calc(var(--h) + 120) 70% 55%); }
.ph-art span:nth-child(3) { width: 40%; aspect-ratio: 1; right: 20%; bottom: -20%; background: hsl(calc(var(--h) + 220) 60% 65%); }

/* ---------- Project page ---------- */
.project .page-head h1 { max-width: 16ch; }
.meta-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: var(--s-4); margin: 0 0 var(--s-6); padding: var(--s-4) 0; border-block: 1px solid var(--line); }
.meta-grid dt { color: var(--faint); text-transform: uppercase; font-size: .7rem; letter-spacing: .08em; }
.meta-grid dd { margin: 0; }
.project-cover { border-radius: var(--radius); overflow: hidden; margin-bottom: var(--s-7); }
.project-cover .ph-art { aspect-ratio: 16/9; }
.project .prose, .project-links { max-width: 42rem; margin-inline: auto; }
.project .prose { font-size: 1.12rem; }
.project-links { display: flex; flex-wrap: wrap; gap: var(--s-5); align-items: center; margin-block: var(--s-6); }
.gallery { display: grid; gap: var(--s-5); margin: var(--s-7) 0; }
.gallery figure { margin: 0; }
.gallery img { border-radius: var(--radius); width: 100%; }
.gallery figcaption { color: var(--muted); margin-top: var(--s-2); }
@media (min-width: 1100px) { .gallery { grid-template-columns: 1fr 1fr; } .gallery figure:nth-child(3n+1) { grid-column: span 2; } }
.pager { display: grid; grid-template-columns: 1fr 1fr; gap: var(--s-4); border-top: 1px solid var(--line); padding: var(--s-6) 0 var(--s-7); }
.pager a { text-decoration: none; font: 700 var(--step-2)/1.1 var(--font-display); letter-spacing: -.03em; }
.pager a:hover { color: var(--accent); }
.pager small { display: block; color: var(--muted); margin-bottom: var(--s-2); font-weight: 400; letter-spacing: 0; }
.pager .next { text-align: right; }

/* ---------- Prose (Markdown content) ---------- */
.prose { line-height: 1.7; }
.prose h2, .prose h3 { margin: 1.8em 0 .6em; letter-spacing: -.025em; line-height: 1.15; }
.prose h2 { font-size: var(--step-2); } .prose h3 { font-size: var(--step-1); }
.prose a { color: var(--accent); }
.prose img { border-radius: var(--radius); margin: var(--s-5) 0; }
.prose blockquote { margin: var(--s-5) 0; padding-left: var(--s-5); border-left: 3px solid var(--accent); font-size: var(--step-1); color: var(--muted); }
.prose code { font-family: var(--font-mono); font-size: .88em; background: var(--surface-2); padding: .1em .35em; border-radius: 4px; }
.prose pre { background: var(--surface); padding: var(--s-4); border-radius: var(--radius); overflow-x: auto; }
.prose pre code { background: none; padding: 0; }
.prose hr { border: 0; border-top: 1px solid var(--line); margin: var(--s-6) 0; }
.prose.big { font-size: var(--step-1); line-height: 1.55; }
.reading { max-width: 40rem; margin: 0 auto var(--s-8); font-size: 1.12rem; }
html[data-font="serif"] .reading, html[data-font="serif"] .prose.big { font-family: "Fraunces", Georgia, serif; }

/* ---------- About ---------- */
.about-grid { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: var(--s-7); padding-bottom: var(--s-8); }
.about-photo { position: sticky; top: 6rem; align-self: start; }
.about-photo img { border-radius: var(--radius); width: 100%; aspect-ratio: 4/5; object-fit: cover; }
.about-block { margin-top: var(--s-6); }
.chips { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: var(--s-2); }
.chips li { padding: .4rem .9rem; border: 1px solid var(--line); border-radius: var(--radius-pill); }
@media (max-width: 760px) { .about-grid { grid-template-columns: 1fr; gap: var(--s-5); } .about-photo { position: static; max-width: 320px; } }

/* ---------- Notes ---------- */
.note-list { list-style: none; padding: 0; margin: 0 0 var(--s-8); }
.note-list li[hidden] { display: none; }
.note-list a {
  display: grid; grid-template-columns: 9rem 1fr auto; gap: var(--s-1) var(--s-5); padding: var(--s-5) 0;
  border-top: 1px solid var(--line); text-decoration: none;
}
.note-list time, .note-cat { color: var(--muted); }
.note-title { font: 700 var(--step-2)/1.1 var(--font-display); letter-spacing: -.03em; transition: color var(--dur-1); }
.note-ex { grid-column: 2; color: var(--muted); }
.note-cat { grid-row: 1; grid-column: 3; }
.note-list a:hover .note-title { color: var(--accent); }
@media (max-width: 760px) { .note-list a { grid-template-columns: 1fr; } .note-ex, .note-cat { grid-column: 1; grid-row: auto; } }
.note-cover { max-width: 56rem; margin: 0 auto var(--s-6); }
.note-cover img { border-radius: var(--radius); }

/* ---------- Contact ---------- */
.contact-grid { display: grid; grid-template-columns: 3fr 2fr; gap: var(--s-7); padding-bottom: var(--s-8); }
@media (max-width: 760px) { .contact-grid { grid-template-columns: 1fr; } }
.contact-form { display: grid; gap: var(--s-4); }
.contact-form label { display: grid; gap: var(--s-2); font-weight: 500; }
.contact-form input, .contact-form textarea {
  font: inherit; color: var(--text); background: var(--surface); border: 1px solid var(--line);
  border-radius: calc(var(--radius) * .7); padding: .8rem 1rem; transition: border-color var(--dur-1);
}
.contact-form input:focus, .contact-form textarea:focus { border-color: var(--accent); outline: none; box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 30%, transparent); }
.contact-form .btn { justify-self: start; }
.hp { position: absolute; left: -9999px; }
.notice { padding: var(--s-4); border-radius: var(--radius); margin: 0; }
.notice.ok { background: color-mix(in srgb, var(--accent-2) 20%, var(--bg)); }
.notice.err { background: color-mix(in srgb, var(--accent) 22%, var(--bg)); }
.big-link { font-size: var(--step-1); word-break: break-word; }
.big-link a:hover { color: var(--accent); }

/* ---------- Socials ---------- */
.socials { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: var(--s-2) var(--s-4); }
.socials a { text-decoration: none; color: var(--muted); }
.socials a:hover { color: var(--accent); }

/* ---------- Playground ---------- */
.play-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: var(--s-5); padding-bottom: var(--s-8); align-items: start; }
.play { margin: 0; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.play canvas, .pg-type { display: block; width: 100%; aspect-ratio: 10/7; cursor: crosshair; }
.pg-type { display: flex; align-items: center; justify-content: center; font: 800 clamp(3rem, 9vw, 5rem)/1 var(--font-display); letter-spacing: -.05em; user-select: none; }
.pg-type span { display: inline-block; transition: transform 120ms linear; }
.play figcaption { display: flex; justify-content: space-between; gap: var(--s-3); padding: var(--s-3) var(--s-4); border-top: 1px solid var(--line); }
.play figcaption .mono { color: var(--muted); }

/* ---------- 404 ---------- */
.lost { padding: var(--s-7) 0 var(--s-8); }
.lost .greeting { color: var(--accent); }

/* ---------- Footer ---------- */
.site-foot { margin-top: auto; border-top: 1px solid var(--line); padding: var(--s-6) var(--edge) var(--s-5); }
.foot-big a {
  display: inline-flex; gap: .2em; font: 800 var(--step-4)/1 var(--font-display); letter-spacing: -.06em; text-decoration: none;
  transition: color var(--dur-1);
}
.foot-big a span { transition: transform var(--dur-2) var(--ease-spring); }
.foot-big a:hover { color: var(--accent); }
.foot-big a:hover span { transform: translate(.08em, -.08em); }
.foot-row { display: flex; flex-wrap: wrap; justify-content: space-between; gap: var(--s-4); margin-top: var(--s-6); color: var(--muted); font-size: var(--step--1); }
.foot-row p { margin: 0; }

/* ---------- Scroll reveal (only when JS is running) ---------- */
.js .reveal { opacity: 0; transform: translateY(24px); transition: opacity var(--dur-3) var(--ease-out), transform var(--dur-3) var(--ease-out); }
.js .reveal.in { opacity: 1; transform: none; }

/* ---------- Motion preferences ---------- */
html[data-motion="off"] *, html[data-motion="off"] *::before, html[data-motion="off"] *::after { animation: none !important; transition: none !important; }
html[data-motion="off"] .js .reveal, html[data-motion="off"] .reveal { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition-duration: 1ms !important; transition-delay: 0s !important; }
  .js .reveal { opacity: 1; transform: none; }
  .marquee > div { flex-wrap: wrap; width: auto; }
}
