/* ---------- Toronto Computational Imaging Group — styles ---------- */

:root {
  --color-bg:        #ffffff;
  --color-bg-soft:   #fafafa;
  --color-bg-elev:   #ffffff;
  --color-text:      #111111;
  --color-text-mute: #5a5a5a;
  --color-text-soft: #8a8a8a;
  --color-rule:      #e8e8e8;
  --color-rule-soft: #f0f0f0;
  --color-accent:    #002a5c;
  --color-accent-hover: #003b80;
  --color-award:     #b45309;
  --color-award-bg:  #fff7ed;
  --color-badge-bg:  #f4f4f5;
  --color-badge-text:#3f3f46;
  --shadow-card:     0 1px 2px rgba(17,17,17,0.04), 0 8px 24px -12px rgba(17,17,17,0.08);
  --shadow-hover:    0 2px 4px rgba(17,17,17,0.06), 0 18px 32px -16px rgba(17,17,17,0.16);

  --font-sans: "Inter", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-serif: "Source Serif 4", "Iowan Old Style", "Apple Garamond", "Baskerville", Georgia, serif;
  --font-mono: ui-monospace, "SFMono-Regular", "JetBrains Mono", Menlo, Consolas, monospace;

  --maxw: 1180px;
  --pad-x: clamp(20px, 4vw, 40px);
  --pad-section: clamp(56px, 9vw, 112px);
  --radius-sm: 6px;
  --radius:    10px;
  --radius-lg: 16px;

  --header-h: 88px;
}

[data-theme="dark"] {
  --color-bg:        #0e0f12;
  --color-bg-soft:   #16181c;
  --color-bg-elev:   #1a1d22;
  --color-text:      #f5f5f6;
  --color-text-mute: #a8acb3;
  --color-text-soft: #797d85;
  --color-rule:      #25282e;
  --color-rule-soft: #1d2026;
  --color-accent:    #8ea7ff;
  --color-accent-hover: #a8baff;
  --color-award:     #fbbf24;
  --color-award-bg:  #2a1f0a;
  --color-badge-bg:  #23262c;
  --color-badge-text:#cbd0d8;
  --shadow-card:     0 1px 2px rgba(0,0,0,0.4), 0 8px 24px -12px rgba(0,0,0,0.5);
  --shadow-hover:    0 2px 4px rgba(0,0,0,0.5), 0 18px 32px -16px rgba(0,0,0,0.6);
}

/* ---------- Reset ---------- */

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.6;
  color: var(--color-text);
  background: var(--color-bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  transition: background-color 200ms ease, color 200ms ease;
}
img, svg, video { display: block; max-width: 100%; height: auto; }
a {
  color: var(--color-accent);
  text-decoration: none;
  transition: color 150ms ease;
}
a:hover { color: var(--color-accent-hover); }
button {
  font-family: inherit;
  color: inherit;
  background: none;
  border: none;
  cursor: pointer;
}
h1, h2, h3, h4 { font-weight: 600; line-height: 1.2; letter-spacing: -0.015em; margin: 0; color: var(--color-text); }
p { margin: 0; }
ul, ol { margin: 0; padding: 0; list-style: none; }

::selection { background: var(--color-accent); color: white; }
[data-theme="dark"] ::selection { color: #0e0f12; }

/* ---------- Layout primitives ---------- */

.container {
  max-width: var(--maxw);
  margin-inline: auto;
  padding-inline: var(--pad-x);
}
.section {
  padding-block: var(--pad-section);
  position: relative;
}
.section + .section { border-top: 1px solid var(--color-rule); }
.section--tight { padding-block: clamp(40px, 6vw, 72px); }
.section-head { display: flex; align-items: baseline; justify-content: space-between; gap: 24px; margin-bottom: 40px; }
.section-eyebrow { font-size: 12px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--color-text-soft); font-weight: 600; }
.section-title { font-size: clamp(28px, 3.5vw, 40px); margin-top: 6px; }
.section-link { font-size: 14px; color: var(--color-text-mute); }
.section-link:hover { color: var(--color-accent); }

