/* Modern Premium Design System */

:root {
  --bg-color: #03070c;
  --bg-darker: #010306;
  --text-primary: #ffffff;
  --text-secondary: #8f9cae;
  --accent-cyan: #00e5ff;
  --accent-cyan-glow: rgba(0, 229, 255, 0.4);
  --accent-cyan-dim: rgba(0, 229, 255, 0.1);
  --card-bg: rgba(7, 13, 22, 0.6);
  --card-border: rgba(0, 229, 255, 0.15);
  --card-glow: rgba(0, 229, 255, 0.05);
  --font-heading: 'Outfit', sans-serif;
  --font-body: 'Inter', sans-serif;
  --transition-smooth: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
  --transition-fast: all 0.2s ease;
}

/* Preloader Screen */
.preloader {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background-color: #03070c;
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 1;
  visibility: visible;
  transition: opacity 0.8s cubic-bezier(0.16, 1, 0.3, 1), visibility 0.8s;
}

.preloader.fade-out {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.preloader-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.5rem;
}

.preloader-logo-container {
  animation: preloaderPulse 2s infinite ease-in-out;
}

.preloader-logo-svg {
  width: 70px;
  height: 56px;
  filter: drop-shadow(0 0 15px var(--accent-cyan-glow));
}

.preloader-progress-bar {
  width: 200px;
  height: 2px;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 2px;
  overflow: hidden;
  position: relative;
}

.preloader-progress-fill {
  width: 0%;
  height: 100%;
  background: var(--accent-cyan);
  box-shadow: 0 0 10px var(--accent-cyan);
  transition: width 0.05s linear;
}

.preloader-percentage {
  font-family: var(--font-heading);
  font-size: 0.95rem;
  letter-spacing: 0.15em;
  font-weight: 700;
  color: var(--accent-cyan);
  text-shadow: 0 0 10px rgba(0, 229, 255, 0.3);
}

@keyframes preloaderPulse {
  0%, 100% {
    transform: scale(1);
    opacity: 0.8;
  }
  50% {
    transform: scale(1.1);
    opacity: 1;
    filter: drop-shadow(0 0 25px var(--accent-cyan-glow));
  }
}

/* Reset and Globals */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  scroll-behavior: smooth;
}

body {
  background-color: var(--bg-color);
  color: var(--text-primary);
  font-family: var(--font-body);
  overflow-x: hidden;
  line-height: 1.6;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
  width: 10px;
}
::-webkit-scrollbar-track {
  background: var(--bg-darker);
}
::-webkit-scrollbar-thumb {
  background: rgba(0, 229, 255, 0.15);
  border-radius: 5px;
  border: 2px solid var(--bg-darker);
}
::-webkit-scrollbar-thumb:hover {
  background: rgba(0, 229, 255, 0.4);
}

/* Background Mesh & Moving Orbs */
.bg-mesh {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: -2;
  overflow: hidden;
  pointer-events: none;
}

.bg-grid {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-image: 
    linear-gradient(rgba(0, 229, 255, 0.02) 1px, transparent 1px),
    linear-gradient(90deg, rgba(0, 229, 255, 0.02) 1px, transparent 1px);
  background-size: 50px 50px;
  background-position: center;
  mask-image: radial-gradient(circle, black, transparent 80%);
  -webkit-mask-image: radial-gradient(circle, black, transparent 80%);
}

.glow-orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(120px);
  opacity: 0.3;
  animation: floatOrb 20s infinite ease-in-out;
}

.orb-1 {
  top: -10%;
  left: 10%;
  width: 500px;
  height: 500px;
  background: radial-gradient(circle, var(--accent-cyan) 0%, transparent 70%);
  animation-duration: 25s;
}

.orb-2 {
  bottom: 10%;
  right: -10%;
  width: 600px;
  height: 600px;
  background: radial-gradient(circle, rgba(0, 150, 255, 0.8) 0%, transparent 70%);
  animation-duration: 30s;
  animation-delay: -5s;
}

.orb-3 {
  top: 40%;
  left: 50%;
  width: 400px;
  height: 400px;
  background: radial-gradient(circle, rgba(0, 229, 255, 0.5) 0%, transparent 70%);
  animation-duration: 20s;
  animation-delay: -10s;
}

@keyframes floatOrb {
  0%, 100% {
    transform: translate(0, 0) scale(1);
  }
  33% {
    transform: translate(50px, -50px) scale(1.1);
  }
  66% {
    transform: translate(-30px, 40px) scale(0.95);
  }
}

/* Common Text Components */
.cyan-highlight {
  color: var(--accent-cyan);
  text-shadow: 0 0 20px rgba(0, 229, 255, 0.3);
}

.section-label {
  font-family: var(--font-heading);
  font-size: 0.75rem;
  letter-spacing: 0.25em;
  color: var(--accent-cyan);
  display: inline-block;
  margin-bottom: 1rem;
  font-weight: 700;
  text-transform: uppercase;
}

/* ===== NAVIGATION FIXED ===== */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 1000;
  background: rgba(3, 7, 12, 0.4);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  border-bottom: 1px solid rgba(0, 229, 255, 0.05);
  transition: var(--transition-smooth);
}

.navbar.scrolled {
  background: rgba(1, 3, 6, 0.85);
  border-bottom: 1px solid rgba(0, 229, 255, 0.15);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
}

.nav-container {
  max-width: 1400px;
  margin: 0 auto;
  padding: 0.8rem 2rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
}

.nav-logo {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  text-decoration: none;
  color: var(--text-primary);
  flex-shrink: 0;
}

.monarch-logo-svg {
  width: 32px;
  height: 26px;
  filter: drop-shadow(0 0 8px var(--accent-cyan-glow));
}

.logo-text {
  font-family: var(--font-heading);
  font-size: 1.1rem;
  font-weight: 800;
  letter-spacing: 0.12em;
}

.nav-links {
  display: flex;
  gap: 1.8rem;
  align-items: center;
  margin: 0 auto;
}

.nav-link {
  text-decoration: none;
  color: var(--text-secondary);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  transition: var(--transition-fast);
  position: relative;
  padding: 0.4rem 0;
  white-space: nowrap;
}

.nav-link::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 50%;
  width: 0;
  height: 2px;
  background-color: var(--accent-cyan);
  box-shadow: 0 0 8px var(--accent-cyan);
  transition: var(--transition-fast);
  transform: translateX(-50%);
}

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

.nav-link.active::after, .nav-link:hover::after {
  width: 60%;
}

.btn-start-project {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.6rem 1.2rem;
  border-radius: 5px;
  border: 1px solid var(--accent-cyan);
  background: transparent;
  color: var(--text-primary);
  text-decoration: none;
  font-family: var(--font-heading);
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  transition: var(--transition-smooth);
  box-shadow: 0 0 15px rgba(0, 229, 255, 0.1);
  white-space: nowrap;
  flex-shrink: 0;
}

.btn-start-project:hover {
  background: var(--accent-cyan);
  color: var(--bg-darker);
  box-shadow: 0 0 25px var(--accent-cyan-glow);
  transform: translateY(-2px);
}

.btn-start-project:hover .arrow-icon {
  transform: translate(2px, -2px);
}

.arrow-icon {
  width: 14px;
  height: 14px;
  transition: var(--transition-smooth);
}

/* Mobile Menu Toggle */
.mobile-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  z-index: 1001;
  padding: 4px;
  flex-shrink: 0;
}

.mobile-toggle .bar {
  width: 24px;
  height: 2px;
  background-color: var(--text-primary);
  transition: var(--transition-fast);
  border-radius: 2px;
}

/* Hero Section */
.hero-section {
  min-height: 90vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding-top: 100px;
  text-align: center;
  position: relative;
}

