:root {
  --black: #0a0a0a;
  --white: #ffffff;
  --grey: #6b6b6b;
  --line: #e6e6e6;
  --pad: clamp(20px, 4vw, 56px);
  --star-cursor: url("data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg' width='25' height='25' viewBox='0 0 24 24'><path d='M12 2 L13.82 9.49 L21.51 8.91 L14.95 12.96 L17.88 20.09 L12 15.1 L6.12 20.09 L9.05 12.96 L2.49 8.91 L10.18 9.49 Z' fill='%23ffffff' fill-opacity='0.15' stroke='%23111111' stroke-width='1.1' stroke-linejoin='miter' stroke-miterlimit='10'/></svg>") 13 13, auto;
}

* { box-sizing: border-box; margin: 0; padding: 0; cursor: var(--star-cursor); }

.rainbow-canvas {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 9999;
}

html, body {
  height: 100%;
  overflow: hidden;                 /* no scroll */
}

body {
  background: var(--white);
  color: var(--black);
  font-family: "Inter", system-ui, sans-serif;
  font-weight: 300;
  -webkit-font-smoothing: antialiased;
}

/* ---------- Layout frame ---------- */
.frame {
  height: 100vh;
  height: 100dvh;
  display: flex;
  flex-direction: column;
  padding: 0 var(--pad);
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: clamp(18px, 3vh, 34px) 0;
  border-bottom: 1px solid var(--line);
  font-family: "Alte Haas Grotesk", "Inter", sans-serif;
}

.brand {
  font-family: "Alte Haas Grotesk", "Inter", sans-serif;
  font-weight: 400;
  font-size: clamp(14px, 1.35vw, 17px);
  letter-spacing: 0;
  text-transform: none;
  color: var(--black);
  text-decoration: none;
  white-space: nowrap;
  transition: opacity .25s ease;
}
.brand:hover { opacity: .55; }

.menu {
  display: flex;
  gap: clamp(18px, 3vw, 44px);
}

.menu a {
  position: relative;
  font-size: 13px;
  letter-spacing: .12em;
  text-transform: uppercase;
  text-decoration: none;
  color: var(--grey);
  padding-bottom: 4px;
  transition: color .25s ease;
}

.menu a::after {
  content: "";
  position: absolute;
  left: 0; bottom: 0;
  width: 100%;
  height: 1px;
  background: var(--black);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform .3s ease;
}

.menu a:hover { color: var(--black); }
.menu a.active { color: var(--black); }
.menu a.active::after { transform: scaleX(1); }

.menu-cv { letter-spacing: .06em; }

/* ---------- Stage / pages ---------- */
.stage {
  flex: 1 1 auto;
  position: relative;
  min-height: 0;
}

.page {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transform: scale(1.02);
  transition: opacity .7s ease, transform .9s cubic-bezier(.22, 1, .36, 1), visibility .7s;
}

.page.is-active {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transform: none;
}

@media (prefers-reduced-motion: reduce) {
  .page {
    transform: none;
    transition: opacity .25s ease, visibility .25s;
  }
}

.eyebrow {
  font-size: 12px;
  letter-spacing: .22em;
  text-transform: uppercase;
  color: var(--grey);
  margin-bottom: 18px;
}

.lead {
  font-family: "Alte Haas Grotesk", "Inter", sans-serif;
  font-weight: 700;
  line-height: 1;
  letter-spacing: -.02em;
  font-size: clamp(34px, 5.2vw, 68px);
  text-wrap: balance;
}

/* Katarina's name — Alte Haas Grotesk (does not affect project titles) */
.name-lead {
  font-family: "Alte Haas Grotesk", "Inter", sans-serif;
  font-weight: 700;
  letter-spacing: -.02em;
}

.meta-line {
  margin-top: 16px;
  color: var(--grey);
  font-size: 13.5px;
  letter-spacing: .03em;
}

/* ---------- Home: fullscreen reel background ---------- */
.page--reel { display: block; padding: 0; }

