/* ============================================================
   YUZHUO ZHANG PORTFOLIO – GLOBAL STYLESHEET
   Design system: Fraunces (display) + Satoshi (body)
   Palette: Cream / Rust / Ink  |  8px spacing grid
   ============================================================ */

/* ── Font Imports ── */
@import url('https://api.fontshare.com/v2/css?f[]=satoshi@900,700,500,400,300&display=swap');
@import url('https://fonts.googleapis.com/css2?family=Fraunces:ital,opsz,wght@0,9..144,400;0,9..144,500;0,9..144,600;0,9..144,700;1,9..144,400;1,9..144,500;1,9..144,600&display=swap');


/* ── Design Tokens ─────────────────────────────────────────── */
:root {

  /* – Font families – */
  --font-display: 'Fraunces', Georgia, serif;
  --font-body:    'Satoshi', 'Helvetica Neue', sans-serif;
  --font-mono:    'JetBrains Mono', 'Courier New', monospace;

  /* – Background: cool blue-gray scale – */
  --bg:           #F5F8FA;   /* page background */
  --bg-subtle:    #EAF0F5;   /* section alt */
  --bg-muted:     #DAE6EF;   /* hover / divider bg */
  --bg-wash:      #C9D8E5;   /* deep blue-gray */

  /* – Text: cool-neutral scale – */
  --text:           #1A1E24;   /* headings, main copy */
  --text-secondary: #566270;   /* body, captions */
  --text-tertiary:  #8C9BAA;   /* disabled, placeholder */
  --text-inverse:   #F5F8FA;   /* on dark bg */

  /* – Accent: steel blue scale (muted) – */
  --rust-50:   #EEF3F9;
  --rust-100:  #CEDDE9;
  --rust-300:  #8AADC7;
  --rust:      #4D6E94;      /* primary CTA */
  --rust-700:  #355384;
  --rust-900:  #1F3459;

  /* – Border – */
  --border:        #C8D8E4;
  --border-subtle: #DAE6EF;

  /* – Surface – */
  --surface:       #FFFFFF;
  --surface-alt:   #F5F8FA;

  /* – Card backgrounds (project-specific) – */
  --card-sleep:      linear-gradient(135deg, #ddd6f3 0%, #e8d5e8 50%, #f0dde8 100%);
  --card-onboarding: linear-gradient(135deg, #fde8c8 0%, #fdd8b0 50%, #fce4cc 100%);
  --card-weather:    linear-gradient(135deg, #f5d5d5 0%, #f0c8d0 50%, #ead8e8 100%);
  --card-edtech:     linear-gradient(135deg, #c8e8f0 0%, #c8dff0 50%, #d5e8f5 100%);
  --card-system:     linear-gradient(135deg, #d5e8d5 0%, #c8dfc8 50%, #d8ead5 100%);

  /* – Spacing: 8px base – */
  --space-1:   8px;
  --space-2:  16px;
  --space-3:  24px;
  --space-4:  32px;
  --space-5:  40px;
  --space-6:  48px;
  --space-8:  64px;
  --space-10: 80px;
  --space-12: 96px;
  --space-16: 128px;

  /* – Layout – */
  --page-x:    var(--space-6);   /* standard horizontal page gutter — use on every new page wrapper */
  --radius:    20px;
  --radius-sm: 12px;
  --radius-xs: 8px;
  --radius-full: 9999px;

  /* – Shadows – */
  --shadow-sm: 0 2px 8px rgba(26,23,20,0.07);
  --shadow-md: 0 4px 20px rgba(26,23,20,0.09);
  --shadow-lg: 0 8px 40px rgba(26,23,20,0.12);
  --shadow-xl: 0 20px 40px rgba(26,23,20,0.14);

  /* – Motion – */
  --transition: cubic-bezier(0.4, 0, 0.2, 1);
  --ease-spring: cubic-bezier(0.34, 1.56, 0.64, 1);
}


/* ── Reset ──────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

body {
  font-family: var(--font-body);
  font-weight: 400;
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  animation: pageFadeIn 0.45s ease both;
}


/* ────────────────────────────────────────────────────────────
   PAGE WRAPPER  — standard horizontal gutter for every new page
   Usage: add class="page-inner" to any full-width section wrapper
──────────────────────────────────────────────────────────────── */
.page-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding-left: var(--page-x);
  padding-right: var(--page-x);
}


/* ────────────────────────────────────────────────────────────
   NAV
──────────────────────────────────────────────────────────────── */
nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px var(--space-6);
  background: rgba(245, 248, 250, 0.88);
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  border-bottom: 1px solid transparent;
  transition: border-color 0.3s var(--transition), background 0.3s var(--transition);
}

nav.scrolled {
  border-bottom-color: var(--border-subtle);
  background: rgba(245, 248, 250, 0.96);
}

/* Logo */
.nav-logo {
  display: flex;
  align-items: center;
  text-decoration: none;
  line-height: 1;
  opacity: 1;
  transition: opacity 0.2s var(--transition);
}
.nav-logo img { height: 32px; width: auto; display: block; }
.nav-logo:hover { opacity: 0.75; }

/* Links */
.nav-links {
  display: flex;
  align-items: center;
  gap: 4px;
  list-style: none;
}

.nav-links a {
  text-decoration: none;
  color: var(--text-secondary);
  font-family: var(--font-body);
  font-size: 15px;
  font-weight: 500;
  padding: 8px 16px;
  border-radius: var(--radius-full);
  transition: color 0.2s var(--transition), background 0.2s var(--transition);
}

.nav-links a:hover {
  color: var(--text);
  background: var(--bg-muted);
}

/* CTA button */
.nav-links .cta {
  background: var(--text);
  color: var(--text-inverse);
  font-weight: 500;
  padding: 9px 20px;
  border-radius: var(--radius-full);
}

.nav-links .cta:hover {
  background: var(--rust);
  color: var(--text-inverse);
}


/* ────────────────────────────────────────────────────────────
   FOOTER
──────────────────────────────────────────────────────────────── */
footer {
  padding: var(--space-3) var(--space-6);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-3);
  background: var(--text);
  color: rgba(250, 246, 240, 0.45);
  font-family: var(--font-body);
  font-size: 14px;
  font-weight: 400;
}

footer .footer-links {
  display: flex;
  gap: var(--space-3);
}

footer a {
  color: rgba(250, 246, 240, 0.55);
  text-decoration: none;
  transition: color 0.2s var(--transition);
}

footer a:hover { color: var(--text-inverse); }

/* Simple footer fallback (for pages that just use the one-liner <footer> tag) */
footer:only-child,
footer:not(:has(.footer-links)) {
  justify-content: center;
}


/* ────────────────────────────────────────────────────────────
   CONTACT STRIP  (above footer, shared across pages)
──────────────────────────────────────────────────────────────── */
.contact-strip {
  padding: var(--space-10) var(--space-6);
  text-align: center;
  background: var(--text);
  color: var(--text-inverse);
}

.contact-strip h2 {
  font-family: var(--font-display);
  font-size: clamp(28px, 4vw, 48px);
  font-weight: 600;
  margin-bottom: var(--space-2);
  letter-spacing: -0.5px;
}

.contact-strip p {
  font-size: 16px;
  color: rgba(250,246,240,0.55);
  margin-bottom: var(--space-4);
}

.contact-links {
  display: flex;
  gap: 12px;
  justify-content: center;
  flex-wrap: wrap;
}

.contact-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(255,255,255,0.08);
  color: var(--text-inverse);
  text-decoration: none;
  font-family: var(--font-body);
  font-size: 14px;
  font-weight: 500;
  padding: 12px 24px;
  border-radius: var(--radius-full);
  border: 1px solid rgba(255,255,255,0.12);
  transition: background 0.2s var(--transition), border-color 0.2s;
}

.contact-link:hover {
  background: rgba(255,255,255,0.15);
  border-color: rgba(255,255,255,0.2);
}


/* ────────────────────────────────────────────────────────────
   BASE TYPOGRAPHY  (used when no extra page styles override)
──────────────────────────────────────────────────────────────── */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-display);
  line-height: 1.15;
  letter-spacing: -0.02em;
  color: var(--text);
}

