/* ============================================
   Chris Zappala — Portfolio
   Tokens
   ============================================ */
:root {
  --paper: #FFFFFF;
  --paper-dim: #f2f0e8;
  --ink: #1b1c1e;
  --ink-soft: #5b5d63;
  --ink-faint: #8b8d92;
  --line: #dedbd1;
  --line-strong: #c7c3b6;
  --pine: #1f4741;
  --pine-tint: #e5ede9;
  --gold: #a97a34;

  --serif: "Bitter", "Iowan Old Style", Georgia, serif;
  --sans: "Open Sans", -apple-system, BlinkMacSystemFont, sans-serif;

  --hero-grad-start: #3E3A47;
  --hero-grad-end: #262130;

  --content-w: 1100px;
  --gutter: clamp(24px, 5vw, 64px);
}

:root[data-theme="dark"] {
  --paper: #12141a;
  --paper-dim: #1c1f27;
  --ink: #F2F1EC;
  --ink-soft: #B7B9C3;
  --ink-faint: #83879a;
  --line: #2a2d36;
  --line-strong: #3a3e4a;
}

[data-theme="dark"] .wordmark span,
[data-theme="dark"] .footer-links a:hover,
[data-theme="dark"] .timeline-item .company,
[data-theme="dark"] .btn-ghost:hover,
[data-theme="dark"] .stat .num,
[data-theme="dark"] .quad h4,
[data-theme="dark"] .cs-next a:hover h2 {
  color: #FFFFFF;
}
[data-theme="dark"] .work-row .tag,
[data-theme="dark"] .cs-hero .tag {
  color: #000000;
}

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

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

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  transition: background 0.3s ease, color 0.3s ease;
}

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

a { color: inherit; text-decoration: none; }

.wrap {
  max-width: var(--content-w);
  margin: 0 auto;
  padding: 0 var(--gutter);
}

/* Typography scale */
h1, h2, h3 { font-weight: 500; margin: 0; }
h1 { font-family: var(--serif); }
h2, h3 { font-family: var(--sans); }

h1 { font-size: clamp(2.6rem, 5.4vw, 4.6rem); line-height: 1.04; letter-spacing: -0.01em; }
h2 { font-size: clamp(1.7rem, 3vw, 2.35rem); line-height: 1.15; letter-spacing: -0.005em; }
h3 { font-size: 1.3rem; line-height: 1.3; }

p { margin: 0 0 1.1em; max-width: 62ch; color: #000000; }
[data-theme="dark"] p { color: var(--ink); }
.lede { font-size: 1.18rem; color: var(--ink-soft); max-width: 46ch; }

.meta { font-size: 0.86rem; color: var(--ink-faint); letter-spacing: 0.01em; }

::selection { background: var(--pine); color: #FFFFFF; }

/* Focus visibility */
a:focus-visible, button:focus-visible {
  outline: 2px solid var(--pine);
  outline-offset: 3px;
  border-radius: 2px;
}

/* ============================================
   Header / Nav
   ============================================ */
.site-header {
  position: sticky;
  top: 0;
  z-index: 40;
  background: rgba(250, 249, 245, 0.88);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
  transition: background 0.3s ease, border-color 0.3s ease;
}
[data-theme="dark"] .site-header { background: rgba(18, 20, 26, 0.86); }

.site-header .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 76px;
}

.wordmark {
  font-family: var(--sans);
  font-size: 1.15rem;
  font-weight: 500;
  letter-spacing: -0.01em;
}
.wordmark span { color: var(--pine); }

.site-nav { display: flex; align-items: center; gap: 2.2rem; }

.theme-toggle {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  border: 1px solid var(--line);
  background: transparent;
  color: var(--ink-soft);
  font-size: 14px;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s ease, border-color 0.2s ease, color 0.2s ease;
}
.theme-toggle:hover { border-color: var(--line-strong); color: var(--ink); }

.site-nav a {
  font-size: 0.95rem;
  color: var(--ink-soft);
  position: relative;
  padding: 4px 0;
}
.site-nav a:hover { color: var(--ink); }
.site-nav a.current { color: var(--ink); }
.site-nav a.current::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: -2px;
  height: 1.5px;
  background: var(--pine);
}

