@font-face {
  font-family: Univers;
  font-style: normal;
  font-weight: 300 900;
  font-stretch: 75% 140%;
  font-display: swap;
  src:
    url("./fonts/univers-next-regular.woff2") format("woff2 supports variations"),
    url("./fonts/univers-next-regular.woff2") format("woff2-variations");
}

:root {
  color-scheme: light;
  --background: #fff;
  --ink: #111;
  --muted: #666;
  --rule: #bdbdbd;
  --shade: #eee;
  --code-panel: #f7f7f7;
  --link: #00449e;
  --link-hover: #002e6b;
  --footer: #ccc;
  --page-width: 800px;
  --text-width: 800px;
  --sans: Univers, -apple-system, system-ui, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", sans-serif;
  --mono: "SF Mono", "Segoe UI Mono", "Roboto Mono", Menlo, Courier, monospace;
}

:root[data-theme="dark"] {
  color-scheme: dark;
  --background: #111;
  --ink: #f1f1f1;
  --muted: #aaa;
  --rule: #555;
  --shade: #242424;
  --code-panel: #181818;
  --link: #78b7ff;
  --link-hover: #b5d8ff;
  --footer: #777;
}

* {
  box-sizing: border-box;
}

strong,
b {
  font-weight: 600;
}

html {
  color: var(--ink);
  background: var(--background);
  font-family: var(--sans);
  font-size: 15px;
  line-height: 1.5;
}

body {
  margin: 0;
  padding: 1rem 1.5rem;
  font-size: 100%;
  font-stretch: 95%;
  font-weight: 450;
}

a {
  color: var(--link);
  text-decoration: none;
}

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

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

.skip-link {
  position: absolute;
  top: -5rem;
  left: 1rem;
  padding: 0.5rem;
  background: var(--background);
  border: 1px solid var(--ink);
}

.skip-link:focus {
  top: 1rem;
}

.shell {
  width: 100%;
  max-width: var(--page-width);
  margin-left: 0;
}

.site-header {
  border-bottom: 1px solid var(--ink);
}

.header-inner {
  display: grid;
  grid-template-columns: 12rem minmax(0, 1fr) auto;
  column-gap: 0.8rem;
  max-width: none;
  padding: 0 0.4rem 0.5em;
  line-height: 1.2;
}

.site-nav a[aria-current="page"] {
  font-weight: inherit;
}

.theme-toggle {
  align-self: start;
  justify-self: end;
  margin: 0;
  padding: 0;
  cursor: pointer;
  color: var(--link);
  border: 0;
  background: transparent;
  font: inherit;
}

.theme-toggle:hover {
  color: var(--link-hover);
  text-decoration: underline;
}

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

main {
  margin-top: 6rem !important;
  padding-right: 0.4rem;
  padding-left: 0.4rem;
}

section {
  margin-bottom: 2rem;
}

h1,
h2,
h3,
h4 {
  font-size: 1rem;
  font-weight: 600;
  line-height: 1.2;
}

h1,
h2 {
  margin: 0 0 0.65rem;
}

.section-title {
  display: flex;
  align-items: baseline;
  gap: 0.5rem;
}

.section-title h1,
.section-title h2 {
  display: inline-block;
}

.about-grid {
  display: flex;
  margin-right: -0.4rem;
  margin-left: -0.4rem;
}

.about-grid > :first-child {
  flex: 0 0 36em;
}

.about-grid > :last-child {
  flex: 0 0 18.5em;
}

.about-grid > * {
  padding-right: 0.4rem;
  padding-left: 0.4rem;
}

.table-wrap {
  overflow-x: auto;
}

table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
  border: 0.1rem solid var(--rule);
}

th,
td {
  padding: 0.3rem 0.6rem 0;
  vertical-align: top;
}

th {
  border-bottom: 0.1rem solid var(--ink);
  background: var(--shade);
  font-weight: 600;
}

td {
  border-bottom: 0.1rem solid var(--rule);
}

td:first-child,
th:first-child {
  width: 12rem;
}

td:last-child,
th:last-child {
  width: 7rem;
}

.notes-table--archive td:last-child,
.notes-table--archive th:last-child {
  width: auto;
}

.personal-table td:first-child,
.personal-table th:first-child {
  width: 12rem;
}

.about-grid thead th:first-child {
  white-space: nowrap;
}

.about-grid td:last-child,
.about-grid th:last-child {
  width: auto;
}

.contact-table td:first-child,
.contact-table th:first-child {
  width: 5.5rem;
}

