/* Layout: one reading column (max 70rem). Two-column hero (text | portrait), a figure + list grid for the
   research lines, and full-width bands that alternate the ground. Serif for names and headings, Plex Sans
   for reading, Plex Mono for data (years, DOIs, metrics, class codes). One accent: a dark institutional green. */
:root {
  --bg: #f6f8f6;
  --bg-alt: #edf1ee;
  --surface: #ffffff;
  --ink: #14201a;
  --muted: #4d5b53;
  --line: #d3dcd6;
  --accent: #175c3e;
  --accent-ink: #ffffff;
  --accent-soft: #e0ede5;

  --f-display: "Source Serif 4", "Source Serif Pro", Georgia, "Times New Roman", serif;
  --f-body: "IBM Plex Sans", "Segoe UI", system-ui, -apple-system, Roboto, sans-serif;
  --f-mono: "IBM Plex Mono", ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace;

  --wrap: 70rem;
  --gutter: clamp(1rem, 4vw, 2rem);
  --radius: 6px;
  --topbar-h: 4rem;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0f1512; --bg-alt: #141c18; --surface: #18211d; --ink: #e3eae5; --muted: #a3b1a9;
    --line: #2b3731; --accent: #72c99f; --accent-ink: #0b1a12; --accent-soft: #19342a;
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #0f1512; --bg-alt: #141c18; --surface: #18211d; --ink: #e3eae5; --muted: #a3b1a9;
  --line: #2b3731; --accent: #72c99f; --accent-ink: #0b1a12; --accent-soft: #19342a;
  color-scheme: dark;
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: calc(var(--topbar-h) + 1rem); }
body {
  margin: 0; background: var(--bg); color: var(--ink);
  font: 400 1.0625rem/1.65 var(--f-body);
  text-rendering: optimizeLegibility; -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--accent); text-underline-offset: .2em; text-decoration-thickness: 1px; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 3px; }
main:focus { outline: none; }
[hidden] { display: none !important; }
p { margin: 0; }
ul, ol, dl, dd, figure { margin: 0; padding: 0; }
ul, ol { list-style: none; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: -999px; top: .5rem; background: var(--accent); color: var(--accent-ink); padding: .5rem 1rem; z-index: 50; border-radius: var(--radius); }
.skip:focus { left: 1rem; }
.mono { font-family: var(--f-mono); font-size: .875em; font-variant-numeric: tabular-nums; }
.sel { user-select: all; }
.wrap { max-width: var(--wrap); margin-inline: auto; padding-inline: var(--gutter); }

/* ---------- Type ---------- */
.display {
  font-family: var(--f-display); font-weight: 600; font-optical-sizing: auto;
  font-size: clamp(2.5rem, 5.4vw, 4.1rem); line-height: 1.04; letter-spacing: -.015em;
  margin: 0; text-wrap: balance;
}
.display-sm { font-size: clamp(2.1rem, 4vw, 3rem); }
.h2 { font-family: var(--f-display); font-weight: 600; font-size: clamp(1.5rem, 2.4vw, 1.85rem); line-height: 1.2; margin: 0; text-wrap: balance; }
.h3 { font-family: var(--f-display); font-weight: 600; font-size: 1.18rem; line-height: 1.3; margin: 0; text-wrap: balance; }
.eyebrow { font-family: var(--f-mono); font-size: .78rem; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.lede { font-size: 1.2rem; line-height: 1.55; color: var(--ink); max-width: 38em; }

/* ---------- Top bar ---------- */
.topbar {
  position: sticky; top: env(safe-area-inset-top, 0px); z-index: 20;
  background: color-mix(in srgb, var(--bg) 92%, transparent);
  -webkit-backdrop-filter: saturate(1.4) blur(10px); backdrop-filter: saturate(1.4) blur(10px);
  border-bottom: 1px solid var(--line);
}
.topbar-in { display: flex; align-items: center; gap: 1.5rem; min-height: var(--topbar-h); }
.brand { display: flex; flex-direction: column; text-decoration: none; color: var(--ink); line-height: 1.15; margin-right: auto; }
.brand-name { font-family: var(--f-display); font-weight: 600; font-size: 1.12rem; }
.brand-sub { font-family: var(--f-mono); font-size: .7rem; letter-spacing: .05em; text-transform: uppercase; color: var(--muted); }
.nav { display: flex; align-items: center; gap: 1.25rem; }
.nav ul { display: flex; gap: .15rem; }
.nav a { display: block; padding: .45rem .55rem; color: var(--muted); text-decoration: none; font-size: .93rem; border-radius: var(--radius); }
.nav a:hover { color: var(--ink); background: var(--bg-alt); }
.nav a[aria-current="page"] { color: var(--ink); font-weight: 600; box-shadow: inset 0 -2px 0 var(--accent); border-radius: 0; }
.tools { display: flex; gap: .4rem; align-items: center; }
.lang, .theme-btn, .menu-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .4rem;
  min-width: 2.4rem; height: 2.4rem; padding: 0 .6rem; border-radius: var(--radius);
  border: 1px solid var(--line); background: var(--surface); color: var(--ink);
  font: 500 .8rem var(--f-mono); text-decoration: none; cursor: pointer;
}
.lang:hover, .theme-btn:hover, .menu-btn:hover { border-color: var(--accent); }
.theme-btn .i-sun { display: none; }
:root[data-theme="dark"] .theme-btn .i-sun { display: block; }
:root[data-theme="dark"] .theme-btn .i-moon { display: none; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .theme-btn .i-sun { display: block; }
  :root:not([data-theme="light"]) .theme-btn .i-moon { display: none; }
}
.menu-btn { display: none; font-family: var(--f-body); font-size: .9rem; }

