:root {
  --ink: #f4f1ea;
  --paper: #0b0d0c;
  --panel: #121513;
  --panel-soft: #171a18;
  --muted: #9da39e;
  --line: rgba(244, 241, 234, 0.13);
  --line-bright: rgba(244, 241, 234, 0.28);
  --accent: #ff6b35;
  --accent-soft: rgba(255, 107, 53, 0.13);
  --green: #9ad66f;
  --display: "Arial Narrow", "Avenir Next Condensed", "Helvetica Neue", sans-serif;
  --sans: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --mono: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
  --shell: min(1180px, calc(100% - 48px));
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
body::before {
  position: fixed;
  inset: 0;
  z-index: -3;
  content: "";
  background-image: linear-gradient(rgba(255,255,255,.018) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,.018) 1px, transparent 1px);
  background-size: 72px 72px;
  mask-image: linear-gradient(to bottom, black, transparent 75%);
  pointer-events: none;
}
img { display: block; max-width: 100%; }
a { color: inherit; }
button { font: inherit; }
.shell { width: var(--shell); margin-inline: auto; }
.section { padding-block: clamp(92px, 12vw, 170px); }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }
.skip-link { position: fixed; z-index: 100; top: 12px; left: 12px; padding: 10px 14px; background: var(--accent); color: #111; transform: translateY(-150%); }
.skip-link:focus { transform: translateY(0); }
.ambient { position: fixed; z-index: -2; border-radius: 999px; filter: blur(120px); opacity: .12; pointer-events: none; }
.ambient-one { width: 460px; height: 460px; top: 4vh; right: -180px; background: var(--accent); }
.ambient-two { width: 340px; height: 340px; top: 120vh; left: -220px; background: #537a5a; }

/* Header */
.site-header { position: fixed; z-index: 50; inset: 0 0 auto; height: 82px; border-bottom: 1px solid transparent; transition: background .25s, border-color .25s, height .25s; }
.site-header.is-scrolled { height: 70px; border-color: var(--line); background: rgba(11,13,12,.88); backdrop-filter: blur(16px); }
.header-inner { height: 100%; display: flex; align-items: center; justify-content: space-between; }
.brand { display: inline-flex; align-items: center; gap: 12px; text-decoration: none; }
.brand-mark { position: relative; display: block; width: 33px; height: 33px; transform: rotate(45deg); border: 1px solid var(--accent); }
.brand-mark i { position: absolute; display: block; background: var(--accent); }
.brand-mark i:nth-child(1) { width: 3px; height: 21px; left: 8px; top: 5px; }
.brand-mark i:nth-child(2) { width: 3px; height: 14px; left: 16px; top: 4px; transform: rotate(45deg); }
.brand-mark i:nth-child(3) { width: 3px; height: 14px; left: 17px; top: 15px; transform: rotate(-45deg); }
.brand-copy { display: grid; gap: 1px; }
.brand-copy strong { font-family: var(--mono); font-size: 13px; letter-spacing: .18em; }
.brand-copy small { color: var(--muted); font-size: 10px; letter-spacing: .08em; }
.main-nav { display: flex; align-items: center; gap: 32px; }
.main-nav a { color: #c9cec9; font-family: var(--mono); font-size: 11px; letter-spacing: .08em; text-decoration: none; text-transform: uppercase; transition: color .2s; }
.main-nav a:hover { color: var(--ink); }
.main-nav .nav-profile { padding: 11px 14px; border: 1px solid var(--line-bright); color: var(--ink); }
.main-nav .nav-profile:hover { border-color: var(--accent); color: var(--accent); }
.nav-toggle { display: none; width: 42px; height: 42px; padding: 10px; border: 1px solid var(--line); background: transparent; }
.nav-toggle > span:not(.sr-only) { display: block; width: 100%; height: 1px; margin: 5px 0; background: var(--ink); }

/* Shared type and controls */
.kicker { display: flex; align-items: center; gap: 10px; margin: 0 0 22px; color: var(--muted); font-family: var(--mono); font-size: 11px; letter-spacing: .12em; line-height: 1.4; text-transform: uppercase; }
.kicker > span { width: 24px; height: 1px; background: var(--accent); }
h1, h2, h3, p { margin-top: 0; }
h1, h2 { font-family: var(--display); font-weight: 800; letter-spacing: -.055em; }
h1 em, h2 em { color: var(--accent); font-style: normal; }
h2 { margin-bottom: 0; font-size: clamp(44px, 6vw, 78px); line-height: .98; }
.button { display: inline-flex; align-items: center; justify-content: space-between; gap: 30px; min-height: 52px; padding: 0 18px; border: 1px solid transparent; font-family: var(--mono); font-size: 11px; letter-spacing: .06em; text-decoration: none; text-transform: uppercase; cursor: pointer; transition: transform .2s, color .2s, border-color .2s, background .2s; }
.button:hover { transform: translateY(-2px); }
.button-primary { background: var(--accent); color: #13100e; font-weight: 800; }
.button-primary:hover { background: #ff8158; }
.button-quiet { border-color: var(--line-bright); background: transparent; color: var(--ink); }
.button-quiet:hover { border-color: var(--accent); color: var(--accent); }
.text-link { display: inline-flex; align-items: center; gap: 30px; padding-bottom: 7px; border-bottom: 1px solid var(--line-bright); font-family: var(--mono); font-size: 11px; letter-spacing: .06em; text-decoration: none; text-transform: uppercase; }
.text-link span { color: var(--accent); }
[data-reveal] { opacity: 0; transform: translateY(24px); transition: opacity .65s ease, transform .65s ease; }
[data-reveal].is-visible { opacity: 1; transform: translateY(0); }

/* Hero */
.hero { position: relative; min-height: 820px; height: min(940px, 100svh); padding-top: 82px; display: grid; grid-template-columns: 1.2fr .8fr; align-items: center; gap: clamp(40px, 8vw, 100px); }
.hero-copy { position: relative; z-index: 2; }
.hero h1 { max-width: 760px; margin: 0 0 30px; font-size: clamp(66px, 8.6vw, 126px); line-height: .84; }
.hero-lead { max-width: 650px; margin-bottom: 36px; color: #b3b8b3; font-size: clamp(17px, 2vw, 20px); line-height: 1.7; }
.hero-actions { display: flex; align-items: center; gap: 12px; }
.hero-visual { position: relative; justify-self: end; width: min(100%, 420px); }
.portrait-frame { position: relative; border: 1px solid var(--line-bright); background: #0f1110; box-shadow: 26px 26px 0 rgba(255,107,53,.055); }
.portrait-frame::before, .portrait-frame::after { position: absolute; z-index: 2; width: 13px; height: 13px; content: ""; }
.portrait-frame::before { top: -1px; left: -1px; border-top: 2px solid var(--accent); border-left: 2px solid var(--accent); }
.portrait-frame::after { right: -1px; bottom: -1px; border-right: 2px solid var(--accent); border-bottom: 2px solid var(--accent); }
.portrait-topline { height: 39px; padding-inline: 12px; display: flex; align-items: center; justify-content: space-between; border-bottom: 1px solid var(--line); color: var(--muted); font-family: var(--mono); font-size: 9px; letter-spacing: .08em; }
.status-dot { display: flex; align-items: center; gap: 7px; color: var(--green); }
.status-dot::before { width: 6px; height: 6px; border-radius: 50%; background: currentColor; content: ""; box-shadow: 0 0 10px currentColor; }
.portrait-frame img { width: 100%; aspect-ratio: 1; object-fit: cover; filter: saturate(.82) contrast(1.06); }
.portrait-caption { display: flex; align-items: center; justify-content: space-between; padding: 15px 16px; }
.portrait-caption strong { font-size: 13px; }
.portrait-caption span { color: var(--muted); font-family: var(--mono); font-size: 9px; }
.orbit-note { position: absolute; z-index: 3; display: flex; gap: 10px; padding: 10px 12px; border: 1px solid var(--line-bright); background: rgba(11,13,12,.92); font-family: var(--mono); font-size: 10px; text-transform: uppercase; box-shadow: 0 12px 30px rgba(0,0,0,.28); }
.orbit-note span { color: var(--accent); }
.note-build { top: 28%; left: -48px; }
.note-host { right: -25px; bottom: 24%; }
.hero-index { position: absolute; right: 0; bottom: 40px; color: var(--muted); font-family: var(--mono); font-size: 10px; letter-spacing: .08em; }
.hero-index span { margin-inline: 5px; color: var(--accent); }

/* Ticker */
.ticker { width: 100%; overflow: hidden; border-block: 1px solid var(--line); background: var(--accent); color: #17110e; transform: rotate(-1deg) scale(1.02); }
.ticker-track { width: max-content; display: flex; align-items: center; gap: 28px; padding: 16px 0; animation: ticker 35s linear infinite; font-family: var(--mono); font-size: 11px; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; }
.ticker-track i { font-size: 7px; font-style: normal; }
@keyframes ticker { to { transform: translateX(-50%); } }

/* Projects */
.section-head, .recipe-heading { display: grid; grid-template-columns: 1.35fr .65fr; align-items: end; gap: 80px; margin-bottom: 64px; }
.section-head > p, .recipe-heading > p { max-width: 430px; margin-bottom: 4px; color: var(--muted); font-size: 15px; line-height: 1.75; }
.project-grid { display: grid; grid-template-columns: 1.05fr .95fr; gap: 16px; }
.project { position: relative; overflow: hidden; min-height: 440px; padding: 22px; display: flex; flex-direction: column; justify-content: space-between; border: 1px solid var(--line); background: var(--panel); transition: border-color .25s, transform .25s; }
.project:hover { transform: translateY(-4px); border-color: var(--line-bright); }
.project-featured { grid-row: span 2; min-height: 750px; }
.project-number { color: var(--muted); font-family: var(--mono); font-size: 9px; letter-spacing: .1em; text-transform: uppercase; }
.terminal-art { width: 86%; margin: 55px auto; border: 1px solid rgba(255,255,255,.16); background: #080a09; box-shadow: 22px 22px 0 var(--accent-soft); transform: rotate(-2deg); }
.terminal-bar { height: 37px; padding: 0 11px; display: flex; align-items: center; gap: 6px; border-bottom: 1px solid var(--line); }
.terminal-bar i { width: 6px; height: 6px; border-radius: 50%; background: #49504b; }
.terminal-bar i:first-child { background: var(--accent); }
.terminal-bar span { margin-left: 8px; color: #737a75; font-family: var(--mono); font-size: 8px; }
.terminal-body { min-height: 245px; padding: 25px; font-family: var(--mono); font-size: 11px; line-height: 1.75; }
.terminal-body p { margin-bottom: 7px; }
.terminal-body b { color: var(--green); font-weight: 500; }
.terminal-body .muted { margin-left: 20px; color: #68706b; }
.terminal-ok { color: var(--green); }
.cursor { display: inline-block; width: 7px; height: 13px; vertical-align: -2px; background: var(--accent); animation: blink 1s step-end infinite; }
@keyframes blink { 50% { opacity: 0; } }
.project-content { display: grid; gap: 22px; }
.project-content h3 { margin: 3px 0 0; font-family: var(--display); font-size: clamp(32px, 4vw, 52px); letter-spacing: -.045em; line-height: 1; }
.project-content > p { max-width: 560px; margin-bottom: 0; color: var(--muted); font-size: 13px; line-height: 1.7; }
.project-type { margin: 0; color: var(--accent); font-family: var(--mono); font-size: 9px; letter-spacing: .1em; text-transform: uppercase; }
.tag-row { display: flex; flex-wrap: wrap; gap: 7px; }
.tag-row span { padding: 7px 9px; border: 1px solid var(--line); color: #8e958f; font-family: var(--mono); font-size: 8px; letter-spacing: .06em; text-transform: uppercase; }
.project-ecosystem, .project-gaming { min-height: 367px; }
.ecosystem-art, .gaming-art { position: absolute; top: 48px; right: 20px; width: 48%; height: 190px; opacity: .9; }
.ecosystem-art svg { position: absolute; inset: 0; width: 100%; height: 100%; fill: none; stroke: rgba(255,255,255,.15); stroke-width: 1; }
.eco-core, .eco-node { position: absolute; z-index: 2; display: grid; place-items: center; border-radius: 50%; font-family: var(--mono); font-weight: 800; }
.eco-core { top: 77px; left: calc(50% - 25px); width: 50px; height: 50px; background: var(--accent); color: #17110e; }
.eco-node { width: 34px; height: 34px; border: 1px solid var(--line-bright); background: var(--panel-soft); color: var(--muted); font-size: 8px; }
.node-one { top: 16px; left: 7px; }.node-two { top: 18px; right: 5px; }.node-three { right: 14px; bottom: 5px; }
.gaming-art { display: flex; align-items: center; justify-content: center; }
.radar { position: relative; width: 135px; height: 135px; border: 1px solid rgba(154,214,111,.26); border-radius: 50%; background: repeating-radial-gradient(circle, transparent 0 22px, rgba(154,214,111,.1) 23px 24px); }
.radar::before { position: absolute; inset: 50% 0 auto; height: 1px; background: rgba(154,214,111,.2); content: ""; }
.radar::after { position: absolute; inset: 0 auto 0 50%; width: 1px; background: rgba(154,214,111,.2); content: ""; }
.radar span { position: absolute; inset: 50% auto auto 50%; width: 50%; height: 1px; transform-origin: left; background: linear-gradient(90deg, var(--green), transparent); animation: radar 5s linear infinite; }
.radar i { position: absolute; width: 5px; height: 5px; border-radius: 50%; background: var(--green); box-shadow: 0 0 8px var(--green); }
.radar i:nth-of-type(1) { top: 25px; left: 45px; }.radar i:nth-of-type(2) { right: 24px; bottom: 38px; }.radar i:nth-of-type(3) { left: 29px; bottom: 31px; }
@keyframes radar { to { transform: rotate(360deg); } }
.hud-label { margin-left: -15px; padding: 7px 9px; border-left: 1px solid var(--green); background: rgba(11,13,12,.8); color: #838b85; font-family: var(--mono); font-size: 7px; }
.hud-label div { color: var(--green); font-size: 11px; }

/* About */
.about-section { border-block: 1px solid var(--line); background: #0e100f; }
.about-grid { display: grid; grid-template-columns: .9fr 1.1fr; gap: clamp(70px, 10vw, 150px); }
.about-intro { position: sticky; top: 120px; align-self: start; }
.about-intro > p:not(.kicker) { max-width: 520px; margin: 34px 0; color: var(--muted); font-size: 15px; line-height: 1.8; }
.principles { border-top: 1px solid var(--line); }
.principles article { padding: 34px 0; display: grid; grid-template-columns: 72px 1fr; gap: 20px; border-bottom: 1px solid var(--line); }
.principle-index { color: var(--accent); font-family: var(--mono); font-size: 10px; }
.principles h3 { margin-bottom: 10px; font-family: var(--display); font-size: 26px; letter-spacing: -.025em; }
.principles p { max-width: 520px; margin-bottom: 0; color: var(--muted); font-size: 13px; line-height: 1.7; }
.stack-panel { margin-top: 110px; display: grid; grid-template-columns: 260px 1fr; border: 1px solid var(--line); }
.stack-label { padding: 24px; display: flex; flex-direction: column; justify-content: space-between; border-right: 1px solid var(--line); background: var(--accent-soft); }
.stack-label span { color: var(--accent); font-family: var(--mono); font-size: 10px; }
.stack-label small { max-width: 150px; color: var(--muted); font-size: 10px; line-height: 1.5; }
.stack-list { padding: 20px; display: flex; flex-wrap: wrap; gap: 8px; }
.stack-list span { flex: 1 0 auto; padding: 13px 16px; border: 1px solid var(--line); color: #c1c6c2; font-family: var(--mono); font-size: 10px; text-align: center; }

/* Recipes */
.recipe-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.recipe-archive { padding-top: 170px; min-height: 80vh; }
.recipe-archive .recipe-heading h1 { margin: 0; font-size: clamp(64px, 9vw, 116px); line-height: .86; }
.recipe-card { min-width: 0; padding-bottom: 22px; border-bottom: 1px solid var(--line); }
.recipe-image { position: relative; display: block; overflow: hidden; aspect-ratio: 4/3; margin-bottom: 18px; background: var(--panel); }
.recipe-image::after { position: absolute; inset: 0; background: linear-gradient(to top, rgba(0,0,0,.55), transparent 45%); content: ""; }
.recipe-image img { width: 100%; height: 100%; object-fit: cover; filter: saturate(.82); transition: transform .55s, filter .55s; }
.recipe-image:hover img { transform: scale(1.045); filter: saturate(1); }
.recipe-image > span { position: absolute; z-index: 2; left: 12px; bottom: 12px; padding: 7px 9px; background: var(--accent); color: #16110f; font-family: var(--mono); font-size: 8px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; }
.recipe-meta { display: flex; justify-content: space-between; color: var(--muted); font-family: var(--mono); font-size: 9px; letter-spacing: .06em; text-transform: uppercase; }
.recipe-card h3 { margin: 13px 0 10px; font-family: var(--display); font-size: clamp(26px, 2.7vw, 35px); letter-spacing: -.035em; line-height: 1.05; }
.recipe-card h3 a { text-decoration: none; }
.recipe-card > p { min-height: 66px; margin-bottom: 20px; color: var(--muted); font-size: 12px; line-height: 1.65; }
.recipe-link { display: flex; justify-content: space-between; padding-top: 13px; border-top: 1px solid var(--line); font-family: var(--mono); font-size: 9px; letter-spacing: .07em; text-decoration: none; text-transform: uppercase; }
.recipe-link span { color: var(--accent); transition: transform .2s; }
.recipe-link:hover span { transform: translateX(4px); }

/* Contact and footer */
.contact-section { border-top: 1px solid var(--line); background: radial-gradient(circle at 50% 120%, rgba(255,107,53,.16), transparent 48%); }
.contact-inner { text-align: center; }
.contact-inner .kicker { justify-content: center; }
.contact-inner h2 { font-size: clamp(48px, 7.5vw, 100px); }
.contact-inner > p:not(.kicker) { max-width: 520px; margin: 32px auto; color: var(--muted); font-size: 15px; line-height: 1.7; }
.site-footer { padding: 70px 0 24px; border-top: 1px solid var(--line); background: #080a09; }
.footer-grid { display: grid; grid-template-columns: 1fr 1fr auto; gap: 60px; align-items: start; }
.footer-grid > p { color: var(--muted); font-size: 13px; line-height: 1.7; }
.footer-links { display: grid; gap: 11px; }
.footer-links a { color: #bec3bf; font-family: var(--mono); font-size: 9px; letter-spacing: .08em; text-decoration: none; text-transform: uppercase; }
.footer-links a:hover { color: var(--accent); }
.footer-bottom { margin-top: 60px; padding-top: 20px; display: flex; justify-content: space-between; border-top: 1px solid var(--line); color: #5f6561; font-family: var(--mono); font-size: 8px; letter-spacing: .08em; text-transform: uppercase; }

/* Recipe detail */
.recipe-page { padding-top: 82px; }
.recipe-hero { padding-top: 70px; }
.back-link { display: inline-block; margin-bottom: 50px; color: var(--muted); font-family: var(--mono); font-size: 9px; letter-spacing: .06em; text-decoration: none; text-transform: uppercase; }
.back-link:hover { color: var(--accent); }
.recipe-hero-grid { display: grid; grid-template-columns: .8fr 1.2fr; align-items: center; gap: clamp(50px, 8vw, 110px); }
.recipe-title h1 { margin: 0 0 25px; font-size: clamp(62px, 8vw, 106px); line-height: .86; }
.recipe-title > p:not(.kicker) { max-width: 520px; color: var(--muted); font-size: 16px; line-height: 1.7; }
.recipe-facts { margin-top: 40px; display: grid; grid-template-columns: repeat(3, 1fr); border-block: 1px solid var(--line); }
.recipe-facts div { padding: 17px 12px 17px 0; display: grid; gap: 6px; }
.recipe-facts small { color: var(--muted); font-family: var(--mono); font-size: 8px; letter-spacing: .08em; text-transform: uppercase; }
.recipe-facts strong { font-size: 12px; }
.recipe-hero-image { position: relative; margin: 0; }
.recipe-hero-image::before { position: absolute; inset: 12px -12px -12px 12px; z-index: -1; border: 1px solid var(--accent); content: ""; opacity: .4; }
.recipe-hero-image img { width: 100%; aspect-ratio: 4/3; object-fit: cover; }
.recipe-hero-image figcaption { position: absolute; right: 0; bottom: 0; padding: 8px 10px; background: rgba(11,13,12,.88); color: var(--muted); font-family: var(--mono); font-size: 8px; letter-spacing: .08em; text-transform: uppercase; }
.recipe-body { padding-block: 120px 150px; display: grid; grid-template-columns: .7fr 1.3fr; gap: clamp(60px, 10vw, 150px); align-items: start; }
.ingredients { position: sticky; top: 105px; padding: 27px; border: 1px solid var(--line); background: var(--panel); }
.ingredient-head { display: flex; align-items: start; justify-content: space-between; margin-bottom: 24px; }
.ingredient-head .kicker { margin-bottom: 10px; }
.ingredient-head h2, .method > h2 { font-size: 36px; letter-spacing: -.03em; }
.ingredient-head button { padding: 7px 9px; border: 1px solid var(--line); background: transparent; color: var(--muted); font-family: var(--mono); font-size: 8px; letter-spacing: .06em; text-transform: uppercase; cursor: pointer; }
.ingredient-head button:hover { border-color: var(--accent); color: var(--accent); }
.ingredients ul { margin: 0; padding: 0; list-style: none; }
.ingredients li { padding: 12px 0; display: flex; align-items: start; gap: 12px; border-top: 1px solid var(--line); color: #c3c8c4; font-size: 12px; line-height: 1.5; }
.ingredients li span { flex: 0 0 5px; width: 5px; height: 5px; margin-top: 6px; background: var(--accent); transform: rotate(45deg); }
.method > h2 { margin-bottom: 45px; }
.prose h3 { position: relative; margin: 45px 0 15px; padding-top: 23px; border-top: 1px solid var(--line); font-family: var(--display); font-size: 25px; letter-spacing: -.02em; }
.prose h3::before { margin-right: 10px; color: var(--accent); content: "//"; font-family: var(--mono); font-size: 11px; }
.prose > p { color: #b0b6b1; font-size: 15px; line-height: 1.85; }
.recipe-note { margin-top: 50px; padding: 24px 26px; border-left: 2px solid var(--accent); background: var(--accent-soft); }
.recipe-note strong { color: var(--accent); font-family: var(--mono); font-size: 9px; letter-spacing: .08em; text-transform: uppercase; }
.recipe-note p { margin: 10px 0 0; color: #c4c9c5; font-size: 13px; line-height: 1.7; }
.recipe-actions { margin-top: 40px; display: flex; align-items: center; gap: 30px; }
.error-page { min-height: 80vh; padding-top: 220px; }
.error-page h1 { margin-bottom: 25px; font-size: clamp(62px, 9vw, 120px); line-height: .88; }
.error-page > p:not(.kicker) { margin-bottom: 32px; color: var(--muted); }

/* Responsive */
@media (max-width: 900px) {
  :root { --shell: min(100% - 36px, 720px); }
  .nav-toggle { display: block; }
  .main-nav { position: absolute; top: 70px; left: 18px; right: 18px; padding: 24px; display: none; align-items: stretch; gap: 0; border: 1px solid var(--line); background: #101210; box-shadow: 0 18px 50px rgba(0,0,0,.45); }
  .main-nav.is-open { display: grid; }
  .main-nav a { padding: 15px 0; border-bottom: 1px solid var(--line); }
  .main-nav .nav-profile { margin-top: 14px; text-align: center; }
  .hero { height: auto; min-height: 0; padding-top: 155px; padding-bottom: 90px; grid-template-columns: 1fr; }
  .hero h1 { font-size: clamp(62px, 13vw, 94px); }
  .hero-visual { width: min(74vw, 440px); justify-self: center; margin-top: 25px; }
  .hero-index { display: none; }
  .section-head, .recipe-heading { grid-template-columns: 1fr; gap: 28px; }
  .project-grid { grid-template-columns: 1fr; }
  .project-featured { grid-row: auto; min-height: 700px; }
  .project-ecosystem, .project-gaming { min-height: 420px; }
  .about-grid { grid-template-columns: 1fr; }
  .about-intro { position: static; }
  .stack-panel { grid-template-columns: 1fr; }
  .stack-label { min-height: 110px; border-right: 0; border-bottom: 1px solid var(--line); }
  .recipe-grid { grid-template-columns: 1fr 1fr; }
  .recipe-card:last-child { grid-column: 1 / -1; width: calc(50% - 8px); }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .footer-links { grid-column: 2; }
  .recipe-hero-grid, .recipe-body { grid-template-columns: 1fr; }
  .recipe-title { order: 1; }
  .recipe-hero-image { order: 0; }
  .ingredients { position: static; }
}

@media (max-width: 620px) {
  :root { --shell: calc(100% - 28px); }
  .section { padding-block: 90px; }
  .hero { padding-top: 135px; }
  .hero h1 { font-size: clamp(54px, 16vw, 74px); }
  .hero-actions { align-items: stretch; flex-direction: column; }
  .hero-visual { width: calc(100% - 35px); }
  .note-build { left: -12px; }.note-host { right: -10px; }
  .ticker-track { padding-block: 13px; }
  h2 { font-size: 44px; }
  .project { padding: 18px; }
  .project-featured { min-height: 620px; }
  .terminal-art { width: 100%; margin-block: 50px; }
  .terminal-body { min-height: 220px; padding: 18px 14px; font-size: 9px; }
  .ecosystem-art, .gaming-art { width: 65%; opacity: .55; }
  .project-content { position: relative; z-index: 2; }
  .principles article { grid-template-columns: 45px 1fr; }
  .stack-list { padding: 12px; }
  .stack-list span { flex-basis: calc(50% - 8px); }
  .recipe-grid { grid-template-columns: 1fr; gap: 50px; }
  .recipe-card:last-child { grid-column: auto; width: auto; }
  .footer-grid { grid-template-columns: 1fr; gap: 35px; }
  .footer-links { grid-column: auto; }
  .footer-bottom { align-items: start; flex-direction: column; gap: 8px; }
  .recipe-hero { padding-top: 42px; }
  .recipe-title h1 { font-size: 60px; }
  .recipe-facts { grid-template-columns: 1fr; }
  .recipe-facts div { grid-template-columns: 1fr 1fr; border-bottom: 1px solid var(--line); }
  .recipe-facts div:last-child { border-bottom: 0; }
  .recipe-body { padding-block: 80px 100px; }
  .recipe-actions { align-items: stretch; flex-direction: column; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}

@media print {
  :root { --ink: #111; --paper: #fff; --muted: #444; --line: #ccc; }
  .site-header, .site-footer, .recipe-hero-image, .back-link, .recipe-actions, .ambient { display: none !important; }
  body { background: #fff; color: #111; }
  .recipe-page { padding-top: 0; }
  .recipe-hero { padding-top: 20px; }
  .recipe-hero-grid, .recipe-body { display: grid; grid-template-columns: 1fr 1.4fr; gap: 40px; }
  .recipe-body { padding-block: 40px; }
  .ingredients { position: static; border: 1px solid #ccc; background: #fff; }
  [data-reveal] { opacity: 1; transform: none; }
}

/* Library and collections */
.footer-library { color: var(--accent) !important; }
.library-page { min-height: 100vh; padding: 175px 0 120px; }
.library-hero { display: grid; grid-template-columns: 1.15fr .85fr; align-items: end; gap: clamp(50px, 10vw, 140px); margin-bottom: 72px; }
.library-hero .kicker { grid-column: 1 / -1; margin-bottom: -12px; }
.library-hero h1, .collection-header h1 { margin: 0; font-size: clamp(68px, 10vw, 132px); line-height: .83; }
.library-hero h1 em, .collection-header h1 em { color: var(--accent); font-style: normal; }
.library-hero > p:last-child, .collection-header > p { max-width: 470px; margin: 0 0 8px; color: var(--muted); font-size: 15px; line-height: 1.8; }
.library-index { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; }
.library-card { position: relative; overflow: hidden; min-height: 590px; padding: 24px; display: flex; flex-direction: column; justify-content: space-between; border: 1px solid var(--line); background: var(--panel); text-decoration: none; transition: transform .25s, border-color .25s; }
.library-card:hover { transform: translateY(-4px); border-color: var(--line-bright); }
.library-number { position: relative; z-index: 2; color: var(--muted); font-family: var(--mono); font-size: 9px; letter-spacing: .1em; text-transform: uppercase; }
.library-card > div:last-child { position: relative; z-index: 2; }
.library-status { display: flex; align-items: center; gap: 9px; margin-bottom: 12px; color: var(--muted); font-family: var(--mono); font-size: 9px; letter-spacing: .08em; text-transform: uppercase; }
.library-status span { width: 6px; height: 6px; border-radius: 50%; background: var(--green); box-shadow: 0 0 10px rgba(154,214,111,.7); }
.library-card h2 { font-size: clamp(52px, 6vw, 82px); }
.library-card > div:last-child > p:not(.library-status) { max-width: 470px; margin: 20px 0 34px; color: var(--muted); font-size: 13px; line-height: 1.75; }
.library-card strong { display: flex; justify-content: space-between; padding-top: 15px; border-top: 1px solid var(--line); font-family: var(--mono); font-size: 9px; letter-spacing: .08em; text-transform: uppercase; }
.library-card strong span { color: var(--accent); transition: transform .2s; }
.library-card:hover strong span { transform: translateX(5px); }
.library-glyph { position: absolute; top: 90px; right: 45px; width: 230px; height: 230px; border: 1px solid var(--line); border-radius: 50%; background: repeating-radial-gradient(circle, transparent 0 31px, rgba(255,255,255,.05) 32px 33px); opacity: .75; }
.library-glyph::before, .library-glyph::after { position: absolute; content: ""; background: var(--line-bright); }
.library-glyph::before { inset: 50% 12% auto; height: 1px; }
.library-glyph::after { inset: 12% auto 12% 50%; width: 1px; }
.library-glyph i { position: absolute; width: 7px; height: 7px; background: var(--accent); transform: rotate(45deg); }
.library-glyph i:nth-child(1) { top: 38px; left: 72px; }.library-glyph i:nth-child(2) { right: 42px; top: 108px; }.library-glyph i:nth-child(3) { left: 65px; bottom: 43px; }
.library-thumbnails { position: absolute; inset: 72px 24px auto; height: 235px; display: flex; align-items: center; justify-content: center; }
.library-thumbnails img { position: absolute; width: 46%; aspect-ratio: 4/3; object-fit: cover; border: 5px solid var(--panel); box-shadow: 0 18px 45px rgba(0,0,0,.4); }
.library-thumbnails img:nth-child(1) { left: 3%; transform: rotate(-7deg); }
.library-thumbnails img:nth-child(2) { z-index: 2; transform: translateY(-8px); }
.library-thumbnails img:nth-child(3) { right: 3%; transform: rotate(7deg); }
.library-footnote { margin: 25px 0 0; color: #5f6561; font-family: var(--mono); font-size: 8px; letter-spacing: .08em; text-align: right; text-transform: uppercase; }

.collection-page { padding-top: 170px; min-height: 82vh; }
.collection-page > .back-link { margin-bottom: 65px; }
.collection-header { display: grid; grid-template-columns: 1.15fr .85fr; align-items: end; gap: 70px; margin-bottom: 75px; }
.recipe-grid-archive { gap: 28px 16px; }
.recipe-grid-archive .recipe-card { display: flex; flex-direction: column; }
.recipe-grid-archive .recipe-card h2 { margin: 14px 0 2px; font-family: var(--display); font-size: clamp(30px, 3.2vw, 42px); letter-spacing: -.04em; line-height: 1; }
.recipe-grid-archive .recipe-card h2 a { text-decoration: none; }
.recipe-grid-archive .recipe-subtitle { min-height: 0; margin: 0 0 14px; color: var(--accent); font-family: var(--mono); font-size: 9px; letter-spacing: .08em; text-transform: uppercase; }
.recipe-grid-archive .recipe-card > p:not(.recipe-subtitle) { min-height: 62px; }
.recipe-grid-archive .recipe-link { margin-top: auto; }
.recipe-image img { image-rendering: auto; }

.recipe-title-subtitle { margin: -14px 0 22px !important; color: var(--accent) !important; font-family: var(--mono); font-size: 10px !important; letter-spacing: .1em; text-transform: uppercase; }
.recipe-hero-image { overflow: hidden; background: #191c19; }
.recipe-hero-image img { filter: saturate(.9) contrast(1.03); }
.ingredient-group + .ingredient-group { margin-top: 28px; }
.ingredient-group h3 { margin: 0 0 10px; color: var(--accent); font-family: var(--mono); font-size: 9px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; }
.ingredients li div { min-width: 0; }
.ingredients li p { margin: 0; }
.ingredients li a { color: inherit; text-decoration-color: var(--accent); text-underline-offset: 3px; }
.method ol { margin: 0; padding: 0; list-style: none; counter-reset: method-step; }
.method ol li { position: relative; min-height: 54px; padding: 4px 0 22px 55px; border-bottom: 1px solid var(--line); color: #b0b6b1; font-size: 15px; line-height: 1.8; counter-increment: method-step; }
.method ol li + li { padding-top: 22px; }
.method ol li::before { position: absolute; top: 6px; left: 0; color: var(--accent); content: counter(method-step, decimal-leading-zero); font-family: var(--mono); font-size: 10px; }
.method ol li + li::before { top: 24px; }
.method > p a { color: var(--accent); text-underline-offset: 4px; }

.guide-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; }
.guide-card { min-height: 320px; padding: 28px; display: flex; flex-direction: column; border: 1px solid var(--line); background: var(--panel); }
.guide-meta { color: var(--accent); font-family: var(--mono); font-size: 9px; letter-spacing: .08em; text-transform: uppercase; }
.guide-card h2 { margin: 34px 0 16px; font-size: 42px; }
.guide-card h2 a { text-decoration: none; }
.guide-card > p:not(.guide-meta) { color: var(--muted); font-size: 13px; line-height: 1.7; }
.guide-card .recipe-link { margin-top: auto; }
.empty-collection { min-height: 330px; padding: 45px; display: grid; align-content: center; border: 1px dashed var(--line-bright); background: linear-gradient(135deg, var(--panel), transparent); }
.empty-collection > span { color: var(--green); font-family: var(--mono); font-size: 9px; letter-spacing: .1em; }
.empty-collection h2 { margin: 20px 0; font-size: clamp(38px, 5vw, 62px); }
.empty-collection p { max-width: 520px; margin: 0; color: var(--muted); line-height: 1.7; }
.guide-page { padding-top: 175px; }
.guide-header { max-width: 880px; }
.guide-header h1 { margin: 0 0 30px; font-size: clamp(62px, 9vw, 118px); line-height: .88; }
.guide-header > p:last-child { max-width: 680px; color: var(--muted); font-size: 17px; line-height: 1.7; }
.guide-content { max-width: 760px; margin: 90px auto 0; }

@media (max-width: 900px) {
  .library-hero, .collection-header { grid-template-columns: 1fr; gap: 28px; }
  .library-index { grid-template-columns: 1fr; }
  .library-card { min-height: 540px; }
  .recipe-grid-archive .recipe-card:last-child { width: auto; }
}

@media (max-width: 620px) {
  .library-page { padding-top: 135px; }
  .library-hero h1, .collection-header h1 { font-size: 62px; }
  .library-card { min-height: 500px; padding: 19px; }
  .library-thumbnails { inset-inline: 12px; }
  .collection-page { padding-top: 135px; }
  .collection-page > .back-link { margin-bottom: 42px; }
  .guide-grid { grid-template-columns: 1fr; }
  .empty-collection { padding: 28px 20px; }
  .recipe-hero-grid { gap: 42px; }
  .method ol li { padding-left: 42px; }
}
