:root {
  --bg: #0e161f;
  --surface: #16212c;
  --surface-2: #1c2936;
  --line: #263543;
  --text: #e9eef3;
  --muted: #8a9bab;
  --accent: #e3a857;
  --accent-soft: rgba(227, 168, 87, 0.12);
  --font-display: "Bricolage Grotesque", system-ui, sans-serif;
  --font-body: "Figtree", system-ui, sans-serif;
  --font-mono: "IBM Plex Mono", ui-monospace, monospace;
}

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

html { scroll-behavior: smooth; }

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

.mono { font-family: var(--font-mono); }

a { color: inherit; }

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 2px;
}

h1, h2, h3 {
  font-family: var(--font-display);
  line-height: 1.1;
  font-weight: 700;
}

.eyebrow {
  font-family: var(--font-mono);
  font-size: 0.8125rem;
  color: var(--accent);
  letter-spacing: 0.02em;
  margin-bottom: 1rem;
}

/* ---------- nav ---------- */

.nav {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  gap: 2rem;
  padding: 0.85rem clamp(1.25rem, 5vw, 4rem);
  background: rgba(14, 22, 31, 0.85);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
}

.nav-brand {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 1.1rem;
  text-decoration: none;
  letter-spacing: -0.01em;
}

.nav-brand span { color: var(--accent); }

.nav-links {
  display: flex;
  gap: 1.5rem;
  margin-left: auto;
}

.nav-links a {
  text-decoration: none;
  color: var(--muted);
  font-size: 0.9375rem;
  transition: color 0.15s;
}

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

.nav-actions {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.lang-toggle {
  display: flex;
  border: 1px solid var(--line);
  border-radius: 6px;
  overflow: hidden;
}

.lang-toggle button {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  padding: 0.35rem 0.6rem;
  background: transparent;
  color: var(--muted);
  border: none;
  cursor: pointer;
}

.lang-toggle button[aria-pressed="true"] {
  background: var(--surface-2);
  color: var(--accent);
}

/* ---------- buttons ---------- */

.btn {
  display: inline-block;
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 1rem;
  text-decoration: none;
  padding: 0.75rem 1.5rem;
  border-radius: 8px;
  transition: transform 0.15s, background 0.15s, border-color 0.15s;
}

.btn:hover { transform: translateY(-1px); }

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

.btn-primary:hover { background: #ecb96f; }

.btn-ghost {
  border: 1px solid var(--line);
  color: var(--text);
}

.btn-ghost:hover { border-color: var(--accent); }

.btn-small {
  font-size: 0.875rem;
  padding: 0.45rem 1rem;
}

/* ---------- hero ---------- */

.hero {
  max-width: 62rem;
  margin: 0 auto;
  padding: clamp(5rem, 14vh, 9rem) clamp(1.25rem, 5vw, 4rem) 5rem;
}

.hero h1 {
  font-size: clamp(2.4rem, 6.5vw, 4.5rem);
  font-weight: 800;
  letter-spacing: -0.02em;
  margin-bottom: 1.5rem;
}

.hero .accent { color: var(--accent); }

.hero-sub {
  max-width: 36rem;
  color: var(--muted);
  font-size: 1.2rem;
  margin-bottom: 2.25rem;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
}

.hero-note {
  margin-top: 2.5rem;
  font-size: 0.8125rem;
  color: var(--muted);
}

@media (prefers-reduced-motion: no-preference) {
  .hero > * {
    animation: rise 0.6s ease-out backwards;
  }
  .hero > *:nth-child(2) { animation-delay: 0.08s; }
  .hero > *:nth-child(3) { animation-delay: 0.16s; }
  .hero > *:nth-child(4) { animation-delay: 0.24s; }
  .hero > *:nth-child(5) { animation-delay: 0.32s; }
}

@keyframes rise {
  from { opacity: 0; transform: translateY(14px); }
  to { opacity: 1; transform: none; }
}

/* ---------- sections ---------- */

.section {
  max-width: 62rem;
  margin: 0 auto;
  padding: 4.5rem clamp(1.25rem, 5vw, 4rem);
  border-top: 1px solid var(--line);
}

.section h2 {
  font-size: clamp(1.7rem, 3.5vw, 2.4rem);
  letter-spacing: -0.015em;
  margin-bottom: 2rem;
}

/* ---------- about ---------- */

.about-grid {
  display: grid;
  grid-template-columns: 1fr 15rem;
  gap: 3rem;
}

.about-text p + p { margin-top: 1.1rem; }

.about-text { color: var(--muted); }

.about-facts {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  align-self: start;
  border-left: 1px solid var(--line);
  padding-left: 2rem;
}

.about-facts dt {
  font-size: 1.6rem;
  color: var(--accent);
}

.about-facts dd {
  color: var(--muted);
  font-size: 0.9375rem;
}

/* ---------- services ---------- */

.services-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.25rem;
}

.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 1.75rem;
  transition: border-color 0.2s;
}

.card:hover { border-color: var(--accent); }

.card h3 {
  font-size: 1.2rem;
  margin-bottom: 0.6rem;
}

.card p {
  color: var(--muted);
  font-size: 0.9688rem;
}

/* ---------- timeline (git log) ---------- */

.timeline {
  list-style: none;
  position: relative;
  padding-left: 0.5rem;
}

.timeline::before {
  content: "";
  position: absolute;
  left: calc(0.5rem + 5px);
  top: 8px;
  bottom: 8px;
  width: 2px;
  background: var(--line);
}

.timeline li {
  position: relative;
  padding: 0 0 2.5rem 2.5rem;
}

.timeline li:last-child { padding-bottom: 0; }

.timeline li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 6px;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--bg);
  border: 2px solid var(--accent);
}

.commit-date {
  display: inline-block;
  font-size: 0.8125rem;
  color: var(--accent);
  background: var(--accent-soft);
  border-radius: 4px;
  padding: 0.1rem 0.5rem;
  margin-bottom: 0.5rem;
}

.commit-body h3 {
  font-size: 1.15rem;
  margin-bottom: 0.35rem;
}

.commit-body p {
  color: var(--muted);
  font-size: 0.9688rem;
  max-width: 40rem;
}

/* ---------- skills ---------- */

.skills-list {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
}

.skills-list li {
  font-size: 0.8125rem;
  color: var(--text);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 0.4rem 0.9rem;
}

/* ---------- contact ---------- */

.contact { text-align: center; padding-bottom: 6rem; }

.contact .eyebrow { margin-bottom: 1rem; }

.contact-sub {
  color: var(--muted);
  max-width: 30rem;
  margin: 0 auto 2.25rem;
}

.contact .hero-actions { justify-content: center; }

/* ---------- footer ---------- */

.footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  max-width: 62rem;
  margin: 0 auto;
  padding: 1.5rem clamp(1.25rem, 5vw, 4rem);
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 0.8125rem;
}

.footer a {
  color: var(--muted);
  transition: color 0.15s;
}

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

/* ---------- responsive ---------- */

@media (max-width: 720px) {
  .nav { gap: 1rem; }
  .nav-links { display: none; }
  .about-grid { grid-template-columns: 1fr; }
  .about-facts {
    flex-direction: row;
    border-left: none;
    padding-left: 0;
    border-top: 1px solid var(--line);
    padding-top: 1.5rem;
    gap: 2.5rem;
  }
  .services-grid { grid-template-columns: 1fr; }
}
