/* =============================================================
   K-Y Web Studio — style.css
   Personal portfolio by Khadiga Yahia
   Design: purple/blue gradient accent · light & dark themes
   ============================================================= */

/* ── 1. DESIGN TOKENS ──────────────────────────────────────── */
:root {
  /* Accent palette */
  --accent-1:        #6c3fe8;
  --accent-2:        #4f76f6;
  --accent-grad:     linear-gradient(135deg, var(--accent-1), var(--accent-2));
  --accent-soft:     rgba(108, 63, 232, 0.08);
  --accent-border:   rgba(108, 63, 232, 0.22);

  /* Light theme surfaces */
  --bg:              #f8f9fc;
  --bg-2:            #ffffff;
  --bg-3:            #f0f2f9;
  --surface:         #ffffff;
  --surface-raised:  #ffffff;
  --border:          #e4e6ee;

  /* Light theme text */
  --text-primary:    #0f0f1a;
  --text-secondary:  #4a4a6a;
  --text-muted:      #8b8baa;

  /* Typography */
  --font-base: 'Inter', system-ui, -apple-system, sans-serif;
  --font-head: 'Space Grotesk', 'Inter', system-ui, sans-serif;

  /* Layout */
  --section-pad: clamp(64px, 8vw, 112px);
  --container:   1200px;
  --gap:         1.5rem;
  --navbar-h:    68px;

  /* Border radius */
  --r-sm:  6px;
  --r-md:  12px;
  --r-lg:  20px;
  --r-xl:  28px;

  /* Shadows */
  --shadow-sm:     0 1px 3px rgba(0,0,0,.06), 0 1px 2px rgba(0,0,0,.04);
  --shadow-md:     0 4px 16px rgba(0,0,0,.08), 0 1px 4px rgba(0,0,0,.04);
  --shadow-lg:     0 16px 40px rgba(0,0,0,.10), 0 4px 8px rgba(0,0,0,.04);
  --shadow-accent: 0 8px 32px rgba(108, 63, 232, 0.25);

  /* Motion */
  --ease:     cubic-bezier(0.4, 0, 0.2, 1);
  --dur-fast: 180ms;
  --dur-med:  300ms;
  --dur-slow: 520ms;
}

/* Dark theme overrides */
[data-theme="dark"] {
  --bg:             #0c0c1a;
  --bg-2:           #111127;
  --bg-3:           #161630;
  --surface:        #141430;
  --surface-raised: #1c1c3a;
  --border:         #252545;
  --text-primary:   #e8e8f5;
  --text-secondary: #9898c0;
  --text-muted:     #5a5a80;
  --accent-soft:    rgba(108, 63, 232, 0.14);
  --accent-border:  rgba(108, 63, 232, 0.32);
  --shadow-sm:      0 1px 3px rgba(0,0,0,.3);
  --shadow-md:      0 4px 16px rgba(0,0,0,.32);
  --shadow-lg:      0 16px 40px rgba(0,0,0,.45);
}

/* ── 2. RESET & BASE ───────────────────────────────────────── */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

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

body {
  font-family: var(--font-base);
  font-size: 1rem;
  line-height: 1.65;
  color: var(--text-primary);
  background: var(--bg);
  overflow-x: hidden;
  transition:
    background var(--dur-med) var(--ease),
    color      var(--dur-med) var(--ease);
}

img, svg { display: block; max-width: 100%; }
a        { color: inherit; text-decoration: none; }
button   { font-family: inherit; cursor: pointer; border: none; background: none; }
ul       { list-style: none; }
input, textarea, button { font-size: inherit; }
code { font-family: 'Courier New', Consolas, monospace; }

/* ── 3. LAYOUT UTILITIES ───────────────────────────────────── */
.container {
  width: 100%;
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: clamp(16px, 5vw, 40px);
}

.section { padding-block: var(--section-pad); }

/* ── 4. TYPOGRAPHY UTILITIES ───────────────────────────────── */
.gradient-text {
  background: var(--accent-grad);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  display: block;
}

.section-badge {
  display: inline-flex;
  align-items: center;
  padding: 4px 14px;
  border-radius: 999px;
  background: var(--accent-soft);
  border: 1.5px solid var(--accent-border);
  color: var(--accent-1);
  font-size: .78rem;
  font-weight: 600;
  letter-spacing: .06em;
  text-transform: uppercase;
  margin-bottom: 1rem;
}

