/* ═══════════════════════════════════════════════════════════
   DANIEL KARL — v2
   Poster-print system: paper, ink, vermillion.
   Type: Big Shoulders Stencil (display) · Spectral (text) · IBM Plex Mono (meta)
   ═══════════════════════════════════════════════════════════ */

:root {
  --paper:  #f0e8d8;
  --paper2: #e7ddc8;
  --ink:    #171008;
  --red:    #d33a1c;
  --red2:   #b52e14;
  --blue:   #27406e;
  --green:  #2c5240;

  --font-display: "Big Shoulders Stencil", "Arial Narrow", sans-serif;
  --font-body:    "Spectral", Georgia, serif;
  --font-mono:    "IBM Plex Mono", monospace;

  --ease: cubic-bezier(.22, 1, .36, 1);
  --pad: clamp(20px, 4vw, 64px);
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

::selection { background: var(--red); color: var(--paper); }

img { display: block; max-width: 100%; }
figure { margin: 0; }
a { color: inherit; }

/* ── print grain ─────────────────────────────── */
.grain {
  position: fixed; inset: -50%;
  width: 200%; height: 200%;
  pointer-events: none;
  z-index: 9999;
  opacity: .55;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='200' height='200'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix type='matrix' values='0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.05 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  animation: grain-shift 1.2s steps(4) infinite;
}
@keyframes grain-shift {
  0%   { transform: translate(0, 0); }
  25%  { transform: translate(-2%, 3%); }
  50%  { transform: translate(3%, -2%); }
  75%  { transform: translate(-3%, -3%); }
  100% { transform: translate(0, 0); }
}

/* ── duotone photo treatment ─────────────────── */
/* screenprint plate: grayscale photo multiplied over an ink-color plate —
   highlights take the plate color, shadows stay black */
.duo {
  position: relative;
  overflow: hidden;
  isolation: isolate;
}
.duo-red   { background: #e04a28; }
.duo-blue  { background: #5a77b5; }
.duo-green { background: #55917a; }
.duo img {
  width: 100%; height: 100%;
  object-fit: cover;
  filter: grayscale(1) brightness(1.6) contrast(1.3);
  mix-blend-mode: multiply;
  transition: filter .6s var(--ease), transform .8s var(--ease);
}

/* hover: the real photograph comes through */
.duo:hover img { filter: grayscale(0) contrast(1.02) brightness(1); mix-blend-mode: normal; transform: scale(1.03); }

/* ── top bar ─────────────────────────────────── */
.topbar {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 14px var(--pad);
  border-bottom: 2px solid var(--ink);
  background: color-mix(in srgb, var(--paper) 92%, transparent);
  backdrop-filter: blur(6px);
  transition: transform .45s var(--ease);
}
.topbar.hidden { transform: translateY(-101%); }

.topbar-mark {
  display: flex; align-items: center; gap: 10px;
  text-decoration: none;
  font-family: var(--font-mono);
  font-size: 13px;
  letter-spacing: .12em;
  text-transform: uppercase;
  font-weight: 500;
}
.topbar-mark img { width: 28px; height: 28px; object-fit: contain; }

.topbar-nav { display: flex; gap: clamp(12px, 2.5vw, 32px); }
.topbar-nav a {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: .14em;
  text-transform: uppercase;
  text-decoration: none;
  position: relative;
  padding: 2px 0;
}
.topbar-nav a::after {
  content: "";
  position: absolute; left: 0; bottom: 0;
  width: 100%; height: 2px;
  background: var(--red);
  transform: scaleX(0);
  transform-origin: right;
  transition: transform .35s var(--ease);
}
.topbar-nav a:hover::after { transform: scaleX(1); transform-origin: left; }

.lang-nav { display: flex; gap: 2px; border: 2px solid var(--ink); }
.lang {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: .08em;
  padding: 4px 9px;
  background: transparent;
  color: var(--ink);
  border: 0;
  cursor: pointer;
  transition: background .2s, color .2s;
}
.lang:hover { background: var(--paper2); }
.lang.active { background: var(--ink); color: var(--paper); }

/* ── hero ────────────────────────────────────── */
.hero {
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: calc(64px + 4vh) var(--pad) 0;
  position: relative;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.25fr 1fr;
  gap: clamp(24px, 4vw, 64px);
  align-items: end;
  flex: 1;
}

.hero-name {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(84px, 17vw, 260px);
  line-height: .88;
  letter-spacing: .01em;
  text-transform: uppercase;
}
.hero-line { display: block; overflow: hidden; }
.hero-word {
  display: inline-block;
  transform: translateY(110%);
  animation: rise 1s var(--ease) forwards;
}
.hero-line:nth-child(2) .hero-word { animation-delay: .12s; }
.hero-word.accent { color: var(--red); }
.hero-star {
  display: inline-block;
  font-size: .35em;
  vertical-align: super;
  color: var(--ink);
  margin-left: .08em;
  animation: spin 14s linear infinite;
}
@keyframes rise { to { transform: translateY(0); } }
@keyframes spin { to { transform: rotate(360deg); } }

.hero-role {
  margin-top: 28px;
  font-family: var(--font-mono);
  font-size: clamp(13px, 1.4vw, 16px);
  letter-spacing: .22em;
  text-transform: uppercase;
  opacity: 0;
  animation: fade .8s .5s var(--ease) forwards;
}
.hero-place {
  margin-top: 6px;
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--red);
  opacity: 0;
  animation: fade .8s .65s var(--ease) forwards;
}
@keyframes fade { to { opacity: 1; } }

.hero-right {
  position: relative;
  align-self: stretch;
  display: flex;
  align-items: center;
  justify-content: center;
}
.hero-photo {
  width: 100%;
  align-self: stretch;
  min-height: clamp(280px, 52vh, 560px);
  border: 3px solid var(--ink);
  clip-path: inset(0 0 100% 0);
  animation: unveil 1.1s .35s var(--ease) forwards;
}
@keyframes unveil { to { clip-path: inset(0 0 0 0); } }

.stamp {
  position: absolute;
  left: -70px; bottom: -40px;
  width: clamp(120px, 14vw, 190px);
  aspect-ratio: 1;
  animation: spin 26s linear infinite;
  z-index: 2;
}
.stamp svg { width: 100%; height: 100%; }
.stamp-text {
  font-family: var(--font-mono);
  font-size: 15.5px;
  letter-spacing: .18em;
  text-transform: uppercase;
  fill: var(--red);
}
.stamp-star { font-size: 44px; fill: var(--red); }

.hero-quote {
  padding: 26px 0 30px;
  margin-top: 5vh;
  border-top: 2px solid var(--ink);
  display: flex;
  align-items: baseline;
  gap: 18px;
  flex-wrap: wrap;
}
.hero-quote p {
  font-family: var(--font-body);
  font-style: italic;
  font-weight: 500;
  font-size: clamp(18px, 2.4vw, 28px);
}
.hero-quote cite {
  font-family: var(--font-mono);
  font-style: normal;
  font-size: 13px;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--red);
}

/* ── marquee ─────────────────────────────────── */
.marquee {
  background: var(--ink);
  color: var(--paper);
  overflow: hidden;
  border-top: 3px solid var(--ink);
  border-bottom: 3px solid var(--ink);
  padding: 12px 0;
}
.marquee-track {
  display: flex;
  width: max-content;
  animation: marquee 22s linear infinite;
}
.marquee-track span {
  font-weight: 700;
  font-family: var(--font-display);
  font-size: clamp(22px, 3vw, 38px);
  letter-spacing: .06em;
  white-space: nowrap;
  padding-right: .5em;
}
@keyframes marquee { to { transform: translateX(-50%); } }
.marquee:hover .marquee-track { animation-play-state: paused; }

/* ── sections ────────────────────────────────── */
.section { padding: clamp(70px, 11vh, 130px) var(--pad); position: relative; }
.section-inner { max-width: 1280px; margin: 0 auto; }

.section-hd {
  display: flex;
  align-items: baseline;
  gap: 18px;
  margin-bottom: clamp(44px, 7vh, 84px);
}
.section-num {
  font-family: var(--font-mono);
  font-size: 14px;
  color: var(--red);
  letter-spacing: .1em;
}
.section-label {
  font-weight: 700;
  font-family: var(--font-display);
  font-size: clamp(34px, 5vw, 62px);
  text-transform: uppercase;
  letter-spacing: .02em;
  line-height: 1;
}
.section-rule {
  flex: 1;
  height: 3px;
  background: var(--ink);
  align-self: center;
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 1s var(--ease) .15s;
}
.section-hd.in .section-rule { transform: scaleX(1); }

/* inverted + red sections */
.section-ink { background: var(--ink); color: var(--paper); }
.section-ink .section-rule { background: var(--paper); }
.section-red { background: var(--red); color: var(--paper); }
.section-red .section-num { color: var(--ink); }
.section-red .section-rule { background: var(--paper); }
.section-red ::selection { background: var(--ink); }

/* ── works / film entries ────────────────────── */
.film-entry { padding: clamp(40px, 7vh, 80px) 0; }
.film-entry + .film-entry { border-top: 2px solid var(--ink); }

.film-entry-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 24px;
  margin-bottom: 30px;
}
.film-title {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(52px, 9vw, 140px);
  line-height: .9;
  text-transform: uppercase;
  letter-spacing: .01em;
  transition: color .3s var(--ease);
}
.film-entry:hover .film-title { color: var(--red); }

.film-meta-right {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 6px;
  font-family: var(--font-mono);
  text-transform: uppercase;
}
.film-year {
  font-size: clamp(20px, 2.4vw, 30px);
  font-weight: 500;
  color: var(--red);
}
.film-type { font-size: 12px; letter-spacing: .16em; }

.film-still-wrap {
  border: 3px solid var(--ink);
  aspect-ratio: 21 / 9;
}
.film-still-wrap img { height: 100%; }

.film-desc {
  max-width: 62ch;
  margin: 28px 0 0;
  font-size: clamp(16px, 1.5vw, 19px);
}

.film-video { margin-top: 36px; }
.film-video-label {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: .18em;
  text-transform: uppercase;
  background: var(--red);
  color: var(--paper);
  padding: 6px 12px;
  margin-bottom: 14px;
}
.video-frame {
  position: relative;
  aspect-ratio: 16 / 9;
  border: 3px solid var(--ink);
  background: #000;
}
.video-frame iframe {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  border: 0;
}

.film-gallery {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
  margin-top: 36px;
}
.film-gallery figure {
  aspect-ratio: 4 / 3;
  border: 2px solid var(--ink);
}

/* ── in development ──────────────────────────── */
.dev-entry {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 28px;
  padding: 30px 18px;
  border-top: 2px solid var(--paper);
  transition: background .3s var(--ease), color .3s var(--ease), padding-left .3s var(--ease);
}
.dev-entry:last-child { border-bottom: 2px solid var(--paper); }
.dev-entry:hover {
  background: var(--paper);
  color: var(--ink);
  padding-left: 30px;
}
.dev-title {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(30px, 4.6vw, 62px);
  line-height: 1;
  text-transform: uppercase;
}
.dev-type {
  display: block;
  margin-top: 8px;
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: .16em;
  text-transform: uppercase;
  opacity: .75;
}
.dev-desc {
  max-width: 58ch;
  margin-top: 12px;
  font-size: 15px;
  opacity: .85;
}
.dev-badge {
  flex-shrink: 0;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: .14em;
  text-transform: uppercase;
  border: 2px solid currentColor;
  padding: 8px 14px;
  transform: rotate(-2deg);
  transition: transform .3s var(--ease), background .3s, color .3s, border-color .3s;
}
.dev-badge.approved {
  background: var(--red);
  border-color: var(--red);
  color: var(--paper);
}
.dev-entry:hover .dev-badge { transform: rotate(0deg) scale(1.04); }

/* ── writing ─────────────────────────────────── */
.writing-list { display: flex; flex-direction: column; }
.writing-item {
  display: grid;
  grid-template-columns: 3.2em 1fr auto auto;
  align-items: baseline;
  gap: 18px;
  padding: 20px 8px;
  border-top: 2px solid var(--ink);
  text-decoration: none;
  position: relative;
  transition: padding-left .3s var(--ease);
}
.writing-item:last-child { border-bottom: 2px solid var(--ink); }
.writing-item::before {
  content: "";
  position: absolute; inset: 0;
  background: var(--ink);
  transform: scaleY(0);
  transform-origin: bottom;
  transition: transform .3s var(--ease);
  z-index: 0;
}
.writing-item:hover::before { transform: scaleY(1); }
.writing-item > * { position: relative; z-index: 1; transition: color .3s; }
.writing-item:hover > * { color: var(--paper); }
.writing-item:hover .writing-arrow { color: var(--red); transform: translateX(6px); }

.writing-idx {
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--red);
}
.writing-title {
  font-weight: 700;
  font-family: var(--font-display);
  font-size: clamp(22px, 3vw, 40px);
  text-transform: uppercase;
  line-height: 1.05;
}
.writing-type {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: .14em;
  text-transform: uppercase;
  opacity: .7;
}
.writing-arrow {
  font-size: 22px;
  transition: transform .3s var(--ease), color .3s;
}

