:root {
  --bg: #ffffff;
  --text: #111111;
  --muted: #555555;
  --border: #e5e5e5;
  --link: #111111;
}

body {
  font-family: system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
  color: var(--text);
  background: var(--bg);
  margin: 20px;
  transition: background-color 0.2s ease, color 0.2s ease;
}

main {
  max-width: 720px;
  margin: 4rem auto;
  padding: 0 1.25rem;
  line-height: 1.65;
}

header {
  margin-bottom: 3rem;
}

h1 {
  font-size: 2.4rem;
  margin-bottom: 0.25rem;
}

.subtitle {
  color: var(--muted);
  margin-top: 0;
}

.links {
  margin-top: 0.75rem;
}

a {
  color: var(--link);
  text-decoration: underline;
  text-decoration-color: var(--border);
  transition: text-decoration-color 0.15s ease;
}

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

h2 {
  font-size: 1.2rem;
  margin-top: 2.5rem;
  border-bottom: 1px solid var(--border);
  padding-bottom: 0.25rem;
}

ul {
  padding-left: 1.2rem;
}

.skills {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 0.25rem 1rem;
}

/* --- Metadata (dates, locations, roles) --- */
.meta {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.9rem;
  color: var(--muted);
}

/* --- Dark mode (system preference) --- */
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #121212;       /* softer than pure black */
    --text: #f2f2f2;
    --muted: #a0a0a0;
    --border: #2a2a2a;
    --link: #f2f2f2;
  }

  a {
    text-decoration-color: #444;
  }

  a:hover {
    text-decoration-color: #888;
  }
}

/* --- Print styles (PDF / paper) --- */
@media print {
  body {
    background: #ffffff;
    color: #000000;
    margin: 0;
  }

  main {
    margin: 0;
    padding: 0;
    max-width: none;
  }

  a {
    text-decoration: none;
    color: #000;
  }

  .links {
    display: none;
  }

  h2 {
    border-bottom: 1px solid #000;
  }
}