.hero-container {
  max-width: 1000px;
  padding: 0 2rem;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.hero-badge {
  display: inline-block;
  padding: 0.4rem 1.2rem;
  border-radius: 50px;
  border: 1px solid rgba(0, 229, 255, 0.4);
  background: rgba(0, 229, 255, 0.05);
  box-shadow: 0 0 20px rgba(0, 229, 255, 0.1);
  margin-bottom: 2rem;
}

.badge-text {
  font-family: var(--font-heading);
  font-size: 0.7rem;
  letter-spacing: 0.2em;
  font-weight: 700;
  color: var(--accent-cyan);
}

.hero-title{
    font-family: var(--font-heading);
    font-size: 6.5rem;
    font-weight: 900;
    letter-spacing: .1em;
    line-height: 1.1;
    margin-bottom: 1.5rem;
    filter: none;
}

.name-first{
    display:block;
    color:#fff;
    -webkit-text-fill-color:#fff;
    background:none;
    text-shadow:none;
    animation:none;
}

.name-last{
    display:block;
    color:#00e5ff;
    -webkit-text-fill-color:#00e5ff;
    background:none;
    text-shadow:none;
    animation:none;
}

/* ===== HERO SUBTITLE - TYPING ANIMATION (Desktop & Mobile) ===== */
.hero-subtitle {
  font-family: var(--font-heading);
  font-size: 1.35rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  color: var(--text-primary);
  line-height: 1.8;
  max-width: 800px;
  margin-bottom: 3.5rem;
  overflow: hidden;
  white-space: nowrap;
  border-right: 2px solid var(--accent-cyan);
  animation: typingEffect 2.5s steps(40, end) 0.8s forwards, hideCursor 0s linear 2.5s forwards;
  width: 0;
}

@keyframes typingEffect {
  from { width: 0; opacity: 0.45; }
  to { width: 100%; opacity: 0.45; }
}

/* --- Mobile Typing Animation Fix --- */
@media (max-width: 768px) {
  .hero-subtitle {
    white-space: normal;
    border-right: none;
    width: auto;
    animation: fadeUp 0.8s ease 0.8s forwards;
    opacity: 0;
  }

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

.hero-logo-divider {
  margin-top: 1rem;
}

.monarch-logo-mini {
  width: 50px;
  height: 40px;
  filter: drop-shadow(0 0 8px var(--accent-cyan-glow));
  opacity: 0.8;
}

/* Both avatar layers: full-bleed behind text */
.hero-avatar-layer {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-size: contain;
  background-repeat: no-repeat;
  background-position: center center;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.8s ease;
}

/* When images are loaded, fade them in */
.hero-section.hero-loaded .hero-avatar-layer {
  opacity: 1;
}

/* Base layer – always visible */
.hero-avatar-base {
  background-image: url('assets/transparent-base.png');
  z-index: 0;
}

/* Flame layer – revealed via spotlight mask */
.hero-avatar-flame {
  background-image: url('assets/transparent-flame.png');
  z-index: 1;
  -webkit-mask-image: radial-gradient(
    circle 220px at var(--x, 50%) var(--y, 50%),
    black 0%, black 55%, transparent 100%
  );
  mask-image: radial-gradient(
    circle 220px at var(--x, 50%) var(--y, 50%),
    black 0%, black 55%, transparent 100%
  );
  -webkit-mask-repeat: no-repeat;
  mask-repeat: no-repeat;
}

/* Text container needs to be above the image layers */
.hero-section > .hero-container {
  position: relative;
  z-index: 2;
}

/* ===== SKELETON PLACEHOLDER ===== */
.hero-avatar-skeleton {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 280px;
  height: 280px;
  transform: translate(-50%, -50%);
  border-radius: 50%;
  background: rgba(0, 229, 255, 0.03);
  border: 1px solid rgba(0, 229, 255, 0.08);
  overflow: hidden;
  z-index: 0;
  transition: opacity 0.5s ease, transform 0.5s ease;
}

.hero-section.hero-loaded .hero-avatar-skeleton {
  opacity: 0;
  transform: translate(-50%, -50%) scale(1.1);
  pointer-events: none;
}

.skeleton-pulse {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  background: radial-gradient(
    circle,
    rgba(0, 229, 255, 0.08) 0%,
    rgba(0, 229, 255, 0.02) 50%,
    transparent 70%
  );
  animation: skeletonPulse 2s ease-in-out infinite;
}

@keyframes skeletonPulse {
  0%, 100% {
    transform: scale(0.92);
    opacity: 0.4;
  }
  50% {
    transform: scale(1.05);
    opacity: 1;
  }
}

/* ===== RESPONSIVE: AVATAR LAYERS ===== */
@media (max-width: 1024px) {
  .hero-avatar-layer {
    background-size: 70%;
  }
  .hero-avatar-flame {
    -webkit-mask-image: radial-gradient(
      circle 170px at var(--x, 50%) var(--y, 50%),
      black 0%, black 55%, transparent 100%
    );
    mask-image: radial-gradient(
      circle 170px at var(--x, 50%) var(--y, 50%),
      black 0%, black 55%, transparent 100%
    );
  }
}

@media (max-width: 768px) {
  .hero-avatar-layer {
    background-size: 60%;
    background-position: center 40%;
  }
  .hero-avatar-flame {
    -webkit-mask-image: radial-gradient(
      circle 140px at var(--x, 50%) var(--y, 50%),
      black 0%, black 55%, transparent 100%
    );
    mask-image: radial-gradient(
      circle 140px at var(--x, 50%) var(--y, 50%),
      black 0%, black 55%, transparent 100%
    );
  }
  .hero-avatar-skeleton {
    width: 200px;
    height: 200px;
  }
}

@media (max-width: 400px) {
  .hero-avatar-layer {
    background-size: 55%;
  }
  .hero-avatar-flame {
    -webkit-mask-image: radial-gradient(
      circle 110px at var(--x, 50%) var(--y, 50%),
      black 0%, black 55%, transparent 100%
    );
    mask-image: radial-gradient(
      circle 110px at var(--x, 50%) var(--y, 50%),
      black 0%, black 55%, transparent 100%
    );
  }
  .hero-avatar-skeleton {
    width: 160px;
    height: 160px;
  }
}

/* 3D Card Carousel Section */
.carousel-section {
  padding: 60px 0;
  display: flex;
  justify-content: center;
  align-items: center;
  position: relative;
}

.carousel-container {
  width: 100%;
  max-width: 1200px;
  padding: 0 2rem;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.brand-subline {
  font-family: var(--font-heading);
  font-size: 0.8rem;
  letter-spacing: 0.3em;
  color: var(--accent-cyan);
  font-weight: 700;
  margin-bottom: 3rem;
}

.carousel-slider-container {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 2rem;
  width: 100%;
  position: relative;
}

.nav-arrow {
  width: 50px;
  height: 50px;
  border-radius: 50%;
  border: 1px solid rgba(0, 229, 255, 0.2);
  background: rgba(5, 10, 18, 0.7);
  color: var(--accent-cyan);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: var(--transition-smooth);
  box-shadow: 0 0 15px rgba(0, 229, 255, 0.05);
  flex-shrink: 0;
}

.nav-arrow:hover {
  background: var(--accent-cyan);
  color: var(--bg-darker);
  box-shadow: 0 0 25px var(--accent-cyan-glow);
  transform: scale(1.08);
}

.nav-arrow svg {
  width: 18px;
  height: 18px;
}

/* Card Deck Perspective Scene */
.card-scene {
  width: 420px;
  height: 440px;
  perspective: 1500px;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
}

.card-deck {
  width: 380px;
  height: 420px;
  position: relative;
  transform-style: preserve-3d;
  transition: transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

.deck-card {
  position: absolute;
  width: 100%;
  height: 100%;
  border-radius: 16px;
  border: 1px solid var(--card-border);
  background: var(--card-bg);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  box-shadow: 
    inset 0 0 20px var(--card-glow),
    0 15px 35px rgba(0, 0, 0, 0.5);
  transition: border-color 0.4s ease, box-shadow 0.4s ease, transform 0.1s ease;
  transform-origin: center center;
  cursor: pointer;
  left: 0;
  top: 0;
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
}

.deck-card:hover {
  border-color: rgba(0, 229, 255, 0.45);
  box-shadow: 
    inset 0 0 30px rgba(0, 229, 255, 0.08),
    0 20px 45px rgba(0, 0, 0, 0.7),
    0 0 30px rgba(0, 229, 255, 0.15);
}

.deck-card:active {
  cursor: grabbing;
}

.card-glass-content {
  width: 100%;
  height: 100%;
  padding: 2.5rem;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  position: relative;
  overflow: hidden;
}

/* Front Brand Card (Left) */
.brand-card {
  transform: translateZ(1px);
  z-index: 2;
}

.contour-lines {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  opacity: 0.15;
  background-image: radial-gradient(circle at 50% 50%, transparent 40%, rgba(0, 229, 255, 0.2) 41%, transparent 42%),
                    radial-gradient(circle at 50% 50%, transparent 50%, rgba(0, 229, 255, 0.2) 51%, transparent 52%),
                    radial-gradient(circle at 50% 50%, transparent 60%, rgba(0, 229, 255, 0.2) 61%, transparent 62%);
  background-size: 150% 150%;
  background-position: center;
  pointer-events: none;
}

.card-brand-logo {
  margin: auto;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.25rem;
}

.monarch-card-logo {
  width: 90px;
  height: 70px;
  filter: drop-shadow(0 0 15px var(--accent-cyan-glow));
}

.card-title {
  font-family: var(--font-heading);
  font-size: 2rem;
  font-weight: 800;
  letter-spacing: 0.2em;
  color: var(--text-primary);
  margin-top: 1rem;
}

.card-subtitle {
  font-family: var(--font-heading);
  font-size: 0.8rem;
  letter-spacing: 0.3em;
  color: var(--text-secondary);
}

/* Bio Card (Right) */
.bio-card {
  transform: rotateY(180deg);
  z-index: 1;
}

.bio-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
}

.bio-name {
  font-family: var(--font-heading);
  font-size: 1.4rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  line-height: 1;
}

.bio-title {
  font-size: 0.8rem;
  color: var(--accent-cyan);
  font-weight: 600;
  letter-spacing: 0.05em;
  display: block;
  margin-top: 0.4rem;
}

.bio-mini-logo {
  width: 32px;
  height: 26px;
  filter: drop-shadow(0 0 5px var(--accent-cyan-glow));
}

.bio-desc {
  color: var(--text-secondary);
  font-size: 0.88rem;
  margin: 1.5rem 0;
  line-height: 1.5;
}

.social-links-list {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.social-link-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  text-decoration: none;
  color: var(--text-secondary);
  font-size: 0.9rem;
  font-weight: 500;
  padding: 0.65rem 1rem;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.03);
  background: rgba(255, 255, 255, 0.02);
  transition: var(--transition-smooth);
  position: relative;
  overflow: hidden;
}

.social-link-item::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(0, 229, 255, 0.08), transparent);
  transition: all 0.6s ease;
  pointer-events: none;
}

.social-link-item:hover::before {
  left: 100%;
}

.social-link-item:hover {
  color: var(--text-primary);
  background: rgba(0, 229, 255, 0.08);
  border-color: rgba(0, 229, 255, 0.35);
  box-shadow: 
    0 0 15px rgba(0, 229, 255, 0.15),
    inset 0 0 10px rgba(0, 229, 255, 0.05);
  transform: translateY(-2px);
}

.link-left {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.link-icon {
  width: 16px;
  height: 16px;
  color: var(--accent-cyan);
}

.arrow-up-right {
  width: 14px;
  height: 14px;
  color: var(--text-secondary);
  opacity: 0.6;
  transition: var(--transition-fast);
}

.social-link-item:hover .arrow-up-right {
  transform: translate(2px, -2px);
  color: var(--accent-cyan);
  opacity: 1;
}

/* Carousel Active Deck states dynamically manipulated by JS */
.card-deck.flipped {
  transform: rotateY(180deg);
}

.drag-hint {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-top: 2rem;
  font-family: var(--font-heading);
  font-size: 0.72rem;
  letter-spacing: 0.15em;
  font-weight: 600;
  color: var(--text-secondary);
}

.drag-icon {
  width: 18px;
  height: 18px;
  animation: pulseHint 2s infinite ease-in-out;
}

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

/* About Me Section - FIXED CENTERING */
.about-section {
  padding: 80px 0;
  display: flex;
  justify-content: center;
  position: relative;
}

.about-grid-container {
  max-width: 1400px;
  width: 100%;
  margin: 0 auto;
  padding: 0 2.5rem;
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 4rem;
  align-items: center;
}

.about-details {
  display: flex;
  flex-direction: column;
}

.about-title {
  font-family: var(--font-heading);
  font-size: 3.2rem;
  font-weight: 800;
  letter-spacing: 0.02em;
  line-height: 1.2;
  margin-bottom: 2rem;
}

.about-text {
  color: var(--text-secondary);
  font-size: 1.05rem;
  line-height: 1.8;
  margin-bottom: 1.5rem;
  max-width: 600px;
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 2rem;
  margin-top: 2rem;
}

.stat-card {
  padding: 1.5rem;
  border-left: 2px solid var(--accent-cyan);
  background: linear-gradient(90deg, rgba(0, 229, 255, 0.03) 0%, transparent 100%);
}

.stat-number {
  font-family: var(--font-heading);
  font-size: 2.5rem;
  font-weight: 800;
  color: var(--text-primary);
}

.stat-plus {
  font-family: var(--font-heading);
  font-size: 2rem;
  font-weight: 800;
  color: var(--accent-cyan);
}

.stat-label {
  display: block;
  font-size: 0.8rem;
  color: var(--text-secondary);
  margin-top: 0.5rem;
  letter-spacing: 0.05em;
}

.about-visual {
  display: flex;
  justify-content: center;
  align-items: center;
  position: relative;
  height: 480px;
}

.visual-canvas-container {
  width: 100%;
  height: 100%;
  position: relative;
}

#isometric-canvas {
  width: 100%;
  height: 100%;
  display: block;
}

.glowing-core-glow {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 150px;
  height: 150px;
  background: radial-gradient(circle, rgba(0, 229, 255, 0.3) 0%, transparent 70%);
  transform: translate(-50%, -50%);
  filter: blur(20px);
  pointer-events: none;
  z-index: 0;
}

/* ===== OUR SERVICES SECTION - CARD PILE ===== */
.services-section {
  padding: 100px 0 60px;
  position: relative;
}