@media (max-width: 1120px) {
  .menu-btn { display: inline-flex; }
  .nav {
    display: none; position: absolute; left: 0; right: 0; top: 100%;
    flex-direction: column; align-items: stretch; gap: 1rem;
    background: var(--bg); border-bottom: 1px solid var(--line);
    padding: .75rem var(--gutter) 1.25rem;
  }
  .nav.open { display: flex; }
  .nav ul { flex-direction: column; }
  .nav a { font-size: 1.05rem; padding: .6rem .5rem; }
  .nav a[aria-current="page"] { box-shadow: inset 3px 0 0 var(--accent); padding-left: .9rem; }
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; gap: .5rem; min-height: 2.75rem; padding: 0 1.1rem;
  border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface);
  color: var(--ink); font: 500 .95rem var(--f-body); text-decoration: none; cursor: pointer;
}
.btn:hover { border-color: var(--accent); color: var(--accent); }
.btn-primary { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.btn-primary:hover { color: var(--accent-ink); filter: brightness(1.08); }
.copy {
  border: 0; background: transparent; color: var(--accent); cursor: pointer;
  font: 500 .8rem var(--f-body); padding: .25rem .45rem; border-radius: 4px;
}
.copy:hover { background: var(--accent-soft); }

/* ---------- Hero ---------- */
.hero { padding-block: clamp(2.5rem, 6vw, 4.5rem) clamp(2rem, 4vw, 3rem); }
.hero-in { display: grid; grid-template-columns: minmax(0, 1fr) minmax(220px, 300px); gap: clamp(2rem, 5vw, 4.5rem); align-items: center; }
.hero-text { display: flex; flex-direction: column; gap: 1.1rem; min-width: 0; }
.roles { display: flex; flex-direction: column; gap: .1rem; color: var(--muted); font-size: 1rem; }
.roles strong { color: var(--ink); font-weight: 600; }
.actions { display: flex; flex-wrap: wrap; gap: .6rem; align-items: center; margin-top: .4rem; }
.email-chip, .code-chip {
  display: inline-flex; align-items: center; gap: .35rem; min-height: 2.75rem; padding: 0 .4rem 0 .9rem;
  border: 1px dashed var(--line); border-radius: var(--radius); font-size: .95rem; max-width: 100%;
}
.portrait img {
  width: 100%; aspect-ratio: 4 / 5; object-fit: cover; border-radius: var(--radius);
  background: var(--bg-alt);
  filter: saturate(.92);
}

/* ---------- Sabbatical notice ---------- */
.notice-band { border-block: 1px solid var(--line); background: var(--accent-soft); }
.notice-in { display: flex; gap: 1rem; align-items: baseline; padding-block: .9rem; }
.notice-label { flex: none; font-size: .74rem; letter-spacing: .06em; text-transform: uppercase; color: var(--accent); font-weight: 500; }
.notice-in p { font-size: .98rem; }

/* ---------- Metrics ---------- */
.metrics-band { padding-block: 2rem 1.75rem; border-bottom: 1px solid var(--line); }
.metrics { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 1rem; }
.metrics div { display: flex; flex-direction: column; gap: .15rem; padding-left: 1rem; border-left: 1px solid var(--line); }
.metrics dd { font-family: var(--f-display); font-size: clamp(1.8rem, 3.2vw, 2.4rem); font-weight: 600; line-height: 1; font-variant-numeric: lining-nums tabular-nums; }
.metrics dt { color: var(--muted); font-size: .88rem; line-height: 1.3; }
.metrics-src { margin-top: 1rem; font-size: .76rem; }
.metrics-src a { color: var(--muted); }

/* ---------- Sections ---------- */
.section { padding-block: clamp(2.75rem, 6vw, 4.5rem); }
.section-alt { background: var(--bg-alt); }
.section-head { display: flex; justify-content: space-between; align-items: baseline; gap: 1rem; flex-wrap: wrap; margin-bottom: 1.75rem; }
.more { font-size: .95rem; white-space: nowrap; }
.page-head { padding-block: clamp(2.5rem, 5vw, 3.75rem) 2rem; border-bottom: 1px solid var(--line); }
.page-head .lede { margin-top: 1rem; }

/* ---------- Research lines + topology ---------- */
.lines-grid { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); gap: clamp(1.5rem, 4vw, 3.5rem); align-items: start; }
.topo-fig { position: sticky; top: calc(var(--topbar-h) + 1.5rem); }
.topo-fig figcaption { margin-top: .75rem; font-size: .85rem; color: var(--muted); max-width: 40em; }
.topo { width: 100%; height: auto; display: block; overflow: visible; }
.topo text { font-family: var(--f-mono); font-size: 11.5px; fill: var(--muted); }
.topo .t-plane { font-size: 10.5px; letter-spacing: .08em; text-transform: uppercase; fill: var(--muted); opacity: .8; }
.topo .plane-rule { stroke: var(--line); stroke-dasharray: 2 4; }
.topo .t-in { fill: var(--ink); text-anchor: middle; font-size: 11px; }
.topo .t-small { font-size: 10px; font-weight: 500; }
.topo .links path { stroke: var(--muted); stroke-opacity: .7; stroke-width: 1.6; fill: none; }
.topo .links .edge { stroke-dasharray: 1 0; stroke-opacity: .4; }
.topo .ctl path { stroke: var(--accent); stroke-opacity: .45; stroke-width: 1.1; stroke-dasharray: 3 4; fill: none; }
.topo .vnet circle { fill: none; stroke: var(--accent); stroke-opacity: .35; stroke-width: 1.4; stroke-dasharray: 4 3; }
.topo .node circle, .topo .node rect { fill: var(--surface); stroke: var(--muted); stroke-width: 1.6; }
.topo .ctrl rect { stroke: var(--accent); }
.topo .p4 rect { stroke: var(--accent); stroke-width: 2; }
.topo .host rect { fill: var(--bg-alt); }
.topo .packet { fill: var(--accent); }
.topo [data-line], .topo .node, .topo .links path, .topo .labels text { transition: opacity .2s, stroke .2s, fill .2s, stroke-opacity .2s; }
.topo.is-active .links path, .topo.is-active .node, .topo.is-active .labels text, .topo.is-active .ctl, .topo.is-active .vnet { opacity: .28; }
.topo.is-active .on { opacity: 1 !important; }
.topo.is-active .links path.on { stroke: var(--accent); stroke-opacity: 1; stroke-width: 2.4; }
.topo.is-active .node.on circle, .topo.is-active .node.on rect { stroke: var(--accent); stroke-width: 2.4; }
.topo.is-active .labels text.on { fill: var(--accent); font-weight: 500; }
.topo.is-active .ctl.on path { stroke-opacity: 1; }
.topo.is-active .vnet.on circle { stroke-opacity: 1; }

