/* ------------------------------------------------------------------
   Tokens
   ------------------------------------------------------------------ */
:root {
  --font-body: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
               "Helvetica Neue", Arial, sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, monospace;

  --accent: #d32a00;
  --text:   #222222;
  --muted:  #666666;
  --border: #e5e5e5;
  --bg:     #ffffff;

  --measure: 34rem;   /* Textbreite */
  --gutter:  1.5rem;
}

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

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

body {
  margin: 0;
  padding: 0 var(--gutter);
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 1.0625rem;
  line-height: 1.65;
  letter-spacing: -0.011em;
  -webkit-font-smoothing: antialiased;
}

a {
  color: inherit;
  text-decoration-color: var(--border);
  text-underline-offset: 0.18em;
  text-decoration-thickness: 1px;
}

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

a:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
  border-radius: 1px;
}

/* ------------------------------------------------------------------
   Kopf
   ------------------------------------------------------------------ */
.site-head {
  max-width: var(--measure);
  margin: 0 auto;
  padding: 3rem 0 2rem;
  border-bottom: 1px solid var(--border);
}

.wordmark {
  display: inline-block;
  font-size: 1rem;
  font-weight: 600;
  letter-spacing: -0.02em;
  text-decoration: none;
  color: var(--accent);
}

.wordmark-note {
  display: block;
  margin-top: 0.1rem;
  font-weight: 400;
  font-size: 0.875rem;
  letter-spacing: -0.011em;
  color: var(--muted);
}

.site-head nav { margin-top: 1.5rem; }

.site-head ul {
  display: flex;
  flex-wrap: wrap;
  gap: 1.25rem;
  margin: 0;
  padding: 0;
  list-style: none;
  font-size: 0.9375rem;
}

.site-head a[aria-current="page"] {
  text-decoration-color: var(--accent);
  text-decoration-thickness: 2px;
}

/* ------------------------------------------------------------------
   Textkörper
   ------------------------------------------------------------------ */
.prose {
  max-width: var(--measure);
  margin: 0 auto;
  padding: 3rem 0 4rem;
}

.prose > *:first-child { margin-top: 0; }

h1, h2, h3, h4, h5, h6 {
  color: var(--accent);
  letter-spacing: -0.02em;
  line-height: 1.25;
  font-weight: 600;
  margin: 2.25em 0 0.6em;
  text-wrap: balance;
}

h1 { font-size: 1.875rem; margin-top: 0; }
h2 { font-size: 1.3125rem; }
h3 { font-size: 1.0625rem; }
h4, h5, h6 { font-size: 1rem; }

p, ul, ol, blockquote, pre, table, figure { margin: 0 0 1.2em; }

ul, ol { padding-left: 1.25em; }
li { margin-bottom: 0.35em; }

.eyebrow {
  font-family: var(--font-mono);
  font-size: 0.8125rem;
  letter-spacing: 0;
  color: var(--muted);
  margin-bottom: 1.5rem;
}

blockquote {
  margin-left: 0;
  padding-left: 1.1rem;
  border-left: 2px solid var(--border);
  color: var(--muted);
}

hr {
  border: 0;
  border-top: 1px solid var(--border);
  margin: 3rem 0;
}

code {
  font-family: var(--font-mono);
  font-size: 0.875em;
  letter-spacing: 0;
  background: #f6f6f6;
  padding: 0.1em 0.35em;
  border-radius: 2px;
}

pre {
  background: #f6f6f6;
  padding: 1rem;
  border-radius: 3px;
  overflow-x: auto;
}

pre code { background: none; padding: 0; font-size: 0.8125rem; }

img, video { max-width: 100%; height: auto; display: block; }

figcaption {
  font-size: 0.875rem;
  color: var(--muted);
  margin-top: 0.5rem;
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9375rem;
}

th, td {
  text-align: left;
  padding: 0.5rem 0.75rem 0.5rem 0;
  border-bottom: 1px solid var(--border);
  vertical-align: top;
}

th { font-weight: 600; }

/* ------------------------------------------------------------------
   Fuß
   ------------------------------------------------------------------ */
.site-foot {
  max-width: var(--measure);
  margin: 0 auto;
  padding: 2rem 0 3rem;
  border-top: 1px solid var(--border);
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
  font-size: 0.875rem;
  color: var(--muted);
}

.site-foot p { margin: 0; }

/* ------------------------------------------------------------------
   Klein
   ------------------------------------------------------------------ */
@media (max-width: 30rem) {
  body { font-size: 1rem; }
  .site-head { padding-top: 2rem; }
  .prose { padding: 2rem 0 3rem; }
  h1 { font-size: 1.625rem; }
}

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

/* ------------------------------------------------------------------
   Portfolio-Raster
   ------------------------------------------------------------------ */
.projects {
  max-width: 60rem;
  margin: 0 auto;
  padding: 1rem var(--gutter) 4rem;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(15rem, 1fr));
  gap: 2rem 1.5rem;
}

.project {
  display: flex;
  flex-direction: column;
  text-decoration: none;
  color: var(--text);
}

.project-cover {
  display: block;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  background: #f6f6f6;
  border-radius: 3px;
}

.project-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.4s ease;
}

.project:hover .project-cover img {
  transform: scale(1.03);
}

.project-body {
  padding-top: 0.75rem;
}

.project-title {
  display: block;
  font-weight: 600;
  letter-spacing: -0.02em;
  color: var(--accent);
  margin-bottom: 0.25rem;
}

.project:hover .project-title {
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.18em;
}

.project-teaser {
  display: block;
  font-size: 0.9375rem;
  line-height: 1.5;
  color: var(--muted);
}

@media (prefers-reduced-motion: reduce) {
  .project-cover img { transition: none; }
}
