/* ==========================================================================
   Mohamad Iyad Al-Khiami — Academic Website
   Blueprint-inspired theme: engineering grid, amber & cyan accents
   ========================================================================== */

:root {
  --bg: #0a1220;
  --bg-2: #0d1830;
  --bg-3: #101f3c;
  --card: rgba(17, 30, 54, 0.72);
  --card-solid: #12203a;
  --ink: #e9eefb;
  --ink-strong: #ffffff;
  --muted: #94a3c4;
  --line: rgba(122, 162, 247, 0.14);
  --grid: rgba(76, 201, 240, 0.045);
  --accent: #f2b04e;
  --accent-soft: rgba(242, 176, 78, 0.14);
  --accent-2: #4cc9f0;
  --accent-2-soft: rgba(76, 201, 240, 0.12);
  --shadow: 0 18px 50px rgba(2, 8, 23, 0.55);
  --radius: 18px;
  --font-display: "Fraunces", Georgia, serif;
  --font-body: "Inter", system-ui, -apple-system, sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, "Cascadia Code", monospace;
}

[data-theme="light"] {
  --bg: #f6f7fb;
  --bg-2: #eef1f8;
  --bg-3: #e7ecf6;
  --card: rgba(255, 255, 255, 0.85);
  --card-solid: #ffffff;
  --ink: #1b2a48;
  --ink-strong: #0d1830;
  --muted: #5a6b8e;
  --line: rgba(27, 42, 72, 0.12);
  --grid: rgba(20, 80, 140, 0.05);
  --accent: #c07d13;
  --accent-soft: rgba(192, 125, 19, 0.12);
  --accent-2: #0e7fa8;
  --accent-2-soft: rgba(14, 127, 168, 0.1);
  --shadow: 0 18px 44px rgba(23, 42, 84, 0.12);
}

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

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

body {
  font-family: var(--font-body);
  background-color: var(--bg);
  color: var(--ink);
  line-height: 1.65;
  overflow-x: hidden;
  transition: background-color 0.4s ease, color 0.4s ease;
  background-image:
    linear-gradient(var(--grid) 1px, transparent 1px),
    linear-gradient(90deg, var(--grid) 1px, transparent 1px);
  background-size: 44px 44px;
}

::selection { background: var(--accent); color: #0a1220; }

img { max-width: 100%; display: block; }
a { color: var(--accent-2); text-decoration: none; }
a:hover { text-decoration: underline; }

.container { width: min(1120px, 92%); margin: 0 auto; }

/* ---------- Scroll progress ---------- */
.scroll-progress {
  position: fixed; top: 0; left: 0; height: 2.5px; width: 0;
  background: linear-gradient(90deg, var(--accent), var(--accent-2));
  z-index: 110; transition: width 0.1s linear;
}

/* ---------- Navigation ---------- */
.nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  background: color-mix(in srgb, var(--bg) 78%, transparent);
  border-bottom: 1px solid var(--line);
}
.nav-inner {
  display: flex; align-items: center; justify-content: space-between;
  padding: 0.8rem 0;
}
.nav-logo {
  font-family: var(--font-display); font-weight: 700; font-size: 1.25rem;
  color: var(--ink-strong); letter-spacing: 0.02em;
}
.nav-logo span { color: var(--accent); }
.nav-links { display: flex; gap: 1.4rem; list-style: none; align-items: center; }
.nav-links a {
  color: var(--muted); font-size: 0.86rem; font-weight: 500;
  letter-spacing: 0.03em; transition: color 0.2s;
}
.nav-links a:hover { color: var(--accent); text-decoration: none; }
.nav-links a.active { color: var(--accent); }
.theme-toggle {
  background: none; border: 1px solid var(--line); color: var(--ink);
  width: 38px; height: 38px; border-radius: 50%; cursor: pointer;
  font-size: 1rem; display: grid; place-items: center; transition: all 0.25s;
}
.theme-toggle:hover { border-color: var(--accent); transform: rotate(20deg); }
.nav-burger {
  display: none; background: none; border: none; color: var(--ink);
  font-size: 1.5rem; cursor: pointer;
}

