:root {
  --bg: #f8fafc;
  --surface: #ffffff;
  --text: #111827;
  --muted: #5b6472;
  --line: #e5e7eb;
  --accent: #1d4ed8;
  --accent-dark: #0f2f6f;
  --accent-soft: #eaf1ff;
  --max: 1120px;
  --radius: 22px;
  --shadow: 0 20px 60px rgba(15, 23, 42, 0.08);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: "Inter", 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;
}

img {
  max-width: 100%;
}

.container {
  width: min(var(--max), calc(100% - 40px));
  margin: 0 auto;
}

.narrow {
  max-width: 900px;
}

/* Header */

.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  background: rgba(248, 250, 252, 0.9);
  backdrop-filter: blur(18px);
  border-bottom: 1px solid var(--line);
}

.nav-wrap {
  min-height: 72px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.site-title {
  color: var(--text);
  font-weight: 800;
  letter-spacing: -0.03em;
  font-size: 1.05rem;
}

.site-title:hover {
  color: var(--accent);
  text-decoration: none;
}

.site-nav {
  display: flex;
  gap: 22px;
  font-size: 0.94rem;
  font-weight: 600;
}

.site-nav a {
  color: #243041;
}

.site-nav a:hover {
  color: var(--accent);
  text-decoration: none;
}

/* Home hero */

.hero {
  background:
    radial-gradient(circle at top left, rgba(29, 78, 216, 0.13), transparent 30%),
    linear-gradient(135deg, #f8fafc 0%, #eef4ff 100%);
}

.compact-hero {
  padding: 30px 0 24px;
}

.compact-hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 250px;
  grid-template-areas:
    "copy side"
    "themes themes";
  gap: 18px 34px;
  align-items: center;
}

.hero-copy {
  grid-area: copy;
}

.hero-side {
  grid-area: side;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
}

.home-photo-section {
  padding: 28px 0 0;
  background: var(--bg);
}

.home-feature-photo {
  width: 100%;
  max-height: 520px;
  object-fit: cover;
  display: block;
  border-radius: 24px;
  box-shadow: 0 18px 48px rgba(15, 23, 42, 0.12);
  background: #ffffff;
}

/* Home title text */

.eyebrow {
  margin: 0 0 6px;
  color: var(--accent);
  font-size: 0.72rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.14em;
}

h1,
h2,
h3 {
  line-height: 1.12;
  letter-spacing: -0.035em;
}

h1 {
  margin: 0 0 12px;
  font-family: "Source Serif 4", Georgia, serif;
  font-size: clamp(2.2rem, 5vw, 4.4rem);
}

.compact-hero h1 {
  margin-bottom: 8px;
  font-size: clamp(2.6rem, 5.6vw, 4.7rem);
}

h2 {
  margin-top: 36px;
  font-size: 1.75rem;
}

h3 {
  margin-top: 26px;
  font-size: 1.25rem;
}

.hero-text {
  max-width: 760px;
  color: var(--muted);
  font-size: 1.1rem;
}

.compact-hero-text {
  margin: 0;
  max-width: 740px;
  font-size: clamp(0.95rem, 1.6vw, 1.12rem);
  line-height: 1.45;
}

/* Home logo and buttons */

.compact-hero-logo {
  width: 185px;
  max-width: 100%;
  height: auto;
  display: block;
  border-radius: 18px;
  background: #ffffff;
  box-shadow: 0 14px 34px rgba(15, 23, 42, 0.13);
}

.hero-actions {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
  margin-top: 28px;
}

.compact-hero-actions {
  margin-top: 0;
  justify-content: center;
  gap: 8px;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 11px 16px;
  border-radius: 999px;
  font-weight: 700;
}

.compact-hero-actions .button {
  padding: 8px 12px;
  font-size: 0.82rem;
}

.button.primary {
  color: white;
  background: var(--accent);
}

.button.primary:hover {
  background: var(--accent-dark);
  text-decoration: none;
}

.button.secondary {
  color: var(--accent-dark);
  background: white;
  border: 1px solid var(--line);
}

.button.secondary:hover {
  border-color: var(--accent);
  text-decoration: none;
}

/* Home research theme strip */

.compact-theme-strip {
  grid-area: themes;
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  align-items: center;
  padding: 11px 13px;
  background: rgba(255, 255, 255, 0.78);
  border: 1px solid rgba(255, 255, 255, 0.95);
  border-radius: 16px;
  box-shadow: 0 12px 30px rgba(15, 23, 42, 0.07);
}

.compact-theme-strip span {
  display: inline-flex;
  align-items: center;
  padding: 5px 8px;
  border-radius: 999px;
  background: #ffffff;
  border: 1px solid var(--line);
  color: #374151;
  font-size: 0.76rem;
  font-weight: 650;
  line-height: 1.15;
}

.compact-theme-strip .theme-label {
  background: var(--accent);
  border-color: var(--accent);
  color: #ffffff;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.055em;
  font-size: 0.66rem;
}

/* Legacy hero panel, retained in case any layout still uses it */

.hero-grid {
  display: grid;
  grid-template-columns: 1.45fr 0.75fr;
  gap: 48px;
  align-items: center;
}

.hero-panel {
  padding: 30px;
  background: rgba(255, 255, 255, 0.78);
  border: 1px solid rgba(255, 255, 255, 0.9);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.hero-panel h2 {
  margin-top: 0;
  font-size: 1.4rem;
}

.hero-panel ul {
  padding-left: 20px;
  margin-bottom: 0;
}

.hero-panel-with-logo {
  display: flex;
  flex-direction: column;
  gap: 22px;
}

.hero-panel-logo {
  width: 100%;
  max-width: 320px;
  align-self: center;
  height: auto;
  display: block;
  border-radius: 24px;
  background: #ffffff;
  box-shadow: 0 18px 48px rgba(15, 23, 42, 0.14);
}

.hero-panel-with-logo h2 {
  margin-top: 4px;
}

/* General page layout */

.section {
  padding: 38px 0;
}

.page-hero {
  padding: 22px 0 18px;
  background:
    radial-gradient(circle at top right, rgba(29, 78, 216, 0.10), transparent 28%),
    linear-gradient(135deg, #ffffff 0%, #eef4ff 100%);
  border-bottom: 1px solid var(--line);
}

.page-hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 140px;
  gap: 18px;
  align-items: center;
}

.page-hero .eyebrow {
  margin-bottom: 5px;
  font-size: 0.68rem;
}

.page-hero h1 {
  font-size: clamp(1.55rem, 2.7vw, 2.45rem);
  margin: 0;
}

.page-hero-logo-wrap {
  display: flex;
  justify-content: flex-end;
  align-items: center;
}

.page-hero-logo {
  width: 118px;
  max-width: 100%;
  height: auto;
  display: block;
  border-radius: 14px;
  background: #ffffff;
  box-shadow: 0 10px 26px rgba(15, 23, 42, 0.11);
}

.page-content {
  padding: 32px 0 64px;
}

.page-content .container {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 42px;
  box-shadow: var(--shadow);
}

.page-content img {
  max-width: 100%;
  border-radius: 18px;
}

.page-content p {
  color: #243041;
}

.page-content li {
  margin-bottom: 0.35rem;
}

/* Generic cards */

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

.card {
  background: white;
  border: 1px solid var(--line);
  border-radius: 20px;
  padding: 24px;
  box-shadow: 0 14px 35px rgba(15, 23, 42, 0.06);
}

/* Research theme cards */

.section-note {
  margin-top: -0.4rem;
  margin-bottom: 1.2rem;
  color: #6b7280 !important;
  font-size: 0.9rem;
}

.theme-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
  margin: 1.25rem 0 2.5rem;
}

.theme-card {
  padding: 0;
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: 18px;
  box-shadow: 0 10px 26px rgba(15, 23, 42, 0.055);
  scroll-margin-top: 100px;
  overflow: hidden;
}

.theme-details {
  transition: box-shadow 0.18s ease, transform 0.18s ease;
}

.theme-details:hover {
  transform: translateY(-2px);
  box-shadow: 0 16px 34px rgba(15, 23, 42, 0.085);
}

.theme-summary {
  list-style: none;
  cursor: pointer;
  padding: 16px;
}

.theme-summary::-webkit-details-marker {
  display: none;
}

.theme-icon {
  width: 36px;
  height: 36px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 8px;
  border-radius: 13px;
  background: var(--accent-soft);
  font-size: 1.12rem;
}

.theme-card h3 {
  margin-top: 0;
  margin-bottom: 7px;
  font-size: 1rem;
  line-height: 1.18;
}

.theme-card p {
  margin: 0.4rem 0;
  font-size: 0.82rem;
  line-height: 1.42;
}

.theme-keywords {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  margin-top: 10px;
}

.theme-keywords span {
  display: inline-flex;
  padding: 3px 7px;
  border-radius: 999px;
  background: #f8fafc;
  border: 1px solid var(--line);
  color: #374151;
  font-size: 0.66rem;
  font-weight: 650;
  line-height: 1.15;
}

.theme-click-label {
  display: inline-flex;
  margin-top: 12px;
  padding: 5px 9px;
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--accent);
  font-size: 0.68rem;
  font-weight: 800;
}

