/* Tobias Wekhof: personal academic site.
   "Alpine dusk": colours taken from the banner photo; one colour per research area.
   Fonts are system fonts (Sitka on Windows, Iowan/Charter on Apple), so the page makes no third-party requests. */

:root {
  --ink: #1f2b3a;          /* valley shadow: text */
  --muted: #586577;        /* secondary text */
  --snow: #fafbfc;         /* page background */
  --mist: #e3e8ee;         /* quiet lines */
  --sky: #f6e8df;          /* banner sky: highlight background */
  --link: #3c5c80;         /* ridge slate, darker for text contrast */
  --fin: #a8862a;          /* meadow gold: sustainable finance */
  --energy: #4b6a8c;       /* ridge slate: energy and environment */
  --text-ai: #8e6a8e;      /* alpenglow: AI and text as data */
  --fin-strong: #86691d;     /* darker shades for the filled area labels (white text, contrast above 5:1) */
  --energy-strong: #3d5a7b;
  --text-ai-strong: #7d4f86;

  --serif: "Sitka Text", "Iowan Old Style", Charter, "Bitstream Charter", "Palatino Linotype", Georgia, serif;
  --display: "Sitka Banner", "Sitka Heading", "Iowan Old Style", Charter, "Palatino Linotype", Georgia, serif;   /* very large sizes only */
  --heading: "Sitka Heading", "Iowan Old Style", Charter, "Palatino Linotype", Georgia, serif;                  /* section headings */
  --subhead: "Sitka Subheading", "Iowan Old Style", Charter, "Palatino Linotype", Georgia, serif;               /* 18–24 px titles */
  --sans: "Segoe UI Variable Text", "Segoe UI", system-ui, -apple-system, "Helvetica Neue", Arial, sans-serif;
  color-scheme: light dark;
}

@media (prefers-color-scheme: dark) {
  :root {
    --ink: #e8ecf1;
    --muted: #a7b2bf;
    --snow: #151d27;
    --mist: #2a3542;
    --sky: #2a2730;
    --link: #a9c3de;
    --fin: #d4b45c;
    --energy: #8fb0d3;
    --text-ai: #c49dc4;
  }
}

* { box-sizing: border-box; }
html { scroll-padding-top: 4rem; }
@media (prefers-reduced-motion: no-preference) { html { scroll-behavior: smooth; } }

