:root {
  --ink: #171410;
  --paper: #fffaf2;
  --paper-2: #fff0d9;
  --line: rgba(23, 20, 16, 0.16);
  --line-strong: #171410;
  --muted: #6b6255;
  --muted-2: #8f8575;
  --cover-ink: #fffaf2;
  --red: #e0122b;
  --red-deep: #9c0c1f;
  --gold: #d99a2b;
  --serif-display: "Source Serif 4", Georgia, serif;
  --sans-head: "Oswald", "Arial Narrow", sans-serif;
  --sans-meta: "Oswald", "Arial Narrow", sans-serif;
  --serif-body: "Source Serif 4", Georgia, serif;
  --grain: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix type='matrix' values='0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.03 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

* { box-sizing: border-box; }

html, body {
  height: 100%;
  margin: 0;
  background: #0c0a08;
  color: var(--ink);
  font-family: var(--serif-body);
  overflow: hidden;
}

.stage {
  position: relative;
  width: 100vw;
  height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  perspective: 3000px;
  background: radial-gradient(ellipse at 50% 42%, #221a15 0%, #0e0b08 65%, #050403 100%);
}

.side-label {
  position: fixed;
  top: 50%;
  transform: translateY(-50%) rotate(180deg);
  writing-mode: vertical-rl;
  letter-spacing: 0.3em;
  font-family: var(--sans-meta);
  font-weight: 500;
  font-size: 10px;
  color: rgba(255, 250, 242, 0.3);
  text-transform: uppercase;
}
.side-label.left { left: 26px; }
.side-label.right { right: 26px; transform: translateY(-50%) rotate(0deg); }

.book {
  position: relative;
  width: min(94vw, 1180px);
  height: min(80vh, 700px);
  transform-style: preserve-3d;
}

/* Base page = warm editorial interior */
.page {
  position: absolute;
  inset: 0;
  background: var(--paper);
  background-image:
    var(--grain),
    linear-gradient(180deg, var(--paper-2), transparent 45%);
  background-blend-mode: multiply, normal;
  border: 1px solid var(--line);
  box-shadow: 0 30px 90px rgba(0, 0, 0, 0.6), 0 2px 0 rgba(0,0,0,0.1);
  transform-origin: left center;
  backface-visibility: hidden;
  transform: rotateY(0deg);
  transition: transform 0.9s cubic-bezier(.63,.06,.35,1), box-shadow 0.9s;
  padding: clamp(26px, 3.2vw, 52px);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  color: var(--ink);
}

.page::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(to right, rgba(0,0,0,0.1), transparent 5%);
  z-index: 5;
}

.page.flipped {
  transform: rotateY(-172deg);
  box-shadow: none;
}

.page.turning::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(to right, transparent 55%, rgba(0,0,0,0.25));
  z-index: 5;
}

.page-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  border-bottom: 3px solid var(--red);
  padding-bottom: 7px;
  margin-bottom: clamp(14px, 2.2vw, 24px);
  flex-shrink: 0;
}

.kicker {
  font-family: var(--sans-meta);
  font-weight: 600;
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--red);
}

.page-no {
  font-family: var(--sans-meta);
  font-weight: 500;
  font-size: 11px;
  letter-spacing: 0.05em;
  color: var(--muted-2);
}

/* ---------- ARTICLE LAYOUT (flowing text, no fixed columns) ---------- */
.article-page { padding: clamp(22px, 2.8vw, 44px); }

.page-content {
  flex: 1;
  min-height: 0;
  overflow: hidden;
  position: relative;
}

.fit-inner {
  transform-origin: top left;
}

.deck {
  font-family: var(--serif-display);
  font-style: italic;
  font-weight: 400;
  color: var(--muted);
  font-size: clamp(13px, 1.15vw, 16px);
  line-height: 1.4;
  margin: 0 0 clamp(12px, 1.8vw, 20px);
  padding-bottom: clamp(12px, 1.8vw, 20px);
  border-bottom: 1px solid var(--line);
}

/* A smaller inset photo that the body text flows around, in full color -
   photography carries the "colorful" feel more than any UI chrome does. */
