:root {
  --bg: #0d1117;
  --panel: #111827;
  --text: #f6f7fb;
  --muted: #a8b3c7;
  --soft: #d7deec;
  --line: rgba(255, 255, 255, 0.11);
  --line-strong: rgba(255, 255, 255, 0.2);
  --max: 1120px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--text);
  background:
    radial-gradient(circle at 12% 0%, rgba(99, 102, 241, 0.17), transparent 31rem),
    radial-gradient(circle at 86% 4%, rgba(14, 165, 233, 0.13), transparent 28rem),
    linear-gradient(180deg, rgba(255,255,255,0.02), transparent 42rem),
    var(--bg);
  line-height: 1.6;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; text-decoration: none; }

.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  max-width: var(--max);
  margin: 0 auto;
  padding: 1rem 1.5rem;
  backdrop-filter: blur(18px);
}

.brand {
  display: inline-grid;
  place-items: center;
  width: 2.55rem;
  height: 2.55rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  font-weight: 800;
  letter-spacing: -0.05em;
  background: rgba(255,255,255,0.035);
}

nav { display: flex; gap: 1.25rem; color: var(--muted); font-size: 0.95rem; }
nav a { transition: color 180ms ease; }
nav a:hover { color: var(--text); }

.section {
  max-width: var(--max);
  margin: 0 auto;
  padding: 6rem 1.5rem;
}

.hero {
  min-height: 82vh;
  display: grid;
  align-content: center;
  gap: 4rem;
}

.hero-content { max-width: 900px; }
.eyebrow {
  margin: 0 0 1rem;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.18em;
  font-size: 0.76rem;
  font-weight: 800;
}

h1, h2, h3, p { margin-top: 0; }
h1 {
  margin-bottom: 1.15rem;
  font-size: clamp(3.6rem, 10vw, 8rem);
  line-height: 0.9;
  letter-spacing: -0.085em;
}
h2 {
  max-width: 790px;
  margin-bottom: 1.2rem;
  font-size: clamp(2rem, 4vw, 4rem);
  line-height: 1;
  letter-spacing: -0.06em;
}
h3 { margin-bottom: 0.75rem; font-size: 1.12rem; letter-spacing: -0.025em; }

.hero-subtitle {
  margin-bottom: 1rem;
  font-size: clamp(1.35rem, 3vw, 2.25rem);
  color: var(--soft);
  letter-spacing: -0.045em;
}
.hero-copy, .section-body p, .contact p {
  max-width: 740px;
  color: var(--muted);
  font-size: 1.08rem;
}

.hero-actions, .contact-actions { display: flex; flex-wrap: wrap; gap: 0.8rem; margin-top: 2rem; }
.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 2.85rem;
  padding: 0 1.05rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: transparent;
  color: var(--text);
  font: inherit;
  cursor: pointer;
  transition: transform 180ms ease, border-color 180ms ease, background 180ms ease, color 180ms ease;
}
.button:hover { transform: translateY(-2px); border-color: var(--line-strong); background: rgba(255,255,255,0.04); }
.button.primary { background: var(--text); color: var(--bg); border-color: var(--text); }
.button.secondary { color: var(--muted); }

.worked-with {
  padding-top: 2rem;
  border-top: 1px solid var(--line);
}
.worked-with span {
  display: block;
  margin-bottom: 1rem;
  color: var(--muted);
  font-size: 0.9rem;
  font-weight: 700;
}
.worked-with ul {
  display: flex;
  flex-wrap: wrap;
  gap: 0.7rem;
  padding: 0;
  margin: 0;
  list-style: none;
}
.worked-with li {
  padding: 0.7rem 0.95rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--soft);
  background: rgba(255,255,255,0.032);
}

.split {
  display: grid;
  grid-template-columns: 0.7fr 2fr;
  gap: 4rem;
  border-top: 1px solid var(--line);
}
.section-label { color: var(--muted); font-weight: 800; }

.section-heading { margin-bottom: 2rem; }
.cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
}
.cards.four { grid-template-columns: repeat(4, 1fr); }
.card, .project-item {
  padding: 1.4rem;
  border: 1px solid var(--line);
  border-radius: 1.5rem;
  background: linear-gradient(180deg, rgba(255,255,255,0.05), rgba(255,255,255,0.018));
  box-shadow: 0 18px 50px rgba(0,0,0,0.13);
}
.card p, .project-item p { color: var(--muted); margin-bottom: 0; }
.project-list { display: grid; gap: 1rem; }

.tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.7rem;
  padding: 0;
  margin: 0;
  list-style: none;
}
.tags li {
  padding: 0.65rem 0.9rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--muted);
  background: rgba(255,255,255,0.03);
}

.now-section { padding-bottom: 3rem; }
.contact {
  border-top: 1px solid var(--line);
  text-align: left;
}
.email-output {
  min-height: 2rem;
  margin-top: 1.25rem;
  font-size: 1.08rem;
  color: var(--text) !important;
}
.email-output a {
  border-bottom: 1px solid var(--line-strong);
  padding-bottom: 0.15rem;
}

.site-footer {
  max-width: var(--max);
  margin: 0 auto;
  padding: 2rem 1.5rem 3rem;
  color: var(--muted);
  border-top: 1px solid var(--line);
}

.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 750ms ease, transform 750ms ease;
}
.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; transition: none; }
  .button { transition: none; }
}

@media (max-width: 1040px) {
  .cards.four { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 860px) {
  nav { display: none; }
  .section { padding: 4.5rem 1.25rem; }
  .hero { min-height: 78vh; gap: 3rem; }
  .split, .cards, .cards.four { grid-template-columns: 1fr; gap: 1.25rem; }
  h1 { font-size: clamp(3.15rem, 18vw, 5rem); }
  .hero-copy, .section-body p, .contact p { font-size: 1.02rem; }
}
