:root {
  --bg: #f6f8f5;
  --surface: #ffffff;
  --surface-soft: #f2f5f7;
  --text: #16211f;
  --muted: #5b6665;
  --accent: #0f766e;
  --accent-strong: #b45309;
  --link: #155e75;
  --border: #d9e0dc;
  --shadow: 0 16px 42px rgba(22, 33, 31, 0.08);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: Arial, Helvetica, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
}

a {
  color: var(--link);
}

.container {
  width: min(1160px, 92vw);
  margin: 0 auto;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  background: rgba(255, 255, 255, 0.94);
  border-bottom: 1px solid var(--border);
  backdrop-filter: blur(10px);
}

.header-inner,
.footer-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1.25rem;
  padding: 0.95rem 0;
}

.site-brand {
  display: inline-flex;
  align-items: center;
  flex: 0 0 auto;
  text-decoration: none;
}

.site-brand img {
  display: block;
  width: min(260px, 48vw);
  height: auto;
}

.people-logo {
  display: block;
  width: min(30px, 1.1vw);
  height: auto;
}

.external-logo img {
  display: block;
  width: min(25px, 2vw);
  height: auto;
}

.nav-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  justify-content: flex-end;
  margin: 0;
  padding: 0;
  list-style: none;
}

.nav-list a {
  display: inline-flex;
  align-items: center;
  min-height: 2.25rem;
  padding: 0.32rem 0.7rem;
  border-radius: 8px;
  color: var(--text);
  text-decoration: none;
}

.nav-list a:hover {
  background: var(--surface-soft);
  color: var(--accent);
}

.clone-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  min-height: 2.25rem;
  padding: 0.32rem 0.82rem;
  border: 1px solid var(--accent);
  border-radius: 8px;
  background: var(--accent);
  color: #ffffff;
  font-size: 0.94rem;
  font-weight: 700;
  text-decoration: none;
}

.clone-button:hover {
  background: #0b5f59;
  border-color: #0b5f59;
  color: #ffffff;
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.04fr) minmax(340px, 0.96fr);
  align-items: center;
  gap: clamp(2rem, 5vw, 4.5rem);
  min-height: auto;
  padding: clamp(2.4rem, 6vw, 5rem) 0 clamp(1.75rem, 4vw, 3rem);
}

.hero-copy h1 {
  max-width: 820px;
  margin: 0 0 1rem;
  font-size: clamp(2.4rem, 5.6vw, 5rem);
  line-height: 1.02;
  letter-spacing: 0;
}

.eyebrow {
  margin: 0 0 0.65rem;
  color: var(--accent);
  font-size: 0.88rem;
  font-weight: 700;
  letter-spacing: 0;
}

.lead {
  max-width: 720px;
  margin: 0;
  color: var(--muted);
  font-size: clamp(1.04rem, 1.5vw, 1.2rem);
}

.button-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 1.45rem;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 2.65rem;
  padding: 0.72rem 1.05rem;
  border: 1px solid var(--accent);
  border-radius: 8px;
  background: var(--accent);
  color: #ffffff;
  font-weight: 700;
  text-decoration: none;
}

.button:hover {
  background: #0b5f59;
  border-color: #0b5f59;
}

.button-secondary {
  background: var(--surface);
  color: var(--accent);
}

.button-secondary:hover {
  background: #eaf5f2;
  color: #0b5f59;
}

.hero-visual {
  display: grid;
  justify-items: center;
  min-width: 0;
}

.hero-visual img {
  display: block;
  width: min(500px, 75vw);
  height: auto;
}

.crystal-viewer {
  position: relative;
  overflow: hidden;
  width: 58%;
  height: min(302px, 32vw);
  min-height: 210px;
  border: 1px solid rgba(217, 224, 220, 0.5);
  border-radius: 8px;
  background: var(--bg);
  box-shadow: none;
}

.viewer-fallback {
  position: absolute;
  inset: 0;
  background: var(--bg);
}

.atom {
  position: absolute;
  display: block;
  border-radius: 50%;
  box-shadow: inset -10px -12px 18px rgba(0, 0, 0, 0.16), 0 12px 20px rgba(0, 0, 0, 0.12);
}

.atom-sr {
  width: 3.15rem;
  height: 3.15rem;
  background: #2f9e44;
}

.atom-ti {
  width: 2.55rem;
  height: 2.55rem;
  background: #2563eb;
}

.atom-o {
  width: 2rem;
  height: 2rem;
  background: #dc2626;
}

