:root {
  --bg: #16151A;
  --muted: #9aa6b2;
  --accent: #59a6ff;
  --glass: rgba(255, 255, 255, 0.04);
  --card-bg: linear-gradient(180deg, rgba(255, 255, 255, 0.02), rgba(255, 255, 255, 0.01));
  --max-width: 1200px;
}


/* Fonts loaded via JS in index.html to avoid render-blocking */

@property --glow-1 {
  syntax: '<color>';
  initial-value: #3870FF;
  inherits: false;
}

* {
  box-sizing: border-box;
}

h1,
h2,
h3,
h4 {
  font-family: 'Outfit', sans-serif;
  letter-spacing: -0.02em;
  margin: 0;
}

html,
body {
  min-height: 100vh;
  /* Smooth scrolling */
  scroll-behavior: smooth;
  /* Enable momentum scrolling on iOS */
  -webkit-overflow-scrolling: touch;
  /* Removed overflow-x: hidden to allow position: sticky to work */
  /* Individual sections will handle their own overflow as needed */
}

body {
  margin: 0;
  font-family: 'Outfit', 'Instrument Sans', ui-sans-serif, system-ui, -apple-system, sans-serif;
  background: var(--bg);
  color: #ffffff;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  -webkit-touch-callout: none;
  -webkit-user-select: none;
  user-select: none;
  overflow-x: clip;
}

.topnav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  min-height: 90px;
  height: auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 30px 6vw 10px;
  z-index: 2000;
  /* High z-index to always stay on top */
  pointer-events: auto;
  background: transparent;
  transition: padding 0.3s ease, background 0.3s ease, box-shadow 0.3s ease;
  /* Specific transitions */
}

/* smooth transition when nav background changes on scroll */

.topnav.scrolled {
  background: #000 !important;
  /* Force black */
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.5);
  padding: 12px 6vw;
  min-height: 64px;
}

.topnav.scrolled .nav-logo {
  height: 36px
}

.topnav .nav-logo {
  height: 44px;
  margin-right: 14px
}

/* Centered primary links */
.nav-center {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  pointer-events: auto
}

.nav-links {
  display: flex;
  list-style: none;
  gap: 36px;
  margin: 0;
  padding: 0;
  align-items: center
}

.nav-links a {
  color: rgba(230, 238, 249, 0.92);
  text-decoration: none;
  font-size: 0.95rem;
  padding: 8px 12px;
  border-radius: 6px
}

.nav-links a:hover {
  color: var(--accent);
  background: rgba(89, 166, 255, 0.04)
}

/* Right-side availability pill and toggle */
.nav-right {
  display: flex;
  align-items: center;
  gap: 12px
}

.nav-availability {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 8px 14px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.04);
  background: rgba(255, 255, 255, 0.02);
  color: #e6eef9;
  font-size: 0.95rem
}

.nav-availability .avail-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #34D399;
  box-shadow: 0 6px 18px rgba(52, 211, 153, 0.08);
  display: inline-block;
  animation: availBlink 1.6s linear infinite
}

.nav-availability .avail-text {
  white-space: nowrap
}

.hero {
  position: relative;
  height: 100vh;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-between;
  padding: 40px 4vmin 10px;
  /* Reduced from 20px for absolute bottom feel */
  overflow-x: hidden;
  overflow-y: clip;
  gap: 8px;
}

@media screen and (min-width: 1280px) and (max-width: 1536px) {
  .hero {
    padding-top: 140px;
  }
}

.hero .bg-grid {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background-image:
    repeating-linear-gradient(0deg, rgba(255, 255, 255, 0.02) 0 1px, transparent 1px 4px),
    repeating-linear-gradient(90deg, rgba(255, 255, 255, 0.02) 0 1px, transparent 1px 4px);
  mix-blend-mode: overlay;
  opacity: 0.08;
}

/* Soft blue glow moved to top of header */
.hero::before {
  content: '';
  position: absolute;
  left: 50%;
  top: 0;
  width: 100vmax;
  height: 80vmax;
  background: radial-gradient(circle at center, var(--glow-1), transparent 55%);
  filter: blur(80px);
  pointer-events: none;
  z-index: 1;
  transform: translate(-50%, -40%);
  animation: floatOrb1 20s ease-in-out infinite alternate;
  will-change: transform;
}

.hero::after {
  content: '';
  position: absolute;
  right: 50%;
  top: 0;
  width: 80vmax;
  height: 80vmax;
  background: radial-gradient(circle at center, rgba(139, 92, 246, 0.15), transparent 50%);
  filter: blur(90px);
  pointer-events: none;
  opacity: 0.6;
  z-index: 1;
  transform: translate(50%, -30%);
  animation: floatOrb2 22s ease-in-out infinite alternate-reverse;
  will-change: transform;
}

/* Dedicated gradient block placed at top of header for precise control */
/* .hero-gradient removed per request */


@keyframes floatOrb1 {
  0% {
    transform: translate(-50%, -40%) scale(1);
    --glow-1: rgba(56, 112, 255, 0.4);
    /* #3870FF */
  }

  50% {
    transform: translate(-40%, -30%) scale(1.1);
    --glow-1: rgba(0, 0, 0, 0.35);
    /* #000000 */
  }

  100% {
    transform: translate(-60%, -35%) scale(1);
    --glow-1: rgba(56, 112, 255, 0.4);
  }
}

@keyframes floatOrb2 {
  0% {
    transform: translate(50%, -30%) scale(1.1);
    opacity: 0.5;
  }

  50% {
    transform: translate(40%, -20%) scale(1);
    opacity: 0.8;
  }

  100% {
    transform: translate(60%, -25%) scale(1.1);
    opacity: 0.5;
  }
}



.container {
  position: relative;
  max-width: var(--max-width);
  width: 100%;
  margin: 0 auto;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center
}

.hero>.container {
  flex: 1;
  /* Take up all middle space */
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  /* Center name/btn within that space */
  text-align: center;
  width: 100%;
  padding-top: 140px;
  /* Increased from 100px to push overall unit down */
  /* Visual offset to account for topnav */
}

/* Prevent the hero name from breaking into single letters on wide screens */
.name {
  white-space: nowrap
}

.logo {
  width: 8vmin;
  max-width: 64px;
  margin-bottom: 2vmin
}

.hero-content {
  padding: 1vmin;
  /* Reduced from 2vmin */
}

.name {
  font-family: 'Outfit', sans-serif;
  font-size: clamp(2.4rem, 6.5vw, 4.2rem);
  line-height: 1;
  margin: 0;
  font-weight: 700;
  letter-spacing: -0.02em;
  opacity: 0;
  transform: translateY(12px);
  animation: enterText .7s ease forwards
}

.subtitle {
  font-family: 'Instrument Sans', sans-serif;
  color: var(--muted);
  font-size: clamp(1rem, 2.2vw, 1.25rem);
  line-height: 1.5;
  margin: 1rem 0 1.75rem;
  max-width: 66ch;
  opacity: 0;
  transform: translateY(12px);
  animation: enterText .7s ease .12s forwards
}

/* Letter / word stagger animations */
.name span,
.subtitle span {
  display: inline-block;
  opacity: 0;
  transform: translateY(18px)
}

.subtitle span {
  margin-right: 0.35ch
}

.name span {
  animation: letterIn .56s cubic-bezier(.2, .9, .2, 1) forwards
}

.subtitle span {
  animation: wordIn .46s cubic-bezier(.2, .9, .2, 1) forwards
}

@keyframes letterIn {
  to {
    opacity: 1;
    transform: none
  }
}

@keyframes wordIn {
  to {
    opacity: 1;
    transform: none
  }
}

.cta-wrap .btn {
  display: inline-block;
  padding: 0.75rem 1.3rem;
  border-radius: 10px;
  background: linear-gradient(90deg, #FF5A38, #FF8A66);
  color: #fff;
  font-weight: 600;
  text-decoration: none;
  box-shadow: 0 6px 18px rgba(255, 90, 56, 0.12);
  transform: translateZ(0);
  transition: transform .22s cubic-bezier(.2, .9, .2, 1), box-shadow .22s, filter .18s
}

.cta-wrap .btn:hover {
  transform: scale(1.035);
  box-shadow: 0 14px 40px rgba(255, 90, 56, 0.22);
  filter: drop-shadow(0 6px 18px rgba(255, 90, 56, 0.12))
}

.cta-wrap .btn:focus-visible {
  outline: 2px solid rgba(255, 90, 56, 0.16);
  outline-offset: 4px
}

/* ===================================================================
   PREMIUM PORTFOLIO STRIP - Apple / Linear / Framer Quality
   ================================================================== */

.portfolio-strip {
  position: relative;
  width: 100%;
  margin: 60px 0;
  padding: 24px 0;
  overflow: hidden;
  z-index: 10;
}

.portfolio-track {
  display: flex;
  gap: 20px;
  padding: 0 max(20px, calc((100vw - 1400px) / 2));
  overflow: visible;
  cursor: grab;
  will-change: transform;
  transform: translate3d(0, 0, 0);
}

/* Base premium card */
.card {
  position: relative;
  flex: 0 0 auto;
  width: 400px;
  height: 300px;
  border-radius: 16px;
  overflow: hidden;
  cursor: pointer;
  background: #0a0a0a;
  transform-style: preserve-3d;
  perspective: 1000px;
  transition: transform 0.6s cubic-bezier(0.23, 1, 0.32, 1);
  box-shadow:
    0 4px 24px rgba(0, 0, 0, 0.3),
    0 1px 3px rgba(0, 0, 0, 0.2);
}

.card:hover {
  transform: translateY(-12px) translateZ(50px);
  box-shadow:
    0 24px 48px rgba(0, 0, 0, 0.5),
    0 8px 16px rgba(0, 0, 0, 0.3),
    0 0 0 1px rgba(255, 255, 255, 0.05);
}

/* Ambient glow */
.card-glow {
  position: absolute;
  inset: -40px;
  background: radial-gradient(circle at var(--mouse-x, 50%) var(--mouse-y, 50%),
      rgba(89, 166, 255, 0.15),
      rgba(139, 92, 246, 0.1),
      transparent 60%);
  opacity: 0;
  transition: opacity 0.6s cubic-bezier(0.23, 1, 0.32, 1);
  pointer-events: none;
  z-index: 0;
  filter: blur(20px);
}

.card:hover .card-glow {
  opacity: 1;
}

/* Glassmorphism overlay */
.card-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg,
      rgba(0, 0, 0, 0) 0%,
      rgba(0, 0, 0, 0.4) 60%,
      rgba(0, 0, 0, 0.85) 100%);
  backdrop-filter: blur(8px) saturate(150%);
  -webkit-backdrop-filter: blur(8px) saturate(150%);
  opacity: 0;
  transition: opacity 0.4s cubic-bezier(0.23, 1, 0.32, 1);
  display: flex;
  align-items: flex-end;
  padding: 24px;
  z-index: 2;
  pointer-events: none;
}

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