.writing-more {
  display: inline-block;
  margin-top: 34px;
  font-family: var(--font-mono);
  font-size: 13px;
  letter-spacing: .14em;
  text-transform: uppercase;
  text-decoration: none;
  background: var(--ink);
  color: var(--paper);
  padding: 12px 18px;
  transition: background .25s, transform .25s var(--ease);
}
.writing-more:hover { background: var(--red); transform: translateY(-2px); }

/* ── books ───────────────────────────────────── */
.book-layout {
  display: grid;
  grid-template-columns: minmax(220px, 340px) 1fr;
  gap: clamp(30px, 5vw, 70px);
  align-items: center;
}
.book-cover {
  display: block;
  transform: rotate(-2.5deg);
  transition: transform .45s var(--ease);
  filter: drop-shadow(10px 12px 0 rgba(23, 16, 8, .45));
}
.book-cover:hover { transform: rotate(0deg) scale(1.02); }
.book-cover-img { border: 3px solid var(--ink); width: 100%; }

.book-title {
  font-weight: 700;
  font-family: var(--font-display);
  font-size: clamp(40px, 6vw, 84px);
  line-height: .95;
  text-transform: uppercase;
}
.book-subtitle {
  margin-top: 10px;
  font-family: var(--font-body);
  font-style: italic;
  font-size: 18px;
}
.book-pub {
  margin-top: 6px;
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: .16em;
  text-transform: uppercase;
}
.book-hr { width: 74px; height: 4px; background: var(--ink); margin: 22px 0; }
.book-desc { max-width: 54ch; font-size: 17px; }
.book-link {
  display: inline-block;
  margin-top: 24px;
  font-family: var(--font-mono);
  font-size: 13px;
  letter-spacing: .12em;
  text-transform: uppercase;
  text-decoration: none;
  background: var(--ink);
  color: var(--paper);
  padding: 12px 18px;
  transition: background .25s, color .25s, transform .25s var(--ease);
}
.book-link:hover { background: var(--paper); color: var(--ink); transform: translateY(-2px); }

