/* ============================================================
   Cole Parsons — portfolio
   Warm paper / ink / signal orange. Fraunces + Inter + JetBrains Mono.
   ============================================================ */

:root {
  --paper: #f6f3ec;
  --paper-deep: #efe9dd;
  --ink: #191612;
  --ink-soft: #4a443c;
  --accent: #ff4d00;
  --accent-soft: #ffe4d6;
  --line: #ddd5c5;
  --card: #fffdf8;
  --nav-bg: rgba(246, 243, 236, 0.82);
  --shadow-sm: 0 2px 10px -2px rgba(25, 22, 18, 0.12);
  --shadow-lg: 0 22px 44px -18px rgba(25, 22, 18, 0.22);
  --spot: rgba(255, 77, 0, 0.08);
  --radius: 18px;
  --font-display: "Fraunces", Georgia, serif;
  --font-body: "Inter", -apple-system, sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, monospace;
  --max: 1160px;
}

:root[data-theme="dark"] {
  --paper: #14110d;
  --paper-deep: #1b1712;
  --ink: #efe9dd;
  --ink-soft: #b3aa9a;
  --accent: #ff6a2b;
  --accent-soft: #3d2415;
  --line: #383124;
  --card: #1d1913;
  --nav-bg: rgba(20, 17, 13, 0.82);
  --shadow-sm: 0 2px 10px -2px rgba(0, 0, 0, 0.5);
  --shadow-lg: 0 22px 44px -18px rgba(0, 0, 0, 0.65);
  --spot: rgba(255, 106, 43, 0.13);
}

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

html { scroll-behavior: smooth; scroll-padding-top: 5rem; }

/* theme change transitions colors, but never on load */
body, .nav, .cluster, .mini-card, .case, .about__principles li,
.skills__toolbox, .btn, .theme-btn, .timeline__item::before {
  transition: background-color 0.35s ease, color 0.35s ease, border-color 0.35s ease;
}

body {
  font-family: var(--font-body);
  background: var(--paper);
  color: var(--ink);
  line-height: 1.65;
  font-size: 1.0625rem;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

/* subtle grain so the paper doesn't feel flat */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 1;
  opacity: 0.05;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='120'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2'/%3E%3C/filter%3E%3Crect width='120' height='120' filter='url(%23n)' opacity='1'/%3E%3C/svg%3E");
}

::selection { background: var(--accent); color: var(--paper); }

h1, h2, h3 { font-family: var(--font-display); font-weight: 600; line-height: 1.08; letter-spacing: -0.015em; }
h2 { font-size: clamp(2rem, 4.6vw, 3.4rem); }
h2 em, h1 em { font-style: italic; color: var(--accent); }

a { color: inherit; }

