/* Leonardo Rigano — refined, faithful to current site */

:root {
  --font-sans: "Inter", "Inter Variable", -apple-system, BlinkMacSystemFont, "Helvetica Neue", Arial, sans-serif;
  --font-serif: "Instrument Serif", Georgia, "Times New Roman", serif;

  --fs-xs: 0.8125rem;
  --fs-sm: 0.9375rem;
  --fs-base: 1.0625rem;
  --fs-md: 1.1875rem;
  --fs-lg: clamp(1.375rem, 1.1rem + 1.1vw, 1.875rem);
  --fs-xl: clamp(1.625rem, 1.25rem + 1.6vw, 2.375rem);
  --fs-hero: clamp(2.25rem, 1.5rem + 3.4vw, 3.75rem);

  --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: 5.5rem;

  --max: 1040px;
  --gutter: clamp(1.25rem, 4vw, 2.25rem);
  --radius: 10px;

  --bg: #fafaf7;
  --fg: #121212;
  --fg-muted: #4a4a48;
  --fg-subtle: #767670;
  --line: #e7e5df;
  --card: #ffffff;

  /* Orange italic accent — shade 0, coral */
  --accent: #d97757;

  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --dur: 240ms;
}

[data-theme="dark"] {
  --bg: #121211;
  --fg: #f2f1ec;
  --fg-muted: #bdbcb5;
  --fg-subtle: #86857f;
  --line: #26261f;
  --card: #1a1a16;
  --accent: #e48667;
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font-sans);
  font-size: var(--fs-base);
  line-height: 1.55;
  color: var(--fg);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  transition: background-color var(--dur) var(--ease), color var(--dur) var(--ease);
}
img, svg { max-width: 100%; display: block; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; padding: 0; }
a { color: inherit; text-decoration: none; }
h1, h2, h3, h4, p { margin: 0; text-wrap: pretty; overflow-wrap: break-word; word-break: normal; hyphens: auto; }

.accent { color: var(--accent); font-family: var(--font-serif); font-style: italic; font-weight: 400; letter-spacing: -0.005em; }

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

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

.skip-link {
  position: absolute; top: -100px; left: var(--gutter);
  background: var(--fg); color: var(--bg);
  padding: var(--sp-3) var(--sp-5); font-size: var(--fs-sm);
  z-index: 1000; border-radius: 6px;
}
.skip-link:focus { top: var(--sp-4); }

.sr-only {
  position: absolute !important; width: 1px; height: 1px;
  padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0);
  white-space: nowrap; border: 0;
}

.container { max-width: var(--max); margin-inline: auto; padding-inline: var(--gutter); }

/* Nav */
.nav {
  position: sticky; top: 0; z-index: 50;
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: saturate(140%) blur(10px);
  -webkit-backdrop-filter: saturate(140%) blur(10px);
  border-bottom: 1px solid transparent;
  transition: border-color var(--dur) var(--ease);
}
.nav.scrolled { border-bottom-color: var(--line); }
.nav-inner {
  max-width: var(--max); margin-inline: auto;
  padding: var(--sp-4) var(--gutter);
  display: flex; align-items: center; justify-content: space-between; gap: var(--sp-4);
}
.brand { font-size: var(--fs-sm); font-weight: 500; }
.nav-links { list-style: none; margin: 0; padding: 0; display: flex; gap: var(--sp-6); align-items: center; }
.nav-links a {
  font-size: var(--fs-sm); color: var(--fg-muted);
  position: relative; padding-block: 4px;
  transition: color var(--dur) var(--ease);
}
.nav-links a::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: 0;
  height: 1px; background: currentColor;
  transform: scaleX(0); transform-origin: left;
  transition: transform var(--dur) var(--ease);
}
.nav-links a:hover { color: var(--fg); }
.nav-links a:hover::after { transform: scaleX(1); }
.nav-links a[aria-current="true"] { color: var(--fg); }

.nav-actions { display: flex; gap: var(--sp-2); align-items: center; }

