:root {
  --bg: #0a0a0f;
  --surface: #12121a;
  --text: #f0f0f5;
  --muted: #a8a8b8;
  --primary: #ff6b35;
  --primary-glow: #ff8c5a;
  --secondary: #7c3aed;
  --accent: #f59e0b;
  --primary-contrast: #0a0a0f;
  --border: rgba(255, 255, 255, 0.08);
  --ring: rgba(255, 107, 53, 0.4);
  --glass-bg: rgba(18, 18, 26, 0.6);
  --glass-border: rgba(255, 255, 255, 0.1);
  --header-height: clamp(68px, 8vh, 96px);
  --hero-padding-y: clamp(1.5rem, 6vh, 3rem);
}

@media (prefers-color-scheme: light) {
  :root:not([data-theme]) {
    --bg: #fafafa;
    --surface: #ffffff;
    --text: #0f0f14;
    --muted: #6b6b78;
    --primary: #ff5722;
    --primary-glow: #ff7043;
    --secondary: #8b5cf6;
    --accent: #f59e0b;
    --primary-contrast: #ffffff;
    --border: rgba(0, 0, 0, 0.08);
    --ring: rgba(255, 87, 34, 0.4);
    --glass-bg: rgba(255, 255, 255, 0.7);
    --glass-border: rgba(0, 0, 0, 0.1);
  }
}

[data-theme="light"] {
  --bg: #fafafa;
  --surface: #ffffff;
  --text: #0f0f14;
  --muted: #6b6b78;
  --primary: #ff5722;
  --primary-glow: #ff7043;
  --secondary: #8b5cf6;
  --accent: #f59e0b;
  --primary-contrast: #ffffff;
  --border: rgba(0, 0, 0, 0.08);
  --ring: rgba(255, 87, 34, 0.4);
  --glass-bg: rgba(255, 255, 255, 0.7);
  --glass-border: rgba(0, 0, 0, 0.1);
}

[data-theme="dark"] {
  --bg: #0a0a0f;
  --surface: #12121a;
  --text: #f0f0f5;
  --muted: #a8a8b8;
  --primary: #ff6b35;
  --primary-glow: #ff8c5a;
  --secondary: #7c3aed;
  --accent: #f59e0b;
  --primary-contrast: #0a0a0f;
  --border: rgba(255, 255, 255, 0.08);
  --ring: rgba(255, 107, 53, 0.4);
  --glass-bg: rgba(18, 18, 26, 0.6);
  --glass-border: rgba(255, 255, 255, 0.1);
}

/* Custom cursor */
.custom-cursor {
  width: 20px;
  height: 20px;
  border: 2px solid var(--primary);
  border-radius: 50%;
  position: fixed;
  pointer-events: none;
  z-index: 9999;
  opacity: 0;
  will-change: transform;
  transition: opacity 0.3s ease, width 0.3s cubic-bezier(0.4, 0, 0.2, 1), height 0.3s cubic-bezier(0.4, 0, 0.2, 1), border-width 0.3s ease, background-color 0.3s ease;
  left: 0;
  top: 0;
  mix-blend-mode: difference;
}

.custom-cursor.hovering {
  background: var(--primary);
  border-width: 0;
  box-shadow: 0 0 20px var(--ring);
}

.cursor-follower {
  width: 40px;
  height: 40px;
  background: radial-gradient(circle, var(--ring), transparent);
  border-radius: 50%;
  position: fixed;
  pointer-events: none;
  z-index: 9998;
  opacity: 0;
  will-change: transform;
  transition: opacity 0.3s ease;
  left: 0;
  top: 0;
}

.cursor-follower.hovering {
  background: radial-gradient(circle, 
    rgba(255, 107, 53, 0.2) 0%, 
    rgba(255, 107, 53, 0.1) 50%, 
    transparent 100%);
}

@media (hover: hover) {
  .custom-cursor, .cursor-follower {
    opacity: 1;
  }
}

/* Animated background gradient */
.bg-gradient {
  position: fixed;
  inset: 0;
  z-index: -2;
  background: linear-gradient(135deg, 
    var(--bg) 0%, 
    color-mix(in oklab, var(--bg) 95%, var(--primary) 5%) 25%,
    color-mix(in oklab, var(--bg) 90%, var(--secondary) 10%) 50%,
    color-mix(in oklab, var(--bg) 95%, var(--accent) 5%) 75%,
    var(--bg) 100%);
  background-size: 300% 300%;
  animation: gradientShift 20s ease infinite;
}

@keyframes gradientShift {
  0%, 100% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
}

/* Floating shapes */
.floating-shapes {
  position: fixed;
  inset: 0;
  z-index: -1;
  overflow: hidden;
  pointer-events: none;
}

.shape {
  position: absolute;
  border-radius: 50%;
  filter: blur(80px);
  opacity: 0.15;
  animation: float 20s ease-in-out infinite;
}

.shape-1 {
  width: 500px;
  height: 500px;
  background: radial-gradient(circle, var(--primary), transparent);
  top: -10%;
  left: -10%;
  animation-duration: 25s;
}

.shape-2 {
  width: 400px;
  height: 400px;
  background: radial-gradient(circle, var(--secondary), transparent);
  bottom: -5%;
  right: -5%;
  animation-duration: 30s;
  animation-delay: -10s;
}

.shape-3 {
  width: 350px;
  height: 350px;
  background: radial-gradient(circle, var(--accent), transparent);
  top: 40%;
  left: 50%;
  animation-duration: 35s;
  animation-delay: -20s;
}

@media (width <= 768px) {
  .shape-1 {
    width: 300px;
    height: 300px;
    opacity: 0.1;
  }
  
  .shape-2 {
    width: 250px;
    height: 250px;
    opacity: 0.1;
  }
  
  .shape-3 {
    width: 200px;
    height: 200px;
    opacity: 0.1;
  }
}

