:root {
  --bg: #0c0e12;
  --bg-elev: #141821;
  --bg-card: #161b24;
  --border: #232a36;
  --border-hover: #364152;
  --text: #e7ecf3;
  --muted: #9aa6b6;
  --accent: #6ea8fe;
  --accent-soft: rgba(110, 168, 254, 0.14);
  --maxw: 980px;
  --radius: 14px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica,
    Arial, sans-serif;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

.container {
  width: 100%;
  max-width: var(--maxw);
  margin: 0 auto;
  padding-left: 24px;
  padding-right: 24px;
}

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

h1,
h2,
h3 {
  line-height: 1.2;
  letter-spacing: -0.02em;
}

.skip-link {
  position: absolute;
  left: -999px;
  top: 0;
  background: var(--accent);
  color: #06101f;
  padding: 8px 14px;
  border-radius: 0 0 8px 0;
  z-index: 100;
}
.skip-link:focus {
  left: 0;
}

/* Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(12, 14, 18, 0.78);
  backdrop-filter: saturate(140%) blur(10px);
  border-bottom: 1px solid var(--border);
}
.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 60px;
}
.brand {
  color: var(--text);
  font-weight: 700;
  font-size: 1.05rem;
  letter-spacing: -0.02em;
}
.brand span {
  color: var(--muted);
  font-weight: 500;
}
.nav-links {
  display: flex;
  align-items: center;
  gap: 8px;
}
.nav-links a {
  color: var(--muted);
  padding: 8px 12px;
  border-radius: 8px;
  font-size: 0.95rem;
  transition: color 0.15s, background 0.15s;
}
.nav-links a:hover {
  color: var(--text);
}
.nav-cta {
  color: var(--accent) !important;
  border: 1px solid var(--border-hover);
}
.nav-cta:hover {
  background: var(--accent-soft);
}

/* Hero */
.hero {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 48px;
  padding-top: 84px;
  padding-bottom: 56px;
  position: relative;
}
.hero::before {
  content: "";
  position: absolute;
  top: -80px;
  left: 50%;
  transform: translateX(-50%);
  width: 680px;
  max-width: 90%;
  height: 320px;
  background: radial-gradient(
    ellipse at center,
    rgba(110, 168, 254, 0.16),
    transparent 70%
  );
  pointer-events: none;
  z-index: -1;
}
.eyebrow {
  color: var(--accent);
  font-size: 0.86rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  margin: 0 0 14px;
}
.hero h1 {
  font-size: clamp(2.6rem, 7vw, 4rem);
  margin: 0 0 18px;
  font-weight: 800;
}
.lead {
  font-size: clamp(1.1rem, 2.5vw, 1.35rem);
  color: var(--muted);
  max-width: 36ch;
  margin: 0 0 28px;
}
.hero-photo img {
  border-radius: 50%;
  width: 180px;
  height: 180px;
  object-fit: cover;
  border: 1px solid var(--border);
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.45);
  flex-shrink: 0;
}

/* Buttons */
.cta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}
.btn {
  display: inline-flex;
  align-items: center;
  padding: 10px 18px;
  border-radius: 10px;
  border: 1px solid var(--border-hover);
  color: var(--text);
  font-weight: 600;
  font-size: 0.95rem;
  transition: border-color 0.15s, background 0.15s, transform 0.15s;
}
.btn:hover {
  border-color: var(--accent);
  transform: translateY(-1px);
}
.btn-primary {
  background: var(--accent);
  border-color: var(--accent);
  color: #06101f;
}
.btn-primary:hover {
  background: #87b6ff;
}

/* Stats */
.stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  padding-top: 8px;
  padding-bottom: 56px;
}
.stat {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 22px 20px;
}
.stat-num {
  display: block;
  font-size: 1.7rem;
  font-weight: 800;
  color: var(--accent);
  letter-spacing: -0.02em;
}
.stat-label {
  display: block;
  color: var(--muted);
  font-size: 0.9rem;
  margin-top: 6px;
}

/* About */
.about {
  padding-bottom: 64px;
}
.about p {
  font-size: 1.2rem;
  max-width: 64ch;
  margin: 0;
}

/* Sections */
.section-title {
  font-size: 1.6rem;
  margin: 0 0 28px;
  font-weight: 700;
}
.section-title::after {
  content: "";
  display: block;
  width: 44px;
  height: 3px;
  background: var(--accent);
  border-radius: 3px;
  margin-top: 10px;
}

/* Work cards */
.work {
  padding-bottom: 72px;
}
.cards {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 18px;
}
.card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  transition: border-color 0.18s, transform 0.18s;
}
.card:hover {
  border-color: var(--border-hover);
  transform: translateY(-2px);
}
.card-metric {
  display: inline-block;
  color: var(--accent);
  background: var(--accent-soft);
  border-radius: 999px;
  padding: 4px 12px;
  font-size: 0.82rem;
  font-weight: 600;
  margin-bottom: 14px;
}
.card h3 {
  font-size: 1.15rem;
  margin: 0 0 10px;
}
.card p {
  color: var(--muted);
  margin: 0 0 16px;
  font-size: 0.98rem;
}
.tags {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0;
  padding: 0;
}
.tags li {
  font-size: 0.78rem;
  color: var(--muted);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 3px 9px;
}

/* Skills */
.skills {
  padding-bottom: 72px;
}
.skill-groups {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px 40px;
}
.skill-group h3 {
  font-size: 0.82rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--accent);
  margin: 0 0 4px;
}
.skill-group p {
  margin: 0 0 8px;
  color: var(--text);
}

/* Contact */
.contact {
  padding-bottom: 80px;
}
.contact-lead {
  color: var(--muted);
  font-size: 1.1rem;
  max-width: 52ch;
  margin: 0 0 24px;
}

/* Footer */
.site-footer {
  border-top: 1px solid var(--border);
  padding: 28px 0;
  color: var(--muted);
  font-size: 0.9rem;
}

/* Responsive */
@media (max-width: 820px) {
  .stats {
    grid-template-columns: repeat(2, 1fr);
  }
}
@media (max-width: 680px) {
  .nav-links a:not(.nav-cta) {
    display: none;
  }
  .hero {
    flex-direction: column-reverse;
    align-items: flex-start;
    gap: 28px;
    padding-top: 56px;
  }
  .hero-photo img {
    width: 132px;
    height: 132px;
  }
  .cards,
  .skill-groups {
    grid-template-columns: 1fr;
  }
  .lead {
    max-width: none;
  }
}

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