:root {
  --bg: #0A0E1A;
  --surface: #141A2E;
  --surface-2: #1C2440;
  --border: #283157;
  --text: #EEF1F8;
  --muted: #97A0BF;
  --cyan: #00E5C7;
  --violet: #7C5CFC;
  --radius: 16px;
  --maxw: 1180px;
  --display: "Space Grotesk", system-ui, sans-serif;
  --body: "Inter", system-ui, sans-serif;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

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

#neural-bg {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: -1;
  opacity: 0.5;
}

h1, h2, h3, .brand-name { font-family: var(--display); line-height: 1.1; letter-spacing: -0.02em; }

.eyebrow {
  font-family: var(--display);
  font-size: 0.78rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--cyan);
  font-weight: 600;
  margin-bottom: 0.9rem;
}

.grad {
  background: linear-gradient(100deg, var(--cyan), var(--violet));
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

/* HEADER */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  padding: 1rem clamp(1.2rem, 5vw, 3rem);
  backdrop-filter: blur(14px);
  background: rgba(10, 14, 26, 0.7);
  border-bottom: 1px solid var(--border);
}
.brand { display: flex; align-items: center; gap: 0.5rem; text-decoration: none; color: var(--text); }
.brand-mark { font-size: 1.5rem; color: var(--cyan); font-weight: 700; }
.brand-name { font-weight: 700; font-size: 1.15rem; }
.nav { display: flex; gap: 1.8rem; }
.nav a { color: var(--muted); text-decoration: none; font-size: 0.95rem; transition: color 0.2s; }
.nav a:hover { color: var(--text); }
.nav-cta {
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 600;
  padding: 0.55rem 1.1rem;
  border-radius: 999px;
  color: var(--bg);
  background: var(--cyan);
  transition: transform 0.2s, box-shadow 0.2s;
}
.nav-cta:hover { transform: translateY(-1px); box-shadow: 0 8px 24px rgba(0, 229, 199, 0.3); }

/* layout */
section { padding: clamp(3.5rem, 8vw, 6rem) clamp(1.2rem, 5vw, 3rem); max-width: var(--maxw); margin: 0 auto; }
.section-head { max-width: 640px; margin-bottom: 2.8rem; }
.section-head h2 { font-size: clamp(1.8rem, 4vw, 2.6rem); margin-bottom: 0.6rem; }
.section-lead { color: var(--muted); font-size: 1.05rem; }

/* HERO */
.hero { text-align: left; padding-top: clamp(4rem, 10vw, 7rem); padding-bottom: clamp(3rem, 8vw, 5rem); }
.hero h1 { font-size: clamp(2.4rem, 7vw, 4.6rem); font-weight: 700; margin-bottom: 1.3rem; }
.hero-sub { max-width: 620px; color: var(--muted); font-size: 1.15rem; margin-bottom: 2rem; }
.hero-actions { display: flex; gap: 1rem; flex-wrap: wrap; }

.btn-primary {
  text-decoration: none;
  font-family: var(--display);
  font-weight: 600;
  padding: 0.85rem 1.6rem;
  border-radius: 999px;
  background: linear-gradient(100deg, var(--cyan), var(--violet));
  color: var(--bg);
  border: none;
  cursor: pointer;
  font-size: 1rem;
  transition: transform 0.2s, box-shadow 0.2s;
}
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 12px 30px rgba(124, 92, 252, 0.35); }
.btn-primary.full { width: 100%; }
.btn-ghost {
  text-decoration: none;
  font-family: var(--display);
  font-weight: 600;
  padding: 0.85rem 1.6rem;
  border-radius: 999px;
  border: 1px solid var(--border);
  color: var(--text);
  transition: border-color 0.2s, background 0.2s;
}
.btn-ghost:hover { border-color: var(--cyan); background: var(--surface); }

/* SERVICES */
.service-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 1.4rem; }
.service-card {
  text-align: left;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.8rem;
  cursor: pointer;
  color: var(--text);
  font-family: var(--body);
  transition: transform 0.25s, border-color 0.25s, background 0.25s;
  position: relative;
  overflow: hidden;
}
.service-card::before {
  content: "";
  position: absolute; inset: 0;
  background: linear-gradient(160deg, rgba(0,229,199,0.08), transparent 60%);
  opacity: 0; transition: opacity 0.3s;
}
.service-card:hover { transform: translateY(-4px); border-color: var(--cyan); }
.service-card:hover::before { opacity: 1; }
.service-card.active { border-color: var(--violet); background: var(--surface-2); }
.service-num { font-family: var(--display); font-size: 0.85rem; color: var(--cyan); letter-spacing: 0.1em; }
.service-card h3 { font-size: 1.35rem; margin: 0.6rem 0 0.7rem; }
.service-card p { color: var(--muted); font-size: 0.98rem; margin-bottom: 1.1rem; }
.service-link { font-family: var(--display); font-weight: 600; color: var(--cyan); font-size: 0.92rem; }

