/*
  CREATIVE BEAR — Modern Artistic Studio Site
  Version 2.0 - Award-winning redesign
  Tech: HTML, CSS, vanilla JS, GSAP, Lenis
*/

/* CSS Variables - Enhanced Design System */
:root {
  /* Colors - Light Theme */
  --bg: #f8f7f4;
  --bg-secondary: #f0efec;
  --paper: #ffffff;
  --text: #1a1a1a;
  --text-secondary: #4a4a4a;
  --muted: #7a7a7a;
  --line: #e5e3de;

  /* Accent Colors */
  --accent: #6a8f7f;
  --accent-light: #8fb5a5;
  --accent-dark: #4a6f5f;
  --accent-ink: #26423a;

  /* Warm Accent for CTAs */
  --warm: #c4907a;
  --warm-light: #d4a090;

  /* Gradients */
  --gradient-primary: linear-gradient(135deg, var(--accent) 0%, #86c2ba 50%, #7eaad9 100%);
  --gradient-warm: linear-gradient(135deg, var(--warm) 0%, #d4a090 100%);
  --gradient-mesh: radial-gradient(ellipse 80% 50% at 20% 40%, rgba(106, 143, 127, 0.15), transparent),
                   radial-gradient(ellipse 60% 60% at 80% 20%, rgba(134, 194, 186, 0.12), transparent),
                   radial-gradient(ellipse 50% 50% at 40% 80%, rgba(126, 170, 217, 0.08), transparent);

  /* Shadows */
  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.04);
  --shadow-md: 0 8px 24px rgba(0, 0, 0, 0.06);
  --shadow-lg: 0 16px 48px rgba(0, 0, 0, 0.08);
  --shadow-glow: 0 0 60px rgba(106, 143, 127, 0.2);

  /* Typography */
  --font-display: 'Montserrat', system-ui, sans-serif;
  --font-body: 'Montserrat', system-ui, sans-serif;

  /* Transitions */
  --ease-out-expo: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-out-quart: cubic-bezier(0.25, 1, 0.5, 1);
  --ease-in-out: cubic-bezier(0.65, 0, 0.35, 1);

  /* Spacing */
  --space-xs: 0.5rem;
  --space-sm: 1rem;
  --space-md: 2rem;
  --space-lg: 4rem;
  --space-xl: 8rem;

  /* Layout */
  --footer-reserve: calc(env(safe-area-inset-bottom, 0px) + 72px);
  --header-height: 80px;

  /* Cursor */
  --cursor-size: 8px;
  --cursor-ring-size: 40px;
}

/* Base Reset */
*, *::before, *::after { box-sizing: border-box; }
html, body { height: 100%; }
html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  overflow-x: hidden;
}

body {
  margin: 0;
  font-family: var(--font-body);
  color: var(--text);
  background: var(--bg);
  line-height: 1.6;
  letter-spacing: -0.01em;
  overflow-x: hidden;
  position: relative;
  width: 100%;
  max-width: 100vw;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Smooth Scroll Container (for Lenis) */
html.lenis, html.lenis body {
  height: auto;
}

.lenis.lenis-smooth {
  scroll-behavior: auto !important;
}

.lenis.lenis-smooth [data-lenis-prevent] {
  overscroll-behavior: contain;
}

.lenis.lenis-stopped {
  overflow: hidden;
}

/* ============================================
   LOADING SCREEN - Always Dark
   ============================================ */
.loader {
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: #0f0f1a;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: opacity 0.6s var(--ease-out-expo), visibility 0.6s;
}

.loader.loaded {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

/* Hide hero content until page is ready - prevents flash of unstyled content */
body:not(.is-ready) .hero-title,
body:not(.is-ready) .hero-sub,
body:not(.is-ready) .hero-cta,
body:not(.is-ready) .hero-art,
body:not(.is-ready) .scroll-indicator {
  opacity: 0;
  visibility: hidden;
}

/* Hero art fades in when ready */
.hero-art {
  opacity: 0;
  transition: opacity 0.8s var(--ease-out-expo);
}

body.is-ready .hero-art {
  opacity: 1;
}

.loader-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.5rem;
}

.loader-logo {
  width: 60px;
  height: 60px;
  color: #86c2ba; /* Always use dark theme accent for dark loader */
}

.loader-icon {
  width: 100%;
  height: 100%;
}

.loader-circle {
  transform-origin: center;
  animation: loaderSpin 1.5s var(--ease-in-out) infinite;
}

@keyframes loaderSpin {
  0% { stroke-dashoffset: 113; transform: rotate(0deg); }
  50% { stroke-dashoffset: 28; }
  100% { stroke-dashoffset: 113; transform: rotate(360deg); }
}

.loader-text {
  font-family: var(--font-display);
  font-size: 0.85rem;
  font-weight: 500;
  letter-spacing: 0.2em;
  color: #8888a0;
  opacity: 0;
  animation: loaderTextFade 1.5s ease infinite;
}

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

/* ============================================
   CUSTOM CURSOR
   ============================================ */
.cursor {
  position: fixed;
  top: 0;
  left: 0;
  pointer-events: none;
  z-index: 10000;
  mix-blend-mode: difference;
}

.cursor-dot {
  position: absolute;
  width: var(--cursor-size);
  height: var(--cursor-size);
  background: #fff;
  border-radius: 50%;
  transform: translate(-50%, -50%);
  transition: transform 0.15s var(--ease-out-expo), opacity 0.15s;
}

.cursor-ring {
  position: absolute;
  width: var(--cursor-ring-size);
  height: var(--cursor-ring-size);
  border: 1px solid rgba(255, 255, 255, 0.5);
  border-radius: 50%;
  transform: translate(-50%, -50%);
  transition: transform 0.4s var(--ease-out-expo), width 0.4s var(--ease-out-expo), height 0.4s var(--ease-out-expo), border-color 0.3s;
}

.cursor-text {
  position: absolute;
  transform: translate(-50%, -50%);
  font-family: var(--font-body);
  font-size: 0.7rem;
  font-weight: 500;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: #fff;
  white-space: nowrap;
  opacity: 0;
  transition: opacity 0.3s var(--ease-out-expo);
}

/* Cursor States */
.cursor.cursor-hover .cursor-dot {
  transform: translate(-50%, -50%) scale(0.5);
}

.cursor.cursor-hover .cursor-ring {
  width: 60px;
  height: 60px;
  border-color: rgba(255, 255, 255, 0.8);
}

.cursor.cursor-text-visible .cursor-ring {
  width: 100px;
  height: 100px;
}

.cursor.cursor-text-visible .cursor-text {
  opacity: 1;
}

.cursor.cursor-hidden .cursor-dot,
.cursor.cursor-hidden .cursor-ring {
  opacity: 0;
  transform: translate(-50%, -50%) scale(0);
}

/* Hide cursor on touch devices */
@media (hover: none) and (pointer: coarse) {
  .cursor { display: none; }
}

/* ============================================
   NOISE TEXTURE OVERLAY
   ============================================ */
.noise-overlay {
  position: fixed;
  inset: 0;
  z-index: 9998;
  pointer-events: none;
  opacity: 0.03;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)'/%3E%3C/svg%3E");
  background-repeat: repeat;
}

[data-theme="dark"] .noise-overlay {
  opacity: 0.025;
}

/* ============================================
   GRADIENT MESH BACKGROUND
   ============================================ */
.gradient-mesh {
  position: fixed;
  inset: 0;
  z-index: -1;
  overflow: hidden;
  pointer-events: none;
}

.mesh-blob {
  position: absolute;
  border-radius: 50%;
  filter: blur(80px);
  opacity: 0.5;
  animation: meshFloat 20s ease-in-out infinite;
}

.mesh-blob-1 {
  width: 50vw;
  height: 50vw;
  max-width: 600px;
  max-height: 600px;
  background: radial-gradient(circle, rgba(106, 143, 127, 0.3) 0%, transparent 70%);
  top: -10%;
  right: -10%;
  animation-delay: 0s;
}

.mesh-blob-2 {
  width: 40vw;
  height: 40vw;
  max-width: 500px;
  max-height: 500px;
  background: radial-gradient(circle, rgba(134, 194, 186, 0.25) 0%, transparent 70%);
  bottom: 20%;
  left: -15%;
  animation-delay: -7s;
}

.mesh-blob-3 {
  width: 35vw;
  height: 35vw;
  max-width: 450px;
  max-height: 450px;
  background: radial-gradient(circle, rgba(126, 170, 217, 0.2) 0%, transparent 70%);
  top: 50%;
  right: 20%;
  animation-delay: -14s;
}

@keyframes meshFloat {
  0%, 100% { transform: translate(0, 0) scale(1); }
  25% { transform: translate(30px, -30px) scale(1.05); }
  50% { transform: translate(-20px, 20px) scale(0.95); }
  75% { transform: translate(20px, 30px) scale(1.02); }
}

[data-theme="dark"] .mesh-blob-1 {
  background: radial-gradient(circle, rgba(134, 194, 186, 0.15) 0%, transparent 70%);
}

[data-theme="dark"] .mesh-blob-2 {
  background: radial-gradient(circle, rgba(169, 221, 214, 0.12) 0%, transparent 70%);
}

[data-theme="dark"] .mesh-blob-3 {
  background: radial-gradient(circle, rgba(126, 170, 217, 0.1) 0%, transparent 70%);
}

/* Prevent background scroll when overlays open (lock both html and body) */
html.no-scroll, body.no-scroll { overflow: hidden; height: 100%; }

/* Dark Theme - Aurora-inspired */
[data-theme="dark"] {
  --bg: #0f0f1a;
  --bg-secondary: #161625;
  --paper: #1c1c2e;
  --text: #f5f5f7;
  --text-secondary: #c5c5d0;
  --muted: #8888a0;
  --line: #2a2a45;

  --accent: #86c2ba;
  --accent-light: #a0d4cc;
  --accent-dark: #6aa29a;
  --accent-ink: #a9ddd6;

  --warm: #d4a090;
  --warm-light: #e4b0a0;

  --gradient-mesh: radial-gradient(ellipse 80% 50% at 20% 40%, rgba(134, 194, 186, 0.08), transparent),
                   radial-gradient(ellipse 60% 60% at 80% 20%, rgba(169, 221, 214, 0.06), transparent),
                   radial-gradient(ellipse 50% 50% at 40% 80%, rgba(126, 170, 217, 0.05), transparent);

  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.2);
  --shadow-md: 0 8px 24px rgba(0, 0, 0, 0.3);
  --shadow-lg: 0 16px 48px rgba(0, 0, 0, 0.4);
  --shadow-glow: 0 0 80px rgba(134, 194, 186, 0.15);
}

