@font-face {
  font-family: "Editorial New";
  src:
    local("Editorial New"),
    local("PPEditorialNew-Regular"),
    local("PPEditorial New");
  font-style: normal;
  font-weight: 400;
  font-display: swap;
}

@font-face {
  font-family: "Neue Montreal";
  src:
    local("Neue Montreal"),
    local("PPNeueMontreal-Book"),
    local("PP Neue Montreal"),
    local("NeueMontreal-Book");
  font-style: normal;
  font-weight: 400;
  font-display: swap;
}

@font-face {
  font-family: "Neue Montreal";
  src:
    local("Neue Montreal Medium"),
    local("PPNeueMontreal-Medium"),
    local("PP Neue Montreal Medium"),
    local("NeueMontreal-Medium");
  font-style: normal;
  font-weight: 500;
  font-display: swap;
}

:root {
  
  --bg-size:cover;
  --bg: none;
  --text: #111111;
  --muted: rgba(17, 17, 17, 0.64);
  --accent: #c61818;
  --film-bar-size: 20vh;
  /* Feather happens under the bar so the visible scene is fully opaque at the bar edge — no bleed. */
  --film-bar-feather: 60px;
  --film-bar-mask: linear-gradient(
    to bottom,
    transparent calc(var(--film-bar-size) - var(--film-bar-feather)),
    black var(--film-bar-size),
    black calc(100% - var(--film-bar-size)),
    transparent calc(100% - var(--film-bar-size) + var(--film-bar-feather))
  );
  --serif: "Editorial New", "Iowan Old Style", "Palatino Linotype", "Book Antiqua", Georgia, serif;
  --sans: "Neue Montreal", "Helvetica Neue", Helvetica, Arial, sans-serif;
  --space-1: 0.75rem;
  --space-2: 1rem;
  --space-3: 1.5rem;
  --space-4: 2rem;
  --space-5: 5rem;
  --space-6: 5rem;
  --radius: 1rem;
  --archive-width: 72rem;
  --ease: cubic-bezier(0.2, 0.75, 0.2, 1);
  --speed: 720ms;
}


/* =========================
   GLOBAL STACKING SYSTEM
   =========================
   Main page-box order:
   1. About
   2. Portfolio surfaces
   3. Home / Hero
   4. Film bars

   CSS owns the scene order again.
   JS only toggles body classes such as `hero-mode`, `portfolio-active`,
   and `about-active` to decide which scene is visible.

   Supporting global UI:
   5. Split transition layer
   6. Site chrome
   7. Modal

   Each root below creates its own stacking context with `isolation: isolate`,
   so child z-index values stay local to that scene instead of fighting globally.
   The shared `--film-bar-size` value defines the visible window for full-bleed scenes
   and is also the value JS updates when it animates the film bars.
*/
#film-frame {
  z-index: 4;
}

.archive,
.site-footer {
  z-index: 2;
}

.hero {
  z-index: 3;
}

.about-section {
  z-index: 1;
}

.chrome {
  z-index: 6;
}

.modal {
  z-index: 7;
}

/* Base */
*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  -ms-overflow-style: none;
  scrollbar-width: none;
}

html::-webkit-scrollbar,
body::-webkit-scrollbar {
  display: none;
  width: 0;
  height: 0;
}

body {
  margin: 0;
  color: var(--text);
  font: 400 16px/1.45 var(--sans);
}

body.modal-open,
body.about-active {
  overflow: hidden;
}

body.hero-mode {
  overflow: hidden;
}

a,
button {
  color: inherit;
}

button {
  border: 0;
  padding: 0;
  background: none;
  font: inherit;
  cursor: pointer;
}

img,
video {
  display: block;
  max-width: 100%;
}

[hidden] {
  display: none !important;
}

.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;
}

a:focus-visible,
button:focus-visible {
  outline: 1px solid var(--accent);
  outline-offset: 0.3rem;
}

/* Shared type */
.section-label,
.project-index,
.project-meta,
.modal-details,
.brand,
.portfolio-link,
.about-link,
.socials a,
.footer-links a,
.filter-link,
.modal-close,
.site-footer-legal {
  font-family: var(--sans);
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.07em;
  text-transform: uppercase;
}

h1,
h2,
h3,
.about-copy {
  margin: 0;
  font-family: var(--serif);
  font-weight: 400;
  line-height: 0.95;
}

.section-label,
.project-index,
.project-meta,
.modal-details {
  color: var(--muted);
}

/* Shared text-link underline */
.brand,
.portfolio-link,
.about-link,
.socials a,
.footer-links a,
.filter-link,
.modal-close {
  position: relative;
  width: fit-content;
  text-decoration: none;
}

.brand::after,
.portfolio-link::after,
.about-link::after,
.socials a::after,
.footer-links a::after,
.filter-link::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -0.28rem;
  width: 100%;
  height: 1px;
  background: var(--accent);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 220ms ease;
}

.brand:hover::after,
.portfolio-link:hover::after,
.about-link:hover::after,
.socials a:hover::after,
.footer-links a:hover::after,
.filter-link:hover::after,
.filter-link.is-active::after {
  transform: scaleX(1);
}

