/* ─────────────────────────────────────────
   IMPORTS
───────────────────────────────────────── */
@import url('https://fonts.googleapis.com/css2?family=Khand:wght@700&family=Inter:wght@300;400;500;600&family=Space+Mono:wght@400;700&display=swap');

@font-face {
  font-family: 'Gordan';
  src: url('assets/gordan/Gordan.ttf') format('truetype');
  font-weight: normal;
  font-style: normal;
  font-display: swap;
}

/* ─────────────────────────────────────────
   RESET & BASE
───────────────────────────────────────── */
*, *::before, *::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

:root {
  --bg: #050505;
  --white: #ffffff;
  --white-10: rgba(255,255,255,0.1);
  --white-05: rgba(255,255,255,0.05);
  --white-03: rgba(255,255,255,0.03);
  --white-50: rgba(255,255,255,0.5);
  --white-30: rgba(255,255,255,0.3);
  --white-15: rgba(255,255,255,0.15);
  --font-display: 'Gordan', sans-serif;
  --font-body: 'Space Mono', monospace;
  --font-mono: 'Space Mono', monospace;
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-inout: cubic-bezier(0.45, 0, 0.55, 1);
}

html {
  scroll-behavior: smooth;
  font-size: 24px;
  background: var(--bg);
  overflow-x: hidden;
}

body {
  font-family: var(--font-body);
  background: var(--bg);
  color: var(--white);
  overflow-x: hidden;

}



/* ─────────────────────────────────────────
   GRAIN TEXTURE
───────────────────────────────────────── */
#grain {
  position: fixed;
  inset: -50%;
  width: 200%; height: 200%;
  pointer-events: none;
  z-index: 9000;
  opacity: 0.04;
  will-change: transform;
  animation: grain 0.8s steps(2) infinite;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='300' height='300'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='300' height='300' filter='url(%23noise)' opacity='1'/%3E%3C/svg%3E");
}

@keyframes grain {
  0%   { transform: translate(0, 0); }
  10%  { transform: translate(-2%, -3%); }
  20%  { transform: translate(3%, 2%); }
  30%  { transform: translate(-1%, 4%); }
  40%  { transform: translate(4%, -1%); }
  50%  { transform: translate(-3%, 3%); }
  60%  { transform: translate(2%, -4%); }
  70%  { transform: translate(-4%, 2%); }
  80%  { transform: translate(3%, -2%); }
  90%  { transform: translate(-2%, 3%); }
  100% { transform: translate(0, 0); }
}

/* ─────────────────────────────────────────
   NAVBAR
───────────────────────────────────────── */
#navbar {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 22px 40px;
  transition: background 0.4s, backdrop-filter 0.4s;
}

#navbar.scrolled {
  background: rgba(5,5,5,0.7);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
}

.nav-brand {
  display: flex;
  align-items: center;
  gap: 70px;
  margin-left: 2vw;
  /* Entrance animation initial state — off the left edge of the screen */
  opacity: 0;
  transform: translateX(-100vw);
  transition: opacity 0s, transform 0s;
}

/* When loading is done, slide in from left */
body.nav-animate-in .nav-brand {
  opacity: 1;
  transform: translateX(0);
  transition: opacity 0.7s var(--ease-out), transform 0.7s var(--ease-out);
}

.nav-logo {
  font-family: var(--font-display);
  font-size: 1.6rem;
  font-weight: normal;
  letter-spacing: 0.05em;
  color: var(--white);
  text-decoration: none;
  display: flex;
  align-items: center;
  transform: translateY(5px);
}

/* Base logo-expand shared styles */
.nav-logo .logo-expand {
  display: inline-block;
  overflow: hidden;
  white-space: nowrap;
}

/* On initial load, force logo expanded to show Shikhar Singh */
body:not(.nav-animate-in) .nav-logo .logo-expand {
  max-width: 150px;
  opacity: 1;
  transition: none;
}

/* Once nav-animate-in fires, wait for slide, then collapse */
body.nav-animate-in .nav-logo .logo-expand {
  max-width: 0;
  opacity: 0;
  transition: max-width 0.5s 0.5s cubic-bezier(0.77, 0, 0.175, 1), opacity 0.4s 0.5s ease;
}

/* Hover re-expands even after collapse */
body.nav-animate-in .nav-brand:hover .logo-expand {
  max-width: 150px;
  opacity: 1;
  transition: max-width 0.5s cubic-bezier(0.77, 0, 0.175, 1), opacity 0.4s ease;
}

.nav-plus {
  font-size: 0.8rem;
  opacity: 0.8;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 0;
  list-style: none;
  /* Entrance state: hidden via clip-path from the LEFT (reveals right-to-left) */
  clip-path: inset(0 0 0 100%);
  transition: none;
}

/* Nav links reveal AFTER slash finishes (slash takes 0.9s + 0.1s delay = 1.0s total) */
body.nav-animate-in .nav-links {
  animation: navLinksReveal 0.5s var(--ease-out) 1.0s forwards;
}

.nav-links li {
  display: flex;
  align-items: center;
}

.nav-links .sep {
  display: none;
}

.nav-links a {
  font-family: var(--font-mono);
  font-size: 0.62rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--white);
  text-decoration: none;
  
  display: flex;
  align-items: center;
  position: relative;
  padding: 6px 48px 6px 16px;
  margin: 0;
  transition: color 0.3s ease;
  z-index: 1;
}

/* The expanding white box */
.nav-links a::before {
  content: '';
  position: absolute;
  top: 0; right: 16px; bottom: 0;
  width: 0;
  background: var(--white);
  z-index: -1;
  transition: width 0.3s cubic-bezier(0.77, 0, 0.175, 1);
}

/* The / character */
.nav-links a::after {
  content: '/';
  position: absolute;
  right: 16px;
  color: var(--white);
  transition: color 0.3s ease;
}

.nav-links a:hover,
.nav-links a.active {
  color: var(--bg);
}

.nav-links a:hover::after,
.nav-links a.active::after {
  content: '|';
  color: var(--bg);
}

.nav-links a:hover::before,
.nav-links a.active::before {
  width: calc(100% - 16px);
}

.hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  padding: 4px;
  background: transparent;
  border: none;
  cursor: pointer;
}

.hamburger span {
  display: block;
  width: 22px; height: 1px;
  background: var(--white);
  transition: all 0.3s;
}

/* ─────────────────────────────────────────
   PAGE WRAPPER & SECTIONS
───────────────────────────────────────── */
.page {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  position: relative;
  overflow: hidden;
  background: #000000;
}