@keyframes float {
  0%, 100% {
    transform: translate(0, 0) rotate(0deg) scale(1);
  }
  25% {
    transform: translate(30px, -50px) rotate(90deg) scale(1.1);
  }
  50% {
    transform: translate(-30px, 30px) rotate(180deg) scale(0.9);
  }
  75% {
    transform: translate(50px, 20px) rotate(270deg) scale(1.05);
  }
}

/* Base styles */
* { 
  box-sizing: border-box;
}

html { 
  height: 100%;
  scroll-behavior: smooth;
}

body {
  min-height: 100%;
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 400 17px/1.7 Inter, ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  cursor: none;
  overflow-x: hidden;
  touch-action: manipulation;
  width: 100%;
  max-width: 100vw;
  position: relative;
}

.page-loader {
  position: fixed;
  inset: 0;
  z-index: 10050;
  display: flex;
  align-items: center;
  justify-content: center;
  background: color-mix(in oklab, var(--bg) 85%, #000 15%);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  transition: opacity 0.6s ease, visibility 0.6s ease;
}

.page-loader::after {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at top left, rgba(255, 107, 53, 0.12), transparent 45%),
              radial-gradient(circle at bottom right, rgba(124, 58, 237, 0.12), transparent 40%);
  filter: blur(40px);
  pointer-events: none;
}

.loader-content {
  position: relative;
  width: 120px;
  height: 120px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.loader-spinner {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  border: 4px solid transparent;
  border-top-color: var(--primary);
  border-right-color: color-mix(in oklab, var(--primary) 50%, var(--secondary) 50%);
  animation: loaderSpin 1s linear infinite;
  box-shadow: 0 0 20px rgba(255, 107, 53, 0.35);
}

.loader-ring {
  position: absolute;
  width: 110px;
  height: 110px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 107, 53, 0.45), rgba(255, 107, 53, 0) 60%);
  filter: blur(18px);
  animation: loaderPulse 2.4s ease-in-out infinite;
}

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

@keyframes loaderSpin {
  0% {
    transform: rotate(0deg);
  }
  100% {
    transform: rotate(360deg);
  }
}

@keyframes loaderPulse {
  0%, 100% {
    transform: scale(1);
    opacity: 0.55;
  }
  50% {
    transform: scale(1.2);
    opacity: 0.85;
  }
}

@media (width <= 640px) {
  body {
    font-size: 16px;
    line-height: 1.6;
  }
}

@media (hover: none) {
  body {
    cursor: default;
  }
}

/* Hide OS cursor on interactive elements when custom cursor is active */
@media (hover: hover) {
  a, button, [role="button"], [role="tab"], input, textarea, select, .gallery-item, .btn, .nav-list a, .theme-toggle {
    cursor: none !important;
  }
}

img { 
  max-width: 100%; 
  height: auto; 
  display: block;
  /* Improve image loading on mobile */
  content-visibility: auto;
}

/* Loading state for images */
img[loading="lazy"]:not(.loaded),
img[data-lazy-state="pending"],
img[data-lazy-state="loading"] {
  background:
    radial-gradient(circle at 20% 20%, color-mix(in oklab, var(--surface) 86%, var(--primary) 14%) 0%, transparent 60%),
    radial-gradient(circle at 80% 80%, color-mix(in oklab, var(--surface) 90%, var(--secondary) 10%) 0%, transparent 55%),
    linear-gradient(135deg, color-mix(in oklab, var(--surface) 96%, var(--accent) 4%), color-mix(in oklab, var(--surface) 94%, var(--primary) 6%));
  min-height: 200px;
}

@media (width <= 640px) {
  img[loading="lazy"]:not(.loaded),
  img[data-lazy-state="pending"],
  img[data-lazy-state="loading"] {
    min-height: 150px;
  }
}

.container {
  width: min(1200px, 92vw);
  margin: 0 auto;
  padding: 0 1rem;
  max-width: 100%;
  overflow-x: hidden;
}

@media (width > 768px) {
  .hero .container {
    padding: 0 4rem;
  }
}

@media (width > 1024px) {
  .hero .container {
    padding: 0 5rem;
  }
}

@media (width > 1400px) {
  .hero .container {
    padding: 0 6rem;
    max-width: 1400px;
  }
}

@media (width <= 640px) {
  .container {
    width: 100%;
    max-width: 100vw;
    padding: 0 1.5rem;
    overflow-x: hidden;
  }
  
  /* Extra padding for hero section on mobile */
  .hero .container {
    padding: 0 1.75rem;
  }
}

@media (width <= 480px) {
  .container {
    padding: 0 1.25rem;
  }
  
  .hero .container {
    padding: 0 1.5rem;
  }
}

.skip-link {
  position: absolute;
  left: -999px;
  top: -999px;
  background: var(--surface);
  padding: 1rem;
  border-radius: 8px;
}

.skip-link:focus { 
  left: 1rem; 
  top: 1rem; 
  z-index: 1000;
}

/* Glass morphism utility */
.glass-card {
  background: var(--glass-bg);
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  border: 1px solid var(--glass-border);
  box-shadow: 
    0 4px 24px rgba(0, 0, 0, 0.1),
    inset 0 1px 0 rgba(255, 255, 255, 0.05);
}

/* Header */
.site-header {
  position: sticky;
  top: 0;
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  background: color-mix(in oklab, var(--bg) 85%, transparent);
  border-bottom: 1px solid var(--border);
  z-index: 1000;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.header-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 0;
}