/* ---------- Header / nav ---------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: color-mix(in srgb, var(--color-bg) 88%, transparent);
  backdrop-filter: saturate(140%) blur(12px);
  -webkit-backdrop-filter: saturate(140%) blur(12px);
  border-bottom: 1px solid transparent;
  transition: border-color 200ms ease, background-color 200ms ease;
}
.site-header.is-scrolled { border-bottom-color: var(--color-rule); }
.site-header__inner {
  height: var(--header-h);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--color-text);
}
.brand:hover { color: var(--color-text); }
.brand-logo {
  display: block;
  height: 56px;
  width: auto;
  flex: none;
}
.brand-logo--dark { display: none; }
[data-theme="dark"] .brand-logo--light { display: none; }
[data-theme="dark"] .brand-logo--dark { display: block; }
@media (max-width: 560px) {
  .brand-logo { height: 44px; }
}

.nav { display: flex; align-items: center; gap: 28px; }
.nav__links { display: flex; align-items: center; gap: 24px; }
.nav__links a {
  color: var(--color-text-mute);
  font-size: 14px;
  font-weight: 500;
  position: relative;
  padding-block: 6px;
}
.nav__links a:hover { color: var(--color-text); }
.nav__links a.is-active { color: var(--color-text); }
.nav__links a.is-active::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: -2px;
  height: 2px;
  background: var(--color-accent);
  border-radius: 2px;
}

.icon-btn {
  width: 36px; height: 36px;
  display: inline-grid;
  place-items: center;
  border-radius: 8px;
  color: var(--color-text-mute);
  transition: background-color 150ms ease, color 150ms ease;
}
.icon-btn:hover { background: var(--color-rule-soft); color: var(--color-text); }
.icon-btn svg { width: 18px; height: 18px; }
.theme-toggle .icon-sun { display: none; }
.theme-toggle .icon-moon { display: block; }
[data-theme="dark"] .theme-toggle .icon-sun { display: block; }
[data-theme="dark"] .theme-toggle .icon-moon { display: none; }

.nav-toggle { display: none; }

@media (max-width: 880px) {
  .nav__links {
    position: fixed;
    top: var(--header-h);
    left: 0; right: 0;
    background: var(--color-bg);
    border-bottom: 1px solid var(--color-rule);
    flex-direction: column;
    align-items: flex-start;
    padding: 16px var(--pad-x) 24px;
    gap: 4px;
    transform: translateY(-12px);
    opacity: 0;
    pointer-events: none;
    transition: opacity 180ms ease, transform 180ms ease;
  }
  .nav__links a { font-size: 16px; padding-block: 10px; width: 100%; }
  .nav__links a.is-active::after { display: none; }
  .nav.is-open .nav__links {
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
  }
  .nav-toggle { display: inline-grid; }
}

/* ---------- Hero ---------- */

.hero {
  padding-top: clamp(72px, 12vw, 140px);
  padding-bottom: clamp(64px, 10vw, 120px);
  position: relative;
  overflow: hidden;
  isolation: isolate;
}
.hero__eyebrow {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--color-accent);
  margin-bottom: 18px;
  display: inline-flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 14px;
}
.hero__eyebrow::before {
  content: ""; display: inline-block;
  width: 6px; height: 6px; border-radius: 999px;
  background: var(--color-accent);
  margin-right: -4px;
}
.hero__eyebrow-sep {
  display: inline-block;
  width: 22px;
  height: 1px;
  background: currentColor;
  opacity: 0.45;
}
.hero__title {
  font-size: clamp(40px, 6.5vw, 76px);
  line-height: 1.04;
  letter-spacing: -0.025em;
  font-weight: 700;
  max-width: 18ch;
}
.hero__title em {
  font-style: italic;
  font-family: var(--font-serif);
  font-weight: 500;
  color: var(--color-text-mute);
}
.hero__lede {
  margin-top: 28px;
  font-size: clamp(17px, 1.6vw, 20px);
  color: var(--color-text-mute);
  max-width: 60ch;
  line-height: 1.55;
}
.hero__meta {
  margin-top: 36px;
  display: flex;
  flex-wrap: wrap;
  gap: 12px 28px;
  font-size: 14px;
  color: var(--color-text-soft);
}
.hero__meta a { color: var(--color-text-mute); }
.hero__meta a:hover { color: var(--color-accent); }

.hero__bg {
  position: absolute;
  inset: 0;
  z-index: -1;
  overflow: hidden;
  pointer-events: none;
}
.hero__inner { position: relative; z-index: 1; }