.theme-details[open] .theme-click-label {
  background: var(--accent);
  color: #ffffff;
}

.theme-details[open] {
  grid-column: span 2;
}

.theme-paper-panel {
  padding: 0 16px 16px;
  border-top: 1px solid var(--line);
  background: #fbfdff;
}

.theme-paper-item {
  padding: 11px 0;
  border-bottom: 1px solid #eef2f7;
}

.theme-paper-item:last-child {
  border-bottom: none;
}

.theme-paper-title {
  margin: 0 0 4px !important;
  color: var(--text) !important;
  font-size: 0.84rem !important;
  font-weight: 760;
  line-height: 1.32;
}

.theme-paper-meta {
  margin: 0 !important;
  color: #4b5563 !important;
  font-size: 0.72rem !important;
  line-height: 1.3;
}

.theme-paper-venue {
  margin: 3px 0 0 !important;
  color: #6b7280 !important;
  font-size: 0.7rem !important;
  font-style: italic;
  line-height: 1.3;
}

.theme-paper-links {
  justify-content: flex-start !important;
  margin-top: 7px;
}

.theme-paper-empty {
  margin-top: 12px !important;
  color: #6b7280 !important;
  font-size: 0.82rem !important;
}

/* Publications */

.publication-compact-list {
  display: grid;
  gap: 10px;
  margin: 1.2rem 0 2rem;
}

