/* =========================================================
   TANYEL ALTAN — Portfolio
   editorial · typographic · quiet
   ========================================================= */

@font-face {
  font-family: "Pecita";
  src: url("./assets/fonts/Pecita.otf") format("opentype");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

:root {
  --bg: #FBF5EC;
  --ink: #1A1A1A;
  --ink-soft: #4F4640;
  --ink-mute: #8A7F77;
  --accent: #E8552F;
  --accent-soft: #FCE0D5;
  --rule: #E9DFCF;
  --card: #F5EBD9;
  --shadow: 0 30px 60px -30px rgba(40, 22, 12, 0.18);
  --easing: cubic-bezier(0.22, 1, 0.36, 1);

  --display: "Paytone One", "Archivo Black", system-ui, sans-serif;
  --body: "Jost", system-ui, -apple-system, sans-serif;
  --script: "Pecita", "Caveat", "Shadows Into Light", cursive;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--body);
  font-weight: 400;
  font-size: 16px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
  cursor: none;
  transition: background-color 0.6s var(--easing);
}

/* once we scroll past the hero, return to standard cursor everywhere */
body.is-past-hero { cursor: auto; }
body.is-past-hero #cursor,
body.is-past-hero #scribble { display: none !important; }
body.is-past-hero button,
body.is-past-hero a,
body.is-past-hero .project__media { cursor: pointer; }

@media (pointer: coarse), (max-width: 820px) {
  body { cursor: auto; }
  .cursor { display: none !important; }
  #scribble { display: none !important; }
}

img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button {
  font-family: inherit;
  font-size: inherit;
  font-weight: 400;
  cursor: none;
}
body.is-past-hero button { cursor: pointer; }

::selection {
  background: var(--accent);
  color: var(--bg);
}

/* ---------- CURSOR ---------- */
.cursor {
  position: fixed;
  top: 0; left: 0;
  pointer-events: none;
  z-index: 9999;
  mix-blend-mode: multiply;
  opacity: 0;
  transition: opacity 0.2s;
}
.cursor.is-ready { opacity: 1; }
.cursor__dot,
.cursor__ring {
  position: fixed;
  top: 0; left: 0;
  border-radius: 999px;
  transform: translate(-50%, -50%);
  pointer-events: none;
  transition: width 0.25s var(--easing),
              height 0.25s var(--easing);
}
.cursor__dot {
  width: 8px; height: 8px;
  background: var(--accent);
}
.cursor__ring {
  width: 38px; height: 38px;
  border: 1.5px solid var(--accent);
}
.cursor.is-hover .cursor__ring { width: 56px; height: 56px; }
.cursor.is-hover .cursor__dot  { width: 4px; height: 4px; }

/* ---------- SCRIBBLE ---------- */
#scribble {
  position: fixed;
  inset: 0;
  width: 100vw;
  height: 100vh;
  pointer-events: none;
  z-index: 1;
}

/* ---------- NAV ---------- */
.nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px clamp(20px, 4vw, 56px);
  z-index: 1020;
  transition: backdrop-filter 0.3s, background-color 0.3s;
}
body.modal-open .nav {
  background: transparent;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
}
body.modal-open .nav__logo,
body.modal-open .nav__links a {
  color: var(--ink);
  text-shadow: 0 1px 14px rgba(255, 255, 255, 0.45);
}
/* Securva and ADHD have darker/typography heroes — light nav text */
body.modal-project-securva .nav__logo,
body.modal-project-securva .nav__links a {
  color: var(--bg);
  text-shadow: 0 1px 16px rgba(0, 0, 0, 0.4);
}
body.modal-scrolled.modal-project-securva .nav__logo,
body.modal-scrolled.modal-project-securva .nav__links a {
  color: var(--ink);
  text-shadow: none;
}
/* Mobile: hero images are mostly light — make nav text + burger dark */
@media (max-width: 760px) {
  body.modal-open .nav__logo,
  body.modal-open .nav__links a {
    color: var(--ink);
    text-shadow: 0 1px 14px rgba(255, 255, 255, 0.55);
  }
  body.modal-open .nav__burger span {
    background: var(--ink);
  }
  /* Securva exception: white nav over hero (like desktop), dark after scroll */
  body.modal-project-securva:not(.modal-scrolled) .nav__logo,
  body.modal-project-securva:not(.modal-scrolled) .nav__links a {
    color: var(--bg);
    text-shadow: 0 1px 16px rgba(0, 0, 0, 0.45);
  }
  body.modal-project-securva:not(.modal-scrolled) .nav__burger span {
    background: var(--bg);
  }
  body.modal-scrolled.modal-project-securva .nav__logo,
  body.modal-scrolled.modal-project-securva .nav__links a {
    color: var(--ink);
    text-shadow: none;
  }
  body.modal-scrolled.modal-project-securva .nav__burger span {
    background: var(--ink);
  }
}
body.modal-scrolled .nav {
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
}
body.modal-scrolled .nav__logo,
body.modal-scrolled .nav__links a {
  color: var(--ink);
  text-shadow: none;
}
body.modal-open .nav__cta { display: none; }
.nav.is-scrolled {
  background: color-mix(in srgb, var(--bg) 82%, transparent);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
}
.nav__logo {
  font-size: 15px;
  letter-spacing: -0.01em;
  font-weight: 400;
}
.nav__links {
  display: flex;
  gap: 28px;
  font-size: 15px;
}
.nav__links a {
  position: relative;
  padding: 6px 0;
  transition: color 0.2s var(--easing);
}
.nav__links a::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  width: 0;
  height: 1px;
  background: var(--accent);
  transition: width 0.3s var(--easing);
}
.nav__links a:hover { color: var(--accent); }
.nav__links a:hover::after { width: 100%; }

.nav__cta {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--ink);
  color: var(--bg);
  padding: 10px 18px;
  border-radius: 999px;
  font-size: 15px;
  transition: background-color 0.25s;
}
.nav__cta:hover { background: var(--accent); }
.nav__cta-arrow {
  display: inline-block;
  transition: transform 0.3s var(--easing);
}
.nav__cta:hover .nav__cta-arrow { transform: translate(2px, -2px); }

@media (max-width: 760px) {
  .nav__links { display: none; }
}

/* ---------- BURGER / MOBILE MENU ---------- */
.nav__burger {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 40px;
  height: 40px;
  padding: 0;
  background: transparent;
  border: 0;
  cursor: pointer;
  z-index: 110;
}
.nav__burger span {
  display: block;
  width: 22px;
  height: 2px;
  margin: 0 auto;
  background: var(--bg);
  border-radius: 2px;
  transition: transform 0.3s var(--easing), opacity 0.3s var(--easing), background-color 0.3s;
}
body.is-past-hero .nav__burger span { background: var(--ink); }
.nav__burger.is-open span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
  width: 24px;
}
.nav__burger.is-open span:nth-child(2) {
  opacity: 0;
  transform: scaleX(0);
}
.nav__burger.is-open span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
  width: 24px;
}

.mobile-menu {
  position: fixed;
  inset: 0;
  background: var(--accent);
  z-index: 105;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.4s var(--easing);
}
.mobile-menu[hidden] { display: none; }
.mobile-menu.is-open {
  opacity: 1;
  pointer-events: auto;
}
.mobile-menu__close {
  display: none;
}
.mobile-menu__links {
  display: flex;
  flex-direction: column;
  gap: 28px;
  align-items: center;
  text-align: center;
}
.mobile-menu__links a {
  font-family: var(--body);
  font-size: 32px;
  color: var(--bg);
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.5s var(--easing), transform 0.5s var(--easing), color 0.2s;
}
.mobile-menu.is-open .mobile-menu__links a {
  opacity: 1;
  transform: none;
}
.mobile-menu.is-open .mobile-menu__links a:nth-child(1) { transition-delay: 0.1s; }
.mobile-menu.is-open .mobile-menu__links a:nth-child(2) { transition-delay: 0.18s; }
.mobile-menu.is-open .mobile-menu__links a:nth-child(3) { transition-delay: 0.26s; }
.mobile-menu.is-open .mobile-menu__links a:nth-child(4) { transition-delay: 0.34s; }
.mobile-menu__links a:hover { color: var(--ink); }

