/* ==========================================================================
   PREMIUM NVIDIA-INSPIRED DESIGN SYSTEM
   ========================================================================== */

/* [1] RESET & DESIGN TOKENS
   ========================================================================== */
:root {
  /* Colors */
  --bg-0: #05070b;
  --bg-1: #0a0f16;
  --surface: #0c111a;
  --text: #eaf0ff;
  --muted: #9aa3b2;
  --accent-1: #8ae3ff;
  --accent-2: #9b8cff;
  --accent-3: #5cff8a;
  --warning: #ffdd57;
  --danger: #ff5b79;
  
  /* Spacing scale */
  --space-xs: 4px;
  --space-s: 8px;
  --space-m: 12px;
  --space-l: 16px;
  --space-xl: 24px;
  --space-2xl: 32px;
  --space-3xl: 48px;
  --space-4xl: 64px;
  
  /* Motion */
  --easing: cubic-bezier(0.2, 0.8, 0.2, 1);
  --duration-fast: 180ms;
  --duration-normal: 280ms;
  --duration-slow: 400ms;
  
  /* Layout */
  --max-width: 1200px;
  --border-radius: 8px;
  --shadow-subtle: 0 4px 12px rgba(0, 0, 0, 0.15);
  --shadow-strong: 0 8px 32px rgba(0, 0, 0, 0.3);
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  background: linear-gradient(135deg, var(--bg-0), var(--bg-1));
  color: var(--text);
  line-height: 1.6;
  overflow-x: hidden;
  position: relative;
}

/* Subtle diagonal gradient and noise overlay */
body::before {
  content: '';
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: 
    linear-gradient(135deg, rgba(138, 227, 255, 0.02) 0%, transparent 50%),
    linear-gradient(-45deg, rgba(155, 140, 255, 0.015) 0%, transparent 50%);
  pointer-events: none;
  z-index: -1;
}

/* [2] BASE TYPOGRAPHY & HELPERS
   ========================================================================== */

/* Typography scale */
h1, .h1 {
  font-size: clamp(28px, 6vw, 72px);
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: -0.02em;
}

h2, .h2 {
  font-size: clamp(24px, 3.5vw, 40px);
  font-weight: 600;
  line-height: 1.2;
  letter-spacing: -0.01em;
}

h3, .h3 {
  font-size: clamp(18px, 2.5vw, 24px);
  font-weight: 600;
  line-height: 1.3;
}

p, body {
  font-size: clamp(14px, 1.2vw, 18px);
  line-height: 1.6;
}

.headline-tight {
  letter-spacing: -0.04em;
  font-weight: 800;
}

/* Utility classes */
.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 var(--space-xl);
}

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: var(--space-2xl);
}

.visually-hidden,
.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;
}

/* Noise overlay utility */
.noise::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: url('data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMjAwIiBoZWlnaHQ9IjIwMCIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj48ZGVmcz48ZmlsdGVyIGlkPSJub2lzZSI+PGZlVHVyYnVsZW5jZSBiYXNlRnJlcXVlbmN5PSIwLjkiIG51bU9jdGF2ZXM9IjQiIHNlZWQ9IjEiLz48L2ZpbHRlcj48L2RlZnM+PHJlY3Qgd2lkdGg9IjEwMCUiIGhlaWdodD0iMTAwJSIgZmlsdGVyPSJ1cmwoI25vaXNlKSIgb3BhY2l0eT0iMC4wMiIvPjwvc3ZnPg==') repeat;
  pointer-events: none;
  z-index: 1;
}

/* Button variants */
.btn {
  display: inline-flex;
  align-items: center;
  gap: var(--space-s);
  padding: var(--space-m) var(--space-xl);
  border: 2px solid transparent;
  border-radius: var(--border-radius);
  font-size: 16px;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  transition: all var(--duration-normal) var(--easing);
  position: relative;
  overflow: hidden;
}

.btn-primary {
  background: linear-gradient(135deg, var(--accent-1), var(--accent-2));
  color: var(--bg-0);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(138, 227, 255, 0.3);
}

.btn-secondary {
  border-color: var(--accent-1);
  color: var(--accent-1);
  background: transparent;
}

.btn-secondary:hover {
  background: rgba(138, 227, 255, 0.1);
  box-shadow: 0 0 24px rgba(138, 227, 255, 0.2);
}

.btn-outline {
  border-color: var(--muted);
  color: var(--text);
  background: transparent;
}

.btn-outline:hover {
  border-color: var(--accent-1);
  color: var(--accent-1);
}

/* Tags */
.tag {
  display: inline-flex;
  align-items: center;
  padding: var(--space-xs) var(--space-m);
  background: rgba(138, 227, 255, 0.1);
  color: var(--accent-1);
  border-radius: calc(var(--border-radius) * 2);
  font-size: 12px;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

/* [3] HEADER/NAV WITH KINETIC UNDERLINE
   ========================================================================== */
.header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  background: rgba(5, 7, 11, 0.9);
  backdrop-filter: blur(20px);
  border-bottom: 1px solid rgba(138, 227, 255, 0.1);
}

