/* DSRC website: one stylesheet for every public page. The look follows the earlier static site
   (teal gradient, Prompt headings, Noto Sans Thai text, underlined section titles). */

/* --- Tokens --- */
:root {
  /* Journal quartiles: one teal ramp, darkest for Q1, and gray for "no quartile". */
  --q1: #0a4a54;
  --q2: #106f7b;
  --q3: #2f97a3;
  --q4: #6fb8c1;
  --qn: #aeb8bb;
  --brand-dark: #0d665e;
  --brand: #006c7a;
  --accent: #5bc2ce;
  --teal: #2d9596;
  --ink: #1b263b;
  --heading: #0d1b2a;
  --title: #083b42;
  --muted: #5f6b6d;
  --line: #d9e3e6;
  --bg: #f8f8f8;
  --tint: #eaf3f4;
  --gradient: linear-gradient(90deg, #0d665e 0%, #006c7a 100%);
  --shadow: 0 8px 24px rgba(0, 0, 0, .08);
  --radius: 6px;
  --max: 1200px;
  --header: 76px;
  --font-body: 'Noto Sans Thai', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --font-head: 'Prompt', 'Noto Sans Thai', system-ui, sans-serif;
}

/* --- Base --- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: calc(var(--header) + 12px); }
body { margin: 0; font: 400 1rem/1.75 var(--font-body); color: var(--ink); background: var(--bg); overflow-x: hidden; }
img { max-width: 100%; height: auto; display: block; }
a { color: var(--brand); text-underline-offset: 3px; }
a:hover { color: var(--brand-dark); }
h1, h2, h3, h4 { font-family: var(--font-head); color: var(--heading); line-height: 1.35; margin: 0 0 .5em; font-weight: 600; }
p { margin: 0 0 1em; }
address { font-style: normal; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }
.container { width: 100%; max-width: var(--max); margin: 0 auto; padding: 0 20px; }
.narrow { max-width: 860px; }
.center { text-align: center; }
.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: 12px; top: -48px; z-index: 200; background: #fff; color: var(--brand); padding: 8px 14px; border-radius: var(--radius); box-shadow: var(--shadow); }
.skip-link:focus { top: 12px; }

/* --- Header and menu --- */
.site-header { position: sticky; top: 0; z-index: 100; background: var(--gradient); color: #fff; transition: background-color .3s, box-shadow .3s; }
.header-bar { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: var(--header); }
.brand { display: flex; align-items: center; flex: none; }
.logo { height: 53px; width: auto; }
.logo-color { display: none; }
.site-nav ul { list-style: none; margin: 0; padding: 0; display: flex; align-items: center; gap: 2px; }
.site-nav a { display: block; color: #fff; text-decoration: none; padding: 6px 14px 3px; border-bottom: 3px solid transparent; font-weight: 500; white-space: nowrap; }
.site-nav a:hover, .site-nav a[aria-current="page"] { color: var(--accent); border-bottom-color: var(--accent); }
.nowrap { white-space: nowrap; }
.site-nav .lang-switch { margin-left: 10px; padding: 3px 14px; border: 1px solid rgba(255, 255, 255, .55); border-radius: 999px; font-size: .9rem; }
.site-nav .lang-switch:hover { border-color: var(--accent); }
/* Submenus (งานวิจัย, หลักสูตร): a button that opens a white panel under it (on hover too on wide
   screens). หลักสูตร sits near the right end of the menu, so its panel lines up on the right. */
.has-sub { position: relative; }
.sub-toggle { display: flex; align-items: center; gap: 6px; font: inherit; font-weight: 500; color: #fff; background: none; border: 0; border-bottom: 3px solid transparent; padding: 6px 14px 3px; cursor: pointer; white-space: nowrap; }
.sub-toggle i { font-size: .7em; transition: transform .2s; }
.sub-toggle:hover, .has-sub.is-current > .sub-toggle { color: var(--accent); border-bottom-color: var(--accent); }
.site-nav .sub-menu { display: none; position: absolute; top: 100%; left: 0; min-width: 230px; flex-direction: column; align-items: stretch; gap: 0; padding: 6px 0; background: #fff; border-radius: var(--radius); box-shadow: var(--shadow); }
.has-sub.is-open > .sub-menu, .no-js .has-sub:focus-within > .sub-menu { display: flex; }
.site-nav #curriculum-menu { left: auto; right: 0; }
.has-sub.is-open > .sub-toggle i { transform: rotate(180deg); }
@media (hover: hover) and (min-width: 921px) { .has-sub:hover > .sub-menu { display: flex; } }
.site-nav .sub-menu a, .js .page-home .site-header:not(.is-solid) .site-nav .sub-menu a { color: var(--ink); padding: 9px 18px; border-bottom: 0; white-space: normal; }
.site-nav .sub-menu a:hover, .site-nav .sub-menu a[aria-current="page"] { color: var(--brand-dark); background: var(--tint); }
.menu-toggle { display: none; align-items: center; gap: 8px; font: inherit; font-size: 1.15rem; color: #fff; background: transparent; border: 1px solid rgba(255, 255, 255, .55); border-radius: var(--radius); padding: 6px 12px; cursor: pointer; }

/* Home page with scripts: the header floats over the white hero and turns teal after scrolling. */
.js .page-home .site-header { position: fixed; left: 0; right: 0; }
.js .page-home .site-header:not(.is-solid) { background: transparent; }
.js .page-home .site-header:not(.is-solid) .logo-white { display: none; }
.js .page-home .site-header:not(.is-solid) .logo-color { display: block; }
.js .page-home .site-header:not(.is-solid) .site-nav a { color: var(--heading); }
.js .page-home .site-header:not(.is-solid) .site-nav a:hover { color: var(--brand); border-bottom-color: var(--accent); }
.js .page-home .site-header:not(.is-solid) .lang-switch { border-color: rgba(13, 27, 42, .35); }
.js .page-home .site-header:not(.is-solid) .sub-toggle { color: var(--heading); }
.js .page-home .site-header:not(.is-solid) .menu-toggle { color: var(--heading); border-color: rgba(13, 27, 42, .35); }
.site-header.is-solid { box-shadow: 0 2px 12px rgba(0, 0, 0, .12); }

@media (max-width: 920px) {
  .menu-toggle { display: inline-flex; }
  .site-nav { display: none; position: absolute; top: 100%; left: 0; right: 0; background: var(--brand); box-shadow: 0 12px 24px rgba(0, 0, 0, .15); }
  .site-header.is-open .site-nav { display: block; }
  .site-nav ul { flex-direction: column; align-items: stretch; padding: 6px 20px 18px; }
  .site-nav a { padding: 12px 2px; border-bottom: 1px solid rgba(255, 255, 255, .15); }
  .site-nav a:hover, .site-nav a[aria-current="page"] { border-bottom-color: rgba(255, 255, 255, .15); }
  .site-nav .lang-switch { margin: 14px 0 0; text-align: center; }
  .js .page-home .site-header:not(.is-solid) .site-nav a { color: #fff; }
  /* In the phone menu a submenu is a heading with its links always shown under it. */
  .sub-toggle, .js .page-home .site-header:not(.is-solid) .sub-toggle { width: 100%; padding: 12px 2px; color: rgba(255, 255, 255, .75); border-bottom: 1px solid rgba(255, 255, 255, .15); cursor: default; }
  .sub-toggle:hover, .has-sub.is-current > .sub-toggle { color: rgba(255, 255, 255, .75); border-bottom-color: rgba(255, 255, 255, .15); }
  .sub-toggle i { display: none; }
  .site-nav .sub-menu { display: flex; position: static; min-width: 0; padding: 0 0 0 16px; background: none; box-shadow: none; border-radius: 0; }
  .site-nav .sub-menu a, .js .page-home .site-header:not(.is-solid) .site-nav .sub-menu a { color: #fff; padding: 12px 2px; border-bottom: 1px solid rgba(255, 255, 255, .15); }
  .site-nav .sub-menu a:hover, .site-nav .sub-menu a[aria-current="page"] { color: var(--accent); background: none; }
  /* Without scripts the menu can't open, so it is always shown below the logo. */
  .no-js .menu-toggle { display: none; }
  .no-js .site-nav { display: block; position: static; box-shadow: none; background: transparent; }
  .no-js .header-bar { flex-wrap: wrap; padding-top: 10px; }
  .no-js .site-nav { width: 100%; }
}

/* --- Hero (home) --- */
.hero { position: relative; background: #fff; }
.hero-stage { position: relative; height: 100vh; height: 100svh; min-height: 460px; max-height: 1100px; overflow: hidden; }
.hero-stage canvas { position: absolute; inset: 0; display: block; }
.hero-fallback { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; padding: var(--header) 20px 0; transition: opacity .8s; }
.hero-line1 { font: 600 clamp(1.9rem, .9rem + 4.2vw, 4.4rem)/1.15 var(--font-head); color: var(--heading); margin: 0 0 .35em; }
.hero-line2 { font: 400 clamp(1.1rem, .7rem + 2vw, 2.6rem)/1.25 var(--font-head); color: var(--brand); margin: 0; }
.hero-stage.is-ready .hero-fallback { opacity: 0; }
.no-js .hero-stage { height: 70vh; }
.hero-next { position: absolute; left: 50%; bottom: 22px; transform: translateX(-50%); width: 44px; height: 44px; display: grid; place-items: center; border-radius: 50%; color: var(--brand); font-size: 1.3rem; text-decoration: none; }
.hero-next:hover { background: var(--tint); }

/* --- Sections --- */
.band { padding: 64px 0; }
.band-white { background: #fff; }
.section-title { display: inline-block; font-size: clamp(1.5rem, 1.15rem + 1.2vw, 2rem); padding-bottom: 6px; border-bottom: 2px solid var(--accent); margin-bottom: 32px; }
.page-title { background: linear-gradient(90deg, rgba(20, 128, 118, .15), rgba(0, 140, 158, .15)); padding: 56px 0 40px; text-align: center; }
.page-title h1 { color: var(--title); font-size: clamp(1.9rem, 1.3rem + 2vw, 2.5rem); margin: 0; }
.lead { font: 500 clamp(1.1rem, .95rem + .6vw, 1.4rem)/1.9 var(--font-head); color: var(--heading); max-width: 860px; margin: 0 auto; }
.actions { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; margin: 32px 0 0; }
.button { display: inline-block; font: inherit; font-weight: 500; background: var(--teal); color: #fff; padding: 9px 22px; border: 2px solid var(--teal); border-radius: var(--radius); text-decoration: none; transition: background-color .2s, border-color .2s, color .2s; }
.button:hover { background: var(--brand-dark); border-color: var(--brand-dark); color: #fff; }
.button-outline { background: transparent; color: var(--teal); }
.button-small { padding: 5px 15px; font-size: .95rem; }

/* --- Mission cards --- */
.mission-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 36px 40px; text-align: center; }
.mission-card { padding: 4px 8px; }
.mission-icon { width: 80px; height: 80px; margin: 6px auto 20px; display: grid; place-items: center; border-radius: 50%; background: #f2f2f2; color: var(--teal); font-size: 1.6rem; box-shadow: 0 0 0 4px var(--teal), inset 0 2px 0 rgba(0, 0, 0, .08), 0 3px 0 4px rgba(0, 0, 0, .05); }
.mission-card h3 { font-size: 1.45rem; margin-bottom: .6em; }
.mission-card p { color: #555; font-size: 1.05rem; line-height: 1.85; margin: 0; }

/* --- People --- */
.member-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px; }
.member-grid-lead > :first-child, .member-grid > :only-child { grid-column: 1 / -1; justify-self: center; width: 100%; max-width: 600px; }
.member-single { max-width: 600px; margin: 0 auto; text-align: left; }
.member-card { background: #fff; border-radius: var(--radius); box-shadow: var(--shadow); padding: 18px 22px; display: flex; gap: 24px; align-items: flex-start; }
.member-photo { flex: none; width: 110px; height: 110px; border-radius: 50%; overflow: hidden; background: #e6eef0; }
.member-photo img { width: 100%; height: 100%; object-fit: cover; }
.photo-placeholder { width: 100%; height: 100%; display: grid; place-items: center; color: #9db2b7; font-size: 2.4rem; background: #e6eef0; }
.member-body { min-width: 0; }
.member-name { font: 600 1.12rem/1.5 var(--font-body); margin: 0 0 4px; }
.member-name a { color: #222; text-decoration: none; }
.member-name a:hover { color: var(--brand); text-decoration: underline; }
.member-position { color: var(--brand-dark); font-weight: 600; margin: 0 0 8px; line-height: 1.6; }
.member-department { color: var(--muted); font-size: .95rem; margin: 0 0 6px; }
.member-email { color: var(--muted); font-size: .92rem; margin: 0; overflow-wrap: anywhere; }
.member-email a { color: inherit; }
.member-email a:hover { color: var(--brand); }

/* --- Profile --- */
.profile-hero { background: linear-gradient(90deg, rgba(20, 128, 118, .12), rgba(0, 140, 158, .12)); padding: 56px 0; }
.profile-grid { display: grid; grid-template-columns: 220px minmax(0, 1fr); gap: 44px; align-items: center; }
.profile-photo { width: 220px; height: 220px; border-radius: 50%; overflow: hidden; background: #e6eef0; box-shadow: 0 0 0 6px #fff, var(--shadow); }
.profile-photo img { width: 100%; height: 100%; object-fit: cover; }
.profile-photo .photo-placeholder { font-size: 4rem; }
.eyebrow { font-size: .95rem; color: var(--brand-dark); font-weight: 600; letter-spacing: .02em; margin: 0 0 4px; }
.profile-name { font-size: clamp(1.6rem, 1.15rem + 1.7vw, 2.3rem); color: var(--title); margin: 0 0 2px; }
.profile-alt { color: var(--muted); font-size: 1.1rem; margin: 0 0 14px; }
.profile-position { color: var(--brand-dark); font-weight: 600; margin: 0 0 4px; line-height: 1.6; }
.profile-department { color: var(--muted); margin: 0; }
.profile-contact { list-style: none; padding: 0; margin: 18px 0 0; display: flex; flex-wrap: wrap; gap: 8px 22px; }
.profile-contact li { overflow-wrap: anywhere; }
.profile-contact i { color: var(--teal); width: 1.2em; text-align: center; }
.tags { list-style: none; padding: 0; margin: 0 0 40px; display: flex; flex-wrap: wrap; gap: 8px; }
.tags li { background: var(--tint); color: var(--brand-dark); border-radius: 999px; padding: 4px 14px; font-size: .95rem; }
.back-link { padding-top: 28px; padding-bottom: 56px; }
.back-link a { text-decoration: none; font-weight: 500; }

/* --- Text written in the admin pages --- */
.prose { font-size: 1.05rem; line-height: 1.85; overflow-wrap: break-word; }
.prose h2, .prose h3, .prose h4 { margin-top: 1.4em; }
.prose > :first-child { margin-top: 0; }
.prose ul, .prose ol { padding-left: 1.4em; margin: 0 0 1em; }
.prose li { margin-bottom: .3em; }

/* --- History timeline (about) --- */
.timeline { list-style: none; margin: 0; padding: 8px 0 0; position: relative; }
.timeline::before { content: ""; position: absolute; top: 0; bottom: 0; left: 50%; width: 4px; margin-left: -2px; background: #fff; border-radius: 2px; }
.tl-item { position: relative; width: 50%; padding: 0 40px 28px 0; }
.tl-item:nth-child(even) { margin-left: 50%; padding: 0 0 28px 40px; }
.tl-card { position: relative; background: #fff; border-radius: var(--radius); padding: 18px 20px; box-shadow: 0 2px 10px rgba(0, 0, 0, .04); }
.tl-card::before { content: ""; position: absolute; top: 25px; width: 15px; height: 15px; background: #fff; transform: rotate(45deg); }
.tl-item:nth-child(odd) .tl-card::before { right: -7px; }
.tl-item:nth-child(even) .tl-card::before { left: -7px; }
.tl-icon { position: absolute; top: 12px; width: 40px; height: 40px; display: grid; place-items: center; border-radius: 50%; background: #f2f2f2; color: var(--teal); font-size: 1rem; box-shadow: 0 0 0 4px #fff, inset 0 2px 0 rgba(0, 0, 0, .08), 0 3px 0 4px rgba(0, 0, 0, .05); z-index: 1; }
.tl-item:nth-child(odd) .tl-icon { right: -60px; }
.tl-item:nth-child(even) .tl-icon { left: -60px; }
.tl-head { display: flex; justify-content: space-between; align-items: baseline; gap: 4px 14px; flex-wrap: wrap; margin-bottom: 6px; }
.tl-head h3 { font: 500 1.3rem/1.45 var(--font-body); margin: 0; }
.tl-head time { color: var(--muted); white-space: nowrap; }
.tl-body { font-size: 1rem; }
.tl-body p:last-child { margin-bottom: 0; }
.tl-more { margin: 14px 0 0; }
.person-mini { display: flex; gap: 15px; align-items: flex-start; }
.person-mini > a { flex: none; }
.person-mini img, .person-mini .photo-placeholder { width: 70px; height: 70px; border-radius: 50%; object-fit: cover; flex: none; font-size: 1.6rem; }
.person-mini-name { margin: 0 0 2px; font-weight: 500; }
.person-mini-name a { color: #222; text-decoration: none; }
.person-mini-name a:hover { color: var(--brand); text-decoration: underline; }
.person-mini-role, .person-mini-term { color: var(--muted); margin: 0; font-size: .95rem; line-height: 1.6; }

/* --- Publications --- */
.page-title p { color: var(--muted); max-width: 720px; margin: 10px auto 0; }
.stats-band { padding: 40px 0; }
.stats { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; text-align: center; }
.stats a { display: block; color: inherit; text-decoration: none; border-radius: var(--radius); }
.stats a:hover .stat-number { color: var(--brand-dark); }
.stat-number { display: block; font: 600 clamp(2rem, 1.4rem + 2.2vw, 3rem)/1.15 var(--font-head); color: var(--brand); }
.stat-label { display: block; color: var(--muted); margin-top: 4px; }
.pub-list { list-style: none; margin: 0; padding: 0; text-align: left; }
.pub { padding: 16px 0; border-bottom: 1px solid var(--line); }
.pub:last-child { border-bottom: 0; }
.pub-title { font-weight: 600; font-size: 1.05rem; line-height: 1.55; margin: 0 0 4px; overflow-wrap: break-word; }
.pub-title a { color: var(--heading); text-decoration: none; }
.pub-title a:hover { color: var(--brand); text-decoration: underline; }
.pub-authors { color: #4a5568; font-size: .95rem; line-height: 1.6; margin: 0 0 4px; }
.pub-meta { display: flex; flex-wrap: wrap; gap: 2px 14px; font-size: .9rem; color: var(--muted); margin: 0; }
.pub-venue { font-style: italic; color: #37474f; }
a.pub-venue { text-decoration: none; }
a.pub-venue:hover, a.pub-venue:focus-visible { color: var(--brand); text-decoration: underline; }
.pub-oa { color: #1b7f3b; font-weight: 500; text-decoration: none; }
a.pub-oa:hover { text-decoration: underline; color: #145f2c; }
.pub-q { display: inline-flex; align-items: center; gap: 5px; font-weight: 600; color: var(--ink); cursor: help; }
.pub-cited { color: var(--muted); }
a.pub-cited { text-decoration: none; }
a.pub-cited:hover { color: var(--brand); text-decoration: underline; }
.q-key { display: inline-block; flex: none; width: 10px; height: 10px; border-radius: 2px; }
.q-key.q1 { background: var(--q1); }
.q-key.q2 { background: var(--q2); }
.q-key.q3 { background: var(--q3); }
.q-key.q4 { background: var(--q4); }
.q-key.qn { background: var(--qn); }
.pub-filters { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 10px; margin: 0 0 14px; }
.pub-filters .pub-search { grid-column: 1 / -1; }
.pub-filters input, .pub-filters select { font: inherit; font-size: .95rem; width: 100%; padding: 9px 12px; border: 1px solid var(--line); border-radius: var(--radius); background: #fff; color: var(--ink); }
.pub-filters input:focus, .pub-filters select:focus { outline: 3px solid rgba(91, 194, 206, .45); border-color: var(--teal); }
.pub-search { position: relative; }
.pub-search i { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); color: var(--muted); }
.pub-search input { padding-left: 36px; }
.pub-active { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 14px; }
.pub-active[hidden] { display: none; }
.pub-chip { display: inline-flex; align-items: center; gap: 8px; font: inherit; font-size: .92rem; background: var(--tint); color: var(--brand-dark); border: 1px solid transparent; border-radius: 999px; padding: 4px 12px 4px 14px; cursor: pointer; }
.pub-chip:hover, .pub-chip:focus-visible { border-color: var(--brand); }
.pub-chip:focus-visible { outline: 3px solid rgba(91, 194, 206, .45); }
.pub-toolbar { display: flex; justify-content: space-between; gap: 6px 20px; flex-wrap: wrap; color: var(--muted); font-size: .95rem; }
.pub-toolbar p { margin: 0; }
.pub-year { margin-top: 28px; }
.pub-year-title { font-size: 1.35rem; color: var(--title); border-bottom: 2px solid var(--accent); padding-bottom: 4px; margin-bottom: 4px; }
.pub-ce { font-size: .8em; color: var(--muted); font-weight: 400; }
.pub-none { text-align: center; color: var(--muted); padding: 32px 0; }
.pub[hidden], [data-pub-year][hidden], .pub-none[hidden] { display: none; }

/* --- Publication statistics (Publications page and profiles) ---
   Figures as tiles, then SVG charts drawn by site.mjs: one teal for the data, a lighter step of it
   for the year that isn't over, hairline baselines, and text in the text colors. */
.pub-stats { padding: 48px 0; }
.stats-home { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.stats-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); margin: 0 0 24px; }
.stats-5 { grid-template-columns: repeat(5, minmax(0, 1fr)); margin: 0 0 8px; }
.stats-tiles li { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 16px 10px; }
.stat-sub { display: block; color: var(--muted); font-size: .85rem; margin-top: 2px; }
.stats-heading { font: 600 1.2rem/1.45 var(--font-head); color: var(--title); margin: 36px 0 14px; }
.stats-small .stat-number { font-size: clamp(1.6rem, 1.25rem + 1vw, 2.1rem); }
.stats-small .stat-label { font-size: .92rem; }
.chart-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 400px), 1fr)); gap: 20px; }
.chart { margin: 0 0 20px; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 18px 20px 16px; min-width: 0; }
.chart-grid .chart { margin: 0; }
.chart-title { font: 600 1.05rem/1.45 var(--font-head); color: var(--title); margin: 0 0 14px; }
.columns { list-style: none; margin: 0; padding: 0; display: grid; grid-auto-flow: column; grid-auto-columns: minmax(36px, 1fr); overflow-x: auto; }
.column { display: flex; flex-direction: column; align-items: center; color: var(--ink); text-decoration: none; border-radius: 4px; }
.column-plot { width: 100%; height: 170px; display: flex; flex-direction: column; justify-content: flex-end; align-items: center; border-bottom: 1px solid var(--line); }
.column-plot svg { display: block; }
.column-value { font-size: .85rem; line-height: 1.3; margin-bottom: 4px; }
.column-label { font-size: .8rem; line-height: 1.3; color: var(--muted); padding: 6px 0 2px; font-variant-numeric: tabular-nums; }
a.column:hover, a.column:focus-visible { background: var(--tint); color: var(--ink); }
.chart-key { margin: 6px 0 0; font-size: .85rem; line-height: 1.5; color: var(--muted); }
.chart-legend { list-style: none; display: flex; flex-wrap: wrap; gap: 4px 16px; margin: 12px 0 0; padding: 0; font-size: .85rem; color: var(--muted); }
.chart-legend li { display: inline-flex; align-items: center; gap: 6px; }
.columns .q1, .bars .q1, .pie .q1 { fill: var(--q1); }
.columns .q2, .bars .q2, .pie .q2 { fill: var(--q2); }
.columns .q3, .bars .q3, .pie .q3 { fill: var(--q3); }
.columns .q4, .bars .q4, .pie .q4 { fill: var(--q4); }
.columns .qn, .bars .qn, .pie .qn { fill: var(--qn); }
.bars { list-style: none; margin: 0; padding: 0; }
.bar { display: grid; grid-template-columns: minmax(0, 16em) minmax(0, 1fr) 2.5em; align-items: center; gap: 12px; padding: 5px 6px; color: var(--ink); text-decoration: none; border-radius: 4px; }
a.bar:hover, a.bar:focus-visible { background: var(--tint); color: var(--ink); }
.bar-name { font-size: .92rem; line-height: 1.45; overflow-wrap: anywhere; }
.bar-track svg { display: block; }
.bar rect { fill: var(--brand); }
a.bar:hover rect:not([class]), a.bar:focus-visible rect:not([class]) { fill: var(--brand-dark); }
.bar-value { font-size: .9rem; text-align: right; font-variant-numeric: tabular-nums; }
/* The quartile pie: white lines between slices, and a legend of links beside it (below it when
   the chart is narrow). */
.pie-chart { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 16px 32px; padding: 8px 0; }
.pie { display: block; flex: none; }
.pie path, .pie circle { stroke: #fff; stroke-width: 2px; }
.pie a:hover > *, .pie a:focus > * { opacity: .8; }
.pie-legend { list-style: none; margin: 0; padding: 0; min-width: 13em; }
.pie-legend a { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 10px; padding: 5px 8px; color: var(--ink); text-decoration: none; border-radius: 4px; font-size: .92rem; }
.pie-legend a:hover, .pie-legend a:focus-visible { background: var(--tint); color: var(--ink); }
.pie-value { font-variant-numeric: tabular-nums; text-align: right; }
.pie-share { color: var(--muted); }
.chart-note { font-size: .85rem; line-height: 1.6; color: var(--muted); margin: 16px 0 0; }
.chart-note + .pub-list { margin-top: 12px; }
.chart-tip { position: absolute; z-index: 50; pointer-events: none; max-width: 260px; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); padding: 6px 10px; font-size: .85rem; line-height: 1.45; }
.chart-tip strong { display: block; color: var(--heading); font-size: .95rem; }
.chart-tip span { color: var(--muted); }
.chart-tip[hidden] { display: none; }

/* --- Research areas and projects --- */
.area-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 320px), 1fr)); gap: 24px; }
.area-card { position: relative; background: #fff; border-radius: var(--radius); box-shadow: var(--shadow); padding: 24px 24px 20px; display: flex; flex-direction: column; gap: 8px; transition: transform .2s, box-shadow .2s; }
.area-card:hover { transform: translateY(-3px); box-shadow: 0 12px 28px rgba(0, 0, 0, .12); }
.area-icon { width: 52px; height: 52px; border-radius: 50%; display: grid; place-items: center; background: var(--gradient); color: #fff; font-size: 1.35rem; }
.area-card-title { font: 600 1.2rem/1.45 var(--font-head); margin: 6px 0 0; }
.area-card-title a { color: var(--heading); text-decoration: none; }
.area-card-title a::after { content: ''; position: absolute; inset: 0; } /* the whole card is the link */
.area-card-title a:hover { color: var(--brand); }
.area-card-text { color: #555; line-height: 1.7; margin: 0; }
.area-meta { color: var(--muted); font-size: .9rem; margin: auto 0 0; }
.page-title .eyebrow a { color: inherit; }
.page-title h1 i { color: var(--teal); margin-right: 6px; }
.project-active { background: #e3f4e8; color: #1b6b35; }
.project-completed { background: #eceff1; color: #455a64; }
.project-lead { color: var(--muted); font-size: .92rem; margin: 2px 0 0; }
.project-lead i { color: var(--teal); }
.eyebrow-link { color: var(--brand); font-weight: 600; font-size: .9rem; text-decoration: none; }
.tag-links a { color: inherit; text-decoration: none; }
.tag-links a:hover { text-decoration: underline; }
.profile-projects { list-style: none; padding: 0; margin: 0 0 40px; }
.profile-projects li { padding: 8px 0; border-bottom: 1px solid var(--line); }
.profile-projects .muted { color: var(--muted); font-size: .9rem; }
.band .section-title + .news-grid { margin-bottom: 36px; }

/* --- News and activities --- */
.news-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px; text-align: left; }
.news-card { background: #fff; border-radius: var(--radius); box-shadow: var(--shadow); overflow: hidden; display: flex; flex-direction: column; transition: transform .2s, box-shadow .2s; }
.news-card:hover { transform: translateY(-3px); box-shadow: 0 12px 28px rgba(0, 0, 0, .12); }
.news-card-image { display: block; aspect-ratio: 16 / 9; background: #e6eef0; overflow: hidden; }
.news-card-image img { width: 100%; height: 100%; object-fit: cover; }
.news-card-placeholder { width: 100%; height: 100%; display: grid; place-items: center; font-size: 2.6rem; background: var(--gradient); }
.news-card .news-card-placeholder { color: rgba(255, 255, 255, .92); }
.news-card-placeholder.news-cat-event { background: linear-gradient(135deg, #b7791f, #dd9b3a); }
.news-card-placeholder.news-cat-seminar { background: linear-gradient(135deg, #1f5fa8, #3f86cf); }
.news-card-placeholder.news-cat-award { background: linear-gradient(135deg, #8b1d4a, #c0487a); }
.news-card-body { padding: 16px 18px 20px; display: flex; flex-direction: column; gap: 6px; }
.news-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 12px; font-size: .9rem; color: var(--muted); margin: 0; }
.news-cat { display: inline-block; padding: 1px 10px; border-radius: 999px; font-size: .82rem; font-weight: 600; background: var(--tint); color: var(--brand-dark); text-decoration: none; }
.news-cat-event { background: #fff1d6; color: #7a4a00; }
.news-cat-seminar { background: #e3edfb; color: #174f9e; }
.news-cat-award { background: #fbe7ef; color: #8b1d4a; }
a.news-cat:hover { text-decoration: underline; }
.news-card-title { font: 600 1.1rem/1.5 var(--font-body); margin: 2px 0 0; }
.news-card-title a { color: var(--heading); text-decoration: none; }
.news-card-title a:hover { color: var(--brand); text-decoration: underline; }
.news-card-summary { color: #555; font-size: .95rem; line-height: 1.7; margin: 0; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.news-tabs { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; margin: 0 0 28px; }
.news-tabs a { padding: 5px 18px; border-radius: 999px; border: 1px solid var(--line); background: #fff; color: var(--ink); text-decoration: none; font-weight: 500; }
.news-tabs a:hover { border-color: var(--teal); color: var(--brand); }
.news-tabs a[aria-current="page"] { background: var(--teal); border-color: var(--teal); color: #fff; }
.upcoming { background: #fff; border-radius: var(--radius); box-shadow: var(--shadow); padding: 18px 22px; margin: 0 0 32px; }
.upcoming-heading { font-size: 1.2rem; color: var(--title); margin: 0 0 6px; }
.upcoming-heading i { color: var(--teal); }
.upcoming-list { list-style: none; margin: 0; padding: 0; }
.upcoming-list li + li { border-top: 1px solid var(--line); }
.upcoming-item { display: flex; gap: 16px; align-items: center; padding: 12px 0; text-decoration: none; color: inherit; }
.date-badge { flex: none; width: 60px; text-align: center; border-radius: 8px; background: var(--gradient); color: #fff; padding: 6px 0; line-height: 1.15; }
.date-badge b { display: block; font: 600 1.5rem/1.1 var(--font-head); }
.date-badge span { font-size: .8rem; }
.upcoming-text { min-width: 0; }
.upcoming-title { display: block; font-weight: 600; color: var(--heading); }
.upcoming-item:hover .upcoming-title { color: var(--brand); text-decoration: underline; }
.upcoming-meta { display: block; font-size: .9rem; color: var(--muted); }
.pager { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin: 32px 0 0; color: var(--muted); }
.pager a { font-weight: 500; text-decoration: none; }
.empty-note { text-align: center; color: var(--muted); padding: 40px 0; }
.news-header { background: linear-gradient(90deg, rgba(20, 128, 118, .12), rgba(0, 140, 158, .12)); padding: 44px 0 30px; }
.news-header h1 { font-size: clamp(1.6rem, 1.15rem + 1.7vw, 2.3rem); color: var(--title); margin: 12px 0 14px; }
.event-facts { list-style: none; padding: 0; margin: 0 0 18px; display: flex; flex-wrap: wrap; gap: 6px 22px; }
.event-facts i { color: var(--teal); width: 1.2em; text-align: center; }
.news-cover { margin: 32px auto 0; }
.news-cover img { width: 100%; border-radius: var(--radius); box-shadow: var(--shadow); }
.news-body { padding-top: 32px; padding-bottom: 12px; }
.news-summary { font: 500 1.15rem/1.8 var(--font-head); color: var(--heading); }
.news-gallery { padding-top: 12px; padding-bottom: 48px; }
.gallery { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 10px; }
.gallery a { display: block; aspect-ratio: 3 / 2; overflow: hidden; border-radius: 6px; background: #e6eef0; }
.gallery img { width: 100%; height: 100%; object-fit: cover; transition: transform .3s; }
.gallery a:hover img { transform: scale(1.04); }
.lightbox { border: 0; padding: 0; margin: 0; background: transparent; width: 100vw; height: 100vh; max-width: 100vw; max-height: 100vh; overflow: hidden; }
.lightbox::backdrop { background: rgba(8, 20, 28, .94); }
.lightbox img { position: absolute; inset: 60px 72px; margin: auto; max-width: calc(100% - 144px); max-height: calc(100% - 120px); object-fit: contain; }
.lightbox button { position: absolute; background: rgba(255, 255, 255, .14); border: 0; color: #fff; width: 48px; height: 48px; border-radius: 50%; font-size: 1.3rem; cursor: pointer; display: grid; place-items: center; }
.lightbox button:hover, .lightbox button:focus-visible { background: rgba(255, 255, 255, .28); }
.lightbox-close { top: 12px; right: 12px; }
.lightbox-prev { left: 12px; top: 50%; transform: translateY(-50%); }
.lightbox-next { right: 12px; top: 50%; transform: translateY(-50%); }
.lightbox-count { position: absolute; bottom: 16px; left: 0; right: 0; text-align: center; color: #dfe9ea; margin: 0; }

/* Shown on admin previews of news pages. */
.preview-banner { background: #fff1d6; color: #7a4a00; text-align: center; padding: 8px 16px; margin: 0; font-weight: 600; }
.preview-banner a { color: inherit; }

/* --- Contact: the details beside the map, stacked on narrow screens --- */
.contact-grid { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 3fr); gap: 32px; align-items: start; }
.contact-card { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 28px; }
.contact-name { font-size: 1.35rem; color: var(--title); margin: 0; }
.contact-faculty { color: var(--muted); margin: 2px 0 22px; }
.contact-row { display: grid; grid-template-columns: 1.5em minmax(0, 1fr); gap: 10px; margin: 0 0 14px; font-style: normal; line-height: 1.6; }
.contact-row i { color: var(--brand); margin-top: .35em; }
.contact-row a { overflow-wrap: anywhere; }
.contact-follow { font-size: 1rem; color: var(--title); margin: 26px 0 10px; }
.contact-card .social-icons a { color: var(--brand); }
.contact-card .social-icons a:hover { color: var(--brand-dark); }
.contact-map { margin: 0; }
.contact-map iframe { display: block; width: 100%; height: auto; aspect-ratio: 4 / 3; border: 1px solid var(--line); border-radius: var(--radius); background: var(--tint); }
.contact-map figcaption, .contact-map-link { margin: 14px 0 0; }

/* --- Curriculum: the programs list and a program's page (figures, overview, credit structure,
   course lists, study plan, admission). Category colors follow the quartile ramp. --- */
.curriculum-intro { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); gap: 48px; align-items: start; }
.curriculum-intro.no-highlights { grid-template-columns: minmax(0, 860px); }
.highlight-list { list-style: none; padding: 0; margin: 6px 0 0; display: grid; gap: 14px; }
.highlight-list li { display: flex; gap: 14px; align-items: center; background: var(--tint); border-radius: var(--radius); padding: 14px 16px; }
.highlight-list .area-icon { width: 44px; height: 44px; font-size: 1.05rem; flex: none; }
.highlight-list b { display: block; font: 600 1.02rem/1.5 var(--font-head); color: var(--heading); }
.highlight-list span:not(.area-icon) { color: var(--muted); font-size: .93rem; }
.program-cards { display: grid; gap: 22px; }
.program-card { display: grid; grid-template-columns: 150px minmax(0, 1fr); background: #fff; border-radius: var(--radius); box-shadow: var(--shadow); overflow: hidden; }
.program-card-year { background: #e4ebec; color: #5d6c6f; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; padding: 20px 10px; }
.program-card-year span { font-size: .9rem; }
.program-card-year b { font: 600 2.4rem/1 var(--font-head); }
.program-card-current .program-card-year { background: var(--gradient); color: #fff; }
.program-card-body { padding: 22px 26px; }
.program-card-status { margin: 0 0 6px; color: var(--muted); font-size: .93rem; }
.program-status { background: #e3f4e8; color: #1b6b35; border-radius: 999px; padding: 2px 10px; font-size: .85rem; white-space: nowrap; }
.program-status-old { background: #eceff1; color: #455a64; }
.program-card-title { font-size: clamp(1.15rem, 1rem + .6vw, 1.4rem); margin: 0; line-height: 1.45; }
.program-card-title a { color: var(--heading); text-decoration: none; }
.program-card-current .program-card-title a { color: var(--title); }
.program-card-title a:hover { color: var(--brand); text-decoration: underline; }
.program-card-alt { color: var(--muted); margin: 2px 0 8px; }
.program-card-degree { margin: 0 0 12px; }
.program-card-degree i, .program-degree i, .program-related i { color: var(--teal); }
.program-card-facts { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: 8px 10px; }
.program-card-facts li { background: var(--tint); border-radius: 999px; padding: 4px 14px; font-size: .93rem; color: var(--brand-dark); }
.program-card-facts b { font-family: var(--font-head); font-size: 1.05rem; }
.program-card:not(.program-card-current) .program-card-facts li { background: #f1f3f4; color: #555; }
.program-card-actions, .program-actions, .admission-actions { justify-content: flex-start; margin-top: 18px; }
.admission-band { background: var(--gradient); color: #fff; padding: 44px 0; }
.admission-band-inner { display: flex; align-items: center; justify-content: space-between; gap: 24px 40px; flex-wrap: wrap; }
.admission-band h2 { color: #fff; font-size: 1.6rem; margin: 0 0 6px; }
.admission-band .prose { color: rgba(255, 255, 255, .92); }
.admission-band .prose a { color: #fff; }
.admission-band-actions { margin: 0; }
.button-light { background: #fff; color: var(--brand-dark); border-color: #fff; }
.button-light:hover { background: var(--tint); border-color: var(--tint); color: var(--brand-dark); }
.source-wrap { padding-top: 18px; padding-bottom: 36px; }
.source-note { color: var(--muted); font-size: .9rem; margin: 0; }
.program-hero { background: linear-gradient(90deg, rgba(20, 128, 118, .12), rgba(0, 140, 158, .12)); padding: 48px 0 36px; }
.program-title { color: var(--title); font-size: clamp(1.6rem, 1.1rem + 1.9vw, 2.4rem); line-height: 1.4; margin: 6px 0 4px; }
.program-alt { color: var(--muted); font-size: 1.1rem; margin: 0 0 10px; }
.program-degree { margin: 0 0 24px; }
.program-degree-en { color: var(--muted); }
.program-facts { grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); margin: 0; }
.program-related { margin: 18px 0 0; color: var(--muted); }
.program-nav { position: sticky; top: var(--header); z-index: 5; background: #fff; border-bottom: 1px solid var(--line); box-shadow: 0 2px 8px rgba(0, 0, 0, .04); }
.program-nav .container { display: flex; gap: 4px; overflow-x: auto; scrollbar-width: none; }
.program-nav a { flex: none; padding: 13px 14px; color: var(--ink); text-decoration: none; font-weight: 500; border-bottom: 3px solid transparent; }
.program-nav a:hover { color: var(--brand); border-bottom-color: var(--accent); }
#overview, #structure, #courses, #plan, #admission { scroll-margin-top: calc(var(--header) + 52px); }
.program-overview { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr); gap: 48px; }
.program-overview .section-title { margin-bottom: 20px; }
.subhead { font: 600 1.15rem/1.5 var(--font-head); color: var(--heading); margin: 28px 0 12px; }
.program-side .subhead:first-child { margin-top: 6px; }
.track-cards { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 14px; }
.track-card { background: var(--tint); border-radius: var(--radius); padding: 16px; display: flex; flex-direction: column; gap: 10px; font-weight: 500; line-height: 1.55; }
.track-card .area-icon { width: 42px; height: 42px; font-size: 1.05rem; }
.program-facts-list { display: grid; grid-template-columns: auto 1fr; gap: 8px 16px; margin: 0; }
.program-facts-list dt { color: var(--muted); }
.program-facts-list dd { margin: 0; font-weight: 500; }
.structure-total { font-size: 1.1rem; margin: -12px 0 14px; }
.structure-total b { font: 600 1.6rem var(--font-head); color: var(--brand); }
.credit-bar { display: block; width: 100%; height: 22px; border-radius: 999px; }
.credit-bar .c1, .credit-key.c1 { fill: var(--q4); background: var(--q4); }
.credit-bar .c2, .credit-key.c2 { fill: var(--q3); background: var(--q3); }
.credit-bar .c3, .credit-key.c3 { fill: var(--q1); background: var(--q1); }
.credit-bar .c4, .credit-key.c4 { fill: #9fd3d9; background: #9fd3d9; }
.credit-bar .c5, .credit-key.c5 { fill: var(--qn); background: var(--qn); }
.credit-bar .c6, .credit-key.c6 { fill: var(--q2); background: var(--q2); }
.credit-key { display: inline-block; width: 12px; height: 12px; border-radius: 3px; flex: none; }
.credit-legend { list-style: none; padding: 0; margin: 12px 0 28px; display: flex; flex-wrap: wrap; gap: 6px 22px; color: var(--muted); }
.credit-legend li { display: flex; align-items: center; gap: 7px; }
.credit-legend b { color: var(--ink); }
.credit-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 18px; }
.credit-card { background: #fff; border-radius: var(--radius); box-shadow: var(--shadow); padding: 20px; position: relative; overflow: hidden; }
.credit-card > .credit-key { position: absolute; top: 0; left: 0; right: 0; width: auto; height: 5px; border-radius: 0; }
.credit-card h3 { font-size: 1.05rem; margin: 4px 0 6px; }
.credit-big { font: 600 2rem/1.1 var(--font-head); color: var(--brand); margin: 0 0 10px; }
.credit-big small { font-size: .9rem; color: var(--muted); font-weight: 500; }
.credit-card ul { list-style: none; padding: 0; margin: 0; font-size: .93rem; color: #444; }
.credit-card li { display: flex; justify-content: space-between; gap: 10px; padding: 4px 0; border-top: 1px dashed var(--line); }
.section-intro { color: var(--muted); margin: -16px 0 18px; }
.course-tools { display: flex; gap: 12px; align-items: center; margin-bottom: 16px; flex-wrap: wrap; }
.course-tools[hidden] { display: none; }
.course-search { flex: 1 1 260px; }
.course-search input { font: inherit; font-size: .95rem; width: 100%; padding: 9px 12px 9px 36px; border: 1px solid var(--line); border-radius: var(--radius); background: #fff; color: var(--ink); }
.course-search input:focus { outline: 3px solid rgba(91, 194, 206, .45); border-color: var(--teal); }
.course-group { border: 1px solid var(--line); border-radius: var(--radius); margin-bottom: 12px; background: #fff; }
.course-group[hidden] { display: none; }
.course-group > summary { list-style: none; cursor: pointer; display: flex; align-items: center; gap: 12px; padding: 14px 18px; font: 600 1.08rem var(--font-head); color: var(--heading); }
.course-group > summary::-webkit-details-marker { display: none; }
.course-group > summary:focus-visible { outline: 3px solid rgba(91, 194, 206, .6); outline-offset: -3px; }
.summary-title { flex: 1; }
.summary-meta { font: 500 .92rem var(--font-body); color: var(--brand-dark); background: var(--tint); border-radius: 999px; padding: 3px 12px; white-space: nowrap; }
.summary-chevron { color: var(--muted); transition: transform .2s; }
.course-group[open] > summary .summary-chevron { transform: rotate(180deg); }
.course-group[open] > summary { border-bottom: 1px solid var(--line); }
.course-group-body { padding: 6px 18px 16px; }
.group-title { font: 600 1rem var(--font-head); color: var(--brand-dark); margin: 16px 0 6px; }
.group-subtitle { font: 600 .96rem var(--font-head); color: var(--heading); margin: 12px 0 4px; }
.group-credits { font: 500 .85rem var(--font-body); color: var(--muted); margin-left: 6px; }
.track { margin: 12px 0 0; padding: 10px 14px; border-left: 3px solid var(--accent); background: #fafcfc; border-radius: 0 var(--radius) var(--radius) 0; }
.track-title { font: 600 .98rem var(--font-head); margin: 0 0 4px; color: var(--heading); }
.course-note { color: #555; background: var(--tint); border-radius: var(--radius); padding: 8px 12px; margin: 8px 0; font-size: .93rem; line-height: 1.7; }
.course-note i { color: var(--teal); }
.course-list, .plan-list { list-style: none; padding: 0; margin: 0; }
.course { display: grid; grid-template-columns: 74px minmax(0, 1fr) auto; gap: 4px 14px; align-items: baseline; padding: 8px 0; border-bottom: 1px solid #eef2f3; }
.course:last-child { border-bottom: 0; }
.course[hidden], .plan-course[hidden] { display: none; }
.course-code { font: 500 .92rem/1.4 ui-monospace, 'SF Mono', Menlo, Consolas, monospace; color: var(--brand); }
.course-name { line-height: 1.5; }
.course-en { display: block; color: var(--muted); font-size: .88rem; }
.course-credits { font-size: .92rem; white-space: nowrap; font-variant-numeric: tabular-nums; }
.course-or { grid-column: 1 / -1; font-size: .8rem; color: var(--muted); font-style: italic; margin-bottom: -4px; }
.plan-year { margin-bottom: 28px; }
.plan-year-title { display: flex; align-items: center; gap: 10px; font-size: 1.2rem; margin: 0 0 12px; }
.plan-year-badge { width: 34px; height: 34px; border-radius: 50%; background: var(--gradient); color: #fff; display: grid; place-items: center; font-size: 1rem; }
.plan-terms { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 380px), 1fr)); gap: 18px; }
.plan-term { background: #fff; border-radius: var(--radius); box-shadow: var(--shadow); padding: 16px 18px 12px; display: flex; flex-direction: column; }
.plan-term h4 { font: 600 1rem var(--font-head); color: var(--brand-dark); margin: 0 0 6px; }
.plan-course { display: grid; grid-template-columns: 64px minmax(0, 1fr) auto; gap: 2px 10px; padding: 6px 0; border-bottom: 1px solid #eef2f3; font-size: .95rem; align-items: baseline; }
.plan-course .course-code { font-size: .85rem; }
.plan-open { grid-template-columns: minmax(0, 1fr) auto; font-style: italic; color: #555; }
.plan-open .course-name::before { content: '+ '; color: var(--teal); font-style: normal; }
.plan-total { display: flex; justify-content: space-between; margin: auto 0 0; padding-top: 10px; font-weight: 600; color: var(--brand-dark); }
.admission-card { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr); gap: 40px; background: var(--tint); border-radius: var(--radius); padding: 32px; }
.admission-card .section-title { margin-bottom: 18px; }
.admission-contact p { margin: 0 0 8px; line-height: 1.7; }

/* --- Not found --- */
.notfound { padding: 88px 0; }
.notfound-code { font: 600 4.5rem/1 var(--font-head); color: var(--accent); margin: 0 0 12px; }

/* --- Footer: the center's details beside its links, which are grouped as in the menu --- */
.site-footer { background: var(--gradient); color: #e0f2f1; padding: 36px 0 18px; font-size: .94rem; }
.footer-grid { display: grid; grid-template-columns: minmax(250px, 1fr) minmax(0, 2fr); gap: 24px 56px; align-items: start; }
.footer-about { display: grid; grid-template-columns: auto minmax(0, 1fr); column-gap: 14px; align-items: center; }
.footer-about > :not(.footer-brand, .footer-name) { grid-column: 1 / -1; }
.footer-brand { display: block; margin-bottom: 12px; }
.footer-brand img { display: block; height: 45px; width: auto; }
.footer-about .footer-name { margin-bottom: 12px; }
.site-footer p, .site-footer address { margin: 0 0 .5em; }
.site-footer address { font-style: normal; line-height: 1.65; }
.footer-name { font-weight: 500; color: #fff; line-height: 1.6; }
.footer-reach { display: flex; flex-wrap: wrap; gap: 2px 18px; }
.site-footer a { color: #e0f2f1; }
.site-footer a:hover { color: var(--accent); }
.site-footer i { width: 1.2em; text-align: center; }
.footer-links { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 20px 32px; }
.footer-title { color: #fff; font: 600 1rem/1.4 var(--font-head); display: inline-block; border-bottom: 2px solid var(--accent); padding-bottom: 4px; margin: 0 0 10px; }
.footer-group ul { list-style: none; padding: 0; margin: 0; }
.footer-group li { margin-bottom: 5px; line-height: 1.5; }
.footer-group a { text-decoration: none; }
.footer-group a:hover { text-decoration: underline; }
.social-icons { display: flex; gap: 16px; font-size: 1.5rem; }
.site-footer .social-icons { font-size: 1.25rem; margin-top: 10px; }
.copyright { grid-column: 1 / -1; text-align: right; font-size: .82rem; opacity: .75; border-top: 1px solid rgba(255, 255, 255, .18); padding-top: 12px; margin: 4px 0 0; }

/* --- Smaller screens --- */
@media (max-width: 992px) {
  .news-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 900px) {
  .footer-grid { grid-template-columns: 1fr; gap: 24px; }
}
@media (max-width: 768px) {
  :root { --header: 68px; }
  .logo { height: 46px; }
  .band { padding: 48px 0; }
  .page-title { padding: 40px 0 30px; }
  .member-grid { grid-template-columns: 1fr; }
  .member-card { flex-direction: column; align-items: center; text-align: center; }
  .member-single { text-align: center; }
  .profile-grid { grid-template-columns: 1fr; justify-items: center; text-align: center; gap: 24px; }
  .profile-photo { width: 180px; height: 180px; }
  .profile-contact { justify-content: center; }
  .tags { justify-content: center; }
  .timeline::before { left: 20px; }
  .tl-item, .tl-item:nth-child(even) { width: 100%; margin-left: 0; padding: 0 0 22px 56px; }
  .tl-item:nth-child(odd) .tl-icon, .tl-item:nth-child(even) .tl-icon { left: -56px; right: auto; }
  .tl-item:nth-child(odd) .tl-card::before, .tl-item:nth-child(even) .tl-card::before { left: -7px; right: auto; }
  .news-grid { grid-template-columns: 1fr; }
  .lightbox img { inset: 60px 8px 80px; max-width: calc(100% - 16px); max-height: calc(100% - 140px); }
  .lightbox-prev, .lightbox-next { top: auto; bottom: 12px; transform: none; }
  .lightbox-count { bottom: 26px; }
  .pub-filters { grid-template-columns: 1fr 1fr; }
  .pub-search { grid-column: 1 / -1; }
  .stats { grid-template-columns: 1fr; gap: 22px; }
  .stats-home { grid-template-columns: 1fr 1fr; }
  .stats-3, .stats-5 { grid-template-columns: 1fr 1fr; gap: 12px; }
  .stats-3 li:last-child, .stats-5 li:last-child { grid-column: 1 / -1; }
  .pub-stats { padding: 32px 0; }
  .chart { padding: 14px 12px 12px; }
  .bar { grid-template-columns: minmax(0, 1fr) 2.5em; gap: 2px 10px; }
  .bar-name { grid-column: 1 / -1; }
  .footer-links { grid-template-columns: 1fr 1fr; gap: 18px 24px; }
  .footer-group:last-child:nth-child(odd) { grid-column: 1 / -1; }
  .social-icons { justify-content: center; }
  .site-footer .social-icons { justify-content: flex-start; }
  .contact-grid { grid-template-columns: 1fr; }
  .contact-card .social-icons { justify-content: flex-start; }
  .curriculum-intro, .program-overview, .admission-card { grid-template-columns: 1fr; gap: 28px; }
  .admission-card { padding: 22px; }
  .program-card { grid-template-columns: 1fr; }
  .program-card-year { flex-direction: row; justify-content: flex-start; gap: 10px; padding: 12px 22px; }
  .program-card-year b { font-size: 1.6rem; }
  .program-card-body { padding: 18px 20px; }
  .program-facts { grid-template-columns: 1fr 1fr; gap: 12px; }
  .program-side .tags { justify-content: flex-start; }
  .course { grid-template-columns: minmax(0, 1fr) auto; }
  .course .course-code { grid-column: 1 / -1; margin-bottom: -2px; }
  .copyright { text-align: left; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition: none !important; }
}
