/* Günter Reichelt
   Titles and quotes: Oooh Baby.
   Headings: Lora. Text: IBM Plex Sans.
   All self-hosted under the SIL Open Font License. */

/* Fonts */

@font-face {
  font-family: "Lora";
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url(fonts/lora-latin-wght-normal.woff2) format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6,
    U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122,
    U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Lora";
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url(fonts/lora-latin-ext-wght-normal.woff2) format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7,
    U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F,
    U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F,
    U+A720-A7FF;
}
@font-face {
  font-family: "Lora";
  font-style: italic;
  font-weight: 400 700;
  font-display: swap;
  src: url(fonts/lora-latin-wght-italic.woff2) format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6,
    U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122,
    U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Lora";
  font-style: italic;
  font-weight: 400 700;
  font-display: swap;
  src: url(fonts/lora-latin-ext-wght-italic.woff2) format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7,
    U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F,
    U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F,
    U+A720-A7FF;
}

@font-face {
  font-family: "Oooh Baby";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url(fonts/oooh-baby-latin-400-normal.woff2) format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6,
    U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122,
    U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Oooh Baby";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url(fonts/oooh-baby-latin-ext-400-normal.woff2) format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7,
    U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F,
    U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F,
    U+A720-A7FF;
}

@font-face {
  font-family: "IBM Plex Sans";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url(fonts/ibm-plex-sans-latin-400-normal.woff2) format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6,
    U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122,
    U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "IBM Plex Sans";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url(fonts/ibm-plex-sans-latin-ext-400-normal.woff2) format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7,
    U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F,
    U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F,
    U+A720-A7FF;
}
@font-face {
  font-family: "IBM Plex Sans";
  font-style: italic;
  font-weight: 400;
  font-display: swap;
  src: url(fonts/ibm-plex-sans-latin-400-italic.woff2) format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6,
    U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122,
    U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "IBM Plex Sans";
  font-style: italic;
  font-weight: 400;
  font-display: swap;
  src: url(fonts/ibm-plex-sans-latin-ext-400-italic.woff2) format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7,
    U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F,
    U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F,
    U+A720-A7FF;
}
@font-face {
  font-family: "IBM Plex Sans";
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url(fonts/ibm-plex-sans-latin-600-normal.woff2) format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6,
    U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122,
    U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "IBM Plex Sans";
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url(fonts/ibm-plex-sans-latin-ext-600-normal.woff2) format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7,
    U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F,
    U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F,
    U+A720-A7FF;
}

/* Tokens */

:root {
  --paper: #ffffff;
  --ink: #1d2027;
  --muted: #646a75;
  --rule: #e6e3de;
  --carmine: #a3182f;
  --navy: #1f3c74;

  --script: "Oooh Baby", "Segoe Script", cursive;
  --serif: "Lora", Georgia, serif;
  --text: "IBM Plex Sans", "Helvetica Neue", Arial, sans-serif;

  --step-0: 1.0625rem;
  --step-1: 1.25rem;
  --step-2: 1.625rem;
  --step-3: clamp(2.25rem, 5vw, 3.25rem);
  --step-4: clamp(3.25rem, 9vw, 6rem);

  --col: 37rem;
  --gutter: 11rem;
}

/* Base */

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--text);
  font-size: var(--step-0);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  font-kerning: normal;
}

.wrap {
  max-width: calc(var(--gutter) + var(--col) + 3rem);
  margin: 0 auto;
  padding-left: 1.5rem;
  padding-right: 1.5rem;
}

.skip { position: absolute; left: -9999px; }
.skip:focus {
  position: fixed;
  left: 1rem;
  top: 1rem;
  z-index: 9;
  background: var(--paper);
  border: 1px solid var(--ink);
  padding: .6rem .9rem;
  font-size: .875rem;
}

p { margin: 0 0 1.1rem; }
strong, b { font-weight: 600; }
a { color: var(--navy); }

a:focus-visible {
  outline: 2px solid var(--navy);
  outline-offset: 3px;
}

h1, .mark, .pull p {
  font-family: var(--script);
  font-weight: 400;
}

h2, h3, .marker, .year, .standfirst, .steps li::before {
  font-family: var(--serif);
  font-variant-numeric: lining-nums;
}

/* Header */

header { border-bottom: 1px solid var(--rule); }

