/* ============================================================
   Md. Rasel Mia — Portfolio Styles
   Tokens: colors, spacing, typography, radii
   ============================================================ */

:root {
  /* Colors — Light */
  --bg: #fbfaf7;
  --bg-alt: #ffffff;
  --surface: #ffffff;
  --border: #e8e6e0;
  --text: #12172a;
  --text-muted: #5b6172;
  --accent: #4f46e5;      /* deep indigo/purple */
  --accent-2: #6366f1;
  --accent-soft: #eef0ff;
  --success: #16a34a;
  --danger: #dc2626;
  --shadow-sm: 0 1px 2px rgba(18,23,42,.05);
  --shadow-md: 0 6px 24px rgba(18,23,42,.06);
  --shadow-lg: 0 20px 50px rgba(18,23,42,.10);

  /* Spacing */
  --sp-1: 4px; --sp-2: 8px; --sp-3: 12px; --sp-4: 16px;
  --sp-5: 24px; --sp-6: 32px; --sp-7: 48px; --sp-8: 64px; --sp-9: 96px;

  /* Font */
  --font: 'Inter', system-ui, -apple-system, Segoe UI, Roboto, sans-serif;
  --fs-xs: 12px; --fs-sm: 14px; --fs-base: 16px; --fs-lg: 18px;
  --fs-xl: 20px; --fs-2xl: 24px; --fs-3xl: 32px; --fs-4xl: 42px; --fs-5xl: 56px;

  /* Radius */
  --r-sm: 8px; --r-md: 12px; --r-lg: 16px; --r-xl: 24px; --r-full: 999px;

  --container: 1200px;
  --header-h: 72px;

  /* Transitions */
  --transition-fast: .2s ease;
  --transition-base: .25s ease;
  --transition-slow: .3s ease;
}

/* Dark theme */
html[data-theme="dark"] {
  --bg: #0b0d14;
  --bg-alt: #10131c;
  --surface: #141826;
  --border: #232838;
  --text: #f1f3f8;
  --text-muted: #9aa1b3;
  --accent: #8b83ff;
  --accent-2: #6366f1;
  --accent-soft: rgba(139,131,255,.12);
  --shadow-sm: 0 1px 2px rgba(0,0,0,.4);
  --shadow-md: 0 6px 24px rgba(0,0,0,.35);
  --shadow-lg: 0 20px 50px rgba(0,0,0,.45);
}

/* ============ RESET ============ */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: var(--header-h); }
body {
  margin: 0;
  font-family: var(--font);
  font-size: var(--fs-base);
  line-height: 1.6;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  transition: background .3s ease, color .3s ease;
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; border: none; background: none; color: inherit; }
a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible,
[tabindex]:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 4px;
}
h1,h2,h3,h4,h5 { line-height: 1.2; margin: 0 0 var(--sp-4); font-weight: 800; letter-spacing: -0.02em; }
h1 { font-size: clamp(36px, 5vw, var(--fs-5xl)); }
h2 { font-size: clamp(28px, 3.5vw, var(--fs-4xl)); }
h3 { font-size: var(--fs-xl); }
h4 { font-size: var(--fs-lg); }
p  { margin: 0 0 var(--sp-4); color: var(--text-muted); }

.container { max-width: var(--container); margin: 0 auto; padding: 0 var(--sp-5); }

.accent { color: var(--accent); }
.eyebrow {
  display: inline-block; font-size: var(--fs-xs); font-weight: 700;
  text-transform: uppercase; letter-spacing: .14em;
  color: var(--accent); margin-bottom: var(--sp-3);
}
.section-head { text-align: center; max-width: 720px; margin: 0 auto var(--sp-7); }
.section-sub { color: var(--text-muted); font-size: var(--fs-lg); }

/* ============ BUTTONS ============ */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 14px 22px; border-radius: var(--r-full); font-weight: 600;
  font-size: var(--fs-sm); transition: all var(--transition-fast); border: 1.5px solid transparent;
  white-space: nowrap;
}
.btn-primary { background: var(--accent); color: #fff; box-shadow: 0 8px 20px rgba(79,70,229,.25); }
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 12px 28px rgba(79,70,229,.35); }
.btn-outline { border-color: var(--border); color: var(--text); background: transparent; }
.btn-outline:hover { border-color: var(--accent); color: var(--accent); }
.btn-sm { padding: 10px 18px; font-size: var(--fs-xs); }
.btn-block { width: 100%; }

