*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  cursor: none !important;
}

@font-face {
  font-family: 'Ricks';
  src: url('Ricks-Regular.otf') format('opentype');
  font-weight: normal;
  font-style: normal;
  font-display: swap;
}

:root {
  --bg: #0F172A;
  --surface: #1E293B;
  --border: rgba(255, 255, 255, 0.08);
  --text: #F8FAFC;
  --muted: #cbd5e1;
  /* Brightened for better WCAG AA contrast on dark backgrounds */
  --accent: #3B82F6;
  --white: #FFFFFF;
  --sp: 8px;
  --font-display: 'Clash Display', system-ui, sans-serif;
  --font-body: 'Inter', system-ui, sans-serif;
  --font-serif: 'Newsreader', Georgia, serif;
  --font-handwriting: 'Ricks', cursive;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  /* Refined, highly responsive easing */
}

html {
  scroll-behavior: smooth;
}

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 15px;
  line-height: 1.65;
  letter-spacing: -0.01em;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

body::after {
  content: "";
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  pointer-events: none;
  z-index: 9998;
  background: url('data:image/svg+xml;utf8,<svg viewBox="0 0 200 200" xmlns="http://www.w3.org/2000/svg"><filter id="noiseFilter"><feTurbulence type="fractalNoise" baseFrequency="0.85" numOctaves="3" stitchTiles="stitch"/></filter><rect width="100%" height="100%" filter="url(%23noiseFilter)"/></svg>');
  opacity: 0.12;
  mix-blend-mode: color-burn;
}

/* ── FOCAL BLUR UTILITIES ── */
.blur-focus {
  filter: blur(0.8px);
  opacity: 0.7;
  transition: filter 0.6s var(--ease), opacity 0.6s var(--ease);
}

.blur-focus:hover {
  filter: blur(0px);
  opacity: 1;
}

/* ── DUAL TYPOGRAPHY ── */
.heading-sans {
  font-family: var(--font-display);
  font-weight: 600;
  letter-spacing: -0.02em;
}

.heading-serif,
.hero-headline em,
.contact-headline em {
  font-family: var(--font-serif);
  font-style: italic;
  font-weight: 500;
  color: var(--accent);
  font-size: 1.1em;
  letter-spacing: -0.02em;
  display: inline-block;
  padding-right: 0.1em;
}

.handwriting-accent {
  font-family: var(--font-handwriting);
  color: var(--accent);
  transform: rotate(-3deg);
  display: inline-block;
  text-transform: uppercase;
  font-size: 1.25em; /* handwriting fonts usually need to be bigger */
  letter-spacing: 0.05em;
  opacity: 0.85;
}

/* ── BENTO GRID UTILITIES ── */
.bento-grid {
  display: grid;
  gap: 1px;
  background: var(--border);
  border: 1px solid var(--border);
}

.bento-cell {
  background: var(--bg);
  padding: 32px;
  /* More breathable internal spacing */
  transition: background 0.5s var(--ease), transform 0.5s var(--ease), box-shadow 0.5s var(--ease);
}

.bento-cell:hover {
  background: var(--surface);
  transform: translateY(-4px);
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.2);
}

.projects-grid {
  grid-template-columns: repeat(3, 1fr);
}

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

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

.project-layout {
  display: flex;
  flex-direction: column;
  gap: 24px;
  height: 100%;
}

.project-info {
  display: flex;
  flex-direction: column;
  flex-grow: 1;
}

.project-eyebrow {
  font-family: 'Courier New', monospace;
  font-size: 13px;
  color: var(--accent);
  margin-bottom: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.stat-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 24px;
  margin-bottom: 32px;
}

.stat-chip {
  font-family: 'Courier New', monospace;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text);
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  padding: 6px 12px;
  border-radius: 4px;
}

.stat-chip span {
  color: var(--accent);
}

.accent-arrow {
  color: var(--accent);
  font-size: 1.1em;
  transition: transform 0.4s var(--ease);
  display: inline-block;
}

.bento-cell:hover .accent-arrow {
  transform: translate(4px, -4px);
}



