/* ============================================================================
   style.css — Nibhrit Mohanty, PM portfolio
   Mobile-first. Breakpoints: 640px, 900px.

   Design tokens:
     paper white / near-black ink / one racing-green accent
     serif display · system sans body · mono for the "engineer voice"
   ========================================================================== */

/* ---------- Tokens --------------------------------------------------------- */

:root {
  --bg: #fcfcfa;
  --surface: #ffffff;
  --ink: #171f1a;
  --muted: #57635c;
  --accent: #0c5c3d;        /* racing green */
  --accent-soft: #e7f0eb;   /* tint for badges / hovers */
  --line: #e3e6e2;
  --shadow: 0 1px 2px rgba(23, 31, 26, 0.05), 0 8px 24px rgba(23, 31, 26, 0.06);

  --font-display: "Iowan Old Style", "Palatino Linotype", "Book Antiqua",
    Palatino, Georgia, serif;
  --font-body: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
    "Helvetica Neue", Arial, sans-serif;
  --font-mono: ui-monospace, "SF Mono", SFMono-Regular, Menlo, Consolas,
    "Liberation Mono", monospace;

  --measure: 62ch;
  --container: 68rem;
  --space: clamp(4rem, 10vw, 7.5rem); /* vertical rhythm between sections */

  color-scheme: light;
}

:root[data-theme="dark"] {
  --bg: #101512;
  --surface: #161d18;
  --ink: #e9ede9;
  --muted: #97a29b;
  --accent: #4cc38a;
  --accent-soft: #1b2b22;
  --line: #242c26;
  --shadow: 0 1px 2px rgba(0, 0, 0, 0.4), 0 8px 24px rgba(0, 0, 0, 0.35);

  color-scheme: dark;
}

/* ---------- Reset / base ---------------------------------------------------- */

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 5rem; /* keep anchored sections clear of sticky header */
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: clamp(1rem, 0.95rem + 0.25vw, 1.125rem);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  overflow-wrap: break-word;
}

img,
svg,
video {
  max-width: 100%;
  height: auto;
}

h1,
h2,
h3 {
  font-family: var(--font-display);
  font-weight: 600;
  line-height: 1.15;
  margin: 0 0 0.75em;
  letter-spacing: -0.01em;
  text-wrap: balance;
}

h1 {
  font-size: clamp(2.1rem, 1.2rem + 4.5vw, 3.6rem);
}

h2 {
  font-size: clamp(1.6rem, 1.2rem + 2vw, 2.3rem);
}

h3 {
  font-size: clamp(1.15rem, 1.05rem + 0.5vw, 1.35rem);
}

p {
  margin: 0 0 1em;
  max-width: var(--measure);
}

a {
  color: var(--accent);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.2em;
}

a:hover {
  text-decoration-thickness: 2px;
}

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 2px;
}

::selection {
  background: var(--accent);
  color: var(--bg);
}

/* ---------- Utilities -------------------------------------------------------- */

.container {
  width: 100%;
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: clamp(1.25rem, 5vw, 3rem);
}

.skip-link {
  position: absolute;
  left: 1rem;
  top: -4rem;
  z-index: 100;
  background: var(--accent);
  color: #fff;
  padding: 0.75rem 1.25rem;
  border-radius: 0 0 8px 8px;
  text-decoration: none;
  transition: top 0.2s ease;
}

.skip-link:focus-visible {
  top: 0;
}

.eyebrow,
.card-eyebrow {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  letter-spacing: 0.02em;
  color: var(--muted);
  margin: 0 0 1rem;
}

.eyebrow::before {
  content: "/";
  color: var(--accent);
  margin-right: 0.15em;
}

/* ---------- Scroll reveal ----------------------------------------------------- */

.reveal {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 0.7s cubic-bezier(0.22, 1, 0.36, 1),
    transform 0.7s cubic-bezier(0.22, 1, 0.36, 1);
}

.reveal.is-visible {
  opacity: 1;
  transform: none;
}

/* Sequenced entrance, Apple-style: siblings cascade instead of arriving at once */
.hero .eyebrow.reveal {
  transition-delay: 0s;
}
.hero h1.reveal {
  transition-delay: 0.08s;
}
.hero .lede.reveal {
  transition-delay: 0.16s;
}
.hero .diff.reveal {
  transition-delay: 0.24s;
}
.hero .hero-actions.reveal {
  transition-delay: 0.32s;
}