/* ─────────────────────────────────────────
   SYSTEM STATUS BAR (Bottom)
───────────────────────────────────────── */
.status-bar {
  position: fixed;
  bottom: 0; left: 0; right: 0;
  z-index: 500;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 40px;
  pointer-events: none;
}

.status-left, .status-right {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.status-label {
  font-family: var(--font-mono);
  font-size: 0.5rem;
  letter-spacing: 0.15em;
  color: var(--white-30);
  text-transform: uppercase;
}

.status-value {
  font-family: var(--font-mono);
  font-size: 0.5rem;
  letter-spacing: 0.1em;
  color: var(--white-30);
  display: flex;
  align-items: center;
  gap: 6px;
}

.status-dot {
  width: 4px; height: 4px;
  border-radius: 50%;
  background: var(--white-30);
  display: inline-block;
}

.status-center {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
}

.crosshair-h, .crosshair-v {
  position: absolute;
  background: var(--white-15);
}

.crosshair-h {
  width: 18px; height: 1px;
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
}

.crosshair-v {
  width: 1px; height: 18px;
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
}

.status-crosshair {
  position: relative;
  width: 18px; height: 18px;
}

/* ─────────────────────────────────────────
   PAGE CORNER MARKERS
───────────────────────────────────────── */
.corner-tl, .corner-tr, .corner-bl, .corner-br {
  position: absolute;
  width: 24px; height: 24px;
  pointer-events: none;
  z-index: 100;
}

.corner-tl { top: 18px; left: 18px; border-top: 2px solid rgba(255, 255, 255, 0.4); border-left: 2px solid rgba(255, 255, 255, 0.4); }
.corner-tr { top: 18px; right: 18px; border-top: 2px solid rgba(255, 255, 255, 0.4); border-right: 2px solid rgba(255, 255, 255, 0.4); }
.corner-bl { bottom: 54px; left: 18px; border-bottom: 2px solid rgba(255, 255, 255, 0.4); border-left: 2px solid rgba(255, 255, 255, 0.4); }
.corner-br { bottom: 54px; right: 18px; border-bottom: 2px solid rgba(255, 255, 255, 0.4); border-right: 2px solid rgba(255, 255, 255, 0.4); }

/* ─────────────────────────────────────────
   SCROLL INDICATOR (dots sidebar)
───────────────────────────────────────── */
.scroll-dots {
  position: fixed;
  right: 28px;
  top: 50%;
  transform: translateY(-50%);
  z-index: 800;
  display: flex;
  flex-direction: column;
  gap: 16px;
  pointer-events: none;
}

.scroll-dot {
  width: 9px; height: 9px;
  border: 1.5px solid var(--white-30);
  border-radius: 50%;
  transition: background 0.3s, border-color 0.3s;
}

.scroll-dot.active {
  background: var(--white);
  border-color: var(--white);
}

/* ─────────────────────────────────────────
   HERO PAGE
───────────────────────────────────────── */
#page-hero {
  position: relative;
  height: 100vh;
  overflow: hidden;
}


.hero-content {
  position: relative;
  z-index: 10;
  height: 100vh;
  display: flex;
  align-items: center;
  padding: 80px 40px 80px;
  pointer-events: none;
}

.hero-content > * {
  pointer-events: all;
}


.hero-left {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding-top: 40px;
  padding-left: 6vw;
}

.hero-heading {
  font-family: var(--font-display);
  font-size: clamp(4rem, 8vw, 8.5rem);
  font-weight: normal;
  line-height: 0.75;
  letter-spacing: 0;
  color: var(--white);
  text-transform: uppercase;
  margin-bottom: 0;
}

.hero-plus {
  font-size: 0.8rem;
  margin: 32px 0 40px 0;
}

.hero-sub {
  font-family: var(--font-body);
  font-size: 0.8rem;
  font-weight: 300;
  line-height: 1.7;
  color: var(--white-50);
  max-width: 450px;
  margin-bottom: 36px;
}

.hero-links {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.hero-link {
  font-family: var(--font-mono);
  font-size: 0.65rem;
  letter-spacing: 0.15em;
  color: var(--white);
  text-decoration: none;
  text-transform: uppercase;

  display: flex;
  align-items: center;
  gap: 12px;
  transition: opacity 0.25s, gap 0.25s;
}

.hero-link:hover {
  opacity: 0.7;
  gap: 18px;
}

.hero-link .arrow {
  font-size: 0.8rem;
  transition: transform 0.25s var(--ease-out);
}

.hero-link:hover .arrow {
  transform: translateX(4px);
}

/* Spline container — fills the whole hero so Spline centers its scene naturally */
.hero-right {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 100%;
  pointer-events: none;
  z-index: 1;
}

#hero-spline {
  width: 100%;
  height: 100%;
  border: none;
  display: block;
  pointer-events: all;
  background: transparent;
  filter: grayscale(1) contrast(1.15);
  transform: scale(1.15);
}

/* Covers the "Built with Spline" badge in the bottom-right of the iframe */
.spline-watermark-cover {
  position: absolute;
  bottom: 0;
  right: 0;
  width: 200px;
  height: 60px;
  background: #000;
  pointer-events: none;
  z-index: 2;
}

/* Technical UI labels on hero */
.hero-coords {
  position: absolute;
  top: 15%;
  left: 56%;
  font-family: var(--font-mono);
  font-size: 0.48rem;
  letter-spacing: 0.1em;
  color: var(--white-50);
  line-height: 1.8;
  pointer-events: none;
  z-index: 10;
}

.hero-coords .plus-mark {
  position: absolute;
  top: -18px; right: -70px;
  font-size: 1.6rem;
  color: var(--white-30);
}

.grid-system-label {
  position: absolute;
  right: 15vw;
  bottom: 52%;
  font-family: var(--font-mono);
  font-size: 0.48rem;
  letter-spacing: 0.12em;
  color: var(--white-50);
  text-align: left;
  pointer-events: none;
  line-height: 1.8;
  z-index: 10;
}

.grid-system-label .label-line {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 8px;
}

/* Center Crosshair Decorator */
.center-crosshair {
  position: absolute;
  top: 85%;
  left: 50%;
  transform: translate(-50%, -50%);
  pointer-events: none;
  z-index: 5;
}

.center-crosshair .cc-dot {
  width: 2px;
  height: 2px;
  background: var(--white-50);
  border-radius: 50%;
  position: absolute;
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
}

.center-crosshair .cc-dash {
  position: absolute;
  background: var(--white-30);
}

.center-crosshair .cc-dash.d-left,
.center-crosshair .cc-dash.d-right {
  width: 8px; height: 1px;
  top: 50%; transform: translateY(-50%);
}

.center-crosshair .cc-dash.d-left { left: -14px; }
.center-crosshair .cc-dash.d-right { right: -14px; }