.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--space-l) var(--space-xl);
  max-width: var(--max-width);
  margin: 0 auto;
}

.logo {
  font-size: 24px;
  font-weight: 800;
  color: var(--text);
  text-decoration: none;
  letter-spacing: -0.02em;
  z-index: 1001;
  position: relative;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: var(--space-2xl);
  list-style: none;
}

.nav-link {
  position: relative;
  color: var(--muted);
  text-decoration: none;
  font-weight: 500;
  transition: color var(--duration-normal) var(--easing);
}

.nav-link::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 50%;
  transform: translateX(-50%);
  width: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--accent-1), var(--accent-2));
  transition: width var(--duration-normal) var(--easing);
}

.nav-link:hover,
.nav-link:focus {
  color: var(--text);
}

.nav-link:hover::after,
.nav-link:focus::after {
  width: 100%;
}

/* Mobile Menu Toggle */
.mobile-menu-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  width: 44px;
  height: 44px;
  background: transparent;
  border: none;
  cursor: pointer;
  padding: 7px;
  z-index: 1001;
  position: relative;
  touch-action: manipulation;
}

.hamburger-line {
  width: 25px;
  height: 2px;
  background: var(--text);
  margin: 3px 0;
  transition: all var(--duration-normal) var(--easing);
  transform-origin: center;
}

.mobile-menu-toggle.active .hamburger-line:nth-child(1) {
  transform: rotate(45deg) translate(6px, 6px);
}

.mobile-menu-toggle:active,
.mobile-menu-toggle:focus {
  background: rgba(138, 227, 255, 0.1);
  border-radius: var(--border-radius);
}

.mobile-menu-toggle.active .hamburger-line:nth-child(2) {
  opacity: 0;
}

.mobile-menu-toggle.active .hamburger-line:nth-child(3) {
  transform: rotate(-45deg) translate(6px, -6px);
}

/* Mobile Menu Overlay */
.mobile-nav-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(5, 7, 11, 0.95);
  backdrop-filter: blur(20px);
  z-index: 999;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: all var(--duration-normal) var(--easing);
}

.mobile-nav-overlay.active {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

.mobile-nav-menu {
  position: fixed;
  top: 0;
  right: -300px;
  width: 300px;
  height: 100vh;
  background: var(--surface);
  border-left: 1px solid rgba(138, 227, 255, 0.1);
  padding: 80px var(--space-xl) var(--space-xl);
  transition: right var(--duration-normal) var(--easing);
  z-index: 1000;
  overflow-y: auto;
}

.mobile-nav-overlay.active .mobile-nav-menu {
  right: 0;
}

.mobile-nav-links {
  list-style: none;
  margin: 0;
  padding: 0;
}

.mobile-nav-links li {
  margin-bottom: var(--space-xl);
}

.mobile-nav-link {
  display: block;
  color: var(--text);
  text-decoration: none;
  font-size: 18px;
  font-weight: 600;
  padding: var(--space-l) 0;
  border-bottom: 1px solid rgba(138, 227, 255, 0.1);
  transition: all var(--duration-normal) var(--easing);
  outline: none; /* Remove default browser focus outline */
}

.mobile-nav-link:hover {
  color: var(--accent-1);
  padding-left: var(--space-l);
}

.mobile-nav-link:focus {
  color: var(--accent-1);
  padding-left: var(--space-l);
  outline: none; /* Ensure no browser default outline */
  background: rgba(138, 227, 255, 0.05);
}

.mobile-nav-link.active {
  color: var(--accent-1);
  padding-left: var(--space-l);
  background: rgba(138, 227, 255, 0.1);
  font-weight: 700;
  border-left: 3px solid var(--accent-1);
}

/* [4] HERO LAYOUT + MEDIA PANEL
   ========================================================================== */
.hero {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 1fr 1fr;
  align-items: center;
  gap: var(--space-4xl);
  padding: 120px var(--space-xl) var(--space-4xl);
  max-width: var(--max-width);
  margin: 0 auto;
  position: relative;
}

.hero-content {
  z-index: 2;
}

.hero-title {
  margin-bottom: var(--space-xl);
}

.hero-subtitle {
  color: var(--muted);
  font-size: clamp(16px, 2vw, 24px);
  margin-bottom: var(--space-3xl);
  max-width: 80%;
}

.hero-actions {
  display: flex;
  gap: var(--space-l);
  margin-bottom: var(--space-3xl);
}

.hero-media {
  position: relative;
  width: 100%;
  aspect-ratio: 4 / 5; /* portrait ratio */
  border-radius: 20px;
  overflow: hidden;
  background: #0c111a;
  box-shadow: 0 20px 40px rgba(0,0,0,0.4);
}

.hero-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* [5] FEATURE TILES
   ========================================================================== */
.features {
  padding: var(--space-4xl) var(--space-xl);
  max-width: var(--max-width);
  margin: 0 auto;
}

.feature-tile {
  background: var(--surface);
  border: 1px solid rgba(138, 227, 255, 0.1);
  border-radius: var(--border-radius);
  padding: var(--space-2xl);
  text-align: center;
  transition: all var(--duration-normal) var(--easing);
  position: relative;
  overflow: hidden;
}

.feature-tile::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(135deg, var(--accent-1), var(--accent-2));
  opacity: 0;
  transition: opacity var(--duration-normal) var(--easing);
  z-index: -1;
}

