/* ==========================================================================
   SMP Tech Labs - Modern Static Design System
   100% Original, Clean, Fully Responsive CSS
   ========================================================================== */

:root {
  /* Color Palette */
  --bg-main: #0a0f1d;
  --bg-surface: #0f172a;
  --bg-card: rgba(17, 24, 39, 0.75);
  --bg-card-hover: rgba(30, 41, 59, 0.85);
  --border-subtle: rgba(255, 255, 255, 0.08);
  --border-accent: rgba(99, 102, 241, 0.3);
  --border-glow: rgba(56, 189, 248, 0.4);

  /* Primary Brand Gradients */
  --primary: #4f46e5;
  --primary-light: #6366f1;
  --accent-cyan: #06b6d4;
  --accent-sky: #38bdf8;
  --accent-purple: #8b5cf6;
  --accent-emerald: #10b981;
  
  --grad-primary: linear-gradient(135deg, #4f46e5 0%, #06b6d4 100%);
  --grad-accent: linear-gradient(135deg, #6366f1 0%, #a855f7 50%, #06b6d4 100%);
  --grad-surface: linear-gradient(180deg, rgba(30, 41, 59, 0.4) 0%, rgba(15, 23, 42, 0.6) 100%);
  --grad-glow: radial-gradient(circle, rgba(79, 70, 229, 0.15) 0%, transparent 70%);

  /* Typography */
  --font-base: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --text-main: #f8fafc;
  --text-muted: #94a3b8;
  --text-subtle: #64748b;
  --text-inverse: #0f172a;

  /* Shadows & Glass */
  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.2);
  --shadow-md: 0 10px 25px -5px rgba(0, 0, 0, 0.4), 0 8px 10px -6px rgba(0, 0, 0, 0.3);
  --shadow-glow: 0 0 35px -5px rgba(79, 70, 229, 0.3);
  --shadow-cyan: 0 0 30px -5px rgba(6, 182, 212, 0.25);

  /* Transitions */
  --transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 20px;
  --radius-full: 9999px;
}

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

html {
  scroll-behavior: smooth;
  font-size: 16px;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: var(--font-base);
  background-color: var(--bg-main);
  color: var(--text-main);
  line-height: 1.6;
  overflow-x: hidden;
  position: relative;
  min-height: 100vh;
}

/* Global Ambient Background Orbs */
.ambient-bg {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: -1;
  overflow: hidden;
}

.orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(90px);
  opacity: 0.18;
  will-change: transform;
}

.orb-1 {
  top: -100px;
  right: -50px;
  width: 500px;
  height: 500px;
  background: var(--primary);
  animation: orbDrift1 18s ease-in-out infinite alternate;
}

.orb-2 {
  top: 40%;
  left: -150px;
  width: 550px;
  height: 550px;
  background: var(--accent-cyan);
  animation: orbDrift2 22s ease-in-out infinite alternate;
}

.orb-3 {
  bottom: 5%;
  right: 10%;
  width: 450px;
  height: 450px;
  background: var(--accent-purple);
  animation: orbDrift1 26s ease-in-out infinite alternate-reverse;
}

@keyframes orbDrift1 {
  0% { transform: translate(0, 0) scale(1); }
  50% { transform: translate(-35px, 45px) scale(1.08); }
  100% { transform: translate(25px, -25px) scale(0.95); }
}

@keyframes orbDrift2 {
  0% { transform: translate(0, 0) scale(1); }
  50% { transform: translate(40px, -35px) scale(1.1); }
  100% { transform: translate(-25px, 25px) scale(0.92); }
}

/* Container */
.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

/* Typography Helpers */
h1, h2, h3, h4, h5, h6 {
  color: var(--text-main);
  font-weight: 700;
  line-height: 1.25;
}

