/* === Reset & Base === */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  overflow-y: scroll;
}

:root {
  --color-text: #1a1a1a;
  --color-text-light: #555;
  --color-accent: #2a7a8a;
  --color-accent-dark: #1e5a66;
  --color-bg: #fff;
  --color-bg-light: #f7f8f9;
  --color-border: #e0e0e0;
  --font-body: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --max-width: 900px;
  --max-width-wide: 1100px;
}

html {
  font-size: 16px;
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-body);
  color: var(--color-text);
  background: var(--color-bg);
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

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

a:hover {
  color: var(--color-accent-dark);
  text-decoration: underline;
}

/* === Layout === */
.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 1.5rem;
}

.container--wide {
  max-width: var(--max-width-wide);
}

/* === Header & Navigation === */
.site-header {
  border-bottom: 1px solid var(--color-border);
  background: var(--color-bg);
  position: sticky;
  top: 0;
  z-index: 100;
}

.site-header .container {
  max-width: var(--max-width-wide);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 0.75rem;
  padding-bottom: 0.75rem;
}

.site-title {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--color-text);
  white-space: nowrap;
}

.site-title a {
  color: inherit;
}

.site-title a:hover {
  text-decoration: none;
}

.site-nav {
  display: flex;
  gap: 0.25rem;
  flex-wrap: wrap;
  justify-content: flex-end;
  align-items: center;
}

/* Shared style for nav links and dropdown toggle */
.site-nav a,
.nav-dropdown-toggle {
  font-size: 0.85rem;
  padding: 0.35rem 0.65rem;
  border-radius: 4px;
  color: var(--color-text-light);
  transition: background 0.15s, color 0.15s;
  white-space: nowrap;
  line-height: 1.4;
  text-decoration: none;
}

.nav-dropdown-toggle {
  background: none;
  border: none;
  cursor: pointer;
  font-family: inherit;
  margin: 0;
}

.site-nav a:hover,
.site-nav a.active,
.nav-dropdown-toggle:hover,
.nav-dropdown-toggle.active,
.nav-dropdown.open .nav-dropdown-toggle {
  background: var(--color-bg-light);
  color: var(--color-accent);
  text-decoration: none;
}

/* Nav dropdown */
.nav-dropdown {
  position: relative;
}

.nav-dropdown-menu {
  display: none;
  position: absolute;
  top: 100%;
  right: 0;
  background: #fff;
  border-radius: 6px;
  box-shadow: 0 4px 20px rgba(0,0,0,0.15);
  padding: 0.4rem 0;
  min-width: 220px;
  z-index: 200;
}

.nav-dropdown.open .nav-dropdown-menu {
  display: flex;
  flex-direction: column;
}

.nav-dropdown-menu a {
  padding: 0.5rem 1rem;
  border-radius: 0;
  font-size: 0.85rem;
}

.nav-dropdown-menu a:hover {
  background: var(--color-bg-light);
}

/* Hero dropdown menu panel */
.site-header--hero .nav-dropdown-menu {
  background: rgba(30,30,30,0.95);
}

.site-header--hero .nav-dropdown-menu a {
  color: rgba(255,255,255,0.85);
}

.site-header--hero .nav-dropdown-menu a:hover {
  background: rgba(255,255,255,0.12);
  color: #fff;
}

/* Mobile nav toggle */
.nav-toggle {
  display: none;
  background: none;
  border: 1px solid var(--color-border);
  border-radius: 4px;
  padding: 0.4rem 0.6rem;
  cursor: pointer;
  font-size: 1.2rem;
  color: var(--color-text);
}