.brand { 
  text-decoration: none; 
  color: inherit;
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.brand:hover {
  transform: scale(1.02);
}

.brand-title {
  display: block;
  font-family: "Playfair Display", ui-serif, Georgia, serif;
  font-weight: 700;
  font-size: 1.35rem;
  letter-spacing: 0.3px;
  background: linear-gradient(135deg, var(--text), var(--primary));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.brand-subtitle {
  display: block;
  font-size: 11px;
  color: var(--muted);
  letter-spacing: 2.2px;
  font-weight: 500;
  margin-top: 2px;
}

@media (width <= 640px) {
  .brand {
    padding-left: 0.5rem;
  }
  
  .brand-title {
    font-size: 1.15rem;
  }
  
  .brand-subtitle {
    font-size: 10px;
    letter-spacing: 1.8px;
  }
}

/* Navigation */
.site-nav { 
  position: relative;
  z-index: 1001;
}

.nav-toggle {
  display: none;
  background: none;
  border: none;
  color: var(--text);
  cursor: pointer;
  padding: 0.5rem;
  min-width: 44px;
  min-height: 44px;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
  position: relative;
  z-index: 1002;
}

.nav-list {
  display: flex;
  gap: 0.5rem;
  list-style: none;
  margin: 0;
  padding: 0;
  align-items: center;
}

.nav-list a {
  color: var(--text);
  text-decoration: none;
  padding: 0.6rem 1rem;
  border-radius: 12px;
  font-weight: 500;
  font-size: 0.95rem;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  touch-action: manipulation;
}

.nav-list a::after {
  content: '';
  position: absolute;
  bottom: 4px;
  left: 50%;
  width: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--primary), var(--secondary));
  transform: translateX(-50%);
  transition: width 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.nav-list a:hover {
  background: var(--glass-bg);
  backdrop-filter: blur(20px);
  transform: translateY(-2px);
}

.nav-list a:hover::after {
  width: 80%;
}

.theme-toggle {
  background: var(--glass-bg);
  backdrop-filter: blur(20px);
  border: 1px solid var(--border);
  color: var(--text);
  border-radius: 999px;
  padding: 0.6rem;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  min-width: 44px;
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  touch-action: manipulation;
}

.theme-toggle:hover {
  transform: scale(1.1) rotate(20deg);
  background: var(--surface);
}

/* Gradient text */
.gradient-text {
  background: linear-gradient(135deg, 
    var(--text) 0%, 
    var(--primary) 50%, 
    var(--secondary) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  background-size: 200% 200%;
  animation: gradientTextShift 8s ease infinite;
}

@keyframes gradientTextShift {
  0%, 100% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
}

/* Hero section */
.hero { 
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  padding: var(--hero-padding-y) 0;
  min-height: calc(100vh - var(--header-height) - 2 * var(--hero-padding-y));
  min-height: calc(100dvh - var(--header-height) - 2 * var(--hero-padding-y));
  width: 100%;
  overflow-x: hidden;
}

.hero-inner {
  display: grid;
  grid-template-columns: 1fr 1.2fr;
  gap: 3rem;
  align-items: center;
  justify-items: center;
  width: 100%;
  max-width: 100%;
  align-content: center;
}

@media (width > 1024px) {
  .hero-inner {
    gap: 4rem;
  }
}

@media (width > 1400px) {
  .hero-inner {
    gap: 5rem;
  }
}

@media (width <= 1200px) {
  .hero-inner {
    grid-template-columns: 1fr 1fr;
  }
}

.hero-copy {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-self: center;
  width: 100%;
}

.hero h1 {
  font-family: "Playfair Display", ui-serif, Georgia, serif;
  font-weight: 900;
  line-height: 1.15;
  font-size: clamp(2.5rem, 5vw + 1rem, 4rem);
  margin: 0 0 1.5rem 0;
  letter-spacing: -0.02em;
  padding: 0;
}

@media (width > 1024px) {
  .hero h1 {
    margin-bottom: 2rem;
  }
}

@media (width <= 640px) {
  .hero h1 {
    padding: 0;
  }
}

@media (width <= 768px) {
  .hero h1 {
    margin-bottom: 1.25rem;
  }
}

@media (width <= 640px) {
  .hero h1 {
    margin-bottom: 1rem;
  }
}

.hero p { 
  margin: 0 0 2rem 0; 
  color: var(--muted);
  font-size: 1.15rem;
  line-height: 1.8;
  padding: 0;
}

@media (width > 1024px) {
  .hero p {
    font-size: 1.2rem;
    line-height: 1.85;
    margin-bottom: 2.5rem;
    max-width: 90%;
  }
}

@media (width <= 640px) {
  .hero p {
    font-size: 1rem;
    line-height: 1.7;
    margin-bottom: 2rem;
    padding: 0;
  }
}

.hero-actions { 
  display: flex; 
  gap: 1rem; 
  flex-wrap: wrap;
  margin-top: 0.5rem;
  padding: 0;
}

@media (width > 1024px) {
  .hero-actions {
    gap: 1.25rem;
    margin-top: 1rem;
  }
}

@media (width <= 768px) {
  .hero-actions {
    margin-top: 1rem;
  }
}

@media (width <= 640px) {
  .hero-actions {
    flex-direction: column;
    gap: 1rem;
    margin-top: 1.5rem;
    padding: 0;
  }
  
  .hero-actions .btn {
    width: 100%;
    justify-content: center;
  }
}

/* Buttons with magnetic effect */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 52px;
  padding: 0 28px;
  border-radius: 16px;
  text-decoration: none;
  color: var(--text);
  border: 1px solid var(--border);
  font-weight: 600;
  font-size: 1rem;
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  overflow: hidden;
  min-height: 44px;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
}

.btn span {
  position: relative;
  z-index: 1;
}

.btn.primary {
  background: linear-gradient(135deg, var(--primary), var(--primary-glow));
  color: var(--primary-contrast);
  border-color: transparent;
  box-shadow: 
    0 4px 20px rgba(255, 107, 53, 0.3),
    inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

.btn.primary::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, var(--primary-glow), var(--accent));
  opacity: 0;
  transition: opacity 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.btn.primary:hover::before {
  opacity: 1;
}

.btn.ghost { 
  background: var(--glass-bg);
  backdrop-filter: blur(20px);
  border-color: var(--glass-border);
}

.btn:hover {
  transform: translateY(-3px) scale(1.02);
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.2);
}

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