.publication-item {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 16px;
  align-items: center;
  padding: 13px 15px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: #ffffff;
  box-shadow: 0 8px 22px rgba(15, 23, 42, 0.04);
}

.publication-title {
  margin: 0 0 4px !important;
  color: var(--text) !important;
  font-size: 0.94rem;
  font-weight: 760;
  line-height: 1.35;
}

.publication-meta {
  margin: 0 !important;
  color: #4b5563 !important;
  font-size: 0.8rem;
  line-height: 1.35;
}

.publication-venue {
  margin: 3px 0 0 !important;
  color: #6b7280 !important;
  font-size: 0.78rem;
  font-style: italic;
  line-height: 1.35;
}

.publication-status {
  display: inline-flex;
  margin-top: 6px;
  padding: 3px 8px;
  border-radius: 999px;
  background: #f8fafc;
  border: 1px solid var(--line);
  color: #4b5563;
  font-size: 0.66rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.publication-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 7px;
}

.publication-links a {
  display: inline-flex;
  align-items: center;
  padding: 4px 8px;
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--accent);
  font-size: 0.72rem;
  font-weight: 800;
  text-transform: lowercase;
}

.publication-links a:hover {
  background: var(--accent);
  color: #ffffff;
  text-decoration: none;
}

/* Members and alumni compact card grid */

