/* ------------------------------------------------------------
   Steve Walker Portfolio, Version 1
   Palette: Animationspapier, Vorzeichnungsblau, Keyframe-Rot
   ------------------------------------------------------------ */
:root {
  --paper: #E8ECEE;       /* kühles Animationspapier */
  --paper-2: #DCE2E6;     /* Schattenblatt */
  --ink: #1B2233;         /* Tusche, blaustichig */
  --ink-soft: #55607A;
  --blue: #7FB2E5;        /* Non-Photo-Blue, Vorzeichnung */
  --red: #E0303A;         /* Keyframe-Stift */

  --f: "Anybody", "Helvetica Neue", Arial, sans-serif;
  --step--1: clamp(0.8rem, 0.76rem + 0.2vw, 0.9rem);
  --step-0: clamp(1rem, 0.95rem + 0.25vw, 1.125rem);
  --step-1: clamp(1.25rem, 1.1rem + 0.7vw, 1.6rem);
  --step-3: clamp(2rem, 1.4rem + 3vw, 3.8rem);
  --pad: clamp(1.25rem, 4vw, 4rem);
  --tl-h: 64px;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--f);
  font-size: var(--step-0);
  line-height: 1.5;
  font-variation-settings: "wdth" 100;
  -webkit-font-smoothing: antialiased;
  padding-bottom: var(--tl-h);
  /* feine Papierstruktur über Punkte der Lochung */
  background-image: radial-gradient(circle at 50% 18px, var(--paper-2) 5px, transparent 6px);
  background-size: 100% 100vh;
  background-repeat: no-repeat;
}

a { color: inherit; }
:focus-visible { outline: 3px solid var(--red); outline-offset: 4px; border-radius: 2px; }
.vh { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: 1rem; top: -4rem; background: var(--ink); color: var(--paper); padding: .6rem 1rem; z-index: 50; }
.skip:focus { top: 1rem; }

/* ---------- Kopfzeile ---------- */
.top {
  position: fixed; inset: 0 0 auto 0; z-index: 20;
  display: flex; justify-content: space-between; align-items: center;
  padding: 1.1rem var(--pad);
  mix-blend-mode: multiply;
}
.mark {
  font-weight: 900; font-size: 1.15rem; text-decoration: none;
  font-variation-settings: "wdth" 60; letter-spacing: .02em;
}
.lang { display: flex; gap: .25rem; }
.lang button {
  font: inherit; font-size: var(--step--1); font-weight: 600;
  background: none; border: 0; color: var(--ink-soft);
  padding: .35rem .5rem; cursor: pointer; border-radius: 2px;
  font-variation-settings: "wdth" 80;
}
.lang button[aria-pressed="true"] { color: var(--ink); box-shadow: inset 0 -2px 0 var(--red); }

/* ---------- Hero ---------- */
.hero {
  position: relative;
  min-height: calc(100svh - var(--tl-h));
  display: grid; align-content: end;
  padding: 6rem var(--pad) clamp(2rem, 6vh, 4rem);
  overflow: hidden;
}
.rough { position: absolute; inset: 8% 0 auto 0; width: 100%; height: 70%; pointer-events: none; }
.rough path {
  fill: none; stroke: var(--blue); stroke-width: 1.4; opacity: .7;
  stroke-dasharray: 2400; stroke-dashoffset: 2400;
  animation: draw 2.4s cubic-bezier(.6,.05,.25,1) .9s forwards;
}
.rough path + path { stroke-width: 1; opacity: .45; animation-delay: 1.2s; }
@keyframes draw { to { stroke-dashoffset: 0; } }

.name {
  margin: 0; position: relative;
  font-weight: 800;
  font-size: clamp(4.2rem, 17vw, 17rem);
  line-height: .82; letter-spacing: -.02em;
  user-select: none;
}
.name .line { display: block; white-space: nowrap; }
.name .line + .line { padding-left: 12vw; }
.name .ch {
  display: inline-block;
  font-variation-settings: "wdth" var(--w, 100), "wght" var(--g, 800);
  transform-origin: 50% 100%;
  transition: font-variation-settings .35s cubic-bezier(.3,1.6,.5,1);
  will-change: transform;
}
.name.is-loading .ch { opacity: 0; }
.name .ch.drop { animation: drop .9s cubic-bezier(.2,.7,.3,1) both; animation-delay: calc(var(--i) * 55ms + .1s); }
/* Squash and Stretch: fallen, stauchen, nachfedern */
@keyframes drop {
  0%   { opacity: 0; transform: translateY(-1.1em) scale(.85, 1.25); }
  45%  { opacity: 1; transform: translateY(0) scale(.92, 1.1); }
  58%  { transform: translateY(0) scale(1.22, .72); }
  72%  { transform: translateY(-.08em) scale(.95, 1.06); }
  86%  { transform: translateY(0) scale(1.04, .97); }
  100% { opacity: 1; transform: none; }
}
.role {
  margin: 1.6rem 0 0 calc(12vw + .3rem);
  font-size: var(--step-1); font-weight: 500;
  font-variation-settings: "wdth" 120;
  color: var(--ink-soft);
}

