/* ================================================
   IMAN BACHAT — 3D PORTFOLIO
   Color: Deep-space navy + electric cyan + warm amber
   Type:  Space Grotesk (display) / Inter (body)
   ================================================ */

:root {
  --bg-deep:     #f8f9fc;
  --bg-surface:  #f1f4f9;
  --bg-card:     #ffffff;
  --bg-elevated: #eef1f7;
  --cyan:        #a855f7;
  --cyan-dim:    #a855f733;
  --cyan-glow:   #a855f718;
  --amber:       #d97706;
  --amber-dim:   #d9770633;
  --green:       #16a34a;
  --red:         #dc2626;
  --text-primary:#0f0a1e;
  --text-muted:  #64748b;
  --text-dim:    #94a3b8;
  --border:      #e2e8f0;
  --radius:      12px;
  --radius-sm:   8px;
  --radius-lg:   20px;
  --font-display:'Space Grotesk', system-ui, sans-serif;
  --font-body:   'Inter', system-ui, sans-serif;
  --ease:        cubic-bezier(.22,1,.36,1);
  --max-w:       1200px;
}

/* ---- Reset ---- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; font-size: 16px; }
body {
  font-family: var(--font-body);
  background: var(--bg-deep);
  color: var(--text-primary);
  line-height: 1.65;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}
a { color: var(--cyan); text-decoration: none; transition: color .2s; }
a:hover { color: var(--text-primary); }
img { max-width: 100%; display: block; }
ul { list-style: none; }

.container { max-width: var(--max-w); margin: 0 auto; padding: 0 24px; }

/* ======== LOADER ======== */
#loader {
  position: fixed; inset: 0; z-index: 9999;
  background: #0d051f;
  display: flex; align-items: center; justify-content: center;
  transition: opacity .6s var(--ease), visibility .6s;
}
#loader.hidden { opacity: 0; visibility: hidden; pointer-events: none; }
.loader-inner { text-align: center; }
.loader-orbit {
  width: 48px; height: 48px; margin: 0 auto 16px;
  border: 2px solid var(--border);
  border-top-color: var(--cyan);
  border-radius: 50%;
  animation: spin .8s linear infinite;
}
.loader-text { font-family: var(--font-display); color: var(--text-muted); font-size: .9rem; }
.loader-dots::after { content: ''; animation: dots 1.5s steps(3) infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes dots { 0% { content: ''; } 33% { content: '.'; } 66% { content: '..'; } 100% { content: '...'; } }

/* ======== NAVIGATION ======== */
#nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  display: flex; align-items: center; justify-content: space-between;
  padding: 16px 32px;
  background: transparent;
  transition: background .3s, box-shadow .3s, padding .3s;
}
#nav.scrolled {
  background: rgba(248,249,252,.95);
  backdrop-filter: blur(12px);
  box-shadow: 0 1px 0 var(--border);
  padding: 12px 32px;
}
.nav-brand {
  font-family: var(--font-display);
  font-size: 1.5rem; font-weight: 700;
  color: var(--cyan) !important;
  letter-spacing: -.02em;
}
.nav-links { display: flex; gap: 32px; align-items: center; }
.nav-links a {
  font-family: var(--font-display);
  font-size: .88rem; font-weight: 500;
  color: rgba(255,255,255,.7);
  letter-spacing: .02em;
  transition: color .2s;
}
#nav.scrolled .nav-links a { color: var(--text-muted); }
.nav-links a:hover { color: var(--text-primary); }
#nav.scrolled .nav-links a:hover { color: var(--text-primary); }
.nav-cta {
  background: var(--cyan) !important;
  color: #fff !important;
  padding: 8px 20px;
  border-radius: var(--radius-sm);
  font-weight: 600 !important;
}
.nav-cta:hover { background: #7c3aed !important; color: #fff !important; }
.nav-toggle {
  display: none; background: none; border: none; cursor: pointer;
  flex-direction: column; gap: 5px; padding: 4px;
}
.nav-toggle span { display: block; width: 24px; height: 2px; background: #fff; transition: .3s; }
#nav.scrolled .nav-toggle span { background: var(--text-primary); }

/* ======== HERO ======== */
#hero {
  position: relative; min-height: 100vh;
  display: flex; align-items: center; justify-content: center;
  overflow: hidden;
  background: linear-gradient(135deg, #120826 0%, #0d051f 50%, #190a38 100%);
}
#hero-canvas {
  position: absolute; inset: 0; width: 100%; height: 100%;
  z-index: 0;
}
.hero-content {
  position: relative; z-index: 2;
  max-width: 780px; text-align: center;
  padding: 120px 24px 80px;
}
.hero-badge {
  display: inline-block;
  padding: 6px 16px;
  border: 1px solid var(--cyan-dim);
  border-radius: 100px;
  font-size: .78rem; font-weight: 500;
  color: var(--cyan);
  letter-spacing: .04em;
  margin-bottom: 24px;
  background: var(--cyan-glow);
}
.hero-content h1 {
  font-family: var(--font-display);
  font-size: clamp(2.2rem, 5.5vw, 3.8rem);
  font-weight: 700;
  line-height: 1.12;
  letter-spacing: -.03em;
  color: #fff;
  margin-bottom: 20px;
}
.hero-accent {
  background: linear-gradient(90deg, var(--cyan), var(--amber));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.hero-sub {
  font-family: var(--font-display);
  font-size: .95rem; color: var(--text-muted);
  letter-spacing: .06em; margin-bottom: 16px;
}
.hero-body {
  font-size: 1.05rem; color: var(--text-muted);
  max-width: 600px; margin: 0 auto 32px; line-height: 1.7;
}
.hero-actions { display: flex; gap: 16px; justify-content: center; flex-wrap: wrap; margin-bottom: 48px; }
.btn {
  display: inline-flex; align-items: center;
  padding: 14px 28px; border-radius: var(--radius-sm);
  font-family: var(--font-display);
  font-size: .92rem; font-weight: 600;
  letter-spacing: .01em;
  transition: all .25s var(--ease);
  cursor: pointer; border: none;
}
.btn-primary {
  background: var(--cyan); color: #fff;
}
.btn-primary:hover { background: #7c3aed; color: #fff; transform: translateY(-2px); box-shadow: 0 8px 30px var(--cyan-dim); }
.btn-outline {
  background: transparent; color: var(--cyan);
  border: 1px solid var(--cyan-dim);
}
.btn-outline:hover { background: var(--cyan-glow); border-color: var(--cyan); color: var(--cyan); }
.btn-full { width: 100%; justify-content: center; }
.hero-stats { display: flex; gap: 48px; justify-content: center; }
.stat { text-align: center; }
.stat-value {
  display: block; font-family: var(--font-display);
  font-size: 1.6rem; font-weight: 700; color: #fff;
}
.stat-label { font-size: .78rem; color: var(--text-dim); letter-spacing: .04em; }
.hero-scroll-hint {
  position: absolute; bottom: 32px; left: 50%;
  transform: translateX(-50%); z-index: 2;
  display: flex; flex-direction: column; align-items: center; gap: 8px;
}
.hero-scroll-hint span { font-size: .72rem; color: var(--text-dim); letter-spacing: .08em; text-transform: uppercase; }
.scroll-arrow {
  width: 16px; height: 16px;
  border-right: 2px solid var(--text-dim);
  border-bottom: 2px solid var(--text-dim);
  transform: rotate(45deg);
  animation: bounce 2s infinite;
}
@keyframes bounce { 0%,100% { transform: rotate(45deg) translateY(0); } 50% { transform: rotate(45deg) translateY(6px); } }

/* ======== HERO TWO-COLUMN LAYOUT ======== */
.hero-inner {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 64px;
  align-items: center;
  max-width: var(--max-w);
  width: 100%;
  padding: 120px 24px 80px;
  position: relative;
  z-index: 2;
}
.hero-inner .hero-content {
  max-width: none;
  text-align: left;
  padding: 0;
  position: static;
}
.hero-inner .hero-actions { justify-content: flex-start; }
.hero-inner .hero-stats   { justify-content: flex-start; gap: 32px; }
.hero-inner .hero-sub     { margin-bottom: 28px; }

/* ======== HERO VISUAL CARDS ======== */
.hero-visual {
  position: relative;
  height: 480px;
}

.hv-card {
  position: absolute;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 18px 20px;
  box-shadow: 0 24px 64px rgba(0,0,0,.5), 0 0 0 1px rgba(255,255,255,.03);
}

/* Card positions + float animations */
.hv-seo  { top: 0;    right: 0;    width: 288px; animation: hvFloat1 6s   ease-in-out infinite; }
.hv-lead { top: 190px; left: 0;    width: 270px; animation: hvFloat2 7s   ease-in-out infinite 1.8s; }
.hv-flow { bottom: 0; right: 16px; width: 302px; animation: hvFloat3 5.5s ease-in-out infinite 3.2s; }

@keyframes hvFloat1 { 0%,100% { transform: translateY(0);    } 50% { transform: translateY(-12px); } }
@keyframes hvFloat2 { 0%,100% { transform: translateY(0);    } 50% { transform: translateY(-8px);  } }
@keyframes hvFloat3 { 0%,100% { transform: translateY(0);    } 50% { transform: translateY(-10px); } }

/* Card header */
.hv-card-head {
  display: flex; align-items: center; gap: 8px; margin-bottom: 14px;
}
.hv-dot { width: 8px; height: 8px; border-radius: 50%; flex-shrink: 0; }
.hv-head-title {
  font-family: var(--font-display);
  font-size: .8rem; font-weight: 600;
  color: var(--text-primary); flex: 1;
}
.hv-live {
  font-size: .62rem; font-weight: 700; color: var(--green);
  letter-spacing: .06em;
  animation: hvPulse 2s ease-in-out infinite;
}
@keyframes hvPulse { 0%,100% { opacity: 1; } 50% { opacity: .35; } }

/* SEO card rows */
.hv-rows { display: flex; flex-direction: column; gap: 10px; margin-bottom: 14px; }
.hv-row  { display: flex; align-items: center; gap: 8px; }
.hv-pos  {
  font-family: var(--font-display);
  font-size: .72rem; font-weight: 700; color: var(--cyan);
  width: 24px; flex-shrink: 0;
}
.hv-kw {
  font-size: .72rem; color: var(--text-muted);
  flex: 1; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.hv-bar {
  width: 60px; height: 4px;
  background: var(--bg-elevated); border-radius: 2px; flex-shrink: 0;
}
.hv-bar div {
  height: 100%;
  background: linear-gradient(90deg, var(--cyan), var(--amber));
  border-radius: 2px;
}
.hv-metric {
  display: flex; align-items: center; gap: 8px;
  padding-top: 12px; border-top: 1px solid var(--border);
}
.hv-metric-val {
  font-family: var(--font-display);
  font-size: 1.15rem; font-weight: 700; color: var(--cyan);
}
.hv-metric-lbl { font-size: .7rem; color: var(--text-dim); }

/* Lead notification card */
.hv-lead {
  display: flex !important;
  align-items: center; gap: 12px;
  padding: 14px 16px !important;
}
.hv-lead-icon {
  font-size: 1.1rem;
  background: var(--amber-dim); border-radius: var(--radius-sm);
  width: 36px; height: 36px;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.hv-lead-body { flex: 1; min-width: 0; }
.hv-lead-title {
  font-family: var(--font-display);
  font-size: .8rem; font-weight: 600; color: var(--text-primary);
}
.hv-lead-sub { font-size: .68rem; color: var(--text-dim); margin-top: 2px; }
.hv-lead-tag {
  font-size: .65rem; font-weight: 600; color: var(--green);
  background: rgba(34,197,94,.1);
  border: 1px solid rgba(34,197,94,.25);
  padding: 3px 9px; border-radius: 100px;
  white-space: nowrap; flex-shrink: 0;
}

/* AI Flow card */
.hv-nodes {
  display: flex; align-items: center; gap: 5px;
  margin-bottom: 14px; flex-wrap: nowrap;
}
.hv-node {
  font-size: .62rem; font-weight: 500;
  padding: 5px 8px; border-radius: var(--radius-sm);
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  color: var(--text-dim); white-space: nowrap;
}
.hv-node--done {
  border-color: rgba(34,197,94,.3); color: var(--green);
  background: rgba(34,197,94,.08);
}
.hv-node--active {
  border-color: var(--cyan-dim); color: var(--cyan);
  background: var(--cyan-glow);
  animation: hvPulse 1.5s ease-in-out infinite;
}
.hv-node-arrow { color: var(--text-dim); font-size: .7rem; flex-shrink: 0; }
.hv-flow-footer {
  display: flex; justify-content: space-between; align-items: center;
  padding-top: 12px; border-top: 1px solid var(--border);
  font-size: .72rem; color: var(--text-dim);
}
.hv-flow-time {
  font-family: var(--font-display);
  font-weight: 700; color: var(--cyan);
}

/* Responsive */
@media (max-width: 960px) {
  .hero-inner {
    grid-template-columns: 1fr;
    padding: 110px 24px 60px;
    gap: 56px;
  }
  .hero-inner .hero-content { text-align: center; }
  .hero-inner .hero-actions { justify-content: center; }
  .hero-inner .hero-stats   { justify-content: center; }
  .hero-visual { height: 400px; max-width: 400px; margin: 0 auto; }
  .hv-seo  { width: 240px; right: 0; }
  .hv-lead { width: 230px; left: 0; top: 165px; }
  .hv-flow { width: 255px; right: 0; }
}
@media (max-width: 600px) {
  .hero-visual { display: none; }
}

/* ======== STATUS BAR ======== */
#status-bar {
  padding: 24px 0;
  border-bottom: 1px solid var(--border);
  background: var(--bg-surface);
}
.status-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.status-card {
  display: flex; align-items: center; gap: 14px;
  padding: 16px 20px;
  background: var(--bg-card);
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
}
.status-icon { font-size: 1.4rem; flex-shrink: 0; }
.status-card strong { display: block; font-size: .88rem; color: var(--text-primary); }
.status-card span { font-size: .78rem; color: var(--text-dim); }
.pulse-green { animation: pulse-g 2s infinite; }
.pulse-cyan { animation: pulse-c 2s infinite; }
.pulse-amber { animation: pulse-a 2s infinite; }
@keyframes pulse-g { 0%,100% { opacity: 1; } 50% { opacity: .5; } }
@keyframes pulse-c { 0%,100% { opacity: 1; } 50% { opacity: .5; } }
@keyframes pulse-a { 0%,100% { opacity: 1; } 50% { opacity: .5; } }

/* ======== SECTIONS ======== */
section { padding: 100px 0; }
.section-heading {
  font-family: var(--font-display);
  font-size: clamp(1.8rem, 3.5vw, 2.6rem);
  font-weight: 700;
  letter-spacing: -.02em;
  color: var(--text-primary);
  margin-bottom: 12px;
}
.section-sub {
  font-size: 1.05rem;
  color: var(--text-muted);
  margin-bottom: 48px;
  max-width: 560px;
}

/* ======== SERVICES ======== */
.services-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 24px; }
.service-card {
  padding: 36px 28px 28px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  transition: all .35s var(--ease);
  cursor: default;
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}
.service-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--cyan), var(--amber));
  transform: scaleX(0);
  transform-origin: left;
  transition: transform .4s var(--ease);
}
.service-card:hover::before { transform: scaleX(1); }
.service-card:hover {
  border-color: rgba(168,85,247,.2);
  transform: translateY(-6px);
  box-shadow: 0 20px 56px rgba(168,85,247,.09);
}
.service-icon-wrap {
  width: 52px; height: 52px;
  border-radius: 14px;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  display: flex; align-items: center; justify-content: center;
  font-size: 1.5rem;
  margin-bottom: 22px;
  transition: background .35s var(--ease), border-color .35s var(--ease), box-shadow .35s var(--ease);
}
.service-card:hover .service-icon-wrap {
  background: rgba(168,85,247,.08);
  border-color: rgba(168,85,247,.3);
  box-shadow: 0 0 20px rgba(168,85,247,.12);
}
.service-card h3 {
  font-family: var(--font-display);
  font-size: 1.1rem; font-weight: 700;
  color: var(--text-primary); margin-bottom: 10px;
}
.service-card p {
  font-size: .9rem;
  color: var(--text-muted);
  line-height: 1.65;
  flex: 1;
  margin-bottom: 20px;
}
.service-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: var(--font-display);
  font-size: .8rem;
  font-weight: 700;
  letter-spacing: .06em;
  color: var(--cyan);
  text-transform: uppercase;
  text-decoration: none;
  transition: gap .25s var(--ease), color .2s;
}
.service-link:hover { gap: 10px; color: var(--text-primary); }
.service-link svg { transition: transform .25s var(--ease); }
.service-link:hover svg { transform: translateX(3px); }