/* Home / Hero Scene */
.hero {
  position: fixed;
  inset: 0;
  isolation: isolate;
  /* Soft mask reveal — scene edges feather into the solid black bars with no visible seam. */
  -webkit-mask-image: var(--film-bar-mask);
  mask-image: var(--film-bar-mask);
  color: #ffffff;
  transition: none;
}

.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.58), rgba(0, 0, 0, 0.16));
  pointer-events: none;
  transition: none;
}

.hero-video {
  position: relative;
  z-index: 0;
  width: 100%;
  height: 100%;
  background: #000000;
  object-fit: cover;
  transition: none;
}

.hero-overlay {
  position: absolute;
  top: 52%;
  left: clamp(1.5rem, 18vw, 16rem);
  right: clamp(1.5rem, 12vw, 12rem);
  /* Local hero layer: copy sits above the video and gradient, but only inside `.hero`. */
  z-index: 2;
  max-width: 38rem;
  text-align: left;
  transform: translateY(-50%);
  transition: none;
}

.hero-copy {
  max-width: 40rem;
}

.hero-meta {
  margin: 0 0 var(--space-2);
  color: rgba(255, 255, 255, 0.82);
}

.hero-title {
  margin: 0;
  font-family: var(--serif);
  font-weight: 400;
  line-height: 0.95;
  font-size: clamp(4rem, 10vw, 8rem);
  letter-spacing: -0.03em;
}

.hero-phrase {
  margin: var(--space-2) 0 var(--space-3);
  min-height: 1.5em;
  overflow: hidden;
  color: rgba(255, 255, 255, 0.9);
  font-size: clamp(1rem, 1.5vw, 1.2rem);
}

.hero-phrase span {
  display: inline-block;
  font-family: var(--serif);
  font-weight: 400;
  line-height: 0.95;
  transition: transform 260ms ease, opacity 260ms ease;
}

.hero-phrase span.is-out {
  opacity: 0;
  transform: translateX(-1rem);
}

.hero-phrase span.is-in {
  opacity: 0;
  transform: translateX(1rem);
}

.hero-summary {
  max-width: 35rem;
  margin: 0;
  color: rgba(255, 255, 255, 0.88);
  font-size: clamp(1rem, 1.15vw, 1.1rem);
  line-height: 1.7;
}

