/* ==========================================================================
   sandragama.eu — "editorial lab notebook"
   Fraunces (display) · Instrument Sans (text) · JetBrains Mono (metadata)
   ========================================================================== */

:root {
  --paper: #f4efe6;
  --paper-2: #ebe4d7;
  --card: #fbf8f2;
  --ink: #1a1830;
  --ink-2: #3d3a52;
  --muted: #6b6779;
  --rule: #d9d0bf;
  --accent: #d9481f;        /* vermilion */
  --accent-ink: #b8360f;
  --accent-soft: #f6d9cc;
  --teal: #0c7a76;          /* a nod to the old site */
  --teal-soft: #cfe7e4;
  --violet: #4b3fb0;
  --violet-soft: #dcd8f4;
  --focus: #4b3fb0;

  --f-display: "Sofia Sans Condensed", "Arial Narrow", "Helvetica Neue", sans-serif;
  --f-text: "Instrument Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
  --f-mono: "JetBrains Mono", ui-monospace, "SF Mono", Menlo, monospace;

  --wrap: 1180px;
  --gutter: clamp(16px, 4vw, 40px);
  --radius: 14px;
  --shadow: 0 1px 0 rgba(26, 24, 48, .04), 0 12px 30px -18px rgba(26, 24, 48, .35);
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --paper: #14131c; --paper-2: #1c1a27; --card: #1e1c2a;
    --ink: #efe9df; --ink-2: #cfc8bd; --muted: #9a94a6; --rule: #34303f;
    --accent: #ff7a50; --accent-ink: #ff9a78; --accent-soft: #3d2219;
    --teal: #4cc5bd; --teal-soft: #15302f;
    --violet: #a89cff; --violet-soft: #2a2550; --focus: #a89cff;
    --shadow: 0 1px 0 rgba(0,0,0,.2), 0 16px 34px -20px rgba(0,0,0,.8);
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --paper: #14131c; --paper-2: #1c1a27; --card: #1e1c2a;
  --ink: #efe9df; --ink-2: #cfc8bd; --muted: #9a94a6; --rule: #34303f;
  --accent: #ff7a50; --accent-ink: #ff9a78; --accent-soft: #3d2219;
  --teal: #4cc5bd; --teal-soft: #15302f;
  --violet: #a89cff; --violet-soft: #2a2550; --focus: #a89cff;
  --shadow: 0 1px 0 rgba(0,0,0,.2), 0 16px 34px -20px rgba(0,0,0,.8);
  color-scheme: dark;
}

/* ---------- base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font: 400 1.0625rem/1.6 var(--f-text);
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration-color: color-mix(in srgb, var(--accent) 60%, transparent); text-underline-offset: .18em; text-decoration-thickness: 1px; }
a:hover { color: var(--accent-ink); text-decoration-color: currentColor; }
:focus-visible { outline: 2px solid var(--focus); outline-offset: 3px; border-radius: 4px; }
::selection { background: var(--accent); color: #fff; }
h1, h2, h3, h4 { margin: 0; font-weight: 500; }
p { margin: 0 0 1em; }

.wrap { width: 100%; max-width: var(--wrap); margin-inline: auto; padding-inline: var(--gutter); }
.visually-hidden { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: -999px; top: 8px; background: var(--ink); color: var(--paper); padding: 8px 14px; border-radius: 8px; z-index: 100; }
.skip:focus { left: 12px; }

.preview-bar {
  position: sticky; top: 0; z-index: 60;
  background: repeating-linear-gradient(135deg, var(--accent) 0 14px, var(--accent-ink) 14px 28px);
  color: #fff; text-align: center; font: 500 .78rem/1 var(--f-mono); letter-spacing: .06em; text-transform: uppercase; padding: 9px;
}

/* ---------- type ---------- */
.display {
  font-family: var(--f-display);
  font-weight: 200;
  font-size: clamp(3rem, 8.4vw, 7rem);
  line-height: .92;
  letter-spacing: -.02em;
}
.display em { font-style: normal; color: var(--accent); font-weight: 500; }
.eyebrow, .meta, .label, .nav-num, .section-num, .badge, .pub-type, .year-label, .stat-label {
  font-family: var(--f-mono);
  font-feature-settings: "zero" 0;
}
.eyebrow { font-size: .78rem; letter-spacing: .08em; text-transform: uppercase; color: var(--teal); margin-bottom: 1.4rem; }
.meta { font-size: .78rem; color: var(--muted); letter-spacing: .01em; margin: 0; }
.label { font-size: .74rem; font-weight: 500; letter-spacing: .09em; text-transform: uppercase; color: var(--muted); margin: 0 0 1rem; }
.prose { max-width: 66ch; }
.prose p { color: var(--ink-2); }
.prose strong { color: var(--ink); font-weight: 600; }
.lede { font-size: clamp(1.08rem, 1.6vw, 1.25rem); line-height: 1.55; margin-top: 1.6rem; }

