/* ── Base ── */
/* Background lives on html so the wave canvas (inside body) isn't blocked */
html {
  background-color: var(--color-bg);
  transition: background-color 0.4s var(--ease);
}

body {
  font-family: var(--font-serif);
  font-size: var(--text-base);
  font-weight: var(--weight-light);
  color: var(--color-text);
  background-color: transparent;
  transition: color 0.4s var(--ease);
  overflow-x: hidden;
  position: relative;
  /* establishes stacking context for z-index children */
  text-align: left;
  /* Site-wide left alignment */
}

/* ── Container ── */
.container {
  max-width: var(--container-max);
  margin-inline: auto;
  padding-inline: var(--container-pad);
}

/* ── Label — mono, small caps ── */
.label {
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  font-weight: var(--weight-regular);
  letter-spacing: var(--tracking-wider);
  text-transform: uppercase;
  color: var(--color-accent);
}

/* ── Section ── */
.section {
  padding-block: var(--space-16);
}

@media (max-width: 768px) {
  .section {
    padding-block: var(--space-12);
  }
}

/* Work has its own bar at top — extra top margin for breathing room */
.work.section {
  padding-block: 0;
  margin-top: var(--space-24);
}

/* Logo marquee sits between sep and work — equal spacing top & bottom */
.logo-marquee {
  margin-top: var(--space-24);
}

.work__list-wrap {
  padding-block: var(--space-12) var(--space-16);
}

.section__header {
  display: flex;
  align-items: center;
  gap: var(--space-6);
  margin-bottom: var(--space-8);
}

.section__line {
  flex: 1;
  height: 1px;
  background: rgba(255, 102, 0, 0.45);
  transform-origin: left;
  transform: scaleX(0);
}

/* ── Type Separator ── */
.type-sep {
  overflow: hidden;
  padding-block: clamp(0.75rem, 1.5vw, 1.5rem);
}

.type-sep.is-hidden {
  display: none;
}

.type-sep__text {
  display: block;
  font-family: var(--font-serif);
  font-size: clamp(6rem, 18vw, 20rem);
  font-weight: var(--weight-light);
  font-style: italic;
  line-height: 0.9;
  letter-spacing: -0.03em;
  color: rgba(255, 255, 255, 0.10);
  text-wrap-style: 0;
  white-space: nowrap;
  user-select: none;
  will-change: transform;
  transform: translateX(0);
  padding-right: 4rem;
}

/* Center the big static separators (Get in Touch, Selected Work, etc.).
   Marquee separators scroll and must stay left-anchored, so exclude them. */
.type-sep:not(.is-marquee) { text-align: center; }
.type-sep:not(.is-marquee) .type-sep__text,
.type-sep:not(.is-marquee) .sep5-hl {
  text-align: center;
  padding-right: 0;
}

/* ── sep-5 "Get in Touch" — cursor spotlight ── */
#sep-5 {
  cursor: default;
  display: grid; /* stack base + highlight in the same cell */
}

#sep-5 .type-sep__text {
  grid-area: 1 / 1;
  transition: filter 0.5s var(--ease);
}

#sep-5:hover .type-sep__text {
  filter: blur(3px);
}

/* Highlight layer — cloned by JS, beige radial gradient fill at cursor */
.sep5-hl {
  grid-area: 1 / 1;
  display: block;
  font-family: var(--font-serif);
  font-size: clamp(6rem, 18vw, 20rem);
  font-weight: var(--weight-light);
  font-style: italic;
  line-height: 0.9;
  letter-spacing: -0.03em;
  white-space: nowrap;
  padding-right: 4rem;
  user-select: none;
  pointer-events: none;
  color: transparent;
  -webkit-background-clip: text;
  background-clip: text;
  background-image: radial-gradient(
    ellipse 340px 200% at var(--spot-x, -9999px) 50%,
    #f0ebe1 5%,
    transparent 62%
  );
  opacity: 0;
  transition: opacity 0.35s var(--ease);
}

#sep-5:hover .sep5-hl {
  opacity: 1;
}

