/* q.m@t, editorial layout: one wide reading column, large Montserrat headings
   matching the logo, serif body text, mono for references and dates.
   Deliberately light-only, like most institutional sites. */
:root {
  color-scheme: light;
  --bg: #ffffff;
  --wash: #f1f5f9;
  --ink: #1d2731;
  --slate: #3d4651;          /* logo text */
  --muted: #5c6a78;
  --line: #dce3ea;
  --blue: #2f6fae;           /* logo blue, darkened for text contrast */
  --blue-soft: #e3eef8;
  --warm: #a8471a;
  --warm-soft: #fbece3;
  --f-display: "Montserrat", "Avenir Next", "Helvetica Neue", Arial, sans-serif;
  --f-body: "Source Serif 4", Georgia, "Times New Roman", serif;
  --f-mono: "IBM Plex Mono", ui-monospace, Menlo, monospace;
  --gutter-l: max(16px, env(safe-area-inset-left, 0px));
  --gutter-r: max(16px, env(safe-area-inset-right, 0px));
}
* { box-sizing: border-box; }
html { background: var(--bg); }
body { margin: 0; background: var(--bg); color: var(--ink); font: 400 18px/1.6 var(--f-body); }
a { color: var(--blue); text-underline-offset: 3px; }
a:focus-visible, button:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible {
  outline: 2px solid var(--blue); outline-offset: 2px; }
h1, h2, h3 { font-family: var(--f-display); color: var(--slate); text-wrap: balance; margin: 0; line-height: 1.15; }
h1 { font-size: clamp(36px, 6vw, 64px); font-weight: 700; letter-spacing: -0.02em; }
h2 { font-size: clamp(24px, 3vw, 32px); font-weight: 700; letter-spacing: -0.01em; }
h3 { font-size: 20px; font-weight: 600; }
p { margin: 0; max-width: 66ch; }
img { max-width: 100%; }
.eyebrow { font: 500 12px/1.3 var(--f-mono); letter-spacing: 0.08em; text-transform: uppercase; color: var(--blue); }
.lede { font-size: 21px; line-height: 1.55; color: var(--slate); }
.muted { color: var(--muted); }

/* frame */
header.site { border-bottom: 1px solid var(--line); background: var(--bg); }
.bar, main, .cols, .proto { max-width: 1120px; margin: 0 auto; padding-left: var(--gutter-l); padding-right: var(--gutter-r); }
.bar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px 32px; padding-block: 14px; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--slate); }
.brand b { display: block; font: 700 24px/1 var(--f-display); letter-spacing: -0.01em; }
.brand small { display: block; font: 500 11.5px/1.3 var(--f-display); color: var(--muted); }
nav { display: flex; flex-wrap: wrap; gap: 8px 24px; align-items: center; min-width: 0; }
nav ul { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 4px 18px; }
nav a { font: 600 14px/1 var(--f-display); color: var(--slate); text-decoration: none; padding: 8px 0; display: inline-block; border-bottom: 2px solid transparent; }
nav a:hover { color: var(--blue); }
nav a[aria-current="page"] { border-bottom-color: var(--blue); color: var(--blue); }
nav .areas { gap: 8px; }
nav a.area { padding: 7px 12px 7px 26px; border: 1px solid var(--line); border-radius: 999px; position: relative; }
nav a.area::before { content: ""; position: absolute; left: 11px; top: 50%; width: 8px; height: 7px; margin-top: -2px;
  background: currentColor; border-radius: 1.5px; }
nav a.area::after { content: ""; position: absolute; left: 12px; top: 50%; width: 6px; height: 6px; margin-top: -7px;
  border: 1.5px solid currentColor; border-bottom: 0; border-radius: 4px 4px 0 0; box-sizing: border-box; }
nav a.area[aria-current="page"] { border-color: var(--blue); }
.proto { font: 400 12.5px/1.4 var(--f-mono); color: var(--warm); background: var(--warm-soft); padding-block: 8px; max-width: none; text-align: center; }
main { display: flex; flex-direction: column; gap: 72px; padding-block: 48px 96px; }
footer.site { border-top: 1px solid var(--line); background: var(--wash); font-size: 15px; color: var(--muted); }
footer .cols { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 24px; padding-block: 32px 40px; }
footer b { color: var(--slate); font-family: var(--f-display); font-size: 14px; }