/* ============ HEADER ============ */
.site-header {
  position: sticky; top: 0; z-index: 100;
  background: color-mix(in oklab, var(--bg) 85%, transparent);
  backdrop-filter: saturate(180%) blur(12px);
  -webkit-backdrop-filter: saturate(180%) blur(12px);
  border-bottom: 1px solid transparent;
  transition: border-color var(--transition-fast), background var(--transition-fast);
}
.site-header.scrolled { border-color: var(--border); }
.header-inner {
  height: var(--header-h);
  display: flex; align-items: center; justify-content: space-between; gap: var(--sp-5);
}
.logo { display: flex; align-items: center; gap: 8px; font-weight: 800; font-size: var(--fs-lg); }
.logo-mark {
  display: inline-flex; align-items: center; justify-content: center;
  width: 32px; height: 32px; border-radius: 8px;
  background: var(--accent); color: #fff; font-size: 14px;
}
.logo-dot { color: var(--accent); }

.main-nav ul { list-style: none; margin: 0; padding: 0; display: flex; gap: var(--sp-6); }
.main-nav a { font-size: var(--fs-sm); font-weight: 500; color: var(--text-muted); transition: color .15s; }
.main-nav a:hover { color: var(--text); }

.header-actions { display: flex; align-items: center; gap: var(--sp-3); }
.theme-toggle {
  width: 40px; height: 40px; border-radius: var(--r-full);
  display: inline-flex; align-items: center; justify-content: center;
  border: 1px solid var(--border); background: var(--surface);
  transition: background var(--transition-fast);
}
.theme-toggle:hover { background: var(--accent-soft); }
.theme-toggle .icon { width: 18px; height: 18px; }
.theme-toggle .icon-moon { display: none; }
html[data-theme="dark"] .theme-toggle .icon-sun { display: none; }
html[data-theme="dark"] .theme-toggle .icon-moon { display: block; }

.hamburger { display: none; flex-direction: column; gap: 5px; padding: 8px; }
.hamburger span { width: 22px; height: 2px; background: var(--text); border-radius: 2px; transition: var(--transition-base); }
.hamburger.active span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.hamburger.active span:nth-child(2) { opacity: 0; }
.hamburger.active span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ============ HERO ============ */
.hero { padding: var(--sp-9) 0 var(--sp-8); position: relative; overflow: hidden;}
.hero::before {
  content: ""; position: absolute; inset: 0;
  background:
    radial-gradient(600px 300px at 15% 10%, var(--accent-soft), transparent 60%),
    radial-gradient(500px 300px at 90% 30%, var(--accent-soft), transparent 60%);
  pointer-events: none; z-index: -1;
}

.hero-grid { display: grid; grid-template-columns: 1.1fr 1fr; gap: 10px; align-items: center;}
.badge {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 6px 14px; border-radius: var(--r-full);
  background: var(--surface); border: 1px solid var(--border);
  font-size: var(--fs-xs); font-weight: 600; color: var(--text-muted);
  margin-bottom: var(--sp-5);
}
.pulse {
  width: 8px; height: 8px; border-radius: 50%; background: var(--success);
  box-shadow: 0 0 0 0 rgba(22,163,74,.5); animation: pulse 2s infinite;
}
@keyframes pulse { 70% { box-shadow: 0 0 0 8px rgba(22,163,74,0); } }

.hero .lead { font-size: var(--fs-lg); max-width: 560px; margin: 20px 0 var(--sp-6); 0}
.hero-actions { display: flex; gap: var(--sp-3); margin-bottom: var(--sp-6); flex-wrap: wrap; }
.trust-list {
  list-style: none; margin: 0; padding: 0;
  display: flex; flex-wrap: wrap; gap: 8px 18px;
  font-size: var(--fs-xs); color: var(--text-muted); font-weight: 600;
}
.trust-list li { position: relative; padding: 7px; display: flex; justify-content: center; align-items: center; border: solid 1px var(--accent-soft); border-radius: 4px; gap: 10px; }
.trust-list li i{
  color: var(--accent);
  font-size: 24px;
}