.lines { display: flex; flex-direction: column; }
.line { padding: 1rem 1rem 1.05rem; border-top: 1px solid var(--line); border-radius: 0; cursor: default; display: flex; flex-direction: column; gap: .3rem; }
.line:last-child { border-bottom: 1px solid var(--line); }
.line p { color: var(--muted); font-size: .97rem; }
.line:hover, .line:focus-visible, .line.is-on { background: var(--surface); box-shadow: inset 3px 0 0 var(--accent); }
.line:focus-visible { outline-offset: -2px; }

/* ---------- Publications ---------- */
.pubs { display: flex; flex-direction: column; }
.pub { display: grid; grid-template-columns: 4rem minmax(0, 1fr); gap: 1rem; padding-block: 1.15rem; border-top: 1px solid var(--line); }
.pub:last-child { border-bottom: 1px solid var(--line); }
.pub-year { color: var(--muted); padding-top: .2rem; }
.pub-body { display: flex; flex-direction: column; gap: .25rem; min-width: 0; }
.pub-title { font-family: var(--f-display); font-size: 1.14rem; line-height: 1.35; font-weight: 600; }
.pub-title a { color: var(--ink); text-decoration: none; }
.pub-title a:hover { color: var(--accent); text-decoration: underline; }
.pub-authors { color: var(--muted); font-size: .95rem; }
.pub-authors strong { color: var(--ink); font-weight: 600; }
.pub-venue { font-size: .95rem; }
.pub-venue cite { font-style: italic; }
.kind { font-family: var(--f-mono); font-size: .72rem; letter-spacing: .04em; text-transform: uppercase; color: var(--accent); margin-right: .35rem; }
.pub-actions { display: flex; flex-wrap: wrap; gap: .25rem .9rem; margin-top: .3rem; }
.pub-act { font-size: .78rem; color: var(--accent); background: none; border: 0; padding: 0; cursor: pointer; text-decoration: none; overflow-wrap: anywhere; }
.pub-act:hover { text-decoration: underline; }

