/* Personal website: navy and gold, matching the Classic flyer and LinkedIn banner.
   Layout: navy hero band, then one reading column of sections with a wider grid for platforms. */
:root {
  --bg: #F5F7FA;
  --surface: #FFFFFF;
  --ink: #1A2433;
  --muted: #586273;
  --line: #DDE3EB;
  --navy: #1F3A5F;
  --navy-deep: #12233D;
  --accent: #8E6412;      /* gold dark enough for text on light */
  --gold: #E8B54F;        /* bright gold for navy backgrounds */
  --tint: #EEF2F7;
  --display: "Montserrat", "Segoe UI", Arial, sans-serif;
  --body: "Inter", "Segoe UI", Arial, sans-serif;
  --mono: "JetBrains Mono", Consolas, monospace;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0E1828; --surface: #15233A; --ink: #E6EBF2; --muted: #9AA6B8; --line: #263753;
    --navy: #A9C2E6; --accent: #E8B54F; --tint: #182A44;
    color-scheme: dark;
  }
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body { margin: 0; background: var(--bg); color: var(--ink); font: 16px/1.65 var(--body); }
img { max-width: 100%; display: block; }
a { color: var(--navy); text-underline-offset: 3px; }
a:hover { color: var(--accent); }
:focus-visible { outline: 2px solid var(--gold); outline-offset: 3px; }
h1, h2, h3 { font-family: var(--display); line-height: 1.15; margin: 0; text-wrap: balance; }
p { margin: 0; }

.wrap { max-width: 1100px; margin: 0 auto; padding-left: max(20px, env(safe-area-inset-left)); padding-right: max(20px, env(safe-area-inset-right)); }