/* Hero visual */
.hero-visual { position: relative; min-height: 480px; }

/* ============ EXPERTISE ============ */
.expertise { padding: var(--sp-7) 0; border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); background: var(--bg-alt); }
.expertise-grid {
  display: grid; grid-template-columns: repeat(6, 1fr); gap: var(--sp-4);
}
.expertise-item {
  display: flex; flex-direction: column; align-items: center; text-align: center;
  gap: 10px; padding: var(--sp-4);
}
.ex-icon { font-size: 26px; }
.expertise-item h4 { font-size: var(--fs-sm); margin: 0; font-weight: 600; }

/* ============ ABOUT ============ */
.about-preview { padding: var(--sp-9) 0; }
.about-grid { display: grid; grid-template-columns: 1fr 1.2fr; gap: var(--sp-8); align-items: center; }
.profile-hero-card {
  position: relative; overflow: hidden;
  min-height: 420px;
  background: linear-gradient(160deg, #171c30, #0d1020);
  border-radius: var(--r-xl); box-shadow: var(--shadow-lg);
  padding: 0 var(--sp-6) var(--sp-6);
  display: flex; flex-direction: column; justify-content: flex-end;
  text-align: center;
}
.profile-hero-card::before {
  content: ""; position: absolute; inset: 0;
  background:
    radial-gradient(circle at 20% 15%, rgba(139,131,255,.25), transparent 55%),
    radial-gradient(circle at 85% 85%, rgba(99,102,241,.22), transparent 55%);
}
.profile-hero-meta { position: relative; z-index: 1; margin: var(--sp-4) 0; }
.profile-hero-meta strong { display: block; color: #fff; font-size: var(--fs-2xl); }
.profile-hero-meta span { display: block; color: rgba(255,255,255,.65); font-size: var(--fs-sm); margin-top: 4px; }
.profile-hero-tags { position: relative; z-index: 1; display: flex; flex-wrap: wrap; justify-content: center; gap: 6px; }
.profile-hero-tags span {
  background: rgba(255,255,255,.1); color: #fff;
  padding: 4px 12px; border-radius: var(--r-full); font-size: var(--fs-xs); font-weight: 600;
  border: 1px solid rgba(255,255,255,.15);
}
.stats { display: grid; grid-template-columns: repeat(3,1fr); gap: var(--sp-4); margin: var(--sp-6) 0; }
.stat {
  padding: var(--sp-4); border: 1px solid var(--border); border-radius: var(--r-md);
  background: var(--bg-alt);
}
.stat strong { display: block; font-size: var(--fs-2xl); color: var(--text); font-weight: 800; }
.stat span { font-size: var(--fs-xs); color: var(--text-muted); }

/* ============ SERVICES ============ */
.services { padding: var(--sp-9) 0; background: var(--bg-alt); }
.services-grid { display: grid; grid-template-columns: repeat(3,1fr); gap: var(--sp-5); }
.service-card {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-lg);
  padding: var(--sp-6); transition: all var(--transition-base); box-shadow: var(--shadow-sm);
}
.service-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); border-color: var(--accent); }
.s-icon {
  width: 52px; height: 52px; border-radius: var(--r-md);
  background: var(--accent-soft); display: inline-flex; align-items: center; justify-content: center;
  font-size: 24px; margin-bottom: var(--sp-4);
}
.service-card h3 { font-size: var(--fs-lg); }
.service-card p { font-size: var(--fs-sm); }
.learn { color: var(--accent); font-weight: 600; font-size: var(--fs-sm); }
.learn:hover { text-decoration: underline; }