h1 { font-size: clamp(40px, 6vw, 72px); font-weight: 600; }
h2 { font-size: clamp(28px, 4vw, 48px); font-weight: 600; }
h3 { font-size: clamp(22px, 3vw, 36px); font-weight: 500; }
h4 { font-size: 20px; font-weight: 500; }

p {
  font-family: var(--font-body);
  line-height: 1.75;
  color: var(--text-secondary);
}

a {
  color: var(--rust);
  text-decoration: underline;
  text-underline-offset: 3px;
  transition: color 0.15s var(--transition);
}

a:hover { color: var(--rust-700); }

/* Eyebrow / kicker label – reusable utility */
.eyebrow {
  display: inline-block;
  font-family: var(--font-body);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--rust);
}


/* ────────────────────────────────────────────────────────────
   HERO  (index.html)
──────────────────────────────────────────────────────────────── */
.hero {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  padding: 120px var(--space-6) 80px;
  position: relative;
  overflow: hidden;
}

/* Subtle warm background blobs */
.hero-blob {
  position: absolute;
  border-radius: 50%;
  filter: blur(80px);
  opacity: 0.45;
  pointer-events: none;
}

.blob-1 {
  width: 500px; height: 500px;
  background: radial-gradient(circle, #C9D8E8 0%, transparent 70%);
  top: -100px; right: -100px;
}

.blob-2 {
  width: 400px; height: 400px;
  background: radial-gradient(circle, #D8E6F0 0%, transparent 70%);
  bottom: 0; left: -80px;
}

.hero-content { position: relative; z-index: 1; max-width: 700px; }

.hero h1 {
  font-family: var(--font-display);
  font-size: clamp(42px, 6vw, 72px);
  font-weight: 600;
  color: var(--text);
  line-height: 1.1;
  letter-spacing: -0.03em;
  margin-bottom: var(--space-3);
  animation: fadeUp 0.8s var(--transition) both;
}

.hero-meta {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin-bottom: var(--space-3);
  animation: fadeUp 0.8s 0.1s var(--transition) both;
}

.hero-meta span {
  font-size: 15px;
  color: var(--text-secondary);
  font-weight: 400;
}

.hero-tagline {
  font-size: 17px;
  color: var(--text-secondary);
  line-height: 1.7;
  max-width: 500px;
  margin: 0 auto;
  animation: fadeUp 0.8s 0.2s var(--transition) both;
}


/* ────────────────────────────────────────────────────────────
   WORKS SECTION
──────────────────────────────────────────────────────────────── */
.section-label {
  font-family: var(--font-body);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-secondary);
  margin-bottom: var(--space-4);
}

.works {
  padding: 0 var(--space-6) 120px;
  max-width: 1200px;
  margin: 0 auto;
}

.cards-stack {
  display: flex;
  flex-direction: column;
  gap: 24px;
}


/* ────────────────────────────────────────────────────────────
   PROJECT CARD
──────────────────────────────────────────────────────────────── */
.card {
  border-radius: var(--radius);
  padding: var(--space-6);
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-6);
  align-items: center;
  position: relative;
  overflow: hidden;
  transition: transform 0.4s var(--transition), box-shadow 0.4s var(--transition);
}

