/* =============================================================================
   site.css: look of www.iutzeler.org (built with Franklin.jl).
   Colors, fonts and widths are variables in :root below; dark mode follows
   the visitor's system setting (prefers-color-scheme).
   ============================================================================= */

@font-face { font-family: "Inter"; src: url("/assets/fonts/inter-400.woff2") format("woff2"); font-weight: 400; font-style: normal; font-display: swap; }
@font-face { font-family: "Inter"; src: url("/assets/fonts/inter-400i.woff2") format("woff2"); font-weight: 400; font-style: italic; font-display: swap; }
@font-face { font-family: "Inter"; src: url("/assets/fonts/inter-500.woff2") format("woff2"); font-weight: 500; font-style: normal; font-display: swap; }
@font-face { font-family: "Inter"; src: url("/assets/fonts/inter-600.woff2") format("woff2"); font-weight: 600 700; font-style: normal; font-display: swap; }
@font-face { font-family: "Source Serif Pro"; src: url("/assets/fonts/sourceserif-600.woff2") format("woff2"); font-weight: 600 700; font-style: normal; font-display: swap; }

:root {
  --bg: #ffffff;
  --bg-soft: #f5f7fa;
  --text: #1c2127;
  --muted: #5a6472;
  --faint: #687280;           /* dates, numbers, small notes (contrast > 4.5:1) */
  --border: #e3e8ee;
  --accent: #1b4f8a;          /* same blue as the CV */
  --accent-strong: #133b68;
  --accent-soft: #e9f0f8;
  --accent-faint: #f4f8fc;
  --on-accent: #ffffff;
  --award: #8a4f00;
  --award-bg: #fbefdc;
  --shadow: 0 1px 2px rgba(16, 24, 40, .04), 0 2px 6px rgba(16, 24, 40, .05);
  --sans: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --serif: "Source Serif Pro", "Source Serif 4", Georgia, Cambria, "Times New Roman", serif;
  --radius: 12px;
  --wrap: 940px;
  --header-h: 64px;
  color-scheme: light;
}

/* Dark theme: follows the system, unless the visitor chose a theme with the
   button of the menu (stored as data-theme="light" | "dark" on <html>).
   The two blocks below must stay identical. */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0e1319;
    --bg-soft: #151c24;
    --text: #e4e8ee;
    --muted: #a5afbb;
    --faint: #7f8996;
    --border: #252f3a;
    --accent: #8db9ec;
    --accent-strong: #b5d2f4;
    --accent-soft: #172739;
    --accent-faint: #121c27;
    --on-accent: #0e1319;
    --award: #f1b862;
    --award-bg: #2b2213;
    --shadow: none;
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #0e1319;
  --bg-soft: #151c24;
  --text: #e4e8ee;
  --muted: #a5afbb;
  --faint: #7f8996;
  --border: #252f3a;
  --accent: #8db9ec;
  --accent-strong: #b5d2f4;
  --accent-soft: #172739;
  --accent-faint: #121c27;
  --on-accent: #0e1319;
  --award: #f1b862;
  --award-bg: #2b2213;
  --shadow: none;
  color-scheme: dark;
}

/* ------------------------------------------------------------------ base -- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: calc(var(--header-h) + 16px); }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.62;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: 3px; }
img { max-width: 100%; height: auto; }
strong, b { font-weight: 600; }
/* My name in sans text (author lists, footer): capital I with serifs (Inter "cv08"),
   so that "Iutzeler" cannot be read "lutzeler". Titles with my name use the serif font. */
.me, .site-footer { font-feature-settings: "cv08" 1; }
.skip { position: absolute; left: -999px; }
.skip:focus { left: 16px; top: 12px; z-index: 100; background: var(--bg); padding: 6px 10px; }

.wrap, .franklin-content { max-width: var(--wrap); margin-left: auto; margin-right: auto; padding-left: 24px; padding-right: 24px; }
@media (max-width: 520px) { .wrap, .franklin-content { padding-left: 16px; padding-right: 16px; } }

/* ---------------------------------------------------------------- header -- */
.site-header {
  position: sticky; top: 0; z-index: 20;
  background: color-mix(in srgb, var(--bg) 90%, transparent);
  -webkit-backdrop-filter: saturate(180%) blur(10px);
  backdrop-filter: saturate(180%) blur(10px);
  border-bottom: 1px solid var(--border);
}
.header-inner { display: flex; align-items: center; height: var(--header-h); position: relative; }
.brand { font-family: var(--serif); font-weight: 600; font-size: 1.3rem; color: var(--text); letter-spacing: .005em; margin-right: auto; }
.brand:hover { color: var(--accent); text-decoration: none; }
.site-nav { display: flex; gap: 2px; align-items: center; order: 1; }

