/* ═══════════════════════════════════════════════════════════════
   Prince Qawam Portfolio — style.css
   Structure:
   1. CSS Variables (Design Tokens)
   2. Reset & Base
   3. Typography
   4. Utility Classes
   5. Navigation
   6. Hero
   7. About
   8. Skills
   9. Services
   10. Projects
   11. Why Work With Me
   12. Testimonials
   13. Contact
   14. Footer
   15. Scroll-to-Top
   16. Animations & Reveal
   17. Light Mode Overrides
   18. Responsive
═══════════════════════════════════════════════════════════════ */

/* ─────────────────────────────────────────
   1. CSS VARIABLES — Design Tokens
───────────────────────────────────────── */
:root {
  /* Core Palette */
  --bg:          #0A0F1C;
  --bg-2:        #0E1526;
  --bg-card:     #111827;
  --border:      rgba(255,255,255,0.07);
  --text:        #E8EAF0;
  --text-muted:  #6B7280;
  --text-faint:  #374151;

  /* Brand Colors */
  --primary:     #5B5FEF;
  --primary-h:   #7074FF;   /* hover */
  --accent:      #A78BFA;   /* lavender accent */
  --accent-2:    #38BDF8;   /* sky blue */

  /* Gradient */
  --gradient:    linear-gradient(135deg, var(--primary), var(--accent));
  --gradient-glow: linear-gradient(135deg, rgba(91,95,239,0.15), rgba(167,139,250,0.08));

  /* Typography */
  --font-display: 'Space Grotesk', sans-serif;
  --font-body:    'Inter', sans-serif;

  /* Spacing */
  --section-pad: 100px;
  --container:   1200px;
  --gutter:      24px;

  /* Borders & Radii */
  --radius-sm:   8px;
  --radius:      14px;
  --radius-lg:   20px;

  /* Shadows */
  --shadow:      0 4px 24px rgba(0,0,0,0.4);
  --shadow-lg:   0 12px 48px rgba(0,0,0,0.5);
  --shadow-glow: 0 0 40px rgba(91,95,239,0.25);

  /* Transitions */
  --ease:        cubic-bezier(0.16,1,0.3,1);
  --t:           0.3s;
  --t-slow:      0.6s;

  /* Nav height */
  --nav-h: 70px;
}

/* Light mode tokens — applied via [data-theme="light"] */
[data-theme="light"] {
  --bg:         #F5F7FF;
  --bg-2:       #EEF1FB;
  --bg-card:    #FFFFFF;
  --border:     rgba(0,0,0,0.08);
  --text:       #0F1320;
  --text-muted: #6B7280;
  --text-faint: #D1D5DB;
  --shadow:     0 4px 24px rgba(0,0,0,0.08);
  --shadow-lg:  0 12px 48px rgba(0,0,0,0.12);
  --gradient-glow: linear-gradient(135deg, rgba(91,95,239,0.06), rgba(167,139,250,0.04));
}

/* ─────────────────────────────────────────
   2. RESET & BASE
───────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html {
  scroll-behavior: smooth;
  scroll-padding-top: var(--nav-h);
  font-size: 16px;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: var(--font-body);
  background-color: var(--bg);
  color: var(--text);
  line-height: 1.7;
  overflow-x: hidden;
  transition: background-color 0.4s, color 0.4s;
}

img, video { max-width: 100%; display: block; }
a { text-decoration: none; color: inherit; }
ul { list-style: none; }
button { cursor: pointer; font: inherit; border: none; background: none; }
input, textarea, select { font: inherit; }

:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 3px;
  border-radius: 4px;
}

/* ─────────────────────────────────────────
   3. TYPOGRAPHY
───────────────────────────────────────── */
h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: -0.02em;
  color: var(--text);
}

h1 { font-size: clamp(2.4rem, 6vw, 4rem); }
h2 { font-size: clamp(1.8rem, 4vw, 2.6rem); }
h3 { font-size: clamp(1.1rem, 2vw, 1.3rem); }

p { color: var(--text-muted); }

