/* ==========================================================================
   MD SIBBIR AHMED (s/a) — INTERACTIVE ATELIER PORTFOLIO
   Fusing interactive pixel-room scroll choreography with Dhaka editorial craft.
   ========================================================================== */

:root {
  color-scheme: only light;

  /* Core 6-Color Palette */
  --paper: #faf6f0;
  --paper-pure: #ffffff;
  --blush: #f4e9e1;
  --ink: #282620;
  --ink-strong: #171616;
  --ink-muted: #635f58;
  --accent: #ac3517;
  --accent-bright: #d9461f;
  --amber: #ffb351;
  --amber-deep: #e29530;
  --dusk: #8e4d24;
  --dusk-dark: #6e3010;
  --screen-blue: #38bdf8;
  --available-green: #16a34a;

  /* Hard Pixel & Editorial Elevation */
  --shadow-hard: 0 6px 0 rgba(40, 38, 32, 0.78);
  --shadow-hard-hover: 0 10px 0 rgba(40, 38, 32, 0.85);
  --shadow-hard-sm: 0 4px 0 rgba(40, 38, 32, 0.75);
  --border-ink: 2px solid var(--ink);
  --border-hair: 1px solid rgba(40, 38, 32, 0.16);
  --radius-px: 2px;

  /* Typography */
  --font-serif: "Instrument Serif", Baskerville, Georgia, "Times New Roman", serif;
  --font-display: "Exo 2", -apple-system, BlinkMacSystemFont, "Helvetica Neue", sans-serif;
  --font-body: "Exo 2", -apple-system, BlinkMacSystemFont, "Helvetica Neue", sans-serif;
  --font-meta: "Cabin", "Exo 2", sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, monospace;

  /* Motion */
  --ease-out-expo: cubic-bezier(0.22, 1, 0.36, 1);
  --ease-spring: cubic-bezier(0.2, 0.9, 0.3, 1.12);
  --ease-in-out-cubic: cubic-bezier(0.65, 0, 0.35, 1);

  /* Chrome & Layout */
  --gutter: clamp(16px, 2.4vw, 28px);
  --max-content: 1120px;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  scroll-behavior: smooth;
  overflow-x: clip;
}

body {
  margin: 0;
  padding: 0;
  background: var(--paper);
  color: var(--ink);
  min-height: 100vh;
  overflow-x: clip;
}

img,
svg,
canvas {
  display: block;
  max-width: 100%;
}

h1, h2, h3, h4, h5, h6, p, figure, dl, dd, ul, ol {
  margin: 0;
}

a {
  color: inherit;
  text-decoration: none;
}

button {
  font: inherit;
  color: inherit;
  cursor: pointer;
}

:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 3px;
  border-radius: 2px;
}

/* Skip Link for Keyboard Accessibility */
.skip-link {
  position: fixed;
  top: -100px;
  left: 16px;
  z-index: 9999;
  background: var(--ink);
  color: var(--paper);
  padding: 10px 16px;
  font-weight: 700;
  font-size: 14px;
  border-radius: var(--radius-px);
  transition: top 0.2s ease;
}
.skip-link:focus {
  top: 16px;
}

/* ==========================================================================
   STAGGERED ENTRANCE SEQUENCE (Pure GPU keyframes — never traps blank screens!)
   ========================================================================== */
