/* ==========================================================================
   DESIGN TOKENS
   Palette chosen for this brief: deep charcoal-navy base (not pure black),
   soft indigo primary, teal secondary for metrics/highlights, warm amber
   used sparingly for the process signature. No previous portfolio palette
   was supplied, so these tokens are new — swap the hex values below to
   reuse an existing brand palette instead.
   ========================================================================== */
:root {
  /* Surfaces */
  --bg: #0a0d13;
  --bg-alt: #0e121a;
  --surface: #12161f;
  --surface-2: #171c27;
  --border: rgba(255, 255, 255, 0.08);
  --border-strong: rgba(255, 255, 255, 0.16);

  /* Text */
  --text-primary: #eceef3;
  --text-secondary: #a8aec0;
  --text-muted: #6b7285;

  /* Brand */
  --accent: #6c8eff;
  --accent-soft: rgba(108, 142, 255, 0.14);
  --accent-2: #34d8c4;
  --accent-2-soft: rgba(52, 216, 196, 0.14);
  --accent-warm: #f0a959;

  /* Gradients */
  --grad-primary: linear-gradient(135deg, #6c8eff 0%, #34d8c4 100%);
  --grad-surface: linear-gradient(160deg, rgba(255, 255, 255, 0.05), rgba(255, 255, 255, 0));

  /* Radii */
  --r-lg: 20px;
  --r-md: 14px;
  --r-sm: 10px;
  --r-pill: 999px;

  /* Shadows */
  --shadow-soft: 0 20px 60px -20px rgba(0, 0, 0, 0.6);
  --shadow-card: 0 12px 32px -12px rgba(0, 0, 0, 0.5);

  /* Type */
  --font-display: 'Space Grotesk', system-ui, sans-serif;
  --font-body: 'Inter', system-ui, sans-serif;

  /* Motion */
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --dur-fast: 180ms;
  --dur-med: 420ms;
  --dur-slow: 720ms;

  --nav-h: 76px;
}

/* ==========================================================================
   RESET
   ========================================================================== */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text-primary);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; }
ul { list-style: none; margin: 0; padding: 0; }
h1, h2, h3, h4 { font-family: var(--font-display); margin: 0; font-weight: 600; letter-spacing: -0.02em; }
p { margin: 0; }

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 4px;
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }
}

.container {
  width: 100%;
  max-width: 1160px;
  margin: 0 auto;
  padding: 0 24px;
}

section { padding: 120px 0; position: relative; }
@media (max-width: 768px) { section { padding: 80px 0; } }

.eyebrow {
  display: inline-block;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent-2);
  margin-bottom: 16px;
}
.eyebrow.center { display: block; text-align: center; }

.section-title {
  font-size: clamp(28px, 4vw, 40px);
  line-height: 1.15;
  margin-bottom: 20px;
}
.section-title.center { text-align: center; margin-left: auto; margin-right: auto; max-width: 640px; }

.section-sub {
  color: var(--text-secondary);
  font-size: 17px;
  max-width: 560px;
  margin-bottom: 48px;
}
.section-sub.center { text-align: center; margin-left: auto; margin-right: auto; }

/* ==========================================================================
   BUTTONS
   ========================================================================== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 13px 26px;
  border-radius: var(--r-pill);
  font-weight: 600;
  font-size: 15px;
  border: 1px solid transparent;
  transition: transform var(--dur-fast) var(--ease), box-shadow var(--dur-fast) var(--ease), background var(--dur-fast) var(--ease), border-color var(--dur-fast) var(--ease);
  position: relative;
  overflow: hidden;
  white-space: nowrap;
}
.btn:active { transform: scale(0.97); }

.btn-primary {
  background: var(--grad-primary);
  color: #06070a;
}
.btn-primary:hover { box-shadow: 0 10px 30px -8px rgba(108, 142, 255, 0.55); transform: translateY(-2px); }

.btn-secondary {
  background: var(--surface-2);
  border-color: var(--border-strong);
  color: var(--text-primary);
}
.btn-secondary:hover { border-color: var(--accent); transform: translateY(-2px); }

.btn-ghost {
  background: transparent;
  color: var(--text-secondary);
  border-color: var(--border);
}
.btn-ghost:hover { color: var(--text-primary); border-color: var(--border-strong); }

.btn-lg { padding: 16px 34px; font-size: 16px; margin-top: 32px; }

.btn-link {
  background: none;
  border: none;
  color: var(--accent);
  font-weight: 600;
  font-size: 14px;
  padding: 0;
  margin-top: 18px;
  transition: gap var(--dur-fast) var(--ease);
}
.btn-link:hover { text-decoration: underline; }

/* Ripple */
.btn .ripple {
  position: absolute;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.35);
  transform: scale(0);
  animation: ripple 600ms ease-out;
  pointer-events: none;
}
@keyframes ripple {
  to { transform: scale(3); opacity: 0; }
}