/* === Hero Section === */
.hero {
  position: relative;
  background: linear-gradient(to right, #191919, #272526);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  margin-top: -3rem;
  padding-top: 3rem;
}

/* Hero header: same sticky position, transparent over hero */
.site-header--hero {
  border-bottom: none;
  background: transparent;
}

.site-header--hero .site-title a {
  color: #fff;
}

.site-header--hero .site-nav a,
.site-header--hero .nav-dropdown-toggle {
  color: rgba(255,255,255,0.85);
}

.site-header--hero .site-nav a:hover,
.site-header--hero .site-nav a.active,
.site-header--hero .nav-dropdown-toggle:hover,
.site-header--hero .nav-dropdown-toggle.active,
.site-header--hero .nav-dropdown.open .nav-dropdown-toggle {
  color: #fff;
  background: rgba(255,255,255,0.12);
}

.site-header--hero .nav-toggle {
  color: #fff;
  border-color: rgba(255,255,255,0.3);
}

/* Hero body: text left, photo right */
.hero-body {
  display: flex;
  align-items: stretch;
  width: 100%;
}

.hero-text {
  flex: 0 0 55%;
  padding: 5rem 2rem 8rem;
  padding-left: max(1.5rem, calc((100% - var(--max-width-wide)) / 2 + 1.5rem));
  max-width: 55%;
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.hero-text h1 {
  font-size: 1.85rem;
  font-weight: 400;
  line-height: 1.5;
  margin-bottom: 1.5rem;
  color: #fff;
}

.hero-text h1 strong {
  font-weight: 700;
}

.hero-quote {
  margin: 0;
  padding: 0;
  border: none;
  background: none;
}

.hero-quote p {
  font-size: 1.1rem;
  color: #bbb;
  line-height: 1.8;
  margin-bottom: 0.75rem;
}

.hero-quote cite {
  display: block;
  font-style: normal;
  font-weight: 600;
  color: rgba(255,255,255,0.7);
  text-align: right;
  font-size: 0.95rem;
}

.hero-portrait {
  flex: 0 0 45%;
  display: flex;
  justify-content: flex-end;
  align-items: flex-end;
  overflow: visible;
}

.hero-portrait img {
  display: block;
  width: 140%;
  max-width: 700px;
  height: auto;
  object-fit: contain;
  object-position: bottom right;
}

/* What's New card overlapping hero bottom */
.hero-news {
  position: relative;
  z-index: 10;
  max-width: 480px;
  margin-top: -10rem;
  margin-left: max(1.5rem, calc((100% - var(--max-width-wide)) / 2 + 1.5rem));
}

.hero-news-inner {
  background: #f5f5f5;
  border-radius: 6px;
  padding: 1.5rem 2rem;
  box-shadow: 0 6px 30px rgba(0,0,0,0.25);
}

.hero-news h2 {
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--color-text-light);
  margin-bottom: 1rem;
  font-weight: 600;
}

.hero-news-item {
  margin-bottom: 0.5rem;
}

.hero-news-item p {
  font-size: 0.9rem;
  line-height: 1.5;
  margin-bottom: 0;
  color: var(--color-text);
}

.hero-news-item--book {
  display: flex;
  gap: 0.75rem;
  align-items: flex-start;
}

.hero-news-book-cover {
  width: 52px;
  flex-shrink: 0;
  border-radius: 3px;
  box-shadow: 0 1px 4px rgba(0,0,0,0.15);
}

/* Featured work rows below hero-news */
.featured-work {
  padding: 0;
}

.featured-grid {
  display: flex;
  flex-direction: column;
}

.featured-card {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 3rem;
  padding: 3rem;
  padding-left: max(2rem, calc((100% - var(--max-width-wide)) / 2 + 2rem));
  padding-right: max(2rem, calc((100% - var(--max-width-wide)) / 2 + 2rem));
  text-decoration: none;
  color: var(--color-text);
  transition: background 0.2s;
}

.featured-card:nth-child(odd) {
  background: #fff;
}

.featured-card:nth-child(even) {
  background: var(--color-bg-light);
}

.featured-card--reverse {
  flex-direction: row-reverse;
}

.featured-card:hover {
  background: #eef4f5;
}

.featured-card img {
  width: 320px;
  height: 220px;
  flex-shrink: 0;
  object-fit: contain;
  border-radius: 4px;
  background: transparent;
}

.featured-card-text {
  flex: 1;
  min-width: 0;
}

.featured-label {
  display: inline-block;
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  font-weight: 700;
  color: var(--color-accent);
  margin-bottom: 0.3rem;
}

.featured-card h3 {
  font-size: 1.1rem;
  font-weight: 600;
  line-height: 1.4;
  margin-bottom: 0.5rem;
  color: var(--color-text);
}

.featured-card p {
  font-size: 0.9rem;
  line-height: 1.7;
  color: var(--color-text-light);
  margin: 0;
}

@media (max-width: 600px) {
  .featured-card {
    flex-direction: column;
    align-items: flex-start;
    gap: 1rem;
  }

  .featured-card img {
    width: 100%;
    height: auto;
    max-height: 160px;
  }
}

/* === Main Content === */
main {
  padding: 2.5rem 0;
}


main h1 {
  font-size: 1.8rem;
  font-weight: 700;
  margin-bottom: 1.5rem;
  line-height: 1.3;
}

main h2 {
  font-size: 1.35rem;
  font-weight: 700;
  margin-top: 2rem;
  margin-bottom: 0.75rem;
  line-height: 1.3;
}

main h3 {
  font-size: 1.1rem;
  font-weight: 700;
  margin-top: 1.5rem;
  margin-bottom: 0.5rem;
}

main p {
  margin-bottom: 1rem;
}

main ul, main ol {
  margin-bottom: 1rem;
  padding-left: 1.5rem;
}

main li {
  margin-bottom: 0.35rem;
}

/* === Section dividers === */
.section {
  margin-bottom: 2.5rem;
}

.section + .section {
  padding-top: 2rem;
  border-top: 1px solid var(--color-border);
}

/* Two-column section rows (text + image) */
.section-row {
  display: flex;
  align-items: center;
  gap: 2.5rem;
}

.section-row-text {
  flex: 1;
  min-width: 0;
}

.section-row-img {
  width: 380px;
  flex-shrink: 0;
  border-radius: 6px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.12);
}