.card-grid .card:nth-child(1) {
  transition-delay: 0s;
}
.card-grid .card:nth-child(2) {
  transition-delay: 0.08s;
}
.card-grid .card:nth-child(3) {
  transition-delay: 0.16s;
}
.card-grid .card:nth-child(4) {
  transition-delay: 0.24s;
}

.timeline-item:nth-child(1) {
  transition-delay: 0s;
}
.timeline-item:nth-child(2) {
  transition-delay: 0.06s;
}
.timeline-item:nth-child(3) {
  transition-delay: 0.12s;
}
.timeline-item:nth-child(4) {
  transition-delay: 0.18s;
}
.timeline-item:nth-child(5) {
  transition-delay: 0.24s;
}

/* Without JS (or with reduced motion) everything stays visible / static. */
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  .reveal {
    opacity: 1;
    transform: none;
    transition: none;
    transition-delay: 0s !important;
  }
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
}

/* ---------- Header / nav -------------------------------------------------------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  min-height: 4rem;
}

.brand {
  font-family: var(--font-mono);
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--ink);
  text-decoration: none;
  padding: 0.6rem 0;
}

.brand .tld {
  color: var(--accent);
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 0.25rem;
}

.site-nav ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
}

.site-nav a {
  display: block;
  font-family: var(--font-mono);
  font-size: 0.85rem;
  color: var(--ink);
  text-decoration: none;
  padding: 0.85rem 1rem; /* ≥44px touch target on mobile */
  border-radius: 8px;
}

.site-nav a:hover {
  color: var(--accent);
  background: var(--accent-soft);
}

/* Mobile: nav is a dropdown panel under the header */
.site-nav {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  background: var(--bg);
  border-bottom: 1px solid var(--line);
  padding: 0.5rem clamp(1.25rem, 5vw, 3rem) 1rem;
  box-shadow: var(--shadow);
}

body.nav-open .site-nav {
  display: block;
}

.nav-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  background: none;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--ink);
  cursor: pointer;
}

.nav-toggle .bars {
  display: block;
  position: relative;
  width: 18px;
  height: 2px;
  background: currentColor;
  transition: background 0.2s ease;
}

.nav-toggle .bars::before,
.nav-toggle .bars::after {
  content: "";
  position: absolute;
  left: 0;
  width: 18px;
  height: 2px;
  background: currentColor;
  transition: transform 0.2s ease;
}

.nav-toggle .bars::before {
  top: -6px;
}

.nav-toggle .bars::after {
  top: 6px;
}

body.nav-open .nav-toggle .bars {
  background: transparent;
}

body.nav-open .nav-toggle .bars::before {
  transform: translateY(6px) rotate(45deg);
}

body.nav-open .nav-toggle .bars::after {
  transform: translateY(-6px) rotate(-45deg);
}

.theme-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  background: none;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--ink);
  cursor: pointer;
}

.theme-toggle:hover,
.nav-toggle:hover {
  border-color: var(--accent);
  color: var(--accent);
}

/* Sun/moon: one icon, swapped by theme */
.theme-toggle .icon-moon {
  display: none;
}

:root[data-theme="dark"] .theme-toggle .icon-moon {
  display: block;
}

:root[data-theme="dark"] .theme-toggle .icon-sun {
  display: none;
}

@media (min-width: 900px) {
  .nav-toggle {
    display: none;
  }

  .site-nav {
    display: block;
    position: static;
    background: none;
    border: none;
    padding: 0;
    box-shadow: none;
  }

  .site-nav ul {
    flex-direction: row;
    gap: 0.25rem;
  }

  .site-nav a {
    padding: 0.6rem 0.8rem;
  }
}

/* ---------- Buttons ---------------------------------------------------------- */

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5em;
  min-height: 44px;
  padding: 0.7rem 1.4rem;
  border-radius: 8px;
  font-family: var(--font-mono);
  font-size: 0.9rem;
  font-weight: 600;
  text-decoration: none;
  border: 1px solid transparent;
  transition: transform 0.15s ease, background 0.15s ease,
    border-color 0.15s ease;
}

.button:hover {
  transform: translateY(-1px);
}

.button-primary {
  background: var(--accent);
  color: #fff;
}

:root[data-theme="dark"] .button-primary {
  color: #0c130f;
}

.button-secondary {
  background: transparent;
  color: var(--ink);
  border-color: var(--line);
}