/* Subtle dot grid wash across whole hero */
.hero__grid {
  position: absolute;
  inset: 0;
  background-image: radial-gradient(circle at 1px 1px, rgba(0,42,92,0.13) 1px, transparent 1.2px);
  background-size: 18px 18px;
  mask-image: linear-gradient(180deg, black 0%, black 60%, transparent 100%),
              radial-gradient(ellipse 70% 80% at 70% 30%, black 0%, transparent 70%);
  -webkit-mask-image: linear-gradient(180deg, black 0%, black 60%, transparent 100%),
                      radial-gradient(ellipse 70% 80% at 70% 30%, black 0%, transparent 70%);
  mask-composite: intersect;
  -webkit-mask-composite: source-in;
  opacity: 0.9;
}
[data-theme="dark"] .hero__grid {
  background-image: radial-gradient(circle at 1px 1px, rgba(142,167,255,0.18) 1px, transparent 1.2px);
}

/* Aperture iris graphic on the right */
.hero__aperture {
  position: absolute;
  top: -10%;
  right: -8%;
  width: clamp(360px, 50vw, 720px);
  height: auto;
  opacity: 0.45;
  pointer-events: none;
}
[data-theme="dark"] .hero__aperture {
  opacity: 0.5;
}

.hero__blades {
  transform-origin: 400px 400px;
  animation: hero-rotate 60s linear infinite;
}
@keyframes hero-rotate {
  from { transform: translate(400px,400px) rotate(0deg); }
  to   { transform: translate(400px,400px) rotate(360deg); }
}

.hero__ray {
  animation: hero-ray-pulse 4s ease-in-out infinite;
}
@keyframes hero-ray-pulse {
  0%,100% { stroke-opacity: 0.10; stroke-dashoffset: 0; }
  50% { stroke-opacity: 0.32; stroke-dashoffset: -22; }
}

@media (max-width: 720px) {
  .hero__aperture { right: -25%; width: 540px; top: 0; opacity: 0.35; }
}

@media (prefers-reduced-motion: reduce) {
  .hero__blades, .hero__ray { animation: none; }
}

/* ---------- Buttons / chips / badges ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 16px;
  border-radius: 999px;
  font-size: 14px;
  font-weight: 500;
  border: 1px solid var(--color-rule);
  color: var(--color-text);
  background: var(--color-bg);
  transition: background 150ms ease, border-color 150ms ease, color 150ms ease, transform 150ms ease;
}
.btn:hover { background: var(--color-bg-soft); border-color: var(--color-text-soft); color: var(--color-text); }
.btn--accent { background: var(--color-accent); border-color: var(--color-accent); color: white; }
.btn--accent:hover { background: var(--color-accent-hover); border-color: var(--color-accent-hover); color: white; }

.chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 10px;
  border-radius: 999px;
  background: var(--color-badge-bg);
  color: var(--color-badge-text);
  font-size: 12px;
  font-weight: 500;
  border: 1px solid transparent;
  transition: background 150ms ease, color 150ms ease, border-color 150ms ease;
}
a.chip:hover { background: var(--color-bg); border-color: var(--color-text-soft); color: var(--color-text); }
.chip svg { width: 12px; height: 12px; }

.badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 10px;
  border-radius: 5px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  background: var(--color-badge-bg);
  color: var(--color-badge-text);
  border: 1px solid transparent;
  line-height: 1.2;
}
.badge--award {
  background: #e31837;
  color: #ffffff;
  border-color: #c41030;
  box-shadow: 0 1px 0 rgba(0,0,0,0.05);
}
.badge--oral {
  background: #e31837;
  color: #ffffff;
  border-color: #c41030;
  box-shadow: 0 1px 0 rgba(0,0,0,0.05);
}
[data-theme="dark"] .badge--award,
[data-theme="dark"] .badge--oral {
  background: #ff4d65;
  color: #1a0506;
  border-color: #ff7a8c;
}

/* ---------- News ---------- */

.news-block {
  display: grid;
  grid-template-columns: minmax(0, 1.7fr) minmax(0, 1fr);
  gap: clamp(40px, 6vw, 80px);
}
@media (max-width: 880px) { .news-block { grid-template-columns: 1fr; gap: 48px; } }

.selected-list { display: flex; flex-direction: column; gap: 18px; }
.selected-list li a { color: var(--color-text); display: block; }
.selected-list li a strong { font-weight: 600; }
.selected-list li a:hover strong { color: var(--color-accent); }
.selected-list .selected-meta { font-size: 13px; color: var(--color-text-soft); display: block; margin-top: 2px; }
.selected-list .selected-meta em { font-family: var(--font-serif); font-style: italic; }

