:root {
  --bg-color: #050505;
  --text-primary: #ffffff;
  --text-secondary: #a0a0a0;
  --accent: gold;
  --accent-glow: rgba(255, 215, 0, 0.2);
  --nav-bg: rgba(5, 5, 5, 0.8);
  --card-bg: #111111;
  --card-border: #222222;

  /* Hero Dark Mode */
  --hero-bg: #050505;
  --hero-text: #ffffff;
  --hero-secondary: #a0a0a0;
  --hero-accent: gold;
  --pill-float: #111111;
  --pill-bg: #222222;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  background-color: var(--bg-color);
  color: var(--text-primary);
  font-family: 'Inter', sans-serif;
  overflow-x: hidden;
  line-height: 1.6;
}

h1,
h2,
h3,
h4,
.logo,
.hero-tag,
.section-tag {
  font-family: 'Space Grotesk', sans-serif;
}

a {
  text-decoration: none;
  color: inherit;
}

/* Custom Cursor */
.cursor-dot {
  width: 8px;
  height: 8px;
  background-color: var(--accent);
  border-radius: 50%;
  position: fixed;
  top: 0;
  left: 0;
  transform: translate(-50%, -50%);
  z-index: 9999;
  pointer-events: none;
}

.cursor-outline {
  width: 40px;
  height: 40px;
  border: 1px solid var(--accent);
  border-radius: 50%;
  position: fixed;
  top: 0;
  left: 0;
  transform: translate(-50%, -50%);
  z-index: 9998;
  pointer-events: none;
  transition: transform 0.2s, background-color 0.2s, border-color 0.2s;
}

/* Float Nav Pill (Overrides default nav) */
.nav-container {
  position: fixed;
  top: 32px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 1000;
  background: var(--pill-float);
  padding: 8px 12px;
  border-radius: 40px;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.08);
  border: 1px solid rgba(0, 0, 0, 0.03);
  display: flex;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 4px;
}

.nav-links a {
  padding: 10px 24px;
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--hero-secondary);
  border-radius: 30px;
  transition: all 0.3s ease;
}

.nav-links a.active {
  background: var(--hero-accent);
  color: #000;
  font-weight: 600;
}

.nav-links a:hover:not(.active) {
  background: var(--pill-bg);
  color: var(--hero-text);
}

/* New Hero Section */
.hero-new {
  min-height: 100vh;
  width: 100%;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  padding-top: 160px;
  /* ← CHANGED: Was 160px, now 220px */
  padding-bottom: 60px;
  background: var(--hero-bg);
}

.hero-bg-text {
  position: absolute;
  top: 50%;
  left: 0;
  width: 100%;
  transform: translateY(-50%);
  display: flex;
  justify-content: center;
  pointer-events: none;
  z-index: 1;
  overflow: hidden;
}

.bg-text-row {
  font-family: 'Space Grotesk', sans-serif;
  font-size: clamp(10rem, 25vw, 24rem);
  font-weight: 800;
  color: rgba(254, 254, 254, 0.945);
  /* Subtle white in dark mode */
  line-height: 0.8;
  letter-spacing: -0.05em;
  white-space: nowrap;
  animation: scrollText 40s linear infinite;
  text-align: center;
  width: max-content;
}

@keyframes scrollText {
  0% {
    transform: translateX(5%);
  }

  100% {
    transform: translateX(-50%);
  }
}

.floating-shapes {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 2;
}

.shape {
  position: absolute;
  width: clamp(100px, 15vw, 220px);
  height: auto;
  animation: floatShape 6s ease-in-out infinite;
  filter: drop-shadow(0 20px 30px rgba(0, 0, 0, 0.15));
  transition: transform 0.1s linear;
}

.shape img {
  width: 100%;
  height: auto;
  object-fit: contain;
}

.shape-pyramid {
  top: 12%;
  left: 16%;
  animation-delay: 0s;
  width: clamp(120px, 20vw, 160px);
}

.shape-star {
  top: 6%;
  right: 18%;
  animation-delay: -1s;
  width: clamp(160px, 25vw, 220px);
}

.shape-sphere {
  top: 40%;
  left: 12%;
  animation-delay: -2s;
  width: clamp(160px, 25vw, 240px);
}

.shape-blob {
  top: 42%;
  right: 15%;
  animation-delay: -3s;
  width: clamp(150px, 22vw, 190px);
}

.shape-cylinder {
  bottom: 12%;
  left: 20%;
  animation-delay: -4s;
  width: clamp(160px, 22vw, 200px);
}

.shape-cube {
  bottom: 16%;
  right: 22%;
  animation-delay: -5s;
  width: clamp(140px, 20vw, 180px);
}

@keyframes floatShape {

  0%,
  100% {
    transform: translateY(0) rotate(0deg);
  }

  50% {
    transform: translateY(-20px) rotate(4deg);
  }
}

.hero-center {
  position: relative;
  z-index: 10;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  margin-top: -40px;
}

.hero-text {
  margin-bottom: 24px;
}

.hero-title-new {
  font-family: 'Space Grotesk', sans-serif;
  font-size: clamp(3rem, 5vw, 4.5rem);
  font-weight: 600;
  color: var(--hero-text);
  letter-spacing: -0.03em;
  margin-bottom: 8px;
}

.italic-serif {
  font-family: 'Playfair Display', serif;
  font-style: italic;
  font-weight: 700;
}

.hero-subtitle-new {
  font-family: 'Inter', sans-serif;
  font-size: clamp(1.1rem, 1.5vw, 1.3rem);
  color: var(--hero-secondary);
  font-weight: 500;
}

/* Remove blue background and add flip effect */
.profile-card-container {
  width: clamp(260px, 25vw, 320px);
  height: clamp(260px, 25vw, 320px);
  margin-bottom: 32px;
  border-radius: 48px;
  background: transparent;
  /* REMOVED BLUE BACKGROUND */
  position: relative;
  perspective: 1000px;
  /* For 3D flip */
  cursor: pointer;
}

/* Flip card inner container */
.flip-card-inner {
  position: relative;
  width: 100%;
  height: 100%;
  text-align: center;
  transition: transform 0.8s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  transform-style: preserve-3d;
  border-radius: 48px;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.5);
}

/* Flip on hover */
.profile-card-container:hover .flip-card-inner {
  transform: rotateY(180deg);
}

/* Front and back sides */
.flip-card-front,
.flip-card-back {
  position: absolute;
  width: 100%;
  height: 100%;
  -webkit-backface-visibility: hidden;
  backface-visibility: hidden;
  border-radius: 48px;
  overflow: hidden;
  background: transparent;
  display: flex;
  align-items: flex-end;
  justify-content: center;
}

/* Front side */
.flip-card-front {
  z-index: 2;
}

/* Back side - rotated */
.flip-card-back {
  transform: rotateY(180deg);
  z-index: 1;
}

/* Profile image styling */
.profile-img-new {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 48px;
}

.hero-cta-new {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 18px 40px;
  font-family: inherit;
  font-size: 1.1rem;
  font-weight: 600;
  color: #fff;
  background: #111;
  border: none;
  border-radius: 50px;
  position: relative;
  cursor: pointer;
  transition: transform 0.2s ease;
  z-index: 1;
  overflow: visible;
}