/* ── sep-3 "Selected Work" — flowing orange liquid (WebGL) ──
   The liquid orange distortion is rendered on a GPU fragment shader
   (see sep3-chrome.js) instead of an SVG turbulence filter. SVG filters
   are CPU-rasterized every frame and stutter in Safari; a WebGL shader
   is hardware-accelerated and stays at 60fps everywhere.

   • .type-sep__text — real text, kept for SEO/accessibility. Shown as a
     dim outline as the no-WebGL fallback; hidden once the canvas is live.
   • .sep3-gl        — the WebGL canvas, absolutely filling the box.

   overflow:visible + padding gives the big italic glyphs vertical room
   so nothing is clipped at the bottom edge. */
#sep-3.is-water {
  position: relative;
  overflow: visible;
  display: block;
  padding-block: clamp(1.5rem, 4vw, 3.5rem);
}

#sep-3.is-water .type-sep__text {
  line-height: 1;
  transition: opacity .4s var(--ease);
}

/* When the shader is running, the canvas is the visual — fade the DOM
   text out (it still occupies layout height to size the box). */
#sep-3.is-water.gl-active .type-sep__text {
  opacity: 0;
}

#sep-3 .sep3-gl {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
  pointer-events: none;
  user-select: none;
}

@media print {
  #sep-3 .sep3-gl { display: none; }
  #sep-3.is-water.gl-active .type-sep__text { opacity: 1; }
}

/* ── Marquee separator (sep-1) ── */
.type-sep.is-marquee {
  padding-block: 0.75rem;
  border-top: 1px solid var(--color-border);
  border-bottom: 1px solid var(--color-border);
}

.type-sep__track {
  display: flex;
  align-items: center;
  width: max-content;
  will-change: transform;
}

/* Override huge base styles for the marquee variant */
.type-sep.is-marquee .type-sep__text {
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  font-style: normal;
  font-weight: 400;
  line-height: 1;
  letter-spacing: var(--tracking-wider);
  text-transform: uppercase;
  color: var(--color-text-muted);
}

/* Dot divider between repetitions */
.type-sep.is-marquee .type-sep__text::after {
  content: ' /';
  margin-left: 0.4em;
  opacity: 0.4;
}

/* Large serif marquee variant — keeps scroll behaviour, restores big type */
.type-sep.is-marquee.is-marquee--large {
  padding-block: 0;
  border-top: none;
  border-bottom: none;
}

.type-sep.is-marquee.is-marquee--large .type-sep__text {
  font-family: var(--font-serif);
  font-size: clamp(6rem, 18vw, 20rem);
  font-style: italic;
  font-weight: var(--weight-light);
  line-height: 0.9;
  letter-spacing: -0.03em;
  text-transform: none;
  color: rgba(255, 255, 255, 0.10);
  padding-right: clamp(3rem, 6vw, 8rem);
}

.type-sep.is-marquee.is-marquee--large .type-sep__text::after {
  content: none;
}

/* ── Hero ── */
.hero {
  position: relative;
  width: 100%;
  height: 100svh;
  min-height: 600px;
  overflow: hidden;
  display: grid;
  align-content: center;
  padding-top: calc(var(--nav-height) + var(--space-16));
  padding-bottom: var(--space-16);
  pointer-events: none;
  /* Force black bg while video loads */
  background: #000;
}

.hero a,
.hero button {
  pointer-events: auto;
}

/* Full-screen video background */
.hero__video-wrap {
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
}

.hero__video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center center;
  display: block;
}

/* Gradient overlay — subtle vignette, video stays bright */
.hero__overlay {
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background:
    linear-gradient(to bottom,
      rgba(0,0,0,0.28) 0%,
      rgba(0,0,0,0.05) 40%,
      rgba(0,0,0,0.38) 100%
    );
}

/* Text layer */
.hero__inner {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: var(--space-12);
  /* Mirror .nav__inner alignment */
  justify-self: center;
  width: 100%;
  max-width: var(--container-max);
  padding-inline: var(--container-pad);
  /* Force light text regardless of theme toggle state */
  color: #f4f3ef;
}

.hero__label {
  color: rgba(244, 243, 239, 0.55);
}

.hero__headline {
  font-family: var(--font-serif);
  font-size: var(--text-hero);
  font-weight: var(--weight-light);
  line-height: var(--leading-tight);
  letter-spacing: -0.025em;
  font-style: italic;
  text-align: left;
  white-space: pre-line;
  color: #f4f3ef;
}

.hero__scroll {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  color: rgba(244, 243, 239, 0.5);
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  letter-spacing: var(--tracking-wide);
}