/* ---------- COMMON ---------- */
.section-title {
  font-family: var(--display);
  font-weight: 400;
  font-size: clamp(56px, 11vw, 160px);
  line-height: 0.95;
  letter-spacing: -0.02em;
  margin: 0;
  color: var(--accent);
  text-align: left;
  text-transform: uppercase;
}

/* ---------- HERO ---------- */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  padding: 140px clamp(20px, 5vw, 80px) 80px;
  overflow: hidden;
  will-change: opacity, transform;
}
.hero__inner {
  position: relative;
  z-index: 2;
  width: 100%;
  max-width: 1400px;
  margin: 0 auto;
}
.hero__kicker {
  margin: 0 0 28px;
  font-size: 13px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--ink-mute);
}
.hero__title {
  font-family: var(--display);
  font-weight: 400;
  font-size: clamp(72px, 16vw, 240px);
  line-height: 0.88;
  letter-spacing: -0.04em;
  margin: 0;
  color: var(--accent);
  text-align: left;
  display: flex;
  flex-wrap: wrap;
  max-width: 100%;
}
.hero__title span {
  display: inline-block;
  transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1), color 0.3s var(--easing);
  transform-origin: 50% 100%;
}
.hero__title span:hover {
  transform: translateY(-12px) rotate(-4deg) scale(1.05);
  color: var(--ink);
}
.hero__title span.is-pop {
  animation: letterPop 0.7s cubic-bezier(0.34, 1.56, 0.64, 1) backwards;
}
@keyframes letterPop {
  0%   { transform: translateY(60px) rotate(8deg) scale(0.7); opacity: 0; }
  60%  { transform: translateY(-8px) rotate(-3deg) scale(1.04); opacity: 1; }
  100% { transform: none; opacity: 1; }
}
@keyframes writeIn {
  from { clip-path: inset(0 100% 0 0); }
  to   { clip-path: inset(0 0 0 0); }
}
@keyframes portfolioReveal {
  from { opacity: 0; transform: translateY(28px); }
  to   { opacity: 1; transform: translateY(0); }
}
@keyframes stickerFadeIn {
  from { opacity: 0; }
  to   { opacity: 0.95; }
}
.hero__signature {
  margin: 0;
  font-family: var(--script);
  font-size: clamp(48px, 7vw, 96px);
  color: var(--accent);
  line-height: 1;
  font-weight: 400;
  letter-spacing: 0;
}

/* SVG handwriting — JS measures path length and drives animation */
.hero__signature-svg {
  display: block;
  height: clamp(48px, 7vw, 96px);
  width: auto;
  max-width: 100%;
  overflow: visible;
  visibility: hidden;
}
.hero__signature-svg.is-ready {
  visibility: visible;
}
.hero__signature-svg path {
  fill: var(--accent);
}
.hero__welcome { display: none; }

/* desktop: show WELCOME title, hide mobile PORTFOLIO title */
.hero__title--mobile { display: none; }
.hero__byline {
  margin-top: 24px;
  position: relative;
  z-index: 3;
}
.hero__footer {
  margin-top: clamp(56px, 10vw, 120px);
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 24px;
  flex-wrap: wrap;
  position: relative;
  z-index: 3;
}

.palette.palette--mobile { display: none; }
.palette.palette--desktop { display: flex; }
.hero__scroll {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  padding: 14px 22px;
  border: 1px solid var(--ink);
  border-radius: 999px;
  font-size: 13px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  transition: background-color 0.3s, color 0.3s;
}
.hero__scroll:hover { background: var(--ink); color: var(--bg); }
.hero__scroll-icon {
  display: inline-grid;
  place-items: center;
  width: 18px; height: 18px;
}
.hero__scroll-icon svg { width: 14px; height: 14px; }

.hero__sticker {
  position: absolute;
  color: var(--accent);
  z-index: 1;
  pointer-events: none;
  opacity: 0.85;
  transition: translate 0.6s var(--easing);
}
.hero__sticker--1 {
  top: 14vh; right: 8vw;
  width: clamp(70px, 11vw, 150px);
  animation: spin 22s linear infinite;
}
.hero__sticker--2 {
  bottom: 10vh; right: 36vw;
  width: clamp(60px, 8vw, 110px);
  animation: float 5s var(--easing) infinite alternate;
}
.hero__sticker--3 {
  top: 16vh; left: 30vw;
  width: clamp(110px, 18vw, 260px);
  opacity: 0.3;
  animation: wobble 4s var(--easing) infinite alternate;
}
.hero__sticker--4 {
  display: none;
  bottom: 9vh; right: 6vw;
  width: clamp(60px, 14vw, 100px);
  animation: spin 14s linear infinite reverse;
}
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes float {
  from { transform: translateY(0) rotate(-4deg); }
  to   { transform: translateY(-18px) rotate(4deg); }
}
@keyframes wobble {
  from { transform: rotate(-3deg) translateX(0); }
  to   { transform: rotate(3deg) translateX(20px); }
}

@media (max-width: 760px) {
  .hero__sticker--2 { display: none; }
  .hero__sticker--1, .hero__sticker--3 { opacity: 0.35; }
  .hero__sticker--1 {
    top: 22vh;
    right: 12vw;
    left: auto;
    margin: 0;
  }
  .hero__sticker--3 {
    top: 8vh;
    left: 0;
    right: 0;
    margin: 0 auto;
  }

  .hero__kicker { font-size: 12px; margin: 0 0 8px; }
  .hero__signature { font-size: 20px; }
  .hero__title {
    font-size: 15.4vw;
    flex-wrap: nowrap;
    white-space: nowrap;
  }
  .hero__byline {
    margin-top: 18px;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 40px;
  }
  .palette.palette--mobile { display: none; }
  .palette.palette--desktop { display: none; }
  .hero__footer { justify-content: center; }
}

/* ---------- ABOUT ---------- */
.about {
  padding: clamp(80px, 12vw, 160px) clamp(20px, 5vw, 80px);
  max-width: 1400px;
  margin: 0 auto;
}
.about__head { margin-bottom: 56px; }
.about__body {
  display: grid;
  grid-template-columns: minmax(260px, 1fr) 1.5fr;
  gap: clamp(36px, 6vw, 100px);
  align-items: start;
}
.about__portrait { position: relative; }
.about__portrait-frame {
  position: relative;
  border-radius: 70px;
  overflow: hidden;
  background: #EFE3CC;
  aspect-ratio: 4 / 5;
}
.about__portrait-frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 30%;
}
.about__hello {
  font-family: var(--script);
  font-size: 70px;
  color: var(--accent);
  margin: 0 0 24px;
  line-height: 1;
  font-weight: 400;
}
.about__text p {
  font-size: clamp(15px, 1.15vw, 18px);
  color: var(--ink-soft);
  margin: 0 0 18px;
  max-width: 60ch;
  font-weight: 400;
}
.about__text p:last-child { margin-bottom: 0; }

@media (max-width: 820px) {
  .about__body { grid-template-columns: 1fr; }
  .about__portrait-frame { max-width: 380px; }
}

