/* ══════════════════════════════════════════════════════════════
   TN PROJECT — Design System
   Dual Theme: Dark (default) + Light
   Color DNA: Navy Deep-Space + Teal Neon + Electric Blue
   ══════════════════════════════════════════════════════════════ */

@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;500;600;700;800;900&family=Inter:wght@300;400;500;600&display=swap');

/* ─── CSS Variables — Dark Theme (default) ─────────────────── */
:root {
  /* Backgrounds */
  --bg-base:       #050B18;
  --bg-surface:    #0A1628;
  --bg-card:       #0F1F3D;
  --bg-glass:      rgba(15, 31, 61, 0.55);
  --bg-glass-nav:  rgba(5, 11, 24, 0.75);

  /* Accent Colors — Teal Neon + Electric Blue */
  --accent-teal:   #00D4C8;
  --accent-blue:   #0099FF;
  --accent-grad:   linear-gradient(135deg, #00D4C8 0%, #0099FF 100%);
  --accent-grad-r: linear-gradient(135deg, #0099FF 0%, #00D4C8 100%);
  --glow-teal:     0 0 20px rgba(0, 212, 200, 0.35);
  --glow-blue:     0 0 20px rgba(0, 153, 255, 0.35);

  /* Text */
  --text-primary:   #E8F4FD;
  --text-secondary: #8BA5C4;
  --text-muted:     #4D6A8A;
  --text-invert:    #050B18;

  /* Borders */
  --border:         rgba(0, 212, 200, 0.12);
  --border-hover:   rgba(0, 212, 200, 0.4);
  --border-card:    rgba(0, 153, 255, 0.15);

  /* Shadows */
  --shadow-sm:  0 2px 8px rgba(0, 0, 0, 0.4);
  --shadow-md:  0 8px 32px rgba(0, 0, 0, 0.5);
  --shadow-lg:  0 20px 60px rgba(0, 0, 0, 0.6);
  --shadow-card: 0 4px 24px rgba(0, 153, 255, 0.08);

  /* Radius */
  --radius-sm:  8px;
  --radius-md:  14px;
  --radius-lg:  20px;
  --radius-xl:  30px;
  --radius-full: 9999px;

  /* Typography */
  --font-head: 'Outfit', sans-serif;
  --font-body: 'Inter', sans-serif;

  /* Transitions */
  --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-fast: all 0.15s ease;
  --transition-slow: all 0.6s cubic-bezier(0.4, 0, 0.2, 1);

  /* Blur */
  --blur-glass: blur(16px) saturate(180%);
}

/* ─── Light Theme ───────────────────────────────────────────── */
[data-theme="light"] {
  --bg-base:       #EEF3FF;
  --bg-surface:    #FFFFFF;
  --bg-card:       #F5F8FF;
  --bg-glass:      rgba(255, 255, 255, 0.7);
  --bg-glass-nav:  rgba(238, 243, 255, 0.85);

  --accent-teal:   #00A89E;
  --accent-blue:   #0077CC;
  --accent-grad:   linear-gradient(135deg, #00A89E 0%, #0077CC 100%);
  --accent-grad-r: linear-gradient(135deg, #0077CC 0%, #00A89E 100%);
  --glow-teal:     0 0 20px rgba(0, 168, 158, 0.2);
  --glow-blue:     0 0 20px rgba(0, 119, 204, 0.2);

  --text-primary:   #0A1628;
  --text-secondary: #3A5070;
  --text-muted:     #7A95B5;
  --text-invert:    #FFFFFF;

  --border:         rgba(0, 168, 158, 0.15);
  --border-hover:   rgba(0, 168, 158, 0.45);
  --border-card:    rgba(0, 119, 204, 0.15);

  --shadow-sm:  0 2px 8px rgba(0, 50, 100, 0.08);
  --shadow-md:  0 8px 32px rgba(0, 50, 100, 0.12);
  --shadow-lg:  0 20px 60px rgba(0, 50, 100, 0.15);
  --shadow-card: 0 4px 24px rgba(0, 119, 204, 0.1);
}

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

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

body {
  font-family: var(--font-body);
  background-color: var(--bg-base);
  color: var(--text-primary);
  line-height: 1.6;
  overflow-x: hidden;
  transition: background-color 0.4s ease, color 0.4s ease;
}

a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
ul { list-style: none; }
button { cursor: pointer; border: none; background: none; font-family: inherit; }

/* ─── Scrollbar ─────────────────────────────────────────────── */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: var(--bg-base); }
::-webkit-scrollbar-thumb {
  background: var(--accent-teal);
  border-radius: var(--radius-full);
}

/* ─── Typography ────────────────────────────────────────────── */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-head);
  font-weight: 700;
  line-height: 1.2;
  color: var(--text-primary);
}

.gradient-text {
  background: var(--accent-grad);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* ─── Section Layout ────────────────────────────────────────── */
.section {
  padding: 100px 0;
  position: relative;
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
}

.section-header {
  text-align: center;
  margin-bottom: 64px;
}

.section-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 18px;
  border: 1px solid var(--border);
  border-radius: var(--radius-full);
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--accent-teal);
  margin-bottom: 16px;
  background: rgba(0, 212, 200, 0.06);
}

.section-title {
  font-size: clamp(2rem, 4vw, 2.8rem);
  font-weight: 800;
  margin-bottom: 16px;
}

.section-subtitle {
  font-size: 1.1rem;
  color: var(--text-secondary);
  max-width: 600px;
  margin: 0 auto;
}

/* ─── Buttons ───────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 14px 28px;
  border-radius: var(--radius-full);
  font-family: var(--font-body);
  font-size: 0.95rem;
  font-weight: 600;
  transition: var(--transition);
  position: relative;
  overflow: hidden;
}

.btn-primary {
  background: var(--accent-grad);
  color: #fff;
  box-shadow: var(--glow-teal);
}
.btn-primary:hover {
  transform: translateY(-2px) scale(1.02);
  box-shadow: 0 0 30px rgba(0, 212, 200, 0.5);
}

.btn-outline {
  background: transparent;
  color: var(--text-primary);
  border: 1.5px solid var(--border-hover);
}
.btn-outline:hover {
  background: var(--bg-glass);
  border-color: var(--accent-teal);
  color: var(--accent-teal);
  transform: translateY(-2px);
}

/* ─── Glass Card ────────────────────────────────────────────── */
.glass-card {
  background: var(--bg-glass);
  border: 1px solid var(--border-card);
  border-radius: var(--radius-lg);
  backdrop-filter: var(--blur-glass);
  -webkit-backdrop-filter: var(--blur-glass);
  box-shadow: var(--shadow-card);
  transition: var(--transition);
}
.glass-card:hover {
  border-color: var(--border-hover);
  box-shadow: var(--shadow-md), var(--glow-teal);
  transform: translateY(-4px);
}

/* ─── LOADING SCREEN ────────────────────────────────────────── */
#loading-screen {
  position: fixed;
  inset: 0;
  background: rgba(5, 11, 24, 0.45);
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  transition: opacity 0.7s ease, visibility 0.7s ease, backdrop-filter 0.7s ease;
}

[data-theme="light"] #loading-screen {
  background: rgba(238, 243, 255, 0.45);
}

#loading-screen.hide {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  backdrop-filter: blur(0px);
  -webkit-backdrop-filter: blur(0px);
}

.uiverse-loader-container {
  display: flex;
  justify-content: center;
  align-items: center;
  height: 90%;
}

.uiverse-loader-item {
  position: absolute;
  background-color: transparent;
  width: calc(var(--i) * 2.5vmin);
  aspect-ratio: 1;
  border-radius: 50%;
  border: .9vmin solid rgb(0, 200, 255);
  transform-style: preserve-3d;
  transform: rotateX(70deg) translateZ(50px);
  animation: my-move 3s ease-in-out calc(var(--i) * 0.08s) infinite;
  box-shadow: 0px 0px 15px rgb(124, 124, 124),
    inset 0px 0px 15px rgb(124, 124, 124);
}

@keyframes my-move {
  0%,
  100% {
    transform: rotateX(70deg) translateZ(50px) translateY(0px);
    filter: hue-rotate(0deg);
  }

  50% {
    transform: rotateX(70deg) translateZ(50px) translateY(-50vmin);
    filter: hue-rotate(180deg);
  }
}

/* ─── NAVBAR ────────────────────────────────────────────────── */
#navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  padding: 20px 0;
  transition: var(--transition);
}

#navbar.scrolled {
  background: var(--bg-glass-nav);
  backdrop-filter: var(--blur-glass);
  -webkit-backdrop-filter: var(--blur-glass);
  border-bottom: 1px solid var(--border);
  padding: 12px 0;
  box-shadow: var(--shadow-sm);
}

.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.nav-logo {
  display: flex;
  align-items: center;
  gap: 10px;
}

.nav-logo img {
  height: 38px;
  width: auto;
  transition: var(--transition);
}
[data-theme="dark"] .nav-logo img {
  filter: drop-shadow(0 0 8px rgba(0, 212, 200, 0.25));
}

.nav-logo-text {
  font-family: var(--font-head);
  font-size: 1.15rem;
  font-weight: 800;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 8px;
}

.nav-link {
  padding: 8px 16px;
  border-radius: var(--radius-full);
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text-secondary);
  transition: var(--transition-fast);
}
.nav-link:hover {
  color: var(--text-primary);
  background: var(--bg-glass);
}
.nav-link.active {
  color: var(--accent-teal);
}