.hero__scroll-arrow {
  width: 16px;
  height: 16px;
}

@media (max-width: 768px) {
  .hero {
    height: 100svh;
    min-height: 500px;
    align-content: flex-end;
    padding-bottom: var(--space-12);
  }
}

/* Thin outline rectangle — overlaps circle, slight off-axis */
.geo-rect-frame {
  width:  clamp(170px, 26vw, 360px);
  height: clamp(210px, 32vw, 440px);
  border: 1px solid rgba(244, 243, 239, 0.08);
  background: transparent;
  right: 6%;
  top: 7%;
}

/* Rotated square — diamond accent */
.geo-diamond {
  width:  clamp(65px, 9.5vw, 135px);
  height: clamp(65px, 9.5vw, 135px);
  background: #262622;
  transform: rotate(45deg);
  right: 30%;
  top:  60%;
}

/* Small circle outline — floating accent */
.geo-circle-ring {
  width:  clamp(52px, 7.5vw, 100px);
  height: clamp(52px, 7.5vw, 100px);
  border-radius: 50%;
  border: 1.5px solid rgba(244, 243, 239, 0.13);
  background: transparent;
  right: 43%;
  top:  16%;
}

/* Arc — open bottom half-circle */
.geo-arc {
  width:  clamp(160px, 24vw, 340px);
  height: clamp(80px,  12vw, 170px);
  border: 1px solid rgba(244, 243, 239, 0.07);
  border-top: none;
  border-radius: 0 0 999px 999px;
  background: transparent;
  right: 11%;
  top:  46%;
}

/* Horizontal accent lines */
.geo-line-h1 {
  width:  clamp(110px, 19vw, 290px);
  height: 1px;
  background: rgba(244, 243, 239, 0.09);
  right: 5%;
  top:  73%;
}

.geo-line-h2 {
  width:  clamp(55px, 9vw, 140px);
  height: 1px;
  background: rgba(244, 243, 239, 0.05);
  right: 28%;
  top:  85%;
}

/* Vertical accent line */
.geo-line-v1 {
  width:  1px;
  height: clamp(75px, 12vw, 180px);
  background: rgba(244, 243, 239, 0.06);
  right: 27%;
  top:  54%;
}

/* Dot grid */
.geo-dots {
  width:  clamp(60px, 8.5vw, 115px);
  height: clamp(60px, 8.5vw, 115px);
  background-image: radial-gradient(circle, rgba(244, 243, 239, 0.18) 1.5px, transparent 1.5px);
  background-size: 13px 13px;
  right: 20%;
  top:   9%;
}

/* Small solid square */
.geo-sq-sm {
  width:  clamp(18px, 2.6vw, 38px);
  height: clamp(18px, 2.6vw, 38px);
  background: #2a2a28;
  right: 13%;
  top:  29%;
}

@media (max-width: 768px) {
  .geo-circle-main  { right: -14%; top: -8%; }
  .geo-rect-frame   { right: 2%;   top: 4%;  }
  .geo-diamond      { right: 22%;  top: 55%; }
  .geo-circle-ring  { right: 36%;  top: 12%; }
  .geo-arc          { right: 4%;   top: 44%; }
  .geo-dots         { right: 14%;  top: 6%;  }
  .geo-sq-sm        { right: 8%;   top: 26%; }
}

/* ── About ── */
.about__grid {
  display: grid;
  grid-template-columns: 1fr 1.5fr;
  gap: var(--space-16);
  align-items: start;
  margin-top: 50px;   /* extra breathing room below the "01 About" header */
}

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

  .about__photo-col {
    max-width: 320px;
  }
}

.about__photo-wrap {
  aspect-ratio: 3 / 4;
  overflow: hidden;
  border-radius: 3px;
  will-change: transform;
}