.feature-tile:hover {
  transform: translateY(-8px);
  box-shadow: var(--shadow-strong);
  border-color: var(--accent-1);
}

.feature-tile:hover::before {
  opacity: 0.05;
}

.feature-number {
  font-size: 48px;
  font-weight: 800;
  background: linear-gradient(135deg, var(--accent-1), var(--accent-2));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  line-height: 1;
  margin-bottom: var(--space-l);
}

.feature-title {
  color: var(--text);
  margin-bottom: var(--space-s);
}

.feature-description {
  color: var(--muted);
  font-size: 14px;
}

/* [6] ABOUT PAGE CARD + CREDENTIALS STRIP
   ========================================================================== */
.about-container {
  position: relative;
  min-height: 100vh;
  padding-top: 80px;
}

.about-content {
  background: var(--surface);
  border: 1px solid rgba(138, 227, 255, 0.1);
  border-radius: var(--border-radius);
  padding: var(--space-3xl);
  margin: var(--space-3xl) 0;
  position: relative;
  z-index: 2;
}

.credentials-strip {
  display: flex;
  gap: var(--space-l);
  flex-wrap: wrap;
  margin: var(--space-xl) 0;
  padding: var(--space-l) 0;
  border-top: 1px solid rgba(138, 227, 255, 0.1);
  border-bottom: 1px solid rgba(138, 227, 255, 0.1);
}

#about-canvas {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: -1;
}

/* [7] WORK GRID CARDS + FILTER PILLS
   ========================================================================== */
.work-container {
  padding-top: 80px;
  min-height: 100vh;
}

.filter-pills {
  display: flex;
  gap: var(--space-s);
  margin-bottom: var(--space-3xl);
  justify-content: center;
}

.filter-pill {
  padding: var(--space-s) var(--space-l);
  border: 1px solid var(--muted);
  border-radius: calc(var(--border-radius) * 3);
  background: transparent;
  color: var(--muted);
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: all var(--duration-normal) var(--easing);
}

.filter-pill.active,
.filter-pill:hover {
  border-color: var(--accent-1);
  color: var(--accent-1);
  background: rgba(138, 227, 255, 0.1);
}

.work-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: var(--space-2xl);
  margin-bottom: var(--space-4xl);
}

/* Force single column layout on all mobile screens */
@media (max-width: 768px) {
  .work-grid {
    display: grid !important;
    grid-template-columns: 1fr !important;
    gap: var(--space-l) !important;
  }
  
  .work-grid .work-card {
    width: 100% !important;
    max-width: none !important;
  }
}

.work-card {
  background: var(--surface);
  border: 1px solid rgba(138, 227, 255, 0.1);
  border-radius: var(--border-radius);
  overflow: hidden;
  transition: all var(--duration-normal) var(--easing);
  opacity: 1;
  transform: translateY(0);
  display: flex;
  flex-direction: column;
  height: 100%;
}

.work-card.hidden {
  display: none !important;
  opacity: 0 !important;
  visibility: hidden !important;
}

.work-card:hover {
  transform: translateY(-8px) scale(1.02);
  box-shadow: var(--shadow-strong);
  border-color: var(--accent-1);
}

.work-card-image {
  width: 100%;
  height: 240px;
  background: linear-gradient(135deg, rgba(138, 227, 255, 0.1), rgba(155, 140, 255, 0.1));
  position: relative;
  overflow: hidden;
}

.work-card-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform var(--duration-slow) var(--easing);
}

.work-card:hover .work-card-image img {
  transform: scale(1.1);
}

.work-card-content {
  padding: var(--space-xl);
  flex-grow: 1;
  display: flex;
  flex-direction: column;
}

.work-card-title {
  color: var(--text);
  margin-bottom: var(--space-s);
}

.work-card-description {
  color: var(--muted);
  margin-bottom: var(--space-l);
  line-height: 1.5;
  flex-grow: 1;
}

.work-card-link {
  display: inline-flex;
  align-items: center;
  gap: var(--space-s);
  color: var(--accent-1);
  text-decoration: none;
  font-weight: 500;
  transition: gap var(--duration-normal) var(--easing);
  margin-top: auto;
}

.work-card-link:hover {
  gap: var(--space-m);
}

/* [8] CONTACT PANEL
   ========================================================================== */
.contact-container {
  padding-top: 80px;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
}

.contact-panel {
  background: var(--surface);
  border: 1px solid rgba(138, 227, 255, 0.1);
  border-radius: var(--border-radius);
  padding: var(--space-3xl);
  max-width: 500px;
  width: 100%;
  text-align: center;
}

