/* ════════════════════════════════════════════════════════════
   CRAIG DRUMMOND — A CAREER, UNDERWRITTEN
   token-driven system · dark ink base · per-chapter accents
   ════════════════════════════════════════════════════════════ */

:root {
  /* ink ramp */
  --ink-0: #07090B;
  --ink-1: #0B0E11;
  --ink-2: #12161B;
  --ink-3: #1B2129;
  --ink-4: #2A323C;
  --bone: #F2F1EA;
  --bone-dim: #C9CCC6;
  --muted: #8B959D;

  /* accents (per chapter) */
  --acc-craig: #2FC9DD;   /* underwriting teal */
  --acc-intel: #00C7FD;
  --acc-mfa: #25A7BC;
  --acc-quickdata: #10B981;
  --acc-evolvly: #7C6CFF;
  --acc-cree: #1FB7EA;
  --acc-vivid: #EA4B3F;   /* VividInvests logo red */
  --acc: var(--acc-craig);

  /* type */
  --f-display: 'Bricolage Grotesque', 'Inter', sans-serif;
  --f-body: 'Inter', system-ui, sans-serif;
  --f-mono: 'JetBrains Mono', ui-monospace, monospace;

  /* rhythm */
  --pad: clamp(1.25rem, 4vw, 4.5rem);
  --sect: clamp(6rem, 18vh, 12rem);
  --maxw: 1680px;
}

body[data-theme="intel"] { --acc: var(--acc-intel); }

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: auto; }
html.lenis, html.lenis body { height: auto; }
.lenis.lenis-smooth { scroll-behavior: auto !important; }