body.portfolio-active .hero,
body.about-active .hero {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

body.hero-mode .hero {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

@media (max-width: 900px) {
  :root {
    --film-bar-size: 10vh;
  }

  .hero-overlay {
    left: var(--space-3);
    right: var(--space-3);
  }

  .hero-copy {
    max-width: 34rem;
  }
}

@media (max-width: 680px) {
  .hero-overlay {
    top: 50%;
    left: var(--space-2);
    right: var(--space-2);
  }

  .hero-title {
    font-size: clamp(2.8rem, 11vw, 4.2rem);
  }

  .hero-summary {
    line-height: 1.6;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
  }
}

/* Portfolio / Archive Scene */
.archive {
  position: relative;
  /* Portfolio uses its own stacking context so card/meta z-index values stay local. */
  isolation: isolate;
  padding: 7.5rem var(--space-3) var(--space-6);
  background-image: var(--bg);
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  background-attachment: fixed;
  opacity: 0;
  pointer-events: none;
  transition: none;
}

.archive-head {
  display: flex;
  justify-content: space-between;
  gap: var(--space-3);
  width: min(100%, var(--archive-width));
  margin: 0 auto var(--space-5);
}

.filters {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-3);
}

body.portfolio-active .archive {
  opacity: 1;
  pointer-events: auto;
}

body.hero-mode .archive,
body.about-active .archive {
  opacity: 0;
  pointer-events: none;
}

/* Footer */
.site-footer {
  position: relative;
  /* Footer shares the portfolio layer because it is part of the same visible page state. */
  isolation: isolate;
  padding: 0 var(--space-3) var(--space-5);
  background-image: var(--bg);
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  background-attachment: fixed;
  opacity: 0;
  pointer-events: none;
  transition: none;
}

.site-footer-shell {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: var(--space-3);
  align-items: end;
  width: min(100%, var(--archive-width));
  margin: 0 auto;
  padding-top: var(--space-3);
  border-top: 1px solid rgba(17, 17, 17, 0.08);
}

.site-footer-copy,
.site-footer-meta {
  display: grid;
  gap: 0.5rem;
}

.site-footer-copy {
  max-width: 22rem;
}

.site-footer-meta {
  justify-items: end;
}

.site-footer-text,
.site-footer-legal {
  margin: 0;
  color: var(--muted);
}

.site-footer-text {
  font-size: 0.82rem;
  line-height: 1.6;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 0.65rem;
}

.footer-links a {
  color: var(--muted);
  transition: color 220ms ease;
}

.footer-links a:hover,
.footer-links a:focus-visible {
  color: var(--text);
}

body.portfolio-active .site-footer {
  opacity: 1;
  pointer-events: auto;
}

body.hero-mode .site-footer,
body.about-active .site-footer {
  opacity: 0;
  pointer-events: none;
}

/* Project list */
.projects {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: flex-start;
  gap: clamp(2.5rem, 5vw, 5rem) clamp(2rem, 4vw, 4rem);
  width: min(100%, var(--archive-width));
  min-height: 100vh;
  margin: 0 auto;
}

.projects.is-filtering {
  overflow: hidden;
  pointer-events: none;
}

.project-card {
  flex: 0 0 auto;
  transform-origin: center top;
  transition: transform 420ms var(--ease);
}

.project-card[data-aspect="16:9"] {
  width: min(21rem, 24vw);
}

.project-card[data-aspect="reel"] {
  width: min(11rem, 12vw);
}

/* Keep archive cards on a flat baseline with no stagger offset. */
.project-card,
.project-card.is-shifted,
.project-card:nth-child(3n) {
  margin-top: 0;
}

.project-open {
  display: grid;
  width: 100%;
  gap: var(--space-2);
  text-align: left;
}

.project-media {
  --index-space: 1rem;
  position: relative;
  padding-top: var(--index-space);
}

.project-frame {
  overflow: hidden;
  background: #d7d2cc;
  border-radius: 0;
}

.project-frame {
  aspect-ratio: 16 / 9;
  transition: transform 420ms var(--ease), box-shadow 420ms ease;
}

.project-card[data-aspect="reel"] .project-frame {
  aspect-ratio: 9 / 16;
}

.project-poster {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scale(1.01);
  transition: transform 420ms var(--ease);
}

.project-index {
  position: absolute;
  top: 0;
  left: 0;
  z-index: 1;
}

.project-meta {
  position: absolute;
  top: calc(50% + (var(--index-space) * 0.5));
  right: -0.55rem;
  white-space: nowrap;
  writing-mode: vertical-rl;
  transform: translate(100%, -50%) rotate(180deg);
}

.project-card[data-aspect="reel"] .project-meta {
  right: -0.45rem;
}

.project-copy {
  display: block;
}

.project-copy h3 {
  font-family: var(--sans);
  font-size: clamp(0.68rem, 1.4vw, 1.16rem);
  font-weight: 500;
  letter-spacing: -0.01em;
  line-height: 1.05;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.project-card[data-aspect="reel"] h3 {
  font-size: clamp(1rem, 1.6vw, 1.2rem);
}

.project-open:hover .project-frame,
.project-open:focus-visible .project-frame {
  transform: scaleX(1.06) scaleY(1.015);
  box-shadow: 0 1.2rem 2.6rem rgba(0, 0, 0, 0.08);
}

.project-open:hover .project-poster,
.project-open:focus-visible .project-poster {
  transform: scale(1.08);
}

/* Between-state overlay */
.in-between-hero-archive {
  position: fixed;
  inset: 0;
  z-index: 5;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #ffffff;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.2s ease;
}

body[data-scene-state="between-hero-portfolio"] .in-between-hero-archive,
body[data-scene-state="between-portfolio-about"] .in-between-hero-archive,
body[data-scene-state="between-about-hero"] .in-between-hero-archive {
  opacity: 1;
  pointer-events: auto;
}




.in-between-hero-archive.is-leaving {
  opacity: 0;
  pointer-events: none;
}

.in-between-hero-archive.is-between-about-hero {
  align-items: stretch;
  padding: 0;
}

.in-between-hero-archive.is-between-hero-portfolio {
  position: fixed;
  overflow: hidden;
}

/* Base panel — used by simple between states */
.between-state-panel {
  width: min(100%, 52rem);
  display: grid;
  gap: var(--space-2);
  justify-items: center;
  text-align: center;
  padding: var(--space-4);
}

/* Hero → Portfolio variant: media | divider | text */
.between-state-panel--hero-portfolio {
  width: min(100%, 90rem);
  grid-template-columns: 1fr auto 1fr;
  align-items: stretch;
  gap: 0;
  padding: 0;
  text-align: left;
  justify-items: stretch;
  overflow: hidden;
}

.between-state-divider {
  width: 1px;
  background: rgba(255, 255, 255, 0.08);
  align-self: stretch;
}

.between-state-media {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: var(--space-2);
  min-height: clamp(24rem, 52vh, 36rem);
  padding: clamp(2rem, 6vh, 5rem) clamp(2rem, 4vw, 4.5rem) clamp(2rem, 6vh, 5rem) 0;
}

.between-state-panel--hero-portfolio,
.between-state-media > * {
  position: relative;
  z-index: 1;
}

.between-flight-stage {
  position: absolute;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
  z-index: 0;
}

.between-flight-stars,
.between-flight-trail {
  position: absolute;
  inset: 0;
}

.between-flight-star {
  position: absolute;
  left: var(--sx);
  top: var(--sy);
  width: 0.4rem;
  height: 0.4rem;
  transform: translate(-50%, -50%);
  opacity: 0.28;
  animation: between-star-twinkle var(--st, 2.2s) ease-in-out infinite;
  animation-delay: var(--sd, 0s);
}

.between-flight-star::before,
.between-flight-star::after {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(255, 255, 255, 0.95);
  border-radius: 999px;
}

.between-flight-star::before {
  transform: scaleX(0.18);
}

.between-flight-star::after {
  transform: scaleY(0.18);
}

.between-flight-star--sm {
  width: 0.28rem;
  height: 0.28rem;
}

.between-flight-star--md {
  width: 0.42rem;
  height: 0.42rem;
}

.between-flight-star--lg {
  width: 0.7rem;
  height: 0.7rem;
}

.between-flight-trail {
  width: 100%;
  height: 100%;
  pointer-events: none;
}

.between-flight-brain,
.between-flight-rocket {
  position: absolute;
  transform-origin: center center;
  user-select: none;
  -webkit-user-drag: none;
}

.between-flight-brain {
  width: clamp(6rem, 11vw, 9rem);
  height: auto;
  opacity: 0;
  filter: drop-shadow(0 0 2rem rgba(255, 255, 255, 0.08));
}

.between-flight-rocket {
  width: clamp(2.5rem, 5vw, 4rem);
  height: auto;
  opacity: 0;
}

.between-state-logo-count {
  margin: 0;
  font-size: 0.65rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.25);
}

.between-state-text {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: clamp(1rem, 2.5vh, 1.75rem);
  padding: clamp(2rem, 6vh, 5rem) 0 clamp(2rem, 6vh, 5rem) clamp(2rem, 4vw, 4.5rem);
}

/* Portfolio → About variant: left/right split instead of stacked layout */
.between-state-panel--portfolio-about {
  position: relative;
  width: min(100%, 84rem);
  justify-items: stretch;
}

.between-state-split {
  width: 100%;
  display: grid;
  grid-template-columns: 1fr minmax(18rem, 24rem);
  align-items: center;
  gap: clamp(2rem, 5vw, 5rem);
}

.between-state-split-copy {
  display: grid;
  gap: var(--space-2);
  align-content: center;
  text-align: left;
}

.between-state-kicker {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin: 0;
  color: rgba(255, 255, 255, 0.35);
  font-size: 0.68rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.between-state-kicker::after {
  content: '';
  display: block;
  width: 2.5rem;
  height: 1px;
  background: rgba(255, 255, 255, 0.18);
}

.between-state-title {
  margin: 0;
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(3.5rem, 7vw, 6.5rem);
  line-height: 0.88;
  letter-spacing: -0.02em;
}

.between-state-copy {
  margin: 0;
  max-width: 28rem;
  color: rgba(255, 255, 255, 0.42);
  line-height: 1.7;
  font-size: 0.875rem;
}

/* Company logo grid — 4 columns, logos stagger in */
.company-logo-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  row-gap: clamp(1.25rem, 2.5vh, 2rem);
  column-gap: clamp(0.75rem, 1.5vw, 1.25rem);
  width: 100%;
  align-items: center;
  padding: var(--space-2) 0;
  border-top: 1px solid rgba(255, 255, 255, 0.07);
  border-bottom: 1px solid rgba(255, 255, 255, 0.07);
}

/* Logo flip + staggered text entrance are now driven by GSAP in
   js/between-state.js — JS sets the starting opacity inline and tweens
   the rest, so CSS only needs the visual styling here. */
.company-logo-item {
  width: 100%;
  height: auto;
  max-height: clamp(2.4rem, 3.8vw, 4.5rem);
  object-fit: contain;
  object-position: center;
  filter: brightness(0) invert(1);
  user-select: none;
  -webkit-user-drag: none;
}

@keyframes between-star-twinkle {
  0%, 100% { opacity: 0.2; transform: translate(-50%, -50%) scale(0.92); }
  50% { opacity: 0.85; transform: translate(-50%, -50%) scale(1.12); }
}

.between-state-content-slot {
  width: min(100%, 34rem);
  min-height: clamp(8rem, 18vw, 12rem);
  display: grid;
  place-items: center;
  padding: var(--space-3);
}

.between-state-content-slot--portfolio-about {
  width: min(100%, 36rem);
  min-height: clamp(28rem, 44vw, 34rem);
  align-self: stretch;
  justify-self: end;
  padding: clamp(1.1rem, 2vw, 1.35rem);
  place-items: stretch;
}

.between-about-slider {
  width: 100%;
  display: grid;
  grid-template-rows: 1fr auto;
  gap: 1rem;
  align-self: stretch;
}

.between-about-slider-media,
.between-about-slider-body {
  will-change: opacity, transform;
}

.between-about-slider-media {
  position: relative;
  max-height: clamp(16rem, 28vw, 22rem);
  overflow: hidden;
  border-radius: calc(var(--radius) - 0.2rem);
  background: rgba(255, 255, 255, 0.04);
}

.between-about-slider-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.between-about-slider-body {
  display: grid;
  gap: 0.65rem;
}

.between-about-slider-eyebrow,
.between-about-slider-status,
.between-about-slider-arrow {
  font-family: var(--sans);
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.between-about-slider-eyebrow {
  margin: 0;
  color: rgba(255, 255, 255, 0.48);
}

.between-about-slider-title {
  margin: 0;
  font-family: var(--serif);
  font-size: clamp(1.45rem, 2.5vw, 2.1rem);
  line-height: 0.98;
  letter-spacing: -0.02em;
}

.between-about-slider-copy {
  margin: 0;
  color: rgba(255, 255, 255, 0.66);
  font-size: 0.92rem;
  line-height: 1.65;
}

.between-about-slider-nav {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  gap: 1rem;
}

.between-about-slider-arrow {
  color: rgba(255, 255, 255, 0.52);
  transition: color 220ms ease, transform 220ms ease;
}

.between-about-slider-arrow:hover,
.between-about-slider-arrow:focus-visible {
  color: #ffffff;
}

.between-about-slider-arrow[data-between-about-prev]:hover,
.between-about-slider-arrow[data-between-about-prev]:focus-visible {
  transform: translateX(-0.08rem);
}

.between-about-slider-arrow[data-between-about-next]:hover,
.between-about-slider-arrow[data-between-about-next]:focus-visible {
  transform: translateX(0.08rem);
}

.between-about-slider-status {
  min-width: 3.8rem;
  margin: 0;
  color: rgba(255, 255, 255, 0.48);
}

/* ── Panel REC indicator ─────────────────────────────────── */
.panel-rec {
  position: absolute;
  top: 1rem;
  right: 1rem;
  display: flex;
  align-items: center;
  gap: 0.4rem;
  z-index: 10;
  pointer-events: none;
}

.panel-rec-dot {
  position: relative;
  width: 0.45rem;
  height: 0.45rem;
  border-radius: 50%;
  background: #e02020;
  flex-shrink: 0;
  animation: rec-blink 1.4s ease-in-out infinite;
}

.panel-rec-dot::after {
  content: "";
  position: absolute;
  inset: -0.22rem;
  border-radius: 50%;
  background: rgba(224, 32, 32, 0.4);
  animation: rec-ripple 1.4s ease-out infinite;
  pointer-events: none;
}

@keyframes rec-blink {
  0%, 100% { opacity: 1; }
  50%       { opacity: 0.2; }
}

@keyframes rec-ripple {
  0%   { transform: scale(1);   opacity: 0.5; }
  60%  { transform: scale(2.6); opacity: 0; }
  100% { transform: scale(2.6); opacity: 0; }
}

.panel-rec-label {
  font-family: var(--sans);
  font-size: 0.6rem;
  letter-spacing: 0.13em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.6);
}

/* ── Panel viewfinder corners ────────────────────────────── */
.panel-corner {
  position: absolute;
  width: 1.25rem;
  height: 1.25rem;
  z-index: 10;
  pointer-events: none;
}

.panel-corner--tl {
  top: 0;
  left: 0;
  border-top: 1.5px solid rgba(255, 255, 255, 0.4);
  border-left: 1.5px solid rgba(255, 255, 255, 0.4);
}

.panel-corner--tr {
  top: 0;
  right: 0;
  border-top: 1.5px solid rgba(255, 255, 255, 0.4);
  border-right: 1.5px solid rgba(255, 255, 255, 0.4);
}

.panel-corner--bl {
  bottom: 0;
  left: 0;
  border-bottom: 1.5px solid rgba(255, 255, 255, 0.4);
  border-left: 1.5px solid rgba(255, 255, 255, 0.4);
}

.panel-corner--br {
  bottom: 0;
  right: 0;
  border-bottom: 1.5px solid rgba(255, 255, 255, 0.4);
  border-right: 1.5px solid rgba(255, 255, 255, 0.4);
}

.between-terminal-footer {
  width: 100%;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--space-4) var(--space-3);
  color: #ffffff;
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", Menlo, monospace;
}