.contact-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--space-l);
  margin: var(--space-s) 0;
  border-radius: var(--border-radius);
  transition: background var(--duration-normal) var(--easing);
}

.contact-item:hover {
  background: rgba(138, 227, 255, 0.05);
}

.contact-label {
  color: var(--muted);
  font-size: 14px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.contact-value {
  color: var(--text);
  font-weight: 500;
}

.contact-value a {
  color: var(--accent-1);
  text-decoration: none;
}

.copy-btn {
  background: transparent;
  border: 1px solid var(--muted);
  border-radius: var(--border-radius);
  color: var(--muted);
  padding: var(--space-xs) var(--space-s);
  cursor: pointer;
  font-size: 12px;
  transition: all var(--duration-normal) var(--easing);
}

.copy-btn:hover {
  border-color: var(--accent-1);
  color: var(--accent-1);
}

/* [9] FOOTER
   ========================================================================== */
.footer {
  border-top: 1px solid rgba(138, 227, 255, 0.1);
  padding: var(--space-2xl);
  text-align: center;
  color: var(--muted);
  font-size: 14px;
}

/* [10] MOTION & REDUCED-MOTION RULES
   ========================================================================== */
.reveal {
  opacity: 0;
  transform: translateY(30px);
  transition: all var(--duration-slow) var(--easing);
}

.reveal.revealed {
  opacity: 1;
  transform: translateY(0);
}

/* Reduced motion preferences */
@media (prefers-reduced-motion: reduce) {
  * {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  
  html {
    scroll-behavior: auto;
  }
  
  .reveal {
    opacity: 1;
    transform: none;
  }
  
  #ribbon-canvas,
  #about-canvas {
    display: none;
  }
  
  .hero-media {
    background: linear-gradient(135deg, rgba(138, 227, 255, 0.1), rgba(155, 140, 255, 0.1));
  }
}

/* [11] CLIENT CARDS
   ========================================================================== */
.client-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-strong);
  border-color: var(--accent-1);
}

.client-card:hover .client-logo {
  background: linear-gradient(135deg, rgba(138, 227, 255, 0.2), rgba(155, 140, 255, 0.2)) !important;
}

/* [11.5] RESPONSIVE IMAGES & TOUCH OPTIMIZATIONS
   ========================================================================== */
img {
  max-width: 100%;
  height: auto;
}

/* Touch-friendly button sizing */
.btn {
  min-height: 44px;
  min-width: 44px;
}

.mobile-nav-link {
  min-height: 48px;
  display: flex;
  align-items: center;
}

.copy-btn {
  min-height: 40px;
  min-width: 40px;
}

/* Touch feedback */
.btn:active,
.mobile-nav-link:active,
.nav-link:active {
  transform: scale(0.98);
}

/* Improved image loading for mobile */
.hero-image,
.work-card-image img {
  object-fit: cover;
  object-position: center;
  transition: opacity 0.3s ease;
}

.hero-image[loading="lazy"],
.work-card-image img[loading="lazy"] {
  opacity: 1;
  transition: opacity 0.3s ease;
}

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

.hero-media {
  width: 100%;
  max-width: 400px;
  aspect-ratio: 4/5;
  background: linear-gradient(135deg, rgba(138, 227, 255, 0.1), rgba(155, 140, 255, 0.1));
}

/* Image optimization */
img {
  max-width: 100%;
  height: auto;
  vertical-align: middle;
}

/* Prevent layout shift during image loading */
.hero-media,
.work-card-image {
  background-color: rgba(138, 227, 255, 0.05);
  position: relative;
}

.hero-media::before,
.work-card-image::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 40px;
  height: 40px;
  border: 3px solid rgba(138, 227, 255, 0.3);
  border-top-color: var(--accent-1);
  border-radius: 50%;
  animation: spin 1s linear infinite;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.hero-media.loading::before,
.work-card-image.loading::before {
  opacity: 0.3;
}

@keyframes spin {
  to {
    transform: translate(-50%, -50%) rotate(360deg);
  }
}

/* Better mobile gallery/image handling */
@media (max-width: 480px) {
  .hero {
    padding-top: 90px;
    min-height: calc(100vh - 90px);
  }
  
  .hero-media {
    max-width: 280px;
    aspect-ratio: 1/1;
  }
  
  .work-card-image {
    height: 200px;
  }
  
  .contact-panel {
    margin: var(--space-s) !important;
    padding: var(--space-s) !important;
  }
  
  .about-container,
  .contact-container,
  .journey-container {
    padding-top: 90px;
  }
  
  /* work-container handled in main mobile breakpoint */
}

/* Landscape mobile optimization */
@media (max-height: 500px) and (orientation: landscape) {
  .hero {
    min-height: auto;
    padding: 80px var(--space-xl) var(--space-xl);
    gap: var(--space-xl);
  }
  
  .hero-media {
    max-width: 250px;
  }
  
  .mobile-nav-menu {
    width: 250px;
    padding: 60px var(--space-l) var(--space-l);
  }
}

