/* Isabela Birs — personal research website */

:root {
  color-scheme: light;
  --paper: #ffffff;
  --surface: #ffffff;
  --tint: #f7f6f2;
  --ink: #1f2430;
  --ink-2: #4a5160;
  --muted: #8a909b;
  --rule: #ecebe6;
  --rule-strong: #d9d7cf;
  --accent: #2d4f7c;
  --accent-ink: #ffffff;
  --accent-soft: #f2f5f9;
  --mark: #a5473a;
  --ok: #3f7a5a;

  --serif: "Newsreader", "Iowan Old Style", Georgia, serif;
  --sans: "Inter", -apple-system, "Segoe UI", Roboto, sans-serif;
  --mono: "IBM Plex Mono", ui-monospace, Menlo, monospace;

  --max: 1120px;
  --gutter: clamp(16px, 4vw, 40px);
}

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.65;
  font-feature-settings: "cv11", "ss01";
  -webkit-font-smoothing: antialiased;
}

a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: 3px; }

img { max-width: 100%; display: block; }

.wrap { max-width: var(--max); margin: 0 auto; padding: 0 var(--gutter); }

.skip { position: absolute; left: -999px; }
.skip:focus { left: 16px; top: 16px; background: var(--surface); padding: 8px 12px; z-index: 10; }

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

.site-header {
  border-bottom: 1px solid var(--rule);
  background: color-mix(in srgb, var(--paper) 92%, transparent);
  backdrop-filter: saturate(1.2) blur(8px);
  position: sticky; top: 0; z-index: 5;
}
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; gap: 24px; min-height: 68px; }

.brand { display: flex; flex-direction: column; color: var(--ink); line-height: 1.2; }
.brand:hover { text-decoration: none; }
.brand-name { font-family: var(--serif); font-size: 20px; font-weight: 600; letter-spacing: -0.01em; }
.brand-sub { font-size: 12px; color: var(--muted); letter-spacing: 0.02em; }

.nav { display: flex; gap: 4px; flex-wrap: wrap; }
.nav a {
  color: var(--ink-2); font-size: 14px; font-weight: 500;
  padding: 8px 12px; border-radius: 6px;
}
.nav a:hover { background: var(--accent-soft); color: var(--ink); text-decoration: none; }
.nav a[aria-current="page"] { color: var(--accent); background: var(--accent-soft); }

.nav-toggle { display: none; }

@media (max-width: 820px) {
  .site-header .wrap { flex-wrap: wrap; min-height: 60px; padding-top: 10px; padding-bottom: 10px; }
  .nav-toggle {
    display: inline-flex; align-items: center; gap: 8px;
    background: none; border: 1px solid var(--rule-strong); border-radius: 6px;
    color: var(--ink); font: 500 14px var(--sans); padding: 6px 12px; cursor: pointer;
  }
  .nav { display: none; width: 100%; flex-direction: column; padding: 8px 0 4px; }
  .nav.open { display: flex; }
  .nav a { padding: 10px 8px; }
}

/* ---------- Typography ---------- */

h1, h2, h3, h4 { font-family: var(--serif); font-weight: 600; letter-spacing: -0.015em; line-height: 1.2; margin: 0; color: var(--ink); }
h1 { font-size: clamp(38px, 5.6vw, 60px); font-weight: 600; letter-spacing: -0.025em; }
h2 { font-size: clamp(26px, 3.2vw, 34px); }
h3 { font-size: 21px; }
p { margin: 0 0 1em; }

.eyebrow {
  font-family: var(--sans); font-size: 12px; font-weight: 600;
  letter-spacing: 0.14em; text-transform: uppercase; color: var(--muted);
  margin: 0 0 14px;
}
.lead { font-size: clamp(18px, 2vw, 20px); line-height: 1.6; color: var(--ink-2); max-width: 46em; }
.muted { color: var(--muted); }
.mono { font-family: var(--mono); font-size: 0.9em; }