/* Light-mode ambient hue variables (cool default) */
[data-theme="light"] {
  --ambient-a: color-mix(in srgb, var(--accent), #ffffff 10%);
  --ambient-b: color-mix(in srgb, var(--accent-ink), #ffffff 20%);
}
@media (prefers-color-scheme: light) {
  :root:not([data-theme]) { --ambient-a: color-mix(in srgb, var(--accent), #ffffff 10%); --ambient-b: color-mix(in srgb, var(--accent-ink), #ffffff 20%); }
}
/* Optional warmer tone: add class="ambient-warm" to <html> */
html.ambient-warm[data-theme="light"] { --ambient-a: color-mix(in srgb, #ffbfae, #ffffff 8%); --ambient-b: color-mix(in srgb, #ffcfa8, #ffffff 12%); }
@media (prefers-color-scheme: light) {
  :root.ambient-warm:not([data-theme]) { --ambient-a: color-mix(in srgb, #ffbfae, #ffffff 8%); --ambient-b: color-mix(in srgb, #ffcfa8, #ffffff 12%); }
}

/* ============================================
   BASE ELEMENTS
   ============================================ */
img, svg, video { display: block; max-width: 100%; height: auto; }
button, input, select, textarea { font: inherit; color: inherit; background: transparent; border: none; }
button { cursor: pointer; }
a { color: inherit; text-decoration: none; }

/* Selection */
::selection {
  background: var(--accent);
  color: white;
}

/* Focus visible */
:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

/* Honeypot field (hidden from users, visible to bots) */
.hp-field { position: absolute; left: -10000px; top: auto; width: 1px; height: 1px; overflow: hidden; }

/* Inline link-like button */
.link-like { all: unset; color: var(--accent-ink); cursor: pointer; border-bottom: 1px solid transparent; padding: 0 .2rem; }
.link-like:hover, .link-like:focus-visible { border-bottom-color: var(--accent); outline: none; }

/* Accessibility */
.skip-link { position: fixed; left: -9999px; top: 0; background: var(--accent); color: #fff; padding: .6rem .8rem; border-radius: 6px; z-index: 9999; }
.skip-link:focus { left: .8rem; top: .8rem; outline: none; box-shadow: var(--shadow); }

/* ============================================
   BRAND & HEADER
   ============================================ */
.site-brand {
  position: fixed;
  top: 24px;
  left: 28px;
  z-index: 1001;
  display: flex;
  align-items: center;
  gap: 0.6rem;
  pointer-events: auto;
}

.site-brand .brand-link {
  all: unset;
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  cursor: pointer;
  transition: opacity 0.3s var(--ease-out-expo);
}

.site-brand .brand-link:hover {
  opacity: 0.7;
}

.site-brand .logo {
  height: 32px;
  object-fit: contain;
  transition: transform 0.4s var(--ease-out-expo);
}

.site-brand .brand-link:hover .logo {
  transform: scale(1.05);
}

/* Logo theme switching */
.site-brand .logo-light { display: none; }
[data-theme="light"] .site-brand .logo-dark { display: block; }
[data-theme="light"] .site-brand .logo-light { display: none; }
[data-theme="dark"] .site-brand .logo-dark { display: none; }
[data-theme="dark"] .site-brand .logo-light { display: block; }
.site-brand .word {
  font-family: var(--font-display);
  font-weight: 600;
  letter-spacing: 0.06em;
  font-size: 0.95rem;
  color: var(--accent-ink);
  text-transform: lowercase;
}

/* Old theme toggle removed - now in hamburger menu */

/* If no explicit theme is set, respect prefers-color-scheme for logo swap */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme]) .site-brand .logo-dark { display: none; }
  :root:not([data-theme]) .site-brand .logo-light { display: block; }
}

/* Prevent horizontal overflow on main content */
main, .snap-container {
  overflow-x: hidden;
  max-width: 100%;
}


/* ============================================
   PANELS - Section Layout
   ============================================ */
.panel {
  min-height: 100vh;
  min-height: 100svh;
  position: relative;
  display: grid;
  align-content: center;
  padding: var(--space-xl) 0;
}

.panel .section-head {
  max-width: 1200px;
  width: min(92vw, 1200px);
  margin: 0 auto;
  padding: 0 var(--space-md);
}

/* Typography */
.panel h1, .panel h2 {
  font-family: var(--font-display);
  line-height: 1.05;
  letter-spacing: -0.03em;
  margin: 0;
}

.panel h1 {
  font-size: clamp(2.8rem, 8vw, 5rem);
  font-weight: 600;
}

.panel h2 {
  font-size: clamp(1.8rem, 5vw, 3rem);
  font-weight: 600;
}

.panel .intro {
  font-size: clamp(1rem, 1.2vw, 1.15rem);
  color: var(--muted);
  margin-top: var(--space-sm);
  max-width: 50ch;
}

/* ============================================
   BUTTONS - Modern with Micro-interactions
   ============================================ */
.btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 1rem 2rem;
  font-family: var(--font-body);
  font-size: 0.9rem;
  font-weight: 500;
  letter-spacing: 0.02em;
  color: var(--text);
  background: transparent;
  border: 1px solid var(--accent);
  border-radius: 999px;
  overflow: hidden;
  transition: all 0.4s var(--ease-out-expo);
  cursor: pointer;
}

.btn .btn-text {
  position: relative;
  z-index: 1;
  transition: color 0.4s var(--ease-out-expo);
}

.btn .btn-bg {
  position: absolute;
  inset: 0;
  background: var(--gradient-primary);
  opacity: 0;
  transform: scale(0.8);
  border-radius: inherit;
  transition: all 0.4s var(--ease-out-expo);
}

.btn:hover .btn-bg,
.btn:focus-visible .btn-bg {
  opacity: 1;
  transform: scale(1);
}

.btn:hover .btn-text,
.btn:focus-visible .btn-text {
  color: white;
}

.btn:hover {
  border-color: transparent;
  transform: translateY(-3px);
  box-shadow: var(--shadow-lg), var(--shadow-glow);
}

.btn:active {
  transform: translateY(-1px);
}

/* Magnetic button effect (enhanced via JS) */
.btn.magnetic {
  transition: transform 0.2s var(--ease-out-expo);
}

/* Button variants */
.btn.btn-warm {
  border-color: var(--warm);
}

.btn.btn-warm .btn-bg {
  background: var(--gradient-warm);
}

.btn.btn-ghost {
  border-color: transparent;
  background: var(--bg-secondary);
}

.btn.btn-ghost:hover {
  background: var(--line);
}

/* ============================================
   HAMBURGER NAVIGATION
   ============================================ */
.hamburger-nav {
  position: fixed;
  top: calc(20px + env(safe-area-inset-top, 0px));
  right: calc(20px + env(safe-area-inset-right, 0px));
  z-index: 1000;
}

.hamburger-toggle {
  position: relative;
  width: 48px;
  height: 48px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  background: rgba(28, 28, 46, 0.9);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid var(--line);
  border-radius: 12px;
  cursor: pointer;
  transition: all 0.4s var(--ease-out-expo);
  z-index: 1001;
}

.hamburger-toggle:hover {
  transform: scale(1.05);
  background: rgba(28, 28, 46, 1);
}

.hamburger-line {
  width: 20px;
  height: 2px;
  background: var(--text);
  border-radius: 2px;
  transition: all 0.4s var(--ease-out-expo);
  transform-origin: center;
}

/* Hamburger to X animation */
.hamburger-toggle[aria-expanded="true"] .hamburger-line:nth-child(1) {
  transform: translateY(8px) rotate(45deg);
}

.hamburger-toggle[aria-expanded="true"] .hamburger-line:nth-child(2) {
  opacity: 0;
  transform: scaleX(0);
}

.hamburger-toggle[aria-expanded="true"] .hamburger-line:nth-child(3) {
  transform: translateY(-8px) rotate(-45deg);
}

/* Menu Panel */
.hamburger-menu {
  position: fixed;
  top: 0;
  right: 0;
  width: 100%;
  max-width: 400px;
  height: 100vh;
  height: 100dvh;
  background: rgba(15, 15, 26, 0.98);
  backdrop-filter: blur(40px);
  -webkit-backdrop-filter: blur(40px);
  border-left: 1px solid var(--line);
  transform: translateX(100%);
  opacity: 0;
  visibility: hidden;
  transition: all 0.5s var(--ease-out-expo);
  z-index: 999;
}

.hamburger-menu[aria-hidden="false"] {
  transform: translateX(0);
  opacity: 1;
  visibility: visible;
}

.hamburger-menu-inner {
  display: flex;
  flex-direction: column;
  justify-content: center;
  height: 100%;
  padding: 100px 48px 60px;
}

.hamburger-nav-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 16px 0;
  background: none;
  border: none;
  cursor: pointer;
  text-align: left;
  width: 100%;
  transition: all 0.4s var(--ease-out-expo);
}

.nav-item:hover {
  transform: translateX(8px);
}

.nav-item .nav-number {
  font-family: var(--font-body);
  font-size: 0.75rem;
  font-weight: 500;
  color: var(--muted);
  letter-spacing: 0.05em;
}

.nav-item .nav-label {
  font-family: var(--font-display);
  font-size: 1.8rem;
  font-weight: 600;
  color: var(--text);
  letter-spacing: -0.02em;
  transition: color 0.3s;
}

.nav-item:hover .nav-label,
.nav-item.is-active .nav-label {
  color: var(--accent);
}

.nav-item.is-active .nav-number {
  color: var(--accent);
}

/* Theme Toggle inside menu */
.menu-theme-toggle {
  margin-top: auto;
  padding-top: 48px;
  border-top: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.menu-theme-toggle .theme-label {
  font-family: var(--font-body);
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--muted);
  letter-spacing: 0.02em;
}

.menu-theme-toggle .theme-toggle {
  position: relative;
  display: inline-grid;
  grid-auto-flow: column;
  align-items: center;
  gap: 10px;
  height: 40px;
  padding: 0 14px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: rgba(28, 28, 46, 0.8);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  box-shadow: var(--shadow-sm);
  transition: all 0.4s var(--ease-out-expo);
}

.menu-theme-toggle .theme-toggle:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.menu-theme-toggle .theme-option {
  font-family: var(--font-body);
  font-size: 0.75rem;
  font-weight: 500;
  color: var(--muted);
  letter-spacing: 0.02em;
  transition: color 0.3s;
}

.menu-theme-toggle .theme-toggle[aria-checked="true"] .theme-option.dark {
  color: var(--text);
}

.menu-theme-toggle .theme-toggle[aria-checked="false"] .theme-option.light {
  color: var(--text);
}

.menu-theme-toggle .track {
  position: relative;
  width: 44px;
  height: 24px;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--accent-light) 0%, var(--accent) 100%);
  border: none;
  overflow: hidden;
}

.menu-theme-toggle .track::before {
  content: '';
  position: absolute;
  inset: 2px;
  border-radius: inherit;
  background: var(--paper);
  transition: opacity 0.3s;
}

.menu-theme-toggle .knob {
  position: absolute;
  top: 3px;
  left: 3px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--accent) 0%, var(--accent-dark) 100%);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
  transition: left 0.4s var(--ease-out-expo);
  z-index: 1;
}

.menu-theme-toggle .theme-toggle[aria-checked="false"] .knob {
  left: 3px;
}

.menu-theme-toggle .theme-toggle[aria-checked="true"] .knob {
  left: 23px;
}

/* Light theme adjustments for hamburger */
[data-theme="light"] .hamburger-toggle {
  background: rgba(255, 255, 255, 0.9);
  border-color: var(--line);
}

[data-theme="light"] .hamburger-toggle:hover {
  background: rgba(255, 255, 255, 1);
}

