:root {
  --bg: #0d1117;
  --surface: #161b22;
  --border: #21262d;
  --text: #e6edf3;
  --muted: #8b949e;
  --accent: #58a6ff;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

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

header,
section,
footer {
  max-width: 760px;
  margin: 0 auto;
  padding: 2rem 1.25rem;
}

section { scroll-margin-top: 1rem; }

h1 { font-size: 2.25rem; line-height: 1.2; margin: 0.5rem 0 0.25rem; }
h2 { font-size: 1.5rem; margin: 0 0 1rem; padding-bottom: 0.5rem; border-bottom: 1px solid var(--border); }
h3 { font-size: 1.05rem; margin: 0.5rem 0 0.25rem; }
p { margin: 0 0 1rem; }

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

/* Header */
header { text-align: center; padding-top: 3rem; }
.avatar {
  width: 88px;
  height: 88px;
  border-radius: 50%;
  display: block;
  margin: 0 auto 1rem;
  border: 2px solid var(--border);
}
.tagline { color: var(--muted); margin: 0 0 1rem; }
nav ul {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.25rem 0.5rem;
  margin: 0;
  padding: 0;
}
nav a {
  display: inline-block;
  color: var(--muted);
  text-decoration: none;
  padding: 0.3rem 0.6rem;
  border-radius: 6px;
}
nav a:hover,
nav a:focus-visible {
  color: var(--text);
  background: var(--surface);
}

/* Experience timeline */
.timeline {
  list-style: none;
  margin: 0;
  padding: 0;
}
.timeline li {
  position: relative;
  padding: 0 0 1.5rem 1.75rem;
  border-left: 2px solid var(--border);
}
.timeline li:last-child {
  border-left-color: transparent;
  padding-bottom: 0;
}
.timeline li::before {
  content: "";
  position: absolute;
  left: -0.45rem;
  top: 0.35rem;
  width: 0.7rem;
  height: 0.7rem;
  border-radius: 50%;
  background: var(--accent);
}
.timeline .meta {
  color: var(--muted);
  font-size: 0.9rem;
  margin: 0 0 0.25rem;
}

/* Projects grid */
.grid {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
}
.grid li {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 1rem 1.25rem;
}
.grid h3 { margin-top: 0; }
.grid p { margin-bottom: 0; }

/* Skills */
.skills-group { margin-bottom: 1.25rem; }
.skills-group:last-child { margin-bottom: 0; }
.skills-group h3 { margin: 0 0 0.5rem; }
.tags {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}
.tags li {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 0.25rem 0.75rem;
  font-size: 0.9rem;
}

/* Contact */
.contact-links {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}
.contact-links a {
  display: inline-block;
  padding: 0.5rem 1rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--text);
  text-decoration: none;
}
.contact-links a:hover,
.contact-links a:focus-visible {
  border-color: var(--accent);
  color: var(--accent);
}

/* Footer */
footer {
  text-align: center;
  color: var(--muted);
  font-size: 0.9rem;
  border-top: 1px solid var(--border);
}
footer p { margin: 0; }

/* Responsive */
@media (min-width: 560px) {
  .grid { grid-template-columns: repeat(2, 1fr); }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}