/* ---------- News / contact ---------- */
.news-grid { display: grid; grid-template-columns: minmax(0, 15rem) minmax(0, 1fr); gap: 1.5rem clamp(1.5rem, 4vw, 3rem); }
.news { display: flex; flex-direction: column; }
.news li { display: grid; grid-template-columns: 4rem minmax(0, 1fr); gap: 1rem; padding-block: .85rem; border-top: 1px solid var(--line); }
.news li:last-child { border-bottom: 1px solid var(--line); }
.news-date { color: var(--muted); padding-top: .1rem; }
.news a { color: var(--ink); text-decoration-color: var(--line); }
.news a:hover { color: var(--accent); text-decoration-color: currentColor; }
.contact { display: flex; flex-direction: column; gap: .9rem; }
.contact div { display: grid; grid-template-columns: 9rem minmax(0, 1fr); gap: 1rem; }
.contact dt { color: var(--muted); font-size: .9rem; padding-top: .1rem; }
.contact .contact-note { grid-template-columns: 1fr; }
.contact .contact-note dd { color: var(--muted); font-size: .95rem; }

/* ---------- Teaching ---------- */
.jump { display: flex; flex-wrap: wrap; gap: .5rem; margin-top: 1.5rem; }
.jump a { padding: .35rem .75rem; border: 1px solid var(--line); border-radius: 999px; font-size: .88rem; color: var(--ink); text-decoration: none; background: var(--surface); }
.jump a:hover { border-color: var(--accent); color: var(--accent); }
.block-head { display: flex; flex-direction: column; gap: .5rem; margin-bottom: 1.75rem; max-width: 46em; }
.block-head p { color: var(--muted); }
.fichas { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 30rem), 1fr)); gap: 1.25rem; }
.ficha {
  display: flex; flex-direction: column; gap: 1rem; padding: 1.4rem 1.5rem 1.5rem;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
}
.ficha-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 1rem; flex-wrap: wrap; }
.ficha-title { font-family: var(--f-display); font-size: 1.35rem; line-height: 1.25; font-weight: 600; margin: 0; }
.ficha-meta { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .75rem 1.25rem; padding-block: .9rem; border-block: 1px solid var(--line); }
.ficha-meta div { display: flex; flex-direction: column; gap: .1rem; min-width: 0; }
.ficha-meta div:first-child { grid-column: 1 / -1; }
.ficha-meta dt { font-family: var(--f-mono); font-size: .7rem; letter-spacing: .05em; text-transform: uppercase; color: var(--muted); }
.ficha-meta dd { font-size: .95rem; }
.ficha-desc { color: var(--ink); font-size: .98rem; }
.ficha-actions { display: flex; flex-wrap: wrap; gap: .6rem; margin-top: auto; padding-top: .25rem; }
.pill {
  display: inline-flex; align-items: center; gap: .4rem; flex: none;
  padding: .2rem .6rem; border-radius: 999px; font: 500 .74rem/1.4 var(--f-body);
  border: 1px solid var(--line); color: var(--muted); background: var(--bg);
}
.pill::before { content: ""; width: .45rem; height: .45rem; border-radius: 50%; background: currentColor; opacity: .7; }
.pill-active { color: var(--accent); border-color: var(--accent); background: var(--accent-soft); }
.pill-active::before { opacity: 1; }
.pill-upcoming { color: var(--accent); border-style: dashed; border-color: var(--accent); background: transparent; }
.pill-upcoming::before { background: transparent; border: 1.5px solid currentColor; width: .4rem; height: .4rem; }
.spec-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 22rem), 1fr)); gap: 0 2rem; }
.spec-list li { display: flex; justify-content: space-between; align-items: center; gap: 1rem; padding-block: .8rem; border-top: 1px solid var(--line); }
.spec-name { font-weight: 500; }