/* High DPI displays */
@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
  .hero-image,
  .work-card-image img {
    image-rendering: -webkit-optimize-contrast;
    image-rendering: crisp-edges;
  }
}

/* Safe area for devices with notches */
@supports (padding-top: env(safe-area-inset-top)) {
  .header {
    padding-top: env(safe-area-inset-top);
  }
  
  .mobile-nav-menu {
    padding-top: calc(80px + env(safe-area-inset-top));
  }
}

/* RESPONSIVE DESIGN */
@media (max-width: 768px) {
  .container {
    padding: 0 var(--space-l);
  }
  
  .hero {
    grid-template-columns: 1fr;
    gap: var(--space-2xl);
    text-align: center;
    padding: 100px var(--space-l) var(--space-2xl);
    min-height: calc(100vh - 60px);
  }
  
  /* Disable loading spinners on mobile */
  .work-card-image::before {
    display: none !important;
  }
  
  .hero-media {
    max-width: 300px;
    margin: 0 auto;
  }
  
  .hero-actions {
    justify-content: center;
    flex-wrap: wrap;
    gap: var(--space-s);
  }
  
  .hero-actions .btn {
    min-width: 120px;
    font-size: 14px;
    padding: var(--space-s) var(--space-l);
  }
  
  .nav-links {
    display: none;
  }
  
  .mobile-menu-toggle {
    display: flex;
  }
  
  .nav {
    padding: var(--space-s) var(--space-l);
  }
  
  .credentials-strip {
    flex-direction: column;
    gap: var(--space-s);
    align-items: center;
  }
  
  .filter-pills {
    flex-wrap: wrap;
    justify-content: center;
  }
  
  /* work-grid mobile layout now handled above at line 585 */
  
  .clients-grid {
    grid-template-columns: 1fr !important;
    gap: var(--space-l) !important;
  }
  
  .client-card {
    max-width: 300px !important;
    margin: 0 auto !important;
  }
  
  .hero-subtitle {
    max-width: 100%;
  }
  
  .feature-tile {
    text-align: left;
    padding: var(--space-l);
  }
  
  .feature-number {
    font-size: 36px;
    text-align: center;
  }
  
  /* Mobile typography improvements */
  .hero-title {
    line-height: 1.3;
    margin-bottom: var(--space-l);
    font-size: clamp(24px, 7vw, 48px) !important;
  }
  
  .hero-title br {
    display: none;
  }
  
  .hero-subtitle {
    font-size: clamp(14px, 4vw, 18px);
    line-height: 1.5;
    margin-bottom: var(--space-2xl);
  }
  
  .feature-description {
    font-size: 14px;
    line-height: 1.6;
  }
  
  /* Improved mobile content spacing */
  .about-content {
    padding: var(--space-l);
  }
  
  .about-content p {
    font-size: 16px !important;
    line-height: 1.7;
    margin-bottom: var(--space-l) !important;
  }
  
  .contact-panel {
    padding: var(--space-l) !important;
    margin: var(--space-l);
    flex-direction: column !important;
    text-align: center;
  }
  
  .contact-panel h1 {
    font-size: clamp(24px, 6vw, 32px);
    margin-bottom: var(--space-l);
  }
  
  .contact-item {
    flex-direction: column;
    text-align: center;
    gap: var(--space-s);
    padding: var(--space-l) var(--space-s);
  }
  
  .contact-label {
    font-size: 12px;
  }
  
  .contact-value {
    font-size: 16px;
    word-break: break-all;
  }
  
  /* Better mobile work cards - using specificity instead of !important */
  @media (max-width: 768px) {
    .work-grid .work-card {
      opacity: 1;
      visibility: visible;
      display: flex;
    }
    
    .work-grid .work-card.hidden {
      display: none;
      opacity: 0;
      visibility: hidden;
    }
    
    .work-grid .work-card.mobile-visible {
      display: flex !important;
      opacity: 1 !important;
      visibility: visible !important;
    }
    
    .work-grid .work-card.mobile-hidden {
      display: none !important;
    }
  }
  
  .work-card-content {
    padding: var(--space-l);
  }
  
  .work-card-title {
    font-size: 18px;
    line-height: 1.3;
    margin-bottom: var(--space-s);
  }
  
  .work-card-description {
    font-size: 14px;
    line-height: 1.6;
  }
  
  .work-card-image {
    height: 180px;
    min-height: 180px;
  }
  
  .work-card-image img {
    opacity: 1 !important;
    display: block !important;
  }
  
  /* Mobile-specific improvements for TLF and project pages */
  .about-container,
  .work-container,
  .contact-container,
  .journey-container {
    padding-top: 90px !important;
  }
  
  .journey-container h1,
  .work-container h1 {
    font-size: clamp(24px, 6vw, 32px);
    text-align: center;
    margin-bottom: var(--space-xl);
  }
}

/* [12] TRAVEL MAP STYLES
   ========================================================================== */