@keyframes saChromeRise {
  from {
    opacity: 0;
    transform: translateY(18px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.site-logo-wrap {
  animation: saChromeRise 0.48s var(--ease-out-expo) 0ms both;
}
.top-contact,
.burger-btn {
  animation: saChromeRise 0.48s var(--ease-out-expo) 70ms both;
}
.side-menu {
  animation: saChromeRise 0.48s var(--ease-out-expo) 140ms both;
}

/* ==========================================================================
   HOMEPAGE PRE-HERO INTRO SEQUENCE (Isometric SIBBIR AHMED + Dual Curtain)
   ========================================================================== */
html.sa-intro-active {
  overflow: hidden !important;
}

.sa-intro {
  display: none;
}
html.sa-intro-active .sa-intro {
  display: block;
  position: fixed;
  inset: 0;
  z-index: 2147483000;
  overflow: hidden;
  pointer-events: auto;
  cursor: pointer;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
}

.sa-intro__stage {
  position: absolute;
  inset: 0;
  background: var(--paper);
  display: flex;
  align-items: center;
  justify-content: center;
  will-change: clip-path;
}

.sa-intro__title-wrap {
  position: relative;
  width: min(64vw, calc(46vh * 4.47));
  max-width: 980px;
  pointer-events: none;
}
@media (max-width: 809.98px) {
  .sa-intro__title-wrap {
    width: min(86vw, calc(42vh * 4.47));
  }
}

.sa-intro__title {
  display: block;
  width: 100%;
  height: auto;
  overflow: visible;
}

.sa-intro__letter {
  opacity: 0;
  will-change: opacity, transform;
}

.sa-intro__char {
  position: absolute;
  left: 0;
  top: 0;
  opacity: 0;
  transform-origin: 50% 100%;
  will-change: transform, opacity;
  pointer-events: none;
}
.sa-intro__char img {
  display: block;
  width: 100%;
  height: 100%;
  image-rendering: pixelated;
  image-rendering: crisp-edges;
  user-select: none;
  -webkit-user-drag: none;
}

.sa-intro__dust {
  position: absolute;
  left: 0;
  top: 0;
  opacity: 0;
  pointer-events: none;
  will-change: transform, opacity;
}
.sa-intro__dust svg {
  display: block;
  width: 100%;
  height: 100%;
  image-rendering: pixelated;
}

.sa-intro__skip {
  position: absolute;
  left: 50%;
  bottom: 24px;
  transform: translateX(-50%);
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.06em;
  color: rgba(40, 38, 32, 0.42);
  pointer-events: none;
  white-space: nowrap;
}

.sa-intro__band {
  position: absolute;
  left: 0;
  right: 0;
  top: 0;
  height: 60vh;
  background: var(--ink-strong);
  transform: translate3d(0, -100%, 0);
  will-change: transform;
  pointer-events: none;
}

.sa-intro__curtain {
  position: absolute;
  left: 0;
  right: 0;
  top: 0;
  height: 100vh;
  background: var(--dusk);
  transform: translate3d(0, -100%, 0);
  will-change: transform;
  pointer-events: none;
}

/* Homepage Chrome Hold & Mid-Curtain Staggered Rise */
html.sa-intro-managed .site-logo-wrap,
html.sa-intro-managed .top-contact,
html.sa-intro-managed .burger-btn,
html.sa-intro-managed .side-menu {
  animation: none;
  transition:
    opacity 1.5s cubic-bezier(0.25, 0.1, 0.25, 1),
    translate 1.5s cubic-bezier(0.22, 1, 0.36, 1);
}
html.sa-intro-managed .top-contact,
html.sa-intro-managed .burger-btn {
  transition-delay: 150ms;
}
html.sa-intro-managed .side-menu {
  transition-delay: 300ms;
}
html.sa-logo-hold .site-logo-wrap {
  opacity: 0 !important;
  translate: 0 40px !important;
}
html.sa-nav-hold .top-contact,
html.sa-nav-hold .burger-btn,
html.sa-nav-hold .side-menu {
  opacity: 0 !important;
  translate: 0 40px !important;
}

.sub-reveal {
  animation: saSubRise 0.45s var(--ease-out-expo) 40ms both;
}
@keyframes saSubRise {
  from { opacity: 0.01; transform: translateY(14px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ==========================================================================
   3D TUMBLING SCROLL LOGO (Top-Left Fixed 200x66 Rectangular Prism — Exact Twan Match)
   ========================================================================== */
.site-logo-wrap {
  position: fixed;
  top: 16px;
  left: 16px;
  z-index: 50;
  width: 200px;
  height: 66px;
}

.logo-cube-link {
  display: block;
  width: 100%;
  height: 100%;
  perspective: 2000px;
  cursor: pointer;
  text-decoration: none;
}

.logo-cube-stage {
  position: relative;
  width: 100%;
  height: 100%;
  transform-style: preserve-3d;
  transform: translateZ(-33px);
}

.logo-cube-rotor {
  position: relative;
  width: 100%;
  height: 100%;
  transform-style: preserve-3d;
  will-change: transform;
  transform: rotateX(0deg);
}

.logo-face {
  position: absolute;
  inset: 0;
  width: 200px;
  height: 66px;
  background: #ffffff;
  border: 2px solid #000000;
  backface-visibility: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  overflow: hidden;
  transition: background-color 0.15s ease;
}

.logo-face--front  { transform: translateZ(33px); }
.logo-face--back   { transform: rotateX(180deg) translateZ(33px); }
.logo-face--top    { transform: rotateX(90deg) translateZ(33px); flex-direction: column; gap: 3px; }
.logo-face--bottom { transform: rotateX(-90deg) translateZ(33px); flex-direction: column; gap: 3px; }

.logo-cube-link:hover .logo-face,
.logo-cube-link:focus-visible .logo-face {
  background: #0066ff;
}

.logo-avatar {
  position: absolute;
  left: 10px;
  bottom: 0;
  width: 66px;
  height: 62px;
  object-fit: contain;
  object-position: center bottom;
  image-rendering: pixelated;
  background: transparent;
  border: none;
  pointer-events: none;
  user-select: none;
}

.logo-meta-main {
  position: absolute;
  left: 93px;
  top: 13px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  padding: 0;
  pointer-events: none;
}

.logo-name {
  font-family: "Exo 2", sans-serif;
  font-weight: 700;
  font-size: 16px;
  line-height: 1;
  letter-spacing: -0.01em;
  color: #000000;
}

.logo-role {
  display: none;
}

.logo-code {
  position: absolute;
  right: 6px;
  bottom: 4px;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  text-align: right;
  font-family: "Cabin", sans-serif;
  font-weight: 400;
  font-size: 11px;
  line-height: 1.15;
  color: #757575;
  padding: 0;
  pointer-events: none;
  transition: color 0.15s ease;
}

.logo-cube-link:hover .logo-code,
.logo-cube-link:focus-visible .logo-code {
  color: #8bb8ff;
}

.logo-status-name {
  font-family: "Exo 2", sans-serif;
  font-weight: 700;
  font-size: 21px;
  line-height: 1.05;
  letter-spacing: -0.01em;
  color: #000000;
}

.logo-status-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: "Cabin", sans-serif;
  font-size: 13.5px;
  font-weight: 400;
  line-height: 1.15;
  color: #00b81a;
  text-decoration: underline;
  text-underline-offset: 2px;
  text-decoration-thickness: 1px;
}

.logo-status-dot {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: #00b81a;
  flex-shrink: 0;
}

/* ==========================================================================
   FIXED CHROME: LEFT SIDE MENU & TOP-RIGHT CONTACT LINKS (Exact Twan Match)
   ========================================================================== */
.top-contact {
  position: fixed;
  top: 16px;
  right: 16px;
  height: 66px;
  z-index: 50;
  display: flex;
  flex-flow: row;
  justify-content: flex-end;
  align-items: flex-start;
  gap: 8px;
  padding: 0;
}

.top-contact a {
  font-family: "Exo 2", sans-serif;
  font-size: clamp(13px, min(2vh, 1.34vw), 26px);
  font-weight: 400;
  line-height: 1.2em;
  letter-spacing: 0em;
  color: var(--chrome-fg, #2b2a28);
  text-decoration: underline;
  text-underline-offset: 2px;
  text-decoration-thickness: 1px;
  padding: 0;
  margin: 0;
  white-space: pre;
  transition: color 0.15s, text-decoration-color 0.15s, text-decoration-thickness 0.15s, text-underline-offset 0.15s;
}

.top-contact button.sound-pill {
  display: none !important;
}

.top-contact a:hover,
.top-contact a:focus-visible {
  color: #0066ff;
  text-decoration-color: #0066ff;
}

/* Fixed Left Menu */
.side-menu {
  position: fixed;
  top: 113px;
  left: 16px;
  width: 200px;
  z-index: 45;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0;
  padding: 0;
}

.side-menu__label {
  font-family: "Cabin", sans-serif;
  font-size: 12px;
  font-weight: 400;
  line-height: 1.2em;
  letter-spacing: 0em;
  color: #8c8c8c;
  padding: 0 0 16px 0;
  margin: 0;
}

.side-menu__link {
  font-family: "Exo 2", sans-serif;
  font-weight: 700;
  font-size: clamp(13px, min(2vh, 1.34vw), 26px);
  line-height: 1.2em;
  letter-spacing: 0em;
  color: var(--chrome-fg, #2b2a28);
  padding: 0;
  margin: 0;
  text-decoration: none;
  white-space: pre;
  position: relative;
  transition: color 0.15s;
}

.side-menu__link::after {
  display: none;
}

.side-menu__link:hover,
.side-menu__link:focus-visible {
  color: #0066ff;
  text-decoration: none;
}

/* Light-on-Room Adaptive Chrome Theme (Active on Home Atelier & Sunset Sky) */
body.chrome-light {
  --chrome-fg: #ffffff;
  --chrome-muted: #8c8c8c;
}

body.chrome-light .top-contact a,
body.chrome-light .side-menu__link {
  text-shadow: none;
}

body.chrome-light .top-contact a:hover,
body.chrome-light .top-contact a:focus-visible,
body.chrome-light .side-menu__link:hover,
body.chrome-light .side-menu__link:focus-visible {
  color: #0066ff;
  text-decoration-color: #0066ff;
}

/* Mobile Burger Button */
.burger-btn {
  display: none;
  position: fixed;
  top: 16px;
  right: 16px;
  z-index: 60;
  width: 48px;
  height: 48px;
  background: var(--paper-pure);
  border: 2px solid var(--ink-strong);
  border-radius: var(--radius-px);
  box-shadow: var(--shadow-hard-sm);
  align-items: center;
  justify-content: center;
  padding: 0;
  transition: transform 0.15s ease, background-color 0.15s ease;
}
.burger-btn:hover {
  background: var(--amber);
}
.burger-btn:active {
  transform: translateY(2px);
}
.burger-btn[aria-expanded="true"] {
  z-index: 81;
}
.burger-btn svg {
  width: 22px;
  height: 22px;
  stroke: var(--ink-strong);
  stroke-width: 2.2;
}

/* Full-screen Mobile Drawer Curtain */
.mobile-drawer {
  position: fixed;
  inset: 0;
  z-index: 80;
  background: var(--ink-strong);
  color: var(--paper);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 24px;
  padding: 96px 28px 36px;
  overflow-y: auto;
  overscroll-behavior: contain;
  clip-path: inset(0 0 0 100%);
  pointer-events: none;
  visibility: hidden;
  transition: clip-path 0.55s var(--ease-in-out-cubic), visibility 0s linear 0.55s;
}
.mobile-drawer.is-open {
  clip-path: inset(0 0 0 0);
  pointer-events: auto;
  visibility: visible;
  transition: clip-path 0.55s var(--ease-in-out-cubic);
}
.mobile-drawer__nav {
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.mobile-drawer__nav a {
  font-family: var(--font-serif);
  font-size: clamp(40px, 11vw, 58px);
  line-height: 1.05;
  color: var(--paper);
  transition: color 0.15s ease, transform 0.2s ease;
}
.mobile-drawer__nav a:hover {
  color: var(--amber);
  transform: translateX(8px);
}
.mobile-drawer__meta {
  display: flex;
  flex-direction: column;
  gap: 12px;
  border-top: 1px solid rgba(250, 246, 240, 0.2);
  padding-top: 20px;
}
.mobile-drawer__links {
  display: flex;
  flex-wrap: wrap;
  gap: 18px;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 16px;
}
.mobile-drawer__links a:hover {
  color: var(--amber);
}
@media (prefers-reduced-motion: reduce) {
  .mobile-drawer,
  .mobile-drawer * {
    transition-property: none;
  }
}

/* ==========================================================================
   HOME HERO: PIXEL SIBBIR MASCOT + SPEECH DIALOGUE CARD (Exact Twan Hover/Peek!)
   ========================================================================== */
.hero-mascot-layer {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 35;
  height: 0;
  pointer-events: none;
  --hh-h: 200px;
  --hh-pad: 24px;
}

.hh-char {
  position: absolute;
  left: var(--hh-pad);
  bottom: 0;
  width: calc(var(--hh-h) / 2);
  height: var(--hh-h);
  transform: translateY(108%);
  transition: transform 0.6s cubic-bezier(0.5, 0, 0.75, 0);
  will-change: transform;
}

html.sa-hero-up .hh-char {
  transform: translateY(0%);
  transition: transform 1.15s cubic-bezier(0.2, 0.9, 0.3, 1.12);
}

html.sa-hero-peek .hh-char {
  transform: translateY(58%);
  transition: transform 0.6s cubic-bezier(0.5, 0, 0.75, 0);
}

html.sa-hero-hidden .hh-char {
  transform: translateY(108%);
}

.hh-char img {
  width: 100%;
  height: 100%;
  image-rendering: pixelated;
  user-select: none;
  -webkit-user-drag: none;
  animation: hh-bob 0.9s steps(1, end) infinite;
}

html.sa-hero-peek .hh-char img {
  animation-name: hh-bob-small;
}

@keyframes hh-bob {
  0% { transform: translateY(0); }
  50% { transform: translateY(-4px); }
}
@keyframes hh-bob-small {
  0% { transform: translateY(0); }
  50% { transform: translateY(-2px); }
}

.hh-hit {
  position: absolute;
  left: var(--hh-pad);
  bottom: 0;
  width: calc(var(--hh-h) / 2);
  height: var(--hh-h);
  border: 0;
  background: transparent;
  padding: 0;
  pointer-events: auto;
  cursor: pointer;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
}
.hh-hit::after {
  content: "";
  position: absolute;
  inset: -14px;
}
html.sa-hero-peek .hh-hit {
  height: calc(var(--hh-h) * 0.44);
}
html.sa-hero-hidden .hh-hit {
  pointer-events: none;
}

/* Crisp Speech Dialogue Card (Exact Twan 45deg pointer + hard pixel shadow!) */
.hero-card {
  position: fixed;
  bottom: 100px;
  left: 142px;
  z-index: 36;
  width: min(440px, calc(100vw - 164px));
  background: var(--paper-pure);
  border-radius: 2px;
  padding: 16px 20px 18px;
  box-shadow: 0 6px 0 rgba(43, 42, 40, 0.78);
  display: flex;
  flex-direction: column;
  gap: 8px;
  opacity: 0;
  translate: 0 10px;
  pointer-events: none;
  transition: opacity 0.18s ease-out, translate 0.18s ease-out;
}

html.sa-hero-up .hero-card {
  opacity: 1;
  translate: 0 0;
  transition: opacity 0.4s ease-out, translate 0.4s ease-out;
}
html.sa-hero-first.sa-hero-up .hero-card {
  transition-delay: 0.52s;
}

.hero-card::before {
  content: "";
  position: absolute;
  left: -7px;
  bottom: 26px;
  width: 14px;
  height: 14px;
  background: var(--paper-pure);
  transform: rotate(45deg);
}

.hero-card__title {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(20px, 1.9vw, 25px);
  line-height: 1.2;
  color: var(--ink-strong);
  letter-spacing: -0.01em;
}

.hero-card__body {
  font-family: var(--font-body);
  font-size: 14px;
  line-height: 1.6;
  color: #2e1a0c;
}

/* ==========================================================================
   WINDOW ZOOM SCENE (Sticky 500vh Multi-Layer Dhaka Atelier + 300vh Overlap!)
   ========================================================================== */
.window-zoom-scene {
  position: relative;
  width: 100%;
  height: 500vh;
  height: 500svh;
  overflow: clip;
  background: #935127;
}

.wzs-sticky {
  position: sticky;
  top: 0;
  width: 100%;
  height: 100vh;
  height: 100svh;
  overflow: hidden;
  background:
    linear-gradient(#8b4a22 0 var(--wzs-floor, 70%), transparent var(--wzs-floor, 70%) 100%),
    linear-gradient(90deg, #dfbc96 0 var(--wzs-left-floor, 0px), #9b8679 var(--wzs-left-floor, 0px) 100%);
}

.wzs-layer {
  position: absolute;
  left: 50%;
  top: var(--wzs-anchor, 50%);
  width: 1280px;
  height: 1280px;
  margin-left: -640px;
  margin-top: -532px; /* aligned on 640x640 window center (320, 266) -> 50% x 41.5625% */
  transform-origin: 50% 41.5625%;
  will-change: transform;
  pointer-events: none;
}

.wzs-layer img {
  width: 100%;
  height: 100%;
  image-rendering: crisp-edges;
  image-rendering: pixelated;
  user-select: none;
  -webkit-user-drag: none;
}

.wzs-fx-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  image-rendering: crisp-edges;
  image-rendering: pixelated;
  pointer-events: none;
}

.wzs-hotspots-svg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  overflow: visible;
  pointer-events: none;
  --hit: auto;
  transition: opacity 0.2s ease;
}

.wzs-dim-mask {
  opacity: 0;
  transition: opacity 0.25s ease;
  pointer-events: none;
}
.wzs-hotspots-svg.is-spotlight .wzs-dim-mask,
.wzs-hotspots-svg.is-hint .wzs-dim-mask {
  opacity: 0.4;
}

.wzs-hot {
  cursor: pointer;
  outline: none;
}
.wzs-hot polygon {
  pointer-events: var(--hit, auto);
  transition: stroke 0.15s ease;
}

.wzs-cur {
  opacity: 0;
  transition: opacity 0.18s ease;
  pointer-events: none;
}
.wzs-hotspots-svg.is-hint .wzs-cur,
.wzs-hot:hover .wzs-cur,
.wzs-hot:focus-visible .wzs-cur {
  opacity: 1;
}

.wzs-arrow {
  animation: wzsBob 0.85s steps(1, end) infinite;
  transition: transform 0.12s ease;
}
.wzs-hot:hover .wzs-arrow,
.wzs-hot:focus-visible .wzs-arrow {
  animation: none;
}
.wzs-hot:active .wzs-arrow {
  transform: translateY(3px);
}
.wzs-arrow polygon {
  fill: var(--paper);
  stroke: var(--ink-strong);
  stroke-width: 1.5;
  paint-order: stroke;
  transition: fill 0.15s ease;
}
.wzs-hot:hover .wzs-arrow polygon,
.wzs-hot:focus-visible .wzs-arrow polygon {
  fill: var(--accent);
}

@keyframes wzsBob {
  0% { transform: translateY(0); }
  50% { transform: translateY(-3px); }
}

/* Floating Hotspot Label Pill inside Sticky Stage */
.wzs-tooltip {
  position: absolute;
  bottom: 24px;
  right: 24px;
  z-index: 30;
  background: var(--ink-strong);
  color: var(--paper);
  border: 2px solid var(--paper);
  border-radius: var(--radius-px);
  padding: 8px 14px;
  max-width: calc(100% - 28px);
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.03em;
  opacity: 0;
  transform: translateY(8px);
  pointer-events: none;
  transition: opacity 0.18s ease, transform 0.18s ease;
}
.wzs-tooltip.is-visible {
  opacity: 1;
  transform: translateY(0);
}

/* Scroll Progress Cue at Bottom Center of Atelier */
.scroll-cue {
  position: absolute;
  left: 50%;
  bottom: 22px;
  transform: translateX(-50%);
  z-index: 25;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(23, 22, 22, 0.62);
  color: var(--paper);
  border: 1.5px solid rgba(250, 246, 240, 0.45);
  border-radius: var(--radius-px);
  padding: 7px 14px;
  min-height: 44px;
  font-family: var(--font-mono);
  font-size: 11.5px;
  letter-spacing: 0.04em;
  pointer-events: auto;
  transition: opacity 0.3s ease, background-color 0.2s ease;
}
.scroll-cue:hover {
  background: var(--accent);
}
.scroll-cue[hidden] {
  display: none;
}

@media (max-height: 560px) and (orientation: landscape) {
  .scroll-cue {
    left: auto;
    right: 14px;
    transform: none;
  }
}

/* Dusk-to-Daylight Atmospheric Veil at End of Window Zoom */
.wzs-exit-veil {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(180deg, rgba(255, 200, 87, 0) 0%, rgba(250, 246, 240, 0.96) 100%);
  opacity: 0;
  will-change: opacity;
}

/* ==========================================================================
   SELECTED WORK STAGE — RISES DIRECTLY OVER THE LIVE ZOOMED DHAKA SUNSET SKY!
   ========================================================================== */
.work-stage {
  position: relative;
  z-index: 10;
  margin-top: -280vh;
  margin-top: -280svh;
  background: linear-gradient(
    180deg,
    rgba(250, 246, 240, 0) 0%,
    rgba(250, 246, 240, 0) 640px,
    var(--paper) 980px,
    var(--paper) 100%
  );
  padding: 56px 0 0;
  scroll-margin-top: 24px;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.work-stage__header {
  width: min(64%, 920px);
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 18px;
}

.work-stage__title {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(26px, 2.8vw, 40px);
  line-height: 1.05;
  color: var(--paper-pure);
  text-shadow: 0 3px 0 rgba(40, 38, 32, 0.38);
  letter-spacing: -0.015em;
}

.work-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.filter-btn {
  background: rgba(250, 246, 240, 0.92);
  border: 2px solid var(--ink-strong);
  border-radius: var(--radius-px);
  padding: 6px 12px;
  min-height: 36px;
  font-family: var(--font-display);
  font-size: 13px;
  font-weight: 700;
  color: var(--ink-strong);
  box-shadow: 0 3px 0 rgba(40, 38, 32, 0.55);
  transition: transform 0.14s ease, background-color 0.14s ease, color 0.14s ease;
}
.filter-btn:hover {
  transform: translateY(-2px);
  background: var(--paper-pure);
}
.filter-btn[aria-pressed="true"] {
  background: var(--ink-strong);
  color: var(--amber);
  transform: translateY(1px);
  box-shadow: 0 1px 0 rgba(40, 38, 32, 0.8);
}

/* Iconic Amber Billboard Frame */
.work-billboard {
  width: min(64%, 920px);
  background: var(--amber);
  border: 3px solid var(--ink-strong);
  border-radius: var(--radius-px);
  padding: clamp(20px, 3vw, 38px) clamp(20px, 3.8vw, 48px);
  box-shadow: 0 10px 0 rgba(40, 38, 32, 0.25);
  position: relative;
}

/* Subtle corner bolt rivets on the billboard */
.work-billboard::before,
.work-billboard::after {
  content: "";
  position: absolute;
  top: 10px;
  width: 8px;
  height: 8px;
  border-radius: 1px;
  background: var(--amber-deep);
  border: 1.5px solid var(--ink-strong);
}
.work-billboard::before { left: 10px; }
.work-billboard::after { right: 10px; }

.work-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px;
}

/* Crisp White Work Card (Twan's signature hard shadow + sharp 2px geometry!) */
.work-card {
  display: flex;
  flex-direction: column;
  background: var(--paper-pure);
  border: 2px solid var(--ink-strong);
  border-radius: var(--radius-px);
  padding: 5px 5px 0;
  box-shadow: var(--shadow-hard);
  transition: transform 0.22s var(--ease-out-expo), box-shadow 0.22s var(--ease-out-expo);
  overflow: hidden;
}

.work-card:hover,
.work-card:focus-visible {
  transform: translateY(-5px);
  box-shadow: var(--shadow-hard-hover);
}

.work-card.is-hidden {
  display: none;
}

.work-card__media {
  position: relative;
  aspect-ratio: 1.5 / 1;
  width: 100%;
  overflow: hidden;
  background: #ebe4d9;
  border-radius: 1px;
}

.work-card__media img,
.work-card__media video.cover-video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  transition: transform 0.45s var(--ease-out-expo);
}
.work-card__media--top img {
  object-position: center 20%;
}

.work-card:hover .work-card__media img,
.work-card:hover .work-card__media video.cover-video {
  transform: scale(1.04);
}

/* Live Hero Video Covers (RAMORA & GymTitan) */
.work-card__media--ramora-video {
  background: #3c3129;
}
.work-card__media--gymtitan-video {
  background: #151815;
}
.work-card__media video.cover-video,
.video-plate__stage video.cover-video {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  pointer-events: none;
}

.cover-scrim {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 1;
}
.cover-scrim--ramora {
  background:
    radial-gradient(ellipse at 50% 35%, rgba(255, 255, 255, 0.14) 0%, transparent 65%),
    linear-gradient(90deg, rgba(37, 25, 20, 0.28) 0%, rgba(37, 25, 20, 0.08) 52%, transparent 100%);
}
.cover-scrim--gymtitan {
  background:
    linear-gradient(90deg, rgba(12, 16, 12, 0.78) 0%, rgba(12, 16, 12, 0.36) 56%, rgba(12, 16, 12, 0.06) 100%),
    linear-gradient(0deg, rgba(12, 16, 12, 0.56) 0%, transparent 45%);
}

.cover-mark--ramora {
  position: absolute;
  left: 5.5%;
  top: 40%;
  width: 44%;
  z-index: 2;
  color: #fff9ee;
  pointer-events: none;
  filter: drop-shadow(0 3px 16px rgba(37, 25, 20, 0.52));
}
.cover-mark--ramora svg {
  width: 100%;
  height: auto;
  display: block;
}

.cover-mark--gymtitan {
  position: absolute;
  left: 6%;
  bottom: 11%;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 4px;
  pointer-events: none;
  filter: drop-shadow(0 3px 14px rgba(0, 0, 0, 0.6));
}
.gt-lockup {
  display: inline-flex;
  align-items: center;
  font-family: Rockwell, "Exo 2", Georgia, serif;
  font-weight: 900;
  font-size: clamp(22px, 2.2vw, 30px);
  line-height: 1;
  letter-spacing: -0.02em;
  color: #ffffff;
}
.gt-lockup svg {
  width: 1.28em;
  height: 1.28em;
  margin: 0 0.07em;
  flex-shrink: 0;
}
.gt-subline {
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: #facc15;
}

/* Case Study Full-Width Hero Video Plate */
.plate-card--video {
  cursor: pointer;
}
.video-plate__stage {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background: #171616;
  border-radius: 1px;
}
.video-plate__stage .cover-mark--ramora {
  top: 38%;
  width: 42%;
}
.video-plate__stage .gt-lockup {
  font-size: clamp(28px, 4.2vw, 52px);
}
.video-plate__stage .gt-subline {
  font-size: clamp(10.5px, 1.1vw, 13px);
}

.work-card__badge {
  position: absolute;
  top: 8px;
  left: 8px;
  z-index: 3;
  background: rgba(23, 22, 22, 0.86);
  color: var(--paper);
  font-family: var(--font-mono);
  font-size: 10.5px;
  font-weight: 600;
  padding: 4px 8px;
  border-radius: 2px;
  letter-spacing: 0.02em;
}
.work-card__badge--live {
  background: var(--paper-pure);
  color: var(--ink-strong);
  border: 1.5px solid var(--ink-strong);
}
.work-card__badge--accent {
  background: var(--accent);
  color: var(--paper-pure);
}

.work-card__info {
  padding: 12px 10px 14px;
  display: flex;
  flex-direction: column;
  gap: 5px;
  flex: 1;
}

.work-card__head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
}

.work-card__title {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(19px, 1.7vw, 24px);
  line-height: 1.15;
  color: var(--ink-strong);
}

.work-card__arrow {
  font-family: var(--font-mono);
  font-size: 14px;
  font-weight: 700;
  color: var(--accent);
  transition: transform 0.18s ease;
}
.work-card:hover .work-card__arrow {
  transform: translate(3px, -2px);
}

.work-card__desc {
  font-family: var(--font-meta);
  font-size: 13.5px;
  line-height: 1.45;
  color: #4a4640;
}

.work-card__tags {
  margin-top: auto;
  padding-top: 6px;
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--ink-muted);
}

/* Twin Amber Sign Posts Anchoring the Billboard! */
.sign-posts {
  width: min(64%, 920px);
  display: flex;
  justify-content: space-evenly;
  align-items: flex-start;
  pointer-events: none;
}

.sign-post {
  width: 16px;
  height: 82px;
  background: var(--amber);
  border-left: 3px solid var(--ink-strong);
  border-right: 3px solid var(--ink-strong);
  border-bottom: 3px solid var(--ink-strong);
  box-shadow: 4px 4px 0 rgba(40, 38, 32, 0.18);
}

/* ==========================================================================
   STUDIO PRACTICE ("CLOTHES & CODE") + OPEN SOURCE REPOS
   ========================================================================== */
.editorial-band {
  width: min(64%, 920px);
  margin: 72px auto 0;
  padding: 0 4px;
}

.band-header {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  padding-bottom: 18px;
  border-bottom: 2px solid var(--ink-strong);
  margin-bottom: 28px;
}

.band-title {
  font-family: var(--font-serif);
  font-weight: 400;
  font-size: clamp(34px, 4.2vw, 54px);
  line-height: 1.02;
  color: var(--ink-strong);
}
.band-title em {
  color: var(--accent);
  font-style: italic;
}

.band-lead {
  max-width: 44ch;
  font-size: 15.5px;
  color: var(--ink-muted);
}

.disciplines-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}

.discipline-card {
  background: var(--paper-pure);
  border: 2px solid var(--ink-strong);
  border-radius: var(--radius-px);
  padding: 20px;
  box-shadow: var(--shadow-hard-sm);
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.discipline-card__icon {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  background: var(--blush);
  border: 1.5px solid var(--ink-strong);
  color: var(--accent);
}

.discipline-card h3 {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 17px;
  line-height: 1.25;
  color: var(--ink-strong);
}

.discipline-card p {
  font-size: 14px;
  line-height: 1.55;
  color: var(--ink-muted);
}

/* Philosophy Editorial Strip */
.philosophy-strip {
  margin-top: 32px;
  background: var(--paper-pure);
  border: 2px solid var(--ink-strong);
  border-left: 8px solid var(--accent);
  padding: 22px 26px;
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 20px;
  box-shadow: var(--shadow-hard-sm);
}

.philosophy-strip blockquote {
  margin: 0;
  font-family: var(--font-serif);
  font-size: clamp(22px, 2.3vw, 29px);
  line-height: 1.25;
  color: var(--ink-strong);
}

.philosophy-strip cite {
  display: block;
  margin-top: 8px;
  font-family: var(--font-mono);
  font-style: normal;
  font-size: 12px;
  color: var(--ink-muted);
}

.btn-hard {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background: var(--ink-strong);
  color: var(--paper);
  border: 2px solid var(--ink-strong);
  border-radius: var(--radius-px);
  padding: 11px 18px;
  min-height: 44px;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 14px;
  box-shadow: 0 4px 0 var(--accent);
  transition: transform 0.16s ease, background-color 0.16s ease, box-shadow 0.16s ease;
  white-space: nowrap;
}
.btn-hard:hover {
  background: var(--accent);
  box-shadow: 0 5px 0 var(--ink-strong);
  transform: translateY(-2px);
}
.btn-hard--light {
  background: var(--paper-pure);
  color: var(--ink-strong);
  box-shadow: var(--shadow-hard-sm);
}
.btn-hard--light:hover {
  background: var(--amber);
  color: var(--ink-strong);
}

/* Open Source GitHub Archive */
.repo-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

.repo-card {
  background: var(--paper-pure);
  border: 2px solid var(--ink-strong);
  border-radius: var(--radius-px);
  padding: 18px;
  box-shadow: var(--shadow-hard-sm);
  display: flex;
  flex-direction: column;
  gap: 8px;
  transition: transform 0.18s var(--ease-out-expo), box-shadow 0.18s ease, border-color 0.18s ease;
}
.repo-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-hard);
  border-color: var(--accent);
}
.repo-card__name {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 16px;
  color: var(--ink-strong);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}
.repo-card__desc {
  font-size: 13.5px;
  line-height: 1.5;
  color: var(--ink-muted);
}
.repo-card__slug {
  margin-top: auto;
  padding-top: 8px;
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--accent);
  overflow-wrap: anywhere;
}

/* ==========================================================================
   EDITORIAL SOFT BLUSH FOOTER (#F4E9E1)
   ========================================================================== */
.site-footer {
  margin-top: 96px;
  background: var(--blush);
  border-top: 3px solid var(--ink-strong);
  padding: 64px var(--gutter) 36px;
  position: relative;
  z-index: 10;
}

.footer-inner {
  width: min(64%, 920px);
  margin: 0 auto;
}

.footer-top {
  display: grid;
  grid-template-columns: 1.15fr 1fr;
  gap: 32px;
  align-items: end;
  padding-bottom: 40px;
  border-bottom: 1.5px solid rgba(40, 38, 32, 0.22);
}

.footer-heading {
  font-family: var(--font-serif);
  font-weight: 400;
  font-size: clamp(44px, 5.6vw, 72px);
  line-height: 0.96;
  color: var(--ink-strong);
}
.footer-heading em {
  color: var(--accent);
  font-style: italic;
}

.footer-availability {
  margin-top: 12px;
  font-size: 15px;
  color: var(--ink-muted);
  max-width: 44ch;
}

.footer-contact-box {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 12px;
}

.email-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
}

.email-link {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(19px, 2vw, 26px);
  color: var(--ink-strong);
  border-bottom: 2.5px solid var(--accent);
  padding-bottom: 2px;
  transition: color 0.15s ease;
}
.email-link:hover {
  color: var(--accent);
}

.copy-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--paper-pure);
  border: 2px solid var(--ink-strong);
  border-radius: var(--radius-px);
  padding: 7px 12px;
  min-height: 40px;
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 600;
  box-shadow: 0 3px 0 rgba(40, 38, 32, 0.7);
  transition: transform 0.14s ease, background-color 0.14s ease;
}
.copy-btn:hover {
  background: var(--amber);
  transform: translateY(-1px);
}