.atom-corner-1 {
  left: 18%;
  top: 23%;
}

.atom-corner-2 {
  right: 20%;
  top: 20%;
}

.atom-corner-3 {
  left: 22%;
  bottom: 19%;
}

.atom-corner-4 {
  right: 17%;
  bottom: 23%;
}

.atom-center {
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
}

.atom-face-1 {
  left: 50%;
  top: 24%;
  transform: translateX(-50%);
}

.atom-face-2 {
  left: 28%;
  top: 50%;
  transform: translateY(-50%);
}

.atom-face-3 {
  right: 28%;
  top: 50%;
  transform: translateY(-50%);
}

.structure-caption {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  width: 58%;
  margin: 0.75rem 0 0;
  color: var(--muted);
  font-size: 0.95rem;
}

.structure-caption strong {
  color: var(--text);
  white-space: nowrap;
}

.grid {
  display: grid;
  gap: 1rem;
  margin: 1.5rem 0;
}

.three-up {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

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

.card,
.panel,
.publication-preview {
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--surface);
  padding: 1.25rem;
}

.card h2,
.panel h2,
.publication-preview h2 {
  margin-top: 0;
  font-size: 1.18rem;
  line-height: 1.25;
}

.card h2:not(:first-child) {
  margin-top: 1.6rem;
}

.card p,
.panel p {
  margin-bottom: 0;
  color: var(--muted);
}

.home-research {
  display: grid;
  gap: 1rem;
  margin: 1.5rem 0;
}

.research-group-card {
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--surface);
  padding: 1.25rem;
}

.research-group-heading {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 0.95rem;
}

.research-group-heading h2 {
  margin: 0;
  font-size: 1.22rem;
  line-height: 1.25;
}

.research-group-heading a {
  flex: 0 0 auto;
  font-weight: 700;
  text-decoration: none;
}

.research-topic-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.75rem;
}

.research-topic-card {
  display: grid;
  gap: 0.45rem;
  align-content: start;
  min-height: 5.25rem;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: #fbfcfd;
  padding: 0.9rem;
}

.research-topic-card h3 {
  margin: 0;
  font-size: 1rem;
  line-height: 1.3;
}

.research-topic-card p {
  margin: 0;
  color: var(--muted);
  font-size: 0.92rem;
  line-height: 1.45;
}

.link-panel {
  background: #fbfcfd;
}

.section-links {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.65rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.section-links a {
  display: block;
  min-height: 2.5rem;
  padding: 0.6rem 0.7rem;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--surface);
  color: var(--text);
  font-weight: 700;
  text-decoration: none;
}

.section-links a:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.section-heading {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
}

.section-heading h2 {
  margin: 0;
}

.section-heading a {
  font-weight: 700;
  text-decoration: none;
}

.publication-list {
  margin: 0.75rem 0 0;
  padding: 0;
  list-style: none;
}

.publication-list li {
  display: grid;
  gap: 0.2rem;
  padding: 1rem 0;
  border-top: 1px solid var(--border);
}

.publication-list li:first-child {
  border-top: 0;
}

.publication-list strong {
  color: var(--text);
}

.publication-list span,
.publication-list em {
  color: var(--muted);
}

.publication-list a {
  width: fit-content;
  font-weight: 700;
  text-decoration: none;
}

.publication-overview {
  margin: 1rem 0 1.25rem;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  padding: 0.85rem 0;
}

.publication-overview p {
  margin: 0;
  color: var(--muted);
}

.publication-overview strong {
  color: var(--text);
}

.publication-catalog {
  margin-top: 1rem;
}

.full-publication-list {
  counter-reset: publication;
  display: grid;
  gap: 0.85rem;
  margin-top: 0;
}

.full-publication-list .publication-item {
  counter-increment: publication;
  display: block;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--surface);
  padding: 0;
}

.full-publication-list .publication-item:first-child {
  border-top: 1px solid var(--border);
}

.publication-entry {
  display: grid;
  grid-template-columns: 3rem 4.75rem minmax(0, 1fr);
  gap: 0.95rem;
  align-items: start;
  padding: 1rem;
}

.publication-entry::before {
  content: counter(publication);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.35rem;
  height: 2.35rem;
  border-radius: 50%;
  background: var(--surface-soft);
  color: var(--accent);
  font-weight: 700;
}

.publication-year-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 2rem;
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 0.25rem 0.55rem;
  color: var(--accent-strong);
  font-size: 0.9rem;
  font-weight: 700;
}

