:root {
  --paper: #FBFAF6;
  --paper-deep: #F4F1E8;
  --ink: #1B1814;
  --ink-soft: #5C554A;
  --line: #E5DFD2;
  --accent: #9A3B26;
  --accent-deep: #7E2F1E;
  --ink-faint: #746A5D;
  --green: #1E7A3C;
  --amber: #9A6206;
  --radius: 14px;
  --font-display: "Fraunces", Georgia, serif;
  --font-body: "Inter", -apple-system, "Segoe UI", sans-serif;
  --font-mono: ui-monospace, "SF Mono", Menlo, monospace;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; display: block; }
a { color: inherit; }

/* ---------- nav ---------- */
.nav {
  position: sticky; top: 0; z-index: 50;
  background: rgba(251, 250, 246, 0.88);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
}
.nav-inner {
  max-width: 1120px; margin: 0 auto; padding: 14px 24px;
  display: flex; align-items: center; gap: 28px;
}
.wordmark {
  font-family: var(--font-display); font-weight: 600; font-size: 20px;
  text-decoration: none; letter-spacing: -0.01em;
}
.nav-links { display: flex; gap: 22px; margin-left: auto; }
.nav-links a {
  text-decoration: none; font-size: 14.5px; font-weight: 500; color: var(--ink-soft);
}
.nav-links a:hover { color: var(--ink); }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 9px;
  background: var(--ink); color: var(--paper);
  padding: 13px 24px; border-radius: 999px;
  font-weight: 600; font-size: 15px; text-decoration: none;
  transition: transform .15s ease, background .15s ease;
  border: 1px solid var(--ink);
}
.btn:hover { background: var(--accent-deep); border-color: var(--accent-deep); transform: translateY(-1px); }
.btn-ghost { background: transparent; color: var(--ink); }
.btn-ghost:hover { background: var(--ink); color: var(--paper); }
.btn-light { background: var(--paper); color: var(--ink); border-color: var(--paper); }
.btn-light:hover { background: transparent; color: var(--paper); border-color: var(--paper); }
.btn-small { padding: 9px 18px; font-size: 14px; }