.card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
}

.card-sleep      { background: var(--card-sleep); }
.card-onboarding { background: var(--card-onboarding); }
.card-weather    { background: var(--card-weather); }
.card-edtech     { background: var(--card-edtech); }
.card-system     { background: var(--card-system); }

.card-left { display: flex; flex-direction: column; gap: var(--space-2); }

.card-tag {
  display: inline-block;
  font-family: var(--font-body);
  font-size: 12px;
  font-weight: 600;
  color: var(--text-secondary);
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.card h2 {
  font-family: var(--font-display);
  font-size: clamp(22px, 2.5vw, 30px);
  font-weight: 600;
  line-height: 1.2;
  letter-spacing: -0.02em;
  color: var(--text);
}

.card-subtitle {
  font-size: 14px;
  font-weight: 400;
  color: var(--text-secondary);
  font-style: italic;
}

.card-desc {
  font-size: 15px;
  color: var(--text-secondary);
  line-height: 1.7;
  max-width: 380px;
}

.card-footer {
  display: flex;
  align-items: center;
  gap: var(--space-4);
  margin-top: var(--space-1);
  flex-wrap: wrap;
}

/* Card button */
.card-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--text);
  color: var(--text-inverse);
  text-decoration: none;
  font-family: var(--font-body);
  font-size: 14px;
  font-weight: 500;
  padding: 11px 22px;
  border-radius: var(--radius-full);
  transition: background 0.2s var(--transition), transform 0.2s;
}