.center-crosshair .cc-dash.d-top,
.center-crosshair .cc-dash.d-bottom {
  width: 1px; height: 8px;
  left: 50%; transform: translateX(-50%);
}

.center-crosshair .cc-dash.d-top { top: -14px; }
.center-crosshair .cc-dash.d-bottom { bottom: -14px; }

.center-crosshair .cc-long-line {
  position: absolute;
  width: 1px;
  background: rgba(255, 255, 255, 0.05);
  left: 50%; transform: translateX(-50%);
}

.center-crosshair .cc-long-line.line-top {
  bottom: 24px;
  height: 250px;
}

.center-crosshair .cc-long-line.line-bottom {
  top: 24px;
  height: 250px;
}
.design-plus {
  position: relative;
  width: 1em;
  height: 1em;
  opacity: 0.5;
}
.design-plus::before,
.design-plus::after {
  content: '';
  position: absolute;
  background: var(--white);
}
.design-plus::before {
  top: 50%; left: 0; right: 0;
  height: 1px;
  transform: translateY(-50%);
}
.design-plus::after {
  left: 50%; top: 0; bottom: 0;
  width: 1px;
  transform: translateX(-50%);
}

.dots-column {
  position: absolute;
  right: 40px;
  top: 50%;
  transform: translateY(-50%);
  display: flex;
  flex-direction: column;
  gap: 8px;
  pointer-events: none;
}

.dots-column .d-dot {
  width: 5px; height: 5px;
  border: 1px solid var(--white-15);
  border-radius: 50%;
}

.dots-column .d-dot.filled {
  background: var(--white);
  border-color: var(--white);
}

/* ─────────────────────────────────────────
   ABOUT PAGE
───────────────────────────────────────── */
#page-about {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 1fr 1fr;
  padding: 100px 60px 80px 0;
  gap: 60px;
  position: relative;
}

.about-left {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding-left: calc(6vw + 2vw); /* 6vw to match hero gap + 2vw for the page's removed left pad */
}

.about-heading-row {
  display: flex;
  align-items: flex-end;
  gap: 0;
  position: relative;
  margin-bottom: 18px;
}

.about-heading {
  font-family: var(--font-display);
  font-size: clamp(5rem, 9vw, 10rem);
  font-weight: normal;
  line-height: 1;
  letter-spacing: 0.01em;
  color: var(--white);
  text-transform: uppercase;
}

.about-me-label {
  font-family: var(--font-body);
  font-size: 1.1rem;
  font-weight: 400;
  color: var(--white-50);
  letter-spacing: 0.05em;
  margin-left: 6px;
  margin-bottom: 36px;
  position: relative;
}

.about-me-plus {
  font-size: 0.8rem;
  color: var(--white-30);
  margin-left: 8px;
}

.about-divider-row {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 160px;
  margin-bottom: 30px;
  margin-top: 10px;
}

.about-divider {
  flex: 1;
  height: 1px;
  background: var(--white-15);
}

.about-plus-small {
  font-family: var(--font-mono);
  font-size: 0.9rem;
  color: var(--white-20);
  line-height: 1;
}

.about-text {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  line-height: 1.9;
  color: var(--white-50);
  max-width: 440px;
  margin-bottom: 40px;
}

.about-text p {
  margin-bottom: 18px;
}

.about-text strong {
  color: var(--white);
  font-weight: 700;
}