.travel-map{
  height: 420px;             /* map height */
  border-radius: 14px;
  overflow: hidden;
  border:1px solid #24304b;
  box-shadow: 0 12px 36px rgba(0,0,0,.35);
  margin-top: 12px;
}
.travel-filters{
  display:flex; gap:12px; flex-wrap:wrap;
  margin: 10px 0 8px;
  font-size:14px; color: var(--muted);
}

/* Mobile travel section adjustments */
@media (max-width: 768px) {
  .travel-map {
    height: 300px;
    border-radius: 8px;
    margin-top: var(--space-s);
  }
  
  .travel-filters {
    justify-content: center;
    gap: var(--space-s);
    margin: var(--space-s) 0;
  }
  
  .travel-filters label {
    font-size: 13px;
    padding: var(--space-xs) var(--space-s);
    background: rgba(138, 227, 255, 0.05);
    border-radius: var(--border-radius);
    border: 1px solid rgba(138, 227, 255, 0.1);
  }
  
  /* Mobile optimization for role photos */
  .role-photos-grid {
    grid-template-columns: 1fr !important;
    gap: var(--space-l) !important;
  }
  
  .role-photo-card img {
    height: 200px !important;
  }
  
  /* Mobile client cards optimization */
  .clients-grid {
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)) !important;
  }
  
  /* Mobile responsive classes */
  .nucleus-header {
    flex-direction: column !important;
    text-align: center !important;
    gap: var(--space-l) !important;
  }
  
  .nucleus-header img {
    height: 80px !important;
    width: auto !important;
  }
}
.travel-filters input{ vertical-align: middle; margin-right:6px; }
.leaflet-container{ background: #0b0f1a; } /* match site bg */

/* Custom popup styling for better readability */
.leaflet-popup-content-wrapper {
  background: #0c111a !important;
  border: 1px solid rgba(138, 227, 255, 0.2) !important;
  border-radius: 8px !important;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4) !important;
}

.leaflet-popup-tip {
  background: #0c111a !important;
  border: 1px solid rgba(138, 227, 255, 0.2) !important;
}

.leaflet-popup-content {
  margin: 12px 16px !important;
  line-height: 1.4 !important;
}

.custom-popup h4 {
  border-bottom: 1px solid rgba(138, 227, 255, 0.3);
  padding-bottom: 4px;
}

/* [13] JOURNEY TIMELINE STYLES
   ========================================================================== */
.journey-container {
  padding-top: 80px;
  min-height: 100vh;
}

.journey-timeline {
  position: relative;
  max-width: 800px;
  margin: 0 auto;
  padding: var(--space-2xl) 0;
}

/* Central timeline line */
.journey-timeline::before {
  content: '';
  position: absolute;
  left: 50%;
  top: 0;
  bottom: 0;
  width: 2px;
  background: linear-gradient(180deg, var(--accent-1), var(--accent-2), var(--accent-3));
  transform: translateX(-50%);
}

.journey-step {
  position: relative;
  margin-bottom: var(--space-4xl);
  display: flex;
  align-items: center;
}

.journey-step:nth-child(odd) {
  flex-direction: row;
}

.journey-step:nth-child(even) {
  flex-direction: row-reverse;
}

.step-marker {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  z-index: 2;
  border: 3px solid var(--surface);
}

.step-marker.start {
  background: var(--accent-3);
  box-shadow: 0 0 20px rgba(92, 255, 138, 0.5);
}

.step-marker.transition {
  background: var(--accent-2);
  box-shadow: 0 0 20px rgba(155, 140, 255, 0.5);
}

.step-marker.current {
  background: var(--accent-1);
  box-shadow: 0 0 20px rgba(138, 227, 255, 0.5);
  animation: pulse-current 2s ease-in-out infinite;
}

@keyframes pulse-current {
  0%, 100% { transform: translateX(-50%) scale(1); }
  50% { transform: translateX(-50%) scale(1.1); }
}

.step-content {
  background: var(--surface);
  border: 1px solid rgba(138, 227, 255, 0.1);
  border-radius: var(--border-radius);
  padding: var(--space-xl);
  width: calc(50% - var(--space-3xl));
  position: relative;
  transition: all var(--duration-normal) var(--easing);
}

.journey-step:nth-child(odd) .step-content {
  margin-left: auto;
}

.journey-step:nth-child(even) .step-content {
  margin-right: auto;
}

.step-content:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-strong);
  border-color: var(--accent-1);
}

.step-content h3 {
  color: var(--text);
  font-size: 24px;
  font-weight: 700;
  margin-bottom: var(--space-s);
}

.step-date {
  color: var(--accent-1);
  font-size: 14px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.step-role {
  color: var(--muted);
  font-size: 16px;
  font-weight: 600;
  margin: var(--space-s) 0;
}

.step-description {
  color: var(--muted);
  line-height: 1.6;
  margin: var(--space-l) 0;
}

.step-achievements {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-s);
  margin: var(--space-l) 0;
}

