/* ============================================================
   kyleabent.com — Studio Paper design system
   Warm portfolio site. Fraunces display + Inter body.
   Tokens → Base → Components → Utilities → Responsive
   ============================================================ */

/* ---- 1. Design tokens ------------------------------------- */
:root {
  /* Surfaces */
  --paper:       #F5F1E8;
  --paper-2:     #EFE9DB;
  --card:        #FFFFFF;
  --ink:         #1C1A17;
  --ink-2:       #4A453E;
  --ink-3:       #7A746A;
  --rule:        #D9D2C2;

  /* Brand accents */
  --sage:        #4D6F62;
  --sage-deep:   #2F4A41;
  --copper:      #B0653C;
  --copper-soft: #E8C6A8;

  /* Semantics */
  --link:        var(--sage-deep);
  --link-hover:  var(--copper);
  --live:        #C8552E;

  /* Type */
  --font-display: 'Fraunces', 'Cambria', 'Hoefler Text', Georgia, serif;
  --font-body:    'Inter', -apple-system, 'Segoe UI', system-ui, sans-serif;
  --font-mono:    'JetBrains Mono', 'SF Mono', Consolas, monospace;

  --fs-display:   3.25rem;
  --fs-h1:        2.25rem;
  --fs-h2:        1.625rem;
  --fs-h3:        1.25rem;
  --fs-body:      1.0625rem;
  --fs-small:     0.9375rem;
  --fs-meta:      0.8125rem;

  /* Spacing */
  --sp-1: 0.25rem;
  --sp-2: 0.5rem;
  --sp-3: 0.75rem;
  --sp-4: 1rem;
  --sp-5: 1.5rem;
  --sp-6: 2rem;
  --sp-7: 3rem;
  --sp-8: 4rem;
  --sp-9: 6rem;

  /* Layout */
  --width-page:  1100px;
  --width-prose: 68ch;

  /* Radius */
  --r-sm:  4px;
  --r-md:  8px;
  --r-lg:  14px;
  --r-pill: 999px;

  /* Shadow */
  --shadow-sm: 0 1px 2px rgba(28, 26, 23, 0.04), 0 1px 3px rgba(28, 26, 23, 0.06);
  --shadow-md: 0 4px 12px rgba(28, 26, 23, 0.06), 0 2px 4px rgba(28, 26, 23, 0.04);
  --shadow-lg: 0 12px 32px rgba(28, 26, 23, 0.08), 0 4px 8px rgba(28, 26, 23, 0.04);
  --ring-focus: 0 0 0 3px rgba(176, 101, 60, 0.35);

  /* Motion */
  --ease-out:    cubic-bezier(0.22, 1, 0.36, 1);
  --ease-in-out: cubic-bezier(0.65, 0, 0.35, 1);
  --dur-fast: 140ms;
  --dur:      240ms;
  --dur-slow: 480ms;
}

/* ---- 2. Reset & base -------------------------------------- */
*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: var(--fs-body);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

img, picture, video { max-width: 100%; display: block; }

h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: -0.01em;
  color: var(--ink);
  margin: 0 0 var(--sp-4);
  font-optical-sizing: auto;
}
h1 { font-size: var(--fs-h1); }
h2 { font-size: var(--fs-h2); font-weight: 600; }
h3 { font-size: var(--fs-h3); font-weight: 600; }
h4 { font-size: var(--fs-body); font-weight: 600; text-transform: uppercase; letter-spacing: 0.08em; color: var(--ink-2); }

p { margin: 0 0 var(--sp-4); color: var(--ink-2); }

a {
  color: var(--link);
  text-decoration: none;
  background-image: linear-gradient(to bottom, var(--copper), var(--copper));
  background-size: 0% 1px;
  background-position: 0 100%;
  background-repeat: no-repeat;
  transition: color var(--dur) var(--ease-out), background-size var(--dur) var(--ease-out);
}
a:hover { color: var(--link-hover); background-size: 100% 1px; }
a:focus-visible { outline: none; box-shadow: var(--ring-focus); border-radius: 2px; }

ul, ol { padding-left: var(--sp-5); }
li { margin-bottom: var(--sp-2); color: var(--ink-2); }

hr { border: none; border-top: 1px solid var(--rule); margin: var(--sp-7) 0; }