.btn:focus-visible { 
  outline: 3px solid var(--ring); 
  outline-offset: 3px;
}

/* Image with glow */
.hero-figure {
  overflow: hidden;
  border-radius: 24px;
  position: relative;
  max-width: 100%;
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  align-self: center;
  justify-self: center;
}

@media (width <= 1024px) {
  .hero-figure {
    order: 2;
    max-width: 100%;
    margin: 0 auto;
    justify-self: center;
    align-self: center;
  }
  
  .hero-copy {
    order: 1;
    padding: 0 0.5rem;
    align-self: center;
  }
  
  .hero-inner {
    justify-items: center;
    align-items: center;
  }
}

@media (width <= 768px) {
  .hero-copy {
    padding: 0 0.75rem;
  }
}

@media (width <= 640px) {
  .hero-copy {
    padding: 0;
  }
}

.image-glow {
  position: relative;
  width: 100%;
  border-radius: 24px;
  overflow: hidden;
  border: 1px solid var(--glass-border);
  background: var(--surface);
  box-shadow: 
    0 20px 60px rgba(0, 0, 0, 0.3),
    0 0 40px rgba(255, 107, 53, 0.1);
  display: flex;
  align-items: center;
  justify-content: center;
  max-width: 100%;
}

.image-glow::before {
  content: '';
  position: absolute;
  inset: -50%;
  background: conic-gradient(
    from 0deg,
    transparent 0deg,
    var(--primary) 90deg,
    var(--secondary) 180deg,
    var(--accent) 270deg,
    transparent 360deg
  );
  animation: rotate 8s linear infinite;
  opacity: 0.3;
  z-index: -1;
}

@keyframes rotate {
  to { transform: rotate(360deg); }
}

.image-glow img { 
  width: 100%; 
  height: 100%; 
  object-fit: cover;
  object-position: center;
  transition: transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
  max-width: 100%;
}

.hero-figure .image-glow img {
  object-fit: cover;
  object-position: center center;
  width: 100%;
  height: auto;
  max-height: 75vh;
  aspect-ratio: 3872 / 2592;
  display: block;
  max-width: 100%;
}

@media (width <= 1024px) {
  .hero-figure {
    width: 100%;
  }
  
  .hero-figure .image-glow {
    width: 100%;
  }
  
  .hero-figure .image-glow img {
    max-height: 65vh;
    aspect-ratio: 4 / 3;
    width: 100%;
    max-width: 100%;
    margin: 0 auto;
    display: block;
  }
}

@media (width <= 768px) {
  .hero-figure {
    border-radius: 20px;
    margin: 0 auto;
    width: 100%;
  }
  
  .hero-figure .image-glow {
    border-radius: 20px;
    width: 100%;
  }
  
  .hero-figure .image-glow img {
    max-height: 60vh;
    aspect-ratio: 4 / 3;
    width: 100%;
    max-width: 100%;
    margin: 0 auto;
    display: block;
  }
}

@media (width <= 640px) {
  .hero-figure {
    border-radius: 16px;
    margin: 0 auto;
    width: 100%;
    max-width: 100%;
  }
  
  .hero-figure .image-glow {
    border-radius: 16px;
    width: 100%;
  }
  
  .hero-figure .image-glow img {
    max-height: 50vh;
    aspect-ratio: 4 / 3;
    width: 100%;
    max-width: 100%;
    margin: 0 auto;
    display: block;
  }
}

@media (orientation: landscape) and (max-height: 500px) {
  .hero-figure .image-glow img {
    max-height: 70vh;
  }
}

.image-glow:hover img {
  transform: scale(1.05);
}

/* Sections */
.section { 
  padding: 5rem 0;
  position: relative;
  overflow: visible;
}

.section-tight { 
  padding: 3.5rem 0;
}

.section-head { 
  margin-bottom: 2.5rem;
}

.section-head h2 {
  margin: 0 0 1rem 0;
  font-family: "Playfair Display", ui-serif, Georgia, serif;
  font-weight: 800;
  font-size: clamp(2rem, 4vw, 3rem);
  letter-spacing: -0.02em;
}

.section-head .muted { 
  color: var(--muted);
  font-size: 1.1rem;
}

/* Gallery filters */
.gallery-filters { 
  display: flex; 
  gap: 0.75rem; 
  flex-wrap: wrap; 
  margin-bottom: 2rem;
  overflow-x: auto;
  overflow-y: visible;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  -ms-overflow-style: none;
  padding: 2rem 3rem;
  margin-top: -1.5rem;
  margin-left: -3rem;
  margin-right: -3rem;
  padding-left: 3rem;
}

.gallery-filters::-webkit-scrollbar {
  display: none;
}

@media (width <= 640px) {
  .gallery-filters {
    gap: 0.5rem;
    margin-bottom: 1.5rem;
    padding: 1.5rem 2.5rem;
    margin-left: -2.5rem;
    margin-right: -2.5rem;
    padding-left: 2.5rem;
  }
}

.gallery-filters button {
  height: 42px;
  padding: 0 20px;
  background: var(--glass-bg);
  backdrop-filter: blur(20px);
  border: 1px solid var(--glass-border);
  color: var(--text);
  border-radius: 999px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1), 
              border-color 0.4s cubic-bezier(0.4, 0, 0.2, 1),
              box-shadow 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  overflow: visible;
  isolation: isolate;
  min-height: 44px;
  white-space: nowrap;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
  flex-shrink: 0;
}