.copy-status {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--accent);
  min-height: 18px;
}

.footer-bottom {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding-top: 24px;
  font-family: var(--font-meta);
  font-size: 14px;
  color: var(--ink-muted);
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 20px;
}
.footer-links a {
  font-weight: 700;
  color: var(--ink-strong);
  text-decoration: underline;
  text-underline-offset: 3px;
}
.footer-links a:hover {
  color: var(--accent);
}

/* ==========================================================================
   SUBPAGES: PIXEL WALL CANVAS, SCROLL MINIMAP, CASE STUDIES, ABOUT, PLAYGROUND
   ========================================================================== */
.pixel-wall-canvas {
  position: fixed;
  inset: 0;
  width: 100vw;
  height: 100vh;
  z-index: 0;
  pointer-events: none;
  opacity: 0.75;
}

.subpage-main {
  position: relative;
  z-index: 5;
  width: min(64%, 920px);
  margin: 0 auto;
  padding: 128px 0 32px;
}

/* Fixed Right Scroll Minimap on Subpages — hidden to match Twan's clean 3-piece navbar layout */
.scroll-minimap {
  display: none;
}

.minimap-track {
  position: relative;
  width: 14px;
  height: 132px;
  background: repeating-linear-gradient(
    to bottom,
    rgba(40, 38, 32, 0.12) 0 4px,
    transparent 4px 8px
  );
  border: 1px solid rgba(40, 38, 32, 0.25);
  cursor: pointer;
}