[data-theme="light"] .hamburger-menu {
  background: rgba(248, 247, 244, 0.98);
}

[data-theme="light"] .menu-theme-toggle .theme-toggle {
  background: rgba(255, 255, 255, 0.9);
}

/* Menu overlay backdrop */
.hamburger-nav.menu-open::after {
  content: '';
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.5);
  z-index: 998;
  animation: fadeIn 0.3s ease forwards;
}

/* ============================================
   HERO SECTION - Kinetic Typography
   ============================================ */
.hero {
  padding: 0;
  padding-top: 12vh;
  min-height: 100vh;
  display: flex;
  align-items: flex-start;
  overflow: hidden;
}

.hero-inner {
  width: min(1400px, 94vw);
  margin: 0 auto;
  padding: 0 var(--space-md);
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  align-items: center;
  gap: clamp(24px, 4vw, 60px);
  position: relative;
  z-index: 1;
}

.hero-copy {
  max-width: 800px;
}

/* Hero Title - Kinetic Typography */
.hero-title {
  font-family: var(--font-display);
  font-size: clamp(2.8rem, 7vw, 5.5rem);
  font-weight: 600;
  line-height: 1.05;
  letter-spacing: -0.03em;
  margin: 0;
  color: #fff;
}

.title-line {
  display: block;
  overflow: hidden;
}

/* Splitting.js character styles */
.title-line .char {
  display: inline-block;
  opacity: 0;
  transform: translateY(100%);
  transition: none;
}

.title-line.animate .char {
  animation: charReveal 0.8s var(--ease-out-expo) forwards;
  animation-delay: calc(var(--char-index) * 0.03s);
}

@keyframes charReveal {
  from {
    opacity: 0;
    transform: translateY(100%) rotateX(-80deg);
  }
  to {
    opacity: 1;
    transform: translateY(0) rotateX(0);
  }
}

/* Different styles for each line */
.title-line-2 {
  color: #fff;
}

/* Third line - animated as a whole */
.title-line-3 {
  color: #fff;
  opacity: 0;
  transform: translateY(40px);
  transition: none;
}

.title-line-3.animate {
  animation: lineReveal 1s var(--ease-out-expo) forwards;
}

@keyframes lineReveal {
  from {
    opacity: 0;
    transform: translateY(40px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Hero Subtitle */
.hero-sub {
  font-size: clamp(1rem, 1.3vw, 1.2rem);
  color: var(--muted);
  max-width: 50ch;
  margin-top: var(--space-md);
  line-height: 1.7;
  opacity: 0;
  transform: translateY(20px);
}

.hero-sub.animate {
  animation: fadeUp 1s var(--ease-out-expo) 0.8s forwards;
}

.hero-sub .word {
  display: inline-block;
  opacity: 0;
  transform: translateY(10px);
}

.hero-sub.animate .word {
  animation: wordReveal 0.6s var(--ease-out-expo) forwards;
  animation-delay: calc(0.8s + var(--word-index) * 0.02s);
}

@keyframes wordReveal {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes fadeUp {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Hero CTA */
.hero-cta {
  margin-top: var(--space-lg);
  opacity: 0;
  transform: translateY(20px);
}

.hero-cta.animate {
  animation: fadeUp 1s var(--ease-out-expo) 1.2s forwards;
}

/* Hero Art / Bear */
.hero-art {
  justify-self: end;
  position: relative;
}

.bear-container {
  position: relative;
  transform-style: preserve-3d;
  perspective: 1000px;
}

.hero-art .bear {
  width: clamp(280px, 38vw, 550px);
  height: auto;
  display: block;
  filter: drop-shadow(0 20px 40px rgba(0, 0, 0, 0.15));
  animation: bearFloat 8s ease-in-out infinite;
  will-change: transform;
  transition: transform 0.6s var(--ease-out-expo);
}

.bear-glow {
  position: absolute;
  inset: -20%;
  background: radial-gradient(circle, rgba(106, 143, 127, 0.2) 0%, transparent 70%);
  filter: blur(40px);
  opacity: 0.6;
  animation: glowPulse 4s ease-in-out infinite;
  pointer-events: none;
}

@keyframes bearFloat {
  0%, 100% { transform: translateY(0) rotate(0deg); }
  25% { transform: translateY(-12px) rotate(1deg); }
  75% { transform: translateY(8px) rotate(-1deg); }
}

@keyframes glowPulse {
  0%, 100% { opacity: 0.4; transform: scale(1); }
  50% { opacity: 0.7; transform: scale(1.1); }
}

/* Theme-specific bear swap */
.hero-art .img-dark { display: none; }
[data-theme="light"] .hero-art .img-light { display: block; }
[data-theme="light"] .hero-art .img-dark { display: none; }
[data-theme="dark"] .hero-art .img-light { display: none; }
[data-theme="dark"] .hero-art .img-dark { display: block; }

[data-theme="dark"] .bear-glow {
  background: radial-gradient(circle, rgba(134, 194, 186, 0.15) 0%, transparent 70%);
}

/* Scroll Indicator - Modern */
.scroll-indicator {
  position: absolute;
  left: 50%;
  bottom: 40px;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  color: var(--muted);
  opacity: 0;
  animation: fadeIn 1s var(--ease-out-expo) 1.5s forwards;
}

@keyframes fadeIn {
  to { opacity: 1; }
}

.scroll-line {
  width: 1px;
  height: 60px;
  background: var(--line);
  position: relative;
  overflow: hidden;
}

.scroll-dot {
  position: absolute;
  top: 0;
  left: 50%;
  width: 4px;
  height: 4px;
  margin-left: -2px;
  background: var(--accent);
  border-radius: 50%;
  animation: scrollDotMove 2s var(--ease-in-out) infinite;
}

@keyframes scrollDotMove {
  0% { top: 0; opacity: 0; }
  20% { opacity: 1; }
  80% { opacity: 1; }
  100% { top: 100%; opacity: 0; }
}

.scroll-text {
  font-family: var(--font-body);
  font-size: 0.7rem;
  font-weight: 500;
  letter-spacing: 0.15em;
  text-transform: uppercase;
}

/* Simplify hero visuals to match reference */
.shapes { display: none; }
/* Theme-specific bear swap */
.hero-art .img-dark { display: none; }
[data-theme="light"] .hero-art .img-light { display: block; }
[data-theme="light"] .hero-art .img-dark { display: none; }
[data-theme="dark"] .hero-art .img-light { display: none; }
[data-theme="dark"] .hero-art .img-dark { display: block; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme]) .hero-art .img-light { display: none; }
  :root:not([data-theme]) .hero-art .img-dark { display: block; }
}

@keyframes driftA { 0% { transform: translateX(0); } 100% { transform: translateX(14vw); } }
@keyframes driftB { 0% { transform: translateX(0); } 100% { transform: translateX(-16vw); } }
@keyframes floatA { 0%, 100% { transform: translate(0, 0); } 50% { transform: translate(12px, -10px); } }
@keyframes floatB { 0%, 100% { transform: translate(0, 0); } 50% { transform: translate(-10px, 12px); } }
/* New gentle float for hero art */
@keyframes floatSlow { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-8px); } }
/* Ambient slow spin for overlay */
@keyframes ambientSpin { from { transform: rotate(0deg) scale(1); } to { transform: rotate(360deg) scale(1); } }

/* Ambient treatment for other panels */
.panel.has-ambient { position: relative; }
.panel.has-ambient::before { content: ""; position: absolute; inset: -8% -4%; pointer-events: none; z-index: 0;
  background:
    radial-gradient(60% 60% at 80% 10%, color-mix(in srgb, var(--accent-ink), transparent 90%), transparent 60%),
    radial-gradient(50% 50% at 10% 90%, color-mix(in srgb, var(--accent), transparent 92%), transparent 60%);
  opacity: .55;
  animation: ambientSpin 160s linear infinite;
}

/* Light-theme ambient hues for non-hero panels */
[data-theme="light"] .panel.has-ambient::before { background:
  radial-gradient(60% 60% at 80% 10%, var(--ambient-a), transparent 60%),
  radial-gradient(50% 50% at 10% 90%, var(--ambient-b), transparent 60%);
  opacity: .4;
}
@media (prefers-color-scheme: light) {
  :root:not([data-theme]) .panel.has-ambient::before { background:
    radial-gradient(60% 60% at 80% 10%, var(--ambient-a), transparent 60%),
    radial-gradient(50% 50% at 10% 90%, var(--ambient-b), transparent 60%);
    opacity: .4;
  }
}

/* Parallax layers inside panels */
.panel.has-parallax .parallax-a { transform: translate3d(calc(var(--tiltX, 0px) * .10), calc(var(--tiltY, 0px) * .10), 0); transition: transform .6s cubic-bezier(.22,.61,.36,1); will-change: transform; }
.panel.has-parallax .parallax-b { transform: translate3d(calc(var(--tiltX, 0px) * .18), calc(var(--tiltY, 0px) * .18), 0); transition: transform .6s cubic-bezier(.22,.61,.36,1); will-change: transform; }

.scroll-indicator { position: absolute; left: 50%; bottom: 16px; transform: translateX(-50%); display: grid; place-items: center; gap: 6px; color: var(--muted); }
.scroll-indicator .mouse { width: 18px; height: 28px; border-radius: 10px; border: 1px solid var(--muted); position: relative; }
.scroll-indicator .mouse::after { content: ""; position: absolute; top: 6px; left: 50%; width: 2px; height: 6px; transform: translateX(-50%); background: var(--muted); border-radius: 1px; animation: scrollDot 1.8s ease-in-out infinite; }
.scroll-indicator .arrow { width: 12px; height: 12px; border-right: 1px solid var(--muted); border-bottom: 1px solid var(--muted); transform: rotate(45deg); margin-top: -4px; opacity: .8; animation: arrowPulse 1.8s ease-in-out infinite; }
/* Dark: brighter indicator */
[data-theme="dark"] .scroll-indicator .mouse { border-color: color-mix(in srgb, var(--text), transparent 35%); }
[data-theme="dark"] .scroll-indicator .mouse::after { background: color-mix(in srgb, var(--text), transparent 25%); }
[data-theme="dark"] .scroll-indicator .arrow { border-right-color: color-mix(in srgb, var(--text), transparent 35%); border-bottom-color: color-mix(in srgb, var(--text), transparent 35%); }
@keyframes scrollDot { 0% { opacity: 0; transform: translate(-50%, 0); } 50% { opacity: 1; transform: translate(-50%, 6px); } 100% { opacity: 0; transform: translate(-50%, 10px); } }
@keyframes arrowPulse { 0%, 100% { transform: translateY(0) rotate(45deg); } 50% { transform: translateY(3px) rotate(45deg); } }

/* ============================================
   WORK SECTION - Floating Gallery
   ============================================ */
.work-section {
  min-height: 100vh;
  padding: var(--space-xl) 0;
  display: flex;
  align-items: center;
  overflow: visible;
}

.work-container {
  width: min(1500px, 96vw);
  margin: 0 auto;
  padding: 0 var(--space-md);
}

/* Work Header */
.work-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  margin-bottom: var(--space-xl);
  gap: var(--space-lg);
}

.work-header-content {
  max-width: 500px;
}