/* light / dark switch (shown only when JavaScript runs, see _layout/head.html) */
.theme-toggle {
  display: none; order: 2; align-items: center; justify-content: center;
  width: 36px; height: 34px; margin-left: 8px; padding: 0;
  background: none; border: 1px solid var(--border); border-radius: 8px;
  color: var(--muted); cursor: pointer;
}
:root[data-theme] .theme-toggle { display: inline-flex; }
.theme-toggle:hover { color: var(--accent); border-color: var(--accent); }
.theme-toggle svg { width: 18px; height: 18px; }
.theme-toggle .ic-sun, :root[data-theme="dark"] .theme-toggle .ic-moon { display: none; }
:root[data-theme="dark"] .theme-toggle .ic-sun { display: block; }
.site-nav a { color: var(--muted); font-weight: 500; font-size: .95rem; padding: 6px 12px; border-radius: 8px; }
.site-nav a:hover { color: var(--text); background: var(--bg-soft); text-decoration: none; }
.site-nav a.active { color: var(--accent); background: var(--accent-soft); }
.site-nav a.nav-cv { border: 1px solid var(--border); margin-left: 8px; }
.nav-toggle, .nav-burger { display: none; }

@media (max-width: 760px) {
  .nav-burger { display: flex; order: 3; flex-direction: column; gap: 5px; cursor: pointer; padding: 10px 4px 10px 12px; }
  .nav-burger span { width: 22px; height: 2px; background: var(--text); border-radius: 2px; }
  .site-nav {
    display: none; position: absolute; top: var(--header-h); left: -24px; right: -24px;
    flex-direction: column; align-items: stretch; gap: 2px;
    background: var(--bg); border-bottom: 1px solid var(--border); padding: 8px 16px 16px;
  }
  .nav-toggle:checked ~ .site-nav { display: flex; }
  .site-nav a { padding: 10px 12px; }
  .site-nav a.nav-cv { margin-left: 0; }
}

/* ------------------------------------------------------------ typography -- */
.franklin-content { padding-top: 4px; padding-bottom: 24px; }
.franklin-content h1, .franklin-content h2, .franklin-content h3 { font-family: var(--serif); font-weight: 600; line-height: 1.25; color: var(--text); }
.franklin-content h1 { font-size: 2.3rem; margin: 2.4rem 0 .8rem; letter-spacing: -.005em; }
.franklin-content h2 { font-size: 1.55rem; margin: 3rem 0 1rem; padding-bottom: .45rem; border-bottom: 1px solid var(--border); }
.franklin-content h3 { font-size: 1.18rem; margin: 2rem 0 .5rem; }
.franklin-content h3.year { font-family: var(--sans); font-size: 1rem; color: var(--faint); margin: 2rem 0 .2rem; }
.franklin-content h4 { font-size: 1rem; font-weight: 600; margin: 1.4rem 0 .3rem; }
.franklin-content h1 a, .franklin-content h2 a, .franklin-content h3 a, .franklin-content h4 a { color: inherit; }
.franklin-content .header-anchor:hover { text-decoration: none; }
.franklin-content p { margin: .55rem 0 .95rem; }
.franklin-content ul, .franklin-content ol { padding-left: 1.25rem; }
.franklin-content li { margin: .2rem 0; }
.franklin-content blockquote { margin: 1rem 0; padding: .2rem 0 .2rem 1rem; border-left: 3px solid var(--border); color: var(--muted); }
.franklin-content code { font-size: .9em; background: var(--bg-soft); padding: .1em .35em; border-radius: 4px; }
.franklin-content table { border-collapse: collapse; margin: 1rem 0; font-size: .95rem; }
.franklin-content th, .franklin-content td { border: 1px solid var(--border); padding: 6px 10px; }
.muted { color: var(--muted); }
.lead { font-size: 1.08rem; color: var(--muted); margin: .4rem 0 1.1rem; }
.lead p { margin: .4rem 0; }
.more-link { font-weight: 500; }