/* ---------- Sections ---------- */

.section { padding: clamp(56px, 8vw, 96px) 0; border-bottom: 1px solid var(--rule); }
.section:last-of-type { border-bottom: 0; }
.section-head { display: grid; grid-template-columns: 1fr auto; align-items: end; gap: 16px; margin-bottom: 36px; }
.section-head p { margin: 10px 0 0; color: var(--muted); max-width: 44em; }
.section-head .more { font-size: 14px; font-weight: 500; white-space: nowrap; }
@media (max-width: 640px) { .section-head { grid-template-columns: 1fr; } }

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

.hero { padding: clamp(56px, 9vw, 112px) 0 clamp(48px, 7vw, 88px); border-bottom: 1px solid var(--rule); }
.hero-grid { display: grid; grid-template-columns: minmax(0, 1fr) 280px; gap: clamp(32px, 6vw, 80px); align-items: center; }
.hero h1 { margin-bottom: 18px; }
.hero .affil { font-size: 17px; color: var(--ink-2); margin-bottom: 26px; }
.hero .affil strong { color: var(--ink); font-weight: 600; }
.hero .lead { margin-bottom: 32px; }

.portrait {
  aspect-ratio: 4 / 5; width: 100%;
  border-radius: 4px; overflow: hidden;
  background: linear-gradient(160deg, var(--accent-soft), var(--rule));
  border: 1px solid var(--rule);
  display: grid; place-items: center;
  position: relative;
}
.portrait img { width: 100%; height: 100%; object-fit: cover; }
.portrait .monogram { font-family: var(--serif); font-size: 84px; color: var(--accent); opacity: 0.55; letter-spacing: -0.04em; }

@media (max-width: 820px) {
  .hero-grid { grid-template-columns: 1fr; }
  .portrait { max-width: 200px; order: -1; }
}

.actions { display: flex; flex-wrap: wrap; gap: 12px; }
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 11px 18px; border-radius: 6px;
  font-size: 14px; font-weight: 600; line-height: 1;
  border: 1px solid var(--accent); background: var(--accent); color: var(--accent-ink);
}
.btn:hover { text-decoration: none; filter: brightness(1.08); }
.btn.ghost { background: transparent; color: var(--accent); border-color: var(--rule-strong); }
.btn.ghost:hover { border-color: var(--accent); background: var(--accent-soft); filter: none; }
.btn svg { width: 16px; height: 16px; flex: none; }

/* ---------- Facts strip ---------- */

.facts { display: grid; grid-template-columns: repeat(3, 1fr); border-top: 1px solid var(--rule); margin-top: 56px; }
.fact { padding: 22px 20px 0 0; }
.fact + .fact { padding-left: 20px; border-left: 1px solid var(--rule); }
.fact .num { font-family: var(--serif); font-size: 34px; font-weight: 600; line-height: 1; letter-spacing: -0.02em; }
.fact .lbl { font-size: 13px; color: var(--muted); margin-top: 8px; }
@media (max-width: 720px) {
  .facts { grid-template-columns: 1fr 1fr; }
  .fact:nth-child(3) { padding-left: 0; border-left: 0; }
  .fact { padding-bottom: 18px; }
}

/* ---------- Cards / grids ---------- */

.grid-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px; }
@media (max-width: 900px) { .grid-3 { grid-template-columns: 1fr 1fr; } }
@media (max-width: 720px) { .grid-2, .grid-3 { grid-template-columns: 1fr; } }

.card {
  background: var(--surface); border: 1px solid var(--rule); border-radius: 6px;
  padding: 28px; display: flex; flex-direction: column;
}
.card h3 { margin-bottom: 10px; }
.card h3 a { color: var(--ink); }
.card p { color: var(--ink-2); font-size: 15px; }
.card .card-foot { margin-top: auto; padding-top: 18px; border-top: 1px solid var(--rule); display: flex; flex-wrap: wrap; gap: 8px 18px; font-size: 14px; font-weight: 500; }