.about__photo {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.about__statement {
  font-family: var(--font-serif);
  font-size: var(--text-xl);
  font-weight: var(--weight-light);
  line-height: var(--leading-tight);
  letter-spacing: -0.02em;
  font-style: italic;
  margin-bottom: var(--space-8);
}

.about__bio {
  font-family: var(--font-sans);
  font-size: var(--text-sm);
  font-weight: var(--weight-regular);
  color: var(--color-text-muted);
  line-height: var(--leading-loose);
  max-width: 52ch;
  margin-bottom: var(--space-12);
}

.about__stats {
  display: flex;
  gap: var(--space-12);
  margin-bottom: var(--space-12);
  flex-wrap: wrap;
}

.about__stat {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.about__stat-num {
  font-family: var(--font-serif);
  font-size: clamp(2rem, 4vw, 3.5rem);
  font-weight: var(--weight-light);
  line-height: 1;
  letter-spacing: -0.03em;
}

.about__stat-label {
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  color: var(--color-text-muted);
  letter-spacing: var(--tracking-wide);
  text-transform: uppercase;
}

.about__cta {
  display: inline-flex;
  align-items: center;
  gap: var(--space-3);
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  letter-spacing: var(--tracking-wider);
  text-transform: uppercase;
  border-bottom: 1px solid var(--color-text);
  padding-bottom: 4px;
  transition: opacity 0.3s;
}

.about__cta svg {
  width: 14px;
  height: 14px;
  transition: transform 0.35s var(--ease);
}

.about__cta:hover {
  opacity: 0.5;
}

.about__cta:hover svg {
  transform: translate(3px, -3px);
}

/* ── Info services (full-width layout) ── */
.info__services {
  display: flex;
  flex-direction: column;
}

/* ── Awards list (mirrors .project rows) ── */
.awards__list {
  display: flex;
  flex-direction: column;
}

.award {
  border-bottom: 1px solid var(--color-border);
  cursor: pointer;
  overflow: visible;
}

.award:first-child {
  border-top: 1px solid var(--color-border);
}

.award__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--space-6) 0;
  gap: var(--space-6);
  transition: opacity 0.2s;
}

.award:hover .award__inner {
  opacity: 0.6;
}

.award__left {
  display: flex;
  align-items: center;
  gap: var(--space-6);
  flex: 1;
}

.award__num {
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  color: var(--color-text-muted);
  letter-spacing: var(--tracking-wide);
  min-width: 2rem;
}

.award__info {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.award__name {
  font-family: var(--font-serif);
  font-size: var(--text-base);
  font-weight: var(--weight-light);
  font-style: italic;
}

.award__tags {
  display: flex;
  gap: var(--space-2);
  flex-wrap: wrap;
}

.award__right {
  display: flex;
  align-items: center;
  gap: var(--space-4);
}

.award__year {
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  color: var(--color-text-muted);
  font-variant-numeric: tabular-nums;
}

.award__arrow {
  width: 16px;
  height: 16px;
  color: var(--color-text-muted);
  transition: transform 0.35s var(--ease);
}

.award:hover .award__arrow {
  transform: translate(3px, -3px);
}

/* Drawer — same grid trick as .project__drawer */
.award .project__drawer {
  display: grid;
  grid-template-rows: 0fr;
  transition: grid-template-rows 0.45s var(--ease);
}

.award:hover .project__drawer,
.award.is-open .project__drawer {
  grid-template-rows: 1fr;
}

@media (max-width: 600px) {
  .award__year {
    display: none;
  }
}

/* ── Work bar ── */
.work__bar {
  border-bottom: 1px solid var(--color-border);
  margin-bottom: 0;
}

.work__bar-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-block: var(--space-4);
}

.work__view-toggle {
  display: flex;
  align-items: center;
  gap: 2px;
  padding: 3px;
  border: 1px solid var(--color-border);
  border-radius: 6px;
}

.work__view-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 12px;
  border-radius: 4px;
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  letter-spacing: var(--tracking-wide);
  text-transform: uppercase;
  color: var(--color-text-muted);
  background: transparent;
  border: none;
  transition: background 0.2s, color 0.2s;
  cursor: pointer;
}

.work__view-btn.is-active {
  background: var(--color-text);
  color: var(--color-bg);
}

.work__arrows {
  display: flex;
  gap: var(--space-2);
}

.work__arrow {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 1px solid rgba(255, 102, 0, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--color-accent);
  background: transparent;
  transition: background 0.2s, color 0.2s, border-color 0.2s;
  cursor: pointer;
}

.work__arrow:hover {
  background: var(--color-accent);
  color: var(--color-bg);
  border-color: var(--color-accent);
}

.work__bar-label {
  min-width: 4rem;
  text-align: right;
}

/* ── Work view switching ── */
.work[data-view="slider"] .work__list-wrap {
  display: none;
}