.minimap-thumb {
  position: absolute;
  left: -2px;
  right: -2px;
  top: 0;
  height: 28px;
  background: var(--accent);
  border: 1.5px solid var(--ink-strong);
  border-radius: 1px;
  transition: top 0.08s linear;
}

.minimap-pct {
  font-family: var(--font-mono);
  font-size: 9.5px;
  font-weight: 700;
  color: var(--ink-strong);
}

/* Case Study Typography & Plates */
.case-crumb {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-mono);
  font-size: 12.5px;
  font-weight: 600;
  color: var(--ink-muted);
  margin-bottom: 18px;
  padding: 5px 10px;
  background: var(--paper-pure);
  border: 1.5px solid var(--ink-strong);
  box-shadow: 0 3px 0 rgba(40, 38, 32, 0.5);
  transition: transform 0.14s ease, background-color 0.14s ease;
}
.case-crumb:hover {
  background: var(--amber);
  color: var(--ink-strong);
  transform: translateY(-1px);
}

.page-hero-title {
  font-family: var(--font-serif);
  font-weight: 400;
  font-size: clamp(46px, 6.2vw, 82px);
  line-height: 0.96;
  color: var(--ink-strong);
  letter-spacing: -0.02em;
}
.page-hero-title em {
  color: var(--accent);
  font-style: italic;
}