/* ---------- PALETTE (inside hero) ---------- */
.palette {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
  align-items: center;
}
.swatch {
  width: 32px;
  height: 32px;
  border-radius: 999px;
  border: 0;
  background: var(--c);
  padding: 0;
  position: relative;
  transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.swatch::after {
  content: "";
  position: absolute;
  inset: -4px;
  border: 1.5px solid var(--c);
  border-radius: 999px;
  opacity: 0;
  transition: opacity 0.25s var(--easing);
}
.swatch:hover { transform: scale(1.12) rotate(-6deg); }
.swatch.is-active::after { opacity: 1; }

/* ---------- WORK ---------- */
.work {
  padding: clamp(80px, 12vw, 160px) clamp(20px, 5vw, 80px);
  max-width: 1500px;
  margin: 0 auto;
}
.work__head { margin-bottom: 40px; }
.work__filters {
  display: flex;
  gap: 10px;
  margin-bottom: 56px;
  flex-wrap: wrap;
}
.filter {
  background: transparent;
  border: 1px solid color-mix(in srgb, var(--ink) 18%, transparent);
  color: var(--ink-soft);
  padding: 12px 22px;
  border-radius: 999px;
  font-size: 14px;
  transition: background-color 0.25s var(--easing),
              color 0.25s var(--easing),
              border-color 0.25s var(--easing);
}
.filter:hover {
  border-color: var(--ink);
  color: var(--ink);
}
.filter.is-active {
  background: var(--ink);
  color: var(--bg);
  border-color: var(--ink);
}

.work__grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: clamp(28px, 4vw, 56px) clamp(20px, 3vw, 40px);
}
.project {
  display: grid;
  gap: 16px;
  transition: opacity 0.4s var(--easing);
}
.project.is-hidden { display: none; }
.project__media {
  position: relative;
  aspect-ratio: 210 / 297;
  border-radius: 6px;
  overflow: hidden;
  background: var(--card);
  cursor: none;
  transition: transform 0.4s var(--easing);
}
body.is-past-hero .project__media { cursor: pointer; }
.project__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.6s var(--easing);
}
.project__media:hover img { transform: scale(1.04); }
.project__title {
  font-family: var(--body);
  font-weight: 700;
  font-size: 25px;
  margin: 0;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  color: var(--ink);
}
.project__tag { display: none; }

@media (max-width: 980px) {
  .work__grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 600px) {
  .work__grid { grid-template-columns: 1fr; }
}

/* ---------- CONTACT ---------- */
.contact {
  padding: clamp(80px, 12vw, 160px) clamp(20px, 5vw, 80px);
  max-width: 1400px;
  margin: 0 auto;
  text-align: center;
}
.contact__inner {
  max-width: 1100px;
  margin: 0 auto;
}
.contact .section-title { margin-bottom: 40px; }
.contact__title {
  text-align: center;
  display: block;
}
.contact__title span {
  display: inline-block;
  transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1), color 0.3s var(--easing);
  transform-origin: 50% 100%;
}
.contact__title span:hover {
  transform: translateY(-12px) rotate(-4deg) scale(1.05);
  color: var(--ink);
}
.contact__title span.is-pop {
  animation: letterPop 0.7s cubic-bezier(0.34, 1.56, 0.64, 1) backwards;
}
.contact__cta {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  background: var(--accent);
  color: var(--bg);
  padding: 18px 30px;
  border-radius: 999px;
  font-size: clamp(18px, 1.6vw, 22px);
  font-family: var(--body);
  font-weight: 400;
  letter-spacing: -0.01em;
  transition: background-color 0.3s, transform 0.3s var(--easing);
}
.contact__cta:hover {
  background: var(--ink);
  transform: translateY(-2px);
}
.contact__cta svg {
  width: 22px;
  height: 22px;
  transition: transform 0.3s var(--easing);
}
.contact__cta:hover svg { transform: translateX(4px); }

.contact__list {
  list-style: none;
  margin: 56px auto 0;
  padding: 0;
  max-width: 640px;
  display: grid;
  gap: 0;
}
.contact__list li {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 18px 4px;
  border-top: 1px solid var(--rule);
  font-size: 15px;
}
.contact__list li:last-child { border-bottom: 1px solid var(--rule); }
.contact__list-label {
  font-size: 12px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--ink-mute);
}
.contact__list a { transition: color 0.2s; }
.contact__list a:hover { color: var(--accent); }

/* ---------- CV ---------- */
.cv {
  padding: clamp(80px, 12vw, 140px) clamp(20px, 5vw, 80px);
  max-width: 1400px;
  margin: 0 auto;
}
.cv__head { margin-bottom: 48px; }
.cv__grid {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: 16px;
}
.cv-card {
  background: var(--card);
  border-radius: 16px;
  padding: 28px;
  border: 1px solid var(--rule);
  transition: transform 0.35s var(--easing);
}
.cv-card:hover { transform: translateY(-2px); }
.cv-card__title {
  font-family: var(--body);
  font-size: 16px;
  color: var(--ink);
  margin: 0 0 20px;
  letter-spacing: 0.08em;
  font-weight: 700;
  text-transform: uppercase;
}
.cv-card__list {
  margin: 0;
  padding: 0;
  list-style: none;
  font-size: 14px;
  color: var(--ink-soft);
  display: grid;
  gap: 8px;
}
.cv-card__list li {
  display: grid;
  grid-template-columns: 100px 1fr;
  align-items: center;
  gap: 12px;
}
.cv-card__label {
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-mute);
}

.cv-card--details { grid-column: span 4; }
.cv-card--skills  { grid-column: span 8; }
.cv-card--software{ grid-column: span 4; }
.cv-card--lang    { grid-column: span 4; }
.cv-card--interests{ grid-column: span 4; }
.cv-card--edu     { grid-column: span 4; }
.cv-card--work    { grid-column: span 8; }

@media (max-width: 980px) {
  .cv-card--details,
  .cv-card--skills,
  .cv-card--software,
  .cv-card--lang,
  .cv-card--interests,
  .cv-card--edu,
  .cv-card--work { grid-column: 1 / -1; }
}

