/* =====================================================
   inbo portfolio — style.css (v4 — full mobile fix)
   ===================================================== */

/* --- Tokens --- */
:root {
  --bg:          #09090b;
  --bg-alt:      #0e0e11;
  --surface:     #131316;
  --surface-2:   #1a1a1f;
  --border:      #222228;
  --border-hi:   #333340;
  --accent:      #c8f135;
  --accent-dim:  rgba(200, 241, 53, 0.10);
  --accent-glow: rgba(200, 241, 53, 0.18);
  --text:        #eeeef0;
  --text-muted:  #6b6b7a;
  --text-sub:    #9999aa;
  --font-display:'Syne', sans-serif;
  --font-mono:   'Fira Code', monospace;
  --radius:      10px;
  --radius-lg:   16px;
  --ease:        cubic-bezier(0.4, 0, 0.2, 1);
  --ease-spring: cubic-bezier(0.34, 1.56, 0.64, 1);
  --container:   1120px;
  --section-pad: 112px;
  --nav-h:       60px;
}

/* --- Reset --- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-mono);
  font-size: 15px;
  line-height: 1.7;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  /* Prevent any horizontal scroll on mobile */
  width: 100%;
  max-width: 100vw;
}
a { color: inherit; text-decoration: none; }
ul { list-style: none; }
h1, h2, h3, h4 { font-family: var(--font-display); line-height: 1.15; }
img, video { max-width: 100%; display: block; }
button { cursor: pointer; font-family: inherit; }

/* --- Utilities --- */
.accent { color: var(--accent); }
.container {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 20px;
  width: 100%;
}
.section  { padding: var(--section-pad) 0; }
.section-alt { background: var(--bg-alt); }

/* =====================================================
   NAVBAR
   ===================================================== */
.navbar {
  position: fixed; top: 0; left: 0; right: 0; z-index: 200;
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 20px; height: var(--nav-h);
  background: rgba(9, 9, 11, 0.92);
  backdrop-filter: blur(16px) saturate(1.4);
  border-bottom: 1px solid transparent;
  transition: border-color 0.3s var(--ease), background 0.3s var(--ease);
  /* Never let navbar overflow */
  width: 100%;
  max-width: 100vw;
}
.navbar.scrolled { border-color: var(--border); }

.nav-logo {
  font-family: var(--font-display);
  font-size: 19px;
  font-weight: 800;
  letter-spacing: -0.5px;
  flex-shrink: 0;
  z-index: 2;
}
.nav-logo-dot { color: var(--accent); }

/* Desktop nav links — hidden on mobile by default */
.nav-links {
  display: flex; align-items: center; gap: 28px;
}
.nav-links a {
  font-size: 13px;
  color: var(--text-muted);
  letter-spacing: 0.3px;
  transition: color 0.2s;
  position: relative;
  white-space: nowrap;
}
.nav-links a::after {
  content: '';
  position: absolute; bottom: -3px; left: 0;
  width: 0; height: 1px;
  background: var(--accent);
  transition: width 0.25s var(--ease);
}
.nav-links a:hover { color: var(--text); }
.nav-links a:hover::after { width: 100%; }

.nav-cta {
  padding: 7px 16px !important;
  border: 1px solid var(--border-hi) !important;
  border-radius: 6px !important;
  color: var(--text) !important;
  font-size: 12px !important;
  transition: border-color 0.2s, color 0.2s, background 0.2s !important;
  white-space: nowrap;
}
.nav-cta:hover {
  border-color: var(--accent) !important;
  color: var(--accent) !important;
  background: var(--accent-dim) !important;
}
.nav-cta::after { display: none !important; }

/* Hamburger — shown only on mobile */
.menu-toggle {
  display: none;
  background: none; border: none;
  color: var(--text); padding: 6px;
  flex-shrink: 0;
  z-index: 2;
}

/* =====================================================
   HERO
   ===================================================== */
.hero {
  min-height: 100svh; /* svh = safer on mobile browsers */
  min-height: 100vh;
  display: flex; align-items: center; justify-content: center;
  text-align: center;
  position: relative; overflow: hidden;
  padding-top: var(--nav-h);
  padding-bottom: 32px;
}

.hero-bg {
  position: absolute; inset: 0; pointer-events: none;
  background-image:
    radial-gradient(circle at 50% 40%, rgba(200, 241, 53, 0.05) 0%, transparent 65%),
    radial-gradient(var(--border) 1px, transparent 1px);
  background-size: 100% 100%, 36px 36px;
}