/* ==========================================================================
   SCROLL PROGRESS
   ========================================================================== */
.scroll-progress {
  position: fixed;
  top: 0; left: 0;
  height: 3px;
  width: 0%;
  background: var(--grad-primary);
  z-index: 1000;
  transition: width 80ms linear;
}

/* ==========================================================================
   NAVIGATION
   ========================================================================== */
.nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: var(--nav-h);
  z-index: 900;
  background: rgba(10, 13, 19, 0.6);
  backdrop-filter: blur(16px) saturate(140%);
  -webkit-backdrop-filter: blur(16px) saturate(140%);
  border-bottom: 1px solid transparent;
  transition: border-color var(--dur-med) var(--ease), background var(--dur-med) var(--ease);
}
.nav.scrolled { border-bottom-color: var(--border); background: rgba(10, 13, 19, 0.85); }

.nav-inner {
  max-width: 1160px;
  margin: 0 auto;
  height: 100%;
  padding: 0 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.nav-logo {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 20px;
}
.nav-logo .dot { color: var(--accent); }

.nav-links { display: flex; align-items: center; gap: 32px; }
.nav-links a {
  font-size: 14px;
  font-weight: 500;
  color: var(--text-secondary);
  position: relative;
  padding: 6px 0;
  transition: color var(--dur-fast) var(--ease);
}
.nav-links a:hover { color: var(--text-primary); }
.nav-links a::after {
  content: '';
  position: absolute;
  bottom: 0; left: 0;
  width: 0%;
  height: 2px;
  background: var(--accent);
  transition: width var(--dur-fast) var(--ease);
}
.nav-links a:hover::after,
.nav-links a.active::after { width: 100%; }
.nav-links a.active { color: var(--text-primary); }

.nav-cta {
  background: var(--surface-2);
  border: 1px solid var(--border-strong);
  padding: 9px 18px;
  border-radius: var(--r-pill);
}
.nav-cta::after { display: none; }
.nav-cta:hover { border-color: var(--accent); color: var(--text-primary); }

.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  padding: 8px;
}
.nav-toggle span {
  width: 22px; height: 2px;
  background: var(--text-primary);
  transition: transform var(--dur-fast) var(--ease), opacity var(--dur-fast) var(--ease);
}
.nav-toggle.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle.open span:nth-child(2) { opacity: 0; }
.nav-toggle.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

@media (max-width: 860px) {
  .nav-toggle { display: flex; }
  .nav-links {
    position: fixed;
    top: var(--nav-h); left: 0; right: 0;
    background: rgba(10, 13, 19, 0.98);
    backdrop-filter: blur(16px);
    flex-direction: column;
    align-items: flex-start;
    gap: 0;
    padding: 8px 24px 24px;
    border-bottom: 1px solid var(--border);
    transform: translateY(-8px);
    opacity: 0;
    visibility: hidden;
    transition: opacity var(--dur-med) var(--ease), transform var(--dur-med) var(--ease), visibility var(--dur-med);
  }
  .nav-links.open { opacity: 1; transform: translateY(0); visibility: visible; }
  .nav-links a { width: 100%; padding: 14px 0; border-bottom: 1px solid var(--border); }
  .nav-cta { margin-top: 12px; text-align: center; }
}

/* ==========================================================================
   HERO
   ========================================================================== */
.hero {
  min-height: 100svh;
  display: flex;
  align-items: center;
  padding-top: var(--nav-h);
  position: relative;
  overflow: hidden;
}

.hero-bg { position: absolute; inset: 0; z-index: 0; overflow: hidden; }
.hero-orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(90px);
  opacity: 0.35;
  animation: float 14s ease-in-out infinite;
}
.orb-1 { width: 420px; height: 420px; background: var(--accent); top: -120px; right: -100px; }
.orb-2 { width: 360px; height: 360px; background: var(--accent-2); bottom: -140px; left: -80px; animation-delay: -6s; }
@keyframes float {
  0%, 100% { transform: translate(0, 0) scale(1); }
  50% { transform: translate(30px, -30px) scale(1.08); }
}
.hero-grid {
  position: absolute; inset: 0;
  background-image: linear-gradient(var(--border) 1px, transparent 1px), linear-gradient(90deg, var(--border) 1px, transparent 1px);
  background-size: 64px 64px;
  mask-image: radial-gradient(ellipse 60% 50% at 50% 30%, black, transparent);
  opacity: 0.5;
}