.work[data-view="list"] .projects-slider-wrap {
  display: none;
}

.work[data-view="list"] .work__arrows {
  opacity: 0.3;
  pointer-events: none;
}

/* ── Projects Slider ── */
.projects-slider-wrap {
  overflow-x: auto;
  overflow-y: hidden;
  scrollbar-width: none;
  width: 100%;
}

.projects-slider-wrap::-webkit-scrollbar {
  display: none;
}

.projects-slider {
  display: flex;
  height: 72vh;
  min-height: 480px;
  gap: 2px;
  background: #0a0a09;
  transition: none;
}

.project-slide {
  flex: 1;
  position: relative;
  overflow: hidden;
  cursor: pointer;
  transition: flex 0.65s cubic-bezier(0.4, 0, 0.2, 1);
  min-width: 48px;
}

.projects-slider:hover .project-slide {
  flex: 0.35;
}

.project-slide:hover {
  flex: 5 !important;
}

.project-slide__bg {
  position: absolute;
  inset: 0;
  overflow: hidden;
}

.project-slide__bg img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  /* Covers stay fully black & white — colour is revealed only in the modal. */
  filter: grayscale(100%);
  transition: filter 0.5s, transform 0.65s cubic-bezier(0.4, 0, 0.2, 1);
  transform: scale(1.05);
}

.project-slide:hover .project-slide__bg img {
  filter: grayscale(100%);
  transform: scale(1);
}

.project-slide__overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to bottom,
      rgba(0, 0, 0, 0.25) 0%,
      rgba(0, 0, 0, 0.1) 40%,
      rgba(0, 0, 0, 0.65) 100%);
  transition: background 0.4s;
}

.projects-slider:hover .project-slide:not(:hover) .project-slide__overlay {
  background: rgba(0, 0, 0, 0.55);
}

.project-slide__content {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 1.25rem;
  color: #f4f3ef;
}

.project-slide__top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
}

.project-slide__cat {
  font-family: var(--font-mono);
  font-size: 0.62rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: rgba(244, 243, 239, 0.6);
  writing-mode: vertical-rl;
  transform: rotate(180deg);
  opacity: 0;
  transition: opacity 0.4s 0.1s;
  white-space: nowrap;
}

.project-slide:hover .project-slide__cat {
  opacity: 1;
}

.project-slide__num {
  font-family: var(--font-mono);
  font-size: 0.62rem;
  letter-spacing: 0.1em;
  color: rgba(244, 243, 239, 0.5);
}

.project-slide__bottom {
  overflow: hidden;
}

.project-slide__name {
  font-family: var(--font-serif);
  font-size: clamp(1.4rem, 2.5vw, 2.8rem);
  font-weight: var(--weight-light);
  font-style: italic;
  line-height: 1.1;
  color: #f4f3ef;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  transform: translateY(8px);
  opacity: 0.85;
  transition: opacity 0.4s, transform 0.4s;
}

.project-slide:hover .project-slide__name {
  opacity: 1;
  transform: translateY(0);
}

.project-slide__year {
  font-family: var(--font-mono);
  font-size: 0.62rem;
  color: rgba(244, 243, 239, 0.4);
  margin-top: 4px;
  opacity: 0;
  transition: opacity 0.4s 0.05s;
}

.project-slide:hover .project-slide__year {
  opacity: 1;
}

@media (max-width: 600px) {
  .projects-slider {
    height: 55vh;
    min-height: 320px;
  }

  .project-slide__name {
    font-size: 1.1rem;
  }
}

/* ── Contact ── */
.contact__body {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: var(--space-8);
  padding-bottom: var(--space-32);
}

.contact__tagline {
  font-family: var(--font-serif);
  font-size: var(--text-xl);
  font-weight: var(--weight-light);
  font-style: italic;
  line-height: var(--leading-tight);
  letter-spacing: -0.02em;
}

/* ── Footer ── */
.footer {
  border-top: 1px solid var(--color-border);
  padding-block: var(--space-6);
}

.footer__inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: var(--space-4);
}

@media (max-width: 480px) {
  .footer__inner {
    flex-direction: column;
    align-items: flex-start;
  }
}

.footer__copy,
.footer__built {
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  color: var(--color-text-muted);
  letter-spacing: var(--tracking-wide);
}