code, pre {
  font-family: var(--font-mono);
  font-size: 0.9em;
  background: var(--paper-2);
  padding: 0.1em 0.35em;
  border-radius: var(--r-sm);
}
pre {
  padding: var(--sp-4);
  overflow-x: auto;
  line-height: 1.5;
}

::selection { background: var(--copper-soft); color: var(--ink); }

/* ---- 3. Layout primitives --------------------------------- */
.container {
  max-width: var(--width-page);
  margin: 0 auto;
  padding: 0 var(--sp-5);
}

.section {
  padding: var(--sp-9) 0;
}
.section-alt { background: var(--paper-2); }

.prose { max-width: var(--width-prose); }

/* ---- 4. Buttons ------------------------------------------- */
.btn-primary,
.btn-ghost {
  display: inline-flex;
  align-items: center;
  gap: var(--sp-2);
  padding: var(--sp-3) var(--sp-5);
  font-family: var(--font-body);
  font-size: var(--fs-small);
  font-weight: 600;
  line-height: 1;
  border-radius: var(--r-md);
  cursor: pointer;
  transition: all var(--dur) var(--ease-out);
  background-image: none;
}
.btn-primary {
  background: var(--copper);
  color: var(--paper);
  border: 1px solid var(--copper);
}
.btn-primary:hover {
  background: var(--sage-deep);
  border-color: var(--sage-deep);
  color: var(--paper);
  transform: translateY(-1px);
  box-shadow: var(--shadow-md);
}
.btn-ghost {
  background: transparent;
  color: var(--ink);
  border: 1px solid var(--ink);
}
.btn-ghost:hover {
  background: var(--ink);
  color: var(--paper);
  transform: translateY(-1px);
}

/* ---- 5. Section header pattern ---------------------------- */
.section-head {
  margin-bottom: var(--sp-7);
  max-width: var(--width-prose);
}
.section-head[data-align="center"] {
  margin-left: auto;
  margin-right: auto;
  text-align: center;
}
.section-label {
  font-family: var(--font-body);
  font-size: var(--fs-meta);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--copper);
  margin: 0 0 var(--sp-3);
}
.section-title {
  font-family: var(--font-display);
  font-size: var(--fs-h1);
  font-weight: 700;
  line-height: 1.15;
  margin: 0 0 var(--sp-3);
  color: var(--ink);
}
.section-sub {
  font-size: var(--fs-body);
  color: var(--ink-2);
  margin: 0;
}

/* ---- 6. Site nav ------------------------------------------ */
.site-nav {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(245, 241, 232, 0.85);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--rule);
  height: 64px;
  display: flex;
  align-items: center;
}
.site-nav .container {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--sp-5);
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: var(--sp-3);
  background-image: none;
  color: var(--ink);
  font-family: var(--font-display);
  font-weight: 700;
}
.brand:hover { color: var(--copper); }
.brand-mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  background: var(--ink);
  color: var(--paper);
  border-radius: var(--r-sm);
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.04em;
}
.brand-name { font-size: var(--fs-body); }

.site-nav nav {
  display: flex;
  align-items: center;
  gap: var(--sp-5);
}
.site-nav nav a {
  color: var(--ink-2);
  font-size: var(--fs-small);
  font-weight: 500;
  background-image: none;
  padding: var(--sp-2) 0;
}
.site-nav nav a:hover { color: var(--copper); }

.nav-outbound {
  display: inline-flex !important;
  align-items: center;
  gap: var(--sp-2);
  color: var(--copper) !important;
  font-weight: 600 !important;
}
.live-dot {
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--live);
  box-shadow: 0 0 0 0 rgba(200, 85, 46, 0.7);
  animation: pulse 2s infinite;
}
@keyframes pulse {
  0%   { box-shadow: 0 0 0 0 rgba(200, 85, 46, 0.5); }
  70%  { box-shadow: 0 0 0 8px rgba(200, 85, 46, 0); }
  100% { box-shadow: 0 0 0 0 rgba(200, 85, 46, 0); }
}

/* Mobile nav toggle (details/summary based) */
.nav-mobile { display: none; }