/* Tech Stack */
.tech-stack-heading {
  font-family: var(--font-mono);
  font-size: 0.55rem;
  letter-spacing: 0.18em;
  color: var(--white-30);
  text-transform: uppercase;
  margin-bottom: 20px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.tech-plus {
  font-size: 0.8rem;
  color: var(--white-50);
}

.tech-divider {
  flex: 1;
  height: 1px;
  background: var(--white-10);
  max-width: 250px;
}

.tech-stack {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.tech-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;

}

.tech-icon {
  width: 60px; height: 60px; /* Slightly smaller to fit 6 in a row */
  border: 1px solid rgba(255, 255, 255, 0.2);
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  transition: border-color 0.25s, background-color 0.25s, transform 0.25s var(--ease-out), box-shadow 0.25s;
  background: transparent;
  margin-top: 16px;
  margin-right: 16px;
}

.tech-icon::before {
  content: '';
  position: absolute;
  top: -16px;
  left: 8px;
  width: 100%;
  height: 16px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-bottom: none;
  transform: skewX(-45deg);
  box-sizing: border-box;
  transition: border-color 0.25s, background-color 0.25s, filter 0.25s;
}

.tech-icon::after {
  content: '';
  position: absolute;
  top: -8px;
  right: -16px;
  width: 16px;
  height: 100%;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-left: none;
  transform: skewY(-45deg);
  box-sizing: border-box;
  transition: border-color 0.25s, background-color 0.25s, filter 0.25s;
}

.tech-card {
  --brand-color: rgba(255, 255, 255, 0.6);
}
.tech-card:nth-child(1) { --brand-color: #E34C26; } /* HTML */
.tech-card:nth-child(2) { --brand-color: #264DE4; } /* CSS */
.tech-card:nth-child(3) { --brand-color: #F0DB4F; } /* JS */
.tech-card:nth-child(4) { --brand-color: #3178C6; } /* TS */
.tech-card:nth-child(5) { --brand-color: #61DBFB; } /* React */
.tech-card:nth-child(6) { --brand-color: #6b00ed; } /* Next.js */

@media (hover: hover) {
  .tech-card:hover .tech-icon {
    border-color: var(--brand-color);
    background-color: color-mix(in srgb, var(--brand-color) 40%, transparent);
    transform: translateY(-4px);
    box-shadow: -10px 10px 20px rgba(0,0,0,0.5), 0 0 20px color-mix(in srgb, var(--brand-color) 50%, transparent);
  }
}
@media (pointer: coarse), (hover: none) {
  .tech-card:active .tech-icon {
    border-color: var(--brand-color);
    background-color: color-mix(in srgb, var(--brand-color) 40%, transparent);
    transform: translateY(-4px);
    box-shadow: -10px 10px 20px rgba(0,0,0,0.5), 0 0 20px color-mix(in srgb, var(--brand-color) 50%, transparent);
  }
}

@media (hover: hover) {
  .tech-card:hover .tech-icon::before {
    border-color: var(--brand-color);
    background-color: color-mix(in srgb, var(--brand-color) 60%, transparent);
  }
  .tech-card:hover .tech-icon::after {
    border-color: var(--brand-color);
    background-color: color-mix(in srgb, var(--brand-color) 20%, transparent);
  }
}
@media (pointer: coarse), (hover: none) {
  .tech-card:active .tech-icon::before {
    border-color: var(--brand-color);
    background-color: color-mix(in srgb, var(--brand-color) 60%, transparent);
  }
  .tech-card:active .tech-icon::after {
    border-color: var(--brand-color);
    background-color: color-mix(in srgb, var(--brand-color) 20%, transparent);
  }
}

.tech-icon svg {
  width: 28px; height: 28px;
  fill: var(--white);
  opacity: 0.9;
}

.tech-label {
  font-family: var(--font-mono);
  font-size: 0.45rem;
  letter-spacing: 0.1em;
  color: var(--white-30);
  text-transform: uppercase;
}

/* About Right */
.about-right {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  position: relative;
  gap: 16px;
}

.about-coords {
  position: absolute;
  top: 10px;
  left: -125px;
  font-family: var(--font-mono);
  font-size: 0.48rem;
  letter-spacing: 0.1em;
  color: var(--white-50);
  line-height: 1.8;
  pointer-events: none;
  z-index: 10;
  white-space: nowrap;
}

.about-coords-plus {
  position: absolute;
  margin-left: 8px;
  font-size: 1.6rem;
  color: var(--white-30);
  line-height: 1;
  transform: translateY(-6px);
  display: inline-block;
}

.portrait-container {
  position: relative;
  width: 100%;
  max-width: 380px;
}

.portrait-frame {
  width: 100%;
  aspect-ratio: 3/4;
  border-radius: 20px;
  overflow: hidden;
  /* White border with a dark gap between photo and border — like the reference */
  border: 2px solid rgba(255,255,255,0.85); /* Changed from outline to border to respect border-radius */
  padding: 6px; /* Replaces outline-offset to create the dark gap */
  background: rgba(5,5,5,1);
  box-sizing: border-box;
  transition: transform 0.45s var(--ease-out), box-shadow 0.45s var(--ease-out), padding 0.45s var(--ease-out);
}

.portrait-frame:hover {
  transform: scale(1.04) translateY(-6px);
  padding: 8px;
  box-shadow:
    0 20px 60px rgba(0,0,0,0.6),
    0 4px 20px rgba(255,255,255,0.06);
  transition: transform 0.3s var(--ease-out), box-shadow 0.3s var(--ease-out), padding 0.3s var(--ease-out);
}

.portrait-frame img {
  width: 100%;
  height: 100%;
  border-radius: 14px; /* inner radius */
  object-fit: cover;
  object-position: top center;
  display: block;
  transition: transform 0.45s var(--ease-out);
}

.portrait-frame:hover img {
  transform: scale(1.03);
}

.portrait-meta {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 18px;
  margin-left: 6px; /* align with the edge of the border */
  align-self: flex-start;
}

.meta-crosshair {
  position: relative;
  width: 14px;
  height: 14px;
}

.meta-line-v, .meta-line-h {
  position: absolute;
  background: var(--white-30);
}

.meta-line-v {
  width: 1px;
  height: 100%;
  left: 50%;
  top: 0;
  transform: translateX(-50%);
}

.meta-line-h {
  width: 100%;
  height: 1px;
  top: 50%;
  left: 0;
  transform: translateY(-50%);
}

.portrait-meta .meta-filename {
  font-family: var(--font-mono);
  font-size: 0.5rem;
  letter-spacing: 0.1em;
  color: var(--white-30);
  text-transform: uppercase;
}

/* ─────────────────────────────────────────
   WORK PAGE
───────────────────────────────────────── */
#page-work {
  min-height: 100vh;
  padding: 100px 0 80px;
  position: relative;
}

.work-heading-row {
  margin: 0 120px;
  margin-bottom: 0;
}

.work-heading {
  font-family: var(--font-display);
  font-size: clamp(5rem, 9vw, 10rem);
  font-weight: normal;
  line-height: 1;
  letter-spacing: 0.01em;
  color: var(--white);
  text-transform: uppercase;
}

.work-header {
  margin: 0 120px;
  padding: 20px 0;
  display: flex;
  align-items: center;
  gap: 12px;
  border-bottom: none;
}

.work-header-label {
  font-family: var(--font-mono);
  font-size: 0.55rem;
  letter-spacing: 0.2em;
  color: var(--white-30);
  text-transform: uppercase;
}

.work-header-plus {
  font-size: 0.8rem;
  color: var(--white-30);
}

.projects-list {
  display: flex;
  flex-direction: column;
}

.project-item {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  margin: 0 120px;
  padding: 48px 0px 0px 0px;
  border-bottom: 1px solid var(--white);
  position: relative;
  overflow: hidden;
  transition: background 0.3s;
}

.project-item:first-child {
  border-top: none;
}

.project-item::before {
  content: '';
  position: absolute;
  inset: 0;
  background: var(--white-03);
  transform: translateX(-101%);
  transition: transform 0.45s var(--ease-out);
}

.project-item:hover::before {
  transform: translateX(0);
}

.project-left {
  display: flex;
  flex-direction: column;
  position: relative;
  z-index: 1;
}

.project-num {
  font-family: var(--font-mono);
  font-size: 0.5rem;
  letter-spacing: 0.12em;
  color: var(--white-20, rgba(255,255,255,0.2));
  margin-bottom: 4px;
}

.project-title {
  font-family: var(--font-display);
  font-size: clamp(2.94rem, 6.3vw, 7.875rem);
  font-weight: normal;
  line-height: 0.9;
  color: var(--white);
  text-transform: uppercase;
  letter-spacing: 0.01em;
  transform: scaleY(1.1);
  transform-origin: bottom left;
  transition: letter-spacing 0.4s var(--ease-out);
  will-change: transform, letter-spacing;
}

@media (hover: hover) {
  .project-item:hover::before {
    transform: scaleX(1);
    transform-origin: left;
  }
  .project-item:hover .project-title {
    letter-spacing: 0.04em;
  }
  .project-item:hover .project-plus {
    transform: rotate(45deg);
    color: var(--white);
  }
}
@media (pointer: coarse), (hover: none) {
  .project-item:active::before {
    transform: scaleX(1);
    transform-origin: left;
  }
  .project-item:active .project-title {
    letter-spacing: 0.04em;
  }
  .project-item:active .project-plus {
    transform: rotate(45deg);
    color: var(--white);
  }
}

/* Work page preview on hover */
.project-preview {
  position: fixed;
  left: 0;
  top: 0;
  transform: scale(0.92);
  will-change: transform, opacity;
  width: 300px; /* Slightly wider for a better viewing experience */
  height: auto; /* Let it scale naturally to the image aspect ratio */
  border: 1px solid var(--white-10);
  overflow: hidden;
  opacity: 0;
  transition: opacity 0.3s;
  pointer-events: none;
  z-index: 10;
}

.project-preview img {
  width: 100%;
  height: 100%;
  object-fit: contain; /* Show the full screenshot uncropped */
  display: block;
}

/* ─────────────────────────────────────────
   PLAYGROUND PAGE
───────────────────────────────────────── */

#page-playground {
  padding: 100px 60px 80px;
  position: relative;
}

.playground-header {
  margin-bottom: 0;
}

.playground-heading {
  font-family: var(--font-display);
  font-size: clamp(4rem, 10vw, 10rem);
  font-weight: normal;
  line-height: 0.9;
  color: var(--white);
  text-transform: uppercase;
  letter-spacing: 0.01em;
  position: relative;
  display: inline-block;
}

.playground-heading-row {
  display: flex;
  align-items: flex-end;
  gap: 16px;
  margin-bottom: 16px;
}

.playground-toggle-btn {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  letter-spacing: 0.15em;
  color: var(--white);
  text-decoration: none;
  text-transform: uppercase;
  background: transparent;
  border: none;
  padding: 0;
  margin-top: 16px;
  cursor: pointer;

  display: flex;
  align-items: center;
  gap: 12px;
  transition: opacity 0.25s, gap 0.25s;
}

.playground-toggle-btn:hover {
  opacity: 0.7;
  gap: 18px;
}

.playground-toggle-btn .arrow {
  font-size: 0.8rem;
  transition: transform 0.25s var(--ease-out);
}

.playground-toggle-btn.expanded .arrow {
  transform: rotate(180deg);
}



.playground-coords {
  font-family: var(--font-mono);
  font-size: 0.48rem;
  letter-spacing: 0.1em;
  color: var(--white-50);
  line-height: 1.8;
  position: absolute;
  right: 60px;
  top: 70px;
  pointer-events: none;
  z-index: 10;
  white-space: nowrap;
}

.playground-coords-plus {
  position: absolute;
  margin-left: 8px;
  font-size: 1.6rem;
  color: var(--white-30);
  line-height: 1;
  transform: translateY(-6px);
  display: inline-block;
}

.system-mode {
  position: absolute;
  right: 60px;
  top: calc(130px + 10%);
  font-family: var(--font-mono);
  font-size: 0.5rem;
  letter-spacing: 0.1em;
  color: var(--white-30);
}

.system-mode span {
  color: var(--white-50);
}

.playground-sub {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  line-height: 1.6;
  color: var(--white-30);
  max-width: 650px;
  margin-bottom: 0;
}

/* Filter Bar */
.filter-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 40px;
  margin-bottom: 28px;
  border-bottom: 1px solid var(--white-10);
  padding-bottom: 10px;
}

.filters {
  display: flex;
  gap: 28px;
}

.filter-btn {
  font-family: var(--font-mono);
  font-size: 0.55rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--white-30);
  background: none;
  border: none;

  padding: 0;
  transition: color 0.2s;
  position: relative;
}

.filter-btn.active,
.filter-btn:hover {
  color: var(--white);
}

.filter-btn.active::after {
  content: '';
  position: absolute;
  bottom: -11px; left: 0;
  width: 100%; height: 1px;
  background: var(--white);
}

.view-toggle {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-mono);
  font-size: 0.5rem;
  letter-spacing: 0.1em;
  color: var(--white-30);
}

.view-toggle .toggle-active {
  border: 1px solid var(--white-30);
  padding: 2px 6px;
  color: var(--white);
}

/* Playground Grid */
.playground-grid-wrapper {
  overflow: hidden;
  transition: height 0.6s var(--ease-out);
}

.playground-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
}

.exp-card {
  background: var(--bg);
  border: 1px solid rgba(255, 255, 255, 0.15);
  margin: 4px; /* Give it space so it never touches the clipping edge */
  padding: 0;
  position: relative;
  overflow: hidden;

  aspect-ratio: 1 / 0.8;
  transition: background 0.3s, border-color 0.3s, transform 0.3s var(--ease-out);
}

@media (hover: hover) {
  .exp-card:hover {
    background: var(--white-03);
    border-color: rgba(255, 255, 255, 0.4);
    z-index: 2;
  }
}

/* Active state for touch interactions (works universally on all devices with touch) */
@media (pointer: coarse), (hover: none) {
  .exp-card:active {
    background: var(--white-03);
    border-color: rgba(255, 255, 255, 0.4);
    z-index: 2;
  }
}

.exp-card-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  padding: 14px 16px 0;
  position: relative;
  z-index: 1;
}