/* ---------- Hero ---------- */
.hero {
  min-height: 100svh; position: relative;
  display: flex; align-items: center;
  padding: 120px 0 60px;
}
#particle-canvas {
  position: absolute; inset: 0; width: 100%; height: 100%;
  pointer-events: none;
}
.hero-content { position: relative; z-index: 2; }
.hero-kicker {
  font-family: var(--font-mono); font-size: 0.78rem; letter-spacing: 0.32em;
  text-transform: uppercase; color: var(--accent-2); margin-bottom: 1.2rem;
}
.hero h1 {
  font-family: var(--font-display); font-weight: 600;
  font-size: clamp(2.6rem, 6.5vw, 4.8rem);
  line-height: 1.06; color: var(--ink-strong); letter-spacing: -0.01em;
}
.hero h1 em { font-style: italic; color: var(--accent); }
.hero-sub {
  margin-top: 1.1rem; font-size: clamp(1.02rem, 2vw, 1.25rem);
  color: var(--muted); max-width: 640px;
}
.hero-sub strong { color: var(--ink); font-weight: 600; }
.hero-rotator {
  color: var(--accent-2); font-weight: 600; font-style: italic;
  display: inline-block; transition: opacity 0.35s ease, transform 0.35s ease;
}
.hero-rotator.fade-out { opacity: 0; transform: translateY(8px); }
.hero-affil {
  margin-top: 0.9rem; font-size: 0.92rem; color: var(--muted);
  display: flex; flex-wrap: wrap; gap: 0.4rem 1.6rem;
}
.hero-affil span::before { content: "▸ "; color: var(--accent); }
.hero-cta { margin-top: 2.2rem; display: flex; flex-wrap: wrap; gap: 0.9rem; }
.btn {
  display: inline-flex; align-items: center; gap: 0.5rem;
  padding: 0.78rem 1.5rem; border-radius: 999px;
  font-weight: 600; font-size: 0.92rem; cursor: pointer;
  transition: transform 0.2s, box-shadow 0.2s, background 0.2s;
  border: 1px solid transparent;
}
.btn:hover { transform: translateY(-2px); text-decoration: none; }
.btn-primary { background: var(--accent); color: #14100a; }
.btn-primary:hover { box-shadow: 0 10px 28px rgba(242, 176, 78, 0.35); }
.btn-ghost { border-color: var(--line); color: var(--ink); background: transparent; }
.btn-ghost:hover { border-color: var(--accent-2); color: var(--accent-2); }

.hero-stats {
  margin-top: 3.4rem; display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 1px; background: var(--line);
  border: 1px solid var(--line); border-radius: var(--radius);
  overflow: hidden; max-width: 860px;
}
.stat {
  background: var(--card); padding: 1.15rem 1.3rem;
  backdrop-filter: blur(6px);
}
.stat-num {
  font-family: var(--font-display); font-size: 2rem; font-weight: 700;
  color: var(--ink-strong); line-height: 1;
}
.stat-num .plus { color: var(--accent); }
.stat-label {
  margin-top: 0.35rem; font-size: 0.72rem; letter-spacing: 0.14em;
  text-transform: uppercase; color: var(--muted);
}
.stat-live { position: relative; }
.live-dot {
  position: absolute; top: 0.9rem; right: 0.9rem;
  width: 7px; height: 7px; border-radius: 50%;
  background: #38d97a; animation: pulse 2s infinite;
}
@keyframes pulse {
  0% { box-shadow: 0 0 0 0 rgba(56, 217, 122, 0.5); }
  70% { box-shadow: 0 0 0 8px rgba(56, 217, 122, 0); }
  100% { box-shadow: 0 0 0 0 rgba(56, 217, 122, 0); }
}

.scroll-hint {
  position: absolute; bottom: 2rem; left: 50%; transform: translateX(-50%);
  color: var(--muted); font-size: 1.4rem; animation: bob 2.2s infinite;
  z-index: 2;
}
@keyframes bob { 0%,100% { transform: translate(-50%,0);} 50% { transform: translate(-50%,8px);} }

/* ---------- Sections ---------- */
section { padding: 5.5rem 0; position: relative; }
.section-alt { background: color-mix(in srgb, var(--bg-2) 60%, transparent); }
.section-head { margin-bottom: 2.8rem; }
.kicker {
  font-family: var(--font-mono); font-size: 0.72rem; letter-spacing: 0.3em;
  text-transform: uppercase; color: var(--accent); margin-bottom: 0.7rem;
  display: flex; align-items: center; gap: 0.8rem;
}
.kicker::after { content: ""; height: 1px; width: 56px; background: var(--accent); opacity: 0.5; }
.section-head h2 {
  font-family: var(--font-display); font-weight: 600;
  font-size: clamp(1.8rem, 4vw, 2.6rem); color: var(--ink-strong);
  line-height: 1.15;
}
.section-head p { margin-top: 0.8rem; color: var(--muted); max-width: 640px; }

/* Reveal on scroll */
.reveal { opacity: 0; transform: translateY(26px); transition: opacity 0.7s ease, transform 0.7s ease; }
.reveal.visible { opacity: 1; transform: none; }

/* ---------- About ---------- */
.about-grid { display: grid; grid-template-columns: 320px 1fr; gap: 3rem; align-items: start; }
.portrait-wrap { position: relative; }
.portrait {
  width: 100%; aspect-ratio: 1; border-radius: var(--radius);
  object-fit: cover; box-shadow: var(--shadow);
  border: 1px solid var(--line);
}
.portrait-fallback {
  width: 100%; aspect-ratio: 1; border-radius: var(--radius);
  display: grid; place-items: center;
  background: linear-gradient(140deg, var(--bg-3), var(--bg-2));
  border: 1px solid var(--line);
  font-family: var(--font-display); font-size: 4rem; color: var(--accent);
}
.portrait-frame {
  position: absolute; top: -14px; left: -14px; width: 100%; aspect-ratio: 1;
  z-index: -1; border: 1px solid var(--accent); border-radius: var(--radius);
  opacity: 0.4;
}
.cred-badges { margin-top: 1.4rem; display: flex; flex-wrap: wrap; gap: 0.5rem; }
.badge {
  font-family: var(--font-mono); font-size: 0.7rem; letter-spacing: 0.08em;
  padding: 0.35rem 0.7rem; border-radius: 6px;
  background: var(--accent-2-soft); color: var(--accent-2);
  border: 1px solid color-mix(in srgb, var(--accent-2) 30%, transparent);
}
.about-text p { margin-bottom: 1.1rem; color: var(--ink); }
.about-text .lede {
  font-family: var(--font-display); font-size: 1.3rem; line-height: 1.5;
  color: var(--ink-strong);
}
.chips { display: flex; flex-wrap: wrap; gap: 0.55rem; margin-top: 1.4rem; }
.chip {
  font-size: 0.8rem; font-weight: 500; padding: 0.42rem 0.9rem;
  border-radius: 999px; border: 1px solid var(--line);
  color: var(--muted); background: var(--card); transition: all 0.2s;
}
.chip:hover { border-color: var(--accent); color: var(--accent); transform: translateY(-1px); }

/* ---------- Impact / chart ---------- */
.impact-grid { display: grid; grid-template-columns: 1fr 1.4fr; gap: 2rem; align-items: stretch; }
.impact-card {
  background: var(--card); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 1.8rem; backdrop-filter: blur(8px);
}
.metric-row { display: flex; justify-content: space-between; align-items: baseline; padding: 0.9rem 0; border-bottom: 1px dashed var(--line); }
.metric-row:last-of-type { border-bottom: none; }
.metric-row .m-label { color: var(--muted); font-size: 0.9rem; }
.metric-row .m-value { font-family: var(--font-display); font-size: 1.9rem; font-weight: 700; color: var(--accent); }
.updated-note { margin-top: 1rem; font-family: var(--font-mono); font-size: 0.68rem; color: var(--muted); display: flex; align-items: center; gap: 0.45rem; }
.updated-note .live-dot { position: static; }
.chart-title { font-size: 0.85rem; color: var(--muted); margin-bottom: 1rem; letter-spacing: 0.08em; text-transform: uppercase; }
#citations-chart { width: 100%; height: 260px; }

/* ---------- Grants & Funding ---------- */
.grant-list { display: flex; flex-direction: column; gap: 1.2rem; }
.grant-card {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 1.7rem 1.9rem; backdrop-filter: blur(8px); transition: border-color 0.25s;
}
.grant-card:hover { border-color: color-mix(in srgb, var(--accent) 45%, transparent); }
.grant-top { display: flex; flex-wrap: wrap; gap: 0.6rem; align-items: center; margin-bottom: 0.9rem; }
.role-badge {
  font-family: var(--font-mono); font-size: 0.66rem; letter-spacing: 0.12em;
  text-transform: uppercase; padding: 0.28rem 0.75rem; border-radius: 999px; font-weight: 600;
}
.role-badge.pi { background: var(--accent); color: #14100a; }
.role-badge.coi { background: var(--accent-2-soft); color: var(--accent-2); border: 1px solid color-mix(in srgb, var(--accent-2) 35%, transparent); }
.grant-status {
  margin-left: auto; font-family: var(--font-mono); font-size: 0.7rem;
  letter-spacing: 0.1em; color: var(--muted);
}
.grant-status.upcoming { color: #38d97a; }
.grant-card h3 { font-size: 1.08rem; color: var(--ink-strong); line-height: 1.45; margin-bottom: 0.7rem; }
.grant-meta {
  display: flex; flex-wrap: wrap; gap: 0.5rem 1.6rem; align-items: baseline; margin-bottom: 0.8rem;
}
.grant-funder { font-size: 0.82rem; color: var(--muted); font-style: italic; }
.grant-amount {
  font-family: var(--font-display); font-size: 1.35rem; font-weight: 700; color: var(--accent);
}
.grant-card > p { font-size: 0.9rem; color: var(--ink); }
.grant-card details { margin-top: 0.9rem; }
.grant-card summary {
  cursor: pointer; font-size: 0.78rem; font-weight: 600; color: var(--accent-2);
  letter-spacing: 0.05em; list-style: none; display: inline-flex; align-items: center; gap: 0.4rem;
}
.grant-card summary::before { content: "▸"; transition: transform 0.2s; }
.grant-card details[open] summary::before { transform: rotate(90deg); }
.grant-card summary::-webkit-details-marker { display: none; }
.grant-card details p {
  margin-top: 0.8rem; font-size: 0.86rem; color: var(--muted); line-height: 1.7;
  padding-left: 1rem; border-left: 2px solid var(--line);
}

/* ---------- Institution logos ---------- */
.logo-tile {
  background: #fdfdfd; border: 1px solid var(--line); border-radius: 10px;
  display: grid; place-items: center; padding: 6px; flex-shrink: 0;
}
.logo-tile img { max-width: 100%; max-height: 100%; object-fit: contain; }
.collab-logo-tile {
  width: 58px; height: 58px; border-radius: 12px; background: #fdfdfd;
  border: 1px solid var(--line); display: grid; place-items: center; padding: 7px;
}
.collab-logo-tile img { max-width: 100%; max-height: 100%; object-fit: contain; }
.mono-tile {
  font-family: var(--font-display); font-weight: 700; font-size: 1.15rem;
  color: #12203a; background: #fdfdfd;
}
.mono-tile svg { width: 26px; height: 26px; color: #12203a; }
.tl-logo { float: right; width: 46px; height: 46px; margin: 0 0 0.5rem 0.9rem; }
.grant-logo { width: 42px; height: 42px; }

/* ---------- Background: education cards ---------- */
.edu-grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.2rem; margin-bottom: 3.2rem;
}
.edu-card {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 1.5rem; backdrop-filter: blur(8px);
  transition: transform 0.25s, box-shadow 0.25s;
}
.edu-card:hover { transform: translateY(-4px); box-shadow: var(--shadow); }
.edu-logo { width: 52px; height: 52px; margin-bottom: 0.9rem; }
.edu-years { font-family: var(--font-mono); font-size: 0.72rem; color: var(--accent-2); letter-spacing: 0.1em; }
.edu-card h3 { font-size: 1.05rem; color: var(--ink-strong); margin: 0.3rem 0 0.2rem; line-height: 1.4; }
.edu-org { font-size: 0.85rem; color: var(--muted); font-style: italic; margin-bottom: 0.55rem; }
.edu-card p { font-size: 0.85rem; color: var(--muted); }
.edu-link { margin-top: 0.6rem !important; font-size: 0.8rem !important; }
.edu-link a { font-weight: 600; }
.review-note {
  margin-top: 1.6rem; font-size: 0.88rem; color: var(--muted);
  border-left: 2px solid var(--line); padding-left: 1rem; max-width: 720px;
}
.review-note em { color: var(--ink); }

/* ---------- Background: appointment org cards ---------- */
.org-card {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 1.5rem; margin-bottom: 1.2rem; backdrop-filter: blur(8px);
  transition: border-color 0.25s;
}
.org-card:hover { border-color: color-mix(in srgb, var(--accent-2) 40%, transparent); }
.org-head { display: flex; gap: 1rem; align-items: center; margin-bottom: 1.1rem; }
.org-logo { width: 52px; height: 52px; }
.org-head h3 { font-size: 1.05rem; color: var(--ink-strong); line-height: 1.3; }
.org-head span { display: block; font-size: 0.78rem; color: var(--muted); font-style: italic; margin-top: 0.15rem; }
.ladder { border-left: 2px solid color-mix(in srgb, var(--accent-2) 40%, transparent); margin: 0 0 1rem 0.55rem; }
.org-card.industry .ladder { border-left-color: color-mix(in srgb, var(--accent) 45%, transparent); }
.ladder-step { position: relative; padding: 0 0 1.05rem 1.3rem; }
.ladder-step:last-child { padding-bottom: 0.1rem; }
.ladder-step::before {
  content: ""; position: absolute; left: -8px; top: 4px; width: 12px; height: 12px;
  border-radius: 50%; background: var(--bg); border: 3px solid var(--muted);
}
.ladder-step.current::before { border-color: var(--accent); }
.ladder-role { font-weight: 600; font-size: 0.95rem; color: var(--ink); }
.ladder-step.current .ladder-role { color: var(--ink-strong); }
.ladder-date { font-family: var(--font-mono); font-size: 0.7rem; color: var(--muted); letter-spacing: 0.08em; margin-top: 0.15rem; }
.current-tag {
  font-size: 0.58rem; font-family: var(--font-mono); text-transform: uppercase;
  letter-spacing: 0.12em; background: var(--accent-soft); color: var(--accent);
  padding: 0.14rem 0.5rem; border-radius: 4px; margin-left: 0.55rem; vertical-align: 1px;
}
.org-note { font-size: 0.85rem; color: var(--muted); }

/* ---------- Timeline ---------- */
.timeline { position: relative; margin-left: 10px; }
.timeline::before {
  content: ""; position: absolute; left: 0; top: 6px; bottom: 6px;
  width: 2px; background: linear-gradient(var(--accent-2), var(--accent));
  opacity: 0.45;
}
.tl-item { position: relative; padding: 0 0 2.2rem 2.2rem; }
.tl-item::before {
  content: ""; position: absolute; left: -6px; top: 7px;
  width: 14px; height: 14px; border-radius: 50%;
  background: var(--bg); border: 3px solid var(--accent-2);
}
.tl-item.tl-industry::before { border-color: var(--accent); }
.tl-date { font-family: var(--font-mono); font-size: 0.72rem; color: var(--accent-2); letter-spacing: 0.1em; }
.tl-item.tl-industry .tl-date { color: var(--accent); }
.tl-item h3 { font-size: 1.06rem; color: var(--ink-strong); margin: 0.25rem 0 0.15rem; }
.tl-item .tl-org { font-size: 0.88rem; color: var(--muted); font-style: italic; }
.tl-item p { font-size: 0.9rem; color: var(--muted); margin-top: 0.45rem; max-width: 700px; }
.tl-tag {
  display: inline-block; font-size: 0.62rem; font-family: var(--font-mono);
  letter-spacing: 0.14em; text-transform: uppercase; margin-left: 0.6rem;
  padding: 0.15rem 0.55rem; border-radius: 4px;
  background: var(--accent-2-soft); color: var(--accent-2);
}
.tl-industry .tl-tag { background: var(--accent-soft); color: var(--accent); }
.timeline-cols { display: grid; grid-template-columns: 1fr 1fr; gap: 3rem; }
.timeline-cols h3.col-title {
  font-family: var(--font-display); font-size: 1.3rem; color: var(--ink-strong);
  margin-bottom: 1.6rem;
}

/* ---------- Research cards ---------- */
.card-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(255px, 1fr)); gap: 1.2rem; }
.r-card {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 1.5rem; transition: transform 0.25s, border-color 0.25s, box-shadow 0.25s;
  backdrop-filter: blur(8px); position: relative; overflow: hidden;
}
.r-card::after {
  content: ""; position: absolute; top: 0; left: 0; right: 0; height: 2px;
  background: linear-gradient(90deg, var(--accent), var(--accent-2));
  transform: scaleX(0); transform-origin: left; transition: transform 0.35s;
}
.r-card:hover { transform: translateY(-5px); border-color: transparent; box-shadow: var(--shadow); }
.r-card:hover::after { transform: scaleX(1); }
.r-icon { font-size: 1.7rem; margin-bottom: 0.9rem; }
.r-num {
  font-family: var(--font-mono); font-size: 0.78rem; font-weight: 600;
  letter-spacing: 0.2em; color: var(--accent); margin-bottom: 0.9rem;
}
.r-num::after { content: ""; display: block; width: 26px; height: 2px; background: var(--accent); opacity: 0.5; margin-top: 0.45rem; }
.r-card h3 { font-size: 1.02rem; color: var(--ink-strong); margin-bottom: 0.5rem; }
.r-card p { font-size: 0.86rem; color: var(--muted); }

/* ---------- Publications ---------- */
.pub-controls { display: flex; flex-wrap: wrap; gap: 0.8rem; margin-bottom: 1.8rem; align-items: center; }
.pub-filters { display: flex; flex-wrap: wrap; gap: 0.45rem; }
.filter-btn {
  background: transparent; border: 1px solid var(--line); color: var(--muted);
  padding: 0.42rem 1rem; border-radius: 999px; font-size: 0.8rem; font-weight: 500;
  cursor: pointer; transition: all 0.2s; font-family: var(--font-body);
}
.filter-btn:hover { border-color: var(--accent); color: var(--accent); }
.filter-btn.active { background: var(--accent); border-color: var(--accent); color: #14100a; }
.pub-search {
  flex: 1; min-width: 210px; background: var(--card); border: 1px solid var(--line);
  border-radius: 999px; padding: 0.5rem 1.1rem; color: var(--ink);
  font-family: var(--font-body); font-size: 0.86rem; outline: none;
}
.pub-search:focus { border-color: var(--accent-2); }
.pub-search::placeholder { color: var(--muted); }
.pub-count { font-family: var(--font-mono); font-size: 0.72rem; color: var(--muted); }

.pub-list { display: flex; flex-direction: column; gap: 0.9rem; }
.pub-item {
  background: var(--card); border: 1px solid var(--line); border-radius: 14px;
  padding: 1.25rem 1.4rem; transition: border-color 0.25s; backdrop-filter: blur(8px);
}
.pub-item:hover { border-color: color-mix(in srgb, var(--accent-2) 45%, transparent); }
.pub-top { display: flex; gap: 1rem; align-items: baseline; }
.pub-year {
  font-family: var(--font-display); font-weight: 700; font-size: 1.05rem;
  color: var(--accent); min-width: 52px;
}
.pub-body { flex: 1; }
.pub-title { font-size: 1rem; font-weight: 600; color: var(--ink-strong); line-height: 1.45; }
.pub-authors { margin-top: 0.3rem; font-size: 0.83rem; color: var(--muted); }
.pub-venue { font-size: 0.83rem; color: var(--accent-2); font-style: italic; margin-top: 0.15rem; }
.pub-type-badge {
  font-family: var(--font-mono); font-size: 0.6rem; letter-spacing: 0.12em;
  text-transform: uppercase; padding: 0.18rem 0.55rem; border-radius: 4px;
  white-space: nowrap;
}
.pt-journal { background: var(--accent-2-soft); color: var(--accent-2); }
.pt-conference { background: var(--accent-soft); color: var(--accent); }
.pt-chapter { background: rgba(56, 217, 122, 0.12); color: #38d97a; }
.pt-other { background: rgba(180, 140, 255, 0.13); color: #b48cff; }
.pub-actions { margin-top: 0.75rem; display: flex; flex-wrap: wrap; gap: 0.55rem; }
.pub-action {
  background: none; border: 1px solid var(--line); color: var(--muted);
  font-size: 0.72rem; font-weight: 600; letter-spacing: 0.04em;
  padding: 0.32rem 0.85rem; border-radius: 999px; cursor: pointer;
  transition: all 0.2s; font-family: var(--font-body); display: inline-flex;
  align-items: center; gap: 0.35rem;
}
.pub-action:hover { border-color: var(--accent); color: var(--accent); text-decoration: none; }
.pub-abstract {
  display: none; margin-top: 0.9rem; padding: 0.95rem 1.1rem;
  border-left: 2px solid var(--accent); background: color-mix(in srgb, var(--bg-3) 55%, transparent);
  border-radius: 0 10px 10px 0; font-size: 0.87rem; color: var(--ink); line-height: 1.7;
}
.pub-abstract.open { display: block; animation: fadeIn 0.3s ease; }
.pub-photos { display: none; gap: 1rem; margin-top: 0.9rem; flex-wrap: wrap; }
.pub-photos.open { display: flex; animation: fadeIn 0.3s ease; }
.pub-photo { margin: 0; width: 200px; }
.pub-photo img {
  width: 200px; height: 140px; object-fit: cover; border-radius: 10px;
  border: 1px solid var(--line); cursor: zoom-in; transition: transform 0.2s;
}
.pub-photo img:hover { transform: scale(1.03); }
.pub-photo figcaption { font-size: 0.7rem; color: var(--muted); margin-top: 0.35rem; line-height: 1.5; }
.pub-photo-video { position: relative; }
.pub-photo-video::after {
  content: "▶"; position: absolute; top: 0; left: 0; width: 200px; height: 140px;
  display: grid; place-items: center; color: #fff; font-size: 1.1rem;
  background: rgba(5, 10, 22, 0.35); border-radius: 10px; pointer-events: none;
}
@keyframes fadeIn { from { opacity: 0; transform: translateY(-4px); } to { opacity: 1; } }

/* ---------- Teaching ---------- */
.teach-grid { display: grid; grid-template-columns: 1.2fr 1fr; gap: 2.4rem; align-items: start; }
.quote-card {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 2rem; position: relative; backdrop-filter: blur(8px);
}
.quote-card::before {
  content: "\201C"; font-family: var(--font-display); font-size: 5rem;
  color: var(--accent); opacity: 0.35; position: absolute; top: -0.6rem; left: 1.2rem;
}
.quote-card blockquote {
  font-family: var(--font-display); font-size: 1.22rem; font-style: italic;
  color: var(--ink-strong); line-height: 1.6; margin-top: 0.8rem;
}
.quote-card cite { display: block; margin-top: 1rem; font-size: 0.82rem; color: var(--muted); font-style: normal; }
.award-callout {
  margin-top: 1.4rem; display: flex; gap: 1rem; align-items: center;
  background: linear-gradient(120deg, var(--accent-soft), transparent);
  border: 1px solid color-mix(in srgb, var(--accent) 35%, transparent);
  border-radius: var(--radius); padding: 1.2rem 1.4rem;
}
.award-callout .trophy { font-size: 2rem; }
.award-callout .callout-ico { color: var(--accent); flex-shrink: 0; }
.award-callout .callout-ico svg { width: 30px; height: 30px; }
.award-callout strong { color: var(--ink-strong); display: block; }
.award-callout span { font-size: 0.84rem; color: var(--muted); }
.course-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0.6rem; }
.course {
  font-size: 0.84rem; padding: 0.65rem 0.9rem; border-radius: 10px;
  background: var(--card); border: 1px solid var(--line); color: var(--ink);
  transition: all 0.2s;
}
.course:hover { border-color: var(--accent-2); transform: translateX(4px); }
.course::before { content: "◆ "; color: var(--accent); font-size: 0.6rem; vertical-align: 2px; }

/* ---------- Testimonials ---------- */
.testimonial-strip { margin-top: 3rem; }
.testimonial-row {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1.4rem; margin-top: 1.4rem;
}
.testimonial {
  margin: 0; padding: 0.2rem 0 0.2rem 1.2rem;
  border-left: 2px solid color-mix(in srgb, var(--accent-2) 50%, transparent);
}
.testimonial p { font-style: italic; font-size: 0.92rem; color: var(--ink); line-height: 1.7; }
.testimonial cite {
  display: block; margin-top: 0.7rem; font-style: normal;
  font-family: var(--font-mono); font-size: 0.66rem; letter-spacing: 0.08em;
  color: var(--muted);
}

/* ---------- Projects (supervision) ---------- */
.proj-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 1.2rem; }
.proj-card {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 1.5rem; transition: transform 0.25s, box-shadow 0.25s; backdrop-filter: blur(8px);
  display: flex; flex-direction: column; gap: 0.6rem;
}
.proj-card:hover { transform: translateY(-4px); box-shadow: var(--shadow); }
.proj-meta { display: flex; justify-content: space-between; align-items: center; }
.proj-year { font-family: var(--font-mono); font-size: 0.7rem; color: var(--muted); letter-spacing: 0.1em; }
.award-badge {
  font-size: 0.68rem; font-weight: 700; padding: 0.22rem 0.65rem; border-radius: 999px;
  background: linear-gradient(120deg, #f2b04e, #e8893a); color: #14100a;
}
.award-badge.silver { background: linear-gradient(120deg, #cfd8e6, #9fb0c8); }
.proj-card h3 { font-size: 0.98rem; color: var(--ink-strong); line-height: 1.4; }
.proj-card p { font-size: 0.84rem; color: var(--muted); }
.proj-photos { display: flex; gap: 0.5rem; margin-top: 0.4rem; }
.proj-thumb {
  width: 68px; height: 52px; border-radius: 8px; object-fit: cover;
  border: 1px solid var(--line); cursor: zoom-in; transition: transform 0.2s, border-color 0.2s;
  position: relative; display: inline-block; overflow: hidden; flex-shrink: 0;
}
.proj-thumb:hover { transform: scale(1.06); border-color: var(--accent); }
.proj-thumb-video img { width: 100%; height: 100%; object-fit: cover; display: block; }
.proj-thumb-video::after {
  content: "▶"; position: absolute; inset: 0; display: grid; place-items: center;
  color: #fff; font-size: 0.85rem; background: rgba(5, 10, 22, 0.35);
}

/* ---------- Gallery ---------- */
.gallery-controls { display: flex; flex-wrap: wrap; gap: 0.45rem; margin-bottom: 1.6rem; }
.gallery-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 1rem;
}
.g-item {
  position: relative; border-radius: 14px; overflow: hidden;
  border: 1px solid var(--line); aspect-ratio: 4 / 3; cursor: pointer;
  background: var(--card); transition: transform 0.25s, box-shadow 0.25s;
}
.g-item:hover { transform: translateY(-4px); box-shadow: var(--shadow); }
.g-item img, .g-item video {
  width: 100%; height: 100%; object-fit: cover;
  transition: transform 0.45s ease;
}
.g-item:hover img, .g-item:hover video { transform: scale(1.06); }
.g-play {
  position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%);
  width: 54px; height: 54px; border-radius: 50%;
  background: rgba(5, 10, 22, 0.65); backdrop-filter: blur(4px);
  border: 1px solid rgba(255, 255, 255, 0.35);
  display: grid; place-items: center; color: #fff; font-size: 1.1rem;
  padding-left: 4px; pointer-events: none; transition: all 0.25s;
}
.g-item:hover .g-play { background: var(--accent); color: #14100a; transform: translate(-50%, -50%) scale(1.1); }
.g-caption {
  position: absolute; inset: auto 0 0 0; padding: 2rem 1rem 0.85rem;
  background: linear-gradient(transparent, rgba(5, 10, 22, 0.85));
  color: #fff; font-size: 0.8rem; font-weight: 500;
  opacity: 0; transform: translateY(8px); transition: all 0.3s ease;
}
.g-item:hover .g-caption { opacity: 1; transform: none; }
.g-placeholder {
  width: 100%; height: 100%; display: flex; flex-direction: column;
  align-items: center; justify-content: center; gap: 0.5rem; padding: 1rem;
  text-align: center; background: linear-gradient(140deg, var(--bg-3), var(--bg-2));
}
.g-placeholder .ph-icon { font-size: 2rem; opacity: 0.6; }
.g-placeholder .ph-caption { font-size: 0.8rem; color: var(--muted); }
.g-placeholder .ph-file {
  font-family: var(--font-mono); font-size: 0.62rem; color: var(--accent-2);
  word-break: break-all;
}

.lightbox {
  position: fixed; inset: 0; z-index: 200; display: none;
  align-items: center; justify-content: center; flex-direction: column;
  background: rgba(4, 8, 18, 0.92); backdrop-filter: blur(8px);
  padding: 3rem 1.5rem; cursor: zoom-out;
}
.lightbox.open { display: flex; animation: fadeIn 0.25s ease; }
.lightbox img, .lightbox video {
  max-width: min(1000px, 100%); max-height: 78vh; object-fit: contain;
  border-radius: 12px; box-shadow: 0 30px 80px rgba(0, 0, 0, 0.6);
  cursor: default;
}
.lightbox-caption { margin-top: 1rem; color: #e9eefb; font-size: 0.92rem; text-align: center; }
.lightbox-close {
  position: absolute; top: 1.2rem; right: 1.6rem; background: none; border: none;
  color: #fff; font-size: 2rem; cursor: pointer; line-height: 1;
}

.yt-callout {
  margin-top: 2.4rem; display: flex; flex-wrap: wrap; align-items: center;
  justify-content: space-between; gap: 1rem;
  border: 1px solid color-mix(in srgb, #ff4444 35%, transparent);
  background: linear-gradient(120deg, rgba(255, 68, 68, 0.1), transparent);
  border-radius: var(--radius); padding: 1.4rem 1.8rem;
}
.yt-callout .yt-text strong { color: var(--ink-strong); display: block; font-size: 1.05rem; }
.yt-callout .yt-text span { font-size: 0.86rem; color: var(--muted); }
.btn-youtube { background: #ff0033; color: #fff; }
.btn-youtube:hover { box-shadow: 0 10px 28px rgba(255, 0, 51, 0.35); }

/* ---------- Tools teaser ---------- */
.tool-hero {
  display: grid; grid-template-columns: 1.5fr 1fr; gap: 2rem; align-items: center;
  background: var(--card); border: 1px solid color-mix(in srgb, var(--accent-2) 35%, transparent);
  border-radius: var(--radius); padding: 2.2rem 2.4rem; color: inherit;
  text-decoration: none; transition: transform 0.25s, box-shadow 0.25s;
}
.tool-hero:hover { transform: translateY(-4px); box-shadow: var(--shadow); text-decoration: none; }
.tool-hero h3 {
  font-family: var(--font-display); font-size: 2rem; color: var(--ink-strong);
  margin: 0.5rem 0 0.8rem;
}
.tool-hero-text p { font-size: 0.92rem; color: var(--muted); margin-bottom: 0.8rem; }
.tool-hero-text p strong { color: var(--ink); }
.tool-hero-text .btn { margin-top: 0.4rem; }
.tool-hero-art { color: var(--ink-strong); }
.tool-hero-art svg { width: 100%; height: auto; }
.th-sup { stroke: var(--accent-2); stroke-width: 2.2; }
.th-load { stroke: var(--accent); stroke-width: 2.6; }
.th-loadhead { fill: var(--accent); }
.th-moment { stroke: var(--accent); stroke-width: 2.2; }
.th-momentfill { fill: color-mix(in srgb, var(--accent) 14%, transparent); }
.tool-more { margin-top: 1.4rem; font-size: 0.84rem; color: var(--muted); font-style: italic; }
@media (max-width: 800px) { .tool-hero { grid-template-columns: 1fr; } }

/* ---------- SDG ---------- */
.sdg-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 1.2rem; }
.sdg-tile { perspective: 900px; height: 230px; cursor: pointer; }
.sdg-inner {
  position: relative; width: 100%; height: 100%;
  transition: transform 0.65s cubic-bezier(0.4, 0.2, 0.2, 1);
  transform-style: preserve-3d;
}
.sdg-tile:hover .sdg-inner, .sdg-tile:focus-within .sdg-inner { transform: rotateY(180deg); }
.sdg-face {
  position: absolute; inset: 0; border-radius: var(--radius);
  backface-visibility: hidden; -webkit-backface-visibility: hidden;
  padding: 1.5rem; display: flex; flex-direction: column; justify-content: space-between;
}
.sdg-front { color: #fff; }
.sdg-num { font-family: var(--font-display); font-size: 2.6rem; font-weight: 700; line-height: 1; }
.sdg-name { font-weight: 700; font-size: 1.02rem; text-transform: uppercase; letter-spacing: 0.04em; line-height: 1.3; }
.sdg-back {
  transform: rotateY(180deg); background: var(--card-solid);
  border: 1px solid var(--line); font-size: 0.82rem; color: var(--ink);
  justify-content: center; line-height: 1.6;
}
.sdg-3 { background: #4c9f38; } .sdg-4 { background: #c5192d; }
.sdg-9 { background: #fd6925; } .sdg-11 { background: #fd9d24; }

/* ---------- Collaboration map ---------- */
.map-wrap {
  margin-bottom: 2.6rem; border: 1px solid var(--line); border-radius: var(--radius);
  background: color-mix(in srgb, var(--bg-2) 55%, transparent);
  padding: 1rem; overflow: hidden;
}
.map-wrap svg { width: 100%; height: auto; display: block; }
.map-dots {
  fill: none; stroke: var(--muted); stroke-width: 1.7; stroke-linecap: round;
  opacity: 0.34;
}
.map-arc {
  fill: none; stroke: var(--accent); stroke-width: 1.4; stroke-linecap: round;
  opacity: 0.75; stroke-dasharray: 1; stroke-dashoffset: 1;
  animation: arcdraw 1.4s ease forwards;
}
@keyframes arcdraw { to { stroke-dashoffset: 0; } }
.map-mover { fill: var(--accent); opacity: 0.9; }
.node-dot { fill: var(--accent-2); }
.node-ring { fill: none; stroke: var(--accent-2); stroke-width: 1.5; }
.home-dot { fill: var(--accent); }
.home-ring { stroke: var(--accent); }
.node-label {
  font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.12em;
  fill: var(--muted);
}
.home-label { fill: var(--accent); font-weight: 600; }
.map-node { cursor: pointer; }
.map-node:hover .node-label { fill: var(--ink-strong); }

/* ---------- Featured publications ---------- */
.featured-grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1.2rem; margin-bottom: 2.4rem;
}
.feat-card {
  position: relative; display: flex; flex-direction: column; gap: 0.6rem;
  background: linear-gradient(160deg, color-mix(in srgb, var(--accent-soft) 65%, transparent), var(--card));
  border: 1px solid color-mix(in srgb, var(--accent) 30%, transparent);
  border-radius: var(--radius); padding: 1.6rem;
  color: inherit; text-decoration: none;
  transition: transform 0.25s, box-shadow 0.25s;
}
.feat-card:hover { transform: translateY(-5px); box-shadow: var(--shadow); text-decoration: none; }
.feat-tag {
  font-family: var(--font-mono); font-size: 0.62rem; letter-spacing: 0.22em;
  text-transform: uppercase; color: var(--accent); font-weight: 600;
}
.feat-card h3 { font-size: 0.98rem; color: var(--ink-strong); line-height: 1.45; }
.feat-card p { font-size: 0.84rem; color: var(--muted); flex: 1; }
.feat-venue { font-size: 0.76rem; color: var(--accent-2); font-style: italic; }

/* ---------- Collaboration ---------- */
.collab-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 1rem; }
.collab-card {
  background: var(--card); border: 1px solid var(--line); border-radius: 14px;
  padding: 1.25rem 1.4rem; transition: border-color 0.2s;
}
.collab-card:hover { border-color: var(--accent); }
.collab-card .flag { font-size: 1.5rem; }
.collab-card h3 { font-size: 0.95rem; color: var(--ink-strong); margin-top: 0.5rem; }
.collab-card p { font-size: 0.8rem; color: var(--muted); margin-top: 0.2rem; }

.work-with { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 1.2rem; margin-top: 2.4rem; }
.ww-card {
  border: 1px dashed color-mix(in srgb, var(--accent-2) 40%, transparent);
  border-radius: var(--radius); padding: 1.5rem; transition: all 0.25s;
}
.ww-card:hover { border-style: solid; background: var(--accent-2-soft); }
.ww-card .r-icon { margin-bottom: 0.6rem; }
.ww-card h3 { font-size: 1rem; color: var(--ink-strong); margin-bottom: 0.4rem; }
.ww-card p { font-size: 0.85rem; color: var(--muted); }

/* ---------- News ---------- */
.news-list { display: flex; flex-direction: column; gap: 0; border-left: 2px solid var(--line); }
.news-item { padding: 0.9rem 0 0.9rem 1.6rem; position: relative; }
.news-item::before {
  content: ""; position: absolute; left: -5px; top: 1.45rem;
  width: 8px; height: 8px; border-radius: 50%; background: var(--accent);
}
.news-date { font-family: var(--font-mono); font-size: 0.7rem; color: var(--accent-2); letter-spacing: 0.1em; }
.news-item p { font-size: 0.92rem; color: var(--ink); margin-top: 0.2rem; }

/* ---------- Contact / footer ---------- */
.contact-wrap { text-align: center; max-width: 640px; margin: 0 auto; }
.contact-wrap h2 {
  font-family: var(--font-display); font-size: clamp(2rem, 5vw, 3rem);
  color: var(--ink-strong); font-weight: 600;
}
.contact-wrap h2 em { color: var(--accent); font-style: italic; }
.contact-wrap p { margin-top: 1rem; color: var(--muted); }
.social-row { display: flex; justify-content: center; gap: 0.9rem; margin-top: 2rem; flex-wrap: wrap; }
.social-link {
  display: inline-flex; align-items: center; gap: 0.5rem;
  border: 1px solid var(--line); border-radius: 999px; padding: 0.55rem 1.2rem;
  color: var(--ink); font-size: 0.85rem; font-weight: 500; transition: all 0.2s;
}
.social-link:hover { border-color: var(--accent); color: var(--accent); transform: translateY(-2px); text-decoration: none; }

footer {
  border-top: 1px solid var(--line); padding: 2rem 0; margin-top: 2rem;
}
.footer-inner { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 1rem; align-items: center; }
.footer-inner p { font-size: 0.78rem; color: var(--muted); }
.visit-count { font-family: var(--font-mono); font-size: 0.72rem; color: var(--muted); }

/* ---------- Icons & extras ---------- */
.btn-ico { width: 16px; height: 16px; }
.brand-ico { width: 16px; height: 16px; }
.qr-card {
  margin-top: 2.2rem; display: inline-flex; align-items: center; gap: 1.2rem;
  text-align: left; background: var(--card); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 1.1rem 1.4rem; backdrop-filter: blur(8px);
}
.qr-card img { width: 96px; height: 96px; border-radius: 8px; background: #fff; padding: 4px; }
.qr-card strong { display: block; color: var(--ink-strong); font-size: 0.92rem; }
.qr-card span { font-size: 0.8rem; color: var(--muted); }
.back-top {
  position: fixed; right: 1.4rem; bottom: 1.4rem; z-index: 90;
  width: 44px; height: 44px; border-radius: 50%;
  background: var(--card-solid); color: var(--ink); border: 1px solid var(--line);
  display: grid; place-items: center; cursor: pointer;
  opacity: 0; transform: translateY(10px); pointer-events: none;
  transition: all 0.3s ease; box-shadow: var(--shadow);
}
.back-top svg { width: 20px; height: 20px; }
.back-top.show { opacity: 1; transform: none; pointer-events: auto; }
.back-top:hover { border-color: var(--accent); color: var(--accent); }

/* ---------- Print ---------- */
@media print {
  :root, [data-theme="light"], [data-theme="dark"] {
    --bg: #ffffff; --bg-2: #ffffff; --bg-3: #f2f4f8;
    --card: #ffffff; --card-solid: #ffffff;
    --ink: #1a1a1a; --ink-strong: #000000; --muted: #444444;
    --line: #cccccc; --grid: transparent;
    --accent: #8a5a00; --accent-2: #075e7d;
    --accent-soft: #f5ecd9; --accent-2-soft: #e2eef3; --shadow: none;
  }
  body { background-image: none; font-size: 11pt; }
  .nav, #particle-canvas, .scroll-hint, .hero-cta, .theme-toggle, .pub-controls,
  .lightbox, .back-top, .gallery-controls, .yt-callout, .g-play, .qr-card,
  .social-row, video { display: none !important; }
  .hero { min-height: auto; padding: 1cm 0; }
  section { padding: 0.8cm 0; page-break-inside: avoid; }
  .reveal { opacity: 1 !important; transform: none !important; }
  a { color: inherit; text-decoration: none; }
  .pub-item, .grant-card, .org-card, .edu-card, .r-card { break-inside: avoid; border: 1px solid #ddd; }
}

/* ==========================================================================
   Animation layer (paired with js/effects.js — delete both to remove)
   ========================================================================== */

/* hero entrance sequence */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(24px); filter: blur(5px); }
  to { opacity: 1; transform: none; filter: none; }
}
.hero-kicker { animation: fadeUp 0.7s 0.1s cubic-bezier(0.2, 0.7, 0.3, 1) both; }
.hero-sub { animation: fadeUp 0.7s 0.9s cubic-bezier(0.2, 0.7, 0.3, 1) both; }
.hero-affil { animation: fadeUp 0.7s 1.05s cubic-bezier(0.2, 0.7, 0.3, 1) both; }
.hero-cta { animation: fadeUp 0.7s 1.2s cubic-bezier(0.2, 0.7, 0.3, 1) both; }
.hero-stats { animation: fadeUp 0.8s 1.4s cubic-bezier(0.2, 0.7, 0.3, 1) both; }

/* split-text name reveal */
.hero h1.split-ready .char {
  display: inline-block;
  animation: charRise 0.65s cubic-bezier(0.2, 0.7, 0.3, 1) both;
  animation-delay: calc(0.25s + var(--i) * 0.045s);
}
@keyframes charRise {
  from { opacity: 0; transform: translateY(0.55em) rotate(7deg); filter: blur(6px); }
  to { opacity: 1; transform: none; filter: none; }
}

/* scroll reveals stay filter-free — blur is too expensive during scrolling */

/* 3D tilt (class added on first hover so scroll reveals stay intact) */
.tilt-card {
  transform: perspective(900px) rotateX(var(--rx, 0deg)) rotateY(var(--ry, 0deg)) !important;
  transition: transform 0.18s ease-out, border-color 0.25s, box-shadow 0.25s !important;
  will-change: transform;
}
.tilt-card:hover { box-shadow: var(--shadow); }

/* cursor spotlight */
.spot { position: relative; }
.spot::after {
  content: ""; position: absolute; inset: 0; border-radius: inherit;
  pointer-events: none; opacity: 0; transition: opacity 0.35s ease; z-index: 1;
  background: radial-gradient(480px circle at var(--mx, 50%) var(--my, 50%),
    color-mix(in srgb, var(--accent-2) 12%, transparent), transparent 65%);
}
.spot:hover::after { opacity: 1; }

/* magnetic buttons */
.btn, .filter-btn, .social-link {
  transform: translate(var(--magx, 0px), var(--magy, 0px));
  transition: transform 0.18s ease-out, box-shadow 0.2s, background 0.2s,
    border-color 0.2s, color 0.2s;
}
.btn:hover { transform: translate(var(--magx, 0px), calc(var(--magy, 0px) - 2px)); }

@media (prefers-reduced-motion: reduce) {
  .hero-kicker, .hero-sub, .hero-affil, .hero-cta, .hero-stats,
  .hero h1.split-ready .char { animation: none; }
  .reveal { filter: none; }
  .tilt-card { transform: none !important; }
  .btn, .filter-btn, .social-link { transform: none; }
}

/* ---------- Justified long-form prose (with hyphenation to avoid rivers) ---------- */
.about-text p:not(.lede),
.pub-abstract,
.grant-card > p,
.grant-card details p,
.review-note {
  text-align: justify;
  hyphens: auto;
  -webkit-hyphens: auto;
}

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
  .about-grid, .impact-grid, .teach-grid, .timeline-cols { grid-template-columns: 1fr; }
  .portrait-wrap { max-width: 300px; }
  .nav-links {
    position: fixed; inset: 60px 0 auto 0; flex-direction: column;
    background: var(--bg-2); padding: 1.4rem; border-bottom: 1px solid var(--line);
    display: none; gap: 1rem;
  }
  .nav-links.open { display: flex; }
  .nav-burger { display: block; }
  .course-grid { grid-template-columns: 1fr; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; transition: none; }
  .scroll-hint, .live-dot { animation: none; }
}