/* Light theme nav links lebih gelap agar terbaca */
[data-theme="light"] .nav-link {
  color: #1A202C;
  font-weight: 600;
}
[data-theme="light"] .nav-link:hover {
  color: var(--accent-teal);
  background: rgba(0, 212, 200, 0.08);
}
[data-theme="light"] .nav-logo-text {
  color: #1A202C;
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

/* Theme Toggle */
.theme-toggle {
  width: 44px;
  height: 44px;
  border-radius: var(--radius-full);
  background: var(--bg-glass);
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  transition: var(--transition-fast);
  color: var(--text-secondary);
}
.theme-toggle:hover {
  border-color: var(--accent-teal);
  color: var(--accent-teal);
  transform: rotate(20deg);
}

/* Bottom Nav (Mobile) */
.bottom-nav {
  display: none; /* hidden on desktop */
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: var(--bg-glass-nav);
  backdrop-filter: var(--blur-glass);
  -webkit-backdrop-filter: var(--blur-glass);
  border-top: 1px solid var(--border);
  z-index: 1000;
  padding: 12px 16px;
  justify-content: space-around;
  align-items: center;
  box-shadow: 0 -4px 20px rgba(0,0,0,0.1);
  padding-bottom: calc(12px + env(safe-area-inset-bottom));
}

.bottom-nav-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 0.65rem;
  font-weight: 600;
  transition: var(--transition-fast);
}

.bottom-nav-item i {
  font-size: 1.4rem;
  margin-bottom: 2px;
}

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

[data-theme="light"] .bottom-nav-item {
  color: #4A5568;
}
[data-theme="light"] .bottom-nav-item.active,
[data-theme="light"] .bottom-nav-item:hover {
  color: var(--accent-teal);
}

/* ─── HERO SECTION ──────────────────────────────────────────── */
#hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  padding-top: 90px;
  position: relative;
  overflow: hidden;
}

.hero-bg {
  position: absolute;
  inset: 0;
  overflow: hidden;
}

/* ─── Hero Video Background ─────────────────────────────── */
.hero-video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: 0;
  pointer-events: none;
}

/* Overlay — dark theme: lebih gelap, light theme: lebih terang */
.hero-video-overlay {
  position: absolute;
  inset: 0;
  z-index: 1;
  background: linear-gradient(
    135deg,
    rgba(5, 11, 24, 0.75) 0%,
    rgba(10, 22, 40, 0.55) 50%,
    rgba(5, 11, 24, 0.70) 100%
  );
  backdrop-filter: blur(1px);
}

[data-theme="light"] .hero-video-overlay {
  background: linear-gradient(
    160deg,
    rgba(248, 251, 255, 0.93) 0%,
    rgba(235, 245, 255, 0.88) 40%,
    rgba(248, 251, 255, 0.93) 100%
  );
  backdrop-filter: blur(2px);
}

/* Pastikan orbs dan particles di atas overlay */
.hero-orb,
#particles-canvas {
  z-index: 2;
}

/* Hero content juga di atas overlay */
#hero .container {
  position: relative;
  z-index: 3;
}

/* Scroll indicator di atas semua */
.scroll-indicator {
  position: absolute;
  z-index: 3;
}


/* Animated circuit/mesh background */
.hero-orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(80px);
  opacity: 0.15;
  animation: orbFloat 8s ease-in-out infinite;
}
.hero-orb-1 {
  width: 500px; height: 500px;
  background: radial-gradient(circle, #00D4C8, transparent 70%);
  top: -150px; right: -100px;
  animation-delay: 0s;
}
.hero-orb-2 {
  width: 400px; height: 400px;
  background: radial-gradient(circle, #0099FF, transparent 70%);
  bottom: -100px; left: -100px;
  animation-delay: 3s;
}
.hero-orb-3 {
  width: 250px; height: 250px;
  background: radial-gradient(circle, #00D4C8, transparent 70%);
  top: 40%; left: 30%;
  animation-delay: 5s;
}

@keyframes orbFloat {
  0%, 100% { transform: translate(0, 0) scale(1); }
  33%       { transform: translate(20px, -30px) scale(1.05); }
  66%       { transform: translate(-15px, 20px) scale(0.95); }
}

/* Grid overlay */
.hero-grid {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(var(--border) 1px, transparent 1px),
    linear-gradient(90deg, var(--border) 1px, transparent 1px);
  background-size: 60px 60px;
  opacity: 0.4;
}

/* Particles canvas */
#particles-canvas {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.hero-columns {
  display: grid;
  grid-template-columns: 1fr 1fr;
  align-items: center;
  gap: 40px;
  position: relative;
  z-index: 2;
}

.hero-content {
  position: relative;
  max-width: 720px;
}

/* ─── Hero Mockups ─── */
.hero-mockup {
  position: relative;
  height: 450px;
  display: flex;
  justify-content: center;
  align-items: center;
  perspective: 1200px;
}

.mockup-laptop {
  position: absolute;
  width: 480px;
  height: 300px;
  background: #1e293b;
  border-radius: 12px 12px 0 0;
  border: 4px solid #334155;
  border-bottom: none;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
  transform: rotateY(-15deg) rotateX(5deg);
  animation: floatLaptop 6s ease-in-out infinite;
  display: flex;
  justify-content: center;
}

.mockup-laptop::after {
  content: '';
  position: absolute;
  bottom: -15px;
  width: 110%;
  height: 15px;
  background: #475569;
  border-radius: 0 0 12px 12px;
  left: -5%;
  border: 1px solid #64748b;
  box-shadow: inset 0 2px 5px rgba(255,255,255,0.1);
}

.laptop-screen {
  width: 100%;
  height: 100%;
  background: #0f172a;
  overflow: hidden;
  border-radius: 6px 6px 0 0;
  position: relative;
}

.laptop-screen img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top;
  border-radius: 6px 6px 0 0;
}

.mockup-mobile {
  position: absolute;
  right: -20px;
  bottom: 10px;
  width: 150px;
  height: 300px;
  background: #1e293b;
  border-radius: 24px;
  border: 8px solid #334155;
  box-shadow: -15px 25px 40px rgba(0, 0, 0, 0.6);
  transform: rotateY(-10deg) rotateZ(-3deg);
  animation: floatMobile 7s ease-in-out infinite 1s;
  z-index: 5;
}

.mobile-screen {
  width: 100%;
  height: 100%;
  background: #0f172a;
  overflow: hidden;
  border-radius: 14px;
}

.mobile-screen img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Light Theme Adjustments */
[data-theme="light"] .mockup-laptop {
  background: #e2e8f0;
  border-color: #cbd5e1;
  box-shadow: 0 25px 50px -12px rgba(100, 116, 139, 0.3);
}
[data-theme="light"] .mockup-laptop::after {
  background: #cbd5e1;
  border-color: #94a3b8;
  box-shadow: inset 0 2px 5px rgba(255,255,255,0.4);
}
[data-theme="light"] .mockup-mobile {
  background: #e2e8f0;
  border-color: #cbd5e1;
  box-shadow: -15px 25px 40px rgba(100, 116, 139, 0.3);
}

@keyframes floatLaptop {
  0%, 100% { transform: translateY(0) rotateY(-15deg) rotateX(5deg); }
  50% { transform: translateY(-15px) rotateY(-12deg) rotateX(3deg); }
}

@keyframes floatMobile {
  0%, 100% { transform: translateY(0) rotateY(-10deg) rotateZ(-3deg); }
  50% { transform: translateY(-20px) rotateY(-15deg) rotateZ(0deg); }
}


.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 20px;
  background: rgba(0, 212, 200, 0.08);
  border: 1px solid rgba(0, 212, 200, 0.3);
  border-radius: var(--radius-full);
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--accent-teal);
  margin-bottom: 24px;
  animation: fadeUp 0.6s 0.2s ease both;
}

.hero-badge::before {
  content: '';
  width: 7px; height: 7px;
  border-radius: 50%;
  background: var(--accent-teal);
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50%       { opacity: 0.5; transform: scale(1.5); }
}

.hero-title {
  font-size: clamp(2.8rem, 7vw, 5rem);
  font-weight: 900;
  line-height: 1.08;
  margin-bottom: 24px;
  animation: fadeUp 0.6s 0.3s ease both;
}

