/* ============================================================
   EliotDS — style.css
   ============================================================ */

/* ── Reset & base ─────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
[hidden] { display: none !important; }

:root {
  --primary:       #2563eb;
  --primary-dark:  #1d4ed8;
  --primary-rgb:   37,99,235;
  --dark:          #0f172a;
  --text:          #334155;
  --muted:         #64748b;
  --border:        #e2e8f0;
  --bg:            #ffffff;
  --bg-alt:        #f8fafc;
  --radius-sm:     8px;
  --radius:        12px;
  --radius-lg:     20px;
  --shadow:        0 1px 3px rgba(0,0,0,.08), 0 1px 2px rgba(0,0,0,.05);
  --shadow-md:     0 4px 12px rgba(0,0,0,.08);
  --shadow-lg:     0 12px 32px rgba(0,0,0,.10);
  --transition:    0.22s ease;
  --font:          'Inter', system-ui, sans-serif;
  --font-display:  'Plus Jakarta Sans', 'Inter', sans-serif;
  --font-mono:     'JetBrains Mono', 'Courier New', monospace;
  --nav-h:         68px;
}

html { scroll-behavior: smooth; font-size: 16px; }

body {
  font-family: var(--font);
  color: var(--text);
  background: var(--bg);
  line-height: 1.6;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; display: block; }
a   { text-decoration: none; color: inherit; }
ul  { list-style: none; }

/* ── Utilities ────────────────────────────────────────────── */
.container {
  max-width: 1160px;
  margin: 0 auto;
  padding: 0 24px;
}
.section-pad { padding: 96px 0; }
.bg-alt      { background: var(--bg-alt); }

.section-header {
  text-align: center;
  margin-bottom: 60px;
}
.section-eyebrow {
  display: inline-block;
  font-size: .78rem;
  font-weight: 600;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--primary);
  margin-bottom: 12px;
}
.section-title {
  font-family: var(--font-display);
  font-size: clamp(1.75rem, 3.5vw, 2.5rem);
  font-weight: 800;
  color: var(--dark);
  line-height: 1.2;
  letter-spacing: -.02em;
}

/* ── Buttons ──────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 22px;
  border-radius: var(--radius-sm);
  font-size: .9rem;
  font-weight: 600;
  cursor: pointer;
  border: 2px solid transparent;
  transition: all var(--transition);
  white-space: nowrap;
}
.btn-primary {
  background: var(--primary);
  color: #fff;
  border-color: var(--primary);
}
.btn-primary:hover {
  background: var(--primary-dark);
  border-color: var(--primary-dark);
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(var(--primary-rgb),.35);
}
.btn-outline {
  background: transparent;
  color: var(--dark);
  border-color: var(--border);
}
.btn-outline:hover {
  border-color: var(--primary);
  color: var(--primary);
  transform: translateY(-1px);
}
.btn-white {
  background: #fff;
  color: var(--dark);
  border-color: #fff;
}
.btn-white:hover { background: #f1f5f9; }
.btn-lg   { padding: 13px 28px; font-size: .95rem; }
.btn-sm   { padding: 7px 16px;  font-size: .82rem; }
.btn-full { width: 100%; justify-content: center; padding: 14px; font-size: 1rem; }

/* ── Logo ─────────────────────────────────────────────────── */
.logo {
  font-family: var(--font-display);
  font-size: 1.3rem;
  font-weight: 800;
  color: var(--dark);
  letter-spacing: -.02em;
  display: inline-flex;
  align-items: center;
  gap: 0;
}
.logo-mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 30px; height: 30px;
  background: var(--primary);
  border-radius: 7px;
  margin-right: 3px;
  flex-shrink: 0;
}
.logo-mark-dark { background: rgba(255,255,255,.12); }

/* ── Navbar ───────────────────────────────────────────────── */
.navbar {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 1000;
  height: var(--nav-h);
  background: rgba(255,255,255,.88);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid transparent;
  transition: border-color var(--transition), box-shadow var(--transition);
}
.navbar.scrolled {
  border-bottom-color: var(--border);
  box-shadow: var(--shadow);
}
.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: var(--nav-h);
}
.nav-links {
  display: flex;
  align-items: center;
  gap: 4px;
}
.nav-links a {
  padding: 6px 14px;
  border-radius: var(--radius-sm);
  font-size: .88rem;
  font-weight: 500;
  color: var(--text);
  transition: color var(--transition), background var(--transition);
}
.nav-links a:hover,
.nav-links a.active { color: var(--primary); background: #eff6ff; }

.nav-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}
.lang-btn {
  display: flex;
  align-items: center;
  gap: 3px;
  padding: 5px 10px;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: none;
  cursor: pointer;
  font-size: .78rem;
  font-weight: 600;
  color: var(--muted);
  transition: all var(--transition);
}
.lang-btn:hover { border-color: var(--primary); color: var(--primary); }
.lang-sep { opacity: .4; }
.lang-es, .lang-en { transition: color var(--transition); }
.lang-btn .active  { color: var(--primary); }