/* The reel covers the whole viewport (behind the header/footer). It is only
   visible when Home is active; the iframe is sized by JS to cover (crop). */
#reel-bg {
  position: fixed;
  inset: 0;
  width: 100vw;
  height: 100vh;
  height: 100dvh;
  overflow: hidden;
  background: #000;
  z-index: -1;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity .6s ease, visibility .6s;
}
body.home-active #reel-bg {
  opacity: 1;
  visibility: visible;
}
#reel-bg iframe {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  border: 0;
  display: block;
}
/* Soft scrims top & bottom so the overlaid text stays legible. */
#reel-bg::before,
#reel-bg::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  height: 130px;
  pointer-events: none;
  z-index: 1;
}
#reel-bg::before { top: 0; background: linear-gradient(180deg, rgba(0, 0, 0, .5), rgba(0, 0, 0, 0)); }
#reel-bg::after { bottom: 0; background: linear-gradient(0deg, rgba(0, 0, 0, .5), rgba(0, 0, 0, 0)); }

/* On Home, lift the header/footer above the reel and switch text to white. */
body.home-active .topbar,
body.home-active .botbar {
  border-color: transparent;
  text-shadow: 0 1px 12px rgba(0, 0, 0, .55);
}
body.home-active .brand { color: #fff; }
body.home-active .menu a { color: rgba(255, 255, 255, .82); }
body.home-active .menu a:hover,
body.home-active .menu a.active { color: #fff; }
body.home-active .menu a::after { background: #fff; }
body.home-active .botbar { color: rgba(255, 255, 255, .85); }

/* Sound toggle for the reel (Home only). It sits down on the footer line,
   its centre level with the copyright in the opposite corner: the footer's
   own padding, plus half that line, less half the button. The max() keeps
   it off the bottom edge on short viewports, where the footer padding
   clamps down below the button's own height. */
.reel-sound {
  position: fixed;
  right: var(--pad);
  bottom: max(6px, calc(clamp(14px, 2.4vh, 24px) + 7px - 22px));
  z-index: 5;
  width: 44px;
  height: 44px;
  display: none;
  place-items: center;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, .55);
  background: rgba(0, 0, 0, .35);
  color: #fff;
  cursor: pointer;
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  transition: background .2s ease, transform .2s ease;
}
body.home-active .reel-sound { display: grid; }
.reel-sound:hover { background: rgba(0, 0, 0, .6); }
.reel-sound:active { transform: scale(.94); }
.reel-sound svg { display: block; }
.reel-sound.is-muted .ic-sound { display: none; }
.reel-sound:not(.is-muted) .ic-muted { display: none; }

/* ---------- About content column ---------- */
.about-content .lead { font-size: clamp(28px, 3.4vw, 44px); }
.about-content .meta-line { margin-bottom: clamp(18px, 3vh, 26px); }
.about-content .about-text { margin-bottom: 16px; }
.about-content .contact { margin-top: clamp(14px, 2.5vh, 22px); }

/* ---------- Home ---------- */
.home-grid {
  width: 100%;
  display: grid;
  grid-template-columns: minmax(0, 0.85fr) minmax(0, 1.15fr);
  gap: clamp(28px, 5vw, 72px);
  align-items: center;
}

/* The single photograph on About: a 2:3 frame it fills edge to edge. */
.portrait {
  position: relative;
  width: min(100%, 420px);
  aspect-ratio: 2 / 3;
  max-height: min(78vh, 640px);
  margin: 0 auto;
  background: transparent;
  overflow: hidden;
}

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

.cv .lead { margin-bottom: 0; }

.intro {
  max-width: 46ch;
  color: #2a2a2a;
  font-size: clamp(14px, 1.2vw, 16px);
  line-height: 1.6;
  margin: clamp(20px, 3vh, 30px) 0 clamp(22px, 3.5vh, 34px);
}

.cv-cols {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(20px, 3vw, 48px);
  margin-bottom: clamp(18px, 3vh, 30px);
}

.cv-block h2 {
  font-family: "Inter", sans-serif;
  font-weight: 500;
  font-size: 12px;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--black);
  padding-bottom: 10px;
  margin-bottom: 12px;
  border-bottom: 1px solid var(--line);
}

.cv-block ul { list-style: none; }

.cv-block li {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 6px 0;
  font-size: 14px;
}

.cv-block li span { color: var(--black); }
.cv-block li em {
  font-style: normal;
  color: var(--grey);
  font-size: 12.5px;
  letter-spacing: .02em;
}

/* Film titles are set in italics wherever they appear in running text.
   (.cv-row .desc em is reset to upright for notes like "(upcoming)",
   so the title class restores the italics there.) */
.film,
.cv-row .desc .film { font-style: italic; }
.cv-row .desc .film { color: inherit; }

.contact {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 22px;
}
.contact a {
  font-size: 13px;
  letter-spacing: .04em;
  color: var(--black);
  text-decoration: none;
  border-bottom: 1px solid var(--black);
  padding-bottom: 2px;
}
.contact a:hover { color: var(--grey); border-color: var(--grey); }

/* ---------- About ---------- */
.about-wrap { max-width: 640px; }
.about-wrap .lead { margin-bottom: 26px; }
.about-text {
  color: #2a2a2a;
  font-size: clamp(15px, 1.3vw, 17px);
  line-height: 1.7;
  margin-bottom: 18px;
  max-width: 58ch;
}
.about-wrap .contact { margin-top: 12px; }

/* ---------- Works ---------- */
.page--works { justify-content: center; }
/* The column itself is centred (as on CV); the text inside stays left-aligned. */
.works-wrap { width: 100%; max-width: 900px; margin: 0 auto; }
.works-wrap .eyebrow { margin-bottom: 8px; }
.works-sub {
  font-family: "Cormorant Garamond", serif;
  font-size: clamp(24px, 3vw, 36px);
  margin-bottom: clamp(18px, 3vh, 30px);
}
.w-tag {
  font-family: "Inter", sans-serif;
  font-size: 10.5px;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--grey);
  vertical-align: middle;
  margin-left: 8px;
}

