:root {
  --ink: #171717;
  --muted: #65645f;
  --paper: #f8f5ee;
  --white: #fffdf8;
  --line: rgba(23, 23, 23, 0.14);
  --blue: #0b4fba;
  --amber: #d88a17;
  --green: #20725f;
  --shadow: 0 22px 70px rgba(23, 23, 23, 0.15);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--ink);
  background: var(--paper);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  letter-spacing: 0;
}

a {
  color: inherit;
  text-decoration: none;
}

button,
input {
  font: inherit;
}

.site-header {
  align-items: center;
  backdrop-filter: blur(18px);
  background: rgba(248, 245, 238, 0.78);
  border-bottom: 1px solid var(--line);
  display: flex;
  gap: 28px;
  height: 68px;
  justify-content: space-between;
  left: 0;
  padding: 0 clamp(18px, 4vw, 54px);
  position: fixed;
  right: 0;
  top: 0;
  z-index: 20;
}

.brand-mark {
  align-items: center;
  background: var(--ink);
  color: var(--white);
  display: inline-flex;
  font-weight: 800;
  height: 38px;
  justify-content: center;
  width: 38px;
}

.nav-links {
  display: flex;
  gap: clamp(12px, 2vw, 28px);
  font-size: 0.9rem;
}

.nav-links a,
.header-action {
  color: rgba(23, 23, 23, 0.72);
  transition: color 180ms ease, transform 180ms ease;
}

.nav-links a:hover,
.header-action:hover {
  color: var(--ink);
  transform: translateY(-1px);
}

.header-action {
  border: 1px solid var(--line);
  padding: 9px 14px;
}

