/* GRISE — Empirical Software Engineering Research Group (UPM)
   Visual identity derived from the UPM corporate presentation templates:
   deep navy + royal blue + cyan, Montserrat, uppercase titles, "01." numerals,
   corner brackets and light-grey bands. No frameworks, no external requests. */

@font-face { font-family: "Montserrat"; font-style: normal; font-weight: 300; font-display: swap; src: url("../fonts/montserrat-light.woff2") format("woff2"); }
@font-face { font-family: "Montserrat"; font-style: normal; font-weight: 400; font-display: swap; src: url("../fonts/montserrat-regular.woff2") format("woff2"); }
@font-face { font-family: "Montserrat"; font-style: italic; font-weight: 400; font-display: swap; src: url("../fonts/montserrat-italic.woff2") format("woff2"); }
@font-face { font-family: "Montserrat"; font-style: normal; font-weight: 600; font-display: swap; src: url("../fonts/montserrat-semibold.woff2") format("woff2"); }
@font-face { font-family: "Montserrat"; font-style: normal; font-weight: 700; font-display: swap; src: url("../fonts/montserrat-bold.woff2") format("woff2"); }

:root {
  --navy: #000348;
  --navy-2: #0b1460;
  --royal: #2b2fd1;
  --blue: #1b6fb9;
  --blue-dark: #12558f;
  --cyan: #14a7ed;
  --sky: #e8f3fd;
  --ink: #23252f;
  --muted: #5a5d6b;
  --line: #e2e3e6;
  --bg: #f7f7f7;
  --surface: #ffffff;
  --amber: #fbae40;
  --violet: #8a4fe0;
  --radius: 6px;
  --shadow: 0 1px 2px rgba(0, 3, 72, .06), 0 10px 28px rgba(0, 3, 72, .07);
  --shadow-hover: 0 2px 4px rgba(0, 3, 72, .08), 0 16px 36px rgba(0, 3, 72, .12);
  --maxw: 1200px;
  --gutter: clamp(1rem, 4vw, 2rem);
  --font: "Montserrat", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  --header-h: 76px;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: calc(var(--header-h) + 1rem); }