.news-list { display: flex; flex-direction: column; }
/* Collapsed news: hide all items after the Nth */
.news-list[data-collapsed="true"] .news-item:nth-child(n+7) { display: none; }

.news-more {
  margin-top: 18px;
  padding: 8px 16px;
  font-size: 13px;
  font-weight: 500;
  color: var(--color-text-mute);
  background: transparent;
  border: 1px solid var(--color-rule);
  border-radius: 999px;
  cursor: pointer;
  transition: background 150ms ease, color 150ms ease, border-color 150ms ease;
}
.news-more:hover { color: var(--color-text); border-color: var(--color-text-soft); }
.news-more .news-more__hide { display: none; }
.news-more[aria-expanded="true"] .news-more__show { display: none; }
.news-more[aria-expanded="true"] .news-more__hide { display: inline; }
.news-item {
  display: grid;
  grid-template-columns: 140px 1fr;
  gap: 24px;
  padding: 18px 0;
  border-top: 1px solid var(--color-rule-soft);
  align-items: baseline;
}
.news-list .news-item:first-child { border-top: none; padding-top: 0; }
.news-item__date {
  font-size: 13px;
  font-variant-numeric: tabular-nums;
  color: var(--color-text-soft);
  letter-spacing: 0.02em;
}
.news-item__body {
  font-size: 15.5px;
  line-height: 1.55;
  color: var(--color-text);
}
.news-item__body em { font-family: var(--font-serif); font-style: italic; color: var(--color-text); }

@media (max-width: 600px) {
  .news-item { grid-template-columns: 1fr; gap: 4px; padding: 14px 0; }
}

/* ---------- Research highlight cards (home) ---------- */

.highlight-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}
@media (max-width: 720px) {
  .highlight-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 480px) {
  .highlight-grid { grid-template-columns: minmax(0, 1fr); }
}
.highlight-card {
  position: relative;
  display: block;
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: #0e1320;
  border: 1px solid var(--color-rule);
  aspect-ratio: 4 / 5;
  isolation: isolate;
  color: white;
  transition: transform 200ms ease, box-shadow 200ms ease;
}
.highlight-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-hover); color: white; }
.highlight-card__img {
  position: absolute;
  inset: 0;
  width: 100%; height: 100%;
  object-fit: cover;
  object-position: center 35%;
  z-index: 0;
  opacity: 0.85;
  transition: transform 600ms ease, opacity 300ms ease;
}
.highlight-card:hover .highlight-card__img { transform: scale(1.04); opacity: 0.95; }
.highlight-card__shade {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, rgba(0,0,0,0.10) 0%, rgba(0,0,0,0.25) 40%, rgba(0,0,0,0.85) 100%),
    linear-gradient(0deg, rgba(0,42,92,0.35) 0%, rgba(0,42,92,0) 60%);
  z-index: 1;
  transition: background 300ms ease;
}
.highlight-card:hover .highlight-card__shade {
  background:
    linear-gradient(180deg, rgba(0,0,0,0.08) 0%, rgba(0,0,0,0.22) 40%, rgba(0,0,0,0.82) 100%),
    linear-gradient(0deg, rgba(0,42,92,0.30) 0%, rgba(0,42,92,0) 60%);
}
.highlight-card__content {
  position: absolute;
  left: 20px; right: 20px; bottom: 20px;
  z-index: 2;
  color: white;
}
.highlight-card__eyebrow {
  font-size: 11px; letter-spacing: 0.16em; text-transform: uppercase; font-weight: 600;
  opacity: 0.92;
  text-shadow: 0 1px 2px rgba(0,0,0,0.5);
}
.highlight-card__title {
  font-size: clamp(18px, 1.6vw, 22px);
  font-weight: 600;
  letter-spacing: -0.01em;
  margin-top: 6px;
  color: white;
  text-shadow: 0 1px 3px rgba(0,0,0,0.6);
  line-height: 1.25;
  overflow-wrap: break-word;
}
.highlight-card__desc {
  margin-top: 8px;
  font-size: 13px;
  opacity: 0.95;
  line-height: 1.5;
  text-shadow: 0 1px 2px rgba(0,0,0,0.55);
  overflow-wrap: break-word;
}