.head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: .5rem 2rem;
  padding-top: 1.5rem;
  padding-bottom: 1.1rem;
}

.mark {
  font-size: 2.125rem;
  line-height: 1;
  color: var(--ink);
  text-decoration: none;
  white-space: nowrap;
}

nav {
  display: flex;
  flex-wrap: wrap;
  gap: .2rem 1.15rem;
  font-size: .875rem;
}

nav a {
  color: var(--muted);
  text-decoration: none;
  white-space: nowrap;
  border-bottom: 1px solid transparent;
  padding-bottom: 2px;
}
nav a:hover { color: var(--ink); }
nav a[aria-current="page"] {
  color: var(--ink);
  border-bottom-color: var(--carmine);
}

.lang {
  font-size: .8125rem;
  color: var(--muted);
  white-space: nowrap;
}
.lang a, .lang strong { padding: 0 .15rem; }
.lang a { color: var(--muted); text-decoration: none; }
.lang a:hover { color: var(--ink); }
.lang strong { font-weight: 400; color: var(--ink); }

/* Opening: the heading runs the full width, the text sits in the column */

main { display: block; padding-bottom: 5rem; }

.opening { padding: 5.5rem 0 4.5rem; }

h1 {
  font-size: var(--step-4);
  line-height: 1.05;
  margin: 0 0 1.75rem;
  text-wrap: balance;
}

.standfirst {
  font-size: var(--step-2);
  font-style: italic;
  font-weight: 400;
  line-height: 1.3;
  color: var(--carmine);
  margin: 0 0 3rem;
  max-width: 30em;
}

/* Home page: name and tagline beside the portrait */

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 15rem;
  gap: 2.5rem;
  align-items: end;
  margin-bottom: 3.5rem;
}
.hero .standfirst { margin-bottom: 0; }

.portrait img {
  display: block;
  width: 100%;
  height: auto;
}

.intro {
  max-width: var(--col);
  margin-left: auto;
}
.intro p:last-child { margin-bottom: 0; }

.lede { font-size: var(--step-1); line-height: 1.55; }
.claim { font-weight: 600; }

/* Sections with a margin note on the left */

.block, .life {
  display: grid;
  grid-template-columns: var(--gutter) minmax(0, var(--col));
  justify-content: end;
  border-top: 1px solid var(--rule);
}
.block { padding: 2.75rem 0 3rem; }
.block.last, .life:last-of-type { border-bottom: 1px solid var(--rule); }

.marker {
  font-size: var(--step-2);
  font-weight: 500;
  line-height: 1.15;
  color: var(--carmine);
  padding-right: 1.5rem;
  font-variant-numeric: lining-nums;
}
.marker.small {
  font-size: var(--step-1);
  font-style: italic;
  font-weight: 400;
  line-height: 1.3;
  padding-top: .3rem;
  hyphens: manual;
}

.body { min-width: 0; }
.body > :first-child { margin-top: 0; }
.body > :last-child { margin-bottom: 0; }

h2 {
  font-size: var(--step-2);
  font-weight: 600;
  line-height: 1.2;
  letter-spacing: -.01em;
  margin: 0 0 1.1rem;
  text-wrap: balance;
}

h3 {
  font-size: var(--step-1);
  font-weight: 600;
  line-height: 1.3;
  margin: 2rem 0 .7rem;
}

.body a, .intro a {
  text-decoration-thickness: 1px;
  text-underline-offset: .2em;
}
.body a:hover, .intro a:hover { color: var(--carmine); }

/* Outcome line under each foresight */

.outcome {
  border-top: 1px solid var(--rule);
  margin-top: 1.75rem;
  padding-top: 1.1rem;
}
.outcome p { margin: 0; }
.tag { font-weight: 600; color: var(--carmine); }

/* Lists */

.steps {
  list-style: none;
  counter-reset: step;
  margin: 0 0 1.1rem;
  padding: 0;
}
.steps li {
  position: relative;
  padding-left: 2.25rem;
  margin-bottom: 1rem;
}
.steps li::before {
  counter-increment: step;
  content: counter(step);
  position: absolute;
  left: 0;
  top: -.2em;
  font-size: var(--step-1);
  font-weight: 600;
  color: var(--carmine);
}

.plain { list-style: none; margin: 0; padding: 0; }
.plain li { margin-bottom: 1.2rem; }
.plain li:last-child { margin-bottom: 0; }

