/* Gemeinsame Grundlage für Hauptseite und Unterseiten: Farben, Schriften, Grundregeln.
   Die Hauptseite steuert Hell/Dunkel über data-theme am <html>-Element.
   Die Unterseiten haben kein data-theme und folgen der Einstellung des Systems. */

:root {
  --bg: #050403;
  --s: #110e09;
  --tx: #efe7d6;
  --mu: #b0a48c;
  --ac: #d9ab48;
  --on: #0a0805;
  --ln: #2e2718;
  --h: "Helvetica Neue", Helvetica, Arial, "Nimbus Sans", sans-serif;
  --t: system-ui, -apple-system, "Segoe UI Variable Text", "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  color-scheme: dark;
}

:root[data-theme=light] {
  --bg: #f5f0e5;
  --s: #ebe3d2;
  --tx: #1b150c;
  --mu: #5a4e3d;
  --ac: #7a5410;
  --on: #fff;
  --ln: #cdbfa5;
  color-scheme: light;
}

@media (prefers-color-scheme: light) {
  :root:not([data-theme]) {
    --bg: #f5f0e5;
    --s: #ebe3d2;
    --tx: #1b150c;
    --mu: #5a4e3d;
    --ac: #7a5410;
    --on: #fff;
    --ln: #cdbfa5;
    color-scheme: light;
  }
}

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

html {
  background: var(--bg);
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--tx);
  font: 400 1rem/1.65 var(--t);
  -webkit-font-smoothing: antialiased;
  -webkit-text-size-adjust: 100%;
}

a {
  color: var(--tx);
  text-underline-offset: .25em;
}

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

:focus-visible {
  outline: 3px solid var(--ac);
  outline-offset: 3px;
}

/* Hauptseite. Baut auf base.css auf, der Build hängt beide Dateien zusammen. */

/* Grundlage und Einstellungen aus dem Menü für Barrierefreiheit (data-* am <html>-Element) */

:root {
  padding-top: env(safe-area-inset-top, 0px);
  padding-bottom: env(safe-area-inset-bottom, 0px);
}

html {
  scroll-padding-top: env(safe-area-inset-top, 0px);
}

body {
  letter-spacing: .005em;
  font-optical-sizing: auto;
  text-rendering: optimizeLegibility;
}

:root[data-contrast=on] {
  --bg: #000;
  --s: #000;
  --tx: #fff;
  --mu: #fff;
  --ac: #ffd54a;
  --on: #000;
  --ln: #fff;
}

:root[data-contrast=on][data-theme=light] {
  --bg: #fff;
  --s: #fff;
  --tx: #000;
  --mu: #000;
  --ac: #5c3a00;
  --on: #fff;
  --ln: #000;
}

:root[data-font=readable] {
  --h: Verdana, Tahoma, "Atkinson Hyperlegible", sans-serif;
  --t: Verdana, Tahoma, "Atkinson Hyperlegible", sans-serif;
}

:root[data-size=l] {
  font-size: 118%;
}

:root[data-size=xl] {
  font-size: 136%;
}

:root[data-spacing=on] body {
  line-height: 1.8;
  letter-spacing: .12em;
  word-spacing: .16em;
}

:root[data-spacing=on] p {
  margin-bottom: 2em;
}

:root[data-underline=on] a {
  text-decoration: underline;
}

/* Seitenrahmen, Sprunglink, Schaltflächen */

.skip {
  position: absolute;
  left: 1rem;
  top: -4rem;
  background: var(--ac);
  color: var(--on);
  padding: .75rem 1rem;
  z-index: 30;
}

.skip:focus {
  top: .5rem;
}

.w {
  max-width: 72rem;
  margin: 0 auto;
  padding: 0 max(1.25rem,env(safe-area-inset-right)) 0 max(1.25rem,env(safe-area-inset-left));
}

