/* ============================================================
   Rebecca L. Preston — personal site
   Dark / techy academic theme
   ============================================================ */

:root {
  --bg:        #070b12;
  --bg-2:      #0b1220;
  --panel:     #0e1728;
  --panel-2:   #111c31;
  --line:      #1e2b42;
  --text:      #e6ecf5;
  --text-dim:  #b4c0d4;
  --muted:     #7c8aa0;
  --accent:    #64ffda;   /* teal */
  --accent-2:  #7c9bff;   /* blue-violet */
  --accent-3:  #c77dff;   /* violet, quant track */
  --glow:      0 0 40px rgba(100, 255, 218, .12);
  --maxw:      1080px;
  --font-head: "Space Grotesk", system-ui, sans-serif;
  --font-body: "Inter", system-ui, sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, monospace;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; scroll-padding-top: 90px; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-weight: 400;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

/* heavier body copy for readability over the nebula */
.hero__tagline,
.about__body p,
.section__lead,
.panel__intro,
.panel__note,
.card p,
.pub__authors,
.contact__lead,
.teach__course p,
.tl__where,
.hlist li,
.bridge li { font-weight: 500; }

/* nebula layered under content — pinks, blues, purples.
   Order matters: the FIRST gradient sits on top. The central dark scrim
   keeps a readable band down the middle while color pools at the edges. */
body::before {
  content: "";
  position: fixed; inset: -15%;
  background:
    /* central reading scrim (on top) — wide band that protects the content column */
    radial-gradient(66% 50% at 50% 45%, rgba(5, 7, 14, .56), rgba(5, 7, 14, .20) 58%, transparent 84%),
    /* magenta / pink — top right */
    radial-gradient(48% 40% at 85% 6%, rgba(244, 72, 165, .72), transparent 70%),
    /* indigo blue — upper left */
    radial-gradient(50% 44% at 6% 16%, rgba(92, 116, 252, .66), transparent 72%),
    /* violet — mid right */
    radial-gradient(52% 48% at 94% 55%, rgba(165, 90, 252, .64), transparent 74%),
    /* cyan — lower left */
    radial-gradient(54% 48% at 10% 85%, rgba(64, 186, 252, .52), transparent 76%),
    /* soft pink — bottom center */
    radial-gradient(56% 46% at 63% 99%, rgba(230, 78, 196, .46), transparent 78%),
    /* faint overall violet wash */
    radial-gradient(88% 78% at 50% 50%, rgba(104, 72, 186, .30), transparent 90%);
  pointer-events: none; z-index: -2;
  animation: nebuladrift 46s ease-in-out infinite alternate;
}
@keyframes nebuladrift {
  from { transform: scale(1) translate3d(0, 0, 0); }
  to   { transform: scale(1.08) translate3d(-1.6%, 1.4%, 0); }
}
@media (prefers-reduced-motion: reduce) {
  body::before { animation: none; }
}

#starfield {
  position: fixed; inset: 0;
  width: 100%; height: 100%;
  z-index: -1; pointer-events: none;
}

/* keyboard accessibility — visible focus rings */
a:focus-visible,
button:focus-visible,
.tab:focus-visible,
.contact__card:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 6px;
}

.accent { color: var(--accent); }
.accent-alt { color: var(--accent-3); }
.muted  { color: var(--muted); font-weight: 400; }
strong  { color: #fff; font-weight: 600; }
em      { color: var(--text); }
sup     { font-size: .62em; }

/* ============ NAV ============ */
.nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 50;
  display: flex; align-items: center; gap: 1.5rem;
  padding: 1rem clamp(1.25rem, 5vw, 3rem);
  backdrop-filter: blur(10px);
  background: rgba(7, 11, 18, .55);
  border-bottom: 1px solid transparent;
  transition: border-color .3s, background .3s;
}
.nav.scrolled { border-bottom-color: var(--line); background: rgba(7, 11, 18, .82); }

.nav__brand {
  font-family: var(--font-head); font-weight: 700; font-size: 1.15rem;
  letter-spacing: .04em; color: var(--text); text-decoration: none;
}
.nav__links { display: flex; gap: 1.6rem; margin-left: auto; }
.nav__links a {
  font-size: .9rem; color: var(--text-dim); text-decoration: none;
  position: relative; padding: .2rem 0; transition: color .2s;
}
.nav__links a::after {
  content: ""; position: absolute; left: 0; bottom: -2px; height: 1px; width: 0;
  background: var(--accent); transition: width .25s;
}
.nav__links a:hover, .nav__links a.active { color: var(--text); }
.nav__links a.active::after { width: 100%; }

