/* ==========================================================================
   Isabell Kaletka – portfolio
   All colors, fonts and spacing live in these variables.
   ========================================================================== */
:root {
  --bg: #ececec;
  --ink: #000;
  --ink-soft: #252525;
  --muted: #7f7f7f;
  --muted-2: #a6adb5;
  --line: #d4d4d4;
  --accent: #ec5851;
  --panel: #f6f6f6;

  --font: "Hanken Grotesk", system-ui, sans-serif;
  --font-display: "BT Glyphius", "Helvetica Neue", Arial, sans-serif;
  --font-mono: "Google Sans Code", ui-monospace, monospace;

  --gutter: clamp(16px, 3.3vw, 40px);
  --max: 1680px;
  --radius: 8px;
  --ease: cubic-bezier(.22, 1, .36, 1);
}

/* BT Glyphius by BeauType Studio – the headline font from the original site.
   On the old site it never loaded (requested over http://), so browsers fell back to Arial. */
@font-face {
  font-family: "BT Glyphius";
  src: url("/assets/fonts/bt-glyphius-regular.woff") format("woff");
  font-weight: 400; font-style: normal; font-display: swap;
}

/* Self-hosted (no requests to Google = no cookie/GDPR issues). */
@font-face {
  font-family: "Hanken Grotesk"; font-weight: 100 900; font-style: normal; font-display: swap;
  src: url("/assets/fonts/hanken-grotesk-latin-wght-normal.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Hanken Grotesk"; font-weight: 100 900; font-style: normal; font-display: swap;
  src: url("/assets/fonts/hanken-grotesk-latin-ext-wght-normal.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: "Google Sans Code"; font-weight: 400; font-style: normal; font-display: swap;
  src: url("/assets/fonts/google-sans-code-latin-400-normal.woff2") format("woff2");
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font);
  font-size: clamp(16px, 1.15vw, 18px);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img, video { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-decoration: none; }
h1, h2, h3, p { margin: 0; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 2px; }

.wrap { width: 100%; max-width: var(--max); margin-inline: auto; padding-inline: var(--gutter); }

.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.skip { position: absolute; left: -9999px; }
.skip:focus { left: var(--gutter); top: 8px; z-index: 100; background: var(--ink); color: #fff; padding: 6px 12px; }

/* Big uppercase headlines. Sized to the viewport so long words never break mid-word. */
.display {
  font-family: var(--font-display);
  font-weight: 400;
  text-transform: uppercase;
  line-height: 1.2; /* 20 % spacing between lines when a headline wraps */
  letter-spacing: 0;
  overflow-wrap: normal;
  word-break: normal;
  hyphens: none;
}
.display--accent { color: var(--accent); }
.display--muted { color: var(--muted-2); }

.label { font-size: .95rem; color: var(--muted); font-weight: 400; }

/* ---------- Navigation ---------- */
.nav {
  position: sticky; top: 0; z-index: 50;
  display: flex; justify-content: space-between; align-items: center; gap: 16px;
  padding: 22px var(--gutter);
  color: #fff; mix-blend-mode: difference; /* stays readable over light and dark images */
  transition: transform .45s var(--ease);
  font-weight: 500; font-size: clamp(16px, 1.2vw, 18px);
}
/* Slides away while scrolling down, comes back when scrolling up (so it never sits on top of the content) */
.nav.is-hidden { transform: translateY(-100%); }
.menu-open .nav.is-hidden { transform: none; }
.nav__menu { display: flex; align-items: center; gap: clamp(20px, 6vw, 88px); }
.nav a { position: relative; }
.nav__menu a:not(.lang-toggle)::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: -2px; height: 1px;
  background: currentColor; transform: scaleX(0); transform-origin: left; transition: transform .4s var(--ease);
}
.nav__menu a:hover::after, .nav__menu a[aria-current="page"]::after { transform: scaleX(1); }

/* Language switch: names the language you switch to; same type size as the menu, just outlined */
.lang-toggle {
  display: inline-flex; align-items: center; justify-content: center;
  height: 1.6em; padding: 0 .62em .12em; border: 1px solid currentColor; border-radius: 999px;
  line-height: 1; text-transform: lowercase; transition: background .3s;
}
.lang-toggle span { display: block; }
.lang-toggle:hover { background: currentColor; }
.lang-toggle:hover span { color: #000; }

/* Hamburger (mobile only) */
.nav__burger {
  display: none; position: relative; width: 44px; height: 44px; margin: -10px 0 -10px -10px;
  padding: 0; border: 0; background: none; color: inherit; cursor: pointer;
}
.nav__burger-lines, .nav__burger-lines::before, .nav__burger-lines::after {
  position: absolute; left: 10px; width: 24px; height: 2px; background: currentColor;
  transition: transform .4s var(--ease), opacity .3s;
}
.nav__burger-lines { top: 21px; }
.nav__burger-lines::before, .nav__burger-lines::after { content: ""; left: 0; }
.nav__burger-lines::before { top: -7px; }
.nav__burger-lines::after { top: 7px; }
.menu-open .nav__burger-lines { background: transparent; }
.menu-open .nav__burger-lines::before { transform: translateY(7px) rotate(45deg); }
.menu-open .nav__burger-lines::after { transform: translateY(-7px) rotate(-45deg); }

@media (max-width: 760px) {
  .nav { padding-block: 16px; }
  .nav__name { font-size: 16px; }
  /* Only hide the links behind the hamburger when JavaScript runs; otherwise keep them visible. */
  .js .nav__burger { display: block; }
  /* hamburger left, name centred */
  .js .nav__name { position: absolute; left: 50%; top: 50%; translate: -50% -50%; white-space: nowrap; }
  .js .nav__menu {
    position: fixed; inset: 0; z-index: -1;
    flex-direction: column; justify-content: center; align-items: flex-start; gap: 8px;
    padding: 96px var(--gutter) 48px;
    background: #070707; color: #fcfcfc;
    font-family: var(--font-display); text-transform: uppercase; font-size: clamp(2.4rem, 12vw, 3.6rem); line-height: 1.2;
    opacity: 0; visibility: hidden; transition: opacity .4s var(--ease), visibility 0s .4s;
  }
  .js .nav__menu .lang-toggle { margin-top: 32px; font-family: var(--font); font-size: 18px; text-transform: none; }
  .js .nav__menu .lang-toggle:hover span { color: #070707; }
  .menu-open .nav { mix-blend-mode: normal; color: #fcfcfc; }
  .menu-open .nav__menu { opacity: 1; visibility: visible; transition: opacity .4s var(--ease); }
  .menu-open body { overflow: hidden; }
  html:not(.js) .nav__menu { gap: 16px; font-size: 15px; }
}

/* ---------- Hero ---------- */
.hero {
  position: relative;
  margin-top: -72px; /* sit under the sticky nav */
  min-height: max(640px, 100svh);
  display: grid; align-items: center;
  max-width: var(--max); margin-inline: auto;
  overflow: hidden;
}
.hero__img {
  position: absolute; right: 0; bottom: 0;
  height: 92%; width: auto; max-width: 62%;
  object-fit: contain; object-position: right bottom;
  pointer-events: none;
}
.hero__text { position: relative; z-index: 1; padding-top: 120px; padding-bottom: 80px; }
.hero__title {
  font-weight: 400; line-height: 1.12;
  font-size: clamp(3rem, 6.5vw, 7.5rem);
  letter-spacing: -.01em;
}
.hero__greeting { white-space: nowrap; }
.hero__greeting::after {
  content: "|"; color: var(--accent); margin-left: 2px; font-weight: 300;
  animation: blink .8s steps(1) infinite;
}
@keyframes blink { 50% { opacity: 0; } }
.hero__intro { max-width: 34rem; margin-top: 1.4em; font-size: clamp(1rem, 1.25vw, 1.15rem); line-height: 1.75; }
.pill {
  display: inline-block; margin-top: 2rem; padding: .7em 1.4em;
  border: 2px solid var(--ink-soft); border-radius: 999px;
  font-weight: 500; font-size: 1.1rem; transition: background .3s, color .3s;
}
.pill:hover { background: var(--ink-soft); color: var(--bg); }
.hero__down {
  position: absolute; left: 50%; bottom: 28px; width: 22px; height: 22px; translate: -50% 0;
  border-right: 2px solid var(--ink-soft); border-bottom: 2px solid var(--ink-soft); rotate: 45deg;
  animation: nudge 2s var(--ease) infinite; z-index: 2;
}
@keyframes nudge { 50% { transform: translate(4px, 4px); } }

/* On narrower screens the text used to run across the photo: stack them instead. */
@media (max-width: 900px) {
  .hero { min-height: 0; display: block; }
  .hero__text { padding-top: 110px; padding-bottom: 0; }
  .hero__img { position: relative; max-width: min(100%, 560px); height: auto; width: 100%; margin: 24px 0 0 auto; }
  .hero__down { display: none; }
}

/* ---------- Marquee ---------- */
.marquee {
  overflow: hidden; border-block: 1px solid var(--line);
  padding-block: clamp(18px, 2.4vw, 32px);
  color: var(--accent);
}
.marquee__track { display: flex; width: max-content; animation: marquee 28s linear infinite; }
.marquee__track span {
  font-family: var(--font-display); text-transform: uppercase; white-space: nowrap;
  font-size: clamp(1.6rem, 3.4vw, 3.4rem); line-height: 1; padding-right: .8em;
}
@keyframes marquee { to { transform: translateX(-50%); } }
@media (prefers-reduced-motion: reduce) { .marquee__track { animation: none; } }
.marquee-link { display: block; margin-top: clamp(60px, 8vw, 120px); }
.marquee-link:hover .marquee__track { animation-play-state: paused; }

/* ---------- Work grid (home) ---------- */
.work { display: grid; gap: clamp(64px, 10vw, 160px); padding-block: clamp(64px, 10vw, 160px); }
.card { display: block; position: relative; border-radius: var(--radius); overflow: hidden; }
.card__media { overflow: hidden; border-radius: var(--radius); aspect-ratio: 16 / 9; background: #ddd; }
.card__media img { width: 100%; height: 100%; object-fit: cover; transition: transform 1.2s var(--ease); }
.card:hover .card__media img { transform: scale(1.08); }
.card__meta { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 16px; padding-top: 16px; }
.card__title { font-size: clamp(1.25rem, 1.8vw, 1.6rem); font-weight: 500; }
.card__sub { color: var(--muted); }
/* Desktop with a mouse: titles appear on the image on hover, like the original */
@media (hover: hover) and (min-width: 901px) {
  .card__meta {
    position: absolute; inset: auto 0 0 0; padding: 40px; border-radius: 0 0 var(--radius) var(--radius);
    background: linear-gradient(transparent, rgba(0,0,0,.55)); color: #fffff3;
    opacity: 0; transform: translateY(8px); transition: opacity .5s var(--ease), transform .5s var(--ease);
  }
  .card__sub { color: #d6d6d6; }
  .card:hover .card__meta, .card:focus-visible .card__meta { opacity: 1; transform: none; }
}

/* ---------- Big link rows (Playground / Get in touch) ---------- */
.rows { padding-top: clamp(40px, 6vw, 80px); }
.row-link {
  position: relative; display: flex; justify-content: space-between; align-items: center; gap: 24px;
  padding: clamp(24px, 3.6vw, 48px) clamp(12px, 1.8vw, 24px);
  border-top: 1px solid var(--line);
  transition: background .35s var(--ease), color .35s var(--ease);
}
.rows .row-link:last-child { border-bottom: 1px solid var(--line); }
.row-link__title { font-family: var(--font-display); text-transform: uppercase; font-size: clamp(2rem, 5.2vw, 5rem); line-height: 1; }
.row-link__aside { font-size: clamp(1.1rem, 4vw, 4rem); color: var(--muted-2); line-height: 1; white-space: nowrap; }
.row-link__arrow { font-size: clamp(2rem, 4.4vw, 4.4rem); line-height: 1; transition: transform .4s var(--ease); }
.row-link:hover .row-link__arrow { transform: translateX(10px); }
.row-link--preview:hover { background: var(--ink); color: #fff; }
.row-link__img { display: none; }

/* Floating image preview that follows the mouse (Playground row, "Next" list) */
.hover-preview {
  position: fixed; left: 0; top: 0; z-index: 40; pointer-events: none;
  width: clamp(220px, 22vw, 340px); aspect-ratio: 4 / 3; border-radius: var(--radius); overflow: hidden;
  opacity: 0; scale: .9; transition: opacity .3s var(--ease), scale .3s var(--ease);
}
.hover-preview img { width: 100%; height: 100%; object-fit: cover; }
.hover-preview.is-on { opacity: 1; scale: 1; }
@media (hover: none) { .hover-preview { display: none; } }

/* ---------- Page titles ---------- */
.page-title {
  font-size: clamp(2.6rem, 6.4vw, 6rem); padding-block: clamp(32px, 5vw, 56px);
  margin-top: clamp(24px, 5vw, 64px); border-block: 1px solid var(--line);
}
.page-title--split { display: flex; justify-content: space-between; align-items: baseline; flex-wrap: wrap; gap: 8px 24px; font-weight: 400; }

/* ---------- Project page ---------- */
/* Wide screens: title + fact sheet left (sticky) · case study middle · media rail right (sticky).
   Uses the full window width so the middle column gets as much room as possible. */
.project__body { padding: clamp(32px, 5vw, 72px) var(--gutter) 0; }
.project__title {
  /* sized to the column so the longest single word (e.g. BOOKFINDER) always fits on one line */
  font-size: clamp(1.6rem, 14cqi, 4rem); line-height: 1.2;
  padding-bottom: clamp(16px, 2vw, 28px); margin-bottom: clamp(16px, 2vw, 28px);
  border-bottom: 1px solid var(--line);
}
.project__side { container-type: inline-size; }
.meta { margin: 0; }
.meta__row { display: grid; grid-template-columns: 7.5rem minmax(0, 1fr); gap: 12px; padding-block: 8px; font-size: .92rem; line-height: 1.5; }
.meta dt { color: var(--muted); }
.meta dd { margin: 0; }
.project__hero img, .project__hero video { width: 100%; border-radius: var(--radius); }

@media (min-width: 1100px) {
  .project__body {
    display: grid; align-items: start;
    grid-template-columns: minmax(250px, 1fr) minmax(0, 920px) minmax(112px, .7fr);
    gap: clamp(40px, 4vw, 72px);
  }
  .project__side, .project__rail { position: sticky; top: 88px; }
  .project__side { max-height: calc(100vh - 104px); overflow-y: auto; scrollbar-width: none; }
  .project__title { font-size: clamp(1.6rem, 13cqi, 3.4rem); }
  .project__rail { justify-self: end; }
}
@media (max-width: 1099px) {
  .project__side { margin-bottom: clamp(32px, 5vw, 56px); }
  .project__rail { display: none !important; }
}
/* narrow fact sheet: label above value */
@container (max-width: 340px) { .meta__row { grid-template-columns: 1fr; gap: 0; padding-block: 6px; } }

/* Media rail: one thumbnail per image/video/slider/gallery, click to jump there */
.project__rail {
  display: flex; flex-direction: column; gap: 10px; width: 112px;
  max-height: calc(100vh - 120px); overflow-y: auto; scrollbar-width: none; padding: 3px;
}
.project__rail::-webkit-scrollbar, .project__side::-webkit-scrollbar { display: none; }
.rail__item {
  position: relative; display: block; flex: none; width: 100%; aspect-ratio: 4 / 3;
  border-radius: 6px; overflow: hidden; background: #d9d9d9;
  opacity: .5; outline: 2px solid transparent; outline-offset: 2px;
  transition: opacity .3s var(--ease), outline-color .3s var(--ease);
}
.rail__item img, .rail__item video { width: 100%; height: 100%; object-fit: cover; }
.rail__item:hover { opacity: .9; }
.rail__item.is-active { opacity: 1; outline-color: var(--ink); }
.rail__item[data-kind]::after {
  content: attr(data-kind); position: absolute; right: 4px; bottom: 4px;
  padding: 1px 6px; border-radius: 99px; background: rgba(0,0,0,.6); color: #fff; font-size: 10px; line-height: 1.5;
}

/* Case study content (middle column), arranged like the original */
.prose { padding-top: clamp(40px, 5vw, 72px); }
.prose h2 { font-size: 1rem; font-weight: 400; color: var(--muted); margin: 0 0 16px; }
/* a section label always sits the same distance above whatever follows it */
.prose h2 + * { margin-top: 0 !important; }
.prose > h2 { margin-top: clamp(80px, 9vw, 140px); }
.prose > h2:first-child { margin-top: 0; }
.prose p { margin: 0 0 1.1em; line-height: 1.7; }
.prose > p, .prose > ul, .prose > ol { max-width: 38rem; }
.prose > p:first-child { font-size: clamp(1.1rem, 1.4vw, 1.25rem); line-height: 1.65; }
.prose a { text-decoration: underline; text-underline-offset: 3px; }
.prose img, .prose video { width: 100%; border-radius: var(--radius); }
/* A paragraph that only holds an image or video (Markdown wraps them) is a full-width media block */
.prose > p:has(> img:only-child), .prose > p:has(> video:only-child) { max-width: none; margin: 0; }
/* Spacing: media blocks keep --block-gap to text; two media blocks in a row sit exactly --media-gap apart
   (the same gap as between the images inside a pair or gallery). */
.prose { --block-gap: clamp(32px, 4vw, 56px); --media-gap: clamp(12px, 1.6vw, 20px); }
.prose > :is(p:has(> img:only-child), p:has(> video:only-child), video, .pair, .slider, .gallery, .compare, .split, .text-cols) {
  margin-block: var(--block-gap);
}
.prose > :is(p:has(> img:only-child), p:has(> video:only-child), video, .pair, .slider, .gallery, .compare)
  + :is(p:has(> img:only-child), p:has(> video:only-child), video, .pair, .slider, .gallery, .compare) {
  margin-top: calc(var(--media-gap) - var(--block-gap)); /* collapses with the previous margin to exactly --media-gap */
}

/* Two related images side by side */
.pair { display: grid; grid-template-columns: 1fr 1fr; gap: var(--media-gap, 20px); align-items: start; }
.pair img, .pair video { width: 100%; height: 100%; object-fit: cover; }
@media (max-width: 600px) { .pair { grid-template-columns: 1fr; } }

/* Text and image side by side (ratios from the original 8-column grid) */
.split { display: grid; gap: clamp(24px, 3vw, 40px); align-items: start; }
.split--4-4 { grid-template-columns: 1fr 1fr; }
.split--3-5 { grid-template-columns: 3fr 5fr; }
.split--5-3 { grid-template-columns: 5fr 3fr; }
.split__col > :first-child { margin-top: 0; }
.split__col > :last-child { margin-bottom: 0; }
.split__col p:has(> img:only-child) { margin: 0; }
@media (max-width: 760px) { .split { grid-template-columns: 1fr !important; } }

/* One long text flowing over two columns */
.text-cols { columns: 2 260px; column-gap: clamp(24px, 3vw, 40px); }

/* Image gallery with captions (masonry: images are pre-sorted into columns) */
.gallery { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--media-gap, 20px); align-items: start; }
.gallery--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.gallery__col { display: grid; gap: var(--media-gap, 20px); }
.gallery figure { margin: 0; }
.gallery figcaption { margin-top: 8px; font-size: .9rem; }
@media (max-width: 600px) { .gallery, .gallery--3 { grid-template-columns: 1fr; } }

/* Slider (crossfade, arrows, autoplay) – without JavaScript the images simply stack */
.slider { position: relative; }
/* fixed frame (ratio of the first image, set in main.js) so the layout never jumps between slides */
.js .slider { border-radius: var(--radius); overflow: hidden; background: #ddd; aspect-ratio: var(--ratio, 16 / 10); }
.js .slider .slider__slide { position: absolute; inset: 0; opacity: 0; transition: opacity .8s var(--ease); }
.js .slider .slider__slide.is-active { opacity: 1; }
.js .slider :is(img, video) { width: 100%; height: 100%; object-fit: cover; border-radius: 0; }
.slider__btn {
  position: absolute; top: 50%; z-index: 2; margin-top: -24px;
  width: 48px; height: 48px; padding: 0; border: 0; border-radius: 50%;
  display: grid; place-items: center; cursor: pointer;
  background: rgba(255, 255, 255, .92); color: #111;
  box-shadow: 0 2px 12px rgba(0, 0, 0, .15);
  transition: opacity .3s var(--ease), transform .3s var(--ease), background .2s;
}
.slider__btn svg, .lightbox__btn svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.slider__btn:hover { background: #fff; }
.slider__btn--prev { left: 16px; }
.slider__btn--next { right: 16px; }
/* arrows only appear while the mouse is over the slider (always visible on touch screens) */
@media (hover: hover) {
  .slider__btn, .slider__count { opacity: 0; }
  .slider__btn--prev { transform: translateX(-6px); }
  .slider__btn--next { transform: translateX(6px); }
  .slider:hover .slider__btn, .slider:focus-within .slider__btn, .slider:hover .slider__count { opacity: 1; transform: none; }
}
.slider__count { transition: opacity .3s; position: absolute; right: 16px; bottom: 14px; z-index: 2; padding: 2px 10px; border-radius: 99px; background: rgba(20,20,22,.55); color: #fff; font-family: var(--font-mono); font-size: 12px; }
html:not(.js) .slider > * + * { margin-top: 16px; }

/* Before / after comparison: drag the handle (or use the arrow keys) */
.compare { position: relative; border-radius: var(--radius); overflow: hidden; --pos: 50%; touch-action: pan-y; }
.compare img { display: block; border-radius: 0; }
.js .compare img:first-of-type { position: absolute; inset: 0; height: 100%; object-fit: cover; clip-path: inset(0 calc(100% - var(--pos)) 0 0); z-index: 1; }
.compare__range { position: absolute; inset: 0; z-index: 3; width: 100%; height: 100%; margin: 0; opacity: 0; cursor: ew-resize; }
.compare__handle {
  position: absolute; top: 0; bottom: 0; left: var(--pos); z-index: 2; width: 2px; translate: -1px 0;
  background: #fff; pointer-events: none;
}
.compare__knob {
  /* same look as the slider arrows: white circle, thin centred chevrons */
  position: absolute; top: 50%; left: 50%; width: 48px; height: 48px; margin: -24px 0 0 -24px;
  border-radius: 50%; display: grid; place-items: center;
  background: rgba(255, 255, 255, .95); color: #111; box-shadow: 0 2px 12px rgba(0, 0, 0, .15);
}
.compare__knob svg { width: 26px; height: 26px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.compare__range:focus-visible + .compare__handle .compare__knob { outline: 2px solid var(--accent); outline-offset: 2px; }
html:not(.js) .compare img + img { margin-top: 16px; }

.prose img, .prose video, .project__hero img, .project__hero video, .prose .slider, .prose .gallery, .prose .compare { scroll-margin-top: 120px; }

/* ---------- "Next" list ---------- */
.more { padding-top: clamp(80px, 10vw, 160px); }
.more .label { margin-bottom: 16px; }
.more__row {
  display: grid; grid-template-columns: 7rem 1fr 12rem; gap: 16px; align-items: baseline;
  padding: 18px 12px; border-top: 1px solid var(--line);
  transition: background .3s var(--ease), padding .3s var(--ease);
}
.more__row:last-child { border-bottom: 1px solid var(--line); }
.more__row--head { color: var(--muted); font-size: .9rem; border-top: 0; }
a.more__row:hover { background: rgba(0,0,0,.04); padding-left: 20px; }
.more__row span:first-child { font-family: var(--font-mono); white-space: nowrap; }
.more__name { font-size: clamp(1.15rem, 1.8vw, 1.6rem); }
.more__row span:last-child { color: var(--muted); text-align: right; }
@media (max-width: 600px) {
  .more__row { grid-template-columns: 5.5rem 1fr; }
  .more__row span:last-child { display: none; }
}

/* ---------- About ---------- */
.about-intro {
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 2fr); gap: clamp(24px, 6vw, 96px);
  padding-block: clamp(40px, 6vw, 80px); align-items: center;
}
.about-intro__img {
  width: 100%; border-radius: var(--radius); aspect-ratio: 3 / 4; object-fit: cover;
  filter: grayscale(0); transition: filter .8s ease-out;
}
.about-intro__img:hover { filter: grayscale(.99); }
.about-intro__text { color: var(--accent); font-family: var(--font-display); text-transform: uppercase; font-size: clamp(1.05rem, 1.6vw, 1.4rem); line-height: 1.55; }
.about-intro__text p + p { margin-top: 1.2em; }
.about-intro__hello { font-size: 1.2em; margin-bottom: .2em; }
@media (max-width: 760px) { .about-intro { grid-template-columns: 1fr; } .about-intro__img { max-width: 420px; } }

.list-block {
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 3fr); gap: 16px 24px;
  padding-block: clamp(40px, 5vw, 72px); border-top: 1px solid var(--line);
}
.list-block__label { font-size: clamp(1.2rem, 1.6vw, 1.5rem); font-weight: 400; color: var(--muted); }
@media (max-width: 760px) { .list-block { grid-template-columns: 1fr; } }
.numbered, .edu { list-style: none; margin: 0; padding: 0; }
.numbered li { display: flex; justify-content: space-between; gap: 16px; padding-block: 12px; border-bottom: 1px solid transparent; }
.num { font-family: var(--font-mono); color: var(--ink-soft); white-space: nowrap; }
.edu li { display: grid; grid-template-columns: 1fr auto; gap: 2px 24px; padding-block: 14px; }
.edu__detail { grid-column: 1 / -1; color: var(--muted); font-size: .9rem; }
.edu__school { font-size: clamp(1.1rem, 1.5vw, 1.4rem); }
.edu .num { align-self: end; }
.cv a { font-size: clamp(1.1rem, 1.5vw, 1.4rem); text-decoration: underline; text-underline-offset: 4px; }

/* ---------- Playground ---------- */
/* Left: sticky title + short intro. Right: masonry of works without explanations. */
.pg {
  display: grid; grid-template-columns: minmax(240px, 1fr) minmax(0, 3fr); gap: clamp(24px, 3vw, 48px);
  padding-block: clamp(32px, 4vw, 56px) clamp(48px, 8vw, 120px);
}
.pg__side { container-type: inline-size; align-self: stretch; }
.pg__sticky {
  position: sticky; top: 96px;
  /* as tall as the visible area – but never taller than the grid next to it */
  height: min(calc(100svh - 136px), 100%); min-height: 320px;
  display: flex; flex-direction: column; justify-content: space-between; gap: 32px;
}
.pg__title { display: grid; font-size: clamp(2rem, 14cqi, 5rem); font-weight: 400; }
.pg__intro { max-width: 24rem; font-size: 1rem; line-height: 1.5; }
.pg__grid { columns: 3 220px; column-gap: clamp(12px, 1.4vw, 20px); }
.pg__item {
  margin: 0 0 clamp(12px, 1.4vw, 20px); break-inside: avoid;
  border-radius: var(--radius); overflow: hidden; background: #dcdcdc;
}
.pg__item img, .pg__item video { width: 100%; transition: transform 1.2s var(--ease); }
.pg__item:hover img, .pg__item:hover video { transform: scale(1.03); }
@media (max-width: 760px) {
  .pg { grid-template-columns: 1fr; }
  .pg__sticky { position: static; height: auto; min-height: 0; }
  .pg__title { font-size: clamp(2rem, 13cqi, 4rem); }
  .pg__grid { columns: 2 140px; }
}

/* ---------- Footer ---------- */
.footer {
  display: flex; justify-content: space-between; align-items: flex-start; flex-wrap: wrap; gap: 24px;
  padding-block: clamp(48px, 6vw, 80px);
  font-size: .95rem;
}
.footer__meta { color: var(--muted-2); line-height: 1.6; }
.footer__links { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.footer__links a:hover { color: var(--accent); }
.footer__links span { display: inline-block; transition: transform .3s var(--ease); }
.footer__links a:hover span { transform: translateX(4px); }

/* ---------- Custom cursor (mouse only) ---------- */
.cursor { display: none; }
@media (hover: hover) and (pointer: fine) {
  .cursor {
    display: block; position: fixed; left: 0; top: 0; z-index: 100; pointer-events: none;
    width: 14px; height: 14px; margin: -7px 0 0 -7px; border-radius: 50%;
    background: #fff; mix-blend-mode: difference;
    opacity: 0; transition: opacity .3s, width .3s var(--ease), height .3s var(--ease), margin .3s var(--ease);
  }
  .cursor.is-visible { opacity: 1; }
  .cursor.is-link { width: 44px; height: 44px; margin: -22px 0 0 -22px; }
}

/* ---------- Page transition curtain ---------- */
.pt {
  position: fixed; inset: 0; z-index: 90; pointer-events: none;
  display: grid; place-items: center; padding: var(--gutter);
  background: #070707; color: #fcfcfc;
  transform: translateY(100%); visibility: hidden;
}
.pt__text {
  font-family: var(--font-display); text-transform: uppercase; text-align: center;
  font-size: clamp(2.6rem, 9vw, 8.5rem); line-height: 1.2;
  opacity: 0; transform: translateY(24px);
}
/* leaving the page: curtain slides up from the bottom, then the word appears */
.pt-out .pt { visibility: visible; transform: none; transition: transform .6s cubic-bezier(.76, 0, .24, 1); }
.pt-out .pt__text { opacity: 1; transform: none; transition: opacity .4s .25s, transform .6s .2s var(--ease); }
/* arriving: curtain is already closed (set in <head>) … */
.pt-in .pt { visibility: visible; transform: none; }
.pt-in .pt__text { opacity: 1; transform: none; }
/* … and slides away upwards */
/* (visibility switches to hidden only after the slide has finished) */
.pt-reveal .pt { visibility: hidden; transform: translateY(-100%); transition: transform .8s .35s cubic-bezier(.76, 0, .24, 1), visibility 0s 1.15s; }
.pt-reveal .pt__text { opacity: 0; transform: translateY(-24px); transition: opacity .35s, transform .5s var(--ease); }
@media (prefers-reduced-motion: reduce) { .pt { display: none; } }

/* Link to the home page ("Isabell Kaletka"): red name on a white curtain */
.pt.pt--home { background: #fff; color: var(--accent); }

/* Playground items and gallery images open in the lightbox */
[data-lightbox] { cursor: zoom-in; }
[data-lightbox]:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }

/* ---------- Lightbox ---------- */
.lightbox {
  position: fixed; inset: 0; z-index: 95;
  display: grid; grid-template-rows: minmax(0, 1fr) auto; place-items: center;
  padding: clamp(56px, 7vw, 88px) clamp(16px, 7vw, 104px) clamp(20px, 3vw, 32px);
  background: #0b0b0b; color: #fff;
  opacity: 0; transition: opacity .25s var(--ease);
}
.lightbox.is-open { opacity: 1; }
.lightbox[hidden] { display: none; }
.lightbox__stage { width: 100%; height: 100%; min-height: 0; display: grid; place-items: center; }
.lightbox__stage img, .lightbox__stage video {
  max-width: 100%; max-height: calc(100svh - clamp(56px, 7vw, 88px) - 90px); width: auto; height: auto; border-radius: var(--radius); object-fit: contain;
  transform: scale(.98); transition: transform .35s var(--ease);
}
.lightbox.is-open .lightbox__stage img, .lightbox.is-open .lightbox__stage video { transform: none; }
.lightbox__caption { margin-top: 14px; font-size: .95rem; color: #d6d6d6; }
.lightbox__btn {
  position: absolute; width: 48px; height: 48px; padding: 0; border: 0; border-radius: 50%;
  display: grid; place-items: center; cursor: pointer;
  background: rgba(255, 255, 255, .1); color: #fff; transition: background .2s;
}
.lightbox__btn:hover { background: rgba(255, 255, 255, .22); }
.lightbox__btn[hidden] { display: none; }
.lightbox__close { top: 16px; right: 16px; }
.lightbox__prev { left: 16px; top: 50%; margin-top: -24px; }
.lightbox__next { right: 16px; top: 50%; margin-top: -24px; }
.lightbox__count { position: absolute; left: 20px; top: 28px; font-family: var(--font-mono); font-size: 13px; color: #bbb; }
.lightbox-open body { overflow: hidden; }
@media (max-width: 600px) { .lightbox__prev, .lightbox__next { top: auto; bottom: 12px; margin-top: 0; } }

.pt-out .pt.pt--home { transition-duration: .8s; }
.pt-out .pt.pt--home .pt__text { transition: opacity .5s .35s, transform .7s .3s var(--ease); }

/* very small phones: big link rows wrap instead of overflowing */
@media (max-width: 420px) {
  .row-link { flex-wrap: wrap; gap: 4px 16px; }
  .row-link__title { font-size: clamp(1.8rem, 10vw, 2.4rem); }
}

/* ---------- 404 ---------- */
.notfound { min-height: 60vh; padding-block: clamp(64px, 10vw, 140px); }
.notfound__title { font-size: clamp(5rem, 20vw, 14rem); line-height: 1; }
.notfound__text { margin-top: 24px; font-size: clamp(1.1rem, 1.6vw, 1.4rem); line-height: 1.6; }
.notfound__links { display: flex; flex-wrap: wrap; gap: 12px; }
.notfound__links .pill { margin-top: 24px; }
