/* tinoweishaar.de
 *
 * Hell, luftig, weich gerundet. Das Portraet traegt die Seite, die Typografie
 * traegt die Hierarchie. Eine Schriftfamilie, eine Akzentfarbe, ein dunkles
 * Feld am Schluss.
 *
 * Die .htaccess setzt style-src 'self'. Deshalb liegt jede Regel hier und
 * es gibt weder <style>-Bloecke noch style-Attribute im Markup.
 */

/* --------------------------------------------------------------- Schrift
 * Schibsted Grotesk, Variable-Fassung mit Gewichtsachse 400 bis 900.
 * Eine Datei fuer die ganze Seite, 46 KB, selbst gehostet.
 * U+0000-00FF deckt Umlaute und das scharfe s ab, U+2000-206F den
 * Bis-Strich und die Anfuehrungszeichen.
 */

@font-face {
  font-family: 'Schibsted Grotesk';
  font-style: normal;
  font-weight: 400 900;
  font-display: swap;
  src: url('/assets/fonts/schibsted-grotesk-latin-wght-normal.woff2') format('woff2-variations');
  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;
}

/* ---------------------------------------------------------------- Tokens
 * Jedes Text-Hintergrund-Paar ist gegen WCAG AA gerechnet, die Werte stehen
 * in DESIGN.md.
 */

:root {
  color-scheme: light;

  --bg: #fafaf8;
  --surface: #f1f0ec;
  --surface-2: #e9e8e1;
  --ink: #1a1a18;
  --muted: #66655e;
  --accent: #1a56c4;
  --accent-quiet: #e8eefb;
  --border: #e5e3dc;
  --panel-ink-bg: #1a1a18;
  --panel-ink-fg: #fafaf8;
  --shadow: 24 24 20;

  --font: 'Schibsted Grotesk', system-ui, -apple-system, 'Segoe UI', sans-serif;

  --r-sm: 10px;
  --r-md: 16px;
  --r-lg: 24px;
  --r-pill: 999px;

  --s-1: 0.25rem;
  --s-2: 0.5rem;
  --s-3: 0.75rem;
  --s-4: 1rem;
  --s-6: 1.5rem;
  --s-8: 2rem;
  --s-12: 3rem;
  --s-16: 4rem;
  --s-24: 6rem;
  --s-32: 8rem;

  --page: 78rem;
  --gutter: clamp(1.25rem, 5vw, 3rem);
  --measure: 60ch;

  --ease: cubic-bezier(0.16, 1, 0.3, 1);
}

@media (prefers-color-scheme: dark) {
  :root {
    color-scheme: dark;

    --bg: #121211;
    --surface: #1c1c1a;
    --surface-2: #24241f;
    --ink: #efeeea;
    --muted: #a3a19a;
    --accent: #8ab4ff;
    --accent-quiet: #1b2536;
    --border: #2b2b27;
    --panel-ink-bg: #efeeea;
    --panel-ink-fg: #121211;
    --shadow: 0 0 0;
  }
}

/* ----------------------------------------------------------------- Basis */

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

html {
  -webkit-text-size-adjust: 100%;
  scrollbar-color: var(--border) var(--bg);
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font);
  font-size: 1.0625rem;
  font-weight: 400;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  overflow-wrap: break-word;
}

/* Browser-Oberflaechen gehoeren zur Gestaltung, nicht zum Browser. */

::selection {
  background: var(--accent);
  color: var(--bg);
}

:root {
  caret-color: var(--accent);
  accent-color: var(--accent);
}

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: var(--r-sm);
}

::-webkit-scrollbar {
  width: 11px;
  height: 11px;
}

::-webkit-scrollbar-track {
  background: var(--bg);
}

::-webkit-scrollbar-thumb {
  background: var(--border);
  border: 3px solid var(--bg);
  border-radius: var(--r-pill);
}

::-webkit-scrollbar-thumb:hover {
  background: var(--muted);
}

/* ------------------------------------------------------------------ Typo */

h1,
h2,
h3 {
  margin: 0;
  font-weight: 600;
  text-wrap: balance;
}