.gradient-text {
  background: linear-gradient(135deg, #4f46e5 0%, #06b6d4 50%, #8b5cf6 100%);
  background-size: 200% auto;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  display: inline-block;
  animation: gradientShimmer 6s ease-in-out infinite alternate;
}

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

.gradient-text-alt {
  background: linear-gradient(135deg, #38bdf8 0%, #818cf8 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.section-header {
  text-align: center;
  max-width: 760px;
  margin: 0 auto 3.5rem auto;
}

.section-tag {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.35rem 1rem;
  border-radius: var(--radius-full);
  background: rgba(99, 102, 241, 0.12);
  border: 1px solid var(--border-accent);
  color: var(--accent-sky);
  font-size: 0.825rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  margin-bottom: 1rem;
}

.section-title {
  font-size: clamp(2rem, 3.5vw, 2.75rem);
  letter-spacing: -0.02em;
  margin-bottom: 1rem;
}

.section-desc {
  font-size: 1.1rem;
  color: var(--text-muted);
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
  padding: 0.85rem 1.8rem;
  border-radius: var(--radius-full);
  font-weight: 600;
  font-size: 0.95rem;
  cursor: pointer;
  text-decoration: none;
  transition: var(--transition);
  border: 0px solid transparent;
  white-space: nowrap;
}

.btn-primary {
  background: var(--grad-primary);
  color: #ffffff;
  box-shadow: 0 4px 15px rgba(79, 70, 229, 0.4);
  position: relative;
  overflow: hidden;
}

.btn-primary::after {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: linear-gradient(60deg, transparent, rgba(255, 255, 255, 0.22), transparent);
  transform: rotate(25deg) translateY(-100%);
  transition: transform 0.65s cubic-bezier(0.16, 1, 0.3, 1);
}

.btn-primary:hover::after {
  transform: rotate(25deg) translateY(100%);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(6, 182, 212, 0.45);
}

.btn-secondary {
  background: rgba(255, 255, 255, 0.05);
  border-color: var(--border-subtle);
  color: var(--text-main);
  backdrop-filter: blur(8px);
}

.btn-secondary:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: var(--border-accent);
  transform: translateY(-2px);
}

.btn-sm {
  padding: 0.55rem 1.2rem;
  font-size: 0.875rem;
}

/* Header & Navigation */
.site-header {
  position: sticky;
  top: 0;
  width: 100%;
  z-index: 100;
  background: rgba(10, 15, 29, 0.85);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border-subtle);
  transition: var(--transition);
}

.navbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 76px;
}

.brand-link {
  display: flex;
  align-items: center;
  text-decoration: none;
  line-height: 0;
}

.brand-logo {
  height: 75px;
  width: auto;
  display: block;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 2rem;
  list-style: none;
}

.nav-link {
  color: var(--text-muted);
  text-decoration: none;
  font-size: 0.95rem;
  font-weight: 500;
  transition: var(--transition);
}

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

.nav-actions {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.mobile-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.5rem;
  color: var(--text-main);
}

/* Hero Section */
.hero-section {
  padding: 5rem 0 4rem 0;
  position: relative;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  align-items: center;
  gap: 3.5rem;
}

.hero-text-col {
  animation: heroFadeIn 0.8s cubic-bezier(0.16, 1, 0.3, 1) both;
}

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

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.4rem 1rem;
  border-radius: var(--radius-full);
  background: rgba(16, 185, 129, 0.1);
  border: 1px solid rgba(16, 185, 129, 0.3);
  color: var(--accent-emerald);
  font-size: 0.85rem;
  font-weight: 600;
  margin-bottom: 1.5rem;
}

.hero-badge .pulse-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent-emerald);
  box-shadow: 0 0 10px var(--accent-emerald);
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0% { transform: scale(0.95); opacity: 0.8; }
  50% { transform: scale(1.3); opacity: 1; }
  100% { transform: scale(0.95); opacity: 0.8; }
}

.hero-title {
  font-size: clamp(2.4rem, 4.5vw, 3.6rem);
  letter-spacing: -0.03em;
  margin-bottom: 1.5rem;
  line-height: 1.15;
}

.hero-description {
  font-size: 1.18rem;
  color: var(--text-muted);
  margin-bottom: 2.2rem;
  max-width: 580px;
}