.services-container {
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 2.5rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.services-container-left {
  align-items: flex-start;
  text-align: left;
}

.services-title {
  font-family: var(--font-heading);
  font-size: 2.8rem;
  font-weight: 800;
  letter-spacing: 0.02em;
  margin-bottom: 0.75rem;
  line-height: 1.2;
}

.services-subtitle {
  color: var(--text-secondary);
  font-size: 1rem;
  max-width: 560px;
  margin-bottom: 1rem;
}

/* ===== DECK WRAPPER ===== */
.services-deck {
  position: relative;
  width: 100%;
  max-width: 1300px;
  height: 580px;
  margin: 3rem auto 0;
}

/* ===== SERVICE CARD ===== */
.service-card {
  position: absolute;
  width: 290px;
  height: 540px;
  perspective: 1500px;
  transition: left 1.4s cubic-bezier(0.34, 1.56, 0.64, 1), 
              transform 1.4s cubic-bezier(0.34, 1.56, 0.64, 1),
              top 1.4s cubic-bezier(0.34, 1.56, 0.64, 1);
  will-change: left, transform, top;
}

/* ===== STACKED STATE (Step 1) ===== */
.service-card {
  left: 50%;
  transform: translateX(-50%) translateY(var(--pile-y, 0px)) rotate(var(--pile-rot, 0deg)) scale(0.92);
  z-index: var(--pile-z, 1);
  top: var(--pile-top, 40px);
}

/* Stack each card with offset */
.service-card[data-index="0"] { --pile-rot: -8deg; --pile-y: 20px; --pile-z: 4; --pile-top: 10px; }
.service-card[data-index="1"] { --pile-rot: -3deg; --pile-y: 10px; --pile-z: 3; --pile-top: 20px; }
.service-card[data-index="2"] { --pile-rot: 3deg; --pile-y: 10px; --pile-z: 2; --pile-top: 30px; }
.service-card[data-index="3"] { --pile-rot: 8deg; --pile-y: 20px; --pile-z: 1; --pile-top: 40px; }

/* ===== SPREAD STATE (Step 2) ===== */
.services-deck.spread .service-card {
  left: var(--spread-left, 50%) !important;
  top: 0 !important;
  transform: translateX(-50%) translateY(0) rotate(var(--spread-rot, 0deg)) scale(1) !important;
  z-index: var(--spread-z, 1);
  transition-delay: var(--spread-delay, 0s);
}

.services-deck.spread .service-card[data-index="0"] { --spread-left: 10%; --spread-rot: -4deg; --spread-z: 4; --spread-delay: 0s; }
.services-deck.spread .service-card[data-index="1"] { --spread-left: 34%; --spread-rot: -1.5deg; --spread-z: 3; --spread-delay: 0.1s; }
.services-deck.spread .service-card[data-index="2"] { --spread-left: 58%; --spread-rot: 1.5deg; --spread-z: 2; --spread-delay: 0.2s; }
.services-deck.spread .service-card[data-index="3"] { --spread-left: 82%; --spread-rot: 4deg; --spread-z: 1; --spread-delay: 0.3s; }

/* ===== CARD INNER (3D Flip Wrapper) ===== */
.card-inner {
  position: relative;
  width: 100%;
  height: 100%;
  transform-style: preserve-3d;
  transition: transform 1.6s cubic-bezier(0.34, 1.56, 0.64, 1);
  transition-delay: var(--spread-delay, 0s);
}

/* ===== FACES ===== */
.card-face {
  position: absolute;
  inset: 0;
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
  border-radius: 22px;
  padding: 2rem 1.6rem;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

/* ===== BACK FACE (Step 1 & 2 - visible when stacked/spread) ===== */
.card-face-back {
  transform: rotateY(0deg);
  align-items: center;
  justify-content: center;
  text-align: center;
  gap: 0.5rem;
  background: linear-gradient(145deg, rgba(3, 7, 12, 0.97), rgba(7, 13, 22, 0.93));
  border: 1px solid rgba(0, 229, 255, 0.15);
  box-shadow: inset 0 0 30px rgba(0, 229, 255, 0.03), 0 20px 50px rgba(0, 0, 0, 0.6);
  z-index: 2;
}

.card-face-back .back-glow-ring {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 200px;
  height: 200px;
  transform: translate(-50%, -50%);
  border-radius: 50%;
  background: radial-gradient(circle, rgba(0, 229, 255, 0.06) 0%, transparent 70%);
  border: 1px solid rgba(0, 229, 255, 0.05);
  pointer-events: none;
}

.card-face-back .back-logo-svg {
  width: 60px;
  height: 48px;
  filter: drop-shadow(0 0 25px rgba(0, 229, 255, 0.35));
  margin-bottom: 0.3rem;
  position: relative;
  z-index: 1;
}

.card-face-back .back-brand-name {
  font-family: var(--font-heading);
  font-size: 1.4rem;
  font-weight: 800;
  letter-spacing: 0.2em;
  color: var(--text-primary);
  position: relative;
  z-index: 1;
}

.card-face-back .back-brand-sub {
  font-family: var(--font-heading);
  font-size: 0.65rem;
  font-weight: 600;
  letter-spacing: 0.3em;
  color: var(--text-secondary);
  position: relative;
  z-index: 1;
}

.card-face-back::before {
  content: '✦';
  position: absolute;
  top: 1.2rem;
  left: 1.2rem;
  font-size: 0.6rem;
  color: rgba(0, 229, 255, 0.08);
  z-index: 1;
}

.card-face-back::after {
  content: '✦';
  position: absolute;
  bottom: 1.2rem;
  right: 1.2rem;
  font-size: 0.6rem;
  color: rgba(0, 229, 255, 0.08);
  z-index: 1;
}

/* ===== FRONT FACE (Step 3 - visible after flip) ===== */
.card-face-front {
  transform: rotateY(180deg);
  align-items: flex-start;
  text-align: left;
  background: var(--card-bg);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border: 1px solid var(--card-border);
  box-shadow: inset 0 0 20px var(--card-glow), 0 20px 45px rgba(0, 0, 0, 0.55);
  z-index: 1;
}

.card-face-front::before {
  content: '✦';
  position: absolute;
  top: 14px;
  left: 14px;
  font-size: 0.6rem;
  color: rgba(0, 229, 255, 0.35);
}

.card-face-front::after {
  content: '✦';
  position: absolute;
  bottom: 14px;
  right: 14px;
  font-size: 0.6rem;
  color: rgba(0, 229, 255, 0.35);
}

.card-face-front .card-icon {
  width: 46px;
  height: 46px;
  border-radius: 12px;
  background: rgba(0, 229, 255, 0.06);
  border: 1px solid rgba(0, 229, 255, 0.15);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1.2rem;
  color: var(--accent-cyan);
  flex-shrink: 0;
}

.card-face-front .card-icon svg {
  width: 22px;
  height: 22px;
  stroke-width: 1.8;
}

.card-face-front .card-tag {
  display: none;
}

/* ===== NEW PREMIUM CARD CONTENT — number + badge head row, icon/title row,
   divider, sub-category chip grid, footer. Base rules = desktop default;
   the max-width:767px block further down fine-tunes sizes for mobile. ===== */
.card-head-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.6rem;
  margin-bottom: 1.1rem;
}

.card-number {
  font-family: var(--font-heading);
  font-size: 0.95rem;
  font-weight: 800;
  color: var(--text-primary);
  letter-spacing: 0.04em;
}

.card-category-badge {
  display: inline-flex;
  align-items: center;
  padding: 0.4rem 0.75rem;
  border-radius: 999px;
  border: 1px solid rgba(0, 229, 255, 0.25);
  background: rgba(0, 229, 255, 0.06);
  color: rgba(0, 229, 255, 0.85);
  font-family: var(--font-heading);
  font-size: 0.55rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  white-space: nowrap;
}

.card-icon-title-row {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  margin-bottom: 0.8rem;
}

.card-icon-title-row .card-icon {
  margin-bottom: 0 !important;
  flex-shrink: 0;
}

.card-icon-title-row .card-title {
  margin-bottom: 0 !important;
}

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

.service-meta {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.5rem;
  margin-top: 1rem;
  padding-top: 0;
}

.service-meta span {
  display: flex;
  align-items: center;
  min-height: 38px;
  padding: 0.5rem 0.65rem;
  border: 1px solid rgba(255, 255, 255, 0.10);
  border-radius: 9px;
  background: rgba(255, 255, 255, 0.025);
  color: rgba(255, 255, 255, 0.78);
  font-family: var(--font-heading);
  font-size: 0.58rem;
  font-weight: 500;
  line-height: 1.25;
  letter-spacing: 0.01em;
}

.service-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 1rem;
  padding-top: 0.8rem;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  color: rgba(255, 255, 255, 0.34);
  font-family: var(--font-heading);
  font-size: 0.55rem;
  font-weight: 600;
  letter-spacing: 0.1em;
}

.service-footer-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: rgba(0, 229, 255, 0.6);
  flex: 0 0 6px;
}

.services-deck .card-face-front {
  border-style: dashed;
  border-color: rgba(255, 255, 255, 0.14);
}

.card-face-front .card-title {
  font-family: var(--font-heading);
  font-size: 1.15rem;
  font-weight: 700;
  margin-bottom: 0.6rem;
  line-height: 1.3;
}

.card-face-front .card-desc {
  color: var(--text-secondary);
  font-size: 0.85rem;
  line-height: 1.55;
}

/* ===== FLIP STATE (Step 3) ===== */
.services-deck.flipped .service-card .card-inner {
  transform: rotateY(180deg);
}

/* Flip delays - staggered */
.services-deck.flipped .service-card[data-index="0"] .card-inner { transition-delay: 0s; }
.services-deck.flipped .service-card[data-index="1"] .card-inner { transition-delay: 0.12s; }
.services-deck.flipped .service-card[data-index="2"] .card-inner { transition-delay: 0.24s; }
.services-deck.flipped .service-card[data-index="3"] .card-inner { transition-delay: 0.36s; }

/* Revert delays - reverse order (Step 4) */
.services-deck:not(.flipped) .service-card[data-index="3"] .card-inner { transition-delay: 0s; }
.services-deck:not(.flipped) .service-card[data-index="2"] .card-inner { transition-delay: 0.12s; }
.services-deck:not(.flipped) .service-card[data-index="1"] .card-inner { transition-delay: 0.24s; }
.services-deck:not(.flipped) .service-card[data-index="0"] .card-inner { transition-delay: 0.36s; }

/* Hover effect on front face */
.service-card:hover .card-face-front {
  border-color: rgba(0, 229, 255, 0.45);
  box-shadow: inset 0 0 30px rgba(0, 229, 255, 0.08), 0 25px 55px rgba(0, 0, 0, 0.7), 0 0 30px rgba(0, 229, 255, 0.15);
}

/* Laptop Mockup Design */

@media (max-width: 1200px) {
  .project-card:hover .project-preview-img {
    transform: translateY(calc(-100% + 140px));
  }
}

/* ============================================ */

@media (max-width: 1024px) {
  .hero-title {
    font-size: 5rem;
  }
  
  .about-grid-container {
    grid-template-columns: 1fr;
    gap: 3rem;
  }
  
  .about-visual {
    height: 400px;
  }

  .services-deck {
    height: 620px;
  }

  .service-card {
    width: 250px;
    height: 580px;
    min-height: 580px;
    padding: 1.6rem 1.3rem;
  }

  .process-container {
    max-width: 700px;
  }

  .process-step {
    grid-template-columns: 1fr 36px 1fr;
    margin-bottom: 3.5rem;
  }

  .projects-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  
  .footer-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 3rem;
  }
}