.section-header {
  text-align: center;
  max-width: 640px;
  margin-inline: auto;
  margin-bottom: clamp(48px, 6vw, 72px);
}
.section-header--left {
  text-align: left;
  margin-inline: 0;
}

.section-title {
  font-family: var(--font-head);
  font-size: clamp(1.75rem, 3.5vw, 2.5rem);
  font-weight: 700;
  line-height: 1.2;
  color: var(--text-primary);
  margin-bottom: .75rem;
}

.section-subtitle {
  color: var(--text-secondary);
  font-size: 1.05rem;
  line-height: 1.75;
}

/* ── 5. BUTTON SYSTEM ──────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .5rem;
  padding: .75rem 1.75rem;
  border-radius: var(--r-md);
  font-weight: 600;
  font-size: .95rem;
  border: 2px solid transparent;
  white-space: nowrap;
  cursor: pointer;
  transition: all var(--dur-med) var(--ease);
}

.btn--primary {
  background: var(--accent-grad);
  color: #fff;
  box-shadow: var(--shadow-accent);
}
.btn--primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 36px rgba(108, 63, 232, 0.36);
}
.btn--primary:active { transform: none; }

.btn--outline {
  border-color: var(--accent-border);
  color: var(--accent-1);
  background: transparent;
}
.btn--outline:hover {
  background: var(--accent-soft);
  border-color: var(--accent-1);
  transform: translateY(-2px);
}

.btn--ghost {
  border-color: var(--border);
  color: var(--text-secondary);
  background: transparent;
}
.btn--ghost:hover {
  background: var(--accent-soft);
  border-color: var(--accent-border);
  color: var(--accent-1);
}

.btn--sm   { padding: .5rem 1.1rem; font-size: .85rem; }
.btn--full { width: 100%; }

/* ── 6. SCROLL REVEAL ──────────────────────────────────────── */
.reveal-up,
.reveal-left,
.reveal-right {
  opacity: 0;
  transition-delay: var(--delay, 0s);
  transition:
    opacity  var(--dur-slow) var(--ease),
    transform var(--dur-slow) var(--ease);
}
.reveal-up    { transform: translateY(30px); }
.reveal-left  { transform: translateX(-36px); }
.reveal-right { transform: translateX(36px); }

.reveal-up.is-visible,
.reveal-left.is-visible,
.reveal-right.is-visible {
  opacity: 1;
  transform: none;
}

/* ── 7. NAVBAR ─────────────────────────────────────────────── */
.navbar {
  position: fixed;
  inset: 0 0 auto;
  z-index: 1000;
  height: var(--navbar-h);
  display: flex;
  align-items: center;
  background: transparent;
  transition:
    background       var(--dur-med) var(--ease),
    box-shadow       var(--dur-med) var(--ease),
    backdrop-filter  var(--dur-med) var(--ease);
}
.navbar.scrolled {
  background: rgba(248, 249, 252, 0.88);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  box-shadow: var(--shadow-sm);
}
[data-theme="dark"] .navbar.scrolled {
  background: rgba(12, 12, 26, 0.88);
}

.navbar__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  width: 100%;
}

/* Logo */
.navbar__logo {
  display: flex;
  align-items: center;
  gap: .55rem;
  font-family: var(--font-head);
  font-weight: 700;
  font-size: 1.15rem;
  color: var(--text-primary);
  text-decoration: none;
  transition: opacity var(--dur-fast) var(--ease);
}
.navbar__logo:hover { opacity: .8; }

.logo-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: var(--r-sm);
  background: var(--accent-grad);
  color: #fff;
  font-family: var(--font-head);
  font-weight: 800;
  font-size: .9rem;
  letter-spacing: .02em;
  flex-shrink: 0;
}

.logo-text {
  font-weight: 600;
  letter-spacing: -.01em;
}

/* Nav links */
.navbar__nav {
  display: flex;
  align-items: center;
  gap: .2rem;
}

.nav-link {
  padding: .45rem .85rem;
  border-radius: var(--r-sm);
  font-size: .92rem;
  font-weight: 500;
  color: var(--text-secondary);
  transition:
    color       var(--dur-fast) var(--ease),
    background  var(--dur-fast) var(--ease);
}
.nav-link:hover,
.nav-link.active {
  color: var(--accent-1);
  background: var(--accent-soft);
}