.pub-ref {
  font-size: 0.92rem;
  color: #555;
  margin-top: 0.75rem;
}

@media (max-width: 768px) {
  .section-row {
    flex-direction: column;
  }

  .section-row-img {
    width: 100%;
    max-width: 380px;
  }
}

/* Alternating section backgrounds */
.alt-sections {
  padding: 0;
}

.alt-sections > .container:first-child {
  padding-top: 2.5rem;
  padding-bottom: 1.5rem;
}

.alt-section {
  margin-bottom: 0;
  padding: 2.5rem 0;
  border-top: none;
}

.alt-section + .alt-section {
  padding-top: 2.5rem;
  border-top: none;
}

.alt-section:nth-child(odd) {
  background: #fff;
}

.alt-section:nth-child(even) {
  background: var(--color-bg-light);
}

/* Section images — floated beside text */
.section-img {
  max-width: 380px;
  width: 100%;
  border-radius: 6px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.12);
  margin-top: 0.15rem;
  margin-bottom: 0.75rem;
}

.section-img--right {
  float: right;
  margin-left: 1.75rem;
}

.section-img--left {
  float: left;
  margin-right: 1.75rem;
}

.section::after {
  content: "";
  display: table;
  clear: both;
}

@media (max-width: 600px) {
  .section-img {
    float: none !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
    max-width: 100%;
    display: block;
  }
}

/* === What's New items === */
.news-list {
  list-style: none;
  padding: 0;
}

.news-list li {
  padding: 1rem 0;
  border-bottom: 1px solid var(--color-border);
}

.news-list li:last-child {
  border-bottom: none;
}

.news-date {
  font-size: 0.8rem;
  color: var(--color-text-light);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

/* === Book Cards === */
.book-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2.5rem;
  margin-top: 1.5rem;
}

.book-card {
  display: flex;
  flex-direction: column;
}

.book-card img {
  width: 200px;
  margin: 0 auto 1.25rem;
  border-radius: 4px;
  box-shadow: 4px 4px 14px rgba(0,0,0,0.25);
}

.book-card h2 {
  margin-top: 0;
  font-size: 1.25rem;
}

.book-card .subtitle {
  color: var(--color-text-light);
  font-style: italic;
  margin-bottom: 1rem;
}