/* ---------- hero ---------- */
.hero {
  max-width: 1120px; margin: 0 auto; padding: 96px 24px 72px;
}
.eyebrow {
  font-family: var(--font-mono); font-size: 12.5px; letter-spacing: 0.14em;
  text-transform: uppercase; color: var(--accent); margin-bottom: 22px;
}
.eyebrow-light { color: #E8B48F; }
.hero h1 {
  font-family: var(--font-display); font-weight: 500;
  font-size: clamp(44px, 7vw, 84px); line-height: 1.04; letter-spacing: -0.02em;
  margin-bottom: 26px;
}
.lede { font-size: 20px; color: var(--ink-soft); max-width: 640px; margin-bottom: 36px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.hero-quote { margin: 0 0 26px; max-width: 900px; }
.hero-quote p {
  font-family: var(--font-display); font-weight: 500;
  font-size: clamp(34px, 5.4vw, 64px); line-height: 1.12; letter-spacing: -0.02em;
}
.hero-quote cite { display: block; margin-top: 16px; font-style: normal; font-size: 15px; color: var(--ink-soft); }
.hero-cta { display: flex; gap: 14px; flex-wrap: wrap; margin-bottom: 64px; }
.hero-stats { display: flex; gap: 48px; border-top: 1px solid var(--line); padding-top: 28px; }
.hero-stats a { display: block; text-decoration: none; border-radius: 6px; padding: 10px 14px; margin: -10px -14px; }
.hero-stats a:hover strong, .hero-stats a:focus-visible strong { color: var(--accent); }
.hero-stats a:focus-visible { outline: 2px solid var(--accent); outline-offset: 4px; }
.section { scroll-margin-top: 84px; }
.hero-stats div { display: flex; flex-direction: column; }
.hero-stats strong { font-family: var(--font-display); font-size: 38px; font-weight: 600; line-height: 1; }
.hero-stats span { font-size: 13.5px; color: var(--ink-soft); margin-top: 6px; }

/* ---------- now strip ---------- */
/* ---------- sections ---------- */
.section { max-width: 1120px; margin: 0 auto; padding: 88px 24px 24px; }
.section-tight { padding-bottom: 8px; }
.section-title {
  font-family: var(--font-display); font-weight: 500;
  font-size: clamp(34px, 4.5vw, 52px); letter-spacing: -0.015em;
  margin-bottom: 48px;
}

/* ---------- collapsible sections ---------- */
.section-collapse > summary {
  list-style: none; display: flex; align-items: center;
  justify-content: space-between; gap: 16px;
  cursor: pointer; padding: 12px 0;
}
.section-collapse > summary::-webkit-details-marker { display: none; }
.section-collapse > summary:focus-visible { outline: 2px solid var(--accent); outline-offset: 4px; border-radius: 6px; }
.section-collapse .eyebrow { display: block; margin-bottom: 12px; }
.section-collapse .section-title { margin-bottom: 0; }
.section-collapse[open] > summary .shelf-chevron { transform: rotate(225deg); }
.section-collapse-body { padding-bottom: 12px; }

/* ---------- projects ---------- */
.project {
  display: grid; grid-template-columns: 1.05fr 1fr; gap: 56px;
  align-items: center; padding: 40px 0; border-top: 1px solid var(--line);
}
.project:first-of-type { border-top: none; padding-top: 8px; }
.project-flip .project-media { order: 2; }
.project-flip .project-body { order: 1; }
.project-media img, .mock {
  border-radius: var(--radius); border: 1px solid var(--line);
  box-shadow: 0 24px 60px -28px rgba(27, 24, 20, 0.35);
}
.project-head { display: flex; align-items: center; gap: 14px; margin-bottom: 16px; }
.project-head h3 { font-family: var(--font-display); font-size: 32px; font-weight: 600; letter-spacing: -0.01em; }
.pill {
  font-family: var(--font-mono); font-size: 11.5px; letter-spacing: 0.1em; text-transform: uppercase;
  padding: 5px 12px; border-radius: 999px; font-weight: 600; white-space: nowrap;
}
.pill-live { background: #E2F2E7; color: var(--green); }
.pill-building { background: #FaEFD6; color: var(--amber); }
.pill-paused { background: #E5E1D8; color: #6B655C; }
.pill-oss { background: #E7E2D4; color: var(--ink-soft); }
.project-body p { color: var(--ink-soft); margin-bottom: 20px; }
.tags { list-style: none; display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 22px; }
.tags li {
  font-family: var(--font-mono); font-size: 12.5px; color: var(--ink-soft);
  border: 1px solid var(--line); border-radius: 999px; padding: 4px 12px;
  background: #fff;
}
.project-note { font-size: 14px; font-style: italic; }
.text-link {
  font-weight: 600; font-size: 15.5px; color: var(--accent); text-decoration: none;
  border-bottom: 2px solid transparent;
}
.text-link:hover { border-bottom-color: var(--accent); }
.project-links { display: flex; gap: 24px; flex-wrap: wrap; margin: 0; }

/* ---------- project screenshots ---------- */
.mock.shot { display: block; width: 100%; height: auto; }

/* ---------- build log ---------- */
.log { list-style: none; border-top: 1px solid var(--line); }
.log li {
  display: grid; grid-template-columns: 150px 1fr; gap: 24px;
  padding: 22px 0; border-bottom: 1px solid var(--line);
}
.log time {
  font-family: var(--font-mono); font-size: 12.5px; letter-spacing: 0.06em;
  color: var(--accent); text-transform: uppercase; padding-top: 4px; white-space: nowrap;
}
.log p { color: var(--ink-soft); }
.log strong { color: var(--ink); }

/* ---------- principles ---------- */
.principles { display: grid; grid-template-columns: repeat(3, 1fr); gap: 32px; }
.principle { border-top: 2px solid var(--ink); padding-top: 20px; }
.principle-num { font-family: var(--font-mono); font-size: 13px; color: var(--accent); margin-bottom: 12px; }
.principle h3 { font-family: var(--font-display); font-size: 22px; font-weight: 600; margin-bottom: 10px; letter-spacing: -0.01em; }
.principle p { color: var(--ink-soft); font-size: 15.5px; }

/* ---------- collaborate ---------- */
.collab { background: var(--accent); color: var(--paper); margin-top: 88px; }
.collab-inner { max-width: 1120px; margin: 0 auto; padding: 76px 24px; }
.collab h2 {
  font-family: var(--font-display); font-weight: 500; letter-spacing: -0.015em;
  font-size: clamp(32px, 4.5vw, 54px); margin-bottom: 18px; max-width: 640px; line-height: 1.1;
}
.collab p { color: #F3D9C8; font-size: 18px; max-width: 600px; margin-bottom: 32px; }
.collab .btn-ghost { color: var(--paper); border-color: rgba(247, 242, 234, .45); }
.collab .btn-ghost:hover { background: var(--paper); color: var(--ink); border-color: var(--paper); }

/* ---------- contact ---------- */
.shelf-label { font-size: 12px; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; color: var(--ink-faint); margin: 22px 0 6px; }
.shelf-label + p { margin-top: 0; }

/* ---------- on the shelf (collapsed rows) ---------- */
.shelf-item { border-top: 1px solid var(--line); }
.shelf-item:last-of-type { border-bottom: 1px solid var(--line); }
.shelf-item summary { list-style: none; cursor: pointer; display: flex; align-items: center; gap: 14px; padding: 20px 0; }
.shelf-item summary::-webkit-details-marker { display: none; }
.shelf-item summary:focus-visible { outline: 2px solid var(--accent); outline-offset: 4px; border-radius: 6px; }
.shelf-item summary .pill { white-space: normal; }
.shelf-body .shelf-item:last-of-type { border-bottom: none; }
.shelf-summary-title { font-family: var(--font-display); font-size: 24px; font-weight: 600; letter-spacing: -0.01em; }
.shelf-chevron { margin-left: auto; flex: none; width: 10px; height: 10px; border-right: 2px solid var(--ink-soft); border-bottom: 2px solid var(--ink-soft); transform: rotate(45deg); transition: transform .2s ease; }
.shelf-item[open] .shelf-chevron { transform: rotate(225deg); }
.shelf-body { padding: 4px 0 28px; max-width: 640px; }
.shelf-body p { color: var(--ink-soft); margin-bottom: 20px; }
.shelf-body .mock.shot { margin: 4px 0 22px; }

/* ---------- toys ---------- */
.toys { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; }
.toy { border: 1px solid var(--line); border-radius: var(--radius); padding: 28px; background: #fff; }
.toy img { display: block; width: 100%; height: 300px; object-fit: cover; object-position: top; border-radius: 10px; border: 1px solid var(--line); margin-bottom: 20px; }
.toy h3 { font-family: var(--font-display); font-size: 24px; font-weight: 600; letter-spacing: -0.01em; margin-bottom: 10px; }
.toy p { color: var(--ink-soft); font-size: 16px; margin-bottom: 18px; }
.principle-ex { color: var(--ink-soft); }
.contact-links { display: flex; gap: 14px; flex-wrap: wrap; margin-bottom: 22px; }
.contact-fine { font-size: 14px; color: var(--ink-soft); font-style: italic; }

/* ---------- footer ---------- */
.footer {
  border-top: 1px solid var(--line); margin-top: 72px;
  padding: 28px 24px; text-align: center;
}
.footer p { font-family: var(--font-mono); font-size: 12.5px; color: var(--ink-soft); }

/* ---------- reveal ---------- */
.reveal { opacity: 0; transform: translateY(18px); transition: opacity .6s ease, transform .6s ease; }
.reveal.visible { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
  html { scroll-behavior: auto; }
}

/* ---------- responsive ---------- */
@media (max-width: 860px) {
  .nav-links { display: none; }
  .project, .project-flip .project-media, .project-flip .project-body { order: initial; }
  .project { grid-template-columns: 1fr; gap: 28px; }
  .principles { grid-template-columns: 1fr; }
  .toys { grid-template-columns: 1fr; }
  .log li { grid-template-columns: 1fr; gap: 6px; }
  .hero { padding: 64px 24px 52px; }
  .hero-stats { gap: 32px; }
  .section { padding-top: 64px; }
}