.exp-num {
  font-family: var(--font-mono);
  font-size: 0.55rem;
  color: var(--white-30);
  letter-spacing: 0.08em;
}

.exp-card-plus {
  font-size: 0.7rem;
  color: var(--white-20, rgba(255,255,255,0.2));
  transition: transform 0.25s var(--ease-out), color 0.25s;
}

@media (hover: hover) {
  .exp-card:hover .exp-card-plus {
    transform: rotate(45deg);
    color: var(--white-50);
  }
}

@media (pointer: coarse), (hover: none) {
  .exp-card:active .exp-card-plus {
    transform: rotate(45deg);
    color: var(--white-50);
  }
}

.exp-title-row {
  padding: 4px 16px 2px;
  position: relative;
  z-index: 1;
}

.exp-title {
  font-family: var(--font-mono);
  font-size: 0.58rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--white);
  font-weight: 700;
}

.exp-dash {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 2px 16px;
  position: relative;
  z-index: 1;
}

.exp-dash-line {
  width: 14px; height: 1px;
  background: var(--white-20, rgba(255,255,255,0.2));
}

.exp-dash-plus {
  font-size: 0.5rem;
  color: var(--white-15);
}

.exp-tag {
  font-family: var(--font-mono);
  font-size: 0.42rem;
  letter-spacing: 0.08em;
  color: var(--white-30);
  text-transform: lowercase;
}

/* Exp Card Visual Area */
.exp-visual {
  width: 100%;
  height: 55%;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
}

.exp-visual svg {
  width: 100%;
  height: 100%;
  max-height: 100%;
}

@keyframes flashText {
  0%, 100% { opacity: 0.9; text-shadow: 0 0 10px rgba(255,255,255,0.4); }
  50% { opacity: 0.3; text-shadow: none; }
}

.sound-hover-text {
  position: absolute;
  font-family: var(--font-mono);
  font-size: 0.8rem;
  font-weight: bold;
  letter-spacing: 0.2em;
  color: var(--white);
  text-transform: uppercase;
  transition: opacity 0.3s;
  pointer-events: none;
  animation: flashText 2s ease-in-out infinite;
}