h1 {
  font-size: clamp(2.75rem, 7vw, 4.5rem);
  font-weight: 700;
  line-height: 0.97;
  letter-spacing: -0.038em;
}

h2 {
  font-size: 1.125rem;
  line-height: 1.3;
  letter-spacing: -0.01em;
}

h3 {
  font-size: 1.25rem;
  line-height: 1.35;
  letter-spacing: -0.015em;
}

p {
  margin: 0;
  max-width: var(--measure);
  text-wrap: pretty;
}

a {
  color: var(--accent);
  text-decoration-line: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.2em;
  transition: text-decoration-thickness 150ms var(--ease),
    text-underline-offset 150ms var(--ease);
}

a:hover {
  text-decoration-thickness: 2px;
  text-underline-offset: 0.26em;
}

/* ---------------------------------------------------------------- Geruest */

.wrap {
  max-width: var(--page);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.skip {
  position: absolute;
  left: -9999px;
  top: 0;
  z-index: 5;
  padding: var(--s-3) var(--s-4);
  background: var(--ink);
  color: var(--bg);
  border-radius: 0 0 var(--r-md) 0;
  text-decoration: none;
}

.skip:focus {
  left: 0;
}

.topbar {
  display: flex;
  justify-content: flex-end;
  padding-block: var(--s-6);
}

.langswitch {
  display: flex;
  gap: var(--s-1);
  padding: var(--s-1);
  background: var(--surface);
  border-radius: var(--r-pill);
}

.langswitch a {
  padding: 0.3rem 0.85rem;
  border-radius: var(--r-pill);
  color: var(--muted);
  font-size: 0.875rem;
  font-weight: 600;
  text-decoration: none;
  transition: color 150ms var(--ease), background-color 150ms var(--ease);
}

.langswitch a:hover {
  color: var(--ink);
}

.langswitch [aria-current] {
  background: var(--bg);
  color: var(--ink);
}

/* ------------------------------------------------------------------ Hero */

.hero {
  display: grid;
  gap: var(--s-12);
  padding-block: var(--s-8) var(--s-24);
}

@media (min-width: 60rem) {
  .hero {
    grid-template-columns: 1.12fr 0.88fr;
    align-items: center;
    gap: var(--s-16);
    padding-block: var(--s-12) var(--s-32);
  }

  .hero__figure {
    grid-column: 2;
    grid-row: 1;
  }

  .hero__text {
    grid-column: 1;
    grid-row: 1;
  }
}

.hero__figure {
  margin: 0;
  max-width: 32rem;
}

.hero__figure img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 4 / 5;
  object-fit: cover;
  border-radius: var(--r-lg);
  background: var(--surface);
  box-shadow: 0 2px 4px rgb(var(--shadow) / 0.05),
    0 18px 48px rgb(var(--shadow) / 0.1);
}

.role {
  margin-top: var(--s-4);
  color: var(--muted);
  font-size: 1.1875rem;
  font-weight: 500;
}

.lead {
  margin-top: var(--s-6);
  font-size: clamp(1.25rem, 1.1rem + 0.7vw, 1.625rem);
  font-weight: 400;
  line-height: 1.45;
  letter-spacing: -0.012em;
}

.lead + p {
  margin-top: var(--s-4);
  color: var(--muted);
}

.button {
  display: inline-flex;
  align-items: center;
  margin-top: var(--s-8);
  padding: 0.8rem 1.6rem;
  background: var(--ink);
  color: var(--bg);
  border-radius: var(--r-pill);
  font-size: 1rem;
  font-weight: 600;
  text-decoration: none;
  transition: background-color 180ms var(--ease), transform 180ms var(--ease);
}

.button:hover {
  background: var(--accent);
  transform: translateY(-2px);
}

.button:active {
  transform: translateY(0);
}

/* -------------------------------------------------------------- Abschnitte */

section {
  padding-block: var(--s-12);
}

section > h2 {
  margin-bottom: var(--s-6);
}

/* ------------------------------------------------------------------ Reihen */

