@font-face {
  font-family: "JetBrains Mono";
  font-weight: 300;
  font-style: normal;
  font-display: swap;
  src: url("fonts/JetBrainsMono-Light.woff2") format("woff2");
}

@font-face {
  font-family: "JetBrains Mono";
  font-weight: 500;
  font-style: normal;
  font-display: swap;
  src: url("fonts/JetBrainsMono-Medium.woff2") format("woff2");
}

:root {
  color-scheme: dark;

  --color-background: #0e1014;
  --color-surface: #181b21;
  --color-border: #2a2e37;
  --color-text: #f4f4f1;
  --color-text-muted: #a9aeb9;
  --color-accent: #33ee66;

  --space-1: 0.5rem;
  --space-2: 1.5rem;
  --space-3: 2.5rem;

  --font-family: "JetBrains Mono", ui-monospace, monospace;
  --font-size-small: 0.875rem;
  --font-size-base: 1rem;
  --font-size-subheading: 1.125rem;
  --font-size-heading: 1.5rem;
  --font-size-logo: 3rem;
  --line-height-base: 1.5;
  --line-height-tight: 1;
  --letter-spacing-logo: -0.03em;

  --content-width: 40rem;
  --outline-width: 0.125rem;
  --line-width: 1px;
  --radius: 0.5rem;
  --size-target: 2.75rem;
  --underline-offset: 0.25em;

  --duration-blink: 1.2s;
}

@media (min-width: 48rem) {
  :root {
    --font-size-logo: 4.5rem;
  }
}

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

body {
  margin: 0;
  min-height: 100vh;
  /* 100vh zählt am Handy die eingeklappte Adressleiste mit; 100svh nur den sichtbaren Bereich. */
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
  padding: var(--space-2);
  background: var(--color-background);
  color: var(--color-text);
  font-family: var(--font-family);
  /* Es gibt nur die Gewichte 300 und 500; ohne das rechnet der Browser Überschriften künstlich fett. */
  font-synthesis: none;
  font-size: var(--font-size-base);
  font-weight: 300;
  line-height: var(--line-height-base);
}

h1,
h2,
strong {
  font-weight: 500;
}

main {
  flex-grow: 1;
}

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

a {
  color: var(--color-accent);
  text-underline-offset: var(--underline-offset);
}

a:hover {
  color: var(--color-text);
}

a:focus-visible {
  outline: var(--outline-width) solid var(--color-accent);
  outline-offset: 0;
}

.site-header,
.site-footer,
.text-page {
  width: 100%;
  max-width: var(--content-width);
  align-self: center;
}

.site-header a,
.site-footer a {
  display: inline-flex;
  align-items: center;
  min-height: var(--size-target);
}

/* Auf der Startseite ist die große Wortmarke das Logo; im HTML bleibt der Kopf wie auf allen Seiten. */
body:has(.intro) .site-header {
  visibility: hidden;
}

.site-footer {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  column-gap: var(--space-2);
  padding-top: var(--space-1);
  border-top: var(--line-width) solid var(--color-border);
  color: var(--color-text-muted);
  font-size: var(--font-size-small);
}

.site-footer nav {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  column-gap: var(--space-2);
}

.site-footer a {
  color: inherit;
  text-decoration: none;
}

.site-footer a:hover {
  color: var(--color-text);
  text-decoration: underline;
}

.site-footer p {
  margin: 0;
}

.wordmark {
  color: var(--color-text);
  font-weight: 500;
  letter-spacing: var(--letter-spacing-logo);
  line-height: var(--line-height-tight);
  text-decoration: none;
}

.wordmark-large {
  margin: 0;
  font-size: var(--font-size-logo);
}

.wordmark-light {
  font-weight: 300;
}

.wordmark-cursor {
  color: var(--color-accent);
}

.wordmark-large .wordmark-cursor {
  animation: blink var(--duration-blink) steps(1) infinite;
}

@keyframes blink {
  50% {
    opacity: 0;
  }
}

.intro {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  text-align: center;
}

.tagline {
  margin: 0;
  color: var(--color-text-muted);
  font-size: var(--font-size-subheading);
  text-wrap: balance;
}

/* Lange deutsche Wörter ragen am schmalen Handy sonst über den Rand. */
.text-page {
  overflow-wrap: break-word;
}

.text-page h1 {
  margin: 0 0 var(--space-2);
  font-size: var(--font-size-heading);
}

.text-page h2 {
  margin: var(--space-3) 0 var(--space-1);
  font-size: var(--font-size-subheading);
}

/* Das # ist Schmuck wie in Markdown; der leere Alternativtext hält es vom Screenreader fern. */
.text-page h2::before {
  content: "# " / "";
  color: var(--color-accent);
}

.text-page p,
.text-page ul {
  margin: 0 0 var(--space-2);
}

/* Ohne Unterstrich braucht der Link neben dem Grün ein zweites Merkmal (WCAG 1.4.1): den kräftigeren Schnitt. */
.text-page p a {
  font-weight: 500;
  text-decoration: none;
}

.text-page p a:hover,
.text-page p a:focus-visible {
  text-decoration: underline;
}

.contact-list {
  display: grid;
  gap: var(--space-1);
  padding: 0;
  list-style: none;
}

.contact-list a {
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-height: var(--size-target);
  padding: var(--space-1) var(--space-2);
  border: var(--line-width) solid var(--color-border);
  border-radius: var(--radius);
  background: var(--color-surface);
  font-size: var(--font-size-subheading);
  text-decoration: none;
}

.contact-list a:hover {
  border-color: var(--color-accent);
}

.contact-label {
  color: var(--color-text-muted);
  font-size: var(--font-size-small);
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
  }
}