#exp-sound-reactive:hover .sound-hover-text {
  opacity: 0 !important;
  animation: none;
}
#exp-sound-reactive:hover #sound-svg {
  opacity: 1 !important;
}

/* Audio blocked fallback state */
#exp-sound-reactive.audio-blocked:hover .sound-hover-text {
  opacity: 1 !important;
  animation: flashText 2s ease-in-out infinite !important;
}
#exp-sound-reactive.audio-blocked:hover #sound-svg {
  opacity: 0 !important;
}

/* ─────────────────────────────────────────
   CONTACT PAGE
───────────────────────────────────────── */
#page-contact {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 1fr 1fr;
  padding: 100px 60px 80px;
  gap: 80px;
  position: relative;
}

.contact-left {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding-left: calc(6vw + 2vw); /* Align with Hero and About pages */
}

.contact-heading {
  font-family: var(--font-display);
  font-size: clamp(4rem, 8vw, 9rem);
  font-weight: normal;
  line-height: 0.9;
  color: var(--white);
  text-transform: uppercase;
  letter-spacing: 0.01em;
  margin-bottom: 6px;
}

.contact-heading-plus {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  color: var(--white-20, rgba(255,255,255,0.2));
  margin-bottom: 20px;
}

.contact-sub {
  font-family: var(--font-mono);
  font-size: 0.6rem;
  line-height: 1.9;
  color: var(--white-50);
  margin-bottom: 40px;
}

/* Form */
.contact-form {
  display: flex;
  flex-direction: column;
  gap: 32px;
}

.form-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
  position: relative;
}

.form-label {
  font-family: var(--font-mono);
  font-size: 0.5rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--white);
  transition: color 0.2s;
}

.form-field:focus-within .form-label {
  color: var(--white);
}

.form-input {
  background: none;
  border: none;
  border-bottom: 1px solid var(--white-30);
  padding: 8px 0;
  font-family: var(--font-mono);
  font-size: 0.65rem;
  color: var(--white-70, rgba(255,255,255,0.7));
  outline: none;
  transition: border-color 0.25s, color 0.25s;
  width: 100%;
}

.form-input:focus {
  border-color: var(--white-50);
  color: var(--white);
}

.form-input::placeholder {
  color: var(--white-40, rgba(255,255,255,0.4));
}

textarea.form-input {
  resize: vertical;
  min-height: 100px;
  font-family: var(--font-mono);
}

.form-submit {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-top: 8px;
}

.submit-btn {
  font-family: var(--font-mono);
  font-size: 0.62rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--white);
  background: none;
  border: none;

  transition: color 0.25s, gap 0.25s;
  display: flex;
  align-items: center;
  gap: 12px;
}

.submit-btn:hover {
  color: var(--white);
}

.submit-btn .arrow {
  transition: transform 0.25s var(--ease-out);
}

.submit-btn:hover .arrow {
  transform: translateX(6px);
}

/* Contact Right */
.contact-right {
  display: flex;
  flex-direction: column;
}

.contact-info-header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 24px;
}

.contact-info-label {
  font-family: var(--font-mono);
  font-size: 0.55rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--white-30);
}

.contact-info-plus {
  font-size: 0.8rem;
  color: var(--white-30);
}

.contact-info-line {
  flex: 1;
  height: 1px;
  background: var(--white-10);
}

.contact-cards {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.contact-card {
  display: flex;
  align-items: center;
  gap: 20px;
  padding: 20px 0;
  border-bottom: 1px solid var(--white-05);
  text-decoration: none;
  color: inherit;

  position: relative;
  transition: background 0.2s, padding-left 0.2s;
}

.contact-card:first-child {
  border-top: 1px solid var(--white-05);
}

.contact-card:hover {
  padding-left: 8px;
}

.contact-icon-box {
  width: 56px; height: 56px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  transition: border-color 0.25s, background-color 0.25s, transform 0.25s var(--ease-out), box-shadow 0.25s;
  background: transparent;
  flex-shrink: 0;
  margin-top: 16px;
  margin-right: 16px;
}

.contact-icon-box::before {
  content: '';
  position: absolute;
  top: -16px;
  left: 8px;
  width: 100%;
  height: 16px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-bottom: none;
  transform: skewX(-45deg);
  box-sizing: border-box;
  transition: border-color 0.25s, background-color 0.25s;
}

.contact-icon-box::after {
  content: '';
  position: absolute;
  top: -8px;
  right: -16px;
  width: 16px;
  height: 100%;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-left: none;
  transform: skewY(-45deg);
  box-sizing: border-box;
  transition: border-color 0.25s, background-color 0.25s;
}

.contact-card:hover .contact-icon-box {
  border-color: rgba(255, 255, 255, 0.6);
  background-color: rgba(255, 255, 255, 0.05);
  transform: translateY(-4px);
  box-shadow: -10px 10px 20px rgba(0,0,0,0.5), 0 0 20px rgba(255, 255, 255, 0.05);
}

.contact-card:hover .contact-icon-box::before {
  border-color: rgba(255, 255, 255, 0.6);
  background-color: rgba(255, 255, 255, 0.1);
}

.contact-card:hover .contact-icon-box::after {
  border-color: rgba(255, 255, 255, 0.6);
  background-color: rgba(255, 255, 255, 0.02);
}

.contact-icon-box svg {
  width: 22px; height: 22px;
  fill: var(--white-50);
  transition: fill 0.25s;
}

.contact-card:hover .contact-icon-box svg {
  fill: var(--white);
}

.contact-card-text {
  flex: 1;
}

.contact-card-type {
  font-family: var(--font-mono);
  font-size: 0.5rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--white);
  margin-bottom: 4px;
}

.contact-card-value {
  font-family: var(--font-mono);
  font-size: 0.65rem;
  color: var(--white);
  text-decoration: none;

  transition: color 0.2s;
}