/* Metadata */
.card-content {
  display: flex;
  flex-direction: column;
  gap: 4px;
  transform: translateY(12px);
  transition: transform 0.5s cubic-bezier(0.23, 1, 0.32, 1);
}

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

.card-category {
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.6);
  opacity: 0;
  transform: translateY(8px);
  transition:
    opacity 0.4s cubic-bezier(0.23, 1, 0.32, 1) 0.05s,
    transform 0.5s cubic-bezier(0.23, 1, 0.32, 1) 0.05s;
}

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

.card-title {
  font-family: 'Outfit', sans-serif;
  font-size: 1.25rem;
  font-weight: 700;
  color: #fff;
  margin: 0;
  letter-spacing: -0.03em;
  opacity: 0;
  transform: translateY(8px);
  transition:
    opacity 0.4s cubic-bezier(0.23, 1, 0.32, 1) 0.1s,
    transform 0.5s cubic-bezier(0.23, 1, 0.32, 1) 0.1s;
}

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

/* Premium image */
.card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  display: block;
  position: relative;
  z-index: 1;
  image-rendering: -webkit-optimize-contrast;
  backface-visibility: hidden;
  transform: translateZ(0);
  transition: transform 0.6s cubic-bezier(0.23, 1, 0.32, 1);
}

.card:hover img {
  transform: scale(1.05) translateZ(0);
}

@media screen and (min-width: 1280px) and (max-width: 1800px) {
  .card {
    width: 320px;
    height: 240px;
  }

  .card-title {
    font-size: 1.1rem;
  }
}

@media screen and (max-width: 768px) {
  .card {
    width: 280px;
    height: 210px;
  }

  .card-title {
    font-size: 1.rem;
  }
}

/* Nav toggle (hamburger) */
.nav-toggle {
  display: none;
  background: transparent;
  border: 0;
  width: 44px;
  height: 44px;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  padding: 6px;
  border-radius: 8px;
  margin-left: auto
}

.nav-toggle .menu-icon {
  width: 24px;
  height: 24px;
  display: block;
}

/* Chrome/Webkit-only optimization for sharper images */
@media screen and (-webkit-min-device-pixel-ratio:0) {
  .card img {
    image-rendering: -webkit-optimize-contrast;
  }
}

/* Remove old hamburger styles - keeping for reference if needed
.nav-toggle .hamburger {
  display: block;
  position: relative;
  width: 22px;
  height: 2px;
  background: linear-gradient(90deg, #fff 0%, rgba(255, 255, 255, 0.75) 100%);
  border-radius: 2px
}

.nav-toggle .hamburger::before,
.nav-toggle .hamburger::after {
  content: '';
  position: absolute;
  left: 0;
  width: 22px;
  height: 2px;
  background: linear-gradient(90deg, #fff 0%, rgba(255, 255, 255, 0.75) 100%);
  border-radius: 2px
}

.nav-toggle .hamburger::before {
  top: -7px
}

.nav-toggle .hamburger::after {
  top: 7px
}
*/

/* Mobile menu overlay - Redesigned for full-screen premium feel */
.mobile-menu {
  position: fixed;
  inset: 0;
  background: rgba(10, 10, 15, 0.98);
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  z-index: 9999;
  display: flex;
  flex-direction: column;
  padding: 40px 6vw;
  opacity: 0;
  pointer-events: none;
  visibility: hidden;
  transition: all 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}

.mobile-menu.open {
  opacity: 1;
  pointer-events: auto;
  visibility: visible;
}

.mobile-menu-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 60px;
  width: 100%;
}

.mobile-logo {
  height: 32px;
}

.mobile-close {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: #fff;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.3s ease;
}

.mobile-close:hover {
  background: rgba(255, 255, 255, 0.1);
  transform: rotate(90deg);
}

.mobile-menu-content {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.mobile-nav-links {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.mobile-nav-links li {
  overflow: hidden;
}

.mobile-nav-links a {
  font-family: 'Outfit', sans-serif;
  font-size: clamp(2.5rem, 10vw, 4rem);
  font-weight: 700;
  color: #fff;
  text-decoration: none;
  letter-spacing: -0.04em;
  display: inline-block;
  transform: translateY(100%);
  transition: transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
  transition-delay: calc(var(--i) * 0.1s);
}

.mobile-menu.open .mobile-nav-links a {
  transform: translateY(0);
}

.mobile-nav-links a:hover {
  color: var(--accent);
  padding-left: 10px;
}

.mobile-menu-footer {
  margin-top: 40px;
  padding-top: 40px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  opacity: 0;
  transform: translateY(20px);
  transition: all 0.8s cubic-bezier(0.16, 1, 0.3, 1) 0.4s;
}

.mobile-menu.open .mobile-menu-footer {
  opacity: 1;
  transform: translateY(0);
}

.mobile-label {
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.15em;
  color: rgba(255, 255, 255, 0.4);
  margin-bottom: 12px;
}

.mobile-email {
  font-size: clamp(1.1rem, 4vw, 1.4rem);
  color: #fff;
  text-decoration: none;
  font-weight: 500;
  display: block;
  margin-bottom: 24px;
}

.mobile-socials {
  display: flex;
  gap: 20px;
}

.mobile-socials a {
  color: rgba(255, 255, 255, 0.6);
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 500;
  transition: color 0.3s ease;
}

.mobile-socials a:hover {
  color: #fff;
}

/* Responsive: show hamburger and hide centered links on small screens */
@media (max-width:780px) {
  .nav-toggle {
    display: flex
  }

  .nav-center {
    display: none
  }

  .topnav {
    padding: 0 4vw
  }
}

/* Ensure nav links are hidden and hamburger visible on wider mobile/tablet breakpoints too */
@media (max-width:1024px) {
  .nav-center {
    display: none !important
  }

  .nav-toggle {
    display: flex !important;
    margin-left: auto
  }
}

@keyframes enterText {
  to {
    opacity: 1;
    transform: none
  }
}

@keyframes cardIn {
  to {
    opacity: 1;
    transform: none
  }
}

@keyframes availBlink {

  0%,
  100% {
    opacity: 1;
    transform: scale(1)
  }

  50% {
    opacity: 0.18;
    transform: scale(0.88)
  }
}

@media (prefers-reduced-motion: reduce) {
  .nav-availability .avail-dot {
    animation: none
  }
}

/* lightbox */
/* ===================================================================
   PREMIUM LIGHTBOX GALLERY - Apple / Linear Quality
   =================================================================== */

.lightbox {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.5s cubic-bezier(0.23, 1, 0.32, 1);
}

.lightbox[aria-hidden="false"] {
  opacity: 1;
  pointer-events: auto;
}

/* Dark translucent backdrop with blur */
.lb-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.92);
  backdrop-filter: blur(40px) saturate(120%);
  -webkit-backdrop-filter: blur(40px) saturate(120%);
}

/* Image stage */
.lb-stage {
  position: relative;
  max-width: 85vw;
  max-height: 85vh;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 2;
}

/* Premium lightbox image */
.lb-img {
  max-width: 100%;
  max-height: 85vh;
  width: auto;
  height: auto;
  object-fit: contain;
  border-radius: 12px;
  box-shadow:
    0 40px 80px rgba(0, 0, 0, 0.8),
    0 20px 40px rgba(0, 0, 0, 0.6),
    0 0 0 1px rgba(255, 255, 255, 0.05);

  /* Sharp rendering */
  image-rendering: -webkit-optimize-contrast;
  backface-visibility: hidden;
  transform: translateZ(0);

  /* Scale transition */
  opacity: 0;
  transform: scale(0.95) translateZ(0);
  transition:
    opacity 0.5s cubic-bezier(0.23, 1, 0.32, 1),
    transform 0.5s cubic-bezier(0.23, 1, 0.32, 1);
}

.lightbox[aria-hidden="false"] .lb-img {
  opacity: 1;
  transform: scale(1) translateZ(0);
}