.hero-scanline {
  position: absolute; left: 0; right: 0; height: 1px;
  background: linear-gradient(90deg, transparent, var(--accent), transparent);
  opacity: 0;
  animation: scanline 2.4s var(--ease) 0.6s forwards;
  pointer-events: none; z-index: 1;
}
@keyframes scanline {
  0%   { top: 0%;   opacity: 0; }
  10%  { opacity: 0.6; }
  90%  { opacity: 0.6; }
  100% { top: 100%; opacity: 0; }
}

.hero-content {
  position: relative; z-index: 2;
  opacity: 0; transform: translateY(20px);
  transition: opacity 0.7s var(--ease), transform 0.7s var(--ease);
  width: 100%;
  padding: 0 4px;
}
.hero-content.visible { opacity: 1; transform: translateY(0); }

.hero-eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: 10px; letter-spacing: 2px; text-transform: uppercase;
  color: var(--accent);
  padding: 6px 13px;
  border: 1px solid var(--accent-dim);
  border-radius: 100px;
  margin-bottom: 24px;
  max-width: 100%;
}
.hero-eyebrow-dot {
  width: 6px; height: 6px; border-radius: 50%; flex-shrink: 0;
  background: var(--accent);
  animation: pulse-dot 2s ease infinite;
}
@keyframes pulse-dot {
  0%, 100% { opacity: 1; transform: scale(1); }
  50%       { opacity: 0.4; transform: scale(0.7); }
}

/* =====================================================
   TYPEWRITER — zero layout shift, works on all sizes
   
   Strategy: the title is a fixed-height block.
   On desktop we use a ghost span (invisible longest phrase)
   to reserve the exact height. On mobile we use a fixed
   min-height calculated for the font size so it never
   causes reflow.
   ===================================================== */
.hero-title {
  font-weight: 800;
  letter-spacing: -2px;
  line-height: 1.05;
  margin-bottom: 20px;
  /* fluid size: never bigger than viewport can handle */
  font-size: clamp(40px, 10.5vw, 92px);
  /* Grid trick: stack ghost + live in same cell */
  display: grid;
  grid-template-areas: "slot";
  justify-items: center;
}

/* Ghost: invisible, holds the height of the longest phrase */
.hero-title-ghost {
  grid-area: slot;
  visibility: hidden;
  user-select: none;
  pointer-events: none;
  /* On desktop keep single line; on mobile allow wrap */
  white-space: nowrap;
}

/* Live: sits on top of ghost */
.hero-title-live {
  grid-area: slot;
  white-space: nowrap;
}

.hero-sub {
  font-size: clamp(13px, 3.2vw, 16px);
  color: var(--text-sub);
  max-width: 400px;
  margin: 0 auto 36px;
  line-height: 1.75;
  padding: 0 8px;
}

.hero-actions {
  display: flex; gap: 10px; justify-content: center; flex-wrap: wrap;
  padding: 0 8px;
}

.blink { animation: blink 1s step-end infinite; }
@keyframes blink { 0%, 100% { opacity: 1; } 50% { opacity: 0; } }

/* =====================================================
   HERO STATS — 2×2 grid on mobile instead of cramped row
   ===================================================== */
.hero-stats {
  display: flex; align-items: stretch;
  margin-top: 44px;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--surface);
  overflow: hidden;
  max-width: 520px;
  margin-left: auto; margin-right: auto;
  width: 100%;
}
.hero-stat {
  flex: 1; padding: 16px 10px;
  display: flex; flex-direction: column; align-items: center;
  justify-content: center; gap: 4px;
  min-width: 0; /* prevent overflow */
}
.hero-stat-divider {
  width: 1px;
  background: var(--border);
  flex-shrink: 0;
  align-self: stretch;
}
.hero-stat-num {
  font-family: var(--font-display);
  font-size: clamp(14px, 4vw, 20px);
  font-weight: 800;
  color: var(--text); line-height: 1;
  white-space: nowrap;
}
.hero-stat-num .accent { font-size: 0.7em; }
.hero-stat-label {
  font-size: clamp(8px, 2vw, 10px);
  letter-spacing: 0.3px;
  color: var(--text-muted); text-align: center;
  text-transform: uppercase;
  white-space: nowrap;
  line-height: 1.3;
}

