:root {
  /* Diese 7 Werte sind die eigentlichen Gestaltungsregler */
  --bg: #000000;
  --text: #ffffff;
  --accent: #ffff64;
  --panel-color: transparent;
  --text-width: 60ch;

  /* Layout */
  --max: 1180px;
  --radius: 20px;
  --image-radius: 16px;
  --page-gutter: 16px;
  --panel-pad: 28px;

  /* Typografie */
  --h1: clamp(4rem, 7.2vw, 7.4rem);
  --h2: clamp(2rem, 4vw, 3.4rem);
  --h3: clamp(1.35rem, 1.15rem + 0.7vw, 1.75rem);
  --category: 1rem;
  --paragraph: 1rem;
  --button-text: 1rem;
  --marginalien: 0.6rem;
  --leading-body: 1.65;
  --leading-h1: 1.03;
  --leading-h2: 1.14;
  --leading-h3: 1.28;
  --tracking-h1: 0em;
  --tracking-h2: 0.025em;
  --tracking-h3: 0.05em;
  --stack-xxs: 8px;
  --stack-xs: 12px;
  --stack-sm: 16px;
  --stack-md: 24px;
  --stack-lg: 32px;

  /* Abstände */
  --space-sm: 16px;
  --space-md: 24px;
  --space-lg: 40px;
  --space-xl: 60px;
  --space-xxl: 100px;

  /* Linien */
  --line: #272727;
}

/* Base */
* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: Inter, Arial, Helvetica, sans-serif;
  color: var(--text);
  background: var(--bg);
  line-height: var(--leading-body);
  font-size: var(--paragraph);
  font-weight: 400;
  text-wrap: pretty;
}

img {
  max-width: 100%;
  display: block;
}


a {
  color: inherit;
  text-decoration: none;
}

p {
  margin: 0 0 var(--stack-sm);
  color: var(--text);
  font-size: inherit;
  line-height: var(--leading-body);
  max-width: var(--text-width);
}

p:last-child {
  margin-bottom: 0;
}


#spider {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
  z-index: -1;
  background: var(--bg);
  color: #ffffff;
  pointer-events: none;
}

header,
main,
footer {
  position: relative;
  z-index: 1;
}

.container {
  width: min(calc(100% - (var(--page-gutter) * 2)), var(--max));
  margin: 0 auto;
}

/* Header */

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: var(--panel-color);
  border-bottom: 1px solid rgba(255,255,255,.12);
}

.nav {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 16px;
  min-height: 64px;
  padding-left: 2px;
  padding-right: var(--panel-pad);
}

.brand {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  justify-self: start;
  flex: 0 0 auto;
  margin-left: -8px;
  transform: translateZ(0);
}

.brand:hover,
.brand:focus-visible,
.nav-links a:hover,
.nav-links a:focus-visible {
  color: var(--accent);
}

.brand img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  transform-origin: 50% 50%;
  will-change: transform;
}

.nav-links {
  display: flex;
  gap: 18px;
  flex-wrap: nowrap;
  font-size: 0.95rem;
  color: var(--accent);
  align-items: center;
  justify-self: center;
}

.nav-links a {
  font-family: inherit;
  font-weight: 400;
  letter-spacing: 0;
  line-height: var(--leading-body);
  white-space: nowrap;
}

.nav > .btn {
  margin-left: 0;
  justify-self: end;
  flex: 0 0 auto;
  padding: 7px 12px;
  font-size: 0.95rem;
}

/* Hero */

.hero {
  padding: var(--space-xxl) 0 var(--space-xl);
}

.hero .container {
  padding-inline: var(--panel-pad);
}

.hero h1 {
  margin: 0 0 var(--stack-sm);
  font-size: var(--h1);
  line-height: var(--leading-h1);
  letter-spacing: var(--tracking-h1);
  font-weight: 600;
  max-width: 14ch;
  text-wrap: balance;
}

.lead {
  margin: 0;
  max-width: 58ch;
  line-height: var(--leading-body);
}

/* Components: Panels */