/* Animated rainbow border/shadow */
.hero-cta-new::before {
  content: '';
  position: absolute;
  inset: -3px;
  border-radius: 50px;
  background: linear-gradient(90deg, #ff0000, #ff8000, #ffff00, #00ff00, #0080ff, #8000ff, #ff0000);
  background-size: 300% 100%;
  z-index: -1;
  animation: rainbow-flow 2s linear infinite;
}

/* Moving shadow below */
.hero-cta-new::after {
  content: '';
  position: absolute;
  bottom: -20px;
  left: 10%;
  width: 80%;
  height: 20px;
  border-radius: 50%;
  background: linear-gradient(90deg, #ff0000, #ff8000, #ffff00, #00ff00, #0080ff, #8000ff, #ff0000);
  background-size: 300% 100%;
  filter: blur(15px);
  opacity: 0.8;
  animation: rainbow-flow 2s linear infinite;
  z-index: -2;
}

@keyframes rainbow-flow {
  0% {
    background-position: 0% 50%;
  }

  100% {
    background-position: 300% 50%;
  }
}

.hero-cta-new:hover {
  transform: scale(1.05);
}

.hero-cta-new:active {
  transform: scale(0.95);
}

/* Hero Actions Wrapper */
.hero-actions {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 30px;
  margin-top: 40px;
}

/* --- Review Code Tooltip Component --- */
.tooltip-container {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  font-family: inherit;
  color: #c9d1d9;
  z-index: 10;
  pointer-events: none;
  margin-top: 10px;
}

.trigger-wrapper {
  position: relative;
  z-index: 2;
  display: flex;
  justify-content: center;
  pointer-events: auto;
}

.merge-btn {
  background: #111;
  border: 1px solid var(--card-border);
  color: var(--text-secondary);
  padding: 12px 30px;
  border-radius: 30px;
  cursor: pointer;
  font-size: 0.95rem;
  font-weight: 500;
  font-family: inherit;
  transition: all 0.3s ease;
  position: relative;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: center;
}

.merge-btn:hover {
  background: #222;
  border-color: rgba(255, 215, 0, 0.3);
  color: #ffffff;
  transform: translateY(-2px);
}

.branch-path-svg {
  position: absolute;
  top: 100%;
  left: 50%;
  width: 250px;
  height: 50px;
  transform: translateX(-50%);
  z-index: -1;
  pointer-events: none;
  overflow: visible;
}

.branch-line {
  fill: none;
  stroke-width: 3px;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-dasharray: 300;
  stroke-dashoffset: 300;
  transition: stroke-dashoffset 0.5s cubic-bezier(0.4, 0, 0.2, 1);
  display: block;
}

.line-left {
  stroke: #a371f7 !important;
}

.line-right {
  stroke: #238636 !important;
}

.tooltips-wrapper {
  display: flex;
  justify-content: center;
  gap: 15px;
  margin-top: 50px;
  width: 100%;
  pointer-events: auto;
}

.tooltip-content {
  background: #111;
  border: 1px solid var(--card-border);
  padding: 10px 14px;
  border-radius: 12px;
  color: var(--text-primary);
  font-size: 0.8rem;
  white-space: nowrap;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.5);
  z-index: 20;
  min-width: 160px;
  opacity: 0;
  transform: translateY(-10px);
  clip-path: inset(0 0 100% 0);
  transition: opacity 0.3s ease 0.3s, transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275) 0.3s, clip-path 0.4s ease 0.3s;
}

.tooltip-header {
  font-weight: 600;
  margin-bottom: 4px;
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.85rem;
}

.tooltip-info {
  color: var(--text-secondary);
  font-size: 0.75rem;
}

.branch-dot {
  opacity: 0;
  transition: opacity 0.2s ease 0.4s;
}

.dot-left {
  fill: #a371f7;
}

.dot-right {
  fill: #238636;
}

.trigger-wrapper:hover .branch-line,
.tooltip-container:hover .branch-line {
  stroke-dashoffset: 0;
}

.tooltip-container:hover .tooltip-content {
  opacity: 1;
  transform: translateY(0);
  clip-path: inset(0 0 0 0);
}

.tooltip-container:hover .branch-dot {
  opacity: 1;
}

/* Make marquee closer to hero */
.marquee-container {
  padding: 80px 0;
  /* REDUCED from 40px */
  background: var(--card-bg);
  border-top: 1px solid var(--card-border);
  border-bottom: 1px solid var(--card-border);
  overflow: hidden;
  position: relative;
  display: flex;
  margin-top: -20px;
  /* NEGATIVE MARGIN to pull up */
}

.profile-img-new {
  width: 92%;
  height: 92%;
  object-fit: cover;
  border-radius: 36px 36px 42px 42px;
  margin-bottom: -4px;
}

.social-proof {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 40px;
  background: var(--pill-float);
  padding: 8px 20px 8px 8px;
  border-radius: 40px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.05);
  border: 1px solid rgba(0, 0, 0, 0.03);
}

.client-avatars {
  display: flex;
}

.client-avatars img {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: 2px solid #fff;
  margin-left: -10px;
  object-fit: cover;
}

.client-avatars img:first-child {
  margin-left: 0;
}

.client-text {
  font-family: 'Inter', sans-serif;
  font-size: 0.85rem;
  color: var(--hero-secondary);
  font-weight: 500;
}

/* -------------------------------------
   REST OF DOCUMENT (Original Dark Mode)
   ------------------------------------- */

.marquee-container {
  padding: 40px 0;
  background: var(--card-bg);
  border-top: 1px solid var(--card-border);
  border-bottom: 1px solid var(--card-border);
  overflow: hidden;
  position: relative;
  display: flex;
}

.marquee-track {
  display: flex;
  width: max-content;
  animation: marquee_dark 20s linear infinite;
}

.marquee-content {
  display: flex;
  align-items: center;
  gap: 40px;
  padding: 0 20px;
}

.marquee-content span {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 1.5rem;
  font-weight: 500;
  color: var(--text-secondary);
}

.marquee-content .separator {
  color: var(--accent);
  font-size: 1rem;
}

@keyframes marquee_dark {
  0% {
    transform: translateX(0);
  }

  100% {
    transform: translateX(-50%);
  }
}

section:not(.hero-new) {
  padding: 100px 40px;
  max-width: 1200px;
  margin: 0 auto;
}

.section-tag {
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: 2px;
  font-size: 0.85rem;
  font-weight: 600;
  display: block;
  margin-bottom: 16px;
}

.section-title {
  font-size: 3rem;
  font-weight: 700;
  margin-bottom: 60px;
  line-height: 1.2;
}