.between-terminal-window {
  width: min(100%, 56rem);
  display: flex;
  flex-direction: column;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 8px;
  background: rgba(0, 0, 0, 0.42);
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.45);
  overflow: hidden;
}

.between-terminal-header {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 0.7rem 1rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.03);
}

.between-terminal-dots {
  display: flex;
  gap: 0.42rem;
}

.between-terminal-dots span {
  width: 11px;
  height: 11px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.24);
}

.between-terminal-dots span:nth-child(1) { background: #ff5f56; }
.between-terminal-dots span:nth-child(2) { background: #ffbd2e; }
.between-terminal-dots span:nth-child(3) { background: #27c93f; }

.between-terminal-header-title {
  margin: 0;
  font-size: 0.78rem;
  color: rgba(255, 255, 255, 0.52);
  letter-spacing: 0.02em;
}

.between-terminal-body {
  padding: var(--space-3);
  display: grid;
  gap: 0.4rem;
  font-size: 0.95rem;
  line-height: 1.65;
}

.between-terminal-row {
  margin: 0;
  display: flex;
  align-items: baseline;
  gap: 0.65rem;
}

.between-terminal-prompt {
  color: var(--accent);
  flex-shrink: 0;
  font-weight: 600;
}

.between-terminal-command {
  color: rgba(255, 255, 255, 0.92);
  word-break: break-word;
}

.between-terminal-arrow {
  color: rgba(255, 255, 255, 0.36);
  flex-shrink: 0;
}

.between-terminal-output {
  color: rgba(255, 255, 255, 0.7);
  word-break: break-word;
}

.between-terminal-cursor {
  display: inline-block;
  width: 0.55em;
  height: 1.05em;
  background: rgba(255, 255, 255, 0.88);
  margin-left: 0.35rem;
  transform: translateY(0.18em);
  opacity: 0;
}

.between-terminal-cursor.is-blinking {
  animation: between-terminal-cursor-blink 0.95s steps(2, end) infinite;
}

@keyframes between-terminal-cursor-blink {
  0%, 100% { opacity: 0; }
  50%      { opacity: 1; }
}

@media (max-width: 900px) {
  .between-state-panel--hero-portfolio,
  .between-state-split {
    grid-template-columns: 1fr;
  }

  .between-state-panel--hero-portfolio,
  .between-state-split-copy {
    text-align: center;
  }

  .between-state-media {
    min-height: clamp(20rem, 44vh, 28rem);
    padding-right: 0;
  }

  .between-flight-stage {
    inset: 0;
  }

  .between-flight-brain {
    width: clamp(8rem, 30vw, 11rem);
  }

  .between-flight-rocket {
    width: clamp(1.8rem, 6vw, 2.5rem);
  }

  .between-state-content-slot--portfolio-about {
    width: 100%;
    min-height: 0;
    justify-self: stretch;
  }

  .in-between-hero-archive.is-between-about-hero {
    padding: 0;
  }

  .between-terminal-footer {
    padding: var(--space-3) var(--space-2);
  }

  .between-terminal-body {
    font-size: 0.85rem;
    padding: var(--space-2);
  }

  .between-terminal-header-title {
    font-size: 0.7rem;
  }

  .between-about-slider-media {
    min-height: clamp(14rem, 54vw, 18rem);
  }

}

/* About Scene */
.about-section {
  background-image: var(--bg);
  background-size: var(--bg-size);
  background-position: center;
  background-repeat: no-repeat;
  position: fixed;
  inset: 0;
  /* About is the highest page box and keeps its children local with an isolated stack. */
  isolation: isolate;
  -webkit-mask-image: var(--film-bar-mask);
  mask-image: var(--film-bar-mask);
  display: grid;
  align-items: center;
  padding: 7.5rem var(--space-3) var(--space-6);
  /* background:
    linear-gradient(to bottom, rgba(255, 255, 255, 0.72), rgba(247, 243, 237, 0.98)),
    var(--bg); */
  
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 420ms ease, visibility 420ms ease;
}

.about-shell {
  display: grid;
  grid-template-columns: minmax(12rem, 16rem) minmax(36rem, 48rem)  minmax(0, 34rem);
  justify-content: space-between;
  align-items: center;
  gap: clamp(3rem, 8vw, 9rem);
  max-width: 92rem;
  width: 100%;
  margin: 0 auto;
  transform: translateY(1.5rem);
  transition: transform 520ms var(--ease), opacity 420ms ease;
}

.about-rail {
  display: grid;
  gap: var(--space-2);
}

.about-nav {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
}

.about-arrow,
.about-status {
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.about-arrow {
  color: var(--muted);
  transition: color 220ms ease, transform 220ms ease;
}

.about-arrow:hover,
.about-arrow:focus-visible {
  color: var(--accent);
}

.about-arrow[data-about-prev]:hover,
.about-arrow[data-about-prev]:focus-visible {
  transform: translateX(-0.08rem);
}

.about-arrow[data-about-next]:hover,
.about-arrow[data-about-next]:focus-visible {
  transform: translateX(0.08rem);
}

.about-status {
  min-width: 3.5rem;
  color: var(--muted);
}

.about-photo-wrap {
  overflow: hidden;
  border-radius: 2px;
}

.about-photo {
  display: block;
  width: 100%;
  aspect-ratio: 3/4;
  object-fit: cover;
  transition: transform 360ms var(--ease), opacity 360ms ease;
}

/* Exit: current photo slides out in the direction of travel. */
.about-photo.is-exiting-left  { transform: translateX(-10%); opacity: 0; }
.about-photo.is-exiting-right { transform: translateX(10%);  opacity: 0; }

/* Enter-from: starting offset committed without transition so the slide-in
   animation has a position to move from. The class is removed one frame later. */
.about-photo.is-entering-right { transform: translateX(10%);  opacity: 0; transition: none; }
.about-photo.is-entering-left  { transform: translateX(-10%); opacity: 0; transition: none; }

.about-copy-wrap {
  max-width: 34rem;
  min-height: clamp(10rem, 30vh, 14rem);
}

.about-copy {
  font-size: clamp(1.2rem, 2.4vw, 1.9rem);
  line-height: 1.1;
}

.about-copy.is-typing::after {
  content: "";
  display: inline-block;
  width: 1px;
  height: 0.88em;
  margin-left: 0.12em;
  background: currentColor;
  vertical-align: -0.08em;
  animation: about-caret 850ms step-end infinite;
}

@keyframes about-caret {
  50% {
    opacity: 0;
  }
}

body.about-active .about-section {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

body.about-active .about-shell {
  transform: translateY(0);
}

/* Film Frame Component */
#film-frame {
  position: fixed;
  inset: 0;
  /* Global layer 1: the bars live behind every page box. */
  isolation: isolate;
  pointer-events: none;
}

#top-film-bar,
#bottom-film-bar {
  position: absolute;
  left: 0;
  width: 100%;
  /* Always rendered at max bar size; clip-path reveals only the visible slice.
     This keeps the element box static so height changes never trigger CLS. */
  height: 50vh;
  background: #000000;
  transition: none;
  will-change: clip-path;
}

#top-film-bar {
  top: 0;
  clip-path: inset(0 0 calc(100% - var(--film-bar-size)) 0);
}

#bottom-film-bar {
  right: 0;
  bottom: 0;
  overflow: hidden;
  transition: none;
  clip-path: inset(calc(100% - var(--film-bar-size)) 0 0 0);
}

#bottom-film-bar::after {
  content: none;
}