.hero-title .line-2 {
  display: block;
  background: var(--accent-grad);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero-desc {
  font-size: 1.1rem;
  color: var(--text-secondary);
  max-width: 560px;
  margin-bottom: 40px;
  line-height: 1.7;
  animation: fadeUp 0.6s 0.4s ease both;
}

/* Di light theme, desc harus kontras dengan bg terang */
[data-theme="light"] .hero-desc {
  color: #2D3748;
  font-weight: 500;
}

.hero-cta {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
  animation: fadeUp 0.6s 0.5s ease both;
}

.hero-stats {
  display: flex;
  gap: 40px;
  margin-top: 56px;
  animation: fadeUp 0.6s 0.6s ease both;
}

.stat-item { text-align: left; }
.stat-num {
  font-family: var(--font-head);
  font-size: 2rem;
  font-weight: 900;
  background: var(--accent-grad);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  line-height: 1;
  margin-bottom: 4px;
}
.stat-label {
  font-size: 0.8rem;
  color: var(--text-muted);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

[data-theme="light"] .stat-label {
  color: #4A5568;
  font-weight: 700;
}

/* Scroll indicator */
.scroll-indicator {
  position: absolute;
  bottom: 36px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  color: var(--text-muted);
  font-size: 0.75rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  animation: fadeUp 0.6s 1s ease both;
}
.scroll-mouse {
  width: 24px; height: 36px;
  border: 2px solid var(--border-hover);
  border-radius: 12px;
  display: flex;
  justify-content: center;
  padding-top: 6px;
}
.scroll-mouse-dot {
  width: 3px; height: 7px;
  background: var(--accent-teal);
  border-radius: 3px;
  animation: scrollDot 1.8s ease infinite;
}
@keyframes scrollDot {
  0%   { transform: translateY(0); opacity: 1; }
  100% { transform: translateY(10px); opacity: 0; }
}

/* ─── SERVICES SECTION ──────────────────────────────────────── */
.services-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 24px;
}

.service-card {
  padding: 32px;
  position: relative;
  overflow: hidden;
}

.service-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
  background: var(--accent-grad);
  opacity: 0;
  transition: var(--transition);
}
.service-card:hover::before { opacity: 1; }

.service-icon-wrap {
  width: 60px; height: 60px;
  border-radius: var(--radius-md);
  background: rgba(0, 212, 200, 0.08);
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 20px;
  font-size: 1.6rem;
  transition: var(--transition);
}
.service-card:hover .service-icon-wrap {
  background: rgba(0, 212, 200, 0.15);
  border-color: var(--accent-teal);
  box-shadow: var(--glow-teal);
  transform: scale(1.08);
}

.service-badge {
  display: inline-block;
  padding: 3px 10px;
  background: var(--accent-grad);
  border-radius: var(--radius-full);
  font-size: 0.7rem;
  font-weight: 700;
  color: #fff;
  margin-bottom: 12px;
  letter-spacing: 0.05em;
}

.service-title {
  font-size: 1.15rem;
  font-weight: 700;
  margin-bottom: 10px;
}

.service-desc {
  font-size: 0.9rem;
  color: var(--text-secondary);
  line-height: 1.65;
}

/* ─── PORTFOLIO SECTION ─────────────────────────────────────── */
#portfolio { background: var(--bg-surface); }
[data-theme="light"] #portfolio { background: #F5F8FF; }

.portfolio-filter {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin-bottom: 40px;
  flex-wrap: wrap;
}

.filter-btn {
  padding: 9px 22px;
  border-radius: var(--radius-full);
  font-size: 0.85rem;
  font-weight: 600;
  border: 1px solid var(--border);
  color: var(--text-secondary);
  transition: var(--transition-fast);
}
.filter-btn:hover,
.filter-btn.active {
  background: var(--accent-grad);
  color: #fff;
  border-color: transparent;
  box-shadow: var(--glow-teal);
}

.projects-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
  gap: 24px;
}

.project-card {
  overflow: hidden;
  position: relative;
}

.project-thumb {
  position: relative;
  height: 200px;
  overflow: hidden;
  border-radius: var(--radius-md) var(--radius-md) 0 0;
  background: var(--bg-card);
}

.project-thumb-inner {
  width: 100%; height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, var(--bg-card), var(--bg-surface));
  transition: var(--transition);
}
.project-card:hover .project-thumb-inner { transform: scale(1.05); }

.project-thumb-icon {
  font-size: 3.5rem;
  opacity: 0.5;
}

.project-category-badge {
  position: absolute;
  top: 12px; left: 12px;
  padding: 4px 12px;
  border-radius: var(--radius-full);
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.badge-web     { background: rgba(0, 212, 200, 0.15); color: var(--accent-teal); border: 1px solid rgba(0, 212, 200, 0.3); }
.badge-android { background: rgba(0, 153, 255, 0.15); color: var(--accent-blue); border: 1px solid rgba(0, 153, 255, 0.3); }

.featured-badge {
  position: absolute;
  top: 12px; right: 12px;
  padding: 4px 10px;
  background: var(--accent-grad);
  border-radius: var(--radius-full);
  font-size: 0.65rem;
  font-weight: 700;
  color: #fff;
  letter-spacing: 0.08em;
}

.project-body { padding: 24px; }
.project-title {
  font-size: 1.05rem;
  font-weight: 700;
  margin-bottom: 8px;
}
.project-desc {
  font-size: 0.86rem;
  color: var(--text-secondary);
  line-height: 1.6;
  margin-bottom: 16px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.project-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 20px;
}
.project-tag {
  padding: 4px 10px;
  background: var(--bg-base);
  border: 1px solid var(--border);
  border-radius: var(--radius-full);
  font-size: 0.72rem;
  font-weight: 500;
  color: var(--text-secondary);
}

.project-links { display: flex; gap: 10px; }
.project-link {
  flex: 1;
  text-align: center;
  padding: 9px;
  border-radius: var(--radius-sm);
  font-size: 0.82rem;
  font-weight: 600;
  border: 1px solid var(--border);
  color: var(--text-secondary);
  transition: var(--transition-fast);
}
.project-link:hover {
  border-color: var(--accent-teal);
  color: var(--accent-teal);
  background: rgba(0, 212, 200, 0.06);
}
.project-link.primary {
  background: var(--accent-grad);
  color: #fff;
  border-color: transparent;
}

/* ─── CLIENTS SECTION ───────────────────────────────────────── */
.clients-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 20px;
}

.client-card {
  padding: 28px;
  display: flex;
  align-items: center;
  gap: 16px;
}

.client-logo-placeholder {
  width: 52px; height: 52px;
  flex-shrink: 0;
  border-radius: var(--radius-md);
  background: var(--accent-grad);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-head);
  font-size: 1.2rem;
  font-weight: 900;
  color: #fff;
}

.client-info {}
.client-name { font-size: 0.95rem; font-weight: 700; margin-bottom: 4px; }
.client-industry { font-size: 0.78rem; color: var(--text-muted); }
.client-collab { font-size: 0.82rem; color: var(--text-secondary); margin-top: 4px; }

/* ─── TECH STACK SECTION ────────────────────────────────────── */
#tech-stack { background: var(--bg-surface); overflow: hidden; }
[data-theme="light"] #tech-stack { background: #F5F8FF; }

.marquee-wrapper {
  position: relative;
  overflow: hidden;
  padding: 20px 0;
}

.marquee-wrapper::before,
.marquee-wrapper::after {
  content: '';
  position: absolute;
  top: 0; bottom: 0;
  width: 120px;
  z-index: 2;
}
.marquee-wrapper::before {
  left: 0;
  background: linear-gradient(to right, var(--bg-surface), transparent);
}
.marquee-wrapper::after {
  right: 0;
  background: linear-gradient(to left, var(--bg-surface), transparent);
}

.marquee-track {
  display: flex;
  gap: 20px;
  width: max-content;
  animation: marqueeScroll 180s linear infinite; /* Slower animation */
}
.marquee-track:hover { animation-play-state: paused; }

.marquee-content {
  display: flex;
  gap: 20px;
  flex-shrink: 0;
}

@keyframes marqueeScroll {
  from { transform: translateX(0); }
  to   { transform: translateX(calc(-50% - 10px)); }
}

.tech-pill {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 24px;
  background: var(--bg-glass);
  border: 1px solid var(--border);
  border-radius: var(--radius-full);
  backdrop-filter: var(--blur-glass);
  white-space: nowrap;
  transition: var(--transition-fast);
}
.tech-pill:hover {
  border-color: var(--accent-teal);
  box-shadow: var(--glow-teal);
  transform: translateY(-2px);
}

.tech-pill img {
  width: 28px; height: 28px;
  object-fit: contain;
}

.tech-pill-name {
  font-size: 1rem;
  font-weight: 600;
  color: var(--text-primary);
}

/* ─── CONTACT SECTION ───────────────────────────────────────── */
.contact-layout {
  display: grid;
  grid-template-columns: 1fr 1.2fr;
  gap: 48px;
  align-items: start;
}

.contact-info h3 {
  font-size: 1.8rem;
  font-weight: 800;
  margin-bottom: 12px;
}
.contact-info p {
  color: var(--text-secondary);
  margin-bottom: 32px;
  line-height: 1.7;
}

.contact-items { display: flex; flex-direction: column; gap: 16px; }
.contact-item {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 16px 20px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
  background: var(--bg-glass);
  transition: var(--transition-fast);
}
.contact-item:hover { 
  border-color: var(--accent-teal); 
  transform: translateY(-2px);
  background: var(--bg-card);
}
.contact-item:hover .action-text i {
  transform: translateX(5px);
  color: var(--accent-teal);
}
.contact-item-icon {
  width: 40px; height: 40px;
  border-radius: var(--radius-sm);
  background: rgba(0, 212, 200, 0.08);
  display: flex; align-items: center; justify-content: center;
  font-size: 1.1rem; color: var(--accent-teal);
  flex-shrink: 0;
  transition: var(--transition-fast);
}
.contact-item:hover .contact-item-icon {
  background: var(--accent-teal);
  color: white;
}
.contact-item-text { font-size: 0.9rem; color: var(--text-secondary); margin-bottom: 2px; }
.contact-item-val { font-size: 0.95rem; font-weight: 600; color: var(--text-primary); }
.action-text {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--accent-teal);
  transition: var(--transition-fast);
}
.action-text i {
  transition: transform 0.3s ease, color 0.3s ease;
}

