/* ============================================================
   LiDM Design System v2 - Page Styles
   ============================================================ */

/* ------------------------------------------------------------
   Home Hero
   ------------------------------------------------------------ */
.hero {
  position: relative;
  margin-top: calc(-1 * var(--header-h));
  padding: calc(110px + var(--header-h)) 0 90px;
  min-height: 480px;
  background: linear-gradient(135deg, #0D1B2A 0%, #13324A 55%, #1B4965 100%);
  color: #FFFFFF;
  overflow: hidden;
}

.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    radial-gradient(720px 420px at 82% 18%, rgba(95, 168, 211, 0.16), transparent 70%),
    radial-gradient(560px 380px at 8% 88%, rgba(190, 233, 232, 0.10), transparent 70%),
    radial-gradient(420px 300px at 55% 110%, rgba(95, 168, 211, 0.09), transparent 70%),
    radial-gradient(300px 220px at 92% 78%, rgba(143, 208, 240, 0.08), transparent 70%);
}

.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    radial-gradient(2px 2px at 78% 26%, rgba(190, 233, 232, 0.55), transparent 100%),
    radial-gradient(2px 2px at 88% 52%, rgba(143, 208, 240, 0.45), transparent 100%),
    radial-gradient(2px 2px at 68% 64%, rgba(190, 233, 232, 0.35), transparent 100%),
    radial-gradient(2px 2px at 94% 20%, rgba(255, 255, 255, 0.35), transparent 100%),
    repeating-linear-gradient(90deg, rgba(255, 255, 255, 0.055) 0 1px, transparent 1px 72px),
    repeating-linear-gradient(0deg, rgba(255, 255, 255, 0.045) 0 1px, transparent 1px 72px);
  mask-image: linear-gradient(115deg, transparent 26%, rgba(0, 0, 0, 0.95) 100%);
  -webkit-mask-image: linear-gradient(115deg, transparent 26%, rgba(0, 0, 0, 0.95) 100%);
}

/* Device photo layer: subtle full-bleed background under a navy overlay.
   The photo quietly textures the whole hero; the overlay keeps copy
   contrast on the left and lets the image breathe on the right. */
.hero-media {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.hero-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 62% 40%;
  opacity: 0.34;
  mix-blend-mode: screen;
}

.hero-media::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(100deg,
    rgba(13, 27, 42, 0.94) 0%,
    rgba(13, 27, 42, 0.78) 42%,
    rgba(15, 36, 56, 0.45) 72%,
    rgba(18, 44, 66, 0.28) 100%);
}

@media (max-width: 768px) {
  .hero-media img {
    opacity: 0.22;
  }

  .hero-media::after {
    background: rgba(13, 27, 42, 0.72);
  }
}

.hero .container {
  position: relative;
  z-index: 2;
}

/* Canvas layer where white dots assemble into the LiDM script logo */
.hero-logo-anim {
  position: absolute;
  top: 0;
  right: 0;
  width: 44%;
  height: 100%;
  z-index: 1;
  pointer-events: none;
}

.hero-logo-anim canvas {
  width: 100%;
  height: 100%;
  display: block;
}

@media (max-width: 960px) {
  .hero-logo-anim {
    display: none;
  }
}

.hero-eyebrow {
  display: block;
  font-size: 12px;
  font-weight: var(--weight-semibold);
  text-transform: uppercase;
  letter-spacing: 0.2em;
  color: #7FB8D9;
  margin-bottom: 18px;
}

.hero h1 {
  font-size: clamp(32px, 4vw, 44px);
  font-weight: var(--weight-bold);
  letter-spacing: -0.02em;
  line-height: 1.12;
  color: #FFFFFF;
  margin-bottom: 18px;
}

.hero-accent {
  color: #8FD0F0;
}

.hero .tagline {
  font-size: 16.5px;
  line-height: 1.65;
  color: rgba(255, 255, 255, 0.82);
  max-width: 560px;
  margin-bottom: 30px;
}

.hero-cta {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
}

@media (max-width: 768px) {
  .hero {
    padding: calc(84px + var(--header-h)) 0 64px;
  }
}

/* ------------------------------------------------------------
   Page Hero (subpages)
   ------------------------------------------------------------ */
.page-hero {
  position: relative;
  margin-top: calc(-1 * var(--header-h));
  padding: calc(96px + var(--header-h)) 0 44px;
  background: linear-gradient(135deg, #0D1B2A 0%, #14324B 60%, #1B4965 100%);
  color: #FFFFFF;
  overflow: hidden;
}

.page-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    radial-gradient(560px 300px at 85% 30%, rgba(95, 168, 211, 0.08), transparent 70%),
    radial-gradient(420px 260px at 10% 100%, rgba(190, 233, 232, 0.06), transparent 70%);
}

.page-hero .container {
  position: relative;
  z-index: 1;
}

.page-hero .eyebrow {
  color: var(--color-accent-light);
  margin-bottom: 8px;
}

.page-hero h1 {
  font-size: clamp(26px, 3vw, 32px);
  color: #FFFFFF;
  margin-bottom: 6px;
}

.page-hero .subtitle,
.page-hero p {
  font-size: 14.5px;
  color: rgba(255, 255, 255, 0.75);
  max-width: 640px;
}

/* ------------------------------------------------------------
   Research Cards (home)
   ------------------------------------------------------------ */
.research-card {
  /* Per-area colour identity (set by .research-card--N below) */
  --area:      var(--color-accent);
  --area-tint: #E3F2FA;
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  text-align: left;
  padding: 26px 20px 22px;
  color: inherit;
}