.navbar__actions {
  display: flex;
  align-items: center;
  gap: .5rem;
}

/* Theme toggle */
.theme-toggle {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  border: 1.5px solid var(--border);
  background: var(--surface);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  color: var(--text-secondary);
  transition: all var(--dur-fast) var(--ease);
}
.theme-toggle:hover {
  border-color: var(--accent-border);
  color: var(--accent-1);
  background: var(--accent-soft);
}

/* Hamburger */
.hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  width: 32px;
  padding: 4px 2px;
}
.bar {
  height: 2px;
  border-radius: 2px;
  background: var(--text-primary);
  transition:
    transform var(--dur-med) var(--ease),
    opacity   var(--dur-med) var(--ease);
}
.hamburger.is-open .bar:nth-child(1) { transform: rotate(45deg) translate(5px, 5px); }
.hamburger.is-open .bar:nth-child(2) { opacity: 0; transform: scaleX(0); }
.hamburger.is-open .bar:nth-child(3) { transform: rotate(-45deg) translate(5px, -5px); }

/* ── 8. HERO ───────────────────────────────────────────────── */
.hero {
  position: relative;
  min-height: 100svh;
  display: flex;
  align-items: center;
  padding-top:    calc(var(--navbar-h) + 2rem);
  padding-bottom: 4rem;
  overflow: hidden;
  background: var(--bg);
}

/* Dot-grid background */
.hero__bg-grid {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(var(--border) 1px, transparent 1px),
    linear-gradient(90deg, var(--border) 1px, transparent 1px);
  background-size: 48px 48px;
  opacity: .4;
  mask-image: radial-gradient(ellipse 80% 60% at 50% 0%, black 20%, transparent 100%);
  -webkit-mask-image: radial-gradient(ellipse 80% 60% at 50% 0%, black 20%, transparent 100%);
  pointer-events: none;
}

/* Ambient orbs */
.hero__orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(80px);
  pointer-events: none;
}
.hero__orb--1 {
  width: clamp(260px, 38vw, 520px);
  height: clamp(260px, 38vw, 520px);
  background: rgba(108, 63, 232, 0.15);
  top: -8%;
  right: -4%;
}
.hero__orb--2 {
  width: clamp(180px, 28vw, 380px);
  height: clamp(180px, 28vw, 380px);
  background: rgba(79, 118, 246, 0.12);
  bottom: 6%;
  left: -6%;
}

.hero__inner {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(2rem, 6vw, 5rem);
  align-items: center;
  position: relative;
  z-index: 1;
}

.hero__badge {
  display: inline-flex;
  align-items: center;
  padding: .4rem 1rem;
  border-radius: 999px;
  border: 1.5px solid var(--accent-border);
  background: var(--accent-soft);
  color: var(--accent-1);
  font-size: .8rem;
  font-weight: 600;
  letter-spacing: .04em;
  margin-bottom: 1.5rem;
}

.hero__heading {
  font-family: var(--font-head);
  font-size: clamp(2rem, 4.5vw, 3.4rem);
  font-weight: 800;
  line-height: 1.1;
  color: var(--text-primary);
  margin-bottom: 1.25rem;
}

.hero__description {
  color: var(--text-secondary);
  font-size: clamp(1rem, 1.5vw, 1.08rem);
  line-height: 1.78;
  max-width: 520px;
  margin-bottom: 2rem;
}

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

.hero__tech-stack {
  display: flex;
  flex-wrap: wrap;
  gap: .45rem;
}

.tech-tag {
  padding: .3rem .85rem;
  border-radius: 999px;
  border: 1.5px solid var(--border);
  font-size: .78rem;
  font-weight: 500;
  color: var(--text-muted);
  background: var(--surface);
  transition: all var(--dur-fast) var(--ease);
}
.tech-tag:hover {
  border-color: var(--accent-border);
  color: var(--accent-1);
}

/* Code window */
.hero__visual { position: relative; }

.code-window {
  border-radius: var(--r-lg);
  border: 1.5px solid var(--border);
  box-shadow: var(--shadow-lg);
  background: var(--surface);
  overflow: hidden;
}