/* Contact Form */
.contact-form { display: flex; flex-direction: column; gap: 16px; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.form-group { display: flex; flex-direction: column; gap: 6px; }
.form-label {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text-secondary);
  letter-spacing: 0.03em;
}
.form-input, .form-textarea {
  padding: 13px 16px;
  background: var(--bg-glass);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  color: var(--text-primary);
  font-family: var(--font-body);
  font-size: 0.9rem;
  transition: var(--transition-fast);
  outline: none;
}
.form-input:focus, .form-textarea:focus {
  border-color: var(--accent-teal);
  box-shadow: 0 0 0 3px rgba(0, 212, 200, 0.12);
}
.form-textarea { resize: vertical; min-height: 140px; }

/* ─── FOOTER ────────────────────────────────────────────────── */
footer {
  background: var(--bg-surface);
  border-top: 1px solid var(--border);
  padding: 48px 0 24px;
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 48px;
  margin-bottom: 40px;
}

.footer-brand {}
.footer-logo { display: flex; align-items: center; gap: 10px; margin-bottom: 12px; }
.footer-logo img { height: 32px; transition: var(--transition); }
[data-theme="dark"] .footer-logo img { filter: drop-shadow(0 0 6px rgba(0, 212, 200, 0.2)); }
.footer-logo-text { font-family: var(--font-head); font-weight: 800; }
.footer-desc { font-size: 0.88rem; color: var(--text-secondary); line-height: 1.65; }
.footer-socials { display: flex; gap: 10px; margin-top: 20px; }
.social-btn {
  width: 38px; height: 38px;
  border-radius: var(--radius-full);
  border: 1px solid var(--border);
  display: flex; align-items: center; justify-content: center;
  font-size: 0.9rem; color: var(--text-secondary);
  transition: var(--transition-fast);
}
.social-btn:hover {
  border-color: var(--accent-teal);
  color: var(--accent-teal);
  background: rgba(0, 212, 200, 0.08);
  transform: translateY(-2px);
}

.footer-col-title {
  font-size: 0.82rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-muted);
  margin-bottom: 16px;
}
.footer-links { display: flex; flex-direction: column; gap: 10px; }
.footer-link {
  font-size: 0.88rem;
  color: var(--text-secondary);
  transition: var(--transition-fast);
}
.footer-link:hover { color: var(--accent-teal); }

.footer-bottom {
  border-top: 1px solid var(--border);
  padding-top: 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
}
.footer-copy { font-size: 0.82rem; color: var(--text-muted); }

/* ─── ANIMATIONS ────────────────────────────────────────────── */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(24px); }
  to   { opacity: 1; transform: translateY(0); }
}

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

/* Scroll reveal */
.reveal {
  opacity: 0;
  transform: translateY(36px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}
.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}
.reveal-delay-1 { transition-delay: 0.1s; }
.reveal-delay-2 { transition-delay: 0.2s; }
.reveal-delay-3 { transition-delay: 0.3s; }
.reveal-delay-4 { transition-delay: 0.4s; }
.reveal-delay-5 { transition-delay: 0.5s; }

/* ─── RESPONSIVE ────────────────────────────────────────────── */

/* ── Tablet 1024px ─── */
@media (max-width: 1024px) {
  .hero-columns { grid-template-columns: 1fr; text-align: center; }
  .hero-mockup { display: none; }
  .hero-content { margin: 0 auto; }
  .hero-cta { justify-content: center; }
  .hero-stats { justify-content: center; }
  .contact-layout { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .projects-grid { grid-template-columns: repeat(2, 1fr); }
  .hero-title { font-size: clamp(2.2rem, 5vw, 3.5rem); }
}

/* ── Mobile 768px ─── */
@media (max-width: 768px) {
  /* Section */
  .section { padding: 60px 0; }
  .container { padding: 0 16px; }

  /* Section Headers */
  .section-title { font-size: 1.75rem; }
  .section-subtitle { font-size: 0.95rem; }
  .section-header { margin-bottom: 40px; }

  /* Navbar */
  .nav-links { display: none; }
  #nav-btn-mulai { display: none; }
  .bottom-nav { display: flex; }
  body { padding-bottom: 70px; }
  .nav-logo img { height: 30px; }
  .nav-logo-text { font-size: 1rem; }
  #navbar { padding: 14px 0; }
  #navbar.scrolled { padding: 10px 0; }

  /* Hero */
  #hero { padding-top: 80px; min-height: 100svh; }
  .hero-title { font-size: clamp(2rem, 8vw, 2.8rem); margin-bottom: 16px; }
  .hero-desc { font-size: 0.95rem; margin-bottom: 28px; }
  .hero-badge { font-size: 0.72rem; padding: 5px 14px; }
  .hero-cta { flex-direction: column; align-items: flex-start; gap: 12px; }
  .hero-cta .btn { width: 100%; justify-content: center; }
  .hero-stats {
    gap: 0;
    display: grid;
    grid-template-columns: 1fr 1fr;
    margin-top: 36px;
    background: var(--bg-glass);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 20px;
    backdrop-filter: var(--blur-glass);
  }
  .stat-item {
    padding: 8px 12px;
    border-right: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
  }
  .stat-item:nth-child(2n) { border-right: none; }
  .stat-item:nth-child(3),
  .stat-item:nth-child(4) { border-bottom: none; }
  .stat-num { font-size: 1.6rem; }

  /* Video overlay stronger on mobile for readability */
  .hero-video-overlay {
    background: linear-gradient(
      180deg,
      rgba(5, 11, 24, 0.85) 0%,
      rgba(5, 11, 24, 0.60) 100%
    ) !important;
  }
  [data-theme="light"] .hero-video-overlay {
    background: linear-gradient(
      180deg,
      rgba(240, 245, 255, 0.92) 0%,
      rgba(220, 235, 255, 0.75) 100%
    ) !important;
  }

  /* Scroll indicator */
  .scroll-indicator { bottom: 20px; }

  /* Services */
  .services-grid { grid-template-columns: 1fr; gap: 16px; }
  .service-card { padding: 24px; }

  /* Portfolio */
  .projects-grid { grid-template-columns: 1fr; gap: 16px; }
  .portfolio-filter { gap: 6px; }
  .filter-btn { padding: 7px 16px; font-size: 0.8rem; }

  /* Clients */
  .clients-grid { grid-template-columns: 1fr; gap: 12px; }
  .client-card { padding: 20px; }

  /* Contact */
  .contact-layout { gap: 32px; }
  .contact-info h3 { font-size: 1.4rem; }
  .form-row { grid-template-columns: 1fr; }
  .contact-form { gap: 12px; }

  /* Footer */
  .footer-grid { grid-template-columns: 1fr; gap: 24px; }
  .footer-bottom { flex-direction: column; text-align: center; gap: 8px; }
  .footer-desc { font-size: 0.84rem; }

  /* Cards */
  .glass-card { border-radius: var(--radius-md); }

  /* Loader */
  .loader-logo { width: 90px; }

  /* Hide non-critical nav action text on mobile */
  .nav-actions .btn span { display: none; }
}

/* ── Small Mobile 480px ─── */
@media (max-width: 480px) {
  .hero-title { font-size: clamp(1.8rem, 9vw, 2.4rem); }
  .section-title { font-size: 1.6rem; }
  .section-badge { font-size: 0.7rem; }
  .btn { padding: 12px 22px; font-size: 0.88rem; }
  .project-body { padding: 18px; }
  .service-icon-wrap { width: 50px; height: 50px; }

  /* Stack hero stats to 2x2 grid still */
  .hero-stats { grid-template-columns: 1fr 1fr; }

  /* Marquee slower on small screens */
  .marquee-track { animation-duration: 20s; }
}

/* ── Very Small 375px ─── */
@media (max-width: 375px) {
  .container { padding: 0 12px; }
  .hero-title { font-size: 1.7rem; }
  .nav-logo-text { display: none; } /* Only show logo icon */
}

/* ─── HIDE SCROLLED NAV LINKS ON MOBILE ─────────────────────── */
@media (min-width: 769px) {

}

/* ─── Utility ───────────────────────────────────────────────── */
.text-gradient { background: var(--accent-grad); -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); border: 0; }

/* Touch-friendly tap targets */
@media (hover: none) {
  .btn { min-height: 48px; }
  .nav-link { min-height: 44px; display: flex; align-items: center; }
  .filter-btn { min-height: 44px; }
  .social-btn { width: 44px; height: 44px; }
}

/* ═══════════════════════════════════════════════════════════════
   PREMIUM 3D-FEEL ENHANCEMENTS
   Custom Cursor | Card Tilt | Glow | Depth | Typing
   ═══════════════════════════════════════════════════════════════ */

/* ─── CUSTOM CURSOR ────────────────────────────────────────── */
body { cursor: none; }
@media (hover: none) { body { cursor: auto; } }

#cursor-dot {
  position: fixed;
  width: 7px;
  height: 7px;
  background: var(--accent-teal);
  border-radius: 50%;
  pointer-events: none;
  z-index: 99999;
  transform: translate(-50%, -50%);
  transition: width 0.15s, height 0.15s, background 0.2s;
  mix-blend-mode: screen;
}