/* ============ PRICING ============ */
.pricing { padding: var(--sp-9) 0; background: var(--bg-alt); }
.pricing-grid { display: grid; grid-template-columns: repeat(3,1fr); gap: var(--sp-5); align-items: stretch; }
.price-card {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-lg);
  padding: var(--sp-6); display: flex; flex-direction: column;
  box-shadow: var(--shadow-sm); position: relative; transition: all var(--transition-base);
}
.price-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); }
.price-featured { border-color: var(--accent); box-shadow: 0 0 0 2px var(--accent-soft), var(--shadow-md); }
.price-badge {
  position: absolute; top: -13px; left: 50%; transform: translateX(-50%);
  background: var(--accent); color: #fff; font-size: 11px; font-weight: 700;
  padding: 5px 14px; border-radius: var(--r-full); letter-spacing: .04em;
}
.price-card h3 { font-size: var(--fs-lg); margin-bottom: var(--sp-2); }
.price-amount { font-size: var(--fs-2xl); font-weight: 800; color: var(--text); margin-bottom: var(--sp-3); }
.price-amount span { color: var(--accent); }
.price-desc { font-size: var(--fs-sm); margin-bottom: var(--sp-5); }
.price-features { list-style: none; margin: 0 0 var(--sp-6); padding: 0; display: flex; flex-direction: column; gap: 10px; flex: 1; }
.price-features li { font-size: var(--fs-sm); color: var(--text); padding-left: 26px; position: relative; }
.price-features li::before {
  content: "✓"; position: absolute; left: 0; top: 0;
  color: var(--accent); font-weight: 800;
}
.price-note { text-align: center; font-size: var(--fs-xs); color: var(--text-muted); margin: var(--sp-6) 0 0; }
.price-custom {
  margin-top: var(--sp-5); text-align: center; display: flex; flex-direction: column;
  align-items: center; gap: var(--sp-3);
}
.price-custom p { margin: 0; font-size: var(--fs-base); color: var(--text); font-weight: 600; }

/* ============ PORTFOLIO ============ */
.portfolio { padding: var(--sp-9) 0; }
.filter-tabs {
  display: flex; flex-wrap: wrap; justify-content: center; gap: 8px;
  margin-bottom: var(--sp-7);
}
.filter-btn {
  padding: 8px 18px; border-radius: var(--r-full);
  background: var(--surface); border: 1px solid var(--border);
  font-size: var(--fs-sm); font-weight: 600; color: var(--text-muted);
  transition: all var(--transition-fast);
}
.filter-btn:hover { color: var(--text); }
.filter-btn.active { background: var(--accent); color: #fff; border-color: var(--accent); }

.projects-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: var(--sp-6); }
.project-card {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-lg);
  overflow: hidden; transition: all var(--transition-slow);
}
.project-card.hidden { display: none; }
.project-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); }
.project-thumb {
  aspect-ratio: 16/9; overflow: hidden;
  background: linear-gradient(135deg, var(--accent-soft), var(--bg-alt));
  padding: var(--sp-5); display: flex; align-items: center; justify-content: center;
}
/* Thumb mockups (pure CSS) */
.thumb-mock {
  width: 100%; height: 100%; background: var(--surface);
  border-radius: var(--r-md); border: 1px solid var(--border);
  box-shadow: var(--shadow-md); overflow: hidden;
}
.project-body { padding: var(--sp-5); }
.chip {
  display: inline-block; padding: 4px 12px; border-radius: var(--r-full);
  background: var(--accent-soft); color: var(--accent);
  font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .08em;
  margin-bottom: var(--sp-3);
}
.project-body h3 { font-size: var(--fs-lg); }
.project-body p { font-size: var(--fs-sm); }
.tech { font-size: var(--fs-xs); color: var(--text-muted); margin-bottom: var(--sp-4); font-weight: 500; }
.tech-tags { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: var(--sp-4); }
.tech-tags span {
  padding: 4px 10px; border-radius: var(--r-full);
  background: var(--bg-alt); border: 1px solid var(--border);
  font-size: 11px; font-weight: 600; color: var(--text-muted);
}
.project-btn-row { display: flex; flex-wrap: wrap; gap: 10px; }
.center-btn { text-align: center; margin-top: var(--sp-7); }

/* ============ WHY ============ */
.why { padding: var(--sp-9) 0; background: var(--bg-alt); }
.why-grid { display: grid; grid-template-columns: 1fr 1.2fr; gap: var(--sp-8); align-items: start; }
.why-right { display: grid; grid-template-columns: 1fr 1fr; gap: var(--sp-5); }
.why-item {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-lg);
  padding: var(--sp-5); box-shadow: var(--shadow-sm);
}
.why-item h4 { font-size: var(--fs-base); margin-bottom: 6px; color: var(--accent); }
.why-item p { font-size: var(--fs-sm); margin: 0; }