/* ---------- header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: color-mix(in srgb, var(--paper) 86%, transparent);
  backdrop-filter: saturate(1.4) blur(12px);
  -webkit-backdrop-filter: saturate(1.4) blur(12px);
  border-bottom: 1px solid transparent;
  transition: border-color .2s;
}
.preview-bar + .skip + .site-header { top: 32px; }
.site-header.scrolled { border-bottom-color: var(--rule); }
.header-inner { display: flex; align-items: center; justify-content: space-between; gap: 1rem; height: 68px; }
.wordmark { display: inline-flex; align-items: center; gap: .55rem; text-decoration: none; }
.wordmark-mark { display: flex; }
.mono-bg { fill: var(--ink); }
.mono-fg { fill: var(--paper); }
.wordmark-text { font-family: var(--f-display); font-weight: 400; font-size: 1.55rem; letter-spacing: -.01em; white-space: nowrap; line-height: 1; }
.site-nav { display: flex; align-items: center; gap: .3rem; }
.site-nav ul { display: flex; gap: .15rem; list-style: none; margin: 0; padding: 0; }
.site-nav a {
  display: inline-flex; align-items: baseline; gap: .35rem;
  padding: .45rem .7rem; border-radius: 999px; text-decoration: none; font-weight: 500; font-size: .96rem;
}
.site-nav a:hover { background: var(--paper-2); color: var(--ink); }
.site-nav a[aria-current="page"] { background: var(--ink); color: var(--paper); }
.site-nav a[aria-current="page"] .nav-num { color: var(--accent); }
.nav-num { font-size: .68rem; color: var(--muted); }
.theme-toggle {
  display: grid; place-items: center; width: 38px; height: 38px; margin-left: .3rem;
  border: 1px solid var(--rule); border-radius: 50%; background: transparent; color: var(--ink); cursor: pointer;
}
.theme-toggle:hover { border-color: var(--ink); }
@media (max-width: 640px) {
  .header-inner { height: auto; padding-block: .6rem; flex-wrap: wrap; row-gap: .25rem; }
  .site-nav { width: 100%; justify-content: space-between; }
  .site-nav a { padding: .4rem .55rem; font-size: .9rem; }
  .nav-num { display: none; }
  .theme-toggle { width: 34px; height: 34px; }
}

/* ---------- hero ---------- */
.hero { position: relative; overflow: hidden; border-bottom: 1px solid var(--rule); }
.hero-field { position: absolute; inset: 0; width: 100%; height: 100%; }
.hero-inner { position: relative; padding-block: clamp(4rem, 12vw, 9rem) clamp(3.5rem, 9vw, 7rem); pointer-events: none; }
.hero-inner a { pointer-events: auto; }
.hero .display { max-width: 17ch; }
.hero-sub { margin-top: 2rem; max-width: 52ch; color: var(--ink-2); font-size: 1.08rem; }
.hero-sub strong { color: var(--ink); }
.hero-actions { display: flex; flex-wrap: wrap; gap: .75rem; margin-top: 2rem; }
.btn {
  display: inline-flex; align-items: center; gap: .5rem; padding: .8rem 1.25rem; border-radius: 999px;
  font-weight: 600; font-size: .98rem; text-decoration: none; border: 1.5px solid var(--ink); transition: transform .15s, background .15s;
}
.btn:hover { transform: translateY(-1px); }
.btn-primary { background: var(--ink); color: var(--paper); }
.btn-primary:hover { background: var(--accent); border-color: var(--accent); color: #fff; }
.btn-ghost { background: color-mix(in srgb, var(--paper) 70%, transparent); }
.btn-ghost:hover { color: var(--ink); background: var(--paper-2); }

/* ---------- home: about / stats ---------- */
.about { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr); gap: clamp(2rem, 6vw, 6rem); padding-block: clamp(3rem, 8vw, 6rem); }
.about-text { font-size: 1.14rem; }
.about-text p:first-of-type::first-letter {
  font-family: var(--f-display); float: left; font-size: 4.1em; line-height: .82; padding: .06em .08em 0 0; color: var(--accent);
}
.portrait { width: 176px; height: 176px; object-fit: cover; object-position: 50% 6%; border-radius: 50%; float: right; margin: 0 0 1rem 1.5rem; shape-outside: circle(); }
.interests { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--ink); }
.interests li { display: flex; gap: 1rem; align-items: baseline; padding: .85rem 0; border-bottom: 1px solid var(--rule); font-family: var(--f-display); font-size: 1.28rem; line-height: 1.25; }
.interests .num { font: 500 .72rem var(--f-mono); color: var(--accent); }
@media (max-width: 820px) { .about { grid-template-columns: 1fr; } }