section { display: flex; flex-direction: column; gap: 24px; min-width: 0; }
.section-head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 8px 24px; }
.more { font: 600 14px/1 var(--f-display); text-decoration: none; }
.more::after { content: " →"; }

/* home hero */
.hero { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr); gap: 48px; align-items: center; }
.hero .text { display: flex; flex-direction: column; gap: 22px; }
.hero h1 span { color: var(--blue); }
.hero figure { margin: 0; display: flex; flex-direction: column; gap: 10px; }
.hero figure img { width: 100%; height: auto; display: block; background: var(--wash); border-radius: 4px; padding: 8px; }
figcaption { font: 400 13px/1.5 var(--f-mono); color: var(--muted); max-width: 60ch; }
.actions { display: flex; flex-wrap: wrap; gap: 12px; }
.btn { font: 600 15px/1 var(--f-display); padding: 13px 20px; border-radius: 4px; text-decoration: none; border: 1.5px solid var(--blue); color: var(--blue); background: var(--bg); cursor: pointer; }
.btn.solid { background: var(--blue); color: #fff; }
.btn:hover { filter: brightness(0.94); }
@media (max-width: 820px) { .hero { grid-template-columns: minmax(0, 1fr); gap: 32px; } }

/* themes */
.themes { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); border-top: 1px solid var(--line); }
.themes li { padding: 22px 24px 24px 0; border-bottom: 1px solid var(--line); display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.themes a.t { font: 600 19px/1.25 var(--f-display); color: var(--slate); text-decoration: none; }
.themes a.t:hover { color: var(--blue); }
.themes p { font-size: 16px; color: var(--muted); }
.count { font: 400 12.5px/1 var(--f-mono); color: var(--blue); }

/* papers */
.papers { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; }
.paper { display: flex; flex-direction: column; gap: 4px; padding: 16px 0; border-bottom: 1px solid var(--line); min-width: 0; }
.paper:first-child { padding-top: 0; }
.ptitle { font: 600 18px/1.35 var(--f-body); color: var(--ink); text-decoration: none; }
.ptitle:hover { color: var(--blue); text-decoration: underline; }
.pauth { font-size: 15.5px; color: var(--muted); }
.pauth b { color: var(--ink); font-weight: 600; }
.pref { font: 400 13px/1.6 var(--f-mono); color: var(--muted); display: flex; flex-wrap: wrap; gap: 4px 10px; align-items: center; }
.pref i { font-style: italic; font-family: var(--f-body); font-size: 15px; color: var(--ink); }
.chip { font: 500 11.5px/1 var(--f-mono); padding: 4px 8px; border-radius: 999px; background: var(--blue-soft); color: var(--blue); text-decoration: none; white-space: nowrap; }
.chip.quiet { background: var(--wash); color: var(--muted); }
.year-block { display: grid; grid-template-columns: 88px minmax(0, 1fr); gap: 16px; padding-top: 8px; }
.year-block > h3 { font: 500 15px/1.6 var(--f-mono); color: var(--blue); position: sticky; top: 12px; align-self: start; }
@media (max-width: 560px) { .year-block { grid-template-columns: minmax(0, 1fr); gap: 8px; } .year-block > h3 { position: static; } }
.filters { display: flex; flex-wrap: wrap; gap: 8px; }
.filters button { font: 500 13px/1 var(--f-mono); padding: 8px 12px; border-radius: 999px; border: 1px solid var(--line); background: var(--bg); color: var(--slate); cursor: pointer; }
.filters button[aria-pressed="true"] { background: var(--slate); border-color: var(--slate); color: #fff; }

/* two columns on home */
.split { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); gap: 56px; }
@media (max-width: 820px) { .split { grid-template-columns: minmax(0, 1fr); } }
.news { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 22px; }
.news li { display: grid; grid-template-columns: 76px minmax(0, 1fr); gap: 14px; }
.news time { font: 400 13px/1.6 var(--f-mono); color: var(--muted); padding-top: 3px; }
.news h3 { font-size: 18px; }
.news h3 a { color: var(--slate); text-decoration: none; }
.news h3 a:hover { color: var(--blue); }
.news p { font-size: 16px; color: var(--muted); margin-top: 4px; }
.callout { background: var(--wash); border-radius: 6px; padding: 28px; display: flex; flex-direction: column; gap: 14px; align-self: start; }
.callout ul { margin: 0; padding-left: 1.1em; font-size: 16px; display: flex; flex-direction: column; gap: 6px; }
.callout .level { font: 500 12px/1 var(--f-mono); color: var(--warm); letter-spacing: 0.05em; }

/* people */
.people { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 290px), 1fr)); gap: 28px 24px; }
.person { display: flex; gap: 14px; align-items: flex-start; min-width: 0; }
.person .ph { width: 64px; height: 64px; border-radius: 50%; flex: none; object-fit: cover; background: var(--blue-soft); color: var(--blue);
  display: grid; place-items: center; font: 600 20px/1 var(--f-display); }
