:root {
  --bg: #ffffff;
  --ink: #1f2328;
  --muted: #5b6470;
  --navy: #1d3557;
  --accent: #2b5a8c;
  --rule: #d8dee6;
  --underline: rgba(43, 90, 140, 0.35);
  --masthead-rule: #1d3557;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #121417;
    --ink: #e4e7eb;
    --muted: #9ba4af;
    --navy: #eef2f7;
    --accent: #8fb4de;
    --rule: #2c323a;
    --underline: rgba(143, 180, 222, 0.4);
    --masthead-rule: #3f5f86;
  }
}

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

html {
  font-size: 106.25%;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: "Source Sans 3", Calibri, "Segoe UI", system-ui, sans-serif;
  line-height: 1.6;
  text-rendering: optimizeLegibility;
}

.page {
  max-width: 46rem;
  margin: 0 auto;
  padding: 4.5rem 1.5rem 3rem;
}

a {
  color: var(--accent);
  text-decoration: underline;
  text-decoration-color: var(--underline);
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}

a:hover,
a:focus-visible {
  text-decoration-color: currentColor;
}

/* Header */

.masthead {
  padding-bottom: 1.25rem;
  border-bottom: 3px solid var(--masthead-rule);
}

h1 {
  margin: 0;
  font-family: "Source Serif 4", Cambria, Georgia, serif;
  font-size: 2.7rem;
  font-weight: 700;
  line-height: 1.1;
  letter-spacing: -0.01em;
  color: var(--navy);
}

.role {
  margin: 0.4rem 0 0.35rem;
  font-size: 1.15rem;
  font-weight: 600;
  color: var(--accent);
}

.role span {
  white-space: nowrap;
}

.contact {
  display: flex;
  flex-wrap: wrap;
  margin: 0;
  padding: 0;
  list-style: none;
  color: var(--muted);
}

.contact li + li::before {
  content: "|";
  margin: 0 0.65rem;
  color: var(--rule);
}

/* Body */

.summary {
  margin: 1.75rem 0 0;
  font-size: 1.05rem;
}

h2 {
  margin: 2.75rem 0 1.1rem;
  padding-bottom: 0.4rem;
  border-bottom: 1px solid var(--rule);
  font-size: 0.85rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent);
}

/* Skills */

.skills {
  margin: 0;
}

.skills div {
  display: grid;
  grid-template-columns: 10.5rem 1fr;
  gap: 1rem;
  padding: 0.2rem 0;
}

.skills dt {
  font-weight: 600;
}

.skills dd {
  margin: 0;
  font-style: italic;
}

/* Projects */

.projects {
  margin: 0;
  padding: 0;
  list-style: none;
}

.project + .project {
  margin-top: 2rem;
  padding-top: 2rem;
  border-top: 1px solid var(--rule);
}

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

h3 {
  margin: 0;
  font-size: 1.25rem;
  font-weight: 700;
  line-height: 1.3;
}

.date {
  flex-shrink: 0;
  font-size: 0.95rem;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}

.tagline {
  margin: 0.05rem 0 0.7rem;
  font-weight: 600;
  color: var(--muted);
}

.project p {
  margin-top: 0;
}

.stack {
  margin-bottom: 0.6rem;
  font-size: 0.95rem;
  font-style: italic;
  color: var(--muted);
}

.links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem 1.5rem;
  margin-bottom: 0;
  font-weight: 600;
}

/* Footer */

footer {
  margin-top: 4rem;
  padding-top: 1.25rem;
  border-top: 1px solid var(--rule);
  font-size: 0.9rem;
  color: var(--muted);
}

/* Phones */

@media (max-width: 560px) {
  .page {
    padding: 2.75rem 1rem 2rem;
  }

  h1 {
    font-size: 2.2rem;
  }

  .contact {
    display: block;
  }

  .contact li + li::before {
    content: none;
  }

  .skills div {
    display: block;
    padding: 0 0 0.6rem;
  }
}