/* ── NAV ── */
nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  padding: 24px 48px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid transparent;
  transition: border-color 0.6s var(--ease), background 0.6s var(--ease);
}

nav.scrolled {
  background: rgba(15, 23, 42, 0.85);
  backdrop-filter: blur(12px);
  border-color: var(--border);
}

.nav-links {
  display: flex;
  gap: 36px;
  list-style: none;
}

.nav-links a {
  font-size: 13px;
  font-weight: 500;
  color: var(--muted);
  text-decoration: none;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  filter: blur(0.6px);
  opacity: 0.85;
}

/* ── HERO ── */
#hero {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 120px 48px 80px;
  /* Tweaked top padding */
  position: relative;
  overflow: hidden;
  /* Subtle gradient: dark glow */
  background:
    radial-gradient(ellipse at 65% 55%, rgba(59, 130, 246, 0.10) 0%, transparent 55%),
    radial-gradient(ellipse at 20% 80%, rgba(255, 255, 255, 0.03) 0%, transparent 50%),
    var(--bg);
}

/* Halftone texture overlay for Hero */
#hero::before {
  content: '';
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  background-image: radial-gradient(circle, rgba(255, 255, 255, 0.15) 1px, transparent 1px);
  background-size: 24px 24px;
  opacity: 0.04;
}

/* ── 3C: Hero number slow drift oscillation ── */
@keyframes spinBadge {
  to {
    transform: rotate(360deg);
  }
}

@keyframes heroDrift {

  0%,
  100% {
    transform: translateY(-50%) translateX(0px);
  }

  50% {
    transform: translateY(-50%) translateX(-6px);
  }
}

.hero-bg-number {
  position: absolute;
  top: 50%;
  right: -40px;
  transform: translateY(-50%);
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(280px, 30vw, 480px);
  /* Wireframe / Blueprint aesthetic instead of blurry blob */
  color: transparent;
  -webkit-text-stroke: 1px rgba(255, 255, 255, 0.17);
  line-height: 1;
  user-select: none;
  pointer-events: none;
  letter-spacing: -0.05em;
  animation: heroDrift 16s ease-in-out infinite;
}

/* Spinning Editorial Badge removed */


.hero-eyebrow {
  font-size: 12px;
  font-family: 'Courier New', monospace;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 24px;
  opacity: 0.9;
}

.hero-headline {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(56px, 8vw, 120px);
  line-height: 0.92;
  letter-spacing: -0.035em;
  color: var(--text);
  text-shadow: 0 0 12px rgba(29, 29, 31, 0.15);
  /* Soft, glowing bleed */
  max-width: 900px;
  position: relative;
  z-index: 1;
}

.hero-sub {
  margin-top: 36px;
  max-width: 520px;
  font-size: 16px;
  font-weight: 400;
  color: var(--muted);
  line-height: 1.6;
  letter-spacing: -0.01em;
  position: relative;
  z-index: 1;
  filter: blur(0.4px);
  opacity: 0.9;
}

.hero-cta-row {
  margin-top: 48px;
  display: flex;
  align-items: center;
  gap: 24px;
  position: relative;
  z-index: 1;
}

.btn-primary {
  border: 1.5px solid var(--accent);
  color: var(--accent);
  padding: calc(var(--sp)*1.5) calc(var(--sp)*3);
  font-family: 'Inter', sans-serif;
  font-size: 0.875rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  text-decoration: none;
  background: transparent;
  transition: background 0.4s var(--ease), color 0.4s var(--ease), border-color 0.4s var(--ease), transform 0.4s var(--ease), box-shadow 0.4s var(--ease);
}

.btn-primary:hover {
  background: var(--accent);
  color: var(--surface);
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(59, 130, 246, 0.25);
}

.btn-ghost {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--muted);
  font-size: 14px;
  font-weight: 500;
  text-decoration: none;
  transition: color 0.4s var(--ease), transform 0.4s var(--ease);
  border-bottom: 1px solid var(--border);
  padding-bottom: 2px;
}

.btn-ghost:hover {
  color: var(--text);
  transform: translateX(4px);
}