@media (max-width: 880px) {
  .highlight-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 560px) {
  .highlight-grid { grid-template-columns: 1fr; }
  .highlight-card { aspect-ratio: 16 / 11; }
}

/* ---------- Publication cards ---------- */

.year-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 18px 0 28px;
  position: sticky;
  top: var(--header-h);
  z-index: 10;
  background: color-mix(in srgb, var(--color-bg) 90%, transparent);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--color-rule-soft);
  margin-bottom: 32px;
}
.year-nav a {
  padding: 6px 14px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 500;
  font-variant-numeric: tabular-nums;
  color: var(--color-text-mute);
  border: 1px solid var(--color-rule);
}
.year-nav a:hover { color: var(--color-text); border-color: var(--color-text-soft); }

.year-block { margin-bottom: 56px; scroll-margin-top: calc(var(--header-h) + 80px); }
.year-block h2 {
  font-size: clamp(24px, 2.6vw, 30px);
  margin-bottom: 24px;
  letter-spacing: -0.02em;
  font-variant-numeric: tabular-nums;
}

.pub-list { display: flex; flex-direction: column; gap: 28px; }
.pub-card {
  display: grid;
  grid-template-columns: 180px 1fr;
  gap: 24px;
  align-items: start;
  padding-bottom: 28px;
  border-bottom: 1px solid var(--color-rule-soft);
}
.pub-list .pub-card:last-child { border-bottom: none; }
.pub-card__thumb {
  aspect-ratio: 4 / 3;
  overflow: hidden;
  border-radius: var(--radius);
  background: var(--color-bg-soft);
  border: 1px solid var(--color-rule);
}
.pub-card__thumb img {
  width: 100%; height: 100%; object-fit: cover;
}
.pub-card__thumb--ph {
  display: grid;
  place-items: center;
  background: linear-gradient(135deg, var(--color-bg-soft), color-mix(in srgb, var(--color-accent) 6%, var(--color-bg-soft)));
  color: var(--color-text-mute);
  text-align: center;
  font-family: var(--font-mono);
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.04em;
  line-height: 1.35;
  padding: 8px;
}
[data-theme="dark"] .pub-card__thumb--ph {
  background: linear-gradient(135deg, var(--color-bg-soft), color-mix(in srgb, var(--color-accent) 18%, var(--color-bg-soft)));
}
.pub-card__title {
  font-size: 18px;
  line-height: 1.35;
  font-weight: 600;
  letter-spacing: -0.01em;
  margin-bottom: 6px;
  color: var(--color-text);
}
.pub-card__title a { color: inherit; }
.pub-card__title a:hover { color: var(--color-accent); }
.pub-card__authors {
  font-size: 14.5px;
  color: var(--color-text-mute);
  line-height: 1.55;
}
.pub-card__authors b { font-weight: 600; color: var(--color-text); }
.pub-card__venue {
  margin-top: 6px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  font-size: 13.5px;
  color: var(--color-text-mute);
}
.pub-card__venue em { font-family: var(--font-serif); font-style: italic; color: var(--color-text); }
.pub-card__links {
  margin-top: 14px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

@media (max-width: 720px) {
  .pub-card { grid-template-columns: 1fr; gap: 14px; }
  .pub-card__thumb { aspect-ratio: 16 / 9; max-width: 100%; }
}

/* ---------- People grid ---------- */

.people-section { margin-bottom: 56px; }
.people-section h2 {
  font-size: clamp(22px, 2.4vw, 28px);
  margin-bottom: 24px;
  letter-spacing: -0.015em;
}
.people-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(170px, 1fr));
  gap: 28px 20px;
}
.person {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}
.person__photo {
  width: 100%;
  aspect-ratio: 1 / 1;
  border-radius: 14px;
  overflow: hidden;
  background: var(--color-bg-soft);
  border: 1px solid var(--color-rule);
  margin-bottom: 12px;
}
.person__photo img { width: 100%; height: 100%; object-fit: cover; transition: transform 400ms ease; }
.person:hover .person__photo img { transform: scale(1.04); }
.person__photo-link { display: block; width: 100%; height: 100%; }
.person__photo--initials {
  display: grid;
  place-items: center;
  background: linear-gradient(135deg, color-mix(in srgb, var(--color-accent) 8%, var(--color-bg-soft)), var(--color-bg-soft));
  color: var(--color-text-mute);
  font-size: 28px;
  font-weight: 500;
  letter-spacing: 0.01em;
}
[data-theme="dark"] .person__photo--initials {
  background: linear-gradient(135deg, color-mix(in srgb, var(--color-accent) 18%, var(--color-bg-soft)), var(--color-bg-soft));
}
.person__name { font-size: 15px; font-weight: 600; color: var(--color-text); line-height: 1.3; }
.person__role { font-size: 13px; color: var(--color-text-mute); margin-top: 2px; line-height: 1.4; }
.person__name a { color: inherit; }
.person__name a:hover { color: var(--color-accent); }