/* Floating metadata panel */
.lb-metadata {
  position: fixed;
  bottom: 40px;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 16px;
  padding: 20px 32px;
  z-index: 3;
  opacity: 0;
  transform: translateX(-50%) translateY(20px);
  transition:
    opacity 0.5s cubic-bezier(0.23, 1, 0.32, 1) 0.2s,
    transform 0.5s cubic-bezier(0.23, 1, 0.32, 1) 0.2s;
}

.lightbox[aria-hidden="false"] .lb-metadata {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

.lb-meta-content {
  display: flex;
  align-items: center;
  gap: 16px;
}

.lb-meta-category {
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.6);
}

.lb-meta-title {
  font-family: 'Outfit', sans-serif;
  font-size: 1.125rem;
  font-weight: 700;
  color: #fff;
  margin: 0;
  letter-spacing: -0.02em;
}

.lb-meta-year {
  font-size: 0.875rem;
  font-weight: 400;
  color: rgba(255, 255, 255, 0.5);
}

/* Navigation buttons */
.lb-close,
.lb-prev,
.lb-next {
  position: fixed;
  background: rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 50%;
  color: #fff;
  font-size: 1.5rem;
  font-weight: 300;
  cursor: pointer;
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 4;
  opacity: 0;
  transition:
    opacity 0.3s cubic-bezier(0.23, 1, 0.32, 1),
    background 0.2s cubic-bezier(0.23, 1, 0.32, 1),
    transform 0.2s cubic-bezier(0.23, 1, 0.32, 1);
}

.lightbox[aria-hidden="false"] .lb-close,
.lightbox[aria-hidden="false"] .lb-prev,
.lightbox[aria-hidden="false"] .lb-next {
  opacity: 1;
}

.lb-close:hover,
.lb-prev:hover,
.lb-next:hover {
  background: rgba(255, 255, 255, 0.15);
  transform: scale(1.05);
}

.lb-close {
  top: 24px;
  right: 24px;
}

.lb-prev {
  left: 24px;
  top: 50%;
  transform: translateY(-50%);
}

.lb-prev:hover {
  transform: translateY(-50%) scale(1.05);
}

.lb-next {
  right: 24px;
  top: 50%;
  transform: translateY(-50%);
}

.lb-next:hover {
  transform: translateY(-50%) scale(1.05);
}

/* Responsive lightbox */
@media screen and (max-width: 768px) {
  .lb-stage {
    max-width: 95vw;
    max-height: 80vh;
  }

  .lb-img {
    max-height: 80vh;
    border-radius: 8px;
  }

  .lb-metadata {
    bottom: 20px;
    padding: 16px 24px;
  }

  .lb-meta-content {
    flex-direction: column;
    gap: 4px;
    text-align: center;
  }

  .lb-meta-title {
    font-size: 1rem;
  }

  .lb-close,
  .lb-prev,
  .lb-next {
    width: 40px;
    height: 40px;
    font-size: 1.25rem;
  }

  .lb-close {
    top: 16px;
    right: 16px;
  }

  .lb-prev {
    left: 16px;
  }

  .lb-next {
    right: 16px;
  }
}

/* Responsive tweaks */
.nav-logo {
  display: block;
}

@media (max-width:780px) {
  .hero {
    padding: calc(8vmin + 94px) 4vmin 18vmin;
  }

  .nav-logo {
    height: 36px;
  }

  /* Increase card size on tablet / large mobile for better legibility */
  .card {
    width: clamp(160px, 40vw, 260px);
    height: clamp(110px, 32vw, 200px);
  }
}

@media (min-width:1200px) {
  .hero-content {
    margin-top: 56px;
  }
}

@media (max-width:420px) {
  .hero-content {
    margin-top: 16px;
  }

  .hero {
    min-height: 66vh;
    padding-bottom: 22vmin;
    padding-left: 3vmin;
    padding-right: 3vmin;
  }

  .name {
    font-size: clamp(1.8rem, 10vw, 2.8rem);
    white-space: normal;
    /* Allow wrapping if absolutely needed */
  }

  .hero .subtitle {
    font-size: 0.9rem;
    line-height: 1.5;
  }

  /* Slightly reduce card at very small widths so it fits comfortably */
  .card {
    width: clamp(140px, 46vw, 220px);
    height: clamp(100px, 40vw, 160px)
  }

  /* On very small screens we will disable auto-scroll; JS will detect */
}

/* Make sure lightbox fits well on smaller screens */
@media (max-width:780px) {
  .lightbox {
    padding: 3vh 3vw
  }

  .lb-stage {
    max-width: 92vw;
    max-height: 68vh;
    width: 92vw;
    padding: 0.75rem
  }

  .lb-img {
    border-radius: 8px
  }
}

/* utility to limit max width of content */
.container {
  padding: 0 2rem
}

/* Selected Work Section */
.selected-work {
  min-height: 100vh;
  margin-top: 0;
  /* Reduced from 80px */
  padding-top: 60px;
  padding-bottom: 56px;
  display: flex;
  align-items: flex-start;
  overflow: hidden;
  background: #000000;
  position: relative;
}

/* Ambient background glow */
.selected-work::before {
  content: '';
  position: absolute;
  top: -10%;
  right: -5%;
  width: 60vw;
  height: 60vw;
  background: radial-gradient(circle, rgba(89, 166, 255, 0.08), transparent 70%);
  filter: blur(80px);
  pointer-events: none;
  z-index: 0;
}

.selected-work::after {
  content: '';
  position: absolute;
  bottom: -10%;
  left: -10%;
  width: 50vw;
  height: 50vw;
  background: radial-gradient(circle, rgba(139, 92, 246, 0.06), transparent 70%);
  filter: blur(80px);
  pointer-events: none;
  z-index: 0;
}

.selected-work .container {
  align-items: flex-start;
  text-align: left;
  position: relative;
  z-index: 1;
}

.selected-work .section-title {
  font-family: 'Outfit', sans-serif;
  font-size: 2.5rem;
  margin: 0 0 18px;
  width: 100%;
  text-align: left;
  color: #ffffff;
  font-weight: 800;
  letter-spacing: -0.04em;
}

.selected-work .filters {
  display: flex;
  gap: 12px;
  margin-bottom: 32px;
  align-items: center;
}

.selected-work .filter {
  background: rgba(255, 255, 255, 0.03);
  color: rgba(255, 255, 255, 0.7);
  border: 1px solid rgba(255, 255, 255, 0.05);
  padding: 10px 20px;
  border-radius: 999px;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  font-size: 0.9rem;
  font-weight: 500;
  backdrop-filter: blur(4px);
}

/* Mobile filter adjustments to prevent overflow */
@media (max-width: 780px) {
  .selected-work {
    padding-top: 20px;
  }

  .selected-work .filters {
    flex-wrap: wrap;
    gap: 8px;
  }

  .selected-work .filter {
    font-size: 0.8rem;
    padding: 8px 16px;
  }
}

.selected-work .filter:hover {
  background: rgba(255, 255, 255, 0.08);
  transform: translateY(-2px);
  color: #fff;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.selected-work .filter.active {
  background: rgba(89, 166, 255, 0.15);
  color: #59a6ff;
  border-color: rgba(89, 166, 255, 0.4);
  box-shadow: 0 0 20px rgba(89, 166, 255, 0.15);
}

.projects-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(420px, 1fr));
  gap: 24px;
  width: 100%;
  margin-top: 24px;
}

.project-card {
  display: flex;
  flex-direction: column;
  position: relative;
  text-decoration: none;
  background: rgba(25, 25, 30, 0.95);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 28px;
  overflow: hidden;
  transition: transform 0.5s cubic-bezier(0.16, 1, 0.3, 1), border-color 0.4s ease, box-shadow 0.5s ease, background 0.4s;
  perspective: 1200px;
  transform: translateZ(0);
  backface-visibility: hidden;
}

.project-card:hover {
  transform: translateY(-12px) rotateX(2deg) rotateY(-1deg);
  background: rgba(32, 32, 38, 1);
  box-shadow: 0 30px 60px rgba(0, 0, 0, 0.5), 0 0 20px rgba(89, 166, 255, 0.05);
}

/* Image container */
.project-card .img-wrap {
  position: relative;
  width: 100%;
  aspect-ratio: 4/3.2;
  background: #1e1e24;
  overflow: hidden;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: 0;
}

.project-card .img-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  image-rendering: auto;
  backface-visibility: hidden;
  transform: translateZ(0);
  will-change: transform;
  /* High clarity for Chrome */
  transition: transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

.project-card:hover .img-wrap img {
  transform: translateZ(50px) scale(1.03);
  /* Subtle scale for depth */
}

/* Floating "View" Button */
.project-card .view-btn {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 68px;
  height: 68px;
  background: rgba(255, 255, 255, 0.15);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.4);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #000;
  z-index: 10;
  opacity: 0;
  scale: 0.2;
  transform: translate(-50%, -50%) translateZ(40px);
  transition: all 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
  pointer-events: none;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}

/* Card Info Section */
.project-card .info {
  padding: 24px 28px 28px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  background: rgba(10, 10, 15, 0.6);
}

.project-card .category {
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  color: rgba(255, 255, 255, 0.5);
  margin: 0;
}

.project-card .title {
  font-family: 'Outfit', sans-serif;
  font-size: 1.4rem;
  font-weight: 700;
  color: #ffffff;
  margin: 0;
  letter-spacing: -0.02em;
  line-height: 1.3;
  transition: color 0.3s ease;
}

.project-card:hover .title {
  color: #59a6ff;
}