.hero-scroll-indicator {
  position: absolute;
  bottom: 32px;
  right: 48px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  color: var(--muted);
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.scroll-line {
  width: 1px;
  height: 48px;
  background: linear-gradient(to bottom, var(--accent), transparent);
  animation: scrollPulse 3s cubic-bezier(0.4, 0, 0.2, 1) infinite;
}

@keyframes scrollPulse {

  0%,
  100% {
    opacity: 0.2;
    transform: scaleY(0.8);
    transform-origin: top;
  }

  50% {
    opacity: 1;
    transform: scaleY(1);
    transform-origin: top;
  }
}

/* ── SECTION BASE ── */
section {
  padding: 160px 48px;
  /* Increased vertical rhythm */
}

.section-label {
  font-family: 'Courier New', monospace;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 20px;
  filter: blur(0.4px);
  opacity: 0.9;
}

.section-title {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(36px, 5vw, 64px);
  letter-spacing: -0.025em;
  line-height: 1;
  color: var(--text);
  margin-bottom: 80px;
}

.divider {
  height: 1px;
  background: var(--border);
  margin: 0 48px;
}

/* ── WORK / PROJECTS ── */
#work {
  background: var(--surface);
  padding-top: 70px;
  padding-bottom: 30px;
  /* noticeably lighter than hero for contrast */
}

/* ── ABOUT ── */
#about {
  padding: 0;
  overflow: hidden;
  background: var(--surface);
}

/* ── Editorial Spread ── */
.about-spread {
  display: grid;
  grid-template-columns: 1fr 1.1fr;
  min-height: 90vh;
  position: relative;
}

.about-spread-left {
  padding: 80px 48px 80px 48px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  position: relative;
  z-index: 2;
}

.about-editorial-headline {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(48px, 7vw, 96px);
  line-height: 0.92;
  letter-spacing: -0.035em;
  color: var(--text);
  margin-bottom: 36px;
  position: relative;
}

.about-editorial-headline .who {
  display: block;
  font-size: 0.38em;
  font-weight: 500;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--accent);
  font-family: 'Courier New', monospace;
  margin-bottom: 12px;
}

.about-editorial-headline .name-line {
  display: inline-block;
  position: relative;
}

/* ── Ink-stamp imperfection on the name ── */
.name-ink {
  display: inline-block;
  /* Letterpress-style misprint: warm offset below, faint red ghost above */
  text-shadow:
    3px 4px 0 rgba(59, 130, 246, 0.10),
    /* blue ink offset, below right */
    -1px -2px 0 rgba(220, 60, 80, 0.06),
    /* faint red above left */
    0 0 24px rgba(59, 130, 246, 0.04);
  /* very soft ambient glow */
  transform: rotate(-0.4deg);
  /* barely-off-angle, like hand-stamped */
  transform-origin: left baseline;
}

.about-spread-bio {
  font-size: 16px;
  color: var(--muted);
  line-height: 1.85;
  /* Highly composed reading block */
  max-width: 460px;
}

.about-spread-bio p {
  margin-bottom: 20px;
}

.about-spread-bio strong {
  color: var(--text);
  font-weight: 500;
}

.about-spread-bio a {
  color: var(--accent);
  text-decoration: none;
  border-bottom: 1px solid var(--accent);
}

/* ── Floating Annotation Labels ── */
.about-annotation {
  position: absolute;
  font-family: 'Courier New', monospace;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text);
  opacity: 0.25;
  user-select: none;
  pointer-events: none;
  white-space: nowrap;
}

/* ── Photo Panel ── */
.about-spread-right {
  position: relative;
  overflow: hidden;
  background: transparent;
  /* photo floats on its own */
  min-height: 85vh;
  /* explicit height so child percentages resolve */
  border-left: none;
}

.about-photo-hero {
  position: absolute;
  bottom: 0;
  right: 0;
  height: 92%;
  /* resolves correctly because parent has min-height */
  width: auto;
  max-width: none;
  object-fit: contain;
  object-position: bottom right;
  pointer-events: none;
  user-select: none;
}