/* ---- 7. Hero ---------------------------------------------- */
.hero {
  padding: var(--sp-9) 0 var(--sp-8);
  border-bottom: 1px solid var(--rule);
}
.hero .container {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr);
  gap: var(--sp-8);
  align-items: center;
}
.hero-name {
  font-size: var(--fs-display);
  font-weight: 800;
  line-height: 1.02;
  letter-spacing: -0.02em;
  margin: 0 0 var(--sp-4);
  color: var(--ink);
}
.hero-lede {
  font-size: 1.2rem;
  line-height: 1.5;
  color: var(--ink-2);
  max-width: 50ch;
  margin: 0 0 var(--sp-6);
}
.hero-lede a { font-weight: 600; }
.hero-cta {
  display: flex;
  gap: var(--sp-3);
  flex-wrap: wrap;
  margin-bottom: var(--sp-7);
}
.hero-stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--sp-4);
  padding: 0;
  margin: 0;
  list-style: none;
  border-top: 1px solid var(--rule);
  padding-top: var(--sp-5);
}
.hero-stats li {
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.hero-stats strong {
  font-family: var(--font-display);
  font-size: var(--fs-h2);
  font-weight: 700;
  color: var(--ink);
  line-height: 1;
}
.hero-stats span {
  font-size: var(--fs-meta);
  color: var(--ink-3);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}
.hero-anchor {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  aspect-ratio: 4 / 5;
  background: var(--paper-2);
  border-radius: var(--r-lg);
  overflow: hidden;
  border: 1px solid var(--rule);
}
.hero-anchor img { width: 100%; height: 100%; object-fit: cover; }
.hero-anchor-fallback {
  padding: var(--sp-7);
  text-align: center;
  color: var(--ink-3);
}
.hero-anchor-fallback .big {
  font-family: var(--font-display);
  font-size: 5rem;
  font-weight: 800;
  color: var(--copper);
  line-height: 1;
  margin-bottom: var(--sp-3);
}

/* ---- 8. Feature band (currently building) ----------------- */
.feature-band {
  padding: var(--sp-8) 0;
  background: var(--paper-2);
  border-bottom: 1px solid var(--rule);
}
.feature-band .container {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: var(--sp-7);
  align-items: center;
}
.feature-band .feature-copy h2 {
  font-size: var(--fs-h1);
  margin-bottom: var(--sp-3);
}
.feature-band .feature-meta {
  font-family: var(--font-body);
  font-size: var(--fs-meta);
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--copper);
  margin: 0 0 var(--sp-3);
  display: inline-flex;
  align-items: center;
  gap: var(--sp-2);
}
.feature-band ul {
  list-style: none;
  padding: 0;
  margin: var(--sp-5) 0 0;
  columns: 2;
  column-gap: var(--sp-5);
}
.feature-band ul li {
  font-size: var(--fs-small);
  color: var(--ink-2);
  margin-bottom: var(--sp-2);
  break-inside: avoid;
}
.feature-band ul li::before {
  content: "▸";
  color: var(--copper);
  margin-right: var(--sp-2);
  font-size: 0.85em;
}

/* ---- 9. Timeline ------------------------------------------ */
.timeline {
  list-style: none;
  padding: 0;
  margin: 0;
  position: relative;
}
.timeline-year {
  display: flex;
  align-items: baseline;
  gap: var(--sp-4);
  margin: var(--sp-8) 0 var(--sp-5);
  padding-left: 180px;
  font-family: var(--font-display);
  font-size: var(--fs-h2);
  font-weight: 700;
  color: var(--ink-3);
  list-style: none;
}
.timeline-year:first-child { margin-top: 0; }
.timeline-year::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--rule);
}

.timeline-entry {
  display: grid;
  grid-template-columns: 160px 1fr;
  gap: var(--sp-5);
  position: relative;
  padding-bottom: var(--sp-6);
  margin: 0;
}
.timeline-entry::before {
  content: "";
  position: absolute;
  left: 159px;
  top: 24px;
  bottom: -8px;
  width: 2px;
  background: var(--rule);
}
.timeline-entry:last-child::before { display: none; }