/* Skills marquee */
.skills-marquee {
  margin-top: 64px; overflow: hidden;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  padding: 18px 0;
}
.marquee-track {
  display: flex; gap: 48px; white-space: nowrap;
  animation: marquee 30s linear infinite;
}
.marquee-track span {
  font-family: var(--font-display);
  font-size: .88rem; color: var(--text-dim);
  letter-spacing: .04em;
}
@keyframes marquee { from { transform: translateX(0); } to { transform: translateX(-50%); } }

.tag {
  padding: 5px 14px;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: 100px;
  font-size: .76rem;
  color: var(--text-muted);
  font-weight: 500;
}

/* ======== PROJECTS ======== */
.project-filters { display: flex; gap: 12px; margin-bottom: 40px; flex-wrap: wrap; }
.filter-btn {
  padding: 8px 20px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 100px;
  font-family: var(--font-display);
  font-size: .82rem;
  color: var(--text-muted);
  cursor: pointer;
  transition: all .2s;
}
.filter-btn:hover { border-color: var(--cyan-dim); color: var(--cyan); }
.filter-btn.active {
  background: var(--cyan);
  color: #fff;
  border-color: var(--cyan);
}
/* ======== PROJECTS ======== */
#projects { background: linear-gradient(180deg, #ede9fe 0%, #f8f4ff 40%, #ffffff 100%); }