/* ===== MOBILE FIXES ===== */
@media (max-width: 768px) {
  /* --- NAVIGATION FIXED --- */
  .nav-container {
    padding: 0.6rem 1rem;
    gap: 0.5rem;
  }

  .nav-logo {
    gap: 0.4rem;
  }
  .monarch-logo-svg {
    width: 28px;
    height: 22px;
  }
  .logo-text {
    font-size: 0.95rem;
    letter-spacing: 0.08em;
  }

  .nav-links {
    position: fixed;
    top: 0;
    right: -100%;
    width: 280px;
    height: 100vh;
    background: rgba(3, 7, 12, 0.98);
    flex-direction: column;
    padding: 80px 35px;
    transition: var(--transition-smooth);
    border-left: 1px solid rgba(0, 229, 255, 0.1);
    gap: 1.2rem;
    margin: 0;
  }

  .nav-links.active {
    right: 0;
  }

  .nav-link {
    font-size: 0.9rem;
    padding: 0.5rem 0;
    width: 100%;
  }

  .btn-start-project {
    display: none;
  }

  .mobile-toggle {
    display: flex;
  }
  
  .mobile-toggle.active .bar:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
  }

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

  .mobile-toggle.active .bar:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
  }

  /* --- Hero --- */
  .hero-section {
    min-height: 75vh;
    padding-top: 70px;
  }

  .hero-container {
    padding: 0 1.25rem;
  }

  .hero-title {
    font-size: 3.2rem;
    letter-spacing: 0.05em;
  }
  
  .hero-subtitle {
    font-size: 1rem;
    line-height: 1.6;
    white-space: normal !important;
    border-right: none !important;
    width: auto !important;
    animation: fadeUp 0.8s ease 0.8s forwards !important;
    max-width: 100%;
  }

  .hero-badge {
    padding: 0.3rem 0.8rem;
    margin-bottom: 1.2rem;
  }
  .badge-text {
    font-size: 0.55rem;
  }

  /* --- Carousel - FIXED CARD FLIP & ARROWS --- */
  .carousel-section {
    padding: 30px 0;
  }

  .carousel-container {
    padding: 0 0.8rem;
  }

  .brand-subline {
    font-size: 0.65rem;
    margin-bottom: 1.5rem;
  }

  .carousel-slider-container {
    gap: 0.3rem;
    flex-wrap: nowrap;
    justify-content: center;
    width: 100%;
  }

  .nav-arrow {
    width: 36px;
    height: 36px;
    flex-shrink: 0;
    position: relative;
    z-index: 5;
  }
  .nav-arrow svg {
    width: 14px;
    height: 14px;
  }

  .card-scene {
    width: 100%;
    max-width: 300px;
    height: 340px;
    margin: 0 auto;
    flex-shrink: 0;
  }

  /* Fixed card positioning on mobile */
  .card-scene {
    width: min(100%, 300px);
    max-width: 300px;
    height: 340px;
    margin: 0 auto;
    flex: 0 0 auto;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: visible;
    perspective: 1500px;
  }

  .card-deck {
    width: min(100%, 280px);
    max-width: 280px;
    height: 320px;
    position: relative;
    left: auto;
    right: auto;
    margin: 0 auto;
    transform: rotateY(0deg);
    transform-origin: center center;
    transform-style: preserve-3d;
  }

  .card-deck.flipped {
    transform: rotateY(180deg);
  }

  .deck-card {
    width: 100%;
    height: 100%;
    position: absolute;
    inset: 0;
    border-radius: 14px;
    transform-origin: center center;
  }

  .brand-card {
    transform: translateZ(1px);
    z-index: 2;
  }

  .bio-card {
    transform: rotateY(180deg);
    z-index: 1;
  }

  .card-glass-content {
    padding: 1.5rem;
  }

  .card-brand-logo {
    gap: 0.75rem;
  }
  .monarch-card-logo {
    width: 55px;
    height: 42px;
  }
  .card-title {
    font-size: 1.3rem;
  }
  .card-subtitle {
    font-size: 0.6rem;
  }

  .bio-name {
    font-size: 1.2rem;
  }
  .bio-title {
    font-size: 0.6rem;
  }
  .bio-desc {
    font-size: 0.7rem;
    margin: 0.8rem 0;
  }
  .social-link-item {
    font-size: 0.7rem;
    padding: 0.4rem 0.6rem;
  }
  .link-icon {
    width: 12px;
    height: 12px;
  }

  .drag-hint {
    font-size: 0.55rem;
    margin-top: 1.2rem;
  }
  .drag-icon {
    width: 12px;
    height: 12px;
  }

  /* --- About Section - FIXED CENTERING --- */
  .about-section {
    padding: 50px 0;
  }
  .about-grid-container {
    padding: 0 1.25rem;
    gap: 2rem;
    text-align: center;
  }
  .about-details {
    align-items: center;
  }
  .about-title {
    font-size: 2rem;
    text-align: center;
  }
  .about-text {
    font-size: 0.9rem;
    text-align: center;
    max-width: 100%;
  }

  .stats-grid {
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
    width: 100%;
  }
  .stat-card {
    padding: 1rem;
    text-align: center;
    border-left: none;
    border-top: 2px solid var(--accent-cyan);
    background: linear-gradient(180deg, rgba(0, 229, 255, 0.03) 0%, transparent 100%);
  }
  .stat-number {
    font-size: 1.8rem;
  }
  .stat-plus {
    font-size: 1.4rem;
  }
  .stat-label {
    font-size: 0.7rem;
  }

  .about-visual {
    height: 250px;
    width: 100%;
  }

  /* --- Services (mobile: front faces shown statically; hover effects only) --- */
  .services-section {
    padding: 60px 0 30px;
  }
  .services-title {
    font-size: 2rem;
  }
  .services-deck {
    height: auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1.5rem;
    margin-top: 2rem;
  }
  .service-card {
    position: static;
    width: 100%;
    max-width: 340px;
    min-height: 340px;
    opacity: 1;
    transform: none !important;
    transition: none !important;
  }

  /* The service content is on the front face, which is rotated 180deg. */
  .service-card .card-inner {
    transform: rotateY(180deg);
    transition: none !important;
  }

  /* --- Process --- */
  .process-section {
    padding: 50px 0;
  }
  .process-container {
    padding: 0 1.25rem;
    max-width: 100%;
  }
  .process-title {
    font-size: 1.6rem;
    margin-bottom: 2rem;
  }
  .process-line-track {
    left: 18px;
    transform: none;
  }
  .process-step {
    grid-template-columns: 36px 1fr;
    margin-bottom: 2.5rem;
  }
  .process-step .process-node-dot {
    grid-column: 1;
    justify-self: start;
    margin-left: 10px;
  }
  .process-step .process-card,
  .process-step.side-left .process-card,
  .process-step.side-right .process-card {
    grid-column: 2;
    text-align: left;
  }
  .process-step.side-left,
  .process-step.side-right {
    text-align: left;
  }
  .process-connector {
    display: none;
  }
  .process-card h3 {
    font-size: 1rem;
  }
  .process-card p {
    font-size: 0.85rem;
  }

  /* --- Projects --- */
  .projects-section {
    padding: 50px 0;
  }
  .projects-container {
    padding: 0 1.25rem;
  }
  .projects-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.8rem;
    margin-bottom: 2rem;
  }
  .projects-title {
    font-size: 1.8rem;
  }
  .btn-all-projects {
    font-size: 0.7rem;
    padding: 0.5rem 1rem;
  }

  .projects-grid {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }

  .project-card {
    padding: 1.25rem;
  }
  .project-tag {
    font-size: 0.6rem;
  }
  .project-name {
    font-size: 1.1rem;
  }
  .project-desc {
    font-size: 0.8rem;
    min-height: 35px;
  }
  .project-pages {
    font-size: 0.6rem;
  }
  .btn-project-link {
    width: 32px;
    height: 32px;
  }
  .btn-project-link svg {
    width: 12px;
    height: 12px;
  }

  .laptop-screen {
    border-width: 5px;
    border-radius: 8px 8px 0 0;
  }
  .laptop-base {
    height: 5px;
  }
  .laptop-notch {
    width: 35px;
    height: 3px;
  }
  .project-card:hover .project-preview-img {
    transform: translateY(calc(-100% + 100px));
  }

  /* ===== LIVE DEMO ON MOBILE - FIXED ===== */
  .live-demo-wrapper {
    position: relative;
  }

  .btn-project-link {
    transition: all 0.3s ease;
    position: relative;
  }

  /* Mobile: Show live demo label on hover/tap */
  .btn-project-link:hover::after,
  .btn-project-link:active::after {
    content: "Live Demo →";
    position: absolute;
    right: 0;
    bottom: -32px;
    background: rgba(10, 10, 20, 0.95);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    color: #00e5ff;
    padding: 4px 10px;
    font-size: 10px;
    font-weight: 500;
    border-radius: 6px;
    white-space: nowrap;
    letter-spacing: 1px;
    border: 1px solid rgba(0, 229, 255, 0.3);
    pointer-events: none;
    z-index: 10;
    font-family: 'Inter', sans-serif;
    display: block;
  }

  /* Also show on touch for mobile */
  .btn-project-link:focus::after {
    content: "Live Demo →";
    position: absolute;
    right: 0;
    bottom: -32px;
    background: rgba(10, 10, 20, 0.95);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    color: #00e5ff;
    padding: 4px 10px;
    font-size: 10px;
    font-weight: 500;
    border-radius: 6px;
    white-space: nowrap;
    letter-spacing: 1px;
    border: 1px solid rgba(0, 229, 255, 0.3);
    pointer-events: none;
    z-index: 10;
    font-family: 'Inter', sans-serif;
    display: block;
  }

  /* --- CTA --- */
  .cta-section {
    padding: 50px 0;
  }
  .cta-box-container {
    padding: 2.5rem 1.25rem;
    width: calc(100% - 1.5rem);
    gap: 0.8rem;
  }
  .cta-tagline {
    font-size: 0.65rem;
  }
  .cta-title {
    font-size: 1.8rem;
  }
  .btn-cta-whatsapp {
    font-size: 0.7rem;
    padding: 0.7rem 1.2rem;
  }
  .whatsapp-btn-icon {
    width: 14px;
    height: 14px;
  }

  /* --- Footer --- */
  .footer {
    padding: 40px 0 15px;
  }
  .footer-grid {
    grid-template-columns: 1fr;
    gap: 1.8rem;
    padding: 0 1.25rem;
    margin-bottom: 25px;
  }
  .footer-bottom {
    flex-direction: column;
    gap: 0.5rem;
    text-align: center;
    padding: 1.2rem 1.25rem 0;
    font-size: 0.65rem;
  }
  .brand-tagline {
    max-width: 100%;
    font-size: 0.8rem;
  }
  .footer-heading {
    font-size: 0.7rem;
    margin-bottom: 0.8rem;
  }
  .footer-links ul li {
    margin-bottom: 0.5rem;
  }
  .footer-links ul li a {
    font-size: 0.8rem;
  }
  .contact-info ul li {
    font-size: 0.8rem;
  }
  .footer-socials a {
    width: 34px;
    height: 34px;
  }
  .footer-socials a svg {
    width: 14px;
    height: 14px;
  }
}

/* Extra small devices */
@media (max-width: 400px) {
  .hero-title {
    font-size: 2.4rem;
  }
  .hero-subtitle {
    font-size: 0.8rem;
  }
  .card-scene {
    width: min(100%, 260px);
    max-width: 260px;
    height: 300px;
    margin: 0 auto;
  }
  .card-deck {
    width: min(100%, 240px);
    max-width: 240px;
    height: 280px;
    left: auto;
    margin: 0 auto;
    transform-origin: center center;
  }
  .card-deck.flipped {
    transform: rotateY(180deg);
  }
  .deck-card {
    width: 100%;
    height: 100%;
    inset: 0;
  }
  .card-glass-content {
    padding: 1rem;
  }
  .monarch-card-logo {
    width: 42px;
    height: 32px;
  }
  .card-title {
    font-size: 1.1rem;
  }
  .bio-name {
    font-size: 1rem;
  }
  .about-title {
    font-size: 1.5rem;
  }
  .stats-grid {
    gap: 0.6rem;
  }
  .stat-card {
    padding: 0.6rem;
  }
  .stat-number {
    font-size: 1.3rem;
  }
  .cta-title {
    font-size: 1.4rem;
  }
}

/* Landscape orientation fix */
@media (max-height: 600px) and (orientation: landscape) {
  .hero-section {
    min-height: 100vh;
    padding-top: 60px;
  }
  .hero-title {
    font-size: 2.6rem;
  }
  .hero-subtitle {
    font-size: 0.85rem;
    margin-bottom: 1.2rem;
  }
  .hero-badge {
    margin-bottom: 0.8rem;
    padding: 0.2rem 0.6rem;
  }
  .badge-text {
    font-size: 0.5rem;
  }
  .card-scene {
    height: 280px;
  }
  .card-deck {
    height: 260px;
  }
  .deck-card {
    height: 260px;
  }
  .card-glass-content {
    padding: 1rem;
  }
}

/* ============================================ */

@media (max-width: 768px) {
  .hero-subtitle {
    white-space: normal;
    border-right: none;
    width: auto;
    animation: fadeUp 0.8s ease 0.8s forwards;
  }
}

/* ===== PROCESS SECTION - WINDING PATH TIMELINE ===== */
.process-section {
  padding: 100px 0;
  background: rgba(1, 3, 6, 0.3);
  position: relative;
  overflow: hidden;
}