.achievement {
  background: rgba(138, 227, 255, 0.1);
  color: var(--accent-1);
  padding: var(--space-xs) var(--space-s);
  border-radius: calc(var(--border-radius) / 2);
  font-size: 12px;
  font-weight: 500;
}

.journey-cta {
  display: inline-flex;
  align-items: center;
  gap: var(--space-s);
  color: var(--accent-1);
  text-decoration: none;
  font-weight: 600;
  margin-top: var(--space-l);
  transition: gap var(--duration-normal) var(--easing);
}

.journey-cta:hover {
  gap: var(--space-m);
}

/* Mobile responsive */
@media (max-width: 768px) {
  .journey-timeline::before {
    left: 20px;
  }
  
  .journey-step {
    flex-direction: row !important;
  }
  
  .step-marker {
    left: 20px;
  }
  
  .step-content {
    width: calc(100% - 60px);
    margin-left: 60px !important;
    margin-right: 0 !important;
  }
  
  .step-achievements {
    flex-direction: column;
    gap: var(--space-xs);
  }
}

/* [14] ROADWAY TIMELINE STYLES
   ========================================================================== */
.road-intro { 
  margin: 32px 0 8px; 
}

.surface {
  background: linear-gradient(180deg, rgba(14,19,37,.55), rgba(14,19,37,.35));
  border: 1px solid #232a40; 
  border-radius: 16px; 
  padding: 20px;
}

.road-wrap { 
  position: relative; 
  min-height: 1400px; 
  margin-top: var(--space-xl); 
}

.road-svg {
  position: absolute; 
  inset: 0; 
  width: 100%; 
  height: 100%;
  filter: drop-shadow(0 20px 60px rgba(0,0,0,.35));
}

.road-base { 
  stroke: #1b2336; 
  stroke-width: 28; 
  fill: none; 
  stroke-linecap: round; 
}

.road-dash { 
  stroke: rgba(160, 180, 220, .55); 
  stroke-width: 4; 
  fill: none; 
  stroke-linecap: round; 
  stroke-dasharray: 12 16; 
}

.road-glow { 
  stroke: #79e4ff; 
  stroke-width: 8; 
  fill: none; 
  stroke-linecap: round; 
  filter: blur(6px); 
  opacity: 0; 
}

.road-list { 
  list-style: none; 
  margin: 0; 
  padding: 0; 
  position: relative; 
}

.road-item { 
  position: absolute; 
  width: min(460px, 86vw); 
  transform: translate(-50%, -50%); 
}

.road-item.left { 
  text-align: right; 
}

.road-item.right { 
  text-align: left;  
}

.road-card {
  display: inline-block; 
  background: #0d1222; 
  border: 1px solid #24304b; 
  border-radius: 14px; 
  padding: 14px 16px;
  box-shadow: 0 10px 28px rgba(0,0,0,.35); 
  color: var(--text);
  transition: all var(--duration-normal) var(--easing);
}

.road-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 20px 40px rgba(0,0,0,.5);
  border-color: var(--accent-1);
}

.road-card h3 { 
  margin: 0 0 4px; 
  font-size: 18px; 
}

.road-card .step-date { 
  display: block; 
  color: var(--muted); 
  font-size: 12px; 
  margin-bottom: 6px; 
}

.road-card .step-role { 
  font-weight: 700; 
  margin: 0 0 6px; 
}

.road-card .step-description { 
  margin: 0 0 8px; 
  color: var(--muted); 
  font-size: 14px; 
}

.step-achievements { 
  display: flex; 
  gap: 8px; 
  flex-wrap: wrap; 
}

.step-achievements .achievement { 
  font-size: 12px; 
  color: #0b0f1d; 
  background: linear-gradient(90deg, #8ae3ff, #9b8cff); 
  padding: 4px 8px; 
  border-radius: 999px; 
}

.road-progress { 
  position: sticky; 
  top: 56px; 
  height: 4px; 
  z-index: 5; 
  background: rgba(35,42,64,.6); 
}

.road-progress__bar { 
  width: 0%; 
  height: 100%; 
  background: linear-gradient(90deg, #8ae3ff, #5cff8a); 
  box-shadow: 0 0 18px rgba(110,231,255,.45); 
  transition: width .15s linear; 
}

@media (prefers-reduced-motion: reduce) {
  .road-glow { 
    opacity: .25; 
    filter: none; 
  }
  .road-dash { 
    stroke-dasharray: none; 
  }
  .road-progress__bar { 
    transition: none; 
  }
}

@media (max-width: 720px) {
  .road-card { 
    max-width: 92vw; 
  }
}

/* Road Milestone Styles */
.road-milestones {
  position: relative;
  width: 100%;
  height: 100%;
}

.road-milestone {
  position: absolute;
  width: min(400px, 85vw);
  z-index: 10;
}

.milestone-right {
  text-align: left;
}

.milestone-left {
  text-align: right;
}

.milestone-card {
  display: inline-block;
  background: var(--surface);
  border: 1px solid rgba(138, 227, 255, 0.2);
  border-radius: 12px;
  padding: var(--space-l);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
  position: relative;
  transition: all var(--duration-normal) var(--easing);
  max-width: 320px;
}

.milestone-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.5);
  border-color: var(--accent-1);
}