/* ============ PROCESS ============ */
.process { padding: var(--sp-9) 0; }
.timeline {
  list-style: none; padding: 0; margin: 0;
  display: grid; grid-template-columns: repeat(4,1fr); gap: var(--sp-5);
  position: relative;
}
.timeline::before {
  content: ""; position: absolute; top: 26px; left: 5%; right: 5%; height: 2px;
  background: linear-gradient(90deg, var(--accent), var(--accent-2)); opacity: .3;
}
.timeline li {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-lg);
  padding: var(--sp-5); text-align: center; position: relative;
}
.step {
  display: inline-flex; align-items: center; justify-content: center;
  width: 52px; height: 52px; border-radius: 50%;
  background: var(--accent); color: #fff; font-weight: 800;
  margin-bottom: var(--sp-3); box-shadow: 0 6px 16px rgba(79,70,229,.3);
}
.timeline h4 { font-size: var(--fs-base); }
.timeline p { font-size: var(--fs-sm); margin: 0; }

/* ============ SKILLS ============ */
.skills { padding: var(--sp-9) 0; background: var(--bg-alt); }
.skills-grid { display: grid; grid-template-columns: repeat(4,1fr); gap: var(--sp-5); }
.skill-block {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-lg);
  padding: var(--sp-5);
}
.skill-block h4 { font-size: var(--fs-base); color: var(--accent); }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chips span {
  padding: 6px 12px; border-radius: var(--r-full);
  background: var(--bg-alt); border: 1px solid var(--border);
  font-size: var(--fs-xs); font-weight: 600;
}

/* ============ FAQ ============ */
.faq { padding: var(--sp-9) 0; background: var(--bg-alt); }
.faq-wrap { max-width: 820px; }
.faq-list { display: flex; flex-direction: column; gap: 12px; }
.faq-item {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-md);
  overflow: hidden;
}
.faq-q {
  width: 100%; padding: 18px 22px; display: flex; justify-content: space-between; align-items: center;
  font-weight: 600; font-size: var(--fs-base); text-align: left;
}
.plus { font-size: var(--fs-xl); font-weight: 400; color: var(--accent); transition: transform .2s; }
.faq-item.open .plus { transform: rotate(45deg); }
.faq-a {
  max-height: 0; overflow: hidden; transition: max-height .3s ease;
  padding: 0 22px;
}
.faq-item.open .faq-a { max-height: 300px; padding-bottom: 18px; }
.faq-a p { margin: 0; font-size: var(--fs-sm); }