@media (hover: hover) {
  .contact-card:hover {
    background: var(--white-03);
    border-color: rgba(255, 255, 255, 0.4);
  }
  .contact-card:hover .contact-icon-box {
    border-color: var(--white);
    background-color: color-mix(in srgb, var(--white) 40%, transparent);
    transform: translateY(-4px);
    box-shadow: -10px 10px 20px rgba(0,0,0,0.5), 0 0 20px color-mix(in srgb, var(--white) 50%, transparent);
  }
  .contact-card:hover .contact-icon-box::before {
    border-color: var(--white);
    background-color: color-mix(in srgb, var(--white) 60%, transparent);
  }
  .contact-card:hover .contact-icon-box::after {
    border-color: var(--white);
    background-color: color-mix(in srgb, var(--white) 20%, transparent);
  }
  .contact-card:hover .contact-icon-box svg {
    opacity: 1;
  }
  .contact-card:hover .contact-card-value {
    color: var(--white);
  }
  .contact-card:hover .contact-card-plus {
    transform: rotate(45deg);
    color: var(--white-50);
  }
}
@media (pointer: coarse), (hover: none) {
  .contact-card:active {
    background: var(--white-03);
    border-color: rgba(255, 255, 255, 0.4);
  }
  .contact-card:active .contact-icon-box {
    border-color: var(--white);
    background-color: color-mix(in srgb, var(--white) 40%, transparent);
    transform: translateY(-4px);
    box-shadow: -10px 10px 20px rgba(0,0,0,0.5), 0 0 20px color-mix(in srgb, var(--white) 50%, transparent);
  }
  .contact-card:active .contact-icon-box::before {
    border-color: var(--white);
    background-color: color-mix(in srgb, var(--white) 60%, transparent);
  }
  .contact-card:active .contact-icon-box::after {
    border-color: var(--white);
    background-color: color-mix(in srgb, var(--white) 20%, transparent);
  }
  .contact-card:active .contact-icon-box svg {
    opacity: 1;
  }
  .contact-card:active .contact-card-value {
    color: var(--white);
  }
  .contact-card:active .contact-card-plus {
    transform: rotate(45deg);
    color: var(--white-50);
  }
}

/* Contact coords */
.contact-coords {
  font-family: var(--font-mono);
  font-size: 0.48rem;
  letter-spacing: 0.1em;
  color: var(--white-30);
  line-height: 1.8;
  pointer-events: none;
  margin-bottom: 70px; /* Space between coords and CONTACT INFO + */
}

/* ─────────────────────────────────────────
   PLAYGROUND SVG VISUALS
───────────────────────────────────────── */
.visual-cube-grid svg,
.visual-wave svg,
.visual-cursor svg,
.visual-loader svg,
.visual-noise svg,
.visual-grid-exp svg,
.visual-sphere svg,
.visual-type svg,
.visual-cube-study svg,
.visual-sound svg {
  width: 100%;
  height: 100%;
  opacity: 0.5;
}

.visual-kinetic {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.kinetic-text {
  font-family: var(--font-display);
  font-size: 2.5rem;
  font-weight: normal;
  color: var(--white-20, rgba(255,255,255,0.2));
  letter-spacing: 0.02em;
  animation: kinetic-shift 3s ease-in-out infinite;
}

@keyframes kinetic-shift {
  0%, 100% { letter-spacing: 0.02em; opacity: 0.15; }
  50% { letter-spacing: 0.2em; opacity: 0.3; }
}

.visual-typewriter {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--white-50);
  padding: 0 16px;
  display: flex;
  align-items: center;
}

.typewriter-caret {
  display: inline-block;
  width: 8px; height: 1em;
  background: var(--white-50);
  margin-left: 2px;
  animation: blink 1s step-end infinite;
}

@keyframes blink {
  0%, 100% { opacity: 1; }
  50% { opacity: 0; }
}

.visual-loader {
  padding: 12px 16px;
  font-family: var(--font-mono);
  font-size: 0.5rem;
  color: var(--white-30);
}

.loader-bar-bg {
  width: 100%;
  height: 2px;
  background: var(--white-10);
  margin: 8px 0 4px;
  position: relative;
  overflow: hidden;
}

.loader-bar-fill {
  height: 100%;
  background: var(--white-30);
  animation: loader-anim 2s ease-in-out infinite;
}

@keyframes loader-anim {
  0% { width: 0%; }
  80% { width: 78%; }
  100% { width: 78%; }
}

.loader-text {
  font-size: 0.4rem;
  color: var(--white-20, rgba(255,255,255,0.2));
  letter-spacing: 0.1em;
}

.loader-pct {
  font-size: 0.45rem;
  color: var(--white-30);
  text-align: right;
}

/* ─────────────────────────────────────────
   PLAYGROUND CARD HOVER EXPAND
───────────────────────────────────────── */
.exp-card {
  transition: transform 0.3s var(--ease-out), background 0.3s, box-shadow 0.3s;
}

@media (hover: hover) {
  .exp-card:hover {
    transform: scale(1.02);
    box-shadow: 0 0 0 1px var(--white-15);
    z-index: 5;
  }
}

@media (pointer: coarse), (hover: none) {
  .exp-card:active {
    transform: scale(1.02);
    box-shadow: 0 0 0 1px var(--white-15);
    z-index: 5;
  }
}

/* ─────────────────────────────────────────
   SCROLL PROGRESS BAR
───────────────────────────────────────── */
#scroll-progress {
  position: fixed;
  top: 0; left: 0;
  height: 1px;
  width: 0%;
  background: var(--white-30);
  z-index: 2000;
  transition: width 0.1s linear;
}



