* { box-sizing: border-box; }

:root {
  color-scheme: dark;
  --bg: #07090e;
  --panel: rgba(16, 20, 29, 0.72);
  --panel-strong: #10141d;
  --text: #f1f4f9;
  --muted: #8b94a6;
  --muted-dim: #666e7f;
  --line: rgba(255,255,255,0.09);
  --line-strong: rgba(255,255,255,0.17);
  --cyan: #4ee6d0;
  --blue: #7b8cff;
  --violet: #b477ff;
  --magenta: #e06bd8;
  --accent: var(--blue);
  --accent-soft: rgba(123,140,255,0.13);
  --spectrum: linear-gradient(90deg, var(--cyan), var(--blue), var(--violet), var(--magenta));
  --max: 1240px;
  --radius: 16px;
}

html { background: var(--bg); scroll-behavior: smooth; }

body {
  margin: 0;
  min-height: 100vh;
  font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--text);
  background:
    radial-gradient(circle at 14% 8%, rgba(78, 230, 208, 0.10), transparent 30rem),
    radial-gradient(circle at 88% 22%, rgba(123, 140, 255, 0.12), transparent 32rem),
    radial-gradient(circle at 60% 92%, rgba(224, 107, 216, 0.08), transparent 30rem),
    var(--bg);
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  opacity: 0.35;
  background-image:
    linear-gradient(rgba(255,255,255,0.022) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.022) 1px, transparent 1px);
  background-size: 46px 46px;
  mask-image: linear-gradient(to bottom, black, transparent 82%);
}

/* diffracted beam motif */
.beam {
  position: fixed;
  top: -12rem;
  right: -16rem;
  width: 44rem;
  height: 44rem;
  pointer-events: none;
  z-index: 0;
  border-radius: 50%;
  background: conic-gradient(from 210deg, transparent 0deg, rgba(78,230,208,0.10) 40deg, rgba(123,140,255,0.13) 80deg, rgba(180,119,255,0.10) 120deg, rgba(224,107,216,0.07) 150deg, transparent 190deg);
  filter: blur(28px);
  opacity: 0.85;
}

a { color: inherit; text-decoration: none; }
a:focus-visible, button:focus-visible {
  outline: 2px solid var(--cyan);
  outline-offset: 3px;
  border-radius: 6px;
}

main, .site-header, .site-footer {
  position: relative;
  z-index: 1;
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 clamp(20px, 4vw, 40px);
}

/* ---------- header ---------- */
.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  flex-wrap: wrap;
  padding-top: 26px;
  padding-bottom: 26px;
  border-bottom: 1px solid var(--line);
  margin-bottom: clamp(40px, 7vw, 76px);
}

.brand { display: inline-flex; align-items: center; gap: 11px; font-weight: 600; letter-spacing: -0.01em; }
.brand-mark {
  width: 26px; height: 26px; border-radius: 8px;
  background: var(--spectrum);
  box-shadow: 0 0 22px rgba(123,140,255,0.45);
}
.brand-dot { color: var(--cyan); }

.social { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; font-size: 0.9rem; }
.social a { padding: 8px 12px; border-radius: 10px; color: var(--muted); transition: color 160ms ease, background 160ms ease; }
.social a:hover { color: var(--text); background: rgba(255,255,255,0.05); }
.social .social-cta {
  color: var(--text);
  border: 1px solid var(--line-strong);
  background: rgba(255,255,255,0.03);
}
.social .social-cta:hover { border-color: rgba(123,140,255,0.55); }

/* ---------- hero ---------- */
.hero { margin-bottom: clamp(56px, 9vw, 104px); }

.eyebrow {
  margin: 0 0 18px;
  font-size: 0.72rem;
  letter-spacing: 0.22em;
  font-weight: 600;
  background: var(--spectrum);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.hero h1 {
  margin: 0;
  font-size: clamp(2.6rem, 7vw, 4.6rem);
  line-height: 1.02;
  letter-spacing: -0.035em;
  font-weight: 700;
}

.role {
  margin: 14px 0 0;
  font-size: clamp(1.05rem, 2.4vw, 1.5rem);
  color: var(--text);
  font-weight: 500;
}
.role::after {
  content: "";
  display: block;
  width: 84px; height: 2px;
  margin-top: 18px;
  border-radius: 2px;
  background: var(--spectrum);
}

.intro {
  margin: 22px 0 0;
  max-width: 62ch;
  color: var(--muted);
  font-size: clamp(0.98rem, 1.6vw, 1.12rem);
  line-height: 1.7;
}

.locus { margin: 16px 0 0; color: var(--muted-dim); font-size: 0.88rem; letter-spacing: 0.04em; }

.stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 14px;
  margin: 40px 0 0;
}
.stat {
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: linear-gradient(155deg, rgba(255,255,255,0.045), rgba(255,255,255,0.012));
}
.stat dt { font-size: 0.68rem; letter-spacing: 0.16em; text-transform: uppercase; color: var(--cyan); font-weight: 600; }
.stat dd { margin: 9px 0 0; font-size: 0.92rem; line-height: 1.55; color: var(--muted); }