/* ---------- Shared bits for inner pages ---------- */
.section-tight { padding-block: 2rem 3.5rem; }
.label-h { font-family: var(--f-mono); font-size: .74rem; font-weight: 500; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); margin: 1.25rem 0 .5rem; }
.label-h:first-child { margin-top: 0; }
.prose { display: flex; flex-direction: column; gap: 1rem; max-width: 40em; }
.tags { display: flex; flex-wrap: wrap; gap: .4rem; }
.tag { font-family: var(--f-mono); font-size: .74rem; padding: .15rem .5rem; border: 1px solid var(--line); border-radius: 4px; color: var(--muted); background: var(--surface); }
.counts { margin-top: .75rem; color: var(--muted); }
.empty { padding: 2rem 0; color: var(--muted); }
.result-count { color: var(--muted); font-size: .8rem; margin: 1.25rem 0 .5rem; }
.metrics-3 { grid-template-columns: repeat(3, minmax(0, 10rem)); margin-top: 1.75rem; }

/* filters */
.filters { display: flex; flex-wrap: wrap; gap: .9rem 1rem; align-items: flex-end; }
.field { display: flex; flex-direction: column; gap: .3rem; min-width: 0; flex: 1 1 11rem; }
.field-wide { flex: 3 1 18rem; }
.field label { font-family: var(--f-mono); font-size: .7rem; letter-spacing: .05em; text-transform: uppercase; color: var(--muted); }
.field input, .field select {
  height: 2.75rem; padding: 0 .75rem; border: 1px solid var(--line); border-radius: var(--radius);
  background: var(--surface); color: var(--ink); font: 400 .97rem var(--f-body); width: 100%;
}
.field input:focus, .field select:focus { outline: 2px solid var(--accent); outline-offset: 0; border-color: var(--accent); }

/* publications page */
.year-group { display: grid; grid-template-columns: 5rem minmax(0, 1fr); gap: 1rem; padding-top: 1.5rem; }
.year-h { font-family: var(--f-display); font-size: 1.5rem; font-weight: 600; margin: 0; padding-top: .9rem; color: var(--ink); font-variant-numeric: lining-nums; }
.year-group .pub { grid-template-columns: minmax(0, 1fr); }
.year-group .pub-year { display: none; }
.pubs-compact .pub { padding-block: .9rem; }
.pubs-compact .pub-title { font-size: 1.04rem; }

/* research page */
.line-block-in { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.4fr); gap: clamp(1.5rem, 4vw, 3.5rem); }
.line-block-head { display: flex; flex-direction: column; gap: .9rem; }
.line-block-head p { color: var(--muted); }
.line-block .more { display: inline-block; margin-top: 1rem; }
.line h3 a { color: inherit; text-decoration: none; }
.line h3 a:hover { color: var(--accent); text-decoration: underline; }
.partner-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 15rem), 1fr)); gap: .1rem 1.5rem; }
.partner-list li { padding-block: .45rem; border-top: 1px solid var(--line); font-size: .97rem; }

/* projects page */
.projects { display: flex; flex-direction: column; }
.project { padding-block: 1.25rem; border-top: 1px solid var(--line); display: flex; flex-direction: column; gap: .5rem; }
.project:last-child { border-bottom: 1px solid var(--line); }
.proj-head { display: flex; flex-wrap: wrap; align-items: center; gap: .6rem; }
.proj-years { color: var(--muted); min-width: 6.5rem; }
.role { font-size: .8rem; color: var(--muted); }
.role-pi { color: var(--accent); font-weight: 600; }
.proj-title { font-family: var(--f-display); font-weight: 600; font-size: 1.12rem; line-height: 1.35; margin: 0; max-width: 52em; }
.proj-meta { display: flex; flex-direction: column; gap: .2rem; font-size: .93rem; }
.proj-meta div { display: grid; grid-template-columns: 11rem minmax(0, 1fr); gap: 1rem; }
.proj-meta dt { color: var(--muted); }