/* ============ CTA FINAL ============ */
.cta-final { padding: var(--sp-9) 0; }
.cta-box {
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  color: #fff; border-radius: var(--r-xl); padding: var(--sp-8);
  text-align: center; box-shadow: var(--shadow-lg);
}
.cta-box h2 { color: #fff; }
.cta-box p { color: rgba(255,255,255,.9); font-size: var(--fs-lg); margin-bottom: var(--sp-5); }
.cta-actions { display: inline-flex; gap: var(--sp-3); flex-wrap: wrap; justify-content: center; }
.cta-box .btn-primary { background: #fff; color: var(--accent); box-shadow: none; }
.cta-box .btn-primary:hover { background: #fff; }
.cta-box .btn-outline { border-color: rgba(255,255,255,.4); color: #fff; }
.cta-box .btn-outline:hover { border-color: #fff; background: rgba(255,255,255,.1); color: #fff; }

/* ============ CONTACT ============ */
.contact { padding: var(--sp-9) 0; background: var(--bg-alt); }
.contact-grid { display: grid; grid-template-columns: 1fr 1.2fr; gap: var(--sp-8); }
.contact-cards { display: grid; grid-template-columns: 1fr 1fr; gap: var(--sp-3); margin-top: var(--sp-5); }
.c-card {
  display: flex; align-items: center; gap: 12px; padding: var(--sp-4);
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-md);
  transition: all var(--transition-fast);
}
.c-card:hover { border-color: var(--accent); transform: translateY(-2px); }
.c-card > span {
  width: 40px; height: 40px; border-radius: 10px;
  background: var(--accent-soft); color: var(--accent);
  display: inline-flex; align-items: center; justify-content: center; font-weight: 700; font-size: 14px;
}
.c-card strong { display: block; font-size: var(--fs-sm); }
.c-card small { color: var(--text-muted); font-size: 11px; }

/* Form */
.contact-form {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-lg);
  padding: var(--sp-6); box-shadow: var(--shadow-md);
  display: flex; flex-direction: column; gap: var(--sp-4);
}
.field { display: flex; flex-direction: column; gap: 6px; }
.field label { font-size: var(--fs-sm); font-weight: 600; }
.field input, .field select, .field textarea {
  padding: 12px 14px; border-radius: var(--r-md);
  border: 1.5px solid var(--border); background: var(--bg-alt); color: var(--text);
  font-family: inherit; font-size: var(--fs-sm); transition: border-color var(--transition-fast);
}
.field input:focus, .field select:focus, .field textarea:focus {
  outline: none; border-color: var(--accent);
}
.field textarea { resize: vertical; }
.row-2 { display: grid; grid-template-columns: 1fr 1fr; gap: var(--sp-4); }
.error { color: var(--danger); font-size: var(--fs-xs); min-height: 16px; }
.form-success {
  padding: 12px; background: rgba(22,163,74,.1); color: var(--success);
  border-radius: var(--r-md); text-align: center; font-weight: 600; font-size: var(--fs-sm); margin: 0;
}
/* Honeypot: visually hidden from real visitors, still reachable by simple spam bots */
.hp-field { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

/* ============ FOOTER ============ */
.site-footer { background: var(--bg); border-top: 1px solid var(--border); padding: var(--sp-8) 0 var(--sp-5); }
.footer-grid {
  display: grid; grid-template-columns: 1.5fr 1fr 1fr 1fr; gap: var(--sp-6);
  padding-bottom: var(--sp-6); border-bottom: 1px solid var(--border);
}
.foot-brand p { font-size: var(--fs-sm); margin-top: var(--sp-3); max-width: 320px; }
.foot-col h5 { font-size: var(--fs-sm); margin-bottom: var(--sp-3); text-transform: uppercase; letter-spacing: .1em; }
.icon-box ul{
  display: flex;
  list-style: none;
  flex-direction: row;
  justify-content: start;
  align-items: center;
  gap: 10px;
  padding: 0;
  margin: 0;
}

.icon-box ul li a {
  display: inline-flex; align-items: center; justify-content: center;
  width: 38px; height: 38px; border-radius: var(--r-full);
  background: var(--surface); border: 1px solid var(--border);
  color: var(--text-muted); font-size: 15px;
  transition: all var(--transition-fast);
}
.icon-box ul li a:hover { background: var(--accent-soft); border-color: var(--accent); color: var(--accent); }
.icon-box ul li a img { width: 18px; height: 18px; object-fit: contain; }

.foot-col ul { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 10px; }
.foot-col a { color: var(--text-muted); font-size: var(--fs-sm); }
.foot-col a:hover { color: var(--accent); }
.foot-email { margin-top: var(--sp-4); font-size: var(--fs-sm); color: var(--text-muted); }
.foot-bottom {
  display: flex; justify-content: space-between; align-items: center;
  padding-top: var(--sp-5); color: var(--text-muted);
}
.foot-bottom a:hover { color: var(--accent); }

/* ============ BACK TO TOP ============ */
.back-to-top {
  position: fixed; bottom: 24px; right: 24px; z-index: 90;
  width: 46px; height: 46px; border-radius: 50%;
  background: var(--accent); color: #fff; font-size: 20px; font-weight: 700;
  box-shadow: var(--shadow-lg); opacity: 0; visibility: hidden;
  transform: translateY(10px); transition: all var(--transition-base);
}
.back-to-top.visible { opacity: 1; visibility: visible; transform: translateY(0); }
.back-to-top:hover { transform: translateY(-3px); }

/* ============ SCROLL REVEAL ============ */
.reveal { opacity: 0; transform: translateY(20px); transition: opacity .6s ease, transform .6s ease; }
.reveal.visible { opacity: 1; transform: translateY(0); }

.hero-visual img{
  transform: scale(1.15);
}

.hero-trust-line {
  font-size: var(--fs-xs);
  color: var(--text-muted);
  font-weight: 600;
  margin: -8px 0 var(--sp-5);
}

/* ============ RESPONSIVE ============ */
@media (max-width: 1024px) {
  .expertise-grid { grid-template-columns: repeat(3, 1fr); }
  .services-grid, .skills-grid { grid-template-columns: repeat(2, 1fr); }
  .timeline { grid-template-columns: repeat(2, 1fr); }
  .timeline::before { display: none; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .pricing-grid { grid-template-columns: 1fr; max-width: 480px; margin: 0 auto; }
}

@media (max-width: 820px) {
  .main-nav {
    position: fixed; top: var(--header-h); left: 0; right: 0;
    background: var(--bg); border-bottom: 1px solid var(--border);
    padding: var(--sp-5); transform: translateY(-120%); transition: transform .3s;
    max-height: calc(100vh - var(--header-h)); overflow-y: auto;
  }
  .main-nav.open { transform: translateY(0); }
  .main-nav ul { flex-direction: column; gap: var(--sp-4); }
  .cta-desktop { display: none; }
  .hamburger { display: inline-flex; }

  .hero-grid, .about-grid, .why-grid, .contact-grid { grid-template-columns: 1fr; gap: var(--sp-6); }
  .why-right { grid-template-columns: 1fr; }
  .projects-grid { grid-template-columns: 1fr; }
  .hero-visual { min-height: 420px; margin-top: var(--sp-5); }
}

@media (max-width: 560px) {
  .expertise-grid { grid-template-columns: repeat(2, 1fr); }
  .services-grid, .skills-grid { grid-template-columns: 1fr; }
  .stats { grid-template-columns: 1fr; }
  .row-2 { grid-template-columns: 1fr; }
  .contact-cards { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; }
  .foot-bottom { flex-direction: column; gap: 8px; text-align: center; }
  .cta-box { padding: var(--sp-6) var(--sp-5); }
  .hero { padding: var(--sp-7) 0 var(--sp-6); }
  .about-preview, .services, .pricing, .portfolio, .why, .process, .skills, .faq, .cta-final, .contact { padding: var(--sp-8) 0; }
}

/* ============================================================
   CASE STUDY PAGES
   ============================================================ */

/* Breadcrumb-style back link under header */
.case-topbar { padding: var(--sp-5) 0 0; }
.back-link {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: var(--fs-sm); font-weight: 600; color: var(--text-muted);
}
.back-link:hover { color: var(--accent); }

/* Case Hero */
.case-hero { padding: var(--sp-7) 0 var(--sp-8); }
.case-hero-head { max-width: 760px; margin: 0 auto var(--sp-6); text-align: center; }
.case-hero-head .chip { margin-bottom: var(--sp-3); }
.case-hero-head h1 { margin-bottom: var(--sp-3); }
.case-hero-head .case-summary { font-size: var(--fs-lg); color: var(--text-muted); margin-bottom: var(--sp-5); }
.case-hero-actions { display: flex; gap: var(--sp-3); justify-content: center; flex-wrap: wrap; }
.case-cover {
  margin-top: var(--sp-7); border-radius: var(--r-xl); overflow: hidden;
  border: 1px solid var(--border); box-shadow: var(--shadow-lg);
  background: var(--surface);
}
.case-cover img { width: 100%; display: block; }

/* Overview */
.case-overview { padding: var(--sp-8) 0; background: var(--bg-alt); }
.overview-grid {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--sp-5);
}
.overview-item {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-md);
  padding: var(--sp-5);
}
.overview-item span { display: block; font-size: var(--fs-xs); text-transform: uppercase; letter-spacing: .08em; color: var(--accent); font-weight: 700; margin-bottom: 6px; }
.overview-item strong { display: block; font-size: var(--fs-base); color: var(--text); font-weight: 700; }

/* Two-column narrative blocks (Challenge / Solution) */
.case-narrative { padding: var(--sp-8) 0; }
.case-narrative .container { max-width: 860px; }
.case-narrative h2 { font-size: var(--fs-3xl); }
.case-narrative p { font-size: var(--fs-base); color: var(--text-muted); }
.case-narrative + .case-narrative { padding-top: 0; }

/* Key Features */
.case-features { padding: var(--sp-8) 0; background: var(--bg-alt); }
.feature-grid { display: grid; grid-template-columns: repeat(5, 1fr); gap: var(--sp-4); }
.feature-item {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-md);
  padding: var(--sp-4); text-align: center; font-size: var(--fs-sm); font-weight: 600;
}
.feature-item .f-icon { font-size: 22px; margin-bottom: 8px; display: block; }

/* Technology Stack */
.case-tech { padding: var(--sp-8) 0; }
.tech-badge-row { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; }
.tech-badge {
  padding: 8px 16px; border-radius: var(--r-full);
  background: var(--accent-soft); color: var(--accent);
  font-size: var(--fs-sm); font-weight: 700;
}

/* Gallery */
.case-gallery { padding: var(--sp-8) 0; background: var(--bg-alt); }
.gallery-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--sp-4); }
.gallery-item {
  border-radius: var(--r-md); overflow: hidden; border: 1px solid var(--border);
  cursor: zoom-in; box-shadow: var(--shadow-sm); transition: transform .2s, box-shadow .2s;
  aspect-ratio: 4/3; background: var(--surface);
}
.gallery-item img { width: 100%; height: 100%; object-fit: cover; }
.gallery-item:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); }

