/* ---------------------------------------------------------------------------
   Personal site styles — hand-written, dependency-free.
   Light/dark via prefers-color-scheme, responsive with CSS variables.
--------------------------------------------------------------------------- */

:root {
  --max-width: 760px;
  --bg: #ffffff;
  --bg-alt: #f6f7f9;
  --surface: #ffffff;
  --border: #e6e8eb;
  --text: #1a1d21;
  --text-muted: #5b636c;
  --accent: #2563eb;
  --accent-contrast: #ffffff;
  --tag-bg: #eef2ff;
  --tag-text: #3949ab;
  --radius: 12px;
  --shadow: 0 1px 2px rgba(16, 24, 40, 0.04), 0 1px 3px rgba(16, 24, 40, 0.06);
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial,
    sans-serif, "Apple Color Emoji", "Segoe UI Emoji";
  --mono: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, monospace;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0f1115;
    --bg-alt: #14171c;
    --surface: #181b21;
    --border: #262a31;
    --text: #e7e9ec;
    --text-muted: #9aa2ad;
    --accent: #6ea8fe;
    --accent-contrast: #0f1115;
    --tag-bg: #1e2330;
    --tag-text: #9db6ff;
    --shadow: none;
  }
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--font);
  font-size: 17px;
  line-height: 1.65;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}

.container {
  width: 100%;
  max-width: var(--max-width);
  margin-inline: auto;
  padding-inline: 24px;
}

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

h1, h2, h3 { line-height: 1.25; letter-spacing: -0.01em; }

/* ---- Header / nav ---- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: saturate(180%) blur(8px);
  border-bottom: 1px solid var(--border);
}
.site-header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 60px;
}
.site-header__name { font-weight: 700; color: var(--text); }
.site-header__name:hover { text-decoration: none; color: var(--accent); }
.site-nav a {
  color: var(--text-muted);
  margin-left: 20px;
  font-size: 15px;
}
.site-nav a:hover { color: var(--text); text-decoration: none; }

/* ---- Sections ---- */
.section { padding: 64px 0; }
.section--alt { background: var(--bg-alt); }
.section--center { text-align: center; }
.section__title {
  font-size: 14px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-muted);
  margin: 0 0 28px;
}

/* ---- Hero ---- */
.hero { padding-top: 88px; padding-bottom: 56px; }
.hero__eyebrow {
  color: var(--accent);
  font-weight: 600;
  margin: 0 0 8px;
  font-size: 15px;
  letter-spacing: 0.02em;
}
.hero__name { font-size: clamp(2.2rem, 6vw, 3.2rem); margin: 0 0 16px; }
.hero__tagline {
  font-size: 1.2rem;
  color: var(--text-muted);
  margin: 0 0 8px;
  max-width: 40ch;
}
.hero__location { color: var(--text-muted); margin: 0 0 24px; font-size: 15px; }
.hero__links { display: flex; flex-wrap: wrap; gap: 12px; }

.button {
  display: inline-block;
  padding: 9px 16px;
  border: 1px solid var(--border);
  border-radius: 999px;
  color: var(--text);
  background: var(--surface);
  font-size: 15px;
  font-weight: 500;
  transition: border-color 0.15s ease, transform 0.05s ease;
}
.button:hover { border-color: var(--accent); text-decoration: none; }
.button:active { transform: translateY(1px); }

/* ---- Prose (Markdown output) ---- */
.prose p { margin: 0 0 16px; }
.prose p:last-child { margin-bottom: 0; }
.prose a { text-decoration: underline; }
.prose code {
  font-family: var(--mono);
  font-size: 0.9em;
  background: var(--bg-alt);
  padding: 2px 6px;
  border-radius: 6px;
}

/* ---- Cards ---- */
.timeline { display: grid; gap: 16px; }
.grid {
  display: grid;
  gap: 16px;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
}
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 22px 24px;
  box-shadow: var(--shadow);
}
.card__head {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: baseline;
  gap: 4px 16px;
  margin-bottom: 12px;
}
.card__title { font-size: 1.05rem; margin: 0; }
.card__meta { color: var(--text-muted); font-size: 14px; white-space: nowrap; }
.card__desc { margin: 0 0 14px; color: var(--text); }
.card__list { margin: 0; padding-left: 20px; color: var(--text-muted); }
.card__list li { margin-bottom: 6px; }
.card--project { display: flex; flex-direction: column; }
.card__links { margin-top: auto; padding-top: 14px; display: flex; gap: 16px; }
.link { font-size: 14px; font-weight: 500; }

/* ---- Tag pills ---- */
.tags {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 14px 0 0;
  padding: 0;
}
.tag {
  font-family: var(--mono);
  font-size: 12px;
  color: var(--tag-text);
  background: var(--tag-bg);
  border-radius: 6px;
  padding: 3px 9px;
}

/* ---- Footer ---- */
.site-footer {
  border-top: 1px solid var(--border);
  padding: 32px 0;
  color: var(--text-muted);
  font-size: 14px;
}
.site-footer__inner p { margin: 0 0 6px; }
.site-footer__built { font-size: 13px; }

@media (max-width: 520px) {
  .site-nav a:first-child { margin-left: 0; }
  .section { padding: 48px 0; }
}