/* ---------- Arbeiten ---------- */
.work { padding: clamp(3rem, 8vw, 7rem) var(--pad); }
.grid {
  display: grid; grid-template-columns: repeat(12, 1fr);
  column-gap: clamp(1rem, 2.5vw, 2.5rem); row-gap: clamp(3rem, 7vw, 6rem);
}
.item { grid-column: 1 / -1; margin: 0; }
.item:nth-child(2) { grid-column: 1 / 8; }
.item:nth-child(3) { grid-column: 8 / 13; margin-top: 30%; }
.item:nth-child(4) { grid-column: 3 / 11; }
.item:nth-child(n+5):nth-child(odd) { grid-column: 1 / 7; }
.item:nth-child(n+5):nth-child(even) { grid-column: 7 / 13; }
@media (max-width: 760px) {
  .item, .item:nth-child(n) { grid-column: 1 / -1; margin-top: 0; }
}

.play {
  position: relative; display: block; width: 100%;
  aspect-ratio: 16 / 9; padding: 0; border: 0; cursor: pointer;
  background: var(--ink); overflow: visible;
}
.play .shot {
  position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; display: block;
  transition: transform .45s cubic-bezier(.3,1.4,.5,1), opacity .3s;
}
/* Onion Skin: vorheriges und nächstes Bild schimmern durch */
.play .ghost { opacity: 0; mix-blend-mode: multiply; pointer-events: none; }
.play .ghost.b { filter: sepia(1) hue-rotate(170deg) saturate(3); }
.play .ghost.r { filter: sepia(1) hue-rotate(-30deg) saturate(4); }
.play:hover .ghost.b, .play:focus-visible .ghost.b { opacity: .35; transform: translate(-14px, 6px); }
.play:hover .ghost.r, .play:focus-visible .ghost.r { opacity: .35; transform: translate(14px, -6px); }
@media (prefers-reduced-motion: reduce) { .play .ghost { display: none; } }

.play .btn {
  position: absolute; left: 1rem; bottom: 1rem; z-index: 3;
  width: 3.4rem; height: 3.4rem; border-radius: 50%;
  background: var(--paper); display: grid; place-items: center;
  transition: transform .3s cubic-bezier(.3,1.6,.5,1);
}
.play .btn::before {
  content: ""; margin-left: 4px;
  border-left: 14px solid var(--red); border-top: 9px solid transparent; border-bottom: 9px solid transparent;
}
.play:hover .btn { transform: scale(1.12); }

.empty { background: var(--paper-2); }
.empty .sketch { position: absolute; inset: 0; width: 100%; height: 100%; }
.empty .sketch path, .empty .sketch ellipse { fill: none; stroke: var(--blue); stroke-width: 1.5; vector-effect: non-scaling-stroke; }
.empty .soon {
  position: absolute; right: 1rem; bottom: 1rem; z-index: 2;
  font-size: var(--step--1); color: var(--ink-soft); font-variation-settings: "wdth" 80;
}
.empty { cursor: default; }

.cap {
  display: flex; flex-wrap: wrap; justify-content: space-between; align-items: baseline;
  gap: .25rem 1rem; margin-top: .9rem;
}
.cap h3 {
  margin: 0; font-size: var(--step-1); font-weight: 700; line-height: 1.15;
  font-variation-settings: "wdth" 75;
}
.item.featured .cap h3 { font-size: var(--step-3); font-variation-settings: "wdth" 62; font-weight: 800; }
.cap span { font-size: var(--step--1); color: var(--ink-soft); font-variation-settings: "wdth" 110; }

/* ---------- Über mich ---------- */
.about { padding: clamp(4rem, 10vw, 9rem) var(--pad); max-width: 1100px; }
.statement {
  margin: 0; max-width: 22ch;
  font-size: var(--step-3); font-weight: 600; line-height: 1.08;
  font-variation-settings: "wdth" 70;
}
.where { margin: 1.5rem 0 0; color: var(--ink-soft); }