.process-container {
  max-width: 900px;
  margin: 0 auto;
  padding: 0 2.5rem;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.process-title {
  font-family: var(--font-heading);
  font-size: 2.2rem;
  font-weight: 800;
  letter-spacing: 0.1em;
  margin-bottom: 4.5rem;
  text-align: center;
}

.process-track {
  position: relative;
  width: 100%;
}

.process-line-track {
  position: absolute;
  left: 50%;
  top: 0;
  bottom: 0;
  width: 2px;
  transform: translateX(-50%);
  background: rgba(0, 229, 255, 0.12);
  border-radius: 2px;
  overflow: hidden;
}

.process-line-fill {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 0%;
  background: linear-gradient(180deg, var(--accent-cyan), rgba(0, 229, 255, 0.5));
  box-shadow: 0 0 14px var(--accent-cyan-glow);
}

.process-step {
  position: relative;
  display: grid;
  grid-template-columns: 1fr 44px 1fr;
  align-items: start;
  margin-bottom: 4.5rem;
}

.process-step:last-child {
  margin-bottom: 0;
}

.process-node-dot {
  grid-column: 2;
  justify-self: center;
  width: 16px;
  height: 16px;
  margin-top: 6px;
  border-radius: 50%;
  background: var(--bg-color);
  border: 2px solid rgba(0, 229, 255, 0.4);
  box-shadow: 0 0 0 6px rgba(1, 3, 6, 0.8);
  z-index: 3;
  transition: background 0.4s ease, border-color 0.4s ease, box-shadow 0.4s ease;
}

.process-step.active .process-node-dot {
  background: var(--accent-cyan);
  border-color: var(--accent-cyan);
  box-shadow: 0 0 0 6px rgba(1, 3, 6, 0.8), 0 0 18px var(--accent-cyan-glow), 0 0 34px var(--accent-cyan-glow);
}

.process-connector {
  position: absolute;
  top: 13px;
  width: 2.4rem;
  height: 2px;
  background: rgba(0, 229, 255, 0.18);
  transition: background 0.4s ease;
}

.process-step.active .process-connector {
  background: rgba(0, 229, 255, 0.6);
}

.process-card {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.7s cubic-bezier(0.16, 1, 0.3, 1), transform 0.7s cubic-bezier(0.16, 1, 0.3, 1);
}

.process-step.active .process-card {
  opacity: 1;
  transform: translateY(0);
}

.process-step.side-right {
  text-align: left;
}
.process-step.side-right .process-card {
  grid-column: 3;
}
.process-step.side-right .process-connector {
  left: calc(50% + 8px);
}

.process-step.side-left {
  text-align: right;
}
.process-step.side-left .process-card {
  grid-column: 1;
}
.process-step.side-left .process-connector {
  right: calc(50% + 8px);
}

.process-tag {
  display: inline-block;
  font-family: var(--font-heading);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  color: var(--accent-cyan);
  margin-bottom: 0.5rem;
}

.process-card h3 {
  font-family: var(--font-heading);
  font-size: 1.2rem;
  font-weight: 700;
  margin-bottom: 0.6rem;
  color: var(--text-primary);
}

.process-card p {
  font-size: 0.9rem;
  color: var(--text-secondary);
  line-height: 1.6;
}

/* Featured Projects Section */
.projects-section {
  padding: 100px 0;
  position: relative;
}

.projects-container {
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 2.5rem;
}

.projects-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  margin-bottom: 4rem;
}

.projects-title {
  font-family: var(--font-heading);
  font-size: 2.8rem;
  font-weight: 800;
  letter-spacing: 0.02em;
  margin-top: 0.5rem;
}

.btn-all-projects {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.8rem 1.6rem;
  border-radius: 5px;
  border: 1px solid rgba(0, 229, 255, 0.2);
  background: transparent;
  color: var(--text-primary);
  text-decoration: none;
  font-family: var(--font-heading);
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  transition: var(--transition-smooth);
}

.btn-all-projects:hover {
  border-color: var(--accent-cyan);
  box-shadow: 0 0 15px rgba(0, 229, 255, 0.15);
  background: rgba(0, 229, 255, 0.02);
}

.btn-all-projects:hover .arrow-icon {
  transform: translate(2px, -2px);
  color: var(--accent-cyan);
}

.projects-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2.5rem;
}

.project-card {
  border-radius: 16px;
  border: 1px solid rgba(255, 255, 255, 0.03);
  background: rgba(5, 10, 18, 0.4);
  padding: 2rem;
  display: flex;
  flex-direction: column;
  transition: var(--transition-smooth);
}

.project-card:hover {
  border-color: var(--card-border);
  background: rgba(8, 16, 28, 0.6);
  box-shadow: 
    0 15px 35px rgba(0,0,0,0.5),
    0 0 20px rgba(0, 229, 255, 0.05);
  transform: translateY(-8px);
}

.project-card-header {
  margin-bottom: 1.5rem;
}

.project-tag {
  font-family: var(--font-heading);
  font-size: 0.68rem;
  letter-spacing: 0.1em;
  font-weight: 700;
  color: var(--text-secondary);
  background: rgba(255, 255, 255, 0.03);
  padding: 0.3rem 0.8rem;
  border-radius: 4px;
}

/* Laptop Mockup Design */
.laptop-frame {
  width: 100%;
  position: relative;
  margin-bottom: 2rem;
  perspective: 1000px;
}

.laptop-screen {
  background: #000;
  border-radius: 10px 10px 0 0;
  border: 8px solid #161c24;
  border-bottom: none;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  position: relative;
  box-shadow: 0 10px 30px rgba(0,0,0,0.5);
}

.project-preview-img {
  width: 100%;
  height: auto;
  position: absolute;
  top: 0;
  left: 0;
  transform: translateY(0);
  transition: transform 5s ease-in-out;
  display: block;
}

.project-card:hover .project-preview-img {
  transform: translateY(calc(-100% + 180px));
}

@media (max-width: 1200px) {
  .project-card:hover .project-preview-img {
    transform: translateY(calc(-100% + 140px));
  }
}

.laptop-base {
  width: 112%;
  height: 8px;
  background: #2a333f;
  margin-left: -6%;
  border-radius: 0 0 8px 8px;
  position: relative;
  border-bottom: 2px solid #161c24;
  box-shadow: 0 4px 12px rgba(0, 229, 255, 0.1);
  transition: var(--transition-smooth);
}

.project-card:hover .laptop-base {
  background: #394657;
  box-shadow: 0 4px 20px rgba(0, 229, 255, 0.35);
}

.laptop-notch {
  width: 60px;
  height: 4px;
  background: #161c24;
  margin: 0 auto;
  border-radius: 0 0 4px 4px;
}

.project-info {
  margin-top: auto;
  display: flex;
  flex-direction: column;
}

.project-name {
  font-family: var(--font-heading);
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 0.5rem;
}

.project-desc {
  color: var(--text-secondary);
  font-size: 0.88rem;
  line-height: 1.6;
  margin-bottom: 1.5rem;
  min-height: 50px;
}

.project-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 1rem;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.project-pages {
  font-family: var(--font-heading);
  font-size: 0.72rem;
  letter-spacing: 0.1em;
  font-weight: 700;
  color: var(--text-secondary);
}

.btn-project-link {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  border: 1px solid rgba(255,255,255,0.05);
  background: rgba(255, 255, 255, 0.02);
  color: var(--text-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition-smooth);
}

.btn-project-link svg {
  width: 15px;
  height: 15px;
  transition: var(--transition-smooth);
}

.project-card:hover .btn-project-link {
  background: var(--accent-cyan);
  color: var(--bg-darker);
  border-color: var(--accent-cyan);
  box-shadow: 0 0 15px var(--accent-cyan-glow);
}

.project-card:hover .btn-project-link svg {
  transform: translate(1px, -1px);
}

/* Call To Action Banner Section */
.cta-section {
  padding: 100px 0;
  display: flex;
  justify-content: center;
  position: relative;
}

.cta-box-container {
  max-width: 1400px;
  width: calc(100% - 5rem);
  margin: 0 auto;
  border-radius: 20px;
  border: 1px solid var(--card-border);
  background: var(--card-bg);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  padding: 6rem 3rem;
  text-align: center;
  position: relative;
  overflow: hidden;
  box-shadow: 0 20px 50px rgba(0,0,0,0.6);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.5rem;
}

.cta-glow-bg {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 300px;
  height: 300px;
  background: radial-gradient(circle, rgba(0, 229, 255, 0.15) 0%, transparent 70%);
  filter: blur(40px);
  pointer-events: none;
}

.cta-tagline {
  font-family: var(--font-heading);
  font-size: 0.85rem;
  letter-spacing: 0.25em;
  font-weight: 700;
  color: var(--text-secondary);
}

.cta-title {
  font-family: var(--font-heading);
  font-size: 3.6rem;
  font-weight: 900;
  letter-spacing: 0.05em;
  color: var(--text-primary);
  line-height: 1.2;
  margin-bottom: 1rem;
}

.gradient-text {
  background: linear-gradient(90deg, #ffffff 0%, var(--accent-cyan) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  filter: drop-shadow(0 0 10px rgba(0, 229, 255, 0.2));
}

.btn-cta-whatsapp {
  margin-top: 1.5rem;
  display: inline-flex;
  align-items: center;
  gap: 0.8rem;
  padding: 1.1rem 2.2rem;
  border-radius: 50px;
  border: 1px solid var(--accent-cyan);
  background: rgba(0, 229, 255, 0.03);
  color: var(--text-primary);
  text-decoration: none;
  font-family: var(--font-heading);
  font-size: 0.85rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  transition: var(--transition-smooth);
  box-shadow: 0 0 20px rgba(0, 229, 255, 0.1);
}

.btn-cta-whatsapp:hover {
  background: var(--accent-cyan);
  color: var(--bg-darker);
  box-shadow: 0 0 35px var(--accent-cyan-glow);
  transform: translateY(-3px) scale(1.02);
}

.whatsapp-btn-icon {
  width: 18px;
  height: 18px;
}

/* Footer Section */
.footer {
  background: var(--bg-darker);
  border-top: 1px solid rgba(255, 255, 255, 0.02);
  padding: 80px 0 30px;
  position: relative;
  z-index: 10;
}

.footer-grid {
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 2.5rem;
  display: grid;
  grid-template-columns: 1.3fr 0.8fr 0.8fr 1.1fr;
  gap: 4rem;
  margin-bottom: 50px;
}

.footer-col {
  display: flex;
  flex-direction: column;
}

.footer-logo {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  text-decoration: none;
  color: var(--text-primary);
  margin-bottom: 1.5rem;
}

.monarch-footer-logo-svg {
  width: 32px;
  height: 25px;
  filter: drop-shadow(0 0 5px var(--accent-cyan-glow));
}

.brand-tagline {
  color: var(--text-secondary);
  font-size: 0.9rem;
  line-height: 1.7;
  margin-bottom: 2rem;
  max-width: 300px;
}

.footer-socials {
  display: flex;
  gap: 1rem;
}

.footer-socials a {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.05);
  background: rgba(255, 255, 255, 0.02);
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition-fast);
}

.footer-socials a:hover {
  color: var(--accent-cyan);
  border-color: var(--accent-cyan);
  box-shadow: 0 0 12px var(--accent-cyan-dim);
  background: rgba(0, 229, 255, 0.02);
  transform: translateY(-2px);
}

.footer-socials a svg {
  width: 16px;
  height: 16px;
}

.footer-heading {
  font-family: var(--font-heading);
  font-size: 0.8rem;
  letter-spacing: 0.15em;
  color: var(--text-primary);
  font-weight: 700;
  margin-bottom: 1.8rem;
}

.footer-links ul {
  list-style: none;
}

.footer-links ul li {
  margin-bottom: 0.9rem;
}

.footer-links ul li a {
  text-decoration: none;
  color: var(--text-secondary);
  font-size: 0.9rem;
  transition: var(--transition-fast);
}

.footer-links ul li a:hover {
  color: var(--accent-cyan);
  padding-left: 5px;
}

.contact-info ul {
  list-style: none;
}

.contact-info ul li {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1rem;
  color: var(--text-secondary);
  font-size: 0.9rem;
}

.info-icon {
  width: 16px;
  height: 16px;
  color: var(--accent-cyan);
  flex-shrink: 0;
}