.hero-inner {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 48px;
  align-items: center;
}
@media (max-width: 900px) {
  .hero-inner { grid-template-columns: 1fr; }
  .hero-visual { order: -1; max-width: 320px; margin: 0 auto; }
}

.hero-title {
  font-size: clamp(34px, 5.4vw, 58px);
  line-height: 1.08;
  margin-bottom: 22px;
}
.hero-sub {
  font-size: 18px;
  color: var(--text-secondary);
  max-width: 520px;
  margin-bottom: 34px;
}
.hero-actions { display: flex; flex-wrap: wrap; gap: 14px; }

.hero-visual { position: relative; }
.hero-photo-frame {
  border-radius: var(--r-lg);
  overflow: hidden;
  border: 1px solid var(--border-strong);
  box-shadow: var(--shadow-soft);
  aspect-ratio: 1 / 1;
  background: var(--surface);
}
.hero-photo-frame img { width: 100%; height: 100%; object-fit: cover; }

.hero-badge {
  position: absolute;
  background: rgba(23, 28, 39, 0.85);
  backdrop-filter: blur(10px);
  border: 1px solid var(--border-strong);
  border-radius: var(--r-pill);
  padding: 10px 16px;
  font-size: 13px;
  font-weight: 600;
  box-shadow: var(--shadow-card);
  animation: bob 6s ease-in-out infinite;
}
.hero-badge-1 { top: 6%; left: -8%; animation-delay: 0s; }
.hero-badge-2 { bottom: 18%; right: -10%; animation-delay: -2s; }
.hero-badge-3 { bottom: -4%; left: 10%; animation-delay: -4s; }
@keyframes bob { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-8px); } }
@media (max-width: 900px) {
  .hero-badge-1 { left: 0; }
  .hero-badge-2 { right: 0; }
}

.scroll-cue {
  position: absolute;
  bottom: 32px; left: 50%;
  transform: translateX(-50%);
  width: 26px; height: 42px;
  border: 2px solid var(--border-strong);
  border-radius: 20px;
  z-index: 1;
}
.scroll-cue span {
  position: absolute;
  top: 8px; left: 50%;
  width: 4px; height: 8px;
  background: var(--accent);
  border-radius: 2px;
  transform: translateX(-50%);
  animation: scrollcue 1.8s ease-in-out infinite;
}
@keyframes scrollcue { 0% { opacity: 1; top: 8px; } 70% { opacity: 0; top: 20px; } 100% { opacity: 0; top: 8px; } }

/* ==========================================================================
   METRICS
   ========================================================================== */