.meta { display: flex; flex-wrap: wrap; gap: 6px 10px; margin-bottom: 14px; align-items: center; }
.tag {
  display: inline-block; font-size: 11.5px; font-weight: 600; letter-spacing: 0.04em;
  padding: 3px 8px; border-radius: 4px; border: 1px solid var(--rule-strong); color: var(--ink-2);
  text-transform: uppercase;
}
.tag.code { font-family: var(--mono); text-transform: none; letter-spacing: 0; font-weight: 500; }
.tag.live { color: var(--ok); border-color: color-mix(in srgb, var(--ok) 45%, transparent); }
.tag.done { color: var(--muted); }

/* ---------- Research themes ---------- */

.themes { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0; border-top: 1px solid var(--ink); }
.theme { padding: 24px 24px 8px 0; }
.theme + .theme { padding-left: 24px; border-left: 1px solid var(--rule); }
.theme .n { font-family: var(--mono); font-size: 12px; color: var(--muted); }
.theme h3 { margin: 8px 0 10px; font-size: 19px; }
.theme p { font-size: 15px; color: var(--ink-2); }
@media (max-width: 820px) {
  .themes { grid-template-columns: 1fr; }
  .theme, .theme + .theme { padding: 20px 0 4px; border-left: 0; border-bottom: 1px solid var(--rule); }
}

/* ---------- Page header ---------- */

.page-head { padding: clamp(48px, 7vw, 88px) 0 clamp(36px, 5vw, 56px); border-bottom: 1px solid var(--rule); }
.page-head h1 { font-size: clamp(34px, 4.6vw, 50px); margin-bottom: 16px; max-width: 22em; }
.crumbs { font-size: 13px; color: var(--muted); margin-bottom: 18px; }
.crumbs a { color: var(--muted); }

/* ---------- Project detail ---------- */

.detail { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: clamp(32px, 6vw, 72px); padding: clamp(40px, 6vw, 72px) 0; }
@media (max-width: 900px) { .detail { grid-template-columns: 1fr; } }
.prose h2 { font-size: 26px; margin: 44px 0 14px; }
.prose h2:first-child { margin-top: 0; }
.prose p, .prose li { color: var(--ink-2); font-size: 17px; }
.prose ul { padding-left: 1.2em; margin: 0 0 1em; }
.prose li { margin-bottom: 8px; }
.prose li::marker { color: var(--muted); }

.factsheet { border: 1px solid var(--rule); border-radius: 6px; background: var(--surface); position: sticky; top: 92px; }
.factsheet h3 { font-family: var(--sans); font-size: 12px; font-weight: 600; letter-spacing: 0.14em; text-transform: uppercase; color: var(--muted); padding: 18px 22px; border-bottom: 1px solid var(--rule); }
.factsheet dl { margin: 0; padding: 6px 22px 12px; }
.factsheet dt { font-size: 12px; color: var(--muted); margin-top: 14px; }
.factsheet dd { margin: 2px 0 0; font-size: 15px; font-weight: 500; color: var(--ink); }

/* ---------- Deliverables / reports ---------- */

.docs { border-top: 1px solid var(--ink); margin-top: 8px; }
.doc {
  display: grid; grid-template-columns: 44px minmax(0, 1fr) auto; gap: 18px; align-items: center;
  padding: 20px 0; border-bottom: 1px solid var(--rule);
}
.doc .ico {
  width: 44px; height: 54px; border: 1px solid var(--rule-strong); border-radius: 3px;
  display: grid; place-items: end center; padding-bottom: 6px;
  font: 600 9.5px var(--mono); color: var(--mark); background: var(--surface);
  position: relative;
}
.doc .ico::before { content: ""; position: absolute; top: -1px; right: -1px; width: 12px; height: 12px; background: linear-gradient(225deg, var(--paper) 50%, var(--rule-strong) 50%); }
.doc h4 { font-family: var(--sans); font-size: 16px; font-weight: 600; letter-spacing: 0; }
.doc .sub { font-size: 14px; color: var(--muted); margin-top: 2px; }
.doc .pending { font-size: 13px; color: var(--muted); font-style: italic; white-space: nowrap; }
@media (max-width: 560px) {
  .doc { grid-template-columns: 44px 1fr; }
  .doc > :last-child { grid-column: 2; justify-self: start; }
}