.timeline-rail {
  position: relative;
  display: flex;
  align-items: flex-start;
  justify-content: flex-end;
  padding-top: 4px;
  padding-right: var(--sp-4);
}
.timeline-rail time {
  font-family: var(--font-body);
  font-size: var(--fs-meta);
  font-weight: 600;
  color: var(--ink-3);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  white-space: nowrap;
  text-align: right;
}
.timeline-dot {
  position: absolute;
  right: -7px;
  top: 8px;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: var(--copper);
  border: 3px solid var(--paper);
  box-shadow: 0 0 0 1px var(--rule);
  z-index: 1;
}
.timeline-dot[data-kind="release"]   { background: var(--sage); }
.timeline-dot[data-kind="post"]      { background: var(--paper); border-color: var(--copper); }
.timeline-dot[data-kind="milestone"] { background: var(--copper); }

.timeline-card {
  background: var(--card);
  border: 1px solid var(--rule);
  border-radius: var(--r-md);
  padding: var(--sp-5) var(--sp-6);
  box-shadow: var(--shadow-sm);
  transition: all var(--dur) var(--ease-out);
}
.timeline-card:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-1px);
  border-color: var(--copper-soft);
}
.timeline-card-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: var(--sp-3);
  margin-bottom: var(--sp-3);
  flex-wrap: wrap;
}
.timeline-card-head h3 {
  margin: 0;
  font-size: var(--fs-h3);
  font-weight: 600;
}
.timeline-card p {
  margin: 0 0 var(--sp-3);
  color: var(--ink-2);
  font-size: var(--fs-small);
  line-height: 1.55;
}
.timeline-card p:last-child { margin-bottom: 0; }
.timeline-card .wish {
  margin-top: var(--sp-3);
  padding-top: var(--sp-3);
  border-top: 1px dashed var(--rule);
  font-style: italic;
  color: var(--ink-3);
  font-size: var(--fs-small);
}
.timeline-links {
  display: flex;
  flex-wrap: wrap;
  gap: var(--sp-4);
  margin-top: var(--sp-3);
  font-size: var(--fs-small);
}

.tag {
  display: inline-block;
  padding: 2px 10px;
  font-family: var(--font-body);
  font-size: var(--fs-meta);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  border-radius: var(--r-pill);
  background: var(--paper-2);
  color: var(--ink-2);
  border: 1px solid var(--rule);
  white-space: nowrap;
}

/* Timeline legend — explains milestone cards vs month strips */
.timeline-legend {
  margin: 0 0 var(--sp-7) 0;
  padding: var(--sp-5) var(--sp-6);
  background: var(--paper-2);
  border: 1px solid var(--rule);
  border-radius: var(--r-md);
}
.timeline-legend-title {
  font-family: var(--font-body);
  font-size: var(--fs-meta);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--copper);
  margin: 0 0 var(--sp-4);
}
.timeline-legend-items {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: var(--sp-3) var(--sp-5);
  margin: 0;
  font-size: var(--fs-small);
  color: var(--ink-2);
  align-items: center;
}
.timeline-legend-items dt {
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 64px;
}
.timeline-legend-items dd {
  margin: 0;
  line-height: 1.5;
}
.legend-card-sample {
  display: inline-block;
  width: 40px; height: 20px;
  background: var(--card);
  border: 1px solid var(--rule);
  border-radius: var(--r-sm);
  box-shadow: var(--shadow-sm);
}
.legend-strip-sample {
  display: inline-grid;
  grid-template-columns: repeat(7, 8px);
  gap: 2px;
}
.legend-strip-sample .d {
  height: 10px;
  border-radius: 2px;
  background: var(--paper-2);
  border: 1px solid var(--rule);
}
.legend-strip-sample .d.on {
  background: var(--copper);
  border-color: var(--copper);
}
.legend-swatch {
  display: inline-block;
  width: 10px; height: 10px;
  border-radius: 2px;
  vertical-align: -1px;
  margin: 0 2px 0 4px;
}
.legend-swatch.on { background: var(--copper); border: 1px solid var(--copper); }
.legend-swatch.off { background: var(--paper-2); border: 1px solid var(--rule); }
.legend-streak {
  color: var(--sage-deep);
  font-style: normal;
  font-weight: 600;
  background: rgba(77, 111, 98, 0.12);
  padding: 1px 8px;
  border-radius: var(--r-pill);
  font-size: 0.9em;
}
@media (max-width: 600px) {
  .timeline-legend { padding: var(--sp-4); }
  .timeline-legend-items { grid-template-columns: 1fr; gap: var(--sp-2); }
  .timeline-legend-items dt { justify-content: flex-start; min-width: 0; }
}

