:root {
  --bg: #0a0e17;
  --bg-alt: #111827;
  --bg-card: #151d2e;
  --bg-card-hover: #1a2438;
  --text: #e8edf5;
  --text-muted: #94a3b8;
  --text-dim: #64748b;
  --accent: #3b82f6;
  --accent-light: #60a5fa;
  --accent-glow: rgba(59, 130, 246, 0.25);
  --border: rgba(148, 163, 184, 0.12);
  --radius: 16px;
  --radius-sm: 10px;
  --font: "DM Sans", system-ui, sans-serif;
  --mono: "JetBrains Mono", monospace;
  --header-h: 72px;
  --container: 1120px;
  --transition: 0.2s ease;
}

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: var(--header-h);
}

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

img {
  display: block;
  max-width: 100%;
  height: auto;
}

a {
  color: var(--accent-light);
  text-decoration: none;
  transition: color var(--transition);
}

a:hover {
  color: #93c5fd;
}

.container {
  width: min(100% - 2rem, var(--container));
  margin-inline: auto;
}

/* Header */
.header {
  position: fixed;
  inset: 0 0 auto;
  z-index: 100;
  height: var(--header-h);
  background: rgba(10, 14, 23, 0.85);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}

.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 100%;
}

.logo {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  color: var(--text);
}

.logo-mark {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  background: linear-gradient(135deg, var(--accent), #2563eb);
  border-radius: 10px;
  font-weight: 700;
  font-size: 1rem;
}

.logo-text {
  font-weight: 600;
  font-size: 1.05rem;
  letter-spacing: -0.02em;
}

.logo-text span {
  color: var(--accent-light);
}

.nav-links {
  display: flex;
  gap: 2rem;
  list-style: none;
}

.nav-links a {
  color: var(--text-muted);
  font-size: 0.925rem;
  font-weight: 500;
}

.nav-links a:hover {
  color: var(--text);
}

.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
}

.nav-toggle span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--text);
  border-radius: 2px;
  transition: var(--transition);
}

/* Hero */
.hero {
  position: relative;
  padding: calc(var(--header-h) + 4rem) 0 5rem;
  overflow: hidden;
}

.hero-bg {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 80% 60% at 70% 20%, var(--accent-glow), transparent),
    radial-gradient(ellipse 50% 40% at 10% 80%, rgba(37, 99, 235, 0.08), transparent);
  pointer-events: none;
}

.hero-grid {
  position: relative;
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 3rem;
  align-items: center;
}

.eyebrow {
  display: inline-block;
  font-family: var(--mono);
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--accent-light);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 1rem;
  padding: 0.35rem 0.75rem;
  background: rgba(59, 130, 246, 0.1);
  border: 1px solid rgba(59, 130, 246, 0.2);
  border-radius: 999px;
}

.hero h1 {
  font-size: clamp(2rem, 4.5vw, 3.25rem);
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: -0.03em;
  margin-bottom: 1.25rem;
}

.hero-lead {
  font-size: 1.1rem;
  color: var(--text-muted);
  max-width: 52ch;
  margin-bottom: 2rem;
}

.hero-lead strong {
  color: var(--text);
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-bottom: 2.5rem;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.75rem 1.5rem;
  border-radius: var(--radius-sm);
  font-weight: 600;
  font-size: 0.95rem;
  transition: all var(--transition);
  border: 1px solid transparent;
}

.btn-primary {
  background: var(--accent);
  color: #fff;
}

.btn-primary:hover {
  background: #2563eb;
  color: #fff;
  transform: translateY(-1px);
}

.btn-ghost {
  border-color: var(--border);
  color: var(--text);
  background: rgba(255, 255, 255, 0.03);
}

.btn-ghost:hover {
  background: rgba(255, 255, 255, 0.06);
  color: var(--text);
}

.hero-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 2rem;
}

.hero-meta dt {
  font-family: var(--mono);
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-dim);
  margin-bottom: 0.25rem;
}

.hero-meta dd {
  font-weight: 600;
  font-size: 0.95rem;
}

.hero-visual {
  position: relative;
  display: flex;
  justify-content: center;
}

.profile-frame {
  position: relative;
  border-radius: 24px;
  overflow: hidden;
  box-shadow:
    0 0 0 1px var(--border),
    0 24px 48px rgba(0, 0, 0, 0.4);
}

.profile-frame::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 60%, rgba(10, 14, 23, 0.4));
  z-index: 1;
  pointer-events: none;
}

.profile-frame img {
  width: 100%;
  max-width: 380px;
  aspect-ratio: 1;
  object-fit: cover;
}

.hero-badge {
  position: absolute;
  bottom: 1.5rem;
  left: 50%;
  transform: translateX(-50%);
  z-index: 2;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 1rem;
  background: rgba(10, 14, 23, 0.9);
  border: 1px solid var(--border);
  border-radius: 999px;
  font-size: 0.85rem;
  font-weight: 500;
  white-space: nowrap;
}

.badge-dot {
  width: 8px;
  height: 8px;
  background: #22c55e;
  border-radius: 50%;
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.5; }
}

/* Sections */
.section {
  padding: 5rem 0;
}

.section-alt {
  background: var(--bg-alt);
}

.section-label {
  font-family: var(--mono);
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--accent-light);
  margin-bottom: 0.75rem;
}

.section-head {
  max-width: 640px;
  margin-bottom: 3rem;
}