body {
  margin: 0;
  background: var(--snow);
  color: var(--ink);
  font: 1.125rem/1.65 var(--serif);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

.wrap { max-width: 62rem; margin: 0 auto; padding: 0 1.5rem; }

a { color: var(--link); text-decoration-thickness: 1px; text-underline-offset: 0.18em; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 2px solid var(--link); outline-offset: 3px; border-radius: 3px; }

.skip { position: absolute; left: -999px; top: 0.5rem; background: var(--snow); padding: 0.5rem 0.75rem; z-index: 20; font-family: var(--sans); }
.skip:focus { left: 0.5rem; }

/* Navigation */
.nav {
  position: sticky; top: 0; z-index: 10;
  background: color-mix(in srgb, var(--snow) 90%, transparent);
  backdrop-filter: saturate(1.3) blur(10px);
  border-bottom: 1px solid var(--mist);
  font-family: var(--sans);
}
.nav-inner { display: flex; align-items: center; justify-content: space-between; gap: 1rem; min-height: 3.25rem; }
.brand { color: var(--ink); text-decoration: none; font-weight: 600; letter-spacing: 0.01em; }
.nav ul { display: flex; gap: 1.4rem; margin: 0; padding: 0; list-style: none; }
.nav ul a { color: var(--muted); text-decoration: none; font-size: 0.95rem; }
.nav ul a:hover { color: var(--ink); }
.nav ul a[aria-current="page"] { color: var(--ink); font-weight: 600; }

/* Mountains, as on the old Google Site: the thin panorama strip at the top of every page,
   the larger view of the same valley at the bottom, both within the page width */
.banner { margin-top: 1.75rem; }
.banner img { display: block; width: 100%; height: auto; border-radius: 4px; }
.scenery { margin-top: 3.5rem; }
.scenery img { display: block; width: 100%; height: auto; aspect-ratio: 1280 / 460; border-radius: 4px; background: var(--mist); }

h1 {
  font: 400 clamp(2.6rem, 5.2vw, 4rem)/1.02 var(--display);
  letter-spacing: -0.015em; margin: 0 0 0.6rem;
}

/* Home, as on the old Google Site: the photo on the left, a short centred welcome on the right */
.welcome { display: grid; grid-template-columns: 17rem minmax(0, 1fr); gap: 0 3rem; align-items: start; margin-top: 2.25rem; }
.portrait { display: block; width: 17rem; height: auto; aspect-ratio: 4 / 5; object-fit: cover; border-radius: 4px; background: var(--mist); }
.welcome-text { text-align: center; padding-top: 0.25rem; }
.welcome-text h1 { font-size: clamp(2.2rem, 4vw, 3rem); margin: 0; }
.hello { max-width: 34rem; margin: 0.8rem auto 1.3rem; font-size: 1.15rem; }
.key-link { margin: 0.3rem 0; font: 600 1.02rem/1.5 var(--sans); }
.key-link a { color: var(--ink); }
.key-link a:hover { color: var(--link); }
.facts { max-width: 34rem; margin: 1.5rem auto 0; text-align: left; font-size: 1rem; }
.facts > div { margin: 0.35rem 0; }
.facts dt { display: inline; font: 600 0.95rem/1.5 var(--sans); }
.facts dt::after { content: ":"; }
.facts dd { display: inline; margin: 0 0 0 0.3rem; }
.facts a { color: var(--ink); }
.facts a:hover { color: var(--link); }
.social { display: flex; justify-content: center; gap: 0.7rem; margin: 1.5rem 0 0; padding: 0; list-style: none; }
.social a { display: grid; place-items: center; width: 2.2rem; height: 2.2rem; border-radius: 50%; background: var(--muted); color: var(--snow); }
.social a:hover { background: var(--link); }
.social svg { width: 1rem; height: 1rem; fill: currentColor; }

/* Home, bottom: one quiet pointer to the practice report on teaching with generative AI */
.also { margin-top: 3rem; }
.feature { display: grid; grid-template-columns: 9rem minmax(0, 1fr); gap: 0 1.25rem; align-items: center; max-width: 44rem; padding-top: 1.5rem; border-top: 1px solid var(--mist); color: var(--ink); text-decoration: none; }
.feature img { display: block; width: 9rem; height: auto; aspect-ratio: 3 / 2; object-fit: cover; border-radius: 4px; background: #fff; box-shadow: 0 0 0 1px var(--mist); }
.feature-text { display: block; }
.feature-label { display: block; font: 600 0.82rem/1.4 var(--sans); color: var(--muted); }
.feature-title { display: block; margin: 0.1rem 0 0.2rem; font: 1.25rem/1.3 var(--subhead); }
.feature-desc { display: block; font: 0.92rem/1.5 var(--sans); color: var(--muted); }
.feature:hover .feature-title { color: var(--link); text-decoration: underline; }
.feature:hover img { box-shadow: 0 0 0 2px var(--link); }

/* Subpages */
.page { padding-top: 0; }
.page .page-title { margin-top: 2.25rem; }
.page-title { font: 400 clamp(2.2rem, 4.4vw, 3rem)/1.1 var(--display); letter-spacing: -0.01em; margin: 0 0 1.25rem; }
h2 { font: 400 2.2rem/1.15 var(--heading); margin: 0 0 1.25rem; letter-spacing: -0.01em; }
.list-head { font: 600 1.05rem/1.3 var(--sans); color: var(--ink); margin: 2.25rem 0 0.5rem; }

/* Research areas: each paper carries a small filled label in its area's colour; the legend shows the same labels */
.s-fin { --strand: var(--fin); --strand-strong: var(--fin-strong); }
.s-energy { --strand: var(--energy); --strand-strong: var(--energy-strong); }
.s-text { --strand: var(--text-ai); --strand-strong: var(--text-ai-strong); }

.tag {
  display: inline-block; margin-left: 0.4rem; padding: 0.02rem 0.45rem 0.05rem; border-radius: 999px;
  background: var(--strand-strong, var(--muted)); color: #fff;
  font: 600 0.62rem/1.4 var(--sans); letter-spacing: 0.015em; white-space: nowrap; vertical-align: 0.25em;
}
@media (prefers-color-scheme: dark) { .tag { background: var(--strand, var(--muted)); color: #121a24; } }

.legend { display: flex; flex-wrap: wrap; gap: 0.5rem; margin: 0; padding: 0; list-style: none; }
.legend .tag { margin-left: 0; font-size: 0.7rem; padding: 0.08rem 0.6rem 0.11rem; vertical-align: baseline; }

/* Paper lists: a thin bar in the area's colour */
.entries { list-style: none; margin: 0; padding: 0; }
.entries > li { position: relative; padding: 0.8rem 0; }
.entries .title { font-size: 1.15rem; line-height: 1.35; color: var(--ink); text-decoration: none; }
.entries.media .title { display: block; }
.entries a.title:hover { color: var(--link); text-decoration: underline; }
.entries .meta { display: block; margin-top: 0.15rem; font: 0.92rem/1.5 var(--sans); color: var(--muted); }
.entries .summary { display: block; margin-top: 0.35rem; max-width: 44rem; }
.entries .extra { display: block; margin-top: 0.3rem; font: 0.88rem/1.5 var(--sans); color: var(--muted); }
/* Abstracts stay folded until the visitor opens them */
.abs { margin-top: 0.2rem; }
.abs summary { display: inline-flex; align-items: center; gap: 0.35rem; cursor: pointer; list-style: none; font: 0.88rem/1.5 var(--sans); color: var(--link); }
.abs summary::-webkit-details-marker { display: none; }
.abs summary::before { content: ""; width: 0.4rem; height: 0.4rem; border-right: 1.5px solid currentColor; border-bottom: 1.5px solid currentColor; transform: rotate(-45deg); transition: transform 0.15s ease; }
.abs[open] summary::before { transform: rotate(45deg); }
.abs summary:hover { text-decoration: underline; }
.abs p { margin: 0.4rem 0 0.2rem; max-width: 44rem; font-size: 1rem; }
.abs p.extra { margin-top: 0.3rem; }
.entries.compact > li { padding-top: 0.55rem; padding-bottom: 0.55rem; }
.entries.compact .title { font-size: 1.04rem; }

/* Teaching: dates on the left */
.timeline { margin: 0; }
.timeline > div { display: grid; grid-template-columns: 9.5rem minmax(0, 1fr); gap: 1.5rem; padding: 0.85rem 0; border-top: 1px solid var(--mist); }
.timeline > div:first-child { border-top: 0; }
.timeline dt { font: 0.95rem/1.6 var(--sans); color: var(--muted); padding-top: 0.15rem; }
.timeline dd { margin: 0; max-width: 44rem; }
.timeline strong { display: block; font-weight: 600; }

/* Policy and media: a small picture beside each entry, as on the old site.
   Photos fill the tile; outlet logos sit whole on a white tile. */
.entries.media > li { display: grid; grid-template-columns: 5.5rem minmax(0, 1fr); gap: 0 0.95rem; align-items: start; }
.thumb { display: block; width: 5.5rem; aspect-ratio: 3 / 2; margin-top: 0.2rem; border-radius: 4px; overflow: hidden; background: #fff; box-shadow: 0 0 0 1px var(--mist); }
.thumb img { display: block; width: 100%; height: 100%; object-fit: cover; }
.thumb.logo img { object-fit: contain; padding: 0.2rem; }
.thumb:hover { box-shadow: 0 0 0 2px var(--strand, var(--link)); }

.two-col { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 2.5rem; }
.two-col .list-head { margin-top: 0; }
.note { font: 0.88rem/1.5 var(--sans); color: var(--muted); margin: 0.75rem 0 0; }

/* Footer */
.footer { margin-top: 2.5rem; border-top: 1px solid var(--mist); }
.footer-inner { display: flex; justify-content: space-between; align-items: baseline; gap: 0.5rem 2rem; flex-wrap: wrap; padding-top: 1.5rem; padding-bottom: 2rem; font: 0.92rem/1.5 var(--sans); color: var(--muted); }
.footer p { margin: 0; }
.updated { font: 0.88rem/1.5 var(--sans); color: var(--muted); }

/* Tablets */
@media (max-width: 860px) {
  .welcome { grid-template-columns: 13rem minmax(0, 1fr); gap: 0 2rem; }
  .portrait { width: 13rem; }
  .two-col { grid-template-columns: minmax(0, 1fr); }
}

/* Phones */
@media (max-width: 600px) {
  body { font-size: 1.05rem; }
  .wrap { padding: 0 1rem; }
  .brand { display: none; }
  .nav ul { width: 100%; justify-content: space-between; gap: 0.5rem; }
  .banner { margin-top: 1rem; }
  .welcome { grid-template-columns: minmax(0, 1fr); gap: 1.25rem; margin-top: 1.5rem; }
  .portrait { width: 12rem; margin: 0 auto; }
  .also { margin-top: 2.25rem; }
  .feature { grid-template-columns: 6.5rem minmax(0, 1fr); gap: 0 0.9rem; }
  .feature img { width: 6.5rem; }
  .page .page-title { margin-top: 1.5rem; }
  .scenery { margin-top: 2.5rem; }
  .timeline > div { grid-template-columns: minmax(0, 1fr); gap: 0.15rem; }
  .entries.media > li { grid-template-columns: 4.5rem minmax(0, 1fr); gap: 0 0.8rem; }
  .thumb { width: 4.5rem; }
  .footer-inner { flex-direction: column; align-items: flex-start; }
}

@media print {
  .nav, .skip, .banner { display: none; }
  body { background: #fff; color: #000; }
}