.page-hero-lead {
  margin-top: 18px;
  font-size: clamp(17px, 1.8vw, 21px);
  line-height: 1.55;
  color: #3f3b35;
  max-width: 60ch;
}

.fact-strip {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(175px, 1fr));
  gap: 14px;
  margin: 30px 0 36px;
}

.fact-box {
  background: var(--paper-pure);
  border: 2px solid var(--ink-strong);
  border-radius: var(--radius-px);
  padding: 14px 16px;
  box-shadow: var(--shadow-hard-sm);
}
.fact-box dt {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--ink-muted);
  margin-bottom: 4px;
}
.fact-box dd {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 14.5px;
  color: var(--ink-strong);
  line-height: 1.35;
  overflow-wrap: break-word;
}
.fact-box dd a {
  display: inline-block;
  font-size: 13.5px;
  word-break: break-word;
}

.plate-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px;
  margin: 28px 0;
}
.plate-grid--single {
  grid-template-columns: 1fr;
}
.plate-grid--three {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.plate-card {
  position: relative;
  background: var(--paper-pure);
  border: 2px solid var(--ink-strong);
  border-radius: var(--radius-px);
  padding: 6px;
  box-shadow: var(--shadow-hard);
  overflow: hidden;
  cursor: zoom-in;
  transition: transform 0.2s var(--ease-out-expo), box-shadow 0.2s ease;
}
.plate-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-hard-hover);
}
.plate-card img {
  width: 100%;
  height: auto;
  display: block;
  object-fit: cover;
}
.plate-card figcaption {
  padding: 10px 8px 6px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  font-family: var(--font-mono);
  font-size: 11.5px;
  color: var(--ink-muted);
}