.book-links {
  margin-top: auto;
  padding-top: 1rem;
}

.book-links a {
  display: inline-block;
  padding: 0.4rem 1rem;
  border: 1px solid var(--color-accent);
  border-radius: 4px;
  font-size: 0.9rem;
  margin-right: 0.5rem;
  margin-bottom: 0.5rem;
  transition: background 0.15s, color 0.15s;
}

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

/* === Endorsement quotes === */
.endorsement {
  border-left: 3px solid var(--color-accent);
  padding: 0.75rem 1rem;
  margin: 1rem 0;
  background: var(--color-bg-light);
  font-style: italic;
}

.endorsement cite {
  display: block;
  margin-top: 0.5rem;
  font-style: normal;
  font-weight: 600;
  font-size: 0.9rem;
  color: var(--color-text-light);
}

/* === Timeline (Story page) === */
.timeline {
  list-style: none;
  padding: 0;
  position: relative;
}

.timeline li {
  padding-left: 2rem;
  position: relative;
  margin-bottom: 1.5rem;
  border-left: 2px solid var(--color-border);
  margin-left: 6px;
}

.timeline li::before {
  content: "";
  position: absolute;
  left: -8px;
  top: 0.55rem;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: var(--color-accent);
}

.timeline .year {
  font-weight: 700;
  color: var(--color-accent);
  font-size: 0.95rem;
}

/* Story images — regular float */
.timeline .story-img {
  max-width: 320px;
  width: 100%;
  border-radius: 6px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.12);
  margin-bottom: 0.75rem;
}

.timeline .story-img--right {
  float: right;
  margin-left: 1.25rem;
}

.timeline .story-img--left {
  float: left;
  margin-right: 1.25rem;
}

/* Salk — image left, timeline + text right */
.timeline-salk {
  display: flex;
  align-items: flex-start;
  gap: 0;
  border-left: none !important;
  padding-left: 0 !important;
  margin-left: 0 !important;
}

.timeline-salk::before {
  display: none !important;
}

.timeline-salk-img {
  width: 45%;
  flex-shrink: 0;
  border-radius: 6px;
  border: 1px solid #e0d8ce;
  align-self: stretch;
  object-fit: cover;
}

.timeline-salk-content {
  border-left: 2px solid var(--color-border);
  margin-left: 1.25rem;
  padding-left: 2rem;
  padding-top: 0.25rem;
  position: relative;
}

.timeline-salk-content::before {
  content: "";
  position: absolute;
  left: -8px;
  top: 0.55rem;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: var(--color-accent);
}

@media (max-width: 600px) {
  .timeline-salk {
    flex-direction: column;
    border-left: 2px solid var(--color-border) !important;
    margin-left: 6px !important;
    padding-left: 2rem !important;
  }
  .timeline-salk::before {
    display: block !important;
    content: "";
    position: absolute;
    left: -8px;
    top: 0.55rem;
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background: var(--color-accent);
  }
  .timeline-salk-img {
    width: 100%;
    margin-bottom: 0.75rem;
  }
  .timeline-salk-content {
    border-left: none;
    margin-left: 0;
    padding-left: 0;
    padding-top: 0;
  }
  .timeline-salk-content::before {
    display: none;
  }
}

/* Story images — featured (timeline wraps around image) */
.timeline-feature {
  border-left: none !important;
  padding-left: 0 !important;
  margin-left: 0 !important;
  position: relative;
}

.timeline-feature::before {
  display: none !important;
}

.timeline-feature-img {
  border: 2px solid var(--color-accent);
  border-radius: 6px;
  overflow: hidden;
  margin-left: 6px;
  margin-bottom: 0;
  max-width: 500px;
  position: relative;
}

.timeline-feature-img img {
  display: block;
  width: 100%;
}

/* Reconnect timeline below the image */
.timeline-feature-text {
  padding-left: calc(6px + 2px + 2rem);
  border-left: 2px solid var(--color-border);
  margin-left: 6px;
  padding-top: 0.75rem;
  padding-bottom: 0.25rem;
}

