/* ==========================================================================
   MLL — Machine Learning Laboratory, Sharif University of Technology
   Design system: navy + academic gold, Source Serif 4 headings, Inter body.
   ========================================================================== */

@font-face {
  font-family: "Inter";
  src: url("../fonts/inter-latin-wght.260c81a4759b.woff2") format("woff2");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Source Serif 4";
  src: url("../fonts/source-serif-latin-wght.fb34450b3254.woff2") format("woff2");
  font-weight: 200 900;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Source Serif 4";
  src: url("../fonts/source-serif-latin-wght-italic.9be147cef3b5.woff2") format("woff2");
  font-weight: 200 900;
  font-style: italic;
  font-display: swap;
}

:root {
  --navy-950: #071a30;
  --navy-900: #0b2340;
  --navy-800: #0f2c4f;
  --navy-700: #163c69;
  --navy-600: #1f5296;
  --navy-500: #2a66b8;
  --navy-100: #e4ecf7;
  --navy-50: #f2f6fb;

  --gold-600: #b9811f;
  --gold-500: #d6992e;
  --gold-400: #e0a43a;
  --gold-100: #fbf0db;

  --ink: #17202c;
  --ink-2: #3a4655;
  --muted: #627082;
  --line: #e1e6ee;
  --line-strong: #cdd5e0;
  --surface: #ffffff;
  --surface-2: #f6f8fb;

  --green: #1f7a4d;
  --green-bg: #e3f4ea;
  --red: #b42318;
  --red-bg: #fde8e6;
  --purple: #6941c6;
  --purple-bg: #efe9fd;

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

  --radius-sm: 6px;
  --radius: 10px;
  --radius-lg: 16px;
  --shadow-sm: 0 1px 2px rgba(15, 44, 79, .06);
  --shadow: 0 1px 3px rgba(15, 44, 79, .06), 0 6px 18px rgba(15, 44, 79, .06);
  --shadow-lg: 0 4px 10px rgba(15, 44, 79, .06), 0 18px 40px rgba(15, 44, 79, .10);

  --container: 1200px;
  --gutter: clamp(16px, 4vw, 32px);
  --header-h: 72px;
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: calc(var(--header-h) + 16px); }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } * { transition: none !important; } }
body {
  margin: 0;
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.6;
  color: var(--ink);
  background: var(--surface);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--navy-600); text-decoration: none; }