.about-grid > .contact-table {
  flex: 0 0 auto;
  overflow: visible;
}

.contact-table table {
  width: auto;
  min-width: 18.5em;
}

.contact-table td:last-child {
  white-space: nowrap;
}

.contact-label {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
}

.contact-label--stacked {
  display: inline;
}

.contact-row--stacked td:last-child {
  vertical-align: bottom;
}

.contact-icon {
  width: 0.875em;
  height: 0.875em;
  flex: 0 0 auto;
}

:root[data-theme="dark"] .contact-icon {
  filter: invert(1);
}

.markdown-cell p {
  margin: 0 0 0.7rem;
}

.markdown-cell p:last-child {
  margin-bottom: 0;
}

.site-footer {
  margin-top: 4rem;
  padding-right: 0.4rem;
  padding-left: 0.4rem;
  color: var(--footer);
}

.site-footer small {
  font-size: 80%;
  font-weight: 400;
}

.read-button {
  position: relative;
  top: -2px;
  display: inline-block;
  width: 6em;
  max-width: 6em;
  height: 1.4rem;
  padding: 0.15rem 0.3rem;
  border: 0.1rem solid #116a49;
  border-radius: 0.1rem;
  background: #137752;
  color: #fff;
  font-size: 0.8rem;
  line-height: 1.2rem;
  text-align: center;
  white-space: nowrap;
}

.read-button:hover,
.read-button:focus {
  border-color: #0f6143;
  background: #126e4c;
  color: #fff;
  text-decoration: none;
}

.archive {
  max-width: var(--text-width);
  margin-top: 4rem !important;
}

.article-shell {
  max-width: 48em;
  margin-top: 4rem !important;
}

.article-header {
  padding: 0;
}

.article-header h1 {
  margin: 0 0 0.5em;
  font-size: 1rem;
  font-weight: 600;
  line-height: 1.2;
}

.article-published {
  margin: 0 0 1.2rem;
  color: var(--muted);
}

.prose {
  margin: 0;
}

.prose h2,
.prose h3 {
  margin: 0 0 0.5em;
  font-size: 1rem;
  font-weight: 600;
  line-height: 1.2;
}

.prose h3 {
  font-style: italic;
}

.prose p,
.prose blockquote {
  margin-top: 0;
  margin-bottom: 1.2rem;
}

.prose ul,
.prose ol {
  margin: 0.8rem 0 0.8rem 1.6rem;
  padding: 0;
}

.prose li {
  margin-top: 0.4rem;
}

.prose a {
  text-decoration: underline;
}

.prose blockquote {
  margin-left: 0;
  padding-left: 1rem;
  border-left: 3px solid var(--rule);
  color: var(--muted);
}

.prose code {
  padding: 0.1rem 0.2rem;
  border-radius: 0.1rem;
  background: var(--shade);
  font-family: var(--mono);
  font-size: 90%;
  line-height: 1.25;
}

.prose pre {
  margin: 1.5rem 0;
  padding: 1rem;
  overflow-x: auto;
  border: 1px solid var(--rule);
  background: var(--code-panel);
}

.prose pre code {
  padding: 0;
  background: none;
}

.prose img {
  max-width: 100%;
  height: auto;
}

.back-button {
  position: relative;
  top: -2px;
  display: inline-block;
  height: 1.8rem;
  padding: 0.3rem 0.4rem 0.1rem;
  border: 0.1rem solid #116a49;
  border-radius: 0.1rem;
  background: #137752;
  color: #fff;
  font-size: 0.9rem;
  line-height: 1.2rem;
  text-align: center;
  white-space: nowrap;
}

.back-button:hover,
.back-button:focus {
  border-color: #0f6143;
  background: #126e4c;
  color: #fff;
  text-decoration: none;
}

@media (max-width: 850px) {
  .header-inner {
    grid-template-columns: 7rem minmax(0, 1fr) auto;
    column-gap: 0.5rem;
  }

  main {
    margin-top: 3.5rem !important;
  }

  .about-grid {
    display: block;
  }

  .about-grid > :first-child {
    margin-bottom: 1rem;
  }

  .about-grid > .contact-table {
    overflow-x: auto;
  }

  .contact-table table {
    width: 100%;
  }

  td:first-child,
  th:first-child {
    width: 8rem;
  }

}

@media (max-width: 30em) {
  body {
    padding: 1em 0.4em;
    font-size: 13px;
  }
}

@media print {
  body {
    padding: 0;
  }

  .site-header,
  .site-footer {
    display: none;
  }

  main {
    margin-top: 0 !important;
  }
}
