/* ============================================================
   KAIF KHAN — Portfolio Design System
   Dark luxury • Cinematic typography • Glassmorphism
   ============================================================ */

/* -----------------------------------------------------------
   1. CSS Custom Properties
   ----------------------------------------------------------- */
:root {
  /* Colors */
  --bg:              #000000;
  --text-primary:    #ffffff;
  --text-secondary:  #888888;
  --text-muted:      #555555;
  --accent-cyan:     #00f0ff;
  --accent-violet:   #8b5cf6;
  --accent-gold:     #f59e0b;

  /* Glass */
  --glass-bg:        rgba(255, 255, 255, 0.03);
  --glass-border:    rgba(255, 255, 255, 0.08);
  --glass-highlight: rgba(255, 255, 255, 0.05);
  --glass-blur:      20px;

  /* Typography */
  --font-heading: 'Space Grotesk', sans-serif;
  --font-body:    'Inter', sans-serif;
  --fs-hero:          clamp(4rem, 12vw, 12rem);
  --fs-section-title: clamp(2.5rem, 5vw, 4.5rem);
  --fs-body:          1rem;
  --fs-small:         0.85rem;
  --fs-label:         0.75rem;

  /* Layout */
  --container-width:  1400px;
  --section-padding:  clamp(80px, 12vh, 160px);

  /* Easing */
  --ease-out-expo:  cubic-bezier(0.16, 1, 0.3, 1);
  --ease-out-quart: cubic-bezier(0.25, 1, 0.5, 1);
}

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

html {
  scroll-behavior: auto; /* Lenis handles smooth scroll */
}

body {
  background: var(--bg);
  color: var(--text-primary);
  font-family: var(--font-body);
  font-weight: 400;
  line-height: 1.6;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

a {
  text-decoration: none;
  color: inherit;
}

img {
  max-width: 100%;
  display: block;
}

ul, ol {
  list-style: none;
}

button {
  font-family: inherit;
  border: none;
  background: none;
  cursor: pointer;
  color: inherit;
}

input, textarea {
  font-family: inherit;
}

::selection {
  background: var(--accent-cyan);
  color: #000;
}

/* Scrollbar */
::-webkit-scrollbar {
  width: 6px;
}
::-webkit-scrollbar-track {
  background: #000;
}
::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.15);
  border-radius: 3px;
}
::-webkit-scrollbar-thumb:hover {
  background: rgba(255, 255, 255, 0.3);
}

/* -----------------------------------------------------------
   3. Utilities
   ----------------------------------------------------------- */
.container {
  max-width: var(--container-width);
  margin: 0 auto;
  padding: 0 clamp(24px, 4vw, 64px);
}

/* -- Reveal: only hide after JS loads (progressive enhancement) -- */
.js-ready .reveal {
  opacity: 0;
  transform: translateY(60px);
}

/* -----------------------------------------------------------
   4. Custom Cursor (desktop only)
   ----------------------------------------------------------- */
@media (hover: hover) and (pointer: fine) {
  body { cursor: none; }
}

#cursor-dot {
  width: 8px;
  height: 8px;
  background: var(--accent-cyan);
  border-radius: 50%;
  position: fixed;
  top: 0;
  left: 0;
  pointer-events: none;
  z-index: 9999;
  mix-blend-mode: difference;
  transform: translate(-50%, -50%);
  transition: transform 0.15s var(--ease-out-expo);
}

#cursor-ring {
  width: 40px;
  height: 40px;
  border: 1px solid rgba(255, 255, 255, 0.5);
  border-radius: 50%;
  position: fixed;
  top: 0;
  left: 0;
  pointer-events: none;
  z-index: 9998;
  transform: translate(-50%, -50%);
  transition: width 0.3s var(--ease-out-expo),
              height 0.3s var(--ease-out-expo),
              border-color 0.3s,
              opacity 0.3s;
}

#cursor-ring.cursor-hover {
  width: 64px;
  height: 64px;
  border-color: var(--accent-cyan);
  opacity: 0.5;
}

/* -----------------------------------------------------------
   5. Loader
   ----------------------------------------------------------- */
#loader {
  position: fixed;
  inset: 0;
  z-index: 10000;
  background: #000;
  display: none;
  align-items: center;
  justify-content: center;
  transition: opacity 0.8s var(--ease-out-expo),
              visibility 0.8s;
}

.js-ready #loader {
  display: flex;
}

#loader.loaded {
  opacity: 0;
  visibility: hidden;
}

.loader-content {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.loader-logo {
  font-family: var(--font-heading);
  font-size: 3rem;
  font-weight: 700;
  letter-spacing: 0.3em;
  color: var(--text-primary);
}

.loader-text {
  font-size: 0.8rem;
  letter-spacing: 0.5em;
  text-transform: uppercase;
  margin-top: 1rem;
  color: var(--text-secondary);
}

.loader-bar-container {
  width: 200px;
  height: 1px;
  background: rgba(255, 255, 255, 0.1);
  margin-top: 2rem;
  overflow: hidden;
}

.loader-bar {
  height: 100%;
  width: 0%;
  background: var(--accent-cyan);
  transition: width 0.3s var(--ease-out-quart);
  box-shadow: 0 0 10px var(--accent-cyan);
}

/* -----------------------------------------------------------
   6. Navbar
   ----------------------------------------------------------- */
.navbar {
  position: fixed;
  top: 0;
  width: 100%;
  z-index: 1000;
  padding: 24px 0;
  transition: background 0.4s, backdrop-filter 0.4s, border-color 0.4s;
  border-bottom: 1px solid transparent;
}

.navbar.scrolled {
  background: rgba(0, 0, 0, 0.8);
  backdrop-filter: blur(var(--glass-blur));
  -webkit-backdrop-filter: blur(var(--glass-blur));
  border-bottom-color: rgba(255, 255, 255, 0.05);
}

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

.nav-logo {
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 1.5rem;
  letter-spacing: 0.1em;
}

.nav-links {
  display: flex;
  gap: 2rem;
}

.nav-link {
  font-size: var(--fs-small);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-secondary);
  transition: color 0.3s;
  position: relative;
  padding-bottom: 4px;
}

.nav-link::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 1px;
  background: var(--accent-cyan);
  transform: scaleX(0);
  transform-origin: right;
  transition: transform 0.4s var(--ease-out-expo);
}

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

.nav-link:hover::after,
.nav-link.active::after {
  transform: scaleX(1);
  transform-origin: left;
}

.nav-link.active {
  color: var(--text-primary);
}

/* Hamburger */
.nav-menu-btn {
  display: none;
  flex-direction: column;
  gap: 6px;
  padding: 8px;
  z-index: 1001;
}

.nav-menu-btn span {
  display: block;
  width: 24px;
  height: 1px;
  background: var(--text-primary);
  transition: transform 0.3s var(--ease-out-expo),
              opacity 0.3s;
}

.nav-menu-btn.active span:first-child {
  transform: translateY(3.5px) rotate(45deg);
}

.nav-menu-btn.active span:last-child {
  transform: translateY(-3.5px) rotate(-45deg);
}

/* Mobile menu */
.nav-mobile-menu {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.95);
  backdrop-filter: blur(30px);
  -webkit-backdrop-filter: blur(30px);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2rem;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.4s, visibility 0.4s;
  z-index: 999;
}

.nav-mobile-menu.active {
  opacity: 1;
  visibility: visible;
}

.nav-mobile-link {
  font-family: var(--font-heading);
  font-size: 2rem;
  font-weight: 600;
  color: var(--text-secondary);
  transition: color 0.3s;
}