.hero-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  margin-bottom: 2.5rem;
}

.platform-badges {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  flex-wrap: wrap;
  padding-top: 1.5rem;
  border-top: 1px solid var(--border-subtle);
}

.badge-label {
  font-size: 0.85rem;
  color: var(--text-subtle);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.store-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border-subtle);
  padding: 0.4rem 0.9rem;
  border-radius: var(--radius-sm);
  font-size: 0.85rem;
  color: var(--text-muted);
}

.store-pill svg {
  width: 18px;
  height: 18px;
  fill: currentColor;
}

.hero-graphic {
  position: relative;
  display: flex;
  justify-content: center;
  animation: heroFadeIn 1s cubic-bezier(0.16, 1, 0.3, 1) 0.15s both;
}

.hero-mockup-img {
  width: 100%;
  max-width: 520px;
  height: auto;
  filter: drop-shadow(0 20px 30px rgba(0, 0, 0, 0.6));
  animation: float 6s ease-in-out infinite;
}

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

/* Stats Counter Ribbon */
.stats-section {
  padding: 2.5rem 0;
  background: rgba(15, 23, 42, 0.6);
  border-top: 1px solid var(--border-subtle);
  border-bottom: 1px solid var(--border-subtle);
  backdrop-filter: blur(10px);
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 2rem;
  text-align: center;
}

.stat-item {
  padding: 0.5rem;
}

.stat-number {
  font-size: clamp(2rem, 3vw, 2.75rem);
  font-weight: 800;
  letter-spacing: -0.02em;
  margin-bottom: 0.25rem;
}

.stat-label {
  color: var(--text-muted);
  font-size: 0.925rem;
  font-weight: 500;
}

/* Services Section */
.services-section {
  padding: 6.5rem 0;
}

.services-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 1.8rem;
}

.service-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 2.2rem;
  transition: var(--transition);
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.service-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: var(--grad-primary);
  opacity: 0;
  transition: var(--transition);
}

.service-card:hover {
  background: var(--bg-card-hover);
  border-color: var(--border-accent);
  transform: translateY(-6px);
  box-shadow: var(--shadow-glow);
}

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

.service-icon-box {
  width: 56px;
  height: 56px;
  border-radius: var(--radius-md);
  background: rgba(99, 102, 241, 0.12);
  border: 1px solid var(--border-accent);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1.5rem;
  color: var(--accent-sky);
}

.service-card h3 {
  font-size: 1.35rem;
  margin-bottom: 0.8rem;
}

.service-card p {
  color: var(--text-muted);
  font-size: 0.95rem;
  line-height: 1.6;
  margin-bottom: 1.5rem;
  flex-grow: 1;
}

.service-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.service-tag-item {
  font-size: 0.775rem;
  padding: 0.25rem 0.65rem;
  border-radius: var(--radius-full);
  background: rgba(255, 255, 255, 0.04);
  color: var(--text-subtle);
  border: 1px solid var(--border-subtle);
}

/* Portfolio / Apps Showcase */
.portfolio-section {
  padding: 6.5rem 0;
  background: rgba(11, 17, 32, 0.5);
  border-top: 1px solid var(--border-subtle);
  border-bottom: 1px solid var(--border-subtle);
}

.filter-bar {
  display: flex;
  justify-content: center;
  gap: 0.6rem;
  margin-bottom: 3rem;
  flex-wrap: wrap;
}

.filter-btn {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border-subtle);
  color: var(--text-muted);
  padding: 0.5rem 1.25rem;
  border-radius: var(--radius-full);
  font-size: 0.875rem;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
}

.filter-btn:hover, .filter-btn.active {
  background: var(--primary);
  border-color: var(--primary-light);
  color: #ffffff;
  box-shadow: 0 4px 12px rgba(79, 70, 229, 0.35);
}

.portfolio-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(340px, 1fr));
  gap: 2rem;
}

.portfolio-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: var(--transition);
  display: flex;
  flex-direction: column;
}

.portfolio-card:hover {
  transform: translateY(-6px);
  border-color: var(--border-glow);
  box-shadow: var(--shadow-cyan);
}