/* Lightbox */
.lightbox {
  position: fixed; inset: 0; z-index: 200; background: rgba(10,12,20,.9);
  display: flex; align-items: center; justify-content: center; padding: var(--sp-6);
  opacity: 0; visibility: hidden; transition: opacity .2s ease;
}
.lightbox.open { opacity: 1; visibility: visible; }
.lightbox img { max-width: min(900px, 92vw); max-height: 85vh; border-radius: var(--r-md); box-shadow: var(--shadow-lg); }
.lightbox-close {
  position: absolute; top: 20px; right: 24px; width: 44px; height: 44px;
  border-radius: 50%; background: rgba(255,255,255,.12); color: #fff;
  font-size: 22px; display: inline-flex; align-items: center; justify-content: center;
}
.lightbox-close:hover { background: rgba(255,255,255,.22); }

/* Results */
.case-results { padding: var(--sp-8) 0; }
.results-grid { display: grid; grid-template-columns: repeat(5, 1fr); gap: var(--sp-4); }
.result-item {
  text-align: center; padding: var(--sp-5) var(--sp-3);
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-md);
}
.result-item .r-icon { color: var(--success); font-size: 20px; display: block; margin-bottom: 8px; }
.result-item span { font-size: var(--fs-sm); font-weight: 600; }