.vh {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

button {
  font: inherit;
  color: var(--tx);
  background: none;
  border: 1px solid var(--ln);
  border-radius: 2px;
  min-height: 2.75rem;
  padding: .4rem .9rem;
  cursor: pointer;
}

button:hover {
  border-color: var(--ac);
}

button[aria-pressed=true] {
  border-color: var(--ac);
  color: var(--ac);
  box-shadow: inset 0 0 0 1px var(--ac);
}

/* Leiste mit Theme-Schalter und Menü für Barrierefreiheit */

.bar {
  position: relative;
  display: flex;
  justify-content: flex-end;
  gap: .5rem;
  padding: .5rem max(1rem,env(safe-area-inset-right)) .5rem 1rem;
}

.bar>button {
  display: grid;
  place-items: center;
  width: 2.75rem;
  padding: 0;
  border-color: transparent;
  color: var(--mu);
}

.bar>button:hover, .bar>button[aria-expanded=true] {
  color: var(--ac);
  border-color: var(--ac);
}

/* Sonne im dunklen Modus, Mond im hellen */
.bar .moon,
:root[data-theme=light] .bar .sun {
  display: none;
}

:root[data-theme=light] .bar .moon {
  display: inline;
}

.bar svg {
  width: 1.5rem;
  height: 1.5rem;
}

.panel {
  position: absolute;
  z-index: 20;
  right: max(1rem,env(safe-area-inset-right));
  top: 100%;
  width: min(22rem,calc(100vw - 2rem));
  background: var(--s);
  border: 1px solid var(--ac);
  padding: 1rem 1rem 1.25rem;
}

.panel[hidden] {
  display: none;
}

.panel fieldset {
  border: 0;
  margin: 0 0 1rem;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: .5rem;
}

.panel legend {
  color: var(--mu);
  font-size: .875rem;
  margin-bottom: .4rem;
  padding: 0;
}

/* Hero: flach, Boden mit Siegel unten verankert */

.hero {
  position: relative;
  width: 100%;
  background: var(--bg);
}

/* Feste Breite, sonst rechnet der Browser bei greifendem max-height die Breite aus dem
   Seitenverhältnis zurück, und das Bild endet vor dem rechten Rand */
.stage {
  position: relative;
  width: 100%;
  aspect-ratio: 2/1;
  overflow: hidden;
  background: #000;
}

.slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  visibility: hidden;
  transition: opacity .8s,visibility .8s;
}

.slide.on {
  opacity: 1;
  visibility: visible;
}

/* SVG-Slides: Mischmodi als Klassen statt style-Attribut (CSP) */
.blend-screen {
  mix-blend-mode: screen;
}

.blend-overlay {
  mix-blend-mode: overlay;
}

.slide>img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 50% 100%;
  display: block;
}

.pill {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: .15rem;
  width: max-content;
  max-width: calc(100% - 2rem);
  margin: .9rem auto 0;
  padding: .25rem;
  border-radius: 999px;
  background: rgba(8,7,5,.86);
  border: 1px solid rgba(217,171,72,.45);
  color: #efe7d6;
}

.pill button {
  display: grid;
  place-items: center;
  width: 2.75rem;
  height: 2.75rem;
  min-height: 0;
  padding: 0;
  border: 0;
  border-radius: 50%;
  color: #efe7d6;
}

.pill button:hover {
  background: rgba(217,171,72,.2);
  border: 0;
}

.pill #pp {
  background: #d9ab48;
  color: #0a0805;
}

.pill #pp:hover {
  background: #f0c565;
}

.pill svg {
  width: 1.25rem;
  height: 1.25rem;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.pill #pp svg {
  fill: currentColor;
  stroke: none;
}

.pill .ip, .pill #pp.paused .ipa {
  display: none;
}

.pill #pp.paused .ip {
  display: block;
}

.cnt {
  font-size: .8125rem;
  font-variant-numeric: tabular-nums;
  letter-spacing: .06em;
  padding: 0 .7rem 0 .45rem;
}