.nav-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
}
.nav-toggle span {
  display: block;
  width: 22px;
  height: 1.5px;
  background: var(--ink);
  margin: 5px 0;
}

@media (max-width: 640px) {
  .nav-toggle { display: block; }
  .site-nav {
    display: none;
    position: absolute;
    top: 76px; left: 0; right: 0;
    background: var(--paper);
    border-bottom: 1px solid var(--line);
    flex-direction: column;
    align-items: flex-start;
    gap: 0;
    padding: 8px var(--gutter) 20px;
  }
  .site-nav.open { display: flex; }
  .site-nav a { padding: 12px 0; width: 100%; }
}

/* ============================================
   Footer
   ============================================ */
.site-footer {
  border-top: 1px solid var(--line);
  margin-top: clamp(64px, 10vw, 120px);
  padding: 44px 0 56px;
}
.site-footer .wrap {
  display: flex;
  flex-wrap: wrap;
  gap: 24px;
  align-items: baseline;
  justify-content: space-between;
}
.footer-links { display: flex; gap: 1.6rem; }
.footer-links a { color: #000000; font-size: 0.92rem; }
.footer-links a:hover { color: var(--pine); }
.site-footer .meta { color: #000000; }
[data-theme="dark"] .footer-links a,
[data-theme="dark"] .site-footer .meta { color: var(--ink); }

/* ============================================
   Hero (landing)
   ============================================ */
.hero {
  position: relative;
  padding: clamp(56px, 11vw, 128px) 0 clamp(40px, 7vw, 72px);
  text-align: center;
  color: #000000;
  overflow: hidden;
  background: linear-gradient(160deg, #EDECFE 0%, #908BF9 100%);
  transition: background 0.5s ease, color 0.5s ease;
}
[data-theme="dark"] .hero {
  background: linear-gradient(160deg, #1a1730 0%, #2b2350 60%, var(--paper) 100%);
  color: var(--ink);
}
[data-theme="dark"] .gradient-shift--a { background: radial-gradient(circle, rgba(88, 86, 214, 0.6) 0%, rgba(88, 86, 214, 0) 70%); }
[data-theme="dark"] .gradient-shift--b { background: radial-gradient(circle, rgba(79, 150, 255, 0.5) 0%, rgba(79, 150, 255, 0) 70%); }
[data-theme="dark"] .gradient-shift--c { background: radial-gradient(circle, rgba(79, 248, 255, 0.4) 0%, rgba(79, 248, 255, 0) 70%); }
[data-theme="dark"] .gradient-shift--d { background: radial-gradient(circle, rgba(150, 120, 255, 0.45) 0%, rgba(150, 120, 255, 0) 70%); }
[data-theme="dark"] .fx-marker { --ink-2: #9c8cff; }
.hero .ripples {
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
}
.hero .gradient-shift {
  position: absolute;
  width: 45vw;
  height: 45vw;
  max-width: 500px;
  max-height: 500px;
  border-radius: 50%;
  filter: blur(60px);
  animation-timing-function: ease-in-out;
  animation-iteration-count: infinite;
}
.gradient-shift--a {
  top: -12%;
  left: -6%;
  background: radial-gradient(circle, rgba(191, 227, 245, 0.85) 0%, rgba(191, 227, 245, 0) 70%);
  animation-name: gradient-drift-a;
  animation-duration: 16s;
}
.gradient-shift--b {
  top: 38%;
  left: 62%;
  background: radial-gradient(circle, rgba(150, 200, 225, 0.75) 0%, rgba(150, 200, 225, 0) 70%);
  animation-name: gradient-drift-b;
  animation-duration: 20s;
  animation-delay: -4s;
}
.gradient-shift--c {
  top: 62%;
  left: 8%;
  background: radial-gradient(circle, rgba(213, 242, 238, 0.85) 0%, rgba(213, 242, 238, 0) 70%);
  animation-name: gradient-drift-c;
  animation-duration: 18s;
  animation-delay: -8s;
}
.gradient-shift--d {
  top: 4%;
  left: 55%;
  background: radial-gradient(circle, rgba(235, 255, 247, 0.85) 0%, rgba(235, 255, 247, 0) 70%);
  animation-name: gradient-drift-d;
  animation-duration: 22s;
  animation-delay: -2s;
}
.hero .wrap { position: relative; z-index: 1; }
.hero .eyebrow {
  font-size: 0.92rem;
  color: #000000;
  margin: 0 0 18px;
}
.hero h1 { max-width: 17ch; color: #000000; margin-left: auto; margin-right: auto; }
.fx-marker {
  --ink-2: #FFDE59;
  color: currentColor;
  padding: 0.02em 0.14em;
  margin: 0 -0.14em;
  background: linear-gradient(100deg,
      color-mix(in srgb, var(--ink-2) 88%, transparent),
      color-mix(in srgb, var(--ink-2) 65%, transparent)
    ) no-repeat 0 62%;
  background-size: 0% 46%;
  animation: fx-marker 0.9s ease-out 0.5s forwards;
}
@keyframes fx-marker {
  0%   { background-size: 0% 46%; background-position: 0 62%; }
  100% { background-size: 100% 46%; background-position: 0 62%; }
}
.hero .lede { max-width: calc(55.2ch + 96px); margin-top: 26px; color: #000000; margin-left: auto; margin-right: auto; }
[data-theme="dark"] .hero .eyebrow,
[data-theme="dark"] .hero h1,
[data-theme="dark"] .hero .lede { color: var(--ink); }

@keyframes gradient-drift-a {
  0%, 100% { transform: translate(0, 0) scale(1); }
  33% { transform: translate(4%, -3%) scale(1.1); }
  66% { transform: translate(-3%, 3%) scale(0.92); }
}
@keyframes gradient-drift-b {
  0%, 100% { transform: translate(0, 0) scale(1); }
  33% { transform: translate(-5%, 4%) scale(0.9); }
  66% { transform: translate(3%, -4%) scale(1.12); }
}
@keyframes gradient-drift-c {
  0%, 100% { transform: translate(0, 0) scale(1); }
  33% { transform: translate(3%, 4%) scale(1.08); }
  66% { transform: translate(-4%, -3%) scale(0.94); }
}
@keyframes gradient-drift-d {
  0%, 100% { transform: translate(0, 0) scale(1); }
  33% { transform: translate(-4%, -3%) scale(0.93); }
  66% { transform: translate(4%, 3%) scale(1.1); }
}

.hero-fade {
  opacity: 0;
  transform: translateY(14px);
  animation: rise 0.7s cubic-bezier(.2,.7,.3,1) forwards;
}
.hero-fade:nth-child(2) { animation-delay: 0.08s; }
.hero-fade:nth-child(3) { animation-delay: 0.16s; }

@keyframes rise {
  to { opacity: 1; transform: translateY(0); }
}
@media (prefers-reduced-motion: reduce) {
  .hero-fade { animation: none; opacity: 1; transform: none; }
  .hero .gradient-shift { animation: none; }
  .hero .topo-lines path { animation: none; stroke-dashoffset: 0; }
  .fx-marker { animation: none; background-size: 100% 46%; }
}

/* ============================================
   Work index (list rows, not cards)
   ============================================ */
.work-section { padding: clamp(20px, 4vw, 40px) 0 clamp(60px, 9vw, 100px); }
.work-section > .wrap > h2 { margin-bottom: 8px; }
.section-intro { color: var(--ink-soft); max-width: none; margin-bottom: 44px; }

.work-list { border-top: 1px solid var(--line); background: #FFFFFF; padding: 32px; }
[data-theme="dark"] .work-list { background: var(--paper-dim); }

.work-row {
  display: grid;
  grid-template-columns: 130px 1fr auto;
  gap: 28px;
  align-items: center;
  padding: 30px 0;
  border-bottom: 1px solid var(--line);
  position: relative;
  transition: padding-left 0.25s ease;
}

.work-row:hover { padding-left: 14px; }

.work-row::before {
  content: "";
  position: absolute;
  left: -14px;
  top: 0; bottom: 0;
  width: 3px;
  background: var(--pine);
  transform: scaleY(0);
  transform-origin: top;
  transition: transform 0.3s ease;
}
.work-row:hover::before { transform: scaleY(1); }

.work-row .company-logo {
  width: 96px;
  height: 96px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--paper);
  overflow: hidden;
}
[data-theme="dark"] .work-row .company-logo { background: #FFFFFF; }
.work-row .company-logo img {
  max-width: 68%;
  max-height: 68%;
  object-fit: contain;
}

.work-row .title-block h3 {
  font-size: clamp(1.25rem, 2.4vw, 1.7rem);
  margin-bottom: 6px;
}
.work-row .title-block p {
  margin: 0;
  color: var(--ink-soft);
  font-size: 0.98rem;
}

.work-row .tag {
  justify-self: end;
  font-size: 0.8rem;
  color: var(--pine);
  border: 1px solid var(--pine-tint);
  background: var(--pine-tint);
  padding: 6px 12px;
  border-radius: 3px;
  white-space: nowrap;
}

@media (max-width: 680px) {
  .work-row { grid-template-columns: 1fr; gap: 8px; }
  .work-row .tag { justify-self: start; }
}

/* ============================================
   About page
   ============================================ */
.about-hero {
  padding: clamp(48px, 9vw, 96px) 0 clamp(32px, 6vw, 56px);
  background: linear-gradient(160deg, #EDECFE 0%, #908BF9 100%);
  color: #000000;
}
.about-hero h1,
.about-hero p { color: #000000; }
[data-theme="dark"] .about-hero {
  background: linear-gradient(160deg, #1a1730 0%, #2b2350 60%, var(--paper) 100%);
  color: var(--ink);
}
[data-theme="dark"] .about-hero h1,
[data-theme="dark"] .about-hero p { color: var(--ink); }
.about-grid {
  display: grid;
  grid-template-columns: 160px 1fr;
  gap: 44px;
  align-items: start;
}
@media (max-width: 640px) {
  .about-grid { grid-template-columns: 1fr; }
}

.monogram {
  width: 128px;
  height: 128px;
  border-radius: 50%;
  background: #413e71;
  color: #FFFFFF;
  font-family: var(--sans);
  font-size: 2.3rem;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 0 0 1px #FFFFFF;
}

.skills-block {
  padding: 36px 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  margin: 20px 0 56px;
}
.skills-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 10px 28px;
  margin-top: 22px;
  padding: 0;
  list-style: none;
}
.skills-grid li {
  font-size: 0.95rem;
  color: var(--ink-soft);
  padding-left: 16px;
  position: relative;
}
.skills-grid li::before {
  content: "";
  position: absolute;
  left: 0; top: 0.55em;
  width: 6px; height: 6px;
  background: var(--gold);
  border-radius: 50%;
}

.timeline { margin-top: 8px; }
.timeline-item {
  display: grid;
  grid-template-columns: 190px 1fr;
  gap: 28px;
  padding: 28px 0;
  border-bottom: 1px solid var(--line);
}
.timeline-item:first-child { border-top: 1px solid var(--line); }
@media (max-width: 640px) {
  .timeline-item { grid-template-columns: 1fr; gap: 6px; }
}
.timeline-item .role-dates {
  font-size: 0.86rem;
  color: var(--ink-faint);
  padding-top: 4px;
}
.timeline-item h3 { margin-bottom: 2px; }
.timeline-item .company { color: var(--pine); font-size: 0.95rem; margin-bottom: 12px; }
.timeline-item ul { margin: 10px 0 0; padding-left: 18px; }
.timeline-item li { color: var(--ink-soft); margin-bottom: 6px; font-size: 0.96rem; }

.education-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
  margin-top: 8px;
}
@media (max-width: 640px) { .education-grid { grid-template-columns: 1fr; } }
.edu-item {
  padding: 22px;
  border: 1px solid var(--line);
  background: var(--paper-dim);
}
.edu-item .meta { margin-bottom: 6px; }

.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--pine);
  color: #FFFFFF;
  padding: 13px 22px;
  font-size: 0.95rem;
  border: 1px solid var(--pine);
  box-shadow: 0 0 0 1px #FFFFFF;
  transition: background 0.2s ease, color 0.2s ease;
}
.btn:hover { background: var(--pine); color: #FFFFFF; }

.btn-ghost {
  background: transparent;
  color: var(--ink);
  border: 1px solid var(--line-strong);
}
.btn-ghost:hover { border-color: var(--pine); color: var(--pine); background: transparent; }

/* ============================================
   Case study pages
   ============================================ */
.cs-hero {
  padding: clamp(48px, 9vw, 96px) 0 clamp(32px, 6vw, 56px);
  border-bottom: 1px solid var(--line);
  color: #FFFFFF;
}
.cs-hero--genai { background: radial-gradient(circle at top, #5856D6 0%, #1F1E4B 100%); }
.cs-hero--healthcare,
.cs-hero--saas { background: radial-gradient(circle at top, #0077C8 0%, #002A46 100%); }
.cs-hero .tag {
  display: inline-block;
  font-size: 0.8rem;
  color: var(--pine);
  border: 1px solid var(--pine-tint);
  background: var(--pine-tint);
  padding: 6px 12px;
  border-radius: 3px;
  margin-bottom: 22px;
}
.cs-hero h1 { max-width: 18ch; color: #FFFFFF; }
.cs-hero .lede { margin-top: 22px; color: #FFFFFF; }

.cs-meta-strip {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
  padding: 32px 0;
  border-bottom: 1px solid var(--line);
}
@media (max-width: 760px) {
  .cs-meta-strip { grid-template-columns: repeat(2, 1fr); }
}
.cs-meta-strip dt { font-size: 0.78rem; color: var(--ink-faint); margin-bottom: 6px; }
.cs-meta-strip dd { margin: 0; font-size: 1rem; }

.cs-divider {
  display: flex;
  align-items: center;
  gap: 24px;
  padding: clamp(32px, 5vw, 48px) 0;
}
.cs-divider::before,
.cs-divider::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--line);
}
.cs-divider h2 {
  font-size: 0.95rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.09em;
  color: var(--ink-faint);
  white-space: nowrap;
}

.cs-section {
  display: grid;
  grid-template-columns: 220px 1fr;
  gap: 44px;
  padding: clamp(44px, 7vw, 72px) 0;
  border-bottom: 1px solid var(--line);
}
.cs-section:has(+ .cs-divider) { border-bottom: none; }
@media (max-width: 760px) {
  .cs-section { grid-template-columns: 1fr; gap: 18px; }
}
.cs-section .label {
  font-family: var(--sans);
  font-style: italic;
  font-size: 1.05rem;
  color: var(--ink-faint);
}
.cs-section .body > *:last-child { margin-bottom: 0; }
.cs-section .body p { max-width: 64ch; }
.cs-section .body ul { padding-left: 18px; margin: 0 0 1.1em; }
.cs-section .body li { color: var(--ink-soft); margin-bottom: 8px; max-width: 60ch; }

.figure {
  margin: 28px 0 0;
  padding: clamp(18px, 3vw, 34px);
}
.figure figcaption {
  margin-top: 14px;
  font-size: 0.85rem;
  color: #1b1c1e;
  display: flex;
  align-items: center;
  min-height: 2.4em;
  border-radius: 12px;
  background-color: #f2f2f2;
}
[data-theme="dark"] .figure figcaption {
  background-color: var(--paper-dim);
  color: var(--ink);
}

.outcome-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 22px;
}
@media (max-width: 640px) { .outcome-stats { grid-template-columns: 1fr; } }
.stat .num {
  font-family: var(--sans);
  font-size: 2.4rem;
  color: var(--pine);
  line-height: 1;
  margin-bottom: 8px;
}
.stat .desc { color: var(--ink-soft); font-size: 0.92rem; max-width: 24ch; }

.figure-shot {
  padding: 0;
  overflow: hidden;
}
.figure-shot img { width: 100%; height: auto; display: block; border: 1px solid #cccccc; }
[data-theme="dark"] .figure-shot img { border-color: var(--line-strong); }
.figure-shot figcaption { padding: 14px clamp(18px, 3vw, 34px) 14px; }

.figure-mobile {
  max-width: 340px;
  margin-left: auto;
  margin-right: auto;
}
.figure-mobile img { width: 100%; }

.figure-pair {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
  align-items: start;
  margin-top: 28px;
}
@media (max-width: 700px) {
  .figure-pair { grid-template-columns: 1fr; }
}
.figure-pair .figure { margin-top: 0; }

.shot-label {
  font-family: var(--sans);
  font-size: 0.78rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--ink-faint);
  margin: 28px 0 0;
}
.shot-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(0, 1fr));
  gap: 20px;
  margin-top: 14px;
}
.shot-row .figure { margin-top: 0; }
@media (max-width: 760px) {
  .shot-row { grid-template-columns: 1fr; }
}
.shot-row--stacked { grid-template-columns: 1fr; }
.wireframe-version { margin-top: 40px; }

.shot-grid-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  margin-top: 24px;
}
.shot-grid-3 .figure { margin-top: 0; }
@media (max-width: 760px) {
  .shot-grid-3 { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 480px) {
  .shot-grid-3 { grid-template-columns: 1fr; }
}

.shot-grid-2 {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
  margin-top: 24px;
}
.shot-grid-2 .figure { margin-top: 0; }
@media (max-width: 560px) {
  .shot-grid-2 { grid-template-columns: 1fr; }
}

.body-media {
  display: grid;
  grid-template-columns: 3fr 1fr;
  gap: 28px;
  align-items: start;
}
.body-media .media-col .figure { margin-top: 0; }
.body-media--half { grid-template-columns: 1fr 1fr; }
@media (max-width: 700px) {
  .body-media { grid-template-columns: 1fr; }
  .body-media .media-col { max-width: 220px; margin: 0 auto; }
}

.figure-scroll .scroll-frame {
  height: 800px;
  overflow-y: auto;
  border: 1px solid #cccccc;
}
[data-theme="dark"] .figure-scroll .scroll-frame { border-color: var(--line-strong); }
.figure-scroll .scroll-frame img {
  width: 100%;
  height: auto;
  display: block;
  border: none;
}

.pullquote {
  border-left: 2px solid var(--pine);
  padding: 4px 0 4px 26px;
  margin: 8px 0 0;
}
  border-left: 2px solid var(--pine);
  padding: 4px 0 4px 26px;
  margin: 8px 0 0;
}
.pullquote p {
  font-family: var(--sans);
  font-style: italic;
  font-size: 1.2rem;
  color: var(--ink);
  max-width: 46ch;
}

.quad-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
  margin-top: 24px;
}
@media (max-width: 640px) { .quad-grid { grid-template-columns: 1fr; } }
.quad-grid .quad {
  background: var(--paper);
  padding: 22px;
}
.quad h4 {
  font-family: var(--sans);
  font-size: 0.82rem;
  font-weight: 600;
  letter-spacing: 0.01em;
  color: var(--pine);
  margin: 0 0 12px;
}
.quad ul { margin: 0; padding-left: 16px; }
.quad li { color: var(--ink-soft); font-size: 0.92rem; margin-bottom: 7px; }

.lessons-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 28px;
}
@media (max-width: 640px) { .lessons-grid { grid-template-columns: 1fr; } }
.lesson h4 {
  font-family: var(--sans);
  font-weight: 500;
  font-size: 1.1rem;
  margin-bottom: 8px;
}
.lesson p { color: var(--ink-soft); font-size: 0.96rem; margin: 0; }

.version-tag {
  display: inline-block;
  background: var(--pine);
  color: #FFFFFF;
  font-size: 0.78rem;
  padding: 4px 10px;
  border-radius: 3px;
  margin-bottom: 14px;
}

.closing-quote {
  background: #15171c;
  color: #FFFFFF;
  padding: clamp(48px, 9vw, 88px) 0;
  text-align: center;
}
.closing-quote h2 {
  color: #FFFFFF;
  max-width: 20ch;
  margin: 0 auto;
  font-family: var(--serif);
}
.closing-quote p {
  color: #b9bcc2;
  max-width: 52ch;
  margin: 20px auto 0;
}
.cs-next { margin-top: 24px; }
.cs-next .eyebrow { font-size: 0.85rem; color: var(--ink-faint); margin-bottom: 10px; }
.cs-next .next-link { display: block; }
.cs-next h2 {
  display: inline-block;
  padding: 4px 10px;
  margin: -4px -10px;
  border-radius: 4px;
  transition: color 0.2s ease, background 0.2s ease;
}
.cs-next a:hover h2 {
  color: var(--pine);
  text-decoration: underline;
  background: var(--paper-dim);
}