/* Colour bar is always on (field colour), not hover-only */
.research-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: var(--area);
  opacity: 1;
}

.research-card:hover {
  border-color: var(--area);
}

/* Area palette: muted hues tuned to sit with navy/teal */
.research-card--1 { --area: #2C7DA0; --area-tint: #EAF3F8; } /* ocean blue */
.research-card--2 { --area: #2E8B7A; --area-tint: #E9F4F1; } /* teal green */
.research-card--3 { --area: #C0862E; --area-tint: #F7F0E2; } /* amber gold */
.research-card--4 { --area: #B05F52; --area-tint: #F6ECE9; } /* muted brick */

.icon-tile {
  width: 52px;
  height: 52px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 16px;
  background: var(--area-tint);
  color: var(--area);
}

.icon-tile svg {
  width: 44px;
  height: 44px;
}

.research-card h3 {
  font-size: 16px;
  font-weight: var(--weight-semibold);
  margin-bottom: 8px;
}

.research-card p {
  font-size: 13.5px;
  color: var(--color-text-muted);
  line-height: 1.6;
  margin-bottom: 16px;
}

.learn-more {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  margin-top: auto;
  font-size: 12.5px;
  font-weight: var(--weight-semibold);
  color: var(--area);
}

.learn-more svg {
  width: 14px;
  height: 14px;
  transition: transform var(--transition-base);
}

.research-card:hover .learn-more svg {
  transform: translateX(3px);
}

/* ------------------------------------------------------------
   News Cards
   ------------------------------------------------------------ */
.news-card {
  display: flex;
  flex-direction: column;
  align-self: start;
  cursor: pointer;
  color: inherit;
}

.news-card--static {
  cursor: default;
}

/* Year jump buttons above the archive */
.year-nav {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 26px;
}

.year-btn {
  padding: 7px 20px;
  border: 1.5px solid var(--color-secondary);
  border-radius: 20px;
  background: var(--color-surface);
  color: var(--color-secondary);
  font-size: 13px;
  font-weight: var(--weight-semibold);
  transition: background-color var(--transition-base), color var(--transition-base);
}

.year-btn:hover {
  background: var(--color-secondary);
  color: #FFFFFF;
}

.year-btn:active {
  transform: translateY(1px);
}

/* Collapsible year sections (mirrors publications headings) */
.news-year {
  margin-top: 34px;
  scroll-margin-top: 84px;
}

.news-year:first-of-type {
  margin-top: 0;
}

.news-year-heading {
  font-family: var(--font-heading);
  font-size: 20px;
  font-weight: var(--weight-bold);
  color: var(--color-primary);
  margin: 0 0 18px;
  border-bottom: 2px solid var(--color-secondary);
}

.year-toggle {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  text-align: left;
  font: inherit;
  color: inherit;
  padding: 0 2px 8px;
}

.year-chevron {
  width: 18px;
  height: 18px;
  margin-left: auto;
  flex-shrink: 0;
  color: var(--color-secondary);
  transition: transform var(--transition-base);
}

.news-year--open .year-chevron {
  transform: rotate(180deg);
}

/* The UA's [hidden] rule loses to the grid's display: grid, so be explicit */
.news-year-body[hidden] {
  display: none;
}

/* Uniform cards: fixed photo ratio + two-line title slot */
.news-card--uniform h3 {
  min-height: 2.9em;
}

/* 16:10 photo thumbnail */
.news-thumb {
  aspect-ratio: 16 / 10;
  overflow: hidden;
  background: var(--color-light);
}

/* Photo slot for items whose photos are coming later */
.news-thumb--placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #14324B 0%, #1B4965 100%);
  color: rgba(255, 255, 255, 0.5);
}

.news-thumb--placeholder svg {
  width: 36px;
  height: 36px;
}

/* Multi-photo carousel: arrows + counter overlay */
.news-carousel {
  position: relative;
}

.carousel-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(13, 27, 42, 0.45);
  color: #FFFFFF;
  transition: background-color var(--transition-fast);
}

.carousel-btn:hover {
  background: rgba(13, 27, 42, 0.75);
}

.carousel-btn--prev { left: 8px; }
.carousel-btn--next { right: 8px; }

.carousel-btn svg {
  width: 16px;
  height: 16px;
}

/* Bullet indicator, top-right of the photo (one dot per photo) */
.carousel-dots {
  position: absolute;
  top: 10px;
  right: 12px;
  display: flex;
  gap: 6px;
  padding: 5px 8px;
  border-radius: 12px;
  background: rgba(13, 27, 42, 0.35);
}

.carousel-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  border: 1.5px solid #FFFFFF;
  background: transparent;
}

.carousel-dot--on {
  background: #FFFFFF;
}

.news-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.filter-btn:active {
  transform: translateY(1px);
}

.news-card-body {
  padding: 18px 20px 20px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.news-meta {
  display: flex;
  align-items: center;
  gap: 10px;
}

.news-meta .date,
.news-card .date {
  font-size: 12.5px;
  color: var(--color-text-muted);
}

.news-card h3 {
  font-size: 16px;
  font-weight: var(--weight-semibold);
  line-height: 1.45;
}

.news-card-excerpt {
  font-size: 13.5px;
  color: var(--color-text-muted);
  line-height: 1.6;
}

.news-card-detail {
  display: none;
  padding: 14px 20px 20px;
  font-size: 13.5px;
  color: var(--color-text-muted);
  line-height: 1.7;
  border-top: 1px solid var(--color-border);
}

.news-card.expanded .news-card-detail {
  display: block;
}

/* 4-up news archive: compact type + padding for the narrower cards */
.news-card--uniform .news-card-body {
  padding: 13px 15px 15px;
  gap: 6px;
}

.news-card--uniform h3 {
  font-size: 14px;
  line-height: 1.4;
}

.news-card--uniform .news-meta {
  gap: 7px;
}

.news-card--uniform .date {
  font-size: 11.5px;
}

/* News page category filter */
.news-filters {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 28px;
}

.filter-btn {
  padding: 6px 16px;
  border-radius: 20px;
  font-size: 12.5px;
  font-weight: var(--weight-medium);
  border: 1px solid var(--color-border);
  background: var(--color-surface);
  color: var(--color-text-muted);
  transition: background-color var(--transition-base),
              color var(--transition-base),
              border-color var(--transition-base);
}

.filter-btn:hover,
.filter-btn.active {
  background: var(--color-secondary);
  border-color: var(--color-secondary);
  color: #FFFFFF;
}

/* ------------------------------------------------------------
   Publication Entries (list) + Pub Cards (featured grid)
   ------------------------------------------------------------ */
#pub-list {
  max-width: 980px;
  margin-inline: auto;
}

/* Whole entry is a DOI link: number chip + text + external icon */
.pub-entry {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  padding: 14px 12px;
  border-bottom: 1px solid var(--color-border);
  border-radius: 8px;
  cursor: pointer;
  transition: background-color 180ms ease;
}

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

.pub-entry:hover {
  background: #EFF6FA;
}

.pub-entry--nolink {
  cursor: default;
}

.pub-no {
  flex-shrink: 0;
  min-width: 30px;
  padding: 1px 7px;
  margin-top: 2px;
  text-align: center;
  font-size: 12px;
  font-weight: var(--weight-medium);
  color: var(--color-text-muted);
  background: var(--color-bg);
  border: 1px solid var(--color-border);
  border-radius: 20px;
}

.pub-main {
  flex: 1;
  min-width: 0;
}

/* Graphical-abstract thumbnail on a publications-list entry (right side) */
.pub-thumb {
  flex-shrink: 0;
  align-self: center;
  width: 216px;
  aspect-ratio: 2 / 1;
  overflow: hidden;
  border: 1px solid var(--color-border);
  border-radius: 6px;
  background: #fff;
}

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

@media (max-width: 640px) {
  .pub-thumb { width: 150px; }
}

.pub-doi-hint {
  flex-shrink: 0;
  align-self: center;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 5px 10px;
  font-size: 12px;
  font-weight: var(--weight-semibold);
  letter-spacing: 0.03em;
  color: var(--color-text-muted);
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: 6px;
  transition: background-color 180ms ease, color 180ms ease, border-color 180ms ease;
}

.pub-doi-hint svg {
  width: 14px;
  height: 14px;
}

.pub-entry:hover .pub-doi-hint {
  background: rgba(44, 125, 160, 0.10);
  border-color: var(--color-accent);
  color: var(--color-accent);
}

.pub-entry--nolink .pub-doi-hint {
  display: none;
}

.pub-title {
  font-weight: var(--weight-semibold);
  font-size: 14.5px;
  line-height: 1.5;
  margin-bottom: 3px;
  color: var(--color-text);
  transition: color 180ms ease;
}

.pub-entry:hover .pub-title {
  color: var(--color-accent);
}

.pub-authors {
  font-size: 13px;
  color: var(--color-text-muted);
}

.pub-journal {
  font-size: 13px;
  color: var(--color-text-muted);
}

.pub-meta {
  display: flex;
  gap: 10px;
  align-items: center;
  margin-top: 4px;
  flex-wrap: wrap;
}

.pub-highlight {
  background-color: var(--badge-publication-bg);
  color: var(--badge-publication-text);
  display: inline-block;
  padding: 2px 10px;
  border-radius: 20px;
  font-size: 11.5px;
  font-weight: var(--weight-semibold);
  letter-spacing: 0.03em;
  line-height: 1.6;
  white-space: nowrap;
}

/* Featured publication card (home) */
.pub-card {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 20px;
  color: inherit;
}

/* Cards carrying a graphical abstract: text + compact thumbnail on the right
   (mirrors the publications-page list entry, deliberately not full-bleed) */
.pub-card--ga {
  flex-direction: row;
  align-items: center;
  gap: 16px;
  padding: 18px;
}

.pub-card-ga {
  flex-shrink: 0;
  order: 2;
  width: 210px;
  aspect-ratio: 2 / 1;
  overflow: hidden;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: 8px;
}

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

.pub-card--ga .pub-card-body {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

@media (max-width: 640px) {
  .pub-card-ga { width: 150px; }
}

.pub-card:hover {
  border-color: var(--color-accent);
}

.pub-card .pub-card-title {
  transition: color 180ms ease;
}

.pub-card:hover .pub-card-title {
  color: var(--color-accent);
}

.pub-card-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.pub-card-journal {
  font-size: 12px;
  font-weight: var(--weight-semibold);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--color-accent);
}

.year-chip {
  font-size: 12px;
  font-weight: var(--weight-medium);
  color: var(--color-text-muted);
  background: var(--color-bg);
  border: 1px solid var(--color-border);
  border-radius: 20px;
  padding: 1px 10px;
  white-space: nowrap;
}

.pub-card-title {
  font-size: 15px;
  font-weight: var(--weight-semibold);
  line-height: 1.5;
  color: var(--color-text);
}

.pub-card-authors {
  font-size: 13px;
  color: var(--color-text-muted);
}

/* Odd trailing card closes the 2-column grid cleanly (full width) */
.grid-2 > .pub-card:last-child:nth-child(odd) {
  grid-column: 1 / -1;
}

/* Publications page */
.pub-year-heading {
  font-family: var(--font-heading);
  font-size: 20px;
  font-weight: var(--weight-bold);
  color: var(--color-primary);
  margin: 28px 0 6px;
  padding-bottom: 8px;
  border-bottom: 2px solid var(--color-secondary);
}

.pub-year-count {
  font-family: var(--font-body);
  font-size: 12.5px;
  font-weight: var(--weight-medium);
  color: var(--color-text-muted);
  margin-left: 8px;
  vertical-align: 2px;
}

.pub-year-heading:first-of-type {
  margin-top: 0;
}

.pub-filters {
  display: flex;
  gap: 14px;
  align-items: center;
  max-width: 980px;
  margin-inline: auto;
  margin-bottom: 28px;
  flex-wrap: wrap;
}

#pub-summary-chips {
  max-width: 980px;
  margin-inline: auto;
  margin-bottom: 22px;
}