/* ---------- Outputs (software / data) ---------- */

.output { display: grid; grid-template-columns: 220px minmax(0, 1fr); gap: clamp(24px, 5vw, 64px); padding: clamp(44px, 6vw, 72px) 0; border-bottom: 1px solid var(--rule); }
.output:last-child { border-bottom: 0; }
@media (max-width: 820px) { .output { grid-template-columns: 1fr; gap: 16px; } }
.output-kind .eyebrow { margin-bottom: 8px; }
.output-kind .big { font-family: var(--serif); font-size: 15px; color: var(--muted); }
.output h2 { margin-bottom: 14px; }
.output .prose p { font-size: 16.5px; }

.kv { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); border: 1px solid var(--rule); border-radius: 6px; background: var(--surface); margin: 24px 0; }
.kv div { padding: 16px 18px; }
.kv div + div { border-left: 1px solid var(--rule); }
.kv .num { font-family: var(--serif); font-size: 26px; font-weight: 600; line-height: 1.1; }
.kv .lbl { font-size: 12.5px; color: var(--muted); margin-top: 4px; }
@media (max-width: 720px) {
  .kv { grid-template-columns: 1fr 1fr; }
  .kv div:nth-child(3) { border-left: 0; }
  .kv div:nth-child(n+3) { border-top: 1px solid var(--rule); }
}

.cite {
  background: var(--surface); border: 1px solid var(--rule); border-left: 3px solid var(--accent);
  padding: 16px 18px; border-radius: 0 6px 6px 0; font-size: 14.5px; color: var(--ink-2); margin: 20px 0;
  position: relative;
}
.cite .lbl { font-size: 11.5px; font-weight: 600; letter-spacing: 0.12em; text-transform: uppercase; color: var(--muted); display: block; margin-bottom: 6px; }
.copy {
  position: absolute; top: 10px; right: 10px;
  font: 500 12px var(--sans); color: var(--muted);
  background: transparent; border: 1px solid var(--rule-strong); border-radius: 4px; padding: 3px 8px; cursor: pointer;
}
.copy:hover { color: var(--ink); border-color: var(--ink-2); }

.files { list-style: none; padding: 0; margin: 12px 0 24px; border-top: 1px solid var(--rule); font-size: 14.5px; }
.files li { display: flex; justify-content: space-between; gap: 16px; padding: 10px 0; border-bottom: 1px solid var(--rule); }
.files code { font-family: var(--mono); font-size: 13.5px; color: var(--ink); }
.files span { color: var(--muted); text-align: right; }

/* ---------- Identifiers ---------- */

.ids { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 0; border: 1px solid var(--rule); border-radius: 6px; background: var(--surface); }
.id { padding: 22px; color: var(--ink); display: block; }
.id + .id { border-left: 1px solid var(--rule); }
.id:hover { background: var(--accent-soft); text-decoration: none; }
.id .k { font-size: 12px; font-weight: 600; letter-spacing: 0.12em; text-transform: uppercase; color: var(--muted); }
.id .v { font-family: var(--mono); font-size: 14.5px; margin-top: 8px; color: var(--accent); word-break: break-all; }
.id .d { font-size: 13px; color: var(--muted); margin-top: 6px; }
@media (max-width: 820px) {
  .ids { grid-template-columns: 1fr 1fr; }
  .id:nth-child(3) { border-left: 0; }
  .id:nth-child(n+3) { border-top: 1px solid var(--rule); }
}
@media (max-width: 480px) {
  .ids { grid-template-columns: 1fr; }
  .id + .id { border-left: 0; border-top: 1px solid var(--rule); }
}