.gradient-text {
  background: var(--gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.section-eyebrow {
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--primary);
  margin-bottom: 12px;
  display: block;
}

/* ─────────────────────────────────────────
   4. UTILITY
───────────────────────────────────────── */
.container {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 var(--gutter);
}

.section {
  padding: var(--section-pad) 0;
}

.section-header {
  text-align: center;
  max-width: 680px;
  margin: 0 auto 64px;
}

.section-desc {
  margin-top: 16px;
  font-size: 1.05rem;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 14px 28px;
  border-radius: var(--radius-sm);
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 0.95rem;
  transition: transform var(--t) var(--ease), box-shadow var(--t), background var(--t), border-color var(--t), color var(--t);
  white-space: nowrap;
}

.btn:hover  { transform: translateY(-2px); }
.btn:active { transform: translateY(0);    }

.btn-primary {
  background: var(--gradient);
  color: #fff;
  box-shadow: 0 4px 20px rgba(91,95,239,0.35);
}
.btn-primary:hover { box-shadow: 0 8px 32px rgba(91,95,239,0.5); }

.btn-outline {
  background: transparent;
  color: var(--text);
  border: 1.5px solid var(--border);
}
.btn-outline:hover {
  border-color: var(--primary);
  color: var(--primary);
  background: rgba(91,95,239,0.06);
}

.btn-sm { padding: 10px 20px; font-size: 0.875rem; }
.btn-full { width: 100%; justify-content: center; }

/* Social Icons */
.social-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 1.5px solid var(--border);
  color: var(--text-muted);
  font-size: 0.95rem;
  transition: all var(--t);
}
.social-icon:hover {
  border-color: var(--primary);
  color: var(--primary);
  background: rgba(91,95,239,0.08);
  transform: translateY(-2px);
}

/* ─────────────────────────────────────────
   5. NAVIGATION
───────────────────────────────────────── */
.nav-header {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  transition: background var(--t), box-shadow var(--t), backdrop-filter var(--t);
}

.nav-header.scrolled {
  background: rgba(10,15,28,0.85);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  box-shadow: 0 1px 0 var(--border);
}

[data-theme="light"] .nav-header.scrolled {
  background: rgba(245,247,255,0.88);
}

.nav-container {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 var(--gutter);
  height: var(--nav-h);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 32px;
}

.nav-logo {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.3rem;
  color: var(--text);
  letter-spacing: -0.02em;
  flex-shrink: 0;
}
.logo-bracket { color: var(--primary); }

.nav-links {
  display: flex;
  align-items: center;
  gap: 4px;
}

.nav-link {
  padding: 8px 14px;
  border-radius: var(--radius-sm);
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text-muted);
  transition: color var(--t), background var(--t);
}
.nav-link:hover, .nav-link.active {
  color: var(--text);
  background: rgba(255,255,255,0.05);
}
[data-theme="light"] .nav-link:hover {
  background: rgba(0,0,0,0.04);
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

/* Theme toggle */
.theme-toggle {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  border: 1.5px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  font-size: 0.9rem;
  transition: all var(--t);
}
.theme-toggle:hover {
  border-color: var(--primary);
  color: var(--primary);
  background: rgba(91,95,239,0.08);
}

/* Hamburger */
.hamburger {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 38px;
  height: 38px;
  padding: 8px;
  border-radius: var(--radius-sm);
  border: 1.5px solid var(--border);
}
.hamburger span {
  display: block;
  width: 100%;
  height: 2px;
  background: var(--text);
  border-radius: 2px;
  transition: transform var(--t) var(--ease), opacity var(--t);
}
.hamburger.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.hamburger.open span:nth-child(2) { opacity: 0; }
.hamburger.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* Mobile menu */
.mobile-menu {
  display: none;
  flex-direction: column;
  background: var(--bg-card);
  border-top: 1px solid var(--border);
  padding: 16px var(--gutter) 24px;
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.4s var(--ease);
}
.mobile-menu.open {
  display: flex;
  max-height: 400px;
}
.mobile-menu ul {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.mobile-menu .nav-link {
  display: block;
  padding: 12px 16px;
  font-size: 1rem;
}

/* ─────────────────────────────────────────
   6. HERO
───────────────────────────────────────── */
.hero {
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding-top: var(--nav-h);
  position: relative;
  overflow: hidden;
}

/* Subtle dot grid background */
.hero-bg-grid {
  position: absolute;
  inset: 0;
  background-image: radial-gradient(circle, rgba(255,255,255,0.04) 1px, transparent 1px);
  background-size: 36px 36px;
  pointer-events: none;
}
[data-theme="light"] .hero-bg-grid {
  background-image: radial-gradient(circle, rgba(0,0,0,0.05) 1px, transparent 1px);
}

/* Ambient orbs */
.hero-orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(80px);
  opacity: 0.25;
  pointer-events: none;
  animation: orb-drift 12s ease-in-out infinite alternate;
}
.hero-orb--1 {
  width: 600px; height: 600px;
  background: var(--primary);
  top: -200px; right: -150px;
}
.hero-orb--2 {
  width: 400px; height: 400px;
  background: var(--accent);
  bottom: -100px; left: -100px;
  animation-delay: -6s;
}

@keyframes orb-drift {
  from { transform: translate(0,0) scale(1); }
  to   { transform: translate(40px, -40px) scale(1.08); }
}

.hero-content {
  display: grid;
  grid-template-columns: 1fr 1fr;
  align-items: center;
  gap: 64px;
  padding-top: 40px;
  padding-bottom: 80px;
  position: relative;
  z-index: 1;
}

/* Eyebrow */
.hero-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.82rem;
  font-weight: 500;
  color: var(--text-muted);
  border: 1px solid var(--border);
  background: rgba(91,95,239,0.06);
  padding: 6px 14px;
  border-radius: 999px;
  margin-bottom: 28px;
}
.eyebrow-dot {
  width: 7px; height: 7px;
  background: #4ade80;
  border-radius: 50%;
  box-shadow: 0 0 8px #4ade80;
  animation: pulse-dot 2s ease-in-out infinite;
}
@keyframes pulse-dot {
  0%,100% { opacity: 1; transform: scale(1); }
  50%      { opacity: 0.6; transform: scale(0.85); }
}