.code-window__bar {
  display: flex;
  align-items: center;
  gap: .45rem;
  padding: .7rem 1rem;
  background: var(--bg-3);
  border-bottom: 1px solid var(--border);
}

.dot {
  width: 11px;
  height: 11px;
  border-radius: 50%;
}
.dot--red    { background: #ff5f57; }
.dot--yellow { background: #febc2e; }
.dot--green  { background: #28c840; }

.code-window__title {
  font-size: .76rem;
  color: var(--text-muted);
  margin-left: auto;
  font-family: 'Courier New', monospace;
}

.code-window__body {
  padding: 1.5rem;
  overflow-x: auto;
}

.code-window__body pre {
  margin: 0;
  font-family: 'Courier New', Consolas, monospace;
  font-size: .84rem;
  line-height: 1.8;
  color: var(--text-primary);
}

/* Syntax tokens */
.kw  { color: #7c3aed; font-weight: 600; }
.cls { color: #2563eb; }
.fn  { color: #059669; }
.str { color: #c2410c; }
.cm  { color: var(--text-muted); font-style: italic; }

[data-theme="dark"] .kw  { color: #a78bfa; }
[data-theme="dark"] .cls { color: #60a5fa; }
[data-theme="dark"] .fn  { color: #34d399; }
[data-theme="dark"] .str { color: #fb923c; }

/* Floating accent cards */
.floating-card {
  position: absolute;
  display: flex;
  align-items: center;
  gap: .5rem;
  padding: .6rem 1rem;
  border-radius: var(--r-md);
  background: var(--surface-raised);
  border: 1.5px solid var(--border);
  box-shadow: var(--shadow-md);
  font-size: .8rem;
  font-weight: 600;
  color: var(--text-primary);
  white-space: nowrap;
  animation: float 4s ease-in-out infinite;
}
.floating-card--1 { bottom: -22px; left:  -18px; animation-delay: 0s;  }
.floating-card--2 { top:   -18px;  right: -14px; animation-delay: 2s;  }
.fc-icon { font-size: 1rem; }

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

/* Scroll cue */
.hero__scroll-cue {
  position: absolute;
  bottom: 2rem;
  left: 50%;
  transform: translateX(-50%);
}
.scroll-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--text-muted);
  animation: scroll-pulse 2s ease-in-out infinite;
}
@keyframes scroll-pulse {
  0%, 100% { transform: translateY(0);    opacity: 1; }
  50%       { transform: translateY(10px); opacity: .3; }
}

/* ── 9. SERVICES ───────────────────────────────────────────── */
.services { background: var(--bg-2); }

.services__grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: var(--gap);
}

.service-card {
  padding: 2rem;
  border-radius: var(--r-lg);
  border: 1.5px solid var(--border);
  background: var(--surface);
  transition: all var(--dur-med) var(--ease);
  position: relative;
  cursor: default;
}
.service-card:hover {
  border-color: var(--accent-border);
  box-shadow: var(--shadow-accent);
  transform: translateY(-4px);
}

.service-card__icon {
  width: 52px;
  height: 52px;
  color: var(--accent-1);
  margin-bottom: 1.25rem;
  transition: transform var(--dur-med) var(--ease);
}
.service-card:hover .service-card__icon { transform: scale(1.08); }

.service-card__title {
  font-family: var(--font-head);
  font-size: 1.08rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: .6rem;
}

.service-card__desc {
  color: var(--text-secondary);
  font-size: .9rem;
  line-height: 1.72;
}

.service-card__arrow {
  margin-top: 1.25rem;
  color: var(--accent-1);
  font-size: 1.1rem;
  opacity: 0;
  transform: translateX(-8px);
  transition:
    opacity   var(--dur-med) var(--ease),
    transform var(--dur-med) var(--ease);
}
.service-card:hover .service-card__arrow { opacity: 1; transform: translateX(0); }

/* ── 10. ABOUT ─────────────────────────────────────────────── */
.about { background: var(--bg); }

.about__inner {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(2.5rem, 6vw, 5rem);
  align-items: center;
}

.about__text {
  color: var(--text-secondary);
  margin-bottom: 1.1rem;
  line-height: 1.82;
}

/* Stats row */
.about__stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
  margin-top: 2.5rem;
  padding-top: 2rem;
  border-top: 1px solid var(--border);
}

.stat-item { text-align: center; }

.stat-number {
  display: block;
  font-family: var(--font-head);
  font-size: clamp(1.6rem, 3vw, 2.2rem);
  font-weight: 800;
  background: var(--accent-grad);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  line-height: 1;
  margin-bottom: .3rem;
}

.stat-label {
  display: block;
  font-size: .82rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: .18rem;
}

.stat-note {
  display: block;
  font-size: .7rem;
  color: var(--text-muted);
}

/* Stacked card visual */
.about-card-stack {
  position: relative;
  height: 400px;
}

.about-card {
  position: absolute;
  border-radius: var(--r-xl);
}

.about-card--back {
  inset: 0;
  background: linear-gradient(135deg, rgba(108,63,232,.05), rgba(79,118,246,.05));
  border: 1.5px solid var(--border);
  transform: rotate(4deg) translateY(8px);
}

.about-card--mid {
  inset: 0;
  background: linear-gradient(135deg, rgba(108,63,232,.08), rgba(79,118,246,.08));
  border: 1.5px solid var(--accent-border);
  transform: rotate(2deg) translateY(4px);
}

.about-card--front {
  inset: 0;
  background: var(--surface);
  border: 1.5px solid var(--border);
  box-shadow: var(--shadow-lg);
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 2rem;
}

.skill-card-title {
  font-family: var(--font-head);
  font-size: .82rem;
  font-weight: 700;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 1.5rem;
}

.skill-bar-group { display: flex; flex-direction: column; gap: 1.4rem; }

.skill-bar__label {
  display: flex;
  justify-content: space-between;
  font-size: .82rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: .45rem;
}
.skill-bar__label span:last-child {
  color: var(--text-muted);
  font-weight: 400;
}

.skill-bar__track {
  height: 6px;
  border-radius: 999px;
  background: var(--bg-3);
  overflow: hidden;
}

.skill-bar__fill {
  height: 100%;
  width: 0;
  border-radius: 999px;
  background: var(--accent-grad);
  transition: width 1.2s var(--ease) .2s;
}
.skill-bar__fill.animated { width: var(--w); }

/* ── 11. WHY CHOOSE ME ─────────────────────────────────────── */
.why { background: var(--bg-2); }

.why__grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: var(--gap);
}

.why-card {
  padding: 2rem;
  border-radius: var(--r-lg);
  border: 1.5px solid var(--border);
  background: var(--surface);
  position: relative;
  overflow: hidden;
  transition: all var(--dur-med) var(--ease);
}
.why-card:hover {
  border-color: var(--accent-border);
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
}

.why-card__num {
  position: absolute;
  top: 1.2rem;
  right: 1.4rem;
  font-family: var(--font-head);
  font-size: 2.4rem;
  font-weight: 800;
  color: var(--border);
  line-height: 1;
  transition: color var(--dur-med) var(--ease);
}
.why-card:hover .why-card__num { color: var(--accent-border); }

.why-card__icon {
  width: 40px;
  height: 40px;
  color: var(--accent-1);
  margin-bottom: 1rem;
}

.why-card__title {
  font-family: var(--font-head);
  font-size: 1.02rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: .6rem;
}

.why-card__desc {
  font-size: .88rem;
  color: var(--text-secondary);
  line-height: 1.72;
}

/* ── 12. PROJECTS ──────────────────────────────────────────── */
.projects { background: var(--bg); }

.projects__grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: var(--gap);
}

.project-card {
  border-radius: var(--r-lg);
  border: 1.5px solid var(--border);
  background: var(--surface);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: all var(--dur-med) var(--ease);
}
.project-card:hover {
  border-color: var(--accent-border);
  box-shadow: var(--shadow-md);
  transform: translateY(-4px);
}

/* CSS-drawn project visuals */
.project-card__visual {
  height: 200px;
  padding: 1.25rem;
  display: flex;
  align-items: center;
  justify-content: center;
}

.project-card__visual--ecommerce {
  background: linear-gradient(135deg, #ede9fe, #dbeafe);
}
[data-theme="dark"] .project-card__visual--ecommerce {
  background: linear-gradient(135deg, #1e1046, #0f1f4a);
}

.project-card__visual--dashboard {
  background: linear-gradient(135deg, #ecfdf5, #dbeafe);
}
[data-theme="dark"] .project-card__visual--dashboard {
  background: linear-gradient(135deg, #0a2010, #0f1f4a);
}

.project-card__visual--tasks {
  background: linear-gradient(135deg, #fdf4ff, #ede9fe);
}
[data-theme="dark"] .project-card__visual--tasks {
  background: linear-gradient(135deg, #1a0a26, #1e1046);
}

/* Mockup shell */
.proj-mockup {
  width: 90%;
  height: 140px;
  border-radius: var(--r-md);
  overflow: hidden;
  border: 1px solid var(--border);
  background: var(--surface);
  box-shadow: var(--shadow-md);
}

.pm-bar {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: .38rem .6rem;
  background: var(--bg-3);
  border-bottom: 1px solid var(--border);
}
.pm-bar span { width: 8px; height: 8px; border-radius: 50%; background: var(--border); }

.pm-body {
  height: calc(100% - 26px);
  padding: .5rem;
  display: flex;
  flex-direction: column;
  gap: .35rem;
}

/* E-commerce mockup */
.pm-nav  { height: 12px; border-radius: 3px; background: var(--accent-soft); }
.pm-items {
  flex: 1;
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: .35rem;
}
.pm-item {
  border-radius: 3px;
  background: linear-gradient(135deg, var(--accent-soft), rgba(79,118,246,.1));
  border: 1px solid var(--accent-border);
}
.pm-cart-btn {
  height: 11px;
  width: 50%;
  border-radius: 3px;
  background: var(--accent-grad);
  margin-left: auto;
}

/* Dashboard mockup */
.pm-body--dash {
  flex-direction: row;
  padding: .45rem;
  gap: .45rem;
}
.pm-sidebar {
  width: 28%;
  border-radius: 3px;
  background: var(--accent-soft);
}
.pm-content {
  flex: 1;
  display: flex;
  align-items: flex-end;
  gap: .28rem;
  padding: .35rem .2rem .2rem;
}
.pm-chart-bar {
  flex: 1;
  border-radius: 3px 3px 0 0;
  background: var(--accent-grad);
  opacity: .7;
}

/* Task board mockup */
.pm-body--tasks {
  flex-direction: row;
  padding: .45rem;
  gap: .4rem;
}
.pm-col { flex: 1; display: flex; flex-direction: column; gap: .28rem; }
.pm-col-head {
  height: 10px;
  border-radius: 3px;
  background: var(--accent-soft);
  margin-bottom: .2rem;
}
.pm-task {
  height: 22px;
  border-radius: 3px;
  background: var(--bg-3);
  border: 1px solid var(--border);
}
.pm-task--done {
  background: var(--accent-soft);
  border-color: var(--accent-border);
  opacity: .7;
}

/* Project card body */
.project-card__body {
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: .72rem;
  flex: 1;
}

.project-card__meta { display: flex; gap: .5rem; }

.project-label {
  display: inline-flex;
  align-items: center;
  padding: .2rem .7rem;
  border-radius: 999px;
  font-size: .7rem;
  font-weight: 700;
  letter-spacing: .05em;
  text-transform: uppercase;
  background: rgba(234,179,8,.1);
  color: #b45309;
  border: 1px solid rgba(234,179,8,.22);
}
[data-theme="dark"] .project-label { color: #fbbf24; }

.project-card__title {
  font-family: var(--font-head);
  font-size: 1.08rem;
  font-weight: 700;
  color: var(--text-primary);
}

.project-card__desc {
  font-size: .88rem;
  color: var(--text-secondary);
  line-height: 1.72;
  flex: 1;
}

.project-card__tags {
  display: flex;
  flex-wrap: wrap;
  gap: .38rem;
}

.tag {
  padding: .18rem .62rem;
  border-radius: var(--r-sm);
  font-size: .72rem;
  font-weight: 600;
  background: var(--bg-3);
  color: var(--text-secondary);
  border: 1px solid var(--border);
}

/* ── 13. APPROACH ──────────────────────────────────────────── */
.approach { background: var(--bg-2); }

.approach__steps {
  display: flex;
  align-items: flex-start;
  justify-content: center;
}

.approach-step {
  flex: 1;
  max-width: 300px;
  text-align: center;
  padding: 2rem 1.5rem;
}

.approach-step__number {
  display: block;
  font-family: var(--font-head);
  font-size: .74rem;
  font-weight: 700;
  letter-spacing: .1em;
  color: var(--accent-1);
  margin-bottom: 1rem;
}

.approach-step__icon {
  width: 72px;
  height: 72px;
  margin: 0 auto 1.25rem;
  padding: 1rem;
  border-radius: 50%;
  background: var(--accent-soft);
  border: 2px solid var(--accent-border);
  color: var(--accent-1);
}

.approach-step__title {
  font-family: var(--font-head);
  font-size: 1.12rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: .65rem;
}

.approach-step__desc {
  font-size: .9rem;
  color: var(--text-secondary);
  line-height: 1.72;
}

.approach-step__connector {
  display: flex;
  align-items: center;
  padding-top: 80px;
  flex-shrink: 0;
}

.connector-line {
  width: 56px;
  height: 2px;
  background: linear-gradient(90deg, var(--accent-1), var(--accent-2));
  opacity: .35;
  border-radius: 2px;
}

/* ── 14. CONTACT ───────────────────────────────────────────── */
.contact { background: var(--bg); }

.contact__inner {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(2.5rem, 6vw, 5rem);
  align-items: start;
}

.contact__text {
  color: var(--text-secondary);
  margin-bottom: 2rem;
  line-height: 1.8;
}

.contact__details { display: flex; flex-direction: column; gap: .85rem; }

.contact-detail {
  display: flex;
  align-items: flex-start;
  gap: .75rem;
  font-size: .9rem;
  color: var(--text-secondary);
}

.contact-detail em {
  display: block;
  font-size: .78rem;
  color: var(--text-muted);
  font-style: normal;
}

.contact-detail__icon { font-size: 1.05rem; flex-shrink: 0; margin-top: .1rem; }

/* Form */
.contact-form { display: flex; flex-direction: column; gap: 1.25rem; }
.form-group   { display: flex; flex-direction: column; gap: .38rem; }

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

.form-group input,
.form-group textarea {
  padding: .72rem 1rem;
  border-radius: var(--r-md);
  border: 1.5px solid var(--border);
  background: var(--surface);
  color: var(--text-primary);
  outline: none;
  resize: vertical;
  transition:
    border-color var(--dur-fast) var(--ease),
    box-shadow   var(--dur-fast) var(--ease);
}
.form-group input:focus,
.form-group textarea:focus {
  border-color: var(--accent-1);
  box-shadow: 0 0 0 3px rgba(108,63,232,.12);
}
.form-group input.is-error,
.form-group textarea.is-error { border-color: #ef4444; }

.form-error {
  display: block;
  min-height: 1rem;
  font-size: .76rem;
  color: #ef4444;
}

.form-success {
  display: flex;
  align-items: flex-start;
  gap: .65rem;
  padding: 1rem 1.2rem;
  border-radius: var(--r-md);
  background: rgba(34,197,94,.08);
  border: 1.5px solid rgba(34,197,94,.24);
  color: #16a34a;
  font-size: .9rem;
}
[data-theme="dark"] .form-success { color: #4ade80; }

.form-success em {
  display: block;
  font-style: normal;
  font-size: .78rem;
  color: var(--text-muted);
  margin-top: .2rem;
}

.form-success__icon {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: rgba(34,197,94,.15);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: .82rem;
  flex-shrink: 0;
}

/* ── 15. FOOTER ────────────────────────────────────────────── */
.footer {
  background: var(--bg-2);
  border-top: 1px solid var(--border);
  padding-top: 4rem;
}

.footer__inner {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 3rem;
  padding-bottom: 3rem;
  border-bottom: 1px solid var(--border);
}

.footer__logo { margin-bottom: .75rem; }

.footer__desc {
  font-size: .88rem;
  color: var(--text-secondary);
  line-height: 1.72;
  max-width: 360px;
  margin-bottom: 1.5rem;
}

.footer__socials { display: flex; gap: .65rem; }

.social-icon {
  width: 36px;
  height: 36px;
  border-radius: var(--r-sm);
  border: 1.5px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  cursor: default;
  transition: all var(--dur-fast) var(--ease);
}
.social-icon:hover {
  color: var(--accent-1);
  border-color: var(--accent-border);
  background: var(--accent-soft);
}
.social-icon svg { width: 15px; height: 15px; }

.footer__nav-title {
  font-size: .78rem;
  font-weight: 700;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--text-primary);
  margin-bottom: 1.2rem;
}

.footer__nav ul,
.footer__services-col ul {
  display: flex;
  flex-direction: column;
  gap: .6rem;
}

.footer__nav a {
  font-size: .88rem;
  color: var(--text-secondary);
  transition: color var(--dur-fast) var(--ease);
}
.footer__nav a:hover { color: var(--accent-1); }

.footer__services-col li {
  font-size: .88rem;
  color: var(--text-secondary);
}

.footer__bottom { background: var(--bg); padding-block: 1.5rem; }

.footer__bottom-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: .3rem;
  text-align: center;
}

.footer__bottom p { font-size: .82rem; color: var(--text-muted); }

.footer__disclaimer {
  font-size: .74rem !important;
  opacity: .75;
}

/* ── 16. BACK-TO-TOP ───────────────────────────────────────── */
.back-to-top {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  z-index: 900;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--accent-grad);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: var(--shadow-accent);
  opacity: 0;
  pointer-events: none;
  transform: translateY(12px);
  transition: all var(--dur-med) var(--ease);
}
.back-to-top.is-visible {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}
.back-to-top:hover { transform: translateY(-3px); }
.back-to-top svg  { width: 20px; height: 20px; }

/* ── 17. RESPONSIVE ────────────────────────────────────────── */

/* Tablet landscape ≤ 1024px */
@media (max-width: 1024px) {
  .hero__inner {
    grid-template-columns: 1fr;
    text-align: center;
  }
  .hero__description { margin-inline: auto; }
  .hero__cta         { justify-content: center; }
  .hero__tech-stack  { justify-content: center; }
  .hero__visual      { max-width: 520px; margin-inline: auto; }

  .about__inner { grid-template-columns: 1fr; }
  .about-card-stack { height: 320px; }

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

  .approach__steps      { flex-direction: column; align-items: center; }
  .approach-step__connector { padding-top: 0; transform: rotate(90deg); }
  .connector-line       { width: 40px; }

  .footer__inner        { grid-template-columns: 1fr 1fr; }
  .footer__brand        { grid-column: 1 / -1; }
}

/* Tablet portrait ≤ 768px */
@media (max-width: 768px) {
  :root { --navbar-h: 60px; }

  /* Mobile nav overlay */
  .navbar__nav {
    position: fixed;
    top: var(--navbar-h);
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: flex-start;
    background: var(--bg-2);
    border-bottom: 1px solid var(--border);
    box-shadow: var(--shadow-md);
    padding: 1rem 1.5rem 1.5rem;
    gap: .2rem;
    opacity: 0;
    transform: translateY(-108%);
    transition:
      transform var(--dur-med) var(--ease),
      opacity   var(--dur-med) var(--ease);
    z-index: 999;
  }
  .navbar__nav.is-open {
    transform: translateY(0);
    opacity: 1;
  }

  .nav-link  { width: 100%; padding: .6rem .75rem; font-size: 1rem; }
  .hamburger { display: flex; }

  .services__grid { grid-template-columns: 1fr; }
  .why__grid      { grid-template-columns: 1fr 1fr; }
  .projects__grid { grid-template-columns: 1fr; }
  .about__stats   { grid-template-columns: repeat(3, 1fr); gap: .5rem; }

  .footer__inner  { grid-template-columns: 1fr; gap: 2rem; }
  .footer__brand  { grid-column: 1; }
}

/* Mobile ≤ 480px */
@media (max-width: 480px) {
  .hero__heading { font-size: 1.9rem; }

  .hero__cta { flex-direction: column; width: 100%; }
  .hero__cta .btn { width: 100%; justify-content: center; }

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

  .about__stats { grid-template-columns: 1fr; gap: 1.25rem; text-align: left; }
  .stat-item {
    display: grid;
    grid-template-columns: auto 1fr;
    align-items: baseline;
    gap: .2rem 1rem;
  }
  .stat-number { font-size: 1.55rem; }

  .approach-step { padding: 1.2rem .75rem; }

  .back-to-top { bottom: 1.25rem; right: 1.25rem; }
}

/* Accessibility — keyboard focus ring */
:focus-visible {
  outline: 2px solid var(--accent-1);
  outline-offset: 3px;
  border-radius: 4px;
}