/* ---------- Publications ---------- */

.pub-tools { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin: 0 0 32px; }
.pub-tools input {
  flex: 1 1 260px; min-width: 0; font: 15px var(--sans); color: var(--ink);
  padding: 10px 14px; border: 1px solid var(--rule-strong); border-radius: 6px; background: var(--surface);
}
.pub-tools input:focus { outline: 2px solid var(--accent); outline-offset: 1px; }
.filter { display: flex; flex-wrap: wrap; gap: 6px; }
.filter button {
  font: 500 13px var(--sans); color: var(--ink-2); background: var(--surface);
  border: 1px solid var(--rule-strong); border-radius: 999px; padding: 7px 14px; cursor: pointer;
}
.filter button[aria-pressed="true"] { background: var(--ink); color: var(--paper); border-color: var(--ink); }

.year { display: grid; grid-template-columns: 100px minmax(0, 1fr); gap: 24px; border-top: 1px solid var(--ink); padding-top: 16px; margin-bottom: 36px; }
.year > h2 { font-size: 24px; color: var(--muted); font-weight: 500; }
@media (max-width: 640px) { .year { grid-template-columns: minmax(0, 1fr); gap: 6px; } }
.pubs { list-style: none; margin: 0; padding: 0; }
.pub { padding: 0 0 18px; margin-bottom: 18px; border-bottom: 1px solid var(--rule); }
.pub:last-child { border-bottom: 0; margin-bottom: 0; }
.pub .t, .pub .v, .pub .l a { overflow-wrap: anywhere; }
.pub .t { font-family: var(--serif); font-size: 18px; font-weight: 500; line-height: 1.4; color: var(--ink); }
.pub .v { font-size: 14.5px; color: var(--muted); margin-top: 4px; font-style: italic; }
.pub .l { font-size: 13.5px; margin-top: 6px; display: flex; gap: 14px; flex-wrap: wrap; align-items: center; }
.pub .l .tag { font-size: 10.5px; padding: 2px 6px; }
.pub.hl .t::before { content: ""; display: inline-block; width: 6px; height: 6px; border-radius: 50%; background: var(--mark); margin: 0 10px 3px 0; }

.selected { list-style: none; padding: 0; margin: 0; border-top: 1px solid var(--ink); }
.selected li { display: grid; grid-template-columns: 64px minmax(0, 1fr); gap: 16px; padding: 18px 0; border-bottom: 1px solid var(--rule); }
.selected .y { font-family: var(--mono); font-size: 13px; color: var(--muted); padding-top: 4px; }

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

.contact-grid { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); gap: clamp(32px, 6vw, 80px); }
@media (max-width: 820px) { .contact-grid { grid-template-columns: 1fr; } }
.contact-list { list-style: none; padding: 0; margin: 0; border-top: 1px solid var(--rule); }
.contact-list li { display: grid; grid-template-columns: 120px minmax(0, 1fr); gap: 16px; padding: 14px 0; border-bottom: 1px solid var(--rule); font-size: 15px; }
.contact-list .k { color: var(--muted); font-size: 13px; padding-top: 2px; }

.site-footer { border-top: 1px solid var(--rule); padding: 36px 0 44px; font-size: 13.5px; color: var(--muted); }
.site-footer .wrap { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 16px 32px; }
.site-footer nav { display: flex; flex-wrap: wrap; gap: 6px 20px; }
.site-footer a { color: var(--ink-2); }

.ack { font-size: 13px; color: var(--muted); border-top: 1px solid var(--rule); padding-top: 18px; margin-top: 28px; }