.inline-photo {
  float: left;
  width: 38%;
  margin: 2px 22px 12px 0;
}
.inline-photo.float-right {
  float: right;
  margin: 2px 0 12px 22px;
}
.inline-photo img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  display: block;
  border: 3px solid var(--ink);
  filter: saturate(1.15) contrast(1.06);
}
.inline-photo.combo {
  width: 46%;
}
.combo-imgs {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.inline-photo.combo img {
  aspect-ratio: 16 / 10;
}

/* A round crop - portraits and logo marks read as an intentional editorial
   badge this way, distinct from a rectangular screenshot inset. */
.inline-photo.round {
  width: 30%;
}
.inline-photo.round img {
  aspect-ratio: 1 / 1;
  border-radius: 50%;
  border: 3px solid var(--red);
}
.inline-photo.round figcaption {
  text-align: center;
}
.inline-photo.round.combo {
  width: 40%;
}
.inline-photo.round.combo .combo-imgs {
  flex-direction: row;
}
.inline-photo.round.combo img {
  width: 48%;
}

.inline-photo.mid-para {
  margin-top: 10px;
}

/* A taller crop for vertically-oriented images (phone screenshots). */
.inline-photo.portrait {
  width: 32%;
}
.inline-photo.portrait img {
  aspect-ratio: 3 / 4;
  object-position: top;
}
.inline-photo.portrait.combo {
  width: 52%;
}
.inline-photo.portrait.combo .combo-imgs {
  flex-direction: row;
}
.inline-photo.portrait.combo img {
  width: 48%;
  aspect-ratio: 3 / 4;
}
.inline-photo figcaption {
  font-family: var(--sans-meta);
  font-weight: 400;
  font-size: 10px;
  color: var(--muted);
  margin-top: 6px;
  line-height: 1.3;
}

/* ---------- COVER / BACK COVER (dark, dramatic, full color) ---------- */
.cover, .backcover {
  padding: 0;
  background: #0c0a08;
  color: var(--cover-ink);
}

.cover-photo {
  position: absolute;
  inset: 0;
}
.cover-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  filter: saturate(1.2) contrast(1.1) brightness(0.82);
}
.cover-scrim-top {
  position: absolute;
  top: 0; left: 0; right: 0; height: 40%;
  background: linear-gradient(to bottom, rgba(4,3,2,0.85), transparent);
}
.cover-scrim-bottom {
  position: absolute;
  bottom: 0; left: 0; right: 0; height: 68%;
  background: linear-gradient(to top, rgba(4,3,2,0.97) 22%, transparent);
}

.cover-frame {
  position: relative;
  z-index: 2;
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  text-align: left;
  padding: clamp(24px, 3.4vw, 52px);
}

.cover-top {
  width: 100%;
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  border-bottom: 4px solid var(--red);
  padding-bottom: 10px;
}

.masthead {
  font-family: var(--sans-head);
  font-weight: 700;
  font-size: clamp(20px, 2.2vw, 26px);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--cover-ink);
}
.masthead.small { font-size: 21px; }

.issue-line {
  font-family: var(--sans-meta);
  font-weight: 500;
  font-size: 10px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--red);
}

.cover-name {
  font-family: var(--sans-head);
  font-weight: 700;
  text-transform: uppercase;
  font-size: clamp(38px, 6vw, 74px);
  line-height: 0.98;
  letter-spacing: -0.005em;
  margin: 0 0 14px;
  color: var(--cover-ink);
  margin-top: clamp(50px, 10vw, 90px);
}

.cover-role {
  font-family: var(--sans-meta);
  font-weight: 600;
  font-size: clamp(12px, 1.1vw, 14px);
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--red);
  margin: 0;
  border-left: 3px solid var(--red);
  padding-left: 10px;
}
.cover-role + .cover-teasers { margin-top: clamp(18px, 2.8vw, 30px); }