.section-label {
  display: inline-block;
  font-family: var(--font-body);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: var(--space-sm);
  position: relative;
  padding-left: 2rem;
}

.section-label::before {
  content: '';
  position: absolute;
  left: 0;
  top: 50%;
  width: 1.5rem;
  height: 1px;
  background: var(--accent);
}

.work-header h2 {
  font-family: var(--font-display);
  font-size: clamp(3rem, 8vw, 5rem);
  font-weight: 600;
  line-height: 0.95;
  letter-spacing: -0.03em;
  margin: 0;
}

.work-header-action {
  text-align: right;
}

.work-intro {
  font-size: 1rem;
  color: var(--muted);
  margin-bottom: var(--space-md);
  max-width: 280px;
  margin-left: auto;
}

/* Floating Gallery Grid */
.floating-gallery {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  grid-auto-rows: minmax(60px, auto);
  gap: clamp(16px, 2.5vw, 28px);
  perspective: 1500px;
  padding-bottom: 100px;
}

/* Project Cards */
.project-card {
  position: relative;
  cursor: pointer;
  outline: none;
}

.project-card__inner {
  position: relative;
  width: 100%;
  height: 100%;
  border-radius: 24px;
  overflow: hidden;
  background: var(--paper);
  transform-style: preserve-3d;
  transition: transform 0.6s var(--ease-out-expo), box-shadow 0.6s var(--ease-out-expo);
}

/* Card Sizes */
.project-card--large {
  grid-column: span 7;
  grid-row: span 4;
  min-height: 400px;
}

.project-card--medium {
  grid-column: span 5;
  grid-row: span 3;
  min-height: 320px;
}

.project-card--small {
  grid-column: span 4;
  grid-row: span 3;
  min-height: 280px;
}

/* Staggered positioning */
.project-card:nth-child(2) { transform: translateY(60px); }
.project-card:nth-child(3) { transform: translateY(20px); }
.project-card:nth-child(4) { transform: translateY(80px); }

/* Project Number */
.project-card__number {
  position: absolute;
  top: 20px;
  left: 24px;
  font-family: var(--font-display);
  font-size: clamp(3rem, 6vw, 5rem);
  font-weight: 700;
  color: rgba(255, 255, 255, 0.15);
  line-height: 1;
  z-index: 2;
  transition: all 0.5s var(--ease-out-expo);
}

.project-card:hover .project-card__number {
  color: rgba(255, 255, 255, 0.3);
  transform: translateY(-10px);
}

/* Image Layer */
.project-card__image {
  position: absolute;
  inset: 0;
  overflow: hidden;
}

.project-card__img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.8s var(--ease-out-expo);
  z-index: 1;
}

.project-card:hover .project-card__img {
  transform: scale(1.05);
}

.project-card__image-bg {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 80% 60% at 20% 20%, rgba(255, 255, 255, 0.3), transparent),
    linear-gradient(135deg,
      var(--accent) 0%,
      var(--accent-dark) 50%,
      color-mix(in srgb, var(--accent), #000 20%) 100%);
  transition: transform 0.8s var(--ease-out-expo);
}

.project-card:hover .project-card__image-bg {
  transform: scale(1.1);
}

.project-card__image-overlay {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(to top right, rgba(0, 0, 0, 0.7) 0%, transparent 50%),
    linear-gradient(to bottom right, rgba(0, 0, 0, 0.3) 0%, transparent 30%);
  opacity: 0.8;
  transition: opacity 0.5s var(--ease-out-expo);
}

.project-card:hover .project-card__image-overlay {
  opacity: 1;
}

/* Content Layer - Positioned in corners */
.project-card__content {
  position: absolute;
  bottom: 0;
  left: 0;
  padding: clamp(16px, 3vw, 24px);
  z-index: 3;
  color: white;
  max-width: 70%;
}

.project-card__category {
  position: absolute;
  bottom: clamp(16px, 3vw, 24px);
  right: clamp(16px, 3vw, 24px);
  display: inline-block;
  font-family: var(--font-body);
  font-size: 0.65rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.9);
  background: rgba(0, 0, 0, 0.4);
  z-index: 4;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  padding: 0.35rem 0.75rem;
  border-radius: 999px;
  margin-bottom: 12px;
  transform: translateY(20px);
  opacity: 0;
  transition: all 0.5s var(--ease-out-expo);
}

.project-card:hover .project-card__category {
  transform: translateY(0);
  opacity: 1;
}

.project-card__title {
  font-family: var(--font-display);
  font-size: clamp(1.4rem, 3vw, 2.2rem);
  font-weight: 600;
  line-height: 1.1;
  margin: 0 0 8px;
  transform: translateY(20px);
  transition: transform 0.5s var(--ease-out-expo) 0.05s;
}

.project-card:hover .project-card__title {
  transform: translateY(0);
}

.project-card__desc {
  display: none;
}

.project-card__cta {
  display: none;
}


/* Animated Border */
.project-card__border {
  position: absolute;
  inset: 0;
  border-radius: 24px;
  padding: 2px;
  background: conic-gradient(
    from var(--border-angle, 0deg),
    transparent 0%,
    var(--accent) 10%,
    transparent 20%
  );
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  opacity: 0;
  transition: opacity 0.5s var(--ease-out-expo);
  pointer-events: none;
}

.project-card:hover .project-card__border {
  opacity: 1;
  animation: borderSpin 4s linear infinite;
}

@keyframes borderSpin {
  from { --border-angle: 0deg; }
  to { --border-angle: 360deg; }
}

@property --border-angle {
  syntax: '<angle>';
  initial-value: 0deg;
  inherits: false;
}

/* Hover Transform */
.project-card:hover .project-card__inner {
  transform: translateY(-12px) scale(1.02);
  box-shadow:
    0 30px 60px rgba(0, 0, 0, 0.2),
    0 0 80px color-mix(in srgb, var(--accent), transparent 70%);
}

/* Focus State */
.project-card:focus-visible .project-card__inner {
  outline: 3px solid var(--accent);
  outline-offset: 4px;
}

/* Responsive */
@media (max-width: 1100px) {
  .work-header {
    flex-direction: column;
    align-items: flex-start;
    gap: var(--space-md);
  }

  .work-header-action {
    text-align: left;
  }

  .work-intro {
    margin-left: 0;
  }

  .project-card--large { grid-column: span 12; grid-row: span 4; }
  .project-card--medium { grid-column: span 6; grid-row: span 4; }
  .project-card--small { grid-column: span 6; grid-row: span 3; }

  .project-card:nth-child(n) { transform: translateY(0); }
}

@media (max-width: 720px) {
  .floating-gallery {
    grid-template-columns: 1fr;
    gap: var(--space-md);
  }

  .project-card--large,
  .project-card--medium,
  .project-card--small {
    grid-column: span 1;
    grid-row: span 1;
    min-height: 280px;
  }

  .project-card__inner {
    border-radius: 20px;
  }

  .project-card__number {
    font-size: 2.5rem;
    top: 16px;
    left: 20px;
  }

  .project-card__content {
    padding: 20px;
  }

  .project-card__title {
    font-size: 1.4rem;
  }

  .project-card__category {
    bottom: 20px;
    right: 20px;
  }

}
.work .work-grid { width: min(1200px, 94vw); margin: 6vh auto 0; display: grid; grid-template-columns: 1fr 1.4fr; gap: clamp(18px, 3.5vw, 48px); align-items: start; padding: 0 4vw; }
.projects { position: relative; }
.project-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 12px; border-left: 1px solid var(--line); padding-left: 16px; }
.project-list li button { all: unset; display: block; width: 100%; font-size: clamp(1.05rem, 1.6vw, 1.3rem); letter-spacing: .01em; padding: .2rem .2rem; border-bottom: 1px solid transparent; cursor: pointer; }
.project-list li.is-active button { color: var(--accent-ink); border-bottom-color: var(--accent); }
.project-list li button:hover, .project-list li button:focus-visible { color: var(--accent-ink); outline: none; }
.project-list li button:hover { letter-spacing: .02em; }