.metrics { padding: 80px 0; border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); background: var(--bg-alt); }
.metrics-grid {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 20px;
}
@media (max-width: 900px) { .metrics-grid { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 560px) { .metrics-grid { grid-template-columns: repeat(2, 1fr); } }

.metric-card {
  text-align: center;
  padding: 24px 12px;
}
.metric-num {
  display: block;
  font-family: var(--font-display);
  font-size: clamp(24px, 3.2vw, 34px);
  font-weight: 700;
  background: var(--grad-primary);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.metric-label {
  display: block;
  margin-top: 8px;
  font-size: 13px;
  color: var(--text-muted);
  letter-spacing: 0.02em;
}

/* ==========================================================================
   ABOUT
   ========================================================================== */
.about-inner {
  display: grid;
  grid-template-columns: 0.8fr 1.2fr;
  gap: 64px;
  align-items: center;
}
@media (max-width: 900px) { .about-inner { grid-template-columns: 1fr; } .about-visual { max-width: 340px; margin: 0 auto; } }

.about-photo-frame {
  border-radius: var(--r-lg);
  overflow: hidden;
  border: 1px solid var(--border-strong);
  box-shadow: var(--shadow-card);
  aspect-ratio: 4 / 5;
  background: var(--surface);
}
.about-photo-frame img { width: 100%; height: 100%; object-fit: cover; }

.about-copy p { color: var(--text-secondary); margin-bottom: 18px; font-size: 16px; }

.about-strengths {
  margin-top: 28px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}
@media (max-width: 560px) { .about-strengths { grid-template-columns: 1fr; } }
.about-strengths li {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  padding: 16px 18px;
}
.about-strengths strong { display: block; font-size: 14px; margin-bottom: 4px; }
.about-strengths span { font-size: 13px; color: var(--text-muted); }

/* ==========================================================================
   TOOLS
   ========================================================================== */
.tools { background: var(--bg-alt); border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }
.tools-grid {
  margin-top: 56px;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}
@media (max-width: 860px) { .tools-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px) { .tools-grid { grid-template-columns: 1fr; } }

.tool-category {
  background: var(--grad-surface), var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  padding: 24px;
  transition: transform var(--dur-fast) var(--ease), border-color var(--dur-fast) var(--ease);
}
.tool-category:hover { transform: translateY(-4px); border-color: var(--border-strong); }
.tool-category h3 { font-size: 15px; margin-bottom: 14px; color: var(--text-primary); }

.tool-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip {
  font-size: 13px;
  padding: 7px 13px;
  border-radius: var(--r-pill);
  background: var(--surface-2);
  border: 1px solid var(--border);
  color: var(--text-secondary);
  transition: background var(--dur-fast) var(--ease), color var(--dur-fast) var(--ease), border-color var(--dur-fast) var(--ease);
}
.tool-category:hover .chip { border-color: var(--border-strong); }

/* ==========================================================================
   WORK GRID / CASE CARDS
   ========================================================================== */
.work-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 28px;
  margin-top: 20px;
}
@media (max-width: 760px) { .work-grid { grid-template-columns: 1fr; } }

.work-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  overflow: hidden;
  transition: transform var(--dur-fast) var(--ease), border-color var(--dur-fast) var(--ease), box-shadow var(--dur-fast) var(--ease);
}
.work-card:hover {
  transform: translateY(-6px);
  border-color: var(--border-strong);
  box-shadow: var(--shadow-card);
}
.work-card-media { aspect-ratio: 16 / 10; overflow: hidden; background: var(--surface-2); }
.work-card-media img { width: 100%; height: 100%; object-fit: cover; transition: transform var(--dur-slow) var(--ease); }
.work-card:hover .work-card-media img { transform: scale(1.05); }

.work-card-body { padding: 24px; }
.work-card-body h3 { font-size: 20px; margin-bottom: 10px; }
.work-card-body p { color: var(--text-secondary); font-size: 14.5px; margin-bottom: 16px; }

.work-card-meta { display: flex; flex-direction: column; gap: 4px; font-size: 12.5px; }
.work-card-meta .role { color: var(--accent-2); font-weight: 600; }
.work-card-meta .tech { color: var(--text-muted); }

/* ==========================================================================
   EXPERIENCE TIMELINE
   ========================================================================== */
.timeline {
  margin-top: 56px;
  position: relative;
  padding-left: 32px;
  border-left: 1px solid var(--border);
}
.timeline-item { position: relative; padding-bottom: 48px; }
.timeline-item:last-child { padding-bottom: 0; }
.timeline-dot {
  position: absolute;
  left: -37px; top: 4px;
  width: 12px; height: 12px;
  border-radius: 50%;
  background: var(--bg);
  border: 2px solid var(--accent);
}
.timeline-date { font-size: 12.5px; color: var(--accent-2); font-weight: 600; letter-spacing: 0.04em; text-transform: uppercase; }
.timeline-content h3 { font-size: 19px; margin: 8px 0 4px; }
.timeline-org { color: var(--text-muted); font-size: 13.5px; margin-bottom: 10px; }
.timeline-content p:last-child { color: var(--text-secondary); font-size: 15px; max-width: 620px; }

/* ==========================================================================
   PROCESS
   ========================================================================== */
.process { background: var(--bg-alt); border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }
.process-flow {
  margin-top: 56px;
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 4px;
  position: relative;
}
.process-flow::before {
  content: '';
  position: absolute;
  top: 34px; left: 6%; right: 6%;
  height: 1px;
  background: linear-gradient(90deg, var(--accent), var(--accent-2));
  opacity: 0.35;
  z-index: 0;
}
@media (max-width: 860px) {
  .process-flow { grid-template-columns: 1fr; gap: 28px; }
  .process-flow::before { display: none; }
}

