/* helenatan.ai - clean single page.
   Geist on near-white, one blue accent, four role colors for the career chart.
   Sizes and spacing mirror the approved design canvas. */

:root {
  --bg:          #FCFCFB;
  --ink:         #111111;
  --ink-2:       #333333;
  --nav:         #3D3D3D;
  --muted:       #5E5E5E;
  --line:        #E7E7E4;
  --surface:     #F1F1EE;
  --card:        #F4F4F1;
  --accent:      #1F4FD8;
  --accent-dark: #163BA6;
  --accent-soft: #C9D5F5;
  /* Career chart roles. Validated as a set for contrast and color-blind safety. */
  --box:         #1F4FD8;
  --niantic:     #e8590c;
  --uber:        #2fb380;
  --earlier:     #b23a8a;
  --sans: 'Geist', system-ui, sans-serif;
  --mono: 'Geist Mono', ui-monospace, monospace;
  color-scheme: light;
}

html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}
body { margin: 0; background: var(--bg); }

a { color: var(--accent); text-underline-offset: 4px; }
a:hover { color: var(--accent-dark); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 2px; }

/* ---------- Page frame ---------- */

.page {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 20px;
  line-height: 1.6;
}
.container {
  flex: 1 0 auto;
  display: flex;
  flex-direction: column;
  width: 100%;
  max-width: 1328px;            /* 1200px of content plus the side padding */
  box-sizing: border-box;
  margin: 0 auto;
  padding: 0 clamp(16px, 5vw, 64px);
}
.narrow { max-width: 840px; }

.site-header {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 8px 32px;
  padding: 22px 0;
}
.wordmark {
  display: inline-flex;
  align-items: center;
  min-height: 48px;
  color: var(--ink);
  text-decoration: none;
  font-size: 20px;
  font-weight: 600;
}
.wordmark:hover { color: var(--ink); }
.site-nav { display: flex; flex-wrap: wrap; gap: 0 32px; font-size: 18px; }
.site-nav a {
  display: inline-flex;
  align-items: center;
  min-height: 48px;
  color: var(--nav);
  text-decoration: none;
}
.site-nav a:hover { color: var(--ink); }

/* ---------- Hero ---------- */

.hero {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 32px 48px;
  padding: clamp(48px, 6vw, 88px) 0 clamp(64px, 7vw, 96px);
}
.photo {
  flex: 0 0 128px;
  width: 128px;
  height: 128px;
  border-radius: 50%;
  object-fit: cover;
  background: var(--surface);
  border: 1px solid var(--line);
}
.hero-text {
  flex: 1 1 600px;
  min-width: 0;
  max-width: 900px;
  container-type: inline-size;  /* the headline sizes itself to this column */
}
.hero h1 {
  margin: 0;
  /* Keeps "who builds with judgement." on one line at every width. */
  font-size: clamp(20px, 7.6cqi, 64px);
  line-height: 1.06;
  font-weight: 600;
  letter-spacing: -0.035em;
}
.nowrap { white-space: nowrap; }
.lede {
  margin: 28px 0 0;
  max-width: 32em;
  font-size: clamp(21px, 1.9vw, 24px);
  line-height: 1.5;
  color: var(--ink-2);
}
.link-row {
  margin: 24px 0 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0 28px;
  font-size: 18px;
  font-weight: 500;
}
.link-row a,
.links a { display: inline-flex; align-items: center; min-height: 48px; }

/* ---------- Sections ---------- */

.section { padding: clamp(72px, 8vw, 104px) 0; border-top: 1px solid var(--line); }
.section h2 {
  margin: 0;
  font-size: clamp(36px, 4.4vw, 52px);
  line-height: 1.1;
  font-weight: 600;
  letter-spacing: -0.03em;
}
.intro {
  margin: 28px 0 0;
  font-size: clamp(24px, 2.4vw, 30px);
  line-height: 1.35;
  font-weight: 500;
  letter-spacing: -0.015em;
}
.intro-spaced { margin-bottom: 36px; }

/* ---------- Independent work: the question chain ---------- */