.copy-email {
  display: inline-flex; align-items: center; gap: var(--sp-2);
  padding: var(--sp-2) var(--sp-4);
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--card);
  font-size: var(--fs-sm);
  transition: border-color var(--dur) var(--ease);
  position: relative;
}
.copy-email:hover { border-color: var(--fg); }
.copy-email .icon-mail { display: none; }
.copy-email .swap {
  position: relative; display: inline-block; height: 1.3em; overflow: hidden; min-width: 84px;
}
.copy-email .swap span {
  display: block;
  transition: transform var(--dur) var(--ease), opacity var(--dur) var(--ease);
}
.copy-email .swap .copied {
  position: absolute; top: 0; left: 0;
  transform: translateY(100%); opacity: 0;
}
.copy-email.is-copied .swap .default { transform: translateY(-100%); opacity: 0; }
.copy-email.is-copied .swap .copied { transform: translateY(0); opacity: 1; color: #1a7a3e; }
[data-theme="dark"] .copy-email.is-copied .swap .copied { color: #4ec17a; }
.copy-email.is-copied { border-color: #1a7a3e; }
[data-theme="dark"] .copy-email.is-copied { border-color: #4ec17a; }

.theme-toggle, .menu-btn {
  width: 34px; height: 34px;
  border-radius: 50%;
  border: 1px solid var(--line);
  display: inline-flex; align-items: center; justify-content: center;
  transition: border-color var(--dur) var(--ease);
}
.theme-toggle:hover, .menu-btn:hover { border-color: var(--fg); }
.theme-toggle svg { width: 15px; height: 15px; }
.theme-toggle .sun { display: none; }
[data-theme="dark"] .theme-toggle .sun { display: block; }
[data-theme="dark"] .theme-toggle .moon { display: none; }
.menu-btn { display: none; }

@media (max-width: 760px) {
  .nav-links { display: none; }
  .menu-btn { display: inline-flex; }
  .nav-actions .copy-email .swap { min-width: 60px; }
  .copy-email .label-text { display: none; }
  .copy-email .icon-copy { display: none; }
  .copy-email .icon-mail { display: inline-block; }
  .nav-links.open {
    display: flex; flex-direction: column;
    position: absolute; top: 100%; left: 0; right: 0;
    background: var(--bg); border-bottom: 1px solid var(--line);
    padding: var(--sp-3) var(--gutter) var(--sp-5); gap: 0;
  }
  .nav-links.open a {
    padding: var(--sp-4) 0; border-bottom: 1px solid var(--line);
    font-size: var(--fs-base); color: var(--fg);
  }
  .nav-links.open a:last-child { border-bottom: 0; }
  .nav-links.open a::after { display: none; }
}

/* Hero */
.hero { padding-block: clamp(3rem, 8vw, 5rem) clamp(2rem, 5vw, 3.5rem); }
.greeting {
  display: flex; align-items: baseline; flex-wrap: wrap;
  gap: var(--sp-2);
  font-size: clamp(1.25rem, 1rem + 1vw, 1.625rem);
  color: var(--fg-muted);
  margin-bottom: var(--sp-5);
  letter-spacing: -0.01em;
}
.greeting .name { color: var(--fg); font-weight: 500; }
.greeting .name-link {
  position: relative;
  transition: color var(--dur) var(--ease);
}
.greeting .name-link::after {
  content: "";
  position: absolute; left: 0; right: 0; bottom: 0.05em;
  height: 1px; background: currentColor;
  transform: scaleX(0); transform-origin: left;
  transition: transform var(--dur) var(--ease);
}
.greeting .name-link:hover { color: var(--accent); }
.greeting .name-link:hover .name { color: var(--accent); }
.greeting .name-link:hover::after { transform: scaleX(1); }

.hero h1 {
  font-size: var(--fs-hero);
  font-weight: 500;
  line-height: 1.08;
  letter-spacing: -0.025em;
  max-width: 22ch;
  color: var(--fg);
}
.hero h1 .accent {
  font-size: 1.05em;
  line-height: 0.9;
  letter-spacing: -0.015em;
}

.scroll-cue {
  margin-top: var(--sp-8);
  display: inline-flex; gap: var(--sp-2); align-items: center;
  font-size: var(--fs-sm); color: var(--fg-muted);
  transition: color var(--dur) var(--ease);
}
.scroll-cue:hover { color: var(--fg); }
.scroll-cue .arrow {
  display: inline-block;
  transition: transform var(--dur) var(--ease);
  will-change: transform;
}
.scroll-cue:hover .arrow { transform: translateY(2px); }

/* Mini about + clients strip (subtle fill) */
.intro-strip {
  padding-block: var(--sp-7);

  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: var(--sp-7);
  align-items: start;
}
@media (max-width: 720px) { .intro-strip { grid-template-columns: 1fr; gap: var(--sp-5); } }
.intro-strip p {
  font-size: var(--fs-md);
  color: var(--fg);
  max-width: 44ch;
  line-height: 1.5;
  letter-spacing: -0.005em;
}
.intro-strip p em { font-family: var(--font-serif); font-style: italic; color: var(--accent); }
.intro-strip p.muted { color: var(--fg-muted); font-size: var(--fs-sm); margin-top: var(--sp-3); }

.clients dt {
  font-size: var(--fs-xs);
  color: var(--fg-subtle);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: var(--sp-3);
}
.clients dd {
  margin: 0;
  display: flex; flex-wrap: wrap; gap: 0 var(--sp-4);
  font-size: var(--fs-sm); color: var(--fg);
  line-height: 2;
}
.clients dd span { display: inline-flex; align-items: center; gap: var(--sp-2); }
.clients dd span + span::before {
  content: "·"; color: var(--fg-subtle); margin-right: var(--sp-4);
}

/* Projects */
.projects {
  padding-block: var(--sp-8) var(--sp-9);
  display: flex; flex-direction: column;
  gap: clamp(2.5rem, 6vw, 4.5rem);
}
.projects-label {
  font-size: var(--fs-sm);
  color: var(--fg-muted);
  display: flex; align-items: center; gap: var(--sp-3);
  margin-bottom: var(--sp-5);
}
.projects-label::after {
  content: ""; flex: 1; height: 1px; background: var(--line);
}

.project { display: block; color: var(--fg); }
.project .eyebrow {
  font-size: var(--fs-sm); color: var(--fg-muted);
  margin-bottom: var(--sp-2); font-weight: 400;
}
.project h2 {
  font-size: var(--fs-xl);
  font-weight: 500;
  letter-spacing: -0.02em;
  line-height: 1.18;
  max-width: 26ch;
  margin-bottom: var(--sp-4);
}
.project h2 em { font-family: var(--font-serif); font-style: italic; color: var(--accent); font-weight: 400; }
.project .read-more {
  display: inline-flex; align-items: center; gap: var(--sp-2);
  font-size: var(--fs-sm); color: var(--fg-muted);
  margin-bottom: var(--sp-5);
  transition: color var(--dur) var(--ease), gap var(--dur) var(--ease);
}
.project:hover .read-more, .project:focus-visible .read-more {
  color: var(--fg); gap: var(--sp-3);
}
.project:hover .read-more { color: var(--accent); }
.project .read-more .arrow { display: inline-block; transition: transform var(--dur) var(--ease); }
.project:hover .read-more .arrow { transform: translateX(3px); }

.project .cover {
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--card);
  border: 1px solid var(--line);
  aspect-ratio: 16 / 10;
  position: relative;
  transition: transform 450ms var(--ease), box-shadow var(--dur) var(--ease);
}
.project:hover .cover {
  transform: translateY(-4px);
  box-shadow: 0 22px 44px -22px rgba(0,0,0,0.18);
}
[data-theme="dark"] .project:hover .cover {
  box-shadow: 0 22px 44px -22px rgba(0,0,0,0.6);
}
.project .cover img {
  width: 100%; height: 100%; object-fit: contain;
  transition: transform 700ms var(--ease);
}
.project:hover .cover img { transform: scale(1.02); }

.cover .ph {
  position: absolute; inset: 0;
  background:
    repeating-linear-gradient(
      45deg,
      color-mix(in srgb, var(--fg) 3%, var(--card)),
      color-mix(in srgb, var(--fg) 3%, var(--card)) 14px,
      var(--card) 14px,
      var(--card) 15px
    );
  display: flex; align-items: center; justify-content: center;
  font-size: var(--fs-sm); color: var(--fg-subtle);
}

/* Reveal */
.reveal { opacity: 0; transform: translateY(14px); transition: opacity 650ms var(--ease), transform 650ms var(--ease); }
.reveal.in { opacity: 1; transform: translateY(0); }

/* Back to top + footer */
.back-top { padding-block: var(--sp-6); border-top: 1px solid var(--line); }
.back-top a { font-size: var(--fs-sm); color: var(--fg-muted); display: inline-flex; gap: var(--sp-2); align-items: center; }
.back-top a:hover { color: var(--fg); }

.footer {
  padding-block: var(--sp-5) var(--sp-7);
  border-top: 1px solid var(--line);
  display: flex; justify-content: space-between; align-items: center;
  gap: var(--sp-4); flex-wrap: wrap;
  font-size: var(--fs-sm); color: var(--fg-muted);
}
.footer-links { display: flex; gap: var(--sp-5); }
.footer-links a { color: var(--fg-muted); }
.footer-links a:hover { color: var(--fg); }

/* About section */
.about-section {
  padding-block: var(--sp-8) var(--sp-9);

}
.about-grid {
  display: grid;
  grid-template-columns: 1.6fr 1fr;
  gap: var(--sp-7);
  align-items: start;
}
@media (max-width: 720px) { .about-grid { grid-template-columns: 1fr; gap: var(--sp-5); } }
.about-title {
  font-size: var(--fs-xl);
  font-weight: 500;
  letter-spacing: -0.02em;
  line-height: 1.15;
  max-width: 20ch;
  margin-bottom: var(--sp-5);
}
.about-section p {
  font-size: var(--fs-md);
  line-height: 1.55;
  max-width: 48ch;
  color: var(--fg);
}
.about-section p + p { margin-top: var(--sp-3); }
.about-section p.muted { color: var(--fg-muted); font-size: var(--fs-base); }
.about-meta {
  margin: 0;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--sp-4) var(--sp-5);
}
.about-meta div { border-top: 1px solid var(--line); padding-top: var(--sp-3); }
.about-meta dt {
  font-size: var(--fs-xs); color: var(--fg-subtle);
  text-transform: uppercase; letter-spacing: 0.08em;
  margin-bottom: var(--sp-1);
}
.about-meta dd { margin: 0; font-size: var(--fs-sm); color: var(--fg); }

/* Case study — compact, responsive */

.reading-progress {
  position: fixed; top: 0; left: 0; height: 2px;
  width: 0%;
  background: var(--accent);
  z-index: 100;
  transition: width 100ms linear;
}

.cs-crumb {
  padding-top: var(--sp-5);
  font-size: var(--fs-sm);
  color: var(--fg-muted);
}
.cs-crumb a { color: var(--fg-muted); }
.cs-crumb a:hover { color: var(--fg); }
.cs-crumb .sep { color: var(--fg-subtle); margin-inline: var(--sp-2); }

.cs-hero { padding-block: clamp(2rem, 5vw, 3.5rem) clamp(2rem, 4vw, 3rem); }
.cs-eyebrow { font-size: var(--fs-sm); color: var(--fg-muted); margin-bottom: var(--sp-4); }
.cs-title {
  font-size: clamp(1.875rem, 1.3rem + 2.4vw, 2.75rem);
  font-weight: 500;
  letter-spacing: -0.02em;
  line-height: 1.1;
  max-width: 22ch;
  margin-bottom: var(--sp-4);
}
.cs-title em { font-family: var(--font-serif); font-style: italic; color: var(--accent); font-weight: 400; }
.cs-lede {
  font-size: var(--fs-base);
  max-width: 52ch;
  color: var(--fg-muted);
  line-height: 1.55;
}

.cs-facts {
  margin-top: var(--sp-6);
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--sp-4) var(--sp-5);
  padding-top: var(--sp-4);
  border-top: 1px solid var(--line);
}
@media (max-width: 900px) { .cs-facts { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 420px) { .cs-facts { grid-template-columns: 1fr 1fr; gap: var(--sp-3) var(--sp-4); } }
.cs-fact dt {
  font-size: var(--fs-xs); color: var(--fg-subtle);
  text-transform: uppercase; letter-spacing: 0.08em; margin-bottom: var(--sp-2);
}
.cs-fact dd { margin: 0; font-size: var(--fs-sm); color: var(--fg); line-height: 1.5; }

.cs-cover {
  aspect-ratio: 16/9;
  margin-block: clamp(1.5rem, 4vw, 3rem) 0;
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--line);
  background: var(--card);
  position: relative;
}

/* Body — sticky TOC + prose */
.cs-body {
  display: grid;
  grid-template-columns: 160px 1fr;
  gap: var(--sp-6);
  padding-block: clamp(2rem, 4vw, 3rem);
}
@media (max-width: 900px) {
  .cs-body { grid-template-columns: 1fr; gap: var(--sp-4); }
}
@media (max-width: 900px) { .cs-body { grid-template-columns: 1fr; gap: var(--sp-4); } }

.cs-toc-wrap { position: sticky; top: 90px; align-self: start; }
.cs-toc-label {
  font-size: var(--fs-xs); color: var(--fg-subtle);
  text-transform: uppercase; letter-spacing: 0.08em;
  margin-bottom: var(--sp-3);
}
.cs-toc {
  list-style: none; padding: 0; margin: 0;
  display: flex; flex-direction: column;
}
.cs-toc a {
  display: block;
  font-size: var(--fs-sm);
  color: var(--fg-muted);
  padding: var(--sp-2) 0 var(--sp-2) var(--sp-3);
  border-left: 2px solid var(--line);
  transition: color var(--dur) var(--ease), border-color var(--dur) var(--ease);
}
.cs-toc a:hover { color: var(--fg); }
.cs-toc a[aria-current="true"] { color: var(--fg); border-left-color: var(--accent); }

/* Mobile: collapse the TOC into a thin sticky indicator
   showing only the current section. */
@media (max-width: 900px) {
  .cs-toc-wrap {
    position: sticky; top: 53px;
    background: color-mix(in srgb, var(--bg) 92%, transparent);
    backdrop-filter: saturate(140%) blur(10px);
    -webkit-backdrop-filter: saturate(140%) blur(10px);
    margin-inline: calc(-1 * var(--gutter));
    padding: var(--sp-2) var(--gutter);
    border-bottom: 1px solid var(--line);
    z-index: 10;
    display: flex; align-items: baseline; gap: var(--sp-3);
  }
  .cs-toc-label {
    display: inline; margin: 0; flex-shrink: 0;
    font-size: var(--fs-xs); color: var(--fg-subtle);
  }
  .cs-toc-label::after { content: " ·"; }
  .cs-toc {
    display: block; min-width: 0;
  }
  .cs-toc li { display: none; }
  .cs-toc li:has(a[aria-current="true"]) { display: block; }
  /* Initial state: before any section is active, show first item. */
  .cs-toc:not(:has(a[aria-current="true"])) li:first-child { display: block; }
  .cs-toc a, .cs-toc a[aria-current="true"] {
    display: block;
    border: 0;
    padding: 0;
    color: var(--fg);
    font-size: var(--fs-sm);
    font-weight: 500;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }
}

.cs-prose { max-width: 60ch; min-width: 0; }
.cs-chapter { padding-block: var(--sp-4); }
.cs-chapter + .cs-chapter { border-top: 1px solid var(--line); margin-top: var(--sp-3); }
.cs-chapter .num {
  font-size: var(--fs-xs); color: var(--fg-subtle);
  text-transform: uppercase; letter-spacing: 0.08em;
  display: block; margin-bottom: var(--sp-3);
}
.cs-chapter h2 {
  font-size: var(--fs-md); font-weight: 500;
  letter-spacing: -0.015em; line-height: 1.25;
  margin-bottom: var(--sp-3);
}
.cs-chapter h2 em { font-family: var(--font-serif); font-style: italic; color: var(--accent); font-weight: 400; }
.cs-chapter h3 {
  font-size: var(--fs-base); font-weight: 600;
  margin-top: var(--sp-5); margin-bottom: var(--sp-2);
}
.cs-chapter p { font-size: var(--fs-sm); line-height: 1.65; color: var(--fg); }
.cs-chapter p + p { margin-top: var(--sp-3); }
.cs-chapter p.muted { color: var(--fg-muted); }

.cs-chapter ul {
  margin: var(--sp-4) 0 0; padding-left: 0; list-style: none;
}
.cs-chapter ul li {
  padding: var(--sp-3) 0;
  border-bottom: 1px solid var(--line);
  display: grid; grid-template-columns: 28px 1fr; gap: var(--sp-3);
  line-height: 1.55;
  font-size: var(--fs-sm);
}
.cs-chapter ul li::before {
  content: attr(data-n);
  font-size: var(--fs-xs); color: var(--fg-subtle);
  padding-top: 0.3em;
}

.cs-figure {
  margin-block: var(--sp-5);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--card);
}
.cs-figure .ph { aspect-ratio: 16/9; display: flex; align-items: center; justify-content: center; color: var(--fg-subtle); font-size: var(--fs-sm); }
.cs-figure figcaption {
  padding: var(--sp-3) var(--sp-4);
  font-size: var(--fs-sm); color: var(--fg-muted);
  border-top: 1px solid var(--line);
}