/* ── Hamburger ────────────────────────────────────────────── */
.hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
}
.hamburger span {
  display: block;
  width: 22px; height: 2px;
  background: var(--dark);
  border-radius: 2px;
  transition: all var(--transition);
}
.hamburger.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.hamburger.open span:nth-child(2) { opacity: 0; }
.hamburger.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ── Mobile Menu ──────────────────────────────────────────── */
.mobile-menu {
  position: fixed;
  top: var(--nav-h); left: 0; right: 0;
  z-index: 999;
  background: var(--bg);
  border-bottom: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  padding: 12px 24px 20px;
  gap: 4px;
  transform: translateY(-110%);
  transition: transform .3s ease;
  box-shadow: var(--shadow-md);
}
.mobile-menu.open { transform: translateY(0); }
.mobile-menu a {
  padding: 10px 12px;
  font-size: .95rem;
  font-weight: 500;
  color: var(--text);
  border-radius: var(--radius-sm);
}
.mobile-menu a:hover { background: var(--bg-alt); color: var(--primary); }

/* ── Scroll reveal (IntersectionObserver) ─────────────────── */
.reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity .65s ease, transform .65s ease;
  transition-delay: var(--d, 0s);
}
.reveal.visible { opacity: 1; transform: translateY(0); }

/* ── HERO ─────────────────────────────────────────────────── */
.hero {
  padding-top: calc(var(--nav-h) + 72px);
  padding-bottom: 96px;
  position: relative;
  overflow: hidden;
}

/* Background orbs */
.hero-orb {
  position: absolute;
  border-radius: 50%;
  pointer-events: none;
  filter: blur(72px);
}
.orb-1 {
  width: 600px; height: 600px;
  background: radial-gradient(circle, rgba(var(--primary-rgb),.10) 0%, transparent 70%);
  top: -200px; left: -180px;
  animation: orbFloat1 10s ease-in-out infinite;
}
.orb-2 {
  width: 480px; height: 480px;
  background: radial-gradient(circle, rgba(124,58,237,.08) 0%, transparent 70%);
  bottom: -60px; right: -120px;
  animation: orbFloat2 13s ease-in-out infinite;
}
@keyframes orbFloat1 {
  0%,100% { transform: translate(0,0) scale(1); }
  50%      { transform: translate(30px,25px) scale(1.05); }
}
@keyframes orbFloat2 {
  0%,100% { transform: translate(0,0) scale(1); }
  50%      { transform: translate(-25px,-20px) scale(1.04); }
}

/* Hero grid */
.hero-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 72px;
  align-items: center;
}

/* Hero content (left) */
.hero-content { }

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: #eff6ff;
  color: var(--primary);
  border: 1px solid #bfdbfe;
  border-radius: 100px;
  padding: 6px 16px;
  font-size: .82rem;
  font-weight: 600;
  margin-bottom: 24px;
}
.badge-pulse {
  width: 8px; height: 8px;
  background: #22c55e;
  border-radius: 50%;
  position: relative;
  flex-shrink: 0;
}
.badge-pulse::after {
  content: '';
  position: absolute;
  inset: -4px;
  border-radius: 50%;
  background: rgba(34,197,94,.3);
  animation: pulse 1.8s ease infinite;
}
@keyframes pulse {
  0%,100% { transform: scale(1); opacity: .6; }
  50%      { transform: scale(1.5); opacity: 0; }
}