.status-available {
  margin-top: 1.5rem;
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

.pulse-dot {
  width: 8px;
  height: 8px;
  background-color: #00e676;
  border-radius: 50%;
  display: inline-block;
  box-shadow: 0 0 10px #00e676;
  animation: pulseDot 2s infinite ease-in-out;
}

@keyframes pulseDot {
  0%, 100% {
    transform: scale(1);
    opacity: 0.7;
  }
  50% {
    transform: scale(1.3);
    opacity: 1;
    box-shadow: 0 0 15px #00e676;
  }
}

.footer-bottom {
  max-width: 1400px;
  margin: 0 auto;
  padding: 2rem 2.5rem 0;
  border-top: 1px solid rgba(255, 255, 255, 0.03);
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.8rem;
  color: var(--text-secondary);
}

.credit span {
  color: var(--text-primary);
  font-weight: 600;
}

.credit .heart {
  color: var(--accent-cyan);
}

/* Animations Scroll Triggers */
.fade-in {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.8s ease, transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

.fade-in.appear {
  opacity: 1;
  transform: translateY(0);
}

/* ============================================ */

@media (max-width: 1024px) {
  .hero-title {
    font-size: 5rem;
  }
  
  .about-grid-container {
    grid-template-columns: 1fr;
    gap: 3rem;
  }
  
  .about-visual {
    height: 400px;
  }

  .services-deck {
    height: 620px;
  }

  .service-card {
    width: 250px;
    height: 580px;
    min-height: 580px;
    padding: 1.6rem 1.3rem;
  }

  .process-container {
    max-width: 700px;
  }

  .process-step {
    grid-template-columns: 1fr 36px 1fr;
    margin-bottom: 3.5rem;
  }

  .projects-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  
  .footer-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 3rem;
  }
}

/* ===== MOBILE FIXES ===== */
@media (max-width: 768px) {
  /* --- NAVIGATION FIXED --- */
  .nav-container {
    padding: 0.6rem 1rem;
    gap: 0.5rem;
  }

  .nav-logo {
    gap: 0.4rem;
  }
  .monarch-logo-svg {
    width: 28px;
    height: 22px;
  }
  .logo-text {
    font-size: 0.95rem;
    letter-spacing: 0.08em;
  }

  .nav-links {
    position: fixed;
    top: 0;
    right: -100%;
    width: 280px;
    height: 100vh;
    background: rgba(3, 7, 12, 0.98);
    flex-direction: column;
    padding: 80px 35px;
    transition: var(--transition-smooth);
    border-left: 1px solid rgba(0, 229, 255, 0.1);
    gap: 1.2rem;
    margin: 0;
  }

  .nav-links.active {
    right: 0;
  }

  .nav-link {
    font-size: 0.9rem;
    padding: 0.5rem 0;
    width: 100%;
  }

  .btn-start-project {
    display: none;
  }

  .mobile-toggle {
    display: flex;
  }
  
  .mobile-toggle.active .bar:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
  }

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

  .mobile-toggle.active .bar:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
  }

  /* --- Hero --- */
  .hero-section {
    min-height: 75vh;
    padding-top: 70px;
  }

  .hero-container {
    padding: 0 1.25rem;
  }

  .hero-title {
    font-size: 3.2rem;
    letter-spacing: 0.05em;
  }
  
  .hero-subtitle {
    font-size: 1rem;
    line-height: 1.6;
    white-space: normal !important;
    border-right: none !important;
    width: auto !important;
    animation: fadeUp 0.8s ease 0.8s forwards !important;
    max-width: 100%;
  }

  .hero-badge {
    padding: 0.3rem 0.8rem;
    margin-bottom: 1.2rem;
  }
  .badge-text {
    font-size: 0.55rem;
  }

  /* --- Carousel - FIXED CARD FLIP & ARROWS --- */
  .carousel-section {
    padding: 30px 0;
  }

  .carousel-container {
    padding: 0 0.8rem;
  }

  .brand-subline {
    font-size: 0.65rem;
    margin-bottom: 1.5rem;
  }

  .carousel-slider-container {
    gap: 0.3rem;
    flex-wrap: nowrap;
    justify-content: center;
    width: 100%;
  }

  .nav-arrow {
    width: 36px;
    height: 36px;
    flex-shrink: 0;
    position: relative;
    z-index: 5;
  }
  .nav-arrow svg {
    width: 14px;
    height: 14px;
  }

  .card-scene {
    width: 100%;
    max-width: 300px;
    height: 340px;
    margin: 0 auto;
    flex-shrink: 0;
  }

  /* Fixed card positioning on mobile */
  .card-scene {
    width: min(100%, 300px);
    max-width: 300px;
    height: 340px;
    margin: 0 auto;
    flex: 0 0 auto;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: visible;
    perspective: 1500px;
  }

  .card-deck {
    width: min(100%, 280px);
    max-width: 280px;
    height: 320px;
    position: relative;
    left: auto;
    right: auto;
    margin: 0 auto;
    transform: rotateY(0deg);
    transform-origin: center center;
    transform-style: preserve-3d;
  }

  .card-deck.flipped {
    transform: rotateY(180deg);
  }

  .deck-card {
    width: 100%;
    height: 100%;
    position: absolute;
    inset: 0;
    border-radius: 14px;
    transform-origin: center center;
  }

  .brand-card {
    transform: translateZ(1px);
    z-index: 2;
  }

  .bio-card {
    transform: rotateY(180deg);
    z-index: 1;
  }

  .card-glass-content {
    padding: 1.5rem;
  }

  .card-brand-logo {
    gap: 0.75rem;
  }
  .monarch-card-logo {
    width: 55px;
    height: 42px;
  }
  .card-title {
    font-size: 1.3rem;
  }
  .card-subtitle {
    font-size: 0.6rem;
  }

  .bio-name {
    font-size: 1.2rem;
  }
  .bio-title {
    font-size: 0.6rem;
  }
  .bio-desc {
    font-size: 0.7rem;
    margin: 0.8rem 0;
  }
  .social-link-item {
    font-size: 0.7rem;
    padding: 0.4rem 0.6rem;
  }
  .link-icon {
    width: 12px;
    height: 12px;
  }

  .drag-hint {
    font-size: 0.55rem;
    margin-top: 1.2rem;
  }
  .drag-icon {
    width: 12px;
    height: 12px;
  }

  /* --- About Section - FIXED CENTERING --- */
  .about-section {
    padding: 50px 0;
  }
  .about-grid-container {
    padding: 0 1.25rem;
    gap: 2rem;
    text-align: center;
  }
  .about-details {
    align-items: center;
  }
  .about-title {
    font-size: 2rem;
    text-align: center;
  }
  .about-text {
    font-size: 0.9rem;
    text-align: center;
    max-width: 100%;
  }

  .stats-grid {
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
    width: 100%;
  }
  .stat-card {
    padding: 1rem;
    text-align: center;
    border-left: none;
    border-top: 2px solid var(--accent-cyan);
    background: linear-gradient(180deg, rgba(0, 229, 255, 0.03) 0%, transparent 100%);
  }
  .stat-number {
    font-size: 1.8rem;
  }
  .stat-plus {
    font-size: 1.4rem;
  }
  .stat-label {
    font-size: 0.7rem;
  }

  .about-visual {
    height: 250px;
    width: 100%;
  }

  /* --- Services (mobile: drop the pile animation, simple stacked reveal) --- */
  .services-section {
    padding: 60px 0 30px;
  }
  .services-title {
    font-size: 2rem;
  }
  .services-deck {
    height: auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1.5rem;
    margin-top: 2rem;
  }
  .service-card {
    position: static;
    width: 100%;
    max-width: 340px;
    min-height: unset;
    opacity: 0;
    transform: translateY(30px) !important;
    transition: opacity 0.7s ease, transform 0.7s cubic-bezier(0.16, 1, 0.3, 1) !important;
  }
  .services-deck.in-view .service-card {
    left: auto;
    opacity: 1;
    transform: translateY(0) !important;
  }

  /* --- Process --- */
  .process-section {
    padding: 50px 0;
  }
  .process-container {
    padding: 0 1.25rem;
    max-width: 100%;
  }
  .process-title {
    font-size: 1.6rem;
    margin-bottom: 2rem;
  }
  .process-line-track {
    left: 18px;
    transform: none;
  }
  .process-step {
    grid-template-columns: 36px 1fr;
    margin-bottom: 2.5rem;
  }
  .process-step .process-node-dot {
    grid-column: 1;
    justify-self: start;
    margin-left: 10px;
  }
  .process-step .process-card,
  .process-step.side-left .process-card,
  .process-step.side-right .process-card {
    grid-column: 2;
    text-align: left;
  }
  .process-step.side-left,
  .process-step.side-right {
    text-align: left;
  }
  .process-connector {
    display: none;
  }
  .process-card h3 {
    font-size: 1rem;
  }
  .process-card p {
    font-size: 0.85rem;
  }

  /* --- Projects --- */
  .projects-section {
    padding: 50px 0;
  }
  .projects-container {
    padding: 0 1.25rem;
  }
  .projects-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.8rem;
    margin-bottom: 2rem;
  }
  .projects-title {
    font-size: 1.8rem;
  }
  .btn-all-projects {
    font-size: 0.7rem;
    padding: 0.5rem 1rem;
  }

  .projects-grid {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }

  .project-card {
    padding: 1.25rem;
  }
  .project-tag {
    font-size: 0.6rem;
  }
  .project-name {
    font-size: 1.1rem;
  }
  .project-desc {
    font-size: 0.8rem;
    min-height: 35px;
  }
  .project-pages {
    font-size: 0.6rem;
  }
  .btn-project-link {
    width: 32px;
    height: 32px;
  }
  .btn-project-link svg {
    width: 12px;
    height: 12px;
  }

  .laptop-screen {
    border-width: 5px;
    border-radius: 8px 8px 0 0;
  }
  .laptop-base {
    height: 5px;
  }
  .laptop-notch {
    width: 35px;
    height: 3px;
  }
  .project-card:hover .project-preview-img {
    transform: translateY(calc(-100% + 100px));
  }

  /* ===== LIVE DEMO ON MOBILE - FIXED ===== */
  .live-demo-wrapper {
    position: relative;
  }

  .btn-project-link {
    transition: all 0.3s ease;
    position: relative;
  }

  /* Mobile: Show live demo label on hover/tap */
  .btn-project-link:hover::after,
  .btn-project-link:active::after {
    content: "Live Demo →";
    position: absolute;
    right: 0;
    bottom: -32px;
    background: rgba(10, 10, 20, 0.95);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    color: #00e5ff;
    padding: 4px 10px;
    font-size: 10px;
    font-weight: 500;
    border-radius: 6px;
    white-space: nowrap;
    letter-spacing: 1px;
    border: 1px solid rgba(0, 229, 255, 0.3);
    pointer-events: none;
    z-index: 10;
    font-family: 'Inter', sans-serif;
    display: block;
  }

  /* Also show on touch for mobile */
  .btn-project-link:focus::after {
    content: "Live Demo →";
    position: absolute;
    right: 0;
    bottom: -32px;
    background: rgba(10, 10, 20, 0.95);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    color: #00e5ff;
    padding: 4px 10px;
    font-size: 10px;
    font-weight: 500;
    border-radius: 6px;
    white-space: nowrap;
    letter-spacing: 1px;
    border: 1px solid rgba(0, 229, 255, 0.3);
    pointer-events: none;
    z-index: 10;
    font-family: 'Inter', sans-serif;
    display: block;
  }

  /* --- CTA --- */
  .cta-section {
    padding: 50px 0;
  }
  .cta-box-container {
    padding: 2.5rem 1.25rem;
    width: calc(100% - 1.5rem);
    gap: 0.8rem;
  }
  .cta-tagline {
    font-size: 0.65rem;
  }
  .cta-title {
    font-size: 1.8rem;
  }
  .btn-cta-whatsapp {
    font-size: 0.7rem;
    padding: 0.7rem 1.2rem;
  }
  .whatsapp-btn-icon {
    width: 14px;
    height: 14px;
  }

  /* --- Footer --- */
  .footer {
    padding: 40px 0 15px;
  }
  .footer-grid {
    grid-template-columns: 1fr;
    gap: 1.8rem;
    padding: 0 1.25rem;
    margin-bottom: 25px;
  }
  .footer-bottom {
    flex-direction: column;
    gap: 0.5rem;
    text-align: center;
    padding: 1.2rem 1.25rem 0;
    font-size: 0.65rem;
  }
  .brand-tagline {
    max-width: 100%;
    font-size: 0.8rem;
  }
  .footer-heading {
    font-size: 0.7rem;
    margin-bottom: 0.8rem;
  }
  .footer-links ul li {
    margin-bottom: 0.5rem;
  }
  .footer-links ul li a {
    font-size: 0.8rem;
  }
  .contact-info ul li {
    font-size: 0.8rem;
  }
  .footer-socials a {
    width: 34px;
    height: 34px;
  }
  .footer-socials a svg {
    width: 14px;
    height: 14px;
  }
}

/* Extra small devices */
@media (max-width: 400px) {
  .hero-title {
    font-size: 2.4rem;
  }
  .hero-subtitle {
    font-size: 0.8rem;
  }
  .card-scene {
    width: min(100%, 260px);
    max-width: 260px;
    height: 300px;
    margin: 0 auto;
  }
  .card-deck {
    width: min(100%, 240px);
    max-width: 240px;
    height: 280px;
    left: auto;
    margin: 0 auto;
    transform-origin: center center;
  }
  .card-deck.flipped {
    transform: rotateY(180deg);
  }
  .deck-card {
    width: 100%;
    height: 100%;
    inset: 0;
  }
  .card-glass-content {
    padding: 1rem;
  }
  .monarch-card-logo {
    width: 42px;
    height: 32px;
  }
  .card-title {
    font-size: 1.1rem;
  }
  .bio-name {
    font-size: 1rem;
  }
  .about-title {
    font-size: 1.5rem;
  }
  .stats-grid {
    gap: 0.6rem;
  }
  .stat-card {
    padding: 0.6rem;
  }
  .stat-number {
    font-size: 1.3rem;
  }
  .cta-title {
    font-size: 1.4rem;
  }
}