.editorial-block {
  background: var(--paper-pure);
  border: 2px solid var(--ink-strong);
  border-radius: var(--radius-px);
  padding: clamp(22px, 3vw, 34px);
  box-shadow: var(--shadow-hard);
  margin: 28px 0;
}

.editorial-block h2 {
  font-family: var(--font-serif);
  font-weight: 400;
  font-size: clamp(28px, 3vw, 40px);
  line-height: 1.08;
  margin-bottom: 14px;
  color: var(--ink-strong);
}

.editorial-block p + p {
  margin-top: 14px;
}

.editorial-block p {
  font-size: 16px;
  line-height: 1.7;
  color: #36332e;
  max-width: 68ch;
}

/* RAMORA Interactive Garment Loupe & Swatch Switcher */
.garment-studio {
  background: var(--paper-pure);
  border: 2px solid var(--ink-strong);
  border-radius: var(--radius-px);
  box-shadow: var(--shadow-hard);
  overflow: hidden;
  margin: 32px 0;
}
.garment-stage {
  position: relative;
  background: radial-gradient(circle at center, #fdfbf7 0%, #ede4d6 100%);
  padding: clamp(18px, 4vw, 42px);
  display: flex;
  justify-content: center;
  align-items: center;
  cursor: crosshair;
  overflow: hidden;
}
.garment-stage img {
  max-height: 520px;
  width: auto;
  object-fit: contain;
  user-select: none;
}
.garment-loupe {
  position: absolute;
  width: 170px;
  height: 170px;
  border-radius: 50%;
  border: 3px solid var(--ink-strong);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.28), inset 0 0 0 2px rgba(255, 255, 255, 0.55);
  pointer-events: none;
  opacity: 0;
  transform: translate(-50%, -50%) scale(0.85);
  transition: opacity 0.16s ease, transform 0.16s ease;
  background-repeat: no-repeat;
  z-index: 4;
}
.garment-stage.is-loupe .garment-loupe {
  opacity: 1;
  transform: translate(-50%, -50%) scale(1);
}
.garment-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 16px 22px;
  background: var(--blush);
  border-top: 2px solid var(--ink-strong);
}
.swatch-group {
  display: flex;
  gap: 10px;
}
.swatch-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  min-height: 40px;
  background: var(--paper-pure);
  border: 2px solid var(--ink-strong);
  border-radius: var(--radius-px);
  font-family: var(--font-display);
  font-size: 13px;
  font-weight: 700;
  box-shadow: 0 3px 0 rgba(40, 38, 32, 0.6);
}
.swatch-btn[aria-pressed="true"] {
  background: var(--ink-strong);
  color: var(--paper);
}
.swatch-dot {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  border: 1.5px solid rgba(255, 255, 255, 0.7);
}

/* Next Project Signpost Banner */
.next-case {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin-top: 44px;
  background: var(--amber);
  border: 3px solid var(--ink-strong);
  border-radius: var(--radius-px);
  padding: 18px 22px;
  box-shadow: var(--shadow-hard);
  transition: transform 0.2s var(--ease-out-expo), box-shadow 0.2s ease;
}
.next-case:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-hard-hover);
}
.next-case__label {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--ink-strong);
}
.next-case__title {
  font-family: var(--font-serif);
  font-size: clamp(30px, 3.6vw, 44px);
  line-height: 1.05;
  color: var(--ink-strong);
}
.next-case img {
  width: 128px;
  height: 84px;
  object-fit: cover;
  border: 2px solid var(--ink-strong);
  background: var(--paper-pure);
  flex-shrink: 0;
}

/* ==========================================================================
   ABOUT PAGE: TWAN-STYLE POLAROID + BIOGRAPHY SPREAD & AUTONOMOUS WALKER
   ========================================================================== */
.subpage-main--about {
  width: min(60%, 864px);
  padding-top: 13vh;
  padding-bottom: 6vh;
}

.about-top-grid {
  display: flex;
  align-items: flex-start;
  gap: 48px;
}