.hero-title {
  font-family: var(--font-display);
  font-size: clamp(2rem, 4.5vw, 3.6rem);
  font-weight: 800;
  color: var(--dark);
  line-height: 1.1;
  letter-spacing: -.03em;
  margin-bottom: 12px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.hero-greeting {
  font-size: clamp(1.1rem, 2vw, 1.4rem);
  font-weight: 600;
  color: var(--muted);
}
.hero-name {
  background: linear-gradient(135deg, var(--primary) 0%, #7c3aed 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero-role {
  font-size: clamp(1rem, 1.8vw, 1.15rem);
  font-weight: 500;
  color: var(--text);
  margin-bottom: 16px;
  min-height: 1.8em;
}
.cursor {
  display: inline-block;
  width: 2px;
  height: 1em;
  background: var(--primary);
  vertical-align: text-bottom;
  margin-left: 2px;
  border-radius: 1px;
  animation: blink .8s step-end infinite;
}
@keyframes blink {
  0%,100% { opacity: 1; }
  50%      { opacity: 0; }
}

.hero-desc {
  font-size: clamp(.9rem, 1.6vw, 1rem);
  color: var(--muted);
  line-height: 1.75;
  margin-bottom: 32px;
  max-width: 480px;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 40px;
}

.hero-stats {
  display: flex;
  align-items: center;
  gap: 0;
  background: var(--bg-alt);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 14px 0;
  width: fit-content;
}
.stat-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 0 24px;
}
.stat-num {
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--dark);
  line-height: 1;
}
.stat-label {
  font-size: .75rem;
  color: var(--muted);
  margin-top: 3px;
  font-weight: 500;
}
.stat-divider {
  width: 1px;
  height: 32px;
  background: var(--border);
}

/* ── Code card (hero right) ───────────────────────────────── */
.hero-visual {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 380px;
}

