@font-face {
  font-family: Basier;
  src: url("../fonts/basier.woff2") format("woff2");
}

:root {
  color-scheme: dark;
  --bg: #0b0b0d;
  --panel: #17171b;
  --text: #eeeeee;
  --muted: #a7a7b1;
  --accent: #5b93d1;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: linear-gradient(#111114, var(--bg) 420px);
  color: var(--text);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.65;
  overflow-wrap: break-word;
}

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

a:hover,
.brand strong,
.eyebrow,
.project-detail a,
.writing-copy a {
  color: var(--accent);
}

img {
  display: block;
  max-width: 100%;
}

.site-header,
main {
  width: min(920px, calc(100% - 32px));
  margin: 0 auto;
}

.site-header,
nav,
.links {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
}

.site-header {
  justify-content: space-between;
  gap: 24px;
  padding: 28px 0 42px;
}

nav,
small,
.lede {
  color: var(--muted);
}

nav {
  gap: 18px;
}

main {
  display: grid;
  gap: 64px;
  padding-bottom: 64px;
}

.brand,
h1,
h2,
h3,
summary span {
  font-family: Basier, ui-monospace, monospace;
}

.brand {
  color: #ffffff;
  font-size: 1.35rem;
}

.intro {
  display: grid;
  grid-template-columns: minmax(220px, 320px) minmax(0, 1fr);
  align-items: center;
  gap: 48px;
}

.portrait,
.project-detail img,
.writing-image {
  width: 100%;
  border-radius: 8px;
  object-fit: cover;
}

.portrait {
  aspect-ratio: 1;
}

.eyebrow {
  margin: 0 0 8px;
  font-size: 0.82rem;
  font-weight: 800;
  text-transform: uppercase;
}

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

h1 {
  margin-bottom: 12px;
  font-size: 4.6rem;
  line-height: 0.95;
}

h2 {
  margin-bottom: 20px;
  font-size: 2rem;
}

h3 {
  margin: 34px 0 10px;
}

.lede {
  font-size: 1.15rem;
}

.links {
  gap: 10px;
  margin: 22px 0 0;
}

.links a {
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  border-radius: 999px;
  background: var(--panel);
}

.links a:hover {
  background: var(--accent);
}

.links img {
  width: 20px;
  height: 20px;
  filter: invert(1);
}

.links a:hover img {
  filter: none;
}

summary {
  --thumb-width: 82px;
  --thumb-height: 62px;
  --marker-width: 20px;
  display: grid;
  grid-template-columns: var(--thumb-width) minmax(0, 1fr) var(--marker-width);
  align-items: center;
  gap: 18px;
  min-height: 96px;
  padding: 14px 0;
  cursor: pointer;
  list-style: none;
}

.summary-copy {
  display: grid;
  gap: 4px;
  min-width: 0;
}

summary::-webkit-details-marker {
  display: none;
}

summary::after {
  content: "+";
  color: var(--accent);
  font-size: 1.35rem;
  justify-self: end;
}

details[open] {
  padding-bottom: 24px;
}

details[open] summary::after {
  content: "-";
}

mark {
  margin-left: 8px;
  border-radius: 999px;
  background: var(--accent);
  color: var(--bg);
  padding: 2px 8px;
  font: 700 0.7rem Inter, ui-sans-serif, system-ui, sans-serif;
}

summary img,
.placeholder {
  width: var(--thumb-width);
  height: var(--thumb-height);
  border-radius: 6px;
}

summary img {
  object-fit: contain;
}

.placeholder {
  display: grid;
  place-items: center;
  outline: 1px solid #303038;
  color: var(--accent);
}

.project-detail {
  display: grid;
  grid-template-columns: minmax(200px, 320px) minmax(0, 1fr);
  gap: 22px;
  align-items: start;
  margin-bottom: 16px;
}

.project-detail.text-only {
  grid-template-columns: 1fr;
}

.project-media {
  display: grid;
  gap: 10px;
}

.project-media a {
  border-radius: 8px;
  outline: 2px solid transparent;
  outline-offset: 4px;
}

.project-media a:hover {
  outline-color: var(--accent);
}

.project-detail img {
  aspect-ratio: 4 / 3;
}

details + details {
  margin-top: 10px;
}

dl {
  display: grid;
  grid-template-columns: 72px minmax(0, 1fr);
  gap: 8px 14px;
  margin: 18px 0 0;
}

dt,
.footnote,
.note {
  color: var(--muted);
}

dd {
  margin: 0;
}

details p,
.writing-copy {
  max-width: 66ch;
}

.writing-copy h3:first-child {
  margin-top: 0;
}

.writing-copy a {
  text-decoration: underline;
  text-underline-offset: 3px;
  overflow-wrap: anywhere;
}

.project-detail dd a:hover,
.writing-copy a:hover {
  text-decoration: underline;
  text-underline-offset: 3px;
}

.writing-image {
  max-height: 340px;
  margin: 20px 0;
}

.writing-copy ul {
  padding-left: 1.2rem;
}

.writing-copy pre {
  overflow-x: auto;
  border-radius: 8px;
  background: var(--panel);
  padding: 16px;
  white-space: pre-wrap;
}

.writing-copy code {
  overflow-wrap: anywhere;
}

.footnote {
  font-size: 0.92rem;
}

.note {
  border-left: 3px solid var(--accent);
  padding-left: 14px;
}

@media (max-width: 680px) {
  summary {
    align-items: flex-start;
  }

  nav {
    gap: 14px;
  }

  .site-header {
    flex-wrap: nowrap;
    gap: 16px;
    padding-bottom: 32px;
  }

  .brand {
    font-size: 1.1rem;
  }

  .intro,
  .project-detail {
    grid-template-columns: 1fr;
  }

  .portrait {
    width: 140px;
    height: 140px;
  }

  h1 {
    font-size: 3rem;
  }

  h2 {
    font-size: 1.65rem;
  }

  summary {
    --thumb-width: 56px;
    --thumb-height: 42px;
    gap: 8px;
    min-height: 0;
    padding: 8px 0;
  }

  .summary-copy {
    gap: 2px;
  }

  .summary-copy span {
    font-size: 0.95rem;
    line-height: 1.25;
  }

  .summary-copy small {
    line-height: 1.25;
  }

  .project-detail {
    gap: 16px;
  }

  dl {
    grid-template-columns: 1fr;
    gap: 2px;
  }

  dd {
    margin-bottom: 6px;
  }

  .writing-copy {
    max-width: 100%;
  }
}

@media (max-width: 360px) {
  .site-header,
  main {
    width: min(920px, calc(100% - 24px));
  }

  .site-header {
    gap: 12px;
  }

  nav {
    gap: 12px;
    font-size: 0.95rem;
  }

  .brand {
    font-size: 1rem;
  }

  h1 {
    font-size: 2.55rem;
  }

  .lede {
    font-size: 1.05rem;
  }

  mark {
    display: table;
    margin: 4px 0 0;
  }

  summary {
    --thumb-width: 48px;
    --thumb-height: 36px;
    --marker-width: 18px;
    gap: 8px;
  }
}
