/* charalampakis.com: white, black, one blue, Open Sans. Square corners, thin rules. */

@font-face { font-family: "Open Sans"; font-style: normal; font-weight: 400; font-display: swap; src: url("../fonts/open-sans-regular.woff") format("woff"); }
@font-face { font-family: "Open Sans"; font-style: italic; font-weight: 400; font-display: swap; src: url("../fonts/open-sans-italic.woff") format("woff"); }
@font-face { font-family: "Open Sans"; font-style: normal; font-weight: 600; font-display: swap; src: url("../fonts/open-sans-semibold.woff") format("woff"); }
@font-face { font-family: "Open Sans"; font-style: normal; font-weight: 700; font-display: swap; src: url("../fonts/open-sans-bold.woff") format("woff"); }

:root {
  --bg: #ffffff;
  --panel: #f3f4f6;
  --ink: #0e1116;
  --ink-2: #353b45;
  --muted: #6a717c;
  --line: #e1e4e8;
  --line-strong: #0e1116;
  --accent: #0b5cad;
  --accent-dark: #084585;
  --accent-wash: #eaf2fb;
  --font: "Open Sans", "Segoe UI", system-ui, -apple-system, Roboto, Arial, sans-serif;
  --wrap: 72rem;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 400 1rem/1.65 var(--font);
  font-variant-numeric: lining-nums;
  border-top: 4px solid var(--accent);
}

a { color: var(--accent); text-decoration: none; }
a:hover { color: var(--accent-dark); text-decoration: underline; text-underline-offset: 0.2em; }
a:focus-visible, button:focus-visible, select:focus-visible, input:focus-visible, summary:focus-visible {
  outline: 2px solid var(--accent); outline-offset: 2px;
}

h1, h2, h3 { font-weight: 700; line-height: 1.15; color: var(--ink); letter-spacing: -0.015em; }
h1 { font-size: clamp(2.1rem, 1.3rem + 2.8vw, 3.1rem); margin: 0 0 0.9rem; letter-spacing: -0.025em; }
h2 { font-size: 1.3rem; margin: 3.25rem 0 1.1rem; }
h2::before { content: ""; display: block; width: 2.25rem; height: 3px; background: var(--accent); margin-bottom: 0.8rem; }
h3 { font-size: 1.02rem; margin: 0 0 0.3rem; letter-spacing: 0; }
p { margin: 0 0 1rem; }
sup { line-height: 0; }
b, strong { font-weight: 600; }

.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 2rem; }
.skip { position: absolute; left: -999px; top: 0; background: var(--bg); padding: 0.5rem 1rem; z-index: 10; }
.skip:focus { left: 1rem; }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

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

.site-header { border-bottom: 1px solid var(--line); }
.header-row { display: flex; align-items: center; justify-content: space-between; gap: 1.5rem; min-height: 4.75rem; }
.brand { display: flex; align-items: center; gap: 1.05rem; color: var(--ink); }
.brand:hover { color: var(--ink); text-decoration: none; }
.brand-text { display: flex; flex-direction: column; line-height: 1.25; }
.brand-name { font-weight: 700; font-size: 1.02rem; letter-spacing: -0.005em; }
.brand-sub { font-size: 0.74rem; color: var(--muted); }

.site-nav { display: flex; flex-wrap: wrap; gap: 0.25rem 1.75rem; }
.site-nav a { font-weight: 600; font-size: 0.78rem; letter-spacing: 0.08em; text-transform: uppercase; color: var(--ink-2); padding: 0.55rem 0; border-bottom: 2px solid transparent; }
.site-nav a:hover { color: var(--accent); text-decoration: none; }
.site-nav a[aria-current="page"] { color: var(--ink); border-bottom-color: var(--accent); }

main { padding-bottom: 4.5rem; }

/* Shared ----------------------------------------------------------------------------------- */

.kicker { font-weight: 700; font-size: 0.74rem; letter-spacing: 0.09em; text-transform: uppercase; color: var(--accent); margin-bottom: 1rem; }
.kicker a { color: inherit; }
.lede { font-size: 1.2rem; line-height: 1.55; color: var(--ink-2); }
.page-head { padding: 3.25rem 0 0.25rem; max-width: 50rem; }
.page-head > p:not(.lede) { color: var(--ink-2); }
.more { display: inline-block; font-weight: 600; font-size: 0.85rem; }
.more::after { content: " \2192"; }
.columns { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 4rem; }
.plain { list-style: none; padding: 0; margin: 0; }
.plain li { padding: 0.5rem 0; border-bottom: 1px solid var(--line); }
address { font-style: normal; margin-bottom: 1rem; }