a:hover { color: var(--navy-800); text-decoration: underline; text-underline-offset: 3px; }
:focus-visible { outline: 3px solid var(--gold-400); outline-offset: 2px; border-radius: 3px; }
h1, h2, h3, h4, h5 { font-family: var(--font-serif); color: var(--navy-900); line-height: 1.25; margin: 0 0 .5em; font-weight: 600; letter-spacing: -.01em; }
p { margin: 0 0 1em; }
hr.divider { border: 0; border-top: 1px solid var(--line); margin: 48px 0 32px; }
.h3 { font-size: 1.45rem; margin-top: 2rem; }
.h4 { font-size: 1.2rem; margin-top: 1.6rem; }
.h5 { font-family: var(--font-sans); font-size: .78rem; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); margin: 1.4rem 0 .6rem; font-weight: 600; }
.muted { color: var(--muted); }
.small { font-size: .85em; }
.lead { font-size: 1.15rem; color: var(--ink-2); }
.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; }
.skip-link { position: absolute; left: -9999px; top: 8px; z-index: 100; background: var(--navy-800); color: #fff; padding: 8px 14px; border-radius: var(--radius-sm); }
.skip-link:focus { left: 8px; }
.icon { flex-shrink: 0; vertical-align: -0.18em; }
.empty { color: var(--muted); font-style: italic; padding: 12px 0; }

.container { width: 100%; max-width: var(--container); margin: 0 auto; padding: 0 var(--gutter); }
.container--narrow { max-width: 860px; }

/* ---------- Top bar & header ---------- */
.topbar { background: var(--navy-950); color: #b9c8dc; font-size: .8rem; }
.topbar__inner { display: flex; justify-content: space-between; gap: 16px; padding-top: 6px; padding-bottom: 6px; }
.topbar a { color: #dbe5f2; }
.topbar__links a { display: inline-flex; align-items: center; gap: 6px; }
@media (max-width: 640px) { .topbar { display: none; } }

.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(255, 255, 255, .94);
  backdrop-filter: saturate(160%) blur(10px);
  border-bottom: 1px solid var(--line);
  transition: box-shadow .2s;
}
.site-header.is-scrolled { box-shadow: var(--shadow); }
.site-header__inner { display: flex; align-items: center; justify-content: space-between; height: var(--header-h); gap: 24px; }

.brand { display: flex; align-items: center; gap: 12px; color: var(--navy-900); min-width: 0; }
.brand:hover { text-decoration: none; color: var(--navy-900); }
.brand__mark svg, .brand__logo { width: 42px; height: 42px; border-radius: 9px; }
.brand__text { display: flex; flex-direction: column; line-height: 1.15; min-width: 0; }
.brand__short { font-family: var(--font-serif); font-weight: 700; font-size: 1.35rem; letter-spacing: .02em; }
.brand__name { font-size: .78rem; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.site-nav ul { display: flex; gap: 2px; list-style: none; margin: 0; padding: 0; }
.site-nav a {
  display: block; padding: 8px 12px; border-radius: var(--radius-sm);
  color: var(--ink-2); font-weight: 500; font-size: .93rem; position: relative;
}
.site-nav a:hover { background: var(--navy-50); color: var(--navy-800); text-decoration: none; }
.site-nav a.is-active { color: var(--navy-800); }
.site-nav a.is-active::after {
  content: ""; position: absolute; left: 12px; right: 12px; bottom: -15px; height: 3px;
  background: var(--gold-400); border-radius: 3px 3px 0 0;
}
.nav-toggle { display: none; background: none; border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 6px; color: var(--navy-800); cursor: pointer; }
.nav-toggle__close { display: none; }

@media (max-width: 1080px) {
  .nav-toggle { display: inline-flex; }
  .site-nav {
    position: fixed; inset: calc(var(--header-h) + 0px) 0 auto 0; background: #fff;
    border-bottom: 1px solid var(--line); box-shadow: var(--shadow-lg);
    max-height: calc(100vh - var(--header-h)); overflow-y: auto;
    transform: translateY(-8px); opacity: 0; visibility: hidden; transition: all .18s ease;
  }
  .site-nav ul { flex-direction: column; padding: 8px var(--gutter) 16px; }
  .site-nav a { padding: 12px; font-size: 1rem; }
  .site-nav a.is-active { background: var(--navy-50); }
  .site-nav a.is-active::after { display: none; }
  body.nav-open .site-nav { transform: none; opacity: 1; visibility: visible; }
  body.nav-open .nav-toggle__open { display: none; }
  body.nav-open .nav-toggle__close { display: inline; }
}

/* ---------- Buttons, chips, tags ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 10px 18px; border-radius: var(--radius-sm); border: 1px solid transparent;
  font: 600 .93rem/1.2 var(--font-sans); cursor: pointer; transition: all .15s; white-space: nowrap;
}
.btn:hover { text-decoration: none; transform: translateY(-1px); }
.btn--primary { background: var(--navy-800); color: #fff; }
.btn--primary:hover { background: var(--navy-700); color: #fff; }
.btn--accent { background: var(--gold-400); color: var(--navy-950); }
.btn--accent:hover { background: var(--gold-500); color: var(--navy-950); }
.btn--outline { border-color: var(--line-strong); color: var(--navy-800); background: #fff; }
.btn--outline:hover { border-color: var(--navy-600); color: var(--navy-800); }
.btn--light { background: #fff; color: var(--navy-900); }
.btn--light:hover { background: var(--navy-50); color: var(--navy-900); }
.btn--ghost-light { border-color: rgba(255, 255, 255, .35); color: #fff; }
.btn--ghost-light:hover { background: rgba(255, 255, 255, .1); border-color: rgba(255, 255, 255, .6); color: #fff; }
.btn--sm { padding: 7px 12px; font-size: .85rem; }
.btn--block { width: 100%; margin-top: 10px; }
.stack-buttons { display: flex; flex-direction: column; gap: 8px; margin-top: 16px; }

.chip {
  display: inline-flex; align-items: center; gap: 5px; padding: 3px 9px;
  border: 1px solid var(--line-strong); border-radius: 999px; background: #fff;
  font: 500 .78rem/1.5 var(--font-sans); color: var(--ink-2); cursor: pointer; white-space: nowrap;
}
.chip:hover { border-color: var(--navy-600); color: var(--navy-700); text-decoration: none; background: var(--navy-50); }
.chip[aria-expanded="true"] { background: var(--navy-800); border-color: var(--navy-800); color: #fff; }
.chip--slides { border-color: #bcd0ea; color: var(--navy-700); background: var(--navy-50); }
.chip--video { border-color: #f0d9ac; color: #8a5a0b; background: var(--gold-100); }

.tag {
  display: inline-flex; align-items: center; gap: 4px; padding: 2px 8px; border-radius: 4px;
  font: 600 .7rem/1.6 var(--font-sans); letter-spacing: .04em; text-transform: uppercase;
  background: var(--navy-50); color: var(--navy-700); vertical-align: middle;
}
.tags { display: flex; flex-wrap: wrap; gap: 6px; list-style: none; padding: 0; margin: 8px 0; }
.tags .tag { text-transform: none; letter-spacing: 0; font-weight: 500; font-size: .78rem; }
.tag--paper, .tag--active, .tag--open, .tag--upcoming { background: var(--green-bg); color: var(--green); }
.tag--award, .tag--pinned, .tag--project, .tag--invited { background: var(--gold-100); color: #8a5a0b; }
.tag--event, .tag--reading, .tag--quiz, .tag--tutorial { background: var(--purple-bg); color: var(--purple); }
.tag--exam, .tag--midterm, .tag--final, .tag--defense { background: var(--red-bg); color: var(--red); }
.tag--completed, .tag--holiday { background: #eef0f3; color: var(--muted); }

.badge { display: inline-block; padding: 2px 10px; border-radius: 999px; font: 600 .74rem/1.7 var(--font-sans); }
.badge--venue { background: var(--navy-800); color: #fff; }
.badge--note { background: var(--gold-100); color: #8a5a0b; display: inline-flex; align-items: center; gap: 4px; }
.badge--light { background: rgba(255, 255, 255, .14); color: #fff; border: 1px solid rgba(255, 255, 255, .22); }

.pill {
  display: inline-block; padding: 6px 14px; border-radius: 999px; border: 1px solid var(--line-strong);
  background: #fff; color: var(--ink-2); font: 500 .85rem/1.3 var(--font-sans); cursor: pointer;
}
.pill:hover { border-color: var(--navy-600); color: var(--navy-800); text-decoration: none; }
.pill.is-active { background: var(--navy-800); border-color: var(--navy-800); color: #fff; }
.pill-group, .filter-bar { display: flex; flex-wrap: wrap; gap: 8px; }
.filter-bar { margin-bottom: 28px; }

.link-arrow { display: inline-flex; align-items: center; gap: 6px; font-weight: 600; font-size: .92rem; }
.link-arrow .icon { transition: transform .15s; }
.link-arrow:hover .icon { transform: translateX(3px); }
.count { display: inline-block; min-width: 26px; padding: 0 8px; border-radius: 999px; background: var(--navy-50); color: var(--navy-700); font: 600 .75rem/1.7 var(--font-sans); text-align: center; vertical-align: middle; }

.alert { display: flex; align-items: center; gap: 10px; margin: 20px 0 0; padding: 12px 16px; border-radius: var(--radius-sm); background: var(--green-bg); color: var(--green); font-weight: 500; }
.alert--error { background: var(--red-bg); color: var(--red); }

/* ---------- Avatars ---------- */
.avatar { border-radius: 50%; object-fit: cover; background: var(--navy-100); flex-shrink: 0; }
.avatar--initials { display: inline-grid; place-items: center; color: var(--navy-700); font-family: var(--font-serif); font-weight: 600; background: linear-gradient(135deg, var(--navy-100), #d5e1f1); }
.avatar--sm { width: 36px; height: 36px; font-size: .8rem; }
.avatar--md { width: 64px; height: 64px; font-size: 1.2rem; }
.avatar--lg { width: 112px; height: 112px; font-size: 1.8rem; }
.avatar--xl { width: 140px; height: 140px; font-size: 2.2rem; }
.avatar--profile { width: 168px; height: 168px; font-size: 2.6rem; border: 5px solid #fff; box-shadow: var(--shadow-lg); }

/* ---------- Sections & headers ---------- */
.section { padding: clamp(48px, 7vw, 88px) 0; }
.section--tight { padding: clamp(32px, 5vw, 56px) 0 clamp(48px, 7vw, 80px); }
.section--tinted { background: var(--surface-2); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.section-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; margin-bottom: 28px; flex-wrap: wrap; }
.section-head--spaced { margin-top: 64px; }
.section-title { font-size: clamp(1.6rem, 3vw, 2.1rem); margin: 0; }
.section-title a { color: inherit; }
.section-subtitle { display: flex; align-items: center; gap: 10px; font-size: 1.35rem; margin: 40px 0 18px; padding-bottom: 10px; border-bottom: 1px solid var(--line); }
.section-subtitle .icon { color: var(--gold-500); }
.section-note { font-size: .9rem; margin-top: -8px; }
.eyebrow { font: 600 .74rem/1.4 var(--font-sans); letter-spacing: .14em; text-transform: uppercase; color: var(--gold-600); margin: 0 0 8px; }

.page-header { background: linear-gradient(180deg, var(--navy-50), #fff); border-bottom: 1px solid var(--line); padding: 36px 0 32px; }
.page-header__title { font-size: clamp(1.9rem, 4vw, 2.7rem); margin: 6px 0 8px; }
.page-header__lead { font-size: 1.1rem; color: var(--ink-2); max-width: 760px; margin: 0; }
.page-header__meta { display: flex; align-items: center; gap: 8px; color: var(--muted); margin: 0; }

.breadcrumbs { display: flex; flex-wrap: wrap; gap: 8px; font-size: .84rem; color: var(--muted); margin-bottom: 10px; }
.breadcrumbs a { color: var(--muted); }
.breadcrumbs a:hover { color: var(--navy-700); }
.breadcrumbs--light, .breadcrumbs--light a { color: rgba(255, 255, 255, .7); }
.breadcrumbs--light a:hover { color: #fff; }

.grid { display: grid; gap: 22px; }
.grid--2 { grid-template-columns: repeat(auto-fill, minmax(min(280px, 100%), 1fr)); }
.grid--3 { grid-template-columns: repeat(auto-fill, minmax(min(300px, 100%), 1fr)); }
.split { display: grid; grid-template-columns: 1.6fr 1fr; gap: 56px; }
@media (max-width: 900px) { .split { grid-template-columns: 1fr; gap: 40px; } }

.layout-sidebar { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 48px; align-items: start; }
.layout-sidebar__aside { position: sticky; top: calc(var(--header-h) + 24px); }
.layout-sidebar__main > .h3:first-child { margin-top: 0; }
@media (max-width: 900px) {
  .layout-sidebar { grid-template-columns: minmax(0, 1fr); }
  .layout-sidebar__aside { position: static; order: -1; }
}

.info-card { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; box-shadow: var(--shadow-sm); }
.info-card .h4:first-child, .info-card .h5:first-child { margin-top: 0; }
.info-list { margin: 0; display: grid; gap: 14px; }
.info-list dt { display: flex; align-items: center; gap: 6px; font-size: .74rem; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.info-list dd { margin: 3px 0 0; }

.link-list { list-style: none; padding: 0; margin: 0 0 1em; }
.link-list li { padding: 10px 0; border-bottom: 1px solid var(--line); }
.link-list--compact li { padding: 6px 0; }
.member-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 4px; }
.member-list a { display: flex; align-items: center; gap: 12px; padding: 6px; border-radius: var(--radius-sm); color: var(--ink); }
.member-list a:hover { background: var(--navy-50); text-decoration: none; }
.member-list strong { display: block; font-weight: 600; font-size: .93rem; }
.member-list small { display: block; color: var(--muted); }

.feature-image { border-radius: var(--radius); margin-bottom: 28px; width: 100%; box-shadow: var(--shadow); }
.video-embed { position: relative; aspect-ratio: 16 / 9; border-radius: var(--radius); overflow: hidden; background: #000; margin-bottom: 28px; }
.video-embed iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }

/* ---------- Prose (rendered markdown) ---------- */
.prose { color: var(--ink-2); line-height: 1.75; }
.prose > :first-child { margin-top: 0; }
.prose > :last-child { margin-bottom: 0; }
.prose h1, .prose h2 { font-size: 1.5rem; margin-top: 2rem; }
.prose h3 { font-size: 1.22rem; margin-top: 1.6rem; }
.prose h4 { font-size: 1.05rem; margin-top: 1.4rem; }
.prose ul, .prose ol { padding-left: 1.4em; margin: 0 0 1em; }
.prose li { margin: .25em 0; }
.prose li::marker { color: var(--gold-500); }
.prose blockquote { margin: 1.4em 0; padding: 4px 0 4px 18px; border-left: 3px solid var(--gold-400); color: var(--ink-2); font-family: var(--font-serif); font-style: italic; font-size: 1.08em; }
.prose code { font-family: var(--font-mono); font-size: .88em; background: var(--surface-2); border: 1px solid var(--line); padding: 1px 5px; border-radius: 4px; }
.prose pre { background: var(--navy-950); color: #e6edf6; padding: 16px 18px; border-radius: var(--radius-sm); overflow-x: auto; font-size: .86rem; }
.prose pre code { background: none; border: 0; padding: 0; color: inherit; }
.prose table { width: 100%; border-collapse: collapse; margin: 1em 0 1.4em; font-size: .94rem; display: block; overflow-x: auto; }
.prose th, .prose td { border: 1px solid var(--line); padding: 8px 12px; text-align: left; }
.prose th { background: var(--surface-2); color: var(--navy-900); font-weight: 600; }
.prose img { border-radius: var(--radius-sm); margin: 1em 0; }
.prose hr { border: 0; border-top: 1px solid var(--line); margin: 2em 0; }
.prose .arithmatex { overflow-x: auto; overflow-y: hidden; }
.prose--lead { font-size: 1.12rem; }
.prose--narrow { max-width: 820px; }

/* ---------- Hero (home) ---------- */
.hero {
  position: relative; overflow: hidden; color: #fff;
  background:
    radial-gradient(1200px 500px at 85% -10%, rgba(42, 102, 184, .55), transparent 60%),
    radial-gradient(800px 400px at 0% 110%, rgba(224, 164, 58, .14), transparent 60%),
    linear-gradient(160deg, var(--navy-900), var(--navy-950));
  padding: clamp(64px, 10vw, 120px) 0 0;
}
.hero::before {
  content: ""; position: absolute; inset: 0; background-image: var(--hero-image, none);
  background-size: cover; background-position: center; opacity: .18; mix-blend-mode: luminosity;
}
.hero__pattern { position: absolute; top: 0; right: -4%; width: 58%; height: 100%; opacity: .75; pointer-events: none; mask-image: linear-gradient(90deg, transparent, #000 35%); -webkit-mask-image: linear-gradient(90deg, transparent, #000 35%); }
.hero__pattern svg { width: 100%; height: 100%; }
.hero__pattern .hot { fill: var(--gold-400); }
.hero__inner { position: relative; max-width: var(--container); }
.hero__eyebrow { font: 600 .8rem/1.4 var(--font-sans); letter-spacing: .14em; text-transform: uppercase; color: var(--gold-400); margin-bottom: 18px; }
.hero__title { font-size: clamp(2.3rem, 6vw, 4rem); color: #fff; max-width: 820px; margin-bottom: 18px; line-height: 1.08; font-weight: 600; }
.hero__abbr { color: #9fbde3; font-weight: 400; }
.hero__tagline { font-size: clamp(1.05rem, 2vw, 1.3rem); color: #cad8ea; max-width: 640px; margin-bottom: 32px; }
.hero__actions { display: flex; flex-wrap: wrap; gap: 12px; }
.hero__stats {
  position: relative; display: grid; grid-template-columns: repeat(4, 1fr); margin: clamp(48px, 7vw, 80px) 0 0;
  border-top: 1px solid rgba(255, 255, 255, .14);
}
.hero__stats > div { padding: 22px 0; }
.hero__stats > div + div { padding-left: 24px; border-left: 1px solid rgba(255, 255, 255, .1); }
.hero__stats dt { font-size: .78rem; letter-spacing: .1em; text-transform: uppercase; color: #9fb4cf; }
.hero__stats dd { margin: 2px 0 0; font-family: var(--font-serif); font-size: 2rem; font-weight: 600; color: #fff; }
@media (max-width: 720px) {
  .hero__pattern { width: 100%; opacity: .3; }
  .hero__stats { grid-template-columns: repeat(2, 1fr); }
  .hero__stats > div:nth-child(3) { padding-left: 0; border-left: 0; }
  .hero__stats > div:nth-child(n+3) { border-top: 1px solid rgba(255, 255, 255, .1); }
}

/* ---------- Intro / PI ---------- */
.intro { display: grid; grid-template-columns: 1.5fr 1fr; gap: 64px; align-items: center; }
.intro .prose { font-size: 1.08rem; margin: 18px 0 22px; }
.pi-card { text-align: center; background: var(--surface-2); border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 36px 28px; }
.pi-card .avatar { margin: 0 auto 18px; border: 4px solid #fff; box-shadow: var(--shadow); }
.pi-card__name { font-size: 1.4rem; margin: 0 0 4px; }
.pi-card__name a { color: inherit; }
.pi-card__title { color: var(--muted); margin-bottom: 10px; }
.pi-card__bio { font-size: .92rem; color: var(--ink-2); }
.pi-card__links, .person-card__links, .profile-links { display: flex; flex-wrap: wrap; gap: 8px 16px; justify-content: center; font-size: .88rem; }
.pi-card__links a, .person-card__links a, .profile-links a { display: inline-flex; align-items: center; gap: 6px; color: var(--ink-2); }
.pi-card__links a:hover, .person-card__links a:hover, .profile-links a:hover { color: var(--navy-600); }
@media (max-width: 900px) { .intro { grid-template-columns: 1fr; gap: 40px; } }

/* ---------- Cards ---------- */
.area-card {
  position: relative; display: flex; flex-direction: column; background: #fff; border: 1px solid var(--line);
  border-radius: var(--radius); padding: 26px; color: var(--ink); transition: all .18s; overflow: hidden;
}
.area-card::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 3px; background: var(--gold-400); transform: scaleY(0); transition: transform .2s; transform-origin: top; }
.area-card:hover { text-decoration: none; color: var(--ink); border-color: var(--line-strong); box-shadow: var(--shadow-lg); transform: translateY(-2px); }
.area-card:hover::before { transform: scaleY(1); }
.area-card__img { margin: -26px -26px 20px; width: calc(100% + 52px); max-width: none; aspect-ratio: 16/8; object-fit: cover; }
.area-card__index { font-family: var(--font-serif); font-size: .95rem; color: var(--gold-600); font-weight: 600; }
.area-card__title { font-size: 1.25rem; margin: 8px 0 8px; }
.area-card__summary { color: var(--muted); font-size: .94rem; flex: 1; }
.area-card__more { display: inline-flex; align-items: center; gap: 6px; font-weight: 600; font-size: .88rem; color: var(--navy-600); }

.area-rows { display: grid; gap: 18px; }
.area-row { display: grid; grid-template-columns: 96px 1fr; gap: 28px; align-items: start; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 26px; }
.area-row__index { font-family: var(--font-serif); font-size: 2.6rem; font-weight: 600; color: var(--navy-100); -webkit-text-stroke: 1px var(--navy-500); line-height: 1; }
.area-row__img { width: 96px; height: 96px; object-fit: cover; border-radius: var(--radius-sm); }
.area-row__title { font-size: 1.35rem; margin-bottom: 6px; }
.area-row__title a { color: inherit; }
.area-row p { color: var(--ink-2); }
@media (max-width: 600px) { .area-row { grid-template-columns: 1fr; gap: 12px; } }

.project-card { position: relative; display: flex; flex-direction: column; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; transition: all .18s; }
.project-card:hover { box-shadow: var(--shadow-lg); transform: translateY(-2px); }
.project-card__img { aspect-ratio: 16/9; width: 100%; object-fit: cover; }
.project-card__img--placeholder { display: grid; place-items: center; background: linear-gradient(135deg, var(--navy-50), var(--navy-100)); color: var(--navy-500); }
.project-card__body { padding: 20px 22px 24px; }
.project-card__meta { display: flex; align-items: center; gap: 10px; font-size: .84rem; margin-bottom: 10px; }
.project-card__title { font-size: 1.18rem; margin-bottom: 8px; }
.project-card__title a { color: inherit; }
.project-card__summary { color: var(--muted); font-size: .93rem; margin: 0; }
.stretched::after { content: ""; position: absolute; inset: 0; }

.course-card {
  position: relative; display: flex; flex-direction: column; background: #fff; border: 1px solid var(--line);
  border-top: 3px solid var(--navy-700); border-radius: var(--radius); padding: 22px 24px; transition: all .18s;
}
.course-card:hover { box-shadow: var(--shadow-lg); transform: translateY(-2px); border-top-color: var(--gold-400); }
.course-card__top { display: flex; justify-content: space-between; gap: 8px; font-size: .78rem; margin-bottom: 10px; }
.course-card__code { font-family: var(--font-mono); color: var(--navy-600); font-weight: 600; }
.course-card__level { color: var(--muted); }
.course-card__title { font-size: 1.3rem; margin-bottom: 8px; }
.course-card__title a { color: var(--navy-900); }
.course-card__title a:hover { text-decoration: none; }
.course-card__desc { color: var(--muted); font-size: .93rem; }
.course-card__meta { display: grid; gap: 4px; margin-top: auto; padding-top: 8px; font-size: .86rem; color: var(--ink-2); }
.course-card__meta span { display: flex; align-items: center; gap: 7px; }
.course-card__meta .icon { color: var(--muted); }
.course-card__arrow { position: absolute; right: 20px; bottom: 20px; color: var(--navy-500); opacity: 0; transform: translateX(-6px); transition: all .18s; }
.course-card:hover .course-card__arrow { opacity: 1; transform: none; }

/* ---------- News & seminars ---------- */
.news-list { display: grid; }
.news-item { display: grid; grid-template-columns: 76px 1fr; gap: 20px; padding: 20px 0; border-bottom: 1px solid var(--line); }
.news-item:first-child { padding-top: 0; }
.news-item__date { display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; height: 76px; border: 1px solid var(--line); border-radius: var(--radius-sm); background: var(--surface-2); }
.news-item__day { font-family: var(--font-serif); font-size: 1.6rem; font-weight: 600; color: var(--navy-800); line-height: 1; }
.news-item__month { font-size: .72rem; color: var(--muted); text-transform: uppercase; letter-spacing: .05em; margin-top: 4px; }
.news-item__title { font-size: 1.12rem; margin: 6px 0 4px; }
.news-item__title a { color: var(--navy-900); }
.news-item__summary { color: var(--ink-2); font-size: .94rem; }
.news-item__summary p { margin: 0; }

.seminar-list { display: grid; gap: 14px; margin-bottom: 18px; }
.seminar-item { display: grid; grid-template-columns: 64px 1fr; gap: 18px; padding: 16px; border: 1px solid var(--line); border-radius: var(--radius); background: #fff; }
.seminar-item.is-upcoming { border-left: 3px solid var(--gold-400); }
.date-block { display: flex; flex-direction: column; align-items: center; justify-content: center; border-radius: var(--radius-sm); background: var(--navy-800); color: #fff; height: 72px; line-height: 1.1; }
.date-block__month { font-size: .7rem; text-transform: uppercase; letter-spacing: .1em; color: var(--gold-400); font-weight: 600; }
.date-block__day { font-family: var(--font-serif); font-size: 1.6rem; font-weight: 600; }
.date-block__year { font-size: .66rem; color: #a9bbd3; }
.seminar-item__title { font-size: 1.05rem; margin: 6px 0 4px; }
.seminar-item__title a { color: var(--navy-900); }
.seminar-item__speaker { display: flex; align-items: center; gap: 6px; font-size: .9rem; margin: 0 0 6px; color: var(--ink-2); flex-wrap: wrap; }
.seminar-item__meta { display: flex; flex-wrap: wrap; gap: 4px 14px; font-size: .83rem; color: var(--muted); margin: 0; }
.seminar-item__meta > * { display: inline-flex; align-items: center; gap: 5px; }
.seminar-list--compact .seminar-item { padding: 14px; }
.speaker { display: flex; align-items: center; gap: 14px; margin-bottom: 18px; padding-bottom: 18px; border-bottom: 1px solid var(--line); }
.speaker__name { font-weight: 600; margin: 0; font-size: 1.05rem; }
.speaker p { margin: 0; }

/* ---------- Publications ---------- */
.pub-list { list-style: none; margin: 0; padding: 0; }
.pub { display: flex; gap: 20px; padding: 20px 0; border-bottom: 1px solid var(--line); }
.pub:last-child { border-bottom: 0; }
.pub__thumb { width: 160px; aspect-ratio: 4/3; object-fit: cover; border-radius: var(--radius-sm); border: 1px solid var(--line); flex-shrink: 0; }
.pub__body { min-width: 0; flex: 1; }
.pub__badges { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 6px; }
.pub__title { font-family: var(--font-serif); font-size: 1.12rem; margin: 0 0 4px; line-height: 1.35; }
.pub__title a { color: var(--navy-900); }
.pub__title a:hover { color: var(--navy-600); }
.pub__authors { margin: 0; font-size: .93rem; color: var(--ink-2); }
.lab-author { font-weight: 600; color: var(--navy-800); }
.pub__summary { margin: 4px 0 0; font-size: .93rem; color: var(--ink-2); }
.pub__venue { margin: 2px 0 10px; font-size: .9rem; color: var(--muted); }
.pub__links { display: flex; flex-wrap: wrap; gap: 6px; }
.pub__panel { position: relative; margin-top: 12px; padding: 14px 16px; background: var(--surface-2); border: 1px solid var(--line); border-radius: var(--radius-sm); font-size: .92rem; color: var(--ink-2); }
.pub__panel p { margin: 0; }
.pub__panel--code pre { margin: 0; font-family: var(--font-mono); font-size: .8rem; white-space: pre-wrap; word-break: break-word; }
.copy-btn { position: absolute; top: 8px; right: 8px; display: inline-flex; align-items: center; gap: 4px; padding: 3px 8px; font: 500 .75rem var(--font-sans); background: #fff; border: 1px solid var(--line-strong); border-radius: 4px; cursor: pointer; color: var(--ink-2); }
.copy-btn:hover { border-color: var(--navy-600); }
.pub-list--cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(460px, 100%), 1fr)); gap: 18px; }
.pub-list--cards .pub { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; }
@media (max-width: 560px) {
  .pub-list--cards { grid-template-columns: 1fr; }
  .pub { flex-direction: column; }
  .pub__thumb { width: 100%; }
}

.pubs-layout { display: grid; grid-template-columns: 260px minmax(0, 1fr); gap: 48px; align-items: start; }
.pubs-filter { position: sticky; top: calc(var(--header-h) + 24px); display: grid; gap: 22px; }
.pubs-filter__heading { font: 600 .74rem/1.4 var(--font-sans); letter-spacing: .08em; text-transform: uppercase; color: var(--muted); margin: 0 0 8px; }
.pubs-filter select, .search input { width: 100%; }
.pubs-filter__count { font-size: .88rem; color: var(--muted); margin: 0; }
.pubs-filter__count span { font-weight: 700; color: var(--navy-800); }
.pub-year { margin-bottom: 18px; }
.pub-year__title { font-size: 1.6rem; color: var(--navy-800); padding-bottom: 8px; border-bottom: 2px solid var(--navy-800); display: flex; align-items: baseline; gap: 12px; }
@media (max-width: 900px) {
  .pubs-layout { grid-template-columns: minmax(0, 1fr); gap: 24px; }
  .pubs-filter { position: static; }
}

/* ---------- Forms ---------- */
input[type="text"], input[type="email"], input[type="search"], select, textarea {
  font: inherit; font-size: .95rem; color: var(--ink); background: #fff; border: 1px solid var(--line-strong);
  border-radius: var(--radius-sm); padding: 10px 12px; transition: border-color .15s, box-shadow .15s;
}
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--navy-500); box-shadow: 0 0 0 3px rgba(42, 102, 184, .15); }
.search { position: relative; display: block; }
.search .icon { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); color: var(--muted); }
.search input { padding-left: 38px; }
.form { display: grid; gap: 16px; }
.form__row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.field { display: grid; gap: 6px; }
.field__label { font-weight: 600; font-size: .88rem; color: var(--ink-2); }
.field input, .field textarea { width: 100%; }
.field__error { color: var(--red); font-size: .84rem; }
.hp { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }
.form .btn { justify-self: start; }
@media (max-width: 600px) { .form__row { grid-template-columns: 1fr; } }

.contact { display: grid; grid-template-columns: 1fr 1.3fr; gap: 48px; align-items: start; }
.contact__info { display: grid; gap: 20px; }
.contact__form { background: #fff; border: 1px solid var(--line); border-radius: var(--radius-lg); padding: clamp(22px, 4vw, 36px); box-shadow: var(--shadow); }
.contact__form .h3 { margin-top: 0; }
.map { border-radius: var(--radius); overflow: hidden; border: 1px solid var(--line); aspect-ratio: 4/3; }
.map iframe { width: 100%; height: 100%; border: 0; }
@media (max-width: 900px) { .contact { grid-template-columns: 1fr; } }

/* ---------- People ---------- */
.jump-nav { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 36px; padding-bottom: 20px; border-bottom: 1px solid var(--line); }
.jump-nav a { padding: 6px 14px; border-radius: 999px; background: var(--surface-2); border: 1px solid var(--line); font-size: .86rem; font-weight: 500; color: var(--ink-2); }
.jump-nav a:hover { background: var(--navy-800); color: #fff; text-decoration: none; border-color: var(--navy-800); }
.people-group { margin-bottom: 56px; }
.people-group__title { display: flex; align-items: center; gap: 12px; font-size: 1.6rem; padding-bottom: 12px; margin-bottom: 26px; border-bottom: 1px solid var(--line); }
.people-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(220px, 100%), 1fr)); gap: 28px 22px; }
.person-card { text-align: center; padding: 22px 16px; border-radius: var(--radius); transition: background .18s; }
.person-card:hover { background: var(--surface-2); }
.person-card__photo { display: inline-block; margin-bottom: 14px; }
.person-card__photo .avatar { transition: transform .2s; box-shadow: var(--shadow); }
.person-card:hover .avatar { transform: scale(1.04); }
.person-card__name { font-size: 1.08rem; margin: 0 0 2px; }
.person-card__name a { color: var(--navy-900); }
.person-card__title { color: var(--muted); font-size: .87rem; margin-bottom: 6px; }
.person-card__bio { font-size: .86rem; color: var(--ink-2); margin-bottom: 8px; }
.faculty-list { display: grid; gap: 24px; }
.faculty-card { display: grid; grid-template-columns: 140px 1fr; gap: 32px; align-items: center; padding: 28px; border: 1px solid var(--line); border-radius: var(--radius-lg); background: linear-gradient(135deg, #fff, var(--navy-50)); }
.faculty-card__name { font-size: 1.6rem; margin-bottom: 2px; }
.faculty-card__name a { color: var(--navy-900); }
.faculty-card__title { color: var(--gold-600); font-weight: 600; margin-bottom: 10px; }
.faculty-card .person-card__links { justify-content: flex-start; margin-top: 10px; }
@media (max-width: 600px) { .faculty-card { grid-template-columns: 1fr; text-align: center; } .faculty-card .avatar { margin: 0 auto; } .faculty-card .person-card__links, .faculty-card .tags { justify-content: center; } }

.profile-header { background: linear-gradient(180deg, var(--navy-50), #fff); border-bottom: 1px solid var(--line); padding: 32px 0 36px; }
.profile-header__inner { display: flex; align-items: center; gap: 36px; }
.profile-header__title { font-size: 1.1rem; color: var(--gold-600); font-weight: 600; margin: 0 0 6px; }
.profile-links { justify-content: flex-start; margin-top: 14px; }
@media (max-width: 640px) { .profile-header__inner { flex-direction: column; text-align: center; } .profile-links { justify-content: center; } }

/* ---------- Tables ---------- */
.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius); background: #fff; }
.table { width: 100%; border-collapse: collapse; font-size: .93rem; }
.table th { text-align: left; font: 600 .74rem/1.4 var(--font-sans); letter-spacing: .07em; text-transform: uppercase; color: var(--muted); background: var(--surface-2); padding: 12px 16px; border-bottom: 1px solid var(--line); white-space: nowrap; }
.table td { padding: 14px 16px; border-bottom: 1px solid var(--line); vertical-align: top; }
.table tbody tr:last-child td { border-bottom: 0; }
.table tbody tr:hover { background: #fafbfd; }
.cell-num { font-family: var(--font-serif); font-weight: 600; color: var(--navy-700); width: 44px; }
.cell-date { white-space: nowrap; color: var(--ink-2); }
.cell-date span { color: var(--muted); font-size: .8rem; }
.cell-date__fa { display: block; color: var(--muted); font-size: .75rem; line-height: 1.3; }
.cell-topic strong { color: var(--navy-900); font-weight: 600; }
.cell-topic .tag { margin-right: 6px; }
.cell-desc { color: var(--muted); font-size: .87rem; margin-top: 4px; }
.cell-desc p { margin: 0; }
.cell-desc ul { margin: 4px 0 0; padding-left: 1.2em; }
.cell-materials { min-width: 150px; }
.materials { display: flex; flex-wrap: wrap; gap: 6px; }
.cell-readings { font-size: .86rem; color: var(--ink-2); min-width: 160px; }
.cell-readings p { margin: 0 0 4px; }
.cell-readings ul { margin: 0; padding-left: 1.1em; }
.row--holiday td { background: repeating-linear-gradient(-45deg, #fafbfc, #fafbfc 8px, #f3f5f8 8px, #f3f5f8 16px); color: var(--muted); }
.row--holiday .cell-topic strong { color: var(--muted); font-weight: 500; }
.row--exam td, .row--midterm td, .row--final td { background: #fff8f7; }
.row--next td { background: var(--gold-100) !important; }
.row--next .cell-num { box-shadow: inset 3px 0 0 var(--gold-400); }

@media (max-width: 760px) {
  .table-wrap { border: 0; background: none; overflow: visible; }
  .table--responsive thead { display: none; }
  .table--responsive, .table--responsive tbody, .table--responsive tr, .table--responsive td { display: block; width: 100%; }
  .table--responsive tr { border: 1px solid var(--line); border-radius: var(--radius); margin-bottom: 12px; background: #fff; overflow: hidden; }
  .table--responsive td { padding: 8px 14px; border-bottom: 1px solid var(--line); }
  .table--responsive td::before { content: attr(data-label); display: block; font: 600 .68rem/1.8 var(--font-sans); letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
  .table--responsive td.cell-num::before, .table--responsive td.cell-date::before { display: inline; margin-right: 8px; }
  .table--responsive td:empty { display: none; }
  .cell-materials { min-width: 0; }
  .cell-num { width: auto; }
}

/* ---------- Course page ---------- */
.course-hero {
  position: relative; color: #fff; padding: 32px 0 40px; overflow: hidden;
  background:
    radial-gradient(900px 380px at 100% 0%, rgba(42, 102, 184, .5), transparent 60%),
    linear-gradient(150deg, var(--navy-800), var(--navy-950));
}
.course-hero::before { content: ""; position: absolute; inset: 0; background-image: var(--hero-image, none); background-size: cover; background-position: center; opacity: .16; }
.course-hero > .container { position: relative; }
.course-hero__badges { display: flex; flex-wrap: wrap; gap: 8px; margin: 14px 0 14px; }
.course-hero__title { color: #fff; font-size: clamp(2rem, 5vw, 3rem); margin-bottom: 8px; }
.course-hero__tagline { color: #cad8ea; font-size: 1.12rem; max-width: 760px; }
.course-hero__facts { display: flex; flex-wrap: wrap; gap: 10px 24px; color: #dbe5f2; font-size: .95rem; margin: 18px 0 24px; }
.course-hero__facts span { display: inline-flex; align-items: center; gap: 8px; }
.course-hero__facts .icon { color: var(--gold-400); }
.course-hero__facts a { color: #fff; text-decoration: underline; text-decoration-color: rgba(255, 255, 255, .35); text-underline-offset: 3px; }
.course-hero__actions { display: flex; flex-wrap: wrap; gap: 10px; }

.course-layout { display: grid; grid-template-columns: 230px minmax(0, 1fr); gap: 48px; padding-top: 40px; padding-bottom: 72px; align-items: start; }
.course-nav { position: sticky; top: calc(var(--header-h) + 24px); font-size: .92rem; }
.course-nav ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; }
.course-nav a { display: flex; align-items: center; gap: 10px; padding: 9px 12px; border-radius: var(--radius-sm); color: var(--ink-2); font-weight: 500; border-left: 2px solid transparent; }
.course-nav a .icon { color: var(--muted); }
.course-nav a:hover { background: var(--surface-2); text-decoration: none; color: var(--navy-800); }
.course-nav a.is-active { background: var(--navy-50); color: var(--navy-800); border-left-color: var(--gold-400); border-radius: 0 var(--radius-sm) var(--radius-sm) 0; }
.course-nav a.is-active .icon { color: var(--navy-600); }
.course-nav__other { margin-top: 24px; padding-top: 18px; border-top: 1px solid var(--line); }
.course-nav__label { font: 600 .72rem/1.4 var(--font-sans); letter-spacing: .08em; text-transform: uppercase; color: var(--muted); margin: 0 0 6px 12px; }
.course-nav__other a { padding: 5px 12px; font-size: .88rem; }
.course-section { padding-bottom: 40px; margin-bottom: 40px; border-bottom: 1px solid var(--line); }
.course-section:last-of-type { border-bottom: 0; }
.course-section__title { font-size: 1.7rem; margin-bottom: 20px; }
.updated-note { font-size: .84rem; }

.next-up { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 16px; padding: 14px 18px; border-radius: var(--radius); background: var(--gold-100); border: 1px solid #f0d9ac; margin-bottom: 32px; }
.next-up__label { display: inline-flex; align-items: center; gap: 6px; font: 700 .74rem/1 var(--font-sans); letter-spacing: .08em; text-transform: uppercase; color: #8a5a0b; }
.next-up__date { font-weight: 700; color: var(--navy-900); }
.next-up__title { color: var(--ink-2); }

.callout { margin-top: 24px; padding: 18px 20px; border-radius: var(--radius); background: var(--navy-50); border-left: 3px solid var(--navy-600); }
.callout__title { display: flex; align-items: center; gap: 8px; font-family: var(--font-sans); font-size: .95rem; margin-bottom: 6px; color: var(--navy-800); }

.announcements { display: grid; gap: 12px; margin-bottom: 16px; }
.announcement { padding: 16px 20px; border: 1px solid var(--line); border-radius: var(--radius); background: #fff; }
.announcement.is-pinned { border-color: #f0d9ac; background: #fffcf5; }
.announcement header { display: flex; align-items: center; gap: 10px; font-size: .82rem; color: var(--muted); }
.announcement__title { font-family: var(--font-sans); font-size: 1.02rem; margin: 6px 0 4px; color: var(--navy-900); }
.announcement .prose { font-size: .94rem; }

.staff-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(280px, 100%), 1fr)); gap: 14px; margin-bottom: 8px; }
.staff-grid--instructors { grid-template-columns: repeat(auto-fill, minmax(min(340px, 100%), 1fr)); }
.staff-grid--instructors .staff-card { background: var(--navy-50); border-color: #d4e0f0; }
.staff-card { display: flex; gap: 16px; padding: 16px; border: 1px solid var(--line); border-radius: var(--radius); background: #fff; align-items: flex-start; }
.staff-card__body { min-width: 0; }
.staff-card__name { font-size: 1.05rem; margin: 2px 0 2px; }
.staff-card__name a { color: var(--navy-900); }
.staff-card__role { font-size: .84rem; color: var(--gold-600); font-weight: 600; margin-bottom: 6px; }
.staff-card__email, .staff-card__oh { display: flex; align-items: center; gap: 6px; font-size: .84rem; margin: 2px 0 0; color: var(--ink-2); word-break: break-all; }
.staff-card__oh .icon, .staff-card__email .icon { color: var(--muted); }

.resource-groups { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(320px, 100%), 1fr)); gap: 8px 32px; }
.resource-group .h5 { margin-top: 0; }
.resource-list { list-style: none; padding: 0; margin: 0 0 20px; }
.resource-list li { padding: 8px 0 8px 18px; border-bottom: 1px solid var(--line); position: relative; font-size: .94rem; }
.resource-list li::before { content: ""; position: absolute; left: 2px; top: 17px; width: 6px; height: 6px; border-radius: 50%; background: var(--gold-400); }
.resource-list small { display: block; color: var(--muted); }

@media (max-width: 900px) {
  .course-layout { grid-template-columns: minmax(0, 1fr); gap: 0; padding-top: 0; }
  .course-nav { min-width: 0; }
  .course-nav { position: sticky; top: var(--header-h); z-index: 10; margin: 0 calc(-1 * var(--gutter)) 28px; padding: 8px var(--gutter); background: rgba(255,255,255,.96); border-bottom: 1px solid var(--line); backdrop-filter: blur(8px); }
  .course-nav ul { display: flex; overflow-x: auto; gap: 4px; scrollbar-width: none; }
  .course-nav ul::-webkit-scrollbar { display: none; }
  .course-nav a { white-space: nowrap; padding: 7px 12px; border-left: 0; border-radius: 999px; }
  .course-nav a.is-active { border-radius: 999px; background: var(--navy-800); color: #fff; }
  .course-nav a.is-active .icon { color: var(--gold-400); }
  .course-nav__other { display: none; }
  .staff-grid--instructors { grid-template-columns: 1fr; }
}

/* ---------- Courses index ---------- */
.semester-archive { display: grid; gap: 10px; }
.semester-block { border: 1px solid var(--line); border-radius: var(--radius); background: #fff; }
.semester-block summary { display: flex; align-items: center; gap: 12px; padding: 16px 20px; cursor: pointer; list-style: none; font-weight: 600; }
.semester-block summary::-webkit-details-marker { display: none; }
.semester-block__name { font-family: var(--font-serif); font-size: 1.15rem; color: var(--navy-900); flex: 1; }
.semester-block__chev { transition: transform .2s; color: var(--muted); }
.semester-block[open] .semester-block__chev { transform: rotate(180deg); }
.semester-block__list { list-style: none; margin: 0; padding: 0 20px 12px; }
.semester-block__list li { display: flex; flex-wrap: wrap; gap: 4px 16px; padding: 10px 0; border-top: 1px solid var(--line); font-size: .95rem; }
.semester-block__list a { font-weight: 600; }
.catalog { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(min(340px, 100%), 1fr)); gap: 10px; }
.catalog a { display: flex; align-items: center; gap: 12px; padding: 14px 18px; border: 1px solid var(--line); border-radius: var(--radius-sm); color: var(--ink); }
.catalog a:hover { border-color: var(--navy-500); text-decoration: none; background: var(--navy-50); }
.catalog strong { flex: 1; color: var(--navy-900); }
.catalog span { font-size: .8rem; color: var(--muted); }

/* ---------- Join ---------- */
.position { padding: 22px 24px; border: 1px solid var(--line); border-radius: var(--radius); margin-bottom: 16px; background: #fff; box-shadow: var(--shadow-sm); }
.position__head { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.position__deadline { display: inline-flex; align-items: center; gap: 6px; margin-left: auto; font-size: .85rem; color: var(--red); font-weight: 500; }
.position__title { font-size: 1.3rem; margin: 10px 0 6px; }
.position__summary { color: var(--ink-2); }
.position__details summary { cursor: pointer; font-weight: 600; color: var(--navy-600); margin-bottom: 8px; }
.position__details[open] summary { margin-bottom: 14px; }
.position__actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 16px; }

/* ---------- CTA, pagination, 404 ---------- */
.cta { background: linear-gradient(120deg, var(--navy-800), var(--navy-950)); color: #cad8ea; padding: 56px 0; }
.cta__inner { display: flex; align-items: center; justify-content: space-between; gap: 24px; flex-wrap: wrap; }
.cta__title { color: #fff; font-size: clamp(1.4rem, 3vw, 1.9rem); margin-bottom: 4px; }
.cta p { margin: 0; }
.cta__actions { display: flex; flex-wrap: wrap; gap: 12px; }
.pagination { display: flex; justify-content: space-between; align-items: center; margin-top: 32px; }
.pagination a { display: inline-flex; align-items: center; gap: 6px; font-weight: 600; }
.pagination__info { color: var(--muted); font-size: .9rem; }
.notfound { text-align: center; }
.notfound__code { font-family: var(--font-serif); font-size: 6rem; font-weight: 700; color: var(--navy-100); -webkit-text-stroke: 2px var(--navy-600); line-height: 1; margin-bottom: 12px; }

/* ---------- Footer ---------- */
.site-footer { background: var(--navy-950); color: #9fb0c6; font-size: .92rem; }
.site-footer__grid { display: grid; grid-template-columns: 1.5fr 1fr 1.2fr; gap: 48px; padding-top: 56px; padding-bottom: 40px; }
.site-footer a { color: #dbe5f2; }
.site-footer a:hover { color: #fff; }
.brand--footer, .brand--footer:hover { color: #fff; margin-bottom: 16px; }
.brand--footer .brand__name { color: #9fb0c6; }
.site-footer__heading { font: 600 .74rem/1.4 var(--font-sans); letter-spacing: .12em; text-transform: uppercase; color: var(--gold-400); margin-bottom: 14px; }
.site-footer__links { list-style: none; padding: 0; margin: 0; columns: 2; column-gap: 24px; }
.site-footer__links li { padding: 3px 0; }
.site-footer__address { font-style: normal; }
.site-footer__address p { display: flex; gap: 10px; align-items: flex-start; }
.site-footer__address .icon { margin-top: 4px; color: var(--gold-400); }
.social { display: flex; gap: 8px; margin-top: 16px; }
.social a { display: inline-grid; place-items: center; width: 38px; height: 38px; border-radius: 50%; background: rgba(255, 255, 255, .06); border: 1px solid rgba(255, 255, 255, .1); }
.social a:hover { background: var(--gold-400); color: var(--navy-950); border-color: var(--gold-400); }
.site-footer__bottom { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; padding-top: 20px; padding-bottom: 24px; border-top: 1px solid rgba(255, 255, 255, .08); font-size: .82rem; }
.site-footer__bottom a { display: inline-flex; align-items: center; gap: 6px; }
@media (max-width: 860px) { .site-footer__grid { grid-template-columns: 1fr; gap: 32px; } }

/* ---------- Print ---------- */
@media print {
  .topbar, .site-header, .site-footer, .course-nav, .cta, .hero__pattern, .course-hero__actions { display: none !important; }
  .course-hero, .hero { background: none !important; color: #000; }
  .course-hero__title, .hero__title { color: #000; }
  .course-layout { display: block; }
  a { color: #000; }
}
