/* Modern card layout — keeps the original purple / pink palette and Titillium Web type */
:root {
  --bg: #faf9fd;
  --paper: #ffffff;
  --paper-soft: #f6f3fd;
  --text: #24212e;
  --muted: #6b6780;
  --heading: #1b1530;
  --line: #e8e3f3;
  --accent: #794dff;
  --accent-2: #ff52a3;
  --accent-3: #ff8a3d;
  --badge-bg: #efe9ff;
  --badge-text: #5a35d6;
  --shadow: 0 12px 32px rgba(40, 20, 90, 0.06);
  --radius-lg: 22px;
  --radius-md: 16px;
  --max-width: 1040px;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 70px; }

body {
  margin: 0;
  color: var(--text);
  font-family: 'Titillium Web', 'Avenir Next', 'Segoe UI', Helvetica, sans-serif;
  font-size: 16px;
  line-height: 1.6;
  background:
    radial-gradient(circle at top left, rgba(121, 77, 255, 0.08), transparent 30%),
    radial-gradient(circle at top right, rgba(255, 82, 163, 0.07), transparent 26%),
    var(--bg);
  min-height: 100vh;
}

a { color: var(--accent); text-decoration: none; transition: color 160ms ease; }
a:hover, a:focus { color: var(--accent-2); }
img { display: block; max-width: 100%; }
b, strong { font-weight: 600; }

.page-shell {
  width: min(calc(100% - 32px), var(--max-width));
  margin: 0 auto;
  padding: 32px 0 48px;
}

/* ---------- Hero ---------- */
.hero-card {
  position: relative;
  display: grid;
  grid-template-columns: 240px minmax(0, 1fr);
  gap: 40px;
  align-items: center;
  padding: 34px 38px;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  box-shadow: var(--shadow);
  overflow: hidden;
}
.hero-card::after {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 7px;
  background: linear-gradient(180deg, var(--accent) 0%, var(--accent-2) 100%);
}
.profile-photo {
  width: 100%;
  aspect-ratio: 4 / 5;
  object-fit: cover;
  object-position: center top;
  border-radius: 24px;
  box-shadow: 0 10px 26px rgba(40, 20, 90, 0.12);
}
.eyebrow {
  margin: 0 0 6px;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--muted);
}
.site-title {
  margin: 0 0 12px;
  font-size: clamp(2.6rem, 5vw, 3.4rem);
  font-weight: 600;
  line-height: 1.05;
  color: var(--heading);
}
.lead { margin: 0 0 8px; font-size: 1.08rem; }
.contact-panel {
  margin-top: 18px;
  padding: 14px 18px;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: var(--paper-soft);
}
.contact-line { margin: 0 0 8px; font-weight: 600; color: var(--heading); }
.link-row { display: flex; flex-wrap: wrap; gap: 6px 18px; font-weight: 600; }

/* ---------- Sticky nav ---------- */
#navbar_outer {
  position: sticky;
  top: 0;
  z-index: 1000;
  margin: 22px 0 0;
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  box-shadow: 0 6px 18px rgba(40, 20, 90, 0.05);
}
#navbar {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 4px 8px;
  list-style: none;
  margin: 0;
  padding: 0;
}
#navbar li a {
  display: block;
  padding: 4px 14px;
  color: var(--heading);
  font-weight: 700;
  border-bottom: 2px solid transparent;
}
#navbar li a:hover { color: var(--accent-2); }
#navbar li a.active { border-bottom-color: var(--accent-2); }

/* ---------- Sections ---------- */
.content-section {
  margin-top: 24px;
  padding: 26px 30px;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  box-shadow: var(--shadow);
}
.content-section h2 {
  margin: 0 0 18px;
  font-size: 1.75rem;
  font-weight: 600;
  color: var(--heading);
}

/* News + honors */
.dated-list { list-style: none; margin: 0; padding: 0; }
.dated-list li {
  display: grid;
  grid-template-columns: 110px minmax(0, 1fr);
  gap: 14px;
  padding: 8px 0;
  border-bottom: 1px solid var(--line);
}
.dated-list li:last-child { border-bottom: 0; }
.dated-list .date { font-weight: 600; color: var(--accent); white-space: nowrap; }