.person--compact .person__photo { display: none; }
.person--compact { padding: 8px 0; }

/* Alumni list */
.alumni-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 8px 36px;
  font-size: 14.5px;
  line-height: 1.5;
}
.alumni-list li {
  padding: 10px 0;
  border-top: 1px solid var(--color-rule-soft);
  color: var(--color-text-mute);
}
.alumni-list li strong {
  color: var(--color-text);
  font-weight: 600;
  display: block;
  margin-bottom: 2px;
}
.alumni-list li .alumni-meta {
  font-size: 13px;
  color: var(--color-text-soft);
}

/* ---------- Research overview ---------- */

.research-area {
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  gap: 56px;
  align-items: center;
  padding-block: clamp(56px, 9vw, 96px);
  border-top: 1px solid var(--color-rule);
}
.research-area:first-of-type { border-top: none; padding-top: 0; }
.research-area:nth-child(even) { direction: rtl; }
.research-area:nth-child(even) > * { direction: ltr; }
.research-area__media {
  border-radius: var(--radius-lg);
  overflow: hidden;
  border: 1px solid var(--color-rule);
  background: var(--color-bg-soft);
}
.research-area__media img,
.research-area__media video {
  width: 100%;
  height: auto;
  display: block;
  object-fit: cover;
}
.research-area__media--square { aspect-ratio: 5 / 4; }
.research-area__media--square img,
.research-area__media--square video { height: 100%; }
.research-area__eyebrow {
  font-size: 12px; letter-spacing: 0.14em; text-transform: uppercase; font-weight: 600;
  color: var(--color-accent);
  margin-bottom: 12px;
}
.research-area__title {
  font-size: clamp(26px, 3vw, 36px);
  letter-spacing: -0.02em;
  margin-bottom: 16px;
}
.research-area__desc {
  font-size: 16px;
  line-height: 1.65;
  color: var(--color-text-mute);
  margin-bottom: 20px;
}
.research-area__papers { display: flex; flex-direction: column; gap: 4px; }
.research-area__papers li { font-size: 14px; color: var(--color-text-mute); padding: 4px 0; }
.research-area__papers li a { color: var(--color-text); border-bottom: 1px solid transparent; }
.research-area__papers li a:hover { color: var(--color-accent); border-bottom-color: currentColor; }
.research-area__papers .pmeta { color: var(--color-text-soft); font-variant-numeric: tabular-nums; }

@media (max-width: 880px) {
  .research-area { grid-template-columns: 1fr; gap: 28px; }
  .research-area:nth-child(even) { direction: ltr; }
}

/* ---------- Teaching ---------- */

.course-list { display: flex; flex-direction: column; gap: 20px; max-width: 820px; }
.course {
  display: grid;
  grid-template-columns: 130px 1fr;
  gap: 24px;
  padding: 22px 24px;
  border: 1px solid var(--color-rule);
  border-radius: var(--radius);
  background: var(--color-bg);
  transition: border-color 150ms ease, box-shadow 150ms ease;
}
.course:hover { border-color: var(--color-text-soft); }
.course__code {
  font-family: var(--font-mono);
  font-size: 13px;
  font-weight: 600;
  color: var(--color-accent);
  letter-spacing: 0.02em;
  align-self: start;
}
.course__title { font-size: 17px; font-weight: 600; margin-bottom: 4px; letter-spacing: -0.01em; }
.course__inst { font-size: 13px; color: var(--color-text-soft); margin-bottom: 10px; }
.course__desc { font-size: 14.5px; color: var(--color-text-mute); line-height: 1.55; }

@media (max-width: 560px) {
  .course { grid-template-columns: 1fr; gap: 6px; padding: 18px 20px; }
}

/* ---------- Seminar ---------- */