.code-card {
  background: #0f172a;
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 28px 56px rgba(0,0,0,.28), 0 0 0 1px rgba(255,255,255,.06);
  width: 100%;
  max-width: 420px;
  position: relative;
  z-index: 2;
}
.code-header {
  background: #1e293b;
  padding: 11px 16px;
  display: flex;
  align-items: center;
  gap: 10px;
  border-bottom: 1px solid rgba(255,255,255,.04);
}
.code-dots { display: flex; gap: 6px; }
.code-dots span {
  width: 12px; height: 12px;
  border-radius: 50%;
  display: block;
}
.c-r { background: #ff5f57; }
.c-y { background: #febc2e; }
.c-g { background: #28c840; }
.code-fname {
  font-family: var(--font-mono);
  font-size: .76rem;
  color: rgba(255,255,255,.38);
  margin-left: 4px;
}
.code-body {
  padding: 16px 20px 20px;
  font-family: var(--font-mono);
  font-size: .8rem;
  line-height: 1.8;
  overflow: hidden;
}
.cl {
  display: block;
  white-space: pre;
  min-height: 1.8em;
}
/* Syntax highlighting */
.cm { color: #475569; }           /* comment */
.ck { color: #818cf8; }           /* keyword */
.cv { color: #f1f5f9; }           /* variable/identifier */
.cp { color: #94a3b8; }           /* punctuation / property */
.cs { color: #34d399; }           /* string */
.cn { color: #fb923c; }           /* number / boolean */

/* Blinking cursor at end of code */
.caret::after {
  content: '|';
  color: var(--primary);
  animation: blink .8s step-end infinite;
  font-weight: 400;
  margin-left: 1px;
}

/* Floating tech badges */
.float-badge {
  position: absolute;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 100px;
  padding: 8px 14px;
  font-size: .8rem;
  font-weight: 600;
  color: var(--dark);
  box-shadow: var(--shadow-md);
  display: flex;
  align-items: center;
  gap: 6px;
  white-space: nowrap;
  z-index: 3;
}
.float-react { top: 12px; right: -16px; }
.float-node  { bottom: 48px; right: -28px; }
.float-fig   { bottom: 100px; left: -20px; }

/* Float animation (after entrance) */
@keyframes floatUp {
  0%,100% { transform: translateY(0); }
  50%      { transform: translateY(-7px); }
}
.float-badge.floating { animation: floatUp 4s ease-in-out infinite; }
.float-badge.floating:nth-child(2) { animation-delay: 1.2s; }
.float-badge.floating:nth-child(3) { animation-delay: 2.4s; }

/* ── SERVICES ─────────────────────────────────────────────── */
.services-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 20px;
}

.service-card {
  background: var(--bg);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 28px 24px;
  transition: all var(--transition);
  position: relative;
  overflow: hidden;
  cursor: pointer;
  user-select: none;
}
.service-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--primary), #7c3aed);
  opacity: 0;
  transition: opacity var(--transition);
}
.service-card:hover {
  border-color: #bfdbfe;
  box-shadow: var(--shadow-lg);
  transform: translateY(-4px);
}
.service-card:hover::before { opacity: 1; }

/* Selected state (replaces hardcoded .featured) */
.service-card.selected {
  border-color: var(--primary);
  box-shadow: 0 0 0 1px var(--primary), var(--shadow-md);
  transform: translateY(-4px);
}
.service-card.selected::before { opacity: 1; }

.service-badge {
  position: absolute;
  top: 14px; right: 14px;
  background: var(--primary);
  color: #fff;
  font-size: .68rem;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
  padding: 3px 10px;
  border-radius: 100px;
  opacity: 0;
  transition: opacity var(--transition);
}
.service-card.selected .service-badge { opacity: 1; }

.service-icon {
  width: 46px; height: 46px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 18px;
}
.service-icon svg { width: 22px; height: 22px; }
.icon-purple { background: #f3e8ff; color: #7c3aed; }
.icon-blue   { background: #dbeafe; color: var(--primary); }
.icon-cyan   { background: #e0f2fe; color: #0284c7; }
.icon-green  { background: #dcfce7; color: #16a34a; }

.service-card h3 {
  font-family: var(--font-display);
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--dark);
  margin-bottom: 8px;
}
.service-card p {
  font-size: .86rem;
  color: var(--muted);
  line-height: 1.65;
  margin-bottom: 18px;
}
.service-list {
  display: flex;
  flex-direction: column;
  gap: 7px;
}
.service-list li {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: .83rem;
  color: var(--text);
  font-weight: 500;
}
.service-list li::before {
  content: '';
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--primary);
  flex-shrink: 0;
}

/* ── SKILLS ───────────────────────────────────────────────── */
.skills-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(96px, 1fr));
  gap: 16px;
}
.skill-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  padding: 20px 12px 18px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  text-align: center;
  transition: all var(--transition);
  cursor: default;
}
.skill-item:hover {
  border-color: var(--primary);
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
}
.skill-item i {
  font-size: 2.2rem;
  line-height: 1;
}
/* Dark icons — visible on white card */
.devicon-nextjs-plain,
.devicon-express-original { color: var(--dark); }
.skill-item span {
  font-size: .76rem;
  font-weight: 600;
  color: var(--text);
  line-height: 1.2;
}

/* ── PORTFOLIO ────────────────────────────────────────────── */
.portfolio-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 24px;
}
a.portfolio-card { display: block; text-decoration: none; color: inherit; }

.portfolio-card {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: all var(--transition);
}
.portfolio-card:hover {
  box-shadow: var(--shadow-lg);
  transform: translateY(-4px);
}
.portfolio-thumb {
  position: relative;
  height: 196px;
  background: linear-gradient(135deg, var(--bg1), var(--bg2));
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}
.portfolio-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,.45);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity var(--transition);
}
.portfolio-card:hover .portfolio-overlay { opacity: 1; }

/* Mock UI inside portfolio card */
.mock-ui {
  width: 80%; max-width: 280px;
  background: rgba(255,255,255,.12);
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 8px 24px rgba(0,0,0,.3);
}
.mock-topbar {
  background: rgba(255,255,255,.15);
  padding: 6px 10px;
  display: flex;
  gap: 5px;
  align-items: center;
}
.mock-topbar span { width: 6px; height: 6px; border-radius: 50%; background: rgba(255,255,255,.5); }
.mock-body { display: flex; height: 110px; }
.mock-sidebar { width: 28px; background: rgba(255,255,255,.08); flex-shrink: 0; }
.mock-content { flex: 1; padding: 10px 12px; display: flex; flex-direction: column; gap: 6px; }
.mock-content.full { padding: 12px 14px; }
.mock-line { height: 5px; background: rgba(255,255,255,.3); border-radius: 3px; }
.mock-line.w80 { width: 80%; }
.mock-line.w60 { width: 60%; }
.mock-cards { display: flex; gap: 5px; margin-top: 4px; }
.mock-card  { flex: 1; height: 28px; background: rgba(255,255,255,.2); border-radius: 4px; }
.mock-chart { height: 40px; background: rgba(255,255,255,.2); border-radius: 6px; margin-bottom: 6px; }
.mock-stats-row { display: flex; gap: 5px; }
.mock-stat-box  { flex: 1; height: 28px; background: rgba(255,255,255,.18); border-radius: 4px; }

.portfolio-meta { padding: 18px 22px; }
.portfolio-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 8px;
}
.portfolio-tags span {
  background: var(--bg-alt);
  color: var(--primary);
  border: 1px solid #bfdbfe;
  border-radius: 100px;
  font-size: .72rem;
  font-weight: 600;
  padding: 2px 10px;
}
.portfolio-meta h3 {
  font-family: var(--font-display);
  font-size: 1.02rem;
  font-weight: 700;
  color: var(--dark);
  margin-bottom: 5px;
}
.portfolio-meta p { font-size: .84rem; color: var(--muted); line-height: 1.6; }

/* portfolio real screenshot */
.portfolio-thumb-img { background: #f1f5f9; }
.portfolio-screenshot {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top;
  transition: transform 0.45s ease;
}
.portfolio-card:hover .portfolio-screenshot { transform: scale(1.05); }

/* ── CTA BAND ─────────────────────────────────────────────── */
.cta-inner {
  background: linear-gradient(135deg, var(--primary) 0%, #7c3aed 100%);
  border-radius: var(--radius-lg);
  padding: 60px 56px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 40px;
  flex-wrap: wrap;
}
.cta-text h2 {
  font-family: var(--font-display);
  font-size: clamp(1.4rem, 2.8vw, 1.9rem);
  font-weight: 800;
  color: #fff;
  line-height: 1.25;
  letter-spacing: -.02em;
  margin-bottom: 8px;
}
.cta-text p { color: rgba(255,255,255,.78); font-size: 1rem; }
.cta-inner .btn-white:hover {
  background: #f1f5f9;
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(0,0,0,.2);
}

/* ── CONTACT ──────────────────────────────────────────────── */
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1.5fr;
  gap: 60px;
  align-items: start;
}
.contact-intro {
  font-size: .98rem;
  color: var(--text);
  line-height: 1.75;
  margin-bottom: 28px;
}
.contact-items {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 28px;
}
.contact-link {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 16px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  transition: all var(--transition);
  color: inherit;
}
.contact-link:hover {
  border-color: var(--primary);
  background: #eff6ff;
  transform: translateX(4px);
}
.contact-link-icon {
  width: 40px; height: 40px;
  background: var(--bg-alt);
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  color: var(--primary);
}
.contact-link-icon svg { width: 18px; height: 18px; }
.contact-link-label {
  display: block;
  font-size: .72rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .08em;
  color: var(--muted);
  margin-bottom: 2px;
}
.contact-link-value {
  display: block;
  font-size: .9rem;
  font-weight: 600;
  color: var(--dark);
}
.social-row { display: flex; gap: 10px; }
.social-icon {
  width: 40px; height: 40px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--muted);
  transition: all var(--transition);
}
.social-icon svg { width: 18px; height: 18px; }
.social-icon:hover { border-color: var(--primary); color: var(--primary); transform: translateY(-2px); }

/* ── Form ─────────────────────────────────────────────────── */
.contact-form {
  display: flex;
  flex-direction: column;
  gap: 18px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 36px 32px;
  box-shadow: var(--shadow-md);
}
.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
}
.form-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.form-group label {
  font-size: .82rem;
  font-weight: 600;
  color: var(--dark);
}
.form-group input,
.form-group select,
.form-group textarea {
  padding: 10px 14px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  font-family: var(--font);
  font-size: .9rem;
  color: var(--dark);
  background: var(--bg);
  transition: border-color var(--transition), box-shadow var(--transition);
  outline: none;
  resize: vertical;
}
.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(var(--primary-rgb),.12);
}
.form-group select { appearance: none; cursor: pointer; }
.form-group textarea { min-height: 100px; }