.cover-teasers {
  list-style: none;
  padding: clamp(14px, 2.2vw, 22px) 0 0;
  margin: 0;
  border-top: 1px solid rgba(255,250,242,0.25);
  display: flex;
  flex-direction: column;
  gap: 7px;
  font-family: var(--serif-display);
  font-style: italic;
  font-size: clamp(12px, 1.1vw, 14.5px);
  max-width: 480px;
  color: rgba(255,250,242,0.85);
}
.cover-teasers li { padding-left: 14px; position: relative; }
.cover-teasers li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.55em;
  width: 6px;
  height: 6px;
  background: var(--red);
}

.cover-bottom {
  margin-top: auto;
  padding-top: 12px;
  border-top: 1px solid rgba(255,250,242,0.25);
  width: 100%;
  font-family: var(--sans-meta);
  font-weight: 500;
  font-size: 10px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: rgba(255,250,242,0.55);
}

.backcover-inner {
  position: relative;
  z-index: 2;
  margin: auto;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
}
.backcover-tagline {
  font-family: var(--serif-display);
  font-style: italic;
  font-size: clamp(14px, 1.5vw, 18px);
  color: rgba(255,250,242,0.8);
  line-height: 1.5;
}
.backcover-contact {
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-family: var(--sans-meta);
  font-weight: 500;
  font-size: 11px;
  letter-spacing: 0.02em;
  color: rgba(255,250,242,0.92);
}
.backcover-issue {
  margin-top: 16px;
  font-family: var(--sans-meta);
  font-weight: 600;
  font-size: 10px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--red);
}

/* ---------- BODY TEXT ---------- */
.feature-body {
  overflow: hidden; /* clearfix for the floated .inline-photo */
}
.feature-body p {
  font-size: clamp(13px, 1.05vw, 15.5px);
  line-height: 1.62;
  margin: 0 0 12px;
  color: #262019;
  text-align: left;
}

.dropcap {
  float: left;
  font-family: var(--serif-display);
  font-weight: 700;
  font-size: 3.6em;
  line-height: 0.82;
  padding: 0.02em 0.07em 0 0;
  color: var(--red);
}

.skills {
  margin-top: 14px;
  padding-top: 11px;
  border-top: 2px solid var(--ink);
  clear: both;
}
.skills-label {
  display: block;
  font-family: var(--sans-meta);
  font-weight: 600;
  font-size: 10px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--red);
  margin-bottom: 6px;
}
.skills-list {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 16px;
  font-family: var(--sans-meta);
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.02em;
  font-size: clamp(11px, 0.95vw, 13px);
  color: var(--ink);
}

.contact-line {
  margin-top: 12px;
  font-family: var(--sans-meta);
  font-weight: 500;
  font-size: 10.5px;
  letter-spacing: 0.02em;
  color: var(--muted);
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.contact-line span:nth-child(even) { color: var(--red); }

/* ---------- FEATURES ---------- */
.feature-title {
  font-family: var(--sans-head);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: -0.005em;
  font-size: clamp(23px, 2.7vw, 36px);
  margin: 0 0 clamp(8px, 1vw, 12px);
  color: var(--ink);
  line-height: 1.04;
}

.stat-row {
  display: flex;
  gap: 3px;
  margin: 2px 0 14px;
  clear: both;
}
.stat {
  flex: 1;
  padding: 9px 12px;
  background: var(--red);
  color: var(--cover-ink);
}
.stat-num {
  display: block;
  font-family: var(--sans-head);
  font-weight: 700;
  font-size: clamp(20px, 2vw, 26px);
  color: var(--cover-ink);
  line-height: 1;
}
.stat-label {
  display: block;
  margin-top: 4px;
  font-family: var(--sans-meta);
  font-weight: 500;
  font-size: 9.5px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: rgba(255,250,242,0.85);
  line-height: 1.25;
}

.pullquote {
  clear: both;
  font-family: var(--serif-display);
  font-style: italic;
  font-weight: 600;
  font-size: clamp(16px, 1.6vw, 21px);
  line-height: 1.35;
  border-left: 4px solid var(--red);
  padding: 2px 0 2px 16px;
  margin: 6px 0 10px;
  color: var(--ink);
}
.pullquote-cite {
  display: block;
  margin-top: 6px;
  font-family: var(--sans-meta);
  font-style: normal;
  font-weight: 500;
  font-size: 10px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--red);
}