.cs-pull {
  margin-block: var(--sp-5);
  padding-block: var(--sp-4);
  border-block: 1px solid var(--line);
  font-family: var(--font-serif);
  font-style: italic;
  font-size: clamp(1.25rem, 1rem + 1.2vw, 1.75rem);
  font-weight: 400;
  color: var(--fg);
  line-height: 1.3;
  letter-spacing: -0.01em;
  max-width: 32ch;
}
.cs-pull .mark { color: var(--accent); }

/* Kv table — for metrics / results */
.cs-kv {
  display: grid; grid-template-columns: repeat(3, 1fr);
  gap: var(--sp-4);
  margin-top: var(--sp-4);
  padding-top: var(--sp-4);
  border-top: 1px solid var(--line);
}
@media (max-width: 560px) { .cs-kv { grid-template-columns: 1fr 1fr; } }
@media (max-width: 360px) { .cs-kv { grid-template-columns: 1fr; } }
.cs-kv .cell { display: flex; flex-direction: column; gap: var(--sp-1); }
.cs-kv .cell .v {
  font-size: var(--fs-xl); font-weight: 500;
  letter-spacing: -0.02em; line-height: 1;
}
.cs-kv .cell .v em { font-family: var(--font-serif); font-style: italic; color: var(--accent); font-weight: 400; }
.cs-kv .cell .k {
  font-size: var(--fs-xs); color: var(--fg-subtle);
  text-transform: uppercase; letter-spacing: 0.08em; margin-top: var(--sp-1);
}