/* =====================================================
   BUTTONS
   ===================================================== */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 13px 28px;
  border-radius: 8px;
  font-family: var(--font-mono);
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.3px;
  border: none;
  transition: all 0.22s var(--ease);
  white-space: nowrap;
}
.btn-primary {
  background: var(--accent);
  color: #0a0a0c;
  font-weight: 700;
}
.btn-primary:hover {
  background: #d9ff4f;
  transform: translateY(-2px);
  box-shadow: 0 8px 28px rgba(200, 241, 53, 0.28);
}
.btn-outline {
  background: transparent;
  border: 1px solid var(--border-hi);
  color: var(--text-sub);
}
.btn-outline:hover {
  color: var(--text);
  background: var(--surface);
  transform: translateY(-2px);
}

/* =====================================================
   SECTION HEADER
   ===================================================== */
.section-header {
  display: flex; align-items: baseline; gap: 12px;
  margin-bottom: 44px; flex-wrap: wrap;
}
.section-header.center {
  justify-content: center; text-align: center;
  flex-direction: column; align-items: center;
}
.section-header h2 {
  font-size: clamp(24px, 5vw, 38px);
  font-weight: 800;
  letter-spacing: -1px;
}
.section-tag {
  font-family: var(--font-mono);
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 2px;
  color: var(--accent);
  padding: 3px 9px;
  border: 1px solid var(--accent-dim);
  border-radius: 4px;
  flex-shrink: 0;
  white-space: nowrap;
}

/* =====================================================
   ABOUT
   ===================================================== */
.about-body { display: flex; align-items: flex-start; gap: 40px; }
.avatar {
  flex-shrink: 0; width: 80px; height: 80px;
  border-radius: 50%;
  background: var(--accent-dim);
  border: 1.5px solid var(--accent);
  display: flex; align-items: center; justify-content: center;
  font-family: var(--font-display);
  font-size: 22px; font-weight: 800;
  color: var(--accent);
}
.about-text p {
  color: var(--text-sub);
  font-size: 14px;
  line-height: 1.9;
}
.about-text strong { color: var(--text); font-weight: 500; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 20px; }
.chip {
  font-size: 11px;
  padding: 5px 12px;
  border-radius: 100px;
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--text-sub);
  white-space: nowrap;
}

/* =====================================================
   PROJECTS GRID
   ===================================================== */
.projects-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
}
.card-featured { grid-column: span 2; }

.card {
  display: flex; flex-direction: column;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  position: relative;
  transition: transform 0.3s var(--ease), border-color 0.3s, box-shadow 0.3s;
  text-decoration: none;
  color: inherit;
  min-width: 0;
}
.card::after {
  content: '';
  position: absolute; top: 0; left: 0; right: 0; height: 1px;
  background: linear-gradient(90deg, transparent, var(--accent), transparent);
  opacity: 0;
  transition: opacity 0.35s;
}
.card:hover {
  transform: translateY(-4px);
  border-color: var(--border-hi);
  box-shadow: 0 16px 40px rgba(0,0,0,0.5), 0 0 0 1px rgba(200,241,53,0.06);
}
.card:hover::after { opacity: 1; }

.card-video {
  width: 100%; aspect-ratio: 16 / 9;
  background: #000; overflow: hidden;
  position: relative;
}
.card-video video {
  width: 100%; height: 100%;
  object-fit: cover;
  transition: transform 0.5s var(--ease);
}
.card:hover .card-video video { transform: scale(1.03); }
.card-video::before {
  content: '▶';
  position: absolute; inset: 0;
  display: flex; align-items: center; justify-content: center;
  font-size: 20px;
  color: rgba(255,255,255,0.8);
  background: rgba(0,0,0,0.35);
  opacity: 0;
  transition: opacity 0.25s;
  z-index: 2;
}
.card:hover .card-video::before { opacity: 1; }