.gradient-text,
.highlight {
  background: linear-gradient(135deg, #fff, var(--accent));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.work-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 50px;
  justify-items: center;
}

/* From Uiverse.io by ElSombrero2 */
.work-grid .card {
  overflow: visible;
  width: 100%;
  max-width: 350px;
  height: 450px;
  perspective: 1000px;
}

.work-grid .content {
  width: 100%;
  height: 100%;
  transform-style: preserve-3d;
  transition: transform 600ms cubic-bezier(0.2, 0.8, 0.2, 1);
  box-shadow: 0px 5px 25px rgba(0, 0, 0, 0.8);
  border-radius: 20px;
}

.work-grid .front,
.work-grid .back {
  background-color: #111;
  position: absolute;
  width: 100%;
  height: 100%;
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
  border-radius: 20px;
  overflow: hidden;
}

.work-grid .back {
  justify-content: center;
  display: flex;
  align-items: center;
}

.work-grid .back::before {
  position: absolute;
  content: '';
  display: block;
  width: 300px;
  height: 250%;
  background: linear-gradient(90deg, transparent, var(--accent), var(--accent), transparent);
  animation: rotation_card 5s infinite linear;
}

.work-grid .back-content {
  position: absolute;
  width: calc(100% - 4px);
  height: calc(100% - 4px);
  background-color: #151515;
  border-radius: 18px;
  color: white;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 20px;
  z-index: 2;
}

.project-abbr {
  font-size: 4rem;
  font-weight: 800;
  background: linear-gradient(135deg, #fff, var(--text-secondary));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  margin: 0;
}

.work-grid .card:hover .content {
  transform: rotateY(180deg);
}

@keyframes rotation_card {
  0% {
    transform: rotateZ(0deg);
  }

  100% {
    transform: rotateZ(360deg);
  }
}

.work-grid .front {
  transform: rotateY(180deg);
  color: white;
}

.work-grid .front-content {
  position: absolute;
  width: 100%;
  height: 100%;
  padding: 30px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  z-index: 5;
}

.work-grid .badge {
  background-color: rgba(0, 0, 0, 0.6);
  padding: 8px 16px;
  border-radius: 20px;
  backdrop-filter: blur(8px);
  width: fit-content;
  font-size: 0.9rem;
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: var(--accent);
}

.work-grid .description {
  box-shadow: 0px 5px 20px rgba(0, 0, 0, 0.6);
  width: 100%;
  padding: 24px;
  background-color: rgba(0, 0, 0, 0.8);
  backdrop-filter: blur(12px);
  border-radius: 15px;
  border: 1px solid rgba(255, 255, 255, 0.05);
}

.work-grid .title {
  font-size: 1.3rem;
  margin-bottom: 12px;
  color: #fff;
}

.work-grid .card-footer {
  color: var(--text-secondary);
  font-size: 0.95rem;
  line-height: 1.5;
}

.work-grid .img {
  position: absolute;
  width: 100%;
  height: 100%;
  overflow: hidden;
  z-index: 1;
}

.work-grid .circle {
  width: 200px;
  height: 200px;
  border-radius: 50%;
  background-color: rgba(255, 215, 0, 0.4);
  position: absolute;
  filter: blur(40px);
  animation: floating 4s infinite ease-in-out alternate;
}

.work-grid #bottom {
  background-color: rgba(255, 136, 102, 0.4);
  left: -30px;
  top: 200px;
  width: 280px;
  height: 280px;
  animation-delay: -1.5s;
}

.work-grid #right {
  background-color: rgba(255, 34, 51, 0.4);
  left: 200px;
  top: -50px;
  width: 150px;
  height: 150px;
  animation-delay: -3s;
}

/* Mobile Optimization for Work Grid 2x2 */
@media (max-width: 768px) {
  .work-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 15px;
  }

  .work-grid .card {
    max-width: 100%;
    height: 260px;
  }

  .project-abbr {
    font-size: 2.2rem;
  }

  .work-grid .front-content {
    padding: 12px;
  }

  .work-grid .badge {
    font-size: 0.65rem;
    padding: 4px 8px;
  }

  .work-grid .description {
    padding: 12px;
  }

  .work-grid .title {
    font-size: 0.9rem;
    margin-bottom: 4px;
  }

  .work-grid .card-footer {
    font-size: 0.65rem;
    line-height: 1.2;
  }

  .work-grid .circle {
    width: 100px;
    height: 100px;
    filter: blur(25px);
  }

  .work-grid #bottom {
    top: 120px;
    left: -20px;
    width: 150px;
    height: 150px;
  }

  .work-grid #right {
    top: -20px;
    left: 100px;
    width: 80px;
    height: 80px;
  }
}

/* About Section */
.about-container {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px;
  align-items: center;
}

.about-image-wrapper {
  position: relative;
  width: 100%;
  max-width: 450px;
}

.about-img {
  width: 100%;
  border-radius: 20px;
  filter: grayscale(100%);
  position: relative;
  z-index: 2;
}

.about-frame {
  position: absolute;
  top: 20px;
  left: 20px;
  width: 100%;
  height: 100%;
  border: 1px solid var(--accent);
  border-radius: 20px;
  z-index: 1;
}

.about-badge {
  position: absolute;
  bottom: -20px;
  right: -20px;
  background: var(--card-bg);
  padding: 24px;
  border: 1px solid var(--card-border);
  border-radius: 50%;
  width: 140px;
  height: 140px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  z-index: 3;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
  text-align: center;
}

.badge-number {
  font-size: 2rem;
  font-weight: 700;
  color: var(--accent);
  line-height: 1;
}

.badge-text {
  font-size: 0.75rem;
  color: var(--text-secondary);
  text-transform: uppercase;
  margin-top: 4px;
}

.about-title {
  font-size: 2.5rem;
  margin-bottom: 24px;
  line-height: 1.2;
}

.about-text p {
  color: var(--text-secondary);
  margin-bottom: 16px;
  font-size: 1.1rem;
}

.about-text strong {
  color: var(--text-primary);
}

.about-stats {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 24px;
  margin-top: 40px;
}

.stat-item {
  display: flex;
  flex-direction: column;
}

.stat-number {
  font-size: 2.5rem;
  font-weight: 700;
  font-family: 'Space Grotesk', sans-serif;
  color: var(--text-primary);
}

.stat-label {
  color: var(--text-secondary);
  font-size: 0.9rem;
}

/* --- Stack Section Redesigned (Floating Background Spinners) --- */
.stack {
  position: relative;
  overflow: hidden;
  padding: 100px 40px;
}

.stack-bg-spinners {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  overflow: hidden;
}

.spinner-bg {
  position: absolute;
  animation: floatShape var(--float-duration, 8s) ease-in-out infinite alternate;
}

.spinner-1 {
  top: 15%;
  left: 5%;
  transform: scale(0.65);
  --float-duration: 9s;
}

.spinner-1 .spinner {
  --clr: #00ffcc;
  --clr-alpha: rgba(0, 255, 204, 0.1);
}

.spinner-2 {
  top: 60%;
  left: 15%;
  transform: scale(1.1) rotate(15deg);
  --float-duration: 12s;
  animation-delay: -2s;
}

.spinner-2 .spinner {
  --clr: #ff3366;
  --clr-alpha: rgba(255, 51, 102, 0.1);
}

.spinner-3 {
  top: 25%;
  right: 8%;
  transform: scale(0.8) rotate(-20deg);
  --float-duration: 15s;
  animation-delay: -4s;
}

.spinner-3 .spinner {
  --clr: #9933ff;
  --clr-alpha: rgba(153, 51, 255, 0.1);
}

.spinner-4 {
  bottom: 12%;
  right: 18%;
  transform: scale(1.3) rotate(45deg);
  --float-duration: 10s;
  animation-delay: -6s;
}

.spinner-4 .spinner {
  --clr: #ffcc00;
  --clr-alpha: rgba(255, 204, 0, 0.1);
}

/* Base Spinner CSS */
.spinner {
  width: 100px;
  height: 100px;
  animation: spinner 3s infinite ease;
  transform-style: preserve-3d;
}

.spinner>div {
  background-color: var(--clr-alpha);
  height: 100%;
  position: absolute;
  width: 100%;
  border: 3.5px solid var(--clr);
  box-shadow: 0 0 10px var(--clr-alpha) inset, 0 0 15px var(--clr-alpha);
}

.spinner div:nth-of-type(1) {
  transform: translateZ(-50px) rotateY(180deg);
}

.spinner div:nth-of-type(2) {
  transform: rotateY(-270deg) translateX(50%);
  transform-origin: top right;
}

.spinner div:nth-of-type(3) {
  transform: rotateY(270deg) translateX(-50%);
  transform-origin: center left;
}