.panel {
  padding: var(--space-md);
  background: var(--panel-color);
  border: none;
  border-radius: var(--radius);
  transition:
    color 0.2s ease,
    background-color 0.2s ease,
    transform 0.2s ease;
}

.project-body {
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  gap: var(--space-sm);
  padding-top: var(--space-sm);
  overflow: visible;
}

/* Typography */

.eyebrow {
  color: var(--text);
  text-transform: uppercase;
  letter-spacing: .12em;
  font-size: var(--category);
  margin-bottom: var(--stack-xs);
}

h1,
h2,
h3 {
  margin: 0 0 var(--stack-sm);
  font-weight: 600;
  text-wrap: balance;
}

h1 {
  font-size: var(--h1);
  line-height: var(--leading-h1);
  letter-spacing: var(--tracking-h1);
}

h2 {
  font-size: var(--h2);
  line-height: var(--leading-h2);
  letter-spacing: var(--tracking-h2);
  font-weight: 500;
}

h3 {
  font-size: var(--h3);
  line-height: var(--leading-h3);
  letter-spacing: var(--tracking-h3);
  font-weight: 500;
}

#arbeiten .project-body p {
  display: block;
  position: relative;
  z-index: 2;
  width: 100%;
  color: var(--text);
}

#arbeiten .video-container {
  height: auto;
  min-height: 0;
}

/* Headings only highlight when explicitly marked as interactive */
.heading-link:hover,
.heading-link:focus-visible {
  color: var(--accent);
}

.small {
  font-size: var(--marginalien);
  color: var(--text);
  line-height: 1.45;
}

.marginalien {
  font-size: var(--marginalien);
  color: var(--text);
  line-height: 1.45;
}

/* Components: Buttons */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 8px 14px;
  border-radius: 999px;
  border: 1px solid var(--accent);
  background-color: #000000;
  color: var(--accent);
  font-weight: 600;
  font-size: var(--button-text);
  transition:
    transform 0.01s ease,
    background-color 0.25s ease,
    border-color 0.25s ease,
    color 0.25s ease;
}

.btn:hover,
.btn:focus-visible {
  transform: scale(1.05);
  background-color: var(--accent);
  border-color: var(--accent);
  color: #000000;
}

.btn:active {
  transform: scale(0.98);
  background-color: #000000;
  border-color: var(--accent);
  color: var(--accent);
}

/* Layout: Sections */

.section {
  padding: var(--space-xl) 0;
}

.section + .section {
  padding-top: var(--space-xxl);
}


/* Components: Icons */
.icon {
  width: 28px;
  height: 28px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--accent);
  transition: transform 0.2s ease, color 0.2s ease, opacity 0.2s ease;
}

.icon svg {
  width: 100%;
  height: 100%;
  display: block;
  fill: currentColor;
}

.icon:hover,
.icon:focus-visible {
  color: var(--accent);
  transform: scale(1.08);
}

/* Kapitel-Einstieg */

.chapter-intro {
  display: flex;
  flex-direction: column;
  align-items: stretch;

  width: min(100%, 38rem);
  min-width: min(100%, 22rem);
  margin: calc(var(--space-xxl) * 1.1) auto var(--space-xl);
}

.chapter-intro > * {
  width: 100%;
  max-width: none;
}

.chapter-intro .about-content,
.chapter-intro .section-header {
  width: min(100%, 30rem);
  margin: 0 auto;
  padding: 0;
  text-align: left;
}

.chapter-intro p {
  margin: 0;
  max-width: none;
}

.final-cta {
  padding-top: calc(var(--space-xxl) + var(--space-lg));
  padding-bottom: calc(var(--space-xxl) + var(--space-sm));
}

.final-cta-panel {
  width: min(100%, 42rem);
  margin: 0 auto;
  text-align: center;
}

.final-cta-panel h2,
.final-cta-panel p {
  max-width: none;
}

.final-cta-panel .btn {
  margin-top: var(--space-md);
}

/* Audioproduktionen */

.audio-projects {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-md);
  align-items: start;
}

.audio-projects .project {
  grid-column: auto;
}

.audio-projects .article-image {
  width: 48%;
  margin: 0;
  justify-self: start;
  align-self: flex-start;
}