#cursor-ring {
  position: fixed;
  width: 36px;
  height: 36px;
  border: 2px solid rgba(0, 212, 200, 0.55);
  border-radius: 50%;
  pointer-events: none;
  z-index: 99998;
  transform: translate(-50%, -50%);
  transition: width 0.3s ease, height 0.3s ease, border-color 0.3s ease, opacity 0.3s ease;
}

body.cursor-hover #cursor-ring {
  width: 56px;
  height: 56px;
  border-color: var(--accent-teal);
  background: rgba(0, 212, 200, 0.06);
}

body.cursor-hover #cursor-dot {
  width: 5px;
  height: 5px;
  background: #fff;
}

/* ─── HERO REDESIGN — Dot Grid + Animated Background ──────── */
#hero {
  background:
    radial-gradient(ellipse 80% 50% at 50% -20%, rgba(0, 212, 200, 0.13) 0%, transparent 60%),
    radial-gradient(ellipse 60% 40% at 80% 110%, rgba(0, 153, 255, 0.1) 0%, transparent 60%),
    var(--bg-base);
}

/* Dot grid overlay on hero */
#hero::after {
  content: '';
  position: absolute;
  inset: 0;
  background-image: radial-gradient(rgba(0, 212, 200, 0.18) 1px, transparent 1px);
  background-size: 32px 32px;
  mask-image: radial-gradient(ellipse 100% 100% at 50% 50%, black 30%, transparent 80%);
  -webkit-mask-image: radial-gradient(ellipse 100% 100% at 50% 50%, black 30%, transparent 80%);
  pointer-events: none;
  z-index: 1;
  animation: dotPulseGrid 6s ease-in-out infinite;
}

[data-theme="light"] #hero::after {
  background-image: radial-gradient(rgba(0, 168, 158, 0.13) 1px, transparent 1px);
}

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

/* Orbs more vibrant */
.hero-orb { opacity: 0.22; }
.hero-orb-1 { opacity: 0.18; }

/* Hero title depth */
.hero-title {
  text-shadow: 0 2px 30px rgba(0, 212, 200, 0.08);
  letter-spacing: -0.02em;
}

/* Typing cursor blink */
.typing-cursor {
  display: inline-block;
  width: 3px;
  height: 0.85em;
  background: var(--accent-teal);
  margin-left: 4px;
  vertical-align: middle;
  animation: blinkCursor 0.8s step-end infinite;
  border-radius: 2px;
}
@keyframes blinkCursor {
  0%, 100% { opacity: 1; }
  50%       { opacity: 0; }
}

/* ─── 3D TILT CARD ─────────────────────────────────────────── */
.tilt-card {
  transform-style: preserve-3d;
  will-change: transform;
  transition: transform 0.08s linear, box-shadow 0.3s ease;
}

/* Card shimmer on hover */
.tilt-card::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: linear-gradient(
    115deg,
    transparent 40%,
    rgba(255, 255, 255, 0.04) 50%,
    transparent 60%
  );
  background-size: 200% 200%;
  opacity: 0;
  transition: opacity 0.3s ease;
  pointer-events: none;
  z-index: 2;
}
.tilt-card:hover::after {
  opacity: 1;
  animation: shimmerSlide 1.5s ease infinite;
}

@keyframes shimmerSlide {
  0%   { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

/* ─── ANIMATED GRADIENT BORDER on project cards ─────────────── */
.project-card {
  position: relative;
}

.project-card .border-glow {
  content: '';
  position: absolute;
  inset: 0;
  padding: 2px; /* Ketebalan border */
  border-radius: inherit;
  background: conic-gradient(
    from 0deg,
    var(--accent-teal),
    var(--accent-blue),
    #9B59B6,
    var(--accent-teal)
  );
  -webkit-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.4s ease;
  z-index: 10;
  pointer-events: none;
  animation: rotateBorder 3s linear infinite;
  animation-play-state: paused;
}
.project-card:hover .border-glow {
  opacity: 1;
  animation-play-state: running;
}
@keyframes rotateBorder {
  from { filter: hue-rotate(0deg); }
  to   { filter: hue-rotate(360deg); }
}

/* ─── FLOATING ANIMATION ───────────────────────────────────── */
@keyframes floatBadge {
  0%, 100% { transform: translateY(0px); }
  50%       { transform: translateY(-6px); }
}
.hero-badge {
  animation: fadeUp 0.6s 0.2s ease both, floatBadge 4s 1s ease-in-out infinite;
  box-shadow: 0 0 20px rgba(0, 212, 200, 0.12);
}

/* ─── GLASS CARD 3D DEPTH ──────────────────────────────────── */
.glass-card {
  box-shadow: var(--shadow-card), 0 1px 0 rgba(255,255,255,0.05) inset;
}
.glass-card:hover {
  box-shadow: var(--shadow-lg), var(--glow-teal), 0 1px 0 rgba(255,255,255,0.08) inset;
  transform: translateY(-6px);
}

/* ─── SCROLL REVEAL enhanced ───────────────────────────────── */
.reveal {
  opacity: 0;
  transform: translateY(40px) scale(0.98);
  transition: opacity 0.75s cubic-bezier(0.22, 1, 0.36, 1),
              transform 0.75s cubic-bezier(0.22, 1, 0.36, 1);
}
.reveal.visible {
  opacity: 1;
  transform: translateY(0) scale(1);
}

/* ─── NAVBAR glow on scroll ────────────────────────────────── */
#navbar.scrolled {
  box-shadow: 0 4px 30px rgba(0, 212, 200, 0.05);
}

/* ─── BUTTON shimmer effect ────────────────────────────────── */
.btn-primary::after {
  content: '';
  position: absolute;
  top: -50%; left: -60%;
  width: 40%; height: 200%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.22), transparent);
  transform: skewX(-20deg);
  transition: left 0.55s ease;
}
.btn-primary:hover::after {
  left: 130%;
}

/* ─── TECH PILL depth ──────────────────────────────────────── */
.tech-pill:hover {
  transform: translateY(-4px) scale(1.04);
  box-shadow: 0 8px 24px rgba(0, 212, 200, 0.2);
}

/* ─── RESPONSIVE: disable 3D effects on touch ─────────────── */
@media (hover: none) {
  .tilt-card::after { display: none; }
  .project-card .border-glow { display: none; }
  body { cursor: auto; }
  #cursor-dot, #cursor-ring { display: none; }
}

/* ═══════════════════════════════════════════════════════════════
   CLIENT WALLETS — 1 Wallet Per Client, Flip on Click
   ═══════════════════════════════════════════════════════════════ */

/* Grid of wallets */
.client-wallets-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 48px 32px;
  justify-items: center;
  padding: 20px 0 40px;
}

/* ── Individual Wallet Wrapper ── */
.cw-wrapper {
  position: relative;
  width: 200px;
  height: 190px;
  cursor: pointer;
  perspective: 900px;
  display: flex;
  justify-content: center;
  align-items: flex-end;
  transition: transform 0.35s ease;
  overflow: visible; /* allow card to slide above wallet */
}

.cw-wrapper:hover {
  transform: translateY(-8px);
}

/* ── Wallet Back (leather body) ── */
.cw-back {
  position: absolute;
  bottom: 0;
  width: 200px;
  height: 148px;
  background: linear-gradient(160deg, #0A1628 0%, #0F1F3D 100%);
  border-radius: 16px 16px 44px 44px;
  z-index: 5;
  box-shadow:
    inset 0 20px 30px rgba(0,0,0,0.4),
    inset 0 4px 12px rgba(0,0,0,0.5),
    0 0 0 1px rgba(0,212,200,0.12);
}

/* ── Card (flip card) ── */
/* Entry: card drops from above into pocket on page load */
@keyframes cwSlide {
  0%   { bottom: 200px; opacity: 0; transform: scale(0.85) rotateX(10deg); }
  60%  { bottom: 10px;  opacity: 1; transform: scale(1.02) rotateX(-2deg); }
  80%  { bottom: 14px;  transform: scale(0.99) rotateX(0deg); }
  100% { bottom: 12px;  transform: scale(1) rotateX(0deg); }
}

.cw-card {
  position: absolute;
  width: 184px;
  height: 116px;
  bottom: 12px;            /* deeply tucked inside pocket */
  left: 8px;
  z-index: 10;
  border-radius: 12px;
  transform-style: preserve-3d;
  transition: transform 0.7s cubic-bezier(0.34, 1.3, 0.64, 1),
              bottom 0.7s cubic-bezier(0.34, 1.3, 0.64, 1),
              box-shadow 0.4s ease;
  animation: cwSlide 0.9s cubic-bezier(0.2, 0.8, 0.2, 1) backwards;
  cursor: pointer;
}

/* Card peeks out on wallet hover (only if not open) */
.cw-wrapper:not(.cw-open):hover .cw-card {
  bottom: 40px;
  transform: rotateZ(-3deg);
}

/* When wallet is open (clicked) — card SLIDES UP then flips */
.cw-wrapper.cw-open .cw-card {
  transform: rotateY(180deg) scale(1.04);
  bottom: 156px;           /* fully pulled out above the pocket */
  box-shadow:
    0 24px 48px rgba(0, 212, 200, 0.25),
    0 8px 20px rgba(0, 0, 0, 0.5);
}

/* Card faces */
.cw-card-face {
  position: absolute;
  inset: 0;
  border-radius: 12px;
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
  padding: 14px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  overflow: hidden;
}

/* Front face */
.cw-card-front {
  background: linear-gradient(135deg, #00D4C8 0%, #0099FF 100%);
  color: #fff;
  box-shadow: 0 8px 24px rgba(0,0,0,0.3), inset 0 1px 0 rgba(255,255,255,0.2);
}

/* Back face */
.cw-card-back {
  background: linear-gradient(135deg, #0F1F3D 0%, #1A2A4A 100%);
  border: 1px solid rgba(0,212,200,0.3);
  color: #fff;
  transform: rotateY(180deg);
  box-shadow: 0 8px 24px rgba(0,0,0,0.4), inset 0 1px 0 rgba(0,212,200,0.1);
}

/* ── Card Front contents ── */
.cw-logo {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  background: rgba(255,255,255,0.2);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-head);
  font-size: 0.9rem;
  font-weight: 900;
  color: #fff;
  overflow: hidden;
  flex-shrink: 0;
}
.cw-logo img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  border-radius: 8px;
}

.cw-chip {
  width: 26px;
  height: 20px;
  background: rgba(255,255,255,0.22);
  border-radius: 4px;
  border: 1px solid rgba(255,255,255,0.12);
}

.cw-card-top-row {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
}

.cw-front-name {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100%;
}

.cw-hint {
  font-size: 0.6rem;
  opacity: 0.75;
  display: flex;
  align-items: center;
  gap: 3px;
  letter-spacing: 0.03em;
}

/* ── Card Back contents ── */
.cw-back-header {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 2px;
}

.cw-back-logo {
  width: 28px;
  height: 28px;
  border-radius: 6px;
  background: rgba(0,212,200,0.15);
  border: 1px solid rgba(0,212,200,0.3);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-head);
  font-size: 0.65rem;
  font-weight: 900;
  color: var(--accent-teal);
  overflow: hidden;
  flex-shrink: 0;
}
.cw-back-logo img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  border-radius: 4px;
}

