:root {
  --bg: #F8F7F4;
  --text: #1C1C1C;
  --accent: #2D5A3C;
  --muted: #767676;
  --rule: #E0DDD8;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #111110;
    --text: #EEECEA;
    --accent: #5A9E72;
    --muted: #888884;
    --rule: #2A2A27;
  }
}

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

html {
  scroll-behavior: smooth;
}

body {
  background: var(--bg);
  color: var(--text);
  font-family: 'DM Sans', sans-serif;
  font-size: 1rem;
  line-height: 1.6;
  padding: 0 1.5rem;
}

.container {
  max-width: 680px;
  margin: 0 auto;
}

/* ── Header ─────────────────────────────── */

header {
  padding: 2.5rem 0 2rem;
  border-bottom: 1px solid var(--rule);
}

h1 {
  font-family: 'Fraunces', serif;
  font-size: 2rem;
  font-weight: 700;
  line-height: 1.1;
  letter-spacing: -0.02em;
}

.tagline {
  color: var(--muted);
  margin-top: 0.25rem;
  font-size: 0.9375rem;
}

.bio {
  margin-top: 1.25rem;
  font-size: 0.9375rem;
  color: var(--muted);
  max-width: 58ch;
  line-height: 1.6;
}

nav {
  margin-top: 1.25rem;
  display: flex;
  gap: 1.5rem;
}

nav a {
  color: var(--text);
  text-decoration: none;
  font-size: 0.875rem;
  font-weight: 500;
}

nav a:hover {
  color: var(--muted);
}

/* ── Sections ───────────────────────────── */

section {
  padding: 2.5rem 0;
  border-bottom: 1px solid var(--rule);
}

h2 {
  font-size: 1.125rem;
  font-weight: 500;
  color: var(--accent);
  margin-bottom: 1.5rem;
}

/* ── Projects ───────────────────────────── */

.project-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.project-list h3 {
  font-size: 0.9375rem;
  font-weight: 500;
  margin-bottom: 0.15rem;
}

.project-list h3 a {
  color: var(--text);
  text-decoration: none;
}

.project-list h3 a:hover {
  color: var(--muted);
}

.project-list p {
  font-size: 0.875rem;
  color: var(--muted);
  max-width: 58ch;
  line-height: 1.55;
}

/* ── Work ───────────────────────────────── */

.work-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.work-item {
  display: grid;
  grid-template-columns: 7rem 1fr;
  gap: 0 1.5rem;
}

.work-item time {
  font-size: 0.8125rem;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
  padding-top: 0.15rem;
}

.work-body h3 {
  font-size: 0.9375rem;
  font-weight: 500;
  margin-bottom: 0.2rem;
}

.work-body .role {
  color: var(--muted);
  font-weight: 400;
  font-size: 0.875rem;
}

.work-body p {
  font-size: 0.875rem;
  color: var(--muted);
  max-width: 56ch;
  line-height: 1.55;
}

/* ── Skills ─────────────────────────────── */

.skills-content {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.skills-content p {
  font-size: 0.9375rem;
  line-height: 1.6;
  color: var(--muted);
}

.skills-content p strong {
  color: var(--text);
}

/* ── Contact ────────────────────────────── */

.contact-content {
  display: flex;
  align-items: center;
  gap: 1.5rem;
}

.contact-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.contact-list a {
  color: var(--text);
  text-decoration: none;
  font-size: 0.9375rem;
}

.contact-list a:hover {
  color: var(--muted);
}

.profile-photo {
  width: 120px;
  height: 120px;
  border-radius: 8px;
  object-fit: cover;
  flex-shrink: 0;
  margin-right: 1rem;
}

/* ── Footer ─────────────────────────────── */

footer {
  padding: 1.5rem 0 2.5rem;
  color: var(--muted);
  font-size: 0.8125rem;
}

/* ── Mobile ─────────────────────────────── */

@media (max-width: 540px) {
  h1 {
    font-size: 1.625rem;
  }

  nav {
    gap: 1rem;
    flex-wrap: wrap;
  }

  nav a {
    font-size: 0.8125rem;
  }

  section {
    padding: 2rem 0;
  }

  .work-item {
    grid-template-columns: 1fr;
    gap: 0.2rem;
  }

  .contact-content {
    flex-direction: column;
    align-items: flex-start;
  }

  .profile-photo {
    margin-right: 0;
    margin-bottom: 1rem;
  }
}