@media (width <= 640px) {
  .gallery-filters button {
    height: 44px;
    padding: 0 16px;
    font-size: 0.9rem;
  }
}

.gallery-filters button::before {
  content: '';
  position: absolute;
  inset: -12px;
  border-radius: inherit;
  background: radial-gradient(ellipse at center, 
    var(--primary) 0%, 
    var(--primary-glow) 25%,
    transparent 65%);
  opacity: 0;
  filter: blur(16px);
  transform: scale(0.85);
  transition: opacity 0.35s cubic-bezier(0.4, 0, 0.2, 1), transform 0.35s cubic-bezier(0.4, 0, 0.2, 1);
  pointer-events: none;
  z-index: -1;
}

.gallery-filters button:hover::before,
.gallery-filters button:focus-visible::before {
  opacity: 0.4;
  transform: scale(1);
}

.gallery-filters button span {
  position: relative;
  z-index: 1;
}

.gallery-filters button:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15);
}

.gallery-filters button[aria-selected="true"] {
  background: linear-gradient(135deg, var(--primary), var(--primary-glow));
  color: var(--primary-contrast);
  border-color: rgba(255, 107, 53, 0.2);
  transform: translateY(-2px);
  box-shadow: 0 8px 24px color-mix(in srgb, var(--ring) 65%, transparent 35%),
              inset 0 0 0 1px rgba(255, 255, 255, 0.1);
}

.gallery-filters button[aria-selected="true"]::before {
  opacity: 0.75;
  transform: scale(1.05);
}

/* Gallery section - ensure no scrollbar */
#galerie {
  overflow: visible;
}

#galerie .container {
  overflow: visible;
}

/* Gallery grid */
.gallery-grid {
  display: grid;
  gap: 1.5rem;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  overflow: visible;
}

@media (width <= 768px) {
  .gallery-grid {
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.25rem;
  }
}

@media (width <= 640px) {
  .gallery-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 0.75rem;
  }
}

@media (width <= 480px) {
  .gallery-grid {
    grid-template-columns: 1fr;
    gap: 1rem;
    padding: 0 0.25rem;
  }
}

.gallery-item {
  display: block;
  border-radius: 20px;
  overflow: hidden;
  position: relative;
  transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
  aspect-ratio: 1 / 1;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
}

@media (width <= 640px) {
  .gallery-item {
    border-radius: 16px;
  }
}

.gallery-item-inner {
  width: 100%;
  height: 100%;
  position: relative;
  overflow: hidden;
}

.gallery-item img { 
  width: 100%; 
  height: 100%; 
  object-fit: cover;
  transform: scale(1.015);
  opacity: 0;
  filter: blur(16px) saturate(0.75);
  transition: 
    opacity 0.5s ease,
    transform 0.6s cubic-bezier(0.4, 0, 0.2, 1),
    filter 0.6s cubic-bezier(0.4, 0, 0.2, 1);
  will-change: transform, filter, opacity;
  /* Improve image rendering on mobile */
  image-rendering: -webkit-optimize-contrast;
  image-rendering: crisp-edges;
}

@media (width <= 768px) {
  .gallery-item img {
    /* Better rendering for mobile */
    image-rendering: auto;
    will-change: auto;
  }
}

.gallery-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to bottom,
    transparent 0%,
    rgba(0, 0, 0, 0.7) 100%
  );
  display: flex;
  align-items: flex-end;
  padding: 1.5rem;
  opacity: 0;
  transition: opacity 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.gallery-label {
  color: white;
  font-weight: 600;
  font-size: 1.1rem;
  text-transform: capitalize;
}

.gallery-item:hover {
  transform: translateY(-8px) scale(1.02);
  box-shadow: 
    0 20px 50px rgba(0, 0, 0, 0.3),
    0 0 0 1px var(--glass-border);
}

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

.gallery-item:hover .gallery-overlay {
  opacity: 1;
}

/* Two column layout */
.two-col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
  align-items: start;
}

.lead-text {
  font-size: 1.2rem;
  line-height: 1.8;
  font-weight: 500;
  color: var(--text);
  margin-bottom: 1.5rem;
  font-style: italic;
}

@media (width <= 640px) {
  .lead-text {
    font-size: 1.05rem;
    line-height: 1.7;
    margin-bottom: 1.25rem;
  }
}

/* Feature list */
.feature-list { 
  list-style: none; 
  padding: 0; 
  margin: 1.5rem 0; 
  display: grid; 
  gap: 1rem;
}

