@font-face {
  font-family: "IBM Plex Sans";
  font-style: normal;
  font-weight: 400 600;
  font-display: swap;
  src: url("./assets/fonts/ibm-plex-sans-latin-ext.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF;
}

@font-face {
  font-family: "IBM Plex Sans";
  font-style: normal;
  font-weight: 400 600;
  font-display: swap;
  src: url("./assets/fonts/ibm-plex-sans-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

:root {
  color-scheme: dark;
  --background: #1b1c1d;
  --text: #bcbfb9;
  --heading: #e5e7e2;
  --muted: #939b95;
  --link: #a9c1d0;
  --rule: #323535;
  background: var(--background);
  color: var(--text);
  font-family: "IBM Plex Sans", "Segoe UI", sans-serif;
  font-size: 16px;
  -webkit-text-size-adjust: 100%;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  line-height: 1.75;
}

.page {
  max-width: 768px;
  padding: 64px 24px 48px;
  margin: 0 auto;
}

.masthead {
  padding-bottom: 25px;
  border-bottom: 1px solid var(--rule);
}

h1 {
  margin: 0;
  color: var(--heading);
  font-size: 24px;
  font-weight: 500;
  line-height: 1.4;
  letter-spacing: -0.4px;
}

.pronunciation {
  margin: 3px 0 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.5;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

section {
  padding-top: 30px;
}

h2 {
  margin: 0 0 12px;
  color: var(--heading);
  font-size: 14px;
  font-weight: 500;
  line-height: 1.5;
}

ul {
  margin: 0;
  padding-left: 18px;
}

li + li {
  margin-top: 6px;
}

li::marker {
  color: var(--muted);
  font-size: 0.8em;
}

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

a:hover {
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}

a:focus-visible {
  outline: 2px solid var(--link);
  outline-offset: 4px;
  border-radius: 2px;
}

.projects {
  padding-bottom: 32px;
}

.project-link {
  text-decoration: underline;
  text-decoration-style: dotted;
  text-decoration-color: #5c6e79;
  text-underline-offset: 4px;
  text-decoration-thickness: 1px;
}

.project-link:hover,
.project-link:focus-visible {
  text-decoration-style: solid;
  text-decoration-color: currentColor;
}

.project-preview {
  position: fixed;
  z-index: 10;
  width: min(496px, calc(100vw - 32px));
  overflow: hidden;
  border: 1px solid #444947;
  border-radius: 10px;
  background: #222525;
  box-shadow: 0 16px 48px #0005, 0 3px 10px #0003;
  line-height: 1.5;
  animation: preview-in 160ms ease-out;
}

.project-preview[hidden] {
  display: none;
}

.project-preview__destination {
  display: block;
  color: var(--text);
}

.project-preview__destination:hover {
  text-decoration: none;
}

.project-preview__destination:focus-visible {
  outline-offset: -3px;
  border-radius: 9px;
}

.project-preview__media {
  position: relative;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background: #17191f;
}

.project-preview__media--protein {
  background: #eae7de;
}

.project-preview__media--citation {
  background: #192b3b;
}

.project-preview__media video {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
}

@keyframes preview-in {
  from { opacity: 0; transform: translateY(4px); }
  to { opacity: 1; transform: translateY(0); }
}

@media (prefers-reduced-motion: reduce) {
  .project-preview { animation: none; }
}

footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding-top: 18px;
  border-top: 1px solid var(--rule);
  color: var(--muted);
  font-size: 13px;
  line-height: 1.6;
}

footer p {
  margin: 0;
}

footer nav {
  flex-shrink: 0;
}

footer p a {
  text-decoration: underline;
  text-decoration-color: #5c6e79;
  text-underline-offset: 3px;
}

footer p a:hover {
  text-decoration-color: currentColor;
}

.social-links {
  display: flex;
  gap: 6px;
  padding: 0;
  list-style: none;
}

.social-links li + li {
  margin-top: 0;
}

.social-links a {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  color: var(--muted);
}

.social-links a:hover {
  color: var(--heading);
}

.social-links svg {
  display: block;
  width: 20px;
  height: 20px;
}

@media (max-width: 480px) {
  .page {
    padding: 36px 22px;
  }

  section {
    padding-top: 26px;
  }

  footer {
    gap: 16px;
    font-size: 12px;
  }
}

@media print {
  .project-preview {
    display: none;
  }

  :root {
    color-scheme: light;
    --background: #ffffff;
    --text: #383a36;
    --heading: #1c1d1a;
    --muted: #585e57;
    --link: #2b5c7a;
    --rule: #d9ddd7;
  }

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