.eyebrow {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-soft);
  margin-bottom: 1.25rem;
}
.eyebrow::before {
  content: "● ";
  color: var(--accent);
  animation: pulse 2.6s ease-in-out infinite;
}
@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.35; }
}
.eyebrow--dark { color: #b8b0a2; }

.section {
  max-width: var(--max);
  margin: 0 auto;
  padding: clamp(4.5rem, 10vw, 8.5rem) clamp(1.25rem, 5vw, 3rem);
  position: relative;
  z-index: 2;
}
.section__head { max-width: 46rem; margin-bottom: clamp(2.5rem, 6vw, 4.5rem); }
.section__lede { margin-top: 1.25rem; color: var(--ink-soft); font-size: 1.125rem; max-width: 40rem; }

/* ---------------- Scroll progress ---------------- */
.progress {
  position: fixed;
  top: 0; left: 0;
  height: 3px;
  width: 100%;
  background: var(--accent);
  z-index: 100;
  transform: scaleX(0);
  transform-origin: left center;
  will-change: transform;
}

/* ---------------- Mobile menu scrim ---------------- */
.scrim {
  position: fixed;
  inset: 0;
  background: rgba(25, 22, 18, 0.45);
  backdrop-filter: blur(2px);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
  z-index: 45;
}
.scrim.is-visible { opacity: 1; pointer-events: auto; }
body.menu-open { overflow: hidden; }

/* ---------------- Focus visibility ---------------- */
:focus-visible {
  outline: 2.5px solid var(--accent);
  outline-offset: 3px;
  border-radius: 4px;
}
.q summary:focus-visible { outline-offset: -3px; }

/* ---------------- Icons + a11y helpers ---------------- */
.icon { width: 1em; height: 1em; fill: currentColor; flex-shrink: 0; overflow: visible; }
.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
.skip {
  position: fixed;
  top: 0.75rem; left: 0.75rem;
  z-index: 200;
  padding: 0.6rem 1rem;
  border-radius: 999px;
  background: var(--ink);
  color: var(--paper);
  font-family: var(--font-mono);
  font-size: 0.85rem;
  text-decoration: none;
  transform: translateY(-200%);
  transition: transform 0.2s ease;
}
.skip:focus { transform: none; }

/* ---------------- Buttons ---------------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  font-family: var(--font-mono);
  font-size: 0.9rem;
  font-weight: 500;
  text-decoration: none;
  padding: 0.85rem 1.5rem;
  border-radius: 999px;
  border: 1.5px solid var(--ink);
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease, color 0.2s ease;
  cursor: pointer;
}
.btn--solid { background: var(--ink); color: var(--paper); }
.btn--solid:hover { background: var(--accent); border-color: var(--accent); transform: translateY(-2px); box-shadow: 0 8px 24px rgba(255, 77, 0, 0.28); }
.btn--ghost { background: transparent; color: var(--ink); }
.btn--ghost:hover { background: var(--ink); color: var(--paper); transform: translateY(-2px); box-shadow: var(--shadow-sm); }
.nav__cta .icon { transition: transform 0.25s ease; }
.nav__cta:hover .icon { transform: translateX(4px); }
.btn--big { padding: 1.05rem 1.9rem; font-size: 1rem; }

/* ---------------- Nav ---------------- */
.nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.85rem clamp(1.25rem, 4vw, 2.5rem);
  background: var(--nav-bg);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid transparent;
  transition: border-color 0.3s ease;
}
.nav--scrolled { border-bottom-color: var(--line); }
.nav__brand { display: flex; align-items: center; gap: 0.65rem; text-decoration: none; font-weight: 600; }
.nav__mark {
  display: grid;
  place-items: center;
  width: 2rem; height: 2rem;
  background: var(--ink);
  color: var(--accent);
  font-family: var(--font-mono);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  border-radius: 8px;
  transition: transform 0.25s ease;
}
.nav__side { display: flex; align-items: center; gap: 0.75rem; }
.theme-btn {
  display: grid;
  place-items: center;
  width: 2.2rem; height: 2.2rem;
  border-radius: 50%;
  border: 1.5px solid var(--ink);
  background: transparent;
  color: var(--ink);
  font-size: 0.85rem;
  cursor: pointer;
  transition: background 0.2s ease, color 0.2s ease, transform 0.3s ease;
}
.theme-btn:hover { background: var(--ink); color: var(--paper); transform: rotate(18deg); }
.theme-btn .icon { grid-area: 1 / 1; }
.icon--sun, :root[data-theme="dark"] .icon--moon { display: none; }
:root[data-theme="dark"] .icon--sun { display: block; }
.nav__brand:hover .nav__mark { transform: rotate(-12deg); }
.nav__name { font-family: var(--font-display); font-size: 1.05rem; }
.nav__links { display: flex; align-items: center; gap: 1.75rem; }
.nav__links a {
  text-decoration: none;
  font-size: 0.92rem;
  font-weight: 500;
  color: var(--ink-soft);
  transition: color 0.2s ease;
}
.nav__links a:not(.nav__cta) { position: relative; }
.nav__links a:not(.nav__cta)::after {
  content: "";
  position: absolute;
  left: 0; bottom: -5px;
  width: 100%; height: 2px;
  background: var(--accent);
  border-radius: 2px;
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.25s ease;
}
.nav__links a:not(.nav__cta):hover::after,
.nav__links a.is-active::after { transform: scaleX(1); }
.nav__links a:hover { color: var(--accent); }
.nav__links a.is-active { color: var(--ink); font-weight: 600; }
.nav__cta {
  border: 1.5px solid var(--ink);
  border-radius: 999px;
  padding: 0.45rem 1.1rem;
  color: var(--ink) !important;
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
}
.nav__cta:hover { background: var(--ink); color: var(--paper) !important; }
.nav__toggle {
  display: none;
  flex-direction: column;
  gap: 6px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 6px;
}
.nav__toggle span { width: 24px; height: 2px; background: var(--ink); transition: transform 0.25s ease, opacity 0.25s ease; }