.hero {
  align-items: center;
  background:
    radial-gradient(circle at 76% 34%, rgba(216, 138, 23, 0.18), transparent 28%),
    linear-gradient(110deg, #fffdf8 0%, #fffdf8 46%, #f2eadf 100%);
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(360px, 1.1fr);
  min-height: 100svh;
  overflow: hidden;
  padding: 92px clamp(18px, 5vw, 72px) 28px;
  position: relative;
}

.hero-copy {
  max-width: 680px;
  min-width: 0;
  position: relative;
  z-index: 2;
}

.eyebrow {
  color: var(--green);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.14em;
  margin: 0 0 16px;
  text-transform: uppercase;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1 {
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(4rem, 9vw, 7.8rem);
  line-height: 0.86;
  margin-bottom: 24px;
  max-width: 850px;
}

h2 {
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(2.2rem, 5vw, 5.2rem);
  line-height: 0.98;
  margin-bottom: 0;
}

h3 {
  font-size: 1.18rem;
  line-height: 1.1;
  margin-bottom: 10px;
}

.hero-lede {
  color: rgba(23, 23, 23, 0.78);
  font-size: clamp(1.05rem, 1.6vw, 1.35rem);
  line-height: 1.45;
  max-width: 590px;
}

.hero-actions,
.contact-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 24px;
}

.button,
.persona-button,
.filter-button {
  border: 1px solid var(--line);
  cursor: pointer;
  display: inline-flex;
  justify-content: center;
  min-height: 44px;
  padding: 12px 17px;
  transition: background 180ms ease, color 180ms ease, transform 180ms ease, border-color 180ms ease;
}

.button.primary {
  background: var(--ink);
  color: var(--white);
}

.button.secondary {
  background: rgba(255, 253, 248, 0.58);
  color: var(--ink);
}

.button:hover,
.persona-button:hover,
.filter-button:hover,
.stack-cloud button:hover,
.timeline-item:hover {
  transform: translateY(-2px);
}

.persona-switcher {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 28px;
}

.persona-button,
.filter-button {
  background: transparent;
  color: rgba(23, 23, 23, 0.72);
}

.persona-button.active,
.filter-button.active {
  background: var(--blue);
  border-color: var(--blue);
  color: var(--white);
}

.hero-visual {
  align-self: stretch;
  min-width: 0;
  min-height: 640px;
  pointer-events: none;
  position: relative;
}

.persona-stage {
  inset: 0;
  position: absolute;
}

.persona-figure {
  --scale: 0.62;
  --x: 50%;
  --y: 70px;
  bottom: -10px;
  filter: drop-shadow(0 34px 28px rgba(36, 32, 26, 0.18));
  height: min(78svh, 810px);
  left: var(--x);
  max-height: 840px;
  max-width: none;
  object-fit: contain;
  opacity: 0.72;
  position: absolute;
  transform: translateX(-50%) translateY(var(--y)) scale(var(--scale));
  transform-origin: bottom center;
  transition: opacity 260ms ease, transform 460ms ease, left 460ms ease, filter 460ms ease;
}

.hero-visual[data-active="analyst"] [data-persona-figure="analyst"],
.hero-visual[data-active="ml"] [data-persona-figure="ml"],
.hero-visual[data-active="strategy"] [data-persona-figure="strategy"] {
  --scale: 0.88;
  --x: 52%;
  --y: 44px;
  filter: drop-shadow(0 38px 34px rgba(36, 32, 26, 0.24));
  opacity: 1;
  z-index: 3;
}

.hero-visual[data-active="analyst"] [data-persona-figure="strategy"],
.hero-visual[data-active="ml"] [data-persona-figure="analyst"],
.hero-visual[data-active="strategy"] [data-persona-figure="analyst"] {
  --scale: 0.66;
  --x: 21%;
  --y: 58px;
  z-index: 1;
}

.hero-visual[data-active="analyst"] [data-persona-figure="ml"],
.hero-visual[data-active="ml"] [data-persona-figure="strategy"],
.hero-visual[data-active="strategy"] [data-persona-figure="ml"] {
  --scale: 0.66;
  --x: 79%;
  --y: 58px;
  z-index: 1;
}

.signal-readout {
  background: rgba(255, 253, 248, 0.88);
  border-left: 5px solid var(--amber);
  box-shadow: var(--shadow);
  left: 0;
  max-width: 260px;
  padding: 18px 20px;
  position: absolute;
  top: 124px;
  z-index: 5;
}

.signal-readout span,
.project-kicker {
  color: var(--muted);
  display: block;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.1em;
  margin-bottom: 8px;
  text-transform: uppercase;
}

.signal-readout strong {
  display: block;
  font-size: 1.08rem;
  line-height: 1.16;
}

.signal-band {
  border-bottom: 1px solid var(--line);
  border-top: 1px solid var(--line);
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  margin: 0;
}

.signal-band div {
  border-right: 1px solid var(--line);
  min-height: 148px;
  padding: 26px clamp(16px, 3vw, 36px);
}

.signal-band div:last-child {
  border-right: 0;
}

.metric {
  display: block;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(2.1rem, 4vw, 4.6rem);
  line-height: 0.95;
}

.metric-label {
  color: var(--muted);
  display: block;
  line-height: 1.35;
  margin-top: 8px;
  max-width: 210px;
}

.section {
  padding: clamp(74px, 10vw, 136px) clamp(18px, 5vw, 72px);
}

.section-heading {
  display: grid;
  gap: 28px;
  grid-template-columns: minmax(160px, 0.45fr) minmax(0, 1fr);
  margin-bottom: clamp(38px, 5vw, 70px);
}

.section-heading.compact {
  margin-bottom: 28px;
}

.section-heading .eyebrow {
  margin-top: 12px;
}

.workflow {
  border-top: 1px solid var(--line);
  display: grid;
  grid-template-columns: repeat(3, 1fr);
}

.workflow-step {
  border-right: 1px solid var(--line);
  padding: 30px clamp(18px, 3vw, 38px) 6px 0;
}

.workflow-step:last-child {
  border-right: 0;
}

.workflow-step span {
  color: var(--amber);
  display: block;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 2.6rem;
  margin-bottom: 28px;
}

.workflow-step p,
.project-card p,
.timeline-detail p,
.league-note,
.skill-readout {
  color: var(--muted);
  line-height: 1.48;
}

.filter-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 28px;
}