/* Layout: Grids */

.grid {
  display: grid;
  gap: var(--space-md);
}

.projects {
  grid-template-columns: repeat(12, 1fr);
  align-items: start;
}

.project {
  grid-column: span 4;
  overflow: hidden;
}

/* Components: Project Cards */

.project-image {
  aspect-ratio: 4 / 3;
  border-bottom: 1px solid var(--line);
}

.project-image.video-container {
  aspect-ratio: auto;
  height: auto;
  min-height: 0;
  border-bottom: none;
}

.project-image.video-container.media-swap {
  aspect-ratio: 1 / 1;
}

/* About */

#ueber-mich .panel.about {
  background: transparent;
  border: none;
}

.about {
  display: grid;
  grid-template-columns: .9fr 1.1fr;
  overflow: hidden;
}

.about-image {
  display: flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  height: auto;
}

.about-image img {
  width: 75%;
  max-width: 420px;
  height: auto;
  object-fit: contain;
  object-position: center;
}

/* Modal */
.modal {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.6);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 999;
  overflow-y: auto;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
  padding: 40px 20px;
}

.modal-content {
  max-width: 800px;
  width: 100%;
  position: relative;
  max-height: 90vh;
  padding: 32px;
  background: #000000;
  color: #ffffff;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  border: 1px solid var(--accent);
  border-radius: var(--radius);
}

.video-modal-content {
  max-width: 620px;
}

.video-modal-content video {
  display: block;
  width: min(100%, 520px);
  height: auto;
  margin: 16px auto 0;
  border-radius: 20px;
  background: #000000;
}

.cv-text,
.cv-text h3,
.cv-text h4,
.cv-text p,
.cv-text li,
.cv-text .small {
  color: #ffffff;
}

/* Close Button */
.modal-close {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 44px;
  height: 44px;
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 28px;
  line-height: 1;
  background: none;
  border: none;
  color: var(--accent);
  cursor: pointer;
  border-radius: 999px;
}

/* Layout */
.cv-layout {
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 32px;
  align-items: start;
}

.cv-image {
  display: flex;
  justify-content: center;
}

.cv-image img {
  width: 100%;
  max-width: 220px;
  height: auto;
  border-radius: 12px;
  object-fit: cover;
}

.cv-text h3 {
  margin-top: 0;
}

/* Media */

.article-image {
  width: 100%;
  aspect-ratio: 1 / 1;
  overflow: hidden;
  border-radius: var(--image-radius);
  border: 1px solid var(--accent);
}

.article-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  border-radius: inherit;
}

.media-swap {
  position: relative;
  overflow: hidden;
}

.media-swap .media-default,
.media-swap .media-hover {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
  object-position: center;
  border-radius: inherit;
}

.media-swap .media-default {
  z-index: 2;
  opacity: 1 !important;
  transition: opacity 0.25s ease;
  pointer-events: auto !important;
}

.media-swap .media-hover {
  z-index: 1;
  opacity: 0 !important;
  transition: opacity 0.25s ease;
  pointer-events: none !important;
}

.media-swap:hover .media-default,
.media-swap.is-hovered .media-default,
.media-swap:focus-within .media-default {
  opacity: 0 !important;
  pointer-events: none !important;
}

.media-swap:hover .media-hover,
.media-swap.is-hovered .media-hover,
.media-swap:focus-within .media-hover {
  opacity: 1 !important;
  pointer-events: auto !important;
}

.video-container {
  width: 100%;
  aspect-ratio: 1 / 1;
  height: auto;
  overflow: hidden;
  border-radius: var(--image-radius);
  border: 1px solid var(--accent);
}

.project-video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  display: block;
  border-radius: inherit;
}

/* Components: Book */

.book {
  display: grid;
  grid-template-columns: .9fr 1.1fr;
  gap: var(--space-lg);
  overflow: hidden;
  width: 100%;
}

.content {
  padding-left: var(--space-md);
}

.book-links {
  display: flex;
  flex-wrap: nowrap;
  gap: var(--space-sm);
  margin-top: var(--space-md);
}