.pub-filters select,
.pub-filters input {
  padding: 8px 14px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-btn);
  font-size: 13.5px;
  background: var(--color-surface);
  color: var(--color-text);
}

.pub-filters select:focus-visible,
.pub-filters input:focus-visible {
  outline: none;
  border-color: var(--color-accent);
  box-shadow: 0 0 0 3px rgba(44, 125, 160, 0.18);
}

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

/* ------------------------------------------------------------
   Members / Students Page
   ------------------------------------------------------------ */
.member-group-heading {
  font-family: var(--font-heading);
  font-size: 15px;
  font-weight: var(--weight-semibold);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--color-secondary);
  margin: 40px 0 18px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--color-border);
}

.member-group-heading:first-of-type {
  margin-top: 0;
}

/* Members grid: 5 across on desktop, stepping down responsively */
.members-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 18px;
}

@media (max-width: 1200px) { .members-grid { grid-template-columns: repeat(4, 1fr); } }
@media (max-width: 992px)  { .members-grid { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 768px)  { .members-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 480px)  { .members-grid { grid-template-columns: 1fr; } }

.member-card {
  padding: 0 0 14px;
  text-align: center;
  width: 100%;
  font: inherit;
  color: inherit;
  position: relative;
  display: flex;
  flex-direction: column;
}

.member-card--cv {
  cursor: pointer;
}

/* Square photo (or initials avatar), subtle zoom on hover */
.member-photo-square {
  aspect-ratio: 1 / 1;
  width: 100%;
  overflow: hidden;
  border-radius: var(--radius-card) var(--radius-card) 0 0;
  background: var(--color-light);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 11px;
}

.member-photo-square img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform var(--transition-base);
}