.project-card .description {
  font-family: 'Instrument Sans', sans-serif;
  font-size: 0.9rem;
  color: rgba(255, 255, 255, 0.5);
  line-height: 1.5;
  margin: 4px 0 0;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Responsive adjustments */
@media (max-width: 768px) {
  .project-card .info {
    padding: 20px 24px 24px;
  }

  .project-card .title {
    font-size: 1.25rem;
  }

  .project-card .description {
    font-size: 0.85rem;
  }
}

@media (max-width: 480px) {
  .project-card .title {
    font-size: 1.15rem;
  }

  .project-card .description {
    font-size: 0.8rem;
    -webkit-line-clamp: 2;
    line-clamp: 2;
  }
}

/* ============================================
   PREMIUM PORTFOLIO STRIP
   Apple / Linear / Framer Quality
   ============================================ */

.portfolio-strip {
  position: relative;
  width: 100%;
  padding: 60px 0 20px;
  /* Increased top padding to move cards down away from button */
  overflow: clip;
  z-index: 10;
  display: flex;
  align-items: center;
  margin-top: auto;
}

.portfolio-track {
  display: flex;
  align-items: center;
  gap: 24px;
  padding: 0 60px;
  overflow: visible;
  cursor: grab;
  will-change: transform;
  transform: translate3d(0, 0, 0);
  width: max-content;
}

/* Base card styling */
.card {
  position: relative;
  flex: 0 0 auto;
  /* Aggressively fluid width for laptops */
  width: clamp(240px, 28vw, 360px);
  max-height: 30vh;
  /* Shrunk from 35vh */
  aspect-ratio: 4 / 3;
  border-radius: 20px;
  overflow: hidden;
  cursor: pointer;
  background: #0a0a0a;

  /* Enable 3D transforms */
  transform-style: preserve-3d;
  perspective: 1200px;

  /* Smooth transitions */
  transition: transform 0.6s cubic-bezier(0.23, 1, 0.32, 1);

  /* Initial shadow */
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4);
}

/* 3D hover effect with tilt */
.card:hover {
  transform: translateY(-20px) translateZ(50px);
  box-shadow: 0 40px 80px rgba(0, 0, 0, 0.6);
}

/* Responsive adjustments for card dimensions */
@media screen and (max-width: 1400px) {}

@media screen and (max-width: 1024px) {
  .portfolio-strip {
    padding: 3vh 0 5vh;
  }
}

@media screen and (max-width: 768px) {
  .hero {
    height: auto;
    min-height: 100vh;
  }

  .portfolio-strip {
    padding: 20px 0 50px;
    margin-top: 40px;
    max-height: none;
  }

  .card {
    width: 260px;
    border-radius: 16px;
  }

  .portfolio-track {
    gap: 16px;
    padding: 0 30px;
  }
}

/* Specific fix for short laptop screens (e.g. 1366x768 or shorter) */
@media screen and (max-height: 850px) and (min-width: 1025px) {
  .hero {
    justify-content: space-between;
    /* Switch back to distribute on short screens */
    padding-bottom: 4vh;
  }

  .hero>.container {
    padding-top: 80px;
    /* Space from nav */
  }

  .portfolio-strip {
    position: relative;
    /* Return to flow to prevent overlap */
    padding: 1.5vh 0 10vh;
  }

  .card {
    width: clamp(220px, 24vw, 320px);
    max-height: 28vh;
  }

  .hero-content {
    margin-top: 40px;
  }
}

@media screen and (max-width: 480px) {
  .card {
    width: 240px;
  }
}

/* Ambient glow effect */
.card-glow {
  position: absolute;
  inset: -40px;
  background: radial-gradient(circle at var(--mouse-x, 50%) var(--mouse-y, 50%),
      rgba(89, 166, 255, 0.15),
      rgba(139, 92, 246, 0.1),
      transparent 60%);
  opacity: 0;
  transition: opacity 0.6s cubic-bezier(0.23, 1, 0.32, 1);
  pointer-events: none;
  z-index: 1;
  filter: blur(20px);
}

.card:hover .card-glow {
  opacity: 1;
}

/* Glassmorphism overlay */
.card-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg,
      rgba(0, 0, 0, 0) 0%,
      rgba(0, 0, 0, 0.4) 60%,
      rgba(0, 0, 0, 0.85) 100%);
  backdrop-filter: blur(8px) saturate(150%);
  -webkit-backdrop-filter: blur(8px) saturate(150%);
  opacity: 0;
  transition: opacity 0.4s cubic-bezier(0.23, 1, 0.32, 1);
  display: flex;
  align-items: flex-end;
  padding: 24px;
  z-index: 3;
  pointer-events: none;
}

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

/* View Icon */
.card-view-icon {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) scale(0.5);
  width: 56px;
  height: 56px;
  background: rgba(255, 255, 255, 0.15);
  backdrop-filter: blur(12px) saturate(180%);
  -webkit-backdrop-filter: blur(12px) saturate(180%);
  border: 1px solid rgba(255, 255, 255, 0.3);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 4;
  opacity: 0;
  transition: all 0.5s cubic-bezier(0.23, 1, 0.32, 1);
  color: #fff;
  pointer-events: none;
}

.card:hover .card-view-icon {
  opacity: 1;
  transform: translate(-50%, -50%) scale(1) translateZ(80px);
}

.card-view-icon svg {
  width: 24px;
  height: 24px;
  stroke: currentColor;
  stroke-width: 2.5;
  transition: transform 0.3s ease;
}

/* Project metadata */
.card-content {
  display: flex;
  flex-direction: column;
  gap: 4px;
  transform: translateY(12px);
  transition: transform 0.5s cubic-bezier(0.23, 1, 0.32, 1);
}

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

.card-category {
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.6);
  opacity: 0;
  transform: translateY(8px);
  transition: opacity 0.4s cubic-bezier(0.23, 1, 0.32, 1) 0.05s,
    transform 0.5s cubic-bezier(0.23, 1, 0.32, 1) 0.05s;
}

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

.card-title {
  font-size: 1.25rem;
  font-weight: 600;
  color: #fff;
  margin: 0;
  opacity: 0;
  transform: translateY(8px);
  transition: opacity 0.4s cubic-bezier(0.23, 1, 0.32, 1) 0.1s,
    transform 0.5s cubic-bezier(0.23, 1, 0.32, 1) 0.1s;
}

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

/* Premium image rendering */
.card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  display: block;
  position: relative;
  z-index: 2;

  /* Sharp rendering */
  image-rendering: -webkit-optimize-contrast;
  backface-visibility: hidden;
  transform: translateZ(0);

  /* Micro-zoom on hover */
  transition: transform 0.6s cubic-bezier(0.23, 1, 0.32, 1);
}

.card:hover img {
  transform: scale(1.05) translateZ(0);
}

/* Responsive */
@media screen and (max-width: 1400px) {
  .card {
    width: 340px;
  }
}

@media screen and (max-width: 1024px) {
  .portfolio-strip {
    padding: 80px 0;
  }

  .card {
    width: 300px;
  }
}

@media screen and (max-width: 768px) {
  .portfolio-strip {
    padding: 60px 0;
    margin: 20px 0;
  }

  .card {
    width: 260px;
  }

  .portfolio-track {
    gap: 20px;
    padding: 0 40px;
  }
}

.project-card:hover .view-btn {
  opacity: 1;
  scale: 1;
  color: #fff;
  background: rgba(255, 255, 255, 0.25);
  border-color: rgba(255, 255, 255, 0.6);
  transform: translate(-50%, -50%) translateZ(80px);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4);
}

.project-card .view-btn svg {
  width: 28px;
  height: 28px;
  transition: transform 0.3s ease;
}

.project-card:hover .view-btn svg {
  transform: scale(1.1);
}

/* Case Study Badge - Top Right */
.case-tag {
  position: absolute;
  top: 20px;
  right: 20px;
  left: auto;
  background: #ffffff;
  color: #000;
  font-size: 0.8rem;
  font-weight: 700;
  padding: 8px 16px;
  border-radius: 99px;
  z-index: 6;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
  opacity: 0.9;
  transform: translateY(0);
  transition: transform 0.5s cubic-bezier(0.16, 1, 0.3, 1), background 0.3s;
}

.project-card:hover .case-tag {
  background: #FF5A38;
  color: #fff;
  transform: translateY(-4px) translateZ(60px);
}

/* Content below image */
.project-card .info {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 24px 28px;
  background: transparent;
  /* Transparent to show card blur */
  min-height: 90px;
}

.project-card .title {
  font-size: 1.35rem;
  font-weight: 700;
  color: #fff;
  letter-spacing: -0.02em;
  margin-bottom: 4px;
}

.project-card .category {
  font-size: 0.95rem;
  color: #888;
  font-weight: 500;
}

.project-item {
  opacity: 0;
  transform: translateY(40px);
  transition: transform 1s cubic-bezier(0.16, 1, 0.3, 1), opacity 1s ease;
  will-change: transform, opacity;
}

.project-item.is-visible {
  opacity: 1;
  transform: translateY(0);
}

/* View More styling match */
.view-more-wrap {
  margin-top: 40px;
  width: 100%;
  display: flex;
  justify-content: center;
}

.view-more-wrap .btn.secondary {
  width: 100%;
  display: block;
  background: #111111;
  color: #fff;
  text-align: center;
  padding: 18px;
  border-radius: 16px;
  font-weight: 600;
  border: 1px solid rgba(255, 255, 255, 0.08);
  transition: all 0.2s;
}

.view-more-wrap .btn.secondary:hover {
  background: #1a1a1a;
  border-color: rgba(255, 255, 255, 0.2);
  transform: translateY(-2px);
}