.cw-back-name {
  font-size: 0.75rem;
  font-weight: 700;
  color: #fff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.cw-back-industry {
  font-size: 0.6rem;
  color: var(--accent-teal);
  display: flex;
  align-items: center;
  gap: 3px;
  opacity: 0.85;
  margin-bottom: 2px;
}

.cw-back-collab {
  font-size: 0.6rem;
  color: rgba(255,255,255,0.7);
  display: flex;
  align-items: center;
  gap: 3px;
  line-height: 1.3;
}

.cw-back-close {
  font-size: 0.58rem;
  color: rgba(0,212,200,0.5);
  display: flex;
  align-items: center;
  gap: 3px;
  cursor: pointer;
  margin-top: auto;
}

/* ── Pocket SVG ── */
.cw-pocket {
  position: absolute;
  bottom: 0;
  width: 200px;
  height: 115px;
  z-index: 40;
  filter: drop-shadow(0 10px 20px rgba(0,212,200,0.1));
}

.cw-pocket svg {
  width: 100%;
  height: 100%;
}

.cw-pocket-label {
  position: absolute;
  bottom: 28px;
  left: 50%;
  transform: translateX(-50%);
  width: 80%;
  text-align: center;
  font-family: var(--font-head);
  font-size: 0.58rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: rgba(0,212,200,0.45);
  text-transform: uppercase;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  z-index: 50;
}

/* ── Light theme adjustments ── */
[data-theme="light"] .cw-back {
  background: linear-gradient(160deg, #1A2A4A 0%, #0F1F3D 100%);
}
[data-theme="light"] .cw-pocket path:first-child {
  fill: #1A2A4A;
}

/* ── Responsive ── */
@media (max-width: 768px) {
  .client-wallets-grid {
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 40px 20px;
  }
}
@media (max-width: 480px) {
  .client-wallets-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 36px 8px;
    padding: 10px 0 30px;
  }
  .cw-wrapper { width: 160px; height: 152px; }
  .cw-back { width: 160px; height: 118px; }
  .cw-pocket { width: 160px; height: 92px; }
  .cw-pocket-label { font-size: 0.5rem; bottom: 22px; }
  
  .cw-card { 
    width: 148px; 
    height: 100px; 
    bottom: 10px; 
    left: 6px; 
  }
  .cw-wrapper:not(.cw-open):hover .cw-card {
    bottom: 28px;
  }
  .cw-wrapper.cw-open .cw-card {
    bottom: 130px;
  }
  
  /* Shrink text/icons for mobile card */
  .cw-front-name, .cw-back-name { font-size: 0.65rem; }
  .cw-hint, .cw-back-industry, .cw-back-collab, .cw-back-close { font-size: 0.55rem; gap: 2px; }
  .cw-logo { width: 32px; height: 32px; font-size: 0.7rem; }
  .cw-back-logo { width: 22px; height: 22px; font-size: 0.55rem; }
  .cw-chip { width: 20px; height: 16px; }
  .cw-card-face { padding: 10px; }
}

/* Base hero background */
#hero {
  background:
    radial-gradient(ellipse 80% 60% at 50% -10%, rgba(0, 212, 200, 0.15) 0%, transparent 60%),
    radial-gradient(ellipse 60% 50% at 90% 100%, rgba(0, 153, 255, 0.12) 0%, transparent 60%),
    #050B18;
}
[data-theme="light"] #hero {
  background:
    radial-gradient(ellipse 80% 60% at 50% -10%, rgba(0, 212, 200, 0.18) 0%, transparent 60%),
    radial-gradient(ellipse 60% 50% at 90% 100%, rgba(0, 153, 255, 0.14) 0%, transparent 60%),
    #EEF3FF;
}

/* Aurora container */
.aurora-bg {
  position: absolute;
  inset: 0;
  overflow: hidden;
  z-index: 0;
}

/* Individual aurora blobs */
.aurora-blob {
  position: absolute;
  border-radius: 50%;
  filter: blur(80px);
  opacity: 0;
  animation: auroraFadeIn 1.2s ease forwards;
}

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

.aurora-blob-1 {
  width: 700px;
  height: 500px;
  background: radial-gradient(ellipse, rgba(0, 212, 200, 0.25) 0%, transparent 70%);
  top: -200px;
  left: -150px;
  animation: auroraFadeIn 1s ease forwards, aurora1Move 14s ease-in-out 1s infinite alternate;
}

.aurora-blob-2 {
  width: 600px;
  height: 450px;
  background: radial-gradient(ellipse, rgba(0, 153, 255, 0.22) 0%, transparent 70%);
  bottom: -200px;
  right: -100px;
  animation: auroraFadeIn 1s 0.3s ease forwards, aurora2Move 18s ease-in-out 1.3s infinite alternate;
  opacity: 0;
}

.aurora-blob-3 {
  width: 500px;
  height: 400px;
  background: radial-gradient(ellipse, rgba(155, 89, 182, 0.15) 0%, transparent 70%);
  top: 30%;
  left: 40%;
  animation: auroraFadeIn 1s 0.6s ease forwards, aurora3Move 22s ease-in-out 1.6s infinite alternate;
  opacity: 0;
}

.aurora-blob-4 {
  width: 400px;
  height: 350px;
  background: radial-gradient(ellipse, rgba(0, 212, 200, 0.18) 0%, transparent 70%);
  top: 10%;
  right: 10%;
  animation: auroraFadeIn 1s 0.9s ease forwards, aurora4Move 16s ease-in-out 1.9s infinite alternate;
  opacity: 0;
}

/* Aurora blob movement animations */
@keyframes aurora1Move {
  0%   { transform: translate(0, 0) scale(1); }
  33%  { transform: translate(80px, 60px) scale(1.1); }
  66%  { transform: translate(-40px, 100px) scale(0.95); }
  100% { transform: translate(60px, -40px) scale(1.05); }
}
@keyframes aurora2Move {
  0%   { transform: translate(0, 0) scale(1); }
  33%  { transform: translate(-70px, -50px) scale(1.08); }
  66%  { transform: translate(50px, -80px) scale(0.92); }
  100% { transform: translate(-50px, 60px) scale(1.06); }
}
@keyframes aurora3Move {
  0%   { transform: translate(0, 0) scale(1); }
  33%  { transform: translate(100px, -60px) scale(1.12); }
  66%  { transform: translate(-80px, 40px) scale(0.88); }
  100% { transform: translate(40px, 80px) scale(1.04); }
}
@keyframes aurora4Move {
  0%   { transform: translate(0, 0) scale(1); }
  50%  { transform: translate(-60px, 80px) scale(1.15); }
  100% { transform: translate(80px, -30px) scale(0.9); }
}

/* Light mode blobs slightly more vibrant */
[data-theme="light"] .aurora-blob-1 {
  background: radial-gradient(ellipse, rgba(0, 168, 158, 0.28) 0%, transparent 70%);
}
[data-theme="light"] .aurora-blob-2 {
  background: radial-gradient(ellipse, rgba(0, 119, 204, 0.24) 0%, transparent 70%);
}
[data-theme="light"] .aurora-blob-3 {
  background: radial-gradient(ellipse, rgba(120, 60, 170, 0.18) 0%, transparent 70%);
}
[data-theme="light"] .aurora-blob-4 {
  background: radial-gradient(ellipse, rgba(0, 180, 170, 0.2) 0%, transparent 70%);
}

