/* ── Local ITC Garamond (matches case-study.css) ── */
@font-face {
  font-family: 'ITC Garamond Std';
  font-style: italic;
  font-weight: 300;
  src: local('ITC Garamond Std Light Narrow Italic'),
       local('ITCGaramondStd-LtNarrIt'),
       local('ITC Garamond Std Light Italic');
}

:root {
  --brand-teal: #58F0E0;
  --brand-teal-deep: #178B84;
  --brand-blue: #5271ED;
  --brand-aqua: #52EDE2;
  --menu-spring: cubic-bezier(0.16, 1, 0.3, 1);
  color-scheme: dark;
}

@property --view-switch-shine-angle {
  syntax: "<angle>";
  initial-value: 0deg;
  inherits: false;
}

@supports (animation-timing-function: linear(0, 1)) {
  :root {
    --menu-spring: linear(
      0 0%,
      0.0014 0.515%,
      0.0055 1.03%,
      0.0239 2.235%,
      0.053 3.44%,
      0.0961 4.81%,
      0.1957 7.39%,
      0.4354 12.88%,
      0.5484 15.63%,
      0.6494 18.38%,
      0.7362 21.13%,
      0.8083 23.88%,
      0.8696 26.8%,
      0.9168 29.72%,
      0.9368 31.265%,
      0.9536 32.81%,
      0.9793 35.9%,
      0.997 39.17%,
      1.0084 42.77%,
      1.0142 47.07%,
      1.0144 53.43%,
      1.0054 68.37%,
      1.0019 77.3%,
      0.9998 99.98%
    );
  }
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html, body { height: 100%; }
body { background: #fff; overflow: hidden; }

.porto { position: fixed; inset: 0; overflow: hidden; background: #fff; opacity: 0; }
.page-section { position: absolute; inset: 0; overflow: visible; pointer-events: none; }
.page-section.is-active { pointer-events: none; }
.page-section:not(.is-active) .proj-card { pointer-events: none; }
.page-section.is-active .proj-card { pointer-events: auto; cursor: none; }

@media (min-width: 901px) {
  /* The two visible neighbour cards act as previous/next navigation targets. */
  .page-section:not(.is-active) .proj-card {
    pointer-events: auto;
    cursor: pointer;
  }
}

/* Fluid stage — renders identically at 1440px, adapts below/above it */
.section-inner {
  position: absolute;
  left: 0;
  right: 0;
  top: 50%;
  height: 900px;
  transform: translateY(-50%);
}

/* ── Scan grid: crosshair + focus frame tracking the active proj-card ──
   home.js positions the vertical lines, horizontal lines, and focus frame to match
   the card's live getBoundingClientRect(); it scales the focus ~20% larger
   mid-transition, then settles back onto the next card. */
.scan-grid { position: fixed; inset: 0; z-index: 0; pointer-events: none; }
.scan-line { position: absolute; background: rgba(34,32,32,0.10); }
.scan-line-v1, .scan-line-v2 { top: 0; bottom: 0; width: 1px; }
.scan-line-h1, .scan-line-h2 { left: 0; right: 0; height: 1px; }

.scan-focus { position: absolute; }
.scan-corner { position: absolute; width: 26px; height: 26px; }
/* offset outside the card edge — the opaque card sits above the scan-grid and would hide a flush-mounted bracket */
.scan-corner-tl { top: -10px; left: -10px; border-top: 2px solid rgba(34,32,32,0.7); border-left: 2px solid rgba(34,32,32,0.7); }
.scan-corner-tr { top: -10px; right: -10px; border-top: 2px solid rgba(34,32,32,0.7); border-right: 2px solid rgba(34,32,32,0.7); }
.scan-corner-bl { bottom: -10px; left: -10px; border-bottom: 2px solid rgba(34,32,32,0.7); border-left: 2px solid rgba(34,32,32,0.7); }
.scan-corner-br { bottom: -10px; right: -10px; border-bottom: 2px solid rgba(34,32,32,0.7); border-right: 2px solid rgba(34,32,32,0.7); }

.vignette-radial {
  position: fixed;
  inset: 0;
  z-index: 50;
  pointer-events: none;
  background:
    linear-gradient(to bottom, rgba(255,255,255,0.92) 0%, rgba(255,255,255,0) 18%),
    linear-gradient(to top,    rgba(255,255,255,0.92) 0%, rgba(255,255,255,0) 18%),
    linear-gradient(to right,  rgba(255,255,255,0.92) 0%, rgba(255,255,255,0) 18%),
    linear-gradient(to left,   rgba(255,255,255,0.92) 0%, rgba(255,255,255,0) 18%);
}

/* ── Navbar ── */
.navbar {
  position: fixed; top: 0; left: 0; right: 0;
  display: flex; align-items: center; justify-content: space-between;
  padding: 16px 56px; z-index: 1000;
  isolation: isolate;
}
.navbar::before {
  content: "";
  position: absolute;
  inset: 0 0 -32px;
  z-index: -1;
  pointer-events: none;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  mask-image: linear-gradient(
    to bottom,
    #000 0%,
    rgba(0, 0, 0, 0.92) 38%,
    rgba(0, 0, 0, 0.45) 70%,
    transparent 100%
  );
  -webkit-mask-image: linear-gradient(
    to bottom,
    #000 0%,
    rgba(0, 0, 0, 0.92) 38%,
    rgba(0, 0, 0, 0.45) 70%,
    transparent 100%
  );
}
/* Case-study overlay has its own close/back button + pagination in the same corners */
body.cs-open .navbar { display: none; }
.navbar-left { display: flex; align-items: center; }
.logo { position: relative; width: 40px; height: 40px; flex-shrink: 0; }
.logo img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: contain;
  transform: scale(1.25);
  transform-origin: center;
}

.navbar-right { display: flex; align-items: center; }

.menu-button {
  position: relative;
  width: 100px;
  height: 47px;
  flex: 0 0 100px;
  appearance: none;
  border: 0;
  padding: 0;
  background: transparent;
  color: #fff;
  cursor: pointer;
  font: inherit;
  transform: translate3d(0, 0, 0);
  transition: transform 800ms var(--menu-spring);
  will-change: transform;
}
.menu-button-shape {
  position: absolute;
  inset: 0;
  display: block;
  width: 100px;
  height: 47px;
  opacity: 1;
  transition: opacity 160ms ease 600ms;
}
.menu-button-shape img {
  position: absolute;
  inset: 0;
  display: block;
  width: 100px;
  height: 47px;
}
.menu-button-shape-hover {
  opacity: 0;
  transition: opacity 160ms ease;
}
.menu-button:is(:hover, :focus-visible) .menu-button-shape-hover { opacity: 1; }
.menu-button:focus-visible { outline: none; }
.menu-button[aria-expanded="true"] {
  transform: translate3d(-24px, 60px, 0);
}
.menu-button[aria-expanded="true"] .menu-button-shape {
  opacity: 0;
  transition-delay: 60ms;
}
.menu-button-content {
  position: absolute;
  top: 12px;
  left: 12px;
  display: grid;
  grid-template-columns: 16px max-content;
  grid-template-areas: "icon label";
  column-gap: 8px;
  align-items: start;
  pointer-events: none;
}
.menu-button[aria-expanded="true"] .menu-button-content {
  right: 0;
  left: auto;
  grid-template-columns: max-content 16px;
  grid-template-areas: "label icon";
}
.menu-button-icon {
  grid-area: icon;
  position: relative;
  width: 16px;
  height: 16px;
  margin-top: 3.5px;
  overflow: hidden;
  transform-origin: center;
  backface-visibility: hidden;
  will-change: transform;
}
.menu-button-icon-menu,
.menu-button-icon-close {
  position: absolute;
  display: block;
  transition:
    opacity 160ms ease,
    transform 220ms cubic-bezier(0.22, 1, 0.36, 1);
}
.menu-button-icon-menu {
  top: 2px;
  left: 0.6667px;
  width: 14.6667px;
  height: 12px;
}
.menu-button-icon-close {
  top: 2.6667px;
  left: 2.6667px;
  width: 10.6667px;
  height: 10.6667px;
  opacity: 0;
  transform: rotate(-45deg) scale(0.75);
}
.menu-button[aria-expanded="true"] .menu-button-icon-menu {
  opacity: 0;
  transform: rotate(45deg) scale(0.75);
}
.menu-button[aria-expanded="true"] .menu-button-icon-close {
  opacity: 1;
  transform: rotate(0) scale(1);
}
.menu-button-label {
  grid-area: label;
  display: grid;
  font-family: 'Bai Jamjuree', sans-serif;
  font-size: 18px;
  font-weight: 400;
  font-style: normal;
  line-height: normal;
  white-space: nowrap;
}
.menu-button-label-menu,
.menu-button-label-close {
  grid-area: 1 / 1;
  transition:
    opacity 160ms ease,
    transform 220ms cubic-bezier(0.22, 1, 0.36, 1);
}
.menu-button-letter {
  display: inline-block;
  transform-origin: center;
  backface-visibility: hidden;
  will-change: transform;
}
.menu-button-label-close {
  opacity: 0;
  transform: translateY(-4px);
}
.menu-button[aria-expanded="true"] .menu-button-label-menu {
  opacity: 0;
  transform: translateY(4px);
}
.menu-button[aria-expanded="true"] .menu-button-label-close {
  opacity: 1;
  transform: translateY(0);
}

body.menu-open .navbar {
  z-index: 12001;
  pointer-events: none;
}
body.menu-open .navbar::before,
body.menu-open .navbar-left {
  opacity: 0;
}
body.menu-open .menu-button { pointer-events: auto; }

/* ── Full-screen menu ── */
.site-menu {
  position: fixed;
  inset: 0;
  z-index: 12000;
  visibility: hidden;
  overflow: hidden;
  background-color: rgba(0, 0, 0, 0);
  backdrop-filter: blur(0);
  -webkit-backdrop-filter: blur(0);
  pointer-events: none;
  transition:
    background-color 500ms ease,
    backdrop-filter 500ms ease,
    -webkit-backdrop-filter 500ms ease,
    visibility 0s linear;
}
.site-menu::before {
  content: "";
  position: absolute;
  inset: 0;
  background: #020202;
  opacity: 0;
  pointer-events: none;
  transform: translateZ(0);
  will-change: opacity;
  transition: opacity 180ms cubic-bezier(0.22, 1, 0.36, 1);
}
.site-menu.is-preparing,
.site-menu.is-closing { visibility: visible; }
.site-menu.is-open {
  visibility: visible;
  background-color: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  pointer-events: auto;
  transition-delay: 0s;
}
.site-menu.is-closing {
  pointer-events: none;
}
.site-menu.is-selecting-about,
.site-menu.is-selecting-works {
  pointer-events: none;
}
.site-menu.is-navigating-about,
.site-menu.is-navigating-home {
  visibility: visible;
  /* Rack-focus dissolve: deepen the existing menu atmosphere without turning
     the panel itself into a fullscreen curtain. */
  background-color: rgba(0, 0, 0, 0.68);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  pointer-events: none;
  transition:
    background-color 640ms cubic-bezier(0.37, 0, 0.63, 1),
    backdrop-filter 640ms cubic-bezier(0.37, 0, 0.63, 1),
    -webkit-backdrop-filter 640ms cubic-bezier(0.37, 0, 0.63, 1);
}
.site-menu.is-navigating-about::before,
.site-menu.is-navigating-home::before {
  opacity: 1;
  transition: opacity 640ms cubic-bezier(0.37, 0, 0.63, 1);
}
.site-menu-panel {
  position: absolute;
  z-index: 1;
  top: 48px;
  right: 40px;
  width: 450px;
  height: 804px;
  overflow: hidden;
  color: #fff;
  outline: none;
  isolation: isolate;
  clip-path: inset(
    0
    0
    var(--menu-clip-bottom, 757px)
    var(--menu-clip-left, 350px)
  );
  transform: translate3d(
    var(--menu-morph-x, -16px),
    var(--menu-morph-y, -32px),
    0
  );
  transition:
    clip-path 800ms var(--menu-spring),
    transform 800ms var(--menu-spring),
    top 680ms cubic-bezier(0.76, 0, 0.24, 1),
    right 680ms cubic-bezier(0.76, 0, 0.24, 1),
    width 680ms cubic-bezier(0.76, 0, 0.24, 1),
    height 680ms cubic-bezier(0.76, 0, 0.24, 1),
    background-color 280ms ease;
  will-change: clip-path, transform, top, right, width, height;
}
.site-menu.is-open .site-menu-panel {
  clip-path: inset(0 0 0 0);
  transform: translate3d(0, 0, 0);
}
.site-menu.is-navigating-about .site-menu-panel,
.site-menu.is-navigating-home .site-menu-panel {
  clip-path: inset(0 0 0 0);
  opacity: 0;
  filter: blur(10px);
  transform: translate3d(0, 0, 0) scale(0.992);
  animation: menu-route-rack-out 520ms cubic-bezier(0.37, 0, 0.63, 1) both;
  transition:
    opacity 320ms cubic-bezier(0.33, 0, 0.2, 1),
    filter 520ms cubic-bezier(0.37, 0, 0.63, 1),
    transform 640ms cubic-bezier(0.37, 0, 0.63, 1);
}
@keyframes menu-route-rack-out {
  from {
    opacity: 1;
    filter: blur(0);
    transform: translate3d(0, 0, 0) scale(1);
  }
  to {
    opacity: 0;
    filter: blur(10px);
    transform: translate3d(0, 0, 0) scale(0.992);
  }
}
.site-menu.is-resetting,
.site-menu.is-resetting *,
.site-menu.is-resetting *::before,
.site-menu.is-resetting *::after {
  transition: none !important;
}
.site-menu-panel-bg {
  position: absolute;
  display: block;
  top: 0;
  right: 0;
  pointer-events: none;
}
.site-menu-panel-bg-open {
  z-index: 1;
  width: var(--menu-trigger-width, 100px);
  height: var(--menu-trigger-height, 47px);
  opacity: 0;
  transition:
    width 800ms var(--menu-spring),
    height 800ms var(--menu-spring),
    opacity 160ms ease 600ms;
}
.site-menu.is-open .site-menu-panel-bg-open {
  width: 100%;
  height: 100%;
  opacity: 1;
  transition:
    width 800ms var(--menu-spring),
    height 800ms var(--menu-spring),
    opacity 160ms ease 60ms;
}
.site-menu.is-navigating-about .site-menu-panel-bg-open,
.site-menu.is-navigating-home .site-menu-panel-bg-open {
  width: 100%;
  height: 100%;
  opacity: 0;
  transition:
    width 520ms cubic-bezier(0.37, 0, 0.63, 1),
    height 520ms cubic-bezier(0.37, 0, 0.63, 1),
    opacity 260ms cubic-bezier(0.33, 0, 0.2, 1);
}
.site-menu-link:focus-visible,
.site-menu-social:focus-visible { outline: none; }
.site-menu-nav {
  position: absolute;
  z-index: 3;
  top: 229px;
  left: 56px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 32px;
  width: 294px;
}
.site-menu-link {
  display: flex;
  align-items: center;
  gap: 32px;
  width: 100%;
  appearance: none;
  border: 0;
  padding: 0;
  background: transparent;
  color: #7a7a7a;
  cursor: pointer;
  font-family: 'Bai Jamjuree', sans-serif;
  font-size: 72px;
  font-weight: 400;
  font-style: normal;
  line-height: normal;
  text-align: left;
  text-decoration: none;
  white-space: nowrap;
  opacity: 0;
  transform: translate3d(20px, -20px, 0);
  transition:
    color 160ms ease,
    opacity 160ms ease,
    transform 220ms cubic-bezier(0.22, 1, 0.36, 1);
}
.site-menu.is-open .site-menu-link {
  opacity: 1;
  transform: translate3d(0, 0, 0);
  transition:
    color 160ms ease,
    opacity 220ms ease var(--menu-link-delay, 100ms),
    transform 900ms var(--menu-spring) var(--menu-link-delay, 100ms);
}
.site-menu-link:nth-child(1) { --menu-link-delay: 100ms; }
.site-menu-link:nth-child(2) { --menu-link-delay: 160ms; }
.site-menu-link:nth-child(3) { --menu-link-delay: 220ms; }
.site-menu.is-closing .site-menu-link {
  transition-delay: 0s;
}
.site-menu.is-selecting-about .site-menu-active-dot,
.site-menu.is-selecting-works .site-menu-active-dot {
  opacity: 0;
  transition: opacity 120ms ease;
}
.site-menu.is-selecting-about .site-menu-link.is-route-target,
.site-menu.is-selecting-works .site-menu-link.is-route-target {
  color: #fff;
  transition:
    color 120ms ease,
    opacity 220ms ease,
    transform 220ms cubic-bezier(0.22, 1, 0.36, 1);
}
.site-menu.is-navigating-about .site-menu-link,
.site-menu.is-navigating-home .site-menu-link {
  opacity: 0;
  transform: translate3d(0, 0, 0);
  transition:
    color 120ms ease,
    opacity 240ms cubic-bezier(0.33, 0, 0.2, 1),
    transform 240ms cubic-bezier(0.33, 0, 0.2, 1);
}
.site-menu.is-navigating-about .site-menu-link.is-route-target,
.site-menu.is-navigating-home .site-menu-link.is-route-target {
  color: #fff;
  opacity: 0;
  transform: translate3d(0, 0, 0);
  transition:
    color 120ms ease,
    opacity 280ms cubic-bezier(0.33, 0, 0.2, 1),
    transform 280ms cubic-bezier(0.33, 0, 0.2, 1);
}
.site-menu-link.is-route-target::after {
  content: '';
  display: block;
  width: 12px;
  height: 12px;
  flex: 0 0 12px;
  align-self: center;
  transform: translateY(8px);
  border-radius: 50%;
  background: var(--brand-teal);
}
.site-menu-link:is(:hover, :focus-visible),
.site-menu-link.is-active { color: #fff; }
.site-menu-active-dot {
  display: block;
  width: 12px;
  height: 12px;
  flex: 0 0 12px;
  align-self: center;
  transform: translateY(8px);
}
.site-menu-connect {
  position: absolute;
  z-index: 3;
  left: 56px;
  bottom: 40px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 16px;
  width: 294px;
  opacity: 0;
  transform: translate3d(20px, -20px, 0);
  transition:
    opacity 160ms ease,
    transform 220ms cubic-bezier(0.22, 1, 0.36, 1);
}
.site-menu.is-open .site-menu-connect {
  opacity: 1;
  transform: translate3d(0, 0, 0);
  transition:
    opacity 220ms ease 280ms,
    transform 900ms var(--menu-spring) 280ms;
}
.site-menu.is-navigating-about .site-menu-connect,
.site-menu.is-navigating-home .site-menu-connect {
  opacity: 0;
  transform: translate3d(0, 0, 0);
  transition:
    opacity 220ms cubic-bezier(0.33, 0, 0.2, 1),
    transform 220ms cubic-bezier(0.33, 0, 0.2, 1);
}

body.page-leaving-about .menu-button,
body.page-leaving-home .menu-button {
  opacity: 0;
  pointer-events: none;
  transition:
    transform 640ms cubic-bezier(0.37, 0, 0.63, 1),
    opacity 220ms cubic-bezier(0.33, 0, 0.2, 1);
}

body.page-leaving-about .porto,
body.page-leaving-home .about-page {
  filter: blur(8px) brightness(0.62);
  transform: scale(0.992);
  transform-origin: 50% 50%;
  transition:
    filter 640ms cubic-bezier(0.37, 0, 0.63, 1),
    transform 640ms cubic-bezier(0.37, 0, 0.63, 1);
}

/* About menu → Works handoff. Homepage fold 0 is prepared underneath this
   cover, then revealed with the same short fade as the opposite route. */
.home-entry-curtain {
  position: fixed;
  inset: 0;
  z-index: 20000;
  visibility: hidden;
  opacity: 0;
  background: #020202;
  pointer-events: none;
}
html.from-about-curtain .home-entry-curtain {
  visibility: visible;
  opacity: 1;
}
html.from-about-curtain.is-home-ready .home-entry-curtain {
  opacity: 0;
  transition: opacity 720ms cubic-bezier(0.37, 0, 0.63, 1);
}
html.from-about-curtain .porto {
  opacity: 1;
  filter: blur(10px) brightness(0.58);
  transform: scale(1.012);
  transform-origin: 50% 50%;
}
html.from-about-curtain .page-section:first-child .ph-layout {
  transform: translate3d(0, 18px, 0);
}
html.from-about-curtain .navbar,
html.from-about-curtain .view-tabs {
  opacity: 0;
  filter: blur(6px);
}
html.from-about-curtain.is-home-ready .porto {
  filter: blur(0) brightness(1);
  transform: scale(1);
  transition:
    filter 920ms cubic-bezier(0.37, 0, 0.63, 1),
    transform 920ms cubic-bezier(0.37, 0, 0.63, 1);
}
html.from-about-curtain.is-home-ready .page-section:first-child .ph-layout {
  transform: translate3d(0, 0, 0);
  transition: transform 860ms cubic-bezier(0.16, 1, 0.3, 1) 80ms;
}
html.from-about-curtain.is-home-ready .navbar,
html.from-about-curtain.is-home-ready .view-tabs {
  opacity: 1;
  filter: blur(0);
  transition:
    opacity 620ms cubic-bezier(0.33, 0, 0.2, 1) 180ms,
    filter 720ms cubic-bezier(0.37, 0, 0.63, 1) 120ms;
}
html.home-entry-complete .porto {
  opacity: 1;
  filter: none;
  transform: none;
}
html.home-entry-complete .page-section:first-child .ph-layout {
  transform: none;
}
html.home-entry-complete .navbar,
html.home-entry-complete .view-tabs {
  opacity: 1;
  filter: none;
}
.site-menu-connect p {
  font-family: 'Bai Jamjuree', sans-serif;
  font-size: 16px;
  font-weight: 400;
  font-style: normal;
  line-height: normal;
  color: #8b8b8b;
}
.site-menu-socials {
  display: flex;
  align-items: center;
  gap: 20px;
}
.site-menu-social {
  position: relative;
  display: block;
  width: 24px;
  height: 24px;
  flex: 0 0 24px;
  appearance: none;
  border: 0;
  padding: 0;
  background: transparent;
  cursor: pointer;
  opacity: 1;
  transition: opacity 160ms ease;
}
.site-menu-social:hover { opacity: 0.7; }
.site-menu-social img {
  display: block;
  width: 24px;
  height: 24px;
}
.site-menu-social-x { overflow: hidden; }
.site-menu-social-x img {
  position: absolute;
  top: 1.9032px;
  left: 1.0008px;
  width: 21.9984px;
  height: 19.8864px;
}
body.menu-open #proj-cursor { display: none; }

.line-mask {
  display: block; overflow: visible;
  padding-block: 0.14em; margin-block: -0.14em;
}
.line-mask .line { display: block; white-space: normal; }
.char { display: inline-block; }
.word { display: inline-block; white-space: nowrap; }

/* ── Project card ── */
.proj-card {
  position: relative;
  overflow: hidden;
  flex-shrink: 0;
  transform-style: preserve-3d;
  transition: box-shadow 320ms ease;
}
.page-section .proj-card.is-tilting {
  will-change: transform;
  box-shadow:
    0 38px 90px rgba(0, 0, 0, 0.42),
    0 0 0 1px rgba(88, 240, 224, 0.12);
}
.proj-card:focus-visible {
  outline: 2px solid var(--brand-teal);
  outline-offset: 4px;
}
.proj-card.is-landscape { width: 580px; height: 420px; }
.proj-card.is-square    { width: 480px; height: 480px; }
.proj-card.is-portrait  { width: 420px; height: 560px; }
.proj-card img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

@media (prefers-reduced-motion: reduce) {
  .proj-card { transition: none; }
}

/* ── Section navigator (right) ── */
.section-nav {
  position: fixed; left: auto; right: 56px; top: 50%; /* right-anchored: same spot at 1440, tracks the edge below it */
  transform: translateY(calc(-50% - 12px));
  width: 240px; z-index: 100; user-select: none;
}
.nav-inner { display: flex; flex-direction: column; align-items: flex-end; gap: 12px; }
.nav-row {
  display: flex; align-items: center; justify-content: flex-end;
  white-space: nowrap;
  font-family: 'Recoleta', Georgia, serif; font-weight: 300;
  color: #000; line-height: 1.3; text-align: center;
}
.nav-row.is-inactive { cursor: pointer; }
.nav-row.is-inactive[data-rel="-2"], .nav-row.is-inactive[data-rel="2"] { opacity: 0.15; }
.nav-row.is-inactive[data-rel="-1"], .nav-row.is-inactive[data-rel="1"] { opacity: 0.35; }
.nav-row.is-current { color: var(--brand-teal-deep); }
html.dark .nav-row.is-current { color: var(--brand-teal); }
.nav-num {
  font-size: 24px;
  letter-spacing: -0.24px;
  font-variant-numeric: tabular-nums;
  font-feature-settings: 'tnum' 1;
}

@media (min-width: 901px) {
  .section-nav {
    right: 56px;
    top: 50%;
    width: 57px;
    height: 243px;
    transform: translateY(-50%);
  }
  .section-nav::before,
  .section-nav::after {
    content: '';
    position: absolute;
    left: 0;
    z-index: 2;
    width: 57px;
    height: 130px;
    pointer-events: none;
  }
  .section-nav::before {
    top: 0;
    background: linear-gradient(
      to bottom,
      #020202 18.462%,
      rgba(2, 2, 2, 0) 90.385%
    );
  }
  .section-nav::after {
    bottom: 0;
    background: linear-gradient(
      to bottom,
      rgba(2, 2, 2, 0) 9.615%,
      #020202 81.538%
    );
  }
  .nav-inner {
    position: absolute;
    top: 20px;
    left: 14px;
    z-index: 1;
    width: 33px;
    height: 203px;
    align-items: stretch;
    gap: 12px;
  }
  .nav-row {
    flex: 0 0 30px;
    width: 33px;
    height: 30px;
    justify-content: center;
    font-family: 'Bai Jamjuree', sans-serif;
    font-weight: 400;
    line-height: normal;
    color: #fff;
  }
  .nav-row:nth-child(2) {
    flex: 1 0 0;
    min-height: 1px;
  }
  .nav-row.is-current {
    flex: 0 0 35px;
    height: 35px;
  }
  .nav-row.is-inactive[data-rel="-2"],
  .nav-row.is-inactive[data-rel="-1"],
  .nav-row.is-inactive[data-rel="1"],
  .nav-row.is-inactive[data-rel="2"] {
    opacity: 1;
  }
  .nav-num {
    display: block;
    width: 100%;
    font-size: 24px;
    letter-spacing: -0.72px;
    text-align: center;
  }
  .nav-row.is-current .nav-num {
    font-size: 28px;
    letter-spacing: -0.84px;
  }
}

/* ── Per-project hero layout ── */
.ph-layout {
  position: absolute; top: 181px; left: 0; width: 100%; max-width: 1440px;
  display: flex; align-items: center;
  justify-content: flex-start;
  padding: 0 56px;
}
.ph-media {
  width: 580px; flex-shrink: 0; margin-left: auto;
  display: flex; justify-content: center;
}

.ph-text {
  position: relative; z-index: 60;
  display: flex; flex-direction: column; gap: 8px;
  width: 400px; padding: 8px 0; flex-shrink: 0;
}
.ph-spacer { width: 240px; flex-shrink: 0; }
.ph-label {
  font-family: 'Recoleta', Georgia, serif; font-weight: 300;
  font-size: 20px; line-height: 1.3; letter-spacing: -0.2px; color: #000; width: 229px;
}
.ph-title {
  font-family: 'Bai Jamjuree', sans-serif;
  font-weight: 600;
  font-size: 80px; line-height: 1.1; letter-spacing: -0.02em; color: #000;
  margin: 0;
  white-space: normal;
  overflow-wrap: normal;
  overflow: visible;
}
/* Pre-GSAP hide (prevents flash before load) */
.page-placeholder .ph-label { opacity: 0; }

/* ── Seamless arrival from the about-page footer glide ──
   html.skip-splash is set pre-paint by an inline <head> script when the
   sessionStorage flag is present: no loader, and the first paint already
   shows section 0 exactly as the footer box rendered it. Sections 1+ are
   parked hidden until the load handler lays them out (pre-load they all
   stack at CSS defaults). home.js removes the class once initialised. */
html.skip-splash #splash { display: none; }
html.skip-splash .porto { opacity: 1; }
html.skip-splash .page-section:first-child .ph-label { opacity: 1; }
html.skip-splash .page-section:not(:first-child) { visibility: hidden; }
html.skip-splash .scan-grid { visibility: hidden; }

/* ── Splash Screen ── */
#splash {
  position: fixed; inset: 0; z-index: 9999;
  overflow: hidden;
  background: #0f0e0e;
  will-change: opacity;
}
.splash-inner {
  position: absolute;
  inset: 0;
  z-index: 1;
}
.splash-status {
  position: absolute;
  left: clamp(20px, 3.889vw, 56px);
  right: clamp(20px, 3.889vw, 56px);
  bottom: clamp(20px, 2.667vh, 24px);
  display: flex;
  align-items: center;
  justify-content: space-between;
  will-change: opacity, filter;
}
.splash-logo-media {
  --splash-settle: 0;
  position: relative;
  flex: 0 0 auto;
  width: clamp(70px, 8.333vw, 120px);
  aspect-ratio: 4 / 5;
  overflow: visible;
  background: transparent;
}
.splash-logo-video,
.splash-logo-final {
  position: absolute;
  z-index: 3;
  top: 50%;
  left: 50%;
  display: block;
  width: 100%;
  height: 100%;
  border: 0;
  background: transparent;
  object-fit: contain;
  transform: translate(-50%, -50%);
}
.splash-logo-video {
  opacity: calc(1 - var(--splash-settle));
}
.splash-logo-final {
  z-index: 4;
  opacity: var(--splash-settle);
  transform: translate(-50%, -50%);
  filter: saturate(1.08) drop-shadow(0 12px 30px rgba(82, 237, 226, 0.18));
  pointer-events: none;
}
.splash-logo-media.is-complete .splash-logo-final {
  filter: saturate(1.08) drop-shadow(0 14px 34px rgba(82, 237, 226, 0.24));
}
.splash-counter {
  position: relative;
  flex: 0 0 auto;
  font-family: 'Bai Jamjuree', sans-serif;
  font-size: clamp(64px, 10.278vw, 148px);
  font-weight: 400;
  font-style: normal;
  line-height: 1;
  letter-spacing: -0.03em;
  font-variant-numeric: tabular-nums;
  font-feature-settings: 'tnum' 1;
  color: #fff;
  white-space: nowrap;
}

/* ── Custom cursor ── */
#proj-cursor {
  position: fixed; top: 0; left: 0;
  width: 0; height: 0;
  pointer-events: none; z-index: 9998;
  will-change: transform;
}
.proj-cursor-inner {
  position: absolute; top: 0; left: 0;
  width: 120px; height: 120px;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(8px) saturate(120%);
  -webkit-backdrop-filter: blur(8px) saturate(120%);
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  gap: 6px;
  opacity: 0;
  transform: translate(-50%, -50%) scale(0.7);
  transition: opacity 0.25s ease, transform 0.25s ease;
  will-change: transform;
}
#proj-cursor.is-visible .proj-cursor-inner {
  opacity: 1;
  transform: translate(-50%, -50%) scale(1);
}
#proj-cursor svg {
  display: block;
  flex-shrink: 0;
}
#proj-cursor span {
  font-family: 'Recoleta', Georgia, serif;
  font-weight: 300;
  font-size: 14px;
  line-height: 1;
  letter-spacing: -0.14px;
  color: #ffffff;
  white-space: nowrap;
}
#proj-cursor svg[data-cursor-icon="close"] { display: none; }
#proj-cursor.is-close svg[data-cursor-icon="explore"] { display: none; }
#proj-cursor.is-close svg[data-cursor-icon="close"] { display: block; }