.companies-carousel-viewport {
  /* Auto-height; we position the content with `transform` so the box
     itself never resizes — keeps this element out of the CLS budget
     while still tracking the animated `--film-bar-size`. */
  position: absolute;
  left: 50%;
  bottom: 0;
  transform: translateX(-50%) translateY(calc(50% - var(--film-bar-size) / 2));
  width: min(100%, 68rem);
  display: grid;
  gap: clamp(0.8rem, 1.2vw, 1rem);
  opacity: 1;
  transition: opacity 0.6s ease;
  will-change: transform;
}

body:not([data-scene-state="hero"]) .companies-carousel-viewport {
  opacity: 0;
  pointer-events: none;
}

.companies-carousel-heading {
  text-align: center;
  margin: 0;
  color: rgba(255, 255, 255, 0.58);
  font-family: var(--sans);
  font-size: clamp(0.72rem, 0.85vw, 0.85rem);
  font-weight: 400;
  letter-spacing: 0.035em;
}

.companies-carousel-rows {
  display: grid;
  gap: clamp(0.8rem, 1.1vw, 1rem);
  justify-items: center;
}

.companies-carousel-lane {
  display: grid;
  grid-template-columns: repeat(var(--companies-count), clamp(7rem, 8.2vw, 8.5rem));
  justify-content: center;
  gap: 0;
  align-items: center;
}