.bul { margin: 0 0 1.1rem; padding-left: 1.1rem; }
.bul li { margin-bottom: .5rem; }
.bul li::marker { color: var(--carmine); }

/* Career timeline */

.life { padding: 1.9rem 0 1.8rem; }

.year {
  font-size: var(--step-1);
  font-weight: 500;
  color: var(--carmine);
  padding-right: 1.5rem;
  font-variant-numeric: lining-nums;
}

.life h2 { font-size: var(--step-1); margin-bottom: .5rem; }

.aside {
  border-left: 2px solid var(--carmine);
  margin: 1.4rem 0 0;
  padding: .1rem 0 .1rem 1.1rem;
  color: var(--muted);
  font-size: .9375rem;
}
.aside p { margin: 0; }

/* People: role under the name, Günter's words about them in his hand */

.role {
  margin: -.5rem 0 .9rem;
  font-size: .875rem;
  color: var(--muted);
}

.voice { margin: 1.4rem 0 .5rem; }
.voice p {
  margin: 0;
  font-family: var(--script);
  font-size: 1.75rem;
  line-height: 1.3;
}

[id] { scroll-margin-top: 1.5rem; }

/* Handwritten like the page title, and as wide */

.pull {
  max-width: 44rem;
  margin: 4.5rem 0 0;
}
.pull p {
  margin: 0;
  font-size: var(--step-3);
  line-height: 1.2;
  text-wrap: balance;
}

/* Further reading */

.next {
  display: flex;
  flex-wrap: wrap;
  gap: .75rem 2rem;
  max-width: var(--col);
  margin: 3rem 0 0 auto;
}
.next a {
  text-decoration-thickness: 1px;
  text-underline-offset: .25em;
}
.next a:hover { color: var(--carmine); }

/* Contact */

.address { font-style: normal; margin: 0 0 1.6rem; }

.reach {
  display: grid;
  grid-template-columns: max-content 1fr;
  gap: .3rem 1.5rem;
  margin: 0 0 1.6rem;
}
.reach dt { color: var(--muted); }
.reach dd { margin: 0; }

/* Footer */

footer { border-top: 1px solid var(--rule); padding: 2.5rem 0 4rem; }

.foot {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem 3rem;
  font-size: .8125rem;
  line-height: 1.7;
  color: var(--muted);
}
.foot p { margin: 0; }
.foot strong { font-weight: 600; color: var(--ink); }
.foot a { color: var(--muted); }
.foot a:hover { color: var(--ink); }

/* One entrance, on the opening only */

.opening { animation: rise .8s cubic-bezier(.2, .7, .2, 1) both; }

@keyframes rise {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: none; }
}

@media (prefers-reduced-motion: reduce) {
  .opening { animation: none; }
}

/* Print */

@media print {
  :root { --ink: #000; --muted: #444; --carmine: #000; --navy: #000; }
  nav, .lang, .next, .skip { display: none; }
  body { font-size: 11pt; }
  .opening { animation: none; padding: 1rem 0 2rem; }
  .block, .life { break-inside: avoid; }
}

/* Narrow screens */

@media (max-width: 48rem) {
  body { font-size: 1rem; }
  .wrap { padding-left: 1.25rem; padding-right: 1.25rem; }
  .head { padding-top: 1.1rem; padding-bottom: .9rem; }
  nav { order: 3; width: 100%; gap: .2rem .9rem; font-size: .8125rem; }
  .opening { padding: 3rem 0 2.75rem; }
  h1 { margin-bottom: 1.5rem; }
  .standfirst { font-size: 1.125rem; margin-bottom: 2rem; }
  .hero {
    grid-template-columns: minmax(0, 1fr) clamp(7rem, 36vw, 12rem);
    gap: 1.25rem;
    align-items: center;
    margin-bottom: 2.5rem;
  }
  .lede { font-size: 1.125rem; }
  .intro, .next { max-width: none; margin-left: 0; }
  .block, .life { grid-template-columns: 1fr; }
  .block { padding: 2rem 0 2.25rem; }
  .marker { font-size: var(--step-1); padding: 0 0 .6rem; }
  .marker.small { font-size: 1.0625rem; padding: 0 0 .5rem; }
  .year { padding: 0 0 .3rem; }
  .pull { margin-top: 3rem; }
  .pull p { font-size: 2.125rem; }
}