.rows {
  list-style: none;
  margin: 0;
  padding: 0;
}

.row {
  padding: var(--s-6);
  border-radius: var(--r-md);
}

.row:nth-child(odd) {
  background: var(--surface);
}

.row__date {
  margin-bottom: var(--s-2);
  color: var(--accent);
  font-size: 0.8125rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  font-variant-numeric: tabular-nums;
}

.row__org {
  margin-top: var(--s-1);
  color: var(--muted);
}

.row__note {
  margin-top: var(--s-3);
  color: var(--muted);
  font-size: 0.9375rem;
}

/* ------------------------------------------------------------------ Karten */

.panel {
  padding: var(--s-8);
  background: var(--surface);
  border-radius: var(--r-lg);
}

.panel--ink {
  background: var(--panel-ink-bg);
  color: var(--panel-ink-fg);
}

.panel--ink h2,
.panel--ink p,
.panel--ink a {
  color: var(--panel-ink-fg);
}

.panel--ink :focus-visible {
  outline-color: var(--panel-ink-fg);
}

.panel h2 {
  margin-bottom: var(--s-4);
}

.panel p + p {
  margin-top: var(--s-4);
}

.mailto {
  display: inline-block;
  margin-top: var(--s-4);
  font-size: clamp(1.25rem, 1.05rem + 0.9vw, 1.75rem);
  font-weight: 600;
  letter-spacing: -0.02em;
}

.panel .profile {
  margin-top: var(--s-6);
  color: var(--muted);
  font-size: 0.9375rem;
}

/* -------------------------------------------------------------------- Fuss */

.site-foot {
  margin-top: var(--s-16);
  padding-block: var(--s-8) var(--s-12);
  border-top: 1px solid var(--border);
  color: var(--muted);
  font-size: 0.9375rem;
}

.site-foot ul {
  display: flex;
  flex-wrap: wrap;
  gap: var(--s-6);
  list-style: none;
  margin: 0;
  padding: 0;
}

.site-foot a {
  color: var(--muted);
  text-decoration-color: var(--border);
}

.site-foot a:hover {
  color: var(--ink);
}

.site-foot [aria-current] {
  color: var(--ink);
  font-weight: 600;
}

/* -------------------------------------------------------------- Rechtstexte */

.prose {
  max-width: 46rem;
}

.prose > * + * {
  margin-top: var(--s-4);
}

.prose > h2 {
  margin-top: var(--s-12);
  margin-bottom: 0;
}

.prose > h2 + * {
  margin-top: var(--s-3);
}

.prose ul {
  max-width: var(--measure);
  margin: 0;
  padding-left: 1.25rem;
}

.prose li + li {
  margin-top: var(--s-2);
}

.prose .back {
  display: inline-block;
  margin-top: var(--s-12);
}

.page-title {
  padding-block: var(--s-8) var(--s-12);
}

.note {
  color: var(--muted);
  font-size: 0.9375rem;
}

/* --------------------------------------------------------------- Platzhalter
 * Sichtbar und unuebersehbar. Vor dem Livegang muss jedes Vorkommen weg.
 */

.ph {
  padding: 0.05em 0.3em;
  background: var(--accent-quiet);
  border-radius: var(--r-sm);
  color: var(--accent);
  font-weight: 600;
}

/* ---------------------------------------------------------------- Bewegung
 * Ein Moment beim Laden: Portraet und Name kommen aus einem bereits
 * sichtbaren Zustand heraus kurz nach oben. Sonst bewegt sich beim Scrollen
 * nichts, die Seite ist zum Lesen da.
 */

.hero__figure,
.hero__text {
  animation: rise 620ms var(--ease) both;
}

.hero__text {
  animation-delay: 90ms;
}

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

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

@media print {
  .skip,
  .topbar {
    display: none;
  }

  body {
    background: #fff;
    color: #000;
  }

  .row:nth-child(odd),
  .panel {
    background: none;
    border: 1px solid #ccc;
  }

  .panel--ink,
  .panel--ink h2,
  .panel--ink p,
  .panel--ink a {
    background: none;
    color: #000;
  }
}