.project-view { position: relative; aspect-ratio: 16/10; width: 100%; border: 1px solid var(--line); background: var(--paper); overflow: hidden; border-radius: 10px; box-shadow: var(--shadow); }
.preview { position: absolute; inset: 0; padding: clamp(12px, 2.4vw, 20px); display: grid; grid-template-rows: 1fr auto; gap: 16px; opacity: 0; transform: translateY(8px); transition: opacity .5s ease, transform .5s ease; }
.preview { will-change: transform, opacity; }
.preview.active { opacity: 1; transform: translateY(0); }
.preview .block { height: 100%; border-radius: 8px; background: radial-gradient(120% 120% at 80% 10%, rgba(255,255,255,.6), transparent), conic-gradient(from 180deg, color-mix(in srgb, var(--block, var(--accent)), #ffffff 18%), var(--block, var(--accent))); border: 1px solid color-mix(in srgb, var(--block, var(--accent)), #000 10%); position: relative; overflow: hidden; }
.preview .block::after, .preview .block::before { content: ""; position: absolute; border: 1px solid rgba(255,255,255,.5); border-radius: 50%; }
@supports not (background: color-mix(in srgb, red, blue)) {
  .preview .block { background: radial-gradient(120% 120% at 80% 10%, rgba(255,255,255,.6), transparent), linear-gradient(var(--accent), var(--accent)); }
}
.preview .block::after, .preview .block::before { content: ""; position: absolute; border: 1px solid rgba(255,255,255,.5); border-radius: 50%; }
.preview .block::before { width: 40%; height: 40%; right: 8%; bottom: 10%; opacity: .5; }
.preview .block::after { width: 16%; height: 16%; left: 10%; top: 12%; opacity: .35; }
.preview figcaption { display: flex; gap: 10px; align-items: baseline; }
.preview .cat { font-size: .75rem; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.preview p { margin: 0; }

/* Work overlay */
.overlay { position: fixed; inset: 0; background: color-mix(in srgb, var(--bg), #000 8%); display: none; z-index: 50; }
.overlay.work-overlay::before { content: ""; position: absolute; inset: 0; pointer-events: none; background:
  radial-gradient(70% 40% at 80% -10%, rgba(134,194,186,.12), rgba(134,194,186,0) 60%),
  radial-gradient(60% 30% at 10% 110%, rgba(106,143,127,.10), rgba(106,143,127,0) 50%),
  repeating-linear-gradient(90deg, rgba(0,0,0,0) 0 119px, rgba(0,0,0,.04) 120px 120px);
}
.overlay[aria-hidden="false"] { display: block; }
.overlay-inner { position: absolute; inset: 0; padding: clamp(12px, 3vw, 24px); display: grid; grid-template-rows: auto auto 1fr; gap: 16px; background: var(--bg); }
.overlay-inner { overflow: auto; }
.overlay-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; border-bottom: 1px solid var(--line); padding-bottom: 10px; }
.overlay-head h3 { margin: 0; font-size: clamp(1.2rem, 2.6vw, 1.6rem); }
.filters { display: flex; gap: 8px; padding: 6px 0 2px; align-items: center; }
.filters { flex-wrap: wrap; }
.chip { border: 1px solid var(--line); background: var(--paper); color: var(--text); border-radius: 999px; padding: .18rem .5rem; font-size: .78rem; line-height: 1; cursor: pointer; display: inline-flex; align-items: center; min-height: 28px; }
.chip.is-active, .chip:hover, .chip:focus-visible { border-color: var(--accent); outline: none; }
.btn.small { padding: .4rem .7rem; font-size: .85rem; }
.btn.small.outline { background: transparent; border-color: var(--line); color: var(--text); }
.btn.small.outline:hover, .btn.small.outline:focus-visible { border-color: var(--accent); }
.work-grid-cards { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(6, minmax(0,1fr)); gap: clamp(12px, 2vw, 20px); grid-auto-flow: dense; align-content: start; }
@media (max-width: 1100px) { .work-grid-cards { grid-template-columns: repeat(4, minmax(0,1fr)); } }
@media (max-width: 720px) { .work-grid-cards { grid-template-columns: repeat(2, minmax(0,1fr)); } }
@media (max-width: 480px) { .work-grid-cards { grid-template-columns: 1fr; } }
.card { all: unset; display: grid; gap: 10px; cursor: pointer; align-content: start; }
.card[data-size="l"] { grid-column: span 3; }
.card[data-size="m"] { grid-column: span 2; }
.card[data-size="s"] { grid-column: span 1; }
.card .thumb { aspect-ratio: 4/3; border: 1px solid var(--line); border-radius: 12px; background: var(--paper); box-shadow: var(--shadow); transform: translateZ(0); transition: transform .25s ease, box-shadow .25s ease; }
.card:hover .thumb, .card:focus-visible .thumb { transform: translateY(-2px); box-shadow: 0 14px 30px rgba(0,0,0,.1); }
.card .meta { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; }
.card strong { font-weight: 600; }
.card span { color: var(--muted); font-size: .85rem; }
.card:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 12px; }

.work-case { display: grid; grid-template-columns: 1.2fr 1fr; gap: clamp(16px, 3vw, 28px); align-content: start; }
@media (max-width: 900px) { .work-case { grid-template-columns: 1fr; } }
.work-case[hidden] { display: none; }
.case-visual { aspect-ratio: 16/10; border: 1px solid var(--line); border-radius: 12px; background: var(--paper); box-shadow: var(--shadow); }
.case-visual { position: relative; overflow: hidden; }
.case-visual .case-overlay { position: absolute; left: 10px; bottom: 10px; display: inline-flex; gap: 8px; align-items: center; padding: 6px 8px; border: 1px solid var(--line); background: color-mix(in srgb, var(--paper), #fff 10%); border-radius: 999px; box-shadow: var(--shadow); opacity: .95; }
.case-visual .badge { font-size: .75rem; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); border-right: 1px solid var(--line); padding-right: 8px; }
.case-visual .cap { font-weight: 600; }
.case-head { display: flex; gap: 10px; align-items: baseline; }
.case-title { margin: 0; font-size: clamp(1.2rem, 3vw, 2rem); }
.case-cat { color: var(--muted); font-size: .9rem; }
.case-meta { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin: 0; }
.case-meta dt { font-size: .8rem; color: var(--muted); }
.case-meta dd { margin: 0; }
/* Crossfade on case swap */
.work-case .case-visual, .work-case .case-head, .work-case .case-desc, .work-case .case-meta { transition: opacity .25s ease, transform .25s ease; }
.work-case.is-fading .case-visual, .work-case.is-fading .case-head, .work-case.is-fading .case-desc, .work-case.is-fading .case-meta { opacity: 0; transform: translateY(4px); }

/* Full case mode (shareable case page view) */
.work-overlay.case-full .overlay-inner { grid-template-rows: auto auto 1fr; }
.work-overlay.case-full .overlay-head h3 { opacity: .85; }
.work-overlay.case-full .work-index { display: none; }
.work-overlay.case-full #work-case { display: grid !important; }
.work-overlay.case-full .case-visual { aspect-ratio: 16/9; }

/* Small screens polish */
@media (max-width: 480px) {
  .site-brand .word { font-size: .9rem; }
  .theme-toggle { height: 30px; padding: 0 8px; }
  .theme-toggle .track { width: 44px; height: 20px; }
  .theme-toggle .knob { width: 16px; height: 16px; top: 1px; left: 1px; }
  .theme-toggle[aria-checked="true"] .knob { left: 27px; }
  .dot-nav { right: 10px; }
  .dot-nav .dot { width: 10px; height: 10px; }
  .overlay-inner { padding: 12px; gap: 12px; }
  .overlay-head { flex-wrap: wrap; gap: 6px; }
  .overlay-head h3 { font-size: 1.1rem; }
  .filters { gap: 6px; padding-top: 6px; }
  .chip { font-size: .74rem; padding: .14rem .44rem; min-height: 26px; }
  .card .thumb { border-radius: 10px; }
  .work-case { grid-template-columns: 1fr; gap: 14px; }
  .work-case .case-visual { aspect-ratio: 16/10; }
  .case-visual .case-overlay { left: 8px; bottom: 8px; padding: 4px 6px; }
  .case-visual .badge { font-size: .68rem; padding-right: 6px; }
  .case-visual .cap { font-size: .85rem; }
}

/* Morph animation clone styling */
.morph-clone { position: fixed; left: 0; top: 0; will-change: transform, width, height, border-radius; border-radius: 12px; border: 1px solid var(--line); box-shadow: var(--shadow); z-index: 60; pointer-events: none; }

/* ============================================
   STUDIO SECTION
   ============================================ */
.studio {
  padding: var(--space-xl) 0;
}

.studio-grid {
  width: min(1200px, 92vw);
  margin: var(--space-lg) auto 0;
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: clamp(40px, 6vw, 80px);
  padding: 0 var(--space-md);
  position: relative;
}

.studio-grid::before {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: calc(-1 * var(--space-md));
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--line) 20%, var(--line) 80%, transparent);
}

.studio-main p {
  max-width: 60ch;
  font-size: clamp(1rem, 1.2vw, 1.15rem);
  line-height: 1.8;
  color: var(--text-secondary);
}

.studio-main p:first-child {
  font-size: clamp(1.1rem, 1.4vw, 1.3rem);
  color: var(--text);
}

.studio-aside {
  border-left: 2px solid var(--accent);
  padding-left: var(--space-md);
}

.studio-aside ul {
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 12px;
}

.studio-aside li {
  font-family: var(--font-display);
  font-size: 1.1rem;
  font-weight: 500;
  color: var(--accent-ink);
  padding-left: 1rem;
  position: relative;
  transition: all 0.3s var(--ease-out-expo);
}

.studio-aside li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 6px;
  height: 6px;
  background: var(--accent);
  border-radius: 50%;
  transition: transform 0.3s var(--ease-out-expo);
}

.studio-aside li:hover::before {
  transform: translateY(-50%) scale(1.5);
}

.studio-aside li:hover {
  padding-left: 1.5rem;
  color: var(--accent);
}

/* ============================================
   PROCESS SECTION - Animated Timeline
   ============================================ */
.process {
  padding: var(--space-xl) 0;
}

.timeline {
  position: relative;
  width: min(1200px, 92vw);
  margin: var(--space-xl) auto 0;
  padding: 0 var(--space-md);
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  align-items: start;
  gap: clamp(20px, 5vw, 60px);
}

.timeline-line {
  position: absolute;
  left: var(--space-md);
  right: var(--space-md);
  top: 20px;
  height: 2px;
  background: var(--line);
  z-index: 0;
}

/* Animated line fill */
.timeline-line::after {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  height: 100%;
  width: 0;
  background: var(--gradient-primary);
  transition: width 1.5s var(--ease-out-expo);
}

.timeline.animate .timeline-line::after {
  width: 100%;
}

.step {
  position: relative;
  display: grid;
  gap: 10px;
  justify-items: start;
  opacity: 0;
  transform: translateY(20px);
  transition: all 0.6s var(--ease-out-expo);
  outline: none;
  cursor: pointer;
  z-index: 1;
}

.step .dot {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--paper);
  border: 2px solid var(--line);
  display: grid;
  place-items: center;
  font-family: var(--font-display);
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--muted);
  box-shadow: var(--shadow-sm);
  transition: all 0.4s var(--ease-out-expo);
}

.step .dot::before {
  content: attr(data-step);
}

.step .name {
  font-family: var(--font-display);
  font-size: clamp(1.1rem, 1.5vw, 1.3rem);
  font-weight: 600;
  letter-spacing: -0.01em;
  color: var(--text);
  transition: color 0.3s var(--ease-out-expo);
}

.step .desc {
  font-size: 0.9rem;
  color: var(--muted);
  max-width: 200px;
  opacity: 0;
  transform: translateY(-8px);
  transition: all 0.4s var(--ease-out-expo);
}

.step:hover .desc,
.step:focus-visible .desc,
.step.active .desc {
  opacity: 1;
  transform: translateY(0);
}

/* Active state */
.step.active {
  opacity: 1;
  transform: translateY(0);
}

.step.active .dot {
  background: var(--gradient-primary);
  border-color: transparent;
  color: white;
  box-shadow: var(--shadow-md), 0 0 20px rgba(106, 143, 127, 0.3);
  transform: scale(1.1);
}

.step.active .name {
  color: var(--accent-ink);
}

/* Hover state (when not active) */
.step:not(.active):hover .dot {
  border-color: var(--accent);
  color: var(--accent);
  transform: scale(1.05);
}

/* Responsive */
@media (max-width: 768px) {
  .timeline {
    grid-template-columns: 1fr;
    gap: var(--space-md);
  }

  .timeline-line {
    left: 19px;
    top: 0;
    bottom: 0;
    width: 2px;
    height: auto;
    right: auto;
  }

  .timeline-line::after {
    width: 100%;
    height: 0;
    transition: height 1.5s var(--ease-out-expo);
  }

  .timeline.animate .timeline-line::after {
    height: 100%;
  }

  .step {
    grid-template-columns: auto 1fr;
    grid-template-rows: auto auto;
    column-gap: var(--space-md);
    padding-left: 60px;
  }

  .step .dot {
    position: absolute;
    left: 0;
  }

  .step .name {
    grid-column: 1;
  }

  .step .desc {
    grid-column: 1;
    opacity: 1;
    transform: none;
  }
}

/* ============================================
   CONTACT SECTION - Modern Form
   ============================================ */
.contact-grid {
  width: min(1200px, 92vw);
  margin: var(--space-lg) auto 0;
  padding: 0 var(--space-md);
  display: grid;
  grid-template-columns: 1.3fr 1fr;
  gap: clamp(40px, 6vw, 80px);
  align-items: start;
}

/* Form Styles */
form {
  display: grid;
  gap: var(--space-md);
}

.field {
  position: relative;
  display: grid;
  gap: 8px;
}

label {
  font-family: var(--font-body);
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--muted);
  transition: color 0.3s var(--ease-out-expo);
}

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

input[type="text"],
input[type="email"],
select,
textarea {
  padding: 0.8rem 0;
  border: none;
  border-bottom: 2px solid var(--line);
  background: transparent;
  border-radius: 0;
  font-size: 1rem;
  color: var(--text);
  transition: all 0.3s var(--ease-out-expo);
}

input::placeholder,
textarea::placeholder {
  color: var(--muted);
  opacity: 0.6;
}