.cv-card__pills {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.pill {
  display: inline-flex;
  align-items: center;
  padding: 8px 16px;
  background: var(--bg);
  color: var(--ink);
  border-radius: 999px;
  font-size: 13px;
  border: 1px solid var(--rule);
}
.pill--ghost {
  background: transparent;
  color: var(--ink-soft);
}

.software {
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 10px;
}
.software li {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}
.software li span {
  display: grid;
  place-items: center;
  width: 48px; height: 48px;
  background: var(--ink);
  color: var(--bg);
  font-family: var(--body);
  font-size: 18px;
  font-weight: 700;
  border-radius: 10px;
}
.software li em {
  font-style: normal;
  font-size: 11px;
  color: var(--ink-mute);
  letter-spacing: 0.04em;
}

.lang {
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 12px;
}
.lang li {
  display: grid;
  grid-template-columns: 90px 1fr 50px;
  align-items: center;
  gap: 12px;
  font-size: 14px;
}
.lang__name { color: var(--ink); }
.lang__bar {
  position: relative;
  height: 4px;
  border-radius: 999px;
  background: var(--bg);
  overflow: hidden;
}
.lang__bar i {
  display: block;
  width: var(--w);
  height: 100%;
  background: var(--accent);
  border-radius: 999px;
  transition: width 1.2s var(--easing) 0.2s;
}
.js .lang__bar i { width: 0; }
.js .lang.is-visible .lang__bar i { width: var(--w); }
.lang li em {
  font-style: normal;
  font-size: 12px;
  color: var(--ink-mute);
  text-align: right;
}

.timeline {
  display: grid;
  gap: 14px;
}
.timeline__item {
  position: relative;
  display: grid;
  grid-template-columns: 140px 1fr;
  gap: 16px;
  padding: 12px 0;
  border-top: 1px solid var(--rule);
  font-size: 14px;
}
.timeline__item:first-child {
  border-top: 0;
  padding-top: 0;
}
.timeline__when {
  color: var(--ink-mute);
  font-size: 13px;
}
.timeline__detail {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.timeline__role {
  display: block;
  color: var(--ink);
  margin-bottom: 2px;
}
.timeline__item em {
  font-style: normal;
  color: var(--ink-soft);
  font-size: 13px;
}
.timeline__bullets {
  list-style: disc;
  margin: 2px 0 0;
  padding-left: 18px;
  color: var(--ink-soft);
  font-size: 13px;
}
.timeline__bullets li { margin-bottom: 2px; }

.cv-card--software .lang li {
  grid-template-columns: 110px 1fr;
}
.cv-card--software .lang em { display: none; }

/* ---------- LEGAL PAGE ---------- */
.legal {
  padding: 140px clamp(20px, 5vw, 80px) 80px;
  max-width: 880px;
  margin: 0 auto;
  color: var(--ink-soft);
}
.legal__inner { width: 100%; }
.legal__title {
  font-family: var(--body);
  font-weight: 700;
  font-size: clamp(40px, 7vw, 96px);
  line-height: 0.95;
  letter-spacing: -0.02em;
  color: var(--accent);
  text-transform: uppercase;
  margin: 0 0 32px;
}
.legal__toc {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
  margin: 0 0 56px;
}
.legal__toc a {
  display: inline-flex;
  align-items: center;
  padding: 10px 18px;
  border-radius: 999px;
  border: 1px solid color-mix(in srgb, var(--ink) 18%, transparent);
  font-size: 14px;
  color: var(--ink);
  transition: background-color 0.25s, color 0.25s, border-color 0.25s;
}
.legal__toc a:hover {
  background: var(--ink);
  color: var(--bg);
  border-color: var(--ink);
}
.legal__section {
  margin: 0 0 56px;
  padding-top: 32px;
  border-top: 1px solid var(--rule);
}
.legal__section h2 {
  font-family: var(--body);
  font-weight: 700;
  font-size: clamp(28px, 4vw, 44px);
  letter-spacing: -0.01em;
  color: var(--ink);
  margin: 0 0 24px;
  text-transform: uppercase;
}
.legal__section h3 {
  font-family: var(--body);
  font-weight: 700;
  font-size: 22px;
  color: var(--ink);
  margin: 32px 0 16px;
}
.legal__section h4 {
  font-family: var(--body);
  font-weight: 700;
  font-size: 17px;
  color: var(--ink);
  margin: 24px 0 10px;
}
.legal__section p,
.legal__section li {
  font-size: 15px;
  line-height: 1.6;
  margin: 0 0 12px;
}
.legal__section ul {
  margin: 0 0 16px;
  padding-left: 20px;
}
.legal__section li {
  margin-bottom: 8px;
}
.legal__source {
  font-size: 12px;
  color: var(--ink-mute);
  letter-spacing: 0.04em;
  margin-top: 64px;
}
html { scroll-padding-top: 80px; }

@media (max-width: 760px) {
  .legal { padding: 100px 22px 60px; }
  .legal__section p, .legal__section li { font-size: 14px; }
}

/* ---------- FOOTER ---------- */
.footer {
  padding: 32px clamp(20px, 5vw, 80px);
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  font-size: 13px;
  color: var(--ink-mute);
  border-top: 1px solid var(--rule);
  max-width: 1400px;
  margin: 0 auto;
}
.footer p { margin: 0; }
.footer__top {
  background: transparent;
  border: 0;
  color: var(--ink);
  padding: 0;
  transition: color 0.2s;
}
.footer__top:hover { color: var(--accent); }
.footer__legal {
  display: flex;
  gap: 18px;
  flex-wrap: wrap;
}
.footer__legal-link {
  color: var(--ink-mute);
  transition: color 0.2s;
}
.footer__legal-link:hover { color: var(--accent); }

/* project modal footer */
.project-footer {
  padding: 40px clamp(20px, 5vw, 80px);
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 14px;
  font-size: 13px;
  color: var(--ink-mute);
  background: var(--card);
  border-top: 1px solid var(--rule);
  margin: 0;
}
.modal__inner--story > *:nth-last-child(2) {
  margin-bottom: 0 !important;
}
.project-footer p { margin: 0; }
.modal__inner--story:has(> .project-footer:last-child) {
  padding-bottom: 0;
}

/* ---------- MODAL ---------- */
.modal {
  position: fixed;
  inset: 0;
  background: var(--bg);
  z-index: 1000;
  display: block;
  padding: 0;
  overflow-y: auto;
  animation: fadeIn 0.3s var(--easing);
}
.modal[hidden] { display: none; }
@keyframes fadeIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}
.modal__inner {
  background: var(--bg);
  border-radius: 0;
  max-width: none;
  width: 100%;
  max-height: none;
  min-height: 100vh;
  padding: clamp(28px, 4vw, 56px);
  position: relative;
}
.modal__close {
  display: none !important;
}
.modal__inner h3 {
  font-family: var(--body);
  font-weight: 700;
  font-size: clamp(36px, 5vw, 64px);
  margin: 0 0 4px;
  letter-spacing: -0.02em;
  color: var(--ink);
}
.modal__inner .modal__tag {
  font-size: 12px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-mute);
  margin: 0 0 20px;
}
.modal__inner .modal__copy {
  font-size: 16px;
  color: var(--ink-soft);
  max-width: 60ch;
  margin: 0 0 24px;
}
.modal__inner .modal__image {
  width: 100%;
  border-radius: 8px;
  margin-bottom: 12px;
}

/* ---------- MODAL: STORY LAYOUT ---------- */
.modal__inner--story {
  max-width: none;
  width: 100%;
  min-height: 100vh;
  padding: 0 0 clamp(32px, 5vw, 80px);
  background: var(--bg);
  overflow-x: hidden;
  overflow-y: visible;
  border-radius: 0;
}
.modal__inner--story > *:first-child:not(.story__gallery--top) {
  margin-top: clamp(32px, 5vw, 80px);
}
.story {
  --pad: clamp(24px, 5vw, 80px);
  padding: 0 var(--pad);
  max-width: 1200px;
  margin: 0 auto;
}
.story__title {
  font-family: var(--body);
  font-weight: 700;
  font-size: clamp(56px, 10vw, 140px);
  line-height: 0.9;
  letter-spacing: -0.02em;
  margin: 0 0 30px !important;
  color: var(--accent);
  text-transform: uppercase;
}
.story__title br { display: block; }
.story__title + * { margin-top: 0 !important; }
.story__tag {
  font-size: 12px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--ink-mute);
  margin: 0 0 56px;
}
.story__row {
  display: flex;
  align-items: flex-start;
  gap: clamp(32px, 6vw, 80px);
  margin: 0 0 72px;
}
.story__row--reverse { flex-direction: row-reverse; }
.story__text {
  flex: 1 1 0;
  max-width: 56ch;
  font-family: var(--body);
  font-weight: 400;
  font-size: 20px;
  line-height: 1.4;
  color: var(--ink-soft);
  margin: 0;
}
.story__row--reverse .story__text { margin-top: clamp(40px, 6vw, 120px); }
.story__media {
  flex: 0 0 auto;
  width: clamp(260px, 32vw, 420px);
  height: auto;
  border-radius: 8px;
  display: block;
  align-self: center;
}
.story__media--cow { margin-bottom: 24px; }

.story__row:not(.story__row--reverse) > .story__media:not(.story__media--phone),
.story__row:not(.story__row--reverse) > .filly-anim {
  transform: translateX(20%);
}

.cows-golden-big {
  display: block;
  width: clamp(508px, 62vw, 821px);
  height: auto;
  margin: 0 auto 72px;
}
.cows-golden {
  display: flex;
  justify-content: center;
  align-items: flex-start;
  gap: clamp(12px, 1.4vw, 24px);
  flex-wrap: nowrap;
  width: clamp(332px, 40.3vw, 538px);
  max-width: 100%;
  margin: 0 auto 72px;
  padding: 0 clamp(24px, 5vw, 80px);
  box-sizing: border-box;
}
.cows-golden__img {
  flex: 1 1 0;
  width: 100%;
  height: auto;
  display: block;
}
@media (max-width: 760px) {
  .cows-golden {
    flex-wrap: wrap;
    width: auto;
    gap: 16px;
  }
  .cows-golden__img {
    flex: 0 0 calc(50% - 8px);
    max-width: 384px;
  }
}