/* ---------- Research cards ---------- */
.research-list { display: grid; }
.research-card {
  display: grid;
  grid-template-columns: 360px minmax(0, 1fr);
  gap: 28px;
  align-items: center;
  padding: 22px 0;
  border-bottom: 1px solid var(--line);
}
.research-card:first-child { padding-top: 0; }
.research-card:last-child { border-bottom: 0; padding-bottom: 0; }
.research-media {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 200px;
  padding: 6px;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: var(--paper);
  transition: border-color 160ms ease, box-shadow 160ms ease;
}
.research-card:hover .research-media {
  border-color: rgba(121, 77, 255, 0.35);
  box-shadow: 0 8px 22px rgba(121, 77, 255, 0.10);
}
.research-media img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  border-radius: 10px;
}
.research-body h3 {
  margin: 0;
  font-size: 1.15rem;
  font-weight: 600;
  line-height: 1.3;
}
.research-body h3 a { color: var(--heading); }
.research-body h3 a:hover { color: var(--accent); }
.authors { margin: 8px 0 0; color: var(--text); }
.authors b { color: var(--heading); }
.meta-line {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin: 10px 0 0;
}
.badge {
  display: inline-flex;
  align-items: center;
  padding: 2px 11px;
  border-radius: 999px;
  background: var(--badge-bg);
  color: var(--badge-text);
  font-size: 0.86rem;
  font-weight: 600;
}
.badge.muted { background: #f1f0f5; color: var(--muted); }
.resource-links { display: inline-flex; flex-wrap: wrap; gap: 8px; }
.resource-links a {
  display: inline-flex;
  align-items: center;
  padding: 2px 12px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--paper);
  color: var(--heading);
  font-size: 0.9rem;
  font-weight: 600;
  transition: color 160ms ease, border-color 160ms ease, background 160ms ease;
}
.resource-links a:hover, .resource-links a:focus {
  color: var(--accent-2);
  border-color: rgba(255, 82, 163, 0.35);
  background: #fff5fa;
}

.site-footer {
  padding: 18px 6px 0;
  text-align: right;
  color: var(--muted);
  font-size: 0.85rem;
}

/* ---------- Space background ---------- */
.space-bg {
  position: fixed;
  inset: 0;
  z-index: -1;
  overflow: hidden;
  pointer-events: none;
}
.stars {
  position: absolute;
  inset: 0;
  background-image:
    radial-gradient(1.5px 1.5px at 20px 30px, rgba(121, 77, 255, 0.55), transparent),
    radial-gradient(1.5px 1.5px at 140px 90px, rgba(255, 82, 163, 0.5), transparent),
    radial-gradient(1px 1px at 80px 160px, rgba(255, 138, 61, 0.6), transparent),
    radial-gradient(1px 1px at 210px 210px, rgba(121, 77, 255, 0.45), transparent),
    radial-gradient(1.5px 1.5px at 260px 40px, rgba(255, 138, 61, 0.45), transparent);
  background-size: 300px 260px;
  animation: twinkle 4s ease-in-out infinite alternate;
}
.system { position: absolute; aspect-ratio: 1 / 1; }
.sys-a { width: 760px; top: -300px; left: -300px; }
.sys-b { width: 920px; bottom: -420px; right: -380px; }
.sys-c { width: 300px; top: 38%; right: -120px; opacity: 0.8; }
.orbit {
  position: absolute;
  border-radius: 50%;
  border: 1px solid rgba(121, 77, 255, 0.28);
  animation: orbit-spin linear infinite;
}
.orbit::after {
  content: "";
  position: absolute;
  top: -5px;
  left: 50%;
  width: 10px;
  height: 10px;
  margin-left: -5px;
  border-radius: 50%;
}
.o1 { inset: 32%; animation-duration: 28s; }
.o1::after { background: var(--accent); box-shadow: 0 0 12px rgba(121, 77, 255, 0.6); }
.o2 { inset: 16%; border-color: rgba(255, 82, 163, 0.26); animation-duration: 45s; animation-direction: reverse; }
.o2::after { width: 8px; height: 8px; margin-left: -4px; top: -4px; background: var(--accent-2); box-shadow: 0 0 12px rgba(255, 82, 163, 0.6); }
.o3 { inset: 0; border: 1px dashed rgba(255, 138, 61, 0.36); animation-duration: 70s; }
.o3::after { width: 12px; height: 12px; margin-left: -6px; top: -6px; background: var(--accent-3); box-shadow: 0 0 14px rgba(255, 138, 61, 0.6); }
.sun {
  position: absolute;
  inset: 46%;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 138, 61, 0.35), rgba(255, 82, 163, 0.12) 60%, transparent 70%);
}
@keyframes orbit-spin { to { transform: rotate(360deg); } }
@keyframes twinkle { from { opacity: 0.3; } to { opacity: 1; } }
@media (prefers-reduced-motion: reduce) {
  .orbit, .stars { animation: none; }
}

/* ---------- Responsive ---------- */
@media (max-width: 820px) {
  .hero-card { grid-template-columns: 1fr; justify-items: center; text-align: center; gap: 22px; }
  .hero-card .profile-photo { max-width: 200px; }
  .link-row { justify-content: center; }
  .research-card { grid-template-columns: 1fr; gap: 16px; }
}
@media (max-width: 560px) {
  .page-shell { width: calc(100% - 32px); padding-top: 16px; }
  .hero-card { padding: 24px 20px; }
  .content-section { padding: 22px 18px; }
  .research-media { height: 170px; }
  .dated-list li { grid-template-columns: 1fr; gap: 0; }
  .site-footer { text-align: left; }
}