/* ── bio ─────────────────────────────────────── */
.bio-layout {
  display: grid;
  grid-template-columns: minmax(240px, 400px) 1fr;
  gap: clamp(30px, 5vw, 70px);
  align-items: start;
}
.bio-photo {
  border: 3px solid var(--ink);
  aspect-ratio: 4 / 5;
}
.bio-text p + p { margin-top: 1em; }
.bio-text { font-size: clamp(16px, 1.5vw, 19px); max-width: 58ch; }

.bio-tags { margin-top: 26px; display: flex; flex-wrap: wrap; gap: 10px; }
.bio-tag {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: .12em;
  text-transform: uppercase;
  border: 2px solid var(--ink);
  padding: 6px 12px;
  transition: background .25s, color .25s, transform .25s var(--ease);
}
.bio-tag:nth-child(odd)  { transform: rotate(-1.5deg); }
.bio-tag:nth-child(even) { transform: rotate(1.2deg); }
.bio-tag:hover { background: var(--red); border-color: var(--red); color: var(--paper); transform: rotate(0); }

#contact { margin-top: 48px; }
.contact-hd {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: .2em;
  text-transform: uppercase;
  color: var(--red);
  margin-bottom: 14px;
}
.contact-links { display: flex; flex-wrap: wrap; gap: 8px 22px; }
.contact-link {
  font-weight: 700;
  font-family: var(--font-display);
  font-size: clamp(20px, 2.4vw, 30px);
  text-transform: uppercase;
  text-decoration: none;
  position: relative;
  padding-bottom: 2px;
}
.contact-link::after {
  content: "";
  position: absolute; left: 0; bottom: 0;
  width: 100%; height: 3px;
  background: var(--red);
  transform: scaleX(0);
  transform-origin: right;
  transition: transform .35s var(--ease);
}
.contact-link:hover::after { transform: scaleX(1); transform-origin: left; }
.contact-arrow { color: var(--red); font-size: .7em; }