/* ======== PROJECT CARDS 3D ======== */
.projects-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 28px; }

.pc3d { perspective: 1200px; display: flex; }
.pc3d-inner {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: transform .5s var(--ease), box-shadow .5s var(--ease), border-color .3s;
  transform-style: preserve-3d;
  will-change: transform;
  display: flex; flex-direction: column; width: 100%;
}
.pc3d:hover .pc3d-inner {
  box-shadow: 0 16px 48px rgba(0,0,0,.1);
  border-color: var(--cyan-dim);
}

/* Visual area */
.pc3d-visual {
  position: relative;
  height: 210px;
  display: flex; flex-direction: column;
  justify-content: flex-end;
  padding: 20px;
  overflow: hidden;
}
.pc3d-visual::after {
  content: '';
  position: absolute; inset: 0; z-index: 1;
  background: linear-gradient(to bottom, rgba(0,0,0,.15) 0%, rgba(0,0,0,.6) 100%);
}
.pc3d-featured {
  position: absolute; top: 14px; left: 14px; z-index: 3;
  font-size: .62rem; font-weight: 700; letter-spacing: .08em;
  color: var(--bg-deep);
  background: var(--cyan);
  padding: 3px 10px; border-radius: 100px;
}
/* Screenshot image */
.pc3d-screenshot {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  object-fit: cover; object-position: top center;
  z-index: 0;
  transition: transform .5s var(--ease);
}
.pc3d:hover .pc3d-screenshot { transform: scale(1.04); }
.has-image { background: var(--bg-elevated); }