.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); border-block: 1px solid var(--ink); }
.stat { padding: 1.6rem 1.2rem 1.4rem 0; display: flex; flex-direction: column; gap: .35rem; }
.stat + .stat { border-left: 1px solid var(--rule); padding-left: 1.4rem; }
.stat-value { font-family: var(--f-display); font-size: clamp(2.2rem, 4.5vw, 3.4rem); line-height: 1; letter-spacing: -.02em; }
.stat:nth-child(3n+1) .stat-value { color: var(--accent); }
.stat:nth-child(3n+2) .stat-value { color: var(--teal); }
.stat:nth-child(3n) .stat-value { color: var(--violet); }
.stat-label { font-size: .74rem; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); }
@media (max-width: 520px) { .stat + .stat { border-left: 0; border-top: 1px solid var(--rule); padding-left: 0; } }

/* ---------- sections ---------- */
.section { padding-block: clamp(2.5rem, 6vw, 4.5rem); }
.section-head { display: flex; align-items: baseline; justify-content: space-between; flex-wrap: wrap; gap: .5rem 1rem; margin-bottom: 2rem; padding-bottom: .9rem; border-bottom: 1px solid var(--ink); }
.section-title { font-family: var(--f-display); font-size: clamp(1.7rem, 3.4vw, 2.5rem); letter-spacing: -.015em; display: flex; align-items: baseline; gap: .8rem; }
.section-num { font-size: .78rem; color: var(--accent); font-weight: 500; letter-spacing: .04em; }
.more { font: 500 .85rem var(--f-mono); text-decoration: none; color: var(--ink-2); }
.more:hover { color: var(--accent-ink); }
.page-head { padding-block: clamp(3.5rem, 9vw, 6.5rem) clamp(1rem, 3vw, 2rem); }