/* ─────────────────────────────────────────
   MOBILE RESPONSIVE
───────────────────────────────────────── */
@media (max-width: 900px) {
  #navbar {
    padding: 26px 24px 18px 24px;
  }

  .nav-links {
    display: none;
    position: absolute;
    top: 64px;
    right: 24px;
    background: rgba(10, 10, 10, 0.95);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    padding: 24px 32px;
    flex-direction: column;
    align-items: flex-end;
    justify-content: flex-start;
    gap: 24px;
    z-index: 999;
    
    /* Override the delayed desktop entrance animation */
    clip-path: none !important;
    animation: none !important;
    
    /* Simple dropdown transition */
    opacity: 0;
    transform: translateY(-10px);
    transition: opacity 0.3s ease, transform 0.3s ease;
  }

  .nav-links.open {
    display: flex;
    opacity: 1;
    transform: translateY(0);
    animation: none !important;
  }

  .nav-links .sep {
    display: none;
  }

  .nav-links a {
    font-size: 0.9rem;
  }

  .hamburger {
    display: flex;
    z-index: 1001;
  }

  .hamburger.open span:nth-child(1) {
    transform: translateY(6px) rotate(45deg);
  }
  .hamburger.open span:nth-child(2) {
    opacity: 0;
  }
  .hamburger.open span:nth-child(3) {
    transform: translateY(-6px) rotate(-45deg);
  }

  #page-hero .hero-content {
    grid-template-columns: 1fr;
    padding: 80px 24px 120px;
    gap: 0;
  }

  .hero-right {
    position: absolute;
    inset: 0;
    opacity: 0.3;
    z-index: 0;
  }

  .hero-left {
    position: relative;
    z-index: 1;
    pointer-events: none;
  }
  
  .hero-links {
    pointer-events: auto;
  }

  .hero-heading {
    font-size: clamp(3.5rem, 15vw, 6rem);
  }

  #page-about {
    grid-template-columns: 1fr;
    padding: 100px 24px 80px;
  }

  .about-right {
    order: -1;
    padding: 20px 0;
  }

  .portrait-frame {
    max-width: 260px;
    margin: 0 auto;
  }

  #page-about .center-crosshair {
    display: none;
  }

  #page-work {
    padding: 100px 0 80px;
  }

  .work-heading-row {
    margin: 0 24px;
    padding-top: 20px;
  }

  .work-header {
    margin: 0 24px;
    padding: 16px 0;
  }

  .project-item {
    margin: 0 24px;
    padding: 32px 0;
    flex-direction: column;
    align-items: flex-start;
    gap: 16px;
  }

  .project-right {
    margin-bottom: 0;
  }

  .project-title {
    font-size: clamp(2rem, 8vw, 4rem);
  }

  .project-preview {
    display: none;
  }

  #page-playground {
    padding: 100px 24px 80px;
    min-height: auto;
  }

  .filter-bar {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
  }
  .filter-bar::-webkit-scrollbar {
    display: none;
  }
  .filters {
    display: flex;
    flex-wrap: nowrap;
    gap: 24px;
  }

  .playground-grid-wrapper {
    overflow-x: auto;
    overflow-y: hidden;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    scroll-snap-type: x mandatory;
    padding-bottom: 24px;
    height: auto !important;
  }
  .playground-grid-wrapper::-webkit-scrollbar {
    display: none;
  }
  
  .playground-grid {
    display: flex;
    flex-wrap: nowrap;
    gap: 16px;
  }
  
  .exp-card {
    min-width: 280px;
    max-width: 85vw;
    scroll-snap-align: center;
    flex-shrink: 0;
  }

  #page-contact {
    grid-template-columns: 1fr;
    padding: 100px 24px 80px;
    gap: 48px;
  }

  .scroll-dots {
    display: none;
  }

  .hero-coords, .grid-system-label, .dots-column,
  .about-coords, .contact-coords,
  .playground-coords, .system-mode {
    display: none;
  }

  .status-bar {
    padding: 10px 24px;
  }

  .playground-toggle-wrapper {
    display: none !important;
  }
}

@media (max-width: 580px) {

  .about-heading {
    font-size: clamp(3.5rem, 14vw, 6rem);
  }

  .contact-heading {
    font-size: clamp(3rem, 12vw, 6rem);
  }
}

/* ─────────────────────────────────────────
   LOADING SCREEN & ANIMATIONS
───────────────────────────────────────── */
#loading-screen {
  position: fixed;
  top: 0; left: 0;
  width: 100vw; height: 100vh;
  z-index: 9999;
  pointer-events: all;
  background: transparent;
}

.loader-canvas-container {
  position: absolute;
  top: 0; left: 0;
  width: 100%; height: 100%;
}
.loader-canvas-container canvas {
  width: 100%; height: 100%;
  display: block;
}

.loader-half {
  position: absolute;
  top: 0; left: 0;
  width: 100%; height: 100%;
  background: black;
  pointer-events: none;
  overflow: hidden;
  transition: transform 1.2s cubic-bezier(0.77, 0, 0.175, 1);
}

.loader-top {
  clip-path: inset(0 0 50% 0);
}

.loader-bottom {
  clip-path: inset(50% 0 0 0);
}

#loading-screen.split .loader-top {
  transform: translateY(-100vh);
}

#loading-screen.split .loader-bottom {
  transform: translateY(100vh);
}

.loader-text-container {
  position: absolute;
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  width: 100vw;
  height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  perspective: 1200px;
  opacity: 0; /* Hidden by default until fonts load */
  transition: opacity 0.2s ease;
}

#loading-screen.fonts-loaded .loader-text-container {
  opacity: 1; /* Fade in smoothly once fonts are ready */
}

.loader-text {
  position: absolute;
  font-family: var(--font-display);
  font-size: clamp(4rem, 8vw, 8rem);
  color: var(--white);
  line-height: 1;
  text-transform: uppercase;
  backface-visibility: hidden;
  transform-style: preserve-3d;
}

.loader-hello {
  transform-origin: bottom center;
}

#loading-screen.fonts-loaded .loader-hello {
  animation: rotateOut 0.8s cubic-bezier(0.77, 0, 0.175, 1) 1.6s forwards;
}

.loader-namaste {
  font-family: 'Khand', sans-serif;
  letter-spacing: 0; /* Prevents the Hindi top line from breaking */
  transform-origin: top center;
  transform: rotateX(-90deg);
  opacity: 0;
}

#loading-screen.fonts-loaded .loader-namaste {
  animation: rotateIn 0.8s cubic-bezier(0.77, 0, 0.175, 1) 1.6s forwards;
}

@keyframes rotateOut {
  0% { transform: rotateX(0deg); opacity: 1; }
  100% { transform: rotateX(90deg); opacity: 0; }
}

@keyframes rotateIn {
  0% { transform: rotateX(-90deg); opacity: 0; }
  100% { transform: rotateX(0deg); opacity: 1; }
}

/* HERO ENTRANCE ANIMATIONS */
.hero-heading,
.hero-plus,
.hero-sub,
.hero-links,
.hero-coords,
.grid-system-label,
.dots-column {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 1s cubic-bezier(0.2, 0.8, 0.2, 1), transform 1s cubic-bezier(0.2, 0.8, 0.2, 1);
}

body.hero-animate-in .hero-heading {
  opacity: 1;
  transform: translateY(0);
  transition-delay: 0s;
}

body.hero-animate-in .hero-plus {
  opacity: 1;
  transform: translateY(0);
  transition-delay: 0.2s;
}

body.hero-animate-in .hero-sub {
  opacity: 1;
  transform: translateY(0);
  transition-delay: 0.3s;
}

/* ─────────────────────────────────────────
   NAV SLASH REVEALER
───────────────────────────────────────── */
.nav-slash-revealer {
  display: none;
}

@keyframes navLinksReveal {
  0%   { clip-path: inset(0 0 0 100%); }
  100% { clip-path: inset(0 0 0 0%); }
}



body.hero-animate-in .hero-links {
  opacity: 1;
  transform: translateY(0);
  transition-delay: 0.5s;
}

body.hero-animate-in .hero-coords {
  opacity: 1;
  transform: translateY(0);
  transition-delay: 0.4s;
}

body.hero-animate-in .grid-system-label {
  opacity: 1;
  transform: translateY(0);
  transition-delay: 0.55s;
}

body.hero-animate-in .dots-column {
  opacity: 1;
  transform: translateY(0);
  transition-delay: 0.65s;
}