body {
  background: var(--ink-1);
  color: var(--bone);
  font-family: var(--f-body);
  font-size: clamp(1rem, 0.95rem + 0.3vw, 1.125rem);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

::selection { background: var(--acc); color: var(--ink-0); }

img, video { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: none; cursor: pointer; }

.mono {
  font-family: var(--f-mono);
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.09em;
  text-transform: uppercase;
}

/* ── Display type: poster density ── */
.display {
  font-family: var(--f-display);
  font-optical-sizing: auto;
  font-weight: 640;
  font-variation-settings: "opsz" 96;
  text-transform: uppercase;
  line-height: 0.88;
  letter-spacing: -0.015em;
  font-size: clamp(2.6rem, 6.5vw, 6.8rem);
  text-wrap: balance;
}
.display em {
  font-style: normal;
  color: var(--acc);
  transition: color 0.5s ease;
}
.display .line { display: block; overflow: hidden; }
.display .line > .line-inner { display: inline-block; will-change: transform; }

.eyebrow { color: var(--acc); margin-bottom: 2.2rem; transition: color 0.5s ease; }

/* ── Sections base ── */
section { position: relative; padding: var(--sect) var(--pad); }
section > * { max-width: var(--maxw); margin-left: auto; margin-right: auto; }

.section--light {
  background: var(--bone);
  color: var(--ink-1);
}
.section--light .display em { color: var(--acc); }

/* ════ Preloader ════ */
.preloader {
  position: fixed; inset: 0; z-index: 100;
  background: var(--ink-0);
  display: flex; align-items: flex-end;
  padding: 2rem;
}
.preloader__tape { display: flex; flex-direction: column; gap: 0.55rem; color: var(--acc-craig); }
.preloader__line { opacity: 0; }
.preloader__line::before { content: "> "; opacity: 0.5; }

/* ════ Fixed chrome ════ */
.chrome {
  position: fixed; z-index: 60; top: 0; left: 0; right: 0;
  display: flex; justify-content: space-between; align-items: center;
  padding: 1.1rem var(--pad);
  mix-blend-mode: difference;
  pointer-events: none;
}
.chrome a { pointer-events: auto; }
.chrome__mark {
  font-size: 0.95rem; font-weight: 700;
  border: 1.5px solid var(--bone); border-radius: 8px;
  padding: 0.3rem 0.5rem; color: var(--bone);
}
.chrome__skip { color: var(--bone); opacity: 0.75; transition: opacity 0.25s; }
.chrome__skip:hover { opacity: 1; }

/* ════ Deal tape ════ */
.tape {
  position: fixed; z-index: 55; left: var(--pad); bottom: 1.4rem;
  width: 300px;
  color: var(--bone-dim);
  background: color-mix(in srgb, var(--ink-0) 78%, transparent);
  backdrop-filter: blur(10px);
  border: 1px solid var(--ink-3);
  border-radius: 10px;
  padding: 0.7rem 0.9rem;
  opacity: 0; transform: translateY(12px);
  transition: opacity 0.5s, transform 0.5s;
}
.tape.is-on { opacity: 1; transform: none; }
.tape__head {
  display: flex; align-items: center; gap: 0.55rem;
  color: var(--bone);
  padding-bottom: 0.5rem; margin-bottom: 0.5rem;
  border-bottom: 1px dashed var(--ink-4);
}
.tape__dot {
  width: 7px; height: 7px; border-radius: 50%;
  background: var(--acc); transition: background 0.5s;
  animation: tapedot 1.6s ease-in-out infinite;
}
@keyframes tapedot { 50% { opacity: 0.35; } }
.tape__score { margin-left: auto; color: var(--acc); transition: color 0.5s; }
.tape__log { display: flex; flex-direction: column; gap: 0.32rem; font-size: 0.62rem; }
.tape__log span { opacity: 0; transform: translateY(6px); }
.tape__log span::before { content: "> "; opacity: 0.45; }
.tape__log span.is-buy { color: var(--acc); font-weight: 700; }

@media (max-width: 1100px) { .tape { display: none; } }

/* ════ 00 · Cover · Career Constellation ════ */
.cover {
  min-height: 100svh;
  display: flex; flex-direction: column; justify-content: flex-end;
  padding-bottom: 7.5rem;
  overflow: hidden;
  background:
    radial-gradient(65% 55% at 72% 18%, #121A22 0%, transparent 62%),
    radial-gradient(40% 40% at 12% 70%, #0E1418 0%, transparent 60%),
    var(--ink-0);
}
.cover::before {
  /* faint dot grid — the graph paper the journey is plotted on */
  content: "";
  position: absolute; inset: 0; z-index: 0;
  background-image: radial-gradient(rgba(242,241,234,0.055) 1px, transparent 1.5px);
  background-size: 34px 34px;
  mask-image: linear-gradient(to bottom, rgba(0,0,0,0.9), rgba(0,0,0,0.25) 75%);
}

/* — the constellation field — */
.cover__field { position: absolute; inset: 0; z-index: 1; max-width: none; }
.cover__canvas { position: absolute; inset: 0; width: 100%; height: 100%; }

.orbit__node {
  position: absolute;
  left: calc(var(--nx) * 1%);
  top: calc(var(--ny) * 1%);
  transform: translate(calc(-50% + var(--gx, 0px)), calc(-50% + var(--gy, 0px)));
  display: flex; flex-direction: column; align-items: center; gap: 0.5rem;
  cursor: pointer;
}
/* breathing brand glow behind each disc — alive before the cursor arrives */
.orbit__node::before {
  content: "";
  position: absolute; top: 0; left: 50%;
  width: 100%; aspect-ratio: 1; border-radius: 50%;
  transform: translateX(-50%);
  box-shadow: 0 0 34px 6px color-mix(in srgb, var(--brand) 38%, transparent);
  animation: orbit-breathe 4.6s ease-in-out infinite;
  pointer-events: none;
}
.orbit__node:nth-of-type(1)::before { animation-delay: 0s; }
.orbit__node:nth-of-type(2)::before { animation-delay: -1.1s; }
.orbit__node:nth-of-type(3)::before { animation-delay: -2.3s; }
.orbit__node:nth-of-type(4)::before { animation-delay: -3.2s; }
.orbit__node:nth-of-type(5)::before { animation-delay: -1.7s; }
.orbit__node:nth-of-type(6)::before { animation-delay: -3.9s; }
.orbit__node:hover::before, .orbit__node:focus-visible::before { opacity: 0; }
@keyframes orbit-breathe {
  0%, 100% { opacity: 0.25; }
  50% { opacity: 0.75; }
}
.orbit__disc {
  display: flex; align-items: center; justify-content: center;
  width: clamp(94px, 10.1vw, 139px); height: clamp(94px, 10.1vw, 139px);
  border-radius: 50%;
  background: color-mix(in srgb, var(--ink-2) 88%, transparent);
  border: 1px solid color-mix(in srgb, var(--brand) 50%, var(--ink-3));
  box-shadow: 0 0 18px color-mix(in srgb, var(--brand) 16%, transparent);
  backdrop-filter: blur(4px);
  transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1),
              border-color 0.3s, box-shadow 0.3s;
}
.orbit__disc img {
  width: 62%; height: 62%; object-fit: contain;
  transition: filter 0.35s, opacity 0.35s;
}
.orbit__disc img.img--wide { width: 84%; }
.orbit__yr {
  font-size: 0.56rem; color: var(--bone-dim);
  transition: color 0.35s;
}
.orbit__node:hover .orbit__disc,
.orbit__node:focus-visible .orbit__disc {
  transform: scale(1.14);
  border-color: var(--brand);
  box-shadow: 0 0 0 1px var(--brand),
              0 0 28px color-mix(in srgb, var(--brand) 45%, transparent),
              0 0 70px color-mix(in srgb, var(--brand) 18%, transparent);
}
/* dark-ink logos (QuickData): light disc so the navy mark reads on dark */
.orbit__node--inv .orbit__disc { background: var(--bone); }
.orbit__node:hover .orbit__yr,
.orbit__node:focus-visible .orbit__yr { color: var(--brand); }
.orbit__node:focus-visible { outline: none; }

.cover__content { position: relative; z-index: 2; width: 100%; pointer-events: none; }
.cover__cap {
  color: var(--muted); margin-top: 1.1rem; min-height: 1.2em;
  transition: color 0.3s;
}
.cover__cap.is-lit { color: var(--cap-color, var(--acc)); }
.cover__eyebrow { color: var(--bone-dim); margin-bottom: 1.6rem; }
.cover__name {
  font-family: var(--f-display);
  font-weight: 700;
  font-variation-settings: "opsz" 96;
  text-transform: uppercase;
  font-size: clamp(3.4rem, 12.5vw, 13rem);
  line-height: 0.84;
  letter-spacing: -0.02em;
}
.cover__row { display: block; overflow: hidden; }
.cover__row .char { display: inline-block; will-change: transform; }
.cover__spec { color: var(--bone-dim); margin-top: 2rem; }
.cover__spec b { color: var(--bone); font-weight: 500; }
@media (max-width: 700px) {
  .cover { padding-bottom: 6rem; }
  .orbit__yr { display: none; }
  .orbit__disc { width: 70px; height: 70px; }
  /* compact constellation: banded nodes (1-4) use fraction-of-available-space,
     full nodes (5-6) use viewport percent */
  .orbit__node:nth-of-type(1) { --nx: 12; --ny: 68; }
  .orbit__node:nth-of-type(2) { --nx: 32; --ny: 30; }
  .orbit__node:nth-of-type(3) { --nx: 52; --ny: 60; }
  .orbit__node:nth-of-type(4) { --nx: 72; --ny: 24; }
  .orbit__node:nth-of-type(5) { --nx: 88; --ny: 26; }
  .orbit__node:nth-of-type(6) { --nx: 30; --ny: 42; }
}
.cover__cue {
  position: absolute; z-index: 2; right: var(--pad); bottom: 1.6rem;
  display: flex; align-items: center; gap: 0.8rem;
  color: var(--bone-dim); font-size: 0.62rem;
}
.cover__cue-line {
  width: 54px; height: 1px; background: var(--bone-dim);
  transform-origin: left; animation: cueline 2.2s ease-in-out infinite;
}
@keyframes cueline { 0% { transform: scaleX(0); } 55% { transform: scaleX(1); } 100% { transform: scaleX(0); transform-origin: right; } }

/* ════ 01 · Thesis ════ */
.thesis { text-align: left; }
.thesis__support {
  max-width: 34em;
  margin-top: 2.6rem;
  font-size: clamp(1.05rem, 1rem + 0.4vw, 1.3rem);
  color: var(--ink-3);
}
.thesis__stats {
  display: grid; grid-template-columns: repeat(4, 1fr);
  gap: 1.5rem; margin-top: 5rem;
  border-top: 1px solid color-mix(in srgb, var(--ink-1) 18%, transparent);
  padding-top: 2.2rem;
}
.stat__num {
  display: block;
  font-family: var(--f-display);
  font-weight: 640; font-variation-settings: "opsz" 60;
  font-size: clamp(1.9rem, 3.6vw, 3.4rem);
  letter-spacing: -0.02em;
}
.stat__label { color: color-mix(in srgb, var(--ink-1) 55%, transparent); display: block; margin-top: 0.4rem; }
@media (max-width: 800px) { .thesis__stats { grid-template-columns: repeat(2, 1fr); } }

/* ════ 02 · Ledger (Intel) ════ */
.ledger { background: var(--ink-0); }
.ledger__head { margin-bottom: 4.5rem; }
.ledger__table { border-top: 1px solid var(--ink-3); }
.ledger__row {
  display: grid;
  grid-template-columns: 7.5rem 1fr auto;
  gap: 1.2rem; align-items: baseline;
  padding: 1.35rem 0.4rem;
  border-bottom: 1px solid var(--ink-3);
}
.ledger__fy { color: var(--acc); transition: color 0.5s; }
.ledger__item { font-size: clamp(0.95rem, 1.3vw, 1.25rem); color: var(--bone-dim); font-weight: 400; }
.ledger__item b { color: var(--bone); font-weight: 600; }
.ledger__val { color: var(--bone-dim); font-size: 0.78rem; }
.ledger__val [data-count] { color: var(--bone); font-weight: 700; }
.ledger__note {
  display: flex; align-items: center; gap: 1.1rem;
  margin-top: 3rem; color: var(--muted); font-size: 1.05rem;
}
.ledger__logo { width: 58px; height: auto; opacity: 0.9; filter: brightness(0) invert(1); opacity: 0.75; }
@media (max-width: 700px) {
  .ledger__row { grid-template-columns: 4.6rem 1fr; }
  .ledger__val { grid-column: 2; }
}

/* ════ Film breaks ════ */
.film {
  min-height: 92svh;
  display: flex; align-items: flex-end;
  overflow: hidden;
  padding-bottom: 5.5rem;
}
.film__video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; max-width: none; }
.film__scrim {
  position: absolute; inset: 0; max-width: none;
  background: linear-gradient(to top, rgba(7,9,11,0.88), rgba(7,9,11,0.18) 50%, rgba(7,9,11,0.3));
}
.film__content { position: relative; z-index: 2; width: 100%; }
.film__caption { color: var(--bone-dim); margin-top: 1.6rem; }
.film__content--low { text-align: right; }

/* ════ 03 · Portfolio stack ════ */
.folio { padding-bottom: 0; }
.folio__head { margin-bottom: 5rem; }
.folio__sub { max-width: 40em; margin-top: 2.2rem; color: var(--muted); font-size: 1.02rem; }
.folio__stack { display: flex; flex-direction: column; gap: 4.5rem; padding-bottom: var(--sect); }

.card {
  --brand: var(--acc-craig);
  --card-bg: var(--ink-2);
  position: sticky;
  top: clamp(4rem, 9vh, 7rem);
  display: grid;
  grid-template-columns: minmax(300px, 5fr) 7fr;
  gap: clamp(1.5rem, 3vw, 3.5rem);
  background: var(--card-bg);
  border: 1px solid var(--ink-3);
  border-radius: 22px;
  padding: clamp(1.6rem, 3vw, 3rem);
  overflow: hidden;
  transform-origin: top center;
}
.card::before {
  content: "";
  position: absolute; inset: 0 auto 0 0; width: 5px;
  background: var(--brand);
}
.card[data-brand="mfa"]       { --brand: var(--acc-mfa); }
.card[data-brand="cohort"]    { --brand: #E8F1F4; }
.card[data-brand="quickdata"] { --brand: var(--acc-quickdata); }
.card[data-brand="evolvly"]   { --brand: var(--acc-evolvly); }
.card[data-brand="cree"]      { --brand: var(--acc-cree); }

.card__info { display: flex; flex-direction: column; align-items: flex-start; gap: 1.05rem; }
.card__logo { max-height: 40px; width: auto; max-width: 150px; object-fit: contain; }
.card__logo--svg { max-height: 30px; filter: brightness(0) invert(1); }
.card__role { color: var(--brand); }
.card__title {
  font-family: var(--f-display);
  font-weight: 660; font-variation-settings: "opsz" 72;
  text-transform: uppercase;
  font-size: clamp(1.7rem, 2.6vw, 2.7rem);
  line-height: 0.92; letter-spacing: -0.01em;
}
.card__desc { color: var(--bone-dim); max-width: 30em; }
.card__chips { display: flex; flex-wrap: wrap; gap: 0.5rem; }
.chip {
  border: 1px solid var(--ink-4);
  color: var(--bone);
  border-radius: 999px;
  padding: 0.42rem 0.85rem;
  font-size: 0.62rem;
}
.card__link { margin-top: auto; color: var(--brand); padding-top: 1rem; }
.card__link:hover { text-decoration: underline; text-underline-offset: 4px; }
.card__shot {
  border-radius: 14px; overflow: hidden;
  border: 1px solid var(--ink-3);
  background: var(--ink-0);
  align-self: center;
}
.card__shot img { width: 100%; height: 100%; object-fit: cover; aspect-ratio: 16/10.5; }
.card__shot--photo img { object-position: center 22%; }
@media (max-width: 900px) {
  .card { grid-template-columns: 1fr; position: relative; top: auto; }
  .folio__stack { gap: 1.6rem; }
}

/* ════ 04 · Sensitivity ════ */
.sens__hint { color: color-mix(in srgb, var(--ink-1) 60%, transparent); margin: 2.4rem 0 1.6rem; min-height: 1.2em; }
.sens__grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  border: 1px solid color-mix(in srgb, var(--ink-1) 20%, transparent);
  border-radius: 14px; overflow: hidden;
}
.sens__cell {
  font-family: var(--f-mono);
  font-size: 0.66rem; font-weight: 500;
  letter-spacing: 0.07em;
  padding: 1.7rem 1rem;
  text-align: left;
  border-right: 1px solid color-mix(in srgb, var(--ink-1) 14%, transparent);
  border-bottom: 1px solid color-mix(in srgb, var(--ink-1) 14%, transparent);
  transition: background 0.22s, color 0.22s;
}
.sens__cell:nth-child(4n) { border-right: none; }
.sens__cell:nth-last-child(-n+4) { border-bottom: none; }
.sens__cell:hover, .sens__cell:focus-visible {
  background: var(--ink-1);
  color: var(--acc);
  outline: none;
}
.sens__legend {
  margin-top: 1.1rem;
  color: color-mix(in srgb, var(--ink-1) 42%, transparent);
  font-size: 0.58rem;
}
@media (max-width: 800px) {
  .sens__grid { grid-template-columns: repeat(2, 1fr); }
  .sens__cell:nth-child(2n) { border-right: none; }
  .sens__cell { padding: 1.15rem 0.85rem; }
  .sens__legend { display: none; }
}

/* ════ 05 · Pro forma ════ */
.proforma { background: var(--ink-0); }
.proforma__cols {
  display: grid; grid-template-columns: repeat(3, 1fr);
  gap: 2rem; margin-top: 4rem;
}
.pf { border-top: 1px solid var(--ink-3); padding-top: 1.6rem; }
.pf__t { color: var(--acc); margin-bottom: 0.9rem; }
.pf__d { color: var(--bone-dim); max-width: 24em; }
@media (max-width: 800px) { .proforma__cols { grid-template-columns: 1fr; } }

/* ════ 06 · Close ════ */
.close { min-height: 100svh; display: flex; flex-direction: column; justify-content: center; }
.close > * { width: 100%; }
.close__verdict {
  display: flex; flex-direction: column; gap: 0.4rem;
  color: var(--muted);
  margin-bottom: 3.2rem;
  font-size: 0.72rem;
}
.close__verdict b { color: var(--acc); }
.close__sub { color: var(--bone-dim); margin-top: 1.8rem; font-size: 1.15rem; }
.close__actions { display: flex; flex-wrap: wrap; gap: 0.9rem; margin-top: 2.6rem; }
.btn {
  font-family: var(--f-mono); font-size: 0.72rem; font-weight: 500;
  letter-spacing: 0.09em; text-transform: uppercase;
  border: 1px solid var(--ink-4);
  color: var(--bone);
  border-radius: 999px;
  padding: 0.95rem 1.7rem 0.95rem 1.9rem;
  display: inline-flex; align-items: center;
  transition: border-color 0.25s, background 0.25s, color 0.25s;
  will-change: transform;
}
.btn:hover { border-color: var(--acc); color: var(--acc); }
.btn--fill { background: var(--acc); border-color: var(--acc); color: var(--ink-0); }
.btn--fill:hover { background: color-mix(in srgb, var(--acc) 85%, white); color: var(--ink-0); }
.close__id {
  display: flex; align-items: center; gap: 1rem;
  margin-top: 4.5rem; color: var(--muted);
}
.close__id img { border-radius: 50%; object-fit: cover; width: 56px; height: 56px; border: 1px solid var(--ink-4); }
.close__id .mono { display: flex; flex-direction: column; gap: 0.3rem; font-size: 0.62rem; }
.close__signoff {
  margin-top: 6rem;
  font-size: clamp(2.4rem, 8.2vw, 8.6rem);
  color: var(--acc);
}
.close__foot {
  margin-top: 3.5rem; padding-top: 1.4rem;
  border-top: 1px solid var(--ink-3);
  color: var(--muted); font-size: 0.6rem;
}

/* ════ data-anim defaults (JS animates in) ════ */
[data-anim] { opacity: 0; transform: translateY(34px); }
.no-motion [data-anim], .no-js [data-anim] { opacity: 1; transform: none; }
.no-motion .display .line-inner, .no-js .display .line-inner { transform: none !important; }
.no-motion .preloader, .no-js .preloader { display: none; }
.no-motion [data-row], .no-js [data-row] { opacity: 1 !important; }