.card-btn:hover {
  background: var(--rust);
  color: var(--text-inverse);
  transform: translateY(-1px);
}

.card-btn-ghost {
  background: rgba(0,0,0,0.10);
  color: var(--text);
}

.card-btn-ghost:hover {
  background: rgba(0,0,0,0.18);
  color: var(--text);
}

/* Stats */
.card-stats { display: flex; gap: 28px; }

.stat { display: flex; flex-direction: column; gap: 2px; }

.stat-label {
  font-size: 14px;
  color: var(--text-secondary);
  font-weight: 500;
  letter-spacing: 0.04em;
}

.stat-value {
  font-family: var(--font-display);
  font-size: 26px;
  font-weight: 600;
  color: var(--text);
  letter-spacing: -0.03em;
  line-height: 1;
}

/* Card image area */
.card-right {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
}

.card-img-wrap {
  width: 100%;
  aspect-ratio: 4/3;
  border-radius: var(--radius-sm);
  overflow: hidden;
  background: rgba(255,255,255,0.5);
  display: flex;
  align-items: center;
  justify-content: center;
}

.card-img-wrap img { width: 100%; height: 100%; object-fit: cover; }

.img-placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 8px;
  color: rgba(0,0,0,0.3);
  font-size: 14px;
}

.img-placeholder svg { opacity: 0.4; }


/* ────────────────────────────────────────────────────────────
   ABOUT PAGE
──────────────────────────────────────────────────────────────── */
.about-body { padding-top: 100px; }

.about-hero {
  min-height: 60vh;
  display: flex;
  align-items: center;
  padding: 140px var(--space-6) 80px;
  position: relative;
  overflow: hidden;
}

.about-content {
  max-width: 1200px;
  margin: 0 auto;
  width: 100%;
  display: grid;
  grid-template-columns: 1fr 1.2fr;
  gap: 80px;
  align-items: center;
}

.about-left h1 {
  font-family: var(--font-display);
  font-size: clamp(36px, 5vw, 60px);
  font-weight: 600;
  line-height: 1.1;
  letter-spacing: -0.03em;
  color: var(--text);
  margin-bottom: var(--space-3);
}

.about-left .tagline {
  font-size: 17px;
  color: var(--text-secondary);
  line-height: 1.75;
  margin-bottom: var(--space-4);
}

.about-right { display: flex; flex-direction: column; gap: var(--space-4); }

.about-photo {
  width: 100%;
  aspect-ratio: 3/4;
  border-radius: var(--radius);
  background: var(--card-sleep);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-secondary);
  font-size: 14px;
  flex-direction: column;
  gap: 8px;
}

.about-section { max-width: 1200px; margin: 0 auto; width: 100%; padding: 0 var(--space-6) 80px; }

.about-section h2 {
  font-family: var(--font-display);
  font-size: 32px;
  font-weight: 500;
  margin-bottom: var(--space-3);
  letter-spacing: -0.02em;
}

.about-section p {
  font-size: 16px;
  color: var(--text-secondary);
  line-height: 1.8;
  max-width: 640px;
}

.skills-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 12px;
  margin-top: var(--space-3);
}

.skill-chip {
  background: var(--surface);
  border-radius: var(--radius-full);
  padding: 10px 20px;
  font-size: 14px;
  font-weight: 500;
  color: var(--text);
  text-align: center;
  border: 1px solid var(--border-subtle);
}


/* ────────────────────────────────────────────────────────────
   CASE STUDY PAGES
──────────────────────────────────────────────────────────────── */
.cs-body { padding-top: 80px; }

/* ── Back link ── */
.cs-back {
  max-width: 1200px;
  margin: 0 auto;
  padding: var(--space-4) 0 0;
}

.cs-back-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 14px;
  font-weight: 500;
  transition: color 0.2s var(--transition), gap 0.2s;
}

.cs-back-link:hover { color: var(--rust); gap: 12px; }

/* ── Hero ── */
.cs-hero {
  max-width: 1200px;
  margin: 0 auto;
  padding: 40px 0 60px;
}