.timeline-feature-text .year {
  position: relative;
}

.timeline-feature-text .year::before {
  content: "";
  position: absolute;
  left: calc(-2rem - 2px);
  top: 0.2rem;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: var(--color-accent);
}

@media (max-width: 600px) {
  .timeline .story-img {
    float: none !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
    max-width: 100%;
    display: block;
  }
  .timeline-feature-img {
    max-width: calc(100% - 6px);
  }
}

/* === Tool / Project cards === */
.tool-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
  margin-top: 1rem;
}

.tool-card {
  border: 1px solid var(--color-border);
  border-radius: 6px;
  padding: 1.25rem;
}

.tool-card h3 {
  margin-top: 0;
  margin-bottom: 0.5rem;
}

.tool-card p {
  font-size: 0.93rem;
  color: var(--color-text-light);
  margin-bottom: 0.5rem;
}

/* === People grid (Academic Family) === */
.people-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 0.75rem;
  margin-top: 1rem;
}

.person-card {
  border: 1px solid var(--color-border);
  border-radius: 6px;
  text-align: center;
  overflow: hidden;
  box-shadow: 0 1px 4px rgba(0,0,0,0.08);
  transition: box-shadow 0.2s ease, transform 0.2s ease;
}

.person-card:hover {
  box-shadow: 0 4px 12px rgba(0,0,0,0.15);
  transform: translateY(-2px);
}

.person-card .photo {
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
  display: block;
}