.process-step {
  position: relative;
  z-index: 1;
  text-align: center;
  padding: 0 12px;
}
.process-index {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 68px; height: 68px;
  border-radius: 50%;
  background: var(--surface);
  border: 1px solid var(--border-strong);
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 18px;
  color: var(--accent-warm);
  margin-bottom: 18px;
}
.process-step h3 { font-size: 17px; margin-bottom: 10px; }
.process-step p { font-size: 13.5px; color: var(--text-muted); }
@media (max-width: 860px) { .process-step { text-align: left; padding: 0; display: flex; gap: 20px; align-items: flex-start; } .process-index { flex-shrink: 0; margin-bottom: 0; } }

/* ==========================================================================
   TESTIMONIALS
   ========================================================================== */
.testimonial-gallery {
  margin-top: 56px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
}
@media (max-width: 700px) { .testimonial-gallery { grid-template-columns: 1fr; } }

.testimonial-item {
  display: block;
  padding: 0;
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  overflow: hidden;
  background: var(--surface);
  box-shadow: var(--shadow-card);
  transition: transform var(--dur-fast) var(--ease), border-color var(--dur-fast) var(--ease);
}
.testimonial-item img { width: 100%; height: auto; display: block; }
@media (hover: hover) {
  .testimonial-item:hover { transform: scale(1.015); border-color: var(--border-strong); }
}

/* ==========================================================================
   RESUME
   ========================================================================== */
.resume-inner {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 56px;
  align-items: center;
}
@media (max-width: 860px) { .resume-inner { grid-template-columns: 1fr; } }
.resume p { color: var(--text-secondary); margin: 18px 0 28px; }
.resume-preview-frame {
  border-radius: var(--r-lg);
  overflow: hidden;
  border: 1px solid var(--border-strong);
  box-shadow: var(--shadow-soft);
  aspect-ratio: 3 / 4;
  background: var(--surface);
}

/* ==========================================================================
   CONTACT
   ========================================================================== */
.contact-inner { text-align: center; }
.contact-actions {
  display: flex;
  justify-content: center;
  gap: 20px;
  flex-wrap: wrap;
  margin: 40px 0 8px;
}
.contact-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  padding: 20px 30px;
  min-width: 220px;
  transition: border-color var(--dur-fast) var(--ease), transform var(--dur-fast) var(--ease);
}
.contact-card:hover { border-color: var(--accent); transform: translateY(-3px); }
.contact-label { display: block; font-size: 12px; text-transform: uppercase; letter-spacing: 0.08em; color: var(--text-muted); margin-bottom: 6px; }
.contact-value { display: block; font-size: 16px; font-weight: 600; }

/* ==========================================================================
   FOOTER
   ========================================================================== */
.footer { border-top: 1px solid var(--border); padding: 32px 0; }
.footer-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 16px;
  font-size: 13.5px;
  color: var(--text-muted);
}
.footer-links { display: flex; gap: 22px; }
.footer-links a { color: var(--text-muted); transition: color var(--dur-fast) var(--ease); }
.footer-links a:hover { color: var(--text-primary); }

.back-to-top {
  position: fixed;
  bottom: 28px; right: 28px;
  width: 46px; height: 46px;
  border-radius: 50%;
  background: var(--surface-2);
  border: 1px solid var(--border-strong);
  color: var(--text-primary);
  font-size: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transform: translateY(10px);
  transition: opacity var(--dur-fast) var(--ease), transform var(--dur-fast) var(--ease), border-color var(--dur-fast) var(--ease);
  z-index: 500;
}
.back-to-top.visible { opacity: 1; visibility: visible; transform: translateY(0); }
.back-to-top:hover { border-color: var(--accent); }

/* ==========================================================================
   REVEAL ANIMATIONS
   ========================================================================== */
[data-reveal] { opacity: 0; transition: opacity var(--dur-slow) var(--ease), transform var(--dur-slow) var(--ease); }
[data-reveal="up"] { transform: translateY(28px); }
[data-reveal="left"] { transform: translateX(-28px); }
[data-reveal="right"] { transform: translateX(28px); }
[data-reveal="scale"] { transform: scale(0.94); }
[data-reveal].is-visible { opacity: 1; transform: none; }

[data-delay="1"] { transition-delay: 80ms; }
[data-delay="2"] { transition-delay: 160ms; }
[data-delay="3"] { transition-delay: 240ms; }
[data-delay="4"] { transition-delay: 320ms; }
[data-delay="5"] { transition-delay: 400ms; }
[data-delay="6"] { transition-delay: 480ms; }