/* Month activity strips — aggregate per-month dev activity, bullet-journal style */
.month-strip {
  display: grid;
  grid-template-columns: 160px minmax(0, 1fr) 80px auto;
  gap: var(--sp-4);
  align-items: center;
  padding: var(--sp-3) 0 var(--sp-3) 0;
  padding-left: 180px; /* align with timeline rail */
  margin: 0;
  border-bottom: 1px dotted var(--rule);
  list-style: none;
}
.month-strip:last-child { border-bottom: none; }

.month-strip-label {
  font-family: var(--font-display);
  font-size: var(--fs-small);
  font-weight: 500;
  color: var(--ink-2);
  text-align: left;
  margin: 0;
}
.month-strip-days {
  display: grid;
  grid-template-columns: repeat(31, minmax(0, 1fr));
  gap: 2px;
  padding: 0;
  margin: 0;
  list-style: none;
}
.month-strip-days .day {
  height: 12px;
  border-radius: 2px;
  background: var(--paper-2);
  border: 1px solid var(--rule);
  transition: background var(--dur) var(--ease-out), transform var(--dur-fast) var(--ease-out);
  position: relative;
  cursor: default;
}
.month-strip-days .day.on {
  background: var(--copper);
  border-color: var(--copper);
}
.month-strip-days .day:hover {
  transform: scale(1.4);
  z-index: 5;
}
.month-strip-days .day.on:hover {
  outline: 2px solid var(--sage-deep);
  outline-offset: 1px;
}
/* Custom tooltip — pure CSS, instant, Studio Paper styled */
.month-strip-days .day::after {
  content: attr(data-date);
  position: absolute;
  bottom: calc(100% + 8px);
  left: 50%;
  transform: translateX(-50%) translateY(4px);
  background: var(--ink);
  color: var(--paper);
  padding: 5px 10px;
  border-radius: var(--r-sm);
  font-family: var(--font-body);
  font-size: var(--fs-meta);
  font-weight: 500;
  letter-spacing: 0.02em;
  text-transform: none;
  white-space: nowrap;
  pointer-events: none;
  opacity: 0;
  transition: opacity var(--dur-fast) var(--ease-out),
              transform var(--dur-fast) var(--ease-out);
  z-index: 20;
  box-shadow: var(--shadow-md);
}
.month-strip-days .day::before {
  content: "";
  position: absolute;
  bottom: calc(100% + 2px);
  left: 50%;
  transform: translateX(-50%);
  border: 6px solid transparent;
  border-top-color: var(--ink);
  opacity: 0;
  transition: opacity var(--dur-fast) var(--ease-out);
  z-index: 20;
  pointer-events: none;
}
.month-strip-days .day:hover::after,
.month-strip-days .day:hover::before {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}
.month-strip-days .day:hover::before { transform: translateX(-50%); }
.month-strip-count {
  font-family: var(--font-mono, 'JetBrains Mono', Consolas, monospace);
  font-size: var(--fs-meta);
  color: var(--ink-3);
  letter-spacing: 0.04em;
  text-align: right;
  white-space: nowrap;
}
.month-strip-streak {
  font-family: var(--font-body);
  font-size: var(--fs-meta);
  color: var(--sage-deep);
  font-weight: 600;
  background: rgba(77, 111, 98, 0.12);
  padding: 2px 10px;
  border-radius: var(--r-pill);
  white-space: nowrap;
}
@media (max-width: 900px) {
  .month-strip {
    padding-left: var(--sp-4);
    grid-template-columns: 100px minmax(0, 1fr) 60px;
    gap: var(--sp-3);
  }
  .month-strip-streak { grid-column: 2 / 4; justify-self: start; font-size: 11px; }
}
@media (max-width: 600px) {
  .month-strip {
    grid-template-columns: 1fr;
    gap: var(--sp-2);
    padding: var(--sp-3) 0;
  }
  .month-strip-label, .month-strip-count { text-align: left; }
  .month-strip-days .day { height: 8px; }
}
.tag-software { background: var(--copper-soft); color: #6B3817; border-color: transparent; }
.tag-music    { background: #E6DCC8; color: #5A4A2A; border-color: transparent; }
.tag-games    { background: #D8E3DB; color: var(--sage-deep); border-color: transparent; }
.tag-writing  { background: var(--paper-2); color: var(--ink-2); }

.timeline-note {
  padding: var(--sp-5) var(--sp-6);
  border-left: 3px solid var(--copper);
  background: var(--paper-2);
  border-radius: 0 var(--r-md) var(--r-md) 0;
  margin: var(--sp-6) 0 var(--sp-6) 180px;
  font-style: italic;
  color: var(--ink-2);
}

/* ---- 10. Project cards ------------------------------------ */
.project-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: var(--sp-5);
  list-style: none;
  padding: 0;
  margin: 0;
}
.project-grid li { margin: 0; }
.project-card {
  display: block;
  background: var(--card);
  border: 1px solid var(--rule);
  border-radius: var(--r-md);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: all var(--dur) var(--ease-out);
  background-image: none;
  color: var(--ink);
}
.project-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
  border-color: var(--copper-soft);
}
.project-thumb {
  aspect-ratio: 16 / 10;
  background-size: cover;
  background-position: center;
  background-color: var(--paper-2);
  position: relative;
}
.project-thumb.no-image {
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-display);
  font-size: 2.75rem;
  font-weight: 800;
  color: var(--copper);
  background: linear-gradient(135deg, var(--paper-2), var(--copper-soft));
}
.project-body {
  padding: var(--sp-5);
}
.project-kicker {
  font-family: var(--font-body);
  font-size: var(--fs-meta);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--copper);
  margin: 0 0 var(--sp-2);
}
.project-title {
  font-family: var(--font-display);
  font-size: var(--fs-h3);
  font-weight: 600;
  margin: 0 0 var(--sp-2);
  color: var(--ink);
}
.project-meta {
  font-size: var(--fs-small);
  color: var(--ink-3);
  margin: 0;
}