/* ---------- COWS MEMORY MOCKUP (A4 landscape) ---------- */
.cows-memory-mockup {
  position: relative;
  width: 100%;
  aspect-ratio: 297 / 210;
  background: #E8D9C0;
  overflow: hidden;
  display: block;
  margin: 0 0 72px;
}
.cows-memory-mockup__grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: clamp(10px, 1.4vw, 24px);
  padding: clamp(24px, 3vw, 56px);
  box-sizing: border-box;
  width: 100%;
  height: 100%;
  align-content: center;
}
.cows-memory-mockup__card {
  aspect-ratio: 1;
  border-radius: clamp(8px, 1vw, 14px);
  overflow: hidden;
  box-shadow: 0 8px 16px -10px rgba(40, 22, 12, 0.18);
  transform: rotate(var(--rot, 0deg));
}
.cows-memory-mockup__card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.cows-memory-mockup__box {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%) rotate(-3deg);
  width: clamp(220px, 38%, 480px);
  aspect-ratio: 1.35 / 1;
  background: #FAF4E7;
  border-radius: 6px;
  box-shadow:
    0 32px 70px -28px rgba(0, 0, 0, 0.45),
    0 10px 24px -12px rgba(0, 0, 0, 0.22);
  padding: clamp(16px, 2vw, 32px);
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  z-index: 2;
}
.cows-memory-mockup__box-title {
  font-family: var(--body);
  font-weight: 700;
  font-size: clamp(22px, 3.6vw, 56px);
  line-height: 0.95;
  letter-spacing: -0.02em;
  color: var(--accent);
  margin: 0;
  text-transform: lowercase;
}
.cows-memory-mockup__box-sub {
  font-family: var(--body);
  font-size: clamp(10px, 1.1vw, 15px);
  color: #6B5045;
  margin: clamp(4px, 0.6vw, 10px) 0 0;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
.cows-memory-mockup__box-preview {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: clamp(6px, 0.8vw, 12px);
}
.cows-memory-mockup__box-preview img {
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
  border-radius: clamp(6px, 0.6vw, 10px);
  display: block;
  box-shadow: 0 6px 12px -8px rgba(0, 0, 0, 0.2);
}
@media (max-width: 760px) {
  .cows-memory-mockup {
    aspect-ratio: auto;
  }
  .cows-memory-mockup__grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
    padding: 20px;
    height: auto;
  }
}

/* ---------- COWS HERO ---------- */
.cows-hero {
  display: block;
  width: 100%;
  height: 100vh;
  margin: 0 0 clamp(40px, 6vw, 80px);
  background: #FAD7DC;
  overflow: hidden;
  position: relative;
}
.cows-hero__img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}
.modal__inner--story > .cows-hero:first-child {
  margin-top: 0 !important;
}
@media (max-width: 760px) {
  .cows-hero { height: auto; min-height: 0; aspect-ratio: 4 / 3; }
}

/* ---------- RAUM: STATIONS GRID ---------- */
.raum-stations {
  --pad: clamp(24px, 5vw, 80px);
  max-width: 1400px;
  margin: 0 auto clamp(48px, 6vw, 96px);
  padding: 0 var(--pad);
}
.raum-stations__head {
  font-family: var(--body);
  font-weight: 700;
  font-size: clamp(28px, 3.4vw, 44px);
  letter-spacing: 0.02em;
  text-transform: uppercase;
  color: var(--ink);
  margin: 0 0 clamp(28px, 4vw, 48px);
  text-align: left;
}
.raum-stations__grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: clamp(16px, 2vw, 28px);
}
.raum-station {
  --st: var(--accent);
  background: color-mix(in srgb, var(--st) 14%, var(--bg));
  border-radius: 14px;
  padding: clamp(20px, 2.2vw, 36px);
  display: flex;
  flex-direction: column;
  gap: 10px;
  position: relative;
  overflow: hidden;
  transition: transform 0.4s var(--easing), box-shadow 0.4s var(--easing);
}
.raum-station:hover {
  transform: translateY(-6px);
  box-shadow: 0 22px 40px -22px rgba(40, 22, 12, 0.25);
}
.raum-station__icon {
  width: clamp(56px, 6vw, 88px);
  height: clamp(56px, 6vw, 88px);
  background: var(--st);
  border-radius: 999px;
  display: grid;
  place-items: center;
  margin-bottom: 12px;
  transition: transform 0.6s var(--easing);
}
.raum-station:hover .raum-station__icon {
  transform: rotate(-8deg) scale(1.04);
}
.raum-station__icon img {
  width: 60%;
  height: 60%;
  object-fit: contain;
  filter: brightness(0) invert(1);
}
.raum-station__num {
  font-family: var(--body);
  font-weight: 700;
  font-size: 14px;
  letter-spacing: 0.16em;
  color: var(--st);
  margin: 0;
  text-transform: uppercase;
}
.raum-station__name {
  font-family: var(--body);
  font-weight: 700;
  font-size: clamp(20px, 1.8vw, 26px);
  color: var(--ink);
  margin: 0;
  letter-spacing: -0.01em;
}
.raum-station__copy {
  font-family: var(--body);
  font-size: 15px;
  line-height: 1.45;
  color: var(--ink-soft);
  margin: 0;
}

/* stations stagger reveal */
@keyframes raumStationIn {
  from { opacity: 0; transform: translateY(40px); }
  to   { opacity: 1; transform: translateY(0); }
}
.raum-station {
  animation: raumStationIn 0.9s var(--easing) both;
}
.raum-station:nth-child(1) { animation-delay: 0.05s; }
.raum-station:nth-child(2) { animation-delay: 0.18s; }
.raum-station:nth-child(3) { animation-delay: 0.31s; }
.raum-station:nth-child(4) { animation-delay: 0.44s; }

@media (max-width: 960px) {
  .raum-stations__grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 560px) {
  .raum-stations__grid { grid-template-columns: 1fr; }
}

.raum-aufbau {
  margin-bottom: clamp(40px, 6vw, 80px) !important;
}

/* ---------- RAUM: STATIONS FULLSCREEN SHOW ---------- */
.raum-stations-show {
  position: relative;
  width: 100%;
  height: 100vh;
  margin: 0 0 clamp(48px, 6vw, 96px);
  display: flex;
  align-items: center;
  justify-content: center;
  background: #29b4e8;
  transition: background 700ms var(--easing);
  overflow: hidden;
}
.raum-stations-show__stage {
  display: grid;
  place-items: center;
}
.raum-stations-show__circle {
  width: min(48vmin, 460px);
  height: min(48vmin, 460px);
  background: #fff;
  border-radius: 999px;
  display: grid;
  place-items: center;
  box-shadow: 0 40px 80px -40px rgba(0, 0, 0, 0.25);
  transition: transform 420ms var(--easing);
}
.raum-stations-show__circle.is-swapping { transform: scale(0.9); }
.raum-stations-show__pikto {
  width: 56%;
  height: 56%;
  object-fit: contain;
  transition: opacity 260ms ease;
}
.raum-stations-show__pikto.is-swapping { opacity: 0; }
.raum-stations-show__caption {
  position: absolute;
  bottom: clamp(40px, 6vw, 80px);
  left: 50%;
  transform: translateX(-50%);
  text-align: center;
  color: #fff;
  pointer-events: none;
}
.raum-stations-show__num {
  font-family: var(--body);
  font-weight: 700;
  font-size: 14px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  margin: 0;
  opacity: 0.85;
}
.raum-stations-show__name {
  font-family: var(--body);
  font-weight: 700;
  font-size: clamp(28px, 3vw, 44px);
  margin: 8px 0 0;
  letter-spacing: -0.01em;
}
.raum-stations-show__dots {
  position: absolute;
  top: clamp(40px, 5vw, 64px);
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 10px;
}
.raum-stations-show__dots span {
  width: 9px;
  height: 9px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.45);
  transition: background 300ms ease, transform 300ms ease;
}
.raum-stations-show__dots span.is-active {
  background: #fff;
  transform: scale(1.25);
}
@media (max-width: 640px) {
  .raum-stations-show__circle { width: 62vmin; height: 62vmin; }
}


/* Instagram mockup as fullscreen closer */
.raum-instagram {
  display: block;
  width: 100%;
  height: 100vh;
  margin: clamp(40px, 6vw, 80px) 0 0;
  background: #F8E8EE;
  overflow: hidden;
  position: relative;
}
.raum-instagram__img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}
.modal__inner--story:has(> .raum-instagram:last-child) {
  padding-bottom: 0;
}