.person.big .ph { width: 120px; height: 120px; font-size: 32px; }
.person div { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.person b { font: 600 16.5px/1.3 var(--f-display); color: var(--slate); }
.person span { font-size: 15px; color: var(--muted); overflow-wrap: anywhere; }
.person a { font-size: 14px; }
.people.faculty { grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); }
@media (max-width: 400px) { .people.faculty { grid-template-columns: minmax(0, 1fr); } }

.tablewrap { overflow-x: auto; border-top: 1px solid var(--line); }
table { border-collapse: collapse; width: 100%; font-size: 16px; min-width: 560px; }
th, td { text-align: left; padding: 12px 16px 12px 0; border-bottom: 1px solid var(--line); vertical-align: top; }
th { font: 500 11.5px/1.3 var(--f-mono); letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted); }
td.num { font-variant-numeric: tabular-nums; font-family: var(--f-mono); font-size: 14px; white-space: nowrap; }

/* research page */
.theme-block { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.4fr); gap: 40px; padding-top: 40px; border-top: 1px solid var(--line); scroll-margin-top: 16px; }
.theme-block .intro { display: flex; flex-direction: column; gap: 14px; }
@media (max-width: 820px) { .theme-block { grid-template-columns: minmax(0, 1fr); gap: 20px; } }

/* positions */
.positions { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 16px; }
.positions li { border: 1px solid var(--line); border-radius: 6px; padding: 20px; display: flex; flex-direction: column; gap: 8px; }
.positions .level { font: 500 12px/1 var(--f-mono); color: var(--warm); letter-spacing: 0.05em; }
.positions p { font-size: 16px; color: var(--muted); }
.paths { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 28px; }
.paths div { display: flex; flex-direction: column; gap: 8px; }
.paths p { font-size: 16px; }

