/* ---------- Design tokens ---------- */
:root {
  --color-text: #1a1a1a;
  --color-text-muted: #555;
  --color-bg: #fafafa;
  --color-card: #ffffff;
  --color-accent: #0078d4;          /* Azure blue */
  --color-border: #e5e5e5;
  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --radius: 8px;
  --shadow: 0 1px 3px rgba(0, 0, 0, 0.05), 0 4px 12px rgba(0, 0, 0, 0.03);
}

@media (prefers-color-scheme: dark) {
  :root {
    --color-text: #e5e5e5;
    --color-text-muted: #999;
    --color-bg: #121212;
    --color-card: #1c1c1c;
    --color-accent: #4cc2ff;
    --color-border: #2a2a2a;
    --shadow: 0 1px 3px rgba(0, 0, 0, 0.4), 0 4px 12px rgba(0, 0, 0, 0.2);
  }
}

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.6;
  color: var(--color-text);
  background: var(--color-bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

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

ul { margin: 0.5rem 0; padding-left: 1.25rem; }
li { margin: 0.25rem 0; }

/* ---------- Layout ---------- */
.resume {
  max-width: 820px;
  margin: 2.5rem auto;
  background: var(--color-card);
  padding: 3rem;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

@media (max-width: 640px) {
  .resume {
    margin: 0;
    padding: 1.5rem;
    border-radius: 0;
    box-shadow: none;
  }
}

/* ---------- Header ---------- */
.header {
  border-bottom: 1px solid var(--color-border);
  padding-bottom: 1.5rem;
  margin-bottom: 2rem;
}

.header h1 {
  font-size: 2.25rem;
  font-weight: 700;
  margin: 0 0 0.25rem;
  letter-spacing: -0.02em;
}

.tagline {
  color: var(--color-text-muted);
  font-size: 1.05rem;
  margin: 0 0 1rem;
}

.contact {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1.25rem;
  font-size: 0.95rem;
}

.contact li {
  margin: 0;
  color: var(--color-text-muted);
}

/* ---------- Sections ---------- */
.section { margin-bottom: 2rem; }

.section h2 {
  font-size: 0.85rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--color-accent);
  margin: 0 0 1rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid var(--color-border);
}

.section > p { margin-top: 0; }

/* ---------- Entries (jobs, projects, education) ---------- */
.entry { margin-bottom: 1.5rem; }
.entry:last-child { margin-bottom: 0; }

.entry-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 1rem;
  flex-wrap: wrap;
}

.entry h3 {
  font-size: 1.05rem;
  font-weight: 600;
  margin: 0;
}

.entry-meta {
  font-size: 0.9rem;
  color: var(--color-text-muted);
  white-space: nowrap;
}

.entry p { margin: 0.5rem 0 0; }

/* ---------- Skills ---------- */
.skills {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1rem 2rem;
}

.skills h4 {
  margin: 0 0 0.25rem;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--color-text-muted);
}

.skills p { margin: 0; }

.certs { padding-left: 1.25rem; }

/* ---------- Footer ---------- */
.footer {
  margin-top: 3rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--color-border);
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 0.5rem;
  font-size: 0.9rem;
  color: var(--color-text-muted);
}

.footer p { margin: 0; }
.small { font-size: 0.85rem; }

#visitor-count {
  font-variant-numeric: tabular-nums;
  font-weight: 600;
  color: var(--color-accent);
}

/* ---------- Print styles ---------- */
@media print {
  body { background: white; color: black; }
  .resume {
    box-shadow: none;
    max-width: none;
    margin: 0;
    padding: 0.5in;
  }
  .section h2 { color: black; }
  a { color: black; text-decoration: none; }
  .footer { display: none; }
  @page { margin: 0.5in; }
}