@media (max-width:1024px) {
  .projects-grid {
    grid-template-columns: repeat(2, 1fr)
  }
}

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

  .selected-work {
    padding-top: 90px;
    padding-bottom: 40px
  }

  .selected-work .section-title {
    font-size: 1.6rem
  }

  /* allow the long hero name to wrap on small screens */
  .name {
    white-space: normal
  }
}

/* Scroll Triggered Reveal Animation */
.reveal-text {
  overflow: hidden;
}

.reveal-text span {
  display: inline-block;
  transform: translateY(110%);
  opacity: 0;
  transition: transform 1.4s cubic-bezier(0.16, 1, 0.3, 1), opacity 1s ease;
  will-change: transform, opacity;
}

.reveal-text.active span {
  transform: translateY(0);
  opacity: 1;
}

.reveal-text span:nth-child(2) {
  transition-delay: 0.1s;
}

/* --- About Me Section --- */
.about-me {
  padding: 100px 6vw;
  background: #000;
  position: relative;
  overflow: hidden;
}

.about-me .container {
  align-items: flex-start;
  text-align: left;
  padding: 0;
}

.about-header {
  margin-bottom: 60px;
  text-align: left;
  width: 100%;
}

.about-header .section-title {
  font-size: clamp(2.5rem, 5vw, 4rem);
  font-weight: 700;
  margin: 0;
  color: #fff;
  text-align: left;
}

.about-header .section-subtitle {
  font-size: clamp(1.1rem, 1.35vw, 1.25rem);
  color: var(--muted);
  margin-top: 24px;
  line-height: 1.62;
  font-weight: 400;
  max-width: 820px;
  text-transform: none;
  letter-spacing: normal;
  display: block;
  width: 100%;
}

/* Bento Grid */
.about-grid {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  grid-auto-rows: minmax(min-content, auto);
  gap: 16px;
  width: 100%;
  perspective: 1000px;
}

/* Card Base Styles */
.about-card {
  position: relative;
  background: var(--card-bg);
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: 24px;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  overflow: hidden;
  transition: transform 0.1s ease-out, opacity 0.6s ease, border-color 0.4s ease, box-shadow 0.4s ease;
  opacity: 0;
  transform: translateY(30px) rotateX(var(--tilt-x, 0deg)) rotateY(var(--tilt-y, 0deg));
  transform-style: preserve-3d;
  will-change: transform;
  grid-column: span 12;
  /* Default to full width for mobile-first */
}

.about-card.visible {
  opacity: 1;
  transform: translateY(0) rotateX(var(--tilt-x, 0deg)) rotateY(var(--tilt-y, 0deg));
}

.card-inner {
  padding: clamp(24px, 4vw, 40px);
  height: 100%;
  display: flex;
  flex-direction: column;
  position: relative;
  z-index: 2;
}

/* Spotlight Glow Layer */
.about-card::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at var(--mouse-x, 50%) var(--mouse-y, 50%),
      rgba(255, 255, 255, 0.08) 0%,
      transparent 60%);
  opacity: 0;
  transition: opacity 0.3s ease;
  pointer-events: none;
  z-index: 1;
}

@media (hover: hover) and (pointer: fine) {
  .about-card:hover::before {
    opacity: 1;
  }

  .about-card:hover {
    border-color: rgba(255, 255, 255, 0.2);
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.5);
  }
}

.card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 32px;
  width: 100%;
}

.card-header.center {
  justify-content: center;
}

.card-label {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--muted);
  letter-spacing: 0.1em;
  margin-bottom: 24px;
  text-transform: uppercase;
}

.card-header.center .card-label {
  margin-bottom: 0;
  text-align: center;
}

/* Specific Card Decorations */
.card-impact::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent, #8B5CF6, #59a6ff, transparent);
  opacity: 0.3;
}

.card-capabilities::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent, #FF5A38, #FF5A38, transparent);
  opacity: 0.3;
}

/* Education List Styling */
.edu-list {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.edu-item h4 {
  font-size: 1.15rem;
  font-weight: 600;
  color: #fff;
  margin: 0 0 4px;
}

.edu-item p {
  font-size: 0.95rem;
  color: var(--muted);
  margin: 0;
}

.card-divider {
  width: 100%;
  height: 1px;
  background: rgba(255, 255, 255, 0.08);
  margin: 32px 0;
}

.cert-row {
  display: flex;
  gap: 32px;
  flex-wrap: wrap;
}

.cert-item {
  display: flex;
  align-items: center;
  gap: 14px;
}

.cert-logo {
  width: 36px;
  height: 36px;
  background: rgba(255, 255, 255, 0.03);
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 8px;
  border: 1px solid rgba(255, 255, 255, 0.05);
}

.cert-logo img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.cert-info {
  display: flex;
  flex-direction: column;
}

.cert-name {
  font-size: 0.95rem;
  font-weight: 600;
  color: #fff;
}

.cert-org {
  font-size: 0.8rem;
  color: var(--muted);
}

/* Achievements Styling */
.achievements-list {
  display: flex;
  flex-direction: column;
  gap: 28px;
}

.achievement-item {
  display: flex;
  gap: 16px;
  position: relative;
  padding-left: 18px;
}

.achievement-item::before {
  content: '';
  position: absolute;
  left: 0;
  top: 10px;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--muted);
  opacity: 0.4;
}

.achievement-text h4 {
  font-size: 1.1rem;
  font-weight: 600;
  color: #fff;
  margin: 0 0 8px;
  line-height: 1.3;
}

.achievement-text p {
  font-size: 0.9rem;
  color: var(--muted);
  margin: 0;
}

.winner-badge {
  display: inline-block;
  font-size: 0.65rem;
  font-weight: 700;
  padding: 3px 8px;
  background: rgba(89, 166, 255, 0.15);
  color: #59a6ff;
  border-radius: 4px;
  margin-bottom: 8px;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  border: 1px solid rgba(89, 166, 255, 0.15);
}

/* Desktop Spans (>1024px) */
@media screen and (min-width: 1025px) {
  .card-impact {
    grid-column: span 6;
  }

  .card-tools {
    grid-column: span 6;
  }

  .card-reach {
    grid-column: span 3;
  }

  .card-capabilities {
    grid-column: span 6;
  }

  .card-process {
    grid-column: span 3;
  }

  .card-education {
    grid-column: span 8;
  }

  .card-achievements {
    grid-column: span 4;
  }
}

/* Tablet Spans (768px - 1024px) */
@media screen and (max-width: 1024px) {

  .card-impact,
  .card-tools,
  .card-capabilities,
  .card-education {
    grid-column: span 12;
  }

  .card-reach,
  .card-process,
  .card-achievements {
    grid-column: span 6;
  }

  .about-me {
    padding: 80px 4vw;
  }
}

/* Mobile Adjustments (<768px) */
@media screen and (max-width: 767px) {
  .about-card {
    grid-column: span 12 !important;
  }

  .about-header {
    margin-bottom: 40px;
  }

  .impact-stats {
    flex-direction: column;
    gap: 32px;
  }

  .cert-row {
    gap: 20px;
  }

  .process-steps {
    flex-direction: column;
    align-items: flex-start;
    gap: 24px;
  }

  .process-arrow {
    display: none;
  }
}

/* 1. Impact Stats */
.impact-stats {
  display: flex;
  flex-direction: row;
  gap: 60px;
  margin-top: auto;
}

.stat-item {
  display: flex;
  flex-direction: column;
}

.stat-item h3 {
  font-size: 3.8rem;
  /* Slightly larger as per image */
  font-weight: 700;
  margin: 0;
  line-height: 1;
  letter-spacing: -0.04em;
}

.stat-item h3 span {
  font-size: 0.7em;
  margin-left: 2px;
  vertical-align: super;
  /* Aligning + higher as per image */
}

.stat-item h3 span.plus-blue {
  color: #59a6ff;
}

.stat-item h3 span.plus-green {
  color: #34D399;
}

.stat-item p {
  color: var(--muted);
  font-size: 0.9rem;
  font-weight: 500;
  margin: 12px 0 0 0;
  text-transform: capitalize;
}

.card-impact .card-icon {
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: rgba(89, 166, 255, 0.8);
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(255, 255, 255, 0.02);
  border-radius: 14px;
}

/* 2. Tools Marquee */
.marquee-container {
  overflow: hidden;
  position: relative;
  width: 100%;
  padding: 20px 0;
  mask-image: linear-gradient(to right, transparent, black 15%, black 85%, transparent);
  -webkit-mask-image: linear-gradient(to right, transparent, black 15%, black 85%, transparent);
}

.marquee-content {
  display: flex;
  gap: 60px;
  width: max-content;
  animation: marquee-scroll 30s linear infinite;
}

.marquee-container:hover .marquee-content {
  animation-play-state: paused;
}

.tool-logo {
  flex: 0 0 auto;
  opacity: 0.5;
  /* Slightly increased for better visibility */
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  display: flex;
  align-items: center;
  justify-content: center;
  color: rgba(255, 255, 255, 0.8);
  font-weight: 700;
  font-size: 0.75rem;
  letter-spacing: 0.05em;
}

.tool-logo:hover {
  opacity: 1;
  transform: scale(1.1) translateY(-2px);
  color: #fff;
}

.tool-logo img {
  height: 32px;
  width: auto;
  filter: grayscale(1) brightness(1.5);
  /* Unified white look */
  transition: filter 0.3s ease;
}

.tool-logo:hover img {
  filter: grayscale(0) brightness(1);
  /* Original color on hover for "wow" effect, or keep grayscale? */
  /* User said "keep all the icons colors same", so maybe keep grayscale(1) but brighter? */
  filter: grayscale(1) brightness(2);
}