.nav-mobile-link:hover {
  color: var(--text-primary);
}

/* -----------------------------------------------------------
   7. Hero Section
   ----------------------------------------------------------- */
.hero {
  min-height: 100vh;
  position: relative;
  display: flex;
  align-items: center;
  overflow: hidden;
  background-color: #000;
}

.hero::before,
.hero::after {
  content: '';
  position: absolute;
  border-radius: 50%;
  filter: blur(120px);
  z-index: 0;
  pointer-events: none;
}

.hero::before {
  top: 15%;
  right: -5%;
  width: 450px;
  height: 450px;
  background: radial-gradient(circle, rgba(0, 240, 255, 0.08) 0%, transparent 80%);
}

.hero::after {
  bottom: 10%;
  left: -5%;
  width: 500px;
  height: 500px;
  background: radial-gradient(circle, rgba(139, 92, 246, 0.08) 0%, transparent 80%);
}

#hero-canvas {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 1;
  pointer-events: none;
}

/* --- Split Hero Layout --- */
.hero-split {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 60px;
  align-items: center;
  width: 100%;
  min-height: calc(100vh - 120px);
  position: relative;
  z-index: 2;
  padding-top: 100px;
  padding-bottom: 60px;
}

.hero-text-col {
  display: flex;
  flex-col: column;
  flex-direction: column;
  justify-content: center;
  z-index: 10;
}

.hero-spline-col {
  position: relative;
  width: 100%;
  height: 550px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 24px;
  border: 1px solid rgba(255, 255, 255, 0.05);
  background: rgba(255, 255, 255, 0.01);
  backdrop-filter: blur(var(--glass-blur));
  -webkit-backdrop-filter: blur(var(--glass-blur));
  overflow: hidden;
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.8),
              inset 0 1px 1px rgba(255, 255, 255, 0.1);
}

#spline-canvas {
  width: 100%;
  height: 100%;
  opacity: 0;
  transition: opacity 1.2s cubic-bezier(0.16, 1, 0.3, 1);
  display: block;
}

/* --- Spotlight Overlay --- */
.hero-spotlight {
  pointer-events: none;
  position: absolute;
  top: -40%;
  left: -10%;
  z-index: 1;
  width: 120%;
  height: 150%;
  opacity: 0.15;
  animation: spotlightPulse 12s ease-in-out infinite alternate;
}

/* --- Interactive Mouse Spotlight --- */
.hero-mouse-spotlight {
  pointer-events: none;
  position: absolute;
  width: 350px;
  height: 350px;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.06) 0%, transparent 70%);
  transform: translate(-50%, -50%);
  opacity: 0;
  mix-blend-mode: screen;
  z-index: 2;
  transition: opacity 0.4s var(--ease-out-expo);
}

/* --- Spline Loader --- */
.spline-loader {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 16px;
  z-index: 3;
  transition: opacity 0.6s ease;
  background: rgba(0, 0, 0, 0.4);
}

.spline-spinner {
  width: 40px;
  height: 40px;
  border: 2px solid rgba(255, 255, 255, 0.1);
  border-top-color: var(--accent-cyan);
  border-radius: 50%;
  animation: splineSpin 1s linear infinite;
}

.spline-loader-text {
  font-family: var(--font-body);
  font-size: 0.8rem;
  letter-spacing: 0.2em;
  color: var(--text-secondary);
  text-transform: uppercase;
}

.spline-fallback {
  font-size: 2rem;
  color: var(--text-secondary);
  animation: pulse 2s infinite;
}

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

@keyframes spotlightPulse {
  0% { transform: translateY(0) scale(1); opacity: 0.12; }
  100% { transform: translateY(50px) scale(1.05); opacity: 0.22; }
}

.hero-content {
  position: relative;
  z-index: 2;
  width: 100%;
}

.hero-label {
  font-size: var(--fs-label);
  letter-spacing: 0.4em;
  text-transform: uppercase;
  color: var(--text-secondary);
  margin-bottom: 2rem;
  display: block;
}

.hero-title {
  font-family: var(--font-heading);
  font-size: var(--fs-hero);
  font-weight: 700;
  line-height: 0.9;
  letter-spacing: -0.03em;
  margin-bottom: 2rem;
  text-shadow: 0 0 60px rgba(255, 255, 255, 0.1);
}

.hero-title-line {
  display: block;
}

.hero-title .char {
  display: inline-block;
}

.hero-subtitle {
  font-size: clamp(1rem, 1.5vw, 1.25rem);
  color: var(--text-secondary);
  max-width: 600px;
  line-height: 1.7;
  margin-bottom: 2.5rem;
}

.hero-rotating-wrapper {
  height: clamp(2.8rem, 5.5vw, 4.2rem);
  overflow: hidden;
  margin-bottom: 2rem;
  position: relative;
  perspective: 600px;
  transform-style: preserve-3d;
}

.hero-rotating-track {
  display: flex;
  flex-direction: column;
  transform-style: preserve-3d;
}

.hero-rotating-item {
  display: flex;
  align-items: center;
  height: clamp(2.8rem, 5.5vw, 4.2rem);
  font-family: var(--font-heading);
  font-size: clamp(1.6rem, 3.5vw, 3rem);
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  background: linear-gradient(135deg, var(--accent-cyan), var(--accent-violet));
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  opacity: 0;
  transform: translateY(30px) rotateX(-90deg);
  transform-origin: center center -20px;
  backface-visibility: hidden;
  position: absolute;
  top: 0;
  left: 0;
  white-space: nowrap;
  transition: filter 0.3s ease;
  filter: blur(8px);
}

.hero-rotating-item.active {
  opacity: 1;
  transform: translateY(0) rotateX(0deg);
  filter: blur(0px);
}

.hero-cta {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  padding: 16px 32px;
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 100px;
  color: white;
  font-size: 0.9rem;
  letter-spacing: 0.05em;
  transition: all 0.4s var(--ease-out-expo);
  position: relative;
  overflow: hidden;
}

.hero-cta::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, var(--accent-cyan), var(--accent-violet));
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.5s var(--ease-out-expo);
  z-index: -1;
}

.hero-cta:hover::before {
  transform: scaleX(1);
}

.hero-cta:hover {
  border-color: transparent;
  transform: translateY(-2px);
}

.cta-arrow {
  transition: transform 0.3s var(--ease-out-expo);
}

.hero-cta:hover .cta-arrow {
  transform: translateX(4px);
}

.hero-scroll-indicator {
  position: absolute;
  bottom: 40px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 1;
}

.scroll-line {
  width: 1px;
  height: 60px;
  background: linear-gradient(to bottom, var(--accent-cyan), transparent);
  animation: scrollPulse 2s ease-in-out infinite;
}

/* -----------------------------------------------------------
   8. Section Common
   ----------------------------------------------------------- */
.section-header {
  margin-bottom: 80px;
}

.section-label {
  font-size: var(--fs-label);
  letter-spacing: 0.4em;
  text-transform: uppercase;
  color: var(--accent-cyan);
  margin-bottom: 1rem;
  display: block;
}

.section-title {
  font-family: var(--font-heading);
  font-size: var(--fs-section-title);
  font-weight: 600;
  line-height: 1.1;
}

/* -----------------------------------------------------------
   9. About Section
   ----------------------------------------------------------- */
#about {
  padding: var(--section-padding) 0;
}

.about-content {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 80px;
  margin-bottom: 100px;
}

.about-text p {
  font-size: 1.1rem;
  line-height: 1.8;
  color: var(--text-secondary);
  margin-bottom: 1.5rem;
}

.about-stats {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 40px;
  align-content: start;
}