.milestone-marker {
  position: absolute;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--accent-1);
  border: 3px solid var(--surface);
  box-shadow: 0 0 0 2px var(--accent-1);
}

.milestone-right .milestone-marker {
  left: -20px;
  top: 50%;
  transform: translateY(-50%);
}

.milestone-left .milestone-marker {
  right: -20px;
  top: 50%;
  transform: translateY(-50%);
}

.milestone-date {
  color: var(--accent-1);
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  display: block;
  margin-bottom: var(--space-xs);
}

.milestone-title {
  color: var(--text);
  font-size: 18px;
  font-weight: 700;
  margin: 0 0 var(--space-xs);
}

.milestone-role {
  color: var(--muted);
  font-size: 14px;
  font-weight: 600;
  margin: 0 0 var(--space-s);
}

.milestone-desc {
  color: var(--muted);
  font-size: 14px;
  line-height: 1.5;
  margin: 0 0 var(--space-s);
}

.milestone-chips {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-xs);
}

.milestone-chips .chip {
  background: linear-gradient(90deg, var(--accent-1), var(--accent-2));
  color: var(--bg-0);
  padding: 4px 8px;
  border-radius: 12px;
  font-size: 11px;
  font-weight: 600;
}

.milestone-quote {
  color: var(--accent-1);
  font-style: italic;
  font-size: 14px;
  margin-top: var(--space-l);
  padding-top: var(--space-s);
  border-top: 1px solid rgba(138, 227, 255, 0.2);
}

/* Special styling for info box milestone */
.milestone-card.info-box-style {
  background: linear-gradient(135deg, rgba(12, 17, 26, 0.95), rgba(14, 19, 37, 0.9));
  border: 2px solid rgba(138, 227, 255, 0.3);
  max-width: 420px;
  padding: var(--space-xl);
}

.info-box-style .milestone-title {
  background: linear-gradient(135deg, var(--accent-1), var(--accent-2));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  font-size: 20px;
}

.info-box-style .milestone-chips .chip {
  background: rgba(138, 227, 255, 0.15);
  color: var(--text);
  border: 1px solid rgba(138, 227, 255, 0.3);
  font-size: 12px;
  padding: 6px 10px;
}

/* Simple static road start box */
.road-start-box {
  position: absolute;
  top: 50px;
  right: 50px;
  width: 320px;
  background: var(--surface);
  border: 1px solid rgba(138, 227, 255, 0.2);
  border-radius: var(--border-radius);
  padding: var(--space-xl);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
  z-index: 20;
}

.road-start-box h3 {
  color: var(--text);
  font-size: 20px;
  font-weight: 700;
  margin-bottom: var(--space-l);
  background: linear-gradient(135deg, var(--accent-1), var(--accent-2));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.road-start-box p {
  color: var(--muted);
  line-height: 1.6;
  margin-bottom: var(--space-l);
}

.box-highlights {
  display: flex;
  flex-direction: column;
  gap: var(--space-s);
}

.box-highlights span {
  background: rgba(138, 227, 255, 0.1);
  color: var(--text);
  padding: var(--space-s) var(--space-l);
  border-radius: calc(var(--border-radius) / 2);
  font-size: 14px;
  border: 1px solid rgba(138, 227, 255, 0.2);
}

/* Transition box positioned on left side */
.road-transition-box {
  position: absolute;
  top: 350px;
  left: 20px;
  width: 280px;
  background: var(--surface);
  border: 1px solid rgba(155, 140, 255, 0.3);
  border-radius: var(--border-radius);
  padding: var(--space-l);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
  z-index: 20;
}

.road-transition-box h3 {
  color: var(--text);
  font-size: 20px;
  font-weight: 700;
  margin-bottom: var(--space-l);
  background: linear-gradient(135deg, var(--accent-2), var(--accent-3));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.road-transition-box p {
  color: var(--muted);
  line-height: 1.6;
  margin-bottom: var(--space-l);
  font-size: 14px;
}

.road-transition-box .box-highlights {
  display: flex;
  flex-direction: column;
  gap: var(--space-s);
}

.road-transition-box .box-highlights span {
  background: rgba(155, 140, 255, 0.1);
  border: 1px solid rgba(155, 140, 255, 0.2);
}

@media (max-width: 768px) {
  .road-milestone {
    position: relative !important;
    width: 100% !important;
    left: auto !important;
    top: auto !important;
    transform: none !important;
    text-align: center !important;
    margin-bottom: var(--space-2xl);
  }
  
  .milestone-card {
    max-width: none;
    margin: 0 auto;
  }
  
  .milestone-marker {
    display: none;
  }
  
  .road-wrap {
    min-height: auto !important;
  }
  
  .road-svg {
    display: none;
  }
  
  .road-milestones {
    position: static;
  }
}