.person-card .photo-placeholder {
  width: 100%;
  aspect-ratio: 1;
  background: var(--color-bg-light, #f0f0f0);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2rem;
  font-weight: 700;
  color: var(--color-text-light, #888);
}

.person-card .name {
  font-weight: 700;
  margin-bottom: 0.25rem;
  padding: 0.5rem 0.5rem 0;
}

.person-card .role {
  font-size: 0.85rem;
  color: var(--color-text-light);
  padding: 0 0.5rem 0.75rem;
}

.simple-list {
  columns: 2;
  column-gap: 2rem;
}

.page-banner {
  width: 100%;
  border-radius: 6px;
  margin-bottom: 1.5rem;
}

/* === Publications === */
.pub-controls {
  display: flex;
  gap: 1rem;
  margin-bottom: 1.5rem;
  flex-wrap: wrap;
}

.pub-controls input,
.pub-controls select {
  padding: 0.5rem 0.75rem;
  border: 1px solid var(--color-border);
  border-radius: 4px;
  font-size: 0.9rem;
  font-family: var(--font-body);
}

.pub-controls input {
  flex: 1;
  min-width: 200px;
}

.pub-category {
  margin-bottom: 2rem;
}

.pub-category h2 {
  border-bottom: 2px solid var(--color-accent);
  padding-bottom: 0.35rem;
}

.pub-list {
  list-style: none;
  padding: 0;
}

.pub-list li {
  padding: 0.75rem 0;
  border-bottom: 1px solid var(--color-border);
  font-size: 0.93rem;
  line-height: 1.5;
}

.pub-list li:last-child {
  border-bottom: none;
}

.pub-list .authors {
  color: var(--color-text-light);
}

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

.pub-list .title {
  font-weight: 600;
}

.pub-list .journal {
  font-style: italic;
}

.pub-cited {
  font-size: 0.82rem;
  color: #999;
}

.pub-stats {
  background: var(--color-bg-light);
  padding: 1.25rem 1.5rem;
  border-radius: 6px;
  margin-bottom: 1.5rem;
  display: flex;
  gap: 2.5rem;
  flex-wrap: wrap;
  align-items: center;
}

.pub-stats .stat {
  text-align: center;
}

.pub-stats .stat-value {
  font-size: 1.6rem;
  font-weight: 700;
  color: var(--color-accent);
  display: block;
  line-height: 1.2;
}

.pub-stats .stat-label {
  font-size: 0.8rem;
  color: var(--color-text-light);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.pub-stats-link {
  margin-left: auto;
  font-weight: 600;
  color: var(--color-accent);
  text-decoration: none;
  font-size: 0.95rem;
}

.pub-stats-link:hover {
  text-decoration: underline;
}

/* === Video thumbnails (link to YouTube) === */
.video-thumb {
  position: relative;
  max-width: 560px;
  margin: 1rem auto;
  border-radius: 6px;
  overflow: hidden;
}

.video-thumb a {
  display: block;
  position: relative;
}

.video-thumb img {
  width: 100%;
  display: block;
}

.video-thumb .play-btn {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-size: 3rem;
  color: #fff;
  background: rgba(0,0,0,0.6);
  width: 68px;
  height: 48px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s;
}

.video-thumb a:hover .play-btn {
  background: #c00;
}

h3 + .video-thumb,
.video-thumb {
  text-align: center;
}

h3:has(+ .video-thumb) {
  text-align: center;
}

/* === Video grid (small thumbnails, 2 per row) === */
.video-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.5rem;
  margin: 1.5rem 0;
}

.video-grid .video-card {
  position: relative;
  border-radius: 6px;
  overflow: hidden;
}

.video-grid .video-card a {
  display: block;
  position: relative;
}

.video-grid .video-card img {
  width: 100%;
  display: block;
  border-radius: 6px;
}

.video-grid .video-card .play-btn {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-size: 2rem;
  color: #fff;
  background: rgba(0,0,0,0.6);
  width: 50px;
  height: 36px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s;
}

.video-grid .video-card a:hover .play-btn {
  background: #c00;
}

.video-grid .video-card .video-label {
  text-align: center;
  font-size: 0.9rem;
  margin-top: 0.5rem;
  line-height: 1.3;
}

/* Channel stats bar */
.channel-stats {
  display: flex;
  gap: 2rem;
  margin: 1rem 0 1.5rem;
  flex-wrap: wrap;
}

.channel-stats .stat {
  text-align: center;
}

.channel-stats .stat-value {
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--color-accent);
}

.channel-stats .stat-label {
  font-size: 0.85rem;
  color: #666;
}

@media (max-width: 767px) {
  .video-grid {
    grid-template-columns: 1fr;
  }
  .channel-stats {
    justify-content: center;
  }
}

/* === Video embeds === */
.video-embed {
  position: relative;
  padding-bottom: 56.25%;
  height: 0;
  overflow: hidden;
  border-radius: 6px;
  margin: 1rem 0;
}

.video-embed iframe {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

/* === Article / ICA page === */
.article-page {
  max-width: 780px;
  margin: 0 auto;
  line-height: 1.75;
}

.article-page h1 {
  margin-bottom: 0.5rem;
}

.article-page h2 {
  margin-top: 2.5rem;
  margin-bottom: 0.75rem;
}

.article-page h3 {
  margin-top: 1.75rem;
  margin-bottom: 0.5rem;
}

.toc {
  background: var(--color-bg-light);
  border: 1px solid var(--color-border);
  border-radius: 6px;
  padding: 1.25rem 1.5rem;
  margin-bottom: 2rem;
}

.toc strong {
  display: block;
  margin-bottom: 0.5rem;
  font-size: 0.95rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--color-text-light);
}

.toc ol {
  margin: 0;
  padding-left: 1.25rem;
}

.toc li {
  margin-bottom: 0.25rem;
}

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

.toc a:hover {
  text-decoration: underline;
}

.article-page figure {
  margin: 1.5rem auto;
  text-align: center;
  max-width: 420px;
}

.article-page figure img {
  width: 100%;
  height: auto;
  border-radius: 4px;
  border: 1px solid var(--color-border);
}

/* Matrix / data-layout visualisation */
.matrix-display {
  background: var(--color-bg-light);
  border: 1px solid var(--color-border);
  border-radius: 6px;
  padding: 1rem 1.25rem;
  margin: 1.25rem 0;
  overflow-x: auto;
  font-family: 'SFMono-Regular', Consolas, 'Liberation Mono', Menlo, monospace;
  font-size: 0.82rem;
  line-height: 1.6;
}

.matrix-display .matrix-label {
  text-align: center;
  font-weight: 700;
  font-family: inherit;
  margin-bottom: 0.4rem;
  color: var(--color-text-light);
  font-size: 0.85rem;
}

.matrix-display pre {
  margin: 0;
  font-family: inherit;
  font-size: inherit;
  line-height: inherit;
  white-space: pre;
  overflow-x: auto;
}

.matrix-display table {
  border-collapse: collapse;
  margin: 0 auto;
}

.matrix-display td {
  padding: 0.1rem 0.35rem;
  white-space: nowrap;
  vertical-align: top;
}

.matrix-display .row-labels {
  font-weight: 600;
  padding-right: 1rem;
  color: var(--color-text);
}

.matrix-display .data-cell {
  font-family: 'SFMono-Regular', Consolas, 'Liberation Mono', Menlo, monospace;
  color: #555;
}

.matrix-eq {
  display: flex;
  align-items: flex-start;
  justify-content: center;
  gap: 1rem;
  flex-wrap: wrap;
  margin: 1.5rem 0;
}

.matrix-eq .matrix-display {
  margin: 0;
  flex-shrink: 0;
}

.matrix-eq .eq-symbol {
  font-size: 1.4rem;
  font-weight: 700;
  align-self: center;
  color: var(--color-text-light);
}

.article-page figcaption {
  font-size: 0.85rem;
  color: var(--color-text-light);
  margin-top: 0.5rem;
  font-style: italic;
}

.math-block {
  background: var(--color-bg-light);
  border-left: 3px solid var(--color-accent);
  padding: 0.75rem 1rem;
  margin: 1.25rem 0;
  font-family: 'Georgia', serif;
  font-size: 1.05rem;
  overflow-x: auto;
}

.callout {
  background: var(--color-bg-light);
  border: 1px solid var(--color-border);
  border-radius: 6px;
  padding: 1.25rem 1.5rem;
  margin: 1.5rem 0;
}

.callout ul {
  margin: 0.5rem 0 0;
  padding-left: 1.25rem;
}

.article-page code {
  background: var(--color-bg-light);
  padding: 0.15em 0.4em;
  border-radius: 3px;
  font-size: 0.9em;
}

/* === Footer === */
.site-footer {
  border-top: 1px solid var(--color-border);
  padding: 2rem 0;
  margin-top: 3rem;
  color: var(--color-text-light);
  font-size: 0.85rem;
}

.site-footer .container {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
}

.footer-links a {
  margin-right: 1rem;
}

/* === Responsive === */
@media (max-width: 768px) {
  .nav-toggle {
    display: block;
  }

  .site-nav {
    display: none;
    flex-direction: column;
    width: 100%;
    padding-top: 0.5rem;
  }

  .site-nav.open {
    display: flex;
  }

  .nav-dropdown-menu {
    position: static;
    box-shadow: none;
    background: none;
    padding: 0 0 0 1rem;
  }

  .nav-dropdown.open .nav-dropdown-menu {
    display: flex;
  }

  .site-header--hero .nav-dropdown-menu {
    background: none;
  }

  .site-header .container {
    flex-wrap: wrap;
  }

  .hero-body {
    flex-direction: column;
    text-align: center;
  }

  .hero-text {
    flex: none;
    max-width: 100%;
    padding: 5rem 1.5rem 2rem;
  }

  .hero-portrait {
    flex: none;
    justify-content: center;
  }

  .hero-portrait img {
    width: 100%;
    max-width: 320px;
  }

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

  .hero-news {
    margin-top: -2rem;
    margin-left: 1.5rem;
    max-width: 100%;
    margin-right: 1.5rem;
  }

  .site-header--hero .site-nav.open {
    background: rgba(0,0,0,0.85);
    border-radius: 0 0 6px 6px;
    padding: 0.5rem;
  }

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

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

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

  .pub-stats {
    justify-content: center;
  }

  .site-footer .container {
    flex-direction: column;
    text-align: center;
  }
}

@media (min-width: 1200px) {
  .hero-text h1 {
    font-size: 2.5rem;
  }
}
