:root {
  --bg: #0b1020;
  --surface: #101828;
  --surface-2: #162033;
  --text: #eef4ff;
  --muted: #b7c2d8;
  --line: rgba(255, 255, 255, 0.14);
  --accent: #8fd3ff;
  --accent-2: #ffd166;
  --max-width: 1080px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--text);
  background: var(--bg);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.65;
}

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

a:hover {
  text-decoration: underline;
}

.site-shell {
  min-height: 100vh;
  background: linear-gradient(rgba(6, 10, 22, 0.94), rgba(6, 10, 22, 0.98));
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  border-bottom: 1px solid var(--line);
  background: rgba(7, 11, 24, 0.88);
  backdrop-filter: blur(16px);
}

.nav {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 14px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.brand {
  color: var(--text);
  font-weight: 700;
  letter-spacing: 0.02em;
}

.nav-links {
  display: flex;
  gap: 18px;
  flex-wrap: wrap;
  font-size: 0.95rem;
}

.nav-links a {
  color: var(--muted);
}

.nav-links a[aria-current="page"],
.nav-links a:hover {
  color: var(--text);
}

.hero {
  position: relative;
  border-bottom: 1px solid var(--line);
  background:
    linear-gradient(90deg, rgba(6, 10, 22, 0.86), rgba(6, 10, 22, 0.58) 48%, rgba(6, 10, 22, 0.28)),
    url("M31_low_res.jpg") center center / cover no-repeat;
}

.hero-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  min-height: clamp(260px, 34vw, 430px);
  padding: 62px 20px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.eyebrow {
  color: var(--accent-2);
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-size: 0.78rem;
  font-weight: 700;
}

h1,
h2,
h3 {
  line-height: 1.15;
  margin: 0 0 16px;
}

h1 {
  max-width: 820px;
  font-size: clamp(2.7rem, 6vw, 5.7rem);
  letter-spacing: 0;
}

h2 {
  font-size: clamp(1.8rem, 3vw, 2.7rem);
}

h3 {
  font-size: 1.25rem;
}

.lead {
  max-width: 760px;
  color: var(--muted);
  font-size: clamp(1.05rem, 2vw, 1.28rem);
}

.hero-actions,
.button-row {
  margin-top: 28px;
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 10px 16px;
  border: 1px solid var(--line);
  border-radius: 6px;
  color: var(--text);
  background: rgba(255, 255, 255, 0.08);
  font-weight: 700;
}

.button.primary {
  color: #07101f;
  border-color: transparent;
  background: var(--accent);
}

.content {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 28px 20px 80px;
}

.section {
  padding: 42px 0;
  border-top: 1px solid var(--line);
}

.section:first-child {
  border-top: 0;
}

.two-column {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(260px, 0.8fr);
  gap: 34px;
  align-items: start;
}

.panel,
.card {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(16, 24, 40, 0.82);
}

.panel {
  padding: 22px;
}

.grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

.card {
  padding: 18px;
}

.card p:last-child,
.panel p:last-child {
  margin-bottom: 0;
}

.research-topic {
  display: grid;
  grid-template-columns: minmax(280px, 0.9fr) minmax(0, 1.1fr);
  gap: 24px;
  align-items: center;
  padding: 22px 0;
  border-top: 1px solid var(--line);
}

.research-topic:first-of-type {
  border-top: 0;
}

.topic-media {
  display: block;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.05);
}

.topic-media img {
  display: block;
  width: 100%;
  height: auto;
}

.paper-links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 14px;
}

.paper-links a {
  display: inline-flex;
  padding: 6px 10px;
  border: 1px solid var(--line);
  border-radius: 6px;
  color: var(--text);
  background: rgba(255, 255, 255, 0.07);
  font-size: 0.9rem;
  font-weight: 700;
}

.muted {
  color: var(--muted);
}

.kicker {
  color: var(--accent-2);
  font-size: 0.82rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.list-clean {
  padding-left: 20px;
}

.pub-list {
  padding-left: 22px;
}

.pub-list li {
  margin-bottom: 14px;
}

.person-list {
  display: grid;
  gap: 12px;
}

.person {
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(16, 24, 40, 0.72);
}

.person-featured {
  display: grid;
  grid-template-columns: 150px minmax(0, 1fr);
  gap: 20px;
  align-items: center;
}

.person-photo {
  width: 150px;
  aspect-ratio: 3 / 4;
  object-fit: cover;
  border-radius: 8px;
  border: 1px solid var(--line);
}

.footer {
  border-top: 1px solid var(--line);
  color: var(--muted);
  background: rgba(7, 11, 24, 0.9);
}

.footer-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 22px 20px;
  display: flex;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  font-size: 0.9rem;
}

@media (max-width: 760px) {
  .nav {
    align-items: flex-start;
    flex-direction: column;
  }

  .hero {
    padding-top: 72px;
  }

  .two-column,
  .grid,
  .research-topic {
    grid-template-columns: 1fr;
  }

  .person-featured {
    grid-template-columns: 1fr;
  }

  .person-photo {
    width: 170px;
    max-width: 100%;
  }
}