.spinner div:nth-of-type(4) {
  transform: rotateX(90deg) translateY(-50%);
  transform-origin: top center;
}

.spinner div:nth-of-type(5) {
  transform: rotateX(-90deg) translateY(50%);
  transform-origin: bottom center;
}

.spinner div:nth-of-type(6) {
  transform: translateZ(50px);
}

@keyframes spinner {
  0% {
    transform: rotate(45deg) rotateX(-25deg) rotateY(25deg);
  }

  50% {
    transform: rotate(45deg) rotateX(-385deg) rotateY(25deg);
  }

  100% {
    transform: rotate(45deg) rotateX(-385deg) rotateY(385deg);
  }
}

/* Foreground Container */
.stack-header {
  position: relative;
  z-index: 2;
  text-align: center;
  margin-bottom: 60px;
}

.stack-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 32px;
  position: relative;
  z-index: 2;
  max-width: 1100px;
  margin: 0 auto;
}

/* Categories List */
.stack-cat-card {
  background: rgba(17, 17, 17, 0.7);
  backdrop-filter: blur(10px);
  border: 1px solid var(--card-border);
  border-radius: 20px;
  padding: 30px;
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1), border-color 0.3s, box-shadow 0.3s;
}

.stack-cat-card:hover {
  transform: translateY(-8px);
  border-color: rgba(255, 215, 0, 0.3);
  box-shadow: 0 15px 35px rgba(0, 0, 0, 0.4);
}

.cat-title {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 1.1rem;
  color: var(--text-secondary);
  margin-bottom: 20px;
  text-transform: uppercase;
  letter-spacing: 2px;
}

.cat-items {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
}

.tech-chip {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 18px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: 40px;
  color: #fff;
  font-weight: 500;
  font-size: 0.95rem;
  transition: all 0.3s ease;
}

.tech-chip:hover {
  background: rgba(255, 215, 0, 0.2);
  border-color: rgba(255, 215, 0, 0.5);
  transform: translateY(-3px);
  box-shadow: 0 8px 20px rgba(255, 215, 0, 0.15);
  color: gold;
}

.tech-chip img {
  width: 22px;
  height: 22px;
  object-fit: contain;
  transition: filter 0.3s ease;
}

.tech-chip:hover img {
  filter: drop-shadow(0 0 4px rgba(255, 215, 0, 0.8));
}

.tech-text-icon {
  font-size: 0.7rem;
  font-weight: 800;
  color: var(--accent);
  background: rgba(255, 215, 0, 0.1);
  padding: 4px 6px;
  border-radius: 6px;
  line-height: 1;
}

/* Responsive Stack */
@media (max-width: 900px) {
  .stack-grid {
    grid-template-columns: 1fr;
    max-width: 500px;
  }
}

@media (max-width: 480px) {
  .stack-cat-card {
    padding: 24px;
  }

  .tech-chip {
    padding: 8px 16px;
    font-size: 0.85rem;
  }

  .spinner-bg {
    transform: scale(0.5) !important;
  }
}

/* Contact Section */
.contact-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: 30px;
  padding: 80px;
  position: relative;
  overflow: hidden;
}

.contact-title {
  font-size: 3.5rem;
  margin-bottom: 24px;
  line-height: 1.1;
}

.contact-subtitle {
  color: var(--text-secondary);
  font-size: 1.1rem;
  max-width: 400px;
  margin-bottom: 40px;
}

.contact-link.large {
  display: inline-flex;
  align-items: center;
  gap: 16px;
  font-size: 2rem;
  font-family: 'Space Grotesk', sans-serif;
  font-weight: 500;
  margin-bottom: 40px;
  position: relative;
}

.contact-link.large::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 100%;
  height: 2px;
  background: var(--accent);
  transform: scaleX(0);
  transform-origin: right;
  transition: transform 0.3s;
}

.contact-link.large:hover::after {
  transform: scaleX(1);
  transform-origin: left;
}

.social-links {
  display: flex;
  gap: 24px;
}

.social-link {
  color: var(--text-secondary);
  text-transform: uppercase;
  font-size: 0.85rem;
  letter-spacing: 1px;
  transition: color 0.2s;
}

.social-link:hover {
  color: var(--accent);
}

.contact-visual {
  position: relative;
  width: 250px;
  height: 250px;
}

.contact-orb {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 100px;
  height: 100px;
  background: var(--accent);
  border-radius: 50%;
  filter: blur(40px);
  opacity: 0.5;
}

.contact-text-rotate {
  animation: rotate 15s linear infinite;
  width: 100%;
  height: 100%;
}

.contact-text-rotate text {
  font-size: 24px;
  font-family: 'Space Grotesk', sans-serif;
  fill: var(--text-secondary);
  letter-spacing: 4px;
}

@keyframes rotate {
  from {
    transform: rotate(0deg);
  }

  to {
    transform: rotate(360deg);
  }
}

/* Footer */
.footer {
  padding: 40px;
  border-top: 1px solid var(--card-border);
}

.footer-content {
  max-width: 1200px;
  margin: 0 auto;
}

.footer-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 40px;
}

.footer-logo {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 1.5rem;
  font-weight: 700;
}

.footer-bottom {
  display: flex;
  justify-content: space-between;
  color: var(--text-secondary);
  font-size: 0.9rem;
}

/* Animations Trigger Classes */
[data-animate] {
  opacity: 0;
  transition: all 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

[data-animate="fade-up"] {
  transform: translateY(40px);
}

[data-animate="slide-up"] {
  transform: translateY(100px);
}

[data-animate="scale-in"] {
  transform: scale(0.9);
}

[data-animate].visible {
  opacity: 1;
  transform: none;
}

@media (max-width: 900px) {
  .hero-title-new {
    font-size: 3.5rem;
  }

  .hero-new {
    flex-direction: column;
    justify-content: center;
    padding-top: 100px;
    text-align: center;
  }

  .hero-center {
    margin-bottom: 60px;
    display: flex;
    flex-direction: column;
    align-items: center;
  }

  .hero-bg-text {
    top: 30%;
  }

  .about-container {
    grid-template-columns: 1fr;
  }

  .contact-container {
    flex-direction: column;
    padding: 40px;
    text-align: center;
  }

  .contact-visual {
    display: none;
  }

  .nav-container {
    top: 20px;
    width: 90%;
    justify-content: space-between;
    padding: 12px 20px;
    background: transparent;
    border: none;
    box-shadow: none;
  }

  /* Prevent background scrolling when menu is open */
  body.menu-open {
    overflow: hidden !important;
  }

  .hamburger {
    display: flex;
    flex-direction: column;
    gap: 6px;
    background: rgba(10, 10, 10, 0.8);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    cursor: pointer;
    z-index: 1001;
    padding: 14px 12px;
    width: 50px;
    height: 50px;
    margin-left: auto;
    align-items: center;
    justify-content: center;
  }

  .hamburger span {
    display: block;
    width: 22px;
    height: 2px;
    background-color: var(--hero-text);
    transition: all 0.3s ease;
  }

  /* Hamburger Active Animation */
  .nav-container.active .hamburger span:nth-child(1) {
    transform: translateY(8px) rotate(45deg);
  }

  .nav-container.active .hamburger span:nth-child(2) {
    opacity: 0;
  }

  .nav-container.active .hamburger span:nth-child(3) {
    transform: translateY(-8px) rotate(-45deg);
  }

  /* Hidden Full Screen Overlay Initially */
  .nav-links {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(10, 10, 10, 0.98);
    backdrop-filter: blur(20px);
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 0;
    margin: 0;
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-100%);
    transition: transform 0.5s cubic-bezier(0.76, 0, 0.24, 1), opacity 0.5s ease;
  }

  /* Show links when active */
  .nav-links.active {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
  }

  .nav-links a {
    width: auto;
    text-align: center;
    padding: 15px 30px;
    font-size: 2rem;
    font-weight: 700;
    border-radius: 0;
    color: var(--hero-text);
  }

  .nav-links a.active {
    background: none;
    color: var(--hero-accent);
  }

  .profile-card-container {
    width: 220px;
    height: 220px;
  }

  .shape-pyramid {
    top: 8%;
    left: 5%;
    width: 80px;
  }

  .shape-star {
    top: 5%;
    right: 5%;
    width: 100px;
  }

  .shape-sphere {
    top: 35%;
    left: -2%;
    width: 120px;
  }

  .shape-blob {
    top: 40%;
    right: 0%;
    width: 90px;
  }

  .shape-cylinder {
    bottom: 15%;
    left: 0;
    width: 100px;
  }

  .shape-cube {
    bottom: 20%;
    right: 5%;
    width: 80px;
  }
}