.set-strip {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
  margin-top: clamp(50px, 8vh, 90px);
}
.set-thumb { aspect-ratio: 1; border: 2px solid var(--ink); }

/* ── footer ──────────────────────────────────── */
.footer {
  background: var(--ink);
  color: var(--paper);
  padding: clamp(40px, 7vh, 80px) var(--pad) 30px;
  overflow: hidden;
}
.footer-big {
  font-weight: 700;
  font-family: var(--font-display);
  font-size: clamp(64px, 13.5vw, 230px);
  line-height: .85;
  text-transform: uppercase;
  white-space: nowrap;
  text-align: center;
  color: transparent;
  -webkit-text-stroke: 2px var(--paper);
  opacity: .5;
  transition: color .5s var(--ease), opacity .5s;
}
.footer-big:hover { color: var(--red); -webkit-text-stroke: 2px var(--red); opacity: 1; }
.footer-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  margin-top: 40px;
  padding-top: 22px;
  border-top: 1px solid color-mix(in srgb, var(--paper) 30%, transparent);
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: .12em;
  text-transform: uppercase;
}
.footer-brand { display: flex; align-items: center; gap: 10px; }
.footer-brand img { width: 28px; height: 28px; object-fit: contain; }

/* ── scroll animations ───────────────────────── */
.reveal {
  opacity: 0;
  transform: translateY(34px);
  transition: opacity .8s var(--ease), transform .8s var(--ease);
}
.reveal.in { opacity: 1; transform: translateY(0); }