.member-card--cv:hover .member-photo-square img {
  transform: scale(1.02);
}

.member-photo-square--initials {
  background: linear-gradient(150deg, #F2F7FB 0%, #E4EDF4 100%);
}

.member-photo-square--initials .member-initials {
  font-size: 34px;
  color: var(--color-text-muted);
  opacity: 0.72;
}

/* Always-visible "View profile" pill so clickable cards read as clickable */
.member-cv-hint {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  margin: 9px auto 2px;
  padding: 3px 11px;
  border-radius: 999px;
  font-size: 9px;
  font-weight: var(--weight-semibold);
  letter-spacing: 0.03em;
  color: var(--color-primary);
  background: rgba(255, 179, 15, 0.20);
  opacity: 1;
  transition: background var(--transition-base), color var(--transition-base);
}

.member-cv-hint::after {
  content: "\2192"; /* rightwards arrow */
  transition: transform var(--transition-base);
}

.member-card--cv:hover .member-cv-hint,
.member-card--cv:focus-visible .member-cv-hint {
  background: var(--color-gold);
  color: var(--color-primary);
}

.member-card--cv:hover .member-cv-hint::after,
.member-card--cv:focus-visible .member-cv-hint::after {
  transform: translateX(3px);
}

/* Non-clickable member cards must not fake interactivity (no hover lift) */
.member-card:not(.member-card--cv):hover {
  transform: none;
  box-shadow: var(--shadow-card);
  border-color: var(--color-border);
}

.member-initials {
  font-family: var(--font-heading);
  font-size: 19px;
  font-weight: var(--weight-semibold);
  color: var(--color-secondary);
  letter-spacing: 0.02em;
}

/* ------------------------------------------------------------
   Member CV Modal
   ------------------------------------------------------------ */
body.modal-open {
  overflow: hidden;
}

.member-modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 3000;
  background: rgba(13, 27, 42, 0.55);
  backdrop-filter: blur(2px);
  -webkit-backdrop-filter: blur(2px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}

.member-modal {
  background: var(--color-surface);
  border-radius: 14px;
  width: 100%;
  max-width: 720px;
  max-height: 82vh;
  overflow-y: auto;
  box-shadow: 0 24px 64px rgba(13, 27, 42, 0.35);
}

.member-modal-header {
  position: sticky;
  top: 0;
  z-index: 1;
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 18px 22px;
  background: var(--color-surface);
  border-bottom: 1px solid var(--color-border);
}

.modal-avatar {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  overflow: hidden;
  flex-shrink: 0;
  background: var(--color-light);
  display: flex;
  align-items: center;
  justify-content: center;
}

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

.modal-avatar--initials span {
  font-family: var(--font-heading);
  font-size: 18px;
  font-weight: var(--weight-semibold);
  color: var(--color-secondary);
}

.modal-headings {
  flex: 1;
  min-width: 0;
}

.modal-headings h3 {
  font-size: 18px;
}

.modal-name-kr {
  font-family: var(--font-body);
  font-size: 13px;
  font-weight: var(--weight-normal);
  color: var(--color-text-muted);
}

.modal-position {
  font-size: 12.5px;
  color: var(--color-accent);
  font-weight: var(--weight-medium);
}

.modal-close {
  flex-shrink: 0;
  width: 34px;
  height: 34px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--color-text-muted);
  transition: background-color var(--transition-fast), color var(--transition-fast);
}