.seminar-intro { max-width: 760px; }

/* Organizer card row */
.organizer-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 14px;
  padding: 0;
}
.organizer { list-style: none; }
.organizer a {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 12px 16px;
  border-radius: var(--radius);
  background: var(--color-bg);
  border: 1px solid var(--color-rule);
  color: var(--color-text);
  text-decoration: none;
  transition: border-color 150ms ease, transform 150ms ease, box-shadow 150ms ease;
}
.organizer a:hover {
  color: var(--color-text);
  border-color: var(--color-text-soft);
  transform: translateY(-1px);
  box-shadow: var(--shadow-card);
}
.organizer__photo {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  overflow: hidden;
  flex: none;
  background: var(--color-bg-soft);
  border: 1px solid var(--color-rule);
}
.organizer__photo img { width: 100%; height: 100%; object-fit: cover; display: block; }
.organizer__text {
  display: flex;
  flex-direction: column;
  min-width: 0;
}
.organizer__name {
  font-weight: 600;
  font-size: 14.5px;
  color: var(--color-text);
  line-height: 1.25;
}
.organizer__aff {
  display: block;
  font-size: 12.5px;
  color: var(--color-text-soft);
  font-weight: 400;
  margin-top: 2px;
}
@media (max-width: 480px) {
  .organizer-list { grid-template-columns: 1fr; gap: 10px; }
}

/* Sponsors row */
.sponsor-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 48px;
  padding: 8px 0 0;
}
.sponsor { list-style: none; }
.sponsor a {
  display: inline-block;
  opacity: 0.7;
  transition: opacity 150ms ease, transform 150ms ease;
}
.sponsor a:hover { opacity: 1; transform: translateY(-1px); }
.sponsor img {
  max-height: 56px;
  max-width: 200px;
  width: auto;
  height: auto;
  display: block;
  object-fit: contain;
}
[data-theme="dark"] .sponsor a { opacity: 0.85; }
[data-theme="dark"] .sponsor img {
  filter: brightness(1.2) invert(0.92) hue-rotate(180deg);
}
[data-theme="dark"] .sponsor a:hover { opacity: 1; }
@media (max-width: 640px) {
  .sponsor-row { gap: 32px; justify-content: center; }
  .sponsor img { max-height: 44px; max-width: 160px; }
}
.seminar-intro p { font-size: 16.5px; line-height: 1.7; color: var(--color-text-mute); margin-bottom: 14px; }
.seminar-intro p strong { color: var(--color-text); font-weight: 600; }

.seminar-schedule { margin-top: 12px; margin-bottom: 32px; }
.seminar-row {
  display: grid;
  grid-template-columns: 64px minmax(0, 1fr) auto;
  gap: 18px 22px;
  padding: 18px 0;
  border-top: 1px solid var(--color-rule-soft);
  font-size: 14.5px;
  align-items: center;
}
.seminar-row:first-child { border-top: 1px solid var(--color-rule); }
.seminar-row__photo {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  overflow: hidden;
  background: var(--color-bg-soft);
  border: 1px solid var(--color-rule);
  flex: none;
}
.seminar-row__photo img { width: 100%; height: 100%; object-fit: cover; display: block; }
.seminar-row__photo--initials { display: grid; place-items: center; color: var(--color-text-mute); font-size: 16px; font-weight: 500; }

/* Middle content column (date / name / aff / title) */
.seminar-row__body {
  min-width: 0;
  display: grid;
  grid-template-columns: 100px minmax(0, 1fr) minmax(0, 1fr);
  column-gap: 20px;
  row-gap: 4px;
  align-items: baseline;
}
.seminar-row__date { color: var(--color-text-soft); font-variant-numeric: tabular-nums; font-size: 13px; white-space: nowrap; }
.seminar-row__name { font-weight: 600; color: var(--color-text); min-width: 0; }
.seminar-row__aff { color: var(--color-text-mute); font-size: 13.5px; min-width: 0; }
.seminar-row__title {
  color: var(--color-text-mute);
  font-size: 13.5px;
  line-height: 1.4;
  grid-column: 2 / -1;
  margin-top: 2px;
}