/* Removed polaroid and ar glasses CSS */

/* ── Stats + Skills below the spread ── */
.about-lower {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0;
  border-top: 1px solid var(--border);
}

.about-lower-stats {
  padding: 64px 48px;
  border-right: 1px solid var(--border);
}

.about-lower-skills {
  padding: 64px 48px;
}

.about-stats {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2px;
}

.stat-block {
  background: var(--bg);
  padding: 32px;
  transition: transform 0.6s var(--ease);
}

.stat-block:hover {
  transform: translateY(-2px);
}

.stat-number {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 48px;
  color: var(--text);
  letter-spacing: -0.025em;
  line-height: 1;
  margin-bottom: 8px;
}

.stat-number span {
  color: var(--accent);
}

.stat-label {
  font-size: 13px;
  color: var(--muted);
  font-weight: 400;
  filter: blur(0.6px);
  opacity: 0.85;
}

.skills-list {
  display: flex;
  flex-direction: column;
  gap: 2px;
  margin-top: 2px;
}

.skill-row {
  background: var(--bg);
  padding: 16px 32px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  transition: background 0.4s var(--ease);
}

.skill-row:hover {
  background: var(--white);
}

.skill-row:hover .skill-name,
.skill-row:hover .skill-level {
  color: var(--accent);
}

.skill-name {
  font-size: 14px;
  font-weight: 500;
  color: var(--text);
  transition: color 0.4s var(--ease);
}

/* ── 4A: Frame counter tags ── */
.skill-level {
  font-size: 11px;
  color: var(--muted);
  letter-spacing: 0.06em;
  font-family: 'Courier New', monospace;
  filter: blur(0.4px);
  transition: color 0.4s var(--ease);
}

/* ── 5A: Creativity section dark tint ── */
#creativity {
  background: var(--surface);
  /* matches #work for alternating pattern */
  position: relative;
}

/* ── 2A: Halftone overlay on Creativity section ── */
#creativity::before {
  content: '';
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  background-image: radial-gradient(circle, rgba(15, 23, 42, 0.18) 1px, transparent 1px);
  background-size: 18px 18px;
  opacity: 0.03;
}

#creativity>* {
  position: relative;
  z-index: 1;
}

/* ── 1B: SVG drawn underline on titles ── */
.draw-trigger {
  position: relative;
  display: inline-block;
}

.draw-trigger svg.drawn-underline {
  position: absolute;
  bottom: -6px;
  left: 0;
  width: 100%;
  height: 10px;
  overflow: visible;
}

.draw-trigger svg.drawn-underline path {
  stroke: var(--accent);
  stroke-width: 2;
  fill: none;
  stroke-linecap: round;
  stroke-dasharray: 300;
  stroke-dashoffset: 300;
  /* transition removed for GSAP Scrubbing */
}

/* ── 2B: Rotated quote block ── */
.rotated-quote {
  transform: rotate(-1.2deg);
  transform-origin: left center;
  transition: transform 0.4s var(--ease);
}

.rotated-quote:hover {
  transform: rotate(0deg);
}

/* ── 3B: Staggered creativity card entries ── */
.creativity-card {
  background: var(--surface);
  padding: 32px;
  opacity: 0;
  transition: box-shadow 0.4s var(--ease), opacity 0.7s var(--ease);
}

.creativity-card:hover {
  box-shadow: 0 8px 32px rgba(59, 130, 246, 0.08), 0 0 0 1px rgba(59, 130, 246, 0.1);
}

.creativity-card.reveal-left {
  transform: translateX(-20px);
  transition: box-shadow 0.4s var(--ease), opacity 0.7s var(--ease), transform 0.7s var(--ease);
}

.creativity-card.reveal-drop {
  transform: translateY(-16px);
  transition: box-shadow 0.4s var(--ease), opacity 0.7s var(--ease), transform 0.7s var(--ease);
}

.creativity-card.reveal-scale {
  transform: scale(0.96);
  transition: box-shadow 0.4s var(--ease), opacity 0.7s var(--ease), transform 0.7s var(--ease);
}