.button-secondary:hover {
  border-color: var(--accent);
  color: var(--accent);
}

/* ---------- Hero -------------------------------------------------------------- */

.hero {
  position: relative;
  z-index: 0;
  overflow: hidden;
  padding-block: clamp(4.5rem, 14vh, 8.5rem) var(--space);
}

/* Small ambient glow, tucked in the corner — a hint of motion, not a light show */
.hero-glow {
  position: absolute;
  z-index: -1;
  top: -70px;
  right: -50px;
  width: 200px;
  height: 200px;
  border-radius: 50%;
  background: var(--accent);
  opacity: 0.12;
  filter: blur(70px);
  animation: hero-glow-drift 16s ease-in-out infinite;
}

:root[data-theme="dark"] .hero-glow {
  opacity: 0.16;
}

@keyframes hero-glow-drift {
  0%,
  100% {
    transform: translate(0, 0) scale(1);
  }
  50% {
    transform: translate(-4%, 3%) scale(1.08);
  }
}

.hero h1 {
  max-width: 21ch;
  margin-bottom: 0.5em;
}

.hero .lede {
  font-size: clamp(1.05rem, 1rem + 0.4vw, 1.25rem);
  color: var(--muted);
  max-width: 56ch;
}

/* The signature: a career change written as a code diff */
.diff {
  font-family: var(--font-mono);
  font-size: clamp(0.82rem, 0.75rem + 0.4vw, 0.95rem);
  line-height: 1.9;
  margin: 2rem 0 2.5rem;
  padding: 1rem 1.25rem;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--surface);
  max-width: 100%;
  width: fit-content;
  overflow-x: auto;
}

.diff .del,
.diff .add {
  display: block;
  white-space: pre;
}

.diff .del {
  color: var(--muted);
  text-decoration: line-through;
  text-decoration-thickness: 1px;
}

.diff .add {
  color: var(--accent);
  font-weight: 600;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

/* ---------- Sections ------------------------------------------------------------ */

.section {
  padding-block: 0 var(--space);
}

.section-head {
  margin-bottom: clamp(1.75rem, 4vw, 2.75rem);
}

.section-head h2 {
  margin-bottom: 0.25em;
}

.section-head .section-sub {
  color: var(--muted);
}
/* ---------- About ------------------------------------------------------------ */

.about-grid {
  display: grid;
  gap: clamp(2rem, 5vw, 4rem);
}

@media (min-width: 900px) {
  .about-grid {
    grid-template-columns: minmax(0, 7fr) minmax(0, 5fr);
    align-items: start;
  }
}

.skills {
  display: grid;
  gap: 1.25rem;
}

.skill-group {
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 1.25rem 1.4rem;
  background: var(--surface);
}

.skill-group h3 {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  color: var(--accent);
  margin-bottom: 0.75rem;
}

.skill-group ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.skill-group li {
  font-size: 0.88rem;
  padding: 0.3rem 0.7rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--ink);
}

/* ---------- Proof / stat strip ---------------------------------------------------- */

.stat-strip {
  display: grid;
  gap: 1.25rem;
  grid-template-columns: 1fr;
  margin-top: 1.25rem;
}