/* ---------- RAUM PROJECT OVERRIDES ---------- */
/* use default story text max-width/sizes for consistency */

.story__media.raum-logo-img {
  width: clamp(180px, 22vw, 280px);
}

/* RAUM logo: fullscreen white block under the lede */
.raum-logo-block {
  display: flex;
  justify-content: center;
  align-items: center;
  width: 100%;
  height: 100vh;
  margin: 0 0 clamp(48px, 6vw, 96px);
  padding: clamp(40px, 6vw, 96px);
  box-sizing: border-box;
  background: #FFFFFF;
}
.raum-logo-svg {
  width: clamp(260px, 36vw, 460px);
  height: auto;
  overflow: visible;
}
.raum-logo-letter {
  transform-box: fill-box;
  transform-origin: center;
  /* defaults — JS will override with exact bbox-based values */
  --row-tx: 0%;
  --row-ty: 0%;
  --row-scale: 0.55;
  fill: #000;
}
.raum-logo-svg.is-ready .raum-logo-letter {
  animation: raumLetterLoop 6s cubic-bezier(0.65, 0, 0.35, 1) 0.4s infinite both,
             raumLogoColor 30s steps(1, end) 0.4s infinite both;
}
@keyframes raumLetterLoop {
  0%, 22%  { transform: translate(var(--row-tx), var(--row-ty)) scale(var(--row-scale)); }
  48%, 78% { transform: translate(0, 0) scale(1); }
  100%     { transform: translate(var(--row-tx), var(--row-ty)) scale(var(--row-scale)); }
}
@keyframes raumLogoColor {
  0%   { fill: #000000; }
  20%  { fill: #e35b9a; }
  40%  { fill: #f7ab16; }
  60%  { fill: #29b4e8; }
  80%  { fill: #b9ce30; }
  100% { fill: #000000; }
}

@media (prefers-reduced-motion: reduce) {
  .raum-logo-letter { animation: none; }
}

.story__gallery.story__gallery--edge {
  padding: 0;
  max-width: none;
}
@media (max-width: 760px) {
  .modal__inner--story > .story__gallery--edge:first-child {
    margin-top: 90px;
  }
}
.story__gallery--edge .story__gallery-btn--prev { left: 18px; }
.story__gallery--edge .story__gallery-btn--next { right: 18px; }

.raum-story .story__row > .story__media {
  transform: translateX(10%);
}

.securva-letter {
  display: block;
  width: clamp(364px, 44.8vw, 588px);
  height: auto;
  margin: 0 auto 72px;
}

.securva-video {
  display: block;
  width: 100%;
  height: auto;
  margin: 0 0 72px;
  background: var(--card);
}

.securva-plakate {
  display: block;
  width: 70%;
  height: auto;
  margin: 0 auto 72px;
}

.securva-plakate-pair {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(20px, 3vw, 40px);
  width: 70%;
  margin: 0 auto 72px;
  align-items: start;
}
.securva-plakate-pair img {
  width: 100%;
  height: auto;
  display: block;
}

@media (max-width: 760px) {
  .securva-plakate-pair {
    grid-template-columns: 1fr;
    width: 75%;
    gap: 24px;
  }
}
.story__media--anim {
  width: clamp(312px, 38.4vw, 504px);
  background: transparent;
  border-radius: 0;
}
.story__media--lg {
  width: clamp(560px, 70vw, 920px);
}
.story__media--right {
  margin-left: auto;
}
.story__media--phone {
  width: clamp(166px, 21vw, 272px);
  margin-left: auto;
  align-self: flex-start;
  transform: translate(-45%, -15%) rotate(-8deg);
  transform-origin: center;
}
.story__text--narrow {
  max-width: 400px;
}

/* ---------- FILLY FRAME ANIMATION ---------- */
.filly-anim {
  position: relative;
  flex: 0 0 auto;
  width: clamp(260px, 32vw, 420px);
  aspect-ratio: 3 / 4;
  background: transparent;
  align-self: center;
}
.filly-anim__frame {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  opacity: 0;
  pointer-events: none;
}
.filly-anim__frame.is-active { opacity: 1; }

/* hero variant: fills the modal's visible area edge-to-edge */
.filly-anim--hero {
  width: 100%;
  height: 100vh;
  max-width: none;
  aspect-ratio: auto;
  align-self: stretch;
  margin: 0 0 clamp(40px, 6vw, 80px);
  background: #F4C2D0;
  border-radius: 0;
  overflow: hidden;
  transform: none !important;
}
.filly-anim--hero .filly-anim__frame {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center center;
}
.modal__inner--story > .filly-anim--hero:first-child {
  margin-top: 0 !important;
}

/* bottom-positioned variant: same fullscreen treatment, no rounded corners */
.filly-anim--bottom {
  margin: clamp(40px, 6vw, 80px) 0 0 !important;
  border-radius: 0;
}
.modal__inner--story:has(> .filly-anim--bottom:last-child) {
  padding-bottom: 0;
}

/* fullscreen image hero at top of Filly modal — wrapper crops, image zooms */
.filly-hero {
  display: block;
  width: 100%;
  height: 100vh;
  margin: 0 0 clamp(40px, 6vw, 80px);
  background: #F4C2D0;
  overflow: hidden;
  position: relative;
}
.filly-hero__img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}
.modal__inner--story > .filly-hero:first-child {
  margin-top: 0 !important;
}

/* video sitting between text blocks — full modal width, no rounded corners */
.filly-video--hero {
  width: 100%;
  margin: 0 0 clamp(40px, 6vw, 80px);
  border-radius: 0;
}

.modal__inner--story:has(> .filly-anim--bottom:last-child) {
  padding-bottom: 0;
}

@media (max-width: 760px) {
  /* heroes use natural image aspect — no letterbox rims, no crop */
  /* ADHD: natural image aspect, smaller via max-height — whole image visible */
  .adhd-hero {
    height: auto;
    min-height: 0;
    aspect-ratio: auto;
    max-height: 50vh;
    overflow: hidden;
  }
  .adhd-hero__img {
    object-fit: contain;
    width: 100%;
    height: auto;
    max-height: 50vh;
  }
  /* Filly title: landscape (matches image aspect), no crop, no rims */
  .filly-hero {
    height: auto;
    min-height: 0;
    aspect-ratio: 1.57;
  }
  .filly-hero__img {
    object-fit: cover;
    width: 100%;
    height: 100%;
  }
  /* Cows: image aspect, no rims */
  .cows-hero {
    height: auto;
    min-height: 0;
    aspect-ratio: 1.46;
  }
  .cows-hero__img {
    object-fit: cover;
    width: 100%;
    height: 100%;
  }
  /* Filly bottom animation: landscape, no rounded corners */
  .filly-anim--hero {
    height: auto;
    min-height: 0;
    aspect-ratio: 1.45; /* matches frame aspect */
    border-radius: 0;
  }
  .filly-anim--hero .filly-anim__frame {
    object-fit: cover;
  }
  /* Raum instagram closer */
  .raum-instagram {
    height: auto;
    min-height: 0;
    aspect-ratio: 1.5;
  }
  .raum-instagram__img {
    object-fit: cover;
    width: 100%;
    height: 100%;
  }
}

.story__full.filly-entstehung {
  max-width: 972px;
  margin: 0 auto 72px;
}

.filly-video {
  display: block;
  width: 100%;
  height: auto;
  margin: 0 0 72px;
  border-radius: 6px;
  background: var(--card);
}

@media (max-width: 760px) {
  .filly-plakat,
  .filly-video {
    transform: scale(1.18);
    transform-origin: center;
    margin-top: 24px;
    margin-bottom: 56px;
  }
}
/* ---------- ADHD HERO + CHARACTER BLOCK ---------- */
.adhd-hero {
  display: block;
  width: 100%;
  height: 100vh;
  margin: 0 0 clamp(40px, 6vw, 80px);
  background: #F3E7CF;
  overflow: hidden;
  position: relative;
}
.adhd-hero__img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}
.modal__inner--story > .adhd-hero:first-child {
  margin-top: 0 !important;
}

.adhd-character-block {
  width: 100%;
  background: #F3E7CF;
  display: flex;
  justify-content: center;
  align-items: center;
  aspect-ratio: 16 / 10;
  margin: 0 0 72px;
  padding: clamp(40px, 6vw, 96px);
  box-sizing: border-box;
}
.adhd-character-block__img {
  display: block;
  width: clamp(280px, 38vw, 560px);
  height: auto;
  max-height: 100%;
  object-fit: contain;
}

@media (max-width: 760px) {
  .adhd-character-block {
    aspect-ratio: 4 / 5;
    padding: 32px;
  }
  .adhd-character-block__img {
    width: clamp(220px, 70vw, 360px);
  }
}

.adhd-logos-img {
  display: block;
  width: 100%;
  max-width: 760px;
  height: auto;
  margin: 0 auto 56px;
}

.story__text--center {
  margin: 0 0 56px;
  text-align: left;
  max-width: 60ch;
}

.story__pair {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(20px, 3vw, 40px);
  margin: 0 0 clamp(28px, 4vw, 56px);
  align-items: start;
}
.story__pair-img {
  width: 100%;
  height: auto;
  display: block;
  border-radius: 6px;
}
.story__stack {
  display: grid;
  gap: clamp(16px, 2vw, 24px);
}

@media (max-width: 760px) {
  .story__pair { grid-template-columns: 1fr; }
}

/* ---------- GATE6: yellow band ---------- */
.gate6-yellow {
  position: relative;
  background: transparent;
  padding: clamp(80px, 11vw, 130px) clamp(24px, 5vw, 80px) clamp(40px, 6vw, 70px);
  margin: 0 0 0;
  overflow: visible;
}
.gate6-yellow__bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
}
.gate6-yellow__star {
  position: absolute;
  width: clamp(60px, 8vw, 110px);
  height: auto;
  z-index: 2;
  pointer-events: none;
}
.gate6-yellow__star--1 {
  top: 8%;
  left: 6%;
  opacity: 0.7;
  animation: spin 18s linear infinite;
}
.gate6-yellow__star--2 {
  bottom: 8%;
  left: 60%;
  width: clamp(64px, 8.8vw, 120px);
  animation: spin 22s linear infinite reverse;
}
.gate6-yellow__inner {
  position: relative;
  z-index: 3;
  display: grid;
  grid-template-columns: 1fr 1.4fr;
  gap: clamp(28px, 5vw, 64px);
  align-items: center;
  max-width: 1100px;
  margin: 0 auto;
}
.gate6-yellow__text {
  display: grid;
  gap: 16px;
}
.gate6-yellow__text p {
  margin: 0;
  font-size: 20px;
  line-height: 1.55;
  color: #1A1A1A;
  max-width: 32ch;
}
.gate6-yellow__laptop {
  width: 150%;
  max-width: 880px;
  height: auto;
  display: block;
  transform: translate(-12%, -38%);
  margin-bottom: -10%;
}

@media (max-width: 820px) {
  .gate6-yellow__inner { grid-template-columns: 1fr; }
  .gate6-yellow__star--2 { bottom: auto; top: 60%; }
  .gate6-yellow { padding-top: 200px; }
  .gate6-yellow__laptop {
    width: 100%;
    transform: none;
    margin-bottom: 0;
    margin-top: 24px;
  }
}
.story__full {
  display: block;
  width: 100%;
  height: auto;
  margin: 0 0 72px;
}
.story__full--narrow {
  max-width: 720px;
  margin-left: auto;
  margin-right: auto;
}
.gate6__posts .story__pair-img {
  border-radius: 28px;
}
.story__text-group {
  flex: 1 1 0;
  max-width: 60ch;
  display: grid;
  gap: 16px;
}
.story__text-group .story__text {
  margin: 0;
  max-width: none;
}
.story__label {
  font-weight: 700;
  color: var(--ink);
  margin-right: 4px;
}
.story__row--reverse .story__text-group { margin-top: clamp(40px, 6vw, 120px); }

.story__lede {
  font-family: var(--body);
  font-weight: 400;
  font-size: 20px;
  line-height: 1.5;
  color: var(--ink-soft);
  margin: 0 0 56px;
  max-width: 64ch;
}

.story__gallery {
  --pad: clamp(24px, 5vw, 80px);
  position: relative;
  margin: 0 auto 72px;
  padding: 0 var(--pad);
  max-width: 1200px;
}
.story__gallery--top {
  margin: 0 0 56px;
  padding: 0;
  max-width: none;
  border-radius: 0;
  overflow: hidden;
}
.story__gallery--top .story__gallery-track {
  padding: 0;
  gap: 0;
  scroll-snap-type: x mandatory;
}
.story__gallery--top .story__gallery-track img {
  width: 100%;
  flex: 0 0 100%;
  height: auto;
  aspect-ratio: auto;
  object-fit: contain;
  border-radius: 0;
  background: var(--card);
  scroll-snap-align: start;
}
.story__gallery--top .story__gallery-btn--prev { left: 18px; }
.story__gallery--top .story__gallery-btn--next { right: 18px; }
.story__gallery-track {
  display: flex;
  gap: 16px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
  padding-bottom: 8px;
}
.story__gallery-track::-webkit-scrollbar { display: none; }
.story__gallery-track img {
  flex: 0 0 auto;
  width: clamp(200px, 24vw, 300px);
  aspect-ratio: 210 / 297;
  object-fit: cover;
  border-radius: 6px;
  scroll-snap-align: start;
}
.story__gallery-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 44px;
  height: 44px;
  border-radius: 999px;
  border: 0;
  background: var(--ink);
  color: var(--bg);
  font-size: 14px;
  cursor: pointer;
  z-index: 2;
  display: grid;
  place-items: center;
  transition: background-color 0.25s, transform 0.25s var(--easing);
}
.story__gallery-btn:hover {
  background: var(--accent);
  transform: translateY(-50%) scale(1.06);
}
.story__gallery-btn--prev { left: calc(var(--pad) - 22px); }
.story__gallery-btn--next { right: calc(var(--pad) - 22px); }

.story__row--stations { align-items: stretch; }
.story__row--stations .story__text-group { margin-top: 0; }
.story__row--stations .story__media {
  width: clamp(280px, 34vw, 460px);
  align-self: stretch;
  object-fit: contain;
}

.story__insta {
  margin: 48px auto 0;
  padding: 0;
  display: grid;
  gap: 12px;
  justify-items: center;
  text-align: center;
}
.story__insta img {
  width: clamp(320px, 48vw, 560px);
  height: auto;
  border-radius: 8px;
}
.story__insta figcaption {
  font-size: 13px;
  letter-spacing: 0.04em;
  color: var(--ink-mute);
}

@media (max-width: 900px) {
  .story__text-group {
    max-width: none;
  }
  .story__row--reverse .story__text-group { margin-top: 0; }
  .story__gallery-track img {
    width: 70vw;
  }
  .story__gallery-btn {
    width: 36px;
    height: 36px;
    font-size: 12px;
  }
}

/* ---------- CATS: thumbnail gallery ---------- */
.cats-gallery {
  --pad: clamp(24px, 5vw, 80px);
  max-width: 760px;
  margin: 0 auto 64px;
  padding: 0 var(--pad);
}
.cats-gallery__heading {
  font-family: var(--body);
  font-weight: 700;
  font-size: clamp(20px, 2vw, 28px);
  letter-spacing: -0.01em;
  color: var(--ink);
  margin: 0 0 18px;
  text-transform: uppercase;
}
.cats-gallery__main {
  margin-bottom: 16px;
  display: block;
  aspect-ratio: 2480 / 1772;
  overflow: hidden;
  border-radius: 6px;
}
.cats-gallery__main img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: opacity 0.45s var(--easing);
}
.cats-gallery__main img.is-swapping { opacity: 0; }

.cats-gallery__thumbs {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: 6px;
  padding: 4px 0 8px;
}
.cats-thumb {
  width: 100%;
  aspect-ratio: 2480 / 1772;
  padding: 0;
  border: 1.5px solid transparent;
  border-radius: 4px;
  overflow: hidden;
  background: transparent;
  cursor: pointer;
  transition: border-color 0.4s var(--easing),
              opacity 0.4s var(--easing),
              transform 0.4s var(--easing);
  opacity: 0.35;
}
body.is-past-hero .cats-thumb { cursor: pointer; }
.cats-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.cats-thumb:hover {
  opacity: 1;
  transform: translateY(-2px);
}
.cats-thumb.is-active {
  border-color: var(--accent);
  opacity: 1;
}

@media (max-width: 600px) {
  .cats-gallery__thumbs {
    grid-template-columns: repeat(6, 1fr);
  }
}

.cats-video {
  max-width: 720px;
  margin: 24px auto 40px;
  padding: 0;
}
.cats-video__player {
  width: 100%;
  height: auto;
  display: block;
  mix-blend-mode: multiply;
  background: transparent;
}

.cats-band {
  background: #F4D9D2;
  padding: clamp(48px, 7vw, 96px) clamp(24px, 5vw, 80px);
  margin: 64px 0;
}
.cats-band__inner {
  max-width: 900px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(24px, 4vw, 48px);
  align-items: center;
}
.cats-band__img {
  width: 100%;
  height: auto;
  display: block;
}

.cats-months-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: clamp(8px, 1.2vw, 16px);
  width: 100%;
  margin: 24px 0 0;
}
.cats-months-grid img {
  width: 100%;
  height: auto;
  display: block;
}