.card-img-wrapper {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  background: #0f172a;
}

.card-img-wrapper img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}

.portfolio-card:hover .card-img-wrapper img {
  transform: scale(1.04);
}

.app-platform-badge {
  position: absolute;
  top: 1rem;
  right: 1rem;
  background: rgba(15, 23, 42, 0.85);
  backdrop-filter: blur(8px);
  padding: 0.35rem 0.75rem;
  border-radius: var(--radius-full);
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--accent-sky);
  border: 1px solid var(--border-subtle);
}

.card-content {
  padding: 1.75rem;
  display: flex;
  flex-direction: column;
  flex-grow: 1;
}

.card-content h3 {
  font-size: 1.3rem;
  margin-bottom: 0.5rem;
}

.card-content p {
  color: var(--text-muted);
  font-size: 0.925rem;
  margin-bottom: 1.25rem;
  flex-grow: 1;
}

.card-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 1rem;
  border-top: 1px solid var(--border-subtle);
}

.card-rating,
.card-status-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  color: var(--accent-sky);
  font-weight: 600;
  font-size: 0.825rem;
  background: rgba(56, 189, 248, 0.08);
  border: 1px solid rgba(56, 189, 248, 0.2);
  padding: 0.25rem 0.65rem;
  border-radius: var(--radius-full);
}

/* Development Lifecycle / Process */
.process-section {
  padding: 6.5rem 0;
}

.process-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1.5rem;
  position: relative;
}

.process-step {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 2rem 1.5rem;
  text-align: center;
  position: relative;
  transition: var(--transition);
}

.process-step:hover {
  background: var(--bg-card-hover);
  border-color: var(--border-accent);
  transform: translateY(-4px);
}

.step-number {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--grad-primary);
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 1.1rem;
  margin: 0 auto 1.25rem auto;
  box-shadow: 0 4px 12px rgba(79, 70, 229, 0.4);
}

.process-step h4 {
  font-size: 1.15rem;
  margin-bottom: 0.6rem;
}

.process-step p {
  color: var(--text-muted);
  font-size: 0.875rem;
}

/* Technology Stack */
.tech-section {
  padding: 5rem 0;
  background: rgba(15, 23, 42, 0.4);
  border-top: 1px solid var(--border-subtle);
  border-bottom: 1px solid var(--border-subtle);
}

.tech-grid {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 1.25rem;
  max-width: 950px;
  margin: 0 auto;
}

.tech-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem 1.5rem;
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-full);
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text-main);
  transition: var(--transition);
}

.tech-pill:hover {
  border-color: var(--accent-sky);
  background: rgba(30, 41, 59, 0.9);
  transform: translateY(-2px);
  box-shadow: 0 4px 15px rgba(56, 189, 248, 0.2);
}

.tech-pill svg {
  width: 20px;
  height: 20px;
}

/* Contact / Inquiries Section */
.contact-section {
  padding: 6.5rem 0;
  position: relative;
}

.contact-box {
  background: var(--grad-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: clamp(2rem, 5vw, 4rem);
  display: grid;
  grid-template-columns: 1fr 1.2fr;
  gap: 3.5rem;
  box-shadow: var(--shadow-md);
  position: relative;
  overflow: hidden;
}

.contact-info h3 {
  font-size: 2rem;
  margin-bottom: 1rem;
}

.contact-info p {
  color: var(--text-muted);
  font-size: 1.05rem;
  margin-bottom: 2rem;
}

.contact-channel {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1.25rem;
  color: var(--text-main);
  text-decoration: none;
}

.channel-icon {
  width: 44px;
  height: 44px;
  border-radius: var(--radius-md);
  background: rgba(99, 102, 241, 0.12);
  border: 1px solid var(--border-accent);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--accent-sky);
}

.contact-form {
  display: flex;
  flex-direction: column;
  gap: 1.2rem;
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.2rem;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.form-group label {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--text-muted);
}