.creativity-card.reveal-up {
  transform: translateY(16px);
  transition: box-shadow 0.4s var(--ease), opacity 0.7s var(--ease), transform 0.7s var(--ease);
}

.creativity-card.visible {
  opacity: 1;
  transform: none;
}

/* ── CONTACT ── */
#contact {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0;
  align-items: center;
  min-height: 60vh;
  padding: 120px 0;
}

.contact-left {
  padding: 0 48px;
  border-right: 1px solid rgba(255, 255, 255, 0.08);
}

.contact-headline {
  font-family: var(--font-display);
  font-weight: 625;
  font-size: clamp(40px, 5vw, 72px);
  letter-spacing: -0.025em;
  line-height: 1;
  color: #F5F5F7;
  /* near-white on dark */
  text-shadow: 0 0 40px rgba(59, 130, 246, 0.2);
  margin-bottom: 24px;
}

.contact-sub {
  font-size: 16px;
  color: var(--muted);
  line-height: 1.85;
  margin-bottom: 40px;
  max-width: 440px;
  filter: blur(0.4px);
  transition: filter 0.6s var(--ease);
}

.contact-left:hover .contact-sub {
  filter: blur(0px);
}

.contact-email {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  font-family: var(--font-display);
  font-weight: 650;
  font-size: 20px;
  color: #F5F5F7;
  text-decoration: none;
  letter-spacing: -0.02em;
  border-bottom: 1px solid var(--accent);
  padding-bottom: 4px;
  transition: color 0.4s var(--ease);
}

.contact-email:hover {
  color: var(--accent);
}

.contact-right {
  padding: 0 48px;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.social-link {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 24px 32px;
  background: rgba(255, 255, 255, 0.04);
  text-decoration: none;
  border: 1px solid rgba(255, 255, 255, 0.06);
  margin-bottom: 2px;
  transition: background 0.4s var(--ease), transform 0.4s var(--ease);
}

.social-link:hover {
  background: rgba(255, 255, 255, 0.08);
  transform: translateX(4px);
}

.social-link:hover .social-arrow {
  transform: translate(4px, -4px);
}

.social-name {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 18px;
  color: #F5F5F7;
  letter-spacing: -0.02em;
}

.social-handle {
  font-size: 13px;
  color: rgba(255, 255, 255, 0.35);
  margin-top: 2px;
  filter: blur(0.5px);
  transition: filter 0.4s var(--ease);
}

.social-link:hover .social-handle {
  filter: blur(0px);
}

.social-arrow {
  color: var(--accent);
  font-size: 18px;
  transition: transform 0.4s var(--ease);
}

/* ── FOOTER ── */
footer {
  padding: 32px 48px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

footer p {
  font-size: 13px;
  color: rgba(255, 255, 255, 0.35);
  filter: blur(0.4px);
}

.footer-accent {
  font-size: 13px;
  color: var(--accent);
  font-family: var(--font-display);
  letter-spacing: -0.02em;
  font-weight: 500;
}

/* ── CUSTOM LERP CURSOR ── */
#cursor {
  position: fixed;
  top: 0;
  left: 0;
  width: 28px;
  height: 28px;
  border: 1.5px solid var(--accent);
  border-radius: 50%;
  pointer-events: none;
  z-index: 9999;
  transform: translate(-50%, -50%);
  transition: width 0.3s var(--ease), height 0.3s var(--ease), background 0.3s var(--ease), border-color 0.3s var(--ease);
  will-change: transform;
}

#cursor.hovered {
  width: 48px;
  height: 48px;
  background: rgba(255, 255, 255, 0.12);
  border-color: rgba(255, 255, 255, 0.3);
  backdrop-filter: blur(2px);
}

/* ── ANIMATIONS ── */
.fade-up {
  opacity: 0;
  transform: translateY(24px);
  /* Tighter distance to prevent floating */
  filter: blur(8px);
}

/* ── 1A: Chromatic offset on a key word ── */
.chroma-offset {
  position: relative;
  display: inline-block;
}