@media (max-width: 760px) {
  .cats-months-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 700px) {
  .cats-band__inner { grid-template-columns: 1fr; }
}

@media (max-width: 900px) {
  .story__text,
  .story__text--narrow,
  .story__text--center {
    text-align: left;
    align-self: stretch;
    max-width: 100%;
    margin-left: 0;
    margin-right: 0;
  }
  .story__lede { text-align: left; }
  .story__row,
  .story__row--reverse {
    flex-direction: column-reverse;
    gap: 24px;
    margin-bottom: 48px;
    align-items: center;
  }
  .story__row--reverse .story__text { margin-top: 0; }
  .story__media {
    width: auto;
    max-width: 100%;
  }
  .story__row > .story__media,
  .story__row > .filly-anim,
  .story__row--reverse > .story__media,
  .story__row--reverse > .filly-anim {
    transform: none !important;
    margin-left: auto;
    margin-right: auto;
    align-self: center;
  }
  .story__media--phone {
    width: clamp(180px, 50vw, 280px);
  }
  .story__full {
    margin-bottom: 48px;
  }
}

/* ---------- REVEAL ---------- */
.js .section-title,
.js .hero__signature,
.js .about__hello,
.js .project,
.js .about__portrait,
.js .about__text p,
.js .cv-card,
.js .contact__cta,
.js .contact__list li,
.js .filter {
  opacity: 0;
  transform: translateY(70px);
  transition: opacity 1.1s cubic-bezier(0.22, 1, 0.36, 1),
              transform 1.1s cubic-bezier(0.22, 1, 0.36, 1);
}
.js .section-title { transform: translateY(90px); }
.js .project { transform: translateY(80px) scale(0.96); }
.js .cv-card { transform: translateY(60px) scale(0.97); }
.js .about__portrait { transform: translateY(60px) scale(0.94); }
.js .contact__cta { transform: translateY(60px) scale(0.95); }