.form-control {
  width: 100%;
  padding: 0.85rem 1.1rem;
  background: rgba(15, 23, 42, 0.8);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  color: var(--text-main);
  font-family: inherit;
  font-size: 0.95rem;
  transition: var(--transition);
}

.form-control:focus {
  outline: none;
  border-color: var(--accent-sky);
  box-shadow: 0 0 0 3px rgba(56, 189, 248, 0.15);
  background: rgba(15, 23, 42, 0.95);
}

textarea.form-control {
  resize: vertical;
  min-height: 110px;
}

.form-feedback {
  display: none;
  padding: 1rem;
  border-radius: var(--radius-md);
  background: rgba(16, 185, 129, 0.15);
  border: 1px solid rgba(16, 185, 129, 0.4);
  color: #34d399;
  font-size: 0.925rem;
  text-align: center;
}

/* Footer */
.site-footer {
  background: #080c17;
  border-top: 1px solid var(--border-subtle);
  padding: 4.5rem 0 2rem 0;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.5fr repeat(3, 1fr);
  gap: 3rem;
  margin-bottom: 3.5rem;
}

.footer-brand p {
  color: var(--text-muted);
  font-size: 0.925rem;
  margin-top: 1rem;
  max-width: 320px;
}

.footer-col h4 {
  font-size: 1rem;
  font-weight: 700;
  margin-bottom: 1.25rem;
  color: var(--text-main);
}

.footer-links {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.footer-links a {
  color: var(--text-muted);
  text-decoration: none;
  font-size: 0.875rem;
  transition: var(--transition);
}

.footer-links a:hover {
  color: var(--accent-sky);
  padding-left: 4px;
}

.footer-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 2rem;
  border-top: 1px solid var(--border-subtle);
  color: var(--text-subtle);
  font-size: 0.85rem;
  flex-wrap: wrap;
  gap: 1rem;
}

.footer-bottom a {
  color: var(--text-muted);
  text-decoration: none;
}

.footer-bottom a:hover {
  color: var(--text-main);
}

/* Modal Popup for App Details */
.modal-overlay {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(10, 15, 29, 0.8);
  backdrop-filter: blur(8px);
  z-index: 1000;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
}

.modal-overlay.active {
  display: flex;
}

.modal-content {
  background: var(--bg-surface);
  border: 1px solid var(--border-accent);
  border-radius: var(--radius-lg);
  max-width: 600px;
  width: 100%;
  padding: 2.2rem;
  box-shadow: var(--shadow-glow);
  position: relative;
  max-height: 90vh;
  overflow-y: auto;
}

.modal-close {
  position: absolute;
  top: 1.25rem;
  right: 1.25rem;
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 1.5rem;
  cursor: pointer;
}

/* Responsive Media Queries */
@media (max-width: 992px) {
  .portfolio-spotlight {
    grid-template-columns: 1fr !important;
    gap: 2rem !important;
  }

  .hero-grid {
    grid-template-columns: 1fr;
    text-align: center;
    gap: 2.5rem;
  }
  
  .hero-description {
    margin-left: auto;
    margin-right: auto;
  }

  .hero-buttons, .platform-badges {
    justify-content: center;
  }

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

  .contact-box {
    grid-template-columns: 1fr;
    gap: 2.5rem;
  }

  .footer-grid {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 768px) {
  .nav-links {
    display: none;
    position: absolute;
    top: 76px;
    left: 0;
    width: 100%;
    background: #0a0f1d;
    flex-direction: column;
    padding: 1.5rem;
    gap: 1.25rem;
    border-bottom: 1px solid var(--border-subtle);
  }

  .nav-links.active {
    display: flex;
  }

  .mobile-toggle {
    display: block;
  }

  .nav-actions .btn {
    display: none;
  }

  .form-row {
    grid-template-columns: 1fr;
  }

  .footer-grid {
    grid-template-columns: 1fr;
  }

  .footer-bottom {
    flex-direction: column;
    text-align: center;
  }
}

/* ==========================================================================
   Page Animations & Scroll-Triggered Transitions
   ========================================================================== */

/* Fade-Up Base Reveal */
.reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.65s cubic-bezier(0.16, 1, 0.3, 1), transform 0.65s cubic-bezier(0.16, 1, 0.3, 1);
  will-change: opacity, transform;
}

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