/* subtle tilt on cards with data-tilt (JS-driven via CSS vars) */
[data-tilt] {
  transform: perspective(800px) rotateX(var(--tilt-x, 0deg)) rotateY(var(--tilt-y, 0deg));
  transition: transform var(--dur-fast) var(--ease);
}

/* ==========================================================================
   MODAL (CASE STUDY)
   ========================================================================== */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(6, 8, 12, 0.72);
  backdrop-filter: blur(6px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  z-index: 1100;
  opacity: 0;
  visibility: hidden;
  transition: opacity var(--dur-med) var(--ease), visibility var(--dur-med);
}
.modal-overlay.open { opacity: 1; visibility: visible; }

.modal {
  position: relative;
  width: 100%;
  max-width: 780px;
  max-height: 86vh;
  overflow-y: auto;
  background: var(--surface);
  border: 1px solid var(--border-strong);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow-soft);
  transform: translateY(24px) scale(0.98);
  transition: transform var(--dur-med) var(--ease);
}
.modal-overlay.open .modal { transform: translateY(0) scale(1); }

.modal-close {
  position: sticky;
  top: 16px; left: calc(100% - 56px);
  width: 36px; height: 36px;
  border-radius: 50%;
  background: var(--surface-2);
  border: 1px solid var(--border-strong);
  color: var(--text-primary);
  z-index: 2;
}

.modal-content { padding: 0 40px 48px; margin-top: -36px; }
.modal-hero {
  width: calc(100% + 80px);
  margin-left: -40px;
  aspect-ratio: 16 / 8;
  overflow: hidden;
  border-radius: var(--r-lg) var(--r-lg) 0 0;
  background: var(--surface-2);
}
.modal-hero img { width: 100%; height: 100%; object-fit: cover; }
.modal-content h2 { font-size: 28px; margin: 28px 0 6px; }
.modal-role { color: var(--accent-2); font-size: 13.5px; font-weight: 600; margin-bottom: 24px; display: block; }

.modal-section { margin-bottom: 24px; }
.modal-section h4 {
  font-size: 12.5px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-muted);
  margin-bottom: 10px;
}
.modal-section p, .modal-section li { color: var(--text-secondary); font-size: 15px; }
.modal-section ul { display: flex; flex-direction: column; gap: 8px; }
.modal-section li { position: relative; padding-left: 18px; }
.modal-section li::before { content: '—'; position: absolute; left: 0; color: var(--accent); }

.modal-metrics { display: flex; flex-wrap: wrap; gap: 12px; }
.modal-metric {
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--r-sm);
  padding: 12px 16px;
  min-width: 120px;
}
.modal-metric strong { display: block; font-family: var(--font-display); font-size: 18px; color: var(--accent-2); }
.modal-metric span { font-size: 12px; color: var(--text-muted); }

.modal-tools { display: flex; flex-wrap: wrap; gap: 8px; }

@media (max-width: 640px) {
  .modal-content { padding: 0 20px 36px; }
  .modal-hero { width: calc(100% + 40px); margin-left: -20px; }
}

/* ==========================================================================
   LIGHTBOX (TESTIMONIALS)
   ========================================================================== */
.lightbox-overlay {
  position: fixed;
  inset: 0;
  background: rgba(4, 5, 8, 0.92);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1200;
  opacity: 0;
  visibility: hidden;
  transition: opacity var(--dur-med) var(--ease), visibility var(--dur-med);
}
.lightbox-overlay.open { opacity: 1; visibility: visible; }
.lightbox-overlay img {
  max-width: 88vw;
  max-height: 84vh;
  border-radius: var(--r-md);
  border: 1px solid var(--border-strong);
  box-shadow: var(--shadow-soft);
}
.lightbox-close {
  position: absolute;
  top: 24px; right: 24px;
  width: 42px; height: 42px;
  border-radius: 50%;
  background: var(--surface-2);
  border: 1px solid var(--border-strong);
  color: var(--text-primary);
  font-size: 16px;
}
.lightbox-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 48px; height: 48px;
  border-radius: 50%;
  background: var(--surface-2);
  border: 1px solid var(--border-strong);
  color: var(--text-primary);
  font-size: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.lightbox-prev { left: 20px; }
.lightbox-next { right: 20px; }
@media (max-width: 600px) {
  .lightbox-arrow { width: 40px; height: 40px; font-size: 20px; }
  .lightbox-prev { left: 8px; }
  .lightbox-next { right: 8px; }
}