.project-grid {
  display: grid;
  gap: 16px;
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.project-card {
  background: var(--white);
  border: 1px solid var(--line);
  min-height: 350px;
  opacity: 1;
  padding: 24px;
  transform: translateY(0);
  transition: opacity 220ms ease, transform 220ms ease, border-color 220ms ease;
}

.project-card:hover {
  border-color: rgba(11, 79, 186, 0.45);
  transform: translateY(-4px);
}

.project-card.is-hidden {
  display: none;
}

.project-card.spotlight {
  border-top: 5px solid var(--amber);
}

.project-link {
  color: var(--blue);
  display: inline-flex;
  font-weight: 800;
  margin-top: 12px;
  text-decoration: none;
}

.project-link:hover {
  text-decoration: underline;
}

.tag-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 22px;
}

.tag-list span {
  background: #eee8dc;
  color: rgba(23, 23, 23, 0.75);
  font-size: 0.78rem;
  padding: 7px 9px;
}

.league-section {
  background: #161616;
  color: var(--white);
}

.league-section .eyebrow {
  color: #e3a635;
}

.league-section h2 {
  color: var(--white);
}

.league-layout {
  display: grid;
  gap: clamp(28px, 5vw, 70px);
  grid-template-columns: minmax(260px, 0.42fr) minmax(0, 1fr);
}

.league-controls {
  display: grid;
  gap: 24px;
}

.league-day-card {
  border-left: 4px solid #e3a635;
  display: grid;
  gap: 10px;
  padding-left: 18px;
}

