@font-face {
  font-family: "Inter Tight";
  src: url("fonts/InterTight-VariableFont_wght.ttf") format("truetype");
  font-weight: 100 900;
  font-display: swap;
}
@font-face {
  font-family: "JetBrains Mono";
  src: url("fonts/JetBrainsMono-VariableFont_wght.ttf") format("truetype");
  font-weight: 100 800;
  font-display: swap;
}

:root {
  --paper: #ffffff;
  --paper-light: #ffffff;
  --ink: #20232b;
  --muted: #5e636d;
  --line: rgba(32, 35, 43, .16);
  --yellow: #ffd700;
  --chalk: #f4f5f7;
  --sans: "Inter Tight", sans-serif;
  --mono: "JetBrains Mono", monospace;
  --serif: "Inter Tight", sans-serif;
  --shell: min(1180px, calc(100% - 3rem));
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  color: var(--ink);
  background: var(--paper);
  font-family: var(--sans);
  font-size: 18px;
  line-height: 1.45;
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; }
button { font: inherit; }
img, video, iframe { display: block; max-width: 100%; }
::selection { background: var(--yellow); color: var(--ink); }

.page-shell { width: var(--shell); margin-inline: auto; }

.site-header {
  width: var(--shell);
  margin: 0 auto;
  min-height: 88px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
  border-bottom: 1px solid var(--line);
}
.wordmark { text-decoration: none; display: flex; flex-direction: column; line-height: 1; }
.wordmark-main { font-family: var(--serif); font-size: 1.25rem; font-style: italic; }
.wordmark-sub { margin-top: .35rem; font-family: var(--mono); font-size: .62rem; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.top-nav { display: flex; gap: 1.5rem; font-size: .9rem; }
.top-nav a { text-decoration: none; border-bottom: 2px solid transparent; }
.top-nav a:hover, .top-nav a:focus-visible { border-color: var(--yellow); }

.hero {
  min-height: calc(100vh - 88px - 4.25rem);
  padding: 1rem 0 1.25rem;
  display: grid;
  grid-template-columns: 1.35fr .65fr;
  column-gap: clamp(3rem, 7vw, 7rem);
  row-gap: 0;
  align-items: start;
}
.hero-copy { display: contents; }
.eyebrow { margin: 0 0 1rem; font-family: var(--mono); font-size: .72rem; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.eyebrow.light { color: rgba(255,255,255,.68); }
.hero h1 {
  grid-column: 1;
  grid-row: 1;
  margin: clamp(1.75rem, 4.5vh, 3.25rem) 0 0;
  max-width: 900px;
  font-family: var(--serif);
  font-size: clamp(3.2rem, 6.2vw, 6.5rem);
  line-height: .92;
  font-weight: 400;
  letter-spacing: -.045em;
}
.hero h1 em {
  color: var(--ink);
  font-weight: 400;
  background: var(--yellow);
  padding: 0 .08em;
  box-decoration-break: clone;
  -webkit-box-decoration-break: clone;
}
.hero-lead { grid-column: 1; grid-row: 2; max-width: 690px; margin: 1.35rem 0 0; font-size: clamp(1.2rem, 1.7vw, 1.55rem); line-height: 1.35; }
.hero-actions { grid-column: 1; grid-row: 3; margin-top: 1.35rem; display: flex; flex-wrap: wrap; align-items: center; gap: 1rem 1.4rem; }
.button { display: inline-flex; align-items: center; padding: .8rem 1rem; text-decoration: none; border: 1px solid var(--ink); background: transparent; cursor: pointer; appearance: none; }
.button-dark { background: var(--ink); color: var(--paper-light); }
.button:hover, .button:focus-visible { transform: translate(-2px,-2px); box-shadow: 4px 4px 0 var(--yellow); }
.text-link { text-underline-offset: .25em; text-decoration-color: var(--yellow); text-decoration-thickness: 2px; }
.margin-note { grid-column: 1; grid-row: 4; margin: 1.6rem 0 0 auto; width: fit-content; transform: rotate(-2deg); font-family: var(--serif); font-style: italic; color: var(--ink); background: var(--yellow); padding: .45rem .7rem; font-size: 1.05rem; }

.hero-photo { grid-column: 2; grid-row: 2 / span 3; margin: 1.35rem 0 0; align-self: start; transform: rotate(1.4deg); }
.photo-frame { position: relative; aspect-ratio: 4 / 5; overflow: hidden; background: #eceef2; }
.photo-frame img { width: 100%; height: 100%; object-fit: cover; object-position: 72% 42%; }
.photo-placeholder { display: none; position: absolute; inset: 0; place-items: center; text-align: center; color: var(--muted); font-family: var(--mono); font-size: .75rem; }
.photo-frame.photo-missing .photo-placeholder { display: grid; }
.hero-photo figcaption, .contact-photo figcaption { margin-top: .65rem; font-family: var(--mono); font-size: .65rem; color: var(--muted); }

.statement { padding: 8rem 0; border-top: 1px solid var(--line); }
.statement > h2, .section-intro h2, .wood-heading h2, .about-title h2, .contact-section h2 {
  margin: 0;
  font-family: var(--serif);
  font-size: clamp(2.5rem, 5vw, 5rem);
  line-height: 1;
  font-weight: 400;
  letter-spacing: -.035em;
}
.statement > h2 { max-width: 900px; }
.skill-notes { margin-top: 4rem; display: grid; grid-template-columns: repeat(4, 1fr); gap: 1rem; }
.skill-notes article { padding: 1.4rem; min-height: 230px; background: var(--paper-light); border: 1px solid var(--line); position: relative; }
.skill-notes article:nth-child(2) { transform: rotate(.6deg); }
.skill-notes article:nth-child(3) { transform: rotate(-.5deg); }
.skill-notes span { display: inline-block; font-family: var(--mono); font-size: .7rem; line-height: 1.2; color: var(--ink); background: var(--yellow); padding: .2rem .4rem; }
.skill-notes h3 { margin: 2rem 0 .7rem; font-family: var(--serif); font-size: 1.55rem; font-weight: 400; }
.skill-notes p { margin: 0; color: var(--muted); font-size: .95rem; }

.work-section { padding: 8rem 0; border-top: 1px solid var(--line); }
.section-intro { display: grid; grid-template-columns: 1.4fr .6fr; gap: 3rem; align-items: end; margin-bottom: 5rem; }
.section-intro > p { margin: 0; color: var(--muted); }
.project-list { display: flex; flex-direction: column; }
.project-row {
  appearance: none;
  width: 100%;
  padding: 2.3rem 0;
  border: 0;
  border-top: 1px solid var(--line);
  color: inherit;
  background: transparent;
  cursor: pointer;
  display: grid;
  grid-template-columns: 90px minmax(240px, 1.25fr) minmax(260px, 1fr) 28px;
  gap: 2rem;
  align-items: center;
  text-align: left;
}
.project-row:last-child { border-bottom: 1px solid var(--line); }
.project-row:hover, .project-row:focus-visible { background: var(--yellow); }
.project-row:hover .project-index, .project-row:focus-visible .project-index { color: var(--ink); }
.project-row:hover .project-thumb img, .project-row:focus-visible .project-thumb img { transform: scale(1.035); }
.project-row:focus-visible { outline: 2px solid var(--ink); outline-offset: 4px; }
.project-index { align-self: start; font-family: var(--mono); font-size: .7rem; color: var(--muted); }
.project-main h3 { margin: 0 0 .35rem; font-family: var(--serif); font-size: clamp(1.7rem, 3vw, 3.2rem); line-height: 1; font-weight: 400; }
.project-main p { margin: 0; font-family: var(--mono); font-size: .7rem; color: var(--ink); }
.project-thumb { aspect-ratio: 16 / 9; overflow: hidden; background: #eceef2; }
.project-thumb img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s ease; }
.project-thumb img.is-contain { object-fit: contain; background: var(--paper); }
.project-arrow { font-size: 1.6rem; color: var(--ink); }

.wood-section {
  padding: 8rem 0;
  color: var(--chalk);
  background: var(--ink);
  position: relative;
}
.wood-inner { position: relative; z-index: 1; }
.wood-heading { display: flex; flex-direction: column; align-items: flex-start; text-align: left; gap: 1.4rem; }
.wood-heading h2 { max-width: 100%; color: var(--ink); line-height: 1.08; }
.wood-heading h2 span { background: var(--yellow); box-decoration-break: clone; -webkit-box-decoration-break: clone; padding: 0 .12em; }
.wood-heading > p:last-child { margin: 0; max-width: 34rem; color: rgba(255,255,255,.76); }
.content-ideas { margin-top: 5rem; display: grid; grid-template-columns: repeat(3, 1fr); border-top: 1px solid rgba(255,255,255,.2); border-left: 1px solid rgba(255,255,255,.2); }
.content-ideas article { min-height: 250px; padding: 1.5rem; border-right: 1px solid rgba(255,255,255,.2); border-bottom: 1px solid rgba(255,255,255,.2); }
.scribble { display: inline-block; font-family: var(--serif); font-style: italic; color: var(--yellow); transform: rotate(-7deg); }
.content-ideas h3 { margin: 2.5rem 0 .7rem; font-family: var(--serif); font-size: 1.5rem; font-weight: 400; }
.content-ideas p { margin: 0; color: rgba(255,255,255,.72); font-size: .95rem; }
.wood-note { max-width: 720px; margin: 4rem 0 0 auto; padding: 1.2rem 1.4rem; background: var(--yellow); color: var(--ink); transform: rotate(-1deg); font-family: var(--serif); font-size: 1.1rem; }

.about-section { padding: 8rem 0; display: grid; grid-template-columns: .75fr 1.25fr; column-gap: 5rem; row-gap: 0; border-bottom: 1px solid var(--line); }
.about-copy { max-width: 720px; }
.large-copy { margin-top: 0; font-family: var(--serif); font-size: clamp(1.7rem, 3vw, 2.8rem); line-height: 1.15; }
.about-copy > p:not(.large-copy) { color: var(--muted); }
.facts { margin: 3rem 0 0; border-top: 1px solid var(--line); }
.facts div { display: grid; grid-template-columns: 150px 1fr; gap: 1rem; padding: .8rem 0; border-bottom: 1px solid var(--line); }
.facts dt { font-family: var(--mono); font-size: .68rem; color: var(--muted); text-transform: uppercase; letter-spacing: .06em; }
.facts dd { margin: 0; }
.about-feature { grid-column: 1 / -1; }
.about-feature .project-row { border-top: 0; }

.contact-section { padding: 9rem 0; display: grid; grid-template-columns: 1.35fr .65fr; column-gap: clamp(3rem, 7vw, 7rem); align-items: start; }
.contact-section .eyebrow, .contact-section h2 { grid-column: 1; min-width: 0; }
.contact-section h2 { max-width: none; }
.contact-mail { grid-column: 1 / -1; }
.contact-photo { grid-column: 2; grid-row: 1 / span 2; margin: 1.35rem 0 0; align-self: start; transform: rotate(1.4deg); }
.contact-mail { display: inline-block; margin-top: 3rem; font-family: var(--serif); font-size: clamp(2rem, 5vw, 5rem); text-underline-offset: .12em; text-decoration-color: var(--yellow); text-decoration-thickness: .08em; color: var(--ink); }
.contact-mail:hover, .contact-mail:focus-visible { background: var(--yellow); text-decoration-color: transparent; }
.footer { min-height: 90px; display: flex; align-items: center; justify-content: space-between; gap: 2rem; border-top: 1px solid var(--line); color: var(--muted); }
.footer a { text-underline-offset: .2em; }

html:has(.project-dialog[open]) { overflow: hidden; }
.project-dialog:not([open]) { display: none; }
.project-dialog[open] {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  max-width: none;
  max-height: none;
  margin: 0;
  padding: 0;
  border: 0;
  display: flex;
  align-items: safe center;
  justify-content: center;
  overflow: hidden;
  overscroll-behavior: none;
  background: rgba(255, 255, 255, .97);
  color: var(--ink);
  box-shadow: none;
}
.project-dialog::backdrop { background: transparent; }
.dialog-close { position: fixed; top: 1.8rem; right: 2rem; z-index: 3; width: 44px; height: 44px; border: 1px solid var(--ink); background: rgba(255,255,255,.95); cursor: pointer; font-size: 1.6rem; }
.dialog-nav {
  position: fixed;
  top: 50%;
  z-index: 3;
  transform: translateY(-50%);
  width: 48px;
  height: 48px;
  display: grid;
  place-items: center;
  padding: 0;
  border: 1px solid var(--ink);
  background: rgba(255, 255, 255, .95);
  color: var(--ink);
  cursor: pointer;
}
.dialog-nav svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.6; }
.dialog-nav[hidden] { display: none; }
.dialog-nav:hover, .dialog-nav:focus-visible { background: var(--yellow); }
.dialog-prev { left: 1.25rem; }
.dialog-next { right: 1.25rem; }
.dialog-layout {
  width: min(1320px, calc(100% - 11rem));
  max-height: 100%;
  min-height: 0;
  display: grid;
  grid-template-columns: minmax(0, 1.3fr) minmax(0, .7fr);
  grid-template-rows: auto auto;
  column-gap: clamp(2rem, 4vw, 4rem);
  padding: 4.5rem 2.5rem 4.5rem 0;
  overflow: auto;
  overscroll-behavior: contain;
}
.dialog-heading { grid-column: 1 / -1; }
.dialog-heading h2 { margin: 0 0 1.25rem; font-family: var(--serif); font-size: clamp(2.4rem, 4vw, 4.4rem); line-height: .95; font-weight: 400; }
.dialog-media { min-height: 0; background: transparent; overflow: visible; align-self: start; }
.dialog-media > iframe { width: 100%; height: 48vh; min-height: 320px; border: 0; background: var(--paper); }
.dialog-media > iframe + .video-frame { margin-top: 1rem; }
.dialog-media:has(> iframe) .video-frame { width: 50%; margin-inline: auto; aspect-ratio: 16 / 9; }
.video-frame { position: relative; width: 100%; }
.video-frame + .video-frame { margin-top: 1rem; }
.video-frame.video-extra { width: 50%; margin-inline: auto; }
.video-frame:has(.video-poster) { aspect-ratio: 16 / 9; }
.video-frame .video-poster { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.video-frame.is-ready .video-poster { visibility: hidden; }
.video-frame video { display: block; width: 100%; height: auto; object-fit: contain; background: var(--ink); }
.video-frame:has(.video-poster) video { position: absolute; inset: 0; height: 100%; opacity: 0; }
.video-frame.is-ready video { opacity: 1; }
.video-loading { position: absolute; inset: 0; display: grid; place-items: center; pointer-events: none; }
.video-frame.is-ready .video-loading { display: none; }
.video-spinner {
  width: 64px;
  height: 64px;
  box-sizing: border-box;
  border-radius: 50%;
  border: 4px solid rgba(255, 255, 255, .28);
  border-top-color: var(--yellow);
  background: rgba(32, 35, 43, .82);
  box-shadow: 0 10px 28px rgba(32, 35, 43, .35);
  animation: video-spin .8s linear infinite;
}
@keyframes video-spin { to { transform: rotate(360deg); } }
.dialog-media .gallery-shot { display: block; width: 100%; margin: 0; padding: 0; border: 0; background: none; cursor: zoom-in; }
.dialog-media .gallery-shot img { display: block; width: 100%; height: auto; }
.dialog-media .gallery-shot:focus-visible { outline: 2px solid var(--ink); outline-offset: 3px; }
.dialog-media.gallery { display: grid; grid-template-columns: 1fr 1fr; column-gap: .7rem; align-items: start; }
.dialog-media.gallery.is-stack { grid-template-columns: 1fr; row-gap: .7rem; }
.dialog-gallery { display: grid; grid-template-columns: 1fr 1fr; column-gap: .7rem; align-items: start; width: 100%; margin-top: 1rem; }
.gallery-column { display: flex; flex-direction: column; gap: .7rem; }
.gallery-column .gallery-shot { margin: 0; }
.image-viewer {
  position: fixed;
  inset: 0;
  z-index: 4;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  column-gap: clamp(1rem, 2vw, 1.75rem);
  box-sizing: border-box;
  padding: 4.5rem clamp(1.25rem, 2vw, 2rem) 2.5rem;
  background: rgba(255, 255, 255, .97);
  overflow: hidden;
  overscroll-behavior: none;
}
.image-viewer[hidden] { display: none; }
.image-viewer .dialog-nav { position: static; top: auto; transform: none; grid-row: 1; align-self: center; }
.image-viewer-prev { grid-column: 1; }
.image-viewer-next { grid-column: 3; }
.image-viewer figure { grid-column: 2; grid-row: 1; align-self: center; margin: 0; width: 100%; height: 100%; min-width: 0; min-height: 0; display: grid; place-items: center; }
.image-viewer img { max-width: 100%; max-height: calc(100vh - 7rem); width: auto; height: auto; object-fit: contain; }
.image-viewer .dialog-nav[hidden] { display: none; }
.dialog-copy { padding: 0; align-self: start; }
.dialog-role { padding-bottom: 1rem; border-bottom: 2px solid var(--yellow); color: var(--ink); font-family: var(--mono); font-size: .74rem; }
#dialog-desc { color: var(--muted); }
#dialog-desc p + p { margin-top: .9rem; }
#dialog-meta { margin: 2.5rem 0 0; border-top: 1px solid var(--line); }
#dialog-meta div { display: grid; grid-template-columns: 110px 1fr; gap: 1rem; padding: .7rem 0; border-bottom: 1px solid var(--line); }
#dialog-meta dt { font-family: var(--mono); font-size: .68rem; color: var(--muted); text-transform: uppercase; }
#dialog-meta dd { margin: 0; }

@media (max-width: 900px) {
  :root { --shell: min(100% - 2rem, 760px); }
  .top-nav { display: none; }
  .hero { grid-template-columns: 1fr; min-height: auto; padding-top: 5rem; }
  .hero-copy { display: block; }
  .hero h1, .hero-lead, .hero-actions, .margin-note, .hero-photo { grid-column: auto; grid-row: auto; margin-top: 0; }
  .hero-lead, .hero-actions { margin-top: 1.35rem; }
  .margin-note { margin-top: 1.6rem; }
  .hero-photo, .contact-photo { max-width: 420px; }
  .contact-section { grid-template-columns: 1fr; }
  .contact-section .eyebrow, .contact-section h2, .contact-mail, .contact-photo { grid-column: auto; grid-row: auto; }
  .skill-notes { grid-template-columns: repeat(2, 1fr); }
  .section-intro, .wood-heading, .about-section { grid-template-columns: 1fr; gap: 2rem; }
  .about-feature { margin-top: -2rem; }
  .content-ideas { grid-template-columns: repeat(2, 1fr); }
  .project-row { grid-template-columns: 42px 1fr 140px 20px; gap: 1rem; }
  .dialog-layout { grid-template-columns: 1fr; }
  .dialog-heading, .dialog-media, .dialog-copy { grid-column: 1; }
  .dialog-copy { position: static; }
}

@media (max-width: 620px) {
  body { font-size: 16px; }
  .site-header { min-height: 72px; }
  .hero h1 { font-size: clamp(3.2rem, 15vw, 5.4rem); }
  .hero-actions { align-items: flex-start; flex-direction: column; }
  .margin-note { margin-left: 0; }
  .skill-notes, .content-ideas { grid-template-columns: 1fr; }
  .skill-notes article { min-height: auto; }
  .project-row { grid-template-columns: 30px 1fr 18px; padding: 1.5rem 0; }
  .project-thumb { grid-column: 2 / 4; margin-top: .7rem; }
  .project-arrow { grid-column: 3; grid-row: 1; }
  .project-main { grid-column: 2; }
  .project-index { grid-column: 1; }
  .content-ideas article { min-height: 190px; }
  .facts div { grid-template-columns: 1fr; gap: .3rem; }
  .footer { padding: 1.5rem 0; flex-direction: column; align-items: flex-start; }
  .contact-mail { overflow-wrap: anywhere; }
  .dialog-close { top: 1rem; right: 1rem; }
  .dialog-nav { width: 40px; height: 40px; }
  .dialog-prev { left: .7rem; }
  .dialog-next { right: .7rem; }
  .dialog-layout { width: calc(100% - 7.2rem); padding-left: 0; padding-right: 1.75rem; }
  .dialog-media.gallery, .dialog-gallery { grid-template-columns: 1fr; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition-duration: .001ms !important; animation-duration: .001ms !important; }
}

/* ---------- Bestehende Impressum-/Datenschutzseiten ---------- */
body > .sidebar {
  width: var(--shell);
  margin: 0 auto;
  padding: 2rem 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
  border-bottom: 1px solid var(--line);
}
body > .sidebar .logo { text-decoration: none; }
body > .sidebar .glyph-name { font-family: var(--serif); font-size: 1.6rem; font-weight: 400; }
body > .sidebar .nav a { text-underline-offset: .2em; }
body > .sidebar .brand-mark { width: 72px; height: auto; }
body > .content { width: var(--shell); margin: 0 auto; padding: 5rem 0 0; }
body > .content .section { padding-bottom: 5rem; }
body > .content .mono-title { margin: 0 0 2.5rem; font-family: var(--serif); font-size: clamp(2.7rem, 6vw, 5.2rem); line-height: 1; font-weight: 400; }
body > .content .legal { max-width: 780px; }
body > .content .legal h2 { margin: 2.8rem 0 .8rem; font-family: var(--serif); font-weight: 400; font-size: 1.65rem; }
body > .content .legal h3 { margin: 2rem 0 .6rem; font-size: 1.05rem; }
body > .content .legal p,
body > .content .legal li { color: var(--muted); font-size: .95rem; line-height: 1.6; overflow-wrap: anywhere; }
body > .content .legal a { text-underline-offset: .2em; }
body > .content .legal .index { padding-left: 1.2rem; }
body > .content > .footer { width: 100%; }

@media (max-width: 620px) {
  body > .sidebar { align-items: flex-start; flex-direction: column; }
  body > .sidebar .brand-mark { display: none; }
}