.works-list { list-style: none; }
.works-list li {
  display: grid;
  grid-template-columns: 1fr auto auto;
  align-items: baseline;
  gap: 20px;
  padding: clamp(14px, 2.4vh, 22px) 0;
  border-top: 1px solid var(--line);
}

.w-title {
  font-family: "Alte Haas Grotesk", "Inter", sans-serif;
  font-weight: 700;
  letter-spacing: -.01em;
  font-size: clamp(20px, 2.6vw, 30px);
}
.w-meta {
  color: var(--grey);
  font-size: 13px;
  letter-spacing: .03em;
}
.w-year {
  color: var(--black);
  font-size: 13px;
  letter-spacing: .05em;
}

/* ---------- CV (scrollable panel) ---------- */
.page--cv {
  display: block;
  align-items: initial;
  overflow-y: auto;
  scrollbar-width: thin;
}
.cv-page {
  max-width: 820px;
  margin: 0 auto;
  padding: clamp(24px, 5vh, 52px) 0 clamp(40px, 8vh, 80px);
}
.cv-figure { width: 100%; margin-bottom: clamp(22px, 3.5vh, 36px); background: #f2f2f2; }
.cv-figure img { width: 100%; height: auto; display: block; filter: grayscale(100%); }

.cv-head { margin-bottom: clamp(26px, 4vh, 44px); }
.cv-head .lead { font-size: clamp(28px, 3.6vw, 44px); }
.cv-head .eyebrow { margin-bottom: 14px; }

.cv-section { margin-bottom: clamp(22px, 3.5vh, 34px); }
.cv-section h2 {
  font-family: "Inter", sans-serif;
  font-weight: 500;
  font-size: 12px;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--black);
  padding-bottom: 10px;
  margin-bottom: 12px;
  border-bottom: 1px solid var(--line);
}
.cv-note {
  font-size: 12px;
  letter-spacing: .04em;
  color: var(--grey);
  margin-bottom: 8px;
}
.cv-row {
  display: grid;
  grid-template-columns: 96px 1fr;
  gap: 6px 18px;
  padding: 5px 0;
  font-size: 14px;
  line-height: 1.5;
  align-items: baseline;
}
.cv-row .yr {
  color: var(--grey);
  font-size: 13px;
  letter-spacing: .02em;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
.cv-row .desc { color: #2a2a2a; }
.cv-row .desc em { font-style: normal; color: var(--grey); }
.cv-row .desc a {
  color: inherit;
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
  transition: color .2s ease;
}
.cv-row .desc a:hover { color: var(--grey); }
.cv-contact { margin-top: clamp(24px, 4vh, 40px); }

/* ---------- Works: clickable rows ---------- */
.works-list li.has-page { display: block; padding: 0; }
.work-link {
  display: grid;
  grid-template-columns: 1fr auto auto;
  align-items: baseline;
  gap: 20px;
  padding: clamp(14px, 2.4vh, 22px) 0;
  text-decoration: none;
  color: inherit;
}
.has-page .w-title::after {
  content: " \2192";
  color: var(--grey);
  opacity: 0;
  transition: opacity .25s ease;
}
.work-link:hover .w-title { color: var(--grey); }
.work-link:hover .w-title::after { opacity: 1; }

/* ---------- Project detail pages (scrollable panel) ---------- */
.page--project {
  display: block;
  align-items: initial;
  overflow-y: auto;
  scrollbar-width: thin;
}
.project {
  max-width: 1000px;
  margin: 0 auto;
  padding: clamp(18px, 3.5vh, 40px) 0 clamp(40px, 8vh, 80px);
}
.back {
  display: inline-block;
  font-size: 12px;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--grey);
  text-decoration: none;
  margin-bottom: clamp(16px, 3vh, 28px);
}
.back:hover { color: var(--black); }
.project-head { margin-bottom: clamp(20px, 3vh, 32px); }
.project-head .lead { font-size: clamp(30px, 4vw, 52px); }
.project-head .meta-line { margin-top: 12px; }

.project-top {
  display: grid;
  grid-template-columns: minmax(0, 0.82fr) minmax(0, 1.18fr);
  gap: clamp(24px, 4vw, 56px);
  align-items: start;
  margin-bottom: clamp(26px, 4vh, 44px);
}
.project-poster { background: #f2f2f2; }
.project-poster img { width: 100%; height: auto; display: block; }

/* Video embed */
.video-embed {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  background: #000;
  margin-bottom: clamp(24px, 4vh, 44px);
}
.video-embed iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

/* Slideshow */
.slider {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  background: #000;
  overflow: hidden;
  margin-bottom: clamp(24px, 4vh, 44px);
}
.slides { display: flex; height: 100%; transition: transform .55s cubic-bezier(.4, 0, .2, 1); }
.slide { min-width: 100%; height: 100%; }
.slide img { width: 100%; height: 100%; object-fit: cover; display: block; }
/* Minimal arrows: a bare chevron over the still, no button chrome. */
.s-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 32px;
  height: 44px;
  padding: 0;
  border: none;
  background: none;
  color: #fff;
  font-size: 26px;
  font-weight: 300;
  line-height: 1;
  display: grid;
  place-items: center;
  cursor: pointer;
  opacity: .5;
  text-shadow: 0 1px 8px rgba(0, 0, 0, .5);
  transition: opacity .2s ease;
}
.s-nav:hover { opacity: 1; }
.s-prev { left: 4px; }
.s-next { right: 4px; }
.dots {
  position: absolute;
  bottom: 14px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 8px;
}
.dot {
  width: 7px;
  height: 7px;
  padding: 0;
  border: none;
  border-radius: 50%;
  background: rgba(255, 255, 255, .5);
  cursor: pointer;
  transition: background .2s ease;
}
.dot.active { background: #fff; }

.synopsis {
  font-size: clamp(15px, 1.3vw, 17px);
  line-height: 1.7;
  color: #2a2a2a;
  margin-bottom: 14px;
  max-width: 54ch;
}
.request {
  font-size: 13px;
  color: var(--grey);
  font-style: italic;
  margin-bottom: clamp(18px, 3vh, 28px);
}

.cred { display: flex; flex-direction: column; gap: 9px; }
.cred-row {
  display: grid;
  grid-template-columns: 160px 1fr;
  gap: 4px 16px;
  font-size: 14px;
  line-height: 1.5;
  align-items: baseline;
}
.cred-row .role {
  color: var(--grey);
  font-size: 12.5px;
  letter-spacing: .02em;
}
.cred-row .name { color: var(--black); }

.project-sections {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: clamp(22px, 3vw, 44px) clamp(24px, 4vw, 56px);
  padding-top: clamp(20px, 3.5vh, 36px);
  border-top: 1px solid var(--line);
}
.proj-section h2 {
  font-family: "Inter", sans-serif;
  font-weight: 500;
  font-size: 12px;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--black);
  padding-bottom: 10px;
  margin-bottom: 12px;
  border-bottom: 1px solid var(--line);
}
.proj-section ul { list-style: none; }
.proj-section li {
  font-size: 13.5px;
  line-height: 1.5;
  color: #2a2a2a;
  padding: 4px 0;
}
.proj-section li .yr { color: var(--grey); font-variant-numeric: tabular-nums; }
/* Links in these lists read the same way as the ones on the CV */
.proj-section li a {
  color: inherit;
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
  transition: color .2s ease;
}
.proj-section li a:hover { color: var(--grey); }
.proj-thanks { font-size: 13px; line-height: 1.7; color: #3a3a3a; }
.proj-thanks .lbl { color: var(--grey); }

@media (max-width: 820px) {
  .page--project { overflow-y: visible; }
  .page--project.is-active { display: block; }
  .project-top { grid-template-columns: 1fr; gap: 24px; }
  .cred-row { grid-template-columns: 130px 1fr; }
}

/* ---------- Footer ---------- */
/* The footer carries the name the same way the top left does:
   sentence case, same font, nothing bold. */
.botbar {
  display: flex;
  justify-content: space-between;
  padding: clamp(14px, 2.4vh, 24px) 0;
  border-top: 1px solid var(--line);
  font-family: "Alte Haas Grotesk", "Inter", sans-serif;
  font-weight: 400;
  font-size: 12px;
  letter-spacing: .02em;
  text-transform: none;
  color: var(--grey);
}

/* ---------- Responsive ---------- */
@media (max-width: 820px) {
  html, body { overflow: auto; }
  .frame { height: auto; min-height: 100dvh; }
  .topbar { flex-direction: column; gap: 14px; align-items: flex-start; }
  .stage { position: static; }
  .page {
    position: static;
    opacity: 1; visibility: visible; pointer-events: auto;
    transform: none;
    display: none;
    padding: clamp(28px, 6vh, 48px) 0;
  }
  .page.is-active { display: flex; }
  .page--cv { overflow-y: visible; }
  .page--cv.is-active { display: block; }
  .cv-page { padding-top: 8px; }
  .page--reel.is-active { display: block; }
  .home-grid { grid-template-columns: 1fr; gap: 28px; }
  .portrait { max-height: 60vh; }
  .cv-cols { grid-template-columns: 1fr 1fr; }
  .works-list li,
  .work-link { grid-template-columns: 1fr auto; }
  .w-meta { grid-column: 1 / -1; order: 3; }
}

@media (max-width: 460px) {
  .cv-cols { grid-template-columns: 1fr; }
}