/* ------------------------------------------------------------------ hero -- */
.hero { display: grid; grid-template-columns: 196px 1fr; gap: 40px; align-items: center; margin: 52px 0 28px; }
.hero-photo { width: 196px; height: 196px; border-radius: 50%; background: var(--accent-soft); overflow: hidden; box-shadow: 0 0 0 7px var(--accent-faint); }
.hero-photo img { display: block; width: 100%; height: 100%; }
.hero h1 { font-family: var(--serif); font-weight: 600; font-size: 2.65rem; line-height: 1.08; margin: 0 0 .55rem; letter-spacing: -.01em; }
.hero-title { color: var(--accent); font-weight: 500; font-size: 1.16rem; margin: 0 0 .1rem; }.hero-affil { color: var(--muted); margin: 0 0 .1rem; }
.hero-keywords { display: flex; flex-wrap: wrap; gap: 8px; margin: .75rem 0 1.25rem; }
.hero-keywords span { font-size: .93rem; font-weight: 500; color: var(--accent-strong); background: var(--accent-soft); border-radius: 6px; padding: 2px 11px; }
.hero-buttons { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 16px; }
.btn { display: inline-flex; align-items: center; gap: 8px; padding: 8px 15px; border-radius: 10px; border: 1px solid var(--border); color: var(--text); font-weight: 500; font-size: .95rem; background: var(--bg); line-height: 1.3; }
.btn:hover { text-decoration: none; border-color: var(--accent); color: var(--accent); }
.btn-primary { background: var(--accent); border-color: var(--accent); color: var(--on-accent); }
.btn-primary:hover { background: var(--accent-strong); border-color: var(--accent-strong); color: var(--on-accent); }
.ic { display: inline-flex; width: 18px; height: 18px; flex: none; }
.ic svg { width: 100%; height: 100%; }
.ic-knock { fill: var(--bg); }
.profile-links { display: flex; flex-wrap: wrap; gap: 6px 20px; font-size: .93rem; }
.profile-links a { display: inline-flex; align-items: center; gap: 7px; color: var(--muted); }
.profile-links a:hover { color: var(--accent); text-decoration: none; }
@media (max-width: 680px) {
  .hero { grid-template-columns: 1fr; gap: 18px; margin-top: 28px; }
  .hero-photo { width: 136px; height: 136px; }
  .hero h1 { font-size: 2.15rem; }
}

.bio p { font-size: 1.04rem; }
.note { color: var(--muted); font-size: .92rem; border-left: 3px solid var(--accent-soft); padding: 2px 0 2px 12px; margin: .6rem 0 1rem; }

/* ----------------------------------------------------------------- cards -- */
.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(255px, 1fr)); gap: 18px; margin: 1.1rem 0 1.2rem; }
.card { border: 1px solid var(--border); border-radius: var(--radius); padding: 18px 20px 16px; background: var(--bg); box-shadow: var(--shadow); }
.franklin-content .card h3 { margin: 0 0 .5rem; font-size: 1.1rem; }
.card h3 a { color: var(--text); }
.card p { font-size: .93rem; color: var(--muted); margin: 0 0 .8rem; }
ul.featured { list-style: none; padding: 0; margin: 0; font-size: .9rem; }
ul.featured li { margin: .5rem 0; line-height: 1.42; }
.theme-long { margin: 0 0 2rem; }
.theme-long p { margin-bottom: .6rem; }

/* --------------------------------------------------------- badges, pills -- */
.badge { display: inline-block; font-size: .72rem; font-weight: 600; letter-spacing: .02em; color: var(--accent); background: var(--accent-soft); border-radius: 6px; padding: 1px 7px; margin-right: 7px; white-space: nowrap; vertical-align: 1px; font-style: normal; }
.award { display: inline-block; font-size: .68rem; font-weight: 600; text-transform: uppercase; letter-spacing: .07em; color: var(--award); background: var(--award-bg); border-radius: 6px; padding: 1px 7px; margin-left: 6px; vertical-align: 1px; white-space: nowrap; font-style: normal; }
.pill { display: inline-block; font-size: .78rem; font-weight: 500; color: var(--muted); border: 1px solid var(--border); border-radius: 999px; padding: 0 10px; margin: 3px 4px 0 0; line-height: 1.75; }
.pill:hover { color: var(--accent); border-color: var(--accent); text-decoration: none; }

/* ---------------------------------- dated lists (news, talks, grants, ...) -- */
.franklin-content ul.dated { list-style: none; padding: 0; margin: .4rem 0 1rem; }
ul.dated li { display: grid; grid-template-columns: 88px 1fr; gap: 18px; padding: 10px 0; border-bottom: 1px solid var(--border); margin: 0; }
ul.dated li:last-child { border-bottom: none; }
ul.dated time { color: var(--faint); font-size: .86rem; font-weight: 500; padding-top: 2px; font-variant-numeric: tabular-nums; }
ul.dated .muted { font-size: .92rem; }
@media (max-width: 560px) { ul.dated li { grid-template-columns: 1fr; gap: 0; } }

details.more { margin: .4rem 0 1.4rem; }
details.more > summary { cursor: pointer; color: var(--accent); font-weight: 500; padding: 6px 0; list-style: none; }
details.more > summary::-webkit-details-marker { display: none; }
details.more > summary::before { content: "▸"; display: inline-block; width: 1.1em; transition: transform .15s ease; }
details.more[open] > summary::before { transform: rotate(90deg); }