/* ---------------- Hero ---------------- */
.hero {
  max-width: var(--max);
  margin: 0 auto;
  padding: clamp(8rem, 16vw, 12rem) clamp(1.25rem, 5vw, 3rem) clamp(3.5rem, 8vw, 6rem);
  position: relative;
  z-index: 2;
}
.hero__title {
  font-size: clamp(2.6rem, 7.2vw, 5.4rem);
  max-width: 20ch;
  margin: 0.5rem 0 1.75rem;
}
.hero__strike { position: relative; white-space: nowrap; }
.hero__strike::after {
  content: "";
  position: absolute;
  left: -2%; right: -2%;
  top: 55%;
  height: 0.09em;
  background: var(--accent);
  border-radius: 2px;
  transform: rotate(-2deg) scaleX(0);
  transform-origin: left center;
  transition: transform 0.7s cubic-bezier(0.22, 1, 0.36, 1) 0.9s;
}
.hero__strike.is-struck::after { transform: rotate(-2deg) scaleX(1); }
.hero__lede { max-width: 38rem; font-size: 1.15rem; color: var(--ink-soft); }
.hero__actions { display: flex; flex-wrap: wrap; gap: 0.9rem; margin-top: 2.25rem; }
.hero__stats {
  list-style: none;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
  margin-top: clamp(3rem, 7vw, 5rem);
  border-top: 1px solid var(--line);
  padding-top: 2rem;
}
.hero__stats strong {
  display: block;
  font-family: var(--font-display);
  font-size: clamp(2.2rem, 4.5vw, 3.2rem);
  font-weight: 600;
  line-height: 1;
}
.hero__stats .unit { color: var(--accent); }
.hero__stats [data-count] { font-variant-numeric: tabular-nums; }
.hero__stats li > span { display: block; margin-top: 0.6rem; font-size: 0.92rem; color: var(--ink-soft); max-width: 24ch; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}

/* ---------------- About ---------------- */
.about__grid {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: clamp(2.5rem, 6vw, 5rem);
  align-items: start;
}
.about__story p + p { margin-top: 1.1rem; }
.about__photo {
  float: right;
  width: min(38%, 215px);
  margin: 0.35rem 0 1.1rem 1.5rem;
}
.about__photo img,
.about__photo-ph {
  width: 100%;
  display: block;
  aspect-ratio: 4 / 5;
  object-fit: cover;
  border-radius: var(--radius);
  border: 1px solid var(--line);
}
.about__photo-ph {
  display: grid;
  place-items: center;
  background: var(--ink);
  color: var(--accent);
  font-family: var(--font-display);
  font-style: italic;
  font-size: clamp(2.5rem, 6vw, 3.5rem);
}
.about__photo figcaption,
.case__media figcaption {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  letter-spacing: 0.02em;
  color: var(--ink-soft);
  margin-top: 0.55rem;
}
.about__drop::first-letter {
  font-family: var(--font-display);
  font-size: 3.4em;
  float: left;
  line-height: 0.85;
  padding: 0.06em 0.12em 0 0;
  color: var(--accent);
}
.about__principles { list-style: none; margin-top: 2rem; display: grid; gap: 1.1rem; }
.about__principles li {
  display: flex;
  gap: 0.9rem;
  align-items: flex-start;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.05rem 1.25rem;
  font-size: 0.95rem;
}
.about__principles .icon { color: var(--accent); margin-top: 0.3rem; }