.stat-item {
  border-left: 1px solid var(--glass-border);
  padding-left: 24px;
}

.stat-number {
  font-family: var(--font-heading);
  font-size: 3rem;
  font-weight: 700;
  background: linear-gradient(135deg, var(--accent-cyan), var(--accent-violet));
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.stat-label {
  font-size: var(--fs-small);
  color: var(--text-secondary);
  margin-top: 8px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

/* About Timeline */
.about-timeline {
  position: relative;
  padding-left: 40px;
}

.timeline-line {
  position: absolute;
  left: 8px;
  top: 0;
  bottom: 0;
  width: 1px;
  background: rgba(255, 255, 255, 0.1);
}

.timeline-line-fill {
  width: 100%;
  height: 100%;
  background: var(--accent-cyan);
  transform: scaleY(0);
  transform-origin: top;
  transition: transform 1s var(--ease-out-expo);
  box-shadow: 0 0 8px var(--accent-cyan);
}

.timeline-item {
  position: relative;
  margin-bottom: 60px;
  padding-left: 40px;
}

.timeline-item:last-child {
  margin-bottom: 0;
}

.timeline-dot {
  position: absolute;
  left: -40px;
  top: 8px;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  border: 2px solid var(--accent-cyan);
  background: #000;
  z-index: 1;
}

.timeline-dot::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent-cyan);
  transform: translate(-50%, -50%) scale(0);
  transition: transform 0.4s var(--ease-out-expo);
  box-shadow: 0 0 10px var(--accent-cyan);
}

.timeline-item.in-view .timeline-dot::after {
  transform: translate(-50%, -50%) scale(1);
}

.timeline-year {
  font-size: 0.8rem;
  color: var(--accent-cyan);
  letter-spacing: 0.2em;
  margin-bottom: 8px;
  display: block;
}

.timeline-title {
  font-family: var(--font-heading);
  font-size: 1.5rem;
  font-weight: 600;
  margin-bottom: 8px;
}

.timeline-desc {
  color: var(--text-secondary);
  line-height: 1.7;
}

/* -----------------------------------------------------------
   10. Skills Section
   ----------------------------------------------------------- */
#skills {
  padding: var(--section-padding) 0;
  background: radial-gradient(ellipse at 50% 0%, rgba(0, 240, 255, 0.03), transparent 70%);
}

.skills-showcase.bento-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  grid-auto-rows: minmax(340px, auto);
  gap: 32px;
}

.bento-card {
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  border-radius: 24px;
  padding: 40px;
  position: relative;
  overflow: hidden;
  transition: all 0.6s var(--ease-out-expo);
  transform-style: preserve-3d;
  display: flex;
  flex-direction: column;
}

.bento-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(to right, var(--accent-cyan), var(--accent-violet));
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.6s var(--ease-out-expo);
  z-index: 5;
}

.bento-card:hover::before {
  transform: scaleX(1);
}

.bento-card:hover {
  transform: translateY(-6px);
  border-color: rgba(0, 240, 255, 0.25);
  background: rgba(255, 255, 255, 0.04);
  box-shadow: 0 30px 60px rgba(0, 0, 0, 0.6),
              inset 0 1px 1px rgba(255, 255, 255, 0.1);
}

/* --- Bento Grid Spans --- */
.bento-span-2 {
  grid-column: span 2;
}

.bento-row-span-2 {
  grid-row: span 2;
}

/* --- Background Numbers (Translucent) --- */
.bento-bg-number {
  position: absolute;
  right: -20px;
  bottom: -40px;
  font-family: var(--font-heading);
  font-size: 16rem;
  font-weight: 800;
  line-height: 1;
  color: rgba(255, 255, 255, 0.02);
  pointer-events: none;
  user-select: none;
  z-index: 1;
  transition: color 0.6s var(--ease-out-expo), transform 0.6s var(--ease-out-expo);
}

.bento-card:hover .bento-bg-number {
  color: rgba(0, 240, 255, 0.04);
  transform: scale(1.05) translate(-10px, -10px);
}

/* --- Card Content Structuring --- */
.bento-card-content {
  display: flex;
  height: 100%;
  width: 100%;
  gap: 32px;
  position: relative;
  z-index: 2;
}

.flex-row {
  flex-direction: row;
  align-items: center;
}

.flex-col {
  flex-direction: column;
  justify-content: space-between;
}

.flex-col-reverse {
  flex-direction: column-reverse;
  justify-content: space-between;
}

/* --- Details & Tags --- */
.bento-text-details {
  display: flex;
  flex-direction: column;
  justify-content: center;
  flex: 1;
}

.bento-index {
  font-family: var(--font-heading);
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--text-muted);
  letter-spacing: 0.15em;
  margin-bottom: 16px;
  display: block;
}

.bento-title {
  font-family: var(--font-heading);
  font-size: 1.5rem;
  font-weight: 600;
  margin-bottom: 14px;
  letter-spacing: -0.01em;
  color: var(--text-primary);
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
}

.bento-desc {
  color: var(--text-secondary);
  line-height: 1.7;
  font-size: 0.95rem;
  margin-bottom: 24px;
}

.bento-tools {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.bento-tools span {
  font-size: 0.7rem;
  padding: 5px 12px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.01);
  border-radius: 100px;
  color: var(--text-muted);
  letter-spacing: 0.05em;
  transition: all 0.3s;
}

.bento-card:hover .bento-tools span {
  border-color: rgba(0, 240, 255, 0.2);
  color: var(--text-secondary);
}

/* --- Bento Visual Panels --- */
.bento-visual-panel {
  flex: 1;
  position: relative;
  border-radius: 16px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.05);
  background: rgba(0, 0, 0, 0.3);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
  transition: border-color 0.5s;
  height: 220px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.bento-visual-panel.tall {
  height: 280px;
}

.bento-visual-panel.square {
  height: 140px;
  margin-bottom: 20px;
}

.bento-card:hover .bento-visual-panel {
  border-color: rgba(0, 240, 255, 0.2);
}

.bento-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  filter: brightness(0.8) contrast(1.1);
  transition: transform 0.8s var(--ease-out-expo),
              filter 0.8s var(--ease-out-expo);
}

.bento-card:hover .bento-image {
  transform: scale(1.05);
  filter: brightness(1.05) contrast(1.2) drop-shadow(0 0 15px rgba(0, 240, 255, 0.25));
}

/* --- Bento Continuous Animations --- */
.bento-anim-pulse {
  animation: bentoPulse 4s ease-in-out infinite alternate;
}
.bento-anim-scrub {
  animation: bentoScrub 8s ease-in-out infinite alternate;
}
.bento-anim-rotate {
  animation: bentoRotate 15s linear infinite;
}
.bento-anim-float {
  animation: bentoFloat 6s ease-in-out infinite;
}
.bento-anim-wave {
  animation: bentoWave 5s ease-in-out infinite alternate;
}

.bento-card:hover .bento-anim-pulse { animation-duration: 2s; }
.bento-card:hover .bento-anim-scrub { animation-duration: 4s; }
.bento-card:hover .bento-anim-rotate { animation-duration: 6s; }
.bento-card:hover .bento-anim-float { animation-duration: 2.5s; }
.bento-card:hover .bento-anim-wave { animation-duration: 2s; }

/* Keyframes */
@keyframes bentoPulse {
  0% { transform: scale(1.02); filter: brightness(0.8) contrast(1.1); }
  100% { transform: scale(1.08); filter: brightness(1.0) contrast(1.2); }
}