.pc3d-browser {
  position: absolute; top: 14px; left: 14px; right: 14px; z-index: 2;
  background: rgba(0,0,0,.45); backdrop-filter: blur(6px);
  border-radius: var(--radius-sm);
  border: 1px solid rgba(255,255,255,.08);
  padding: 7px 12px;
  display: flex; align-items: center; gap: 8px;
}
.pc3d-browser-dots { display: flex; gap: 5px; flex-shrink: 0; }
.pc3d-browser-dots span {
  width: 8px; height: 8px; border-radius: 50%;
}
.pc3d-browser-dots span:nth-child(1) { background: #ef4444; }
.pc3d-browser-dots span:nth-child(2) { background: var(--amber); }
.pc3d-browser-dots span:nth-child(3) { background: var(--green); }
.pc3d-browser-bar {
  font-size: .65rem; color: rgba(255,255,255,.5);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  flex: 1;
}
.pc3d-visual-content {
  position: relative; z-index: 2;
  display: flex; flex-direction: column; gap: 6px;
}
.pc3d-visual-icon { font-size: 1.8rem; line-height: 1; }
.pc3d-visual-name {
  font-family: var(--font-display);
  font-size: 1rem; font-weight: 700; color: #fff;
  text-shadow: 0 2px 8px rgba(0,0,0,.5);
}

/* Body */
.pc3d-body { padding: 22px 24px 24px; display: flex; flex-direction: column; flex: 1; }
.pc3d-subtitle {
  font-size: .65rem; font-weight: 700; letter-spacing: .1em;
  color: var(--cyan); margin-bottom: 10px;
}
.pc3d-title {
  font-family: var(--font-display);
  font-size: 1.15rem; font-weight: 700;
  color: var(--text-primary); margin-bottom: 8px; line-height: 1.3;
}
.pc3d-desc {
  font-size: .84rem; color: var(--text-muted);
  line-height: 1.6; margin-bottom: 16px;
}

/* Performance badges */
.pc3d-perf { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 14px; }
.pc3d-perf-badge {
  font-size: .67rem; font-weight: 600;
  padding: 4px 10px; border-radius: var(--radius-sm);
  display: flex; align-items: center; gap: 4px;
}
.pc3d-perf-badge.green { background: rgba(34,197,94,.12); color: var(--green); border: 1px solid rgba(34,197,94,.25); }
.pc3d-perf-badge.blue  { background: rgba(96,165,250,.12); color: #60a5fa;    border: 1px solid rgba(96,165,250,.25); }
.pc3d-perf-badge.cyan  { background: var(--cyan-glow);     color: var(--cyan); border: 1px solid var(--cyan-dim); }

/* Tech tags */
.pc3d-tags { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 20px; flex: 1; align-content: flex-start; }
.pc3d-tag {
  font-size: .68rem; font-weight: 500;
  padding: 4px 10px; border-radius: var(--radius-sm);
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  color: var(--text-dim);
}

/* Action buttons */
.pc3d-actions { display: flex; gap: 10px; }
.pc3d-btn-demo {
  flex: 1; display: flex; align-items: center; justify-content: center; gap: 6px;
  padding: 11px 16px;
  background: var(--cyan); color: #fff;
  border-radius: var(--radius-sm);
  font-family: var(--font-display);
  font-size: .78rem; font-weight: 700; letter-spacing: .04em;
  transition: all .2s var(--ease);
}
.pc3d-btn-demo:hover { background: #7c3aed; color: #fff; transform: none; }
.pc3d-btn-case {
  flex: 1; display: flex; align-items: center; justify-content: center; gap: 6px;
  padding: 11px 16px;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-family: var(--font-display);
  font-size: .78rem; font-weight: 600; letter-spacing: .04em;
  color: var(--text-muted);
  transition: all .2s var(--ease);
}
.pc3d-btn-case:hover { border-color: var(--cyan-dim); color: var(--cyan); }

/* ======== PROCESS ======== */
#process { background: var(--bg-surface); }

.process-label {
  display: flex; align-items: center; gap: 12px;
  font-size: .72rem; font-weight: 700; letter-spacing: .12em;
  color: var(--text-dim); margin-bottom: 16px;
}
.process-label span {
  display: block; width: 32px; height: 2px;
  background: var(--cyan);
}
.process-heading {
  font-family: var(--font-display);
  font-size: clamp(2rem, 4vw, 2.8rem);
  font-weight: 800; color: var(--text-primary);
  margin-bottom: 16px; line-height: 1.15;
}
.process-heading span { color: var(--cyan); }

.process-steps {
  display: flex; gap: 0;
  margin-top: 56px;
  position: relative;
}
/* single continuous line from first circle centre to last circle centre */
.process-steps::before {
  content: '';
  position: absolute;
  top: 26px;
  left: 10%; right: 10%;
  height: 2px;
  background: linear-gradient(90deg, var(--cyan), #c084fc);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform .9s var(--ease);
  z-index: 0;
}
.process-steps.line-visible::before { transform: scaleX(1); }

/* staggered fade-up — each step hidden by default */
.process-step {
  flex: 1;
  display: flex; flex-direction: column;
  align-items: center; text-align: center;
  padding: 0 16px;
  position: relative;
  opacity: 0;
  transform: translateY(32px);
  transition: opacity .6s var(--ease), transform .6s var(--ease);
}
.process-step:nth-child(1) { transition-delay: .0s; }
.process-step:nth-child(2) { transition-delay: .15s; }
.process-step:nth-child(3) { transition-delay: .30s; }
.process-step:nth-child(4) { transition-delay: .45s; }
.process-step:nth-child(5) { transition-delay: .60s; }
.process-step.visible { opacity: 1; transform: translateY(0); }

.step-top {
  position: relative;
  display: flex; align-items: center;
  width: 100%; justify-content: center;
  margin-bottom: 24px;
}

.step-circle {
  width: 52px; height: 52px;
  border-radius: 50%;
  background: var(--bg-card);
  border: 1px solid var(--cyan-dim);
  color: var(--text-muted);
  font-family: var(--font-display);
  font-size: .85rem; font-weight: 700;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
  position: relative; z-index: 1;
  transition: border-color .4s, box-shadow .4s, color .4s;
}
.process-step.visible .step-circle {
  border-color: var(--cyan);
  color: var(--cyan);
  box-shadow: 0 0 18px rgba(168,85,247,.25);
  animation: circlePulse .6s var(--ease) forwards;
}
@keyframes circlePulse {
  0%   { transform: scale(.8); }
  60%  { transform: scale(1.1); }
  100% { transform: scale(1); }
}

.step-icon {
  font-size: 1.5rem; margin-bottom: 14px;
  color: var(--cyan);
  font-family: monospace; font-weight: 700;
  opacity: 0;
  transform: scale(.6);
  transition: opacity .4s var(--ease) .2s, transform .4s var(--ease) .2s;
}
.process-step.visible .step-icon { opacity: 1; transform: scale(1); }

.process-step h3 {
  font-family: var(--font-display);
  font-size: 1rem; font-weight: 700;
  color: var(--text-primary); margin-bottom: 10px;
}
.process-step p {
  font-size: .82rem; color: var(--text-muted);
  line-height: 1.65;
}

/* ======== TESTIMONIALS ======== */
.testimonials-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(340px, 1fr)); gap: 28px; }
.testimonial-card {
  padding: 36px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  position: relative;
}
.testimonial-card::before {
  content: '"';
  position: absolute; top: 16px; right: 28px;
  font-family: var(--font-display);
  font-size: 5rem; color: var(--cyan-dim);
  line-height: 1;
}
.testimonial-name {
  font-family: var(--font-display);
  font-size: 1.05rem; font-weight: 600;
  color: var(--text-primary); margin-bottom: 2px;
}
.testimonial-role { font-size: .8rem; color: var(--amber); margin-bottom: 16px; }
.testimonial-quote { font-size: .95rem; color: var(--text-muted); line-height: 1.7; font-style: italic; }


/* ======== CTA BANNER ======== */
#cta-banner { padding: 80px 0; }
.cta-banner-inner {
  background: linear-gradient(135deg, #100820 0%, #18093a 40%, #0e0628 70%, #08060f 100%);
  border: 1px solid var(--border);
  border-radius: 24px;
  padding: 72px 56px;
  text-align: center;
  position: relative;
  overflow: hidden;
}
.cta-banner-inner::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 60% 80% at 20% 50%, rgba(168,85,247,.08) 0%, transparent 60%),
    radial-gradient(ellipse 50% 70% at 80% 50%, rgba(240,180,41,.06) 0%, transparent 60%);
  pointer-events: none;
}
.cta-banner-inner::after {
  content: '';
  position: absolute;
  top: -1px; left: 10%; right: 10%;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--cyan), transparent);
  opacity: .5;
}
.cta-banner-heading {
  font-family: var(--font-display);
  font-size: clamp(2rem, 4.5vw, 3.2rem);
  font-weight: 800;
  color: #fff;
  line-height: 1.15;
  margin-bottom: 20px;
  position: relative;
}
.cta-banner-heading span { color: var(--cyan); }
.cta-banner-sub {
  font-size: 1.05rem;
  color: var(--text-muted);
  max-width: 520px;
  margin: 0 auto 40px;
  line-height: 1.7;
  position: relative;
}
.cta-banner-btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  background: #25d366;
  color: #fff;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1rem;
  padding: 16px 36px;
  border-radius: 50px;
  text-decoration: none;
  transition: transform .25s var(--ease), box-shadow .25s var(--ease), background .2s;
  position: relative;
  box-shadow: 0 8px 32px rgba(37,211,102,.25);
}
.cta-banner-btn:hover {
  background: #20bc5a;
  color: #fff;
  transform: translateY(-3px);
  box-shadow: 0 14px 40px rgba(37,211,102,.4);
}