.timeline { list-style: none; position: relative; padding-left: 1.4rem; }
.timeline::before {
  content: "";
  position: absolute;
  left: 5px; top: 8px; bottom: 8px;
  width: 2px;
  background: var(--line);
}
.timeline__item { position: relative; padding-bottom: 1.9rem; }
.timeline__item:last-child { padding-bottom: 0; }
.timeline__item::before {
  content: "";
  position: absolute;
  left: -1.4rem;
  top: 7px;
  width: 12px; height: 12px;
  border-radius: 50%;
  background: var(--paper);
  border: 2.5px solid var(--ink-soft);
}
.timeline__item--now::before { border-color: var(--accent); background: var(--accent); }
.timeline__when {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  letter-spacing: 0.08em;
  color: var(--ink-soft);
}
.timeline__item strong { display: block; font-size: 1.05rem; margin-top: 0.2rem; }
.timeline__where { font-size: 0.85rem; color: var(--accent); font-weight: 600; }
.timeline__item p { font-size: 0.92rem; color: var(--ink-soft); margin-top: 0.4rem; }

/* ---------------- Skills ---------------- */
.skills__clusters {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.5rem;
}
.cluster {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: clamp(1.5rem, 3vw, 2.25rem);
  transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
}
.cluster:hover {
  transform: translateY(-4px);
  border-color: var(--ink);
  box-shadow: var(--shadow-lg);
}
.cluster header {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  margin-bottom: 1.4rem;
  padding-bottom: 1.1rem;
  border-bottom: 1px dashed var(--line);
}
.cluster__icon {
  display: grid;
  place-items: center;
  width: 2.6rem; height: 2.6rem;
  border-radius: 10px;
  background: var(--accent-soft);
  color: var(--accent);
  font-size: 1.05rem;
}
.cluster h3 { font-size: 1.5rem; }
.cluster ul { list-style: none; display: grid; gap: 1.35rem; }
.cluster li strong { font-size: 1rem; }
.cluster li p { font-size: 0.92rem; color: var(--ink-soft); margin-top: 0.3rem; }
.star { color: var(--accent); }

.skills__toolbox {
  margin-top: 2rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem 2rem;
  align-items: baseline;
  font-size: 0.9rem;
  color: var(--ink-soft);
  border: 1px dashed var(--line);
  border-radius: var(--radius);
  padding: 1.25rem 1.5rem;
}
.skills__toolbox-label {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent);
}
.skills__toolbox b { color: var(--ink); margin-right: 0.4rem; }

/* ---------------- Work ---------------- */
.work__list { display: grid; gap: 2rem; }
.case {
  display: grid;
  grid-template-columns: auto 1fr 240px;
  gap: clamp(1.25rem, 4vw, 3rem);
  align-items: start;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: clamp(1.75rem, 4vw, 3rem);
  transition: border-color 0.25s ease, box-shadow 0.25s ease;
}
.case:hover { border-color: var(--ink); box-shadow: var(--shadow-lg); }
.case__num {
  font-family: var(--font-mono);
  font-size: clamp(2rem, 5vw, 3.25rem);
  font-weight: 700;
  color: transparent;
  -webkit-text-stroke: 1.5px var(--line);
  line-height: 1;
}
.case:hover .case__num { -webkit-text-stroke-color: var(--accent); }
.case .case__kicker {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 0.75rem;
}
.case h3 { font-size: clamp(1.5rem, 3vw, 2.1rem); margin-bottom: 1rem; max-width: 26ch; }
.case p { color: var(--ink-soft); max-width: 62ch; }
.case p + p { margin-top: 0.85rem; }
.case p strong { color: var(--ink); }
/* case figures: small HTML/CSS diagrams, theme-aware, no image requests */
.viz {
  list-style: none;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--paper);
  padding: 1.1rem;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--ink-soft);
}
.viz b { color: var(--ink); font-weight: 700; }
.viz small { display: block; font-size: 0.64rem; opacity: 0.8; margin-top: 0.15rem; }
.viz__title { text-transform: uppercase; letter-spacing: 0.1em; margin-bottom: 0.9rem; color: var(--ink); }
.case p.viz__title { color: var(--ink); max-width: none; }

