:root {
  --charcoal: #0B0B0D;
  --ink: #111114;
  --ink-2: #15171C;            /* one raised surface, used sparingly */
  --verdigris: #43B3AE;
  --verdigris-soft: rgba(67, 179, 174, 0.14);
  --sienna: #B15C3D;
  --amber: #D5A456;
  --vellum: #F4EDE0;
  --vellum-dim: rgba(244, 237, 224, 0.58);
  --vellum-faint: rgba(244, 237, 224, 0.36);
  --hairline: rgba(244, 237, 224, 0.12);
  --hairline-strong: rgba(244, 237, 224, 0.22);
  --bg-center: #141A22;
  --bg-edge: #05070A;
  --grain-url: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='200' height='200'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='1.15' numOctaves='2'/><feColorMatrix values='0 0 0 0 0.420 0 0 0 0 0.455 0 0 0 0 0.502 0 0 0 0.17 0'/></filter><rect width='200' height='200' filter='url(%23n)'/></svg>");
  --grain-opacity: 0.34;

  --serif: 'Instrument Serif', 'Iowan Old Style', Georgia, serif;
  --sans: 'Instrument Sans', system-ui, -apple-system, sans-serif;
  --mono: 'JetBrains Mono', ui-monospace, 'SF Mono', Menlo, monospace;

  --measure: 62ch;
  --wrap: 1320px;
  --gutter: clamp(20px, 4vw, 48px);
  --ease: cubic-bezier(0.22, 0.61, 0.36, 1);
}

/* project pages — the :root block above is generated from redesign/src.html */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; scroll-padding-top: 88px; }
body {
  background:
    radial-gradient(ellipse 42% 30% at 72% 72%, rgba(150, 110, 60, 0.055), transparent 58%) fixed,
    radial-gradient(ellipse 55% 38% at 30% 22%, rgba(110, 140, 170, 0.11), transparent 66%) fixed,
    radial-gradient(ellipse 130% 95% at 50% 42%, var(--bg-center) 0%, var(--bg-edge) 100%) center center fixed;
  background-color: var(--bg-edge); color: var(--vellum); font-family: var(--sans); font-size: 16px; line-height: 1.6;
  overflow-x: hidden; -webkit-font-smoothing: antialiased;
}
body::before { content: ''; position: fixed; inset: 0; pointer-events: none; z-index: 1000; background-image: var(--grain-url); opacity: var(--grain-opacity); mix-blend-mode: overlay; }
a { color: inherit; }
:focus-visible { outline: 1px solid var(--verdigris); outline-offset: 4px; }
em { font-style: italic; }
code { font-family: var(--mono); font-size: 0.86em; color: var(--vellum); background: rgba(244,237,224,0.06); padding: 1px 5px; border-radius: 3px; }

.mono { font-family: var(--mono); font-size: 10.5px; letter-spacing: 0.2em; text-transform: uppercase; color: var(--vellum-dim); line-height: 1.7; }
.mono b { font-weight: 400; color: var(--verdigris); }
.chip { font-family: var(--mono); font-size: 9.5px; letter-spacing: 0.18em; text-transform: uppercase; padding: 4px 9px 3px; border-radius: 3px; border: 1px solid currentColor; display: inline-flex; align-items: center; gap: 7px; white-space: nowrap; line-height: 1; }
.chip::before { content: ''; width: 5px; height: 5px; border-radius: 50%; background: currentColor; }
.chip.live, .chip.shipped { color: var(--verdigris); } .chip.live::before { box-shadow: 0 0 8px var(--verdigris); }
.chip.progress { color: var(--amber); }
.btn { font-family: var(--mono); font-size: 11px; letter-spacing: 0.16em; text-transform: uppercase; padding: 14px 24px; border-radius: 999px; text-decoration: none; display: inline-flex; align-items: center; gap: 10px; transition: background 0.25s var(--ease), color 0.25s var(--ease), border-color 0.25s var(--ease); border: 1px solid transparent; white-space: nowrap; }
.btn-accent { color: var(--verdigris); border-color: rgba(67,179,174,0.45); }
.btn-accent:hover { background: var(--verdigris); color: var(--charcoal); border-color: var(--verdigris); }

.nav { position: fixed; top: 0; left: 0; right: 0; z-index: 100; border-bottom: 1px solid var(--hairline); background: linear-gradient(to bottom, rgba(11, 11, 13, 0.86), rgba(11, 11, 13, 0.55)); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); }
.nav-inner { max-width: var(--wrap); margin: 0 auto; padding: 16px var(--gutter); display: flex; align-items: center; justify-content: space-between; gap: 24px; }
.brand { font-family: var(--serif); font-size: 26px; letter-spacing: -0.01em; color: var(--vellum); text-decoration: none; display: inline-flex; align-items: baseline; gap: 2px; line-height: 1; }
.brand .dot { color: var(--verdigris); } .brand .ext { color: var(--vellum-dim); }
.nav-links { display: flex; gap: 28px; list-style: none; align-items: center; }
.nav-links a { color: var(--vellum); text-decoration: none; font-family: var(--mono); font-size: 11.5px; letter-spacing: 0.14em; text-transform: uppercase; opacity: 0.72; transition: opacity 0.2s, color 0.2s; }
.nav-links a:hover { opacity: 1; color: var(--verdigris); }