input:focus,
select:focus,
textarea:focus {
  outline: none;
  border-bottom-color: var(--accent);
}

/* Animated underline */
.field::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--gradient-primary);
  transition: width 0.4s var(--ease-out-expo);
}

.field:focus-within::after {
  width: 100%;
}

select {
  cursor: pointer;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%237a7a7a' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 0 center;
  padding-right: 20px;
}

textarea {
  resize: vertical;
  min-height: 120px;
}

.error {
  color: #dc2626;
  font-size: 0.8rem;
  min-height: 1.2em;
}

.actions {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  margin-top: var(--space-sm);
}

.status {
  font-size: 0.9rem;
  color: var(--accent-ink);
}

/* Contact Info */
.contact-info {
  background: var(--bg-secondary);
  border-radius: 20px;
  padding: var(--space-lg);
  border: 1px solid var(--line);
}

.contact-info ul {
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 16px;
}

.contact-info li {
  font-size: 0.95rem;
  display: flex;
  gap: 8px;
}

.contact-info strong {
  color: var(--accent-ink);
  font-weight: 500;
}

.contact-info a {
  color: var(--text);
  text-decoration: underline;
  text-underline-offset: 3px;
  transition: color 0.3s;
}

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

/* ============================================
   FOOTER
   ============================================ */
.site-foot {
  position: fixed;
  left: 28px;
  bottom: calc(env(safe-area-inset-bottom, 0px) + 20px);
  z-index: 50;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.4s ease, visibility 0.4s ease;
}

/* Show footer when contact section is in view */
.site-foot.is-visible {
  opacity: 1;
  visibility: visible;
}

.site-foot small {
  font-family: var(--font-body);
  font-size: 0.8rem;
  color: var(--muted);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.site-foot a {
  color: var(--accent-ink);
  text-decoration: underline;
  text-underline-offset: 2px;
  transition: color 0.3s;
}

.site-foot a:hover {
  color: var(--accent);
}

/* ============================================
   RESPONSIVE STYLES
   ============================================ */
@media (max-width: 1024px) {
  .work .work-grid { grid-template-columns: 1fr; }
  .project-view { aspect-ratio: 16/9; }
  .studio-grid { grid-template-columns: 1fr; gap: var(--space-lg); }
  .contact-grid { grid-template-columns: 1fr; gap: var(--space-lg); }

  .studio-aside {
    border-left: none;
    border-top: 2px solid var(--accent);
    padding-left: 0;
    padding-top: var(--space-md);
  }
}

/* Collapse hero to single column on tablets */
@media (max-width: 980px) {
  .hero-inner {
    grid-template-columns: 1fr;
    text-align: center;
    gap: var(--space-lg);
  }

  .hero-art {
    justify-self: center;
    order: -1;
  }

  .hero-art .bear {
    width: clamp(200px, 50vw, 350px);
  }

  .hero-title {
    font-size: clamp(2.2rem, 8vw, 3.5rem);
  }

  .hero-sub {
    max-width: 45ch;
    margin-left: auto;
    margin-right: auto;
  }
}

@media (max-width: 720px) {
  :root {
    --space-lg: 3rem;
    --space-xl: 5rem;
  }

  .site-brand {
    top: 16px;
    left: 16px;
  }

  .site-brand .logo {
    height: 26px;
  }

  .theme-toggle {
    top: 14px;
    right: 14px;
    height: 36px;
    padding: 0 10px;
  }

  .dot-nav {
    right: 14px;
  }

  .dot-nav ul {
    padding: 10px 6px;
    gap: 14px;
  }

  .site-foot {
    left: 16px;
    right: 16px;
    bottom: calc(env(safe-area-inset-bottom, 0px) + 12px);
  }

  .site-foot small {
    font-size: 0.75rem;
  }

  .panel h2 {
    font-size: clamp(1.5rem, 6vw, 2.2rem);
  }

  .btn {
    padding: 0.8rem 1.5rem;
    font-size: 0.85rem;
  }

  .contact-info {
    padding: var(--space-md);
  }
}

@media (max-width: 480px) {
  .hero-title {
    font-size: clamp(1.8rem, 10vw, 2.8rem);
  }

  .title-line-2 {
    font-size: 0.95em;
  }
}

/* ============================================
   REDUCED MOTION SUPPORT
   ============================================ */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }

  .loader { display: none; }
  .cursor { display: none; }
  .mesh-blob { animation: none; }
  .bear-glow { animation: none; }

  .title-line .char,
  .title-line-3,
  .hero-sub,
  .hero-cta {
    opacity: 1;
    transform: none;
  }
}

@media (max-width: 720px) {
  .site-brand {
    top: 18px;
    left: 18px;
    background: rgba(15, 15, 26, 0.7);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    padding: 10px 14px;
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.1);
  }
  [data-theme="light"] .site-brand {
    background: rgba(255, 255, 255, 0.7);
    border-color: rgba(0, 0, 0, 0.08);
  }
  .hamburger-nav { top: 14px; right: 14px; }
  .hamburger-toggle {
    width: 44px;
    height: 44px;
    background: rgba(15, 15, 26, 0.7);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.1);
  }
  [data-theme="light"] .hamburger-toggle {
    background: rgba(255, 255, 255, 0.7);
    border-color: rgba(0, 0, 0, 0.08);
  }
  .hamburger-menu { max-width: 100%; }
  .hamburger-menu-inner { padding: 80px 32px 48px; }
  .nav-item .nav-label { font-size: 1.5rem; }
  .hero { padding-top: 14vh; }
  /* Position scroll indicator lower on mobile - more space under View Work button */
  .scroll-indicator {
    bottom: calc(env(safe-area-inset-bottom, 0px) + 16px);
  }
  /* Add more margin below the View Work button to push content down */
  .hero-cta {
    margin-bottom: var(--space-xl);
  }
  /* Keep footer fixed; reserve generous space in contact section for tall iPhones */
  .contact { padding-bottom: max(24vh, var(--footer-reserve)); }
  .site-foot { position: fixed; left: 16px; right: 16px; bottom: calc(env(safe-area-inset-bottom, 0px) + 12px); font-size: .85rem; padding: 0; background: transparent; border: 0; }
}

/* iOS Safari specific tweak: increase reserve under bottom browser chrome */
@supports (-webkit-touch-callout: none) {
  @media (max-width: 720px) {
    .contact { padding-bottom: max(28vh, calc(env(safe-area-inset-bottom, 0px) + 96px)); }
  }
}

/* (Reverted) Keep nav toggle visible on desktop */

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}

/* Dark-mode art tuning and contrast */
[data-theme="dark"] .shape.line { background: linear-gradient(90deg, rgba(255,255,255,0), rgba(255,255,255,.25), rgba(255,255,255,0)); opacity: .9; }
[data-theme="dark"] .scroll-indicator .mouse { border-color: rgba(255,255,255,.75); }
[data-theme="dark"] .scroll-indicator .mouse::after { background: rgba(255,255,255,.85); }
[data-theme="dark"] .scroll-indicator .arrow { border-right-color: rgba(255,255,255,.75); border-bottom-color: rgba(255,255,255,.75); }
/* Hamburger nav in dark mode - uses default dark styles */
[data-theme="dark"] .project-view { border-color: #3a3a88; box-shadow: 0 10px 30px rgba(0,0,0,.45); }
[data-theme="dark"] .studio-grid::before { background: #2a2a6a; }
[data-theme="dark"] input, [data-theme="dark"] select, [data-theme="dark"] textarea { color: var(--text); }
[data-theme="dark"] input, [data-theme="dark"] select, [data-theme="dark"] textarea { border-bottom-color: #3a3a88; }
[data-theme="dark"] input:focus, [data-theme="dark"] select:focus, [data-theme="dark"] textarea:focus { box-shadow: 0 6px 0 -5px var(--accent-ink); }
[data-theme="dark"] .btn { border-color: var(--accent-ink); }
[data-theme="dark"] .btn:hover, [data-theme="dark"] .btn:focus-visible { background: var(--accent-ink); color: #0f0f2b; }
/* (Reverted) No special dark orb/nav-toggle overrides */
/* (Reverted) No dark-mode vignette overlay */

/* ============================================
   WORK OVERLAY - Modern Full-Screen Modal
   ============================================ */
.work-overlay {
  position: fixed;
  inset: 0;
  z-index: 1000;
  background: var(--bg);
  display: none;
  overflow-y: scroll;
  overflow-x: hidden;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
  touch-action: pan-y;
}

.work-overlay[aria-hidden="false"] {
  display: block;
}

.work-overlay::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 80% 60% at 10% 0%, rgba(106, 143, 127, 0.08), transparent),
    radial-gradient(ellipse 60% 50% at 90% 100%, rgba(126, 170, 217, 0.06), transparent);
  pointer-events: none;
}

/* Close Button */
.overlay-close-btn {
  position: fixed;
  top: 24px;
  right: 24px;
  z-index: 1010;
  width: 48px;
  height: 48px;
  display: grid;
  place-items: center;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 50%;
  color: var(--text);
  cursor: pointer;
  transition: all 0.3s var(--ease-out-expo);
}

.overlay-close-btn:hover {
  background: var(--text);
  color: var(--paper);
  transform: rotate(90deg);
}

/* Overlay Container */
.overlay-container {
  position: relative;
  min-height: 100%;
  padding: clamp(80px, 10vh, 120px) clamp(24px, 5vw, 80px) clamp(40px, 5vh, 80px);
}

/* Overlay Header */
.overlay-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: var(--space-lg);
  margin-bottom: var(--space-xl);
  flex-wrap: wrap;
}

.overlay-header-left {
  flex: 1;
  min-width: 200px;
}

.overlay-label {
  display: inline-block;
  font-family: var(--font-body);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: var(--space-xs);
}

.overlay-title {
  font-family: var(--font-display);
  font-size: clamp(2rem, 5vw, 3.5rem);
  font-weight: 600;
  line-height: 1.1;
  letter-spacing: -0.02em;
  margin: 0;
}

/* Filter Buttons */
.overlay-filters {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.filter-btn {
  padding: 0.5rem 1rem;
  font-family: var(--font-body);
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--muted);
  background: transparent;
  border: 1px solid var(--line);
  border-radius: 999px;
  cursor: pointer;
  transition: all 0.3s var(--ease-out-expo);
}

.filter-btn:hover {
  border-color: var(--accent);
  color: var(--text);
}

.filter-btn.is-active {
  background: var(--accent);
  border-color: var(--accent);
  color: white;
}

/* Overlay Grid */
.overlay-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: clamp(20px, 3vw, 32px);
}

/* Overlay Cards */
.overlay-card {
  position: relative;
  cursor: pointer;
  border-radius: 20px;
  overflow: hidden;
  background: var(--paper);
  border: 1px solid var(--line);
  transition: all 0.4s var(--ease-out-expo);
}

.overlay-card:hover {
  transform: translateY(-8px);
  box-shadow: var(--shadow-lg);
  border-color: transparent;
}

.overlay-card:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 3px;
}

.overlay-card__image {
  aspect-ratio: 16/10;
  background-color: var(--card-color, var(--accent));
  background-size: cover;
  background-position: center;
  transition: transform 0.6s var(--ease-out-expo);
}

