@font-face {
  font-family: "Instrument Serif";
  src: url("assets/instrument-serif.ttf") format("truetype");
  font-display: swap;
}

:root {
  color-scheme: light;
  --ink: #132f34;
  --body: #40565a;
  --teal: #15675c;
  --paper: #fafbf8;
  --line: #c7d4cd;
  --night: #112f36;
  --mint: #a5e4ca;
  --on-mint: #132f34;
  --app-surface: #ecf2ec;
  --app-border: #d5dfd5;
  --serif: "Instrument Serif", Georgia, serif;
  font-family: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.5;
  color: var(--ink);
  background: var(--paper);
}

*, *::before, *::after { box-sizing: border-box; }
body, h1, h2, h3, p, figure { margin: 0; }
img { display: block; }
a { color: inherit; text-underline-offset: .24em; }
:is(a, button):focus-visible { outline: 3px solid currentColor; outline-offset: 5px; }
.wrap { width: min(71rem, calc(100% - 2.5rem)); margin-inline: auto; }
.skip { position: absolute; top: .75rem; left: 1rem; z-index: 2; padding: .5rem 1rem; background: var(--paper); }
.skip:not(:focus) { clip-path: inset(50%); width: 1px; height: 1px; overflow: hidden; }

.masthead, .intro { background: var(--night); color: #f4faf5; }
.masthead-inner, .brand, nav, .profiles, .section-heading, .app-links, footer {
  display: flex;
  align-items: center;
}
.masthead-inner { justify-content: space-between; padding-block: 1.1rem; border-bottom: 1px solid #426065; }
.brand { gap: .65rem; text-decoration: none; font-size: 1.35rem; font-weight: 650; letter-spacing: -.055em; }
.brand img { border-radius: 50%; }
.brand .suffix { font-weight: 400; color: var(--mint); }
nav { gap: clamp(1.2rem, 3vw, 2.5rem); }
nav a, footer a { padding-block: .5rem; text-decoration: none; }
nav a:hover, footer a:hover { text-decoration: underline; }
#theme-toggle {
  width: 2.75rem; height: 2.75rem; padding: 0; border: 0; border-radius: 50%;
  background: transparent; color: inherit; cursor: pointer;
}
#theme-toggle svg { display: block; margin: auto; }
#theme-toggle:hover { color: var(--mint); background: #234449; }
.theme-sun { display: none; }

.intro { overflow: hidden; }
.intro-inner { display: grid; grid-template-columns: 1.25fr 1fr; align-items: center; gap: 2rem; }
.profile { padding-block: clamp(3rem, 6vw, 5.6rem); }
.eyebrow, .genome figcaption {
  font-family: "IBM Plex Mono", ui-monospace, Menlo, Consolas, monospace;
  font-size: .8rem;
  letter-spacing: .09em;
}
.eyebrow { text-transform: uppercase; color: var(--mint); }
h1, h2, .genome figcaption span { font-family: var(--serif); font-weight: 400; }
h1 { margin: .5rem 0 1.05rem; font-size: clamp(4rem, 7.6vw, 6.5rem); line-height: 1; letter-spacing: -.035em; }
.bio { max-width: 34rem; font-size: clamp(1.05rem, 1.5vw, 1.2rem); line-height: 1.6; color: #d6e5e2; }
.profiles { flex-wrap: wrap; gap: .8rem; margin-top: 1.65rem; }
.profiles a {
  display: inline-block; padding: .55rem 1.2rem; border: 1px solid #72978f;
  border-radius: .3rem; text-decoration: none; font-weight: 600;
}
.profiles a:first-child { background: var(--mint); border-color: var(--mint); color: var(--on-mint); }
.profiles a:hover { background: #e0f6e9; border-color: #e0f6e9; color: var(--on-mint); }
.profiles a:focus-visible { outline-color: var(--mint); }
.genome {
  position: relative; width: min(100%, 29.5rem); aspect-ratio: 1; justify-self: center;
  display: grid; place-items: center; isolation: isolate; background: var(--night);
}
.genome::before {
  content: ""; position: absolute; inset: -4% -12%; z-index: -1;
  background-image: linear-gradient(#aadbc421 1px, transparent 1px), linear-gradient(90deg, #aadbc421 1px, transparent 1px);
  background-size: 1.6rem 1.6rem;
  mask-image: radial-gradient(ellipse, #000 8%, transparent 69%);
}
.genome img { width: 100%; height: auto; mix-blend-mode: screen; }
.genome figcaption { position: absolute; text-align: center; color: #d4e4df; letter-spacing: .02em; }
.genome figcaption span { display: block; color: #fff; font-size: clamp(1.8rem, 3.4vw, 3rem); line-height: 1.12; letter-spacing: -.02em; }

.work { padding-block: clamp(2.8rem, 5vw, 4.5rem); }
.section-heading { justify-content: space-between; align-items: baseline; gap: 1rem; margin-bottom: 1.55rem; }
h2 { font-size: clamp(2.5rem, 4.4vw, 3.5rem); letter-spacing: -.035em; line-height: 1; }
h3 { font-size: 1.45rem; letter-spacing: -.04em; line-height: 1.2; }
.subtle-link, .resource, footer a { color: var(--teal); }
.subtle-link, .resource { font-size: .95rem; font-weight: 550; }
.subtle-link:hover, .resource:hover, h3 a:hover { text-decoration-thickness: 2px; }
.projects { display: grid; grid-template-columns: repeat(3, 1fr); border-block: 1px solid var(--line); }
.projects article { display: flex; flex-direction: column; align-items: start; padding: 1.75rem 1.8rem 1.6rem; }
.projects article:first-child { padding-left: 0; }
.projects article:last-child { padding-right: 0; }
.projects article + article { border-left: 1px solid var(--line); }
.project-icon { object-fit: contain; margin-bottom: 1rem; }
.proksee-icon { background: #292b2c; padding: .25rem; border-radius: .35rem; }
h3 a { text-decoration-color: #7da89d; text-decoration-thickness: 1px; }
.projects p, .app p { color: var(--body); line-height: 1.65; }
.projects p { margin: .7rem 0 1.2rem; }
.project-links { display: flex; flex-wrap: wrap; gap: .4rem 1rem; }
.projects article > .resource, .project-links { margin-top: auto; }
#projects, #apps { scroll-margin-top: 1rem; }
#apps { margin-top: clamp(2.75rem, 5vw, 4.25rem); }
.app {
  display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 1.5rem;
  padding: 1.5rem 1.8rem; background: var(--app-surface); border: 1px solid var(--app-border); border-radius: .4rem;
}
.app-icon { display: block; width: 5rem; }
.app-icon img { width: 100%; height: auto; }
.app-copy p { max-width: 37rem; margin-top: .3rem; }
.app-links { flex-direction: column; gap: .75rem; }
footer { justify-content: space-between; border-top: 1px solid var(--line); padding-block: 1rem; color: var(--body); font-size: .9rem; }

@media (min-width: 48rem) {
  .wrap { width: min(71rem, calc(100% - 6rem)); }
}
@media (max-width: 48rem) {
  .intro-inner { grid-template-columns: 1.35fr 1fr; gap: .3rem; }
  .projects article { padding-inline: 1rem; }
  .app { gap: 1rem; padding: 1.25rem; }
}
@media (max-width: 39rem) {
  .masthead-inner { padding-block: .8rem; flex-wrap: wrap; gap: .5rem; }
  nav { gap: .75rem; }
  .intro-inner { grid-template-columns: 1fr; }
  .profile { padding-block: 2.6rem 0; }
  .genome { width: min(100%, 17rem); margin-block: .15rem .3rem; }
  .genome figcaption { font-size: .75rem; }
  .projects { grid-template-columns: 1fr; }
  .projects article { display: grid; grid-template-columns: 2rem 1fr; column-gap: .9rem; padding: 1.4rem 0; }
  .projects article + article { border-left: 0; border-top: 1px solid var(--line); }
  .project-icon { width: 1.85rem; height: 1.85rem; margin: 0; }
  .projects h3 { align-self: center; }
  .projects p, .projects article > .resource, .project-links { grid-column: 2; }
  .projects p { margin-block: .5rem .8rem; }
  .section-heading { flex-wrap: wrap; gap: .6rem; }
  .app { grid-template-columns: auto 1fr; }
  .app-icon { width: 3.3rem; align-self: start; }
  .app-links { grid-column: 1 / -1; flex-direction: row; flex-wrap: wrap; gap: 1.1rem; }
}