.project-page { max-width: 820px; margin: 0 auto; padding: 136px var(--gutter) 96px; }
.project-head { padding-bottom: 34px; border-bottom: 1px solid var(--hairline-strong); margin-bottom: 40px; display: grid; gap: 22px; justify-items: start; }
.kicker { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; }
.project-head h1 { font-family: var(--serif); font-weight: 400; font-size: clamp(46px, 7vw, 84px); line-height: 0.95; letter-spacing: -0.03em; text-wrap: balance; }
.project-head h1 em { color: var(--verdigris); }
.project-head .lede { font-family: var(--sans); font-size: 17px; line-height: 1.65; color: var(--vellum); opacity: 0.9; max-width: 64ch; }
.project-head .lesson { font-family: var(--serif); font-style: italic; font-size: clamp(20px, 2.2vw, 25px); line-height: 1.4; color: var(--vellum); opacity: 0.88; max-width: 34ch; padding-left: 18px; border-left: 1px solid var(--verdigris); }
.project-head .lesson em { color: var(--verdigris); }

/* showcase: short description + captioned screenshots (assets/projects/<slug>/) */
.showcase { margin-bottom: 48px; }
.showcase h2 { margin-bottom: 10px; color: var(--sienna); }
.showcase .brief { font-size: 16.5px; line-height: 1.6; color: var(--vellum); opacity: 0.92; max-width: 66ch; margin-bottom: 22px; }
.gallery { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 14px; }
.gallery figure { margin: 0; display: grid; gap: 8px; }
.gallery figure:first-child:nth-last-child(n+3) { grid-column: 1 / -1; }
.gallery a { display: block; border: 1px solid var(--hairline-strong); background: var(--charcoal); overflow: hidden; }
.gallery img { display: block; width: 100%; height: auto; transition: transform 0.4s var(--ease); }
.gallery a:hover img { transform: scale(1.015); }
.gallery figcaption { text-transform: none; letter-spacing: 0.04em; font-size: 11px; }

.spec { margin-bottom: 44px; }
.spec h2 { margin-bottom: 8px; color: var(--sienna); }
.spec dl { display: grid; grid-template-columns: max-content 1fr; gap: 0 24px; border-top: 1px solid var(--hairline-strong); }
.spec dt, .spec dd { padding: 12px 0; border-bottom: 1px solid var(--hairline); }
.spec dt { font-family: var(--mono); font-size: 9.5px; letter-spacing: 0.22em; text-transform: uppercase; color: var(--verdigris); padding-top: 15px; }
.spec dd { font-size: 14.5px; line-height: 1.55; color: var(--vellum); opacity: 0.92; }
.spec dd a { color: var(--verdigris); text-decoration: none; border-bottom: 1px solid rgba(67,179,174,0.35); }

.readme .block { padding: 8px 0 36px; }
.readme .block + .block { border-top: 1px solid var(--hairline); padding-top: 36px; }
.readme h2 { font-family: var(--serif); font-weight: 400; font-size: clamp(26px, 3.2vw, 34px); line-height: 1.1; letter-spacing: -0.02em; margin-bottom: 18px; text-wrap: balance; }
.readme h3 { font-family: var(--serif); font-weight: 400; font-size: 22px; margin: 26px 0 10px; }
.readme h4 { font-family: var(--mono); font-size: 10.5px; letter-spacing: 0.2em; text-transform: uppercase; color: var(--verdigris); margin: 22px 0 10px; }
.readme p { font-size: 16.5px; line-height: 1.6; color: var(--vellum); opacity: 0.92; margin: 0 0 14px; max-width: 66ch; }
.readme p a { color: var(--verdigris); text-decoration: none; border-bottom: 1px solid rgba(67,179,174,0.35); }
.readme blockquote { font-family: var(--serif); font-style: italic; font-size: 18px; color: var(--vellum-dim); border-left: 1px solid var(--hairline-strong); padding-left: 16px; margin: 0 0 14px; }
.readme ul, .readme ol { margin: 0 0 16px; padding-left: 22px; max-width: 66ch; }
.readme li { font-size: 15.5px; line-height: 1.6; color: var(--vellum-dim); padding-left: 4px; margin-bottom: 7px; }
.readme li::marker { color: var(--verdigris); font-family: var(--mono); font-size: 12px; }
.readme li strong { color: var(--vellum); font-weight: 500; }
.readme table { border-collapse: collapse; width: 100%; margin: 0 0 18px; font-size: 14px; display: block; overflow-x: auto; }
.readme th, .readme td { text-align: left; padding: 10px 14px 10px 0; border-bottom: 1px solid var(--hairline); vertical-align: top; }
.readme th { font-family: var(--mono); font-size: 9.5px; letter-spacing: 0.2em; text-transform: uppercase; color: var(--verdigris); font-weight: 400; }
.readme td { color: var(--vellum-dim); } .readme td strong { color: var(--vellum); }

.project-foot { margin-top: 32px; padding-top: 28px; border-top: 1px solid var(--hairline-strong); display: grid; gap: 22px; }
.project-foot .mono { text-transform: none; letter-spacing: 0.04em; font-size: 11.5px; max-width: 66ch; }
.pager { display: grid; grid-template-columns: 1fr 1fr; gap: 1px; background: var(--hairline); border: 1px solid var(--hairline); }
.pager a { background: var(--charcoal); padding: 20px 22px; text-decoration: none; font-family: var(--serif); font-size: 20px; line-height: 1.2; display: grid; gap: 6px; transition: background 0.3s; }
.pager a:hover { background: linear-gradient(to right, rgba(67, 179, 174, 0.06), transparent 80%), var(--charcoal); color: var(--verdigris); }
.pager a.next { text-align: right; }

@media (max-width: 900px) {
  .nav-inner { padding: 12px 20px; } .nav-links { gap: 18px; }
  .project-page { padding-top: 104px; }
  .spec dl { grid-template-columns: 1fr; gap: 0; }
  .spec dt { border-bottom: 0; padding-bottom: 2px; } .spec dd { padding-top: 4px; }
  .pager { grid-template-columns: 1fr; } .pager a.next { text-align: left; }
}
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