/* Subtle noise overlay for depth texture */
.aurora-noise {
  position: absolute;
  inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.75' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.03'/%3E%3C/svg%3E");
  background-repeat: repeat;
  background-size: 200px 200px;
  opacity: 0.4;
  mix-blend-mode: overlay;
  pointer-events: none;
}

/* Hero overlay more subtle now that we have aurora */
.hero-video-overlay {
  background: linear-gradient(
    170deg,
    rgba(5, 11, 24, 0.40) 0%,
    rgba(5, 11, 24, 0.15) 50%,
    rgba(5, 11, 24, 0.35) 100%
  ) !important;
}
[data-theme="light"] .hero-video-overlay {
  background: linear-gradient(
    170deg,
    rgba(238, 243, 255, 0.55) 0%,
    rgba(220, 235, 255, 0.30) 50%,
    rgba(238, 243, 255, 0.50) 100%
  ) !important;
}

/* --- GOOGLE TRANSLATE CUSTOMIZATION ------------------------- */
body { top: 0 !important; }
.skiptranslate > iframe.skiptranslate { display: none !important; visibility: hidden !important; }
.goog-te-banner-frame { display: none !important; }
.goog-te-gadget { color: transparent !important; font-size: 0px !important; }
.goog-te-gadget .goog-te-combo { margin: 0; padding: 4px 8px; border: 1px solid var(--border); border-radius: var(--radius-sm); background: var(--bg-card); color: var(--text-primary); font-family: 'Inter', sans-serif; font-size: 0.8rem; cursor: pointer; outline: none; transition: var(--transition-fast); }
.goog-te-gadget .goog-te-combo:hover { border-color: var(--accent-teal); }
.goog-te-gadget span { display: none !important; }
.goog-logo-link { display: none !important; }

/* --- UIVERSE THEME TOGGLE ----------------------------- */
#theme-toggle-button { font-size: 17px; position: relative; display: inline-block; width: 3.5em; cursor: pointer; transform: scale(0.75); margin: 0 5px; }
#theme-toggle-checkbox { opacity: 0; width: 0; height: 0; position: absolute; }
#container, #patches, #stars, #button, #sun, #moon, #cloud { transition-property: all; transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1); transition-duration: 0.25s; }
#theme-toggle-checkbox:checked + svg #container { fill: #2b4360; }
#theme-toggle-checkbox:checked + svg #button { transform: translate(28px, 2.333px); }
#sun { opacity: 1; }
#theme-toggle-checkbox:checked + svg #sun { opacity: 0; }
#moon { opacity: 0; }
#theme-toggle-checkbox:checked + svg #moon { opacity: 1; }
#cloud { opacity: 1; }
#theme-toggle-checkbox:checked + svg #cloud { opacity: 0; }
#stars { opacity: 0; }
#theme-toggle-checkbox:checked + svg #stars { opacity: 1; }

.goog-te-gadget img { display: none !important; }
.goog-te-gadget div { display: inline-block; }

/* --- LANGUAGE MODAL ----------------------------------------- */
.lang-modal-overlay { position: fixed; inset: 0; background: rgba(10, 22, 40, 0.85); backdrop-filter: blur(8px); z-index: 99999; display: flex; align-items: center; justify-content: center; opacity: 0; pointer-events: none; transition: opacity 0.4s ease; }
.lang-modal-overlay.active { opacity: 1; pointer-events: auto; }
.lang-modal-card { background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 30px; width: 90%; max-width: 400px; text-align: center; box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5); transform: translateY(20px); transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275); }
.lang-modal-overlay.active .lang-modal-card { transform: translateY(0); }
.lang-modal-icon { font-size: 3rem; margin-bottom: 15px; }
.lang-modal-title { font-size: 1.2rem; font-weight: 700; margin-bottom: 8px; color: var(--text-primary); }
.lang-modal-desc { font-size: 0.9rem; color: var(--text-secondary); margin-bottom: 25px; line-height: 1.5; }
.lang-modal-grid { display: flex; flex-direction: column; gap: 12px; }
.btn-lang { background: var(--bg-base); border: 1px solid var(--border); color: var(--text-primary); padding: 12px 20px; border-radius: var(--radius-sm); font-weight: 600; font-size: 1rem; cursor: pointer; transition: var(--transition-fast); display: flex; align-items: center; justify-content: center; gap: 10px; font-family: 'Inter', sans-serif; }
.btn-lang:hover { background: rgba(0, 212, 200, 0.1); border-color: var(--accent-teal); transform: translateY(-2px); }

/* --- FLOATING AUDIO CONTROL ----------------------------- */
.floating-audio { position: fixed; bottom: 80px; right: 25px; width: 45px; height: 45px; border-radius: 50%; background: var(--bg-card); border: 1px solid var(--border); box-shadow: 0 4px 12px rgba(0,0,0,0.3); display: flex; align-items: center; justify-content: center; font-size: 1.2rem; color: var(--text-primary); cursor: pointer; z-index: 999; transition: var(--transition-fast); backdrop-filter: blur(5px); }
.floating-audio:hover { transform: scale(1.1); border-color: var(--accent-teal); color: var(--accent-teal); }
@media (min-width: 768px) { .floating-audio { bottom: 25px; } }

/* --- STACKED FORM (3D) ------------------------------- */
.stackedForm {
  --form-btn-color-4: #e0f2fe;
  --form-btn-color-3: #bae6fd;
  --form-btn-color-2: #7dd3fc;
  --form-btn-color-1: #38bdf8;
  --form-btn-color: #0284c7;
  --form-btn-active-color: #0369a1;
  --form-rotation: rotate3d(0, 1, 0, 180deg);
  --form-text-padding-left: 15px;
  transform: var(--form-rotation);
  width: 100%; max-width: 300px;
}
.stackedForm .wrapper {
  position: relative;
  transform: skewY(-14deg);
  padding: 0; margin: 0;
}
.stackedForm .input, .stackedForm button {
  width: 100%;
  height: 45px;
  position: relative;
  padding: 10px;
  border: 0.1px solid var(--form-btn-active-color);
}
.stackedForm button {
  background: var(--form-btn-color);
  border: none;
  cursor: pointer;
}
.stackedForm button span {
  display: block;
  transform: var(--form-rotation);
  font-weight: 600;
}
.stackedForm .wrapper li, .stackedForm button {
  position: relative;
  list-style: none;
  width: 100%;
  z-index: var(--i);
  transition: 0.3s;
  color: white;
}
.stackedForm .wrapper li::before, .stackedForm button::before {
  position: absolute;
  content: '';
  background: var(--form-btn-color);
  top: 0;
  left: -45px;
  width: 45px;
  height: 45px;
  transform-origin: right;
  transform: skewY(45deg);
  transition: 0.3s;
}
.stackedForm .wrapper li::after, .stackedForm button::after {
  position: absolute;
  content: '';
  background: var(--form-btn-color);
  width: 100%;
  height: 45px;
  top: -45px;
  left: 0;
  transform-origin: bottom;
  transform: skewX(45deg);
  transition: 0.3s;
}
.stackedForm .wrapper li:nth-child(1)::after, .stackedForm .wrapper li:nth-child(1)::before { background-color: var(--form-btn-color-4); }
.stackedForm .wrapper li:nth-child(2)::after, .stackedForm .wrapper li:nth-child(2)::before { background-color: var(--form-btn-color-3); }
.stackedForm .wrapper li:nth-child(3)::after, .stackedForm .wrapper li:nth-child(3)::before { background-color: var(--form-btn-color-2); }
.stackedForm .wrapper li:nth-child(4)::after, .stackedForm .wrapper li:nth-child(4)::before { background-color: var(--form-btn-color-1); }
.stackedForm li .input {
  outline: none;
  border: none;
  padding: 0;
  padding-left: var(--form-text-padding-left);
  width: 100%;
  color: black;
  transform: var(--form-rotation);
  font-family: inherit;
}
.stackedForm li .input::placeholder { color: rgba(0,0,0,0.6); }
.stackedForm li:nth-child(1) .input { background: var(--form-btn-color-4); }
.stackedForm li:nth-child(2) .input { background: var(--form-btn-color-3); }
.stackedForm li:nth-child(3) .input { background: var(--form-btn-color-2); }
.stackedForm li:nth-child(4) .input { background: var(--form-btn-color-1); }
.stackedForm li .input:focus { outline: none; }
.stackedForm .wrapper li:hover, .stackedForm button:hover, .stackedForm .wrapper li:has(input:focus), .stackedForm .wrapper li:has(textarea:focus), .stackedForm button:focus {
  transform: translateX(-20px);
}
.stackedForm button:hover, .stackedForm button:hover::before, .stackedForm button:hover::after, .stackedForm button:focus, .stackedForm button:focus::before, .stackedForm button:focus::after {
  background: var(--form-btn-active-color);
}
.stackedForm button:active { transform: translateX(0px); }

.stackedForm li.textarea-li, .stackedForm li.textarea-li .input { height: 120px; }
.stackedForm li.textarea-li::before { height: 120px !important; }
.stackedForm li.textarea-li .input { padding-top: 15px; resize: none; }

