:root {
  --bg: #fafaf9;
  --text: #1c1917;
  --muted: #78716c;
  --accent: #2563eb;
  --paper: #f6eac5;     /* the cream page color from resume.tex */
  --rule: #d6c89f;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #1c1917;
    --text: #fafaf9;
    --muted: #a8a29e;
    --accent: #60a5fa;
    --paper: #292524;
    --rule: #44403c;
  }
}

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

body {
  padding: 1.5rem 1rem 3rem;
  background: var(--bg);
  color: var(--text);
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  line-height: 1.6;
}

a {
  color: var(--accent);
  text-underline-offset: 2px;
}

.resume {
  max-width: 60rem;
  margin: 0 auto;
  background: var(--paper);
  border-radius: 6px;
  padding: clamp(1.25rem, 4vw, 2.75rem);
  box-shadow: 0 1px 3px rgb(0 0 0 / 0.08), 0 8px 24px rgb(0 0 0 / 0.06);
}

.resume-header {
  text-align: center;
  border-bottom: 2px solid var(--text);
  padding-bottom: 0.75rem;
  margin-bottom: 1.5rem;
}

.resume-header h1 {
  font-size: clamp(2.25rem, 7vw, 3.5rem);
  letter-spacing: -0.02em;
  line-height: 1.1;
}

.tagline {
  margin-top: 0.35rem;
}

.resume-body {
  display: grid;
  grid-template-columns: minmax(0, 2fr) minmax(0, 3fr);
  gap: 2rem;
}

.sidebar {
  border-right: 1px solid var(--rule);
  padding-right: 2rem;
}

section + section {
  border-top: 1px solid var(--rule);
  margin-top: 1.25rem;
  padding-top: 1.25rem;
}

h2 {
  font-size: 1.15rem;
  letter-spacing: 0.02em;
  margin-bottom: 0.6rem;
}

h3 {
  font-size: 1rem;
  font-weight: 650;
  line-height: 1.35;
}

.org {
  display: block;
  font-weight: 400;
  font-style: italic;
}

.entry + .entry {
  margin-top: 1rem;
}

p,
ul {
  font-size: 0.975rem;
}

.tagline,
.muted,
.meta {
  color: var(--muted);
}

.muted,
.meta {
  font-size: 0.9rem;
}

.meta {
  margin-bottom: 0.2rem;
}

ul {
  padding-left: 1.15rem;
}

.skills {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

.skills h3 {
  margin-bottom: 0.25rem;
}

/* Phones and narrow windows: one column. */
@media (max-width: 720px) {
  .resume-body {
    grid-template-columns: 1fr;
    gap: 0;
  }

  .sidebar {
    border-right: 0;
    padding-right: 0;
    border-bottom: 1px solid var(--rule);
    padding-bottom: 1.25rem;
    margin-bottom: 1.25rem;
  }
}

@media (max-width: 380px) {
  .skills {
    grid-template-columns: 1fr;
  }
}

.download-bar {
  text-align: center;
  margin-top: 1.5rem;
}

.download {
  display: inline-block;
  padding: 0.45rem 1rem;
  border: 1.5px solid var(--accent);
  border-radius: 999px;
  color: var(--accent);
  font-size: 0.9rem;
  font-weight: 600;
  text-decoration: none;
}

.download:hover,
.download:focus-visible {
  background: var(--accent);
  color: var(--paper);
}

/* Print layout, also used to generate noah-haworth-resume.pdf (see make-pdf.sh).
   Tuned to fit one letter page. */
@page {
  size: letter;
  margin: 0.4in 0.45in;
}

@media print {
  html { font-size: 11px; }
  body { padding: 0; background: #fff; color: #1c1917; line-height: 1.38; }
  .resume { box-shadow: none; max-width: none; padding: 0; background: #fff; }
  .download-bar { display: none; }
  .resume-header { margin-bottom: 1rem; padding-bottom: 0.5rem; }
  .resume-body { gap: 1.5rem; }
  .sidebar { padding-right: 1.5rem; }
  section + section { margin-top: 0.8rem; padding-top: 0.8rem; }
  .entry + .entry { margin-top: 0.7rem; }
  h2 { margin-bottom: 0.4rem; }
}