.prog {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 3px;
  background: rgba(255,255,255,.14);
}

.prog i {
  display: block;
  height: 100%;
  background: #d9ab48;
  transform-origin: left;
  transform: scaleX(0);
}

.prog i.run {
  animation: prog 9s linear forwards;
}

.hero.hold .prog i {
  animation-play-state: paused;
}

@keyframes prog {
  to {
    transform: scaleX(1);
  }
}

:root[data-motion=reduced] .slide {
  transition: none;
}

:root[data-motion=reduced] .prog i {
  animation: none;
}

@media (prefers-reduced-motion: reduce) {
  .slide {
    transition: none;
  }
  .prog i {
    animation: none;
  }
}

/* Namensblock */

.id {
  --nm: clamp(1.75rem,7.2vw,3.5rem);
  width: fit-content;
  max-width: 100%;
  margin-top: 2rem;
}

h1 {
  margin: 0 -.14em .6rem 0;
  font: 300 var(--nm)/1.1 var(--h);
  text-transform: uppercase;
  letter-spacing: .14em;
  overflow-wrap: anywhere;
}

.role {
  margin: 0 0 .4rem;
  font-size: 1.125rem;
  letter-spacing: .03em;
}

.tag {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: .25rem 1.25rem;
  color: var(--mu);
  font-size: .9375rem;
  letter-spacing: .04em;
}

/* DAW-Streifen (Dekoration): Taktlineal, Wellenform, Notenspur, Abspielposition */

.daw {
  position: relative;
  margin: 1.5rem 0 2.75rem;
  border-top: 1px solid var(--ln);
  border-bottom: 1px solid var(--ln);
  background: linear-gradient(var(--s),transparent 90%);
}

.daw svg {
  display: block;
  width: 100%;
  height: 100%;
}

.daw path {
  fill: none;
  vector-effect: non-scaling-stroke;
  stroke-linecap: round;
}

.rl {
  position: relative;
  height: 1.5rem;
  border-bottom: 1px solid var(--ln);
}

.rl span {
  position: absolute;
  top: .2rem;
  padding-left: .3rem;
  font-size: .6875rem;
  line-height: 1;
  color: var(--mu);
  font-variant-numeric: tabular-nums;
}

.rl span:nth-of-type(1) {
  left: 0;
}

.rl span:nth-of-type(2) {
  left: 13.33%;
}

.rl span:nth-of-type(3) {
  left: 26.67%;
}

.rl span:nth-of-type(4) {
  left: 40%;
}

.rl span:nth-of-type(5) {
  left: 53.33%;
}

.rl span:nth-of-type(6) {
  left: 66.67%;
}

.rl span:nth-of-type(7) {
  left: 80%;
}

.rl span:nth-of-type(8) {
  left: 93.33%;
}

.wv {
  height: 3.25rem;
  border-bottom: 1px solid var(--ln);
}

.nt {
  height: 2rem;
}

.daw .tk {
  stroke: var(--mu);
  stroke-width: 1;
  opacity: .7;
}

.daw .wp {
  stroke: var(--ac);
  stroke-width: 1.6;
}

.daw .wr {
  stroke: var(--ac);
  stroke-width: 1.6;
  opacity: .35;
}

.nt .np {
  fill: var(--ac);
}

.nt .nr {
  fill: var(--ac);
  opacity: .35;
}

.daw .ph {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 62%;
  width: 2px;
  margin-left: -1px;
  background: var(--tx);
}

.daw .ph::before {
  content: "";
  position: absolute;
  top: 0;
  left: -5px;
  border: 6px solid transparent;
  border-top: 8px solid var(--tx);
  border-bottom: 0;
}

/* Intro: Porträt mit KI-Kennzeichnung, Bio, Plattformen, Kontakt */

.intro {
  display: grid;
  gap: 1.75rem;
}

.fig {
  margin: 0;
  position: relative;
  display: flex;
  flex-direction: column;
  gap: .625rem;
}