.modal-close:hover {
  background: var(--color-bg);
  color: var(--color-text);
}

.modal-close svg {
  width: 18px;
  height: 18px;
}

.member-modal-body {
  padding: 20px 22px 26px;
}

.member-modal-body .eyebrow {
  margin-top: 18px;
}

.member-modal-body .eyebrow:first-child {
  margin-top: 0;
}

/* Quantitative summary strip at the top of the profile modal */
.modal-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin-bottom: 20px;
}

.modal-stat {
  background: var(--color-bg);
  border: 1px solid var(--color-border);
  border-radius: 10px;
  padding: 12px 10px 10px;
  text-align: center;
}

.modal-stat-value {
  font-family: var(--font-heading);
  font-size: 24px;
  font-weight: var(--weight-bold);
  line-height: 1.1;
  color: var(--color-secondary);
}

.modal-stat-label {
  margin-top: 3px;
  font-size: 11px;
  font-weight: var(--weight-semibold);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--color-text-muted);
}

.modal-stat-sub {
  margin-top: 2px;
  font-size: 11px;
  color: var(--color-text-muted);
}

/* Stats strip is followed directly by the first section eyebrow */
.modal-stats + .eyebrow {
  margin-top: 0;
}

.modal-list li {
  padding: 8px 0;
  border-bottom: 1px solid var(--color-border);
  font-size: 13px;
  line-height: 1.55;
  color: var(--color-text-muted);
}

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

.modal-item-title {
  font-weight: var(--weight-medium);
  color: var(--color-text);
}

/* Publication titles link to the publisher (DOI); accent color signals it. */
a.modal-link {
  color: var(--color-accent);
  text-decoration: none;
  transition: color 0.15s ease;
}

a.modal-link:hover,
a.modal-link:focus-visible {
  text-decoration: underline;
  text-underline-offset: 2px;
}

.modal-status {
  display: inline-block;
  margin-top: 2px;
  padding: 1px 8px;
  border-radius: 20px;
  background: var(--color-bg);
  border: 1px solid var(--color-border);
  font-size: 11.5px;
  color: var(--color-text-muted);
}

.modal-more {
  font-style: italic;
  color: var(--color-text-muted);
}

.modal-empty {
  font-size: 13.5px;
  color: var(--color-text-muted);
}

/* Mobile: bottom-sheet feel */
@media (max-width: 640px) {
  .member-modal-overlay {
    padding: 0;
    align-items: flex-end;
  }

  .member-modal {
    max-width: 100%;
    max-height: 88vh;
    border-radius: 14px 14px 0 0;
  }
}

.member-name {
  font-size: 12px;
  font-weight: var(--weight-semibold);
  margin-bottom: 2px;
}

.member-name-kr {
  font-size: 10px;
  color: var(--color-text-muted);
  margin-bottom: 3px;
}

.member-position {
  font-size: 10px;
  color: var(--color-accent);
  font-weight: var(--weight-medium);
  margin-bottom: 5px;
}

/* Research-area chips on the member card */
.member-tags {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 3px;
  margin-top: 6px;
  padding: 0 8px;
}

.member-tag {
  display: inline-block;
  padding: 2px 6px;
  border-radius: 999px;
  background: rgba(44, 125, 160, 0.10);
  color: var(--color-accent);
  font-size: 8px;
  font-weight: var(--weight-medium);
  line-height: 1.45;
}

.member-research {
  font-size: 12.5px;
  color: var(--color-text-muted);
  line-height: 1.5;
}

#alumni-list {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.alumni-table {
  width: 100%;
  min-width: 480px;
  border-collapse: collapse;
  font-size: 13.5px;
  margin-top: 14px;
}

