/* =====================================================================
   TOASTER STUDIOS — shared design system
   Editorial Minecraft-mod studio. Instrument Serif display, JetBrains
   Mono labels, Newsreader body. Cream "toast" light theme + "ember"
   dark theme (default). Amber glow lifted from Toaster's eyes.
   ===================================================================== */

/* ---------- TOKENS ---------- */
:root {
  --bg: #F1E3CB;
  --bg-2: #E8D5B3;
  --ink: #1A130C;
  --ink-2: #3B2E1F;
  --mute: #8A7A60;
  --line: rgba(26, 19, 12, 0.16);
  --line-strong: rgba(26, 19, 12, 0.55);
  --glow: #FFB23B;
  --glow-2: #FFE08A;
  --paper: #FAF2DF;
  --glow-strength: 1.6;
  --nav-h: 64px;
}
/* Dark "ember" theme. data-palette lives on <html> so it can be set
   pre-paint by the inline head script (no flash). Equal specificity to
   :root, declared later, so it wins when present. */
[data-palette="ember"] {
  --bg: #18120C;
  --bg-2: #221912;
  --ink: #F5E7CB;
  --ink-2: #D9C8A7;
  --mute: #8E7B5C;
  --line: rgba(245, 231, 203, 0.18);
  --line-strong: rgba(245, 231, 203, 0.55);
  --paper: #221912;
  --glow: #FFB23B;
  --glow-2: #FFE08A;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
html { background: var(--bg); }
body {
  background: var(--bg);
  color: var(--ink);
  font-family: 'Newsreader', Georgia, serif;
  font-weight: 400;
  font-size: 17px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
  /* fixed nav reserves this space — no layout shift when the nav injects */
  padding-top: var(--nav-h);
  transition: background 0.4s ease, color 0.4s ease;
}
::selection { background: var(--glow); color: var(--ink); }
[id] { scroll-margin-top: calc(var(--nav-h) + 20px); }

a { color: var(--ink); }

.mono {
  font-family: 'JetBrains Mono', ui-monospace, monospace;
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-weight: 500;
}
.serif { font-family: 'Instrument Serif', 'Newsreader', Georgia, serif; font-weight: 400; }
.italic { font-style: italic; }

/* ---------- LAYOUT ---------- */
.wrap { max-width: 1440px; margin: 0 auto; padding: 0 40px; }
@media (max-width: 720px) { .wrap { padding: 0 22px; } }

/* ---------- NAV ---------- */
nav.top {
  position: fixed; top: 0; left: 0; right: 0; z-index: 50;
  height: var(--nav-h);
  background: color-mix(in oklab, var(--bg) 86%, transparent);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
nav.top .wrap {
  display: flex; align-items: center; justify-content: space-between;
  height: var(--nav-h);
}
.brand {
  display: flex; align-items: center; gap: 10px;
  text-decoration: none; color: var(--ink);
  flex-shrink: 0;
  white-space: nowrap;
}
.brand .pip {
  width: 14px; height: 14px; border-radius: 50%;
  background: radial-gradient(circle at 35% 35%, var(--glow-2), var(--glow) 55%, #C0741F 100%);
  box-shadow: 0 0 calc(10px * var(--glow-strength)) var(--glow);
  flex: none;
}
.brand .wordmark { font-family: 'Instrument Serif', serif; font-size: 22px; letter-spacing: 0.01em; }
.brand .wordmark em { font-style: italic; color: var(--ink-2); }

nav.top ul {
  list-style: none; display: flex; gap: 28px; margin: 0; padding: 0;
}
nav.top a.navlink {
  color: var(--ink); text-decoration: none;
  font-family: 'JetBrains Mono', monospace; font-size: 11px;
  letter-spacing: 0.1em; text-transform: uppercase;
  padding: 6px 0; border-bottom: 1px solid transparent;
  transition: border-color 0.2s;
}
nav.top a.navlink:hover { border-color: var(--ink); }
nav.top a.navlink[aria-current="page"] { border-color: var(--glow); }

.status {
  display: inline-flex; align-items: center; gap: 8px;
  font-family: 'JetBrains Mono', monospace; font-size: 10.5px;
  letter-spacing: 0.08em; text-transform: uppercase; color: var(--ink-2);
  white-space: nowrap;
  flex-shrink: 0;
}
.status .dot {
  width: 7px; height: 7px; border-radius: 50%;
  background: var(--glow); box-shadow: 0 0 8px var(--glow);
  animation: blink 2.2s infinite;
}
@keyframes blink { 0%,60%,100%{opacity:1} 30%{opacity:0.35} }

/* rare 0.5% status easter egg */
#statusVerb.kaboom {
  color: var(--glow);
  font-weight: 700;
  letter-spacing: 0.14em;
  text-shadow: 0 0 10px var(--glow), 0 0 20px color-mix(in oklab, var(--glow) 60%, transparent);
  animation: kaboom-shake 0.5s cubic-bezier(.36,.07,.19,.97) both;
}
@keyframes kaboom-shake {
  10%, 90% { transform: translateX(-1px); }
  20%, 80% { transform: translateX(2px); }
  30%, 50%, 70% { transform: translateX(-3px); }
  40%, 60% { transform: translateX(3px); }
}

@media (max-width: 1100px) {
  nav.top ul { gap: 18px; }
  nav.top .wrap { gap: 18px; }
}
@media (max-width: 720px) {
  nav.top ul { display: none; }
}

/* ---------- MODE TOGGLE (light/dark) ---------- */
.nav-left {
  display: flex; flex-direction: column;
  justify-content: center;
  gap: 2px;
  min-width: 0;
}
.nav-left .brand { margin: 0; }
.nav-left .status { padding-left: 24px; }
.nav-right { display: flex; align-items: center; gap: 20px; flex-shrink: 0; }
.mode-toggle {
  position: relative;
  display: inline-flex; align-items: center;
  gap: 0;
  width: 132px; height: 34px;
  padding: 0;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  background: var(--paper);
  cursor: pointer;
  font: inherit;
  flex-shrink: 0;
  -webkit-tap-highlight-color: transparent;
  transition: background 0.3s ease, border-color 0.3s ease;
}
.mode-toggle .mt-knob {
  position: absolute;
  top: 3px; left: 3px;
  width: calc(50% - 3px); height: calc(100% - 6px);
  border-radius: 999px;
  background: var(--ink);
  box-shadow: 0 1px 6px rgba(0,0,0,0.18);
  transition: transform 0.32s cubic-bezier(.5,1.4,.5,1), background 0.3s ease;
}
.mode-toggle .mt-label {
  position: relative; z-index: 1;
  flex: 1;
  text-align: center;
  font-family: 'JetBrains Mono', monospace;
  font-size: 10.5px; letter-spacing: 0.1em; text-transform: uppercase;
  color: var(--ink);
  transition: color 0.3s ease;
  user-select: none;
}
/* light: left label sits on the dark knob */
.mode-toggle .mt-light { color: var(--bg); }
.mode-toggle .mt-dark { color: var(--mute); }
/* dark mode on: slide knob right + flip label colors */
[data-palette="ember"] .mode-toggle .mt-knob { transform: translateX(100%); }
[data-palette="ember"] .mode-toggle .mt-light { color: var(--mute); }
[data-palette="ember"] .mode-toggle .mt-dark { color: var(--bg); }
.mode-toggle:hover { border-color: var(--ink); }

@media (max-width: 1180px) {
  .status .status-rest { display: none; }
}

/* ---------- BUTTONS ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 14px 22px; border-radius: 999px;
  text-decoration: none; cursor: pointer;
  font-family: 'JetBrains Mono', monospace; font-size: 11px;
  letter-spacing: 0.1em; text-transform: uppercase;
  transition: transform 0.15s ease, background 0.2s, color 0.2s;
  border: 1px solid var(--ink);
}
.btn.primary { background: var(--ink); color: var(--bg); }
.btn.primary:hover { background: var(--glow); color: var(--ink); border-color: var(--glow); }
.btn.ghost { background: transparent; color: var(--ink); }
.btn.ghost:hover { background: var(--ink); color: var(--bg); }
.btn .arrow { transition: transform 0.2s; }
.btn:hover .arrow { transform: translateX(3px); }

.cta-row { display: flex; gap: 14px; margin-top: 28px; flex-wrap: wrap; }

.compat {
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
  margin-top: 22px;
  color: var(--mute);
}
.compat > span {
  padding: 6px 10px;
  border: 1px solid var(--line-strong);
  background: var(--paper);
  color: var(--ink);
  line-height: 1;
}
.compat .dot-sep {
  padding: 0; border: none; background: transparent; color: var(--mute);
}

/* ---------- HERO ---------- */
.hero {
  position: relative;
  padding: 60px 0 80px;
  border-bottom: 1px solid var(--line);
}
.hero .wrap { position: relative; }
.hero-meta {
  display: grid; grid-template-columns: 1fr auto 1fr;
  gap: 24px; padding-bottom: 28px;
  border-bottom: 1px dashed var(--line);
  align-items: end;
}
.hero-meta .right { text-align: right; color: var(--mute); }
.hero-meta .center { color: var(--mute); }
@media (max-width: 720px) {
  .hero-meta { grid-template-columns: 1fr; gap: 8px; }
  .hero-meta .right, .hero-meta .center { text-align: left; }
}

.display {
  font-family: 'Instrument Serif', serif;
  font-weight: 400;
  font-size: clamp(56px, 11vw, 168px);
  line-height: 0.92;
  letter-spacing: -0.025em;
  margin: 36px 0 0;
  text-wrap: balance;
}
.display em { font-style: italic; color: var(--ink-2); }
.display .gold {
  background: linear-gradient(180deg, var(--glow-2) 0%, var(--glow) 60%, #C26A11 100%);
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent;
}

/* slot machine for cycling adjective */
.display .slot {
  display: inline-block;
  overflow: hidden;
  vertical-align: top;
  height: 0.92em;
  line-height: 0.92;
  transition: width 0.55s cubic-bezier(.7, 0, .2, 1);
  position: relative;
  box-shadow: inset 0 -0.02em 0 color-mix(in oklab, var(--glow) 28%, transparent);
}
.display .slot-track {
  display: block;
  transition: transform 0.7s cubic-bezier(.7, -0.05, .15, 1.05);
  will-change: transform;
}
.display .slot-word {
  display: block;
  width: max-content;
  height: 0.92em;
  line-height: 0.92;
  white-space: nowrap;
  font-style: italic;
}

.hero-row {
  display: grid; grid-template-columns: 1.05fr 0.95fr;
  gap: 48px; align-items: end;
  margin-top: 56px;
}
@media (max-width: 900px) { .hero-row { grid-template-columns: 1fr; } }

.lede {
  font-family: 'Newsreader', serif;
  font-size: 19px; line-height: 1.55;
  max-width: 46ch; color: var(--ink-2);
}
.lede em { font-style: italic; }

/* ---------- TOASTER (the cat) ---------- */
.toaster-stage {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 11;
  user-select: none;
}
.toaster-stage .photo {
  width: 100%; height: 100%; object-fit: contain;
  object-position: center bottom;
  filter: contrast(1.02) saturate(0.95);
}
.toaster-stage .eyeglow {
  position: absolute; pointer-events: none;
  width: 32%; height: 32%;
  left: 22%; top: 30%;
  background: radial-gradient(closest-side, color-mix(in oklab, var(--glow) 70%, transparent), transparent 70%);
  filter: blur(6px);
  opacity: calc(0.55 * var(--glow-strength));
  mix-blend-mode: screen;
  transition: transform 0.18s ease-out;
}
.toaster-stage .nameplate {
  position: absolute; left: 0; bottom: -12px;
  display: flex; align-items: center; gap: 12px;
  background: var(--bg);
  padding: 0 10px;
  color: var(--mute);
}
.toaster-stage .nameplate .tick {
  width: 22px; height: 1px; background: var(--line-strong);
}
.floaty-tag {
  position: absolute; right: 4%; top: 8%;
  display: flex; flex-direction: column; align-items: flex-end;
  gap: 4px;
  transform: rotate(2deg);
}
.floaty-tag .bubble {
  background: var(--paper);
  border: 1px solid var(--line-strong);
  padding: 8px 12px;
  border-radius: 14px 14px 14px 2px;
  font-family: 'Instrument Serif', serif;
  font-size: 17px; font-style: italic;
  color: var(--ink);
  box-shadow: 2px 4px 0 var(--line);
}
.floaty-tag .who { color: var(--mute); margin-right: 8px; }

/* crumbs */
.crumbs { position: absolute; inset: 0; pointer-events: none; overflow: hidden; }
.crumb {
  position: absolute;
  width: 6px; height: 4px; border-radius: 50%;
  background: #B98345;
  opacity: 0.55;
}

/* ---------- MARQUEE ---------- */
.marquee {
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  padding: 22px 0;
  overflow: hidden;
  background: var(--bg-2);
}
.marquee-track {
  display: flex; gap: 56px;
  animation: scroll 38s linear infinite;
  width: max-content;
}
.marquee-track span {
  font-family: 'Instrument Serif', serif;
  font-size: 42px; line-height: 1; white-space: nowrap;
  color: var(--ink);
}
.marquee-track span em { font-style: italic; color: var(--ink-2); }
.marquee-track .star {
  display: inline-block; width: 18px; height: 18px;
  background: radial-gradient(circle at 35% 35%, var(--glow-2), var(--glow) 60%, #A55D11);
  border-radius: 50%;
  align-self: center;
  box-shadow: 0 0 calc(12px * var(--glow-strength)) var(--glow);
}
@keyframes scroll {
  from { transform: translateX(0); }
  to { transform: translateX(-50%); }
}

/* ---------- SECTIONS ---------- */
section { padding: 120px 0; border-bottom: 1px solid var(--line); position: relative; }
.sec-head {
  display: grid; grid-template-columns: 220px 1fr;
  gap: 40px; margin-bottom: 56px;
}
@media (max-width: 720px) { .sec-head { grid-template-columns: 1fr; gap: 12px; } }
.sec-head .index { color: var(--mute); }
.sec-title {
  font-family: 'Instrument Serif', serif;
  font-size: clamp(34px, 5vw, 64px);
  line-height: 1.02;
  letter-spacing: -0.015em;
  margin: 0;
  max-width: 22ch;
  text-wrap: balance;
}
.sec-title em { font-style: italic; color: var(--ink-2); }

/* ---------- WORK ---------- */
.work-grid {
  display: grid; grid-template-columns: 1fr 1fr;
  gap: 56px 40px;
}
@media (max-width: 880px) { .work-grid { grid-template-columns: 1fr; gap: 48px; } }

.work { cursor: pointer; display: block; text-decoration: none; color: inherit; }
.work .frame {
  position: relative;
  aspect-ratio: 4 / 3;
  background: var(--bg-2);
  border: 1px solid var(--line);
  overflow: hidden;
  transition: transform 0.35s cubic-bezier(.2,.7,.2,1);
}
.work:hover .frame { transform: translateY(-4px); }
.work .meta {
  display: flex; justify-content: space-between; align-items: baseline;
  margin-top: 16px; gap: 24px;
}
.work h3 {
  font-family: 'Instrument Serif', serif;
  font-weight: 400; font-size: 28px;
  margin: 0;
  letter-spacing: -0.01em;
}
.work h3 em { font-style: italic; color: var(--ink-2); }
.work h3 .sub {
  font-style: italic; color: var(--ink-2);
  display: block;
  font-size: 22px;
  margin-top: 2px;
}
.work .tags { color: var(--mute); }
.work.featured { grid-column: 1 / -1; }
.work.featured .frame { aspect-ratio: 21 / 9; }

/* photo frame contents */
.frame-art {
  position: absolute; inset: 0;
  display: flex; align-items: center; justify-content: center;
  overflow: hidden;
}

/* badges shared by all frame-art tiles */
.frame-art .badge {
  position: absolute; top: 14px; left: 14px;
  background: var(--ink); color: var(--bg);
  padding: 6px 10px; line-height: 1;
  border: 1px solid var(--ink);
}
.frame-art .badge.outline {
  background: transparent; color: var(--ink);
  border-color: var(--line-strong);
}

/* photo frame-art: full bleed image */
.frame-art.photo { overflow: hidden; background: var(--ink); }
.frame-art.photo img {
  width: 100%; height: 100%;
  object-fit: cover; object-position: center;
  display: block;
  image-rendering: pixelated;
  image-rendering: -moz-crisp-edges;
  image-rendering: crisp-edges;
}
.work:hover .frame-art.photo img {
  transform: scale(1.04);
  transition: transform 0.6s cubic-bezier(.2,.7,.2,1);
}
.frame-art.photo img { transition: transform 0.4s ease; }
.frame-art.jenga {
  background: linear-gradient(170deg, #2A1D11 0%, #4A331C 60%, #6A4825 100%);
  display: grid; place-items: center;
  overflow: hidden;
}

/* Queue — request slot */
.frame-art.queue { background: var(--paper); padding: 22px; }
.frame-art.queue .queue-grid {
  width: 100%; height: 100%;
  display: grid; grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  align-items: stretch;
}
.frame-art.queue .q-card {
  border: 1.5px dashed var(--line-strong);
  background: transparent;
  display: flex; align-items: center; justify-content: center;
  color: var(--mute);
  padding: 14px;
  text-align: center;
}
.frame-art.queue .q-card.q-b {
  background: color-mix(in oklab, var(--glow) 14%, var(--paper));
  border-style: solid;
  border-color: var(--ink);
  color: var(--ink);
}
.frame-art.queue .q-card span { display: block; line-height: 1.3; }

/* WIP — pixelated + blurred mystery scene */
.frame-art.wip {
  background: #1B2A6E;
  overflow: hidden;
  display: grid; place-items: center;
  isolation: isolate;
}
.mc-scene {
  position: absolute; inset: 0;
  filter: url(#pixelate) blur(14px);
  z-index: 0;
  image-rendering: pixelated;
}
.mc-sky {
  position: absolute; inset: 0;
  background:
    linear-gradient(180deg,
      #1B2A6E 0%, #5B3A9E 22%, #E14B7A 48%,
      #FF8A3D 66%, #FFD56B 82%, #FFEEC4 100%);
}
.mc-sun {
  position: absolute;
  width: 56px; height: 56px;
  background: #FFE070;
  box-shadow:
    6px 0 0 #FFE070, -6px 0 0 #FFE070, 0 6px 0 #FFE070, 0 -6px 0 #FFE070,
    0 0 50px 10px rgba(255, 180, 80, 0.95),
    0 0 90px 20px rgba(255, 90, 60, 0.55);
  top: 30%; right: 14%;
  border-radius: 6px;
}
.mc-cloud {
  position: absolute;
  background: #FFC8B0;
  height: 14px; width: 14px;
  box-shadow:
    14px -10px 0 #FFC8B0, 28px -10px 0 #FFC8B0, 42px -10px 0 #FFC8B0,
    14px 0 0 #FF9F8A, 28px 0 0 #FF9F8A, 42px 0 0 #FF9F8A, 56px 0 0 #FF9F8A,
    28px 10px 0 #C76B7A, 42px 10px 0 #C76B7A;
}
.mc-cloud.c1 { top: 12%; left: 6%; }
.mc-cloud.c2 { top: 22%; left: 46%; transform: scale(0.8); }
.mc-bird {
  position: absolute;
  width: 6px; height: 6px;
  background: #2a2a2a;
  box-shadow: 6px -2px 0 #2a2a2a, -6px -2px 0 #2a2a2a;
}
.mc-bird.b1 { top: 36%; left: 28%; }
.mc-bird.b2 { top: 42%; left: 64%; transform: scale(0.7); }
.mc-mountain {
  position: absolute;
  width: 0; height: 0;
  border-left: 90px solid transparent;
  border-right: 90px solid transparent;
  border-bottom: 80px solid #6E8B7A;
  bottom: calc(42px * 4 - 6px);
}
.mc-mountain.m1 { left: -20px; border-bottom-color: #5B7868; border-left-width: 80px; border-right-width: 80px; border-bottom-width: 70px; }
.mc-mountain.m2 { right: -10px; transform: scale(1.2); border-bottom-color: #7B9B88; }
.mc-mountain.m3 { left: 40%; border-bottom-color: #C26466; border-left-width: 100px; border-right-width: 100px; border-bottom-width: 64px; opacity: 0.85; }
.mc-tree { position: absolute; bottom: 38%; left: 22%; }
.mc-trunk {
  width: 14px; height: 28px;
  background: #6B4426;
  box-shadow: inset -3px 0 0 rgba(0,0,0,0.18);
  margin: 0 auto;
}
.mc-leaves {
  width: 56px; height: 42px;
  background: #4E8A3E;
  box-shadow:
    inset -4px -4px 0 rgba(0,0,0,0.18),
    inset 4px 4px 0 rgba(255,255,255,0.12),
    0 0 0 4px #4E8A3E;
  margin-bottom: -4px; margin-left: -21px;
  image-rendering: pixelated;
}
.mc-flower { position: absolute; width: 6px; height: 6px; bottom: 38%; }
.mc-flower.f1 { left: 40%; background: #FF5BB0; box-shadow: 0 -6px 0 #4E8A3E; }
.mc-flower.f2 { left: 58%; background: #FFE070; box-shadow: 0 -6px 0 #4E8A3E; }
.mc-flower.f3 { left: 72%; background: #B967FF; box-shadow: 0 -6px 0 #4E8A3E; }
.mc-terrain { position: absolute; left: 0; right: 0; bottom: 0; display: flex; flex-direction: column; }
.mc-row { display: flex; height: 38px; }
.mc-row span {
  flex: 1;
  border-right: 1px solid rgba(0,0,0,0.18);
  border-top: 1px solid rgba(0,0,0,0.15);
}
.mc-row span:last-child { border-right: none; }
.mc-grass { background: #5BAA3A; box-shadow: inset 0 -6px 0 #3F7A28; }
.mc-dirt { background: #8A5A36; box-shadow: inset 0 -2px 0 #6B4426; }
.mc-dirt span:nth-child(2) { background: #7a4f30; }
.mc-dirt span:nth-child(8) { background: #9a6841; }
.mc-stone { background: #888888; box-shadow: inset 0 -2px 0 #6a6a6a; }
.mc-stone span:nth-child(3), .mc-stone span:nth-child(7) { background: #6f6f6f; }
.mc-stone .ore-diamond { background: #5BE8E0; }
.mc-stone .ore-gold { background: #F2C84B; }
.mc-stone .ore-redstone { background: #D33C3C; }
.mc-stone .ore-emerald { background: #2BC55A; }
.mc-stone .ore-lapis { background: #3457C4; }
.frame-art.wip .wip-stamp {
  position: relative; z-index: 1;
  font-size: 58px; color: var(--ink);
  border: 2px solid var(--line-strong);
  padding: 14px 28px;
  transform: rotate(-6deg);
  background: var(--bg);
  box-shadow: 0 10px 30px rgba(0,0,0,0.22);
}

/* GitHub repos tile */
.frame-art.repos {
  background: var(--ink);
  color: var(--bg);
  padding: 28px;
  align-items: center; justify-content: center;
}
.frame-art.repos .repo-list { width: 100%; display: flex; flex-direction: column; gap: 0; }
.frame-art.repos .repo {
  display: grid; grid-template-columns: auto 1fr auto;
  gap: 14px; align-items: center;
  padding: 14px 4px;
  border-top: 1px solid color-mix(in oklab, var(--bg) 22%, transparent);
  font-family: 'JetBrains Mono', monospace;
  font-size: 14px;
}
.frame-art.repos .repo:first-child { border-top: none; }
.frame-art.repos .repo .dot {
  width: 10px; height: 10px; border-radius: 50%;
  background: var(--glow); box-shadow: 0 0 8px var(--glow);
}
.frame-art.repos .repo .name { color: var(--bg); }
.frame-art.repos .repo .meta-tag {
  color: color-mix(in oklab, var(--bg) 55%, transparent);
  font-size: 10px;
  border: 1px solid color-mix(in oklab, var(--bg) 22%, transparent);
  padding: 3px 8px; border-radius: 999px;
}
/* clickable repo rows (each links to its own repo) */
.frame-art.repos a.repo { text-decoration: none; color: inherit; cursor: pointer; transition: background 0.2s ease; }
.frame-art.repos a.repo:hover { background: color-mix(in oklab, var(--bg) 12%, transparent); }
.frame-art.repos a.repo:hover .name { text-decoration: underline; text-underline-offset: 3px; }
.frame-art.repos a.repo:hover .dot { box-shadow: 0 0 12px var(--glow); }
/* this tile is a list of links, not one single link */
.work.repos-card { cursor: default; }
.meta a.tags { text-decoration: none; transition: color 0.2s; }
.meta a.tags:hover { color: var(--ink); }

/* ---------- STUDIO / ABOUT ---------- */
.about-grid {
  display: grid; grid-template-columns: 1fr 1fr;
  gap: 56px; align-items: start;
}
@media (max-width: 880px) { .about-grid { grid-template-columns: 1fr; } }
.about-copy p {
  font-family: 'Newsreader', serif;
  font-size: 22px; line-height: 1.5;
  margin: 0 0 22px;
  max-width: 38ch;
}
.about-copy p:first-of-type {
  font-family: 'Instrument Serif', serif;
  font-size: 34px; line-height: 1.15;
  color: var(--ink);
}
.about-copy em { font-style: italic; color: var(--ink-2); }

.studio-stats {
  margin: 36px 0 0; padding: 22px 0 0;
  border-top: 1px solid var(--line);
  display: grid; grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  color: var(--mute);
}
.studio-stats > div { display: flex; flex-direction: column; gap: 6px; }
.studio-stats dt { font-size: 11px; }
.studio-stats dd {
  margin: 0;
  font-family: 'Instrument Serif', serif;
  font-size: 34px; line-height: 1;
  color: var(--ink);
  font-style: italic;
  text-transform: none;
  letter-spacing: 0;
}
.studio-stats dd .count {
  display: inline-block;
  font-variant-numeric: tabular-nums;
  font-feature-settings: "tnum";
}
.studio-stats dd .count.live { color: var(--ink); transition: color 0.2s ease; }
.studio-stats dd .count.live.bumping { color: var(--glow); }
.studio-stats dd .live-dot {
  display: inline-block;
  width: 7px; height: 7px; border-radius: 50%;
  background: var(--glow); box-shadow: 0 0 8px var(--glow);
  margin-left: 8px; vertical-align: middle;
  animation: pulse-live 2s ease-in-out infinite;
  position: relative; top: -4px;
}
@keyframes pulse-live {
  0%, 100% { opacity: 0.45; transform: scale(0.9); }
  50% { opacity: 1; transform: scale(1.15); }
}

.founder-card {
  background: var(--paper);
  border: 1px solid var(--line);
  padding: 0;
  position: relative;
}
.founder-card .top {
  aspect-ratio: 4/3;
  background: var(--bg-2);
  position: relative; overflow: hidden;
  display: flex; align-items: flex-end; justify-content: center;
}
.founder-card .top img { width: 88%; max-height: 100%; object-fit: contain; object-position: center bottom; }
.founder-card .top .eyeglow-mini {
  position: absolute;
  width: 28%; height: 28%; left: 18%; top: 28%;
  background: radial-gradient(closest-side, color-mix(in oklab, var(--glow) 65%, transparent), transparent 70%);
  filter: blur(8px);
  mix-blend-mode: screen;
  opacity: calc(0.6 * var(--glow-strength));
}
.founder-card .body { padding: 24px 26px 28px; }
.founder-card h4 {
  font-family: 'Instrument Serif', serif;
  font-weight: 400; font-size: 30px; margin: 0 0 4px;
}
.founder-card .role { color: var(--mute); }
.founder-card dl {
  margin: 18px 0 0; padding: 0;
  display: grid; grid-template-columns: 90px 1fr;
  gap: 10px 18px;
  border-top: 1px solid var(--line); padding-top: 16px;
}
.founder-card dt { color: var(--mute); }
.founder-card dd { margin: 0; }
.founder-card dd.serif { text-transform: none; font-size: 16px; letter-spacing: 0; }

/* ---------- SERVICES ---------- */
.services {
  display: grid; grid-template-columns: 1fr;
  border-top: 1px solid var(--ink);
}
.service {
  display: grid; grid-template-columns: 80px 1fr 280px 80px;
  gap: 32px;
  padding: 28px 0;
  border-bottom: 1px solid var(--line);
  align-items: baseline;
  transition: padding-left 0.25s ease, background 0.25s;
  cursor: default;
}
.service:hover { padding-left: 16px; background: color-mix(in oklab, var(--glow) 8%, transparent); }
.service .num { color: var(--mute); }
.service h3 {
  margin: 0;
  font-family: 'Instrument Serif', serif;
  font-weight: 400; font-size: 38px; line-height: 1.05;
  letter-spacing: -0.01em;
}
.service h3 em { font-style: italic; color: var(--ink-2); }
.service p { margin: 0; color: var(--ink-2); }
.service .star {
  justify-self: end;
  width: 14px; height: 14px; border-radius: 50%;
  background: var(--glow); box-shadow: 0 0 12px var(--glow);
  opacity: calc(0.85 * var(--glow-strength));
}
@media (max-width: 880px) {
  .service { grid-template-columns: 60px 1fr; }
  .service p, .service .star { grid-column: 2; }
  .service .star { justify-self: start; }
}

/* ---------- PROCESS ---------- */
.process-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px; }
@media (max-width: 880px) { .process-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 540px) { .process-grid { grid-template-columns: 1fr; } }
.step {
  border: 1px solid var(--line);
  padding: 26px 22px;
  background: var(--paper);
  position: relative;
  display: flex; flex-direction: column; gap: 14px;
  min-height: 220px;
}
.step .toast-icon { width: 56px; height: 56px; position: relative; }
.step h4 { font-family: 'Instrument Serif', serif; font-weight: 400; font-size: 26px; margin: 0; }
.step p { margin: 0; color: var(--ink-2); font-size: 15px; line-height: 1.5; }
.step .step-num { position: absolute; top: 22px; right: 22px; color: var(--mute); }

/* ---------- CONTACT (big email CTA) ---------- */
.contact {
  padding: 140px 0;
  text-align: center;
  background: var(--bg-2);
}
.contact .big {
  font-family: 'Instrument Serif', serif;
  font-size: clamp(48px, 9vw, 132px);
  line-height: 0.95;
  letter-spacing: -0.025em;
  margin: 24px 0 32px;
}
.contact .big em { font-style: italic; color: var(--ink-2); }
.contact .big a {
  color: var(--ink); text-decoration: none;
  background: linear-gradient(transparent 70%, var(--glow) 70%);
  background-size: 100% 100%;
  padding: 0 6px;
  transition: background-size 0.3s;
}
.contact .big a:hover { background-size: 100% 200%; }

/* ---------- FOOTER ---------- */
footer {
  padding: 40px 0 50px;
  border-top: 1px solid var(--line);
  color: var(--mute);
}
footer .wrap {
  display: grid; grid-template-columns: 1fr 1fr 1fr;
  gap: 24px; align-items: end;
}
@media (max-width: 720px) { footer .wrap { grid-template-columns: 1fr; gap: 14px; } }
footer .col.center { text-align: center; }
footer .col.right { text-align: right; }
@media (max-width: 720px) { footer .col.center, footer .col.right { text-align: left; } }
footer a { color: var(--mute); text-decoration: none; }
footer a:hover { color: var(--ink); }

/* ---------- REVEAL (gated on .js so no-JS still shows content) ---------- */
.js [data-reveal] { opacity: 0; transform: translateY(18px); transition: opacity 0.7s ease, transform 0.7s ease; }
.js [data-reveal].in { opacity: 1; transform: none; }

/* =====================================================================
   SUB-PAGE STYLES (mods catalog, mod detail, studio, contact, 404)
   ===================================================================== */

/* page header — reuses hero-meta dashed motif as a banner */
.page-hero { padding: 64px 0 56px; border-bottom: 1px solid var(--line); position: relative; }
.breadcrumb {
  display: flex; align-items: center; gap: 10px;
  color: var(--mute); margin-bottom: 28px;
  padding-bottom: 22px; border-bottom: 1px dashed var(--line);
}
.breadcrumb a { color: var(--mute); text-decoration: none; }
.breadcrumb a:hover { color: var(--ink); }
.breadcrumb .sep { opacity: 0.6; }
.breadcrumb .here { color: var(--ink); }
.page-title {
  font-family: 'Instrument Serif', serif;
  font-weight: 400;
  font-size: clamp(48px, 8vw, 116px);
  line-height: 0.94;
  letter-spacing: -0.025em;
  margin: 0;
  text-wrap: balance;
}
.page-title em { font-style: italic; color: var(--ink-2); }
.page-title .gold {
  background: linear-gradient(180deg, var(--glow-2) 0%, var(--glow) 60%, #C26A11 100%);
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent;
}
.page-sub {
  font-family: 'Newsreader', serif;
  font-size: 20px; line-height: 1.55;
  max-width: 52ch; color: var(--ink-2);
  margin: 26px 0 0;
}
.page-sub em { font-style: italic; }

/* ---------- MOD DETAIL ---------- */
.mod-detail { padding: 80px 0; border-bottom: 1px solid var(--line); }
.mod-layout {
  display: grid; grid-template-columns: 1.25fr 0.75fr;
  gap: 56px; align-items: start;
}
@media (max-width: 940px) { .mod-layout { grid-template-columns: 1fr; gap: 40px; } }

.mod-shot {
  position: relative;
  aspect-ratio: 16 / 9;
  border: 1px solid var(--line);
  background: var(--ink);
  overflow: hidden;
}
.mod-shot img {
  width: 100%; height: 100%; object-fit: cover; object-position: center;
  display: block;
}
.mod-shot .badge {
  position: absolute; top: 16px; left: 16px;
  background: var(--ink); color: var(--bg);
  padding: 7px 12px; line-height: 1;
  border: 1px solid var(--ink);
}

.mod-aside { position: relative; }
.spec {
  border-top: 1px solid var(--ink);
}
.spec .row {
  display: grid; grid-template-columns: 120px 1fr;
  gap: 16px; padding: 14px 0;
  border-bottom: 1px solid var(--line);
  align-items: baseline;
}
.spec dt { color: var(--mute); margin: 0; }
.spec dd {
  margin: 0; color: var(--ink);
  font-family: 'Newsreader', serif; font-size: 17px;
}
.spec dd .count.live { font-variant-numeric: tabular-nums; transition: color 0.2s; }
.spec dd .count.live.bumping { color: var(--glow); }
.spec dd .live-dot {
  display: inline-block; width: 7px; height: 7px; border-radius: 50%;
  background: var(--glow); box-shadow: 0 0 8px var(--glow);
  margin-left: 6px; vertical-align: middle;
  animation: pulse-live 2s ease-in-out infinite;
}

.mod-body { margin-top: 64px; }
.mod-body .prose {
  max-width: 60ch;
}
.mod-body h2 {
  font-family: 'Instrument Serif', serif;
  font-weight: 400; font-size: clamp(28px, 4vw, 44px);
  line-height: 1.05; letter-spacing: -0.015em;
  margin: 0 0 18px;
}
.mod-body h2 em { font-style: italic; color: var(--ink-2); }
.mod-body h3 {
  font-family: 'Instrument Serif', serif;
  font-weight: 400; font-size: 26px; margin: 40px 0 12px;
}
.mod-body p {
  font-family: 'Newsreader', serif;
  font-size: 19px; line-height: 1.6; color: var(--ink-2);
  margin: 0 0 18px; max-width: 60ch;
}
.mod-body p em { font-style: italic; color: var(--ink); }

/* controls — keycap chips */
.controls { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 12px; max-width: 60ch; }
.controls li {
  display: flex; align-items: baseline; gap: 16px;
  padding: 14px 0; border-bottom: 1px solid var(--line);
  color: var(--ink-2);
}
.controls .keys { display: flex; gap: 6px; flex: none; }
kbd {
  display: inline-block;
  font-family: 'JetBrains Mono', monospace;
  font-size: 12px; font-weight: 700;
  color: var(--bg); background: var(--ink);
  padding: 6px 10px; border-radius: 5px;
  box-shadow: 0 2px 0 var(--line-strong);
  white-space: nowrap;
}

/* related mods strip */
.related { padding: 80px 0; border-bottom: 1px solid var(--line); }
.related-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 40px; }
@media (max-width: 720px) { .related-grid { grid-template-columns: 1fr; } }

/* ---------- CATALOG / CONTACT intro blocks ---------- */
.intro { padding: 72px 0; border-bottom: 1px solid var(--line); }
.intro p {
  font-family: 'Instrument Serif', serif;
  font-size: clamp(24px, 3.4vw, 40px);
  line-height: 1.18; letter-spacing: -0.01em;
  max-width: 26ch; margin: 0;
  color: var(--ink);
}
.intro p em { font-style: italic; color: var(--ink-2); }

/* request panel on contact page */
.request {
  border: 1px solid var(--line);
  background: var(--paper);
  padding: 40px;
  display: grid; grid-template-columns: 1fr auto;
  gap: 28px; align-items: center;
}
@media (max-width: 720px) { .request { grid-template-columns: 1fr; } }
.request h3 {
  font-family: 'Instrument Serif', serif;
  font-weight: 400; font-size: 30px; margin: 0 0 8px;
}
.request p { margin: 0; color: var(--ink-2); max-width: 46ch; }

.channels { list-style: none; margin: 40px 0 0; padding: 0; border-top: 1px solid var(--ink); }
.channels li {
  display: grid; grid-template-columns: 200px 1fr auto;
  gap: 24px; align-items: baseline;
  padding: 24px 0; border-bottom: 1px solid var(--line);
  transition: padding-left 0.25s ease, background 0.25s;
}
.channels li:hover { padding-left: 14px; background: color-mix(in oklab, var(--glow) 8%, transparent); }
.channels .ch-name {
  font-family: 'Instrument Serif', serif; font-size: 30px;
}
.channels .ch-desc { color: var(--ink-2); }
.channels a.ch-link { color: var(--mute); text-decoration: none; white-space: nowrap; }
.channels a.ch-link:hover { color: var(--ink); }
@media (max-width: 720px) {
  .channels li { grid-template-columns: 1fr; gap: 6px; }
}

/* ---------- 404 ---------- */
.notfound {
  min-height: calc(100vh - var(--nav-h));
  display: grid; place-items: center;
  text-align: center;
  padding: 80px 0;
}
.notfound .code {
  font-family: 'Instrument Serif', serif;
  font-size: clamp(96px, 22vw, 280px);
  line-height: 0.9; margin: 0;
  letter-spacing: -0.03em;
}
.notfound .code .gold {
  background: linear-gradient(180deg, var(--glow-2) 0%, var(--glow) 60%, #C26A11 100%);
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent;
}
.notfound p {
  font-family: 'Newsreader', serif; font-size: 22px;
  color: var(--ink-2); margin: 18px auto 30px; max-width: 38ch;
}
.notfound p em { font-style: italic; }

/* ---------- LEGAL / ARTICLE PAGES (privacy, terms) ---------- */
.legal { padding: 64px 0 96px; }
.legal .prose { max-width: 72ch; }
.legal .updated { color: var(--mute); margin: 0 0 36px; }
.legal h2 {
  font-family: 'Instrument Serif', serif; font-weight: 400;
  font-size: clamp(26px, 3.6vw, 40px); line-height: 1.05;
  letter-spacing: -0.015em; margin: 48px 0 14px;
}
.legal h2:first-child { margin-top: 0; }
.legal h2 em { font-style: italic; color: var(--ink-2); }
.legal h3 { font-family: 'Instrument Serif', serif; font-weight: 400; font-size: 24px; margin: 30px 0 8px; }
.legal p { font-family: 'Newsreader', serif; font-size: 18px; line-height: 1.65; color: var(--ink-2); margin: 0 0 16px; }
.legal ul { margin: 0 0 18px; padding-left: 22px; }
.legal li { font-family: 'Newsreader', serif; font-size: 18px; line-height: 1.6; color: var(--ink-2); margin: 0 0 8px; }
.legal a { color: var(--ink); text-decoration: underline; text-underline-offset: 3px; }
.legal a:hover { color: var(--ink-2); }
.legal strong { color: var(--ink); }

/* ---------- FAQ (accordion) ---------- */
.faq { padding: 56px 0 96px; }
.faq .faq-list { max-width: 78ch; border-top: 1px solid var(--ink); }
.faq details { border-bottom: 1px solid var(--line); }
.faq summary {
  cursor: pointer; list-style: none;
  padding: 24px 0; gap: 20px;
  display: flex; align-items: baseline; justify-content: space-between;
  font-family: 'Instrument Serif', serif; font-size: clamp(21px, 2.6vw, 28px);
  color: var(--ink); transition: color 0.2s;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary:hover { color: var(--ink-2); }
.faq summary::after {
  content: '+'; flex: none;
  font-family: 'JetBrains Mono', monospace; font-size: 22px; color: var(--mute);
  transition: transform 0.2s ease;
}
.faq details[open] summary::after { content: '–'; color: var(--glow); }
.faq details .answer { padding: 0 0 26px; }
.faq details .answer p { font-family: 'Newsreader', serif; font-size: 18px; line-height: 1.65; color: var(--ink-2); margin: 0 0 14px; max-width: 70ch; }
.faq details .answer a { color: var(--ink); text-decoration: underline; text-underline-offset: 3px; }
.faq details .answer ul { margin: 0 0 14px; padding-left: 22px; color: var(--ink-2); }
.faq details .answer li { font-family: 'Newsreader', serif; font-size: 18px; line-height: 1.6; margin: 0 0 6px; }

/* footer legal links row */
footer .col.left .legal-links { display: block; margin-top: 8px; }

/* =====================================================================
   GAME PICKER (homepage hero) — "choose your game", editorial-Minecraft
   take on the CurseForge landing pattern. Two games, real numbers.
   ===================================================================== */
.picker { padding: 56px 0 100px; border-bottom: 1px solid var(--line); position: relative; }
.picker .wrap { position: relative; }
.picker .display { margin-top: 36px; text-align: center; }
.picker .pick-sub {
  font-family: 'Newsreader', serif; font-size: 20px; line-height: 1.55;
  color: var(--ink-2); max-width: 58ch; margin: 26px auto 0; text-align: center;
}
.picker .pick-sub em { font-style: italic; color: var(--ink); }

/* stat bar — four cells, hairline-divided, serif numbers + mono labels */
.statbar {
  display: grid; grid-template-columns: repeat(4, 1fr);
  border: 1px solid var(--line-strong);
  background: var(--paper);
  max-width: 880px; margin: 48px auto 0;
}
.statbar .stat { padding: 24px 16px; text-align: center; border-left: 1px solid var(--line); }
.statbar .stat:first-child { border-left: none; }
.statbar .stat .num {
  display: block;
  font-family: 'Instrument Serif', serif; font-style: italic;
  font-size: clamp(32px, 5vw, 50px); line-height: 1; color: var(--ink);
  font-variant-numeric: tabular-nums; font-feature-settings: "tnum";
}
.statbar .stat .num .count.live.bumping { color: var(--glow); }
.statbar .stat .lbl { display: block; margin-top: 12px; color: var(--mute); }
.statbar .live-dot {
  display: inline-block; width: 8px; height: 8px; border-radius: 50%;
  background: var(--glow); box-shadow: 0 0 8px var(--glow);
  margin-left: 8px; vertical-align: middle; position: relative; top: -6px;
  animation: pulse-live 2s ease-in-out infinite;
}
@media (max-width: 720px) {
  .statbar { grid-template-columns: 1fr 1fr; }
  .statbar .stat:nth-child(odd) { border-left: none; }
  .statbar .stat:nth-child(even) { border-left: 1px solid var(--line); }
  .statbar .stat:nth-child(3), .statbar .stat:nth-child(4) { border-top: 1px solid var(--line); }
}

/* game tiles — two big portrait cards using real cover art */
.game-grid {
  display: grid; grid-template-columns: 1fr 1fr; gap: 44px;
  max-width: 1040px; margin: 72px auto 0;
}
@media (max-width: 760px) { .game-grid { grid-template-columns: 1fr; gap: 40px; max-width: 460px; } }
.game-card { display: block; text-decoration: none; color: inherit; cursor: pointer; }
.game-card .frame {
  position: relative; aspect-ratio: 3 / 4;
  border: 1px solid var(--line); background: var(--bg-2); overflow: hidden;
  transition: transform 0.35s cubic-bezier(.2,.7,.2,1), border-color 0.3s;
}
.game-card:hover .frame { transform: translateY(-6px); border-color: var(--line-strong); }
.game-card .frame-art.photo img { object-position: center top; image-rendering: auto; }
.game-card .frame-art.photo img { transition: transform 0.5s cubic-bezier(.2,.7,.2,1); }
.game-card:hover .frame-art.photo img { transform: scale(1.04); }
.game-card .frame-art .badge { letter-spacing: 0.06em; }
.game-card .meta { display: flex; justify-content: space-between; align-items: baseline; margin-top: 18px; gap: 18px; }
.game-card h3 { font-family: 'Instrument Serif', serif; font-weight: 400; font-size: 32px; margin: 0; letter-spacing: -0.01em; }
.game-card h3 .sub { font-style: italic; color: var(--ink-2); display: block; font-size: 21px; margin-top: 2px; }
.game-card .tags { color: var(--mute); white-space: nowrap; }
.game-card .tags .count { font-variant-numeric: tabular-nums; }

/* the cat keeps its hero moment, now inside the studio section */
.studio-cat { max-width: 580px; margin: 0 auto 72px; }

/* inline links inside page subheads (e.g. cross-link to the Stanley page) */
.page-sub a { color: var(--ink); text-decoration: underline; text-underline-offset: 3px; }
.page-sub a:hover { color: var(--ink-2); }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; transition: none !important; }
}