body {
  margin: 0; font-family: var(--font); font-size: 1rem; line-height: 1.65; color: var(--ink);
  background: var(--surface); text-rendering: optimizeLegibility; -webkit-font-smoothing: antialiased;
}
img, svg { max-width: 100%; height: auto; display: block; }
a { color: var(--blue); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { color: var(--blue-dark); }
a[href^="mailto:"], .mini-people span, td, .course dd { overflow-wrap: anywhere; }
:focus-visible { outline: 3px solid var(--cyan); outline-offset: 2px; border-radius: 2px; }
h1, h2, h3, h4 { line-height: 1.2; margin: 0 0 .6em; color: var(--navy); font-weight: 700; }
h1 { font-size: clamp(1.9rem, 4.2vw, 3.1rem); letter-spacing: .01em; }
h2 { font-size: clamp(1.45rem, 2.6vw, 2rem); text-transform: uppercase; letter-spacing: .03em; }
h3 { font-size: 1.15rem; }
p { margin: 0 0 1em; }
ul, ol { padding-left: 1.2rem; }
small { font-size: .85em; }
abbr[title] { text-decoration: none; cursor: help; }
.visually-hidden { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip-link { position: absolute; left: 1rem; top: -100px; z-index: 100; background: var(--navy); color: #fff; padding: .6rem 1rem; border-radius: var(--radius); }
.skip-link:focus { top: 1rem; color: #fff; }
.container { width: 100%; max-width: var(--maxw); margin: 0 auto; padding: 0 var(--gutter); }

/* ---------- Header ---------- */
.site-header { position: sticky; top: 0; z-index: 50; background: rgba(247, 247, 247, .96); backdrop-filter: saturate(1.2) blur(8px); border-bottom: 1px solid var(--line); }
.site-header.is-scrolled { box-shadow: 0 6px 24px rgba(0, 3, 72, .08); }
.header-inner { display: flex; align-items: center; gap: 1.25rem; min-height: var(--header-h); }
.brand { display: flex; align-items: center; gap: .9rem; text-decoration: none; color: var(--navy); min-width: 0; }
.brand__upm { height: 44px; width: auto; flex: none; }
.brand__divider { width: 1px; align-self: stretch; margin: 14px 0; background: #c9cbd2; flex: none; }
.brand__text { display: flex; flex-direction: column; line-height: 1.1; min-width: 0; }
.brand__name { font-weight: 700; font-size: 1.35rem; letter-spacing: .08em; color: var(--navy); }
.brand__name span { color: var(--cyan); }
.brand__sub { font-size: .68rem; font-weight: 600; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.brand-group { display: flex; align-items: center; gap: .9rem; min-width: 0; }
.brand-group a { text-decoration: none; }

.nav { margin-left: auto; }
.nav ul { list-style: none; margin: 0; padding: 0; display: flex; gap: .15rem; align-items: center; }
.nav a { display: block; padding: .55rem .65rem; font-size: .78rem; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; text-decoration: none; color: var(--ink); border-radius: var(--radius); position: relative; white-space: nowrap; }
@media (max-width: 1240px) and (min-width: 1081px) { .brand__sub { display: none; } }
.nav a:hover { color: var(--blue); background: rgba(27, 111, 185, .07); }
.nav a[aria-current="page"] { color: var(--blue); }
.nav a[aria-current="page"]::after { content: ""; position: absolute; left: .7rem; right: .7rem; bottom: .25rem; height: 2px; background: var(--cyan); }
.nav-toggle { display: none; margin-left: auto; background: none; border: 1px solid var(--line); border-radius: var(--radius); width: 44px; height: 44px; cursor: pointer; color: var(--navy); }
.nav-toggle svg { width: 22px; height: 22px; margin: auto; }

@media (max-width: 1080px) {
  .nav-toggle { display: grid; place-items: center; }
  .nav { position: absolute; left: 0; right: 0; top: 100%; background: var(--surface); border-bottom: 1px solid var(--line); box-shadow: 0 16px 30px rgba(0, 3, 72, .1); display: none; }
  .nav.is-open { display: block; }
  .nav ul { flex-direction: column; align-items: stretch; padding: .5rem var(--gutter) 1rem; gap: 0; }
  .nav a { padding: .85rem .5rem; font-size: .9rem; border-bottom: 1px solid var(--line); border-radius: 0; }
  .nav a[aria-current="page"]::after { left: 0; right: auto; top: .7rem; bottom: .7rem; width: 3px; height: auto; }
}
@media (max-width: 560px) {
  :root { --header-h: 64px; }
  .brand__upm { height: 32px; }
  .brand-group { gap: .6rem; }
  .framed { padding-left: 1.1rem; padding-right: 1.1rem; }
  .brand__name { font-size: 1.15rem; }
  .brand__sub { display: none; }
}
@media (max-width: 340px) { .brand__upm, .brand__divider { display: none; } }

/* ---------- Hero ---------- */
.hero { position: relative; overflow: hidden; color: #fff; background: radial-gradient(120% 140% at 85% 10%, #1a1fae 0%, #0a0f7a 35%, var(--navy) 70%); isolation: isolate; }
.hero__wave { position: absolute; inset: auto 0 0 0; width: 100%; height: 62%; z-index: -1; pointer-events: none; }
.hero__dots { position: absolute; inset: 0; z-index: -1; opacity: .18; background-image: radial-gradient(rgba(255, 255, 255, .55) 1px, transparent 1.2px); background-size: 22px 22px; mask-image: linear-gradient(90deg, transparent 0%, #000 55%, #000 100%); -webkit-mask-image: linear-gradient(90deg, transparent 0%, #000 55%, #000 100%); }
.hero__inner { padding-top: clamp(3.5rem, 9vw, 7rem); padding-bottom: clamp(5.5rem, 12vw, 9rem); }
.framed { position: relative; display: inline-block; padding: clamp(1.4rem, 3.5vw, 2.6rem) clamp(1.4rem, 4vw, 3.2rem); max-width: 860px; }
.framed::before, .framed::after { content: ""; position: absolute; width: clamp(36px, 7vw, 64px); height: clamp(36px, 7vw, 64px); border: 0 solid #fff; }
.framed::before { top: 0; left: 0; border-top-width: 8px; border-left-width: 8px; }
.framed::after { bottom: 0; right: 0; border-bottom-width: 8px; border-right-width: 8px; }
.hero h1 { color: #fff; text-transform: uppercase; letter-spacing: .02em; margin-bottom: .4em; }
.hero__eyebrow { font-size: .8rem; font-weight: 600; letter-spacing: .2em; text-transform: uppercase; color: #9fdcff; margin-bottom: 1rem; }
.hero__lead { font-weight: 300; font-size: clamp(1.05rem, 1.8vw, 1.3rem); max-width: 46ch; color: #e6ecff; margin: 0; }
.hero__actions { display: flex; flex-wrap: wrap; gap: .75rem; margin-top: 2rem; }

.page-hero { position: relative; overflow: hidden; color: #fff; background: linear-gradient(110deg, var(--navy) 0%, #0b118a 55%, var(--royal) 100%); isolation: isolate; }
.page-hero::after { content: ""; position: absolute; right: -10%; bottom: -60%; width: 70%; height: 160%; z-index: -1; background: radial-gradient(closest-side, rgba(20, 167, 237, .45), transparent 70%); }
.page-hero .container { padding-top: clamp(2.2rem, 5vw, 3.5rem); padding-bottom: clamp(2.2rem, 5vw, 3.5rem); }
.page-hero h1 { color: #fff; text-transform: uppercase; margin: 0; }
.page-hero p { color: #dfe6ff; font-weight: 300; font-size: 1.1rem; max-width: 70ch; margin: .6rem 0 0; }
.breadcrumb { font-size: .75rem; letter-spacing: .12em; text-transform: uppercase; margin-bottom: .8rem; color: #a9c9ff; }
.breadcrumb a { color: #fff; text-decoration: none; }
.breadcrumb a:hover { text-decoration: underline; }

/* ---------- Buttons, badges, chips ---------- */
.btn { display: inline-flex; align-items: center; gap: .5rem; padding: .8rem 1.25rem; border-radius: var(--radius); font-weight: 600; font-size: .85rem; letter-spacing: .06em; text-transform: uppercase; text-decoration: none; border: 2px solid transparent; cursor: pointer; transition: background .15s, color .15s, border-color .15s, transform .15s; }
.btn svg { width: 1.1em; height: 1.1em; }
.btn--primary { background: var(--cyan); color: var(--navy); }
.btn--primary:hover { background: #47bcf3; color: var(--navy); transform: translateY(-1px); }
.btn--ghost { border-color: rgba(255, 255, 255, .7); color: #fff; }
.btn--ghost:hover { background: #fff; color: var(--navy); }
.btn--outline { border-color: var(--blue); color: var(--blue); background: transparent; }
.btn--outline:hover { background: var(--blue); color: #fff; }
.link-arrow { font-weight: 600; font-size: .85rem; letter-spacing: .06em; text-transform: uppercase; text-decoration: none; display: inline-flex; align-items: center; gap: .4rem; }
.link-arrow::after { content: "→"; transition: transform .15s; }
.link-arrow:hover::after { transform: translateX(3px); }

.badge { display: inline-block; font-size: .66rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; padding: .2rem .5rem; border-radius: 3px; background: var(--sky); color: var(--blue-dark); white-space: nowrap; }
.badge--journal { background: #e6efff; color: #1f3fa8; }
.badge--conference { background: #e3f6fd; color: #0b6f9e; }
.badge--chapter, .badge--book { background: #f1ecfd; color: #5b33b5; }
.badge--dataset { background: #e8f7ef; color: #1d7a46; }
.badge--thesis { background: #fff3df; color: #8a5300; }
.badge--preprint, .badge--report, .badge--other { background: #eef0f3; color: #4a4e5c; }
.badge--q1 { background: var(--navy); color: #fff; }
.badge--new { background: var(--amber); color: #3a2500; }
.badge--live { background: #e8f7ef; color: #1d7a46; }
.chips { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: .45rem; }
.chips li { font-size: .8rem; font-weight: 500; padding: .35rem .75rem; border-radius: 999px; background: var(--surface); border: 1px solid var(--line); color: var(--ink); }

/* ---------- Sections ---------- */
.section { padding: clamp(3rem, 7vw, 5.5rem) 0; }
.section--grey { background: var(--bg); }
.section--navy { background: var(--navy); color: #e6ecff; }
.section--navy h2, .section--navy h3 { color: #fff; }
.section__head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 1rem; margin-bottom: clamp(1.5rem, 3vw, 2.5rem); }
.section__head h2 { margin: 0; }
.eyebrow { display: inline-flex; align-items: center; gap: .6rem; font-size: .75rem; font-weight: 700; letter-spacing: .18em; text-transform: uppercase; color: var(--blue); margin-bottom: .6rem; }
.eyebrow::before { content: ""; width: 28px; height: 3px; background: var(--cyan); }
.section--navy .eyebrow { color: #9fdcff; }
.lead { font-size: 1.12rem; font-weight: 300; color: var(--muted); max-width: 70ch; }
.prose { max-width: 75ch; }
.prose p { margin-bottom: 1.1em; }
.muted { color: var(--muted); }
.updated { font-size: .8rem; color: var(--muted); }

.grid { display: grid; gap: clamp(1rem, 2.4vw, 1.75rem); }
.grid--2 { grid-template-columns: repeat(auto-fit, minmax(min(100%, 420px), 1fr)); }
.grid--3 { grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr)); }
.grid--4 { grid-template-columns: repeat(auto-fill, minmax(min(100%, 230px), 1fr)); }
.split { display: grid; gap: clamp(1.5rem, 4vw, 3.5rem); grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); align-items: start; }
@media (max-width: 900px) { .split { grid-template-columns: 1fr; } }

.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 1.4rem; box-shadow: var(--shadow); transition: box-shadow .2s, transform .2s; position: relative; }
.card:hover { box-shadow: var(--shadow-hover); }
.card--accent { border-top: 4px solid var(--cyan); }
.card h3 { margin-bottom: .4rem; }
.card p:last-child { margin-bottom: 0; }

/* numbered research lines (template "01." pattern) */
.lines { list-style: none; padding: 0; margin: 0; display: grid; gap: 0; grid-template-columns: repeat(auto-fit, minmax(min(100%, 340px), 1fr)); border-top: 1px solid var(--line); }
.lines li { display: grid; grid-template-columns: auto 1fr; gap: 1.1rem; padding: 1.6rem 1.2rem 1.6rem 0; border-bottom: 1px solid var(--line); }
.lines__num { font-size: 2.3rem; font-weight: 300; color: #7d8090; line-height: 1; min-width: 2.6ch; }
.lines h3 { text-transform: uppercase; font-size: .98rem; letter-spacing: .05em; margin-bottom: .45rem; }
.lines p { margin: 0; color: var(--muted); font-size: .95rem; }
.lines p.line-members { margin-top: .5rem; font-size: .85rem; }
.section--navy .lines, .section--navy .lines li { border-color: rgba(255, 255, 255, .15); }
.section--navy .lines p { color: #c9d4f5; }
.section--navy .lines__num { color: var(--cyan); }

/* stats */
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 1px; background: rgba(255, 255, 255, .15); border: 1px solid rgba(255, 255, 255, .15); }
.stat { background: var(--navy); padding: 1.6rem 1.2rem; text-align: left; }
.stat__num { display: block; font-size: clamp(2rem, 4vw, 2.8rem); font-weight: 700; color: #fff; line-height: 1; }
.stat__label { display: block; margin-top: .5rem; font-size: .75rem; letter-spacing: .14em; text-transform: uppercase; color: #9fdcff; font-weight: 600; }

/* blue info panel */
.panel { background: linear-gradient(135deg, var(--royal), #1d4fd6 55%, var(--blue)); color: #fff; padding: clamp(1.5rem, 3.5vw, 2.5rem); border-radius: var(--radius); }
.panel h2, .panel h3 { color: #fff; }
.panel a { color: #fff; }
.panel .btn--ghost:hover { color: var(--royal); }

/* ---------- People ---------- */
.people-grid { display: grid; gap: clamp(1rem, 2.4vw, 1.6rem); grid-template-columns: repeat(auto-fill, minmax(min(100%, 250px), 1fr)); }
.person { display: flex; flex-direction: column; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); transition: box-shadow .2s, transform .2s; }
.person:hover { box-shadow: var(--shadow-hover); transform: translateY(-2px); }
.person__photo { aspect-ratio: 1; background: linear-gradient(135deg, var(--navy), var(--royal) 70%, var(--cyan)); display: grid; place-items: center; overflow: hidden; position: relative; }
.person__photo::after { content: ""; position: absolute; inset: 0; background-image: radial-gradient(rgba(255, 255, 255, .28) 1px, transparent 1.3px); background-size: 16px 16px; mask-image: linear-gradient(120deg, transparent 20%, #000 90%); -webkit-mask-image: linear-gradient(120deg, transparent 20%, #000 90%); pointer-events: none; }
.person__photo img + .avatar-initials, .person__photo:has(img)::after { display: none; }
.person__photo img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 30%; }
.avatar-initials { font-size: clamp(2.2rem, 5vw, 3rem); font-weight: 300; letter-spacing: .08em; color: #fff; position: relative; z-index: 1; }
.person__body { padding: 1.1rem 1.2rem 1.3rem; display: flex; flex-direction: column; gap: .2rem; flex: 1; }
.person__name { font-size: 1.05rem; margin: 0; }
.person__name a { color: var(--navy); text-decoration: none; }
.person__name a::after { content: ""; position: absolute; inset: 0; }
.person { position: relative; }
.person__role { font-size: .72rem; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--blue); }
.person__pos { font-size: .88rem; color: var(--muted); margin: 0; }
.person__mail { position: relative; z-index: 1; font-size: .82rem; margin-top: auto; padding-top: .6rem; overflow-wrap: anywhere; }
/* tablets: three columns, so that the (small) source portraits are not blown up */
@media (min-width: 561px) and (max-width: 1080px) { .people-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
/* phones: compact horizontal cards (square portrait on the left) */
@media (max-width: 560px) {
  .people-grid { grid-template-columns: 1fr; gap: .9rem; }
  .person { flex-direction: row; }
  .person__photo { flex: 0 0 auto; width: clamp(96px, 30vw, 128px); align-self: stretch; aspect-ratio: auto; min-height: clamp(96px, 30vw, 128px); }
  .person__body { padding: .85rem 1rem; justify-content: center; min-width: 0; }
  .person__mail { margin-top: .2rem; padding-top: .3rem; }
  .avatar-initials { font-size: 1.8rem; }
}

.mini-people { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 280px), 1fr)); gap: .9rem 1.6rem; }
.mini-people li { padding: .9rem 0; border-bottom: 1px solid var(--line); }
.mini-people strong { display: block; color: var(--navy); }
.mini-people span { display: block; font-size: .88rem; color: var(--muted); }

/* profile */
.profile-hero { background: linear-gradient(110deg, var(--navy) 0%, #0b118a 60%, var(--royal) 100%); color: #fff; position: relative; overflow: hidden; isolation: isolate; }
.profile-hero::after { content: ""; position: absolute; right: -8%; top: -40%; width: 55%; height: 180%; z-index: -1; background: radial-gradient(closest-side, rgba(20, 167, 237, .4), transparent 70%); }
.profile-hero .container { display: grid; grid-template-columns: auto 1fr; gap: clamp(1.25rem, 4vw, 2.75rem); align-items: center; padding-top: clamp(2rem, 5vw, 3.25rem); padding-bottom: clamp(2rem, 5vw, 3.25rem); }
.profile-photo { width: clamp(120px, 20vw, 190px); aspect-ratio: 1; border-radius: 50%; overflow: hidden; border: 4px solid rgba(255, 255, 255, .85); background: linear-gradient(135deg, var(--royal), var(--cyan)); display: grid; place-items: center; box-shadow: 0 10px 40px rgba(0, 0, 0, .25); }
.profile-photo img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 25%; }
.profile-hero h1 { color: #fff; margin: 0 0 .25rem; }
.profile-hero .role { color: #9fdcff; font-size: .78rem; letter-spacing: .16em; text-transform: uppercase; font-weight: 700; margin: 0 0 .35rem; }
.profile-hero .position { color: #e1e8ff; font-weight: 300; font-size: 1.1rem; margin: 0 0 .9rem; }
.contact-list { list-style: none; padding: 0; margin: 0 0 1rem; display: flex; flex-wrap: wrap; gap: .4rem 1.4rem; font-size: .92rem; }
.contact-list li { display: flex; align-items: center; gap: .45rem; color: #e1e8ff; }
.contact-list a { color: #fff; }
.contact-list svg { width: 16px; height: 16px; opacity: .85; flex: none; }
.profile-links { display: flex; flex-wrap: wrap; gap: .45rem; }
.profile-links a { font-size: .72rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: #fff; text-decoration: none; padding: .38rem .7rem; border: 1px solid rgba(255, 255, 255, .45); border-radius: 999px; }
.profile-links a:hover { background: #fff; color: var(--navy); }
@media (max-width: 640px) { .profile-hero .container { grid-template-columns: 1fr; text-align: left; } }

.toc { position: sticky; top: var(--header-h); display: flex; flex-wrap: nowrap; overflow-x: auto; gap: .4rem; padding: .7rem 0; z-index: 3; background: rgba(255, 255, 255, .97); border-bottom: 1px solid var(--line); margin: 0 calc(-1 * var(--gutter)); padding-left: var(--gutter); padding-right: var(--gutter); scrollbar-width: none; }
.toc::-webkit-scrollbar { display: none; }
.toc a { white-space: nowrap; flex: none; }
.profile-section { scroll-margin-top: calc(var(--header-h) + 4rem); }
.year-group > .year-heading { top: calc(var(--header-h) + 3.2rem); }
.section .year-group > .year-heading { top: var(--header-h); }
.toc a { font-size: .74rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; text-decoration: none; padding: .4rem .8rem; background: var(--bg); border: 1px solid var(--line); border-radius: 999px; color: var(--ink); }
.toc a:hover { border-color: var(--blue); color: var(--blue); }
.profile-section { padding: 2.2rem 0; border-top: 1px solid var(--line); }
.profile-section:first-of-type { border-top: 0; }
.profile-section > h2 { font-size: 1.25rem; }
.highlights { list-style: none; padding: 0; margin: 0; display: grid; gap: .7rem; }
.highlights li { display: grid; grid-template-columns: 4.2rem 1fr; gap: .8rem; align-items: baseline; }
.highlights .yr { font-weight: 700; color: var(--blue); font-variant-numeric: tabular-nums; }

/* ---------- Publications ---------- */
.filters { display: grid; gap: .75rem; grid-template-columns: minmax(0, 2fr) repeat(3, minmax(0, 1fr)); align-items: end; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 1rem; box-shadow: var(--shadow); margin-bottom: 1.25rem; }
.filters label { display: block; font-size: .68rem; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); margin-bottom: .3rem; }
.filters input, .filters select { width: 100%; font: inherit; font-size: .92rem; padding: .62rem .7rem; border: 1px solid #cfd2da; border-radius: var(--radius); background: #fff; color: var(--ink); min-height: 44px; }
.filters input:focus, .filters select:focus { border-color: var(--blue); outline: 2px solid rgba(20, 167, 237, .35); outline-offset: 0; }
@media (max-width: 860px) { .filters { grid-template-columns: 1fr 1fr; } .filters .f-search { grid-column: 1 / -1; } }
@media (max-width: 460px) { .filters { grid-template-columns: 1fr; } }
.results-bar { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: .6rem; font-size: .88rem; color: var(--muted); margin-bottom: .5rem; }
.results-bar button { font: inherit; font-size: .8rem; font-weight: 600; background: none; border: 0; color: var(--blue); cursor: pointer; padding: .3rem; }
.year-group { margin-top: 1.6rem; }
.year-group > .year-heading { display: flex; align-items: center; gap: .8rem; font-size: 1.5rem; font-weight: 300; color: var(--navy); margin: 0 0 .4rem; position: sticky; top: var(--header-h); background: rgba(255, 255, 255, .96); padding: .4rem 0; z-index: 1; }
.year-group > .year-heading::after { content: ""; flex: 1; height: 1px; background: var(--line); }
.year-group > .year-heading small { font-size: .78rem; font-weight: 600; color: var(--muted); letter-spacing: .06em; }
.pubs { list-style: none; margin: 0; padding: 0; }
.pub { padding: 1rem 0 1.05rem; border-bottom: 1px solid var(--line); display: grid; gap: .25rem; }
.pub__title { font-weight: 600; font-size: 1rem; line-height: 1.45; margin: 0; color: var(--navy); }
.pub__title a { color: var(--navy); text-decoration: none; }
.pub__title a:hover { color: var(--blue); text-decoration: underline; }
.pub__authors, .pub__venue { margin: 0; font-size: .9rem; color: var(--muted); }
.pub__authors .me { color: var(--ink); font-weight: 600; }
.pub__authors a { color: inherit; text-decoration-color: rgba(27, 111, 185, .45); }
.pub__venue em { color: var(--ink); }
.pub__meta { display: flex; flex-wrap: wrap; gap: .4rem; align-items: center; margin-top: .2rem; }
.pub__meta a, .pub__meta button { font: inherit; font-size: .72rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--blue); background: none; border: 1px solid #cfe0f1; border-radius: 3px; padding: .18rem .5rem; text-decoration: none; cursor: pointer; }
.pub__meta a:hover, .pub__meta button:hover { background: var(--blue); color: #fff; border-color: var(--blue); }
.pub__bib { margin: .5rem 0 0; background: #0d1233; color: #d9e3ff; font-size: .78rem; line-height: 1.5; padding: .9rem 1rem; border-radius: var(--radius); overflow-x: auto; white-space: pre; position: relative; }
.pub.is-hidden, .year-group.is-hidden { display: none; }
.empty-msg { padding: 2rem 0; text-align: center; color: var(--muted); }
.copy-ok { color: #1d7a46 !important; border-color: #1d7a46 !important; }

/* ---------- Tables / lists ---------- */
.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); box-shadow: var(--shadow); }
table { border-collapse: collapse; width: 100%; font-size: .92rem; }
th, td { text-align: left; padding: .8rem 1rem; border-bottom: 1px solid var(--line); vertical-align: top; }
th { font-size: .7rem; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); background: var(--bg); font-weight: 700; white-space: nowrap; }
tr:last-child td { border-bottom: 0; }
td .sub { display: block; color: var(--muted); font-size: .85rem; }

.course { display: flex; flex-direction: column; gap: .35rem; }
.course h3 { font-size: 1.02rem; margin: 0; }
.course .en { color: var(--muted); font-size: .88rem; font-style: italic; margin: 0; }
.course dl { display: grid; grid-template-columns: auto 1fr; gap: .2rem .8rem; margin: .5rem 0 0; font-size: .86rem; }
.course dt { color: var(--muted); font-weight: 600; }
.course dd { margin: 0; }
.course .card-links { margin-top: auto; padding-top: .7rem; }
.course__thanks { margin: .6rem 0 0; font-size: .82rem; color: var(--muted); }

/* Acknowledgements (Teaching page) */
.thanks h2 { margin-top: 0; }
.thanks-lead { max-width: 70ch; color: var(--muted); margin: 0 0 1.4rem; }
.thanks-grid { display: grid; gap: 1.2rem; grid-template-columns: repeat(auto-fit, minmax(min(100%, 380px), 1fr)); }
.thanks-card { display: flex; gap: 1.4rem; align-items: center; background: var(--surface); border: 1px solid var(--line); border-left: 4px solid var(--cyan); border-radius: var(--radius); padding: 1.2rem 1.4rem; box-shadow: var(--shadow); }
.thanks-card__logo-box { flex: 0 0 150px; display: flex; align-items: center; justify-content: center; min-height: 72px; text-decoration: none; }
.thanks-card__logo { max-width: 150px; max-height: 56px; width: auto; height: auto; object-fit: contain; }
.thanks-card__name { font-weight: 700; font-size: 1.2rem; color: var(--navy); text-align: center; }
.thanks-card h3 { margin: 0 0 .3rem; font-size: 1.05rem; }
.thanks-card p { margin: 0 0 .4rem; font-size: .92rem; }
.thanks-card .thanks-card__link { font-size: .85rem; margin: 0; }
@media (max-width: 520px) { .thanks-card { flex-direction: column; align-items: flex-start; } .thanks-card__logo-box { flex-basis: auto; justify-content: flex-start; } }
.degree-block { margin-bottom: 2.4rem; }
.degree-block > .degree-heading { font-size: .85rem; letter-spacing: .12em; text-transform: uppercase; color: var(--blue); border-bottom: 2px solid var(--cyan); display: inline-block; padding-bottom: .3rem; margin-bottom: 1.1rem; }

.timeline { list-style: none; margin: 0; padding: 0; border-left: 2px solid var(--line); }
.timeline li { position: relative; padding: 0 0 1.4rem 1.4rem; }
.timeline li::before { content: ""; position: absolute; left: -7px; top: .45rem; width: 12px; height: 12px; border-radius: 50%; background: #fff; border: 3px solid var(--cyan); }
.timeline time { display: block; font-size: .74rem; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--blue); }
.timeline h3 { font-size: 1rem; margin: .15rem 0 .25rem; }
.timeline p { margin: 0; color: var(--muted); font-size: .93rem; }

.project { display: flex; flex-direction: column; gap: .4rem; }
.project h3 { font-size: 1rem; margin: 0; }
.project .ref { font-size: .78rem; font-weight: 600; letter-spacing: .04em; color: var(--muted); }
.project .meta { font-size: .86rem; color: var(--muted); margin: 0; }

.thesis { padding: 1.1rem 0; border-bottom: 1px solid var(--line); display: grid; grid-template-columns: 4.5rem 1fr; gap: 1rem; }
.thesis .yr { font-size: 1.4rem; font-weight: 300; color: var(--blue); font-variant-numeric: tabular-nums; }
.thesis h3 { font-size: 1rem; margin: 0 0 .2rem; }
.thesis p { margin: 0; font-size: .9rem; color: var(--muted); }
@media (max-width: 520px) { .thesis { grid-template-columns: 1fr; gap: .2rem; } }

.news-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 1rem; }
.news-item { display: grid; grid-template-columns: 5.5rem 1fr; gap: 1rem; padding: 1rem 0; border-bottom: 1px solid var(--line); }
.news-item time { font-size: .74rem; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--blue); line-height: 1.3; }
.news-item time strong { display: block; font-size: 1.6rem; font-weight: 300; color: var(--navy); letter-spacing: 0; }
.news-item h3 { font-size: 1rem; margin: 0 0 .25rem; }
.news-item p { margin: 0; color: var(--muted); font-size: .93rem; }

.contact-card dl { display: grid; grid-template-columns: auto 1fr; gap: .6rem 1.2rem; margin: 0; }
.contact-card dt { font-size: .72rem; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); padding-top: .15rem; }
.contact-card dd { margin: 0; }
.map-frame { border: 0; width: 100%; aspect-ratio: 4 / 3; border-radius: var(--radius); background: var(--bg); }

/* ---------- Footer ---------- */
.site-footer { background: var(--navy); color: #c4cdf0; font-size: .9rem; position: relative; overflow: hidden; }
.site-footer::before { content: ""; position: absolute; left: 0; right: 0; top: 0; height: 4px; background: linear-gradient(90deg, var(--cyan), var(--royal) 55%, var(--violet)); }
.footer-grid { display: grid; gap: 2rem; grid-template-columns: 1.4fr 1fr 1fr; padding: 3.2rem 0 2.2rem; }
@media (max-width: 860px) { .footer-grid { grid-template-columns: 1fr; } }
.site-footer h2 { font-size: .75rem; letter-spacing: .16em; color: #fff; margin-bottom: 1rem; }
.site-footer a { color: #fff; }
.site-footer ul { list-style: none; padding: 0; margin: 0; display: grid; gap: .45rem; }
.footer-logo { height: 46px; width: auto; margin-bottom: 1rem; }
.footer-bottom { border-top: 1px solid rgba(255, 255, 255, .12); padding: 1.1rem 0 1.4rem; display: flex; flex-wrap: wrap; justify-content: space-between; gap: .6rem; font-size: .78rem; color: #97a3d6; }

.to-top { position: fixed; right: 1rem; bottom: 1rem; width: 44px; height: 44px; border-radius: 50%; border: 0; background: var(--navy); color: #fff; box-shadow: var(--shadow); cursor: pointer; opacity: 0; visibility: hidden; transition: opacity .2s; z-index: 40; display: grid; place-items: center; }
.to-top.is-visible { opacity: 1; visibility: visible; }
.to-top svg { width: 20px; height: 20px; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition: none !important; animation: none !important; }
}
@media print {
  .site-header, .site-footer, .filters, .toc, .to-top, .hero__wave, .pub__meta button { display: none !important; }
  .hero, .page-hero, .profile-hero { background: none !important; color: #000; }
  .hero h1, .page-hero h1, .profile-hero h1 { color: #000; }
  a { color: #000; }
}
.footer-note { font-size: .8rem; color: #97a3d6; }
.appendix-list { columns: 2 380px; column-gap: 2.5rem; padding-left: 1.1rem; } .appendix-list li { break-inside: avoid; margin-bottom: .55rem; } .appendix-list .muted { font-size: .8rem; }
.project-note { font-style: italic; }

/* ---------- Accessibility and no-JS refinements (review 2026-11) ---------- */
:root { --focus: #0b6f9e; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; }
.hero, .page-hero, .profile-hero, .section--navy, .site-footer, .panel { --focus: #7fd3ff; }
html:not(.js) .js-only { display: none !important; }
.hero .btn--ghost { background: rgba(0, 3, 72, .6); }
.hero .btn--ghost:hover { background: #fff; }
.filters input, .filters select { border-color: #767a87; }
.filters input:focus-visible, .filters select:focus-visible { outline: 3px solid var(--focus); outline-offset: 1px; }
.filters .f-export { align-self: end; }
.filters .f-export .btn { width: 100%; justify-content: center; }
.results-count { margin: 0; }
.year-group > .year-heading { text-transform: none; letter-spacing: 0; }
.profile-section .year-group > .year-heading { top: calc(var(--header-h) + 3.6rem); }
html:has(.toc) { scroll-padding-top: calc(var(--header-h) + 4.5rem); }
html:has(.year-group) { scroll-padding-top: calc(var(--header-h) + 3.5rem); }
.degree-block > .degree-heading { font-size: .85rem; letter-spacing: .12em; text-transform: uppercase; color: var(--blue); }
.theses-list { list-style: none; padding: 0; margin: 0; }
.pub__bibbox[open] { flex-basis: 100%; }
.pub__bibbox > summary { display: inline-block; list-style: none; cursor: pointer; font-size: .72rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--blue); border: 1px solid #cfe0f1; border-radius: 3px; padding: .18rem .5rem; }
.pub__bibbox > summary::-webkit-details-marker { display: none; }
.pub__bibbox > summary:hover, .pub__bibbox[open] > summary { background: var(--blue); color: #fff; border-color: var(--blue); }
.pub__bibbox [data-copy] { margin-top: .4rem; }
@media (max-width: 1080px) {
  .js .nav { max-height: calc(100vh - var(--header-h)); max-height: calc(100dvh - var(--header-h)); overflow-y: auto; overscroll-behavior: contain; }
  html:not(.js) .nav-toggle { display: none; }
  html:not(.js) .header-inner { flex-wrap: wrap; }
  html:not(.js) .nav { display: block; position: static; box-shadow: none; border: 0; width: 100%; margin: 0 0 .5rem; }
  html:not(.js) .nav ul { flex-direction: row; flex-wrap: wrap; padding: 0; gap: .25rem; }
  html:not(.js) .nav a { border: 0; padding: .4rem .6rem; }
}
@media (max-width: 600px) {
  .toc { position: static; flex-wrap: wrap; overflow: visible; margin: 0; padding-left: 0; padding-right: 0; border-bottom: 0; }
  .profile-section .year-group > .year-heading { top: var(--header-h); }
  html:has(.toc) { scroll-padding-top: calc(var(--header-h) + 1rem); }
  .pub__bib { white-space: pre-wrap; overflow-wrap: anywhere; }
}
html:not(.js) .site-header { position: static; }