/* ---- 11. Explore grid (home) ------------------------------ */
.explore-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--sp-5);
}
.explore-card {
  position: relative;
  padding: var(--sp-7) var(--sp-6) var(--sp-6);
  background: var(--card);
  border: 1px solid var(--rule);
  border-radius: var(--r-lg);
  transition: all var(--dur) var(--ease-out);
  background-image: none;
  color: var(--ink);
  display: block;
  min-height: 240px;
}
.explore-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-lg);
  border-color: var(--copper-soft);
}
.explore-card .kicker {
  font-family: var(--font-body);
  font-size: var(--fs-meta);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--copper);
  margin: 0 0 var(--sp-3);
}
.explore-card h3 {
  font-size: var(--fs-h2);
  margin: 0 0 var(--sp-3);
}
.explore-card p {
  font-size: var(--fs-small);
  color: var(--ink-2);
  margin: 0 0 var(--sp-4);
}
.explore-card .arrow {
  font-family: var(--font-display);
  font-size: 1.5rem;
  color: var(--copper);
}

/* ---- 12. Footer ------------------------------------------- */
.site-footer {
  margin-top: var(--sp-9);
  padding: var(--sp-8) 0 var(--sp-6);
  background: var(--ink);
  color: rgba(245, 241, 232, 0.7);
}
.site-footer a { color: rgba(245, 241, 232, 0.85); background-image: none; }
.site-footer a:hover { color: var(--copper-soft); }
.footer-grid {
  display: grid;
  grid-template-columns: 1.2fr 1fr 1fr 1.3fr;
  gap: var(--sp-6);
  margin-bottom: var(--sp-7);
}
.footer-brand .brand-name {
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--paper);
  margin: 0 0 var(--sp-2);
}
.footer-note {
  font-size: var(--fs-small);
  color: rgba(245, 241, 232, 0.5);
  margin: 0;
}
.footer-nav h4 {
  font-family: var(--font-body);
  font-size: var(--fs-meta);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: rgba(245, 241, 232, 0.5);
  margin: 0 0 var(--sp-4);
}
.footer-nav a {
  display: block;
  font-size: var(--fs-small);
  padding: var(--sp-1) 0;
}
.footer-cta h4 {
  font-family: var(--font-body);
  font-size: var(--fs-meta);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: rgba(245, 241, 232, 0.5);
  margin: 0 0 var(--sp-4);
}
.footer-live {
  display: inline-flex;
  align-items: center;
  gap: var(--sp-3);
  padding: var(--sp-3) var(--sp-4);
  background: rgba(176, 101, 60, 0.15);
  border: 1px solid rgba(176, 101, 60, 0.4);
  border-radius: var(--r-md);
  color: var(--copper-soft) !important;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: var(--fs-body);
  transition: all var(--dur) var(--ease-out);
  background-image: none;
}
.footer-live:hover {
  background: rgba(176, 101, 60, 0.25);
  transform: translateY(-1px);
  color: var(--paper) !important;
}
.footer-live .live-badge {
  display: inline-flex;
  align-items: center;
  gap: var(--sp-2);
  font-family: var(--font-body);
  font-size: var(--fs-meta);
  font-weight: 500;
  color: rgba(245, 241, 232, 0.7);
}
.footer-base {
  padding-top: var(--sp-5);
  border-top: 1px solid rgba(245, 241, 232, 0.08);
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: var(--sp-3);
  font-size: var(--fs-meta);
  color: rgba(245, 241, 232, 0.4);
}