.hero-heading {
  margin-bottom: 24px;
  line-height: 1.1;
}

.hero-sub {
  font-size: 1.1rem;
  max-width: 500px;
  margin-bottom: 36px;
  line-height: 1.7;
}
.hero-sub strong { color: var(--text); }

.hero-cta {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-bottom: 36px;
}

.hero-social {
  display: flex;
  gap: 10px;
}

/* Code Card */
.hero-visual {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.code-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-lg), var(--shadow-glow);
}

.code-card__bar {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 16px;
  background: rgba(255,255,255,0.03);
  border-bottom: 1px solid var(--border);
}
.dot {
  width: 11px; height: 11px;
  border-radius: 50%;
}
.dot--red    { background: #FF5F57; }
.dot--yellow { background: #FFBD2E; }
.dot--green  { background: #28CA41; }
.code-card__title {
  margin-left: 8px;
  font-size: 0.78rem;
  color: var(--text-muted);
  font-family: 'Courier New', monospace;
}

.code-card__body {
  padding: 24px 20px;
  font-family: 'Courier New', monospace;
  font-size: 0.82rem;
  line-height: 1.9;
  overflow-x: auto;
}
.code-card__body code { white-space: pre; }

/* Syntax highlight colors */
.c-kw  { color: #A78BFA; }
.c-fn  { color: #38BDF8; }
.c-str { color: #86EFAC; }
.c-op  { color: #94A3B8; }

/* Blinking cursor */
.cursor {
  display: inline-block;
  color: var(--primary);
  animation: blink 1.1s step-start infinite;
}
@keyframes blink { 0%,100% { opacity:1; } 50% { opacity:0; } }

/* Stats row */
.hero-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
}
.stat-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px 12px;
  text-align: center;
  transition: border-color var(--t), transform var(--t);
}
.stat-card:hover {
  border-color: var(--primary);
  transform: translateY(-3px);
}
.stat-number {
  display: block;
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 700;
  background: var(--gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.stat-label {
  display: block;
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-top: 2px;
}

/* Scroll indicator */
.scroll-indicator {
  position: absolute;
  bottom: 36px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  color: var(--text-muted);
  font-size: 0.7rem;
  animation: bounce 2.5s ease-in-out infinite;
  z-index: 1;
}
.scroll-indicator__line {
  width: 1px;
  height: 32px;
  background: linear-gradient(to bottom, transparent, var(--text-muted));
}
@keyframes bounce {
  0%,100% { transform: translateX(-50%) translateY(0); }
  50%      { transform: translateX(-50%) translateY(6px); }
}

/* ─────────────────────────────────────────
   7. ABOUT
───────────────────────────────────────── */
.about { background: var(--bg-2); }

.about-grid {
  display: grid;
  grid-template-columns: 1fr 1.3fr;
  align-items: center;
  gap: 72px;
}

.about-image-wrap { display: flex; justify-content: center; }

.about-image-frame {
  position: relative;
  width: 340px;
  height: 380px;
  flex-shrink: 0;
}

.about-img-placeholder {
  width: 100%;
  height: 100%;
  border-radius: var(--radius-lg);
  background: var(--gradient-glow);
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 5rem;
  color: var(--primary);
}

/* Decorative corner lines */
.about-image-frame::before,
.about-image-frame::after {
  content: '';
  position: absolute;
  border-radius: 4px;
  background: var(--primary);
}
.about-image-frame::before {
  width: 60px; height: 4px;
  top: -12px; left: -12px;
  box-shadow: 0 60px 0 4px var(--primary);
}
.about-image-frame::after {
  width: 4px; height: 60px;
  top: -12px; left: -12px;
  box-shadow: 340px 0 0 4px var(--primary);
}

.about-badge {
  position: absolute;
  bottom: -16px;
  right: -16px;
  background: var(--gradient);
  color: #fff;
  padding: 12px 20px;
  border-radius: var(--radius);
  font-weight: 700;
  font-family: var(--font-display);
  font-size: 0.9rem;
  display: flex;
  align-items: center;
  gap: 8px;
  box-shadow: var(--shadow);
}

.about-content h2 { margin-bottom: 20px; }
.about-lead {
  font-size: 1.1rem;
  color: var(--text);
  margin-bottom: 16px;
  line-height: 1.7;
}
.about-body { margin-bottom: 16px; }

.about-highlights {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin: 28px 0 32px;
}
.highlight-item {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  font-size: 0.95rem;
  color: var(--text-muted);
}
.highlight-item i { color: var(--primary); margin-top: 2px; flex-shrink: 0; }

/* ─────────────────────────────────────────
   8. SKILLS
───────────────────────────────────────── */
.skills-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 20px;
}

.skill-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  display: flex;
  align-items: flex-start;
  gap: 18px;
  transition: border-color var(--t), transform var(--t), box-shadow var(--t);
}
.skill-card:hover {
  border-color: var(--primary);
  transform: translateY(-4px);
  box-shadow: var(--shadow);
}

.skill-icon {
  width: 52px; height: 52px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  flex-shrink: 0;
}
.skill-icon--html  { background: rgba(228,77,38,0.12); color: #E44D26; }
.skill-icon--css   { background: rgba(38,100,228,0.12); color: #264DE4; }
.skill-icon--js    { background: rgba(247,223,30,0.12); color: #F7DF1E; }
.skill-icon--rwd   { background: rgba(91,95,239,0.12); color: var(--primary); }
.skill-icon--ui    { background: rgba(167,139,250,0.12); color: var(--accent); }
.skill-icon--git   { background: rgba(240,80,50,0.12); color: #F05033; }

.skill-info { flex: 1; }
.skill-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
}
.skill-name { font-weight: 600; font-family: var(--font-display); font-size: 0.95rem; }
.skill-pct  { font-size: 0.82rem; color: var(--primary); font-weight: 600; }

.skill-bar {
  height: 6px;
  background: var(--border);
  border-radius: 999px;
  overflow: hidden;
  margin-bottom: 10px;
}
.skill-bar__fill {
  height: 100%;
  background: var(--gradient);
  border-radius: 999px;
  width: 0;
  transition: width 1.2s var(--ease);
}

.skill-desc { font-size: 0.82rem; color: var(--text-muted); margin: 0; }

/* ─────────────────────────────────────────
   9. SERVICES
───────────────────────────────────────── */
.services { background: var(--bg-2); }

.services-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 20px;
}

.service-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 32px 28px;
  position: relative;
  transition: border-color var(--t), transform var(--t), box-shadow var(--t);
}
.service-card:hover {
  border-color: var(--primary);
  transform: translateY(-6px);
  box-shadow: var(--shadow-glow);
}
.service-card--featured {
  border-color: var(--primary);
  background: linear-gradient(135deg, rgba(91,95,239,0.06), rgba(167,139,250,0.03));
}

.service-badge {
  position: absolute;
  top: -12px; right: 20px;
  background: var(--gradient);
  color: #fff;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  padding: 4px 12px;
  border-radius: 999px;
}

.service-icon {
  width: 52px; height: 52px;
  background: rgba(91,95,239,0.1);
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.3rem;
  color: var(--primary);
  margin-bottom: 20px;
  transition: background var(--t), transform var(--t);
}
.service-card:hover .service-icon {
  background: rgba(91,95,239,0.2);
  transform: scale(1.08);
}

.service-card h3 { margin-bottom: 12px; }
.service-card > p { font-size: 0.9rem; margin-bottom: 20px; }

.service-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.service-list li {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 0.87rem;
  color: var(--text-muted);
}
.service-list i { color: var(--primary); font-size: 0.75rem; }

/* ─────────────────────────────────────────
   10. PROJECTS
───────────────────────────────────────── */
.projects-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 24px;
}

.project-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: border-color var(--t), transform var(--t), box-shadow var(--t);
  display: flex;
  flex-direction: column;
}
.project-card:hover {
  border-color: var(--primary);
  transform: translateY(-6px);
  box-shadow: var(--shadow-lg);
}
.project-card--featured {
  grid-column: span 1;
  border-color: rgba(91,95,239,0.3);
}

.project-image {
  position: relative;
  overflow: hidden;
  aspect-ratio: 16/9;
}

.project-img-placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 3.5rem;
  transition: transform var(--t-slow) var(--ease);
}
.project-card:hover .project-img-placeholder { transform: scale(1.05); }

.project-img--1 { background: linear-gradient(135deg, #1E2A4A, #2D3E6B); color: #5B7FBF; }
.project-img--2 { background: linear-gradient(135deg, #2A1E3E, #3D2B5E); color: #9B6EBF; }
.project-img--3 { background: linear-gradient(135deg, #1E3E2A, #2B5E3D); color: #6EBF86; }

.project-overlay {
  position: absolute;
  top: 14px; left: 14px;
}
.project-type {
  background: rgba(0,0,0,0.55);
  backdrop-filter: blur(8px);
  color: #fff;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 5px 12px;
  border-radius: 999px;
}

.project-body {
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  flex: 1;
}

.project-title { font-size: 1.05rem; margin: 0; }
.project-desc  { font-size: 0.88rem; margin: 0; }

.project-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.tag {
  background: rgba(91,95,239,0.1);
  color: var(--primary);
  border: 1px solid rgba(91,95,239,0.2);
  font-size: 0.72rem;
  font-weight: 500;
  padding: 3px 10px;
  border-radius: 999px;
}

.project-links {
  display: flex;
  gap: 10px;
  margin-top: auto;
  padding-top: 4px;
}

/* ─────────────────────────────────────────
   11. WHY WORK WITH ME
───────────────────────────────────────── */
.why { background: var(--bg-2); }

.why-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 20px;
}

.why-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px 24px;
  transition: border-color var(--t), transform var(--t), box-shadow var(--t);
}
.why-card:hover {
  border-color: var(--primary);
  transform: translateY(-4px);
  box-shadow: var(--shadow);
}

.why-icon {
  width: 48px; height: 48px;
  background: rgba(91,95,239,0.1);
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  color: var(--primary);
  margin-bottom: 16px;
  transition: background var(--t), transform var(--t);
}
.why-card:hover .why-icon {
  background: rgba(91,95,239,0.2);
  transform: scale(1.1) rotate(-3deg);
}
.why-card h3 { font-size: 1rem; margin-bottom: 10px; }
.why-card p  { font-size: 0.88rem; margin: 0; }

/* ─────────────────────────────────────────
   12. TESTIMONIALS
───────────────────────────────────────── */
.testimonials-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 20px;
}

.testimonial-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 30px 28px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  transition: border-color var(--t), transform var(--t);
}
.testimonial-card:hover {
  border-color: var(--primary);
  transform: translateY(-4px);
}

.testimonial-stars { color: #F59E0B; font-size: 0.85rem; letter-spacing: 2px; }

.testimonial-card > p {
  font-size: 0.92rem;
  line-height: 1.75;
  color: var(--text-muted);
  font-style: italic;
  margin: 0;
}
/* override default p margin for blockquote child */
blockquote p { margin: 0; }

.testimonial-author {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: auto;
}
.author-avatar {
  width: 44px; height: 44px;
  border-radius: 50%;
  background: var(--gradient);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.85rem;
  font-family: var(--font-display);
  flex-shrink: 0;
}
.testimonial-author strong { display: block; font-size: 0.9rem; font-weight: 600; }
.testimonial-author span   { display: block; font-size: 0.78rem; color: var(--text-muted); }

/* ─────────────────────────────────────────
   13. CONTACT
───────────────────────────────────────── */
.contact { background: var(--bg); }

.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1.2fr;
  gap: 72px;
  align-items: start;
}

.contact-info h2 { margin-bottom: 16px; }
.contact-lead { font-size: 1rem; margin-bottom: 36px; }

.contact-details {
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin-bottom: 32px;
}

.contact-detail {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 16px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  transition: border-color var(--t), transform var(--t);
}
.contact-detail:hover {
  border-color: var(--primary);
  transform: translateX(4px);
}
.contact-icon {
  width: 44px; height: 44px;
  background: rgba(91,95,239,0.1);
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--primary);
  flex-shrink: 0;
}
.detail-label { display: block; font-size: 0.75rem; color: var(--text-muted); }
.detail-value { display: block; font-size: 0.92rem; font-weight: 500; color: var(--text); }

.contact-social { display: flex; gap: 10px; }

/* Form */
.contact-form-wrap {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 36px 32px;
}

.contact-form {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.form-group label {
  font-size: 0.83rem;
  font-weight: 500;
  color: var(--text-muted);
  letter-spacing: 0.02em;
}

.form-group input,
.form-group select,
.form-group textarea {
  background: var(--bg);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 12px 14px;
  color: var(--text);
  font-size: 0.92rem;
  transition: border-color var(--t), box-shadow var(--t);
  resize: vertical;
  appearance: none;
}
.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(91,95,239,0.15);
}
.form-group input::placeholder,
.form-group textarea::placeholder { color: var(--text-faint); }

.form-group input.error,
.form-group textarea.error { border-color: #EF4444; }

.form-error {
  font-size: 0.78rem;
  color: #EF4444;
  min-height: 1em;
}

.form-success {
  display: flex;
  align-items: center;
  gap: 10px;
  background: rgba(74,222,128,0.08);
  border: 1px solid rgba(74,222,128,0.3);
  color: #4ade80;
  border-radius: var(--radius-sm);
  padding: 14px 16px;
  font-size: 0.9rem;
  font-weight: 500;
}
.form-success[hidden] { display: none; }

/* ─────────────────────────────────────────
   14. FOOTER
───────────────────────────────────────── */
.footer {
  background: var(--bg-card);
  border-top: 1px solid var(--border);
  padding-top: 64px;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.6fr 1fr 1fr;
  gap: 48px;
  padding-bottom: 48px;
}

.footer-brand p {
  font-size: 0.9rem;
  max-width: 300px;
  margin: 16px 0 24px;
}

.footer-social { display: flex; gap: 10px; }

.footer-links h4,
.footer-services h4 {
  font-size: 0.88rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-muted);
  margin-bottom: 16px;
}

.footer-links ul,
.footer-services ul {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.footer-links a,
.footer-services li {
  font-size: 0.9rem;
  color: var(--text-muted);
  transition: color var(--t);
}
.footer-links a:hover { color: var(--primary); }

.footer-bottom {
  border-top: 1px solid var(--border);
  padding: 20px var(--gutter);
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px;
}
.footer-bottom p { font-size: 0.82rem; margin: 0; }

/* ─────────────────────────────────────────
   15. SCROLL-TO-TOP
───────────────────────────────────────── */
.scroll-top {
  position: fixed;
  bottom: 32px;
  right: 28px;
  width: 44px; height: 44px;
  background: var(--gradient);
  color: #fff;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.9rem;
  box-shadow: var(--shadow);
  opacity: 0;
  pointer-events: none;
  transform: translateY(16px);
  transition: opacity var(--t), transform var(--t), box-shadow var(--t);
  z-index: 90;
}
.scroll-top.visible {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}
.scroll-top:hover { box-shadow: 0 8px 28px rgba(91,95,239,0.5); transform: translateY(-2px); }

/* ─────────────────────────────────────────
   16. ANIMATIONS & REVEAL
───────────────────────────────────────── */
.reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.65s var(--ease), transform 0.65s var(--ease);
}
.reveal--delay-1 { transition-delay: 0.1s; }
.reveal--delay-2 { transition-delay: 0.2s; }
.reveal--delay-3 { transition-delay: 0.3s; }
.reveal--delay-4 { transition-delay: 0.4s; }

.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

/* Respect reduced motion */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
  .reveal { opacity: 1; transform: none; }
}

/* ─────────────────────────────────────────
   17. LIGHT MODE OVERRIDES
───────────────────────────────────────── */
[data-theme="light"] .nav-header.scrolled {
  background: rgba(245,247,255,0.9);
}
[data-theme="light"] .code-card__bar {
  background: rgba(0,0,0,0.03);
}
[data-theme="light"] .c-str { color: #16A34A; }
[data-theme="light"] .c-kw  { color: #7C3AED; }
[data-theme="light"] .c-fn  { color: #0284C7; }
[data-theme="light"] .c-op  { color: #64748B; }
[data-theme="light"] .form-group input,
[data-theme="light"] .form-group select,
[data-theme="light"] .form-group textarea {
  background: #F5F7FF;
}
[data-theme="light"] .form-group input::placeholder,
[data-theme="light"] .form-group textarea::placeholder { color: #CBD5E1; }

/* ─────────────────────────────────────────
   18. RESPONSIVE
───────────────────────────────────────── */

/* Tablet — ≤ 1024px */
@media (max-width: 1024px) {
  :root { --section-pad: 80px; }

  .hero-content { gap: 40px; }
  .about-grid   { gap: 48px; }
  .contact-grid { gap: 40px; }

  .footer-grid {
    grid-template-columns: 1fr 1fr;
  }
  .footer-brand { grid-column: span 2; }
}

/* Tablet portrait — ≤ 900px */
@media (max-width: 900px) {
  .hero-content {
    grid-template-columns: 1fr;
    text-align: center;
  }
  .hero-text { order: 1; }
  .hero-visual { order: 2; max-width: 500px; margin: 0 auto; }
  .hero-eyebrow { justify-content: center; }
  .hero-cta, .hero-social { justify-content: center; }
  .hero-sub { margin-left: auto; margin-right: auto; }

  .about-grid {
    grid-template-columns: 1fr;
  }
  .about-image-wrap { display: none; } /* hide on small screens */

  .contact-grid { grid-template-columns: 1fr; }
}

/* Mobile — ≤ 768px */
@media (max-width: 768px) {
  :root { --section-pad: 64px; }

  /* Nav */
  .nav-links { display: none; }
  .hamburger { display: flex; }
  .nav-actions .btn-sm { display: none; }

  /* Hero */
  .hero-stats { grid-template-columns: repeat(3, 1fr); }

  /* Form */
  .form-row { grid-template-columns: 1fr; }

  /* Footer */
  .footer-grid {
    grid-template-columns: 1fr;
    gap: 32px;
  }
  .footer-brand { grid-column: span 1; }
  .footer-bottom {
    flex-direction: column;
    text-align: center;
  }

  .contact-form-wrap { padding: 24px 20px; }
}

/* Small mobile — ≤ 480px */
@media (max-width: 480px) {
  :root {
    --section-pad: 52px;
    --gutter: 16px;
  }
  h1 { font-size: 2rem; }
  h2 { font-size: 1.6rem; }
  .btn { padding: 12px 22px; font-size: 0.9rem; }
  .hero-stats { gap: 8px; }
  .stat-number { font-size: 1.2rem; }
  .code-card__body { font-size: 0.75rem; padding: 16px 14px; }
  .project-links { flex-wrap: wrap; }
}

.reveal {
  opacity: 1 !important;
  transform: translate(0) !important;
}