/* ============================================
   MOBILE RESPONSIVE CSS - ADD AT END OF FILE
   ============================================ */

/* Hide cursor on touch devices */
@media (pointer: coarse) {

  .cursor-dot,
  .cursor-outline {
    display: none !important;
  }

  body {
    cursor: auto;
  }
}

/* Mobile Navigation - Hamburger Menu */
@media (max-width: 768px) {

  /* Nav becomes hamburger */
  .nav-container {
    top: 16px;
    left: auto;
    right: 16px;
    transform: none;
    padding: 12px;
    border-radius: 50%;
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
  }

  /* Add this inside the @media (max-width: 768px) section, after .nav-container */

  .nav-container {
    position: fixed;
    /* Add this */
    top: 16px;
    right: 16px;
    left: auto;
    /* Override the left: 50% */
    transform: none;
    /* Override the translateX(-50%) */
    /* ... rest of properties */
  }

  .nav-links {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(5, 5, 5, 0.98);
    backdrop-filter: blur(20px);
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 24px;
    opacity: 0;
    visibility: hidden;
    transition: all 0.4s ease;
    z-index: 999;
    border-radius: 0;
    padding: 0;
  }

  .nav-links.active {
    opacity: 1;
    visibility: visible;
  }

  .nav-links a {
    font-size: 1.5rem;
    color: var(--text-primary);
    padding: 16px 32px;
  }

  .nav-links a.active {
    background: transparent;
    color: var(--accent);
  }

  /* Hamburger Icon */
  .nav-container::before {
    content: '';
    position: absolute;
    width: 20px;
    height: 2px;
    background: var(--hero-text);
    box-shadow: 0 6px 0 var(--hero-text), 0 12px 0 var(--hero-text);
    transition: all 0.3s ease;
  }

  .nav-container.active::before {
    transform: rotate(45deg);
    box-shadow: none;
    top: 50%;
    margin-top: -1px;
  }

  .nav-container.active::after {
    content: '';
    position: absolute;
    width: 20px;
    height: 2px;
    background: var(--hero-text);
    transform: rotate(-45deg);
  }
}

/* Small Mobile Devices (up to 480px) */
@media (max-width: 480px) {

  /* Hero Section */
  .hero-new {
    min-height: 100vh;
    padding-top: 80px;
    padding-left: 16px;
    padding-right: 16px;
  }

  .bg-text-row {
    font-size: 5rem;
    letter-spacing: -0.03em;
  }

  .hero-title-new {
    font-size: 2.2rem;
    margin-bottom: 4px;
  }

  .hero-subtitle-new {
    font-size: 0.95rem;
  }

  .profile-card-container {
    width: 180px;
    height: 180px;
    border-radius: 32px;
    margin-bottom: 24px;
  }

  .profile-img-new {
    border-radius: 28px 28px 30px 30px;
  }

  /* Floating Shapes - Smaller & Repositioned */
  .shape {
    filter: drop-shadow(0 10px 20px rgba(0, 0, 0, 0.1));
  }

  .shape-pyramid {
    width: 60px;
    top: 10%;
    left: 5%;
  }

  .shape-star {
    width: 80px;
    top: 8%;
    right: 5%;
  }

  .shape-sphere {
    width: 90px;
    top: 45%;
    left: -5%;
  }

  .shape-blob {
    width: 70px;
    top: 50%;
    right: -2%;
  }

  .shape-cylinder {
    width: 80px;
    bottom: 18%;
    left: 2%;
  }

  .shape-cube {
    width: 65px;
    bottom: 22%;
    right: 5%;
  }

  .social-proof {
    padding: 6px 16px 6px 6px;
    margin-bottom: 24px;
  }

  .client-avatars img {
    width: 28px;
    height: 28px;
  }

  .client-text {
    font-size: 0.8rem;
  }

  .hero-cta-new {
    padding: 14px 28px;
    font-size: 1rem;
    box-shadow: 0 0 0 4px #f0f4ff, 0 8px 16px rgba(99, 102, 241, 0.15);
  }

  /* Marquee */
  .marquee-container {
    padding: 24px 0;
  }

  .marquee-content span {
    font-size: 1rem;
  }

  .marquee-content {
    gap: 24px;
  }

  /* Work Section */
  section:not(.hero-new) {
    padding: 60px 16px;
  }

  .section-title {
    font-size: 1.8rem;
    margin-bottom: 32px;
  }

  .section-tag {
    font-size: 0.75rem;
    margin-bottom: 12px;
  }

  .work-grid {
    gap: 20px;
  }

  .work-card {
    border-radius: 16px;
  }

  .card-image {
    height: 200px;
  }

  .work-card.featured .card-image {
    min-height: 200px;
  }

  .card-content {
    padding: 20px;
  }

  .card-content h3 {
    font-size: 1.2rem;
  }

  .card-content p {
    font-size: 0.9rem;
    margin-bottom: 16px;
  }

  .card-meta {
    font-size: 0.75rem;
  }

  .card-tags span {
    font-size: 0.7rem;
    padding: 3px 10px;
  }

  /* About Section */
  .about-container {
    gap: 32px;
  }

  .about-image-wrapper {
    max-width: 280px;
    margin: 0 auto;
  }

  .about-img {
    border-radius: 16px;
  }

  .about-frame {
    top: 12px;
    left: 12px;
    border-radius: 16px;
  }

  .about-badge {
    width: 100px;
    height: 100px;
    padding: 16px;
    bottom: -10px;
    right: -10px;
  }

  .badge-number {
    font-size: 1.5rem;
  }

  .badge-text {
    font-size: 0.6rem;
  }

  .about-title {
    font-size: 1.8rem;
    text-align: center;
  }

  .about-text p {
    font-size: 0.95rem;
    text-align: center;
  }

  .about-stats {
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
    margin-top: 24px;
  }

  .stat-number {
    font-size: 1.8rem;
  }

  .stat-label {
    font-size: 0.8rem;
  }

  /* Stack Section */
  .stack-grid {
    grid-template-columns: 1fr;
    gap: 20px;
  }

  .stack-category {
    padding: 20px;
    background: var(--card-bg);
    border-radius: 16px;
    border: 1px solid var(--card-border);
  }

  .stack-category h3 {
    font-size: 1rem;
    margin-bottom: 16px;
  }

  .stack-items {
    gap: 12px;
  }

  .stack-item {
    padding: 12px;
  }

  .stack-icon {
    font-size: 1.2rem;
  }

  .stack-item span {
    font-size: 0.9rem;
  }

  /* Contact Section */
  .contact-container {
    padding: 40px 24px;
    border-radius: 20px;
  }

  .contact-title {
    font-size: 2rem;
    text-align: center;
  }

  .contact-subtitle {
    font-size: 0.95rem;
    text-align: center;
    margin-bottom: 24px;
  }

  .contact-link.large {
    font-size: 1.3rem;
    justify-content: center;
    margin-bottom: 24px;
  }

  .social-links {
    justify-content: center;
    flex-wrap: wrap;
    gap: 16px;
  }

  .social-link {
    font-size: 0.75rem;
  }

  /* Footer */
  .footer {
    padding: 24px 16px;
  }

  .footer-top {
    flex-direction: column;
    gap: 16px;
    margin-bottom: 24px;
  }

  .footer-bottom {
    flex-direction: column;
    gap: 8px;
    text-align: center;
  }
}