.chroma-offset::before {
  content: attr(data-text);
  position: absolute;
  left: -2px;
  top: 0;
  color: rgba(0, 212, 255, 0.35);
  clip-path: polygon(0 0, 100% 0, 100% 45%, 0 45%);
  pointer-events: none;
  user-select: none;
}

.chroma-offset::after {
  content: attr(data-text);
  position: absolute;
  left: 2px;
  top: 0;
  color: rgba(255, 60, 120, 0.2);
  clip-path: polygon(0 55%, 100% 55%, 100% 100%, 0 100%);
  pointer-events: none;
  user-select: none;
}

/* ── Hide custom cursor on touch devices ── */
@media (hover: none) {
  #cursor {
    display: none;
  }
}

@media (max-width: 900px) {
  nav {
    padding: 20px 24px;
  }

  /* Keep nav links visible but compact on smaller screens */
  .nav-links {
    gap: 16px;
    flex-wrap: wrap;
    justify-content: flex-end;
  }

  .nav-links a {
    font-size: 11px;
  }

  section {
    padding: 80px 24px;
  }

  .divider {
    margin: 0 24px;
  }

  #hero {
    padding: 120px 24px 80px;
    justify-content: center;
  }

  .hero-cta-row {
    flex-direction: column;
    align-items: stretch;
    /* Stack buttons for better touch targets */
    gap: 16px;
  }

  .hero-cta-row .btn-primary,
  .hero-cta-row .btn-ghost {
    text-align: center;
    justify-content: center;
  }

  /* Hide the giant "27" bg number on mobile — it clips and looks broken */
  .hero-bg-number {
    display: none;
  }

  .hero-scroll-indicator {
    display: none;
  }

  /* Projects: single column */
  .bento-projects {
    grid-template-columns: 1fr;
  }

  .bento-cell {
    padding: 32px;
    /* Scale down internal padding from 48px desktop */
  }

  /* About editorial: stack to single column */
  .about-spread {
    grid-template-columns: 1fr;
    min-height: auto;
  }

  .about-spread-left {
    padding: 64px 24px 40px;
  }

  .about-spread-right {
    min-height: 70vw;
    /* Give the floating photo more space on mobile */
    height: 70vw;
    border-left: none;
    border-top: 1px solid var(--border);
  }

  .about-photo-hero {
    position: absolute;
    bottom: 0;
    right: 0;
    height: 100%;
    width: auto;
    object-fit: contain;
    object-position: bottom right;
  }

  .about-photo-polaroid {
    width: 120px;
    left: 16px;
    bottom: 16px;
  }

  .about-photo-ar {
    display: none;
  }

  /* About lower: stack */
  .about-lower {
    grid-template-columns: 1fr;
  }

  .about-lower-stats {
    padding: 48px 24px;
    border-right: none;
    border-bottom: 1px solid var(--border);
  }

  .about-lower-skills {
    padding: 48px 24px;
  }

  /* About stats: keep 2-col on mobile since they're compact */
  .about-stats {
    grid-template-columns: 1fr 1fr;
  }

  /* Creativity grid: single column */
  #creativity>div[style*="grid-template-columns"] {
    grid-template-columns: 1fr !important;
    max-width: 100%;
  }

  /* Creativity section inner padding */
  #creativity {
    padding: 80px 24px !important;
  }

  /* Contact: stack, even padding */
  #contact {
    grid-template-columns: 1fr;
    padding: 80px 0;
  }

  .contact-left {
    border-right: none;
    border-bottom: 1px solid var(--border);
    padding: 0 24px 64px;
  }

  .contact-right {
    padding: 64px 24px 0;
  }

  .social-link {
    padding: 20px 24px;
    /* Slightly tighter touch targets to avoid squeezing */
  }

  footer {
    padding: 24px;
    flex-direction: column;
    gap: 8px;
    align-items: center;
    text-align: center;
  }
}