/* Landscape orientation fix */
@media (max-height: 600px) and (orientation: landscape) {
  .hero-section {
    min-height: 100vh;
    padding-top: 60px;
  }
  .hero-title {
    font-size: 2.6rem;
  }
  .hero-subtitle {
    font-size: 0.85rem;
    margin-bottom: 1.2rem;
  }
  .hero-badge {
    margin-bottom: 0.8rem;
    padding: 0.2rem 0.6rem;
  }
  .badge-text {
    font-size: 0.5rem;
  }
  .card-scene {
    height: 280px;
  }
  .card-deck {
    height: 260px;
  }
  .deck-card {
    height: 260px;
  }
  .card-glass-content {
    padding: 1rem;
  }
}

/* Live Demo Link - Desktop */
.live-demo-wrapper {
  position: relative;
}

.btn-project-link {
  transition: all 0.3s ease;
}

.btn-project-link:hover {
  transform: translate(2px, -2px);
  filter: drop-shadow(0 0 8px rgba(0, 229, 255, 0.5));
}

.btn-project-link:hover::after {
  content: "Live Demo →";
  position: absolute;
  right: 0;
  bottom: -32px;
  background: rgba(10, 10, 20, 0.95);
  backdrop-filter: blur(8px);
  color: #00e5ff;
  padding: 4px 10px;
  font-size: 11px;
  font-weight: 500;
  border-radius: 6px;
  white-space: nowrap;
  letter-spacing: 1px;
  border: 1px solid rgba(0, 229, 255, 0.3);
  pointer-events: none;
  z-index: 10;
  font-family: 'Inter', sans-serif;
}

/* ============================================ */

.hero-section {
  animation: heroZoomIn 1.2s cubic-bezier(0.16, 1, 0.3, 1) forwards;
  transform-origin: center center;
}

@keyframes heroZoomIn {
  0% {
    transform: scale(1.05);
    opacity: 0;
  }
  100% {
    transform: scale(1);
    opacity: 1;
  }
}

.hero-title {
  display: inline-block;
  animation: blurToReveal 0.8s cubic-bezier(0.16, 1, 0.3, 1) forwards;
  animation-delay: 0.2s;
  opacity: 0;
  filter: blur(12px);
}

@keyframes blurToReveal {
  0% {
    opacity: 0;
    filter: blur(12px);
    transform: scale(0.98);
  }
  100% {
    opacity: 1;
    filter: blur(0);
    transform: scale(1);
  }
}

.hero-title span {
  display: inline-block;
  animation: wordFadeUp 0.6s cubic-bezier(0.16, 1, 0.3, 1) forwards;
  opacity: 0;
  transform: translateY(30px);
}

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

.hero-subtitle {
  animation: fadeUp 0.8s ease forwards;
  animation-delay: 0.5s;
  opacity: 0;
  transform: translateY(30px);
}

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

.hero-subtitle {
  overflow: hidden;
  border-right: 2px solid var(--accent-cyan);
  white-space: nowrap;
  width: 0;
  animation: 
    typingEffect 2.5s steps(40, end) 0.8s forwards,
    hideCursor 0s linear 2.5s forwards;
}

@keyframes typingEffect {
  from { width: 0; opacity: 1; }
  to { width: 100%; opacity: 1; }
}

@keyframes hideCursor {
  to { border-right-color: transparent; }
}

@media (max-width: 768px) {
  .hero-subtitle {
    white-space: normal;
    border-right: none;
    width: auto;
    animation: fadeUp 0.8s ease 0.8s forwards;
  }
}

.hero-section {
  position: relative;
  overflow: hidden;
}

.hero-section::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 400px;
  height: 400px;
  background: radial-gradient(circle, rgba(0, 229, 255, 0.3), transparent 70%);
  transform: translate(-50%, -50%);
  filter: blur(60px);
  animation: floatGlowOrb 6s ease-in-out infinite;
  pointer-events: none;
  z-index: -1;
}

@keyframes floatGlowOrb {
  0%, 100% {
    transform: translate(-50%, -50%) scale(1);
    opacity: 0.5;
  }
  50% {
    transform: translate(-50%, -55%) scale(1.2);
    opacity: 0.8;
  }
}

.hero-section::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: radial-gradient(circle 150px at var(--x, 50%) var(--y, 50%), 
              rgba(0, 229, 255, 0.15) 0%, 
              transparent 80%);
  pointer-events: none;
  transition: background 0.05s linear;
  z-index: -1;
}

.bg-mesh {
  transform: translateZ(0);
  will-change: transform;
  transition: transform 0.1s ease-out;
}

.hero-badge {
  animation: slowFloat 4s ease-in-out infinite, fadeUp 0.6s ease forwards;
  opacity: 0;
}

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

.btn-start-project {
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  position: relative;
  display: inline-flex;
}

.btn-start-project:hover {
  transform: scale(1.05);
  box-shadow: 0 0 30px rgba(0, 229, 255, 0.5);
}

@keyframes titleGlowPulse {
  0%, 100% {
    text-shadow: 0 0 20px rgba(0, 229, 255, 0);
  }
  50% {
    text-shadow: 0 0 30px rgba(0, 229, 255, 0.4);
  }
}

.bg-grid {
  background-size: 60px 60px;
}

@keyframes gridMove {
  0% {
    background-position: 0 0;
  }
  100% {
    background-position: 60px 60px;
  }
}

.hero-logo-divider {
  position: relative;
  animation: popUp 0.6s ease 1.5s forwards, breathGlow 3s ease-in-out infinite 2s;
  opacity: 0;
  transform: scale(0);
}

@keyframes breathGlow {
  0%, 100% {
    filter: drop-shadow(0 0 5px rgba(0, 229, 255, 0.3));
  }
  50% {
    filter: drop-shadow(0 0 20px rgba(0, 229, 255, 0.8));
  }
}

@keyframes popUp {
  0% {
    opacity: 0;
    transform: scale(0);
  }
  80% {
    opacity: 1;
    transform: scale(1.1);
  }
  100% {
    opacity: 1;
    transform: scale(1);
  }
}

.hero-title {
  position: relative;
  overflow: hidden;
}

@keyframes lightSweep {
  0% {
    left: -100%;
  }
  20%, 100% {
    left: 200%;
  }
}

.hero-container {
  position: relative;
}

.hero-container::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 300%;
  height: 300%;
  background: conic-gradient(from 0deg, 
    transparent, 
    rgba(0, 229, 255, 0.05), 
    transparent, 
    rgba(0, 229, 255, 0.05), 
    transparent);
  transform: translate(-50%, -50%);
  animation: rotateGradient 12s linear infinite;
  pointer-events: none;
  z-index: -1;
}

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

.hero-badge, .btn-start-project {
  position: relative;
  overflow: hidden;
}

.hero-badge::before, .btn-start-project::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, 
    transparent, 
    rgba(255, 255, 255, 0.2), 
    transparent);
  transition: left 0.5s ease;
}

.hero-badge:hover::before, .btn-start-project:hover::before {
  left: 100%;
}

.hero-title {
  position: relative;
  display: inline-block;
}

.hero-title::after {
  content: '';
  position: absolute;
  bottom: -10px;
  left: 0;
  width: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--accent-cyan), transparent);
  animation: neonUnderline 1.5s ease-out 1.5s forwards;
}

@keyframes neonUnderline {
  to {
    width: 100%;
  }
}

.hero-section {
  animation: ambientMotion 10s ease-in-out infinite;
}

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

.bg-mesh {
  animation: slowZoom 20s ease-in-out infinite;
}

@keyframes slowZoom {
  0%, 100% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.05);
  }
}

.hero-container {
  transition: transform 0.1s cubic-bezier(0.16, 1, 0.3, 1);
}

html {
  scroll-behavior: smooth;
}
.name-first {
    display: block;
    color: #ffffff;
    -webkit-text-fill-color: #ffffff;
    background: none;
}
/* Footer Filter Links */
.footer-filter-link {
  cursor: pointer;
  transition: all 0.2s ease;
}
.footer-filter-link:hover {
  color: var(--accent-cyan) !important;
  padding-left: 5px;
}
/* Ensure front face is above back when flipped */
.service-card .card-face-front {
  z-index: 2;
}

.service-card .card-face-back {
  z-index: 1;
}

/* When flipped, swap z-index */
.services-deck.flipped .service-card .card-face-front {
  z-index: 1;
}

.services-deck.flipped .service-card .card-face-back {
  z-index: 2;
}
/* ==========================================================
   SERVICES — PINNED SCROLL EXPERIENCE
   Desktop/tablet: stay inside Services while cards animate.
   Mobile: keep the existing normal stacked layout.
   ========================================================== */
@media (min-width: 768px) {
  .services-section {
    /* Extra scroll space = animation timeline. */
    min-height: 220vh;
    padding: 0;
    position: relative;
  }

  .services-section > .services-container {
    position: sticky;
    top: 0;
    min-height: 100vh;
    box-sizing: border-box;
    justify-content: flex-start;
    padding-top: clamp(55px, 8vh, 95px);
    padding-bottom: 40px;
  }

  .services-section .services-deck {
    flex-shrink: 0;
  }

  /* The flip must be controlled only by scroll state. */
  .services-section .card-inner {
    transition: transform 1.15s cubic-bezier(0.22, 1, 0.36, 1);
    transition-delay: 0s;
  }

  .services-section .services-deck.flipped .card-inner {
    transform: rotateY(180deg);
  }

  /* Remove the old staggered flip delays. */
  .services-section .services-deck.flipped .service-card .card-inner,
  .services-section .services-deck:not(.flipped) .service-card .card-inner {
    transition-delay: 0s;
  }
}

@media (max-width: 767px) {
  .services-section {
    min-height: auto;
  }
}

/* ==========================================================
   SERVICES — MOBILE VISIBILITY FIX
   Keep mobile simple/stacked; never hide the cards waiting
   for the desktop scroll animation.
   ========================================================== */
@media (max-width: 767px) {
  .services-section {
    min-height: auto !important;
    height: auto !important;
    padding: 60px 0 30px !important;
    overflow: visible !important;
  }

  .services-section > .services-container {
    position: relative !important;
    min-height: auto !important;
    height: auto !important;
    padding-top: 0 !important;
    padding-bottom: 0 !important;
  }

  .services-deck {
    position: relative !important;
    height: auto !important;
    min-height: 0 !important;
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    justify-content: flex-start !important;
    gap: 1.5rem !important;
    margin-top: 2rem !important;
    overflow: visible !important;
  }

  .services-deck .service-card,
  .services-deck.in-view .service-card {
    position: relative !important;
    left: auto !important;
    top: auto !important;
    width: 100% !important;
    max-width: 340px !important;
    height: 350px !important;
    min-height: 350px !important;
    opacity: 1 !important;
    visibility: visible !important;
    transform: none !important;
    rotate: none !important;
    scale: 1 !important;
    z-index: auto !important;
    transition: none !important;
  }

  .services-deck .card-inner,
  .services-deck.flipped .card-inner {
    transform: none !important;
  }
}

/* ==========================================================
   SERVICES — MOBILE FINAL FIX
   Mobile cards show the FRONT/service content by default.
   No scroll reveal, no flip animation, no card movement.
   Existing hover styling remains untouched.
   ========================================================== */
@media (max-width: 767px) {
  .services-deck .service-card .card-inner,
  .services-deck.flipped .service-card .card-inner,
  .services-deck:not(.flipped) .service-card .card-inner {
    transform: rotateY(180deg) !important;
    transition: none !important;
  }

  .services-deck .service-card,
  .services-deck.in-view .service-card {
    opacity: 1 !important;
    visibility: visible !important;
    transform: none !important;
    transition: none !important;
  }
}

