:root {
  --bg: #f6f8fb;
  --card: #ffffff;
  --card-strong: #ffffff;
  --text: #0f172a;
  --muted: #4b5563;
  --accent: #0ea5e9;
  --accent-2: #f59e0b;
  --shadow: 0 18px 48px rgba(15, 23, 42, 0.12);
  --radius: 18px;
  --line: rgba(15, 23, 42, 0.08);
}

body[data-theme="dark"] {
  --bg: #0f172a;
  --card: rgba(255, 255, 255, 0.04);
  --card-strong: rgba(255, 255, 255, 0.08);
  --text: #e7edf9;
  --muted: #b6c4dd;
  --shadow: 0 20px 60px rgba(0, 0, 0, 0.35);
  --line: rgba(255, 255, 255, 0.08);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: "Space Grotesk", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: radial-gradient(circle at 20% 20%, rgba(14, 165, 233, 0.16), transparent 36%),
    radial-gradient(circle at 78% 8%, rgba(245, 158, 11, 0.16), transparent 34%),
    radial-gradient(120% 120% at 50% 10%, rgba(255, 255, 255, 0.7), transparent 60%),
    var(--bg);
  color: var(--text);
  min-height: 100vh;
  line-height: 1.7;
}

body[data-theme="dark"] {
  background:
    radial-gradient(circle at 18% 18%, rgba(14, 165, 233, 0.12), transparent 32%),
    radial-gradient(circle at 80% 10%, rgba(245, 158, 11, 0.12), transparent 32%),
    linear-gradient(180deg, #0a1020 0%, #0c152a 40%, #0f172a 100%);
}

a {
  color: var(--accent);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

.bg-shell {
  position: fixed;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
  z-index: 0;
}

.bg-ring {
  position: absolute;
  width: 600px;
  height: 600px;
  border-radius: 50%;
  filter: blur(60px);
  opacity: 0.4;
}

.ring-1 {
  background: radial-gradient(circle, rgba(14, 165, 233, 0.4), transparent 60%);
  top: -80px;
  left: -120px;
}

.ring-2 {
  background: radial-gradient(circle, rgba(245, 158, 11, 0.35), transparent 60%);
  bottom: -120px;
  right: -120px;
}

.ring-3 {
  background: radial-gradient(circle, rgba(255, 255, 255, 0.08), transparent 50%);
  top: 30%;
  right: 10%;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.82);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 5vw;
}

body[data-theme="dark"] .site-header {
  background: rgba(15, 23, 42, 0.85);
}

.logo {
  font-weight: 700;
  letter-spacing: 0.12em;
  color: var(--accent-2);
}

.nav a {
  color: var(--muted);
  margin-left: 20px;
  font-size: 0.95rem;
}

.nav a:hover {
  color: var(--text);
}

.theme-toggle {
  margin-left: 16px;
  padding: 10px 14px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--card);
  color: var(--text);
  font-weight: 600;
  cursor: pointer;
  box-shadow: var(--shadow);
  transition: transform 0.15s ease, border-color 0.15s ease;
}

.theme-toggle:hover {
  transform: translateY(-1px);
  border-color: var(--accent);
}

.page {
  position: relative;
  z-index: 1;
  padding: 48px 5vw 120px;
  max-width: 1200px;
  margin: 0 auto;
}

.hero {
  display: grid;
  grid-template-columns: 1fr 1.15fr;
  gap: 32px;
  margin: 48px 0 64px;
  align-items: center;
}

.hero-text h1 {
  margin: 12px 0;
  font-size: 2.8rem;
  letter-spacing: -0.02em;
}

.meta {
  display: grid;
  gap: 6px;
  margin: 8px 0 12px;
  color: var(--muted);
  font-weight: 600;
}

.kicker {
  text-transform: uppercase;
  letter-spacing: 0.18em;
  font-size: 0.8rem;
  color: var(--accent);
  margin: 0;
}

.lede {
  color: var(--muted);
  font-size: 1.05rem;
}

.action-row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 20px;
}

.btn {
  padding: 11px 16px;
  border-radius: 999px;
  border: 1px solid var(--line);
  color: var(--text);
  background: transparent;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.15s ease, border-color 0.15s ease, background 0.15s ease;
}

.btn.primary {
  background: linear-gradient(120deg, var(--accent), var(--accent-2));
  border-color: transparent;
  color: #081426;
  box-shadow: var(--shadow);
}

.btn:hover {
  transform: translateY(-2px);
  border-color: var(--accent);
}

.btn.primary:hover {
  border-color: transparent;
}

.hero-visual {
  position: relative;
  display: grid;
  place-items: start center;
}

.avatar {
  width: 280px;
  height: 320px;
  border-radius: 32px;
  position: relative;
  overflow: hidden;
  box-shadow: var(--shadow);
  background: linear-gradient(145deg, rgba(14, 165, 233, 0.15), rgba(245, 158, 11, 0.15));
}

.avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.avatar-border {
  position: absolute;
  inset: 0;
  border: 2px solid rgba(14, 165, 233, 0.35);
  border-radius: 32px;
  pointer-events: none;
}

.stat-card {
  position: absolute;
  bottom: -24px;
  left: 40%;
  background: var(--card-strong);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 14px 16px;
  backdrop-filter: blur(10px);
  box-shadow: var(--shadow);
  min-width: 220px;
}

.stat-card .label {
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-size: 0.7rem;
  color: var(--muted);
  margin: 0 0 4px;
}