/* ---------- section titles ---------- */
.section-title {
  display: flex; align-items: baseline; justify-content: space-between; gap: 16px; flex-wrap: wrap;
  margin: 0 0 26px;
  font-size: 0.78rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  font-weight: 600;
  color: var(--muted);
  padding-bottom: 14px;
  border-bottom: 1px solid var(--line);
}
.section-title > span:first-child { color: var(--text); }
.section-hint { letter-spacing: 0.06em; text-transform: none; font-weight: 400; font-size: 0.78rem; color: var(--muted-dim); }

.work, .grid-section { margin-bottom: clamp(56px, 9vw, 100px); }

/* ---------- split layout ---------- */
.split {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr);
  gap: clamp(20px, 3vw, 40px);
  align-items: start;
}

/* ---------- timeline ---------- */
.year-block { margin-bottom: 10px; }
.year-label {
  display: flex; align-items: center; gap: 12px;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--muted-dim);
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.06em;
  padding: 14px 0 8px;
}
.year-label::after { content: ""; flex: 1; height: 1px; background: var(--line); }

.entry {
  position: relative;
  display: grid;
  grid-template-columns: 18px minmax(0, 1fr) 16px;
  gap: 12px;
  align-items: start;
  width: 100%;
  text-align: left;
  padding: 15px 14px;
  border: 1px solid transparent;
  border-radius: 13px;
  background: transparent;
  color: inherit;
  font: inherit;
  cursor: pointer;
  transition: background 160ms ease, border-color 160ms ease, transform 160ms ease;
}
.entry:hover { background: rgba(255,255,255,0.035); border-color: var(--line); }
.entry[aria-expanded="true"] {
  background: linear-gradient(140deg, rgba(123,140,255,0.14), rgba(78,230,208,0.05));
  border-color: rgba(123,140,255,0.42);
}

.entry-node {
  margin-top: 6px;
  width: 9px; height: 9px;
  border-radius: 50%;
  background: var(--muted-dim);
  box-shadow: 0 0 0 3px rgba(255,255,255,0.04);
  transition: background 160ms ease, box-shadow 160ms ease;
}
.entry:hover .entry-node { background: var(--muted); }
.entry[aria-expanded="true"] .entry-node {
  background: var(--cyan);
  box-shadow: 0 0 0 4px rgba(78,230,208,0.18), 0 0 14px rgba(78,230,208,0.55);
}

.entry-line { min-width: 0; }
.entry-title { display: block; font-size: 0.99rem; line-height: 1.45; font-weight: 500; }
.entry-org { display: block; margin-top: 5px; font-size: 0.8rem; color: var(--muted); }
.entry-arrow { margin-top: 3px; color: var(--muted-dim); transition: transform 160ms ease, color 160ms ease; }
.entry:hover .entry-arrow { color: var(--muted); transform: translateX(2px); }
.entry[aria-expanded="true"] .entry-arrow { color: var(--cyan); }

/* ---------- detail panel ---------- */
.detail-column { position: relative; }
.detail-wrap { position: sticky; top: 24px; }

.detail {
  border: 1px solid var(--line);
  border-radius: 20px;
  background: linear-gradient(160deg, rgba(255,255,255,0.05), rgba(255,255,255,0.014));
  backdrop-filter: blur(8px);
  overflow: hidden;
}
.detail-figure {
  display: block;
  width: 100%;
  height: auto;
  border-bottom: 1px solid var(--line);
  background: rgba(0,0,0,0.28);
}
.detail-body { padding: clamp(20px, 2.6vw, 30px); }

.detail-period {
  font-size: 0.7rem; letter-spacing: 0.18em; text-transform: uppercase;
  font-weight: 600; color: var(--cyan);
}
.detail h3 { margin: 12px 0 0; font-size: clamp(1.25rem, 2.4vw, 1.6rem); line-height: 1.25; letter-spacing: -0.02em; }
.detail-meta { margin: 10px 0 0; font-size: 0.88rem; color: var(--muted); }
.detail-summary { margin: 18px 0 0; color: var(--muted); line-height: 1.72; font-size: 0.95rem; }

.detail ul { margin: 20px 0 0; padding: 0; list-style: none; }
.detail ul li {
  position: relative;
  padding-left: 20px;
  margin-bottom: 11px;
  font-size: 0.92rem;
  line-height: 1.62;
  color: var(--muted);
}
.detail ul li::before {
  content: "";
  position: absolute; left: 0; top: 0.62em;
  width: 7px; height: 2px; border-radius: 2px;
  background: var(--spectrum);
}
.detail ul li strong { color: var(--text); font-weight: 600; }

.tags { display: flex; flex-wrap: wrap; gap: 7px; margin-top: 22px; }
.tag {
  font-size: 0.72rem;
  padding: 5px 10px;
  border-radius: 999px;
  border: 1px solid var(--line);
  color: var(--muted);
  background: rgba(255,255,255,0.03);
}

