:root {
  color-scheme: dark;
  --paper: #040a17;
  --hero: #030818;
  --ink: #f1fbff;
  --surface: #0a1425;
  --panel: #080f20;
  --field: #101d31;
  --line: #26384d;
  --muted: #bacfdb;
  --accent: #83e3de;
  --button-text: #09272c;
  --button-hover: #c6f5ef;
  font-family: 'Segoe UI', Arial, sans-serif;
  color: var(--ink);
  background: var(--paper);
}
:root[data-theme="light"] {
  color-scheme: light;
  --paper: #fafcfd;
  --hero: #fff;
  --ink: #0b192e;
  --surface: #fff;
  --panel: #f0f6f8;
  --field: #fff;
  --line: #ccdde2;
  --muted: #435b68;
  --accent: #006d76;
  --button-text: #fff;
  --button-hover: #075462;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { scroll-behavior: smooth; }
body { margin: 0; }
a { color: inherit; text-underline-offset: .24em; }
a:hover { color: var(--accent); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 5px; }
.wrap { width: min(1220px, calc(100% - 64px)); margin-inline: auto; }
.skip { position: absolute; left: 1rem; top: 1rem; transform: translateY(-200%); }
.skip:focus { transform: none; z-index: 5; background: var(--ink); }
.top { min-height: 80px; display: flex; justify-content: space-between; align-items: center; gap: 24px; border-bottom: 1px solid var(--line); }
.brand, nav, .actions { display: flex; align-items: center; gap: 14px; }
.brand, nav a { text-decoration: none; font-weight: 650; }
.mark { display: grid; place-items: center; width: 38px; height: 38px; border: 1px solid var(--accent); border-radius: 8px; color: var(--accent); font-size: .8rem; letter-spacing: -.04em; }
nav { gap: clamp(16px, 3vw, 38px); font-size: .88rem; }
nav .nav-contact { color: var(--accent); }
.hero-band { background: var(--hero); }
.hero { padding-block: clamp(48px, 7vw, 100px) 48px; display: grid; grid-template-columns: 1.2fr .8fr; align-items: center; gap: clamp(32px, 6vw, 80px); }
.hero-image { width: 100%; height: auto; aspect-ratio: 1; object-fit: cover; object-position: center 12%; border: 1px solid var(--line); display: block; background: var(--panel); }
.eyebrow, .meta { color: var(--accent); font-size: .75rem; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; }
h1, h2, h3, h4, p { margin: 0; }
h1 { font-size: clamp(3.15rem, 7.4vw, 7.2rem); line-height: .99; letter-spacing: -.064em; overflow-wrap: anywhere; margin-block: 18px 25px; font-weight: 680; }
.credential { display: block; font-size: .43em; letter-spacing: -.05em; margin-top: .27em; color: var(--accent); }
.lede { font-size: clamp(1rem, 1.6vw, 1.17rem); line-height: 1.65; color: var(--muted); max-width: 44ch; }
.actions { gap: 20px; flex-wrap: wrap; margin-top: 30px; }
.button, .secondary { display: inline-flex; align-items: center; gap: .75em; cursor: pointer; font: inherit; font-size: .88rem; font-weight: 700; }
.button { padding: 13px 16px; background: var(--accent); color: var(--button-text); border: 1px solid transparent; border-radius: 8px; text-decoration: none; }
.button:hover, .button:focus-visible { background: var(--button-hover); color: var(--button-text); }
.secondary { color: var(--text); background: transparent; border: 0; padding: 8px 0; }
.secondary:hover { color: var(--accent); }
.stats, .topics, .entries { list-style: none; padding: 0; }
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(190px, 100%), 1fr)); border-block: 1px solid var(--line); margin-block: 0; }
.stats li { display: grid; gap: 7px; padding: 23px clamp(18px, 3vw, 38px); }
.stats li + li { border-left: 1px solid var(--line); }
.stats strong { color: var(--accent); font-size: clamp(1.75rem, 3.5vw, 2.8rem); letter-spacing: -.055em; }
.stats span, .detail { color: var(--muted); line-height: 1.55; }
.block { padding-block: clamp(45px, 7vw, 85px); border-bottom: 1px solid var(--line); }
h2 { font-size: clamp(2.15rem, 4.8vw, 4rem); line-height: 1.05; letter-spacing: -.055em; margin-block: 10px 30px; }
h3, h4 { font-size: 1.06rem; line-height: 1.45; overflow-wrap: anywhere; }
.research-band { background: var(--panel); }
.research-layout { display: grid; grid-template-columns: .85fr 1.15fr; gap: clamp(24px, 5vw, 72px); }
.topics { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 250px), 1fr)); gap: 12px; }
.topics li { border: 1px solid var(--line); background: var(--surface); padding: 22px; }
.entry { border-top: 1px solid var(--line); padding-block: 16px; }
.entry p + h3, .entry :is(h3, h4) + p, .topics p { margin-top: 6px; }
.entry a, .topics a { text-decoration-color: var(--accent); }
details summary { cursor: pointer; color: var(--accent); padding-block: 14px; border-top: 1px solid var(--line); }
.cv-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 28px 48px; align-items: start; }
.cv-section > h3 { font-size: 1.4rem; letter-spacing: -.035em; }
.cv-section .entry :is(h3, h4) { font-size: 1rem; }
.footer { display: flex; justify-content: space-between; align-items: end; gap: 20px; flex-wrap: wrap; border: 0; }
.footer h2 { margin-bottom: 14px; }
.footer a { color: var(--accent); overflow-wrap: anywhere; }
.editor-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 2fr); gap: clamp(20px, 4vw, 54px); margin-top: 26px; }
.editor-grid:has(#entry-panel[hidden]) { display: block; max-width: 760px; }
.editor-grid h2 { font-size: 1.6rem; margin: 0 0 8px; }
#login { max-width: 420px; }
#entry-list { list-style: none; padding: 0; margin: 12px 0; max-height: 520px; overflow: auto; }
.entry-choice, .theme-toggle { font: inherit; color: var(--ink); cursor: pointer; background: var(--surface); border: 1px solid var(--line); }
.entry-choice { text-align: left; padding: 10px 12px; width: 100%; overflow-wrap: anywhere; }
.entry-choice[aria-current], .entry-choice:hover, .theme-toggle:hover { color: var(--accent); border-color: var(--accent); }
.theme-toggle { padding: 6px 10px; font-size: .82rem; }
.editor h1 { font-size: clamp(2.5rem, 7vw, 5rem); }
.editor label { display: grid; gap: 7px; margin-block: 14px; }
.editor input, .editor select, .editor textarea { width: 100%; color: var(--text); background: var(--field); border: 1px solid var(--line); padding: 10px; font: inherit; }
.editor textarea { min-height: 90px; resize: vertical; }
.editor fieldset { min-width: 0; margin: 22px 0; border: 1px solid var(--line); border-radius: 8px; }
#status { color: var(--accent); margin-block: 16px; }
@media (max-width: 720px) {
  .wrap { width: calc(100% - 36px); }
  .hero, .cv-grid, .research-layout, .editor-grid { grid-template-columns: 1fr; }
  .hero-image { aspect-ratio: 1.25; }
  .stats li + li { border-left: 0; border-top: 1px solid var(--line); }
  #entry-list { max-height: 200px; }
  .top { flex-wrap: wrap; padding-block: 14px; gap: 14px; }
  nav { flex-wrap: wrap; }
}
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

.professional-links { display: flex; flex-wrap: wrap; gap: .75rem 1.25rem; }
.professional-links a { text-underline-offset: .25em; }