.companies-carousel-logo {
  min-width: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  height: clamp(2rem, 2.3vw, 2.4rem);
  padding: 0 0.25rem;
}

.companies-carousel-image {
  width: auto;
  height: 100%;
  max-width: 100%;
  object-fit: contain;
  object-position: center;
  filter: invert(1) grayscale(1) brightness(0.92) contrast(1.04);
  transform: scale(var(--company-logo-scale, 1));
  transform-origin: center;
  opacity: 0.92;
  user-select: none;
  -webkit-user-drag: none;
}


/* Chrome */
body[data-scene-state="between-hero-portfolio"] .chrome-left,
body[data-scene-state="between-hero-portfolio"] .socials, 
body[data-scene-state="between-portfolio-about"] .socials,
body[data-scene-state="between-portfolio-about"] .chrome-left,
body[data-scene-state="between-about-hero"] .chrome-left,
body[data-scene-state="between-about-hero"] .socials {
  color: #ffffff;
}

body[data-scene-state="hero"] .socials,
body[data-scene-state="hero"] .chrome-left {
  color: #ffffff;
}





.chrome {
  position: fixed;
  inset: var(--space-3);
  /* Chrome is global UI above the page boxes, with its own local stack. */
  isolation: isolate;
  /* color: #ffffff; */
  pointer-events: none;
  transition: none;
}