/* ---------- cards ---------- */
.card-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 320px), 1fr)); gap: clamp(1rem, 2.5vw, 1.75rem); }
.card {
  position: relative; display: flex; flex-direction: column; background: var(--card); border: 1px solid var(--rule);
  border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); transition: transform .2s ease, border-color .2s;
}
.card:hover { transform: translateY(-3px); border-color: color-mix(in srgb, var(--ink) 35%, var(--rule)); }
@media (prefers-reduced-motion: reduce) { .card, .btn { transition: none; } .card:hover, .btn:hover { transform: none; } }
.card-media { position: relative; aspect-ratio: 16 / 9; background: var(--paper-2); border-bottom: 1px solid var(--rule); }
.card-media img, .card-art { width: 100%; height: 100%; object-fit: cover; display: block; }
.card-media .badge { position: absolute; top: .8rem; left: .8rem; }
.art-bg { fill: hsl(var(--h) 45% 91%); }
.art-grid { stroke: hsl(var(--h) 30% 78%); stroke-width: 1; }
.art-dot { fill: hsl(var(--h) 62% 40%); opacity: .75; }
.art-dot-alt { fill: var(--accent); opacity: .95; }
:root[data-theme="dark"] .art-bg { fill: hsl(var(--h) 25% 16%); }
:root[data-theme="dark"] .art-grid { stroke: hsl(var(--h) 20% 26%); }
:root[data-theme="dark"] .art-dot { fill: hsl(var(--h) 60% 65%); }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .art-bg { fill: hsl(var(--h) 25% 16%); }
  :root:not([data-theme="light"]) .art-grid { stroke: hsl(var(--h) 20% 26%); }
  :root:not([data-theme="light"]) .art-dot { fill: hsl(var(--h) 60% 65%); }
}
.card-body { padding: 1.25rem 1.35rem 1.4rem; display: flex; flex-direction: column; gap: .45rem; flex: 1; }
.card-title { font-family: var(--f-display); font-size: 1.55rem; line-height: 1.12; letter-spacing: -.01em; }
.card-title a { text-decoration: none; }
.stretched::after { content: ""; position: absolute; inset: 0; }
.card-subtitle { font-style: italic; color: var(--ink-2); margin: 0; font-size: .98rem; }
.card-summary { color: var(--ink-2); font-size: .97rem; margin: .2rem 0 .4rem; }
.tags { display: flex; flex-wrap: wrap; gap: .35rem; list-style: none; margin: auto 0 0; padding: .4rem 0 0; }
.tags li { font: 500 .7rem var(--f-mono); padding: .25rem .55rem; border-radius: 999px; background: var(--paper-2); color: var(--ink-2); }

.badge { display: inline-block; font-size: .66rem; font-weight: 500; letter-spacing: .08em; text-transform: uppercase; padding: .28rem .55rem; border-radius: 999px; background: var(--paper); color: var(--ink-2); border: 1px solid var(--rule); }
.badge-ongoing { background: var(--teal-soft); color: var(--teal); border-color: transparent; }
.badge-completed, .badge-finished { background: var(--violet-soft); color: var(--violet); border-color: transparent; }

.lab-banner {
  display: flex; align-items: center; gap: 1.2rem; margin-top: 2rem; padding: 1rem 1.3rem; max-width: 640px;
  border: 1px solid var(--ink); border-radius: var(--radius); text-decoration: none; background: var(--card);
}
.lab-banner img { height: 44px; width: auto; }
.lab-banner span:nth-child(2) { flex: 1; display: flex; flex-direction: column; color: var(--ink-2); font-size: .94rem; }
.lab-banner strong { font-family: var(--f-display); font-size: 1.3rem; color: var(--ink); font-weight: 500; }

/* ---------- publications ---------- */
.pub-tools { display: flex; flex-wrap: wrap; gap: 1rem; align-items: center; margin-bottom: 2rem; }
.search { flex: 1 1 280px; display: flex; align-items: center; gap: .6rem; padding: .7rem 1rem; border: 1px solid var(--rule); border-radius: 999px; background: var(--card); color: var(--muted); }
.search:focus-within { border-color: var(--ink); }
.search input { flex: 1; min-width: 0; border: 0; outline: 0; background: transparent; font: inherit; color: var(--ink); }
.chips { display: flex; flex-wrap: wrap; gap: .4rem; }
.chip { font: 500 .8rem var(--f-text); padding: .5rem .85rem; border-radius: 999px; border: 1px solid var(--rule); background: transparent; color: var(--ink-2); cursor: pointer; }
.chip span { font-family: var(--f-mono); font-size: .72rem; color: var(--muted); margin-left: .2rem; }
.chip:hover { border-color: var(--ink); }
.chip[aria-pressed="true"] { background: var(--ink); color: var(--paper); border-color: var(--ink); }
.chip[aria-pressed="true"] span { color: var(--accent); }