.resources { margin-top: 22px; padding-top: 18px; border-top: 1px solid var(--line); }
.resources-label { font-size: 0.68rem; letter-spacing: 0.16em; text-transform: uppercase; color: var(--muted-dim); font-weight: 600; }
.resources a {
  display: inline-flex; align-items: center; gap: 6px;
  margin: 10px 10px 0 0;
  padding: 7px 12px;
  font-size: 0.82rem;
  border: 1px solid var(--line-strong);
  border-radius: 10px;
  color: var(--muted);
  transition: color 160ms ease, border-color 160ms ease;
}
.resources a:hover { color: var(--text); border-color: rgba(123,140,255,0.5); }

.detail-empty { padding: clamp(26px, 3vw, 38px); text-align: center; color: var(--muted-dim); }
.detail-empty .pulse {
  width: 46px; height: 46px; margin: 0 auto 16px;
  border-radius: 50%;
  border: 1px solid rgba(78,230,208,0.35);
  background: radial-gradient(circle, rgba(78,230,208,0.22), transparent 70%);
}

/* ---------- chips / pubs / cards ---------- */
.chips { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 10px; }
.chips li {
  position: relative;
  padding: 14px 16px 14px 34px;
  border: 1px solid var(--line);
  border-radius: 12px;
  font-size: 0.9rem;
  line-height: 1.5;
  color: var(--muted);
  background: rgba(255,255,255,0.02);
}
.chips li::before {
  content: ""; position: absolute; left: 15px; top: 1.35em;
  width: 8px; height: 2px; border-radius: 2px; background: var(--spectrum);
}

.pubs { margin: 0; padding: 0; list-style: none; counter-reset: pub; }
.pubs li {
  counter-increment: pub;
  display: grid;
  grid-template-columns: 34px minmax(0,1fr);
  gap: 12px;
  padding: 15px 0;
  border-bottom: 1px solid var(--line);
  font-size: 0.93rem;
  line-height: 1.6;
  color: var(--muted);
}
.pubs li::before {
  content: counter(pub, decimal-leading-zero);
  color: var(--muted-dim);
  font-variant-numeric: tabular-nums;
  font-size: 0.78rem;
  padding-top: 2px;
}
.note { margin: 18px 0 0; font-size: 0.83rem; color: var(--muted-dim); }

.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 14px; }
.card {
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: linear-gradient(155deg, rgba(255,255,255,0.045), rgba(255,255,255,0.012));
}
.card h3 { margin: 0 0 12px; font-size: 0.7rem; letter-spacing: 0.16em; text-transform: uppercase; color: var(--cyan); font-weight: 600; }
.card p { margin: 0; font-size: 0.9rem; line-height: 1.62; color: var(--muted); }

/* ---------- contact ---------- */
.contact {
  padding: clamp(30px, 5vw, 56px);
  border: 1px solid var(--line);
  border-radius: 24px;
  background: linear-gradient(150deg, rgba(123,140,255,0.10), rgba(78,230,208,0.04));
  margin-bottom: clamp(48px, 8vw, 88px);
}
.contact h2 { margin: 0; font-size: clamp(1.5rem, 3.4vw, 2.2rem); letter-spacing: -0.02em; }
.contact p { margin: 12px 0 0; color: var(--muted); max-width: 56ch; line-height: 1.7; }

.actions { display: flex; flex-wrap: wrap; gap: 11px; margin-top: 28px; }
.button {
  display: inline-flex; align-items: center;
  min-height: 46px; padding: 0 18px;
  border: 1px solid var(--line-strong);
  border-radius: 12px;
  font-size: 0.9rem;
  transition: transform 160ms ease, border-color 160ms ease, background 160ms ease;
}
.button:hover { transform: translateY(-1px); border-color: rgba(255,255,255,0.34); }
.button.primary { background: var(--text); color: #0a0b0f; border-color: var(--text); font-weight: 500; }
.button.ghost { background: rgba(255,255,255,0.03); }

/* ---------- footer ---------- */
.site-footer {
  display: flex; align-items: center; gap: 12px; flex-wrap: wrap;
  padding-top: 26px; padding-bottom: 40px;
  border-top: 1px solid var(--line);
  font-size: 0.82rem;
  color: var(--muted-dim);
}
.sep { opacity: 0.4; }
.spectrum { flex: 1; min-width: 60px; height: 2px; border-radius: 2px; background: var(--spectrum); opacity: 0.65; }

/* ---------- responsive ---------- */
@media (max-width: 960px) {
  .split { grid-template-columns: minmax(0, 1fr); gap: 0; }
  .detail-wrap { position: static; }
  .detail-column:empty { display: none; }
  .entry-host { margin: 4px 0 18px; }
  .detail { border-radius: 16px; }
}

@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; scroll-behavior: auto !important; }
}