/* Project Nav (prev/next) */
.case-project-nav { padding: var(--sp-6) 0; }
.project-nav-grid { display: grid; grid-template-columns: 1fr 1fr; gap: var(--sp-4); }
.nav-link-card {
  border: 1px solid var(--border); border-radius: var(--r-md); padding: var(--sp-5);
  background: var(--surface); transition: all var(--transition-fast);
}
.nav-link-card:hover { border-color: var(--accent); transform: translateY(-2px); }
.nav-link-card.next { text-align: right; }
.nav-link-card span { display: block; font-size: var(--fs-xs); color: var(--text-muted); text-transform: uppercase; letter-spacing: .08em; margin-bottom: 6px; }
.nav-link-card strong { font-size: var(--fs-base); color: var(--text); }

/* Case Final CTA reuses .cta-final/.cta-box from homepage */

/* Responsive: case study */
@media (max-width: 1024px) {
  .overview-grid { grid-template-columns: repeat(2, 1fr); }
  .feature-grid { grid-template-columns: repeat(3, 1fr); }
  .gallery-grid { grid-template-columns: repeat(2, 1fr); }
  .results-grid { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 640px) {
  .overview-grid { grid-template-columns: 1fr; }
  .feature-grid { grid-template-columns: repeat(2, 1fr); }
  .gallery-grid { grid-template-columns: 1fr; }
  .results-grid { grid-template-columns: repeat(2, 1fr); }
  .project-nav-grid { grid-template-columns: 1fr; }
  .nav-link-card.next { text-align: left; }
  .case-hero-actions { flex-direction: column; align-items: stretch; }
  .case-hero-actions .btn { width: 100%; }
}