.chrome-left,
.socials {
  position: absolute;
  top: 0;
  display: flex;
  align-items: center;
  gap: 0.65rem;
  pointer-events: auto;
}

.chrome-left {
  left: 0;
  gap: 0;
}

.portfolio-group,
.about-group {
  display: inline-flex;
  align-items: center;
  gap: 0;
  flex: 0 1 auto;
  max-width: 10rem;
  overflow: hidden;
  padding-bottom: 0.4rem;
  margin-bottom: -0.4rem;
  white-space: nowrap;
  opacity: 1;
  transform: translateX(0) scale(1);
  transform-origin: left center;
  transition: none;
}

.portfolio-group .nav-separator,
.about-group .nav-separator {
  margin-left: 0.65rem;
  margin-right: 0.65rem;
  transition: none;
}

.socials {
  right: 0;
}

.socials a {
  pointer-events: auto;
}

.nav-separator {
  opacity: 0.78;
  pointer-events: none;
  user-select: none;
}

body.portfolio-active .chrome {
  color: var(--text);
}

body.portfolio-active .portfolio-group {
  max-width: 0;
  opacity: 0;
  pointer-events: none;
  transform: translateX(-0.35rem) scale(0.96);
}

body.about-active .chrome {
  color: var(--text);
}

body.about-active .portfolio-group {
  max-width: 10rem;
  opacity: 1;
  pointer-events: auto;
  transform: translateX(0) scale(1);
}

body.about-active .about-group {
  max-width: 0;
  opacity: 0;
  pointer-events: none;
  transform: translateX(-0.35rem) scale(0.96);
}

body.about-active .about-link::after {
  transform: scaleX(1);
}

@media (max-width: 900px) {
  .archive-head {
    display: grid;
  }


  .about-shell {
    grid-template-columns: 1fr;
    gap: var(--space-4);
    align-items: flex-start;
  }

  .about-photo {
    aspect-ratio: 16/9;
  }

  .projects {
    gap: var(--space-4);
  }

  .project-card[data-aspect] {
    width: min(20rem, calc(50vw - 3rem));
    margin-top: 0;
  }
}

.home-play-button {
  color: #000000;
  width: 7rem;
  height: 7rem;
  background-color: #ffffff;
  z-index: 1;
  border-radius: 360px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: bold;
  font-size: 0.72rem;
  text-transform: uppercase;
  cursor: pointer;
  margin-top: var(--space-3);
  transition: 0.3s ease;

}
.home-play-button:hover{
  
  transition: 0.3s ease;
  transform: translateY(-6px) scale(1.02);
  box-shadow: 0 20px 40px rgba(0,0,0,0.4);
  font-weight: 800;
}