.flow-label { margin: 64px 0 18px; font-family: var(--mono); font-size: 16px; color: var(--muted); }
.flow {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 36px 0;
}
.flow li { min-width: 0; }
.rail { display: flex; align-items: center; height: 24px; }
.rail-latest { gap: 10px; }
.dot { flex: 0 0 auto; width: 14px; height: 14px; border-radius: 50%; background: var(--accent); }
.dot-latest { box-shadow: 0 0 0 4px #DCE5FB; }
.track { flex: 1 1 auto; height: 2px; background: var(--accent-soft); }
.chev { flex: 0 0 auto; margin-right: 6px; color: var(--accent); font-size: 20px; line-height: 1; }
.badge {
  padding: 1px 10px;
  border-radius: 999px;
  background: #EAF0FD;
  color: var(--accent);
  font-size: 15px;
  font-weight: 600;
}
.step {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 16px 28px 0 0;
  color: var(--ink);
  text-decoration: none;
}
.flow li:last-child .step { padding-right: 0; }
.step:hover { color: var(--ink); }
.step-why { font-size: 17px; font-style: italic; color: var(--muted); }
.step-q { font-size: 22px; line-height: 1.3; font-weight: 600; }
.step-to { font-size: 18px; font-weight: 500; color: var(--accent); }
.step:hover .step-to { text-decoration: underline; }

/* ---------- Projects ---------- */

.project { padding-top: 96px; }
.meta { margin: 0; font-family: var(--mono); font-size: 16px; color: var(--muted); }
.topic { color: var(--accent); }
.project h3 {
  margin: 12px 0 0;
  font-size: clamp(32px, 3.2vw, 42px);
  line-height: 1.15;
  font-weight: 600;
  letter-spacing: -0.025em;
}
.project-desc { margin: 18px 0 0; color: var(--ink-2); }
.stats {
  display: flex;
  flex-wrap: wrap;
  gap: 24px 56px;
  margin: 28px 0 0;
  padding: 24px 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}
.stats-wide > div { flex: 1 1 210px; }
.stats dt { font-size: 17px; color: var(--muted); }
.stats dd { margin: 4px 0 0; font-size: 30px; font-weight: 600; letter-spacing: -0.01em; }
.links {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 32px;
  margin: 20px 0 0;
  font-size: 19px;
  font-weight: 500;
}
.shot {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 21 / 9;
  box-sizing: border-box;
  margin-top: 24px;
  object-fit: cover;
  object-position: top;
  border-radius: 14px;
  border: 1px solid var(--line);
  background: var(--surface);
}

.parts { list-style: none; margin: 28px 0 0; padding: 0; border-top: 1px solid var(--line); }
.parts li { border-bottom: 1px solid var(--line); }
.parts a {
  display: flex;
  align-items: baseline;
  gap: 24px;
  padding: 22px 0;
  color: var(--ink);
  text-decoration: none;
}
.part-no { flex: 0 0 auto; font-family: var(--mono); font-size: 16px; color: var(--muted); }
.part-title { flex: 1 1 auto; min-width: 0; font-size: 24px; font-weight: 600; }
.part-date { flex: 0 0 auto; font-size: 17px; color: var(--muted); }
.arrow { color: var(--accent); }
.parts a:hover .part-title { color: var(--accent); }

/* ---------- Career chart ---------- */

.chart-wrap {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 32px 56px;
  margin-top: 56px;
}
.chart { flex: 1 1 460px; min-width: 0; margin: 0; }
.chart svg { display: block; width: 100%; height: auto; }
.grid { fill: none; stroke: #E1E0D9; stroke-width: 1px; }
.axis-label { font-family: var(--sans); font-size: 17px; font-weight: 600; fill: var(--ink-2); }

/* By default the chart shows one shape: all roles together, in ink, with its
   vertices marked. data-focus (set by script.js while a role is hovered,
   focused or pinned) swaps in that role's own shape and color, and leaves the
   combined shape as a faint outline for context. */
.union {
  fill: var(--ink);
  fill-opacity: 0.07;
  stroke: var(--ink);
  stroke-width: 2px;
  stroke-linejoin: round;
  transition: fill-opacity 0.2s ease, stroke-opacity 0.2s ease;
}
.shape {
  fill-opacity: 0.2;
  stroke-width: 2.5px;
  stroke-linejoin: round;
}
.shape-box     { fill: var(--box);     stroke: var(--box); }
.shape-niantic { fill: var(--niantic); stroke: var(--niantic); }
.shape-uber    { fill: var(--uber);    stroke: var(--uber); }
.shape-earlier { fill: var(--earlier); stroke: var(--earlier); }
.dots circle { stroke: var(--bg); stroke-width: 2px; }
.dots-all     { fill: var(--ink); }
.dots-box     { fill: var(--box); }
.dots-niantic { fill: var(--niantic); }
.dots-uber    { fill: var(--uber); }
.dots-earlier { fill: var(--earlier); }
.shape,
.dots { transition: opacity 0.2s ease; }
.shape,
.dots:not(.dots-all) { opacity: 0; }

[data-focus] .union { fill-opacity: 0; stroke-opacity: 0.35; stroke-width: 1.5px; stroke-dasharray: 6 5; }
[data-focus] .dots-all { opacity: 0; }
[data-focus="box"] :is(.shape-box, .dots-box),
[data-focus="niantic"] :is(.shape-niantic, .dots-niantic),
[data-focus="uber"] :is(.shape-uber, .dots-uber),
[data-focus="earlier"] :is(.shape-earlier, .dots-earlier) { opacity: 1; }
.chart-wrap:not([data-focus]) .role-all,
[data-focus="box"] .role-box,
[data-focus="niantic"] .role-niantic,
[data-focus="uber"] .role-uber,
[data-focus="earlier"] .role-earlier { background: var(--surface); }
@media (prefers-reduced-motion: reduce) {
  .union, .shape, .dots { transition: none; }
}

.legend { flex: 1 1 360px; min-width: 0; display: flex; flex-direction: column; gap: 4px; }
.role {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  width: 100%;
  box-sizing: border-box;
  padding: 14px;
  border: 0;
  border-radius: 12px;
  background: transparent;
  color: var(--ink);
  font: inherit;
  text-align: left;
  cursor: pointer;
}
.swatch { flex: 0 0 auto; width: 18px; height: 18px; margin-top: 6px; border-radius: 5px; }
.swatch-box     { background: var(--box); }
.swatch-niantic { background: var(--niantic); }
.swatch-uber    { background: var(--uber); }
.swatch-earlier { background: var(--earlier); }
.swatch-all     { background: var(--ink); }
.role-text { display: flex; flex-direction: column; gap: 2px; }
.role-name { font-size: 21px; font-weight: 600; }
.role-title { font-size: 17px; color: var(--muted); }
.role-spikes { font-size: 17px; color: var(--ink-2); }
.legend-hint { margin: 6px 14px 0; font-size: 17px; color: var(--muted); }
.chart-note { margin: 20px 0 0; max-width: 840px; font-size: 17px; color: var(--muted); }

.cta {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 8px 24px;
  margin-top: 56px;
  padding: 26px 28px;
  border-radius: 14px;
  background: var(--card);
  border: 1px solid var(--line);
  color: var(--ink);
  text-decoration: none;
}
.cta:hover { color: var(--ink); border-color: #D6D6D1; }
.cta-text { display: flex; flex-direction: column; gap: 4px; }
.cta-title { font-size: 22px; font-weight: 600; }
.cta-sub { font-size: 17px; color: var(--muted); }
.cta-action { font-size: 19px; font-weight: 500; color: var(--accent); }
.cta:hover .cta-action { text-decoration: underline; }

/* ---------- Writing and contact lists ---------- */

.list { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--ink); }
.list li { border-bottom: 1px solid var(--line); }
.list a {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: baseline;
  gap: 4px 24px;
  padding: 18px 0;
  color: var(--ink);
  text-decoration: none;
}
.post-title { flex: 1 1 400px; font-size: 21px; font-weight: 500; text-wrap: pretty; }
.post-tag { font-size: 17px; color: var(--muted); }
.list a:hover .post-title { color: var(--accent); }
.subscribe {
  display: inline-flex;
  align-items: center;
  min-height: 48px;
  margin-top: 20px;
  font-size: 19px;
  font-weight: 500;
}

.list-contact a { padding: 22px 0; }
.contact-name { font-size: 24px; font-weight: 600; }
.contact-handle { font-size: 19px; font-weight: 500; color: var(--accent); }
.list-contact a:hover .contact-handle { text-decoration: underline; }

/* ---------- Footer ---------- */

.site-footer {
  margin-top: auto;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 8px 24px;
  padding: 28px 0 44px;
  border-top: 1px solid var(--line);
  font-size: 17px;
  color: var(--muted);
}