.portrait {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 1/1;
  max-height: 24rem;
  object-fit: cover;
  object-position: 50% 30%;
  background: var(--s);
}

.fig figcaption {
  display: flex;
  flex-direction: column;
  gap: .75rem;
}

.fig .note {
  text-wrap: balance;
  font-size: .8125rem;
  line-height: 1.5;
  color: var(--mu);
  letter-spacing: .02em;
}

.fig .why {
  text-wrap: pretty;
  font-family: "Iowan Old Style","Palatino Linotype",Palatino,"Book Antiqua",Georgia,"Times New Roman",serif;
  font-style: italic;
  font-size: 1.1875rem;
  line-height: 1.5;
  color: var(--tx);
  padding-left: 1rem;
  border-left: 2px solid var(--ac);
  letter-spacing: 0;
}

.fig .why strong {
  font-weight: inherit;
}

.fig .why a {
  color: var(--tx);
  text-underline-offset: .2em;
}

.fig .why a:hover {
  color: var(--ac);
}

.ai {
  position: absolute;
  top: .75rem;
  left: .75rem;
  font: 600 .75rem/1 system-ui,-apple-system,"Segoe UI",Roboto,Arial,sans-serif;
  letter-spacing: .08em;
  color: var(--on);
  background: var(--ac);
  padding: .4rem .5rem;
  border-radius: .2rem;
}

.txt {
  display: flex;
  flex-direction: column;
  gap: 1.75rem;
}

.bio, .contact p {
  margin: 0;
  text-box: trim-both cap alphabetic;
}

.bio {
  text-wrap: pretty;
  font-size: 1.1875rem;
  line-height: 1.65;
  font-weight: 350;
  letter-spacing: -.003em;
  max-width: 40rem;
}

.bottom {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.btn {
  display: block;
  text-align: center;
  background: var(--ac);
  color: var(--on);
  text-decoration: none;
  font-weight: 550;
  letter-spacing: .04em;
  padding: 1rem 1.5rem;
  border-radius: 2px;
}

.btn:hover {
  color: var(--on);
  filter: brightness(1.1);
}

/* Handy: bis zu fünf Symbole in einer Reihe über die volle Breite. Ab sechs Symbolen
   höchstens vier je Reihe, damit die Kacheln groß genug zum Antippen bleiben,
   die letzte Reihe steht mittig. Ab 40rem feste quadratische Kacheln (siehe Breakpoints). */
.plat {
  --gap: .5rem;
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: var(--gap);
}

.plat > li {
  flex: 0 0 calc((100% - 4 * var(--gap)) / 5);
}

.plat:has(> li:nth-child(6)) > li {
  flex-basis: calc((100% - 3 * var(--gap)) / 4);
}

.plat a {
  display: grid;
  place-items: center;
  width: 100%;
  height: 3rem;
  border: 1px solid var(--ln);
  background: var(--s);
  border-radius: 2px;
  color: #fff;
  text-decoration: none;
}

/* Logos nur in Weiß oder Schwarz, wie es die Markenrichtlinien der Plattformen vorsehen.
   Rahmen und Hover bleiben im Gold der Seite. */
:root[data-theme=light] .plat a {
  color: #000;
}

.plat a:hover {
  border-color: var(--ac);
  background: var(--ac);
  color: #000;
}

:root[data-theme=light] .plat a:hover {
  color: #fff;
}

/* Plattform-Logos (Simple Icons) sind gefüllte Flächen in der Akzentfarbe */
.plat svg {
  width: 1.5rem;
  height: 1.5rem;
  fill: currentColor;
}

.lbl {
  margin: 0 0 -.75rem;
  font-size: .8125rem;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--mu);
}

.plat.eq {
  display: grid;
  grid-template-columns: repeat(auto-fill,minmax(10.5rem,1fr));
  gap: .5rem;
}

.plat.eq a {
  width: 100%;
  height: 3rem;
  padding: 0 .8rem;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: .5rem;
}