@media (min-width: 640px) {
  .stat-strip {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

.stat {
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface);
  padding: 1.5rem;
}

.stat-number {
  font-family: var(--font-display);
  font-size: clamp(1.7rem, 1.3rem + 2vw, 2.4rem);
  line-height: 1.1;
  letter-spacing: -0.01em;
  color: var(--accent);
  margin: 0 0 0.5rem;
}

.stat-label {
  font-size: 0.9rem;
  color: var(--muted);
  margin: 0;
  max-width: none;
}

.stat-strip .stat:nth-child(1) { transition-delay: 0s; }
.stat-strip .stat:nth-child(2) { transition-delay: 0.08s; }
.stat-strip .stat:nth-child(3) { transition-delay: 0.16s; }

/* ---------- Cards (projects + posts) ---------------------------------------------- */

.card-grid {
  display: grid;
  gap: 1.25rem;
  grid-template-columns: 1fr;
}

@media (min-width: 640px) {
  .card-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (min-width: 900px) {
  .card-grid.three-up {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

.card {
  position: relative;
  z-index: 0;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 1.5rem 1.5rem 1.4rem;
  transition: border-color 0.2s ease, transform 0.2s ease,
    box-shadow 0.2s ease;
}

.card:hover {
  border-color: var(--accent);
  transform: translateY(-2px);
  box-shadow: var(--shadow);
}

/* Spotlight: a soft glow that tracks the cursor, set via --mx/--my in main.js */
.card::before {
  content: "";
  position: absolute;
  z-index: -1;
  inset: 0;
  background: radial-gradient(
    220px circle at var(--mx, 50%) var(--my, 50%),
    var(--accent-soft),
    transparent 70%
  );
  opacity: 0;
  transition: opacity 0.25s ease;
  pointer-events: none;
}

.card:hover::before {
  opacity: 1;
}

.card h3 {
  margin-bottom: 0.5rem;
}

.card-eyebrow {
  margin-bottom: 0.85rem;
}

.card-summary {
  color: var(--muted);
  font-size: 0.95rem;
  margin-bottom: 1rem;
}

.card-metric {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: var(--accent);
  margin: auto 0 0.75rem; /* pushes to the bottom of the card */
}

/* Chip row: alternative to .card-metric for projects with `chips` */
.card-chips {
  list-style: none;
  padding: 0;
  margin: auto 0 0.9rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}

.card-chips .tag {
  color: var(--accent);
}

.card-metric:last-child,
.card-chips:last-child {
  margin-bottom: 0;
}

.card-cta {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: var(--ink);
  margin: 0;
}

.card .arrow {
  display: inline-block;
  transition: transform 0.2s ease;
}

.card:hover .arrow {
  transform: translateX(4px);
}

/* Whole card clickable via the title link */
.card-link {
  color: inherit;
  text-decoration: none;
}

.card-link::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 12px;
}

.card-link:hover {
  color: var(--accent);
}

.post-card .card-summary {
  margin-bottom: 1rem;
}

.post-card .card-cta {
  margin-top: auto; /* pins the CTA to the bottom of uneven cards */
}

.blog-more {
  margin-top: 1.5rem;
}

.badge {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 0.7rem;
  padding: 0.1rem 0.55rem;
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--accent);
  margin-left: 0.35rem;
  vertical-align: middle;
}

/* ---------- Resume timeline --------------------------------------------------------- */

.timeline {
  list-style: none;
  margin: 0 0 2rem;
  padding: 0;
}

.timeline-item {
  position: relative;
  padding: 0 0 2.25rem 1.75rem;
  border-left: 1px solid var(--line);
}

.timeline-item:last-child {
  padding-bottom: 0.5rem;
}

.timeline-item::before {
  content: "";
  position: absolute;
  left: -5px;
  top: 0.45em;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--accent);
}

.timeline-date {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: var(--muted);
  margin-bottom: 0.35rem;
}

.timeline-item h3 {
  margin-bottom: 0.2em;
}

.timeline-role {
  font-weight: 600;
  color: var(--accent);
  margin-bottom: 0.4rem;
}

.timeline-item p:last-child {
  margin-bottom: 0;
  color: var(--muted);
  font-size: 0.95rem;
}

@media (min-width: 900px) {
  .timeline-item {
    display: grid;
    grid-template-columns: 11rem minmax(0, 1fr);
    gap: 1.5rem;
    padding-left: 2.25rem;
  }

  .timeline-date {
    margin: 0;
    padding-top: 0.3em;
  }
}

/* ---------- Contact --------------------------------------------------------------- */

.contact-panel {
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--surface);
  padding: clamp(1.75rem, 5vw, 3rem);
}

.contact-email {
  font-family: var(--font-mono);
  font-size: clamp(1rem, 0.8rem + 1.4vw, 1.5rem);
  word-break: break-all;
}

.social-list {
  list-style: none;
  margin: 1.5rem 0 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.social-list a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0.5rem 1.1rem;
  font-family: var(--font-mono);
  font-size: 0.85rem;
  color: var(--ink);
  text-decoration: none;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.social-list a:hover {
  border-color: var(--accent);
  color: var(--accent);
}

/* ---------- Footer --------------------------------------------------------------- */

.site-footer {
  border-top: 1px solid var(--line);
  padding-block: 2rem;
}

.footer-inner {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.footer-inner p {
  margin: 0;
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: var(--muted);
}

.footer-links {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem 1.25rem;
}

.footer-links a {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: var(--muted);
  text-decoration: none;
  padding: 0.6rem 0; /* touch target */
}

.footer-links a:hover {
  color: var(--accent);
}

@media (min-width: 640px) {
  .footer-inner {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
  }
}

/* ---------- Case-study page (project.html) ------------------------------------------ */

.case-page {
  padding-block: clamp(3rem, 8vh, 5rem) var(--space);
}

.back-link {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 0.85rem;
  text-decoration: none;
  margin-bottom: 2.5rem;
  padding: 0.5rem 0;
}

.case-header {
  margin-bottom: clamp(2rem, 6vw, 3.5rem);
}

.case-summary {
  font-size: clamp(1.05rem, 1rem + 0.4vw, 1.25rem);
  color: var(--muted);
}

.tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 1.25rem;
}

.tag {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  padding: 0.25rem 0.7rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--muted);
}