.publication-body {
  min-width: 0;
}

.publication-body h2 {
  margin: 0;
  font-size: 1.05rem;
  line-height: 1.35;
}

.publication-title-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 0.75rem;
  align-items: start;
}

.publication-altmetric {
  display: flex;
  justify-content: flex-end;
  min-width: 4rem;
  min-height: 2.2rem;
}

.publication-authors {
  margin: 0.35rem 0 0;
  color: var(--muted);
}

.publication-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.15rem 0.75rem;
  margin: 0.5rem 0 0;
  color: var(--muted);
  font-size: 0.94rem;
}

.publication-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 0.7rem;
}

.publication-actions a {
  display: inline-flex;
  align-items: center;
  min-height: 2rem;
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 0.25rem 0.65rem;
  background: #fbfcfd;
  color: var(--link);
  font-size: 0.9rem;
}

.publication-actions a:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.page-header {
  padding: 2.5rem 0 0.75rem;
}

.page-header h1 {
  margin: 0 0 0.5rem;
  font-size: clamp(2rem, 4vw, 3.25rem);
  letter-spacing: 0;
}

.page-intro {
  max-width: 760px;
  color: var(--muted);
}

.person-card h2 {
  margin-bottom: 0.2rem;
}

.person-time {
  margin: 0.25rem 0;
  color: var(--muted);
  font-size: 0.92rem;
  font-weight: 700;
}

.person-email,
.person-link {
  margin: 0.25rem 0;
}

.person-song {
  margin: 0.25rem 0;
  font-weight: normal;
}

.person-link a {
  font-weight: 700;
  text-decoration: none;
}

.person-card-header {
  display: grid;
  /* grid-template-columns: 5.5rem minmax(0, 1fr); */
  grid-template-columns: 7rem minmax(0, 1fr);
  gap: 1rem;
  align-items: center;
  margin-bottom: 0.85rem;
}

.person-photo {
  display: block;
  /* width: 5.5rem; */
  width: 7rem;
  aspect-ratio: 3 / 4;
  border: 1px solid var(--border);
  border-radius: 8px;
  object-fit: cover;
  object-position: center top;
  background: var(--surface-soft);
}

.person-photo-placeholder {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--accent);
  font-size: 1.6rem;
  font-weight: 700;
}

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

.contact-card p {
  margin: 0.35rem 0;
}

.news-tools,
.people-tools {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
  margin: 0.75rem 0 1.25rem;
}

.news-filter,
.news-keyword,
.people-filter {
  display: inline-flex;
  align-items: center;
  min-height: 2.2rem;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--surface);
  color: var(--text);
  font: inherit;
  font-size: 0.92rem;
  font-weight: 700;
  cursor: pointer;
}

.news-filter,
.people-filter {
  padding: 0.35rem 0.8rem;
}

.news-filter:hover,
.news-filter.is-active,
.news-keyword:hover,
.people-filter:hover,
.people-filter.is-active {
  border-color: var(--accent);
  color: var(--accent);
}

.news-filter.is-active,
.people-filter.is-active {
  background: #eaf5f2;
}

.person-card[hidden] {
  display: none;
}

.news-timeline {
  display: grid;
  gap: 0.85rem;
}

.news-item[hidden] {
  display: none;
}

.news-details {
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--surface);
}

.news-details summary {
  display: grid;
  grid-template-columns: 9.5rem minmax(0, 1fr) auto;
  gap: 0.9rem;
  align-items: center;
  padding: 1rem;
  cursor: pointer;
}

.news-details summary::marker {
  color: var(--accent);
}

.news-details[open] summary {
  border-bottom: 1px solid var(--border);
}

.news-date {
  color: var(--accent-strong);
  font-weight: 700;
}

.news-title {
  min-width: 0;
  font-weight: 700;
  line-height: 1.35;
}

.news-keywords {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  justify-content: flex-end;
}

.news-keyword {
  padding: 0.25rem 0.6rem;
}

.news-story {
  padding: 0 1rem 1rem;
  color: var(--muted);
}

.news-story p:last-child {
  margin-bottom: 0;
}

.site-footer {
  margin-top: 3rem;
  border-top: 1px solid var(--border);
  background: var(--surface);
}

.site-footer a {
  color: var(--link);
  text-decoration: none;
}