/* Tablet Devices (481px - 768px) */
@media (min-width: 481px) and (max-width: 768px) {
  .hero-new {
    padding-left: 24px;
    padding-right: 24px;
  }

  .bg-text-row {
    font-size: 7rem;
  }

  .hero-title-new {
    font-size: 2.8rem;
  }

  .profile-card-container {
    width: 220px;
    height: 220px;
  }

  .shape-pyramid {
    width: 80px;
    left: 8%;
  }

  .shape-star {
    width: 110px;
    right: 8%;
  }

  .shape-sphere {
    width: 120px;
    left: 2%;
  }

  .shape-blob {
    width: 100px;
    right: 3%;
  }

  .shape-cylinder {
    width: 110px;
    left: 5%;
  }

  .shape-cube {
    width: 90px;
    right: 8%;
  }

  section:not(.hero-new) {
    padding: 80px 24px;
  }

  .section-title {
    font-size: 2.2rem;
  }

  .work-grid {
    grid-template-columns: 1fr;
    gap: 24px;
  }

  .about-container {
    grid-template-columns: 1fr;
    gap: 40px;
  }

  .about-image-wrapper {
    max-width: 350px;
    margin: 0 auto;
  }

  .stack-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
  }

  .contact-container {
    flex-direction: column;
    padding: 48px;
  }

  .contact-visual {
    display: none;
  }
}

/* Large Tablets (769px - 1024px) */
@media (min-width: 769px) and (max-width: 1024px) {
  .nav-links a {
    padding: 10px 20px;
    font-size: 0.9rem;
  }

  .bg-text-row {
    font-size: 12rem;
  }

  .shape-pyramid {
    width: 100px;
    left: 10%;
  }

  .shape-star {
    width: 140px;
    right: 12%;
  }

  .shape-sphere {
    width: 160px;
  }

  .shape-blob {
    width: 130px;
  }

  .shape-cylinder {
    width: 140px;
  }

  .shape-cube {
    width: 120px;
  }

  .work-card.featured {
    grid-template-columns: 1fr;
  }

  .about-container {
    gap: 40px;
  }

  .contact-container {
    padding: 60px;
  }
}

/* Reduced Motion */
@media (prefers-reduced-motion: reduce) {

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }

  .bg-text-row {
    animation: none;
  }

  .marquee-track {
    animation: none;
  }
}

/* Landscape Mode on Mobile */
@media (max-height: 500px) and (orientation: landscape) {
  .hero-new {
    min-height: auto;
    padding: 100px 24px 60px;
  }

  .profile-card-container {
    width: 150px;
    height: 150px;
  }

  .shape {
    display: none;
  }

  .bg-text-row {
    font-size: 4rem;
  }
}

/* High DPI / Retina Displays */
@media (-webkit-min-device-pixel-ratio: 2),
(min-resolution: 192dpi) {
  .shape img {
    image-rendering: -webkit-optimize-contrast;
  }
}

body.menu-open {
  overflow: hidden;
  touch-action: none;
}

/* ═══════════════════════════════════════════════
   NEW FEATURES — Loader, Hamburger, Carousel,
   Scroll-top, Suffix counters, Footer socials
   ═══════════════════════════════════════════════ */

/* ─── Scroll Progress ─── */
#scroll-bar {
  position: fixed;
  top: 0;
  left: 0;
  height: 2px;
  width: 100%;
  background: linear-gradient(90deg, gold, #ff5722, #6366f1);
  transform: scaleX(0);
  transform-origin: left;
  z-index: 99998;
  box-shadow: 0 0 8px rgba(255, 215, 0, 0.5);
}

/* ─── Page Loader ─── */
#page-loader {
  position: fixed;
  inset: 0;
  background: #050505;
  z-index: 999999;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: opacity 0.4s ease;
}

#page-loader.loader-done {
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.5s ease 0.3s;
}

.loader-inner {
  text-align: center;
  position: relative;
  z-index: 2;
}

.loader-name {
  font-family: 'Space Grotesk', sans-serif;
  font-size: clamp(2.5rem, 6vw, 4rem);
  font-weight: 800;
  color: #fff;
  letter-spacing: -0.03em;
  display: block;
  margin-bottom: 24px;
}

.loader-bar {
  width: 200px;
  height: 2px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 2px;
  overflow: hidden;
  margin: 0 auto;
}

.loader-fill {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, gold, #ff5722);
  border-radius: 2px;
  transition: width 0.1s ease;
}

/* Wipe panel */
.loader-wipe {
  position: absolute;
  inset: 0;
  background: #050505;
  transform: scaleY(0);
  transform-origin: bottom;
  z-index: 3;
}

.loader-wipe.wipe-active {
  animation: loaderWipe 0.7s cubic-bezier(0.76, 0, 0.24, 1) forwards;
}

@keyframes loaderWipe {
  0% {
    transform: scaleY(0);
    transform-origin: bottom;
  }

  50% {
    transform: scaleY(1);
    transform-origin: bottom;
  }

  51% {
    transform-origin: top;
  }

  100% {
    transform: scaleY(0);
    transform-origin: top;
  }
}

/* ─── Hero animations (trigger after loader) ─── */
body:not(.loaded) .hero-title-new,
body:not(.loaded) .profile-card-container,
body:not(.loaded) .social-proof,
body:not(.loaded) .hero-cta-new,
body:not(.loaded) .hero-subtitle-new {
  opacity: 0 !important;
  animation: none !important;
}

.hero-title-new {
  animation: heroTitleIn 0.9s cubic-bezier(0.16, 1, 0.3, 1) 0.1s both;
}

.profile-card-container {
  animation: fadeSlideUp 1s cubic-bezier(0.16, 1, 0.3, 1) 0.3s both;
}

.social-proof {
  animation: fadeSlideUp 0.8s cubic-bezier(0.16, 1, 0.3, 1) 0.55s both;
}

.hero-cta-new {
  animation: fadeSlideUp 0.8s cubic-bezier(0.16, 1, 0.3, 1) 0.72s both;
  position: relative;
  overflow: hidden;
}

.hero-cta-new::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at center, rgba(99, 102, 241, 0.18), transparent 70%);
  transform: scale(0);
  transition: transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
  border-radius: inherit;
}

.hero-cta-new:hover::before {
  transform: scale(2.2);
}

@keyframes heroTitleIn {
  from {
    opacity: 0;
    transform: translateY(28px);
  }

  to {
    opacity: 1;
    transform: none;
  }
}

@keyframes fadeSlideUp {
  from {
    opacity: 0;
    transform: translateY(22px);
  }

  to {
    opacity: 1;
    transform: none;
  }
}