@media (max-width: 600px) {
  .hero-headline {
    font-size: clamp(40px, 12vw, 56px);
    /* Prevent word break */
    letter-spacing: -0.025em;
  }

  .about-editorial-headline {
    font-size: clamp(36px, 10vw, 48px);
  }

  .bento-cell {
    padding: 24px;
    /* Maximize screen real estate on phones */
  }

  .about-spread-left {
    padding: 48px 24px 32px;
  }

  .about-lower-stats,
  .about-lower-skills {
    padding: 32px 24px;
  }

  #contact {
    padding: 64px 0;
  }

  .contact-left {
    padding: 0 24px 48px;
  }

  .contact-right {
    padding: 48px 24px 0;
  }

  #creativity {
    padding: 64px 24px !important;
  }

  .section-title {
    font-size: clamp(32px, 8vw, 48px);
    margin-bottom: 48px;
  }

  .stat-number {
    font-size: 36px;
  }
}

/* ── COMMAND PALETTE ── */
#cmd-palette-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.4);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  z-index: 1000;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding-top: 12vh;
  opacity: 1;
  transition: opacity 0.3s var(--ease), backdrop-filter 0.3s var(--ease);
}

#cmd-palette-backdrop.cmd-hidden {
  opacity: 0;
  pointer-events: none;
  backdrop-filter: blur(0px);
  -webkit-backdrop-filter: blur(0px);
}

#cmd-palette {
  width: 100%;
  max-width: 560px;
  background: rgba(15, 23, 42, 0.95);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  box-shadow: 0 32px 64px rgba(0, 0, 0, 0.4), 0 0 0 1px rgba(255, 255, 255, 0.05);
  overflow: hidden;
  transform: scale(1) translateY(0);
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

#cmd-palette-backdrop.cmd-hidden #cmd-palette {
  transform: scale(0.96) translateY(12px);
}

.cmd-header {
  display: flex;
  align-items: center;
  padding: 16px 20px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  gap: 12px;
}

#cmd-input {
  flex: 1;
  background: transparent;
  border: none;
  color: var(--text);
  font-family: var(--font-body);
  font-size: 16px;
  outline: none;
}

#cmd-input::placeholder {
  color: rgba(255, 255, 255, 0.3);
}

.cmd-badge {
  font-size: 10px;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.4);
  background: rgba(255, 255, 255, 0.08);
  padding: 4px 8px;
  border-radius: 4px;
  letter-spacing: 0.05em;
}

.cmd-body {
  padding: 12px;
  max-height: 400px;
  overflow-y: auto;
}

.cmd-section {
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: rgba(255, 255, 255, 0.3);
  padding: 8px 12px;
}

.cmd-item {
  display: flex;
  flex-direction: column;
  padding: 12px;
  border-radius: 8px;
  color: var(--muted);
  text-decoration: none;
  transition: background 0.2s var(--ease), color 0.2s var(--ease);
  cursor: pointer;
  background: transparent;
  border: none;
  width: 100%;
  text-align: left;
}

.cmd-item:hover,
.cmd-item:focus {
  background: rgba(255, 255, 255, 0.06);
  color: var(--text);
  outline: none;
}

.cmd-item-label {
  font-size: 14px;
  font-weight: 500;
  color: var(--text);
}

.cmd-item-desc {
  font-size: 12px;
  color: rgba(255, 255, 255, 0.4);
  margin-top: 2px;
}

/* ── WIREFRAME RAW MODE (EASTER EGG) ── */
body.raw-mode {
  background-image:
    linear-gradient(rgba(59, 130, 246, 0.1) 1px, transparent 1px),
    linear-gradient(90deg, rgba(59, 130, 246, 0.1) 1px, transparent 1px);
  background-size: 40px 40px;
}

body.raw-mode * {
  outline: 1px solid rgba(59, 130, 246, 0.2) !important;
  transition: outline 0.3s ease;
}

body.raw-mode .fade-up,
body.raw-mode img {
  filter: grayscale(100%) contrast(1.2) !important;
}

body.raw-mode::after {
  content: "DEVELOPER WIREFRAME MODE ACTIVE";
  position: fixed;
  bottom: 24px;
  left: 24px;
  color: var(--accent);
  font-family: 'Courier New', monospace;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.1em;
  z-index: 9999;
  pointer-events: none;
}