@media print {
  .site-header, .site-footer, .pub-tools, .copy, .nav-toggle { display: none !important; }
  body { background: #fff; }
}

.mini { margin: 4px 0 0; display: grid; grid-template-columns: 96px minmax(0, 1fr); gap: 6px 14px; font-size: 14px; }
.mini dt { color: var(--muted); }
.mini dd { margin: 0; color: var(--ink); font-weight: 500; }

/* ---------- Light, refined finish ---------- */

body { font-size: 16px; line-height: 1.75; font-weight: 400; }

h1, h2, h3, h4 { font-weight: 400; letter-spacing: -0.01em; }
h1 { font-weight: 300; letter-spacing: -0.02em; line-height: 1.08; }
.hero h1 { font-size: clamp(44px, 6.4vw, 76px); }
.page-head h1 { font-weight: 300; }
h2 { font-weight: 300; }
h3 { font-weight: 400; }
.brand-name { font-weight: 400; font-size: 21px; }

.eyebrow { font-weight: 500; letter-spacing: 0.22em; font-size: 11px; color: var(--accent); }
.lead { font-weight: 300; color: var(--ink-2); }

.site-header { background: rgba(255,255,255,0.9); border-bottom-color: transparent; box-shadow: 0 1px 0 var(--rule); }
.nav a { font-weight: 400; color: var(--ink-2); border-radius: 0; padding: 8px 2px; margin: 0 10px; border-bottom: 1px solid transparent; }
.nav a:hover { background: none; border-bottom-color: var(--rule-strong); }
.nav a[aria-current="page"] { background: none; color: var(--ink); border-bottom-color: var(--accent); }
@media (max-width: 820px) { .nav a { margin: 0; } }

.hero { padding-top: clamp(64px, 11vw, 140px); border-bottom: 0; }
.section { border-bottom: 0; }
.section:nth-of-type(even) { background: var(--tint); }
.page-head { border-bottom: 0; background: var(--tint); }

.portrait { border-radius: 2px; border: 0; box-shadow: 0 30px 60px -30px rgba(31,36,48,0.35); background: var(--tint); }

.btn { font-weight: 500; border-radius: 2px; padding: 13px 22px; letter-spacing: 0.02em; }
.btn.ghost { border-color: var(--rule-strong); }

.facts { border-top-color: var(--rule); margin-top: 72px; }
.fact .num { font-weight: 300; font-size: 44px; color: var(--accent); }

.themes { border-top: 1px solid var(--rule-strong); }
.theme .n { color: var(--accent); }
.theme h3 { font-size: 22px; }

.card { border-radius: 2px; border-color: var(--rule); padding: 32px; transition: box-shadow .25s ease, transform .25s ease; }
.card:hover { box-shadow: 0 18px 40px -24px rgba(31,36,48,0.28); transform: translateY(-2px); }
.card h3 { font-size: 23px; line-height: 1.3; }
.card .card-foot { border-top-color: var(--rule); }

.tag { font-weight: 500; border-radius: 2px; border-color: var(--rule); color: var(--muted); font-size: 10.5px; letter-spacing: 0.1em; }
.tag.code { color: var(--ink-2); font-size: 12px; }

.factsheet, .kv, .ids, .cite { border-radius: 2px; }
.factsheet h3 { color: var(--accent); }
.docs, .selected, .year { border-top-color: var(--rule-strong); }
.doc .ico { border-radius: 1px; }
.kv .num { font-weight: 300; color: var(--accent); font-size: 30px; }
.cite { background: var(--tint); border-color: transparent; border-left-color: var(--accent); }

.pub .t { font-weight: 400; font-size: 19px; }
.year > h2 { font-weight: 300; color: var(--accent); }
.filter button { font-weight: 400; }
.filter button[aria-pressed="true"] { background: var(--accent); border-color: var(--accent); color: #fff; }

.site-footer { background: var(--tint); border-top: 0; }
.page-head + .section { background: var(--paper); }