/* Next project card */
.cs-next {
  padding-block: clamp(2.5rem, 5vw, 4rem);

}
.cs-next .label {
  font-size: var(--fs-sm); color: var(--fg-subtle);
  display: block; margin-bottom: var(--sp-4);
}
.cs-next-card {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: var(--sp-5);
  align-items: center;
  padding: var(--sp-5) 0;
  border-top: 1px solid var(--line);
}
.cs-next-card:hover .thumb { transform: translateY(-3px); }
.cs-next-card .thumb { transition: transform 400ms var(--ease); }
.cs-next-card .meta .eyebrow {
  font-size: var(--fs-sm); color: var(--fg-muted); margin-bottom: var(--sp-2);
}
.cs-next-card h3 {
  font-size: var(--fs-lg);
  font-weight: 500;
  letter-spacing: -0.02em; line-height: 1.2;
  transition: color var(--dur) var(--ease);
  max-width: 22ch;
}
.cs-next-card:hover h3 { color: var(--accent); }
.cs-next-card .arr {
  display: inline-flex; align-items: center; gap: var(--sp-2);
  margin-top: var(--sp-3); font-size: var(--fs-sm); color: var(--fg-muted);
  transition: gap var(--dur) var(--ease), color var(--dur) var(--ease);
}
.cs-next-card:hover .arr { color: var(--accent); gap: var(--sp-3); }
.cs-next-card .thumb {
  border-radius: var(--radius); overflow: hidden;
  border: 1px solid var(--line); background: var(--card);
  aspect-ratio: 16/10;
  position: relative;
}
@media (max-width: 720px) { .cs-next-card { grid-template-columns: 1fr; } }

/* Global responsive guards */
@media (max-width: 480px) {
  :root { --gutter: 1.1rem; }
  .nav-inner { gap: var(--sp-3); padding-block: var(--sp-3); }
  .brand { font-size: var(--fs-xs); }
  .hero { padding-block: var(--sp-6) var(--sp-5); }
  .hero h1 { hyphens: none; }
  .cs-title { hyphens: none; }
  .cs-chapter h2 { hyphens: none; }
  .project h2 { font-size: clamp(1.375rem, 4.5vw, 1.625rem); hyphens: none; }
}