/* ======== CONTACT ======== */
#contact { background: var(--bg-surface); }
.contact-layout { display: grid; grid-template-columns: 1fr 1fr; gap: 56px; align-items: start; }
.contact-info .section-heading { margin-bottom: 16px; }
.contact-info > p { color: var(--text-muted); margin-bottom: 32px; }
.contact-details { display: flex; flex-direction: column; gap: 14px; margin-bottom: 24px; }
.contact-details a {
  font-size: .92rem; color: var(--text-muted); transition: color .2s;
}
.contact-details a:hover { color: var(--cyan); }
.contact-response { font-size: .82rem; color: var(--text-dim); }
.contact-form-wrap {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 36px;
}
.form-group { margin-bottom: 20px; }
.form-group label {
  display: block; font-size: .82rem; font-weight: 500;
  color: var(--text-muted); margin-bottom: 6px;
}
.form-group input,
.form-group select,
.form-group textarea {
  width: 100%; padding: 12px 16px;
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text-primary);
  font-family: var(--font-body);
  font-size: .92rem;
  transition: border-color .2s;
  outline: none;
}
.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  border-color: var(--cyan);
}
.form-group select { cursor: pointer; }
.form-group textarea { resize: vertical; min-height: 120px; }
.form-success {
  text-align: center; padding: 40px;
}
.form-success.hidden { display: none; }
.success-icon { font-size: 3rem; margin-bottom: 12px; }
.form-success h3 {
  font-family: var(--font-display);
  font-size: 1.3rem; color: var(--text-primary); margin-bottom: 8px;
}
.form-success p { color: var(--text-muted); }