/* students page */
.people { display: flex; flex-direction: column; }
.people li { display: grid; grid-template-columns: 6.5rem minmax(0, 1fr) auto; gap: 1rem; align-items: baseline; padding-block: .85rem; border-top: 1px solid var(--line); }
.people li:last-child { border-bottom: 1px solid var(--line); }
.people-years { color: var(--muted); }
.people-name { font-weight: 600; }
.people-note { color: var(--muted); font-size: .92rem; }
.after-list { margin-top: 1.25rem; color: var(--muted); max-width: 42em; }
.email-line { display: flex; align-items: center; gap: .4rem; }

/* cv page */
.cv-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 3rem clamp(1.5rem, 4vw, 3.5rem); }
.cv-block { display: flex; flex-direction: column; gap: 1rem; min-width: 0; }
.cv-rows { display: flex; flex-direction: column; }
.cv-rows li { display: grid; grid-template-columns: 6.5rem minmax(0, 1fr); gap: 1rem; padding-block: .6rem; border-top: 1px solid var(--line); font-size: .97rem; }
.cv-year { color: var(--muted); }
.cv-text { color: var(--ink); font-size: .97rem; }
.page-head .actions { margin-top: 1.25rem; }

/* contact page */
.profile-links { display: flex; flex-wrap: wrap; gap: .75rem; }
.profile-links a { display: inline-flex; align-items: center; min-height: 2.75rem; padding: 0 1.1rem; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); text-decoration: none; color: var(--ink); }
.profile-links a:hover { border-color: var(--accent); color: var(--accent); }

@media (max-width: 860px) {
  .line-block-in, .cv-grid { grid-template-columns: minmax(0, 1fr); }
  .year-group { grid-template-columns: minmax(0, 1fr); gap: 0; }
  .year-h { padding-top: 0; }
}
@media (max-width: 560px) {
  .metrics-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .proj-meta div, .cv-rows li { grid-template-columns: minmax(0, 1fr); gap: .1rem; }
  .people li { grid-template-columns: minmax(0, 1fr) auto; }
  .people-years { grid-column: 1 / -1; }
}

/* ---------- Footer ---------- */
.footer { border-top: 1px solid var(--line); padding-block: 2.5rem calc(2.5rem + env(safe-area-inset-bottom, 0px)); font-size: .9rem; color: var(--muted); }
.footer-in { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 1.25rem 2rem; }
.footer-id { display: flex; flex-direction: column; gap: .15rem; }
.footer-name { font-family: var(--f-display); font-weight: 600; font-size: 1.05rem; color: var(--ink); }
.footer-links { display: flex; flex-wrap: wrap; gap: .5rem 1.25rem; align-items: flex-start; }
.footer-meta { grid-column: 1 / -1; font-size: .74rem; }

/* ---------- Responsive ---------- */
@media (max-width: 860px) {
  .hero-in { grid-template-columns: minmax(0, 1fr); }
  .portrait { order: -1; max-width: 200px; }
  .portrait img { aspect-ratio: 1; }
  .lines-grid { grid-template-columns: minmax(0, 1fr); }
  .topo-fig { position: static; }
  .metrics { grid-template-columns: repeat(3, minmax(0, 1fr)); row-gap: 1.25rem; }
  .news-grid { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 560px) {
  body { font-size: 1rem; }
  .metrics { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .notice-in { flex-direction: column; gap: .25rem; }
  .pub { grid-template-columns: minmax(0, 1fr); gap: .25rem; }
  .news li { grid-template-columns: minmax(0, 1fr); gap: .15rem; }
  .contact div { grid-template-columns: minmax(0, 1fr); gap: .1rem; }
  .ficha { padding: 1.15rem; }
  .ficha-meta { gap: .6rem 1rem; }
  .footer-in { grid-template-columns: minmax(0, 1fr); }
  .brand-sub { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  .topo .packet { display: none; }
  * { transition: none !important; scroll-behavior: auto !important; }
}
@media print {
  .topbar, .footer, .actions, .pub-actions, .topo-fig { display: none; }
}