.js .section-title.is-visible,
.js .hero__signature.is-visible,
.js .about__hello.is-visible,
.js .project.is-visible,
.js .about__portrait.is-visible,
.js .about__text p.is-visible,
.js .cv-card.is-visible,
.js .contact__cta.is-visible,
.js .contact__list li.is-visible,
.js .filter.is-visible {
  opacity: 1;
  transform: none;
}

/* Subtle stagger on grouped items */
.js .about__text p:nth-child(2).is-visible { transition-delay: 0.1s; }
.js .about__text p:nth-child(3).is-visible { transition-delay: 0.2s; }
.js .cv-card:nth-of-type(2).is-visible { transition-delay: 0.08s; }
.js .cv-card:nth-of-type(3).is-visible { transition-delay: 0.16s; }
.js .cv-card:nth-of-type(4).is-visible { transition-delay: 0.24s; }
.js .contact__list li:nth-child(2).is-visible { transition-delay: 0.1s; }
.js .contact__list li:nth-child(3).is-visible { transition-delay: 0.2s; }
.js .filter:nth-of-type(2).is-visible { transition-delay: 0.06s; }
.js .filter:nth-of-type(3).is-visible { transition-delay: 0.12s; }
.js .filter:nth-of-type(4).is-visible { transition-delay: 0.18s; }
.js .filter:nth-of-type(5).is-visible { transition-delay: 0.24s; }
.js .filter:nth-of-type(6).is-visible { transition-delay: 0.30s; }

/* ---------- ACCESSIBILITY ---------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }
}

/* ---------- MOBILE ---------- */
@media (max-width: 760px) {
  .nav { padding: 14px 18px; }
  .nav__cta { display: none; }
  .nav__burger { display: flex; }
  /* hide the round modal close on mobile — burger acts as the close X */
  .modal__close { display: none !important; }
  .nav__logo, .nav__links a { color: var(--bg); }
  body.is-past-hero .nav__logo,
  body.is-past-hero .nav__links a { color: var(--ink); }

  body {
    background: var(--accent);
    transition: background-color 0.6s var(--easing);
  }
  body.is-past-hero { background: var(--bg); }
  main { background: transparent; }
  .about, .work, .contact, .cv, .footer { background: var(--bg); }
  .hero { background: transparent; }

  .hero {
    padding: 0 22px;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
  }
  .hero__inner { text-align: center; width: 100%; }

  .hero__kicker,
  .hero__byline,
  .hero__footer,
  .hero__sticker--1,
  .hero__sticker--2,
  .hero__sticker--3 { display: none !important; }

  .hero__welcome {
    display: block;
    font-family: var(--script);
    font-size: clamp(30px, 9vw, 56px);
    color: var(--bg);
    margin: 0 0 4px;
    text-align: center;
    line-height: 1.2;
    clip-path: inset(0 100% 0 0);
    animation: writeIn 2.4s cubic-bezier(0.65, 0, 0.35, 1) 0.2s forwards;
  }
  /* mobile: swap title — hide desktop WELCOME, show mobile PORTFOLIO */
  .hero__title--desktop { display: none; }
  .hero__title--mobile { display: flex; }
  .hero__title {
    color: var(--bg);
    justify-content: center;
    text-align: center;
    font-size: clamp(54px, 17vw, 130px);
    opacity: 0;
    animation: portfolioReveal 1s cubic-bezier(0.22, 1, 0.36, 1) 2.4s forwards;
  }
  .hero__title span {
    animation: none !important;
    opacity: 1 !important;
    transform: none !important;
  }
  .hero__title span:hover { transform: none; color: var(--bg); }

  .js .section-title {
    opacity: 0;
    transform: translateY(40px);
    transition: opacity 1s var(--easing), transform 1s var(--easing);
  }
  .js .section-title.is-visible {
    opacity: 1;
    transform: none;
  }

  .about { padding: 40px 22px 60px; }
  .work { padding: 40px 22px 60px; }
  .about__text p { font-size: 20px; }
  .modal__close {
    top: 14px;
    right: 14px;
    width: 36px;
    height: 36px;
    font-size: 14px;
    background: var(--ink);
    color: var(--bg);
  }
  .modal__close:hover {
    background: var(--accent);
    color: var(--bg);
  }
  .software { grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 6px; }
  .software li span { width: 40px; height: 40px; font-size: 14px; border-radius: 8px; }
  .contact__cta { padding: 14px 22px; font-size: 16px; gap: 10px; }
  .lang li { grid-template-columns: 80px 1fr 40px; gap: 10px; font-size: 13px; }
  .timeline__item { grid-template-columns: 1fr; gap: 4px; }
  .cv-card__list li { grid-template-columns: 80px 1fr; }
  .filter { padding: 10px 16px; font-size: 13px; }
}