.member-section {
  margin-top: 2.75rem;
}

.member-section:first-of-type {
  margin-top: 2rem;
}

.member-section h2 {
  margin-top: 0;
  margin-bottom: 1rem;
  padding-bottom: 0.55rem;
  border-bottom: 1px solid var(--line);
  font-size: 1.45rem;
}

.member-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 18px;
  margin-top: 1.25rem;
  margin-bottom: 2.5rem;
}

.member-card {
  background: #ffffff;
  border: 1px solid #e5e7eb;
  border-radius: 20px;
  overflow: hidden;
  box-shadow: 0 12px 28px rgba(15, 23, 42, 0.06);
  transition: transform 0.18s ease, box-shadow 0.18s ease;
  scroll-margin-top: 100px;
}

.member-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 18px 38px rgba(15, 23, 42, 0.10);
}

.member-photo {
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  display: block;
  background: #f3f4f6;
  border-radius: 0;
}

.member-info {
  padding: 13px 14px 15px;
}

.member-info h3 {
  margin: 0 0 6px;
  font-size: 1rem;
  line-height: 1.18;
  letter-spacing: -0.02em;
}

.member-role {
  margin: 0 0 6px;
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--accent);
  line-height: 1.35;
}

.member-meta,
.member-current {
  margin: 0 0 6px;
  font-size: 0.78rem;
  color: #6b7280;
  line-height: 1.35;
}

.member-current {
  color: #374151;
  font-weight: 600;
}

.member-tags {
  margin: 0;
  font-size: 0.76rem;
  color: #374151;
  line-height: 1.4;
}

.member-tags,
.member-role,
.member-current,
.member-meta {
  overflow-wrap: anywhere;
}

.member-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 10px;
  font-size: 0.78rem;
  font-weight: 700;
}

.member-actions a {
  color: var(--accent);
}