@keyframes bentoScrub {
  0% { transform: scale(1.02) translateX(-3%); }
  100% { transform: scale(1.05) translateX(3%); }
}

@keyframes bentoRotate {
  0% { transform: scale(1.02) rotate(0deg); }
  100% { transform: scale(1.02) rotate(360deg); }
}

@keyframes bentoFloat {
  0%, 100% { transform: scale(1.02) translateY(0) rotate(0deg); }
  50% { transform: scale(1.06) translateY(-6px) rotate(2deg); }
}

@keyframes bentoWave {
  0% { transform: scale(1.02); filter: brightness(0.7) contrast(1.1); }
  100% { transform: scale(1.07); filter: brightness(1.05) contrast(1.25); }
}

/* -----------------------------------------------------------
   11. Projects Section
   ----------------------------------------------------------- */
#projects {
  padding: var(--section-padding) 0;
}

.projects-list {
  display: flex;
  flex-direction: column;
  gap: 120px;
}

.project-card {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 60px;
  align-items: center;
}

.project-card:nth-child(even) {
  direction: rtl;
}

.project-card:nth-child(even) > * {
  direction: ltr;
}

.project-image {
  position: relative;
  border-radius: 20px;
  overflow: hidden;
  aspect-ratio: 16 / 10;
  background: var(--glass-bg);
}

.project-image::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(to bottom, transparent 60%, rgba(0, 0, 0, 0.5));
  pointer-events: none;
}

.project-img-inner {
  width: 100%;
  height: 100%;
  background-size: cover;
  background-position: center;
  transition: transform 0.8s var(--ease-out-expo);
}

.project-artwork {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: filter 0.8s var(--ease-out-expo);
}

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

.project-img-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0, 240, 255, 0.05);
  mix-blend-mode: overlay;
  pointer-events: none;
}

.project-number {
  font-family: var(--font-heading);
  font-size: 6rem;
  font-weight: 700;
  color: rgba(255, 255, 255, 0.03);
  line-height: 1;
  margin-bottom: -20px;
  display: block;
}

.project-title {
  font-family: var(--font-heading);
  font-size: clamp(1.5rem, 3vw, 2.5rem);
  font-weight: 600;
  margin-bottom: 16px;
  line-height: 1.2;
}

.project-desc {
  color: var(--text-secondary);
  line-height: 1.7;
  margin-bottom: 24px;
}

.project-tech {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 24px;
}

.tech-tag {
  font-size: 0.75rem;
  padding: 6px 14px;
  border: 1px solid var(--glass-border);
  border-radius: 100px;
  color: var(--text-secondary);
  letter-spacing: 0.05em;
}

.project-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--accent-cyan);
  font-size: var(--fs-small);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  transition: gap 0.3s var(--ease-out-expo);
}

.project-link:hover {
  gap: 16px;
}

/* -----------------------------------------------------------
   12. Experience Section
   ----------------------------------------------------------- */
#experience {
  padding: var(--section-padding) 0;
  background: radial-gradient(ellipse at 0% 50%, rgba(139, 92, 246, 0.03), transparent 50%);
}

.exp-timeline {
  position: relative;
  padding-left: 60px;
}

.exp-timeline-line {
  position: absolute;
  left: 20px;
  top: 0;
  bottom: 0;
  width: 2px;
  background: linear-gradient(to bottom, rgba(139, 92, 246, 0.4), rgba(0, 240, 255, 0.4) 60%, rgba(255, 255, 255, 0.05));
  transform-origin: top;
}

.exp-item {
  position: relative;
  margin-bottom: 48px;
  display: block;
}

.exp-item:last-child {
  margin-bottom: 0;
}

.exp-dot {
  position: absolute;
  left: -47px;
  top: 36px;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: var(--bg-primary);
  border: 2px solid var(--accent-violet);
  box-shadow: 0 0 10px rgba(139, 92, 246, 0.8);
  z-index: 2;
  transition: all 0.3s ease;
}

.exp-item:hover .exp-dot {
  background: var(--accent-cyan);
  border-color: var(--accent-cyan);
  box-shadow: 0 0 15px var(--accent-cyan);
  transform: scale(1.2);
}

.exp-card {
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 20px;
  padding: 40px;
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
  transform-style: preserve-3d;
}

.exp-item:hover .exp-card {
  transform: translateX(10px) translateY(-4px);
  background: rgba(255, 255, 255, 0.04);
  border-color: rgba(139, 92, 246, 0.25);
  box-shadow: 0 15px 40px rgba(139, 92, 246, 0.05);
}

.exp-period {
  font-size: 0.8rem;
  color: var(--accent-violet);
  letter-spacing: 0.15em;
  text-transform: uppercase;
  margin-bottom: 12px;
  display: block;
  font-weight: 500;
  transition: color 0.3s ease;
}

.exp-item:hover .exp-period {
  color: var(--accent-cyan);
}

.exp-title {
  font-family: var(--font-heading);
  font-size: 1.5rem;
  font-weight: 600;
  margin-bottom: 8px;
}

.exp-company {
  font-size: 0.9rem;
  color: var(--text-secondary);
  margin-bottom: 16px;
  display: block;
}

.exp-desc {
  color: var(--text-secondary);
  line-height: 1.7;
  font-size: 0.95rem;
}

.exp-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 24px;
}

.exp-tag {
  font-size: 0.75rem;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.06);
  padding: 6px 14px;
  border-radius: 100px;
  color: var(--text-secondary);
  transition: all 0.3s ease;
}

.exp-item:hover .exp-tag {
  border-color: rgba(139, 92, 246, 0.15);
  background: rgba(139, 92, 246, 0.05);
  color: var(--text-primary);
}

/* -----------------------------------------------------------
   13. Services Section (Carousel Showcase)
   ----------------------------------------------------------- */
#services {
  padding: var(--section-padding) 0;
  background: radial-gradient(circle at 50% 50%, rgba(139, 92, 246, 0.03), transparent 60%),
              radial-gradient(circle at 90% 10%, rgba(0, 240, 255, 0.02), transparent 50%),
              #000000;
  overflow: hidden;
  position: relative;
}

.services-carousel-container {
  width: 100vw;
  position: relative;
  left: 50%;
  right: 50%;
  margin-left: -50vw;
  margin-right: -50vw;
  overflow: hidden;
  padding: 40px 0;
  cursor: grab;
}

.services-carousel-container:active {
  cursor: grabbing;
}

.services-carousel-track {
  display: flex;
  gap: 32px;
  width: max-content;
  padding: 0 32px;
  animation: carouselMarquee 45s linear infinite;
  transform-style: preserve-3d;
}

.services-carousel-container:hover .services-carousel-track {
  animation-play-state: paused;
}

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

.service-card {
  width: 380px;
  flex: 0 0 380px;
  background: rgba(10, 10, 15, 0.45);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 24px;
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  overflow: hidden;
  transition: transform 0.6s cubic-bezier(0.16, 1, 0.3, 1),
              border-color 0.6s cubic-bezier(0.16, 1, 0.3, 1),
              background 0.6s cubic-bezier(0.16, 1, 0.3, 1),
              box-shadow 0.6s cubic-bezier(0.16, 1, 0.3, 1);
  position: relative;
  transform-style: preserve-3d;
  display: flex;
  flex-direction: column;
}

.service-card:nth-child(odd) {
  --theme-color: var(--accent-cyan);
  --theme-glow: rgba(0, 240, 255, 0.12);
  --theme-border: rgba(0, 240, 255, 0.35);
}

.service-card:nth-child(even) {
  --theme-color: var(--accent-violet);
  --theme-glow: rgba(139, 92, 246, 0.12);
  --theme-border: rgba(139, 92, 246, 0.35);
}