.pub-year { display: grid; grid-template-columns: 120px minmax(0, 1fr); gap: 1.5rem; border-top: 1px solid var(--rule); padding-top: 1.4rem; margin-bottom: 1.4rem; }
.year-label { font-family: var(--f-display); font-size: 2.4rem; line-height: 1; color: var(--muted); letter-spacing: -.02em; position: sticky; top: 90px; align-self: start; }
.pub-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 1.5rem; }
.pub { position: relative; padding-left: 1.1rem; border-left: 3px solid var(--rule); }
.pub[data-type="journal"] { border-left-color: var(--accent); }
.pub[data-type="conference"] { border-left-color: var(--teal); }
.pub[data-type="chapter"], .pub[data-type="book"] { border-left-color: var(--violet); }
.pub-type { font-size: .66rem; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.pub-type-journal { color: var(--accent-ink); }
.pub-type-conference { color: var(--teal); }
.pub-type-chapter, .pub-type-book { color: var(--violet); }
.pub-title { font-family: var(--f-display); font-size: 1.24rem; line-height: 1.28; margin: .2rem 0 .3rem; }
.pub-title a { text-decoration: none; background-image: linear-gradient(var(--accent), var(--accent)); background-size: 0 1px; background-repeat: no-repeat; background-position: 0 100%; transition: background-size .25s; }
.pub-title a:hover { background-size: 100% 1px; color: var(--ink); }
.pub-authors { margin: 0; color: var(--ink-2); font-size: .94rem; }
.pub-venue { margin: .1rem 0 0; color: var(--muted); font-size: .9rem; display: flex; flex-wrap: wrap; gap: .2rem .8rem; align-items: baseline; }
.pub-venue em { color: var(--ink-2); }
.pub-doi, .pub-cites { font: .74rem var(--f-mono); color: var(--muted); }
.pub-cites { background: var(--paper-2); border-radius: 999px; padding: .1rem .5rem; }
.pub-list-compact { grid-template-columns: repeat(auto-fill, minmax(min(100%, 460px), 1fr)); gap: 1.6rem 2.5rem; }
.empty { color: var(--muted); font-style: italic; }
@media (max-width: 680px) {
  .pub-year { grid-template-columns: 1fr; gap: .6rem; }
  .year-label { position: static; font-size: 1.8rem; }
}

/* ---------- doors ---------- */
.doors { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 340px), 1fr)); gap: clamp(1rem, 2.5vw, 1.75rem); }
.door {
  position: relative; display: block; padding: 2rem 2rem 2.4rem; border-radius: var(--radius); text-decoration: none;
  background: var(--ink); color: var(--paper); overflow: hidden; min-height: 240px;
}
.door h2 { font-family: var(--f-display); font-size: clamp(1.8rem, 3.5vw, 2.6rem); line-height: 1.05; margin: 1.2rem 0 .8rem; max-width: 12ch; }
.door p { color: color-mix(in srgb, var(--paper) 75%, transparent); max-width: 40ch; margin: 0; }
.door-alt { background: var(--accent); color: #fff; }
.door-alt .section-num { color: #fff; }
.door-alt p { color: rgba(255,255,255,.85); }
.door-arrow { position: absolute; right: 1.6rem; bottom: 1.2rem; font-size: 2.2rem; transition: transform .25s; }
.door:hover { color: var(--paper); }
.door-alt:hover { color: #fff; }
.door:hover .door-arrow { transform: translateX(6px); }
.door::before {
  content: ""; position: absolute; right: -60px; top: -60px; width: 220px; height: 220px; border-radius: 50%;
  background: radial-gradient(circle, color-mix(in srgb, currentColor 18%, transparent) 2px, transparent 2.5px) 0 0 / 14px 14px;
  opacity: .5;
}

/* ---------- teaching ---------- */
.legend { display: flex; align-items: center; gap: .45rem; }
.legend .cell { margin-left: .6rem; }
.course-matrix { border-top: 1px solid var(--rule); overflow-x: auto; }
.cm-row { display: grid; grid-template-columns: minmax(220px, 1fr) repeat(var(--cols), minmax(38px, 56px)); align-items: center; border-bottom: 1px solid var(--rule); min-width: min-content; }
.cm-head { font: 500 .72rem var(--f-mono); color: var(--muted); letter-spacing: .04em; }
.cm-head > span { padding: .7rem 0; }
.cm-year { text-align: center; }
.cm-course { padding: 1rem 1rem 1rem 0; display: flex; flex-direction: column; gap: .15rem; }
.cm-course strong { font-family: var(--f-display); font-weight: 500; font-size: 1.22rem; line-height: 1.2; }
.cm-course strong a { text-decoration: none; }
.cm-cell { display: grid; place-items: center; }
.cell { display: inline-block; width: 18px; height: 18px; border-radius: 50%; }
.cell-off { width: 5px; height: 5px; background: var(--rule); }
.cell-on { background: var(--teal); }
.cell-lead { background: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.cm-row { grid-template-columns: minmax(240px, 1fr) repeat(var(--cols), minmax(34px, 44px)); }
.cm-year { font-size: .66rem; }

.thesis-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr)); gap: 1.2rem; margin-bottom: 3rem; }
.thesis { padding: 1.3rem 1.4rem 1.4rem; border: 1px solid var(--rule); border-radius: var(--radius); background: var(--card); display: flex; flex-direction: column; gap: .5rem; align-items: flex-start; }
.thesis h4 { font-family: var(--f-display); font-size: 1.22rem; line-height: 1.22; }
.thesis-student { margin: 0; font-weight: 600; }
.thesis-note { margin: 0; font-style: italic; color: var(--accent-ink); }
.section .label { margin-top: 2.5rem; }
.msc-year { display: grid; grid-template-columns: 120px minmax(0, 1fr); gap: 1.5rem; border-top: 1px solid var(--rule); padding-top: 1.2rem; margin-bottom: 1.2rem; }
.msc-year .year-label { font-size: 1.5rem; top: 90px; }
.msc-list { list-style: none; margin: 0; padding: 0; }
.msc-list li { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: .1rem 1rem; padding: .7rem 0; border-bottom: 1px dashed var(--rule); }
.msc-list li:last-child { border-bottom: 0; }
.msc-title { font-weight: 600; }
.msc-student { grid-column: 1; color: var(--ink-2); font-size: .94rem; }
.msc-list .badge { grid-column: 2; grid-row: 1 / span 2; align-self: center; }
@media (max-width: 680px) { .msc-year { grid-template-columns: 1fr; gap: .4rem; } .msc-year .year-label { position: static; } }

/* ---------- contact ---------- */
.big-email { margin: 2.2rem 0 0; font-family: var(--f-display); font-size: clamp(1.6rem, 5vw, 3.4rem); letter-spacing: -.02em; line-height: 1.1; overflow-wrap: anywhere; }
.big-email a { text-decoration: none; background-image: linear-gradient(var(--accent), var(--accent)); background-size: 100% 3px; background-repeat: no-repeat; background-position: 0 100%; }
.big-email .at { color: var(--accent); font-style: italic; }
.contact-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 280px), 1fr)); gap: 1.4rem; }
.location { padding: 1.5rem; border: 1px solid var(--rule); border-radius: var(--radius); background: var(--card); }
.location address { font-style: normal; font-family: var(--f-display); font-size: 1.25rem; line-height: 1.45; margin-bottom: .8rem; }
.link-list { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 320px), 1fr)); column-gap: 2rem; }
.link-list a { display: flex; align-items: baseline; gap: 1rem; padding: 1rem 0; border-bottom: 1px solid var(--rule); text-decoration: none; }
.link-kind { font: 500 .68rem var(--f-mono); text-transform: uppercase; letter-spacing: .08em; color: var(--muted); width: 90px; flex: none; }
.link-label { flex: 1; font-family: var(--f-display); font-size: 1.35rem; }
.link-arrow { transition: transform .2s; color: var(--accent); }
.link-list a:hover .link-arrow { transform: translate(3px, -3px); }