.bar { display: grid; grid-template-columns: 4.6rem 1fr 1.6rem; align-items: center; gap: 0.5rem; }
.bar + .bar { margin-top: 0.6rem; }
.bar__track { height: 0.6rem; border-radius: 999px; background: var(--paper-deep); overflow: hidden; }
.bar__fill {
  display: block; height: 100%;
  width: calc(var(--v) / 48 * 100%);
  background: var(--ink-soft);
  border-radius: inherit;
  transform-origin: left;
  transition: transform 0.9s cubic-bezier(0.22, 1, 0.36, 1) 0.2s;
}
.bar--hot .bar__fill { background: var(--accent); }
.bar__val { text-align: right; color: var(--ink); font-weight: 700; }
.js .case:not(.is-visible) .bar__fill { transform: scaleX(0); }

.viz--flow { display: grid; gap: 0.45rem; }
.viz--flow li {
  position: relative;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0.45rem 0.7rem;
  background: var(--card);
}
.viz--flow li + li::before {
  content: "";
  position: absolute;
  left: 1rem; top: calc(-0.45rem - 1px);
  width: 1px; height: 0.45rem;
  background: var(--line);
}
.viz--flow .is-warn { border-style: dashed; }
.viz--flow .is-hot { border-color: var(--accent); color: var(--ink); }
.viz--flow .is-hot b { color: var(--accent); font-size: 1rem; }

.viz--ladder { display: grid; gap: 0.4rem; }
.viz--ladder li {
  padding: 0.55rem 0.75rem;
  border-radius: 8px;
  border-left: 4px solid rgb(255 77 0 / var(--o));
  background: color-mix(in srgb, var(--accent) calc(var(--o) * 14%), var(--card));
}