.nav__cv {
  font-family: var(--font-mono); font-size: .8rem; text-decoration: none;
  color: var(--accent); border: 1px solid var(--line); border-radius: 6px;
  padding: .4rem .7rem; transition: border-color .2s, box-shadow .2s;
  background: none; cursor: pointer; display: inline-flex; align-items: center; gap: .35rem;
}
.nav__cv:hover { border-color: var(--accent); box-shadow: var(--glow); }
.nav__toggle {
  display: none; background: none; border: none; color: var(--text);
  font-size: 1.4rem; cursor: pointer;
}

/* ============ HERO ============ */
.hero {
  min-height: 100vh; display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, .92fr);
  align-items: center; gap: 2rem;
  padding: 6rem clamp(1.25rem, 5vw, 3rem) 4rem;
  max-width: 1180px; margin: 0 auto; position: relative;
}
.hero__portrait {
  justify-self: end; align-self: end; width: 100%; max-width: 440px; height: 84vh;
  display: flex; align-items: flex-end; justify-content: center;
}
.hero__portrait img {
  width: 100%; height: 100%; object-fit: cover; object-position: center;
  -webkit-mask-image:
    linear-gradient(to top, transparent, #000 12%),
    linear-gradient(to bottom, transparent, #000 12%),
    linear-gradient(to left, transparent, #000 16%),
    linear-gradient(to right, transparent, #000 16%);
  -webkit-mask-composite: source-in;
  mask-image:
    linear-gradient(to top, transparent, #000 12%),
    linear-gradient(to bottom, transparent, #000 12%),
    linear-gradient(to left, transparent, #000 16%),
    linear-gradient(to right, transparent, #000 16%);
  mask-composite: intersect;
}
.hero__eyebrow {
  font-family: var(--font-mono); font-size: .82rem; color: var(--accent);
  letter-spacing: .05em; margin-bottom: 1.5rem;
}
.hero__name {
  font-family: var(--font-head); font-weight: 700;
  font-size: clamp(3.2rem, 11vw, 7rem); line-height: .95; letter-spacing: -.02em;
  background: linear-gradient(120deg, #fff 18%, #ffb3e0 55%, #ec5aa0 100%);
  -webkit-background-clip: text; background-clip: text; color: transparent;
  margin-bottom: 1.8rem;
}
.hero__tagline {
  font-size: clamp(1.05rem, 2.2vw, 1.4rem); color: var(--text-dim);
  max-width: 34ch; line-height: 1.5;
}
.hero__meta {
  display: flex; flex-wrap: wrap; gap: 1.4rem; margin: 2rem 0 2.4rem;
  font-family: var(--font-mono); font-size: .82rem; color: var(--text-dim);
}
.hero__meta span { display: inline-flex; align-items: center; }
.dot {
  width: 6px; height: 6px; border-radius: 50%; background: var(--accent);
  margin-right: .55rem; box-shadow: 0 0 8px var(--accent);
}
.hero__cta { display: flex; gap: 1rem; flex-wrap: wrap; }

.btn {
  font-family: var(--font-head); font-size: .92rem; font-weight: 500;
  text-decoration: none; padding: .8rem 1.5rem; border-radius: 8px;
  display: inline-flex; align-items: center; gap: .5rem;
  background: none; cursor: pointer;
  transition: transform .15s, box-shadow .2s, background .2s, border-color .2s;
}

/* CV chooser dropdown (astro / finance) */
.cv-menu { position: relative; display: inline-flex; }
.cv-menu__caret { font-size: .72em; opacity: .85; }
.cv-menu__list {
  position: absolute; top: calc(100% + .45rem); left: 0; z-index: 60;
  display: flex; flex-direction: column; min-width: 220px;
  background: var(--panel-2); border: 1px solid var(--line); border-radius: 10px;
  padding: .35rem; box-shadow: 0 14px 44px rgba(0, 0, 0, .5);
  opacity: 0; visibility: hidden; transform: translateY(-6px);
  transition: opacity .18s, transform .18s, visibility .18s;
}
.cv-menu--right .cv-menu__list { left: auto; right: 0; }
.cv-menu.open .cv-menu__list { opacity: 1; visibility: visible; transform: none; }
.cv-menu__list a {
  padding: .6rem .75rem; border-radius: 7px; text-decoration: none;
  color: var(--text-dim); font-family: var(--font-body); font-size: .9rem;
  transition: background .15s, color .15s;
}
.cv-menu__list a:hover, .cv-menu__list a:focus-visible { background: var(--panel); color: var(--text); }
.btn--primary { background: var(--accent); color: #05221c; }
.btn--primary:hover { transform: translateY(-2px); box-shadow: var(--glow); }
.btn--ghost { border: 1px solid var(--line); color: var(--text); }
.btn--ghost:hover { border-color: var(--accent-2); transform: translateY(-2px); }

.hero__scroll {
  position: absolute; bottom: 2rem; left: clamp(1.25rem, 5vw, 3rem);
  display: flex; align-items: center; gap: .8rem;
  font-family: var(--font-mono); font-size: .7rem; color: var(--muted);
  letter-spacing: .2em; text-transform: uppercase;
}
.hero__scroll-line {
  width: 50px; height: 1px; background: linear-gradient(90deg, var(--muted), transparent);
  position: relative; overflow: hidden;
}
.hero__scroll-line::after {
  content: ""; position: absolute; inset: 0; width: 20px;
  background: var(--accent); animation: scrolldash 2s infinite;
}
@keyframes scrolldash { from { transform: translateX(-20px); } to { transform: translateX(50px); } }

/* ============ SECTIONS ============ */
.section {
  max-width: var(--maxw); margin: 0 auto; position: relative;
  padding: 5.5rem clamp(1.25rem, 5vw, 3rem);
}
/* subtle divider between sections for scroll rhythm */
.section:not(:first-of-type)::before {
  content: ""; position: absolute; top: 0; left: 50%; transform: translateX(-50%);
  width: min(900px, 84%); height: 1px;
  background: linear-gradient(90deg, transparent, rgba(170, 188, 224, .16), transparent);
}
.section__head { display: flex; align-items: baseline; gap: 1rem; margin-bottom: 3.1rem; }
.section__idx {
  font-family: var(--font-mono); font-size: .95rem; color: var(--accent);
}
.section__title {
  font-family: var(--font-head); font-weight: 600; font-size: clamp(1.7rem, 4vw, 2.3rem);
  letter-spacing: -.01em;
}
.section__title::after {
  content: ""; display: inline-block; width: clamp(60px, 20vw, 220px); height: 1px;
  background: var(--line); margin-left: 1.2rem; vertical-align: middle;
}

.section__lead {
  color: var(--text-dim); max-width: 60ch; font-size: 1.05rem; margin-bottom: 2rem;
  margin-top: -1rem;
}

/* reveal on scroll */
.reveal { opacity: 0; transform: translateY(24px); transition: opacity .7s ease, transform .7s ease; }
.reveal.in { opacity: 1; transform: none; }

/* ============ ABOUT ============ */
.about { display: grid; grid-template-columns: 1.5fr 1fr; gap: 3rem; }
.about__body { max-width: 62ch; }
.about__skills-head {
  font-family: var(--font-mono); font-size: .8rem; text-transform: uppercase;
  letter-spacing: .1em; color: var(--accent); margin: 2rem 0 1rem;
}
.about__body p { color: var(--text-dim); margin-bottom: 1.2rem; font-size: 1.02rem; }
.about__body p:last-child { margin-bottom: 0; }
.about__photo { margin: 0 0 1.8rem; }
.about__photo img {
  width: 100%; display: block; aspect-ratio: 4 / 5; object-fit: cover;
  object-position: center 25%; border-radius: 14px; border: 1px solid var(--line);
  box-shadow: 0 12px 40px rgba(0, 0, 0, .45);
}
.about__aside h3 {
  font-family: var(--font-mono); font-size: .8rem; text-transform: uppercase;
  letter-spacing: .1em; color: var(--accent); margin-bottom: 1rem;
}
.about__aside h3:nth-of-type(2) { margin-top: 2rem; }
.stack { list-style: none; display: flex; flex-direction: column; gap: .7rem; }
.stack li {
  display: flex; justify-content: space-between; gap: 1rem;
  border-bottom: 1px solid var(--line); padding-bottom: .7rem; font-size: .9rem;
}
.stack__k { color: var(--muted); font-family: var(--font-mono); font-size: .8rem; }
.stack__v { color: var(--text); text-align: right; }
.tags { display: flex; flex-wrap: wrap; gap: .5rem; }
.tags span {
  font-size: .78rem; font-family: var(--font-mono);
  padding: .35rem .7rem; border: 1px solid var(--line); border-radius: 20px;
  color: var(--text-dim); background: var(--panel);
}

/* ============ TRACK LABELS ============ */
.track-label {
  font-family: var(--font-mono); font-size: .82rem; text-transform: uppercase;
  letter-spacing: .12em; color: var(--accent); margin: 2.4rem 0 1.3rem;
  display: flex; align-items: center; gap: .8rem;
}
.track-label::before { content: "▸"; color: var(--accent); }
.track-label--alt { color: var(--accent-3); }
.track-label--alt::before { color: var(--accent-3); }
.section > .track-label:first-of-type { margin-top: 0; }

/* ============ RESEARCH CARDS ============ */
.cards { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1.5rem; }
.card {
  background: linear-gradient(160deg, var(--panel), var(--bg-2));
  border: 1px solid var(--line); border-radius: 12px; padding: 1.6rem;
  position: relative; overflow: hidden; transition: transform .2s, border-color .2s;
}
.card::before {
  content: ""; position: absolute; top: 0; left: 0; width: 3px; height: 100%;
  background: var(--accent); opacity: .6; transition: opacity .2s;
}
.card--alt::before { background: var(--accent-3); }
.card:hover { transform: translateY(-4px); border-color: var(--accent); }
.card--alt:hover { border-color: var(--accent-3); }
.card:hover::before { opacity: 1; }
.card--wide { grid-column: 1 / -1; }
.card__year {
  font-family: var(--font-mono); font-size: .74rem; color: var(--accent);
  letter-spacing: .04em; margin-bottom: .7rem;
}
.card--alt .card__year { color: var(--accent-3); }
.card p a, .about__body p a {
  color: var(--accent-2); text-decoration: none;
  border-bottom: 1px solid rgba(124, 155, 255, .4); transition: border-color .2s;
}
.card p a:hover, .about__body p a:hover { border-bottom-color: var(--accent-2); }
.card h4 { font-family: var(--font-head); font-size: 1.12rem; font-weight: 600; margin-bottom: .6rem; }
.card p { color: var(--text-dim); font-size: .93rem; }
.card__collab {
  margin-top: .9rem; font-family: var(--font-mono); font-size: .76rem; color: var(--muted);
}

.card--min { padding: 1.3rem 1.4rem; }
.card--min h4 { font-size: 1rem; }
.card--min .card__year { color: var(--accent); }

/* ============ PHYSICS RESEARCH TREE ============ */
.rtree__hint { color: var(--text-dim); font-size: .92rem; max-width: 60ch; margin: -.5rem auto 1.8rem; text-align: center; }
.rtree { position: relative; padding-top: .4rem; }
.rtree__trunk {
  position: absolute; left: 50%; top: .2rem; bottom: 16px; width: 2px;
  background: linear-gradient(var(--accent), var(--accent-3) 62%, transparent);
  transform: translateX(-50%); opacity: .45; z-index: 0;
}
.rtree__era { text-align: center; position: relative; z-index: 1; margin-top: 1.7rem; }
.rtree__era:first-of-type { margin-top: 0; }
.rtree__label {
  display: inline-block; background: var(--panel); border: 1px solid var(--line);
  border-radius: 20px; padding: .32rem 1rem; font-family: var(--font-mono);
  font-size: .74rem; color: var(--accent); letter-spacing: .03em;
}
.rtree__row { display: flex; justify-content: center; gap: 1rem; padding-top: 14px; position: relative; }
.rtree__row::before { content: ""; position: absolute; top: 0; left: 50%; transform: translateX(-50%); width: 2px; height: 14px; background: var(--line); }
.rtree__item { position: relative; padding-top: 14px; flex: 1 1 200px; max-width: 300px; display: flex; }
.rtree__item::before { content: ""; position: absolute; top: 0; left: -.5rem; right: -.5rem; height: 2px; background: var(--line); }
.rtree__item:first-child::before { left: 50%; }
.rtree__item:last-child::before { right: 50%; }
.rtree__item:only-child::before { display: none; }
.rtree__item::after { content: ""; position: absolute; top: 0; left: 50%; transform: translateX(-50%); width: 2px; height: 14px; background: var(--line); }

.rnode {
  width: 100%; display: flex; flex-direction: column; align-items: flex-start; text-align: left;
  background: linear-gradient(160deg, var(--panel), var(--bg-2)); border: 1px solid var(--line);
  border-radius: 12px; padding: .85rem 1rem; cursor: pointer; position: relative; overflow: hidden;
  transition: border-color .2s, transform .2s;
}
.rnode::before { content: ""; position: absolute; left: 0; top: 0; width: 3px; height: 100%; background: var(--rc); opacity: .55; transition: opacity .2s; }
.rnode:hover { transform: translateY(-2px); border-color: var(--rc); }
.rnode.open { border-color: var(--rc); }
.rnode.open::before { opacity: 1; }
.rnode--teal { --rc: var(--accent); }
.rnode--pink { --rc: #ec5aa0; }
.rnode--violet { --rc: var(--accent-3); }
.rnode__head { display: flex; align-items: center; gap: .55rem; width: 100%; }
.rnode__dot { width: 8px; height: 8px; border-radius: 50%; background: var(--rc); box-shadow: 0 0 8px var(--rc); flex: none; }
.rnode__title { font-family: var(--font-head); font-weight: 600; font-size: .95rem; color: var(--text); line-height: 1.25; flex: 1; }
.rnode__chev { color: var(--muted); font-size: .7rem; transition: transform .2s; }
.rnode.open .rnode__chev { transform: rotate(180deg); }
.rnode__year { font-family: var(--font-mono); font-size: .7rem; color: var(--muted); margin-top: .3rem; }
.rnode__body { max-height: 0; overflow: hidden; transition: max-height .25s ease; width: 100%; color: var(--text-dim); font-size: .9rem; line-height: 1.6; }
.rnode.open .rnode__body { max-height: 340px; margin-top: .55rem; }
.rnode__collab { display: block; font-family: var(--font-mono); font-size: .74rem; color: var(--muted); margin-top: .6rem; }
.rnode__body a { color: var(--accent-2); border-bottom: 1px solid rgba(124, 155, 255, .4); }
.rnode__body a:hover { border-bottom-color: var(--accent-2); }

/* ============ RESEARCH TABS / PANELS ============ */
.tabs {
  display: inline-flex; gap: .4rem; padding: .35rem;
  border: 1px solid var(--line); border-radius: 12px; background: var(--panel);
  margin-bottom: 2rem; flex-wrap: wrap;
}
.tab {
  font-family: var(--font-head); font-size: .95rem; font-weight: 500;
  color: var(--text-dim); background: transparent; border: none; cursor: pointer;
  padding: .65rem 1.2rem; border-radius: 9px; display: inline-flex; align-items: center;
  gap: .6rem; transition: background .2s, color .2s;
}
.tab__idx {
  font-family: var(--font-mono); font-size: .72rem; width: 20px; height: 20px;
  display: inline-flex; align-items: center; justify-content: center;
  border: 1px solid var(--line); border-radius: 5px; color: var(--muted);
}
.tab:hover { color: var(--text); }
.tab.is-active { color: #05221c; }
.tab--phys.is-active { background: var(--accent); }
.tab--quant.is-active { background: var(--accent-3); color: #1a0a26; }
.tab.is-active .tab__idx { border-color: transparent; background: rgba(0,0,0,.18); color: inherit; }

.panel { display: none; animation: fade .4s ease; }
.panel.is-active { display: block; }
@keyframes fade { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
.panel__intro { color: var(--text-dim); max-width: 66ch; margin: 0 auto 1.6rem; font-size: .98rem; text-align: center; }

/* physics → finance translation list */
.bridge { list-style: none; display: grid; gap: .5rem; margin: 0 auto 1.8rem; max-width: 760px; }
.bridge li {
  display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 1rem;
  padding: .7rem 1rem; border: 1px solid var(--line); border-radius: 9px;
  background: var(--panel); font-size: .88rem;
}
.bridge li > span:first-child { color: var(--text); font-family: var(--font-mono); font-size: .8rem; text-align: right; }
.bridge li > span:last-child { color: var(--text-dim); }
.bridge__arrow { color: var(--accent-3); font-weight: 600; }

/* FRIB photo floated into Honors — lists wrap around it */
.honors-photo {
  float: left; width: 290px; margin: .3rem 1.8rem 1rem 0;
  shape-outside: inset(0 round 12px);
}
.honors-photo img {
  width: 100%; display: block; aspect-ratio: 3 / 4; object-fit: cover;
  border-radius: 12px; border: 1px solid var(--line);
  box-shadow: 0 12px 40px rgba(0, 0, 0, .4);
  transition: transform .25s, border-color .25s;
}
.honors-photo img:hover { transform: translateY(-3px); border-color: var(--accent); }
.honors-photo figcaption { margin-top: .5rem; font-size: .8rem; color: var(--muted); }

/* Traders@SMU leadership & teaching feature */
.traders { margin-top: 1.4rem; }
.traders__lead {
  display: grid; grid-template-columns: 1.05fr 1fr; gap: 2rem;
  align-items: center; margin-bottom: 1.6rem;
}
.traders__photo { margin: 0; }
.traders__photo img {
  width: 100%; display: block; border-radius: 12px; border: 1px solid var(--line);
}
.traders__photo figcaption { margin-top: .55rem; font-size: .8rem; color: var(--muted); }
.traders__about h4 { font-family: var(--font-head); font-size: 1.2rem; font-weight: 600; margin-bottom: .7rem; }
.traders__about p { color: var(--text-dim); font-size: .96rem; margin-bottom: .8rem; }
.traders__about p:last-child { margin-bottom: 0; }
.traders__tracks { display: grid; grid-template-columns: 1fr 1fr; gap: 1.5rem; align-items: start; }
.card__sub {
  font-family: var(--font-mono); font-size: .72rem; text-transform: uppercase;
  letter-spacing: .08em; color: var(--accent-3); margin: 1rem 0 .6rem;
}
.mini-list { list-style: none; display: flex; flex-direction: column; gap: .5rem; }
.mini-list li { position: relative; padding-left: 1.1rem; color: var(--text-dim); font-size: .9rem; line-height: 1.5; }
.mini-list li::before { content: "▸"; position: absolute; left: 0; color: var(--accent-3); }

/* availability note */
.panel__note {
  display: flex; align-items: flex-start; gap: .7rem; margin-top: 1.8rem;
  padding: 1rem 1.2rem; border: 1px solid var(--line); border-radius: 10px;
  background: linear-gradient(120deg, rgba(199,125,255,.08), transparent);
  color: var(--text-dim); font-size: .92rem; max-width: 62ch;
}
.panel__note-dot {
  width: 8px; height: 8px; border-radius: 50%; background: var(--accent-3);
  box-shadow: 0 0 10px var(--accent-3); margin-top: .45rem; flex-shrink: 0;
  animation: pulse 2.2s infinite;
}
@keyframes pulse { 0%,100% { opacity: 1; } 50% { opacity: .35; } }

/* ============ TEACHING ============ */
.teach { display: grid; grid-template-columns: 1fr 1fr; gap: 2.5rem; align-items: start; }
.teach__course { margin-bottom: 1.8rem; }
.teach__course:last-child { margin-bottom: 0; }
.teach__badge {
  display: inline-block; font-family: var(--font-mono); font-size: .74rem;
  color: var(--accent); border: 1px solid var(--line); border-radius: 20px;
  padding: .25rem .7rem; margin-bottom: .8rem;
}
.teach__badge--past { color: var(--muted); }
.teach__course h4 { font-family: var(--font-head); font-size: 1.15rem; font-weight: 600; margin-bottom: .55rem; }
.teach__course p { color: var(--text-dim); font-size: .96rem; margin-bottom: .9rem; }
.teach__course p:last-child { margin-bottom: 0; }

.teach__gallery { display: flex; flex-direction: column; gap: 1.1rem; }
.teach__poster { margin-top: 1.6rem; }
.teach__side { display: flex; flex-direction: column; gap: 1.6rem; }
.photo { margin: 0; }
.photo img {
  width: 100%; display: block; border-radius: 12px;
  border: 1px solid var(--line); object-fit: cover;
  transition: transform .25s, border-color .25s;
}
.photo--wide img { aspect-ratio: 16 / 10; }
.photo:not(.photo--wide) img { aspect-ratio: 4 / 5; }
.photo img:hover { transform: translateY(-3px); border-color: var(--accent); }
.photo figcaption {
  margin-top: .55rem; font-size: .82rem; color: var(--muted); line-height: 1.5;
}

/* ============ PUBLICATIONS ============ */
.pubs { list-style: none; display: flex; flex-direction: column; gap: 1rem; }
.pub {
  display: grid; grid-template-columns: 70px 1fr; gap: 1.5rem;
  padding: 1.4rem 1.6rem; border: 1px solid var(--line); border-radius: 12px;
  background: var(--panel); transition: border-color .2s, background .2s;
}
.pub:hover { border-color: var(--accent-2); background: var(--panel-2); }
.pub__year { font-family: var(--font-mono); color: var(--accent); font-size: .9rem; padding-top: .15rem; }
.pub__body h4 { font-family: var(--font-head); font-size: 1.08rem; font-weight: 600; line-height: 1.35; margin-bottom: .5rem; }
.pub__authors { color: var(--text-dim); font-size: .92rem; margin-bottom: .25rem; }
.pub__venue { color: var(--text-dim); font-size: .88rem; font-style: italic; margin-bottom: .7rem; }
.pub__links { display: flex; gap: 1rem; flex-wrap: wrap; }
.pub__links a {
  font-family: var(--font-mono); font-size: .78rem; color: var(--accent-2);
  text-decoration: none; border-bottom: 1px dashed transparent; transition: border-color .2s;
}
.pub__links a:hover { border-bottom-color: var(--accent-2); }
/* collapsible abstract */
.pub__abstract { margin: .1rem 0 .85rem; }
.pub__abstract summary {
  cursor: pointer; font-family: var(--font-mono); font-size: .76rem; color: var(--accent-2);
  list-style: none; display: inline-flex; align-items: center; gap: .45rem; width: fit-content;
  transition: color .2s;
}
.pub__abstract summary::-webkit-details-marker { display: none; }
.pub__abstract summary::before { content: "▸"; font-size: .7rem; transition: transform .2s; }
.pub__abstract[open] summary::before { transform: rotate(90deg); }
.pub__abstract summary:hover { color: var(--accent); }
.pub__abstract p { color: var(--text-dim); font-size: .87rem; line-height: 1.65; margin-top: .6rem; max-width: 70ch; }

.pubs--prep { margin-top: .2rem; }
.pub--prep { grid-template-columns: 1fr; padding: 1.1rem 1.4rem; opacity: .92; }
.pub--prep h4 { font-size: 1rem; }
.pub--prep .pub__authors { margin-bottom: 0; }
.pub__flag {
  font-family: var(--font-mono); font-size: .66rem; text-transform: uppercase;
  letter-spacing: .08em; color: var(--accent-3); border: 1px solid var(--line);
  border-radius: 20px; padding: .12rem .5rem; margin-left: .5rem; vertical-align: middle;
}

/* ============ EDUCATION TIMELINE ============ */
.timeline { position: relative; padding-left: 2rem; }
.timeline::before {
  content: ""; position: absolute; left: 5px; top: 8px; bottom: 8px; width: 1px;
  background: linear-gradient(var(--accent), var(--accent-2), transparent);
}
.tl { position: relative; padding-bottom: 2.2rem; }
.tl:last-child { padding-bottom: 0; }
.tl__dot {
  position: absolute; left: -1.95rem; top: .4rem; width: 11px; height: 11px;
  border-radius: 50%; background: var(--bg); border: 2px solid var(--accent);
  box-shadow: 0 0 10px var(--accent);
}
.tl__year { font-family: var(--font-mono); font-size: .8rem; color: var(--accent); margin-bottom: .3rem; }
.tl__body h4 { font-family: var(--font-head); font-size: 1.2rem; font-weight: 600; }
.tl__tag {
  font-family: var(--font-mono); font-size: .68rem; font-weight: 400;
  color: var(--accent-2); border: 1px solid var(--line); border-radius: 12px;
  padding: .1rem .5rem; margin-left: .5rem; vertical-align: middle;
}
.tl__where { color: var(--text-dim); font-size: .95rem; margin-top: .1rem; }
.tl__note { color: var(--muted); font-size: .86rem; margin-top: .35rem; }
.tl__desc { color: var(--text-dim); font-size: .9rem; line-height: 1.55; margin-top: .5rem; max-width: 62ch; }

/* ============ HONORS ============ */
.honors { display: flow-root; }  /* contains the floated photo; lists wrap around it */
.honors .track-label:first-of-type { margin-top: 0; }

/* Academic Honors + Summer Schools side by side, below the photo */
.honors-cols {
  clear: left; display: grid; grid-template-columns: 1fr 1fr; gap: 2.5rem;
}
.honors-cols .track-label { margin-top: 0; }

/* summer schools — name + location + one-line topic */
.schools { list-style: none; display: flex; flex-direction: column; gap: 1rem; }
.schools__name { font-size: .93rem; color: var(--text); font-weight: 500; line-height: 1.4; }
.schools__loc {
  font-family: var(--font-mono); font-size: .72rem; color: var(--muted);
  white-space: nowrap; margin-left: .35rem;
}
.schools__loc--hl { color: var(--accent); }
.schools__desc { font-size: .84rem; color: var(--text-dim); margin-top: .25rem; line-height: 1.5; }
.hlist { list-style: none; }
.hlist li {
  display: grid; grid-template-columns: 68px 1fr; gap: 1rem;
  font-size: .93rem; color: var(--text-dim); align-items: baseline;
  padding-bottom: .85rem; margin-bottom: .85rem; border-bottom: 1px solid var(--line);
}
.hlist--compact li { grid-template-columns: 1fr; }
.hlist__y { font-family: var(--font-mono); font-size: .78rem; color: var(--accent); }

/* ============ CONTACT ============ */
.section--contact { padding-bottom: 6rem; }
.contact__lead { color: var(--text-dim); max-width: 52ch; margin-bottom: 2.2rem; font-size: 1.05rem; }
.contact__links { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1rem; }
.contact__card {
  display: flex; flex-direction: column; gap: .35rem;
  padding: 1.4rem 1.6rem; border: 1px solid var(--line); border-radius: 12px;
  background: var(--panel); text-decoration: none; transition: transform .18s, border-color .2s, box-shadow .2s;
}
.contact__card:hover { transform: translateY(-3px); border-color: var(--accent); box-shadow: var(--glow); }
.contact__k { font-family: var(--font-mono); font-size: .76rem; text-transform: uppercase; letter-spacing: .1em; color: var(--muted); }
.contact__v { color: var(--text); font-size: 1.02rem; }

/* ============ FOOTER ============ */
.footer {
  border-top: 1px solid var(--line); text-align: center;
  padding: 2.5rem 1.25rem; display: flex; flex-direction: column; gap: .3rem;
}
.footer p { font-size: .85rem; color: var(--text-dim); }

/* ===================================================
   Launch-audit additions
   =================================================== */

/* skip link — visible on keyboard focus */
.skip-link {
  position: absolute; left: 12px; top: -60px; z-index: 100;
  background: var(--accent); color: #05221c; padding: .6rem 1rem; border-radius: 8px;
  font-family: var(--font-head); font-weight: 600; font-size: .9rem;
  text-decoration: none; transition: top .2s;
}
.skip-link:focus { top: 12px; }

/* hero positioning line + audience quick-links */
.hero__position {
  font-family: var(--font-head); font-weight: 500;
  font-size: clamp(1.1rem, 2.3vw, 1.45rem); line-height: 1.35;
  color: var(--text); max-width: 32ch; margin-bottom: 1rem;
}
.hero__paths {
  margin-top: 1.6rem; font-family: var(--font-mono); font-size: .82rem;
  color: var(--muted); display: flex; align-items: center; gap: .6rem; flex-wrap: wrap;
}
.hero__path {
  color: var(--text-dim); text-decoration: none;
  border-bottom: 1px solid transparent; padding-bottom: 1px;
  transition: color .2s, border-color .2s;
}
.hero__path--phys:hover, .hero__path--phys:focus-visible { color: var(--accent); border-color: var(--accent); }
.hero__path--quant:hover, .hero__path--quant:focus-visible { color: var(--accent-3); border-color: var(--accent-3); }

/* technical skills — grouped tags */
.skills { display: flex; flex-direction: column; gap: 1rem; }
.skills__group { display: flex; flex-direction: column; gap: .5rem; }
.skills__label {
  font-family: var(--font-mono); font-size: .72rem; letter-spacing: .08em;
  text-transform: uppercase; color: var(--muted);
}

/* placeholder profile cards (fill in before launch) */
.contact__card--todo { border-style: dashed; opacity: .72; }
.contact__card--todo .contact__v { color: var(--muted); }

/* honor global reduced-motion preference */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal { opacity: 1 !important; transform: none !important; transition: none !important; }
  .panel { animation: none !important; }
  .hero__scroll-line::after, .panel__note-dot { animation: none !important; }
}

/* ============ RESPONSIVE ============ */
@media (max-width: 780px) {
  .nav__links {
    position: fixed; inset: 62px 0 auto 0; flex-direction: column; gap: 0;
    background: rgba(9, 14, 24, .97); backdrop-filter: blur(12px);
    padding: 1rem clamp(1.25rem, 5vw, 3rem); border-bottom: 1px solid var(--line);
    transform: translateY(-140%); transition: transform .3s; margin-left: 0;
  }
  .nav__links.open { transform: none; }
  .nav__links a { padding: .8rem 0; border-bottom: 1px solid var(--line); }
  .nav__cv { margin-left: auto; }
  .nav__toggle { display: block; }
  .hero { grid-template-columns: 1fr; }
  .hero__portrait { display: none; }
  .about, .teach { grid-template-columns: 1fr; gap: 2rem; }
  .traders__lead, .traders__tracks { grid-template-columns: 1fr; gap: 1.5rem; }
  .rtree__trunk { display: none; }
  .rtree__row { flex-direction: column; align-items: stretch; gap: .8rem; padding-top: .8rem; }
  .rtree__row::before { display: none; }
  .rtree__item { flex: 1 1 auto; max-width: none; padding-top: 0; }
  .rtree__item::before, .rtree__item::after { display: none; }
  .honors-photo { float: none; width: 100%; max-width: 300px; margin: 0 0 1.5rem; }
  .honors-cols { grid-template-columns: 1fr; gap: 2rem; }
  .cards { grid-template-columns: 1fr; }
  .contact__links { grid-template-columns: 1fr; }
  .pub { grid-template-columns: 1fr; gap: .4rem; }
  .tabs { width: 100%; }
  .tab { flex: 1; justify-content: center; }
  .bridge li { grid-template-columns: 1fr; gap: .3rem; text-align: left; }
  .bridge li > span:first-child { text-align: left; }
  .bridge__arrow { display: none; }
}