/* ---------- header ---------- */
.top { position: sticky; top: 0; z-index: 10; background: #12233D; border-bottom: 1px solid rgba(255,255,255,.08); }
.top .wrap { display: flex; align-items: center; gap: 24px; min-height: 60px; flex-wrap: wrap; }
.brand { font-family: var(--display); font-weight: 800; color: #fff; text-decoration: none; letter-spacing: .01em; }
.brand span { color: #E8B54F; }
.top nav { margin-left: auto; display: flex; gap: 4px 20px; flex-wrap: wrap; }
.top nav a { color: rgba(255,255,255,.8); text-decoration: none; font-size: 14.5px; font-weight: 500; }
.top nav a:hover, .top nav a[aria-current] { color: #E8B54F; }

/* ---------- hero (always navy) ---------- */
.hero { position: relative; overflow: hidden; color: #fff;
  background: radial-gradient(110% 140% at 80% 0%, #2C507F 0%, #1F3A5F 45%, #12233D 100%); }
.hero .wrap { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 48px; align-items: center; padding-block: 72px 80px; position: relative; }
/* Full Steiner tree of a square, drawn faintly across the hero; it draws itself once on load. */
.hero svg.tree { position: absolute; left: 50%; top: 50%; height: 118%; width: auto; aspect-ratio: 1;
  transform: translate(-58%, -50%); opacity: .16; pointer-events: none; overflow: visible; }
.hero svg.tree .edges { fill: none; stroke: #E8B54F; stroke-width: 2.2; stroke-linecap: round;
  stroke-dasharray: 1; stroke-dashoffset: 0; animation: tree-draw 2.4s ease-out both; }
.hero svg.tree .corners circle { fill: #fff; }
.hero svg.tree .steiner circle { fill: #12233D; stroke: #E8B54F; stroke-width: 2.2; animation: tree-node .6s 2.1s ease-out both; }
@keyframes tree-draw { from { stroke-dashoffset: 1; } }
@keyframes tree-node { from { opacity: 0; } }
@media (prefers-reduced-motion: reduce) { .hero svg.tree .edges, .hero svg.tree .steiner circle { animation: none; } }
.eyebrow { font-family: var(--display); font-weight: 700; font-size: 13px; letter-spacing: .22em; text-transform: uppercase; color: #E8B54F; }
.hero h1 { font-size: clamp(34px, 5.4vw, 58px); font-weight: 800; margin-top: 16px; letter-spacing: -.01em; }
.hero h1 em { font-style: normal; color: #E8B54F; }
.hero .lede { margin-top: 20px; font-size: 18.5px; color: rgba(255,255,255,.86); max-width: 58ch; }
.hero .who { margin-top: 26px; font-size: 15px; color: rgba(255,255,255,.7); }
.hero .who b { color: #fff; font-weight: 600; }
.portrait { width: 300px; height: auto; aspect-ratio: 1; max-width: 100%; border-radius: 50%; object-fit: cover;
  box-shadow: 0 0 0 6px #1F3A5F, 0 0 0 9px #E8B54F, 0 18px 40px rgba(0,0,0,.35); }

/* ---------- sections ---------- */
section.block { padding-block: 72px; border-bottom: 1px solid var(--line); scroll-margin-top: 60px; }
section.block:last-of-type { border-bottom: 0; }
.kicker { font-family: var(--display); font-size: 12.5px; font-weight: 700; letter-spacing: .2em; text-transform: uppercase; color: var(--accent);
  display: flex; align-items: center; gap: 10px; }
/* The same Steiner tree, small, marks every section. */
.kicker::before { content: ""; width: 18px; height: 18px; flex: none; background: currentColor;
  -webkit-mask: var(--tree-mark) center / contain no-repeat; mask: var(--tree-mark) center / contain no-repeat; }
:root { --tree-mark: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 300 300'%3E%3Cpath d='M30 30 L99.28 150 L30 270 M99.28 150 H200.72 M270 30 L200.72 150 L270 270' stroke='black' stroke-width='26' fill='none' stroke-linecap='round'/%3E%3C/svg%3E"); }
section.block h2 { font-size: clamp(26px, 3.4vw, 34px); font-weight: 800; color: var(--navy); margin-top: 10px; }
.intro { margin-top: 14px; color: var(--muted); max-width: 66ch; font-size: 17px; }
.stack { display: grid; gap: 28px; margin-top: 36px; }

/* about */
.about { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr); gap: 48px; margin-top: 32px; }
.about .prose { display: grid; gap: 16px; max-width: 64ch; }
dl.facts { margin: 0; display: grid; gap: 0; background: var(--surface); border: 1px solid var(--line); border-radius: 10px; align-self: start; }
dl.facts div { padding: 12px 18px; border-bottom: 1px solid var(--line); }
dl.facts div:last-child { border-bottom: 0; }
dl.facts dt { font-size: 12.5px; color: var(--muted); text-transform: uppercase; letter-spacing: .08em; font-weight: 600; }
dl.facts dd { margin: 2px 0 0; }

/* platforms */
.platforms { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; margin-top: 36px; }
.platform { background: var(--surface); border: 1px solid var(--line); border-radius: 10px; padding: 22px 24px; display: grid; gap: 10px; align-content: start; }
.platform header { display: flex; align-items: baseline; gap: 12px; flex-wrap: wrap; }
.platform h3 { font-size: 20px; color: var(--navy); }
.status { font-size: 12px; font-weight: 600; padding: 2px 10px; border-radius: 20px; background: var(--tint); color: var(--muted); }
.status.live { color: #2F7D4F; }
.platform .sub { font-weight: 600; font-size: 15px; }
.platform p { color: var(--muted); font-size: 15px; }
.platform .link { font-size: 14px; font-family: var(--mono); overflow-wrap: anywhere; }

/* principles */
.principles { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0; margin-top: 36px; border-top: 2px solid var(--navy); }
.principle { padding: 22px 24px 22px 0; display: grid; gap: 8px; align-content: start; }
.principle + .principle { padding-left: 24px; border-left: 1px solid var(--line); }
.principle:nth-child(3n+1) { padding-left: 0; border-left: 0; }
.principle h3 { font-size: 17px; color: var(--ink); }
.principle p { color: var(--muted); font-size: 15px; }

/* notes teaser */
.notes-teaser { margin-top: 32px; background: var(--surface); border: 1px solid var(--line); border-left: 4px solid var(--accent); border-radius: 0 10px 10px 0; padding: 22px 26px; display: grid; gap: 10px; max-width: 760px; }
.notes-teaser .when { font-size: 14px; color: var(--muted); }

/* research */
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 22px; }
.chips span { border: 1px solid var(--line); background: var(--surface); border-radius: 20px; padding: 4px 14px; font-size: 14px; }
.cols { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 48px; margin-top: 40px; }
.cols h3 { font-size: 17px; color: var(--navy); margin-bottom: 14px; }
ol.pubs, ul.list { margin: 0; padding: 0; list-style: none; display: grid; gap: 14px; }
ol.pubs li, ul.list li { display: grid; grid-template-columns: 64px minmax(0, 1fr); gap: 14px; font-size: 15px; }
.yr { font-family: var(--mono); font-size: 13px; color: var(--accent); padding-top: 2px; font-variant-numeric: tabular-nums; }
ol.pubs .t, ul.list .t { font-weight: 600; }
ol.pubs .j, ul.list .j { color: var(--muted); font-size: 14px; }
.idx { font-size: 11px; font-weight: 700; letter-spacing: .06em; color: var(--accent); margin-left: 6px; }

/* timeline */
ol.timeline { list-style: none; margin: 36px 0 0; padding: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 48px; }
ol.timeline li { display: grid; grid-template-columns: 96px minmax(0, 1fr); gap: 16px; padding: 14px 0; border-bottom: 1px solid var(--line); }
ol.timeline .when { font-family: var(--mono); font-size: 13px; color: var(--muted); padding-top: 3px; }
ol.timeline .what b { display: block; }
ol.timeline .what span { color: var(--muted); font-size: 15px; }

/* contact */
.contact-grid { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); gap: 28px; margin-top: 32px; align-items: start; }
.message { background: var(--surface); border: 1px solid var(--line); border-radius: 10px; padding: 24px; display: grid; gap: 16px; }
.field { display: grid; gap: 6px; }
.field label { font-size: 14px; font-weight: 600; }
.field input, .field textarea { font: inherit; color: var(--ink); background: var(--bg); border: 1px solid var(--line);
  border-radius: 8px; padding: 10px 12px; width: 100%; }
.field textarea { resize: vertical; min-height: 140px; }
.field input:focus-visible, .field textarea:focus-visible { outline: 2px solid var(--gold); outline-offset: 1px; border-color: transparent; }
.trap { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }
.send { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; }
.send button { font: 700 15px var(--display); background: #1F3A5F; color: #fff; border: 0; border-radius: 8px; padding: 12px 22px; cursor: pointer; }
.send button:hover { background: #12233D; }
.send button:disabled { opacity: .6; cursor: wait; }
.status { font-size: 14px; color: var(--muted); }
.status[data-kind="ok"] { color: #1E7B4A; }
.status[data-kind="error"] { color: #B3261E; }
@media (prefers-color-scheme: dark) {
  .send button { background: #E8B54F; color: #12233D; }
  .send button:hover { background: #F2C76A; }
  .status[data-kind="ok"] { color: #7BD3A0; }
  .status[data-kind="error"] { color: #F2A29B; }
}
.contact { display: grid; grid-template-columns: minmax(0, 1fr); gap: 14px; }
.contact div { background: var(--surface); border: 1px solid var(--line); border-radius: 10px; padding: 18px 22px; display: grid; gap: 4px; }
.contact .k { font-size: 12.5px; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); font-weight: 600; }
.contact .v { overflow-wrap: anywhere; font-weight: 500; }

footer { background: #12233D; color: rgba(255,255,255,.6); font-size: 14px; }
footer .wrap { padding-block: 28px; display: flex; gap: 12px 24px; flex-wrap: wrap; justify-content: space-between; }
footer .motto { letter-spacing: .06em; }
footer .motto b { color: #E8B54F; font-family: var(--display); font-weight: 700; letter-spacing: .02em; }

/* ---------- narrow screens ---------- */
@media (max-width: 860px) {
  .hero .wrap { grid-template-columns: minmax(0, 1fr); padding-block: 48px 56px; }
  .portrait { width: 200px; order: -1; }
  .hero svg.tree { height: 90%; transform: translate(-50%, -50%); opacity: .12; }
  .about, .cols { grid-template-columns: minmax(0, 1fr); gap: 32px; }
  .platforms, .contact, .contact-grid { grid-template-columns: minmax(0, 1fr); }
  .principles { grid-template-columns: minmax(0, 1fr); }
  .principle, .principle + .principle { padding: 18px 0; border-left: 0; border-bottom: 1px solid var(--line); }
  ol.timeline { grid-template-columns: minmax(0, 1fr); }
  ol.timeline li { grid-template-columns: minmax(0, 1fr); gap: 2px; }
  section.block { padding-block: 52px; }
  .top nav { margin-left: 0; }
}