.league-day-card span {
  color: rgba(255, 253, 248, 0.54);
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.league-day-card strong {
  color: var(--white);
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(3rem, 7vw, 5.4rem);
  font-variant-numeric: tabular-nums;
  line-height: 0.92;
}

.league-progress {
  background: rgba(255, 253, 248, 0.12);
  height: 4px;
  overflow: hidden;
  width: min(100%, 260px);
}

.league-progress span {
  background: #e3a635;
  display: block;
  height: 100%;
  transition: width 260ms ease;
  width: 10%;
}

.formula-chip {
  color: rgba(255, 253, 248, 0.82);
  display: grid;
  gap: 8px;
}

.formula-chip span {
  color: rgba(255, 253, 248, 0.52);
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.formula-chip strong {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace;
  font-size: 0.88rem;
  line-height: 1.45;
}

.league-note {
  color: rgba(255, 253, 248, 0.6);
  margin-top: 8px;
}

.league-table-wrap {
  overflow-x: auto;
}

.league-table {
  border-collapse: collapse;
  min-width: 720px;
  width: 100%;
}

.league-table th,
.league-table td {
  border-bottom: 1px solid rgba(255, 253, 248, 0.18);
  padding: 16px 12px;
  text-align: left;
}

.league-table th {
  color: rgba(255, 253, 248, 0.58);
  font-size: 0.76rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.league-table td:last-child {
  color: #e3a635;
  font-weight: 900;
}

.league-table td:first-child,
.league-table td:nth-child(3),
.league-table td:nth-child(5),
.league-table td:nth-child(6),
.league-table td:last-child {
  font-variant-numeric: tabular-nums;
}

.timeline-shell {
  display: grid;
  gap: 34px;
  grid-template-columns: minmax(250px, 0.4fr) minmax(0, 1fr);
}

.timeline-list {
  border-top: 1px solid var(--line);
  display: grid;
}

.timeline-item {
  background: transparent;
  border: 0;
  border-bottom: 1px solid var(--line);
  color: var(--ink);
  cursor: pointer;
  display: grid;
  gap: 6px;
  justify-items: start;
  padding: 18px 0;
  text-align: left;
  transition: color 180ms ease, transform 180ms ease;
}

.timeline-item span {
  color: var(--muted);
  font-size: 0.82rem;
}

.timeline-item.active {
  color: var(--blue);
}

.timeline-detail {
  align-self: start;
  background: var(--white);
  border-left: 6px solid var(--blue);
  box-shadow: var(--shadow);
  min-height: 260px;
  padding: clamp(28px, 5vw, 56px);
}

.timeline-detail h3 {
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(1.9rem, 4vw, 4rem);
  line-height: 1;
}

.stack-section {
  padding-top: 0;
}

.stack-cloud {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.stack-cloud button {
  background: transparent;
  border: 1px solid var(--line);
  cursor: pointer;
  font-weight: 800;
  min-height: 48px;
  padding: 12px 16px;
  transition: background 180ms ease, color 180ms ease, transform 180ms ease;
}

.stack-cloud button.active {
  background: var(--green);
  border-color: var(--green);
  color: var(--white);
}

.skill-readout {
  border-top: 1px solid var(--line);
  font-size: 1.15rem;
  margin: 34px 0 0;
  max-width: 840px;
  padding-top: 22px;
}

.contact-section {
  align-items: end;
  background:
    linear-gradient(90deg, rgba(11, 79, 186, 0.9), rgba(23, 23, 23, 0.94)),
    url("assets/daniel-gold-blazer-transparent.png");
  background-position: right bottom;
  background-repeat: no-repeat;
  background-size: auto 118%;
  color: var(--white);
  display: grid;
  gap: 40px;
  grid-template-columns: minmax(0, 0.8fr) minmax(280px, 0.5fr);
  min-height: 560px;
  padding: clamp(74px, 10vw, 130px) clamp(18px, 5vw, 72px);
}

.contact-section .eyebrow {
  color: #f3b547;
}

.contact-section h2 {
  max-width: 820px;
}

.contact-section .button.secondary {
  background: rgba(255, 253, 248, 0.12);
  color: var(--white);
}

.reveal {
  opacity: 0;
  transform: translateY(26px);
  transition: opacity 520ms ease, transform 520ms ease;
}

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

@media (max-width: 980px) {
  .hero {
    grid-template-columns: minmax(0, 1fr);
    padding-top: 98px;
  }

  .hero-visual {
    min-height: 500px;
  }

  .persona-figure {
    height: min(62svh, 610px);
    max-width: 100%;
  }

  .signal-readout {
    bottom: 24px;
    left: 50%;
    top: auto;
    transform: translateX(-50%);
  }

  .signal-band,
  .workflow,
  .project-grid,
  .league-layout,
  .timeline-shell,
  .contact-section {
    grid-template-columns: 1fr;
  }

  .signal-band div,
  .workflow-step {
    border-right: 0;
  }

  .signal-band {
    grid-template-columns: repeat(2, 1fr);
  }

  .project-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .section-heading {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 680px) {
  .site-header {
    gap: 14px;
    height: 62px;
  }

  .nav-links {
    display: none;
  }

  h1 {
    font-size: clamp(3rem, 16vw, 4.7rem);
    line-height: 0.9;
  }

  .hero {
    min-height: auto;
  }

  .hero-visual {
    min-height: 430px;
  }

  .hero-visual[data-active="analyst"] [data-persona-figure="analyst"],
  .hero-visual[data-active="ml"] [data-persona-figure="ml"],
  .hero-visual[data-active="strategy"] [data-persona-figure="strategy"] {
    --scale: 0.7;
    --x: 50%;
    --y: 18px;
  }

  .hero-visual[data-active="analyst"] [data-persona-figure="strategy"],
  .hero-visual[data-active="ml"] [data-persona-figure="analyst"],
  .hero-visual[data-active="strategy"] [data-persona-figure="analyst"] {
    --scale: 0.42;
    --x: 16%;
    --y: 82px;
  }

  .hero-visual[data-active="analyst"] [data-persona-figure="ml"],
  .hero-visual[data-active="ml"] [data-persona-figure="strategy"],
  .hero-visual[data-active="strategy"] [data-persona-figure="ml"] {
    --scale: 0.42;
    --x: 84%;
    --y: 82px;
  }

  .hero-actions,
  .persona-switcher,
  .contact-actions {
    align-items: stretch;
    flex-direction: column;
  }

  .button,
  .persona-button,
  .filter-button {
    width: 100%;
  }

  .signal-band,
  .project-grid {
    grid-template-columns: 1fr;
  }

  .project-card {
    min-height: auto;
  }

  .contact-section {
    background-size: auto 80%;
    padding-bottom: 340px;
  }
}

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

  *,
  *::before,
  *::after {
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
  }
}
