:root {
  --bg: #f6f1e8;
  --bg2: #fffaf2;
  --panel: rgba(255,255,255,.76);
  --panel2: rgba(255,255,255,.95);
  --text: #202734;
  --muted: #67707d;
  --faint: #9da5af;
  --line: rgba(54,66,86,.14);
  --accent: #315d8c;
  --accent2: #8b6336;
  --green: #5f8c76;
  --shadow: 0 28px 90px rgba(79,61,34,.13);
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background:
    radial-gradient(circle at top left, rgba(180,207,198,.45), transparent 28rem),
    radial-gradient(circle at 80% 8%, rgba(224,196,152,.32), transparent 27rem),
    linear-gradient(180deg, var(--bg2) 0%, var(--bg) 62%, #f2eadc 100%);
  color: var(--text);
  font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.55;
}
.paper-grain { pointer-events:none; position:fixed; inset:0; opacity:.07; background-image:url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.65' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E"); }
a { color: inherit; text-decoration: none; }
code, .brand, .eyebrow, .tags span, .pub-meta, .card-kicker { font-family: "JetBrains Mono", ui-monospace, monospace; }
.site-header {
  position: sticky; top: 0; z-index: 20;
  display: flex; justify-content: space-between; align-items: center;
  max-width: 1180px; margin: 0 auto; padding: 18px 24px;
  backdrop-filter: blur(18px);
}
.brand { width: 42px; height: 42px; display:grid; place-items:center; border:1px solid var(--line); border-radius:15px; background:rgba(255,255,255,.76); font-weight:800; color:var(--accent); box-shadow:0 8px 25px rgba(70,55,35,.08); }
nav { display:flex; gap: 24px; color: var(--muted); font-size: 14px; font-weight:650; }
nav a:hover { color: var(--accent); }
main { max-width: 1180px; margin: 0 auto; padding: 0 24px 80px; }
.page-main { padding-top: 34px; }
.section { margin-top: 88px; }
.hero-shell {
  min-height: calc(100vh - 78px);
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(280px, .72fr);
  align-items: center;
  gap: clamp(28px, 6vw, 76px);
  padding: 10px 0 48px;
}
.hero-text { max-width: 760px; }
.eyebrow { color: var(--accent); text-transform: uppercase; letter-spacing: .14em; font-size: 12px; font-weight: 800; margin: 0 0 12px; }
h1, h2, h3, h4 { line-height: 1.05; margin: 0; letter-spacing: -.045em; }
h1 { font-size: clamp(54px, 9vw, 110px); max-width: 820px; }
h2 { font-size: clamp(34px, 5vw, 62px); }
h3 { font-size: 23px; }
h4 { font-size: 16px; }
p { color: var(--muted); }
.lead { font-size: clamp(20px, 2.3vw, 28px); line-height:1.35; color: #303846; max-width: 760px; margin: 20px 0 10px; }
.intro { max-width: 690px; font-size: 17px; }
.typewriter { min-height: 1.08em; }
#typed-headline {
  display:inline-block;
  overflow:hidden;
  white-space:nowrap;
  width:0;
  vertical-align:bottom;
  animation: headlineTyping 1.35s steps(15, end) .22s forwards;
}
html.js #typed-headline {
  width:auto;
  overflow:visible;
  animation:none;
}
.cursor { display:inline-block; width:.11em; height:.84em; margin-left:.08em; transform: translateY(.08em); background: var(--accent); animation: blink 1s steps(1) infinite; }
@keyframes headlineTyping { to { width: 15ch; } }
@keyframes blink { 50% { opacity: 0; } }
.social-row { display:flex; flex-wrap:wrap; gap: 12px; margin-top: 30px; }
.social-row a { width: 46px; height: 46px; display:grid; place-items:center; border:1px solid var(--line); background:rgba(255,255,255,.72); border-radius:999px; color:var(--text); transition:.2s ease; box-shadow:0 10px 30px rgba(70,55,35,.06); }
.social-row a:hover { transform: translateY(-2px) scale(1.03); border-color:rgba(55,92,138,.34); color:var(--accent); }
.social-row svg { width: 24px; height: 24px; fill: currentColor; }
.scholar-icon path:first-child { fill: currentColor; }
.portrait-panel { width:min(100%, 470px); aspect-ratio:1; justify-self:end; position:relative; display:grid; place-items:center; border:1px solid var(--line); border-radius:50%; background:linear-gradient(160deg, rgba(255,255,255,.92), rgba(250,239,221,.76)); box-shadow: var(--shadow); overflow:visible; padding:26px; }
.portrait-panel::before { content:""; position:absolute; inset:18px; border:1px solid rgba(55,92,138,.13); border-radius:50%; pointer-events:none; animation: portraitPulse 5.5s ease-in-out infinite; }
.portrait-panel::after { content:""; position:absolute; width:74%; height:74%; border-radius:50%; background:radial-gradient(circle, rgba(141,160,203,.24), transparent 70%); top:2%; right:-10%; pointer-events:none; }
.portrait-photo { position:relative; z-index:2; width:100%; aspect-ratio:1; border-radius:50%; display:grid; place-items:center; text-align:center; color:#a38d6f; font-size:30px; font-weight:800; letter-spacing:-.04em; background:linear-gradient(180deg, #efe0c8, #d9c2a1); border:1px solid rgba(127,93,53,.16); overflow:hidden; }
@keyframes portraitPulse { 50% { transform: scale(1.025); opacity: .72; } }
.reveal-item { opacity:0; transform: translateY(14px) scale(.985); animation: popIn .72s cubic-bezier(.2,.8,.2,1) forwards; }
.delay-2 { animation-delay: 1.78s; }
.delay-3 { animation-delay: 1.98s; }
.delay-4 { animation-delay: 2.18s; }
.reveal-photo { opacity:0; transform: translateY(10px) scale(.94); animation: photoIn .86s cubic-bezier(.18,.9,.2,1) .2s forwards; }
@keyframes popIn { to { opacity:1; transform: translateY(0) scale(1); } }
@keyframes photoIn { to { opacity:1; transform: translateY(0) scale(1); } }
.panel { border:1px solid var(--line); border-radius: 34px; background: var(--panel); box-shadow: var(--shadow); backdrop-filter: blur(18px); }
.page-hero { padding: clamp(30px, 5vw, 64px); }
.page-hero h1 { font-size: clamp(48px, 8vw, 96px); }
.page-hero p { max-width: 760px; font-size: 18px; }
.section-heading { margin-bottom: 28px; }
.section-heading p { max-width: 760px; }
.split-heading { display:flex; justify-content:space-between; gap: 24px; align-items:flex-end; padding: 0; }
.split-heading > p { max-width: 480px; margin: 0; }
.map-section { margin-top: 42px; padding: clamp(22px, 4vw, 36px); }
.map-layout { position: relative; min-height: 690px; }
.graph { min-height: 690px; width: 100%; position:relative; border-radius: 26px; background: rgba(255,250,242,.62); border:1px solid rgba(54,66,86,.1); overflow:hidden; }
.graph svg { width:100%; height:100%; min-height:690px; display:block; }
.edge { stroke: rgba(54,66,86,.15); }
.cluster-region {
  fill: rgba(255, 255, 255, 0.24);
  stroke: rgba(54, 66, 86, 0.09);
  stroke-dasharray: 7 7;
  pointer-events: none;
}
.cluster-label {
  fill: rgba(48, 56, 70, 0.45);
  font-size: 13px;
  font-weight: 800;
  letter-spacing: -0.015em;
  pointer-events: none;
}
.cluster-label-bg {
  display: none;
}
.cluster-scientific-hpc { fill: rgba(80, 135, 186, 0.055); }
.cluster-data-systems { fill: rgba(95, 140, 118, 0.055); }
.cluster-biomedical-imaging { fill: rgba(236, 161, 79, 0.055); }
.cluster-interactive-visualization { fill: rgba(139, 99, 54, 0.05); }
.cluster-interactive-ml-visualization { fill: rgba(139, 99, 54, 0.05); }
.cluster-research-tools { fill: rgba(156, 114, 154, 0.055); }
.node { cursor:pointer; }
.node circle { stroke: rgba(31,39,51,.28); stroke-width:1.2; transition: .18s ease; filter: drop-shadow(0 8px 14px rgba(54,66,86,.10)); }
.node:hover circle { transform: scale(1.08); stroke-width:2; }
.major-label { font: 800 14px Inter, sans-serif; fill: #303846; paint-order: stroke; stroke: rgba(255,250,242,.9); stroke-width: 4px; }
.artifact-label { font: 800 12px Inter, system-ui, sans-serif; fill: #1f2733; letter-spacing: -0.02em; }
.graph-legend { position:absolute; left:18px; bottom:18px; display:flex; flex-wrap:wrap; gap:8px; background:rgba(255,255,255,.78); border:1px solid var(--line); border-radius:999px; padding:8px 10px; color:var(--muted); font-size:12px; }
.graph-legend b { color:var(--text); }
.node-detail { display:none; position:absolute; right:18px; top:18px; width:min(430px, calc(100% - 36px)); max-height: calc(100% - 36px); overflow:auto; padding:22px; border-radius:24px; background:rgba(255,255,255,.95); border:1px solid var(--line); box-shadow:0 24px 80px rgba(54,66,86,.18); z-index:5; }
.node-detail.open { display:block; animation: detailIn .2s ease-out both; }
@keyframes detailIn { from { opacity:0; transform: translateY(8px) scale(.98); } to { opacity:1; transform: translateY(0) scale(1); } }
.detail-close { float:right; border:1px solid var(--line); background:rgba(255,250,242,.8); border-radius:999px; width:34px; height:34px; cursor:pointer; color:var(--muted); }
.node-detail h3 { margin-top: 8px; }
.node-detail .meta { font-size: 13px; font-family: "JetBrains Mono", monospace; color: var(--accent2); }
.related-list { margin-top: 20px; display:grid; gap:12px; }
.related-paper { border:1px solid var(--line); border-radius:18px; padding:14px; background:rgba(255,250,242,.7); }
.related-paper p { font-size: 14px; }
.publication-list { display:grid; gap:16px; }
.publication { display:grid; grid-template-columns: 1fr auto; gap:24px; align-items:start; border:1px solid var(--line); border-radius:24px; background:rgba(255,255,255,.64); padding:22px; }
.pub-meta { margin:0 0 8px; color: var(--accent2); font-size:12px; text-transform: uppercase; letter-spacing:.08em; }
.publication h3 { margin-bottom: 8px; letter-spacing:-.025em; }
.publication p { margin: 0 0 10px; }
.pub-links { display:flex; flex-wrap:wrap; gap:8px; justify-content:flex-end; }
.pub-links a, .button { display:inline-flex; align-items:center; justify-content:center; border:1px solid var(--line); border-radius:999px; padding:9px 12px; background:rgba(255,250,242,.75); color:var(--accent); font-weight:800; font-size:13px; }
.pub-links a:hover, .button:hover { border-color:rgba(49,93,140,.35); transform: translateY(-1px); }
.button.primary { background:var(--accent); color:white; border-color:var(--accent); padding:12px 16px; }
.button.ghost { background:rgba(255,255,255,.66); }
.tags { display:flex; flex-wrap:wrap; gap:6px; margin-top:10px; }
.tags span { font-size:11px; color:var(--muted); border:1px solid var(--line); border-radius:999px; padding:5px 8px; background:rgba(255,250,242,.7); }
.cv-grid { display:grid; grid-template-columns: 1fr; gap:22px; }
.cv-card { padding: clamp(24px, 4vw, 44px); }
.clean-list { margin:18px 0 0; padding:0; list-style:none; display:grid; gap:12px; color:var(--muted); }
.clean-list li { border-top:1px solid var(--line); padding-top:12px; }
.clean-list.columns { grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); }
.timeline { display:grid; gap:16px; }
.timeline article { border-top:1px solid var(--line); padding-top:18px; }
.timeline span { font-family:"JetBrains Mono", monospace; color:var(--accent2); font-size:12px; text-transform:uppercase; letter-spacing:.08em; }
.timeline h3 { margin:6px 0 6px; }
footer { max-width:1180px; margin: 0 auto; padding: 40px 24px 52px; color:var(--faint); }
footer p { font-size:14px; }
@media (max-width: 860px) {
  .site-header { padding: 14px 18px; }
  nav { gap: 14px; font-size: 13px; }
  main { padding: 0 18px 64px; }
  .hero-shell { grid-template-columns:1fr; min-height:auto; padding-top:44px; }
  .portrait-panel { justify-self:center; width:min(80vw, 360px); order:-1; }
  h1 { font-size: clamp(48px, 17vw, 78px); }
  .lead { font-size: 20px; }
  .split-heading { display:block; }
  .split-heading > p { margin-top: 12px; }
  .map-layout, .graph, .graph svg { min-height: 560px; }
  .publication { grid-template-columns:1fr; }
  .pub-links { justify-content:flex-start; }
}
@media (max-width: 520px) {
  nav a:first-child { display:none; }
  .social-row a { width:44px; height:44px; }
  .map-section, .section.panel, .page-hero { border-radius:24px; padding:20px; }
  .map-layout, .graph, .graph svg { min-height: 520px; }
  .cluster-label { font-size: 12px; }
  .graph-legend { border-radius:18px; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; }
  #typed-headline { width:auto; animation:none; overflow:visible; }
  .cursor { display:none; }
}

/* v6 layout and interaction fixes */
.publications-home {
  margin-top: 72px;
}
.publications-heading {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 22px;
}
.publications-heading h2 {
  font-size: clamp(34px, 5vw, 64px);
}
.section.panel,
.papers-section {
  padding: clamp(22px, 4vw, 36px);
}
.subsection-heading {
  margin-bottom: 22px;
}
.subsection-heading h2 {
  font-size: clamp(30px, 4vw, 48px);
}
.typewriter {
  display: inline-flex;
  align-items: baseline;
  white-space: nowrap;
  max-width: 100%;
  overflow: visible;
}
.cursor {
  flex: 0 0 auto;
  align-self: baseline;
  transform: translateY(.08em);
}
html.js .hero-text .lead,
html.js .hero-text .intro,
html.js .hero-text .social-row {
  opacity: 0;
  transform: translateY(14px) scale(.985);
  animation: none;
}
html.js body.headline-complete .hero-text .lead {
  animation: popIn .72s cubic-bezier(.2,.8,.2,1) forwards;
}
html.js body.headline-complete .hero-text .intro {
  animation: popIn .72s cubic-bezier(.2,.8,.2,1) .16s forwards;
}
html.js body.headline-complete .hero-text .social-row {
  animation: popIn .72s cubic-bezier(.2,.8,.2,1) .32s forwards;
}
.authors {
  color: #4a5361;
  font-size: 14px;
  margin: 0 0 10px !important;
}
.authors strong {
  color: var(--text);
  font-weight: 850;
}
.publication h3 {
  max-width: 900px;
}
.publication-list {
  margin-top: 0;
}
.pub-links .link-placeholder {
  color: var(--faint);
  font-size: 13px;
}
@media (max-width: 860px) {
  .publications-heading {
    display: block;
  }
  .publications-heading .button {
    margin-top: 16px;
  }
  .typewriter {
    white-space: nowrap;
  }
}
@media (max-width: 520px) {
  h1 { font-size: clamp(42px, 12vw, 52px); }
  .typewriter { white-space: nowrap; }
  .cursor { width: .09em; }
}
@media (prefers-reduced-motion: reduce) {
  html.js .hero-text .lead,
  html.js .hero-text .intro,
  html.js .hero-text .social-row {
    opacity: 1;
    transform: none;
    animation: none;
  }
}

/* v8 home scroll snapping */
html.home-snap {
  scroll-snap-type: y mandatory;
  scroll-padding-top: 78px;
}
.snap-section {
  min-height: calc(100vh - 78px);
  scroll-snap-align: start;
  scroll-snap-stop: always;
  display: flex;
  flex-direction: column;
  justify-content: center;
}
.hero-shell.snap-section {
  display: grid;
}
.publications-home.snap-section {
  margin-top: 0;
}
.map-section.snap-section {
  margin-top: 0;
}
@media (max-width: 760px) {
  html.home-snap { scroll-snap-type: y proximity; }
  .snap-section { min-height: auto; scroll-snap-align: start; }
  .hero-shell.snap-section { min-height: calc(100vh - 78px); }
}

/* v9: remove AI-looking eyebrow labels and clean publication metadata */
.eyebrow { display: none !important; }
.pub-meta { display: none !important; }
.pub-venue {
  margin: 6px 0 14px;
  color: var(--accent2);
  font-size: 14px;
  font-weight: 650;
}
.publication h3 { margin-top: 0; }
.publication-category { margin-bottom: 34px; }
.publication-category > h2 {
  font-size: clamp(28px, 4vw, 46px);
  letter-spacing: -.045em;
  margin: 0 0 18px;
}
.publication-category + .publication-category {
  border-top: 1px solid var(--line);
  padding-top: 30px;
}
.publications-heading { align-items: center; }
.publications-heading h2,
.split-heading h2 { margin: 0; }
.split-heading { align-items: center; }
.node-publication circle { stroke: rgba(31,39,51,.28); }
.node-detail h3 { margin-top: 0; }

/* v10: graph nodes use short paper titles instead of P1/P2 codes */
.artifact-label { font: 800 10.5px Inter, sans-serif; fill: #1f2733; paint-order: stroke; stroke: rgba(255,250,242,.92); stroke-width: 3px; stroke-linejoin: round; }
.artifact-label-sub { font: 700 9px "JetBrains Mono", monospace; fill: rgba(31,39,51,.62); stroke-width: 2px; }
@media (max-width: 720px) {
  .artifact-label { font-size: 9.5px; }
  .artifact-label-sub { display: none; }
}

/* v12: readable paper artifact labels */
.node-pill-bg {
  fill-opacity: 0.18;
  stroke: rgba(80, 70, 55, 0.22);
  stroke-width: 1.2px;
  filter: drop-shadow(0 10px 18px rgba(58, 47, 34, 0.08));
}
.node:hover .node-pill-bg,
.node:focus .node-pill-bg {
  fill-opacity: 0.28;
  stroke: rgba(80, 70, 55, 0.42);
}
.node-dot {
  fill: rgba(31, 39, 51, 0.72);
}
.artifact-label {
  font: 800 11px Inter, sans-serif;
  fill: #1f2733;
  paint-order: stroke;
  stroke: rgba(255,250,242,.94);
  stroke-width: 3px;
  stroke-linejoin: round;
}
@media (max-width: 680px) {
  .artifact-label { font-size: 9.5px; }
}

/* v13: cleaner publication cards and paper map */
.publication {
  position: relative;
}
.pub-actions {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 16px;
}
.status-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  padding: 7px 11px;
  font-size: 12px;
  font-weight: 850;
  border: 1px solid transparent;
  white-space: nowrap;
}
.status-badge.published {
  color: #245d43;
  background: rgba(117, 176, 141, 0.18);
  border-color: rgba(36, 93, 67, 0.18);
}
.status-badge.to-appear {
  color: #8a4f10;
  background: rgba(236, 161, 79, 0.18);
  border-color: rgba(138, 79, 16, 0.18);
}
.pub-venue {
  margin-bottom: 0;
}
.split-heading > p {
  font-size: 17px;
  max-width: 430px;
}
.graph {
  background: rgba(255,250,242,.78);
}
.graph-legend {
  gap: 12px;
}
@media (max-width: 860px) {
  .pub-actions {
    align-items: flex-start;
  }
}

.detail-abstract { font-size: 15px; line-height: 1.55; color: var(--muted); }

/* v17: scalable paper map — clusters are labels, papers are unlabeled interactive markers */
.map-layout { position: relative; }
.cluster-region {
  pointer-events: auto;
  cursor: pointer;
  transition: fill .18s ease, stroke .18s ease, stroke-width .18s ease;
}
.cluster-region:hover,
.cluster-region:focus {
  fill-opacity: 0.12;
  stroke: rgba(49, 93, 140, 0.22);
  stroke-width: 1.6px;
}
.cluster-label {
  font-size: 14px;
  font-weight: 850;
  fill: rgba(32, 39, 52, 0.52);
  pointer-events: none;
}
.node-marker { cursor: pointer; }
.paper-dot {
  transition: transform .18s ease, filter .18s ease, stroke-width .18s ease;
  filter: drop-shadow(0 8px 14px rgba(54,66,86,.14));
}
.node-marker:hover .paper-dot,
.node-marker:focus .paper-dot {
  transform: scale(1.28);
  filter: drop-shadow(0 12px 20px rgba(54,66,86,.22));
  stroke-width: 2.4px;
}
.graph-legend { gap: 12px; }
.legend-dot {
  display: inline-block;
  width: 9px;
  height: 9px;
  margin-right: 5px;
  border-radius: 50%;
  vertical-align: -1px;
}
.legend-dot.published { background: #6eb083; }
.legend-dot.to-appear { background: #e7a347; }
.detail-kicker {
  margin: 0 0 10px;
  color: var(--accent2);
  font-family: "JetBrains Mono", monospace;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: .08em;
  text-transform: uppercase;
}
.cluster-summary { margin-top: 6px; }
.cluster-paper-list {
  display: grid;
  gap: 10px;
  margin-top: 18px;
}
.cluster-paper {
  text-align: left;
  border: 1px solid var(--line);
  background: rgba(255,250,242,.7);
  border-radius: 16px;
  padding: 13px 14px;
  cursor: pointer;
  color: var(--text);
  transition: transform .16s ease, border-color .16s ease, background .16s ease;
}
.cluster-paper:hover,
.cluster-paper:focus {
  transform: translateY(-1px);
  border-color: rgba(49, 93, 140, .25);
  background: rgba(255,255,255,.9);
}
.cluster-paper span {
  display: block;
  font-weight: 750;
  line-height: 1.25;
}
.cluster-paper small {
  display: block;
  margin-top: 5px;
  color: var(--muted);
  font-size: 12px;
}
@media (max-width: 760px) {
  .cluster-label { font-size: 12px; }
  .node-detail { left: 14px; right: 14px; top: 14px; width: auto; }
}