/* ---------- footer ---------- */
.site-footer { margin-top: clamp(3rem, 8vw, 6rem); background: var(--ink); color: var(--paper); }
.footer-inner { display: grid; grid-template-columns: 1fr auto; gap: 1.5rem 2rem; padding-block: 3rem 2rem; }
.footer-name { font-family: var(--f-display); font-weight: 250; font-size: clamp(2.4rem, 5vw, 3.6rem); line-height: 1; letter-spacing: -.015em; margin: 0; display: flex; align-items: center; gap: .9rem; }
.footer-name .mono-bg { fill: var(--paper); }
.footer-name .mono-fg { fill: var(--ink); }
.footer-meta { margin: .2rem 0 0; color: color-mix(in srgb, var(--paper) 65%, transparent); font-size: .92rem; }
.footer-links { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: .4rem 1.2rem; align-self: center; }
.footer-links a { text-decoration: none; font-size: .92rem; }
.footer-links a:hover { color: var(--accent); }
.footer-small { grid-column: 1 / -1; margin: 0; padding-top: 1.4rem; border-top: 1px solid color-mix(in srgb, var(--paper) 18%, transparent); font: .74rem var(--f-mono); color: color-mix(in srgb, var(--paper) 55%, transparent); }
@media (max-width: 640px) { .footer-inner { grid-template-columns: 1fr; } }