.book-links .btn {
  white-space: nowrap;
}

/* Components: References / Denken */
.media-left-section .references-grid {
  display: grid;
  gap: 32px;
}

.media-left-section .video-container {
  width: 240px;
  max-width: 240px;
  flex-shrink: 0;
}

.media-left-section .book {
  display: grid;
  grid-template-columns: 240px minmax(0, 1fr);
  gap: 24px;
  align-items: start;
}

.media-left-section .article-image {
  width: 240px;
  max-width: 240px;
  aspect-ratio: 1 / 1;
  flex-shrink: 0;
  border: 1px solid var(--accent);
}

.media-left-section .article-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.media-left-section .content {
  min-width: 0;
  padding-left: 0;
}

/* Footer */

.footer {
  padding: var(--space-lg) 0 var(--space-xl);
}

.footer-box {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-md);
  align-items: start;
}
.footer-box h3 {
  margin: 0 0 2px;
}
.footer-box p {
  margin-top: 0;
}

.footer-intro {
  font-size: var(--h3);
  line-height: 1.2;
}

.footer p {
  max-width: none;
}

.social-links {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: var(--space-sm);
  flex-wrap: wrap;
  margin: 4px 0 10px;
}

#kinderbuch {
  margin-top: 64px;
}



/* Responsive */

@media (max-width: 980px) {
  :root {
    --panel-pad: 24px;
  }

  .projects {
    grid-template-columns: repeat(12, 1fr);
  }

  .project {
    grid-column: span 6;
  }

  .book,
  .about,
  .footer-box,
  .media-left-section .book {
    grid-template-columns: 1fr;
  }

  .content {
    padding-left: 0;
  }

  .hero h1 {
    max-width: none;
  }
}

@media (max-width: 640px) {
  :root {
    --page-gutter: 12px;
    --panel-pad: 22px;
  }

  .nav {
    grid-template-columns: 42px 1fr 42px;
    min-height: 56px;
    padding: 10px var(--panel-pad);
    align-items: center;
    gap: 6px;
  }

  .site-header {
    background: #000000;
  }

  .brand {
    width: 42px;
    height: 42px;
    margin-left: -4px;
  }

  .nav-links {
    flex: 0 1 auto;
    gap: 6px;
    flex-wrap: nowrap;
    white-space: nowrap;
    font-size: 0.75rem;
    line-height: 1.1;
    overflow: hidden;
    justify-self: center;
    margin-left: -6px;
  }

  .nav-links a {
    text-transform: uppercase;
    letter-spacing: 0.06em;
  }

  .site-header .btn {
    display: inline-flex;
    position: static;
    min-width: 42px;
    justify-content: center;
    padding: 6px 6px;
    font-size: 0.75rem;
    line-height: 1.1;
    white-space: nowrap;
    background-color: #000000;
    margin-left: 0;
    flex: 0 0 auto;
  }

  .hero {
    padding-top: 56px;
    padding-bottom: 52px;
  }

  .hero .container {
    min-height: min(54svh, 420px);
    display: flex;
    flex-direction: column;
    justify-content: center;
  }

  .hero .container,
  .section-header {
    padding-inline: var(--panel-pad);
  }

  .project {
    grid-column: span 12;
  }

  .audio-projects {
    grid-template-columns: 1fr;
    gap: var(--space-lg);
  }

  .audio-projects .article-image {
    width: 100%;
    max-width: none;
  }

  .chapter-intro {
    width: 100%;
    min-width: 0;
  }

  .social-links {
    justify-content: flex-start;
  }

  .footer-intro {
    text-align: left;
  }

  .cv-layout {
    grid-template-columns: 1fr;
    gap: 24px;
  }

  .cv-image img {
    max-width: 140px;
  }

  .modal {
    padding: 20px 12px;
  }

  .modal-content {
    padding: 24px 20px 20px;
    max-height: calc(100svh - 40px);
  }

  .media-left-section .article-image,
  .media-left-section .video-container {
    width: 100%;
    max-width: none;
  }

  .article-image {
    margin-inline: 0;
  }
}