.card-body {
  padding: 16px 18px;
  flex: 1; display: flex; flex-direction: column;
}
.card-header {
  display: flex; justify-content: space-between; align-items: center;
  margin-bottom: 8px;
  gap: 8px;
}
.card-icon { font-size: 18px; flex-shrink: 0; }
.card-tag {
  font-size: 9px;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--accent);
  padding: 3px 8px;
  border: 1px solid var(--accent-dim);
  border-radius: 4px;
  white-space: nowrap;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
}
.card-title {
  font-size: 14px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 6px;
  line-height: 1.3;
}
.card-desc {
  font-size: 12px;
  color: var(--text-muted);
  line-height: 1.7;
  flex: 1;
  margin-bottom: 14px;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.card-featured .card-desc { -webkit-line-clamp: 4; }
.card-footer {
  display: flex; align-items: center; justify-content: flex-end;
  margin-top: auto; padding-top: 10px;
  border-top: 1px solid var(--border);
}
.card-watch {
  font-size: 10px;
  color: var(--text-muted);
  letter-spacing: 0.5px;
  transition: color 0.2s;
}
.card:hover .card-watch { color: var(--accent); }

/* =====================================================
   SKILLS
   ===================================================== */
.skills-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.skill-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 22px 18px;
  text-align: left;
  transition: border-color 0.3s, transform 0.3s var(--ease);
  display: flex; flex-direction: column;
  min-width: 0;
}
.skill-card:hover { border-color: var(--border-hi); transform: translateY(-3px); }
.skill-icon { font-size: 24px; margin-bottom: 8px; }
.skill-name {
  font-family: var(--font-display);
  font-size: 14px; font-weight: 700;
  margin-bottom: 6px;
}
.skill-desc {
  font-size: 12px; color: var(--text-muted);
  line-height: 1.6; margin-bottom: 14px;
  flex: 1;
}
.skill-bar {
  height: 2px; background: var(--border);
  border-radius: 100px; overflow: hidden;
}
.skill-fill {
  height: 100%; width: 0;
  background: linear-gradient(90deg, var(--accent), #a8e020);
  border-radius: 100px;
  transition: width 1.4s var(--ease);
}
.skill-pct {
  display: block; font-size: 10px;
  color: var(--text-muted); margin-top: 6px;
  letter-spacing: 0.5px;
}

/* =====================================================
   PRICING
   ===================================================== */
.pricing-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
  margin-bottom: 24px;
}
.pricing-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 24px 20px;
  display: flex; flex-direction: column;
  position: relative;
  transition: border-color 0.3s, transform 0.3s var(--ease);
  min-width: 0;
}
.pricing-card:hover { border-color: var(--border-hi); transform: translateY(-3px); }
.pricing-card-featured { border-color: rgba(200, 241, 53, 0.35); }
.pricing-card-featured:hover { border-color: var(--accent); }
.pricing-badge {
  position: absolute; top: -11px; left: 50%; transform: translateX(-50%);
  background: var(--accent); color: #0a0a0c;
  font-size: 9px; font-weight: 700;
  padding: 3px 11px; border-radius: 100px;
  text-transform: uppercase; letter-spacing: 1px;
  white-space: nowrap;
}
.pricing-tier {
  font-size: 10px; text-transform: uppercase;
  letter-spacing: 2px; color: var(--text-muted);
  margin-bottom: 8px;
}
.pricing-price {
  font-family: var(--font-display);
  font-size: 26px; font-weight: 800;
  margin-bottom: 10px; line-height: 1;
}
.pricing-desc {
  font-size: 13px; color: var(--text-muted);
  line-height: 1.6; margin-bottom: 16px;
}
.pricing-list {
  list-style: none; margin-bottom: 16px; flex: 1;
}
.pricing-list li {
  font-size: 12px; color: var(--text-sub);
  padding: 5px 0;
  border-bottom: 1px solid var(--border);
  display: flex; align-items: center; gap: 7px;
}
.pricing-list li::before {
  content: '✓';
  color: var(--accent); font-size: 11px; flex-shrink: 0;
}
.pricing-note {
  font-size: 10px; color: var(--text-muted);
  border-top: 1px solid var(--border);
  padding-top: 10px; margin-top: auto;
}
.pricing-footer {
  text-align: center; font-size: 13px;
  color: var(--text-muted); max-width: 560px;
  margin: 0 auto; line-height: 1.75;
}
.pricing-footer strong { color: var(--text); font-weight: 500; }

/* =====================================================
   TESTIMONIALS
   ===================================================== */