.service-card:hover {
  transform: translateY(-12px) scale(1.025);
  border-color: var(--theme-border);
  background: rgba(15, 15, 25, 0.7);
  box-shadow: 0 30px 60px rgba(0, 0, 0, 0.8),
              0 0 40px var(--theme-glow);
}

.service-art-wrapper {
  width: 100%;
  height: 210px;
  overflow: hidden;
  position: relative;
  transform-style: preserve-3d;
  background: #000;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.service-art {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transform: translateZ(10px) scale(1.02);
  transition: transform 0.8s cubic-bezier(0.16, 1, 0.3, 1),
              filter 0.8s cubic-bezier(0.16, 1, 0.3, 1);
  filter: brightness(0.65) contrast(1.1) saturate(1.05);
}

.service-art-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(10, 10, 15, 0.98) 5%, transparent 70%);
  pointer-events: none;
}

.service-card:hover .service-art {
  transform: translateZ(25px) scale(1.08);
  filter: brightness(0.95) contrast(1.15) saturate(1.15);
}

.service-content {
  padding: 32px 28px 36px 28px;
  display: flex;
  flex-direction: column;
  flex: 1;
  justify-content: space-between;
}

.service-title {
  font-family: var(--font-heading);
  font-size: 1.35rem;
  font-weight: 600;
  margin-bottom: 12px;
  color: #ffffff;
  transition: color 0.3s ease;
}

.service-card:hover .service-title {
  color: var(--theme-color);
}

.service-desc {
  color: var(--text-secondary);
  line-height: 1.65;
  font-size: 0.93rem;
  margin-bottom: 24px;
}

.service-features {
  list-style: none;
  padding: 0;
  margin: 0 0 28px 0;
}

.service-features li {
  padding: 10px 0;
  border-top: 1px solid rgba(255, 255, 255, 0.04);
  color: var(--text-secondary);
  font-size: 0.88rem;
  transition: color 0.3s ease, padding-left 0.3s ease;
  display: flex;
  align-items: center;
}

.service-card:hover .service-features li {
  color: var(--text-primary);
}

.service-features li::before {
  content: '✦';
  color: var(--theme-color);
  margin-right: 12px;
  font-size: 0.65rem;
  transition: transform 0.3s ease, color 0.3s ease;
}

.service-card:hover .service-features li::before {
  transform: scale(1.2) rotate(45deg);
  color: #ffffff;
}

.service-cta {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.9rem;
  font-weight: 600;
  color: #ffffff;
  text-decoration: none;
  transition: color 0.3s ease;
  margin-top: auto;
  width: fit-content;
}

.service-cta-arrow {
  display: inline-block;
  transition: transform 0.3s var(--ease-out-expo),
              color 0.3s ease;
}

.service-card:hover .service-cta {
  color: var(--theme-color);
}

.service-card:hover .service-cta-arrow {
  transform: translateX(6px);
}

/* -----------------------------------------------------------
   14. Contact Section
   ----------------------------------------------------------- */
#contact {
  padding: var(--section-padding) 0;
  position: relative;
}

#contact::before {
  content: '';
  position: absolute;
  top: 0;
  right: 0;
  width: 600px;
  height: 600px;
  background: radial-gradient(circle, rgba(0, 240, 255, 0.03), transparent 70%);
  pointer-events: none;
}

.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 80px;
}

.form-group {
  margin-bottom: 32px;
}

.form-group label {
  font-size: 0.8rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--text-secondary);
  margin-bottom: 12px;
  display: block;
}

.form-input {
  width: 100%;
  background: transparent;
  border: none;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  padding: 16px 0;
  font-size: 1rem;
  color: white;
  font-family: var(--font-body);
  outline: none;
  transition: border-color 0.3s;
}

.form-input::placeholder {
  color: var(--text-muted);
}

.form-input:focus {
  border-color: var(--accent-cyan);
}

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

.form-input.error {
  border-color: #ef4444;
}

.form-error-msg {
  font-family: var(--font-body);
  font-size: 0.75rem;
  color: #ef4444;
  margin-top: 6px;
  display: block;
  opacity: 0;
  transform: translateY(-5px);
  transition: all 0.3s var(--ease-out-expo);
  height: 0;
  overflow: hidden;
}

.form-error-msg.visible {
  opacity: 1;
  transform: translateY(0);
  height: auto;
  margin-top: 6px;
}

.form-submit {
  width: 100%;
  padding: 20px;
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 100px;
  color: white;
  font-size: 1rem;
  letter-spacing: 0.1em;
  cursor: pointer;
  transition: all 0.4s var(--ease-out-expo);
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  margin-top: 8px;
}

.form-submit::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, var(--accent-cyan), var(--accent-violet));
  transform: translateY(100%);
  transition: transform 0.5s var(--ease-out-expo);
  z-index: -1;
}

.form-submit:hover::before {
  transform: translateY(0);
}

.form-submit:hover {
  border-color: transparent;
}

.contact-info {
  display: flex;
  flex-direction: column;
  gap: 40px;
  padding-top: 20px;
}

.contact-detail {
  display: flex;
  gap: 20px;
  align-items: flex-start;
}

.contact-icon {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  flex-shrink: 0;
}

.contact-text h4 {
  font-weight: 500;
  margin-bottom: 4px;
}

.contact-text p,
.contact-text a {
  color: var(--text-secondary);
  text-decoration: none;
  transition: color 0.3s;
}

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

.contact-socials {
  display: flex;
  gap: 16px;
  margin-top: auto;
}

.social-link {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  border: 1px solid var(--glass-border);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s var(--ease-out-expo);
  color: var(--text-secondary);
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.05em;
}

.social-link:hover {
  border-color: var(--accent-cyan);
  color: var(--accent-cyan);
  transform: translateY(-4px);
  box-shadow: 0 8px 20px rgba(0, 240, 255, 0.1);
}

/* -----------------------------------------------------------
   15. Footer
   ----------------------------------------------------------- */
.footer {
  padding: 40px 0;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
}

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

.footer-left p {
  font-size: var(--fs-small);
  color: var(--text-secondary);
}

.footer-links {
  display: flex;
  gap: 24px;
}

.footer-links a {
  font-size: var(--fs-small);
  color: var(--text-secondary);
  transition: color 0.3s;
}

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

/* -----------------------------------------------------------
   16. Hero CTA Group & Secondary CTA
   ----------------------------------------------------------- */
.hero-cta-group {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
  align-items: center;
}

.hero-cta-secondary {
  border-color: rgba(255, 255, 255, 0.08);
  color: var(--text-secondary);
}

.hero-cta-secondary::before {
  background: rgba(255, 255, 255, 0.08);
}

.hero-cta-secondary:hover {
  color: var(--text-primary);
  border-color: transparent;
}

/* -----------------------------------------------------------
   17. About Statement
   ----------------------------------------------------------- */
.about-statement {
  font-family: var(--font-heading);
  font-size: clamp(1.2rem, 2vw, 1.6rem);
  font-weight: 500;
  color: var(--text-primary);
  line-height: 1.5;
  margin-bottom: 1.5rem;
}

/* -----------------------------------------------------------
   18. Project Case Study Meta
   ----------------------------------------------------------- */
.project-meta {
  margin-bottom: 24px;
}

.project-meta p {
  color: var(--text-secondary);
  line-height: 1.7;
  margin-bottom: 12px;
  font-size: 0.95rem;
}

.project-meta p:last-child {
  margin-bottom: 0;
}