.feature-list li {
  padding: 1rem;
  background: var(--glass-bg);
  backdrop-filter: blur(20px);
  border: 1px solid var(--glass-border);
  border-radius: 16px;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.feature-list li:hover {
  transform: translateX(8px);
  background: color-mix(in oklab, var(--glass-bg) 80%, var(--primary) 20%);
}

.feature-title { 
  font-weight: 700;
  display: block;
  margin-bottom: 0.25rem;
  color: var(--text);
}

.feature-note { 
  color: var(--muted); 
  display: block;
  font-size: 0.95rem;
}

/* Card */
.card {
  background: var(--glass-bg);
  backdrop-filter: blur(20px);
  border: 1px solid var(--glass-border);
  border-radius: 20px;
  padding: 1.75rem;
  margin-top: 1.5rem;
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

@media (width <= 640px) {
  .card {
    padding: 1.25rem;
    border-radius: 16px;
    margin-top: 1rem;
  }
}

.card:hover {
  transform: translateY(-4px);
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.2);
}

.card h3 {
  margin-top: 0;
}

.schedule { 
  margin: 1rem 0; 
  padding-left: 1.2rem;
}

.schedule li {
  margin: 0.5rem 0;
}

/* Media card */
.media-card {
  border-radius: 24px;
  overflow: hidden;
  margin: 0;
}

.media-card .image-glow {
  width: 100%;
  height: 100%;
  min-height: 400px;
}

.media-card img { 
  width: 100%; 
  height: 100%; 
  display: block;
  object-fit: cover;
}

/* CV Grid */
.cv-grid { 
  display: grid; 
  grid-template-columns: 1fr 1fr; 
  gap: 2.5rem;
  margin-top: 1.5rem;
}

.cv { 
  margin: 0.5rem 0; 
  padding-left: 1.5rem;
}

.cv li {
  margin: 0.5rem 0;
  line-height: 1.7;
}

/* Quote */
.quote {
  margin: 0;
  padding: 2rem;
  border-left: 4px solid var(--primary);
  background: var(--glass-bg);
  backdrop-filter: blur(20px);
  border-radius: 20px;
  position: relative;
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.quote:hover {
  transform: translateX(8px);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.15);
}

.quote p { 
  margin: 0 0 1rem 0;
  font-style: italic;
  font-size: 1.05rem;
  line-height: 1.8;
  position: relative;
  z-index: 1;
}

.quote cite { 
  color: var(--muted);
  font-style: normal;
  font-weight: 600;
  font-size: 0.9rem;
  position: relative;
  z-index: 1;
}

/* Press cards */
.press-cards { 
  display: grid; 
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); 
  gap: 1.5rem;
}

.press-card { 
  background: var(--glass-bg);
  backdrop-filter: blur(20px);
  border: 1px solid var(--glass-border);
  border-radius: 20px; 
  padding: 2rem;
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.press-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.2);
  background: color-mix(in oklab, var(--glass-bg) 90%, var(--primary) 10%);
}

.press-card h3 {
  margin-top: 0;
  font-size: 1.3rem;
}

/* Contact */
.contact-list { 
  list-style: none; 
  padding: 0; 
  margin: 0 0 1.5rem 0; 
  display: grid; 
  gap: 0.75rem;
}

.contact-list li {
  font-size: 1.05rem;
  line-height: 1.7;
}

@media (width <= 640px) {
  .contact-list {
    gap: 0.5rem;
    margin-bottom: 1.25rem;
  }
  
  .contact-list li {
    font-size: 0.95rem;
    line-height: 1.6;
  }
  
  .contact-list a {
    display: inline-block;
    min-height: 44px;
    padding: 0.5rem 0;
    touch-action: manipulation;
  }
}

.cta { 
  display: flex; 
  gap: 1rem; 
  flex-wrap: wrap;
  margin-top: 2rem;
}

@media (width <= 640px) {
  .cta {
    flex-direction: column;
    gap: 0.75rem;
    margin-top: 1.5rem;
  }
  
  .cta .btn {
    width: 100%;
  }
}

.link { 
  color: var(--primary); 
  text-underline-offset: 4px;
  text-decoration-thickness: 2px;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  touch-action: manipulation;
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  -webkit-tap-highlight-color: transparent;
}

.link:hover { 
  color: var(--primary-glow);
  text-decoration: underline;
  text-decoration-color: var(--primary-glow);
}

/* Footer */
.site-footer { 
  border-top: 1px solid var(--border); 
  padding: 2.5rem 0; 
  background: var(--glass-bg);
  backdrop-filter: blur(20px);
  margin-top: 3rem;
}

.footer-grid { 
  display: grid; 
  grid-template-columns: 1fr auto auto; 
  gap: 2rem; 
  align-items: center;
}

.brand-small { 
  font-weight: 700;
  font-size: 1.1rem;
}

.footer-nav { 
  display: flex; 
  gap: 1.5rem; 
  list-style: none; 
  margin: 0; 
  padding: 0;
}