@media (max-width: 900px) {
  .hero {
    grid-template-columns: 1fr;
    min-height: auto;
  }

  .crystal-viewer {
    width: 70%;
    height: 250px;
  }

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

.research-intro,
.research-section,
.research-student-callout {
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--surface);
  padding: clamp(1.1rem, 2.4vw, 1.6rem);
}

.research-intro h2,
.research-section-heading h2,
.research-student-callout h2 {
  margin: 0;
  color: var(--brand-navy);
  font-size: clamp(1.45rem, 2.5vw, 2rem);
  line-height: 1.15;
}

.research-intro p,
.research-section-heading p,
.research-line p,
.research-method-grid p,
.research-student-callout p {
  color: var(--muted);
}

.research-focus-box {
  border-left: 3px solid var(--accent);
  background: #f7fbfa;
  padding: 1rem;
}

.research-focus-box h3 {
  margin: 0 0 0.65rem;
  color: var(--deep-navy);
  font-size: 1rem;
  line-height: 1.3;
}

.research-focus-box ul,
.research-line ul {
  margin: 0;
  padding-left: 1.1rem;
  color: var(--muted);
}

.research-focus-box li + li,
.research-line li + li {
  margin-top: 0.35rem;
}

.research-section {
  display: grid;
  gap: 1rem;
}

.research-section-heading {
  max-width: 820px;
}

.research-section-heading p {
  margin: 0.55rem 0 0;
}

.research-line-list {
  display: grid;
  gap: 0.85rem;
}

.research-line {
  display: grid;
  grid-template-columns: minmax(170px, 0.32fr) minmax(0, 0.68fr);
  gap: 1rem;
  align-items: stretch;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: #fbfcfd;
  padding: 0.85rem;
}

.research-figure {
  display: grid;
  place-items: center;
  min-height: 180px;
  margin: 0;
  overflow: hidden;
  border: 1px dashed rgba(15, 118, 110, 0.45);
  border-radius: 8px;
  background:
    linear-gradient(135deg, rgba(15, 118, 110, 0.14), rgba(11, 29, 87, 0.08)),
    #f6f8f5;
  color: var(--accent);
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
}

.research-figure img {
  /* width: 100%;
  height: 100%; */
  width: 300px;
  height: 200px;
  /* aspect-ratio: 3 / 4; */
  object-fit: scale-down;
}

.research-line-body {
  align-self: center;
}

.research-line h3,
.research-method-grid h3 {
  margin: 0;
  color: var(--deep-navy);
  font-size: 1.08rem;
  line-height: 1.3;
}

.research-line p {
  margin: 0.45rem 0 0.75rem;
}

.research-method-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.85rem;
}

.research-method-grid article {
  border: 1px solid var(--border);
  border-radius: 8px;
  background: #fbfcfd;
  padding: 1rem;
}

.research-method-grid p {
  margin: 0.55rem 0 0;
  font-size: 0.95rem;
  line-height: 1.5;
}

.research-student-callout {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.25rem;
  background:
    linear-gradient(135deg, rgba(15, 118, 110, 0.1), rgba(11, 29, 87, 0.06)),
    var(--surface);
}

.research-student-callout p {
  max-width: 800px;
  margin: 0.65rem 0 0;
}

.research-student-callout .button {
  flex: 0 0 auto;
}

@media (max-width: 700px) {
  .header-inner,
  .footer-inner {
    align-items: flex-start;
    flex-direction: column;
  }

  .nav-list {
    justify-content: flex-start;
  }

  .hero {
    padding-top: 2rem;
  }

  .hero-copy h1 {
    font-size: clamp(2.1rem, 13vw, 3.4rem);
  }

  .button,
  .button-secondary {
    width: 100%;
  }

  .crystal-viewer {
    width: 100%;
    height: 220px;
    min-height: 190px;
  }

  .structure-caption {
    width: 100%;
  }

  .structure-caption,
  .section-heading,
  .research-group-heading {
    align-items: flex-start;
    flex-direction: column;
  }

  .section-links {
    grid-template-columns: 1fr;
  }

  .publication-entry {
    grid-template-columns: 2.7rem minmax(0, 1fr);
    gap: 0.7rem;
  }

  .publication-entry::before {
    grid-row: 1 / span 2;
  }

  .publication-year-pill,
  .publication-body {
    grid-column: 2;
  }

  .publication-title-row {
    grid-template-columns: 1fr;
  }

  .publication-altmetric {
    justify-content: flex-start;
    width: fit-content;
  }

  .news-details summary {
    grid-template-columns: 1fr;
  }

  .news-keywords {
    justify-content: flex-start;
  }
}