.about-polaroid-col {
  position: relative;
  width: 30%;
  min-width: 220px;
  flex-shrink: 0;
  padding-top: 8px;
}

.polaroid-card {
  background: #ffffff;
  border: 1px solid rgba(0, 0, 0, 0.08);
  border-radius: 2px;
  padding: 16px 16px 48px 16px;
  box-shadow: 0 8px 24px 0 rgba(0, 0, 0, 0.14);
  cursor: zoom-in;
  transition: transform 0.25s var(--ease-out-expo), box-shadow 0.25s ease;
}
.polaroid-card:hover {
  transform: translateY(-4px) rotate(-0.6deg);
  box-shadow: 0 14px 32px 0 rgba(0, 0, 0, 0.18);
}

.polaroid-card__img-wrap {
  width: 100%;
  aspect-ratio: 1 / 1;
  overflow: hidden;
  border-radius: 2px;
  background: #1c1814;
}
.polaroid-card__img-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  display: block;
}

/* Autonomous Wandering Pixel Sibbir on About Page */
.about-walker {
  position: fixed;
  left: 0;
  top: 0;
  width: 84px;
  height: 164px;
  z-index: 25;
  pointer-events: auto;
  cursor: pointer;
  will-change: translate, scale;
  user-select: none;
  -webkit-user-drag: none;
}
.about-walker__sprite {
  width: 100%;
  height: 100%;
  will-change: transform;
}
.about-walker__sprite img {
  width: 100%;
  height: 100%;
  image-rendering: pixelated;
  image-rendering: crisp-edges;
  display: block;
}
.about-walker.is-walking .about-walker__sprite {
  animation: walker-stride 0.28s steps(2, end) infinite;
}
.about-walker:not(.is-walking) .about-walker__sprite {
  animation: hh-bob-small 0.9s steps(1, end) infinite;
}
@keyframes walker-stride {
  0% { transform: translateY(0) rotate(-2.5deg); }
  50% { transform: translateY(-6px) rotate(2.5deg); }
}

.about-walker-bubble {
  position: fixed;
  left: 0;
  top: 0;
  z-index: 40;
  background: #ffffff;
  color: #2e1a0c;
  font-family: var(--font-body);
  font-size: 14px;
  line-height: 1.5;
  padding: 8px 14px;
  border-radius: 2px;
  box-shadow: 0 6px 0 0 rgba(43, 42, 40, 0.78);
  pointer-events: none;
  white-space: nowrap;
  opacity: 0;
  transform: translate(-50%, calc(-100% - 14px));
  transition: opacity 0.3s ease-out;
}
.about-walker-bubble.is-visible {
  opacity: 1;
}
.about-walker-bubble__tail {
  position: absolute;
  left: 50%;
  bottom: -5px;
  width: 10px;
  height: 10px;
  background: #ffffff;
  transform: translateX(-50%) rotate(45deg);
}

.about-bio-col {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.about-bio-title {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(38px, 4vw, 54px);
  line-height: 1.08;
  color: var(--ink-strong);
  letter-spacing: -0.02em;
  margin-bottom: 4px;
}

.about-bio-p {
  font-family: var(--font-body);
  font-size: 18px;
  line-height: 1.62;
  color: #2e1a0c;
}
.about-bio-p strong {
  font-weight: 700;
  color: var(--ink-strong);
}
.about-bio-p a {
  text-decoration: underline;
  text-underline-offset: 3px;
  text-decoration-thickness: 1.5px;
  color: #2e1a0c;
  transition: color 0.15s ease;
}
.about-bio-p a:hover {
  color: var(--accent);
}

.about-lower-grid {
  display: block;
  padding-top: 64px;
  margin-bottom: 36px;
}

.about-lower-title {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 27px;
  line-height: 1.2;
  color: var(--ink-strong);
  margin-bottom: 18px;
}

.skill-groups {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 32px;
}
.skill-group h3 {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 17px;
  color: var(--ink-strong);
  margin-bottom: 4px;
}
.skill-group p {
  font-size: 15.5px;
  line-height: 1.6;
  color: #3d352e;
}

.todo-list {
  list-style: none;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.todo-list li {
  position: relative;
  padding-left: 22px;
  font-family: var(--font-body);
  font-size: 16.5px;
  line-height: 1.55;
  color: #2e1a0c;
}
.todo-list li::before {
  content: "•";
  position: absolute;
  left: 4px;
  top: 0;
  font-weight: 700;
  color: var(--accent);
}
.todo-list li.is-done {
  text-decoration: line-through;
  text-decoration-thickness: 1.5px;
  color: rgba(46, 26, 12, 0.62);
}
.todo-list li.is-done::before {
  content: "✓";
  left: 2px;
  color: var(--available-green);
}

/* Subpage Staggered Entrance Choreography (Exact Twan pc-page / pc-intro feel!) */
html.sa-sub-on .site-logo-wrap,
html.sa-sub-on .top-contact,
html.sa-sub-on .burger-btn,
html.sa-sub-on .side-menu,
html.sa-sub-on .subpage-main,
html.sa-sub-on .scroll-minimap {
  animation: none !important;
  transition:
    opacity 1.35s cubic-bezier(0.25, 0.1, 0.25, 1),
    translate 1.35s cubic-bezier(0.22, 1, 0.36, 1);
}
html.sa-sub-on .top-contact,
html.sa-sub-on .burger-btn { transition-delay: 140ms; }
html.sa-sub-on .side-menu { transition-delay: 280ms; }
html.sa-sub-on .subpage-main { transition-delay: 400ms; }
html.sa-sub-on .scroll-minimap { transition-delay: 640ms; }

html.sa-sub-hold .site-logo-wrap,
html.sa-sub-hold .top-contact,
html.sa-sub-hold .burger-btn,
html.sa-sub-hold .side-menu,
html.sa-sub-hold .subpage-main,
html.sa-sub-hold .scroll-minimap {
  opacity: 0 !important;
  translate: 0 38px !important;
}

@media (max-width: 1199.98px) {
  .subpage-main--about {
    width: min(82%, 820px);
  }
  .about-walker {
    width: 64px;
    height: 124px;
  }
}
@media (max-width: 809.98px) {
  .subpage-main--about {
    width: 90%;
    padding-top: 108px;
  }
  .about-top-grid {
    flex-direction: column;
    gap: 32px;
  }
  .about-polaroid-col {
    width: min(260px, 78%);
  }
  .about-lower-grid {
    grid-template-columns: 1fr;
    gap: 36px;
    padding-top: 44px;
  }
  .about-walker {
    width: 54px;
    height: 105px;
  }
}

/* ==========================================================================
   PLAYGROUND & ARCADE MINI-GAME + WEBGL SHADER LAB
   ========================================================================== */
.arcade-shell {
  background: var(--amber);
  border: 3px solid var(--ink-strong);
  border-radius: var(--radius-px);
  padding: 20px;
  box-shadow: var(--shadow-hard);
  margin: 28px 0 44px;
}

.arcade-topbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}

.arcade-hud {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  font-family: var(--font-mono);
  font-size: 13px;
  font-weight: 700;
}
.arcade-hud span {
  background: var(--paper-pure);
  border: 2px solid var(--ink-strong);
  padding: 5px 10px;
}

.arcade-screen-wrap {
  position: relative;
  background: #171616;
  border: 3px solid var(--ink-strong);
  border-radius: 2px;
  overflow: hidden;
  aspect-ratio: 16 / 9;
}

.arcade-canvas {
  width: 100%;
  height: 100%;
  image-rendering: crisp-edges;
  image-rendering: pixelated;
  display: block;
}

.arcade-canvas.is-playing {
  touch-action: pan-y;
}

.arcade-overlay {
  position: absolute;
  inset: 0;
  background: rgba(23, 22, 22, 0.78);
  color: var(--paper);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 24px;
  gap: 12px;
}
.arcade-overlay.is-hidden {
  display: none;
}
.arcade-overlay h3 {
  font-family: var(--font-serif);
  font-size: clamp(30px, 4vw, 46px);
  color: var(--amber);
}
.arcade-overlay p {
  max-width: 44ch;
  font-size: 14.5px;
  color: rgba(250, 246, 240, 0.9);
}

@media (max-width: 580px) {
  .arcade-shell {
    padding: 12px;
  }
  .arcade-hud {
    gap: 5px;
    font-size: 11px;
  }
  .arcade-hud span {
    padding: 4px 7px;
  }
  .arcade-overlay {
    padding: 8px;
    gap: 6px;
  }
  .arcade-overlay h3 {
    font-size: 24px;
  }
  .arcade-overlay p {
    font-size: 12px;
    line-height: 1.3;
  }
}

.arcade-controls-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 14px;
}