.form-success {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 16px;
  background: #dcfce7;
  border: 1px solid #bbf7d0;
  border-radius: var(--radius-sm);
  color: #166534;
  font-size: .88rem;
  font-weight: 600;
}
.form-success svg { color: #16a34a; flex-shrink: 0; }

/* ── intl-tel-input overrides ─────────────────────────────── */
.iti { width: 100%; }
.iti__selected-dial-code { font-size: .88rem; }
.iti--separate-dial-code .iti__selected-flag {
  background: var(--bg-alt);
  border-right: 1.5px solid var(--border);
  border-radius: var(--radius-sm) 0 0 var(--radius-sm);
}
.iti--separate-dial-code input[type="tel"] {
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0 !important;
}
.iti__country-list { font-size: .86rem; }

/* ── FOOTER ───────────────────────────────────────────────── */
.footer { background: var(--dark); padding: 64px 0 0; }

.footer-grid {
  display: grid;
  grid-template-columns: 1.7fr 1fr 1fr 1.3fr;
  gap: 48px;
  padding-bottom: 48px;
}
.footer-logo  { color: rgba(255,255,255,.92); font-size: 1.12rem; font-weight: 700; }
.footer-tagline {
  font-size: .85rem;
  color: rgba(255,255,255,.42);
  line-height: 1.7;
  margin-top: 14px;
  max-width: 240px;
}
.footer-social { margin-top: 20px; }
.footer-social .social-icon {
  border-color: rgba(255,255,255,.12);
  color: rgba(255,255,255,.38);
}
.footer-social .social-icon:hover { border-color: var(--primary); color: var(--primary); }

.footer-col-title {
  font-size: .73rem;
  font-weight: 700;
  letter-spacing: .11em;
  text-transform: uppercase;
  color: rgba(255,255,255,.32);
  margin-bottom: 18px;
}
.footer-nav {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.footer-nav a, .footer-nav li {
  font-size: .88rem;
  color: rgba(255,255,255,.48);
  transition: color var(--transition);
}
.footer-nav a:hover { color: #fff; }

.footer-contact-info {
  display: flex;
  flex-direction: column;
  gap: 7px;
  margin-bottom: 18px;
}
.footer-contact-info a,
.footer-contact-info span {
  font-size: .87rem;
  color: rgba(255,255,255,.5);
  transition: color var(--transition);
}
.footer-contact-info a:hover { color: #fff; }

.footer-cta { margin-top: 4px; font-size: .84rem; }

.footer-bottom {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px;
  padding: 22px 0;
  border-top: 1px solid rgba(255,255,255,.07);
  font-size: .77rem;
  color: rgba(255,255,255,.26);
}

/* ── Back to top ──────────────────────────────────────────── */
.back-to-top {
  position: fixed;
  bottom: 28px;
  right: 28px;
  width: 46px;
  height: 46px;
  background: var(--primary);
  color: #fff;
  border: none;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  opacity: 0;
  pointer-events: none;
  transform: translateY(14px);
  transition: opacity .3s ease, transform .3s ease, background .2s;
  z-index: 900;
  box-shadow: 0 4px 16px rgba(var(--primary-rgb),.45);
}
.back-to-top.visible { opacity: 1; pointer-events: auto; transform: translateY(0); }
.back-to-top:hover   { background: var(--primary-dark); }

/* ── Responsive ───────────────────────────────────────────── */
@media (max-width: 960px) {
  .hero-grid       { grid-template-columns: 1fr; gap: 48px; }
  .hero-visual     { display: none; }
  .hero-content    { text-align: center; }
  .hero-actions    { justify-content: center; }
  .hero-stats      { margin: 0 auto; }
  .hero-desc       { max-width: 100%; margin-left: auto; margin-right: auto; }
  .contact-grid    { grid-template-columns: 1fr; gap: 40px; }
  .cta-inner       { flex-direction: column; text-align: center; padding: 48px 32px; }
  .footer-grid     { grid-template-columns: 1fr 1fr; gap: 36px; }
  .footer-col-brand { grid-column: 1 / -1; }
  .footer-tagline   { max-width: 100%; }
}

@media (max-width: 768px) {
  .nav-links  { display: none; }
  .nav-cta    { display: none; }
  .hamburger  { display: flex; }
  .section-pad { padding: 72px 0; }
  .hero        { padding-top: calc(var(--nav-h) + 48px); padding-bottom: 72px; }
  .services-grid  { grid-template-columns: 1fr; }
  .portfolio-grid { grid-template-columns: 1fr; }
  .skills-grid    { grid-template-columns: repeat(auto-fill, minmax(80px, 1fr)); }
  .contact-form   { padding: 24px 20px; }
  .form-row       { grid-template-columns: 1fr; }
  .footer-grid    { grid-template-columns: 1fr; gap: 28px; }
  .footer-bottom  { flex-direction: column; gap: 4px; }
}

@media (max-width: 480px) {
  .hero-actions   { flex-direction: column; align-items: center; }
  .hero-stats     { flex-direction: column; align-items: center; gap: 12px; padding: 16px 24px; }
  .stat-divider   { width: 40px; height: 1px; }
  .stat-item      { padding: 0; }
  .cta-inner      { padding: 36px 24px; }
  .skills-grid    { grid-template-columns: repeat(3, 1fr); }
  .back-to-top    { bottom: 18px; right: 18px; width: 40px; height: 40px; }
}
