:root {
  color-scheme: light dark;
  --ink: #17181a;
  --muted: #5c6066;
  --line: #dcdee2;
  --background: #ffffff;
  --hover: rgba(23, 24, 26, 0.06);
  --link-line: rgba(23, 24, 26, 0.42);
  --text-body: 1rem;
  --text-meta: 0.9rem;
  --text-label: 0.8rem;
  --sans:
    "IBM Plex Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
    "Helvetica Neue", Arial, sans-serif;
  --mono:
    "IBM Plex Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}

@media (prefers-color-scheme: dark) {
  :root {
    --ink: #ffffff;
    --muted: rgba(255, 255, 255, 0.62);
    --line: rgba(255, 255, 255, 0.2);
    --background: #181818;
    --hover: rgba(255, 255, 255, 0.08);
    --link-line: rgba(255, 255, 255, 0.42);
  }
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: var(--background);
  color: var(--ink);
  font-family: var(--sans);
  font-size: var(--text-body);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

a {
  color: inherit;
  text-decoration-line: underline;
  text-decoration-style: dotted;
  text-decoration-color: var(--link-line);
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}

a:hover {
  text-decoration-style: solid;
  text-decoration-color: currentColor;
}

.public-header a {
  color: inherit;
}

.public-header [aria-current="page"] {
  color: var(--ink);
}

.resume {
  max-width: 48rem;
  margin: 0 auto;
  padding: 4rem 1.5rem;
}

.masthead {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 1rem;
}

h1,
h2,
h3,
p {
  margin-bottom: 0;
}

h1 {
  margin-top: 0;
  font-size: 2rem;
  line-height: 1.2;
  font-weight: 600;
  letter-spacing: -0.025em;
}

.title {
  margin-top: 0.25rem;
  color: var(--muted);
}

.contact {
  display: grid;
  grid-template-columns: auto 1fr;
  align-items: baseline;
  gap: 0.25rem 1rem;
  margin: 1rem 0 0;
  color: var(--muted);
  font-size: var(--text-meta);
  line-height: 1.25rem;
}

.contact dt {
  font-family: var(--mono);
  font-size: var(--text-label);
  line-height: 1rem;
  font-weight: 600;
  letter-spacing: 0.025em;
  text-transform: uppercase;
}

.contact dd {
  min-width: 0;
  margin: 0;
}

.contact a {
  color: inherit;
}

.contact-item {
  white-space: nowrap;
}

.contact-item:not(:last-child)::after {
  content: "·";
  padding-left: 0.4em;
  color: var(--line);
}

.download {
  display: inline-flex;
  flex-shrink: 0;
  align-items: center;
  gap: 0.5rem;
  margin-top: 0.25rem;
  padding: 0.5rem 0.75rem;
  border: 1px solid var(--line);
  border-radius: 0.375rem;
  color: var(--ink);
  font-size: 0.9rem;
  line-height: 1.25rem;
  font-weight: 500;
  text-decoration: none;
  white-space: nowrap;
  transition:
    border-color 150ms,
    background-color 150ms;
}

.download:hover {
  border-color: var(--ink);
  background: var(--hover);
}

.download:focus-visible {
  outline: 2px solid var(--ink);
  outline-offset: 2px;
}

.download svg {
  flex-shrink: 0;
}

.summary {
  max-width: 42rem;
  margin-top: 1.5rem;
}

h2 {
  margin-top: 2.5rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid var(--line);
  color: var(--muted);
  font-family: var(--mono);
  font-size: var(--text-label);
  line-height: 1rem;
  font-weight: 600;
  letter-spacing: 0.025em;
  text-transform: uppercase;
}

.entry {
  margin-top: 1.5rem;
  break-inside: avoid;
}

.entry-header,
.current-role {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
}

h3 {
  margin-top: 0;
  font-size: 1.25rem;
  line-height: 1.75rem;
  font-weight: 600;
  letter-spacing: -0.025em;
}

.period {
  flex-shrink: 0;
  color: var(--muted);
  font-size: var(--text-meta);
  line-height: 1.25rem;
  font-variant-numeric: tabular-nums;
}

.roles {
  margin: 0.5rem 0 0;
  padding: 0;
  list-style: none;
}

.current-role {
  font-size: 1rem;
  line-height: 1.5rem;
}

.role-title,
.previous-label {
  font-weight: 500;
}

.previous-roles {
  margin-top: 0.25rem;
  color: var(--muted);
  font-size: var(--text-meta);
  line-height: 1.25rem;
}

.previous-label {
  margin-right: 0.25rem;
  color: var(--ink);
}

.previous-role {
  white-space: nowrap;
}

.previous-role:not(:last-child)::after {
  content: ",";
  margin-right: 0.3em;
}

.bullets {
  margin: 0.75rem 0 0;
  padding-left: 1.25rem;
  list-style: disc;
}

.bullets li + li {
  margin-top: 0.25rem;
}

.stack {
  margin-top: 0.75rem;
  color: var(--muted);
  font-family: var(--mono);
  font-size: var(--text-meta);
  line-height: 1.25rem;
}

.stack-item:not(:last-child)::after {
  content: "·";
  padding: 0 0.35em;
  color: var(--line);
}

.qualification {
  margin-top: 0.25rem;
  color: var(--muted);
}

@media (min-width: 40rem) {
  .masthead {
    flex-direction: row;
    justify-content: space-between;
    gap: 1.5rem;
  }
}

@media print {
  @page {
    size: A4;
    margin: 10mm 12mm;
  }

  :root {
    color-scheme: light;
    --ink: #17181a;
    --muted: #5c6066;
    --line: #dcdee2;
    --background: #ffffff;
  }

  body {
    line-height: 1.3;
  }

  .public-header {
    display: none;
  }

  .resume {
    max-width: none;
    padding: 0;
  }

  .download {
    display: none;
  }

  a {
    color: inherit;
    text-decoration: none;
  }

  .summary,
  h2 {
    margin-top: 1rem;
  }

  .entry {
    margin-top: 0.75rem;
  }

  .bullets,
  .stack {
    margin-top: 0.5rem;
  }
}