.overlay-card:hover .overlay-card__image {
  transform: scale(1.05);
}

.overlay-card__content {
  padding: clamp(16px, 3vw, 24px);
  position: relative;
}

.overlay-card__number {
  position: absolute;
  top: -40px;
  right: 16px;
  font-family: var(--font-display);
  font-size: 4rem;
  font-weight: 700;
  color: rgba(0, 0, 0, 0.05);
  line-height: 1;
}

[data-theme="dark"] .overlay-card__number {
  color: rgba(255, 255, 255, 0.05);
}

.overlay-card__category {
  display: inline-block;
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 8px;
}

.overlay-card__title {
  font-family: var(--font-display);
  font-size: 1.3rem;
  font-weight: 600;
  margin: 0 0 8px;
  color: var(--text);
}

.overlay-card__desc {
  font-size: 0.9rem;
  color: var(--muted);
  margin: 0;
  line-height: 1.5;
}

/* Project Detail View */
.project-detail {
  position: absolute;
  inset: 0;
  background: var(--bg);
  overflow-y: scroll;
  overflow-x: hidden;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
  touch-action: pan-y;
  padding: clamp(80px, 10vh, 120px) clamp(24px, 5vw, 80px) clamp(40px, 5vh, 80px);
}

.project-detail[hidden] {
  display: none;
}

/* Back Button */
.detail-back-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-body);
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--muted);
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.5rem 0;
  margin-bottom: var(--space-lg);
  transition: color 0.3s var(--ease-out-expo);
}

.detail-back-btn:hover {
  color: var(--accent);
}

.detail-back-btn svg {
  transition: transform 0.3s var(--ease-out-expo);
}

.detail-back-btn:hover svg {
  transform: translateX(-4px);
}

/* Detail Container */
.detail-container {
  display: grid;
  grid-template-columns: 1.5fr 1fr;
  gap: clamp(40px, 6vw, 80px);
  align-items: start;
  max-width: 1400px;
}

/* Detail Hero */
.detail-hero {
  position: relative;
}

.detail-visual {
  aspect-ratio: 16/10;
  border-radius: 24px;
  background-color: var(--accent);
  background-size: cover;
  background-position: center;
  box-shadow: var(--shadow-lg);
}

.detail-number {
  position: absolute;
  bottom: -20px;
  right: -10px;
  font-family: var(--font-display);
  font-size: clamp(6rem, 15vw, 12rem);
  font-weight: 700;
  color: var(--bg);
  line-height: 1;
  -webkit-text-stroke: 2px var(--line);
  opacity: 0.5;
}

/* Detail Content */
.detail-content {
  padding-top: var(--space-md);
}

.detail-header {
  margin-bottom: var(--space-lg);
}

.detail-category {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: var(--space-sm);
}

.detail-title {
  font-family: var(--font-display);
  font-size: clamp(2rem, 4vw, 3rem);
  font-weight: 600;
  line-height: 1.1;
  letter-spacing: -0.02em;
  margin: 0 0 var(--space-md);
}

.detail-desc {
  font-size: 1.1rem;
  color: var(--text-secondary);
  line-height: 1.7;
  margin: 0;
}

/* Detail Info Blocks */
.detail-info {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-md);
  margin-bottom: var(--space-lg);
  padding: var(--space-md) 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.detail-info-block {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.detail-info-label {
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
}

.detail-info-value {
  font-size: 1rem;
  color: var(--text);
  margin: 0;
}

/* Detail Actions */
.detail-actions .btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.detail-actions .btn-icon {
  transition: transform 0.3s var(--ease-out-expo);
}

.detail-actions .btn:hover .btn-icon {
  transform: translate(4px, -4px);
}

/* Project Gallery */
.detail-gallery {
  margin-top: var(--space-xl);
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: var(--space-md);
  padding-bottom: 120px;
}

.gallery-item {
  position: relative;
  border-radius: 12px;
  overflow: hidden;
  background: var(--bg-secondary);
  box-shadow: var(--shadow-md);
  transition: transform 0.4s var(--ease-out-expo), box-shadow 0.4s var(--ease-out-expo);
}

.gallery-item:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
}

.gallery-item img {
  width: 100%;
  height: auto;
  display: block;
  transition: transform 0.6s var(--ease-out-expo);
}

.gallery-item:hover img {
  transform: scale(1.02);
}

@media (max-width: 720px) {
  .detail-gallery {
    grid-template-columns: 1fr;
    gap: var(--space-sm);
  }

  .gallery-item {
    border-radius: 8px;
  }
}

/* Detail Navigation */
.detail-nav {
  position: fixed;
  bottom: 40px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 12px;
  z-index: 1005;
}

.detail-nav-btn {
  width: 56px;
  height: 56px;
  display: grid;
  place-items: center;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 50%;
  color: var(--text);
  cursor: pointer;
  box-shadow: var(--shadow-md);
  transition: all 0.3s var(--ease-out-expo);
}

.detail-nav-btn:hover {
  background: var(--accent);
  border-color: var(--accent);
  color: white;
  transform: scale(1.1);
}

.detail-nav-btn:disabled {
  opacity: 0.3;
  cursor: not-allowed;
}

.detail-nav-btn:disabled:hover {
  background: var(--paper);
  border-color: var(--line);
  color: var(--text);
  transform: none;
}

/* Responsive Overlay */
@media (max-width: 900px) {
  .detail-container {
    grid-template-columns: 1fr;
  }

  .detail-number {
    font-size: 5rem;
    bottom: -10px;
    right: 10px;
  }
}

@media (max-width: 600px) {
  .overlay-header {
    flex-direction: column;
    align-items: flex-start;
    gap: var(--space-md);
  }

  .overlay-grid {
    grid-template-columns: 1fr;
  }

  .overlay-close-btn {
    top: 16px;
    right: 16px;
    width: 40px;
    height: 40px;
  }
}

/* ============================================
   STUDIO SECTION - Modern Split Layout
   ============================================ */
.studio-section {
  min-height: 100vh;
  display: flex;
  align-items: center;
  padding: var(--space-xl) 0;
  overflow: hidden;
}

.studio-container {
  width: min(1400px, 94vw);
  margin: 0 auto;
  padding: 0 var(--space-md);
  display: grid;
  grid-template-columns: 1fr 1.2fr;
  gap: clamp(60px, 8vw, 120px);
  align-items: start;
}

.studio-left {
  position: sticky;
  top: 20vh;
}

.studio-title {
  font-family: var(--font-display);
  font-size: clamp(2.5rem, 6vw, 4.5rem);
  font-weight: 600;
  line-height: 1.1;
  letter-spacing: -0.03em;
  margin: 0;
}

.studio-title .title-word {
  display: block;
}

.studio-title .title-accent {
  color: var(--accent);
  font-style: italic;
}

.studio-right {
  padding-top: var(--space-md);
}

.studio-content {
  margin-bottom: var(--space-xl);
}

.studio-lead {
  font-size: clamp(1.2rem, 2vw, 1.5rem);
  line-height: 1.6;
  color: var(--text);
  margin: 0 0 var(--space-md);
}

.studio-text {
  font-size: 1rem;
  line-height: 1.8;
  color: var(--muted);
  margin: 0;
  max-width: 55ch;
}

/* Services */
.studio-services {
  margin-top: var(--space-lg);
}

.services-title {
  font-family: var(--font-display);
  font-size: 0.85rem;
  font-weight: 600;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--muted);
  margin: 0 0 var(--space-md);
}

.services-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: clamp(16px, 2vw, 24px);
}

.service-card {
  position: relative;
  padding: clamp(20px, 3vw, 28px);
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 16px;
  transition: all 0.4s var(--ease-out-expo);
  overflow: hidden;
}

.service-card::before {
  content: '';
  position: absolute;
  inset: 0;
  background: var(--gradient-primary);
  opacity: 0;
  transition: opacity 0.4s var(--ease-out-expo);
}

.service-card:hover {
  transform: translateY(-4px);
  border-color: transparent;
  box-shadow: var(--shadow-lg);
}

.service-card:hover::before {
  opacity: 0.05;
}

.service-number {
  display: block;
  font-family: var(--font-display);
  font-size: 2.5rem;
  font-weight: 700;
  color: var(--line);
  line-height: 1;
  margin-bottom: var(--space-sm);
  transition: color 0.4s var(--ease-out-expo);
  position: relative;
}

.service-card:hover .service-number {
  color: var(--accent);
}

.service-name {
  font-family: var(--font-display);
  font-size: 1.1rem;
  font-weight: 600;
  margin: 0 0 8px;
  position: relative;
}

.service-desc {
  font-size: 0.9rem;
  color: var(--muted);
  margin: 0;
  line-height: 1.5;
  position: relative;
}

/* Studio Decoration */
.studio-decoration {
  position: absolute;
  right: 0;
  top: 50%;
  transform: translateY(-50%);
  pointer-events: none;
}

.decoration-circle {
  width: 400px;
  height: 400px;
  border: 1px solid var(--line);
  border-radius: 50%;
  opacity: 0.3;
}

.decoration-line {
  position: absolute;
  top: 50%;
  left: -100px;
  width: 200px;
  height: 1px;
  background: var(--line);
  opacity: 0.3;
}

/* Responsive Studio */
@media (max-width: 1024px) {
  .studio-container {
    grid-template-columns: 1fr;
    gap: var(--space-lg);
  }

  .studio-left {
    position: relative;
    top: 0;
  }

  .services-grid {
    grid-template-columns: 1fr;
  }

  .studio-decoration {
    display: none;
  }
}

/* ============================================
   PROCESS SECTION - Card-Based Timeline
   ============================================ */
.process-section {
  min-height: 100vh;
  display: flex;
  align-items: center;
  padding: var(--space-xl) 0;
  background: var(--bg-secondary);
}

.process-container {
  width: min(1400px, 94vw);
  margin: 0 auto;
  padding: 0 var(--space-md);
}

.process-header {
  text-align: center;
  max-width: 600px;
  margin: 0 auto var(--space-xl);
}

.process-title {
  font-family: var(--font-display);
  font-size: clamp(2rem, 5vw, 3.5rem);
  font-weight: 600;
  line-height: 1.1;
  letter-spacing: -0.02em;
  margin: 0 0 var(--space-md);
}

.process-intro {
  font-size: 1.1rem;
  color: var(--muted);
  margin: 0;
}

/* Process Steps Grid */
.process-steps {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: clamp(16px, 2.5vw, 28px);
  position: relative;
}

/* Process Card */
.process-card {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 20px;
  padding: clamp(24px, 3vw, 32px);
  position: relative;
  transition: all 0.4s var(--ease-out-expo);
  opacity: 0;
  transform: translateY(30px);
}

.process-card.animate {
  opacity: 1;
  transform: translateY(0);
}

.process-card:hover {
  transform: translateY(-8px);
  box-shadow: var(--shadow-lg);
  border-color: var(--accent);
}

.process-card__header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: var(--space-md);
}

.process-card__number {
  font-family: var(--font-display);
  font-size: 3rem;
  font-weight: 700;
  color: var(--line);
  line-height: 1;
  transition: color 0.4s var(--ease-out-expo);
}