/* ---------------------------------------------------------- publications -- */
.franklin-content .legend { color: var(--muted); font-size: 1.02rem; margin: .4rem 0 1rem; }
.legend .me { font-weight: 600; color: var(--text); }
.legend .stu, .pub-authors .stu { text-decoration: underline; text-decoration-color: var(--faint); text-underline-offset: 3px; }
.franklin-content ol.publist { list-style: none; padding: 0; margin: .4rem 0 1.4rem; }
li.pub { display: grid; grid-template-columns: 46px 1fr; gap: 12px; padding: 14px 8px 14px 0; border-bottom: 1px solid var(--border); margin: 0; border-radius: 0; }
li.pub:last-child { border-bottom: none; }
li.pub:target { background: var(--accent-faint); border-radius: 8px; }
.pub-num { color: var(--faint); font-size: .84rem; font-weight: 600; padding: 2px 0 0 4px; font-variant-numeric: tabular-nums; }
.pub-title { font-weight: 600; line-height: 1.42; }
.pub-title a { color: var(--text); }
.pub-title a:hover { color: var(--accent); }
.pub-authors { font-size: .94rem; margin-top: 3px; }
.pub-authors .me { font-weight: 600; }
.pub-venue { font-size: .9rem; color: var(--muted); margin-top: 2px; }
.pub-links { margin-top: 5px; }
.pubsearch { width: 100%; max-width: 440px; padding: 9px 14px; border: 1px solid var(--border); border-radius: 10px; font: inherit; font-size: .95rem; background: var(--bg); color: var(--text); margin: .4rem 0 .2rem; }
.pubsearch:focus { outline: 3px solid var(--accent-soft); border-color: var(--accent); }
.hidden { display: none !important; }

/* ---------------------------------------------------------------- people -- */
.people { display: grid; grid-template-columns: repeat(auto-fit, minmax(235px, 1fr)); gap: 14px; margin: .8rem 0 1.4rem; }
.person { border: 1px solid var(--border); border-radius: var(--radius); padding: 14px 16px; background: var(--bg); box-shadow: var(--shadow); }
.person-name { font-weight: 600; }
.person-meta { color: var(--faint); font-size: .85rem; }
.person-topic { font-size: .93rem; margin: 4px 0; }

/* ----------------------------------------------------------- quick links -- */
.quicklinks { margin: .9rem 0 .6rem; }
.quicklinks p { display: flex; flex-wrap: wrap; gap: 8px; margin: 0; }
.quicklinks a { font-size: .95rem; font-weight: 500; color: var(--accent); background: var(--accent-faint); border: 1px solid color-mix(in srgb, var(--accent) 35%, transparent); border-radius: 999px; padding: 4px 14px; }
.quicklinks a:hover { background: var(--accent-soft); border-color: var(--accent); text-decoration: none; }

/* --------------------------------------------------------------- teaching -- */
.course-meta { color: var(--faint); font-size: .9rem; margin: -.2rem 0 .5rem; }
.publinks ul { padding-left: 1.15rem; }
.publinks li { margin: .2rem 0; }
.franklin-content li p { margin: .15rem 0; }
.publinks a { font-weight: 500; }

/* ---------------------------------------------------------------- contact -- */
.contact { display: grid; grid-template-columns: 1fr 1.15fr; gap: 28px; align-items: start; margin-top: 1rem; }
.contact p { margin: 0 0 .8rem; display: flex; gap: 10px; align-items: flex-start; }
.contact .ic { margin-top: 3px; color: var(--accent); }
.map { width: 100%; height: 250px; border: 1px solid var(--border); border-radius: var(--radius); }
@media (max-width: 680px) { .contact { grid-template-columns: 1fr; } }

/* ----------------------------------------------------------------- footer -- */
.site-footer { border-top: 1px solid var(--border); margin-top: 40px; padding: 22px 0 40px; color: var(--faint); font-size: .85rem; }
.site-footer .wrap { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 6px 24px; }
.site-footer a { color: var(--muted); }

/* ------------------------------------------------------------- 404 page -- */
.notfound { text-align: center; padding: 80px 0 120px; }
.notfound .big { font-family: var(--serif); font-size: 4rem; font-weight: 600; color: var(--accent); }

/* ------------------------------------------- KaTeX / code, when used -- */
.katex { font-size: 1em !important; }
.hljs { font-size: .9rem; line-height: 1.4; border-radius: 10px; }

@media print {
  .site-header, .site-footer, .pubsearch, .hero-buttons { display: none; }
}