.cs-hero-tag {
  display: inline-block;
  font-family: var(--font-body);
  font-size: 12px;
  font-weight: 600;
  color: var(--rust);
  text-transform: uppercase;
  letter-spacing: 0.12em;
  margin-bottom: var(--space-2);
}

.cs-hero h1 {
  font-family: var(--font-display);
  font-size: clamp(32px, 5vw, 60px);
  font-weight: 600;
  line-height: 1.1;
  letter-spacing: -0.03em;
  margin-bottom: var(--space-2);
  animation: fadeUp 0.8s var(--transition) both;
}

.cs-hero-subtitle {
  font-size: 18px;
  color: var(--text-secondary);
  line-height: 1.65;
  max-width: 640px;
  margin-bottom: var(--space-6);
  animation: fadeUp 0.8s 0.1s var(--transition) both;
}

/* Hero image placeholder */
.cs-hero-img {
  width: 100%;
  aspect-ratio: 16/9;
  border-radius: var(--radius);
  background: var(--card-sleep);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 12px;
  color: rgba(0,0,0,0.3);
  font-size: 14px;
  overflow: hidden;
  animation: fadeUp 0.8s 0.2s var(--transition) both;
}

.cs-hero-img img { width: 100%; height: 100%; object-fit: cover; border-radius: var(--radius); }
.cs-hero-img.edtech-bg   { background: var(--card-edtech); }
.cs-hero-img.system-bg   { background: var(--card-system); }
.cs-hero-img.onboard-bg  { background: var(--card-onboarding); }
.cs-hero-img.weather-bg  { background: var(--card-weather); }

/* ── Overview grid ── */
.cs-overview {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 0 60px;
}

.cs-overview-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  background: var(--surface);
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-subtle);
  overflow: hidden;
}

.cs-overview-item {
  padding: 28px 32px;
  border-right: 1px solid var(--border-subtle);
}

.cs-overview-item:last-child { border-right: none; }

.cs-overview-label {
  font-family: var(--font-body);
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-secondary);
  margin-bottom: 8px;
}

.cs-overview-value {
  font-size: 15px;
  font-weight: 500;
  color: var(--text);
  line-height: 1.5;
}

/* ── Content sections ── */
.cs-section {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 0 var(--space-8);
}

.cs-section-title {
  font-family: var(--font-display);
  font-size: clamp(26px, 3.5vw, 40px);
  font-weight: 500;
  letter-spacing: -0.02em;
  margin-bottom: var(--space-3);
}

.cs-section-text {
  font-size: 17px;
  color: var(--text-secondary);
  line-height: 1.8;
  max-width: 720px;
  margin-bottom: 20px;
}

.cs-section-text:last-child { margin-bottom: 0; }
.cs-section-text strong { color: var(--text); font-weight: 600; }

/* ── Image blocks ── */
.cs-img-block {
  width: 100%;
  aspect-ratio: 16/9;
  border-radius: var(--radius-sm);
  background: var(--bg-subtle);
  border: 1.5px dashed var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 12px;
  color: var(--text-tertiary);
  font-size: 14px;
  margin: var(--space-4) 0;
  overflow: hidden;
}

.cs-img-block img { width: 100%; height: 100%; object-fit: cover; }
.cs-img-block svg { opacity: 0.4; }
.cs-img-block.tall { aspect-ratio: 4/3; }

.cs-img-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  margin: var(--space-4) 0;
}

.cs-img-grid .cs-img-block { margin: 0; }

/* ── Process steps ── */
.cs-steps {
  display: flex;
  flex-direction: column;
  gap: 28px;
  margin-top: var(--space-4);
}

.cs-step {
  display: grid;
  grid-template-columns: 44px 1fr;
  gap: 20px;
  align-items: start;
}

.cs-step-num {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--text);
  color: var(--text-inverse);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-display);
  font-size: 17px;
  font-weight: 500;
  flex-shrink: 0;
  margin-top: 2px;
}

.cs-step-content h4 {
  font-size: 17px;
  font-weight: 600;
  margin-bottom: 6px;
  color: var(--text);
}

.cs-step-content p {
  font-size: 15px;
  color: var(--text-secondary);
  line-height: 1.75;
}

/* ── Key decisions grid ── */
.cs-decisions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-top: var(--space-4);
}

.cs-decision-card {
  background: var(--surface);
  border-radius: var(--radius-sm);
  padding: 28px;
  border: 1px solid var(--border-subtle);
}