.section-head h2,
.split h2 {
  font-size: clamp(1.75rem, 3vw, 2.25rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.2;
}

.section-desc {
  margin-top: 0.75rem;
  color: var(--text-muted);
  font-size: 1.05rem;
}

.split {
  display: grid;
  grid-template-columns: 1fr 1.2fr;
  gap: 3rem;
  align-items: start;
}

.prose p {
  color: var(--text-muted);
  margin-bottom: 1rem;
  font-size: 1.05rem;
}

.prose p:last-child {
  margin-bottom: 0;
}

.prose strong {
  color: var(--text);
}

/* Cards */
.cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 1.25rem;
}

.card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.75rem;
  transition: all var(--transition);
}

.card:hover {
  background: var(--bg-card-hover);
  border-color: rgba(59, 130, 246, 0.25);
  transform: translateY(-2px);
}

.card-icon {
  font-family: var(--mono);
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--accent-light);
  margin-bottom: 1rem;
}

.card h3 {
  font-size: 1.15rem;
  font-weight: 600;
  margin-bottom: 0.75rem;
  letter-spacing: -0.01em;
}

.card p {
  color: var(--text-muted);
  font-size: 0.95rem;
  margin-bottom: 1.25rem;
}

.tag-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  list-style: none;
}

.tag-list li {
  font-family: var(--mono);
  font-size: 0.72rem;
  padding: 0.3rem 0.6rem;
  background: rgba(59, 130, 246, 0.08);
  border: 1px solid rgba(59, 130, 246, 0.15);
  border-radius: 6px;
  color: var(--accent-light);
}

/* Services */
.services-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 1.25rem;
}

.service {
  padding: 1.5rem;
  border-left: 3px solid var(--accent);
  background: rgba(59, 130, 246, 0.04);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
}

.service h3 {
  font-size: 1.05rem;
  margin-bottom: 0.5rem;
}

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

/* Stack */
.stack-groups {
  display: grid;
  gap: 1.5rem;
}

.stack-group h3 {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text-muted);
  margin-bottom: 0.75rem;
}

.stack-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.stack-tags span {
  padding: 0.45rem 0.85rem;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 8px;
  font-size: 0.875rem;
  color: var(--text-muted);
}

/* Contact */
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
  align-items: start;
}

.contact-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 2rem;
}

.contact-row {
  display: grid;
  grid-template-columns: 120px 1fr;
  gap: 1rem;
  padding: 0.85rem 0;
  border-bottom: 1px solid var(--border);
  align-items: baseline;
}

.contact-row:last-of-type {
  border-bottom: none;
}

.contact-label {
  font-family: var(--mono);
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-dim);
}

.contact-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 1.5rem;
}

/* Footer */
.footer {
  border-top: 1px solid var(--border);
  padding: 2.5rem 0;
  background: var(--bg-alt);
}

.footer-inner {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 1.5rem;
  align-items: center;
}

.footer-brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.footer-brand p {
  font-size: 0.875rem;
  color: var(--text-dim);
}

.footer-links {
  display: flex;
  gap: 1.5rem;
}

.footer-links a {
  font-size: 0.875rem;
  color: var(--text-muted);
}

.footer-copy {
  grid-column: 1 / -1;
  font-size: 0.8rem;
  color: var(--text-dim);
}

/* Privacy page */
.page-header {
  padding: calc(var(--header-h) + 3rem) 0 2rem;
  border-bottom: 1px solid var(--border);
}

.page-header h1 {
  font-size: clamp(1.75rem, 3vw, 2.5rem);
  margin-bottom: 0.5rem;
}

.page-header p {
  color: var(--text-muted);
}

.legal-content {
  padding: 3rem 0 5rem;
  max-width: 720px;
}

.legal-content h2 {
  font-size: 1.25rem;
  margin: 2rem 0 0.75rem;
}

.legal-content p,
.legal-content li {
  color: var(--text-muted);
  margin-bottom: 0.75rem;
}

.legal-content ul {
  padding-left: 1.25rem;
  margin-bottom: 1rem;
}

.legal-content a {
  word-break: break-all;
}

.back-link {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  margin-bottom: 1.5rem;
  font-size: 0.9rem;
  color: var(--text-muted);
}

.back-link:hover {
  color: var(--accent-light);
}

/* Responsive */
@media (max-width: 900px) {
  .hero-grid,
  .split,
  .contact-grid {
    grid-template-columns: 1fr;
  }

  .hero-visual {
    order: -1;
  }

  .profile-frame img {
    max-width: 280px;
    margin-inline: auto;
  }

  .nav-toggle {
    display: flex;
  }

  .nav-links {
    position: fixed;
    inset: var(--header-h) 0 auto;
    flex-direction: column;
    gap: 0;
    background: rgba(10, 14, 23, 0.98);
    border-bottom: 1px solid var(--border);
    padding: 1rem 0;
    transform: translateY(-110%);
    opacity: 0;
    pointer-events: none;
    transition: all 0.3s ease;
  }

  .nav-links.open {
    transform: translateY(0);
    opacity: 1;
    pointer-events: auto;
  }

  .nav-links li a {
    display: block;
    padding: 0.85rem 1.5rem;
  }

  .footer-inner {
    grid-template-columns: 1fr;
    text-align: center;
  }

  .footer-brand {
    justify-content: center;
  }

  .footer-links {
    justify-content: center;
  }

  .contact-row {
    grid-template-columns: 1fr;
    gap: 0.25rem;
  }
}

@media (max-width: 480px) {
  .hero-meta {
    gap: 1.25rem;
  }

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