.stat-card .stat {
  margin: 0;
  font-weight: 700;
}

.stat-card .sub {
  margin: 2px 0 0;
  color: var(--muted);
}

.section {
  margin: 64px 0;
  padding: 24px 26px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.section-head h2 {
  margin: 6px 0 16px;
}

.section-body.two-col {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 18px;
  color: var(--muted);
}

.pill-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.pill {
  padding: 10px 14px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--line);
}

.timeline {
  display: grid;
  gap: 12px;
}

.timeline-item {
  padding: 12px 14px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.03);
  display: grid;
  grid-template-columns: 120px 1fr;
  gap: 14px;
  align-items: stretch;
}

.timeline .time {
  margin: 0;
  font-size: 0.9rem;
  color: var(--accent-2);
}

.timeline .content {
  flex: 1;
}

.timeline-icon {
  width: 100%;
  min-height: 72px;
  border-radius: 14px;
  display: grid;
  place-items: center;
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
  background: var(--card);
  overflow: hidden;
  align-self: stretch;
}

.timeline-icon img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
  padding: 10px 12px;
}

.honors-section .section-head h2 {
  margin-bottom: 8px;
}

.honors-section .section-body p {
  margin-top: 6px;
}

.timeline .title {
  margin: 4px 0 0;
  color: var(--text);
}

.timeline .sub {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 0.98rem;
}

.pub-list {
  display: grid;
  gap: 14px;
}

.pub-card {
  padding: 14px 16px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--line);
  border-radius: 14px;
  display: flex;
  gap: 14px;
  align-items: flex-start;
}

.pub-content {
  flex: 1;
}

.venue {
  margin: 0;
  color: var(--accent);
  letter-spacing: 0.05em;
}

.pub-card h3 {
  margin: 6px 0;
}

.authors {
  margin: 0 0 8px;
  color: var(--muted);
}

.links a {
  margin-right: 12px;
}

.pub-thumb {
  border-radius: 12px;
  background: var(--card);
  border: 1px solid var(--line);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-shadow: var(--shadow);
  padding: 6px;
  max-width: 240px;
  flex-shrink: 0;
  align-self: center;
  text-decoration: none;
  cursor: pointer;
  transition: border-color 0.15s ease, transform 0.15s ease, box-shadow 0.15s ease;
}

.pub-thumb:empty::after {
  content: "Thumbnail";
  color: var(--muted);
  font-weight: 600;
  letter-spacing: 0.05em;
}

.pub-thumb img {
  display: block;
  max-width: 100%;
  height: auto;
  max-height: 240px;
  object-fit: contain;
  border-radius: 10px;
}

.pub-thumb:hover,
.pub-thumb:focus-visible {
  border-color: var(--accent);
  box-shadow: 0 16px 30px rgba(0, 0, 0, 0.2);
  transform: translateY(-2px);
}

.lightbox {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.78);
  backdrop-filter: blur(4px);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 100;
  padding: 24px;
}

.lightbox.is-open {
  display: flex;
}

.lightbox img {
  max-width: min(90vw, 1200px);
  max-height: 85vh;
  border-radius: 12px;
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.5);
}

.lightbox-close {
  position: absolute;
  top: 20px;
  right: 20px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid var(--line);
  color: #fff;
  border-radius: 999px;
  padding: 8px 14px;
  cursor: pointer;
}

.list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 10px;
}

.list li {
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.03);
}

.label {
  background: rgba(14, 165, 233, 0.12);
  color: var(--accent);
  padding: 4px 10px;
  border-radius: 999px;
  font-weight: 700;
  font-size: 0.85rem;
  margin-right: 10px;
}

.contact-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 16px;
  color: var(--muted);
}

.with-icon {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--text);
  font-weight: 600;
}

.with-icon::before {
  content: attr(data-icon);
  font-size: 1rem;
}

.contact-grid p {
  margin: 6px 0;
}

.inline-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 24px;
  justify-content: center;
  margin: 12px 0 36px;
  display: none;
}

.stat-pill {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  background: #fff;
  border-radius: 999px;
  padding: 12px 18px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
  border: 1px solid rgba(15, 23, 42, 0.05);
}

body[data-theme="dark"] .stat-pill {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--line);
}

.pill-icon {
  font-size: 1.1rem;
}

.pill-label,
.pill-suffix {
  color: var(--text);
  font-weight: 600;
}

.pill-count {
  background: rgba(15, 23, 42, 0.04);
  padding: 6px 14px;
  border-radius: 999px;
  color: var(--text);
  font-weight: 700;
  min-width: 70px;
  text-align: center;
}

body[data-theme="dark"] .pill-count {
  background: rgba(255, 255, 255, 0.08);
}

@media (max-width: 900px) {
  .hero {
    grid-template-columns: 1fr;
    text-align: left;
  }

  .site-header {
    flex-direction: column;
    gap: 10px;
    align-items: flex-start;
  }

  .nav a {
    margin: 0 12px 0 0;
  }

  .hero-visual {
    order: -1;
    justify-items: center;
  }
}

@media (max-width: 640px) {
  .page {
    padding: 32px 6vw 80px;
  }

  .hero-text h1 {
    font-size: 2.2rem;
  }

  .action-row {
    flex-direction: column;
    align-items: stretch;
  }

  .btn {
    width: 100%;
  }

  .pub-card {
    flex-direction: column;
  }

  .pub-thumb {
    width: 100%;
    max-width: none;
    max-height: none;
  }
}