.testimonials-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
  margin-bottom: 20px;
}
.testimonial-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 22px;
  display: flex; flex-direction: column; gap: 12px;
  transition: border-color 0.3s, transform 0.3s var(--ease);
  position: relative; overflow: hidden;
  min-width: 0;
}
.testimonial-card::before {
  content: '"';
  position: absolute; top: -10px; right: 16px;
  font-size: 86px; font-family: var(--font-display); font-weight: 800;
  color: var(--accent); opacity: 0.07; line-height: 1;
  pointer-events: none;
}
.testimonial-card:hover { border-color: var(--border-hi); transform: translateY(-3px); }
.testimonial-stars { color: var(--accent); font-size: 13px; letter-spacing: 3px; }
.testimonial-text {
  font-size: 13px; color: var(--text-sub);
  line-height: 1.75; flex: 1;
}
.testimonial-author {
  display: flex; flex-direction: column; gap: 3px;
  padding-top: 12px; border-top: 1px solid var(--border);
}
.testimonial-name {
  font-size: 13px; font-weight: 600; color: var(--text);
  font-family: var(--font-mono);
}
.testimonial-detail {
  font-size: 11px; color: var(--text-muted);
}

/* =====================================================
   CONTACT
   ===================================================== */
.contact-container { text-align: center; max-width: 560px; margin: 0 auto; }
.contact-sub {
  color: var(--text-sub); font-size: 14px;
  margin-bottom: 32px; line-height: 1.8;
}
.contact-info {
  display: flex; justify-content: center;
  gap: 12px; margin-bottom: 32px; flex-wrap: wrap;
}
.contact-item {
  display: flex; align-items: center; gap: 8px;
  font-size: 13px; color: var(--text-sub);
  background: var(--surface);
  border: 1px solid var(--border);
  padding: 10px 16px;
  border-radius: 8px;
  transition: border-color 0.2s, color 0.2s;
  white-space: nowrap;
}
.contact-item:hover { border-color: var(--border-hi); color: var(--text); }
.contact-avail {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: 12px; color: #4ade80;
  margin-bottom: 18px;
}
.contact-avail-dot {
  width: 7px; height: 7px; border-radius: 50%; flex-shrink: 0;
  background: #4ade80;
  animation: pulse-dot 2s ease infinite;
}
.contact-process {
  display: flex; align-items: center; justify-content: center;
  gap: 10px; flex-wrap: wrap;
  margin-bottom: 28px;
}
.contact-step {
  display: flex; align-items: center; gap: 8px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 10px 14px;
}
.contact-step-num {
  font-size: 10px; font-weight: 700;
  color: var(--accent); letter-spacing: 1px; flex-shrink: 0;
}
.contact-step-text {
  font-size: 12px; color: var(--text-sub);
}
.contact-step-arrow {
  color: var(--text-muted); font-size: 14px; flex-shrink: 0;
}

/* =====================================================
   REVIEW FORM
   ===================================================== */
.review-form-wrap {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 28px 28px 24px;
  max-width: 720px;
}
.review-form-header { margin-bottom: 6px; }
.review-form-sub {
  font-size: 13px; color: var(--text-sub);
  margin-bottom: 20px; line-height: 1.6;
}
.review-form-grid {
  display: grid; grid-template-columns: 1fr 1fr; gap: 14px;
}
@media (max-width: 560px) { .review-form-grid { grid-template-columns: 1fr; } }

.review-label {
  display: block; font-size: 10px; text-transform: uppercase;
  letter-spacing: 1.5px; color: var(--text-muted);
  margin-bottom: 7px; font-family: var(--font-mono);
}
.review-input {
  width: 100%; background: var(--bg);
  border: 1px solid var(--border); border-radius: 8px;
  padding: 10px 13px; color: var(--text);
  font-family: var(--font-mono); font-size: 13px;
  transition: border-color 0.2s;
  outline: none;
}
.review-input:focus { border-color: var(--accent); }
.review-input::placeholder { color: var(--text-muted); }
.review-textarea { resize: vertical; min-height: 90px; }

.star-picker { display: flex; gap: 6px; }
.star {
  font-size: 22px; color: var(--border-hi);
  cursor: pointer; transition: color 0.15s, transform 0.15s;
  line-height: 1; user-select: none;
}
.star.lit  { color: var(--accent); }
.star:hover { transform: scale(1.15); }