@keyframes marquee-scroll {
  0% {
    transform: translateX(0);
  }

  100% {
    transform: translateX(-50%);
  }
}

/* 3. Global Reach */
.card-reach .card-inner {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 16px;
  padding: 32px 28px;
  height: 100%;
}

.globe-container {
  position: relative;
  width: 100%;
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 140px;
}

#globeCanvas {
  width: 100% !important;
  height: 100% !important;
  display: block;
  cursor: grab;
}

#globeCanvas:active {
  cursor: grabbing;
}

.reach-content {
  width: 100%;
  text-align: center;
}

.reach-title {
  font-size: 1.15rem;
  font-weight: 600;
  margin: 0;
  line-height: 1.3;
  letter-spacing: -0.01em;
  color: #fff;
}

.reach-title .highlight-number {
  color: var(--accent);
  font-weight: 700;
}

/* 4. Capabilities / Chips */
.chips-container {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.chip {
  padding: 8px 16px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 99px;
  font-size: 0.8rem;
  color: #fff;
  transition: all 0.3s ease;
  cursor: default;
}

.chip:hover {
  background: rgba(89, 166, 255, 0.1);
  border-color: rgba(89, 166, 255, 0.3);
  box-shadow: 0 0 15px rgba(89, 166, 255, 0.15);
  transform: translateY(-2px);
}

.process-steps {
  display: flex;
  align-items: center;
  justify-content: center;
  /* Changed from space-between for better centering control */
  margin: 32px auto 0;
  /* Center the container itself if width is restricted */
  gap: 0;
  width: 100%;
  position: relative;
}

.step {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  /* Tighter gap */
  flex: 0 0 auto;
  position: relative;
  z-index: 2;
}

.step-icon {
  width: 48px;
  height: 48px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: rgba(255, 255, 255, 0.5);
  transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.step-icon svg {
  width: 20px;
  height: 20px;
}

.step:hover .step-icon {
  color: #fff;
  background: rgba(89, 166, 255, 0.1);
  border-color: rgba(89, 166, 255, 0.4);
  transform: translateY(-4px);
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.3);
}

.step span {
  font-size: 0.6rem;
  font-weight: 700;
  color: var(--muted);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  transition: color 0.3s ease;
}

.step:hover span {
  color: #fff;
}

.process-arrow {
  width: 20px;
  /* Using fixed width for arrows to keep spacing perfectly consistent */
  height: 1px;
  background: rgba(255, 255, 255, 0.1);
  margin: 0 10px;
  /* Constant gap between icon and arrow */
  position: relative;
  top: -14px;
}

@media (max-width: 480px) {
  .process-arrow {
    display: none;
  }

  .process-steps {
    justify-content: center;
    gap: 24px;
    flex-wrap: wrap;
  }

  .step {
    width: calc(50% - 12px);
  }
}

/* Responsive */
@media (max-width: 1024px) {
  .about-grid {
    grid-template-columns: repeat(2, 1fr);
    grid-auto-rows: auto;
  }

  .card-impact {
    grid-column: span 1;
    grid-row: span 2;
  }

  .card-tools {
    grid-column: span 1;
    grid-row: span 1;
  }

  .card-reach {
    grid-column: span 1;
    grid-row: span 2;
  }

  .card-capabilities {
    grid-column: span 2;
    grid-row: span 1;
  }

  .card-process {
    grid-column: span 1;
    grid-row: span 1;
  }
}

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

  .card-impact,
  .card-tools,
  .card-reach,
  .card-capabilities,
  .card-process {
    grid-column: span 1;
    grid-row: span 1;
  }

  .about-me {
    padding: 60px 4vw;
  }

  .impact-stats {
    flex-direction: column;
    gap: 32px;
    margin-top: 32px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .marquee-content {
    animation: none;
  }

  .about-card {
    transition: none;
    transform: none;
    opacity: 1;
  }
}

/* ============================================
   CAPABILITIES SECTION (HORIZONTAL SCROLL)
   ============================================ */

.capabilities {
  position: relative;
  width: 100%;
  background: #000;
  overflow: visible;
  overflow-x: clip;
  /* Prevent horizontal scrollbar without breaking sticky */
}

/* Spacer creates vertical scroll space */
.capabilities-spacer {
  position: relative;
  width: 100%;
  /* Height calculated by JS: panels × 150vh */
  /* Default fallback for initial render: 5 panels × 150vh = 750vh */
  height: 750vh;
}

/* Sticky container pins to viewport */
.capabilities-sticky {
  position: sticky;
  top: 0;
  height: 100vh;
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  background: #000;
  z-index: 50;
  /* Lower than topnav but high enough for content */

  /* GPU acceleration for smooth scrolling */
  will-change: transform;
  transform: translate3d(0, 0, 0);
  -webkit-transform: translate3d(0, 0, 0);
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
  perspective: 1000px;
  -webkit-perspective: 1000px;
}

/* === INTRO SLIDE (First 100vh) === */
.capabilities-intro {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 0 6vw;
  opacity: 1;
  transition: opacity 0.6s cubic-bezier(0.16, 1, 0.3, 1);
  pointer-events: none;
  z-index: 2;
  overflow: hidden;

  /* Animated Mesh Gradient Background */
  background: #000;
}

/* Dynamic background blobs */
.capabilities-intro::before,
.capabilities-intro::after {
  content: '';
  position: absolute;
  width: 80vmax;
  height: 80vmax;
  border-radius: 50%;
  filter: blur(100px);
  z-index: -1;
  opacity: 0.15;
  animation: mesh-float 20s infinite alternate ease-in-out;
}

.capabilities-intro::before {
  background: radial-gradient(circle, #3870ff 0%, transparent 70%);
  top: -20%;
  left: -10%;
}

.capabilities-intro::after {
  background: radial-gradient(circle, #FF5A38 0%, transparent 70%);
  bottom: -20%;
  right: -10%;
  animation-delay: -10s;
}

@keyframes mesh-float {
  0% {
    transform: translate(0, 0) scale(1) rotate(0deg);
  }

  33% {
    transform: translate(10%, 15%) scale(1.1) rotate(5deg);
  }

  66% {
    transform: translate(-5%, 10%) scale(0.9) rotate(-3deg);
  }

  100% {
    transform: translate(0, 0) scale(1) rotate(0deg);
  }
}

.capabilities-intro.fade-out {
  opacity: 0;
  pointer-events: none;
}

.capabilities-label {
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.3em;
  color: rgba(255, 255, 255, 0.3);
  margin-bottom: 40px;
  animation: fadeSlideDown 1s cubic-bezier(0.16, 1, 0.3, 1) 0.2s both;
}

.capabilities-hero-title {
  font-family: 'Outfit', sans-serif;
  font-size: clamp(3.2rem, 9vw, 9.5rem);
  font-weight: 800;
  color: #fff;
  text-align: center;
  line-height: 1.1;
  padding: 0 0.05em;
  letter-spacing: -0.05em;
  max-width: 1100px;
  margin: 0;
  text-transform: none;

  /* Vibrant Gradient Text */
  background: linear-gradient(to right,
      #fff 20%,
      #59a6ff 40%,
      #FF5A38 60%,
      #fff 80%);
  background-size: 200% auto;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;

  animation: fadeSlideUp 1s cubic-bezier(0.16, 1, 0.3, 1) 0.4s both,
    text-gradient-flow 8s linear infinite;
}

@keyframes text-gradient-flow {
  to {
    background-position: 200% center;
  }
}

.scroll-indicator {
  position: absolute;
  bottom: 60px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  animation: fadeSlideUp 1s cubic-bezier(0.16, 1, 0.3, 1) 0.6s both, bounce 2s ease-in-out 1.5s infinite;
}

.scroll-text {
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.15em;
  color: rgba(255, 255, 255, 0.4);
  text-transform: uppercase;
}

.scroll-arrow {
  width: 24px;
  height: 24px;
  color: rgba(255, 255, 255, 0.5);
}

@keyframes fadeSlideDown {
  from {
    opacity: 0;
    transform: translateY(-20px);
  }

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

@keyframes fadeSlideUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }

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

@keyframes bounce {

  0%,
  100% {
    transform: translateY(0);
  }

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

/* === PANELS WRAPPER (Second stage) === */
.capabilities-panels-wrapper {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  opacity: 0;
  transition: opacity 0.6s cubic-bezier(0.16, 1, 0.3, 1);
  pointer-events: none;
  z-index: 1;

  /* Subtle gradient */
  background: radial-gradient(ellipse at 30% 50%, rgba(56, 112, 255, 0.05) 0%, transparent 70%),
    #000;
}

.capabilities-panels-wrapper.active {
  opacity: 1;
  pointer-events: auto;
  z-index: 3;
  /* Move above intro when active */
}

.capabilities-content-wrapper {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 60px;
}

.capabilities-header {
  pointer-events: auto;
}

.capabilities-header .section-title {
  font-size: clamp(2.5rem, 5vw, 4rem);
  font-weight: 700;
  margin: 0;
  color: #fff;
  text-align: left;
  opacity: 0.95;
  position: relative;
  padding-bottom: 12px;
}

/* Subtle accent line */
.capabilities-header .section-title::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 60px;
  height: 2px;
  background: linear-gradient(90deg, rgba(89, 166, 255, 0.6), transparent);
}

.sect-label {
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.2em;
  color: rgba(255, 255, 255, 0.4);
}

.capabilities-rail {
  display: flex;
  align-items: center;
  width: max-content;
  padding: 0 10vw 0 6vw;
  position: absolute;
  top: 50%;
  left: 0;

  /* Smooth GPU-accelerated transforms */
  will-change: transform;
  transform: translate3d(0, -50%, 0);
  -webkit-transform: translate3d(0, -50%, 0);
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
}

.service-panel {
  position: relative;
  width: 80vw;
  /* Wide panels */
  max-width: 1200px;
  padding-right: 15vw;
  flex-shrink: 0;
  cursor: pointer;
  transition: opacity 0.6s cubic-bezier(0.16, 1, 0.3, 1), transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

/* Add subtle glow on hover */
.service-panel::before {
  content: '';
  position: absolute;
  top: -20px;
  left: -20px;
  right: 15vw;
  bottom: -20px;
  background: radial-gradient(ellipse at center, rgba(89, 166, 255, 0.1) 0%, transparent 70%);
  opacity: 0;
  transition: opacity 0.8s cubic-bezier(0.16, 1, 0.3, 1);
  pointer-events: none;
  z-index: -1;
}

.service-panel:hover::before {
  opacity: 1;
}

/* Non-hovered state: faded */
.capabilities-rail:hover .service-panel {
  opacity: 0.35;
}

/* Hovered panel: full opacity */
.capabilities-rail .service-panel:hover {
  opacity: 1;
  transform: translateX(8px);
}

.panel-content {
  position: relative;
  z-index: 2;
}

.panel-index {
  position: absolute;
  top: -40px;
  left: -20px;
  font-size: clamp(8rem, 15vw, 15rem);
  font-weight: 900;
  color: #fff;
  opacity: 0.06;
  /* 5-8% as requested */
  z-index: -1;
  pointer-events: none;
  line-height: 1;
  user-select: none;
}

.panel-title {
  font-family: 'Outfit', sans-serif;
  font-size: clamp(2.8rem, 7vw, 7.5rem);
  font-weight: 800;
  color: #fff;
  margin: 0;
  line-height: 1.1;
  padding-bottom: 0.1em;
  letter-spacing: -0.05em;
  text-transform: none;

  /* Gradient text effect */
  background: linear-gradient(135deg, #fff 0%, rgba(255, 255, 255, 0.8) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;

  position: relative;
  transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

/* Subtle shimmer on hover */
.service-panel:hover .panel-title {
  background: linear-gradient(135deg, #fff 0%, #e0f0ff 50%, #fff 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  background-size: 200% 100%;
  animation: shimmer 3s linear infinite;
}

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

  100% {
    background-position: -200% 0;
  }
}

.panel-desc {
  font-size: clamp(1rem, 1.2vw, 1.25rem);
  color: rgba(255, 255, 255, 0.62);
  margin-top: 32px;
  max-width: 500px;
  font-weight: 400;
  line-height: 1.5;
}

.panel-divider {
  width: 100%;
  height: 1px;
  background: rgba(255, 255, 255, 0.1);
  margin-top: 48px;
  position: relative;
  overflow: hidden;
}

.panel-divider::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: #fff;
  transform: translateX(-101%);
  transition: transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

.service-panel:hover .panel-divider::after {
  transform: translateX(0);
}

/* --- Floating Image Preview --- */
.hover-preview {
  position: fixed;
  top: 0;
  left: 0;
  width: 320px;
  /* Base width for 4:3 */
  height: 240px;
  pointer-events: none;
  z-index: 9999;
  opacity: 0;
  transform: scale(0.96);
  transition: opacity 0.4s ease, transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
  border-radius: 14px;
  overflow: hidden;
  background: #111;
  will-change: transform, opacity;
}

.hover-preview.active {
  opacity: 1;
  transform: scale(1);
}

.preview-image-container {
  width: 100%;
  height: 100%;
  position: relative;
}

.preview-img {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0;
  transition: opacity 0.8s ease;
  filter: brightness(0.9);
}

.preview-img.active {
  opacity: 1;
}

.preview-vignette {
  position: absolute;
  inset: 0;
  background: radial-gradient(circle, transparent 20%, rgba(0, 0, 0, 0.4) 100%);
  pointer-events: none;
}

.preview-grain {
  position: absolute;
  inset: 0;
  background-image: url("https://grainy-gradients.vercel.app/noise.svg");
  opacity: 0.15;
  pointer-events: none;
  mix-blend-mode: overlay;
}

.preview-glow {
  position: absolute;
  inset: -20px;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.1), transparent 70%);
  filter: blur(20px);
  z-index: -1;
}

/* --- Mobile / Tablet Overrides --- */

.mobile-image-reveal {
  display: none;
  width: 100%;
  margin-top: 24px;
  border-radius: 12px;
  overflow: hidden;
  height: 0;
  transition: height 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

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

@media (max-width: 1024px) {
  .service-panel {
    width: 60vw;
    padding-right: 10vw;
  }

  .panel-title {
    font-size: clamp(2rem, 5vw, 4rem);
  }
}

@media (min-width: 769px) and (max-width: 1024px) {
  .service-panel {
    width: 90vw;
    padding-right: 10vw;
  }
}

@media (max-width: 768px) {
  .capabilities {
    overflow: visible;
  }

  .capabilities-spacer {
    height: auto !important;
  }

  .capabilities-sticky {
    position: relative;
    height: auto;
    padding: 60px 24px;
    overflow: visible;
    display: block;
    /* Stack vertically */
  }

  .capabilities-intro {
    position: relative;
    height: auto;
    padding: 0 0 40px 0;
    opacity: 1 !important;
    pointer-events: auto;
    background: transparent;
    display: block;
  }

  .capabilities-hero-title {
    font-size: 3rem;
    text-align: left;
    margin-bottom: 20px;
  }

  .capabilities-label {
    margin-bottom: 12px;
    text-align: left;
    display: block;
  }

  .scroll-indicator {
    display: none;
  }

  .capabilities-panels-wrapper {
    position: relative;
    height: auto;
    opacity: 1 !important;
    pointer-events: auto;
    background: transparent;
    display: block;
    z-index: 1;
  }

  .capabilities-nav {
    display: none;
    /* Hide desktop specific nav */
  }

  .capabilities-rail {
    position: relative;
    top: 0;
    left: 0;
    transform: none !important;
    -webkit-transform: none !important;
    flex-direction: column;
    width: 100%;
    padding: 0;
    display: flex;
  }

  .service-panel {
    width: 100%;
    max-width: 100%;
    padding-right: 0;
    margin-bottom: 80px;
    opacity: 1 !important;
    transform: none !important;
  }

  .panel-index {
    position: relative;
    top: 0;
    left: 0;
    font-size: 3.5rem;
    margin-bottom: 8px;
    display: block;
    opacity: 0.2;
  }

  .panel-title {
    font-size: clamp(2rem, 10vw, 3rem) !important;
    line-height: 1.1;
  }

  .panel-desc {
    margin-top: 20px;
    font-size: 1.1rem;
    opacity: 0.7;
    max-width: 100%;
  }

  .mobile-image-reveal {
    margin-top: 30px;
    border-radius: 12px;
    overflow: hidden;
    height: 300px;
    display: block;
  }

  .capabilities-rail:hover .service-panel {
    opacity: 1;
  }
}

/* ============================================
   CONTACT / CTA SECTION
   ============================================ */

.contact-cta {
  position: relative;
  padding: 160px 0;
  background: #202026;
  overflow: hidden;
  opacity: 0;
  transform: translateY(40px);
  transition: opacity 1.2s ease, transform 1.2s cubic-bezier(0.16, 1, 0.3, 1);
  will-change: opacity, transform;
}

.contact-cta.active {
  opacity: 1;
  transform: translateY(0);
}

.contact-cta .container {
  opacity: 0;
  transform: translateY(20px);
  transition: all 1s cubic-bezier(0.16, 1, 0.3, 1) 0.3s;
}

.contact-cta.active .container {
  opacity: 1;
  transform: translateY(0);
}

/* Diagonal / Grain Texture */
.contact-cta::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image:
    repeating-linear-gradient(45deg, rgba(255, 255, 255, 0.01) 0, rgba(255, 255, 255, 0.01) 1px, transparent 1px, transparent 10px),
    url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noiseFilter'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.65' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noiseFilter)'/%3E%3C/svg%3E");
  opacity: 0.15;
  pointer-events: none;
  mix-blend-mode: overlay;
}

.contact-grid {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 80px;
  text-align: left;
  width: 100%;
}

.contact-left {
  flex: 1;
  max-width: 600px;
}

.contact-title {
  font-size: clamp(3.5rem, 8vw, 6.5rem);
  line-height: 1.1;
  /* Increased from 0.95 to prevent cropping */
  font-weight: 700;
  margin-bottom: 32px;
  letter-spacing: -0.04em;
  color: #fff;
  padding-bottom: 0.1em;
  /* Extra buffer for descenders */
}

/* Specific color for last word in title */
.contact-title span:last-child {
  color: #FF5A38 !important;
}

.contact-desc {
  font-family: 'Instrument Sans', sans-serif;
  font-size: clamp(1.1rem, 1.8vw, 1.4rem);
  color: var(--muted);
  line-height: 1.5;
  max-width: 480px;
}

.contact-right {
  flex: 0 0 450px;
  display: flex;
  flex-direction: column;
  gap: 40px;
}

.contact-method-outer {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

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

.contact-link {
  font-size: clamp(1.5rem, 3vw, 2.8rem);
  font-weight: 500;
  color: #fff;
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 16px;
  transition: all 0.4s cubic-bezier(0.23, 1, 0.32, 1);
  position: relative;
  /* For tooltip positioning */
}

.contact-link:hover {
  color: var(--accent);
  transform: translateX(10px);
}

.copy-feedback {
  position: absolute;
  left: 0;
  top: -40px;
  /* Positioned above the link */
  font-size: 0.85rem;
  font-weight: 600;
  color: #34D399;
  background: rgba(52, 211, 153, 0.1);
  border: 1px solid rgba(52, 211, 153, 0.2);
  padding: 6px 14px;
  border-radius: 12px;
  pointer-events: none;
  opacity: 0;
  transform: translateY(10px);
  transition: all 0.4s cubic-bezier(0.23, 1, 0.32, 1);
  white-space: nowrap;
  backdrop-filter: blur(8px);
}

.copy-feedback.show {
  opacity: 1;
  transform: translateY(0);
}

.action-icon {
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0.5;
  transition: all 0.3s ease;
}

.contact-link:hover .action-icon {
  opacity: 1;
  transform: translate(4px, -4px);
}

.item-divider {
  height: 1px;
  background: rgba(255, 255, 255, 0.08);
  width: 100%;
}

/* WhatsApp CTA */
.whatsapp-cta {
  display: flex;
  align-items: center;
  gap: 24px;
  text-decoration: none;
  color: #fff;
  padding: 24px;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: 20px;
  transition: all 0.4s cubic-bezier(0.23, 1, 0.32, 1);
}

.whatsapp-cta:hover {
  background: rgba(255, 255, 255, 0.05);
  border-color: rgba(255, 255, 255, 0.1);
  transform: translateY(-5px);
}

.whatsapp-icon-wrap {
  width: 56px;
  height: 56px;
  border-radius: 16px;
  background: rgba(52, 211, 153, 0.1);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #34D399;
}

.wa-content {
  flex: 1;
}

.wa-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.wa-title {
  font-size: 1.25rem;
  font-weight: 600;
}

.wa-arrow {
  width: 20px;
  height: 20px;
  opacity: 0.4;
  transform: translateX(-5px);
  transition: all 0.3s ease;
}

.whatsapp-cta:hover .wa-arrow {
  opacity: 1;
  transform: translateX(0);
}

.wa-subtext {
  font-size: 0.95rem;
  color: var(--muted);
  margin: 4px 0 0 0;
}

.reply-indicator {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 16px;
  padding-left: 24px;
}

.online-dot {
  width: 8px;
  height: 8px;
  background: #34D399;
  border-radius: 50%;
  position: relative;
}

.online-dot::after {
  content: '';
  position: absolute;
  inset: -4px;
  background: #34D399;
  border-radius: 50%;
  opacity: 0.4;
  animation: wa-pulse 2s infinite;
}

@keyframes wa-pulse {
  0% {
    transform: scale(1);
    opacity: 0.4;
  }

  100% {
    transform: scale(2.2);
    opacity: 0;
  }
}

.reply-text {
  font-size: 0.85rem;
  color: var(--muted);
}

/* Responsiveness */
@media screen and (max-width: 1024px) {
  .contact-cta {
    padding: 120px 0;
  }

  .contact-grid {
    flex-direction: column;
    gap: 60px;
  }

  .contact-right {
    width: 100%;
    flex: none;
    max-width: 500px;
  }
}

@media screen and (max-width: 768px) {
  .contact-cta {
    padding: 80px 0;
  }

  .contact-title {
    font-size: clamp(3rem, 12vw, 4rem);
  }

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

  .whatsapp-cta {
    padding: 20px;
  }

  .whatsapp-icon-wrap {
    width: 48px;
    height: 48px;
  }
}

/* ============================================
   PREMIUM FOOTER (Ultra-Wide Cinematic)
   ============================================ */

.footer-premium {
  position: relative;
  background: #000;
  padding: 0;
  overflow: hidden;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
}

/* Service Ticker */
.footer-ticker-wrap {
  width: 100%;
  overflow: hidden;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  background: rgba(255, 255, 255, 0.01);
  padding: 10px 0;
  margin-bottom: 40px;
}

.footer-ticker {
  display: flex;
  white-space: nowrap;
  animation: footerTicker 50s linear infinite;
}

.ticker-item {
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.2em;
  color: rgba(255, 255, 255, 0.35);
  padding: 0 40px;
  text-transform: uppercase;
}

.ticker-divider {
  color: rgba(255, 255, 255, 0.05);
}

@keyframes footerTicker {
  0% {
    transform: translate3d(0, 0, 0);
  }

  100% {
    transform: translate3d(-50%, 0, 0);
  }
}

.footer-interior {
  position: relative;
  z-index: 2;
  width: 100% !important;
  max-width: 100vw !important;
  margin: 0 !important;
  padding: 0 4vw !important;
  /* Slightly tighter edges for extra-wide feel */
  display: flex !important;
  flex-direction: column !important;
  align-items: stretch !important;
  /* Force children to take full width */
}

.footer-grid {
  display: flex !important;
  justify-content: space-between !important;
  align-items: flex-start;
  margin-bottom: 40px;
  gap: 20px;
  width: 100%;
}

.footer-brand-column {
  text-align: left;
  flex: 0 1 auto;
}

.footer-logo {
  height: clamp(40px, 6vw, 60px);
  /* Height instead of font-size */
  width: auto;
  margin-bottom: 24px;
  display: block;
}

.footer-descriptor {
  font-family: 'Instrument Sans', sans-serif;
  font-size: 1.05rem;
  line-height: 1.5;
  color: rgba(255, 255, 255, 0.25);
  max-width: 420px;
  margin-bottom: 32px;
}

.footer-socials {
  display: flex;
  gap: 24px;
  justify-content: flex-start;
}

.social-link {
  color: rgba(255, 255, 255, 0.3);
  transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
  text-decoration: none;
  font-weight: 600;
  font-size: 1.1rem;
}

.social-link svg {
  width: 20px;
  height: 20px;
}

.social-link:hover {
  color: #fff;
  transform: translateY(-5px);
}

.footer-nav-column {
  text-align: right;
  flex: 0 1 auto;
}

.footer-label {
  display: block;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.3em;
  color: rgba(255, 255, 255, 0.3);
  margin-bottom: 24px;
  text-transform: uppercase;
}

.footer-links {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 16px;
  align-items: flex-end;
}

.footer-links a {
  font-size: 1.2rem;
  font-weight: 500;
  color: #fff;
  text-decoration: none;
  opacity: 0.4;
  transition: all 0.3s ease;
}

.footer-links a:hover {
  opacity: 1;
  transform: translateX(-5px);
}

.footer-bottom {
  display: flex !important;
  justify-content: space-between !important;
  align-items: center !important;
  width: 100% !important;
  padding: 20px 0 !important;
  border-top: 1px solid rgba(255, 255, 255, 0.04) !important;
  color: rgba(255, 255, 255, 0.35) !important;
  /* Increased from 0.1 */
  font-size: 0.9rem !important;
  /* Increased from 0.75rem */
}

.designer-credit span {
  color: rgba(255, 255, 255, 0.7);
  font-weight: 600;
}

/* Footer Reveal effects */
.footer-premium [data-reveal] {
  opacity: 0;
  transform: translateY(30px) scale(0.98);
  transition: all 1.2s cubic-bezier(0.16, 1, 0.3, 1);
  will-change: transform, opacity;
}

.footer-premium.active [data-reveal] {
  opacity: 1;
  transform: translateY(0) scale(1);
}

.footer-premium.active .footer-ticker-wrap {
  transition-delay: 0.1s;
}

.footer-premium.active .footer-logo {
  transition-delay: 0.2s;
}

.footer-premium.active .footer-descriptor {
  transition-delay: 0.3s;
}

.footer-premium.active .footer-socials {
  transition-delay: 0.4s;
}

.footer-premium.active .footer-nav-column {
  transition-delay: 0.5s;
}

.footer-premium.active .footer-bottom {
  transition-delay: 0.7s;
}

/* Responsiveness */
@media screen and (max-width: 768px) {
  .footer-ticker-wrap {
    margin-bottom: 40px;
  }

  .footer-grid {
    flex-direction: column;
    gap: 60px;
    margin-bottom: 60px;
    text-align: center;
    align-items: center;
  }

  .footer-brand-column {
    text-align: center;
  }

  .footer-logo {
    margin: 0 auto 24px;
    display: block;
  }

  .footer-descriptor {
    margin: 0 auto 32px;
  }

  .footer-socials {
    justify-content: center;
  }

  .footer-nav-column {
    text-align: center;
    align-items: center;
  }

  .footer-links {
    align-items: center;
  }

  .footer-bottom {
    flex-direction: column;
    gap: 16px;
    text-align: center;
    padding: 30px 5%;
  }
}

/* ===================================================================
   PERFORMANCE: Skip rendering work for off-screen sections
   content-visibility: auto tells the browser to defer layout/paint
   for elements not in (or near) the viewport.
   =================================================================== */
#selected-work {
  content-visibility: auto;
  contain-intrinsic-size: auto 800px;
}

#about {
  content-visibility: auto;
  contain-intrinsic-size: auto 1200px;
}

#capabilities {
  content-visibility: auto;
  contain-intrinsic-size: auto 600px;
}

.capabilities-spacer {
  content-visibility: auto;
  contain-intrinsic-size: auto 1000px;
}

#contact {
  content-visibility: auto;
  contain-intrinsic-size: auto 500px;
}

.footer-premium {
  content-visibility: auto;
  contain-intrinsic-size: auto 400px;
}