/* ---------- TIMELINE ---------- */
.timeline {
  list-style: none;
  margin: 0;
  padding: 0;
}
.timeline li {
  display: grid;
  grid-template-columns: clamp(84px, 8vw, 108px) 1fr auto;
  gap: 10px;
  align-items: baseline;
  padding: 9px 0;
  border-bottom: 1px solid var(--line);
  font-size: clamp(11px, 0.95vw, 13px);
}
.tl-year {
  font-family: var(--sans-meta);
  font-weight: 600;
  color: var(--red);
}
.tl-role { font-weight: 600; color: var(--ink); }
.tl-org { color: var(--muted); text-align: right; }

/* ---------- RECOGNITION ---------- */
.recognition-list {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: clamp(18px, 2.6vw, 34px);
}
.rec-group h3 {
  font-family: var(--sans-meta);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  font-size: clamp(12px, 1vw, 14px);
  border-bottom: 2px solid var(--red);
  padding-bottom: 6px;
  margin: 0 0 9px;
  color: var(--ink);
}
.rec-group p {
  font-size: clamp(11px, 0.95vw, 13px);
  line-height: 1.5;
  margin: 0 0 9px;
  color: var(--muted);
}
.rec-group p strong, .rec-group p em { color: var(--ink); font-style: normal; }

/* ---------- NAV ---------- */
.nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 46px;
  height: 46px;
  border-radius: 50%;
  border: 1px solid rgba(255,250,242,0.25);
  background: rgba(6,5,4,0.55);
  color: var(--cover-ink);
  font-size: 20px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s, border-color 0.2s, opacity 0.2s;
  z-index: 50;
}
.nav:hover { background: var(--red); border-color: var(--red); }
.nav:disabled { opacity: 0.2; cursor: default; }
.nav.prev { left: clamp(8px, 2.4vw, 40px); }
.nav.next { right: clamp(8px, 2.4vw, 40px); }

.progress {
  position: fixed;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  font-family: var(--sans-meta);
  font-weight: 500;
  font-size: 11px;
  letter-spacing: 0.1em;
  color: rgba(255,250,242,0.55);
}
.progress span:first-child { color: var(--red); }

/* Tablet: scale the inset photo down but keep the float - the compound
   selectors here (.round, .portrait, .combo) are listed explicitly because
   they're MORE specific than a plain .inline-photo override and would
   otherwise win over it regardless of this media query. */
@media (max-width: 980px) {
  .book { width: 94vw; height: 88vh; }
  .page { padding: clamp(18px, 3vw, 32px); }
  .inline-photo,
  .inline-photo.float-right {
    width: 44%;
  }
  .inline-photo.combo { width: 58%; }
  .inline-photo.round { width: 34%; }
  .inline-photo.round.combo { width: 46%; }
  .inline-photo.portrait { width: 40%; }
  .inline-photo.portrait.combo { width: 60%; }
}

/* Mobile: stack full width, but cap round/portrait so a badge or a tall
   phone screenshot can't balloon to fill the entire page. */
@media (max-width: 600px) {
  .side-label { display: none; }
  .book { width: 94vw; height: 90vh; }
  .page { padding: 18px; }
  .cover-name { margin-top: 18vw; }
  .stat-row { flex-direction: column; }
  .recognition-list { grid-template-columns: 1fr; }

  .inline-photo,
  .inline-photo.float-right,
  .inline-photo.combo,
  .inline-photo.round,
  .inline-photo.round.combo,
  .inline-photo.portrait,
  .inline-photo.portrait.combo {
    float: none;
    width: 100%;
    margin: 0 0 14px;
  }
  .inline-photo.round {
    width: min(200px, 55%);
    margin-left: auto;
    margin-right: auto;
  }
  .inline-photo.portrait img,
  .inline-photo.portrait.combo img {
    max-height: 40vh;
  }
}