/* --- MOVING CIRCUIT BACKGROUND -------------------------- */
.circuit-bg {
  position: absolute;
  inset: 0;
  z-index: 0;
  background-image: 
    linear-gradient(rgba(2, 132, 199, 0.15) 1px, transparent 1px),
    linear-gradient(90deg, rgba(2, 132, 199, 0.15) 1px, transparent 1px),
    radial-gradient(circle at 0 0, rgba(2, 132, 199, 0.25) 3px, transparent 4px),
    radial-gradient(circle at 40px 40px, rgba(2, 132, 199, 0.25) 3px, transparent 4px);
  background-size: 40px 40px;
  animation: circuitMove 15s linear infinite;
  mask-image: radial-gradient(ellipse at center, black 0%, transparent 80%);
  -webkit-mask-image: radial-gradient(ellipse at center, black 0%, transparent 80%);
  opacity: 0.8;
}
@keyframes circuitMove {
  0% { background-position: 0 0, 0 0, 0 0, 0 0; }
  100% { background-position: 40px 40px, 40px 40px, 40px 40px, 40px 40px; }
}
[data-theme="dark"] .circuit-bg {
  background-image: 
    linear-gradient(rgba(56, 189, 248, 0.15) 1px, transparent 1px),
    linear-gradient(90deg, rgba(56, 189, 248, 0.15) 1px, transparent 1px),
    radial-gradient(circle at 0 0, rgba(56, 189, 248, 0.3) 3px, transparent 4px),
    radial-gradient(circle at 40px 40px, rgba(56, 189, 248, 0.3) 3px, transparent 4px);
}
.stackedForm { position: relative; z-index: 1; }

/* --- Bento Theme (Clean & Minimalist Blue/White) ------------- */
[data-theme="bento"] {
  --bg-base:       #F8FAFC;
  --bg-surface:    #FFFFFF;
  --bg-card:       #FFFFFF;
  --bg-glass:      rgba(255, 255, 255, 0.85);
  --bg-glass-nav:  rgba(248, 250, 252, 0.95);

  --accent-teal:   #3B82F6; 
  --accent-blue:   #1D4ED8; 
  --accent-grad:   linear-gradient(135deg, #3B82F6 0%, #1D4ED8 100%);
  --accent-grad-r: linear-gradient(135deg, #1D4ED8 0%, #3B82F6 100%);
  --glow-teal:     0 8px 25px rgba(59, 130, 246, 0.3);
  --glow-blue:     0 8px 25px rgba(29, 78, 216, 0.3);

  --text-primary:   #0F172A;
  --text-secondary: #475569;
  --text-muted:     #94A3B8;
  --text-invert:    #FFFFFF;

  --border:         rgba(15, 23, 42, 0.08);
  --border-hover:   rgba(37, 99, 235, 0.3);
  --border-card:    rgba(15, 23, 42, 0.05);

  --shadow-sm:  0 4px 12px rgba(15, 23, 42, 0.03);
  --shadow-md:  0 12px 32px rgba(15, 23, 42, 0.06);
  --shadow-lg:  0 24px 60px rgba(15, 23, 42, 0.09);
  --shadow-card: 0 8px 30px rgba(15, 23, 42, 0.04);
  
  --radius-sm:  12px;
  --radius-md:  20px;
  --radius-lg:  28px;
  --radius-xl:  40px;
}

/* Bento Theme Dark variant (Optional, if they use the toggle button inside bento) */
[data-theme="bento-dark"] {
  --bg-base:       #0A0F1C;
  --bg-surface:    #111827;
  --bg-card:       #1F2937;
  --bg-glass:      rgba(17, 24, 39, 0.65);
  --bg-glass-nav:  rgba(10, 15, 28, 0.85);

  --accent-teal:   #3B82F6; 
  --accent-blue:   #2563EB; 
  --accent-grad:   linear-gradient(135deg, #3B82F6 0%, #2563EB 100%);
  --accent-grad-r: linear-gradient(135deg, #2563EB 0%, #3B82F6 100%);
  --glow-teal:     0 4px 20px rgba(59, 130, 246, 0.3);
  --glow-blue:     0 4px 20px rgba(37, 99, 235, 0.3);

  --text-primary:   #FFFFFF;
  --text-secondary: #9CA3AF;
  --text-muted:     #6B7280;
  --text-invert:    #0A0F1C;

  --border:         rgba(255, 255, 255, 0.08);
  --border-hover:   rgba(59, 130, 246, 0.4);
  --border-card:    rgba(255, 255, 255, 0.05);

  --shadow-sm:  0 4px 12px rgba(0, 0, 0, 0.4);
  --shadow-md:  0 12px 32px rgba(0, 0, 0, 0.5);
  --shadow-lg:  0 24px 60px rgba(0, 0, 0, 0.7);
  --shadow-card: 0 8px 30px rgba(0, 0, 0, 0.3);
  
  --radius-sm:  12px;
  --radius-md:  20px;
  --radius-lg:  28px;
  --radius-xl:  40px;
}

/* --- Bento Grid Utilities ------------------------------------------ */
.bento-hero-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  grid-template-rows: auto auto auto;
  gap: 20px;
  max-width: 1200px;
  margin: 0 auto;
  padding: 40px 24px;
  z-index: 2;
  position: relative;
}
.bento-cell {
  background: var(--bg-glass);
  border: 1px solid var(--border-card);
  border-radius: var(--radius-xl);
  padding: 32px;
  backdrop-filter: var(--blur-glass);
  box-shadow: var(--shadow-card);
  transition: var(--transition);
  overflow: hidden;
  position: relative;
}
.bento-cell:hover {
  transform: translateY(-5px) scale(1.01);
  box-shadow: var(--shadow-md);
  border-color: var(--border-hover);
}
.bento-main {
  grid-column: span 2;
  grid-row: span 2;
  display: flex;
  flex-direction: column;
  justify-content: center;
}
.bento-visual {
  grid-column: span 2;
  grid-row: span 2;
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--accent-grad);
}
.bento-visual img, .bento-visual video {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.bento-stat {
  grid-column: span 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
}
.bento-stat .stat-num {
  font-size: 3rem;
  font-weight: 800;
  font-family: var(--font-head);
  color: var(--accent-blue);
  line-height: 1;
}
.bento-stat .stat-label {
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--text-secondary);
  margin-top: 8px;
}
@media (max-width: 992px) {
  .bento-hero-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .bento-main, .bento-visual {
    grid-column: span 2;
  }
}
@media (max-width: 768px) {
  .bento-hero-grid {
    grid-template-columns: 1fr;
    padding-top: 100px;
  }
  .bento-main, .bento-visual, .bento-stat {
    grid-column: 1fr;
  }
}

/* --- Bento Theme Tweaks ------------------------------------------ */
[data-theme="bento"] .btn-primary, [data-theme="bento-dark"] .btn-primary {
  border-radius: var(--radius-full);
}
[data-theme="bento"] .glass-card, [data-theme="bento-dark"] .glass-card {
  border-radius: var(--radius-xl);
}

/* --- MAC DOCK SIDEBAR ------------------------------------------ */
.mac-dock {
  position: fixed;
  left: 20px;
  top: 50%;
  transform: translateY(-50%);
  background: var(--bg-glass);
  backdrop-filter: var(--blur-glass);
  -webkit-backdrop-filter: var(--blur-glass);
  border: 1px solid var(--border);
  padding: 15px 12px;
  border-radius: 40px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  z-index: 9999;
  box-shadow: var(--shadow-lg);
}

.mac-dock-item {
  width: 46px;
  height: 46px;
  border-radius: 50%;
  background: var(--bg-surface);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.4rem;
  color: var(--text-secondary);
  text-decoration: none;
  transition: transform 0.2s cubic-bezier(0.25, 1, 0.5, 1), background 0.2s, color 0.2s, margin 0.2s;
  transform-origin: left center;
  position: relative;
  border: 1px solid var(--border-card);
  box-shadow: var(--shadow-sm);
}

/* Tooltip */
.mac-dock-item::after {
  content: attr(data-tooltip);
  position: absolute;
  left: 140%;
  top: 50%;
  transform: translateY(-50%) scale(0.8);
  opacity: 0;
  visibility: hidden;
  background: var(--bg-card);
  color: var(--text-primary);
  padding: 6px 12px;
  border-radius: 6px;
  font-size: 0.8rem;
  font-weight: 600;
  white-space: nowrap;
  border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
  transition: all 0.2s ease;
  pointer-events: none;
}

.mac-dock-item:hover {
  background: var(--accent-grad);
  color: #fff;
  border-color: transparent;
}

.mac-dock-item:hover::after {
  opacity: 1;
  visibility: visible;
  transform: translateY(-50%) scale(1);
}

/* Hide desktop nav links since we moved it to sidebar */
@media (min-width: 769px) {
  #navbar .nav-links {
    display: none !important;
  }
}
@media (max-width: 768px) {
  .mac-dock {
    flex-direction: row;
    left: 50%;
    top: auto;
    bottom: 20px;
    transform: translateX(-50%);
    padding: 10px 15px;
    border-radius: 40px;
    width: auto;
    gap: 8px;
    justify-content: center;
  }
  .mac-dock-item {
    width: 40px;
    height: 40px;
    transform-origin: bottom center;
  }
  .mac-dock-item::after {
    left: 50%;
    top: -120%;
    transform: translateX(-50%) scale(0.8);
  }
  .mac-dock-item:hover::after {
    transform: translateX(-50%) scale(1);
  }
}