/* ==========================================================
   SERVICES — MOBILE PREMIUM CARD LAYOUT
   Full-width cards aligned with the Projects section,
   taller editorial layout with capability chips/footer.
   Desktop styling remains unchanged.
   ========================================================== */
@media (max-width: 767px) {
  .services-section {
    padding: 48px 0 40px !important;
  }

  .services-container {
    width: 100% !important;
    max-width: 100% !important;
    padding-left: 1.25rem !important;
    padding-right: 1.25rem !important;
    box-sizing: border-box !important;
  }

  .services-title {
    font-size: 2.45rem !important;
    line-height: 1.08 !important;
    margin-bottom: 0 !important;
    white-space: nowrap !important;
  }

  .services-deck {
    width: 100% !important;
    margin-top: 3.5rem !important;
    gap: 1.5rem !important;
    align-items: stretch !important;
  }

  .services-deck .service-card,
  .services-deck.in-view .service-card {
    width: 100% !important;
    max-width: none !important;
    height: 460px !important;
    min-height: 460px !important;
    flex: 0 0 460px !important;
    border-radius: 24px !important;
    box-sizing: border-box !important;
  }

  .services-deck .card-face {
    padding: 2.5rem 2rem !important;
    border-radius: 24px !important;
  }

  .card-face-front .card-icon {
    width: 56px !important;
    height: 56px !important;
    border-radius: 14px !important;
    margin-bottom: 1.5rem !important;
  }

  .card-face-front .card-icon svg {
    width: 25px !important;
    height: 25px !important;
  }

  .card-face-front .card-tag {
    font-size: 0.72rem !important;
    margin-bottom: 1rem !important;
    letter-spacing: 0.13em !important;
  }

  .card-face-front .card-title {
    font-size: 1.55rem !important;
    line-height: 1.25 !important;
    margin-bottom: 0.8rem !important;
  }

  .card-face-front .card-desc {
    font-size: 0.92rem !important;
    line-height: 1.65 !important;
    max-width: 31rem !important;
  }

  .service-meta {
    display: flex !important;
    flex-wrap: wrap !important;
    gap: 0.55rem !important;
    margin-top: auto !important;
    padding-top: 1.4rem !important;
    border-top: 1px solid rgba(255,255,255,0.08) !important;
  }

  .service-meta span {
    display: inline-flex !important;
    align-items: center !important;
    min-height: 40px !important;
    padding: 0.55rem 0.8rem !important;
    border: 1px solid rgba(255,255,255,0.10) !important;
    border-radius: 8px !important;
    background: rgba(255,255,255,0.025) !important;
    color: rgba(255,255,255,0.78) !important;
    font-family: var(--font-heading) !important;
    font-size: 0.64rem !important;
    font-weight: 500 !important;
    letter-spacing: 0.03em !important;
  }

  .service-footer {
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    margin-top: 1.6rem !important;
    padding-top: 0.9rem !important;
    border-top: 1px solid rgba(255,255,255,0.06) !important;
    color: rgba(255,255,255,0.34) !important;
    font-family: var(--font-heading) !important;
    font-size: 0.58rem !important;
    font-weight: 600 !important;
    letter-spacing: 0.12em !important;
  }

  .service-footer-dot {
    width: 7px !important;
    height: 7px !important;
    border-radius: 50% !important;
    background: rgba(255,255,255,0.35) !important;
    flex: 0 0 7px !important;
  }
}

/* ==========================================================
   SERVICES — MOBILE FINAL POLISH
   Restore eyebrow, enlarge heading, full-width/taller cards,
   clean metadata area, and keep process heading left-aligned.
   Desktop remains unchanged.
   ========================================================== */
@media (max-width: 767px) {
  .services-offer-label {
    display: inline-block !important;
    margin-bottom: 0.9rem !important;
    font-size: 0.75rem !important;
    letter-spacing: 0.25em !important;
  }

  .services-title {
    font-size: 3rem !important;
    line-height: 1 !important;
    margin-bottom: 0 !important;
    white-space: nowrap !important;
  }

  .services-deck {
    width: 100% !important;
    margin-top: 2.75rem !important;
    gap: 1.5rem !important;
    align-items: stretch !important;
    letter-spacing: normal !important;
  }

  .services-deck .service-card,
  .services-deck.in-view .service-card {
    width: 100% !important;
    max-width: none !important;
    height: auto !important;
    min-height: 500px !important;
    flex: 0 0 auto !important;
    margin: 0 !important;
    box-sizing: border-box !important;
  }

  .services-deck .card-face,
  .services-deck .card-face-front {
    height: 100% !important;
    box-sizing: border-box !important;
    letter-spacing: normal !important;
  }

  .card-face-front .card-title {
    line-height: 1.02 !important;
    letter-spacing: 0.08em !important;
    margin-bottom: 1rem !important;
  }

  .card-face-front .card-desc {
    letter-spacing: normal !important;
  }

  .service-meta {
    flex-wrap: wrap !important;
    gap: 0.55rem !important;
    padding-top: 0 !important;
    border-top: none !important;
    margin-top: auto !important;
  }

  .service-meta span {
    white-space: nowrap !important;
  }

  .service-footer {
    margin-top: 1.35rem !important;
  }

  .process-section {
    text-align: left !important;
  }

  .process-container {
    align-items: flex-start !important;
    text-align: left !important;
  }

  .process-container .section-label,
  .process-container .process-title {
    text-align: left !important;
    margin-left: 0 !important;
    margin-right: auto !important;
  }

  .process-title {
    margin-bottom: 2rem !important;
  }
}

/* ==========================================================
   SERVICES — MOBILE PREMIUM CARD: HEIGHT FIX + SUB-CATEGORY CHIPS
   Fixes the mobile card collapsing to ~80px (the absolute-positioned
   face was never getting a real height, so content past the icon
   was clipped by overflow:hidden). On mobile the flip never runs,
   so we take both faces out of absolute/3D mode entirely and let
   the front face size itself normally with real content height.
   Desktop is untouched (this block is mobile-only).
   ========================================================== */
@media (max-width: 767px) {
  .services-title {
    white-space: normal !important;
  }

  .services-deck .service-card,
  .services-deck.in-view .service-card {
    height: auto !important;
    min-height: 0 !important;
  }

  .services-deck .service-card .card-inner,
  .services-deck.in-view .service-card .card-inner {
    position: static !important;
    height: auto !important;
    /* transform intentionally left alone — the site already forces
       rotateY(180deg) here on mobile so the front face nets to 0deg
       and faces the camera. Resetting it here would flip it away. */
  }

  .services-deck .service-card .card-face-back,
  .services-deck.in-view .service-card .card-face-back {
    display: none !important;
  }

  .services-deck .service-card .card-face-front,
  .services-deck.in-view .service-card .card-face-front {
    position: static !important;
    height: auto !important;
    overflow: visible !important;
    /* transform intentionally left alone (see note above) */
  }

  /* Old inline label — replaced by the number + badge head row below */
  .card-face-front .card-tag {
    display: none !important;
  }

  .card-head-row {
    display: flex !important;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    margin-bottom: 1.4rem;
  }

  .card-number {
    font-family: var(--font-heading);
    font-size: 1.1rem;
    font-weight: 800;
    color: var(--text-primary);
    letter-spacing: 0.04em;
  }

  .card-category-badge {
    display: inline-flex;
    align-items: center;
    padding: 0.5rem 0.9rem;
    border-radius: 999px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    background: rgba(255, 255, 255, 0.03);
    color: rgba(255, 255, 255, 0.7);
    font-family: var(--font-heading);
    font-size: 0.6rem;
    font-weight: 600;
    letter-spacing: 0.1em;
    white-space: nowrap;
  }

  .card-icon-title-row {
    display: flex !important;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1rem;
  }

  .card-icon-title-row .card-icon {
    margin-bottom: 0 !important;
    flex-shrink: 0;
  }

  .card-icon-title-row .card-title {
    margin-bottom: 0 !important;
  }

  .card-divider {
    height: 1px;
    background: rgba(255, 255, 255, 0.08);
    margin: 1.3rem 0;
  }

  /* Sub-category chips: 2-column grid, matches the reference layout */
  .service-meta {
    display: grid !important;
    grid-template-columns: 1fr 1fr !important;
    gap: 0.6rem !important;
    margin-top: 0 !important;
    padding-top: 0 !important;
    border-top: none !important;
  }

  .service-meta span {
    display: flex !important;
    align-items: center;
    min-height: 42px !important;
    padding: 0.6rem 0.8rem !important;
    border: 1px solid rgba(255, 255, 255, 0.10) !important;
    border-radius: 10px !important;
    background: rgba(255, 255, 255, 0.025) !important;
    color: rgba(255, 255, 255, 0.78) !important;
    font-family: var(--font-heading) !important;
    font-size: 0.66rem !important;
    font-weight: 500 !important;
    line-height: 1.3 !important;
    letter-spacing: 0.01em !important;
    white-space: normal !important;
  }

  .service-footer {
    margin-top: 1.5rem !important;
    padding-top: 1rem !important;
    border-top: 1px solid rgba(255, 255, 255, 0.06) !important;
  }

  /* Dashed border premium look, matching the reference card */
  .services-deck .card-face,
  .services-deck .card-face-front {
    border-style: dashed !important;
    border-color: rgba(255, 255, 255, 0.14) !important;
  }
}
/* ==========================================================
   SERVICES — DESKTOP: SINGLE SOURCE OF TRUTH FOR CARD SIZE
   Replaces the two earlier "DESKTOP CARD HEIGHT FIX" /
   "DESKTOP EQUAL CONTENT SPACING" blocks (they were fighting
   each other with duplicate !important rules on the same
   properties). This is the only desktop card-sizing block now.

   Fix for the misalignment in the screenshot: cards were the
   same fixed height, but titles that wrap to 2 lines (e.g.
   "Full Stack Development") pushed the tag-grid + footer below
   it down further than on cards with a 1-line title, so the
   bottom of every card looked staggered. Making .card-face-front
   a flex column and giving .service-meta margin-top: auto pins
   the tag grid + footer to the bottom of every card no matter
   how many lines the title/description take up, so all 4 cards
   line up. Card height is also reduced (460px -> 400px) per the
   "cards should be shorter" request.

   IMPORTANT: the description is clamped to 3 lines below. Without
   a line clamp, a flex item's box can shrink (via flex-shrink)
   below its own text's rendered height once the fixed-height
   parent runs out of room — the box gets smaller but the text
   itself keeps painting at full size, so it visually overlaps
   whatever sits right after it (that's the "Wireframing &
   Prototypes" chip overlapping the description text bug). Clamping
   the description to a fixed number of lines guarantees its box
   is always exactly that tall, so nothing below it can ever be
   overlapped, and every card's description takes the same space
   regardless of how long the text is.
   ========================================================== */

@media (min-width: 768px) {

  .services-deck {
    height: 490px !important;
  }

  .services-deck .service-card,
  .services-deck.in-view .service-card {
    height: 450px !important;
    min-height: 450px !important;
  }

  .services-deck .card-inner,
  .services-deck .card-face,
  .services-deck .card-face-front,
  .services-deck .card-face-back {
    height: 100% !important;
  }

  /* Column layout so the tag grid + footer can be pinned to
     the bottom of the card. */
  .services-deck .card-face-front {
    display: flex !important;
    flex-direction: column !important;
  }

  /* Nothing above the tag grid is allowed to shrink — this is
     what was causing the overlap. */
  .services-deck .card-head-row,
  .services-deck .card-icon-title-row,
  .services-deck .card-divider {
    flex-shrink: 0 !important;
  }

  /* Clamp to 3 lines so every card's description box is exactly
     the same height, no matter how much text it has. */
  .services-deck .card-face-front .card-desc {
    min-height: 0 !important;
    flex-shrink: 0 !important;
    display: -webkit-box !important;
    -webkit-box-orient: vertical !important;
    -webkit-line-clamp: 3 !important;
    line-clamp: 3 !important;
    overflow: hidden !important;
  }

  /* Pins the tag grid to the bottom of the card, so it starts
     at the same vertical position on every card. */
  .services-deck .service-meta {
    margin-top: auto !important;
    padding-top: 1rem !important;
    flex-shrink: 0 !important;
  }

  .services-deck .service-footer {
    margin-top: 1rem !important;
  }
}