/* areas */
.area-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: end; gap: 16px; padding-bottom: 24px; border-bottom: 1px solid var(--line); }
.who { font: 400 13px/1.4 var(--f-mono); color: var(--muted); }
.tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 16px; }
.tile { border: 1px solid var(--line); border-radius: 6px; padding: 20px; display: flex; flex-direction: column; gap: 8px; text-decoration: none; color: var(--ink); min-width: 0; }
a.tile:hover { border-color: var(--blue); }
.tile .k { font: 500 11.5px/1 var(--f-mono); letter-spacing: 0.06em; text-transform: uppercase; color: var(--blue); }
.tile h3 { font-size: 18px; }
.tile p { font-size: 15.5px; color: var(--muted); }
.tile .badge { align-self: flex-start; font: 600 12px/1 var(--f-display); background: var(--warm); color: #fff; border-radius: 999px; padding: 4px 9px; }
.placeholder { font: 400 12.5px/1.4 var(--f-mono); color: var(--warm); }

form.card { border: 1px solid var(--line); border-radius: 6px; padding: 24px; display: flex; flex-direction: column; gap: 16px; }
.field { display: flex; flex-direction: column; gap: 6px; }
.field label { font: 600 14px/1.2 var(--f-display); color: var(--slate); }
.field small { font-size: 14px; color: var(--muted); }
input, select, textarea { font: 400 16px/1.4 var(--f-body); padding: 10px 12px; border: 1px solid var(--line); border-radius: 4px; background: var(--bg); color: var(--ink); width: 100%; }
textarea { min-height: 90px; resize: vertical; }
.grid2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 16px; }
.notice { background: var(--blue-soft); color: var(--slate); border-radius: 6px; padding: 14px 18px; font-size: 16px; }
.ok { color: #2e7d4f; } .bad { color: var(--warm); }
.checks { list-style: none; margin: 0; padding: 0; font: 400 13px/1.6 var(--f-mono); }
.row-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.row-actions .btn { padding: 8px 12px; font-size: 13px; }
.login { max-width: 520px; display: flex; flex-direction: column; gap: 20px; }
.fenix { display: inline-flex; align-items: center; gap: 10px; }

@media (prefers-reduced-motion: no-preference) { a, .btn, .tile { transition: color .15s, border-color .15s, filter .15s; } }

/* publications sub-navigation, theme figures, theses */
.subnav ul { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.subnav a { font: 600 14px/1 var(--f-display); color: var(--slate); text-decoration: none; padding: 9px 14px; border: 1px solid var(--line); border-radius: 999px; display: inline-block; }
.subnav a[aria-current="page"] { background: var(--slate); border-color: var(--slate); color: #fff; }
.theme-fig { margin: 8px 0 0; display: flex; flex-direction: column; gap: 8px; }
.theme-fig img { width: 100%; height: auto; border: 1px solid var(--line); border-radius: 4px; background: #fff; }
.theses { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; }
.theses li { display: grid; grid-template-columns: 64px minmax(0, 1fr); gap: 16px; padding: 14px 0; border-bottom: 1px solid var(--line); }
.theses .yr { font: 400 14px/1.6 var(--f-mono); color: var(--blue); }
.theses b { font: 600 17px/1.3 var(--f-display); color: var(--slate); }
.theses span { display: block; font-size: 15.5px; color: var(--muted); }

/* course pages */
.items { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr)); gap: 0 32px; border-top: 1px solid var(--line); }
.items li { padding: 12px 0; border-bottom: 1px solid var(--line); display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.items a, .items b { font: 600 16.5px/1.35 var(--f-body); }
.items b { color: var(--ink); }
.items span { font-size: 15px; color: var(--muted); }
.news details { margin-top: 6px; }
.news summary { font: 500 13px/1.6 var(--f-mono); color: var(--blue); cursor: pointer; }
.news details p { margin-top: 6px; font-size: 15px; }

/* About: one reading column, question-led sections */
.about { max-width: 720px; display: flex; flex-direction: column; gap: 18px; }
.about h1 { margin-bottom: 4px; }
.about .note { font-style: italic; color: var(--muted); }
.about h2 { font-size: 22px; margin-top: 22px; }
.about ul { margin: 0; padding-left: 1.1em; display: flex; flex-direction: column; gap: 6px; }
.about blockquote { margin: 0; padding: 4px 0 4px 20px; border-left: 3px solid var(--blue); display: flex; flex-direction: column; gap: 8px; }
.about blockquote p { font-style: italic; }
.about blockquote footer { font-size: 15px; color: var(--muted); }
.about .more-links { margin-top: 22px; padding-top: 18px; border-top: 1px solid var(--line); }
.paths.senior { grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); }
.paths.senior .callout { gap: 12px; }
.about .motto { font: 700 clamp(22px, 3vw, 28px)/1.2 var(--f-display); color: var(--slate); letter-spacing: -0.01em; }
.about .motto span { color: var(--blue); }
.people.alumni { grid-template-columns: repeat(auto-fill, minmax(min(100%, 340px), 1fr)); }
.people.alumni .stage { font-size: 14px; line-height: 1.4; }
.people.alumni .stage em { font: 500 12px/1 var(--f-mono); font-style: normal; color: var(--blue); letter-spacing: 0.03em; }
.people.alumni .stage a { font-size: 14px; }
.people.alumni .now { font-size: 14px; color: var(--slate); }

/* Course pages */
.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 240px), 1fr)); gap: 16px; }
.cards .card { border: 1px solid var(--line); border-top: 3px solid var(--blue); border-radius: 6px; padding: 20px; display: flex; flex-direction: column; gap: 8px; }
.cards .card h3 { font-size: 18px; }
.cards .card p { font-size: 15.5px; color: var(--muted); }
.course-table td:first-child { font-family: var(--f-mono); font-size: 14px; white-space: nowrap; }
.course-table td:nth-child(2) { white-space: nowrap; }
.course-table td { font-size: 15px; }
.course-sec > p { font-size: 16px; }
.this-week { border-left: 4px solid var(--warm); }
.course-head .text { display: flex; flex-direction: column; gap: 24px; min-width: 0; }
.course-head.with-cover { display: grid; grid-template-columns: minmax(0, 1fr) minmax(200px, 300px); gap: 48px; align-items: center; }
.course-cover { margin: 0; }
.course-cover img { display: block; width: 100%; height: auto; border-radius: 6px; }
@media (max-width: 720px) { .course-head.with-cover { grid-template-columns: minmax(0, 1fr); gap: 24px; } .course-cover { max-width: 260px; } }

[hidden] { display: none !important; }