.cs-decision-card h4 {
  font-size: 16px;
  font-weight: 600;
  margin-bottom: 10px;
  color: var(--text);
}

.cs-decision-card p {
  font-size: 14px;
  color: var(--text-secondary);
  line-height: 1.7;
}

/* ── Outcome metrics ── */
.cs-metrics {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  margin-top: var(--space-5);
}

.cs-metric {
  text-align: center;
  padding: 40px 20px;
  background: var(--surface);
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-subtle);
}

.cs-metric-value {
  font-family: var(--font-display);
  font-size: clamp(36px, 5vw, 60px);
  font-weight: 600;
  letter-spacing: -0.03em;
  color: var(--rust);
  margin-bottom: 8px;
  line-height: 1;
}

.cs-metric-label {
  font-size: 14px;
  color: var(--text-secondary);
  font-weight: 500;
}

/* ── Section divider ── */
.cs-divider {
  max-width: 1200px;
  margin: 0 auto var(--space-8);
  padding: 0;
}

.cs-divider hr {
  border: none;
  border-top: 1px solid var(--border-subtle);
}

/* ── Next case study ── */
.cs-next-nav {
  background: var(--text);
  color: var(--text-inverse);
  padding: 80px 0;
  text-align: center;
}

.cs-next-label {
  font-family: var(--font-body);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgba(250,246,240,0.4);
  margin-bottom: var(--space-2);
}

.cs-next-nav h3 {
  font-family: var(--font-display);
  font-size: clamp(24px, 3.5vw, 40px);
  font-weight: 500;
  margin-bottom: var(--space-4);
  letter-spacing: -0.02em;
  color: var(--text-inverse);
}

.cs-next-link {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  background: rgba(255,255,255,0.08);
  color: var(--text-inverse);
  text-decoration: none;
  font-family: var(--font-body);
  font-size: 15px;
  font-weight: 500;
  padding: 14px 28px;
  border-radius: var(--radius-full);
  border: 1px solid rgba(255,255,255,0.15);
  transition: background 0.2s var(--transition), transform 0.2s;
}

.cs-next-link:hover {
  background: var(--rust);
  border-color: var(--rust);
  transform: translateY(-2px);
}


/* ────────────────────────────────────────────────────────────
   CONTACT STANDALONE PAGE
──────────────────────────────────────────────────────────────── */
.contact-page {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  padding: 120px var(--space-6) 80px;
}

.contact-page h1 {
  font-family: var(--font-display);
  font-size: clamp(40px, 6vw, 72px);
  font-weight: 600;
  letter-spacing: -0.03em;
  margin-bottom: 20px;
  animation: fadeUp 0.8s var(--transition) both;
}

.contact-subtext {
  font-size: 18px;
  color: var(--text-secondary);
  margin-bottom: var(--space-6);
  animation: fadeUp 0.8s 0.1s var(--transition) both;
}

.contact-page-links {
  display: flex;
  flex-direction: column;
  gap: 14px;
  align-items: center;
  animation: fadeUp 0.8s 0.2s var(--transition) both;
}

.contact-page-link {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  background: var(--text);
  color: var(--text-inverse);
  text-decoration: none;
  font-family: var(--font-body);
  font-size: 16px;
  font-weight: 500;
  padding: 16px 36px;
  border-radius: var(--radius-full);
  min-width: 260px;
  justify-content: center;
  transition: background 0.2s var(--transition), transform 0.2s;
}

.contact-page-link:hover {
  background: var(--rust);
  color: var(--text-inverse);
  transform: translateY(-2px);
}

.contact-page-link.secondary {
  background: transparent;
  color: var(--text);
  border: 1.5px solid var(--border);
}

.contact-page-link.secondary:hover {
  background: var(--bg-muted);
  border-color: var(--rust-300);
  color: var(--text);
  transform: translateY(-2px);
}


/* ────────────────────────────────────────────────────────────
   PLACEHOLDER PAGES  (coming soon)
──────────────────────────────────────────────────────────────── */
.cs-placeholder {
  min-height: 80vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  padding: 120px var(--space-6) 80px;
}