/* Watch / no-recording button */
.seminar-row__video {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 7px 14px;
  border-radius: 999px;
  font-size: 12.5px;
  font-weight: 500;
  line-height: 1;
  border: 1px solid var(--color-rule);
  color: var(--color-text-mute);
  background: transparent;
  white-space: nowrap;
  flex: none;
  min-width: 78px;
  transition: background 150ms ease, color 150ms ease, border-color 150ms ease;
}
.seminar-row__video:hover { background: var(--color-accent); color: white; border-color: var(--color-accent); }
.seminar-row__video svg { width: 12px; height: 12px; flex: none; }
.seminar-row__video--placeholder { opacity: 0.5; pointer-events: none; font-size: 12px; }

@media (max-width: 980px) {
  .seminar-row__body { grid-template-columns: 90px minmax(0, 1fr); }
  .seminar-row__aff { grid-column: 2; }
}
@media (max-width: 640px) {
  .seminar-row {
    grid-template-columns: 48px minmax(0, 1fr);
    grid-template-areas:
      "photo body"
      "video video";
    gap: 10px 14px;
    padding: 16px 0;
    align-items: start;
  }
  .seminar-row__photo { grid-area: photo; width: 48px; height: 48px; }
  .seminar-row__body {
    grid-area: body;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 3px;
  }
  .seminar-row__date { font-size: 12px; order: 1; }
  .seminar-row__name { order: 2; }
  .seminar-row__aff { font-size: 12.5px; order: 3; }
  .seminar-row__title { font-size: 13px; order: 4; margin-top: 4px; }
  .seminar-row__video {
    grid-area: video;
    justify-self: start;
    margin-top: 10px;
    margin-left: 62px;  /* align with body, past the 48px photo + 14px gap */
  }
}

/* ---------- Contact ---------- */

.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 56px;
}
.contact-card h3 {
  font-size: 14px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--color-text-soft);
  margin-bottom: 14px;
  font-weight: 600;
}
.contact-card p, .contact-card li { font-size: 16px; color: var(--color-text-mute); line-height: 1.65; }
.contact-card li { padding: 6px 0; }
.contact-card li strong { color: var(--color-text); font-weight: 600; }
.contact-card li a { color: var(--color-accent); }
.contact-note { margin-top: 56px; max-width: 720px; }
.contact-note p { color: var(--color-text-mute); font-size: 15.5px; line-height: 1.7; }

@media (max-width: 720px) {
  .contact-grid { grid-template-columns: 1fr; gap: 36px; }
}

.contact-section {
  max-width: 820px;
  margin: 0 auto 56px;
  padding-block: 8px;
}
.contact-section:last-child { margin-bottom: 0; }
.contact-section__title {
  font-size: clamp(22px, 2.4vw, 28px);
  letter-spacing: -0.015em;
  margin-bottom: 18px;
}
.contact-section p {
  color: var(--color-text-mute);
  font-size: 16px;
  line-height: 1.7;
  margin-bottom: 14px;
}
.contact-section p strong { color: var(--color-text); font-weight: 600; }

.contact-areas {
  display: grid;
  grid-template-columns: 200px 1fr;
  gap: 14px 28px;
  margin: 24px 0;
}
.contact-areas > div { display: contents; }
.contact-areas dt {
  font-weight: 600;
  color: var(--color-text);
  font-size: 14.5px;
  padding-top: 2px;
}
.contact-areas dd {
  margin: 0;
  color: var(--color-text-mute);
  font-size: 14.5px;
  line-height: 1.6;
  border-left: 2px solid var(--color-rule);
  padding-left: 18px;
}

@media (max-width: 720px) {
  .contact-areas { grid-template-columns: 1fr; gap: 4px 0; }
  .contact-areas dt { padding-top: 14px; }
  .contact-areas dd { border-left: none; padding-left: 0; padding-bottom: 8px; }
}

/* ---------- Footer ---------- */

.site-footer {
  margin-top: var(--pad-section);
  border-top: 1px solid var(--color-rule);
  padding: 48px 0;
  color: var(--color-text-soft);
  font-size: 13.5px;
}
.site-footer__inner {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 16px;
}
.site-footer a { color: var(--color-text-mute); }
.site-footer a:hover { color: var(--color-text); }

/* ---------- Utilities ---------- */

.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0;
}
:focus-visible { outline: 2px solid var(--color-accent); outline-offset: 2px; border-radius: 4px; }
[data-theme="dark"] :focus-visible { outline-offset: 3px; }

/* ---------- Reduced motion ---------- */

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; scroll-behavior: auto !important; }
}