.project-meta strong {
  color: var(--accent-cyan);
  font-weight: 500;
  letter-spacing: 0.03em;
}

/* -----------------------------------------------------------
   19. Creative Capabilities Section
   ----------------------------------------------------------- */
#capabilities {
  padding: var(--section-padding) 0;
  background: radial-gradient(ellipse at 80% 20%, rgba(139, 92, 246, 0.03), transparent 50%),
              radial-gradient(ellipse at 20% 80%, rgba(0, 240, 255, 0.02), transparent 50%);
}

.capabilities-intro {
  font-size: clamp(1rem, 1.3vw, 1.15rem);
  color: var(--text-secondary);
  line-height: 1.8;
  max-width: 700px;
  margin-bottom: 60px;
}

.capabilities-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 24px;
}

@media (min-width: 992px) {
  .capabilities-grid {
    grid-template-columns: repeat(3, 1fr);
    grid-auto-rows: 270px;
    gap: 28px;
  }
}

.capability-card {
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  border-radius: 20px;
  padding: 32px;
  position: relative;
  overflow: hidden;
  transition: all 0.6s var(--ease-out-expo);
  transform-style: preserve-3d;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  min-height: 380px;
}

@media (min-width: 992px) {
  .capability-card {
    min-height: auto;
  }
  .capability-card.card-featured {
    grid-column: span 2;
    grid-row: span 2;
  }
  .capability-card.card-wide {
    grid-column: span 2;
    grid-row: span 1;
    flex-direction: row;
    align-items: center;
    gap: 32px;
  }
}

.capability-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1.5px;
  background: linear-gradient(to right, var(--accent-violet), var(--accent-cyan));
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.6s var(--ease-out-expo);
  z-index: 5;
}

.capability-card:hover::before {
  transform: scaleX(1);
}

.capability-card:hover {
  transform: translateY(-8px);
  border-color: rgba(0, 240, 255, 0.35);
  background: rgba(255, 255, 255, 0.04);
  box-shadow: 0 30px 60px rgba(0, 0, 0, 0.6),
              0 0 50px rgba(0, 240, 255, 0.03);
}

.capability-bg-number {
  position: absolute;
  bottom: -25px;
  right: -10px;
  font-family: var(--font-heading);
  font-size: 11rem;
  font-weight: 900;
  line-height: 1;
  color: transparent;
  background: linear-gradient(135deg, rgba(139, 92, 246, 0.02), rgba(0, 240, 255, 0.02));
  -webkit-background-clip: text;
  background-clip: text;
  user-select: none;
  pointer-events: none;
  z-index: 1;
  transition: all 0.8s var(--ease-out-expo);
  transform: translateZ(5px);
}

.capability-card:hover .capability-bg-number {
  transform: translateZ(25px) scale(1.08) translateY(-5px);
  background: linear-gradient(135deg, rgba(139, 92, 246, 0.06), rgba(0, 240, 255, 0.06));
  -webkit-background-clip: text;
  background-clip: text;
}

.capability-visual-area {
  width: 100%;
  height: 160px;
  border-radius: 14px;
  overflow: hidden;
  position: relative;
  border: 1px solid rgba(255, 255, 255, 0.05);
  background: rgba(0, 0, 0, 0.55);
  box-shadow: inset 0 2px 8px rgba(0, 0, 0, 0.8);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.6s var(--ease-out-expo);
  transform: translateZ(10px);
  transform-style: preserve-3d;
}

.capability-card.card-featured .capability-visual-area {
  height: 220px;
}

@media (min-width: 992px) {
  .capability-card.card-featured .capability-visual-area {
    height: 280px;
  }
  .capability-card.card-wide .capability-visual-area {
    flex: 0 0 42%;
    height: 100%;
    margin-bottom: 0;
  }
}

.capability-card:hover .capability-visual-area {
  transform: translateZ(35px);
  border-color: rgba(0, 240, 255, 0.25);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.7),
              inset 0 1px 2px rgba(255, 255, 255, 0.05);
}

/* -----------------------------------------------------------
   Custom Animated Visual Showcases
   ----------------------------------------------------------- */

/* 1. Motion Design — Kinetic Typography */
.capability-visual-motion {
  background: radial-gradient(circle at center, rgba(139, 92, 246, 0.1), transparent 70%), rgba(0, 0, 0, 0.55);
}

.kinetic-typography {
  width: 120%;
  display: flex;
  flex-direction: column;
  gap: 8px;
  transform: rotate(-6deg) scale(1.05) translateZ(15px);
  user-select: none;
  transition: transform 0.6s var(--ease-out-expo);
}

.capability-card:hover .kinetic-typography {
  transform: rotate(-3deg) scale(1.1) translateZ(25px);
}

.kinetic-row {
  white-space: nowrap;
  font-family: var(--font-heading);
  font-weight: 900;
  font-size: 1.15rem;
  letter-spacing: 0.1em;
  color: transparent;
  background: linear-gradient(90deg, rgba(0, 240, 255, 0.25), rgba(139, 92, 246, 0.25));
  -webkit-background-clip: text;
  background-clip: text;
  text-shadow: 0 0 30px rgba(0, 240, 255, 0.03);
}

.row-left span {
  display: inline-block;
  animation: marqueeLeft 20s linear infinite;
}

.row-right span {
  display: inline-block;
  animation: marqueeRight 20s linear infinite;
}

.capability-card:hover .row-left span {
  animation-duration: 8s;
  background: linear-gradient(90deg, rgba(0, 240, 255, 0.65), rgba(139, 92, 246, 0.65));
  -webkit-background-clip: text;
  background-clip: text;
}

.capability-card:hover .row-right span {
  animation-duration: 8s;
  background: linear-gradient(90deg, rgba(139, 92, 246, 0.65), rgba(0, 240, 255, 0.65));
  -webkit-background-clip: text;
  background-clip: text;
}

@keyframes marqueeLeft {
  0% { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}

@keyframes marqueeRight {
  0% { transform: translateX(-50%); }
  100% { transform: translateX(0); }
}

/* 2. Video Editing — Cinematic Timeline */
.timeline-container {
  width: 82%;
  height: 85px;
  background: rgba(10, 10, 10, 0.95);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 8px;
  position: relative;
  padding: 10px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.7);
  transform: translateZ(10px);
  transition: transform 0.6s var(--ease-out-expo);
}

.capability-card:hover .timeline-container {
  transform: translateZ(25px);
}

.timeline-ruler {
  width: 100%;
  height: 8px;
  display: flex;
  justify-content: space-between;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  padding-bottom: 4px;
}

.timeline-ruler span {
  width: 1px;
  height: 100%;
  background: rgba(255, 255, 255, 0.15);
}

.timeline-ruler span:nth-child(even) {
  height: 50%;
}

.timeline-tracks {
  display: flex;
  flex-direction: column;
  gap: 5px;
  margin-top: 5px;
}

.timeline-track {
  display: flex;
  gap: 6px;
  height: 13px;
}

.timeline-clip {
  height: 100%;
  border-radius: 3px;
  box-shadow: inset 0 1px rgba(255, 255, 255, 0.05);
}

.clip-a { width: 30%; background: rgba(0, 240, 255, 0.2); border: 1px solid rgba(0, 240, 255, 0.3); }
.clip-b { width: 50%; background: rgba(139, 92, 246, 0.2); border: 1px solid rgba(139, 92, 246, 0.3); }
.clip-c { width: 58%; background: rgba(139, 92, 246, 0.2); border: 1px solid rgba(139, 92, 246, 0.3); }
.clip-d { width: 22%; background: rgba(0, 240, 255, 0.2); border: 1px solid rgba(0, 240, 255, 0.3); }