/* PORTFOLIO */
.filter-bar { display: flex; flex-wrap: wrap; gap: 0.7rem; margin-bottom: 2rem; }
.filter-btn {
  font-family: var(--display);
  font-size: 0.9rem;
  padding: 0.5rem 1.1rem;
  border-radius: 999px;
  background: transparent;
  border: 1px solid var(--border);
  color: var(--muted);
  cursor: pointer;
  transition: all 0.2s;
}
.filter-btn:hover { color: var(--text); border-color: var(--cyan); }
.filter-btn.active { background: var(--cyan); color: var(--bg); border-color: var(--cyan); font-weight: 600; }

.project-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 1.4rem; }
.project-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  transition: transform 0.25s, border-color 0.25s;
}
.project-card:hover { transform: translateY(-4px); border-color: var(--violet); }
.project-card img { width: 100%; height: 200px; object-fit: cover; display: block; cursor: zoom-in; background: var(--surface-2); }
.project-body { padding: 1.2rem 1.3rem 1.5rem; }
.project-tag {
  display: inline-block;
  font-family: var(--display);
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--cyan);
  margin-bottom: 0.5rem;
}
.project-body h3 { font-size: 1.15rem; margin-bottom: 0.4rem; }
.project-body p { color: var(--muted); font-size: 0.95rem; }
.empty-state { grid-column: 1 / -1; color: var(--muted); text-align: center; padding: 2rem 0; }

/* CONTACT */
.contact-inner {
  display: grid;
  grid-template-columns: 1fr 1.1fr;
  gap: 3rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 24px;
  padding: clamp(1.8rem, 4vw, 3rem);
}
.contact-methods { display: flex; flex-direction: column; gap: 1rem; margin-top: 2rem; }
.contact-method {
  display: flex; align-items: center; gap: 1rem;
  text-decoration: none; color: var(--text);
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1rem 1.2rem;
  transition: border-color 0.2s, transform 0.2s;
}
.contact-method:hover { border-color: var(--cyan); transform: translateX(4px); }
.cm-icon { font-size: 1.5rem; }
.contact-method strong { font-family: var(--display); }

.field { margin-bottom: 1.1rem; }
.field label { display: block; font-size: 0.88rem; font-weight: 500; margin-bottom: 0.4rem; color: var(--text); }
.field .opt { color: var(--muted); font-weight: 400; }
.field input, .field select, .field textarea {
  width: 100%;
  padding: 0.8rem 1rem;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 10px;
  color: var(--text);
  font-family: var(--body);
  font-size: 0.98rem;
  transition: border-color 0.2s;
}
.field input:focus, .field select:focus, .field textarea:focus { outline: none; border-color: var(--cyan); }
.field textarea { resize: vertical; }
.form-status { margin-top: 1rem; font-size: 0.95rem; text-align: center; min-height: 1.4rem; }
.form-status.ok { color: var(--cyan); }
.form-status.err { color: #ff7a7a; }

/* FOOTER */
.site-footer {
  display: flex; align-items: center; justify-content: center; gap: 0.8rem; flex-wrap: wrap;
  padding: 2rem 1.5rem;
  border-top: 1px solid var(--border);
  color: var(--muted);
  font-size: 0.9rem;
}
.site-footer .brand-mark { font-size: 1.2rem; }
.admin-link { color: var(--muted); text-decoration: none; opacity: 0.6; margin-left: 1rem; }
.admin-link:hover { color: var(--cyan); opacity: 1; }

/* LIGHTBOX */
.lightbox {
  position: fixed; inset: 0; z-index: 100;
  background: rgba(5, 8, 16, 0.92);
  display: none; align-items: center; justify-content: center;
  padding: 2rem;
}
.lightbox.open { display: flex; }
.lightbox img { max-width: 90vw; max-height: 85vh; border-radius: 12px; }
.lightbox-close {
  position: absolute; top: 1.5rem; right: 2rem;
  background: none; border: none; color: #fff; font-size: 2.5rem; cursor: pointer; line-height: 1;
}

/* RESPONSIVE */
@media (max-width: 820px) {
  .nav { display: none; }
  .contact-inner { grid-template-columns: 1fr; gap: 2rem; }
}
@media (max-width: 560px) {
  .nav-cta { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; }
  html { scroll-behavior: auto; }
}