/* ---------- Kontakt ---------- */
.contact {
  padding: clamp(4rem, 10vw, 8rem) var(--pad) clamp(5rem, 12vw, 10rem);
  border-top: 1px solid var(--blue);
}
.say { margin: 0 0 1.2rem; font-size: var(--step-1); font-weight: 500; color: var(--ink-soft); font-variation-settings: "wdth" 110; }
.mail {
  display: inline-block; text-decoration: none; word-break: break-all;
  font-weight: 800; font-size: clamp(2rem, 7.5vw, 7rem); line-height: 1;
  font-variation-settings: "wdth" 60;
  transition: font-variation-settings .5s cubic-bezier(.3,1.6,.5,1), color .2s;
}
.mail:hover { font-variation-settings: "wdth" 100; color: var(--red); }

.foot { padding: 0 var(--pad) 2rem; font-size: var(--step--1); color: var(--ink-soft); }

/* ---------- Timeline-Navigation ---------- */
.timeline {
  position: fixed; inset: auto 0 0 0; z-index: 30; height: var(--tl-h);
  display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 1.5rem;
  padding: 0 var(--pad);
  background: color-mix(in srgb, var(--paper) 88%, transparent);
  backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
  border-top: 1px solid var(--paper-2);
}
.track {
  position: absolute; left: var(--pad); right: calc(var(--pad) + 9rem); top: 14px; height: 2px;
  background: repeating-linear-gradient(90deg, var(--ink-soft) 0 1px, transparent 1px 8px);
  opacity: .5;
}
.track .fill { position: absolute; inset: 0 auto 0 0; width: var(--p, 0%); background: var(--ink); }
.track .head {
  position: absolute; top: -8px; left: var(--p, 0%); width: 2px; height: 50px; background: var(--red);
  transform: translateX(-1px);
}
.track .head::before {
  content: ""; position: absolute; top: -2px; left: -5px;
  border-left: 6px solid transparent; border-right: 6px solid transparent; border-top: 8px solid var(--red);
}
.keys {
  position: relative; list-style: none; margin: 0; padding: 0; height: 100%;
}
.keys li { position: absolute; top: 4px; left: var(--at, 0%); transform: translateX(-7px); }
.keys a {
  display: grid; grid-template-rows: 20px auto; justify-items: start; gap: 6px;
  text-decoration: none; font-size: var(--step--1); font-weight: 600;
  font-variation-settings: "wdth" 80; color: var(--ink-soft); white-space: nowrap;
}
.keys a::before {
  content: ""; width: 10px; height: 10px; margin: 5px 2px; transform: rotate(45deg);
  background: var(--paper); border: 2px solid var(--ink);
}
.keys a.on { color: var(--ink); }
.keys a.on::before { background: var(--red); border-color: var(--red); }
.keys li:last-child a { justify-items: end; transform: translateX(calc(-100% + 14px)); }
.tc {
  font-variant-numeric: tabular-nums; font-size: var(--step--1); font-weight: 600;
  font-variation-settings: "wdth" 70; color: var(--ink); min-width: 7.5rem; text-align: right;
}
@media (max-width: 600px) {
  .name { font-size: 21vw; }
  .tc { display: none; }
  .track { right: var(--pad); }
  .keys a { font-size: .7rem; }
}

/* ---------- Video-Player ---------- */
.player {
  width: min(1280px, 94vw); max-width: none; padding: 0; border: 0; background: transparent; overflow: visible;
}
.player::backdrop { background: rgba(27, 34, 51, .92); }
.player[open] { animation: pop .4s cubic-bezier(.3,1.5,.5,1); }
@keyframes pop { from { transform: scale(.94, 1.04); opacity: 0; } }
.frame { aspect-ratio: 16 / 9; background: #000; }
.frame iframe { width: 100%; height: 100%; border: 0; display: block; }
.close {
  position: absolute; right: 0; top: -3.2rem; width: 2.6rem; height: 2.6rem;
  font: 300 2rem/1 var(--f); color: var(--paper); background: none; border: 0; cursor: pointer;
}

@media (prefers-reduced-motion: reduce) {
  .name .ch.drop, .rough path, .player[open] { animation: none; opacity: 1; stroke-dashoffset: 0; }
  .name .ch { transition: none; }
}