.timeline-playhead {
  position: absolute;
  top: 0;
  bottom: 0;
  width: 2px;
  background: var(--accent-cyan);
  box-shadow: 0 0 12px var(--accent-cyan);
  animation: playheadScrub 6s ease-in-out infinite;
  pointer-events: none;
}

.timeline-playhead::before {
  content: '';
  position: absolute;
  top: -3px;
  left: -4px;
  width: 10px;
  height: 6px;
  background: var(--accent-cyan);
  clip-path: polygon(0 0, 100% 0, 50% 100%);
}

.capability-card:hover .timeline-playhead {
  animation-duration: 2.2s;
  background: #fff;
  box-shadow: 0 0 15px #fff;
}

.capability-card:hover .timeline-playhead::before {
  background: #fff;
}

@keyframes playheadScrub {
  0% { left: 8%; }
  50% { left: 92%; }
  100% { left: 8%; }
}

/* 3. 3D Animation — Rotating Holographic Sculpture */
.holo-cube-container {
  width: 80px;
  height: 80px;
  perspective: 400px;
  transform: translateZ(15px);
  transition: transform 0.6s var(--ease-out-expo);
}

.capability-card:hover .holo-cube-container {
  transform: translateZ(30px);
}

.holo-cube {
  width: 100%;
  height: 100%;
  position: relative;
  transform-style: preserve-3d;
  animation: rotateHoloCube 14s linear infinite;
}

.capability-card:hover .holo-cube {
  animation-duration: 4.5s;
}

.holo-cube .face {
  position: absolute;
  width: 80px;
  height: 80px;
  background: rgba(139, 92, 246, 0.04);
  border: 1.5px solid var(--accent-violet);
  box-shadow: inset 0 0 12px rgba(139, 92, 246, 0.15),
              0 0 15px rgba(0, 240, 255, 0.05);
  transition: all 0.5s ease;
}

.holo-cube .face.front  { transform: rotateY(0deg) translateZ(40px); border-color: var(--accent-cyan); }
.holo-cube .face.back   { transform: rotateY(180deg) translateZ(40px); }
.holo-cube .face.left   { transform: rotateY(-90deg) translateZ(40px); }
.holo-cube .face.right  { transform: rotateY(90deg) translateZ(40px); border-color: var(--accent-cyan); }
.holo-cube .face.top    { transform: rotateX(90deg) translateZ(40px); }
.holo-cube .face.bottom { transform: rotateX(-90deg) translateZ(40px); }

.capability-card:hover .holo-cube .face {
  border-color: #fff;
  box-shadow: inset 0 0 18px rgba(0, 240, 255, 0.35),
              0 0 30px rgba(139, 92, 246, 0.45);
}

@keyframes rotateHoloCube {
  0% { transform: rotateX(0deg) rotateY(0deg) rotateZ(0deg); }
  100% { transform: rotateX(360deg) rotateY(360deg) rotateZ(0deg); }
}

/* 4. Audio Design — Reactive Waveform */
.capability-visual-audio {
  background: radial-gradient(circle at center, rgba(0, 240, 255, 0.08), transparent 70%), rgba(0, 0, 0, 0.55);
}

.waveform-container {
  display: flex;
  align-items: center;
  gap: 5px;
  height: 60px;
  transform: translateZ(10px);
  transition: transform 0.6s var(--ease-out-expo);
}

.capability-card:hover .waveform-container {
  transform: translateZ(25px);
}

.wave-bar {
  width: 3.5px;
  height: 12px;
  background: linear-gradient(to top, var(--accent-violet), var(--accent-cyan));
  border-radius: 10px;
  transform-origin: center;
  animation: audioDance 1.4s ease-in-out infinite alternate;
  box-shadow: 0 0 10px rgba(0, 240, 255, 0.15);
}

.wave-bar:nth-child(1)  { animation-delay: 0.15s; height: 16px; }
.wave-bar:nth-child(2)  { animation-delay: 0.35s; height: 38px; }
.wave-bar:nth-child(3)  { animation-delay: 0.65s; height: 22px; }
.wave-bar:nth-child(4)  { animation-delay: 0.25s; height: 48px; }
.wave-bar:nth-child(5)  { animation-delay: 0.55s; height: 32px; }
.wave-bar:nth-child(6)  { animation-delay: 0.85s; height: 52px; }
.wave-bar:nth-child(7)  { animation-delay: 0.45s; height: 26px; }
.wave-bar:nth-child(8)  { animation-delay: 0.75s; height: 42px; }
.wave-bar:nth-child(9)  { animation-delay: 0.2s;  height: 18px; }
.wave-bar:nth-child(10) { animation-delay: 0.95s; height: 50px; }
.wave-bar:nth-child(11) { animation-delay: 0.3s;  height: 34px; }
.wave-bar:nth-child(12) { animation-delay: 0.5s;  height: 16px; }

.capability-card:hover .wave-bar {
  animation-duration: 0.55s;
  box-shadow: 0 0 14px rgba(0, 240, 255, 0.55);
  background: #fff;
}

@keyframes audioDance {
  0% { transform: scaleY(0.45); }
  100% { transform: scaleY(1.45); }
}

/* 5. Visual Storytelling — Storyboard Viewfinder & Frames */
.storyboard-container {
  position: relative;
  width: 90%;
  height: 110px;
  display: flex;
  align-items: center;
  justify-content: center;
  transform: translateZ(10px);
  transition: transform 0.6s var(--ease-out-expo);
}

.capability-card:hover .storyboard-container {
  transform: translateZ(25px);
}

.storyboard-viewfinder {
  position: absolute;
  inset: 0;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 6px;
  pointer-events: none;
  z-index: 5;
  box-shadow: inset 0 0 20px rgba(0, 0, 0, 0.8);
}

.storyboard-viewfinder .corner {
  position: absolute;
  width: 10px;
  height: 10px;
  border: 1.5px solid var(--accent-cyan);
}

.storyboard-viewfinder .corner.top-left     { top: 5px; left: 5px; border-right: none; border-bottom: none; }
.storyboard-viewfinder .corner.top-right    { top: 5px; right: 5px; border-left: none; border-bottom: none; }
.storyboard-viewfinder .corner.bottom-left  { bottom: 5px; left: 5px; border-right: none; border-top: none; }
.storyboard-viewfinder .corner.bottom-right { bottom: 5px; right: 5px; border-left: none; border-top: none; }

.rec-indicator {
  position: absolute;
  top: 10px;
  left: 10px;
  font-family: monospace;
  font-size: 0.65rem;
  color: #ef4444;
  display: flex;
  align-items: center;
  gap: 5px;
  font-weight: bold;
}

.rec-dot {
  width: 7px;
  height: 7px;
  background: #ef4444;
  border-radius: 50%;
  animation: recFlash 1.2s step-end infinite;
}

.storyboard-frames {
  width: 84%;
  height: 80px;
  position: relative;
  overflow: hidden;
  border-radius: 4px;
}

.storyboard-frame {
  position: absolute;
  inset: 0;
  background: rgba(139, 92, 246, 0.08);
  border: 1px dashed rgba(139, 92, 246, 0.25);
  display: flex;
  align-items: center;
  justify-content: center;
  animation: storyboardCycle 9s infinite;
  opacity: 0;
}

.storyboard-frame .frame-sketch {
  width: 72%;
  height: 52%;
  border: 1px solid rgba(0, 240, 255, 0.2);
  position: relative;
}

.storyboard-frame .frame-sketch::before {
  content: '';
  position: absolute;
  inset: 15%;
  border: 1px dashed rgba(255, 255, 255, 0.08);
}

