/* One stylesheet for every page. Colours are tokens, redefined for dark mode. */
:root{
  --bg:#fdfcfa;
  --surface:#f4f2ee;
  --ink:#1b1b1b;
  --ink-dim:#45433f;
  --muted:#6e6a63;
  --hair:#e2ded6;
  --accent:#1a4d8f;
  --accent-visited:#5b3a91;
  --selection:#cfe0f5;
  --serif:Georgia, "Times New Roman", Times, serif;
  --sans:system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --mono:ui-monospace, "SFMono-Regular", Consolas, "Liberation Mono", monospace;
  --font:var(--serif);
  color-scheme:light dark;
}
@media (prefers-color-scheme: dark){
  :root{
    --bg:#121212;
    --surface:#1c1c1b;
    --ink:#ebe9e4;
    --ink-dim:#c5c2bb;
    --muted:#9a968e;
    --hair:#302e2b;
    --accent:#86b4ea;
    --accent-visited:#b9a0e2;
    --selection:#2a4a73;
  }
}
@media (prefers-contrast: more){
  :root{ --ink-dim:var(--ink); --muted:var(--ink); --hair:currentColor; }
}

*{ box-sizing:border-box; }
body{
  margin:0;
  background:var(--bg);
  color:var(--ink);
  font-family:var(--serif);
  font-size:18px;
  line-height:1.6;
  font-variant-numeric:oldstyle-nums;
  hyphens:auto;
}
a{ color:var(--accent); text-underline-offset:2px; text-decoration-thickness:1px; }
a:visited{ color:var(--accent-visited); }
a:hover{ text-decoration-thickness:2px; }
::selection{ background:var(--selection); }
a:focus-visible, button:focus-visible{ outline:2px solid var(--accent); outline-offset:2px; }
code{ font-family:var(--mono); font-size:.8em; }
p{ margin:0 0 16px; max-width:62ch; }

.visually-hidden{ position:absolute; width:1px; height:1px; overflow:hidden; clip:rect(0 0 0 0); white-space:nowrap; }
.skip-link{
  position:absolute; left:-9999px; top:0; z-index:10;
  background:var(--ink); color:var(--bg); padding:8px 14px;
  font:14px var(--sans); text-decoration:none;
}
.skip-link:focus{ left:12px; top:12px; }

.wrap{ max-width:720px; margin:0 auto; padding:64px 24px 48px; }

/* Header */
.masthead{ margin-bottom:40px; }
.masthead h1{ font-size:clamp(30px, 6vw, 40px); line-height:1.15; margin:0 0 10px; letter-spacing:-.01em; }
.role{ color:var(--ink-dim); font-size:16px; margin:0; }

/* Sections */
section{ padding-top:40px; margin-top:40px; border-top:1px solid var(--hair); }
section#about{ border-top:none; padding-top:0; margin-top:0; }
h2{ font-size:22px; margin:0 0 16px; }

/* Research interests */
.interests{ color:var(--ink-dim); }

/* Contact: one line per link, a small icon, the address in plain text */
.profiles{ list-style:none; padding:0; margin:0; }
.profiles li{ display:flex; align-items:center; gap:12px; margin:0 0 12px; }
.profiles a{ display:inline-flex; align-items:center; gap:12px; min-width:0; color:var(--ink); text-decoration:none; }
.profiles a:visited{ color:var(--ink); }
.profiles .icon{ flex:none; width:20px; height:20px; }
.profiles .name{ min-width:5.5em; }
.profiles .handle{ color:var(--muted); font-size:16px; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; border-bottom:1px solid var(--hair); }
.profiles a:hover .handle{ color:var(--accent); border-color:var(--accent); }
.icon-github{ fill:var(--ink); }
.icon-email{ color:var(--ink); }

.copy-btn, .link-btn{ font:13px var(--sans); cursor:pointer; }
.copy-btn{
  background:none; color:var(--muted);
  border:1px solid var(--hair); border-radius:4px; padding:2px 10px;
}
.copy-btn:hover{ color:var(--accent); border-color:var(--accent); }
.link-btn{ background:none; border:none; padding:0; color:inherit; font-size:inherit; text-decoration:underline; text-underline-offset:2px; }
[hidden]{ display:none !important; }

/* Plain text pages (cookie policy, 404) */
.page h1{ font-size:30px; margin:24px 0 6px; }
.page h2{ margin-top:40px; padding-top:32px; border-top:1px solid var(--hair); }
.page .back{ font:15px var(--sans); }
.page .updated{ color:var(--muted); font-size:15px; margin-bottom:32px; }
.page ul{ padding-left:24px; }
.button{
  font:15px var(--sans); padding:6px 16px; border-radius:4px; cursor:pointer;
  border:1px solid var(--ink); background:var(--bg); color:var(--ink);
}
.button:hover{ border-color:var(--accent); color:var(--accent); }
.table-wrap{ overflow-x:auto; margin:0 0 16px; }
table{ border-collapse:collapse; width:100%; font-size:15px; line-height:1.45; }
th, td{ text-align:left; vertical-align:top; padding:8px 10px 8px 0; border-bottom:1px solid var(--hair); }

footer{
  display:flex; flex-wrap:wrap; justify-content:space-between; gap:8px;
  margin-top:56px; padding-top:20px; border-top:1px solid var(--hair);
  color:var(--muted); font:14px var(--sans);
}
footer a{ color:var(--muted); }

@media (max-width:560px){
  thead{ position:absolute; left:-9999px; }
  tr{ display:block; padding:10px 0; border-bottom:1px solid var(--hair); }
  td{ display:block; padding:2px 0; border:none; }
  td:first-child{ font-weight:bold; }
  td:nth-child(2)::before{ content:"Provider: "; color:var(--muted); }
  td:nth-child(3)::before{ content:"Purpose: "; color:var(--muted); }
  td:nth-child(4)::before{ content:"Duration: "; color:var(--muted); }
  .wrap{ padding:40px 16px 40px; }
  body{ font-size:17px; }
  .profiles li, .profiles a{ gap:10px; }
  .profiles .name{ min-width:4.6em; }
  .profiles .handle{ font-size:15px; }
}
@media print{
  .copy-btn, footer, .skip-link{ display:none; }
  a{ color:#000; }
}