/* ── View switch (List / Grid) ── */
.view-tabs {
  --view-switch-cut: polygon(
    0 0,
    91.094% 0,
    100% 18.46%,
    100% 100%,
    4.942% 100%,
    0 88.06%
  );
  position: fixed;
  left: 50%;
  bottom: 40px;
  z-index: 1001;
  display: block;
  width: 172px;
  height: 67px;
  overflow: hidden;
  appearance: none;
  border: 0;
  padding: 0;
  background: transparent;
  color: #fff;
  cursor: pointer;
  font: inherit;
  transform: translateX(-50%);
  transition: filter 160ms ease, transform 160ms ease;
}
.view-tabs:hover { filter: brightness(1.08); }
.view-tabs:active { transform: translateX(-50%) translateY(1px); }
.view-tabs:focus-visible {
  outline: 2px solid rgba(108, 247, 235, 0.9);
  outline-offset: 4px;
}
.view-switch-visual {
  position: absolute;
  inset: 0;
  display: block;
  isolation: isolate;
  pointer-events: none;
}
.view-switch-bg {
  position: absolute;
  inset: 0;
  z-index: 0;
  display: block;
  width: 172px;
  height: 67px;
}
.view-switch-shine-border {
  position: absolute;
  display: block;
  pointer-events: none;
  clip-path: var(--view-switch-cut);
  inset: 0;
  z-index: 3;
  padding: 1.5px;
  opacity: 0.9;
  background: conic-gradient(
    from var(--view-switch-shine-angle),
    transparent 0 56%,
    var(--brand-blue) 68%,
    var(--brand-aqua) 76%,
    rgba(255, 255, 255, 0.95) 80%,
    var(--brand-aqua) 84%,
    transparent 96% 100%
  );
  -webkit-mask:
    linear-gradient(#000 0 0) content-box,
    linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask:
    linear-gradient(#000 0 0) content-box,
    linear-gradient(#000 0 0);
  mask-composite: exclude;
  animation: view-switch-gradient-angle 3s linear infinite;
  transition:
    opacity 160ms ease,
    filter 160ms ease;
}
.view-switch-state {
  position: absolute;
  z-index: 4;
  top: calc(50% + 0.5px);
  left: 16px;
  display: flex;
  align-items: center;
  gap: 8px;
  width: 140px;
  opacity: 0;
  transform: translateY(-50%);
  transition: opacity 140ms ease;
}
.view-tabs:not(.is-grid) .view-switch-state-list,
.view-tabs.is-grid .view-switch-state-grid { opacity: 1; }
.view-switch-label {
  flex: 1 1 auto;
  min-width: 0;
  font-family: 'Bai Jamjuree', sans-serif;
  font-size: 18px;
  font-weight: 400;
  font-style: normal;
  line-height: normal;
  text-align: left;
  color: #fff;
  white-space: nowrap;
}
.view-switch-letter {
  display: inline-block;
  transform-origin: center;
  backface-visibility: hidden;
  will-change: transform;
}
.view-switch-icon {
  position: relative;
  display: block;
  width: 20px;
  height: 20px;
  flex: 0 0 20px;
  overflow: hidden;
  transform-origin: center;
  backface-visibility: hidden;
  will-change: transform;
}
.view-switch-icon img {
  position: absolute;
  display: block;
}
.view-switch-list-leaf-a {
  top: 1.25px;
  left: 4.584px;
  width: 11.667px;
  height: 17.5px;
}
.view-switch-list-leaf-b {
  top: 1.042px;
  left: 1.042px;
  width: 17.708px;
  height: 17.917px;
}
.view-switch-grid-leaf-a {
  top: 1.042px;
  left: 1.042px;
  width: 17.917px;
  height: 17.917px;
}
.view-switch-grid-leaf-b {
  top: 11.042px;
  left: 11.042px;
  width: 7.917px;
  height: 7.917px;
}

@keyframes view-switch-gradient-angle {
  to { --view-switch-shine-angle: 360deg; }
}

@media (hover: hover) and (pointer: fine) {
  .view-tabs:is(:hover, :focus-visible) .view-switch-shine-border {
    opacity: 1;
    filter: brightness(1.2) saturate(1.1);
  }
}

/* ── Grid view (phantom.land-style infinite curved grid, WebGL) ── */
#grid-view {
  position: fixed; inset: 0; z-index: 900;
  display: none; overflow: hidden;
  background: #fff;
  user-select: none;
  -webkit-user-select: none;
  touch-action: none;
}
html.dark #grid-view { background: #020202; }
#grid-view .gv-canvas { display: block; width: 100%; height: 100%; }

/* Grid view has no vertical sections to navigate */
body.grid-mode .section-nav { display: none; }

/* Neutralise case-study.css html.lenis rule — homepage must keep html at 100% */
html.lenis { height: 100%; }

/* ── Case-study overlay (SPA, in-place) ── */
.cs-overlay { position: fixed; inset: 0; z-index: 9000; background: transparent; display: none; }
.cs-overlay.is-open { display: block; }
/* The right panel stacks above the glide clones (z 1–2), clipping them mid-flight */
#cs-right { background: #fff; position: relative; z-index: 3; }

/* ── FLIP glide clones (created by home.js during overlay open/close) ── */
.glide-clone {
  position: fixed;
  margin: 0;
  border: none;
  overflow: hidden;
  pointer-events: none;
  will-change: transform;
  backface-visibility: hidden;
}
/* Clones live outside .cs-slide, so restate the placeholder positioning */
.glide-clone .proj-card-ph { position: absolute; inset: 0; }
.glide-clone img {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  object-fit: cover; display: block;
}

/* ── Permanent dark theme ── */
html.dark body,
html.dark .porto { background: #020202; }
html.dark #splash { background: #0f0e0e; }
html.dark .scan-line { background: rgba(255,255,255,0.10); }
html.dark .scan-corner { border-color: rgba(255,255,255,0.7); }
html.dark .vignette-radial {
  background:
    linear-gradient(to bottom, rgba(2,2,2,0.92) 0%, rgba(2,2,2,0) 18%),
    linear-gradient(to top,    rgba(2,2,2,0.92) 0%, rgba(2,2,2,0) 18%),
    linear-gradient(to right,  rgba(2,2,2,0.92) 0%, rgba(2,2,2,0) 18%),
    linear-gradient(to left,   rgba(2,2,2,0.92) 0%, rgba(2,2,2,0) 18%);
}
html.dark .nav-row { color: #fff; }
html.dark .ph-label,
html.dark .ph-title { color: #fff; }
html.dark #cs-right { background: #020202; }

/* ══ Responsive ═══════════════════════════════════════════
   Desktop (>1280px) is untouched — the stage is already fluid.
   Tablet keeps the side-by-side hero, mobile stacks it. */

/* ── Touch devices: the custom cursor is mouse-only ── */
@media (hover: none), (pointer: coarse) {
  #proj-cursor { display: none; }
  .page-section.is-active .proj-card { cursor: pointer; }
}

@media (max-width: 900px) {
  /* Let the fixed Close control share the root stacking context with the
     bottom navigation overlay when a case study opens in-place. */
  body.cs-open #cs-right {
    z-index: auto;
    transform: none !important;
  }
}

/* ── Tablet (901–1280px): same layout, shrunk to fit ── */
@media (max-width: 1280px) {
  .navbar { padding: 20px 40px; }
  .section-nav { right: 40px; width: auto; }

  .ph-layout { padding: 0 40px; }
  .ph-text { width: clamp(260px, 30vw, 400px); }
  .ph-spacer { width: 200px; } /* pushes the card left, clear of the fixed section-nav */
  .ph-title { font-size: clamp(38px, 5.6vw, 80px); }
  .ph-media { width: min(44vw, 580px); }
  .proj-card.is-landscape { width: min(44vw, 580px); height: auto; aspect-ratio: 580 / 420; }
  .proj-card.is-square    { width: min(40vw, 480px); height: auto; aspect-ratio: 1; }
  .proj-card.is-portrait  { width: min(32vw, 420px); height: auto; aspect-ratio: 420 / 560; }
}

/* ── Small tablet (≤1100px): the fixed section-nav starts crowding the card ── */
@media (max-width: 1100px) {
  .ph-media { width: min(38vw, 580px); }
  .proj-card.is-landscape { width: min(38vw, 580px); }
  .proj-card.is-square    { width: min(34vw, 480px); }
  .proj-card.is-portrait  { width: min(28vw, 420px); }
}

/* ── Mobile (≤900px): stacked hero, compact chrome ── */
@media (max-width: 900px) {
  .section-inner {
    height: 100%;
    height: 100dvh;
    top: 0;
    transform: none;
  }

  /* Keep neighbour peeks inside the active card's vertical frame. */
  .page-section:not(.is-active) {
    clip-path: inset(
      var(--mobile-peek-top, 0px) 0
      var(--mobile-peek-bottom, 0px) 0
    );
  }

  /* Horizontal carousel structure: year + title top, card centre, counter bottom */
  .ph-layout {
    top: 0; bottom: 0; left: 0; transform: none;
    flex-direction: column; align-items: flex-start; justify-content: flex-start;
    gap: 24px;
    padding: 84px 24px calc(160px + env(safe-area-inset-bottom));
  }
  .ph-text { width: 100%; gap: 6px; }
  .ph-label { width: auto; font-size: 15px; }
  .ph-title { font-size: clamp(32px, 9.5vw, 52px); letter-spacing: -0.02em; }
  .ph-spacer { display: none; }
  .ph-media {
    width: 100%;
    min-height: 0;
    flex: 1 1 auto;
    margin: 0;
    align-items: center;
    justify-content: center;
  }
  /* vh caps keep cards on screen in landscape phones too */
  .proj-card.is-landscape { width: min(100%, 63vh); height: auto; aspect-ratio: 580 / 420; }
  .proj-card.is-square    { width: min(100%, 48vh); height: auto; aspect-ratio: 1; }
  .proj-card.is-portrait  { width: min(100%, 40vh); height: auto; aspect-ratio: 420 / 560; }

  .navbar { padding: 14px 20px; }
  .logo { width: 34px; height: 34px; }
  .menu-button[aria-expanded="true"] {
    transform: translate3d(-24px, 18px, 0);
  }

  /* Counter: current / total, centred at the bottom (jasminegunarto-style) */
  .section-nav {
    left: 0;
    right: 0;
    top: auto;
    bottom: calc(max(24px, env(safe-area-inset-bottom)) + 72px);
    transform: none;
    width: auto;
    height: auto;
  }
  .nav-inner { flex-direction: row; justify-content: center; align-items: baseline; gap: 6px; }
  .nav-inner::after {
    content: '/ ' attr(data-total);
    font-family: 'Recoleta', Georgia, serif; font-weight: 300;
    font-size: 16px; letter-spacing: -0.16px; color: #000; opacity: 0.35;
  }
  html.dark .nav-inner::after { color: #fff; }
  .nav-row.is-inactive { display: none; }
  .nav-num { font-size: 16px; }

  .view-tabs {
    bottom: max(24px, env(safe-area-inset-bottom));
    width: 144px;
    height: 56px;
  }
  .view-switch-bg {
    width: 100%;
    height: 100%;
  }
  .view-switch-state {
    left: 14px;
    gap: 8px;
    width: 116px;
  }
  .view-switch-label { font-size: 16px; }

  .site-menu-panel {
    top: 16px;
    right: 16px;
    width: calc(100vw - 32px);
    height: calc(100vh - 32px);
  }
  .site-menu-panel-bg {
    width: 100%;
    height: 100%;
  }
  .site-menu-nav {
    top: clamp(152px, 25vh, 229px);
    left: 32px;
    gap: 24px;
    width: calc(100% - 64px);
  }
  .site-menu-link {
    gap: 20px;
    font-size: clamp(46px, 14vw, 72px);
  }
  .site-menu-connect {
    left: 32px;
    bottom: 32px;
    width: calc(100% - 64px);
  }

  /* Softer edge fade — 18% of a phone screen washes out the content */
  .vignette-radial {
    background:
      linear-gradient(to bottom, rgba(255,255,255,0.92) 0%, rgba(255,255,255,0) 8%),
      linear-gradient(to top,    rgba(255,255,255,0.92) 0%, rgba(255,255,255,0) 8%),
      linear-gradient(to right,  rgba(255,255,255,0.92) 0%, rgba(255,255,255,0) 8%),
      linear-gradient(to left,   rgba(255,255,255,0.92) 0%, rgba(255,255,255,0) 8%);
  }
  html.dark .vignette-radial {
    background:
      linear-gradient(to bottom, rgba(2,2,2,0.92) 0%, rgba(2,2,2,0) 8%),
      linear-gradient(to top,    rgba(2,2,2,0.92) 0%, rgba(2,2,2,0) 8%),
      linear-gradient(to right,  rgba(2,2,2,0.92) 0%, rgba(2,2,2,0) 8%),
      linear-gradient(to left,   rgba(2,2,2,0.92) 0%, rgba(2,2,2,0) 8%);
  }

}

@media (min-width: 901px) and (max-height: 899px) {
  .menu-button[aria-expanded="true"] {
    transform: translate3d(-24px, 36px, 0);
  }
  .site-menu-panel {
    top: 24px;
    height: calc(100vh - 48px);
  }
  .site-menu-panel-bg { height: 100%; }
  .site-menu-nav { top: clamp(160px, 25.45vh, 229px); }
}

@media (prefers-reduced-motion: reduce) {
  .home-entry-curtain { display: none; }
  .site-menu,
  .site-menu-panel,
  .site-menu-panel-bg,
  .menu-button,
  .menu-button-shape,
  .menu-button-icon-menu,
  .menu-button-icon-close,
  .menu-button-label-menu,
  .menu-button-label-close,
  .site-menu-link,
  .site-menu-connect,
  .view-tabs,
  .view-switch-shine-border,
  .view-switch-state { transition: none; }
  .view-switch-shine-border { animation: none; }
}

/* Whisper-fade: home first-paint hero targets hidden only when JS motion on.
   Scoped to [data-reveal] so section-nav char reveals are unaffected. */
html.motion-on .page-section:first-child [data-reveal] { opacity: 0; }