.plat.eq .nm {
  font-size: .9375rem;
  letter-spacing: .01em;
  color: var(--tx);
  white-space: nowrap;
}

.plat.eq a:hover .nm {
  color: var(--on);
}

.contact {
  padding-top: 1.25rem;
  border-top: 1px solid var(--ln);
  color: var(--mu);
  font-size: .9375rem;
  overflow-wrap: anywhere;
}

.contact strong {
  color: var(--tx);
  font-weight: 600;
}

/* Projekte */

h2 {
  margin: 4rem 0 1.75rem;
  font: 300 1.75rem/1.2 var(--h);
  letter-spacing: .03em;
}

h2::before {
  content: "";
  display: block;
  width: 2.5rem;
  height: 2px;
  background: var(--ac);
  margin-bottom: 1rem;
}

/* Handy: ein Track je Reihe. Ab 40rem drei je Reihe. */
.projects {
  display: grid;
  gap: 2.5rem 2rem;
  grid-template-columns: 1fr;
}

/* Rahmen für Cover und AI-Badge (.ai ist oben beim Porträt definiert) */
.cover-wrap {
  position: relative;
}

/* Cover aus dem SoundCloud-Feed (lokal unter /covers/), quadratisch */
.cover {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 1;
  object-fit: cover;
  background: var(--s);
  border: 1px solid var(--ln);
}

.proj h3 {
  margin: 1.1rem 0 .4rem;
  font-weight: 500;
  font-size: 1.25rem;
}

.proj p {
  margin: 0 0 .75rem;
  color: var(--mu);
}

.proj .l {
  display: flex;
  flex-wrap: wrap;
  gap: .25rem 1.25rem;
}

.proj .l a {
  min-height: 2.75rem;
  display: inline-flex;
  align-items: center;
}

/* Footer */

footer {
  margin-top: 5rem;
  border-top: 1px solid var(--ln);
  padding: 2rem 0 3rem;
  color: var(--mu);
  font-size: .875rem;
}

footer p {
  margin: 0 0 1rem;
  max-width: 44rem;
}

footer strong {
  color: var(--tx);
  font-weight: 700;
}

footer a {
  color: var(--mu);
}

footer nav {
  display: flex;
  gap: 1.5rem;
}

/* Breakpoints (Reihenfolge beibehalten, spätere Regeln überschreiben frühere) */

@media (min-width: 40rem) {
  .projects {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 2.5rem 1.5rem;
  }
  .plat {
    justify-content: flex-start;
  }
  .plat > li,
  .plat:has(> li:nth-child(6)) > li {
    flex: 0 0 auto;
  }
  .plat a {
    width: 3rem;
  }
  .w {
    padding-left: max(2rem,env(safe-area-inset-left));
    padding-right: max(2rem,env(safe-area-inset-right));
  }
  .stage {
    aspect-ratio: 3/1;
    max-height: 27rem;
  }
  .pill {
    position: absolute;
    right: max(.75rem,env(safe-area-inset-right));
    bottom: .9rem;
    margin: 0;
  }
  .daw .wp, .daw .wr {
    stroke-width: 2.4;
  }
}

@media (min-width: 52rem) {
  .intro {
    grid-template-columns: minmax(0,5fr) minmax(0,7fr);
    gap: 3.5rem;
    align-items: stretch;
  }
  .txt {
    justify-content: space-between;
  }
  .portrait {
    max-height: none;
  }
  .bio {
    font-size: 1.25rem;
  }
  .btn {
    align-self: flex-start;
    padding: 1rem 2.75rem;
  }
}

@media (min-width: 49rem) {
  .tag {
    flex-wrap: nowrap;
    white-space: nowrap;
    justify-content: space-between;
    gap: 1rem;
  }
}

@media (min-width: 64rem) {
  .id {
    margin-top: 2.75rem;
  }
}

@media print {
  .bar, .pill, .prog {
    display: none;
  }
}