/* ---- 13. Anchor subnav (within-page tabs) ----------------- */
.anchor-nav {
  position: sticky;
  top: 64px;
  z-index: 40;
  background: rgba(245, 241, 232, 0.92);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--rule);
  padding: var(--sp-3) 0;
  margin-bottom: var(--sp-7);
}
.anchor-nav .container {
  display: flex;
  gap: var(--sp-5);
  flex-wrap: wrap;
  font-size: var(--fs-small);
}
.anchor-nav a {
  color: var(--ink-2);
  background-image: none;
  font-weight: 500;
  padding: var(--sp-1) 0;
}
.anchor-nav a:hover { color: var(--copper); }

/* ---- 14. Archive banner ----------------------------------- */
.archive-banner {
  background: var(--paper-2);
  border-left: 3px solid var(--copper);
  padding: var(--sp-4) var(--sp-5);
  font-size: var(--fs-small);
  color: var(--ink-2);
  font-style: italic;
  border-radius: 0 var(--r-sm) var(--r-sm) 0;
  margin-bottom: var(--sp-6);
}
.archive-banner strong { font-style: normal; color: var(--ink); }

/* ---- 15. Details collapse (for archive lists) ------------- */
details.collapse {
  background: var(--paper-2);
  border: 1px solid var(--rule);
  border-radius: var(--r-md);
  padding: var(--sp-4) var(--sp-5);
  margin: var(--sp-5) 0;
}
details.collapse summary {
  cursor: pointer;
  font-family: var(--font-body);
  font-size: var(--fs-small);
  font-weight: 600;
  color: var(--ink-2);
  list-style: none;
  display: flex;
  align-items: center;
  gap: var(--sp-2);
}
details.collapse summary::-webkit-details-marker { display: none; }
details.collapse summary::before {
  content: "▸";
  color: var(--copper);
  transition: transform var(--dur) var(--ease-out);
  display: inline-block;
}
details.collapse[open] summary::before { transform: rotate(90deg); }
details.collapse ul {
  margin: var(--sp-4) 0 0;
  padding-left: var(--sp-4);
  columns: 2;
  column-gap: var(--sp-5);
}
details.collapse li {
  font-size: var(--fs-small);
  color: var(--ink-3);
  break-inside: avoid;
  margin-bottom: var(--sp-2);
}

/* ---- 16. Utilities ---------------------------------------- */
.sr-only {
  position: absolute;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}
.visually-hidden { @extend .sr-only; }
.text-center { text-align: center; }
.stack > * + * { margin-top: var(--sp-4); }

