/* ---- Theme ----------------------------------------------------------- */
:root {
  --bg: #ffffff;
  --fg: #1a1a1a;
  --muted: #5f6368;
  --line: #e5e7eb;
  --card: #f8f9fa;
  --accent: #2563eb;
  --accent-fg: #ffffff;
  --max: 46rem;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0f1115;
    --fg: #e6e6e6;
    --muted: #9aa0a6;
    --line: #262a31;
    --card: #171a20;
    --accent: #60a5fa;
    --accent-fg: #0f1115;
  }
}

/* ---- Base ------------------------------------------------------------ */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font: 16px/1.6 system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  color: var(--fg);
  background: var(--bg);
}
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3 { line-height: 1.2; margin: 0 0 .5rem; }
h1 { font-size: 2.5rem; }
h2 { font-size: 1.5rem; margin-top: 0; }
h3 { font-size: 1.1rem; }
p { margin: 0 0 1rem; }
ul, ol { margin: 0; padding: 0; list-style: none; }

/* ---- Layout ---------------------------------------------------------- */
main, .site-header, .site-footer {
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 1.25rem;
}
section { padding: 2.5rem 0; border-top: 1px solid var(--line); }
.hero { border-top: 0; padding-top: 4rem; }

/* ---- Header ---------------------------------------------------------- */
.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding-top: 1.25rem;
  padding-bottom: 1.25rem;
}
.brand { font-weight: 600; color: var(--fg); }
nav { display: flex; gap: 1.25rem; }
nav a { color: var(--muted); }
nav a:hover { color: var(--fg); text-decoration: none; }

/* ---- Hero ------------------------------------------------------------ */
.lede { font-size: 1.15rem; color: var(--muted); max-width: 36rem; }
.actions { display: flex; flex-wrap: wrap; gap: .75rem; margin-top: 1.5rem; }
.button {
  display: inline-block;
  padding: .6rem 1.1rem;
  border-radius: .5rem;
  background: var(--accent);
  color: var(--accent-fg);
  font-weight: 500;
}
.button:hover { text-decoration: none; filter: brightness(1.08); }
.button.secondary {
  background: transparent;
  color: var(--fg);
  border: 1px solid var(--line);
}

/* ---- About ----------------------------------------------------------- */
.tags { display: flex; flex-wrap: wrap; gap: .5rem; }
.tags li {
  padding: .25rem .7rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  font-size: .9rem;
  color: var(--muted);
}

/* ---- Projects -------------------------------------------------------- */
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(14rem, 1fr));
  gap: 1rem;
}
.card {
  padding: 1.25rem;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: .75rem;
}
.card p { color: var(--muted); font-size: .95rem; }

/* ---- Experience ------------------------------------------------------ */
.timeline li {
  position: relative;
  padding-left: 1.5rem;
  margin-bottom: 1.5rem;
  border-left: 2px solid var(--line);
}
.timeline li::before {
  content: "";
  position: absolute;
  left: -6px; top: .45rem;
  width: 10px; height: 10px;
  border-radius: 50%;
  background: var(--accent);
}
.when { display: block; font-size: .85rem; color: var(--muted); margin-bottom: .2rem; }
.timeline p { color: var(--muted); }

/* ---- Contact / footer ------------------------------------------------ */
.links { display: flex; flex-wrap: wrap; gap: 1.25rem; }
.site-footer {
  padding-top: 2rem;
  padding-bottom: 2rem;
  color: var(--muted);
  font-size: .9rem;
  border-top: 1px solid var(--line);
}

/* ---- Small screens --------------------------------------------------- */
@media (max-width: 36rem) {
  h1 { font-size: 2rem; }
  .site-header { flex-direction: column; align-items: flex-start; }
}