/* Slide From Left Reveal */
.reveal-left {
  opacity: 0;
  transform: translateX(-30px);
  transition: opacity 0.65s cubic-bezier(0.16, 1, 0.3, 1), transform 0.65s cubic-bezier(0.16, 1, 0.3, 1);
  will-change: opacity, transform;
}

.reveal-left.active {
  opacity: 1;
  transform: translateX(0);
}

/* Slide From Right Reveal */
.reveal-right {
  opacity: 0;
  transform: translateX(30px);
  transition: opacity 0.65s cubic-bezier(0.16, 1, 0.3, 1), transform 0.65s cubic-bezier(0.16, 1, 0.3, 1);
  will-change: opacity, transform;
}

.reveal-right.active {
  opacity: 1;
  transform: translateX(0);
}

/* Scale & Pop In Reveal */
.reveal-scale {
  opacity: 0;
  transform: scale(0.95);
  transition: opacity 0.65s cubic-bezier(0.16, 1, 0.3, 1), transform 0.65s cubic-bezier(0.16, 1, 0.3, 1);
  will-change: opacity, transform;
}

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

/* Fast reset on exit so repeat scroll animation always re-triggers smoothly */
.reveal:not(.active),
.reveal-left:not(.active),
.reveal-right:not(.active),
.reveal-scale:not(.active) {
  transition-delay: 0s !important;
  transition-duration: 0.25s !important;
}

/* Bahi Khatabook Spotlight Ambient Glow Pulse */
.portfolio-spotlight {
  animation: spotlightGlow 5s ease-in-out infinite alternate;
}

@keyframes spotlightGlow {
  0% {
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4), 0 0 15px rgba(37, 99, 235, 0.15);
    border-color: rgba(37, 99, 235, 0.35);
  }
  100% {
    box-shadow: 0 14px 40px rgba(0, 0, 0, 0.5), 0 0 30px rgba(37, 99, 235, 0.35);
    border-color: rgba(56, 189, 248, 0.5);
  }
}

/* Stagger Delay Classes */
.delay-1 { transition-delay: 0.1s; }
.delay-2 { transition-delay: 0.2s; }
.delay-3 { transition-delay: 0.3s; }
.delay-4 { transition-delay: 0.4s; }
.delay-5 { transition-delay: 0.5s; }
.delay-6 { transition-delay: 0.6s; }

/* Sticky Navbar Scrolled Shadow */
.site-header.scrolled {
  background: rgba(10, 15, 29, 0.95);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.4);
  border-bottom-color: rgba(99, 102, 241, 0.25);
}

/* Floating Back To Top Button */
.back-to-top {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  width: 46px;
  height: 46px;
  border-radius: 50%;
  background: rgba(15, 23, 42, 0.85);
  border: 1px solid var(--border-accent);
  color: var(--accent-sky);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 99;
  opacity: 0;
  visibility: hidden;
  transform: translateY(20px);
  transition: var(--transition);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.35);
}

.back-to-top.visible {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.back-to-top:hover {
  background: var(--primary);
  color: #ffffff;
  border-color: var(--primary-light);
  transform: translateY(-4px);
  box-shadow: 0 6px 20px rgba(79, 70, 229, 0.45);
}

/* Card Glow Pulse */
.service-card {
  transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1), border-color 0.35s ease, box-shadow 0.35s ease, background-color 0.35s ease;
}

.service-card:hover .service-icon-box {
  transform: scale(1.08) rotate(3deg);
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.tech-pill {
  transition: transform 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease;
}

.tech-pill:hover {
  transform: translateY(-3px) scale(1.03);
}

/* Respect User Reduced Motion Preferences */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
  .reveal, .reveal-left, .reveal-right, .reveal-scale {
    opacity: 1 !important;
    transform: none !important;
  }
}