@media (max-width: 680px) {
  .chrome {
    inset: var(--space-2);
  }

  .socials {
    gap: 0.45rem;
  }

  .archive,
  .about-section,
  .site-footer {
    padding-right: var(--space-2);
    padding-left: var(--space-2);
  }

  .site-footer-shell {
    grid-template-columns: 1fr;
  }

  .site-footer-meta {
    justify-items: start;
  }

  .footer-links {
    justify-content: flex-start;
  }

  .about-copy-wrap {
    min-height: 9rem;
  }

  .projects {
    display: grid;
    grid-template-columns: 1fr;
  }

  .project-card[data-aspect] {
    width: 100%;
  }

  .project-copy {
    display: block;
  }

  .project-meta {
    position: static;
    display: block;
    margin-top: var(--space-1);
    writing-mode: horizontal-tb;
    transform: none;
  }

  .companies-carousel-viewport {
    display: none;
  }

  .home-play-button {
    width: 5rem;
    height: 5rem;
  }
}

@media (max-width: 480px) {
  .socials {
    display: none;
  }

  .chrome-left {
    width: 100%;
    justify-content: space-between;
  }

  .portfolio-group {
    margin-left: auto;
  }

  .between-state-copy {
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
  }

  .between-about-slider-copy {
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
  }

  .between-state-panel {
    padding: var(--space-3);
  }

  .between-state-title {
    font-size: clamp(2.2rem, 9vw, 3.5rem);
    line-height: 0.96;
  }

  .company-logo-grid {
    grid-template-columns: repeat(3, 1fr);
  }

  .about-section,
  .archive {
    padding-top: 5.5rem;
  }

  .about-copy-wrap {
    min-height: 6rem;
  }

  .about-copy {
    line-height: 1.15;
  }

  .between-terminal-footer {
    padding-bottom: var(--space-3);
    padding-left: var(--space-2);
    padding-right: var(--space-2);
  }

}

/* Modal */
.modal {
  position: fixed;
  inset: 0;
  isolation: isolate;
  display: grid;
  place-items: center;
  padding: 0;
}

.modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.94);
}

.modal-panel {
  position: relative;
  display: grid;
  place-items: center;
  width: 100vw;
  height: 100vh;
  max-height: none;
  overflow: hidden;
  padding: 0;
  background: transparent;
  border-radius: 0;
}

.modal-close {
  position: fixed;
  top: var(--space-3);
  right: var(--space-3);
  z-index: 1;
  color: #ffffff;
  font-size: 0.82rem;
}

.modal-embed,
.modal-video {
  width: min(92vw, 92rem);
  max-height: 88vh;
  border: 0;
  aspect-ratio: 16 / 9;
  background: #000000;
}

.modal-video {
  object-fit: contain;
}

.modal-meta {
  display: none;
}


.scroll-line {
  display: contents;
  position: absolute;
  top: 0;
  right: 0;
  width: 100%;
  height: 100vh;
}
.scroll-indicator {
  position: absolute;
  right: 0;
  padding: 2px;
  height: 100vh;
  background-color: #000000;
  transform: translateX(-300px);
}
.scroll-ball,.scroll-circle,.scroll-circle-2 {
  position: absolute;
  right: 0;
  padding: 7px;
  height: 7px;
  border-radius: 50%;
  background-color: #ff0000;
  /* transform: translateY(-10px) translateX(-295px); */
}




.li-underline, .li-overline{
  display: none;
  background-color: #000000;
}
.li-underline{
  position: absolute;
  padding: 1px;
  transform: translateX(101em) translateY(10em);
  left:0
}

.li-overline{
  position: absolute;
  padding: 1px;
  transform: translateX(112em) translateY(10em);
  transform-origin: bottom;
}


.scroll-ball {
  transform: translateY(-10px) translateX(-295px);
}

.scroll-circle,.scroll-circle-2 {
  transform: translateY(-6.9px)



}

.archive-list {
  position: absolute;
  top: 0;
  left: calc(100% - 260px);
  width: 140px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.archive-list li {
  position: absolute;
  transform: translateY(200px);
  margin: 0;
}

.archive-list li:nth-child(1) {
  top: 40px;
}

.archive-list li:nth-child(2) {
  top: 360px;
}

.archive-list li:nth-child(3) {
  top: 680px;
}

.li1 {
  color: grey;
  opacity: 0.2;
}

.li2 {
  color: grey;
  opacity: 0.2;
}

.li3 {
  color: grey;
  opacity: 0.2;
}


@media (max-width: 1900px) {
  .scroll-line {
    display: none;
  }

}
/* @media (min-width: 891px) and (max-width: 1900px) {
  .scroll-indicator {
    transform: translateX(-1600px);
    margin-left: 500px;
  }
  
} */




@media (max-width: 680px) {
  .modal {
    padding-right: var(--space-2);
    padding-left: var(--space-2);
  }

  .modal-close {
    top: var(--space-2);
    right: var(--space-2);
  }
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation: none !important;
    transition-duration: 1ms !important;
  }
}