.footer-nav a {
  color: var(--muted);
  text-decoration: none;
  transition: color 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.footer-nav a:hover {
  color: var(--primary);
}

.legal { 
  display: flex; 
  gap: 0.75rem; 
  align-items: center; 
  color: var(--muted);
  font-size: 0.9rem;
}

.legal a {
  color: var(--muted);
  text-decoration: none;
  transition: color 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.legal a:hover {
  color: var(--primary);
}

/* Lightbox */
.lightbox { 
  position: fixed; 
  inset: 0; 
  background: rgba(0, 0, 0, 0.95); 
  backdrop-filter: blur(20px);
  display: none; 
  align-items: center; 
  justify-content: center; 
  padding: 2rem; 
  z-index: 100;
  animation: fadeIn 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  touch-action: manipulation;
}

@media (width <= 640px) {
  .lightbox {
    padding: 1rem;
  }
}

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

.lightbox.open { 
  display: flex;
}

.lightbox-image { 
  max-width: min(92vw, 1400px); 
  max-height: 86vh; 
  border-radius: 0; 
  box-shadow: 0 20px 80px rgba(0, 0, 0, 0.8);
  animation: scaleIn 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  object-fit: contain;
  /* Prevent image from being too small on mobile */
  min-width: 200px;
  /* Smooth rendering */
  image-rendering: high-quality;
}

@media (width <= 768px) {
  .lightbox-image {
    max-width: 96vw;
    max-height: 85vh;
    border-radius: 0;
    /* Touch-friendly: allow pinch zoom */
    touch-action: pinch-zoom;
  }
}

@media (width <= 640px) {
  .lightbox-image {
    max-width: 100vw;
    max-height: 90vh;
    border-radius: 0;
  }
}

@media (orientation: landscape) and (max-height: 600px) {
  .lightbox-image {
    max-height: 95vh;
  }
}

@keyframes scaleIn {
  from { 
    opacity: 0;
    transform: scale(0.9);
  }
  to { 
    opacity: 1;
    transform: scale(1);
  }
}

.lightbox-close { 
  position: absolute; 
  top: 2rem; 
  right: 2rem; 
  background: var(--glass-bg);
  backdrop-filter: blur(20px);
  border: 1px solid var(--glass-border);
  border-radius: 999px; 
  color: var(--text); 
  height: 50px; 
  width: 50px; 
  display: grid; 
  place-items: center;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  min-width: 44px;
  min-height: 44px;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
}

@media (width <= 640px) {
  .lightbox-close {
    top: 1rem;
    right: 1rem;
    height: 48px;
    width: 48px;
    z-index: 102;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(20px);
    border: 2px solid rgba(255, 255, 255, 0.2);
  }
}

.lightbox-close:hover {
  transform: rotate(90deg) scale(1.1);
  background: var(--primary);
  color: var(--primary-contrast);
}

/* Lightbox navigation */
.lightbox-prev,
.lightbox-next {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: var(--glass-bg);
  backdrop-filter: blur(20px);
  border: 1px solid var(--glass-border);
  border-radius: 999px;
  color: var(--text);
  height: 56px;
  width: 56px;
  display: grid;
  place-items: center;
  cursor: pointer;
  z-index: 101;
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  min-width: 44px;
  min-height: 44px;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
}

.lightbox-prev { left: 1.25rem; }
.lightbox-next { right: 1.25rem; }

.lightbox-prev:hover,
.lightbox-next:hover {
  transform: translateY(-50%) scale(1.08);
  background: var(--primary);
  color: var(--primary-contrast);
}

/* Hide navigation buttons on mobile/tablet since swipe gestures are supported */
@media (width <= 768px) {
  .lightbox-prev,
  .lightbox-next {
    display: none;
  }
}

/* Reveal animations */
[data-reveal] {
  opacity: 0;
  transition: all 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

[data-reveal="fade-up"] {
  transform: translateY(40px);
}

[data-reveal="fade-down"] {
  transform: translateY(-40px);
}

[data-reveal="fade-left"] {
  transform: translateX(-40px);
}

[data-reveal="fade-right"] {
  transform: translateX(40px);
}

[data-reveal].revealed {
  opacity: 1;
  transform: translate(0, 0);
}

/* Utilities */
.muted { 
  color: var(--muted);
}

.sr-only { 
  position: absolute; 
  width: 1px; 
  height: 1px; 
  padding: 0; 
  margin: -1px; 
  overflow: hidden; 
  clip: rect(0,0,0,0); 
  white-space: nowrap; 
  border: 0;
}

/* Responsive design */
@media (width <= 1024px) {
  :root {
    --header-height: clamp(62px, 9vh, 84px);
    --hero-padding-y: clamp(1.5rem, 7vh, 2.75rem);
  }

  .hero-inner {
    grid-template-columns: 1fr;
    gap: 2rem;
    max-width: 100%;
    align-items: center;
    justify-items: center;
  }
  
  .two-col {
    grid-template-columns: 1fr;
    gap: 2rem;
  }
  
  .cv-grid {
    grid-template-columns: 1fr;
  }
}

@media (width <= 768px) {
  :root {
    --header-height: clamp(58px, 10vh, 76px);
    --hero-padding-y: clamp(1.25rem, 7vh, 2.25rem);
  }

  .nav-toggle { 
    display: inline-flex;
    cursor: pointer;
    position: relative;
    z-index: 1002;
  }
  
  .nav-list { 
    position: fixed; 
    right: 1rem; 
    top: 70px; 
    flex-direction: column; 
    background: var(--glass-bg);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--glass-border);
    border-radius: 16px; 
    padding: 1rem; 
    display: none;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.3);
    min-width: 200px;
    z-index: 9999;
    max-width: calc(100vw - 2rem);
  }
  
  .nav-list.open { 
    display: flex;
  }
  
  .nav-list a {
    width: 100%;
    position: relative;
    z-index: 1;
    pointer-events: auto;
    cursor: pointer;
  }
  
  .nav-list button {
    pointer-events: auto;
    cursor: pointer;
  }
  
  .footer-grid {
    grid-template-columns: 1fr;
    justify-items: start;
    gap: 1.5rem;
  }
  
  .footer-nav {
    flex-direction: column;
    gap: 0.75rem;
  }
  
  .hero-inner {
    gap: 1.5rem;
  }
  
  .section {
    padding: 3rem 0;
  }
}

@media (width <= 640px) {
  html, body {
    overflow-x: hidden;
    max-width: 100vw;
    width: 100%;
  }
  
  .hero h1 {
    font-size: clamp(1.75rem, 8vw, 2.5rem);
    margin-bottom: 1rem;
  }
  
  .section-head h2 {
    font-size: clamp(1.5rem, 6vw, 2rem);
  }
  
  .section-head .muted {
    font-size: 0.95rem;
  }
  
  .section {
    padding: 2.5rem 0;
    overflow-x: hidden;
  }
  
  .section-tight {
    padding: 2rem 0;
  }
  
  .hero {
    overflow-x: hidden;
  }
  
  .hero-inner {
    gap: 2rem;
    padding: 0;
  }
  
  .hero-copy {
    padding: 0;
    margin-bottom: 1rem;
  }
  
  .two-col {
    gap: 1.5rem;
  }
  
  .press-cards {
    grid-template-columns: 1fr;
    gap: 1rem;
  }
  
  .press-card {
    padding: 1.5rem;
  }
  
  .press-card h3 {
    font-size: 1.15rem;
  }
  
  .quote {
    padding: 1.5rem;
    border-radius: 16px;
  }
  
  .quote p {
    font-size: 1rem;
  }
  
  .cv-grid {
    gap: 1.5rem;
  }
  
  .cv {
    padding-left: 1.25rem;
  }
  
  .cv li {
    font-size: 0.95rem;
  }
  
  .feature-list {
    gap: 0.75rem;
  }
  
  .feature-list li {
    padding: 0.875rem;
  }
  
  .media-card .image-glow {
    min-height: 300px;
  }
  
  .footer-grid {
    gap: 1.25rem;
  }
  
  .site-footer {
    padding: 2rem 0;
  }
}

/* Smooth transitions for theme switching */
* {
  transition-property: background-color, border-color, color, fill, stroke;
  transition-duration: 0.3s;
  transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
}

[data-reveal], .btn, .gallery-item, .card, .press-card, .feature-list li {
  transition-property: all;
}

/* Magnetic button effect preparation */
.magnetic-btn {
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Jump to top button */
.jump-to-top {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  width: 56px;
  height: 56px;
  background: var(--glass-bg);
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  border: 1px solid var(--glass-border);
  border-radius: 999px;
  color: var(--text);
  display: grid;
  place-items: center;
  cursor: pointer;
  z-index: 9998;
  opacity: 0;
  visibility: hidden;
  transform: translateY(20px) scale(0.9);
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 
    0 4px 24px rgba(0, 0, 0, 0.1),
    inset 0 1px 0 rgba(255, 255, 255, 0.05);
  pointer-events: none;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
}

.jump-to-top.visible {
  opacity: 1;
  visibility: visible;
  transform: translateY(0) scale(1);
  pointer-events: auto;
}

.jump-to-top:hover {
  transform: translateY(-4px) scale(1.05);
  background: linear-gradient(135deg, var(--primary), var(--primary-glow));
  color: var(--primary-contrast);
  border-color: transparent;
  box-shadow: 
    0 12px 32px rgba(255, 107, 53, 0.4),
    inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

.jump-to-top:active {
  transform: translateY(-2px) scale(1);
}

.jump-to-top:focus-visible {
  outline: 3px solid var(--ring);
  outline-offset: 3px;
}

.jump-to-top svg {
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.jump-to-top:hover svg {
  transform: translateY(-2px);
}

@media (width <= 768px) {
  .jump-to-top {
    bottom: 1.5rem;
    right: 1.5rem;
    width: 48px;
    height: 48px;
    min-width: 44px;
    min-height: 44px;
  }
  
  .jump-to-top svg {
    width: 20px;
    height: 20px;
  }
}

/* Touch-specific optimizations */
@media (hover: none) and (pointer: coarse) {
  /* Disable hover effects on touch devices */
  .gallery-item:hover {
    transform: none;
  }
  
  .gallery-item:hover img {
    transform: none;
  }
  
  .gallery-item:hover .gallery-overlay {
    opacity: 0;
  }
  
  .card:hover,
  .press-card:hover,
  .feature-list li:hover {
    transform: none;
  }
  
  /* Reduce backdrop-filter on mobile for performance */
  .glass-card,
  .site-header,
  .lightbox-close,
  .lightbox-prev,
  .lightbox-next {
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
  }
  
  /* Simplify animations on touch devices */
  [data-reveal] {
    transition-duration: 0.4s;
  }
  
  /* Better touch targets for gallery items */
  .gallery-item {
    min-height: 44px;
    -webkit-tap-highlight-color: rgba(255, 107, 53, 0.1);
  }
  
  /* Optimize images for mobile performance */
  .gallery-item img,
  .hero-figure img {
    will-change: auto;
    transform: translateZ(0);
    -webkit-transform: translateZ(0);
  }
}

/* Additional mobile optimizations */
@media (width <= 480px) {
  :root {
    --hero-padding-y: clamp(1rem, 9vh, 1.75rem);
  }
  
  .section {
    padding: 2rem 0;
  }
  
  .section-tight {
    padding: 1.5rem 0;
  }
  
  .header-row {
    padding: 0.75rem 0;
  }
  
  .hero-actions .btn {
    font-size: 0.95rem;
    padding: 0 20px;
  }
}

/* Progressive image loading states */
.gallery-item img[data-lazy-state="pending"] {
  opacity: 0;
}

.gallery-item img[data-lazy-state="loading"] {
  opacity: 0.75;
  filter: blur(12px) saturate(0.9);
  transform: scale(1.01);
}

.gallery-item img.loaded,
.gallery-item img[data-lazy-state="loaded"],
.gallery-item img[loading="eager"],
.gallery-item img[data-lazy-state="ready"] {
  opacity: 1;
  filter: blur(0) saturate(1);
  transform: scale(1);
}

/* Placeholder for loading images */
.gallery-item-inner::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(
    135deg, 
    var(--surface) 0%, 
    color-mix(in oklab, var(--surface) 95%, var(--primary) 5%) 50%,
    var(--surface) 100%
  );
  background-size: 200% 200%;
  animation: shimmer 2s infinite;
  opacity: 0;
  transform: scale(1.05);
  transition: opacity 0.45s ease, transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
  pointer-events: none;
  z-index: 1;
}

.gallery-item-inner:has(img[data-lazy-state="pending"])::before,
.gallery-item-inner:has(img[data-lazy-state="loading"])::before {
  opacity: 1;
  transform: scale(1);
}

@keyframes shimmer {
  0% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

/* Lightbox swipe indicator for mobile */
@media (width <= 768px) {
  .lightbox::after {
    content: 'Swipe für nächstes Bild';
    position: absolute;
    bottom: 2rem;
    left: 50%;
    transform: translateX(-50%);
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.875rem;
    pointer-events: none;
    opacity: 0;
    animation: fadeInOut 3s ease-in-out;
    animation-delay: 1s;
  }
  
  @keyframes fadeInOut {
    0%, 100% { opacity: 0; }
    20%, 80% { opacity: 1; }
  }
}
