/* ============================================================
   COOPER JOHNSON PORTFOLIO
   Brand: red #c4242a / near-black #231f20 / light gray #e7e7e7
   Display: Dirtyline Regular (fallback Archivo Black)
   Accent italic: Neue Haas Grotesk Display Pro (fallback Playfair Display)
   Body: Hardcover Var Light (fallback Inter)
   ============================================================ */

/* ---------- Brand fonts ----------
   DIRTYLINE: self-hosted file. Drop it in /fonts (see fonts/README.txt).
   NEUE HAAS + HARDCOVER: served by Adobe Fonts via the <link> in each
   HTML <head>. Do not self-host these (Adobe license forbids it).
   The Adobe CSS family names are used in the stacks below:
   "neue-haas-grotesk-display" and "hardcover-vf" (variable, 200 to 900). */
@font-face {
  font-family: "Dirtyline";
  src: url("fonts/dirtyline-regular.woff2") format("woff2"),
       url("fonts/dirtyline-regular.woff")  format("woff"),
       url("fonts/dirtyline-regular.ttf")   format("truetype"),
       url("fonts/dirtyline-regular.otf")   format("opentype");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

:root {
  --red: #c4242a;
  --ink: #231f20;
  --paper: #e7e7e7;
  --paper-soft: #f1f1f1;
  --white: #ffffff;
  --line: rgba(35, 31, 32, 0.18);
  --line-light: rgba(255, 255, 255, 0.16);
  --maxw: 1200px;
  --pad: clamp(20px, 5vw, 64px);
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  font-family: "hardcover-vf", "Inter", -apple-system, BlinkMacSystemFont, sans-serif;
  font-weight: 300;
  color: var(--ink);
  background: var(--paper);
  line-height: 1.7;
  letter-spacing: 0.035em;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }

/* ---------- Typography ---------- */
.display {
  font-family: "Dirtyline", "Archivo Black", "Inter", sans-serif;
  font-weight: 400;
  letter-spacing: -0.01em;
  line-height: 0.92;
}
.accent {
  font-family: "neue-haas-grotesk-display", "Playfair Display", Georgia, serif;
  font-style: italic;
  color: var(--red);
  font-weight: 300;
}

/* ---------- Header / Nav ---------- */
.site-header {
  position: absolute;
  top: 0; left: 0; right: 0;
  z-index: 20;
  display: flex;
  justify-content: flex-end;
  padding: clamp(18px, 3vw, 32px) var(--pad);
}
.site-header.dark .nav a { color: var(--paper); }
.nav { display: flex; gap: 6px; align-items: center; }
.nav a {
  font-family: "neue-haas-grotesk-display", "Playfair Display", sans-serif;
  font-style: italic;
  font-size: 0.95rem;
  letter-spacing: 0.04em;
  padding: 4px 10px;
  font-weight: 300;
  transition: color 0.2s;
}
.nav a:hover { color: var(--red); }
.site-header.dark .nav a:hover { color: var(--red); }
.nav a.active {
  border: 1.5px solid var(--red);
  color: inherit;
}

/* ---------- Footer ---------- */
.site-footer {
  background: var(--ink);
  color: var(--paper);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px var(--pad);
  gap: 24px;
  flex-wrap: wrap;
}
.footer-mark {
  height: 48px;
  width: auto;
  display: block;
  flex: 0 0 auto;
}
.footer-nav {
  flex: 1 1 auto;
  justify-content: center;
}
.footer-nav a {
  font-family: "neue-haas-grotesk-display", "Playfair Display", serif;
  font-style: italic;
  font-size: 1rem;
  color: var(--paper);
}
.footer-nav a:hover { color: var(--red); }
.footer-nav a.active { color: var(--paper); }
.footer-copy {
  flex: 0 0 auto;
  color: var(--red);
  font-family: "neue-haas-grotesk-display", "Playfair Display", serif;
  font-style: italic;
  font-size: 0.8rem;
  letter-spacing: 0.02em;
  white-space: nowrap;
}

/* ============================================================
   HOME
   ============================================================ */
.hero {
  position: relative;
  background: var(--paper);
  padding: clamp(120px, 18vh, 200px) var(--pad) clamp(60px, 8vh, 100px);
  overflow: hidden;
}
.hero-wordmark {
  position: relative;
  z-index: 2;
  font-size: clamp(3.2rem, 13vw, 11rem);
  max-width: 11ch;
}
.hero-wordmark span { display: block; }
/* refined nameplate graphic in place of the text wordmark */
.hero-wordmark-img {
  position: relative;
  z-index: 2;
  margin: 0;
  width: clamp(280px, 62vw, 720px);
}
.hero-wordmark-img img { width: 100%; height: auto; display: block; }
/* Brush + monogram graphic, right side of hero (matches wireframe) */
.hero-graphic {
  position: absolute;
  top: 50%;
  right: clamp(-10px, 3vw, 70px);
  transform: translateY(-50%);
  height: clamp(240px, 46vw, 600px);
  width: auto;
  z-index: 1;
  pointer-events: none;
}

/* ---------- Work grid ---------- */
.work-grid-section {
  background: var(--paper);
  padding: clamp(40px, 6vh, 80px) var(--pad) clamp(70px, 10vh, 120px);
}
.work-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: clamp(20px, 3vw, 44px);
  max-width: var(--maxw);
  margin: 0 auto;
}
.work-card { display: block; }
.work-card-label {
  font-family: "neue-haas-grotesk-display", "Playfair Display", serif;
  font-style: italic;
  font-size: 1.15rem;
  margin-bottom: 14px;
}
.work-card-frame {
  border: 2px solid var(--red);
  background: var(--white);
  aspect-ratio: 4 / 3;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  transition: box-shadow 0.25s ease;
}
.work-card:hover .work-card-frame {
  box-shadow: 0 14px 34px rgba(196, 66, 42, 0.45);
}
.work-card-frame img { width: 100%; height: 100%; object-fit: cover; }
.work-card-placeholder {
  width: 100%; height: 100%;
  display: flex; align-items: center; justify-content: center;
  background: repeating-linear-gradient(45deg, #f6f6f6, #f6f6f6 12px, #efefef 12px, #efefef 24px);
  color: #aaa;
  font-size: 0.8rem;
  letter-spacing: 0.08em;}

/* ============================================================
   ABOUT
   ============================================================ */
.about { position: relative; }
.about-top {
  background: var(--ink);
  color: var(--paper);
  padding: clamp(110px, 16vh, 170px) var(--pad) clamp(28px, 5vh, 50px);
}
.about-bottom {
  background: var(--paper);
  color: var(--ink);
  padding: clamp(28px, 5vh, 50px) var(--pad) clamp(50px, 8vh, 90px);
  position: relative;
}
.about-inner {
  max-width: var(--maxw);
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr 1fr;
  column-gap: clamp(30px, 5vw, 70px);
  align-items: start;
}
.about-head {
  grid-column: 1 / -1;
  font-size: clamp(3rem, 12vw, 9rem);
  margin-bottom: clamp(24px, 4vh, 44px);
}
.about-bio { grid-column: 1; font-size: 0.95rem; }
.about-bio p { margin-bottom: 1em; }
/* photo straddles the dark/light split, on the right */
.about-photo {
  position: absolute;
  top: clamp(-500px, -39vh, -340px);
  right: max(var(--pad), calc((100% - var(--maxw)) / 2));
  width: min(50%, 500px);
  aspect-ratio: 3 / 4;
  object-fit: cover;
  border: 2px solid var(--red);
  z-index: 2;
}
.about-contact {
  grid-column: 1 / -1;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 8px;
  margin-top: clamp(30px, 5vh, 60px);
  font-size: 0.85rem;
  letter-spacing: 0.03em;
}
.about-contact a:hover { color: var(--red); }

/* ============================================================
   WORK / CASE STUDY
   ============================================================ */
.cs-top {
  background: var(--ink);
  color: var(--paper);
  padding: clamp(90px, 13vh, 150px) var(--pad) clamp(50px, 8vh, 90px);
}
.cs-top-inner {
  max-width: var(--maxw);
  margin: 0 auto;
}
.cs-h1 {
  font-size: clamp(2.6rem, 11vw, 8rem);
  margin-bottom: clamp(28px, 5vh, 56px);
}
.cs-back {
  display: inline-block;
  font-size: 0.8rem;
  letter-spacing: 0.04em;
  color: rgba(231, 231, 231, 0.6);
  margin-bottom: clamp(20px, 4vh, 38px);
}
.cs-back:hover { color: var(--red); }
.cs-project-title {
  font-size: clamp(2.6rem, 9vw, 6rem);
  line-height: 1.02;
  margin-bottom: clamp(24px, 5vh, 52px);
  color: var(--paper);
}
.cs-top .compartment {
  border-color: var(--line-light);
  background: rgba(255, 255, 255, 0.04);
  color: #8d8a8b;
}

.cs-body { max-width: var(--maxw); margin: 0 auto; padding: 0 var(--pad); }

.cs-section { padding: clamp(40px, 6vh, 70px) 0; border-bottom: 1px solid var(--line); }
.cs-section:last-of-type { border-bottom: none; }

.cs-title {
  font-family: "neue-haas-grotesk-display", "Playfair Display", serif;
  font-style: italic;
  color: var(--red);
  font-size: clamp(1.6rem, 4vw, 2.6rem);
  margin-bottom: 24px;
}

.cs-intro-grid {
  display: grid;
  grid-template-columns: 1fr 1.3fr;
  gap: clamp(24px, 4vw, 56px);
  align-items: center;
}

/* filled case study copy */
.cs-copy {
  font-size: 0.98rem;
  line-height: 1.75;
}
.cs-section > .cs-copy + .cs-frame,
.cs-section > .cs-frame + .cs-copy,
.cs-section > .cs-frame + .cs-frame { margin-top: clamp(20px, 3vh, 34px); }

/* red image frames (matches mockup) */
.cs-frame {
  border: 2px solid var(--red);
  padding: clamp(8px, 1.4vw, 16px);
  background: var(--paper);
}
.cs-frame-tight { padding: clamp(16px, 2.4vw, 30px); background: var(--paper); }
/* image fills flush to the red border, no padding band */
.cs-frame-flush { padding: 0; background: none; }
.cs-frame > img { display: block; width: 100%; height: auto; }

/* generic empty compartments to fill later */
.compartment {
  border: 1.5px dashed var(--line);
  background: var(--paper-soft);
  border-radius: 4px;
  min-height: 120px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #9a9a9a;
  font-size: 0.78rem;
  letter-spacing: 0.1em;  text-align: center;
  padding: 24px;
}
.compartment.text { min-height: 90px; }
.compartment.hero-img { aspect-ratio: 16 / 10; min-height: 0; }
.compartment.tall { min-height: 220px; }

/* compartments holding a real image */
.compartment.filled {
  border: none;
  background: var(--white);
  padding: 0;
  overflow: hidden;
}
.cs-top .compartment.filled { background: var(--white); }
.compartment.filled img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.compartment.contain img { object-fit: contain; }
.compartment.palette { aspect-ratio: 16 / 5; min-height: 0; }

.cs-image-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: clamp(8px, 1.2vw, 14px);
}
.cs-image-grid .compartment { aspect-ratio: 1 / 1; min-height: 0; }
.cs-image-grid img { width: 100%; height: 100%; aspect-ratio: 1 / 1; object-fit: cover; display: block; }