.wipe { clip-path: inset(0 100% 0 0); transition: clip-path 1.1s var(--ease); }
.wipe.in { clip-path: inset(0 0 0 0); }

/* ── responsive ──────────────────────────────── */
@media (max-width: 900px) {
  .topbar-nav { display: none; }
  .hero-grid { grid-template-columns: 1fr; }
  .hero-right { min-height: 300px; }
  .stamp { left: auto; right: -20px; bottom: -50px; }
  .film-still-wrap { aspect-ratio: 16 / 9; }
  .film-gallery { grid-template-columns: repeat(2, 1fr); }
  .book-layout, .bio-layout { grid-template-columns: 1fr; }
  .book-cover { max-width: 300px; }
  .dev-entry { flex-direction: column; align-items: flex-start; gap: 14px; }
  .writing-item { grid-template-columns: 2.4em 1fr auto; }
  .writing-type { display: none; }
  .set-strip { grid-template-columns: repeat(2, 1fr); }
}

/* ── reduced motion ──────────────────────────── */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .grain, .hero-star, .stamp, .marquee-track { animation: none; }
  .hero-word { animation: none; transform: none; }
  .hero-role, .hero-place { animation: none; opacity: 1; }
  .hero-photo { animation: none; clip-path: none; }
  .reveal, .wipe { transition: none; opacity: 1; transform: none; clip-path: none; }
  .section-rule { transition: none; transform: scaleX(1); }
}

/* Link out to the company site. The portfolio is the indexed page, so this is
   the crawl path Google follows to find AUF-WASSEN. */
.footer-link { color: inherit; text-decoration: none; border-bottom: 1px solid rgba(23,16,8,.3); }
.footer-link:hover { color: var(--red); border-bottom-color: var(--red); }