.cs-placeholder-tag {
  font-family: var(--font-body);
  font-size: 12px;
  font-weight: 600;
  color: var(--rust);
  text-transform: uppercase;
  letter-spacing: 0.12em;
  margin-bottom: 20px;
}

.cs-placeholder h1 {
  font-family: var(--font-display);
  font-size: clamp(32px, 5vw, 56px);
  font-weight: 600;
  letter-spacing: -0.03em;
  margin-bottom: 20px;
  animation: fadeUp 0.8s var(--transition) both;
}

.cs-placeholder p {
  font-size: 18px;
  color: var(--text-secondary);
  max-width: 480px;
  line-height: 1.75;
  margin-bottom: 40px;
  animation: fadeUp 0.8s 0.1s var(--transition) both;
}

.cs-placeholder-back {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--text);
  color: var(--text-inverse);
  text-decoration: none;
  font-family: var(--font-body);
  font-size: 15px;
  font-weight: 500;
  padding: 13px 28px;
  border-radius: var(--radius-full);
  transition: background 0.2s var(--transition), transform 0.2s;
  animation: fadeUp 0.8s 0.2s var(--transition) both;
}

.cs-placeholder-back:hover {
  background: var(--rust);
  transform: translateY(-2px);
}


/* ────────────────────────────────────────────────────────────
   ANIMATIONS
──────────────────────────────────────────────────────────────── */
@keyframes pageFadeIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}

@keyframes fadeUp {
  from { opacity: 0; transform: translateY(24px); }
  to   { opacity: 1; transform: translateY(0); }
}

.reveal {
  opacity: 0;
  transform: translateY(32px);
  transition: opacity 0.7s var(--transition), transform 0.7s var(--transition);
}

.reveal.visible { opacity: 1; transform: translateY(0); }

.d1 { transition-delay: 0.1s; }
.d2 { transition-delay: 0.2s; }
.d3 { transition-delay: 0.3s; }
.d4 { transition-delay: 0.4s; }


/* ────────────────────────────────────────────────────────────
   NAV SCROLL EFFECT  (attach via JS – see snippet below)
──────────────────────────────────────────────────────────────── */
/*
  Add to each page <script>:
  window.addEventListener('scroll', () => {
    document.querySelector('nav').classList.toggle('scrolled', scrollY > 40);
  });
*/


/* ────────────────────────────────────────────────────────────
   RESPONSIVE
──────────────────────────────────────────────────────────────── */
@media (max-width: 768px) {
  /* Universal horizontal gutter narrows on mobile */
  :root { --page-x: var(--space-3); }

  nav { padding: 16px 24px; }

  .hero { padding: 100px var(--page-x) 60px; }
  .works { padding: 0 var(--page-x) 80px; }

  .card { grid-template-columns: 1fr; padding: 32px; gap: 28px; }
  .card-right { order: -1; }
  .card-img-wrap { aspect-ratio: 16/9; }

  .about-content { grid-template-columns: 1fr; gap: 40px; }
  .about-left { order: 1; }
  .about-right { order: -1; }
  .about-photo { aspect-ratio: 1/1; }

  .contact-strip { padding: 60px var(--page-x); }
  .contact-page  { padding: 120px var(--page-x) 60px; }
  .cs-placeholder { padding: 120px var(--page-x) 60px; }

  .cs-divider   { padding: 0; }

  .cs-overview-grid { grid-template-columns: 1fr 1fr; }
  .cs-overview-item { border-right: none; border-bottom: 1px solid var(--border-subtle); }
  .cs-overview-item:nth-child(odd)  { border-right: 1px solid var(--border-subtle); }
  .cs-overview-item:nth-child(even) { border-right: none; }
  .cs-overview-item:nth-last-child(-n+2) { border-bottom: none; }

  .cs-img-grid  { grid-template-columns: 1fr; }
  .cs-decisions { grid-template-columns: 1fr; }
  .cs-metrics   { grid-template-columns: 1fr 1fr; }
  .cs-step      { grid-template-columns: 36px 1fr; gap: 14px; }
  .cs-next-nav  { padding: 60px 0; }

  footer { flex-direction: column; text-align: center; gap: 12px; }
}

@media (max-width: 480px) {
  .cs-metrics       { grid-template-columns: 1fr; }
  .cs-overview-grid { grid-template-columns: 1fr; }
  .cs-overview-item { border-right: none !important; }
}
