/* ── RESET & BASE ──────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: 'Inter', sans-serif;
  background: #0a0a0f;
  color: #e2e8f0;
  line-height: 1.6;
  overflow-x: hidden;
}
a { text-decoration: none; color: inherit; }
ul { list-style: none; }
img { max-width: 100%; }
.ml-2 { margin-left: 0.5rem; }

/* ── ACCESSIBILITY UTILITIES ──────────────────────────────────── */
.sr-only {
  position: absolute; width: 1px; height: 1px;
  padding: 0; margin: -1px; overflow: hidden;
  clip: rect(0,0,0,0); white-space: nowrap; border: 0;
}
.skip-link {
  position: absolute; top: -100%; left: 16px; z-index: 2000;
  background: var(--primary, #6366f1); color: #fff;
  padding: 10px 18px; border-radius: 8px; font-weight: 600; font-size: 0.9rem;
  transition: top 0.2s;
}
.skip-link:focus { top: 12px; }

/* ── VARIABLES ─────────────────────────────────────────────── */
:root {
  --primary: #6366f1;
  --primary-light: #818cf8;
  --accent: #22d3ee;
  --dark: #0a0a0f;
  --dark-2: #12121a;
  --dark-3: #1a1a28;
  --border: rgba(255,255,255,0.08);
  --text: #e2e8f0;
  --text-muted: #94a3b8;
  --radius: 16px;
  --shadow: 0 4px 30px rgba(0,0,0,0.4);
}

/* ── CONTAINER ─────────────────────────────────────────────── */
.container { max-width: 1160px; margin: 0 auto; padding: 0 24px; }

/* ── NAVBAR ────────────────────────────────────────────────── */
.navbar {
  position: fixed; top: 0; left: 0; right: 0; z-index: 1000;
  padding: 16px 0;
  transition: background 0.3s, backdrop-filter 0.3s, box-shadow 0.3s;
}
.navbar.scrolled {
  background: rgba(10,10,15,0.85);
  backdrop-filter: blur(20px);
  box-shadow: 0 1px 0 var(--border);
}
.nav-inner { display: flex; align-items: center; justify-content: space-between; }
.logo { display: flex; align-items: center; gap: 10px; font-size: 1.35rem; font-weight: 800; }
.logo-icon {
  width: 36px; height: 36px; border-radius: 10px;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  display: flex; align-items: center; justify-content: center;
  font-size: 0.9rem; color: #fff;
}
.accent { color: var(--accent); }
.nav-links { display: flex; align-items: center; gap: 32px; }
.nav-links a { font-size: 0.9rem; color: var(--text-muted); font-weight: 500; transition: color 0.2s; }
.nav-links a:hover { color: #fff; }
.btn-nav {
  background: var(--primary); color: #fff !important;
  padding: 8px 20px; border-radius: 50px; font-weight: 600;
  transition: opacity 0.2s, transform 0.2s !important;
}
.btn-nav:hover { opacity: 0.9; transform: translateY(-1px); }
.nav-toggle { display: none; flex-direction: column; gap: 5px; background: none; border: none; cursor: pointer; padding: 4px; }
.nav-toggle span { display: block; width: 24px; height: 2px; background: #fff; border-radius: 2px; transition: all 0.3s; }

/* ── BUTTONS ────────────────────────────────────────────────── */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  padding: 12px 28px; border-radius: 50px; font-weight: 600; font-size: 0.95rem;
  cursor: pointer; border: none; transition: all 0.25s;
}
.btn:disabled { opacity: 0.7; cursor: not-allowed; }
.btn-primary {
  background: linear-gradient(135deg, var(--primary), #4f46e5);
  color: #fff; box-shadow: 0 4px 20px rgba(99,102,241,0.35);
}
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 8px 30px rgba(99,102,241,0.5); }
.btn-ghost {
  background: rgba(255,255,255,0.06); color: #fff;
  border: 1px solid var(--border);
}
.btn-ghost:hover { background: rgba(255,255,255,0.12); }
.btn-full { width: 100%; }

/* ── HERO ───────────────────────────────────────────────────── */
.hero {
  min-height: 100vh; display: flex; align-items: center;
  position: relative; overflow: hidden; padding: 100px 0 60px;
}
.hero-bg { position: absolute; inset: 0; z-index: 0; }
.grid-overlay {
  position: absolute; inset: 0;
  background-image: linear-gradient(rgba(99,102,241,0.05) 1px, transparent 1px),
                    linear-gradient(90deg, rgba(99,102,241,0.05) 1px, transparent 1px);
  background-size: 60px 60px;
}
.blob { position: absolute; border-radius: 50%; filter: blur(80px); opacity: 0.25; }
.blob-1 { width: 500px; height: 500px; background: var(--primary); top: -100px; right: -100px; }
.blob-2 { width: 400px; height: 400px; background: var(--accent); bottom: -50px; left: -50px; }

@media (prefers-reduced-motion: no-preference) {
  .blob-1 { animation: float 8s ease-in-out infinite; animation-delay: 0s; }
  .blob-2 { animation: float 8s ease-in-out infinite; animation-delay: 4s; }
}
@keyframes float { 0%,100% { transform: translateY(0) scale(1); } 50% { transform: translateY(-30px) scale(1.05); } }

.hero-inner {
  position: relative; z-index: 1;
  display: grid; grid-template-columns: 1fr 1fr; gap: 60px; align-items: center;
}
.hero-badge {
  display: inline-flex; align-items: center; gap: 8px;
  background: rgba(99,102,241,0.15); border: 1px solid rgba(99,102,241,0.3);
  color: var(--primary-light); padding: 6px 16px; border-radius: 50px;
  font-size: 0.8rem; font-weight: 600; margin-bottom: 20px;
}
.hero-title { font-size: clamp(2.2rem, 4vw, 3.2rem); font-weight: 900; line-height: 1.15; margin-bottom: 20px; color: #fff; }
.gradient-text {
  background: linear-gradient(135deg, var(--primary-light), var(--accent));
  -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text;
  min-height: 1.3em; display: inline-block;
}
.hero-desc { color: var(--text-muted); font-size: 1.05rem; max-width: 480px; margin-bottom: 32px; }
.hero-actions { display: flex; gap: 16px; flex-wrap: wrap; margin-bottom: 48px; }
.hero-stats { display: flex; align-items: center; gap: 32px; }
.stat { text-align: center; }
.stat-num { font-size: 1.8rem; font-weight: 900; color: #fff; }
.stat-plus { font-size: 1.4rem; font-weight: 700; color: var(--primary-light); }
.stat-label { display: block; font-size: 0.75rem; color: var(--text-muted); margin-top: 2px; }
.stat-divider { width: 1px; height: 40px; background: var(--border); }

/* ── CODE WINDOW ────────────────────────────────────────────── */
.code-window {
  background: #12121e; border: 1px solid var(--border);
  border-radius: var(--radius); overflow: hidden;
  box-shadow: var(--shadow), 0 0 60px rgba(99,102,241,0.1);
}
.win-bar {
  background: #1a1a2e; padding: 12px 16px;
  display: flex; align-items: center; gap: 8px; border-bottom: 1px solid var(--border);
}
.dot { width: 12px; height: 12px; border-radius: 50%; }
.dot.red { background: #ff5f57; }
.dot.yellow { background: #febc2e; }
.dot.green { background: #28c840; }
.win-title { margin-left: auto; font-size: 0.75rem; color: var(--text-muted); font-family: monospace; }
.win-body { padding: 20px; overflow-x: auto; }
.win-body code { font-family: 'Fira Code', 'Courier New', monospace; font-size: 0.82rem; line-height: 1.8; }
.kw  { color: #c792ea; }
.fn  { color: #82aaff; }
.str { color: #c3e88d; }
.key { color: #89ddff; }
.op  { color: #89ddff; }
.num { color: #f78c6c; }

/* ── SECTIONS ───────────────────────────────────────────────── */
.section { padding: 100px 0; }
.section-dark { background: var(--dark-2); }
.section-header { text-align: center; margin-bottom: 64px; }
.section-tag {
  display: inline-block;
  background: rgba(99,102,241,0.12); color: var(--primary-light);
  border: 1px solid rgba(99,102,241,0.25); padding: 4px 16px;
  border-radius: 50px; font-size: 0.78rem; font-weight: 600;
  text-transform: uppercase; letter-spacing: 0.06em; margin-bottom: 16px;
}
.section-title { font-size: clamp(1.8rem, 3vw, 2.4rem); font-weight: 800; color: #fff; margin-bottom: 16px; }
.section-desc { color: var(--text-muted); max-width: 560px; margin: 0 auto; }

/* ── SERVICES ───────────────────────────────────────────────── */
.services-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.service-card {
  background: var(--dark-2); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 32px 28px;
  transition: transform 0.3s, border-color 0.3s, box-shadow 0.3s;
}
.service-card:hover {
  transform: translateY(-6px);
  border-color: rgba(99,102,241,0.4);
  box-shadow: 0 20px 40px rgba(0,0,0,0.3), 0 0 0 1px rgba(99,102,241,0.1);
}
.service-icon {
  width: 52px; height: 52px; border-radius: 14px;
  background: color-mix(in srgb, var(--c) 15%, transparent);
  border: 1px solid color-mix(in srgb, var(--c) 30%, transparent);
  display: flex; align-items: center; justify-content: center;
  font-size: 1.25rem; color: var(--c); margin-bottom: 20px;
}
.service-card h3 { font-size: 1.05rem; font-weight: 700; color: #fff; margin-bottom: 10px; }
.service-card p  { color: var(--text-muted); font-size: 0.9rem; }

/* ── ABOUT ──────────────────────────────────────────────────── */
.about-inner { display: grid; grid-template-columns: 1fr 1fr; gap: 64px; align-items: center; }
.about-text .section-tag { margin-bottom: 12px; }
.about-text .section-title { text-align: left; margin-bottom: 20px; }
.about-text p { color: var(--text-muted); margin-bottom: 16px; }
.about-features { display: flex; flex-direction: column; gap: 10px; margin-top: 24px; }
.feature-item { display: flex; align-items: center; gap: 10px; color: var(--text-muted); font-size: 0.9rem; }
.feature-item i { color: #10b981; flex-shrink: 0; }
.about-cards { display: flex; flex-direction: column; gap: 16px; }
.info-card {
  background: var(--dark-3); border: 1px solid var(--border);
  border-radius: 14px; padding: 18px 20px;
  display: flex; align-items: center; gap: 16px;
  transition: border-color 0.2s;
}
.info-card:hover { border-color: rgba(99,102,241,0.3); }
.info-card > i { color: var(--primary-light); font-size: 1.2rem; flex-shrink: 0; }
.info-card strong { display: block; color: #fff; font-size: 0.85rem; margin-bottom: 2px; }
.info-card span { color: var(--text-muted); font-size: 0.85rem; }

/* ── PORTFOLIO ──────────────────────────────────────────────── */
.portfolio-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.portfolio-card {
  background: var(--dark-2); border: 1px solid var(--border);
  border-radius: var(--radius); overflow: hidden;
  transition: transform 0.3s, box-shadow 0.3s;
}
.portfolio-card:hover { transform: translateY(-6px); box-shadow: 0 24px 48px rgba(0,0,0,0.4); }
.portfolio-thumb {
  height: 160px; background: var(--bg, #1e1e2e);
  display: flex; align-items: center; justify-content: center;
  font-size: 3rem; color: rgba(255,255,255,0.15);
  position: relative;
}
.portfolio-thumb::after {
  content: ''; position: absolute; inset: 0;
  background: linear-gradient(to bottom, transparent, rgba(0,0,0,0.5));
}
.portfolio-info { padding: 24px; }
.portfolio-tag {
  font-size: 0.72rem; font-weight: 600; text-transform: uppercase;
  letter-spacing: 0.08em; color: var(--primary-light); margin-bottom: 8px; display: block;
}
.portfolio-info h3 { font-size: 1rem; font-weight: 700; color: #fff; margin-bottom: 10px; }
.portfolio-info p  { font-size: 0.875rem; color: var(--text-muted); margin-bottom: 16px; }
.portfolio-tech { display: flex; gap: 8px; flex-wrap: wrap; }
.portfolio-tech span {
  background: rgba(255,255,255,0.06); border: 1px solid var(--border);
  padding: 3px 10px; border-radius: 50px; font-size: 0.72rem; color: var(--text-muted);
}

/* ── CTA / CONTACT ──────────────────────────────────────────── */
.section-cta { background: var(--dark-2); }
.cta-box {
  background: linear-gradient(135deg, rgba(99,102,241,0.1), rgba(34,211,238,0.05));
  border: 1px solid rgba(99,102,241,0.2);
  border-radius: 24px; padding: 60px 48px; text-align: center; max-width: 720px; margin: 0 auto;
}
.cta-box h2 { font-size: clamp(1.6rem, 2.5vw, 2rem); font-weight: 800; color: #fff; margin-bottom: 12px; }
.cta-box > p { color: var(--text-muted); margin-bottom: 36px; }
.contact-form { display: flex; flex-direction: column; gap: 14px; text-align: left; margin-bottom: 8px; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.field { display: flex; flex-direction: column; }
.contact-form input,
.contact-form textarea {
  width: 100%; padding: 12px 16px;
  background: rgba(255,255,255,0.05); border: 1px solid var(--border);
  border-radius: 12px; color: #fff; font-family: inherit; font-size: 0.9rem;
  outline: none; transition: border-color 0.2s;
}
.contact-form input:focus,
.contact-form textarea:focus { border-color: var(--primary); }
.contact-form input:invalid:not(:placeholder-shown) { border-color: #ef4444; }
.contact-form input::placeholder,
.contact-form textarea::placeholder { color: var(--text-muted); }
.contact-form textarea { resize: vertical; min-height: 100px; }
.form-hint { min-height: 1.2em; font-size: 0.8rem; color: #f87171; margin-bottom: 8px; }
.form-hint.ok { color: #34d399; }
.contact-alt { display: flex; justify-content: center; gap: 24px; flex-wrap: wrap; margin-top: 16px; }
.contact-alt a { color: var(--text-muted); font-size: 0.875rem; display: flex; align-items: center; gap: 8px; transition: color 0.2s; }
.contact-alt a:hover { color: #fff; }

/* ── FOOTER ─────────────────────────────────────────────────── */
.footer { background: #060609; padding: 48px 0 0; border-top: 1px solid var(--border); }
.footer-inner { display: flex; align-items: center; justify-content: space-between; padding-bottom: 32px; flex-wrap: wrap; gap: 24px; }
.footer-brand p { color: var(--text-muted); font-size: 0.85rem; margin-top: 10px; max-width: 240px; }
.footer-links { display: flex; gap: 28px; }
.footer-links a { color: var(--text-muted); font-size: 0.875rem; transition: color 0.2s; }
.footer-links a:hover { color: #fff; }
.footer-bottom { border-top: 1px solid var(--border); padding: 20px 24px; text-align: center; }
.footer-bottom p { color: var(--text-muted); font-size: 0.8rem; }

/* ── RESPONSIVE ─────────────────────────────────────────────── */
@media (max-width: 900px) {
  .hero-inner { grid-template-columns: 1fr; text-align: center; }
  .hero-visual { display: none; }
  .hero-desc { max-width: 100%; }
  .hero-actions { justify-content: center; }
  .hero-stats { justify-content: center; }
  .services-grid { grid-template-columns: repeat(2, 1fr); }
  .about-inner { grid-template-columns: 1fr; }
  .about-text .section-title { text-align: center; }
  .portfolio-grid { grid-template-columns: 1fr; }
}
@media (max-width: 640px) {
  .nav-links { display: none; flex-direction: column; position: fixed; top: 64px; left: 0; right: 0; background: rgba(10,10,15,0.97); backdrop-filter: blur(20px); padding: 24px; gap: 20px; border-bottom: 1px solid var(--border); }
  .nav-links.open { display: flex; }
  .nav-toggle { display: flex; }
  .services-grid { grid-template-columns: 1fr; }
  .cta-box { padding: 36px 24px; }
  .form-row { grid-template-columns: 1fr; }
  .footer-inner { flex-direction: column; align-items: flex-start; }
}