/* Home ------------------------------------------------------------------------------------- */

.intro { display: grid; grid-template-columns: minmax(0, 1fr) 19rem; gap: 4rem; align-items: start; padding-top: 3.5rem; }
.intro-text { padding-bottom: 2.5rem; }
.intro-text > p:not(.kicker):not(.lede) { color: var(--ink-2); max-width: 44rem; }
.portrait { margin: 0; background: linear-gradient(var(--panel), var(--panel)) bottom / 100% 82% no-repeat; }
.portrait img { display: block; width: 100%; height: auto; }

.isolator { flex: none; width: 2.8rem; height: auto; overflow: visible; }
.isolator .plate { fill: #cdd2d8; }
.isolator .roller-fill { fill: #d7e5f5; }
.isolator .roller-line { fill: none; stroke: var(--accent); stroke-width: 3; }
.interests { list-style: none; padding: 0; margin: 0 0 1.5rem; display: flex; flex-wrap: wrap; gap: 0.35rem 1.6rem; }
.interests li { position: relative; padding-left: 0.95rem; font-weight: 600; font-size: 1.05rem; color: var(--ink); }
.interests li::before { content: ""; position: absolute; left: 0; top: 0.62em; width: 0.42rem; height: 0.42rem; background: var(--accent); }
.profiles { list-style: none; padding: 0; margin: 1.6rem 0 0; display: flex; flex-wrap: wrap; gap: 0.5rem; }
.profiles a { display: inline-block; font-weight: 600; font-size: 0.8rem; padding: 0.5rem 0.8rem; border: 1px solid var(--line); color: var(--ink); }
.profiles a:hover { border-color: var(--accent); color: var(--accent); text-decoration: none; }

.facts { border-top: 3px solid var(--line-strong); }
.facts dl { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); margin: 0; border-bottom: 1px solid var(--line); }
.facts dl > div { padding: 1.1rem 1rem 1rem; }
.facts dl > div + div { border-left: 1px solid var(--line); }
.facts dt { font-weight: 600; font-size: 0.68rem; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); }
.facts dd { margin: 0.25rem 0 0; font-weight: 700; font-size: 2.1rem; line-height: 1.1; letter-spacing: -0.02em; }
.facts-note { font-size: 0.72rem; color: var(--muted); margin-top: 0.5rem; }

.topics { list-style: none; padding: 0; margin: 0; }
.topics li { display: flex; justify-content: space-between; gap: 1rem; padding: 0.55rem 0; border-bottom: 1px solid var(--line); }
.topics a { color: var(--ink); font-weight: 600; font-size: 0.95rem; }
.topics a:hover { color: var(--accent); }
.count { font-size: 0.8rem; font-weight: 600; color: var(--muted); font-variant-numeric: tabular-nums; }

.project { border: 1px solid var(--line); border-left: 4px solid var(--accent); padding: 1.3rem 1.5rem 0.4rem; }
.project.wide { margin: 1.75rem 0 0.5rem; max-width: 56rem; }
.project-name { font-weight: 700; font-size: 1.5rem; letter-spacing: -0.02em; margin-bottom: 0.25rem; }
.project-years { font-weight: 600; font-size: 0.8rem; letter-spacing: 0.04em; color: var(--muted); margin-left: 0.4rem; }
.project-title { font-weight: 600; color: var(--ink-2); }
.project-meta { font-size: 0.8rem; color: var(--muted); }

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