/* ======== CASE STUDY MODAL ======== */
.cs-overlay {
  position: fixed; inset: 0; z-index: 1000;
  background: rgba(0,0,10,.55);
  backdrop-filter: blur(8px);
  display: flex; align-items: center; justify-content: center;
  padding: 24px;
  opacity: 0; visibility: hidden; pointer-events: none;
  transition: opacity .3s var(--ease), visibility .3s;
}
.cs-overlay.open { opacity: 1; visibility: visible; pointer-events: all; }
.cs-panel {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  width: 100%; max-width: 780px;
  max-height: 90vh; overflow-y: auto;
  transform: translateY(20px) scale(.97);
  transition: transform .35s var(--ease);
}
.cs-overlay.open .cs-panel { transform: translateY(0) scale(1); }
.cs-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 20px 28px;
  border-bottom: 1px solid var(--border);
  position: sticky; top: 0; z-index: 2;
  background: var(--bg-surface);
}
.cs-label {
  font-family: var(--font-display);
  font-size: .72rem; font-weight: 700; letter-spacing: .12em;
  color: var(--text-dim);
}
.cs-close {
  background: var(--bg-elevated); border: 1px solid var(--border);
  color: var(--text-muted); border-radius: var(--radius-sm);
  width: 32px; height: 32px; cursor: pointer;
  font-size: .85rem; display: flex; align-items: center; justify-content: center;
  transition: all .2s;
}
.cs-close:hover { background: var(--bg-elevated); color: var(--text-primary); border-color: var(--cyan-dim); }
.cs-body { padding: 32px 28px 36px; }
.cs-title {
  font-family: var(--font-display);
  font-size: clamp(1.6rem, 4vw, 2.2rem); font-weight: 800;
  color: var(--text-primary); margin-bottom: 12px; line-height: 1.15;
}
.cs-tagline {
  font-size: .95rem; color: var(--text-muted);
  line-height: 1.65; margin-bottom: 28px;
}
.cs-metrics {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px;
  margin-bottom: 36px;
}
.cs-metric {
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 18px 12px; text-align: center;
}
.cs-metric-val {
  font-family: var(--font-display);
  font-size: 1.5rem; font-weight: 800; color: var(--cyan);
  display: block; margin-bottom: 6px;
}
.cs-metric-lbl {
  font-size: .62rem; font-weight: 700; letter-spacing: .1em;
  color: var(--text-dim); text-transform: uppercase;
}
.cs-section { margin-bottom: 28px; }
.cs-section-title {
  display: flex; align-items: center; gap: 10px;
  font-family: var(--font-display);
  font-size: .72rem; font-weight: 700; letter-spacing: .12em;
  color: var(--cyan); margin-bottom: 12px;
}
.cs-section-title::before {
  content: ''; display: block;
  width: 20px; height: 2px; background: var(--cyan); border-radius: 1px;
}
.cs-section p {
  font-size: .9rem; color: var(--text-muted); line-height: 1.7;
}
.cs-steps { list-style: none; display: flex; flex-direction: column; gap: 10px; }
.cs-step {
  display: flex; align-items: flex-start; gap: 12px;
  font-size: .88rem; color: var(--text-muted); line-height: 1.5;
}
.cs-step-num {
  flex-shrink: 0; width: 24px; height: 24px;
  background: var(--bg-elevated); border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-family: var(--font-display); font-size: .72rem; font-weight: 700;
  color: var(--cyan);
  display: flex; align-items: center; justify-content: center;
}
.cs-tech-tags { display: flex; flex-wrap: wrap; gap: 8px; }
.cs-tech-tag {
  font-family: var(--font-display);
  font-size: .72rem; font-weight: 600; letter-spacing: .06em;
  padding: 5px 12px; border-radius: 100px;
  border: 1px solid var(--border); color: var(--text-muted);
  background: var(--bg-elevated);
}
.cs-before-after {
  display: grid; grid-template-columns: 1fr 1fr; gap: 16px;
}
.cs-ba-panel {
  position: relative; border-radius: var(--radius); overflow: hidden;
  border: 1px solid var(--border);
}
.cs-ba-img {
  width: 100%; display: block;
  object-fit: cover; object-position: top;
  max-height: 280px;
}
.cs-ba-label {
  position: absolute; top: 10px; left: 10px;
  font-family: var(--font-display); font-size: .65rem; font-weight: 700;
  letter-spacing: .1em; padding: 4px 10px;
  background: rgba(0,0,0,.7); color: var(--text-dim);
  border-radius: 100px; border: 1px solid var(--border);
}
.cs-ba-label--after {
  background: rgba(168,85,247,.15); color: var(--cyan);
  border-color: var(--cyan-dim);
}
@media (max-width: 600px) {
  .cs-before-after { grid-template-columns: 1fr; }
}
.cs-footer {
  display: flex; gap: 12px; margin-top: 36px;
  padding-top: 28px; border-top: 1px solid var(--border);
}
.cs-btn-visit {
  flex: 1; display: flex; align-items: center; justify-content: center; gap: 8px;
  padding: 13px 20px;
  background: var(--cyan); color: #fff;
  border-radius: var(--radius-sm);
  font-family: var(--font-display); font-size: .82rem; font-weight: 700;
  letter-spacing: .04em; transition: background .2s;
}
.cs-btn-visit:hover { background: #7c3aed; color: #fff; }
.cs-btn-close-footer {
  display: flex; align-items: center; justify-content: center; gap: 8px;
  padding: 13px 24px;
  background: var(--bg-elevated); border: 1px solid var(--border);
  border-radius: var(--radius-sm); cursor: pointer;
  font-family: var(--font-display); font-size: .82rem; font-weight: 600;
  color: var(--text-muted); transition: all .2s;
}
.cs-btn-close-footer:hover { border-color: var(--cyan-dim); color: var(--text-primary); }
@media (max-width: 600px) {
  .cs-metrics { grid-template-columns: repeat(2, 1fr); }
  .cs-footer { flex-direction: column; }
  .cs-body { padding: 24px 20px 28px; }
}

@media (max-width: 600px) {
  .cta-banner-inner { padding: 48px 28px; }
}

/* ======== FOOTER ======== */
#footer {
  padding: 40px 0;
  border-top: 1px solid var(--border);
}
.footer-inner {
  display: flex; justify-content: space-between; align-items: center;
  flex-wrap: wrap; gap: 16px;
}
.footer-brand { display: flex; flex-direction: column; gap: 2px; }
.footer-name {
  font-family: var(--font-display);
  font-size: 1.2rem; font-weight: 700; color: var(--text-primary);
}
.footer-title { font-size: .82rem; color: var(--text-muted); }
.footer-loc { font-size: .78rem; color: var(--text-dim); }
.footer-copy { font-size: .78rem; color: var(--text-dim); }

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

/* ======== RESPONSIVE ======== */
@media (max-width: 1100px) {
  .projects-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 900px) {
.contact-layout { grid-template-columns: 1fr; }
  .projects-grid { grid-template-columns: 1fr; }
  .pc3d-actions { flex-direction: column; }
  .status-grid { grid-template-columns: 1fr; }
}
@media (max-width: 768px) {
  #nav { padding: 14px 20px; }
  .nav-links {
    position: fixed; top: 0; right: -100%; width: 280px; height: 100vh;
    flex-direction: column; background: var(--bg-surface);
    padding: 80px 32px 32px; gap: 24px;
    transition: right .4s var(--ease);
    border-left: 1px solid var(--border);
  }
  .nav-links.open { right: 0; }
  .nav-toggle { display: flex; z-index: 110; }
  .hero-stats { gap: 24px; }
  .hero-content h1 { font-size: 2rem; }
  .services-grid { grid-template-columns: 1fr; }
  .process-steps { flex-direction: column; gap: 32px; }
  .step-top::before, .step-top::after { display: none; }
  .process-step { padding: 0; }
  .testimonials-grid { grid-template-columns: 1fr; }
}

/* ======== REDUCED MOTION ======== */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
  .reveal { opacity: 1; transform: none; }
}