.review-char-count {
  font-size: 11px; color: var(--text-muted);
  display: block; text-align: right; margin-top: 5px;
}
.review-error {
  background: rgba(239,68,68,.12); border: 1px solid rgba(239,68,68,.35);
  color: #f87171; font-size: 12px; border-radius: 7px;
  padding: 9px 13px; margin-top: 12px;
}
.review-success {
  background: rgba(74,222,128,.1); border: 1px solid rgba(74,222,128,.3);
  color: #4ade80; font-size: 12px; border-radius: 7px;
  padding: 9px 13px; margin-top: 12px;
}
.review-submit { width: auto; padding: 12px 32px; }
.review-submit:disabled { opacity: 0.55; cursor: not-allowed; }

.review-loading {
  grid-column: 1 / -1; text-align: center;
  color: var(--text-muted); font-size: 13px; padding: 20px 0;
}
.review-empty {
  grid-column: 1 / -1; text-align: center;
  color: var(--text-muted); font-size: 13px; padding: 20px 0;
}
.review-new { animation: reviewIn 0.4s var(--ease) both; }
@keyframes reviewIn {
  from { opacity: 0; transform: translateY(12px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* =====================================================
   FOOTER
   ===================================================== */
.footer {
  text-align: center;
  padding: 28px 20px;
  font-size: 12px;
  color: var(--text-muted);
  border-top: 1px solid var(--border);
}

/* =====================================================
   FADE-IN
   ===================================================== */
.fade-in {
  opacity: 0; transform: translateY(20px);
  transition: opacity 0.6s var(--ease), transform 0.6s var(--ease);
}
.fade-in.visible { opacity: 1; transform: translateY(0); }
.projects-grid .card:nth-child(1) { transition-delay: 0.04s; }
.projects-grid .card:nth-child(2) { transition-delay: 0.10s; }
.projects-grid .card:nth-child(3) { transition-delay: 0.16s; }
.projects-grid .card:nth-child(4) { transition-delay: 0.22s; }
.projects-grid .card:nth-child(5) { transition-delay: 0.28s; }
.projects-grid .card:nth-child(6) { transition-delay: 0.34s; }
.projects-grid .card:nth-child(7) { transition-delay: 0.40s; }
.projects-grid .card:nth-child(8) { transition-delay: 0.46s; }
.projects-grid .card:nth-child(9) { transition-delay: 0.52s; }
.projects-grid .card:nth-child(10) { transition-delay: 0.58s; }
.skills-grid .skill-card:nth-child(1) { transition-delay: 0.05s; }
.skills-grid .skill-card:nth-child(2) { transition-delay: 0.11s; }
.skills-grid .skill-card:nth-child(3) { transition-delay: 0.17s; }
.skills-grid .skill-card:nth-child(4) { transition-delay: 0.23s; }
.skills-grid .skill-card:nth-child(5) { transition-delay: 0.29s; }
.skills-grid .skill-card:nth-child(6) { transition-delay: 0.35s; }

/* =====================================================
   PROJECT DETAIL PAGE
   ===================================================== */
.project-back-nav {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 13px; color: var(--text-muted);
  transition: color 0.2s;
  margin-bottom: 28px;
}
.project-back-nav:hover { color: var(--accent); }
.project-page-header { padding-top: calc(var(--nav-h) + 32px); padding-bottom: 0; }
.project-eyebrow {
  font-size: 10px; text-transform: uppercase; letter-spacing: 2px;
  color: var(--accent); margin-bottom: 12px; display: block;
}
.project-title {
  font-size: clamp(26px, 6vw, 52px);
  font-weight: 800; letter-spacing: -1.5px;
  margin-bottom: 16px; line-height: 1.1;
}
.project-meta { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 28px; }
.project-video-wrap {
  width: 100%; aspect-ratio: 16 / 9;
  background: #000;
  border-radius: var(--radius-lg);
  overflow: hidden;
  border: 1px solid var(--border);
  box-shadow: 0 20px 50px rgba(0,0,0,0.5);
  margin-bottom: 14px;
}
.project-video-wrap video { width: 100%; height: 100%; object-fit: cover; }
.video-gallery {
  display: flex; gap: 10px;
  overflow-x: auto; padding-bottom: 6px;
  scrollbar-width: thin;
  scrollbar-color: var(--accent-dim) var(--surface);
  margin-bottom: 40px;
}
.video-gallery::-webkit-scrollbar { height: 4px; }
.video-gallery::-webkit-scrollbar-track { background: transparent; }
.video-gallery::-webkit-scrollbar-thumb { background: var(--border-hi); border-radius: 10px; }
.video-thumb {
  flex: 0 0 140px; aspect-ratio: 16 / 9;
  background: #000; border-radius: 8px; overflow: hidden;
  cursor: pointer; border: 1.5px solid var(--border);
  transition: border-color 0.2s, transform 0.2s; position: relative;
}
.video-thumb:hover { border-color: var(--border-hi); transform: translateY(-2px); }
.video-thumb.active { border-color: var(--accent); }
.video-thumb video { width: 100%; height: 100%; object-fit: cover; pointer-events: none; }
.video-thumb span {
  position: absolute; bottom: 4px; left: 6px; font-size: 9px;
  background: rgba(0,0,0,0.8); padding: 2px 6px; border-radius: 3px;
  color: var(--text-sub); font-weight: 600;
}
.project-body { display: grid; grid-template-columns: 1fr 260px; gap: 36px; padding-bottom: 72px; }
.project-desc-text {
  font-size: 14px; color: var(--text-sub); line-height: 1.9; white-space: pre-line;
}
.project-desc-text strong { color: var(--text); font-weight: 600; }
.project-desc-text h3 {
  font-family: var(--font-display); font-size: 16px; font-weight: 700;
  color: var(--text); margin: 24px 0 8px;
}
.project-sidebar { position: sticky; top: 80px; align-self: start; }
.sidebar-card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius-lg); padding: 18px;
}
.sidebar-card h4 {
  font-size: 10px; text-transform: uppercase; letter-spacing: 2px;
  color: var(--text-muted); margin-bottom: 12px;
}
.sidebar-tag-list { display: flex; flex-wrap: wrap; gap: 6px; }
.sidebar-tag-list .chip { font-size: 11px; padding: 4px 10px; }
.sidebar-cta {
  margin-top: 14px; display: block; text-align: center; width: 100%;
  padding: 11px 16px; background: var(--accent); color: #0a0a0c;
  font-weight: 700; font-family: var(--font-mono); font-size: 12px;
  border-radius: 8px; transition: background 0.2s, transform 0.2s, box-shadow 0.2s;
}
.sidebar-cta:hover {
  background: #d9ff4f; transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(200,241,53,0.25);
}

/* =====================================================
   RESPONSIVE — TABLET (≤1024px)
   ===================================================== */
@media (max-width: 1024px) {
  .navbar { padding: 0 24px; }
  .projects-grid { grid-template-columns: repeat(2, 1fr); }
  .card-featured { grid-column: span 2; }
  .skills-grid { grid-template-columns: repeat(2, 1fr); }
  .testimonials-grid { grid-template-columns: repeat(2, 1fr); }
  .pricing-grid { grid-template-columns: repeat(2, 1fr); }
  .pricing-card-featured { grid-column: span 2; }
  .project-body { grid-template-columns: 1fr; }
  .project-sidebar { position: static; }
}

/* =====================================================
   RESPONSIVE — MOBILE (≤640px)
   ===================================================== */
@media (max-width: 640px) {
  :root {
    --section-pad: 64px;
    --nav-h: 56px;
  }

  /* Container padding tighter on small screens */
  .container { padding: 0 16px; }

  /* ---- NAVBAR ---- */
  .navbar { padding: 0 16px; }
  .nav-links {
    /* Hidden by default, revealed by JS toggle */
    display: none;
    position: absolute; top: 100%; left: 0; right: 0;
    background: rgba(9,9,11,0.98);
    border-bottom: 1px solid var(--border);
    flex-direction: column; align-items: flex-start;
    padding: 16px 20px; gap: 0;
  }
  .nav-links.open { display: flex; }
  .nav-links a {
    width: 100%; padding: 12px 0;
    font-size: 15px; color: var(--text-sub);
    border-bottom: 1px solid var(--border);
  }
  .nav-links a:last-child { border-bottom: none; }
  .nav-links a::after { display: none; }
  /* Show "Hire me" inline in mobile menu as regular link */
  .nav-cta {
    border: none !important; padding: 12px 0 !important;
    font-size: 15px !important; color: var(--accent) !important;
    background: none !important; border-radius: 0 !important;
    width: 100%; display: block !important;
    border-bottom: 1px solid var(--border) !important;
  }
  .menu-toggle { display: flex; align-items: center; }

  /* ---- HERO ---- */
  .hero { padding-bottom: 40px; }
  .hero-eyebrow {
    font-size: 9px; letter-spacing: 1.5px; padding: 5px 11px;
    /* Prevent it from overflowing narrow screens */
    max-width: calc(100vw - 32px);
  }

  /* Typewriter: on very small screens, drop the ghost trick.
     Instead give the title a fixed min-height of 2 lines so it
     never jumps. The font is ~42px, line-height 1.05 = ~44px/line */
  .hero-title {
    font-size: clamp(34px, 11vw, 52px);
    letter-spacing: -1.5px;
    display: block; /* back to normal flow on mobile */
    min-height: calc(clamp(34px, 11vw, 52px) * 1.05 * 2 + 4px);
  }
  .hero-title-ghost { display: none; }
  .hero-title-live { white-space: normal; display: block; }

  .hero-sub {
    font-size: 13px;
    padding: 0 4px;
    margin-bottom: 28px;
  }

  /* Full-width buttons on mobile */
  .hero-actions { flex-direction: column; gap: 10px; padding: 0; }
  .hero-actions .btn {
    width: 100%; padding: 14px 20px; font-size: 14px;
  }

  /* ---- HERO STATS: 2×2 grid ---- */
  .hero-stats {
    display: grid;
    grid-template-columns: 1fr 1fr;
    margin-top: 32px;
    max-width: 100%;
    /* Remove the flex dividers — use border instead */
  }
  .hero-stat {
    padding: 16px 12px;
    border-right: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
  }
  /* Remove right border from right column */
  .hero-stat:nth-child(4),
  .hero-stat:nth-child(8) { border-right: none; }
  /* Remove bottom border from bottom row */
  .hero-stat:nth-child(5),
  .hero-stat:nth-child(6),
  .hero-stat:nth-child(7),
  .hero-stat:nth-child(8) { border-bottom: none; }
  /* Hide the flex divider spans — using border grid now */
  .hero-stat-divider { display: none; }
  .hero-stat-num { font-size: clamp(16px, 5vw, 22px); }
  .hero-stat-label { font-size: 9px; }

  /* ---- SECTION HEADERS ---- */
  .section-header { margin-bottom: 32px; }
  .section-header h2 { font-size: clamp(22px, 7vw, 30px); letter-spacing: -0.5px; }

  /* ---- ABOUT ---- */
  .about-body { flex-direction: column; gap: 20px; }

  /* ---- GRIDS: all single column ---- */
  .projects-grid { grid-template-columns: 1fr; gap: 12px; }
  .card-featured { grid-column: span 1; }
  .skills-grid { grid-template-columns: 1fr 1fr; gap: 10px; }
  .testimonials-grid { grid-template-columns: 1fr; gap: 12px; }
  .pricing-grid { grid-template-columns: 1fr; gap: 14px; }
  .pricing-card-featured { grid-column: span 1; }
  /* Kill stagger delays on mobile — all cards appear together */
  .projects-grid .card { transition-delay: 0s !important; }

  /* ---- CARD text sizing ---- */
  .card-title { font-size: 14px; }
  .card-desc { font-size: 12px; }

  /* ---- CONTACT ---- */
  .contact-info { flex-direction: column; align-items: stretch; }
  .contact-item { justify-content: center; }
  .contact-process { flex-direction: column; align-items: stretch; gap: 0; }
  .contact-step { border-radius: 0; border-bottom: none; }
  .contact-step:first-child { border-radius: 8px 8px 0 0; }
  .contact-step:last-child { border-radius: 0 0 8px 8px; border-bottom: 1px solid var(--border); }
  .contact-step-arrow { display: none; }

  /* ---- PROJECT DETAIL ---- */
  .project-body { gap: 24px; padding-bottom: 48px; }
  .project-title { font-size: clamp(22px, 8vw, 36px); letter-spacing: -1px; }
  .video-thumb { flex: 0 0 120px; }
}

/* =====================================================
   EXTRA SMALL (≤380px) — phones like iPhone SE
   ===================================================== */
@media (max-width: 380px) {
  .container { padding: 0 14px; }
  .hero-title { font-size: 30px; }
  .hero-eyebrow { font-size: 8px; letter-spacing: 1px; }
  .skills-grid { grid-template-columns: 1fr; }
  .contact-item { font-size: 12px; padding: 10px 12px; }
}

/* =====================================================
   REDUCED MOTION
   ===================================================== */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; animation: none !important; }
}