/* ---- 17. Reveal on scroll (pure CSS, progressive) -------- */
@supports (animation-timeline: view()) {
  .reveal {
    animation: fadeUp linear both;
    animation-timeline: view();
    animation-range: entry 0% entry 40%;
  }
}
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(12px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ---- 18. Responsive --------------------------------------- */
@media (max-width: 900px) {
  :root {
    --fs-display: 2.5rem;
    --fs-h1:      1.875rem;
    --fs-h2:      1.4rem;
  }
  .hero .container,
  .feature-band .container {
    grid-template-columns: 1fr;
    gap: var(--sp-6);
  }
  .hero-anchor { aspect-ratio: 16 / 10; order: -1; }
  .hero-stats { grid-template-columns: repeat(2, 1fr); gap: var(--sp-5) var(--sp-4); }
  .explore-grid { grid-template-columns: 1fr; }
  .footer-grid {
    grid-template-columns: 1fr 1fr;
    gap: var(--sp-5);
  }
  .feature-band ul { columns: 1; }
  .section { padding: var(--sp-8) 0; }
}

@media (max-width: 600px) {
  :root {
    --fs-display: 2.25rem;
    --fs-h1:      1.625rem;
  }
  .site-nav { height: 56px; }
  .site-nav nav { display: none; }
  .site-nav nav.open { display: flex; position: absolute; top: 56px; left: 0; right: 0; background: var(--paper); flex-direction: column; padding: var(--sp-5); border-bottom: 1px solid var(--rule); box-shadow: var(--shadow-md); }
  .nav-mobile {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px; height: 40px;
    background: transparent; border: 1px solid var(--rule);
    border-radius: var(--r-sm);
    font-size: 20px;
    cursor: pointer;
    color: var(--ink);
  }
  .container { padding: 0 var(--sp-4); }
  .timeline-entry {
    grid-template-columns: 1fr;
    gap: var(--sp-3);
  }
  .timeline-entry::before, .timeline-dot { display: none; }
  .timeline-year { padding-left: 0; }
  .timeline-note { margin-left: 0; }
  .timeline-rail { padding-top: 0; }
  .timeline-rail time {
    display: inline-block;
    background: var(--paper-2);
    padding: 2px 10px;
    border-radius: var(--r-pill);
    font-size: var(--fs-meta);
  }
  .hero-stats { grid-template-columns: 1fr 1fr; }
  .footer-grid { grid-template-columns: 1fr; }
  details.collapse ul { columns: 1; }
}

/* ---- 18a. Legacy table compat (siege.html changelogs) ---- */
table.changeWishNS2, table.changeWish {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  margin: var(--sp-5) 0;
  background: var(--card);
  border: 1px solid var(--rule);
  border-radius: var(--r-md);
  overflow: hidden;
  font-size: var(--fs-small);
}
table.changeWishNS2 td, table.changeWish td {
  padding: var(--sp-4) var(--sp-5);
  border-bottom: 1px solid var(--rule);
  vertical-align: top;
  color: var(--ink-2);
}
table.changeWishNS2 tr:last-child td,
table.changeWish tr:last-child td { border-bottom: none; }
td.r0title {
  font-family: var(--font-body);
  font-size: var(--fs-meta);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--copper);
  white-space: nowrap;
  width: 140px;
  background: var(--paper-2);
}
td.r0 { color: var(--ink-2); }
td.r1 {
  color: var(--ink-3);
  font-style: italic;
  font-size: var(--fs-meta);
  background: var(--paper-2);
  border-left: 1px dashed var(--rule);
}
table.changeWishNS2 ul, table.changeWish ul { padding-left: var(--sp-5); margin: 0; }
table.changeWishNS2 li, table.changeWish li { margin-bottom: var(--sp-2); }
table.changeWishNS2 h2, table.changeWish h2 {
  font-size: var(--fs-small);
  font-family: var(--font-body);
  font-weight: 600;
  margin: 0 0 var(--sp-3);
  color: var(--ink);
}
.centerMe { max-width: var(--width-page); margin: 0 auto; padding: 0 var(--sp-5); }
.scroll { max-width: var(--width-page); margin: 0 auto var(--sp-6); padding: 0 var(--sp-5); }
.scroll table { display: table; }
table.changeWishNS2 a, table.changeWish a { font-weight: 500; }

/* Hide the decorative cleff/jimi images that don't belong in the new design */
.backroundCleffOne, .backroundCleffTwo,
img.backroundCleffOne, img.backroundCleffTwo,
.jimiOne, .jimiTwo { display: none !important; }

/* Legacy r0/r1 usage on <tr> and backup classes */
tr.r0 td, tr.r1 td { padding: var(--sp-4) var(--sp-5); }

@media (max-width: 600px) {
  table.changeWishNS2, table.changeWish { display: block; overflow-x: auto; }
  td.r0title { width: auto; }
}

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

/* ---- 20. Print -------------------------------------------- */
@media print {
  .site-nav, .site-footer, .anchor-nav { display: none; }
  body { background: white; color: black; }
  .container { max-width: 100%; padding: 0; }
}