/* ─── End Conflict Cleanup ─── */

/* ─── Scroll To Top Button ─── */
#scroll-top {
  position: fixed;
  bottom: 32px;
  right: 32px;
  width: 48px;
  height: 48px;
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 1000;
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 0.3s ease, transform 0.3s ease, background 0.2s, border-color 0.2s;
  color: var(--text-secondary);
}

#scroll-top.visible {
  opacity: 1;
  transform: none;
}

#scroll-top:hover {
  background: rgba(255, 215, 0, 0.1);
  border-color: rgba(255, 215, 0, 0.4);
  color: gold;
}

/* ─── Subtitle Ticker ─── */
.subtitle-ticker-wrap {
  overflow: hidden;
}

.hero-subtitle-new {
  display: block;
  transition: transform 0.4s cubic-bezier(0.76, 0, 0.24, 1), opacity 0.4s ease;
}

.hero-subtitle-new.ticker-exit {
  transform: translateY(-100%);
  opacity: 0;
}

.hero-subtitle-new.ticker-enter {
  animation: tickerIn 0.45s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes tickerIn {
  from {
    transform: translateY(100%);
    opacity: 0;
  }

  to {
    transform: none;
    opacity: 1;
  }
}

/* ─── Scroll Animations ─── */
[data-animate="fade-up"],
[data-animate="slide-up"] {
  opacity: 0;
  transform: translateY(48px);
  transition: opacity 0.9s cubic-bezier(0.16, 1, 0.3, 1), transform 0.9s cubic-bezier(0.16, 1, 0.3, 1);
}

[data-animate="scale-in"] {
  opacity: 0;
  transform: scale(0.88);
  transition: opacity 0.9s cubic-bezier(0.16, 1, 0.3, 1), transform 0.9s cubic-bezier(0.16, 1, 0.3, 1);
}

[data-animate="stagger-up"] {
  opacity: 0;
  transform: translateY(32px);
  transition: opacity 0.8s cubic-bezier(0.16, 1, 0.3, 1), transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

[data-animate].visible {
  opacity: 1;
  transform: none;
}

[data-animate="stagger-up"].visible .stat-item {
  animation: statIn 0.6s cubic-bezier(0.16, 1, 0.3, 1) both;
}

.stat-item:nth-child(1) {
  animation-delay: 0.05s;
}

.stat-item:nth-child(2) {
  animation-delay: 0.15s;
}

.stat-item:nth-child(3) {
  animation-delay: 0.25s;
}

.stat-item:nth-child(4) {
  animation-delay: 0.35s;
}

@keyframes statIn {
  from {
    opacity: 0;
    transform: translateY(20px);
  }

  to {
    opacity: 1;
    transform: none;
  }
}

/* ─── Section header reveal ─── */
.reveal-header .section-tag,
.reveal-header .section-title {
  transform: translateY(80%);
  opacity: 0;
  transition: transform 0.85s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.85s ease;
}

.reveal-header .section-title {
  transition-delay: 0.1s;
}

.reveal-header.revealed .section-tag,
.reveal-header.revealed .section-title {
  transform: none;
  opacity: 1;
}

/* ─── Cards ─── */
.work-card {
  opacity: 0;
  transform: translateY(56px) scale(0.96);
  transition: opacity 0.75s cubic-bezier(0.16, 1, 0.3, 1), transform 0.75s cubic-bezier(0.16, 1, 0.3, 1),
    border-color 0.3s, box-shadow 0.3s;
  position: relative;
  transform-style: preserve-3d;
}

.work-card.card-visible {
  opacity: 1;
  transform: none;
}

.work-card:hover {
  border-color: rgba(255, 215, 0, 0.4) !important;
  box-shadow: 0 32px 64px rgba(0, 0, 0, 0.55), 0 0 0 1px rgba(255, 215, 0, 0.12) !important;
}

.work-card:hover .card-image img {
  transform: scale(1.08) !important;
  transition: transform 0.7s cubic-bezier(0.16, 1, 0.3, 1) !important;
}

.card-overlay {
  background: linear-gradient(135deg, rgba(0, 0, 0, 0.65), rgba(99, 102, 241, 0.35)) !important;
}

.view-project {
  backdrop-filter: blur(10px) !important;
  background: rgba(255, 255, 255, 0.9) !important;
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.2);
}

.card-shine {
  position: absolute;
  inset: 0;
  border-radius: inherit;
  pointer-events: none;
  z-index: 5;
  transition: background 0.08s;
}

.card-num {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 3px;
  color: var(--accent);
  opacity: 0.55;
  margin-bottom: 10px;
  text-transform: uppercase;
}

.work-card.featured.card-visible {
  animation: cardGlow 4s ease-in-out infinite alternate;
}

@keyframes cardGlow {
  from {
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.4);
  }

  to {
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.4), 0 0 50px rgba(255, 215, 0, 0.06);
  }
}

/* ─── Stack items ─── */
.stack-item {
  transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1), background 0.3s, border-color 0.3s, box-shadow 0.3s !important;
}

.stack-item:hover {
  transform: translateX(14px) !important;
  box-shadow: -4px 0 24px rgba(255, 215, 0, 0.1) !important;
}

.about-img {
  transition: filter 0.7s ease;
}

.about-image-wrapper:hover .about-img {
  filter: grayscale(0%) !important;
}

/* ─── TESTIMONIALS ─── */
.testimonials {
  padding: 100px 40px;
  max-width: 1200px;
  margin: 0 auto;
  overflow: hidden;
}

.testimonials-carousel {
  position: relative;
  overflow: hidden;
  border-radius: 24px;
  margin-top: 20px;
}

.carousel-track {
  display: flex;
  transition: transform 0.6s cubic-bezier(0.76, 0, 0.24, 1);
}

.testimonial-card {
  min-width: 100%;
  padding: 56px 64px;
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: 24px;
  box-sizing: border-box;
  flex-shrink: 0;
  opacity: 0.4;
  transform: scale(0.98);
  transition: opacity 0.5s ease, transform 0.5s ease;
}

.testimonial-card.active {
  opacity: 1;
  transform: scale(1);
}

.testimonial-stars {
  color: gold;
  font-size: 1.2rem;
  letter-spacing: 3px;
  margin-bottom: 24px;
}

.testimonial-text {
  font-size: clamp(1rem, 1.4vw, 1.25rem);
  color: var(--text-secondary);
  line-height: 1.75;
  margin-bottom: 36px;
  font-style: italic;
  max-width: 700px;
}

.testimonial-author {
  display: flex;
  align-items: center;
  gap: 16px;
}

.testimonial-author img {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid var(--card-border);
}

.author-name {
  display: block;
  font-family: 'Space Grotesk', sans-serif;
  font-weight: 600;
  font-size: 1rem;
  color: var(--text-primary);
}

.author-role {
  display: block;
  font-size: 0.85rem;
  color: var(--text-secondary);
  margin-top: 2px;
}

.carousel-controls {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  margin-top: 28px;
}

.carousel-btn {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 1px solid var(--card-border);
  background: var(--card-bg);
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.25s ease;
}

.carousel-btn:hover {
  border-color: rgba(255, 215, 0, 0.4);
  color: gold;
  background: rgba(255, 215, 0, 0.05);
}

.carousel-dots {
  display: flex;
  gap: 8px;
  align-items: center;
}

.carousel-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--card-border);
  border: none;
  cursor: pointer;
  transition: background 0.3s ease, transform 0.3s ease;
  padding: 0;
}