@media print {
  .site-header, .site-footer, .hero-field, .pub-tools, .theme-toggle, .doors, .preview-bar { display: none !important; }
  body { background: #fff; color: #000; }
}
.location .label { margin-top: 0; }
.preview-bar { height: 32px; padding-block: 0; display: grid; place-items: center; }

/* ---------- Sofia Sans Condensed tuning (condensed: larger sizes, light weights) ---------- */
h1, h2, h3, h4 { font-weight: 400; }
.section-title { font-size: clamp(2.1rem, 4.2vw, 3.2rem); font-weight: 250; letter-spacing: -.01em; }
.interests li { font-size: 1.5rem; font-weight: 300; line-height: 1.15; }
.stat-value { font-size: clamp(2.8rem, 5.6vw, 4.4rem); font-weight: 200; }
.card-title { font-size: 1.9rem; font-weight: 400; line-height: 1.02; }
.year-label { font-size: 3rem; font-weight: 200; }
.msc-year .year-label { font-size: 1.9rem; }
.pub-title { font-size: 1.45rem; font-weight: 400; line-height: 1.15; }
.door h2 { font-size: clamp(2.3rem, 4.4vw, 3.3rem); font-weight: 250; line-height: .98; }
.cm-course strong { font-size: 1.45rem; font-weight: 400; }
.thesis h4 { font-size: 1.45rem; font-weight: 400; line-height: 1.1; }
.big-email { font-size: clamp(2rem, 6vw, 4.4rem); font-weight: 250; }
.big-email .at { font-style: normal; font-weight: 500; }
.location address { font-size: 1.45rem; font-weight: 300; line-height: 1.3; }
.link-label { font-size: 1.6rem; font-weight: 300; }
.lab-banner strong { font-size: 1.55rem; font-weight: 500; }
.about-text p:first-of-type::first-letter { font-weight: 300; font-size: 4.6em; line-height: .78; }
.footer-name svg { flex: none; }
.msc-more { margin-top: .5rem; }
.msc-more > summary { cursor: pointer; list-style: none; display: inline-flex; align-items: center; gap: .5rem; font: 500 .85rem var(--f-mono); color: var(--ink-2); padding: .6rem 1rem; border: 1px solid var(--rule); border-radius: 999px; margin-bottom: 1.2rem; }
.msc-more > summary::-webkit-details-marker { display: none; }
.msc-more > summary::before { content: "+"; color: var(--accent); font-weight: 700; }
.msc-more[open] > summary::before { content: "–"; }
.msc-more > summary:hover { border-color: var(--ink); }