.viz--funnel { display: grid; gap: 0.45rem; background: #191612; border-color: #3a352d; color: #b8b0a2; }
.viz--funnel li {
  width: var(--w);
  padding: 0.55rem 0.75rem;
  border-radius: 8px;
  background: #2a251d;
  border: 1px solid #3a352d;
}
.viz--funnel li:last-child { border-color: var(--accent); }
.viz--funnel b { display: block; color: #f6f3ec; font-size: 1.1rem; line-height: 1.2; }
.case--honest { background: #211d17; border-color: #211d17; }
.case--honest:hover { border-color: var(--accent); }
.case--honest .case__kicker { color: var(--accent); }
.case--honest h3 { color: #f6f3ec; }
.case--honest p { color: #c9c2b4; }
.case--honest p strong { color: #f6f3ec; }
.case--honest .case__num { -webkit-text-stroke-color: #4a443c; }
.case--honest:hover .case__num { -webkit-text-stroke-color: var(--accent); }
.case__tags { list-style: none; display: flex; flex-wrap: wrap; gap: 0.5rem; margin-top: 1.4rem; }
.case__tags li {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  padding: 0.3rem 0.75rem;
  border-radius: 999px;
  border: 1px solid var(--line);
  color: var(--ink-soft);
}
.case--honest .case__tags li { border-color: #4a443c; color: #c9c2b4; }

.work__supporting { margin-top: clamp(3rem, 7vw, 5rem); }
.work__supporting-title { font-size: 1.4rem; margin-bottom: 1.5rem; }
.work__cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.25rem;
}
.mini-card {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.4rem;
  background: var(--card);
  transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}
.mini-card:hover { transform: translateY(-3px); border-color: var(--accent); box-shadow: var(--shadow-lg); }
.mini-card .icon { color: var(--accent); font-size: 1.1rem; }
.mini-card strong { display: block; margin: 0.7rem 0 0.35rem; font-size: 0.98rem; }
.mini-card p { font-size: 0.88rem; color: var(--ink-soft); }
.work__note { margin-top: 1.5rem; font-size: 0.85rem; color: var(--ink-soft); font-style: italic; }

/* ---------------- Questions (dark) ---------------- */
.questions {
  max-width: none;
  background: #191612;
  color: #f6f3ec;
}
.questions > * { max-width: var(--max); margin-left: auto; margin-right: auto; }
.questions h2 { color: #f6f3ec; }
.questions .section__lede { color: #b8b0a2; }

.accordion { display: grid; gap: 0.85rem; }
.q {
  border: 1px solid #3a352d;
  border-radius: var(--radius);
  background: #211d17;
  overflow: hidden;
  transition: border-color 0.25s ease, background 0.25s ease, box-shadow 0.25s ease;
}
.q:hover { border-color: #57503f; }
.q[open] {
  border-color: var(--accent);
  background: #26211a;
  box-shadow: 0 18px 36px -18px rgba(0, 0, 0, 0.6);
}
:root[data-theme="dark"] .q { background: #1e1a14; border-color: #2e2820; }
:root[data-theme="dark"] .q summary:hover { background: #26211a; }
:root[data-theme="dark"] .q[open] { background: #26211a; border-color: var(--accent); }
.q summary {
  display: flex;
  align-items: center;
  gap: 1.1rem;
  padding: 1.25rem 1.5rem;
  cursor: pointer;
  list-style: none;
  user-select: none;
}
.q summary::-webkit-details-marker { display: none; }
.q summary:hover { background: #2a251d; }
.q__num {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--accent);
  flex-shrink: 0;
}
.q__title {
  font-family: var(--font-display);
  font-size: clamp(1.05rem, 2.4vw, 1.35rem);
  font-weight: 500;
  flex: 1;
  transition: color 0.2s ease;
}
.q summary:hover .q__title { color: var(--accent); }
.q__toggle {
  display: grid;
  place-items: center;
  width: 1.9rem; height: 1.9rem;
  border: 1px solid #4a4234;
  border-radius: 50%;
  color: var(--accent);
  font-size: 0.8rem;
  flex-shrink: 0;
  transition: transform 0.3s ease, background 0.3s ease, border-color 0.3s ease, color 0.3s ease;
}
.q summary:hover .q__toggle { border-color: var(--accent); }
.q[open] .q__toggle {
  transform: rotate(135deg);
  background: var(--accent);
  border-color: var(--accent);
  color: #191612;
}
.q__body {
  padding: 0 1.5rem 1.5rem calc(1.5rem + 2.2rem);
  display: grid;
  gap: 0.75rem;
  font-size: 0.95rem;
  color: #c9c2b4;
}
.q[open] .q__body {
  animation: q-open 0.35s ease;
}
@keyframes q-open {
  from { opacity: 0; transform: translateY(-8px); }
  to { opacity: 1; transform: none; }
}
.q__body b { color: #f6f3ec; font-weight: 600; }
.questions__foot { margin-top: 2.5rem; font-style: italic; color: #b8b0a2; font-size: 0.95rem; }

/* ---------------- Contact ---------------- */
.contact { text-align: center; }
.contact .eyebrow { text-align: center; }
.contact__title { font-size: clamp(2.6rem, 6.5vw, 4.75rem); }
.contact__lede { max-width: 34rem; margin: 1.5rem auto 0; color: var(--ink-soft); }
.contact__actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 1rem;
  margin-top: 2.5rem;
}

/* ---------------- Footer ---------------- */
.footer {
  position: relative;
  z-index: 2;
  border-top: 1px solid var(--line);
  padding: 2.5rem clamp(1.25rem, 5vw, 3rem);
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 0.5rem 2rem;
  font-size: 0.85rem;
  color: var(--ink-soft);
}
.footer__note { font-style: italic; }

/* ---------------- Cursor spotlight (added by JS) ---------------- */
.spot { position: relative; }
.spot::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: radial-gradient(560px circle at var(--mx, 50%) var(--my, 50%), var(--spot), transparent 45%);
  opacity: 0;
  transition: opacity 0.35s ease;
  pointer-events: none;
}
@media (hover: hover) {
  .spot:hover::before { opacity: 1; }
}

/* ---------------- Reveal animation ---------------- */
.js .reveal { opacity: 0; transform: translateY(24px); transition: opacity 0.7s ease, transform 0.7s ease; }
.js .reveal.is-visible { opacity: 1; transform: none; }
/* hero animates on load without waiting for script, so it paints fast */
.js .hero .reveal { opacity: 1; transform: none; animation: rise 0.7s ease both; }
.js .hero .reveal:nth-child(2) { animation-delay: 0.08s; }
.js .hero .reveal:nth-child(3) { animation-delay: 0.16s; }
.js .hero .reveal:nth-child(4) { animation-delay: 0.24s; }
.js .hero .reveal:nth-child(5) { animation-delay: 0.32s; }
@keyframes rise {
  from { opacity: 0; transform: translateY(24px); }
  to { opacity: 1; transform: none; }
}
/* stagger grids so cards cascade instead of popping together */
.skills__clusters .cluster:nth-child(2) { transition-delay: 0.1s; }
.skills__clusters .cluster:nth-child(3) { transition-delay: 0.2s; }
.skills__clusters .cluster:nth-child(4) { transition-delay: 0.3s; }
@media (prefers-reduced-motion: reduce) {
  .js .reveal, .js .hero .reveal { opacity: 1; transform: none; transition: none; animation: none; }
  .bar__fill { transition: none; }
  .js .case:not(.is-visible) .bar__fill { transform: none; }
  .eyebrow::before { animation: none; }
  .hero__strike::after { transition: none; transform: rotate(-2deg) scaleX(1); }
  .q[open] .q__body { animation: none; }
}

/* ---------------- Responsive ---------------- */
@media (max-width: 900px) {
  .about__grid { grid-template-columns: 1fr; }
  .skills__clusters { grid-template-columns: 1fr; }
  .work__cards { grid-template-columns: repeat(2, 1fr); }
  .case { grid-template-columns: 1fr; gap: 1.25rem; }
  .case__num { font-size: 1.75rem; }
  .case__media { max-width: 460px; }
}

@media (max-width: 640px) {
  .nav__links {
    position: fixed;
    top: 0; right: 0;
    height: 100dvh;
    width: min(78vw, 320px);
    flex-direction: column;
    align-items: flex-start;
    justify-content: center;
    gap: 1.6rem;
    padding: 2rem;
    background: var(--paper);
    border-left: 1px solid var(--line);
    transform: translateX(100%);
    visibility: hidden;
    transition: transform 0.3s ease, visibility 0s linear 0.3s;
    z-index: 60;
  }
  .nav__links a { font-size: 1.15rem; }
  .nav__links.is-open { transform: translateX(0); visibility: visible; transition: transform 0.3s ease; }
  .nav__toggle { display: flex; z-index: 70; position: relative; }
  .nav__toggle.is-open span:first-child { transform: translateY(4px) rotate(45deg); }
  .nav__toggle.is-open span:last-child { transform: translateY(-4px) rotate(-45deg); }

  .hero__stats { grid-template-columns: 1fr; gap: 1.75rem; }
  .hero__stats li > span { max-width: none; }
  .work__cards { grid-template-columns: 1fr; }
  .q__body { padding-left: 1.5rem; }
  .footer { flex-direction: column; }
  .about__photo { float: none; width: min(60%, 240px); margin: 0 0 1.5rem; }
  .viz--funnel li { width: 100%; }
}