.touch-pad {
  display: flex;
  gap: 10px;
}
.touch-pad button {
  min-width: 56px;
  min-height: 44px;
  background: var(--paper-pure);
  border: 2px solid var(--ink-strong);
  font-family: var(--font-mono);
  font-weight: 700;
  box-shadow: 0 3px 0 rgba(40, 38, 32, 0.75);
  touch-action: manipulation;
}
.touch-pad button:active {
  transform: translateY(2px);
  background: var(--accent);
  color: var(--paper-pure);
}

/* Shader Lab Card */
.shader-shell {
  background: var(--paper-pure);
  border: 2px solid var(--ink-strong);
  border-radius: var(--radius-px);
  padding: 18px;
  box-shadow: var(--shadow-hard);
  margin: 32px 0;
}
.shader-canvas {
  width: 100%;
  height: 340px;
  border: 2px solid var(--ink-strong);
  background: #141210;
  cursor: crosshair;
}
.shader-sliders {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
  margin-top: 16px;
}
.shader-slider label {
  display: flex;
  justify-content: space-between;
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 600;
  margin-bottom: 6px;
}
.shader-slider input[type="range"] {
  width: 100%;
  accent-color: var(--accent);
}

/* ==========================================================================
   EDITORIAL LIGHTBOX DIALOG
   ========================================================================== */
dialog.lightbox {
  padding: 0;
  border: 3px solid var(--ink-strong);
  border-radius: var(--radius-px);
  background: var(--paper);
  color: var(--ink);
  width: min(94vw, 1080px);
  max-height: 92vh;
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.45);
  overflow: auto;
}
dialog.lightbox[open] {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
}
dialog.lightbox::backdrop {
  background: rgba(23, 22, 22, 0.78);
  backdrop-filter: blur(4px);
}
.lightbox__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 18px;
  background: var(--blush);
  border-bottom: 2px solid var(--ink-strong);
  font-family: var(--font-mono);
  font-size: 13px;
  font-weight: 700;
}
.lightbox__stage {
  background: #1c1a17;
  display: flex;
  align-items: safe center;
  justify-content: safe center;
  max-height: 74vh;
  overflow: auto;
  padding: 16px;
}
.lightbox__stage img {
  max-height: min(68vh, 100%);
  width: auto;
  object-fit: contain;
  transition: transform 0.25s ease;
}
.lightbox__stage.is-zoomed img {
  transform: scale(1.6);
  transform-origin: center;
  cursor: zoom-out;
}
.lightbox__foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 12px 18px;
  background: var(--paper);
  border-top: 2px solid var(--ink-strong);
}

/* ==========================================================================
   PAGE CURTAIN SWEEP (Vertical for Case Studies, Horizontal for Side Pages)
   ========================================================================== */
#sa-curtain {
  position: fixed;
  inset: 0;
  z-index: 2147483000;
  pointer-events: auto;
  overflow: hidden;
}
#sa-curtain .sa-curtain-second,
#sa-curtain .sa-curtain-first {
  position: absolute;
  inset: 0;
}

/* ==========================================================================
   RESPONSIVE BREAKPOINTS (1199px Tablet / 809px Mobile — Matching Twan!)
   ========================================================================== */
@media (max-width: 1199.98px) {
  .top-contact,
  .side-menu,
  .scroll-minimap {
    display: none;
  }
  .burger-btn {
    display: inline-flex;
  }
  .site-logo-wrap {
    width: 200px;
    height: 44px;
  }
  .logo-cube-stage {
    transform: translateZ(-22px);
  }
  .logo-face {
    width: 200px;
    height: 44px;
    padding: 0;
  }
  .logo-face--front  { transform: translateZ(22px); }
  .logo-face--back   { transform: rotateX(180deg) translateZ(22px); }
  .logo-face--top    { transform: rotateX(90deg) translateZ(22px); gap: 1px; }
  .logo-face--bottom { transform: rotateX(-90deg) translateZ(22px); gap: 1px; }
  .logo-avatar {
    left: 12px;
    width: 50px;
    height: 40px;
  }
  .logo-meta-main {
    left: 96px;
    top: 7px;
  }
  .logo-name { font-size: 14.5px; }
  .logo-code {
    right: 5px;
    bottom: 2px;
    font-size: 9.5px;
    line-height: 1.08;
  }
  .logo-status-name { font-size: 17px; }
  .logo-status-pill { font-size: 11.5px; }

  .hero-mascot-layer {
    --hh-h: 164px;
    --hh-pad: 16px;
  }
  .hero-card {
    bottom: 72px;
    left: 112px;
    width: min(440px, calc(100vw - 130px));
  }

  .work-stage__header,
  .work-billboard,
  .sign-posts,
  .editorial-band,
  .footer-inner,
  .subpage-main {
    width: min(86%, 860px);
  }

  .disciplines-grid,
  .repo-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 809.98px) {
  .hero-mascot-layer {
    --hh-h: 112px;
    --hh-pad: 14px;
  }
  .hero-card {
    left: 14px;
    right: 14px;
    width: auto;
    max-width: calc(100vw - 28px);
    bottom: 124px;
    padding: 13px 15px;
  }
  .hero-card__title {
    font-size: 22px;
  }
  .hero-card__body {
    font-size: 13.5px;
  }
  .hero-card__actions {
    flex-wrap: wrap;
  }
  .hero-card::before {
    left: 26px;
    bottom: -8px;
    border-left: 0;
    border-right: 2px solid var(--ink-strong);
    border-bottom: 2px solid var(--ink-strong);
  }

  .scroll-cue {
    bottom: 14px;
    font-size: 10.5px;
    padding: 6px 10px;
  }
  .wzs-tooltip {
    bottom: auto;
    top: 78px;
    right: 14px;
  }

  .work-stage__header,
  .work-billboard,
  .sign-posts,
  .editorial-band,
  .footer-inner,
  .subpage-main {
    width: 92%;
  }

  .work-billboard {
    padding: 18px 16px;
  }

  .work-grid,
  .disciplines-grid,
  .repo-grid,
  .footer-top,
  .about-spread,
  .plate-grid,
  .plate-grid--three,
  .portrait-triptych,
  .shader-sliders,
  .skill-groups {
    grid-template-columns: 1fr;
  }

  .philosophy-strip {
    grid-template-columns: 1fr;
  }

  .subpage-main {
    padding-top: 96px;
  }

  .next-case img {
    width: 96px;
    height: 68px;
  }
}

/* ==========================================================================
   PREFERS-REDUCED-MOTION (Honors WCAG & ui-ux-pro-max Guidelines)
   ========================================================================== */
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  .window-zoom-scene {
    height: 100vh;
    height: 100svh;
  }
  .work-stage {
    margin-top: 0;
    background: var(--paper);
  }
  .work-stage__title {
    color: var(--ink-strong);
    text-shadow: none;
  }
  .pixel-wall-canvas {
    display: none;
  }
}