.pubs { list-style: none; margin: 0; padding: 0; }
.pub { display: grid; grid-template-columns: 3.25rem minmax(0, 1fr); gap: 0 1rem; padding: 1rem 0; border-bottom: 1px solid var(--line); scroll-margin-top: 1rem; }
.pub:target { background: var(--accent-wash); box-shadow: -0.75rem 0 0 var(--accent-wash), 0.75rem 0 0 var(--accent-wash); }
.pub-code { font-weight: 700; font-size: 0.8rem; line-height: 1.6rem; color: var(--accent); font-variant-numeric: tabular-nums; }
.pub-body p { margin: 0; }
.pub-title { font-weight: 600; font-size: 1rem; line-height: 1.45; color: var(--ink); }
.pub-title a { color: var(--ink); }
.pub-title a:hover { color: var(--accent); }
.pub-title-el { font-size: 0.92rem; color: var(--ink-2); }
.pub-authors, .pub-source { font-size: 0.88rem; line-height: 1.5; color: var(--ink-2); }
.pub-authors b { color: var(--ink); }
.pub-source i { font-style: italic; }
.pub-note { font-size: 0.82rem; color: var(--muted); }
.pub-meta { margin-top: 0.4rem; font-size: 0.8rem; line-height: 1.7; }
.pub-links a { font-weight: 600; }
.pub-links .sep { color: #b9bec5; }
.abstract summary { cursor: pointer; color: var(--accent); font-weight: 600; width: max-content; list-style: none; }
.abstract summary::-webkit-details-marker { display: none; }
.abstract summary::after { content: " +"; }
.abstract[open] summary::after { content: " \2212"; }
.abstract > div { font-size: 0.9rem; line-height: 1.65; color: var(--ink-2); margin: 0.6rem 0 0.4rem; padding: 0.1rem 0 0.1rem 1rem; border-left: 3px solid var(--line); max-width: 50rem; }
.abstract > div p { margin: 0 0 0.6rem; }
.pubs .year { font-weight: 700; font-size: 0.8rem; letter-spacing: 0.06em; color: var(--ink); padding: 1.6rem 0 0.5rem; border-bottom: 2px solid var(--ink); }
.pubs .year:first-child { padding-top: 0.25rem; }

.compact .pub { grid-template-columns: 2.9rem minmax(0, 1fr); padding: 0.75rem 0; }
.compact .pub-title { font-size: 0.95rem; }

.pub-filter { display: none; }
.js .pub { scroll-margin-top: 9.5rem; }
.js .pub-filter { display: block; position: sticky; top: 0; z-index: 2; background: var(--bg); padding: 1rem 0 0.85rem; margin: 1.25rem 0 0; border-bottom: 1px solid var(--line); }
.seg { display: flex; flex-wrap: wrap; gap: 0; margin-bottom: 0.65rem; }
.seg button { font: 600 0.8rem/1 var(--font); padding: 0.6rem 0.9rem; border: 1px solid var(--line); margin-right: -1px; background: var(--bg); color: var(--ink-2); cursor: pointer; }
.seg button span { color: var(--muted); margin-left: 0.25rem; font-weight: 400; }
.seg button[aria-pressed="true"] { background: var(--ink); border-color: var(--ink); color: #fff; position: relative; }
.seg button[aria-pressed="true"] span { color: #b8bec6; }
.filter-row { display: flex; flex-wrap: wrap; gap: 0.5rem; align-items: center; }
.filter-row select, .filter-row input { font: 400 0.88rem/1.2 var(--font); padding: 0.6rem 0.7rem; border: 1px solid var(--line); border-radius: 0; background: var(--bg); color: var(--ink); }
.filter-row input { flex: 1 1 16rem; min-width: 0; }
#pub-count { font-size: 0.8rem; font-weight: 600; color: var(--muted); margin-left: auto; }
.empty { color: var(--muted); padding: 2rem 0; }
[hidden] { display: none !important; }

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

.toc ol { list-style: none; margin: 2.25rem 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: 0.5rem; }
.toc a { display: inline-block; font-weight: 600; font-size: 0.8rem; padding: 0.4rem 0.7rem; border: 1px solid var(--line); color: var(--ink-2); }
.toc a:hover { border-color: var(--accent); color: var(--accent); text-decoration: none; }
.topic > p { max-width: 50rem; color: var(--ink-2); }
.topic { scroll-margin-top: 1rem; }

/* Software --------------------------------------------------------------------------------- */

.software { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 3rem; }
.software li { padding: 1rem 0; border-bottom: 1px solid var(--line); }
.software p { color: var(--ink-2); margin-bottom: 0.45rem; font-size: 0.95rem; }
.software .dl, .software .related { font-size: 0.8rem; }
.software .dl a { font-weight: 600; }
.software .sep { color: #b9bec5; }
.software .related { color: var(--muted); }

/* CV --------------------------------------------------------------------------------------- */

.booktabs { width: 100%; border-collapse: collapse; border-top: 3px solid var(--line-strong); border-bottom: 1px solid var(--line); }
.booktabs th, .booktabs td { text-align: left; vertical-align: top; padding: 0.8rem 0.75rem 0.8rem 0; }
.booktabs tr + tr th, .booktabs tr + tr td { border-top: 1px solid var(--line); }
.cv-head { display: grid; grid-template-columns: minmax(0, 1fr) 17rem; gap: 3.5rem; align-items: start; max-width: none; }
.cv-head > div > p { color: var(--ink-2); max-width: 46rem; }
.cv-photo { margin: 0.4rem 0 0; }
.cv-photo img { display: block; width: 100%; height: auto; }
.cv-photo figcaption { font-size: 0.75rem; color: var(--muted); margin-top: 0.5rem; }
.cv th { width: 9rem; font-weight: 700; font-size: 0.85rem; color: var(--accent); white-space: nowrap; font-variant-numeric: tabular-nums; }
.cv .what { display: block; font-weight: 600; color: var(--ink); }
.cv .where { display: block; color: var(--ink-2); font-size: 0.93rem; }
.cv .note { display: block; color: var(--muted); font-size: 0.88rem; }

/* Footer and the consent bar --------------------------------------------------------------- */

.site-footer { border-top: 1px solid var(--line); background: var(--panel); font-size: 0.8rem; color: var(--muted); }
.footer-row { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 0.5rem 2rem; padding-top: 1.5rem; padding-bottom: 1.5rem; }
.footer-row p { margin: 0; }
.footer-links a { color: var(--ink-2); font-weight: 600; margin-left: 1.25rem; }
.footer-links a:first-child { margin-left: 0; }

.cookie-bar { position: fixed; left: 0; right: 0; bottom: 0; z-index: 20; background: var(--ink); color: #e9ecef; font-size: 0.88rem; }
.cookie-bar-row { display: flex; align-items: center; justify-content: space-between; gap: 1rem 2rem; flex-wrap: wrap; padding-top: 1rem; padding-bottom: 1rem; }
.cookie-bar p { margin: 0; max-width: 46rem; }
.cookie-bar a { color: #fff; text-decoration: underline; }
.cookie-bar-actions { display: flex; gap: 0.5rem; }
.cookie-bar button { font: 600 0.85rem/1 var(--font); padding: 0.7rem 1.4rem; border: 1px solid #fff; background: transparent; color: #fff; cursor: pointer; min-width: 7rem; }
.cookie-bar button:hover { background: #fff; color: var(--ink); }

/* Narrow screens --------------------------------------------------------------------------- */

@media (max-width: 900px) {
  .header-row { flex-direction: column; align-items: flex-start; gap: 0.35rem; padding-top: 0.9rem; padding-bottom: 0.3rem; }
  .intro { grid-template-columns: minmax(0, 1fr) 14rem; gap: 2.25rem; }
  .facts dl { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .facts dl > div:nth-child(4) { border-left: 0; }
  .facts dl > div:nth-child(n + 4) { border-top: 1px solid var(--line); }
  .columns, .software { grid-template-columns: minmax(0, 1fr); }
  .cv-head { grid-template-columns: minmax(0, 1fr); gap: 1.5rem; }
  .cv-photo { max-width: 20rem; }
}

@media (max-width: 600px) {
  body { font-size: 0.97rem; }
  .wrap { padding: 0 1.15rem; }
  .brand-sub { display: none; }
  .site-nav { gap: 0.15rem 1.15rem; }
  .intro { grid-template-columns: minmax(0, 1fr); gap: 0; padding-top: 2rem; }
  .portrait { max-width: 13rem; grid-row: 1; margin-bottom: 1.5rem; }
  .isolator { width: 2.5rem; }
  .brand { gap: 0.95rem; }
  .intro-text { padding-bottom: 2rem; }
  .facts dd { font-size: 1.7rem; }
  .facts dl > div { padding: 0.9rem 0.6rem; }
  .pub, .compact .pub { grid-template-columns: minmax(0, 1fr); }
  .cv th { width: auto; display: block; padding-bottom: 0; }
  .cv td { display: block; padding-top: 0.2rem; }
  .booktabs tr + tr td { border-top: 0; }
  .js .pub-filter { position: static; }
  .js .pub { scroll-margin-top: 1rem; }
  .cookie-bar button { flex: 1; }
  .cookie-bar-actions { width: 100%; }
}

@media print {
  .site-nav, .pub-filter, .skip, .profiles, .cookie-bar { display: none !important; }
  body { border-top: 0; }
  .abstract > div { display: none; }
}