.frame-1 { animation-delay: 0s; }
.frame-2 { animation-delay: 3s; }
.frame-3 { animation-delay: 6s; }

.capability-card:hover .rec-indicator {
  color: #fff;
}

.capability-card:hover .rec-dot {
  background: #fff;
  box-shadow: 0 0 10px #fff;
}

.capability-card:hover .storyboard-frame {
  animation-duration: 4.5s;
}

.capability-card:hover .frame-1 { animation-delay: 0s; }
.capability-card:hover .frame-2 { animation-delay: 1.5s; }
.capability-card:hover .frame-3 { animation-delay: 3s; }

@keyframes recFlash {
  50% { opacity: 0; }
}

@keyframes storyboardCycle {
  0%, 30.3% { opacity: 1; transform: scale(1) translateX(0); }
  33.3%, 63.6% { opacity: 0; transform: scale(0.9) translateX(-100%); }
  66.6%, 97% { opacity: 0; transform: scale(0.9) translateX(100%); }
  100% { opacity: 1; transform: scale(1) translateX(0); }
}

/* -----------------------------------------------------------
   Typography and metadata alignment
   ----------------------------------------------------------- */
.capability-info {
  position: relative;
  z-index: 2;
}

.capability-meta {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 12px;
}

.capability-card .capability-index {
  font-family: var(--font-body);
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--accent-cyan);
  letter-spacing: 0.1em;
  margin-bottom: 0;
}

.capability-title {
  font-family: var(--font-heading);
  font-size: 1.25rem;
  font-weight: 600;
  margin-bottom: 0;
}

.capability-desc {
  color: var(--text-secondary);
  line-height: 1.7;
  font-size: 0.95rem;
  margin-bottom: 20px;
}

.capability-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.capability-tags span {
  font-size: 0.7rem;
  padding: 4px 12px;
  border: 1px solid rgba(139, 92, 246, 0.15);
  border-radius: 100px;
  color: var(--text-muted);
  letter-spacing: 0.05em;
}

/* -----------------------------------------------------------
   20. Contact Intro
   ----------------------------------------------------------- */
.contact-intro {
  font-size: clamp(1rem, 1.3vw, 1.15rem);
  color: var(--text-secondary);
  line-height: 1.8;
  max-width: 600px;
  margin-bottom: 60px;
}

/* -----------------------------------------------------------
   21. Keyframe Animations
   ----------------------------------------------------------- */
@keyframes scrollPulse {
  0%, 100% {
    opacity: 1;
    transform: translateY(0);
  }
  50% {
    opacity: 0;
    transform: translateY(20px);
  }
}

@keyframes float {
  0%, 100% {
    transform: translateY(-10px);
  }
  50% {
    transform: translateY(10px);
  }
}

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

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

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

/* -----------------------------------------------------------
   17. Responsive — Tablet
   ----------------------------------------------------------- */
@media (max-width: 1200px) {
  .about-content {
    grid-template-columns: 1fr;
    gap: 60px;
  }

  .services-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .skills-showcase.bento-grid {
    grid-template-columns: repeat(2, 1fr);
    grid-auto-rows: auto;
    gap: 24px;
  }
  
  .bento-row-span-2 {
    grid-row: span 1;
  }

  .capabilities-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 24px;
  }

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

  .capability-card.card-featured .capability-visual-area {
    height: 200px;
  }

  .capability-card.card-wide {
    grid-column: span 2;
    flex-direction: column;
    align-items: stretch;
    gap: 24px;
  }

  .capability-card.card-wide .capability-visual-area {
    width: 100%;
    height: 160px;
    margin-bottom: 20px;
  }

  .capabilities-grid .capability-card:nth-child(4) {
    grid-column: span 2;
  }

  .project-card {
    grid-template-columns: 1fr;
    gap: 40px;
  }

  .project-card:nth-child(even) {
    direction: ltr;
  }

  .contact-grid {
    gap: 60px;
  }
}

/* -----------------------------------------------------------
   18. Responsive — Mobile
   ----------------------------------------------------------- */
@media (max-width: 768px) {
  body {
    cursor: auto;
  }

  #cursor-dot,
  #cursor-ring {
    display: none;
  }

  .nav-links {
    display: none;
  }

  .nav-menu-btn {
    display: flex;
  }

  .hero-split {
    grid-template-columns: 1fr;
    gap: 40px;
    padding-top: 80px;
    padding-bottom: 40px;
    min-height: auto;
  }

  .hero-text-col {
    order: 1;
    text-align: left;
  }

  .hero-spline-col {
    order: 2;
    height: 350px;
  }

  .hero-cta-group {
    flex-direction: row;
    align-items: center;
  }

  .about-stats {
    grid-template-columns: repeat(2, 1fr);
    gap: 24px;
  }

  .skills-showcase.bento-grid {
    grid-template-columns: 1fr;
    grid-auto-rows: auto;
    gap: 24px;
  }

  .bento-span-2 {
    grid-column: span 1 !important;
  }

  .bento-row-span-2 {
    grid-row: span 1 !important;
  }

  .bento-card-content.flex-row {
    flex-direction: column !important;
    align-items: stretch !important;
  }

  .bento-card-content.flex-col-reverse {
    flex-direction: column !important;
  }

  .bento-visual-panel {
    height: 200px !important;
    width: 100% !important;
    order: -1 !important;
    margin-bottom: 24px !important;
  }

  .bento-visual-panel.tall {
    height: 200px !important;
  }

  .bento-visual-panel.square {
    height: 200px !important;
    margin-bottom: 24px !important;
  }

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

  .service-card {
    padding: 32px 24px;
  }

  .exp-card {
    padding: 32px 24px;
  }

  .capabilities-grid {
    grid-template-columns: 1fr;
    gap: 20px;
  }

  .capability-card.card-featured,
  .capability-card.card-wide,
  .capabilities-grid .capability-card:nth-child(4) {
    grid-column: span 1 !important;
    grid-row: span 1 !important;
  }

  .contact-grid {
    grid-template-columns: 1fr;
    gap: 60px;
  }

  .footer-content {
    flex-direction: column;
    gap: 16px;
    text-align: center;
  }

  .exp-timeline {
    padding-left: 40px;
  }

  .exp-dot {
    left: -27px;
    top: 36px;
  }

  .project-number {
    font-size: 4rem;
  }
}

/* -----------------------------------------------------------
   19. Responsive — Small Mobile
   ----------------------------------------------------------- */
@media (max-width: 480px) {
  :root {
    --section-padding: clamp(60px, 10vh, 100px);
  }

  .hero-cta-group {
    flex-direction: column;
    align-items: stretch;
    width: 100%;
    gap: 12px;
  }

  .hero-cta {
    width: 100%;
    justify-content: center;
  }

  .hero-spline-col {
    height: 300px;
  }

  .hero-rotating-item {
    font-size: clamp(1.2rem, 5vw, 1.6rem);
  }

  .skills-showcase.bento-grid {
    grid-template-columns: 1fr;
  }

  .stat-number {
    font-size: 2.5rem;
  }

  .about-stats {
    grid-template-columns: 1fr;
  }
}

/* -----------------------------------------------------------
   20. Reduced Motion
   ----------------------------------------------------------- */
@media (prefers-reduced-motion: reduce) {
  .js-ready .reveal {
    opacity: 1;
    transform: none;
  }

  .scroll-line {
    animation: none;
  }

  .hero-cta::before,
  .service-card::before,
  .form-submit::before {
    transition: none;
  }

  * {
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
  }
}