.alumni-table th {
  text-align: left;
  padding: 10px 12px;
  border-bottom: 2px solid var(--color-secondary);
  font-weight: var(--weight-semibold);
  color: var(--color-primary);
  font-size: 12.5px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.alumni-name-kr {
  color: var(--color-text-muted);
  font-size: 12px;
}

.alumni-table td {
  padding: 10px 12px;
  border-bottom: 1px solid var(--color-border);
  color: var(--color-text);
}

.alumni-table tr:last-child td {
  border-bottom: none;
}

/* ------------------------------------------------------------
   Research Page
   ------------------------------------------------------------ */
.research-area {
  padding: 64px 0;
  border-bottom: 1px solid var(--color-border);
}

.research-area:last-of-type {
  border-bottom: none;
}

.research-area-content {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 56px;
  align-items: center;
}

.research-area:nth-child(even) .research-area-content {
  direction: rtl;
}

.research-area:nth-child(even) .research-area-content > * {
  direction: ltr;
}

.research-area-image {
  border-radius: var(--radius-card);
  min-height: 220px;
  height: 240px;
  max-height: 260px;
  background: linear-gradient(135deg, var(--color-light) 0%, #A8D8EA 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--color-text-muted);
  font-size: 13px;
  overflow: hidden;
}

.research-area-image svg {
  width: 88px;
  height: 88px;
  opacity: 0.3;
  color: #0D1B2A;
}

.research-area-image--1 { background: linear-gradient(135deg, #BEE9E8 0%, #5FA8D3 100%); }
.research-area-image--2 { background: linear-gradient(135deg, #D4E8F0 0%, #BEE9E8 100%); }
.research-area-image--3 { background: linear-gradient(135deg, #C5DAE6 0%, #8DC6DF 100%); }
.research-area-image--4 { background: linear-gradient(135deg, #BEE9E8 0%, #1B4965 100%); }

/* Full graphical-abstract figure: show the whole illustration, no crop */
.research-area-image--fig {
  height: auto;
  min-height: 0;
  max-height: none;
  background: #FFFFFF;
  border: 1px solid var(--color-border);
  overflow: hidden;
  padding: 10px;
}

/* Figure images (were inline styles) */
.figure-img {
  width: 100%;
  height: auto;
  display: block;
}

.figure-img--cover {
  height: 100%;
  object-fit: cover;
}

/* Per-area "Selected Publications" block */
.area-pubs {
  margin-top: 22px;
}

/* Figure cell: image + bilingual caption */
.research-area-figure {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.figure-caption {
  font-size: 13px;
  line-height: 1.6;
  color: var(--color-text-muted);
  padding: 0 2px;
}

.figure-caption-kr {
  display: block;
  margin-top: 2px;
  font-size: 12.5px;
  color: var(--color-accent);
}

/* Korean subtitle under each area title */
.area-title-kr {
  font-size: 13.5px;
  font-weight: var(--weight-medium);
  color: var(--color-accent);
  margin: -6px 0 14px;
}

/* Korean rendition of each area paragraph */
.area-desc-kr {
  margin-top: 14px;
  padding-left: 14px;
  border-left: 2px solid var(--color-light);
  font-size: 13.5px;
  line-height: 1.75;
  color: var(--color-text-muted);
}

/* Consecutive Korean paragraphs share one continuous left border */
.area-desc-kr + .area-desc-kr {
  margin-top: 0;
  padding-top: 12px;
}

/* Korean text never breaks mid-word at any viewport width */
.area-desc-kr,
.area-title-kr,
.figure-caption-kr {
  word-break: keep-all;
  overflow-wrap: break-word;
}

.research-area-text h2,
.research-area-text h3 {
  font-size: 20px;
  margin-bottom: 14px;
}

.research-area-text p {
  font-size: 14px;
  color: var(--color-text-muted);
  line-height: 1.7;
}

.research-area-text p + p {
  margin-top: 12px;
}

.research-keywords {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 14px;
}

.research-keywords span {
  background: #E3F2FA;
  color: var(--color-secondary);
  font-size: 12.5px;
  padding: 4px 12px;
  border-radius: 12px;
  font-weight: var(--weight-medium);
}

.funding-section {
  text-align: center;
  padding: 44px 0;
}

.funding-section h3 {
  margin-bottom: 28px;
  color: var(--color-text-muted);
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

.funding-logos {
  display: flex;
  justify-content: center;
  gap: 52px;
  align-items: center;
  flex-wrap: wrap;
}

/* Sponsor logos: muted at rest, full colour on hover */
.funding-logo {
  display: inline-flex;
  align-items: center;
  padding: 6px 4px;
  filter: grayscale(1);
  opacity: 0.62;
  transition: filter var(--transition-base), opacity var(--transition-base);
}

.funding-logo img {
  height: 34px;
  width: auto;
  display: block;
}

a.funding-logo {
  cursor: pointer;
}

a.funding-logo:hover,
a.funding-logo:focus-visible {
  filter: grayscale(0);
  opacity: 1;
}

.funding-logo--nrf img { height: 38px; }
.funding-logo--mmm img { height: 36px; }
.funding-logo--bcci img { height: 30px; }
.funding-logo--samsung img { height: 23px; }

@media (max-width: 640px) {
  .funding-logos {
    gap: 28px;
  }

  .funding-logo img {
    height: 24px;
  }

  .funding-logo--samsung img {
    height: 17px;
  }
}

/* ------------------------------------------------------------
   Professor Page
   ------------------------------------------------------------ */
.profile-header {
  display: grid;
  grid-template-columns: 320px 1fr;
  gap: 44px;
  align-items: start;
  max-width: 920px;
  margin: 0 auto;
}

.profile-photo {
  aspect-ratio: 3 / 4;
  border-radius: var(--radius-card);
  background: linear-gradient(135deg, var(--color-light) 0%, #5FA8D3 100%);
  min-height: 360px;
  max-width: 320px;
  overflow: hidden;
}

.profile-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.profile-section-heading {
  margin-bottom: 24px;
}

.profile-info h2 {
  margin-bottom: 4px;
}

.profile-name-kr {
  color: var(--color-text-muted);
  font-size: 15px;
  margin-bottom: 20px;
}

.profile-detail {
  font-size: 14px;
  margin-bottom: 8px;
  display: flex;
  gap: 8px;
}

.profile-detail .label {
  font-weight: var(--weight-semibold);
  min-width: 100px;
  color: var(--color-primary);
}

.profile-detail a {
  color: var(--color-accent);
}

.profile-detail a:hover {
  text-decoration: underline;
}

.profile-links {
  display: flex;
  gap: 12px;
  margin-top: 22px;
  flex-wrap: wrap;
}

.profile-links a {
  color: var(--color-secondary);
  font-size: 13px;
  font-weight: var(--weight-medium);
  border: 1.5px solid var(--color-secondary);
  padding: 6px 16px;
  border-radius: var(--radius-btn);
  transition: background-color var(--transition-base), color var(--transition-base);
}

.profile-links a:hover {
  background: var(--color-secondary);
  color: #FFFFFF;
}

.profile-link-icon {
  display: inline-block;
  vertical-align: -1px;
  margin-left: 4px;
}

.timeline {
  padding-left: 24px;
  border-left: 2px solid var(--color-border);
}

.timeline li {
  position: relative;
  padding: 8px 0 8px 22px;
  color: var(--color-text);
  font-size: 13.5px;
}

.timeline li::before {
  content: "";
  position: absolute;
  left: -29px;
  top: 15px;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--color-accent);
  border: 2px solid #FFFFFF;
  box-shadow: 0 0 0 2px var(--color-accent);
}

.timeline .year {
  font-weight: var(--weight-semibold);
  color: var(--color-secondary);
  margin-right: 8px;
}

.keyword-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.keyword-tag {
  background: #E3F2FA;
  color: var(--color-secondary);
  padding: 4px 12px;
  border-radius: 20px;
  font-size: 12.5px;
  font-weight: var(--weight-medium);
}

/* ------------------------------------------------------------
   Facilities Page
   ------------------------------------------------------------ */
.section-subtitle {
  color: var(--color-text-muted);
  font-size: 15px;
  margin-bottom: 32px;
}

.equipment-group-heading {
  font-family: var(--font-heading);
  font-size: var(--size-h2);
  font-weight: var(--weight-semibold);
  color: var(--color-secondary);
  margin-bottom: 20px;
  padding-bottom: 8px;
  border-bottom: 2px solid var(--color-border);
}

.equipment-card {
  text-align: center;
}

.equipment-image {
  height: 150px;
  background: linear-gradient(135deg, var(--color-light), var(--color-bg));
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--color-text-muted);
  font-size: 13px;
}

.equipment-body {
  padding: 14px;
}

.equipment-body h3 {
  font-size: 14px;
  font-weight: var(--weight-medium);
  margin: 0;
}

.shared-facilities-content {
  max-width: 640px;
}

.lab-figure {
  margin: 0;
}

.lab-figure img {
  width: 100%;
  height: auto;
  border-radius: var(--radius-card);
}

.lab-figure figcaption {
  margin-top: 12px;
  text-align: center;
}

.equip-list {
  list-style: disc;
  padding-left: 20px;
  font-size: 14px;
  line-height: 1.9;
  color: var(--color-text);
}

.shared-facilities-content h3,
.shared-facilities-content h4 {
  font-family: var(--font-heading);
  font-size: 17px;
  margin-bottom: 10px;
}

.shared-facilities-content p {
  color: var(--color-text-muted);
  font-size: 14px;
  line-height: 1.7;
  margin-bottom: 20px;
}

/* ------------------------------------------------------------
   Responsive
   ------------------------------------------------------------ */
@media (max-width: 768px) {
  .section-header {
    flex-wrap: wrap;
    gap: 8px;
  }

  .filter-btn {
    padding: 10px 18px;
  }

  .pub-filters {
    flex-direction: column;
    align-items: stretch;
  }

  .pub-filters input {
    min-width: unset;
  }

  .research-area-content {
    grid-template-columns: 1fr;
    direction: ltr;
  }

  .research-area:nth-child(even) .research-area-content {
    direction: ltr;
  }

  .profile-header {
    grid-template-columns: 1fr;
  }

  .profile-photo {
    min-height: 260px;
    aspect-ratio: 4 / 3;
  }

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

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

@media (max-width: 480px) {
  .hero-cta .btn {
    width: 100%;
  }

  .funding-logos {
    flex-direction: column;
    gap: 16px;
  }

  .profile-detail {
    flex-direction: column;
    gap: 2px;
  }
}

/* ------------------------------------------------------------
   Data header fact line (page hero)
   ------------------------------------------------------------ */
.hero-facts {
  margin-top: 14px;
  font-family: var(--font-heading);
  font-size: 12.5px;
  font-weight: var(--weight-medium);
  letter-spacing: 0.05em;
  color: var(--color-light);
  opacity: 0.9;
}

/* ------------------------------------------------------------
   News deep-link target highlight
   ------------------------------------------------------------ */
.news-card--target {
  outline: 2px solid var(--color-gold-faint);
  outline-offset: 3px;
}

/* ------------------------------------------------------------
   Teaching Page - course blocks with level rail
   (deliberately not a card grid: rail + content, level-bound color)
   ------------------------------------------------------------ */
.course-block {
  display: grid;
  grid-template-columns: 148px 1fr;
  gap: 26px;
  padding: 30px 0;
  border-bottom: 1px solid var(--color-border);
}

.course-block:first-child {
  padding-top: 6px;
}

.course-block:last-child {
  border-bottom: none;
}

.course-rail {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 7px;
  padding-top: 4px;
  border-right: 2px solid var(--color-border);
}

.course-block--ug .course-rail { border-right-color: var(--color-accent); }
.course-block--grad .course-rail { border-right-color: var(--color-secondary); }

.course-level {
  font-family: var(--font-heading);
  font-size: 11px;
  font-weight: var(--weight-semibold);
  text-transform: uppercase;
  letter-spacing: 0.07em;
}

.course-level--ug { color: var(--color-accent); }
.course-level--grad { color: var(--color-secondary); }

.course-sem {
  font-size: 11.5px;
  color: var(--color-text-muted);
}

.course-title {
  font-size: 19px;
  font-weight: var(--weight-semibold);
  color: var(--color-primary);
  margin-bottom: 10px;
}

.course-title-kr {
  margin-left: 8px;
  font-size: 13.5px;
  font-weight: var(--weight-medium);
  color: var(--color-text-muted);
  word-break: keep-all;
}

.course-summary {
  font-size: 14px;
  line-height: 1.65;
  color: var(--color-text);
  margin-bottom: 6px;
}

.course-summary-kr {
  font-size: 13px;
  line-height: 1.7;
  color: var(--color-text-muted);
  margin-bottom: 12px;
  word-break: keep-all;
  overflow-wrap: break-word;
}

.course-topics {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  margin-bottom: 12px;
}

.course-topic {
  padding: 3px 10px;
  border-radius: 999px;
  background: var(--color-bg);
  border: 1px solid var(--color-border);
  font-size: 11.5px;
  color: var(--color-text-muted);
}

.course-research-link {
  display: inline-block;
  font-size: 12.5px;
  font-weight: var(--weight-medium);
  color: var(--color-accent);
  margin-bottom: 6px;
}

.course-research-link:hover {
  text-decoration: underline;
  text-underline-offset: 2px;
}

.course-tool {
  display: block;
  margin-top: 12px;
  padding: 13px 16px;
  border: 1px solid var(--color-border);
  border-left: 3px solid var(--color-gold);
  border-radius: 8px;
  background: var(--color-surface);
  transition: box-shadow var(--transition-base), transform var(--transition-base);
}

.course-tool:hover {
  box-shadow: var(--shadow-lift);
  transform: translateY(-2px);
}

.course-tool-tag {
  display: inline-block;
  font-family: var(--font-heading);
  font-size: 10px;
  font-weight: var(--weight-semibold);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--color-text-muted);
  margin-bottom: 3px;
}

.course-tool-name {
  display: block;
  font-size: 14px;
  font-weight: var(--weight-semibold);
  color: var(--color-primary);
}

.course-tool-desc {
  display: block;
  font-size: 12.5px;
  color: var(--color-text-muted);
  line-height: 1.55;
  margin-top: 3px;
}

@media (max-width: 640px) {
  .course-block {
    grid-template-columns: 1fr;
    gap: 12px;
  }
  .course-rail {
    flex-direction: row;
    align-items: center;
    gap: 12px;
    border-right: none;
    border-bottom: 2px solid var(--color-border);
    padding-bottom: 8px;
  }
  .course-block--ug .course-rail { border-bottom-color: var(--color-accent); }
  .course-block--grad .course-rail { border-bottom-color: var(--color-secondary); }
}

/* ------------------------------------------------------------
   Gallery Page - year film strips (horizontal scroll, snap)
   ------------------------------------------------------------ */
.gallery-year {
  margin-top: 34px;
}

.gallery-year:first-child {
  margin-top: 0;
}

.gallery-year-heading {
  font-family: var(--font-heading);
  font-size: 20px;
  font-weight: var(--weight-bold);
  color: var(--color-primary);
  margin: 0 0 14px;
  padding-bottom: 8px;
  border-bottom: 2px solid var(--color-secondary);
}

.gallery-strip {
  display: flex;
  gap: 14px;
  overflow-x: auto;
  padding: 4px 2px 14px;
  scroll-snap-type: x proximity;
  -webkit-overflow-scrolling: touch;
}

.gallery-strip:focus-visible {
  outline: 2px solid var(--color-accent);
  outline-offset: 2px;
}

.gallery-frame {
  flex: 0 0 auto;
  width: 300px;
  scroll-snap-align: start;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-card);
  overflow: hidden;
}

.gallery-frame img {
  width: 100%;
  height: 200px;
  object-fit: cover;
  display: block;
}

.gallery-caption {
  padding: 10px 13px 12px;
  font-size: 12px;
  line-height: 1.55;
  color: var(--color-text-muted);
}

.gallery-caption--cont {
  font-style: italic;
  opacity: 0.85;
}

.gallery-cat {
  display: inline-block;
  padding: 1px 8px;
  border-radius: 999px;
  font-size: 10.5px;
  font-weight: var(--weight-semibold);
  margin-right: 4px;
}

.gallery-cat--conference { background: var(--badge-conference-bg); color: var(--color-primary); }
.gallery-cat--milestone  { background: var(--badge-award-bg); color: var(--color-primary); }
.gallery-cat--lab-life   { background: var(--badge-event-bg); color: var(--color-primary); }

.gallery-title {
  font-weight: var(--weight-semibold);
  color: var(--color-text);
}

.gallery-title-kr {
  font-size: 11.5px;
  color: var(--color-text-muted);
  word-break: keep-all;
}

.gallery-note {
  display: block;
  margin-top: 4px;
}