.process-card:hover .process-card__number {
  color: var(--accent);
}

.process-card__icon {
  width: 48px;
  height: 48px;
  display: grid;
  place-items: center;
  background: var(--bg-secondary);
  border-radius: 12px;
  color: var(--accent);
  transition: all 0.3s var(--ease-out-expo);
}

.process-card:hover .process-card__icon {
  background: var(--accent);
  color: white;
}

.process-card__title {
  font-family: var(--font-display);
  font-size: 1.4rem;
  font-weight: 600;
  margin: 0 0 var(--space-sm);
}

.process-card__desc {
  font-size: 0.95rem;
  color: var(--muted);
  line-height: 1.6;
  margin: 0 0 var(--space-md);
}

.process-card__list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.process-card__list li {
  font-size: 0.85rem;
  color: var(--text-secondary);
  padding-left: 1.2rem;
  position: relative;
}

.process-card__list li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 8px;
  width: 5px;
  height: 5px;
  background: var(--accent);
  border-radius: 50%;
}

/* Process Progress Line */
.process-progress {
  position: absolute;
  top: 60px;
  left: calc(12.5% + 14px);
  right: calc(12.5% + 14px);
  pointer-events: none;
}

.progress-line {
  height: 2px;
  background: var(--line);
  position: relative;
}

.progress-fill {
  position: absolute;
  left: 0;
  top: 0;
  height: 100%;
  width: 0;
  background: var(--gradient-primary);
  transition: width 1.5s var(--ease-out-expo);
}

.process-section.animate .progress-fill {
  width: 100%;
}

/* Responsive Process */
@media (max-width: 1100px) {
  .process-steps {
    grid-template-columns: repeat(2, 1fr);
  }

  .process-progress {
    display: none;
  }
}

@media (max-width: 600px) {
  .process-steps {
    grid-template-columns: 1fr;
  }

  .process-card__number {
    font-size: 2.5rem;
  }
}

/* ============================================
   CONTACT SECTION - Modern Two-Column
   ============================================ */
.contact-section {
  min-height: 100vh;
  display: flex;
  align-items: center;
  padding: var(--space-xl) 0;
}

.contact-container {
  width: min(1400px, 94vw);
  margin: 0 auto;
  padding: 0 var(--space-md);
  display: grid;
  grid-template-columns: 1fr 1.2fr;
  gap: clamp(60px, 8vw, 120px);
  align-items: start;
}

/* Contact CTA Side */
.contact-cta {
  position: sticky;
  top: 20vh;
}

.contact-title {
  font-family: var(--font-display);
  font-size: clamp(2.5rem, 6vw, 4.5rem);
  font-weight: 600;
  line-height: 1.1;
  letter-spacing: -0.03em;
  margin: 0 0 var(--space-md);
}

.contact-title .title-accent {
  color: var(--accent);
  font-style: italic;
}

.contact-lead {
  font-size: 1.1rem;
  color: var(--muted);
  margin: 0 0 var(--space-lg);
  max-width: 35ch;
}

/* Info Cards */
.contact-info-cards {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.info-card {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 16px 20px;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 12px;
  transition: all 0.3s var(--ease-out-expo);
}

.info-card:hover {
  border-color: var(--accent);
  transform: translateX(8px);
}

.info-card__icon {
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  background: var(--bg-secondary);
  border-radius: 10px;
  color: var(--accent);
  flex-shrink: 0;
}

.info-card__content {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.info-card__label {
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
}

.info-card__value {
  font-size: 0.95rem;
  color: var(--text);
  text-decoration: none;
  transition: color 0.3s;
}

a.info-card__value:hover {
  color: var(--accent);
}

/* Contact Form Wrapper */
.contact-form-wrapper {
  padding-top: var(--space-md);
}

/* Contact Reveal Button */
.btn-contact-reveal {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  padding: 1.25rem 2.5rem;
  font-size: 1.1rem;
  font-weight: 600;
  border: 2px solid var(--accent);
  transition: all 0.4s var(--ease-out-expo);
}

.btn-contact-reveal .btn-icon {
  transition: transform 0.4s var(--ease-out-expo);
}

.btn-contact-reveal:hover .btn-icon {
  transform: translateX(6px);
}

.btn-contact-reveal[aria-expanded="true"] {
  display: none;
}

/* Contact Form Hidden State */
.contact-form[hidden] {
  display: none;
}

/* Contact Form Reveal Animation */
.contact-form {
  display: flex;
  flex-direction: column;
  gap: var(--space-md);
  animation: formReveal 0.6s var(--ease-out-expo);
}

@keyframes formReveal {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Form Row */
.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-md);
}

/* Form Field */
.form-field {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.form-label {
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--muted);
  transition: color 0.3s var(--ease-out-expo);
}

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

.form-input,
.form-select,
.form-textarea {
  width: 100%;
  padding: 12px 0;
  font-size: 1rem;
  color: var(--text);
  background: transparent;
  border: none;
  border-bottom: 2px solid var(--line);
  border-radius: 0;
  transition: border-color 0.3s var(--ease-out-expo);
}

.form-input:focus,
.form-select:focus,
.form-textarea:focus {
  outline: none;
  border-bottom-color: var(--accent);
}

.form-input::placeholder,
.form-textarea::placeholder {
  color: var(--muted);
  opacity: 0.5;
}

.form-select {
  cursor: pointer;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%237a7a7a' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 0 center;
  padding-right: 20px;
}

.form-textarea {
  resize: vertical;
  min-height: 120px;
}

.form-error {
  font-size: 0.8rem;
  color: #dc2626;
  min-height: 1em;
}

/* Form Line Animation */
.form-line {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--gradient-primary);
  transition: width 0.4s var(--ease-out-expo);
}

.form-field:focus-within .form-line {
  width: 100%;
}

/* Form Actions */
.form-actions {
  display: flex;
  align-items: center;
  gap: var(--space-md);
  margin-top: var(--space-sm);
}

.btn-submit {
  display: inline-flex;
  align-items: center;
  gap: 10px;
}

.btn-submit .btn-icon {
  transition: transform 0.3s var(--ease-out-expo);
}

.btn-submit:hover .btn-icon {
  transform: translate(4px, -4px);
}

/* Responsive Contact */
@media (max-width: 1024px) {
  .contact-container {
    grid-template-columns: 1fr;
    gap: var(--space-lg);
  }

  .contact-cta {
    position: relative;
    top: 0;
  }

  .contact-info-cards {
    flex-direction: row;
    flex-wrap: wrap;
  }

  .info-card {
    flex: 1;
    min-width: 200px;
  }
}

@media (max-width: 600px) {
  .form-row {
    grid-template-columns: 1fr;
  }

  .contact-info-cards {
    flex-direction: column;
  }

  .info-card:hover {
    transform: translateX(0) translateY(-4px);
  }
}

/* ============================================
   MOBILE TOUCH OPTIMIZATION
   ============================================ */

/* Fix hero title character overlap on mobile */
@media (max-width: 720px) {
  .title-line .char {
    transform: translateY(100%); /* Remove rotateX that causes overlap */
  }

  .title-line.animate .char {
    animation: charRevealMobile 0.6s var(--ease-out-expo) forwards;
  }

  @keyframes charRevealMobile {
    from {
      opacity: 0;
      transform: translateY(50%);
    }
    to {
      opacity: 1;
      transform: translateY(0);
    }
  }

  /* Ensure hero title doesn't overflow */
  .hero-title {
    word-break: break-word;
  }
}

/* Increase dot navigation touch targets to 44px minimum */
@media (max-width: 720px) {
  .dot-nav .dot {
    width: 44px !important;
    height: 44px !important;
    display: flex !important;
    align-items: center;
    justify-content: center;
    position: relative;
    border: none !important; /* Remove visible border - using ::before instead */
    background: transparent !important;
    box-shadow: none !important;
  }

  .dot-nav .dot::before {
    content: '';
    position: absolute;
    width: 10px;
    height: 10px;
    border: 1.5px solid var(--muted);
    border-radius: 50%;
    background: transparent;
    transition: all 0.4s var(--ease-out-expo);
  }

  .dot-nav .dot.is-active::before {
    width: 12px;
    height: 12px;
    background: var(--accent);
    border-color: var(--accent);
    box-shadow: 0 0 0 4px rgba(106, 143, 127, 0.2);
  }

  .dot-nav .dot:hover:not(.is-active)::before {
    border-color: var(--accent);
    transform: scale(1.2);
  }

  .dot-nav ul {
    gap: 0;
    padding: 8px 4px;
  }

  /* Hide labels on mobile - just show dots */
  .dot-nav .dot .label {
    display: none !important;
  }
}

/* Touch-specific styles - disable hover effects on touch devices */
@media (hover: none) and (pointer: coarse) {
  /* Disable 3D tilt on project cards */
  .project-card__inner {
    transform: none !important;
  }

  .project-card:hover .project-card__inner {
    transform: translateY(-6px) !important;
  }

  /* Show card content by default on touch */
  .project-card__category {
    transform: translateY(0);
    opacity: 1;
  }

  /* Disable overlay card hover transform */
  .overlay-card:hover {
    transform: translateY(-4px);
  }

  /* Add active states for touch feedback */
  .btn:active {
    transform: scale(0.97);
    opacity: 0.9;
  }

  .project-card:active .project-card__inner {
    transform: scale(0.98) !important;
  }

  .overlay-card:active {
    transform: scale(0.98);
    opacity: 0.95;
  }

  .service-card:active,
  .process-card:active,
  .info-card:active {
    transform: scale(0.98);
    opacity: 0.9;
  }

  /* Ensure filter buttons have adequate touch targets */
  .filter-btn {
    min-height: 44px;
    min-width: 44px;
    padding: 0.6rem 1.2rem;
  }

  /* Disable magnetic button effects */
  .btn.magnetic {
    transform: none !important;
  }

  .btn.magnetic:active {
    transform: scale(0.97) !important;
  }
}

/* Footer spacing fix at 480px */
@media (max-width: 480px) {
  .contact-section {
    padding-bottom: max(20vh, calc(env(safe-area-inset-bottom, 0px) + 100px));
  }

  .site-foot {
    bottom: calc(env(safe-area-inset-bottom, 0px) + 8px);
  }

  /* Improve small font sizes for readability */
  .project-card__category {
    font-size: 0.8rem;
  }

  .overlay-card__category {
    font-size: 0.8rem;
  }

  .site-foot small {
    font-size: 0.8rem;
  }

  .section-label {
    font-size: 0.8rem;
  }

  .detail-info-label {
    font-size: 0.8rem;
  }

  /* Ensure buttons are large enough for touch */
  .btn {
    min-height: 48px;
    padding: 0.9rem 1.8rem;
  }

  .detail-nav-btn {
    width: 52px;
    height: 52px;
  }

  /* Improve overlay close button positioning */
  .overlay-close-btn {
    top: 12px;
    right: 12px;
    width: 44px;
    height: 44px;
  }
}

/* iOS Safari bottom bar handling */
@supports (-webkit-touch-callout: none) {
  @media (max-width: 480px) {
    .contact-section {
      padding-bottom: max(25vh, calc(env(safe-area-inset-bottom, 0px) + 120px));
    }
  }
}