.carousel-dot.active {
  background: gold;
  transform: scale(1.3);
}

@media (max-width: 600px) {
  .testimonial-card {
    padding: 32px 24px;
  }

  .testimonials {
    padding: 60px 16px;
  }
}

/* ─── Contact orb ─── */
.contact-orb {
  animation: orbPulse 4s ease-in-out infinite !important;
}

@keyframes orbPulse {

  0%,
  100% {
    transform: scale(1);
    opacity: 0.45;
  }

  50% {
    transform: scale(1.12);
    opacity: 0.75;
  }
}

/* ─── Footer Social Links ─── */
.footer-socials {
  display: flex;
  gap: 12px;
  align-items: center;
}

.footer-social-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  border: 1px solid var(--card-border);
  color: var(--text-secondary);
  font-size: 0.75rem;
  font-weight: 700;
  font-family: 'Space Grotesk', sans-serif;
  letter-spacing: 0.5px;
  text-decoration: none;
  opacity: 0;
  transform: translateY(12px);
  transition: opacity 0.4s ease, transform 0.4s ease, border-color 0.25s, color 0.25s, background 0.25s;
}

.footer-social-link.social-visible {
  opacity: 1;
  transform: none;
}

.footer-social-link:hover {
  border-color: rgba(255, 215, 0, 0.5);
  color: gold;
  background: rgba(255, 215, 0, 0.06);
}

.footer-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 16px;
}

/* ─── Body fade in ─── */
body {
  animation: bodyFadeIn 0.3s ease forwards;
}

@keyframes bodyFadeIn {
  from {
    opacity: 0;
  }

  to {
    opacity: 1;
  }
}


/* ─── Missed from previous session ─── */
.work-card.featured.card-visible {
  animation: featuredPulse 4s ease-in-out infinite alternate;
}

@keyframes featuredPulse {
  from {
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.4);
  }

  to {
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.4), 0 0 50px rgba(255, 215, 0, 0.06);
  }
}

.card-3d {
  transform-style: preserve-3d;
}

/* ═══════════════════════════════════════════════
   STACK CLOUD — Floating group layout
   ═══════════════════════════════════════════════ */

.stack-cloud-wrap {
  position: relative;
  width: 100%;
  min-height: 480px;
  margin-top: 48px;
}

.stack-cloud {
  position: relative;
  width: 100%;
  height: 480px;
}

.stack-group {
  position: absolute;
  left: var(--gx);
  top: var(--gy);
  width: var(--w);
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: 20px;
  padding: 24px;
  animation: stackFloat var(--float, 8s) ease-in-out infinite;
  transition: border-color 0.3s, box-shadow 0.3s;
}

.stack-group:hover {
  border-color: rgba(255, 215, 0, 0.3);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
}

@keyframes stackFloat {

  0%,
  100% {
    transform: translateY(0px);
  }

  50% {
    transform: translateY(-12px);
  }
}

/* Stagger floats so groups don't move in sync */
.stack-group:nth-child(2) {
  animation-delay: -2.5s;
}

.stack-group:nth-child(3) {
  animation-delay: -5s;
}

.stack-group-title {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--accent);
  opacity: 0.7;
  margin-bottom: 16px;
}

.stack-group-items {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.stack-chip {
  display: flex;
  align-items: center;
  gap: 8px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--card-border);
  border-radius: 10px;
  padding: 8px 12px;
  font-size: 0.85rem;
  color: var(--text-secondary);
  transition: background 0.2s, border-color 0.2s, color 0.2s, transform 0.25s;
  cursor: default;
}

.stack-item:hover .stack-chip {
  background: rgba(255, 215, 0, 0.06);
  border-color: rgba(255, 215, 0, 0.3);
  color: var(--text-primary);
  transform: translateY(-2px);
}

.stack-icon {
  width: 22px;
  height: 22px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.stack-icon img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.stack-icon-text {
  font-size: 0.6rem;
  font-weight: 800;
  font-family: 'Space Grotesk', sans-serif;
  color: var(--accent);
  letter-spacing: 0.5px;
  background: rgba(255, 215, 0, 0.1);
  border-radius: 4px;
  width: 22px;
  height: 22px;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Stack cloud on mobile — stack vertically */
@media (max-width: 768px) {
  .stack-cloud {
    height: auto;
    display: flex;
    flex-direction: column;
    gap: 16px;
  }

  .stack-group {
    position: static;
    width: 100% !important;
    animation: none;
  }
}

/* Add these loader fixes to your CSS */
#page-loader {
  position: fixed;
  inset: 0;
  background: #050505;
  z-index: 999999;
  display: flex;
  align-items: center;
  justify-content: center;
}

#page-loader.loader-done {
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.5s ease 0.1s;
}

.loader-wipe {
  position: absolute;
  inset: 0;
  background: #050505;
  transform: scaleY(0);
  transform-origin: bottom;
  z-index: 3;
}

.loader-wipe.wipe-active {
  animation: loaderWipe 0.7s cubic-bezier(0.76, 0, 0.24, 1) forwards;
}

@keyframes loaderWipe {
  0% {
    transform: scaleY(0);
    transform-origin: bottom;
  }

  50% {
    transform: scaleY(1);
    transform-origin: bottom;
  }

  51% {
    transform-origin: top;
  }

  100% {
    transform: scaleY(0);
    transform-origin: top;
  }
}

/* Ensure body content starts hidden */
body:not(.loaded) .hero-title-new,
body:not(.loaded) .profile-card-container,
body:not(.loaded) .social-proof,
body:not(.loaded) .hero-cta-new,
body:not(.loaded) .hero-subtitle-new,
body:not(.loaded) .floating-shapes {
  opacity: 0 !important;
  animation: none !important;
}

/* Reveal animations when loaded */
body.loaded .hero-title-new {
  animation: heroTitleIn 0.9s cubic-bezier(0.16, 1, 0.3, 1) 0.1s both;
}

body.loaded .profile-card-container {
  animation: fadeSlideUp 1s cubic-bezier(0.16, 1, 0.3, 1) 0.3s both;
}

body.loaded .social-proof {
  animation: fadeSlideUp 0.8s cubic-bezier(0.16, 1, 0.3, 1) 0.55s both;
}

body.loaded .hero-cta-new {
  animation: fadeSlideUp 0.8s cubic-bezier(0.16, 1, 0.3, 1) 0.72s both;
}

body.loaded .floating-shapes {
  animation: fadeIn 1s ease 0.5s both;
}

@keyframes heroTitleIn {
  from {
    opacity: 0;
    transform: translateY(28px);
  }

  to {
    opacity: 1;
    transform: none;
  }
}

@keyframes fadeSlideUp {
  from {
    opacity: 0;
    transform: translateY(22px);
  }

  to {
    opacity: 1;
    transform: none;
  }
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }

  to {
    opacity: 1;
  }
}

/* Fallback: if JS fails, show content after 3 seconds */
@media (prefers-reduced-motion: no-preference) {
  body:not(.loaded) {
    animation: forceLoad 0.1s ease 3s forwards;
  }

  @keyframes forceLoad {
    to {
      opacity: 1;
    }
  }

  body:not(.loaded) .hero-title-new,
  body:not(.loaded) .profile-card-container,
  body:not(.loaded) .social-proof,
  body:not(.loaded) .hero-cta-new,
  body:not(.loaded) .hero-subtitle-new {
    animation: forceContentLoad 0.5s ease 3s forwards !important;
  }

  @keyframes forceContentLoad {
    to {
      opacity: 1;
      transform: none;
    }
  }
}