/* Design tokens: light by default, dark via the system setting */
:root {
  --bg: #fafaf9;
  --surface: #ffffff;
  --text: #1c1917;
  --muted: #57534e;
  --border: #e7e5e4;
  --accent: #1d4ed8;
  --accent-soft: #dbeafe;
  --focus: #2563eb;

  --font: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --measure: 42rem;
  --space: clamp(1rem, 3vw, 1.5rem);
  color-scheme: light dark;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #141413;
    --surface: #1c1b1a;
    --text: #f5f5f4;
    --muted: #a8a29e;
    --border: #2e2c2a;
    --accent: #93c5fd;
    --accent-soft: #1e3a5f;
    --focus: #93c5fd;
  }
}

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

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}

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

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 1.0625rem;
  line-height: 1.65;
  text-rendering: optimizeLegibility;
}

a {
  color: var(--accent);
  text-underline-offset: 0.2em;
  text-decoration-thickness: 1px;
}
a:hover { text-decoration-thickness: 2px; }

:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 3px;
  border-radius: 3px;
}

.skip-link {
  position: absolute;
  left: 1rem;
  top: -3rem;
  padding: 0.5rem 0.75rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 6px;
  z-index: 10;
}
.skip-link:focus { top: 1rem; }

.site-header,
main,
.site-footer {
  max-width: var(--measure);
  margin-inline: auto;
  padding-inline: var(--space);
}

.site-header { padding-block: 1.25rem; }

.site-header ul {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem 1.25rem;
  margin: 0;
  padding: 0;
  list-style: none;
  font-size: 0.95rem;
}
.site-header a {
  color: var(--muted);
  text-decoration: none;
}
.site-header a:hover { color: var(--text); }

section {
  padding-block: 2rem;
  border-top: 1px solid var(--border);
  scroll-margin-top: 1rem;
}
section.intro {
  border-top: 0;
  padding-block: 3rem 2.5rem;
}

h1, h2, h3 {
  line-height: 1.2;
  letter-spacing: -0.01em;
}
h1 {
  margin: 0;
  font-size: clamp(2.25rem, 7vw, 3.25rem);
  font-weight: 700;
}
h2 {
  margin: 0 0 1.25rem;
  font-size: 1.375rem;
}
h3 {
  margin: 0;
  font-size: 1.0625rem;
}

.tagline {
  margin: 0.5rem 0 1.25rem;
  color: var(--muted);
  font-size: 1.2rem;
}
.intro p:last-child { margin-bottom: 0; }

.timeline {
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 1rem;
}
.timeline li {
  padding-left: 1rem;
  border-left: 2px solid var(--border);
}
.timeline li:first-child { border-left-color: var(--accent); }
.role {
  margin: 0.125rem 0 0;
  color: var(--muted);
  font-size: 0.95rem;
}
.education {
  margin: 1.5rem 0 0;
  color: var(--muted);
}
.education strong { color: var(--text); }

.label {
  color: var(--muted);
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
h3.label { margin: 1.25rem 0 0.5rem; }
h3.label:first-of-type { margin-top: 0; }

.tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin: 0;
  padding: 0;
  list-style: none;
}
.tags li {
  padding: 0.25rem 0.75rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 999px;
  font-size: 0.95rem;
}

.placeholder {
  padding: 1.25rem;
  border: 1px dashed var(--border);
  border-radius: 10px;
  color: var(--muted);
}
.placeholder p { margin: 0; }
.placeholder-badge {
  display: inline-block;
  margin-bottom: 0.5rem !important;
  padding: 0.125rem 0.6rem;
  background: var(--accent-soft);
  color: var(--text);
  border-radius: 999px;
  font-size: 0.8rem;
  font-weight: 600;
}

.contact {
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 0.75rem;
}
.contact li {
  display: grid;
  grid-template-columns: 6.5rem 1fr;
  align-items: baseline;
  gap: 0.5rem;
  overflow-wrap: anywhere;
}
@media (max-width: 30rem) {
  .contact li { grid-template-columns: 1fr; gap: 0; }
}

.site-footer {
  padding-block: 2rem 3rem;
  border-top: 1px solid var(--border);
  color: var(--muted);
  font-size: 0.9rem;
}
.site-footer p { margin: 0; }