.case-section {
  border-top: 1px solid var(--line);
  padding-top: 2rem;
  margin-bottom: 2.5rem;
  display: grid;
  gap: 0.75rem;
}

.case-label {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--accent);
  margin: 0;
}

@media (min-width: 900px) {
  .case-section {
    grid-template-columns: 11rem minmax(0, 1fr);
    gap: 1.5rem;
  }
}

.impact-list {
  margin: 0;
  padding-left: 1.1rem;
  max-width: var(--measure);
}

.impact-list li {
  margin-bottom: 0.5rem;
}

.impact-list li::marker {
  color: var(--accent);
}

.artifact-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.artifact {
  display: inline-flex;
  align-items: center;
  gap: 0.4em;
  min-height: 44px;
  padding: 0.5rem 1.1rem;
  font-family: var(--font-mono);
  font-size: 0.85rem;
  border: 1px solid var(--line);
  border-radius: 8px;
  text-decoration: none;
}

a.artifact:hover {
  border-color: var(--accent);
}

.artifact-pending {
  color: var(--muted);
  border-style: dashed;
}

/* ---------- Multi-week case study (projects with `weeks`) --------------------------- */

.case-intro {
  margin-bottom: clamp(2rem, 5vw, 3rem);
}

.case-note {
  font-size: 0.9rem;
  color: var(--muted);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 0.9rem 1.1rem;
  margin: 1.5rem 0;
}

.case-themes {
  margin-bottom: clamp(2rem, 5vw, 3rem);
}

.case-themes .case-label {
  margin-bottom: 0.75rem;
}

.week-index {
  border-top: 1px solid var(--line);
  padding-top: 1.5rem;
  margin-bottom: clamp(2.5rem, 6vw, 4rem);
}

.week-index ol {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0 1.5rem;
  grid-template-columns: 1fr;
}

@media (min-width: 640px) {
  .week-index ol {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (min-width: 900px) {
  .week-index ol {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

.week-index a {
  display: block;
  padding: 0.55rem 0; /* touch target */
  font-size: 0.92rem;
  color: var(--ink);
  text-decoration: none;
}

.week-index a:hover {
  color: var(--accent);
}

.week-index-num,
.week-num {
  font-family: var(--font-mono);
  color: var(--accent);
}

.week {
  border-top: 1px solid var(--line);
  padding-top: 2rem;
  margin-bottom: clamp(3rem, 7vw, 4.5rem);
}

.week-head {
  display: flex;
  align-items: baseline;
  gap: 1rem;
  margin-bottom: 1.75rem;
}

.week-num {
  font-size: 0.9rem;
  margin: 0;
}

.week-head h2 {
  margin-bottom: 0.25em;
}

.week-meta {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: var(--muted);
  margin: 0;
}

.week-block,
.week-decision {
  margin-bottom: 1.75rem;
}

.week-block .case-label,
.week-decision .case-label {
  margin-bottom: 0.6rem;
}

.week-decision {
  background: var(--accent-soft);
  border-radius: 10px;
  padding: 1.1rem 1.25rem;
}

.week-decision p {
  margin: 0;
}

.stat-strip--compact {
  margin-top: 0;
}

.stat-strip--compact .stat {
  padding: 1.1rem 1.25rem;
}

.stat-strip--compact .stat-number {
  font-size: clamp(1.25rem, 1.05rem + 0.8vw, 1.6rem);
}

.week-appendix {
  font-family: var(--font-mono);
  font-size: 0.85rem;
  margin: 0;
}

.week-appendix a {
  text-decoration: none;
}

.not-found {
  padding-block: clamp(3rem, 12vh, 7rem);
}