.mini-label {
  display: inline-block;
  margin-right: 6px;
  padding: 2px 7px;
  border-radius: 999px;
  background: #eaf1ff;
  color: #1d4ed8;
  font-size: 0.68rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

/* Principal investigator card */

.pi-grid {
  grid-template-columns: minmax(320px, 520px);
}

.pi-card {
  display: grid;
  grid-template-columns: 180px 1fr;
  align-items: stretch;
  border: 1px solid rgba(29, 78, 216, 0.22);
  background: linear-gradient(180deg, #ffffff 0%, #f8fbff 100%);
}

.pi-card .member-photo {
  height: 100%;
  aspect-ratio: auto;
}

.pi-card .member-info h3 {
  font-size: 1.15rem;
}

/* Older alumni-card layout, retained in case any page still uses it */

.alumni-list {
  margin-top: 2rem;
}

.alumni-card {
  display: grid;
  grid-template-columns: 120px 1fr;
  gap: 24px;
  align-items: start;
  margin: 28px 0;
  padding: 24px;
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: 22px;
  box-shadow: 0 14px 35px rgba(15, 23, 42, 0.06);
}

.alumni-card img {
  width: 120px;
  height: 120px;
  object-fit: cover;
  border-radius: 24px;
  background: #f3f4f6;
}

.alumni-card h3 {
  margin-top: 0;
  margin-bottom: 10px;
}

.alumni-card p {
  margin: 0.45rem 0;
}

.profile-links {
  margin-top: 1rem;
  font-weight: 600;
}

/* News and activities */

.news-card {
  overflow: hidden;
  background: white;
  border: 1px solid var(--line);
  border-radius: 22px;
  box-shadow: 0 14px 35px rgba(15, 23, 42, 0.06);
}

.news-card img {
  width: 100%;
  height: 220px;
  object-fit: cover;
  border-radius: 0;
}

.news-card-body {
  padding: 22px;
}

.news-card-body h3 {
  margin-top: 0;
}

/* Contact form */

form {
  margin-top: 1.5rem;
}

input,
select,
textarea {
  width: 100%;
  max-width: 100%;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 12px;
  font: inherit;
  background: #ffffff;
  color: var(--text);
}

input:focus,
select:focus,
textarea:focus {
  outline: 2px solid var(--accent-soft);
  border-color: var(--accent);
}

button {
  cursor: pointer;
  border: none;
  padding: 13px 18px;
  border-radius: 999px;
  color: #ffffff;
  background: var(--accent);
  font: inherit;
  font-weight: 700;
}

button:hover {
  background: var(--accent-dark);
}

/* Footer */

.site-footer {
  padding: 42px 0;
  color: #dbeafe;
  background: #0f172a;
}

.site-footer p {
  margin: 0.25rem 0;
}

.site-footer a {
  color: #bfdbfe;
}

.footer-grid {
  display: flex;
  justify-content: space-between;
  gap: 32px;
}

/* Responsive design */

@media (max-width: 1050px) {
  .member-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .pi-grid {
    grid-template-columns: minmax(320px, 520px);
  }

  .theme-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .theme-details[open] {
    grid-column: span 2;
  }
}

@media (max-width: 880px) {
  .nav-wrap {
    align-items: flex-start;
    flex-direction: column;
    padding: 16px 0;
  }

  .site-nav {
    flex-wrap: wrap;
    gap: 12px 16px;
  }
}

@media (max-width: 820px) {
  .compact-hero-grid {
    grid-template-columns: 1fr;
    grid-template-areas:
      "copy"
      "side"
      "themes";
    gap: 18px;
  }

  .hero-side {
    align-items: flex-start;
  }

  .compact-hero-logo {
    width: 170px;
  }

  .compact-hero-actions {
    justify-content: flex-start;
  }

  .hero-grid,
  .card-grid,
  .footer-grid,
  .alumni-card {
    grid-template-columns: 1fr;
  }

  .page-hero {
    padding: 20px 0 16px;
  }

  .page-hero-grid {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  .page-hero-logo-wrap {
    justify-content: flex-start;
  }

  .page-hero-logo {
    width: 105px;
  }

  .page-content .container {
    padding: 26px;
  }

  .theme-grid {
    grid-template-columns: 1fr;
  }

  .theme-details[open] {
    grid-column: span 1;
  }

  .publication-item {
    grid-template-columns: 1fr;
    align-items: start;
  }

  .publication-links {
    justify-content: flex-start;
  }
}

@media (max-width: 760px) {
  .member-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .pi-grid {
    grid-template-columns: 1fr;
  }

  .pi-card {
    display: block;
  }

  .pi-card .member-photo {
    aspect-ratio: 4 / 3;
  }

  .theme-grid {
    grid-template-columns: 1fr;
  }

  .theme-details[open] {
    grid-column: span 1;
  }

  .publication-item {
    grid-template-columns: 1fr;
    align-items: start;
  }

  .publication-links {
    justify-content: flex-start;
  }
}

@media (max-width: 520px) {
  .container {
    width: min(var(--max), calc(100% - 28px));
  }

  .site-title {
    font-size: 1rem;
  }

  .site-nav {
    font-size: 0.88rem;
  }

  .compact-hero {
    padding: 26px 0 22px;
  }

  .compact-hero h1 {
    font-size: clamp(2.35rem, 14vw, 3.6rem);
  }

  .compact-hero-text,
  .hero-text {
    font-size: 1.05rem;
  }

  .compact-hero-logo {
    width: 155px;
  }

  .compact-theme-strip {
    padding: 12px;
    gap: 7px;
  }

  .compact-theme-strip span {
    font-size: 0.74rem;
    padding: 5px 8px;
  }

  .member-grid {
    grid-template-columns: 1fr;
  }

  .member-photo {
    aspect-ratio: 4 / 3;
  }

  .alumni-card img {
    width: 140px;
    height: 140px;
  }
}