/* color palette (transparent png) */
.cs-palette-img img,
.cs-palette-frame > img {
  width: 100%;
  max-width: 860px;
  height: auto;
  display: block;
  margin: 0 auto;
}

/* typography specimens (transparent png) */
.cs-type-specimens {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: clamp(24px, 5vw, 60px);
  align-items: center;
}
.cs-type-specimens img { width: 100%; height: auto; display: block; }

/* process device mockups */
.cs-mockups {
  display: flex;
  flex-direction: column;
  gap: clamp(16px, 2.5vw, 28px);
  margin-top: 24px;
}
.cs-mockups img { width: 100%; height: auto; display: block; border-radius: 4px; }

/* multi-paragraph case study copy */
.cs-copy p { margin-bottom: 1em; }
.cs-copy p:last-child { margin-bottom: 0; }

/* copy + portrait image split (process prototyping) */
.cs-split {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: clamp(24px, 4vw, 56px);
  align-items: center;
}
.cs-split .cs-frame > img { width: 100%; height: auto; }

/* logo variation strip (single wide specimen) — image fills to the red border */
.cs-logo-frame { padding: 0; background: none; }
.cs-logo-frame > img { width: 100%; height: auto; }

/* logo construction diagrams (white line art on black) */
.cs-construct {
  display: grid;
  grid-template-columns: 1.47fr 1fr 1.2fr;
  gap: clamp(10px, 1.6vw, 20px);
  align-items: center;
  margin-top: clamp(20px, 3vh, 34px);
}
.cs-frame.dark { padding: 0; background: #000; line-height: 0; }
.cs-frame.dark > img { width: 100%; height: auto; }

/* results image stack + side-by-side pairs */
.cs-stack {
  display: flex;
  flex-direction: column;
  gap: clamp(16px, 2.5vw, 28px);
  margin-top: clamp(20px, 3vh, 34px);
}
.cs-pair {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(16px, 2.5vw, 28px);
}
.cs-pair .cs-frame > img { width: 100%; aspect-ratio: 4 / 5; height: auto; object-fit: cover; }

/* two framed specimens side by side (palette + fonts) */
.cs-duo {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(16px, 2.5vw, 28px);
  align-items: start;
  margin-top: clamp(20px, 3vh, 34px);
}
.cs-duo .cs-frame { height: 100%; }
.cs-duo .cs-frame > img { width: 100%; height: auto; }

/* process: c