@font-face {
  font-family: Inter;
  src: url("./assets/inter.woff2") format("woff2");
  font-weight: 400 700;
  font-style: normal;
  font-display: swap;
}

:root {
  --paper: #131017;
  --ink: #fff;
  --muted: #e4dfe6;
  --line: #ffffff36;
  color-scheme: dark;
  color: var(--ink);
  background: var(--paper);
  font-family: Inter, "Segoe UI", Arial, sans-serif;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  font-size: 17px;
  line-height: 1.62;
  -webkit-font-smoothing: antialiased;
}

.molten-metal {
  position: fixed;
  inset: 0;
  z-index: -1;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

main.container,
.site-footer {
  text-shadow: 0 1px 5px #131017, 0 0 12px #131017;
}

.container {
  width: 100%;
  max-width: 768px;
  padding-inline: 40px;
  margin-inline: auto;
}

main.container {
  flex: 1;
  padding-block: 33px 32px;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 1;
  background: linear-gradient(to bottom, #131017e8, #131017b0 82%, transparent);
  backdrop-filter: blur(4px);
}

.primary-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 5px 32px;
  padding-block: 16px;
}

.primary-nav a {
  color: var(--muted);
  font-size: 15px;
  text-decoration: none;
}

.primary-nav a:hover,
.primary-nav [aria-current] { color: var(--ink); }

.primary-nav [aria-current] { font-weight: 500; }

h1, h2 {
  margin: 0;
  font-weight: 400;
}

h1 {
  font-size: 48px;
  line-height: 1.04;
  letter-spacing: -.025em;
}

.home-heading { font-weight: 700; }

a {
  color: inherit;
  text-decoration-color: #ffffff8c;
  text-underline-offset: .22em;
  text-decoration-thickness: 1px;
}

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

a:focus-visible,
summary:focus-visible { outline: 2px solid var(--muted); outline-offset: 4px; }

.prose {
  margin-top: 16px;
  max-width: 512px;
}

.prose p { margin: 0 0 12px; }

.link-row {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 3px 16px;
  margin-top: 20px;
  font-size: 15px;
}

.link-row span { color: var(--muted); }

.home-facts {
  margin: 21px 0 0;
  max-width: 620px;
  padding-inline-start: 22px;
  line-height: 1.55;
}

.home-facts > li + li { margin-top: 6px; }
.home-facts ul { margin-top: 4px; padding-inline-start: 21px; }
.home-facts strong { font-weight: 600; }

.home-projects { margin-top: 42px; scroll-margin-top: 72px; }
.home-projects h2 { font-size: 24px; font-weight: 600; letter-spacing: -.02em; }

main.home-main {
  max-width: none;
  padding-inline: 0;
}

.home-places {
  width: min(1200px, calc(100% - clamp(32px, 8vw, 100px)));
  margin: clamp(42px, 6vw, 76px) auto 0;
  scroll-margin-top: 72px;
}

.places-masonry {
  position: relative;
  overflow: clip;
  overflow-clip-margin: 10px;
}

.places-tile {
  position: absolute;
  display: block;
  overflow: hidden;
  padding: 0;
  border: 0;
  border-radius: 5px;
  background: #191721;
  color: var(--ink);
  cursor: pointer;
}

.places-tile img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

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

.places-tile-caption {
  position: absolute;
  inset: auto 0 0;
  padding: 18px 9px 9px;
  background: linear-gradient(transparent, #131017f5 32%);
  font: 600 clamp(11px, 1.9vw, 13px)/1.38 Inter, "Segoe UI", Arial, sans-serif;
  text-align: left;
  opacity: 0;
}

.places-tile:is(:hover, :focus-visible) .places-tile-caption { opacity: 1; }

.places-play {
  position: absolute;
  top: 50%;
  left: 50%;
  display: grid;
  place-items: center;
  width: 38px;
  aspect-ratio: 1;
  transform: translate(-50%, -50%);
  border: 1px solid #ffffffbd;
  border-radius: 50%;
  background: #131017c7;
}

.places-play::after {
  content: "";
  margin-left: 3px;
  border: 6px solid transparent;
  border-left: 10px solid var(--ink);
  border-right: 0;
}

@media (prefers-reduced-motion: no-preference) {
  .places-tile img { transition: transform .35s ease; }
  .places-tile-caption { transition: opacity .2s ease; }
  .places-tile:is(:hover, :focus-visible) img { transform: scale(1.045); }
  .places-tile[data-reveal="hidden"]:not(:focus-visible) {
    opacity: 0;
    filter: blur(12px);
    transform: translateY(min(calc(60px + 35%), 158px)) scale(.96);
    pointer-events: none;
  }
  .places-tile.is-reveal-ready {
    transition-property: opacity, filter, transform;
    transition-duration: 600ms;
    transition-timing-function: ease-out, ease-out, cubic-bezier(.2, .65, .33, 1.08);
    transition-delay: var(--reveal-delay, 0ms);
  }
  .places-tile.is-reveal-ready[data-reveal="hidden"] {
    transition-duration: 450ms;
    transition-timing-function: cubic-bezier(.4, 0, .65, 1);
  }
  .places-tile.is-reveal-ready:focus-visible { transition: none; }
}

html:has(.places-lightbox[open]) { overflow: hidden; }

.places-lightbox {
  width: min(840px, calc(100% - 28px));
  max-height: calc(100dvh - 28px);
  padding: 0 4px 10px;
  border: 0;
  background: transparent;
  color: var(--ink);
}

.places-lightbox::backdrop { background: #131017f0; }
.places-lightbox form { margin: 0 0 8px; text-align: right; }
.places-lightbox button {
  min-height: 44px;
  padding: 6px 12px;
  border: 0;
  background: transparent;
  color: inherit;
  font: inherit;
  font-size: 14px;
  cursor: pointer;
}

.places-lightbox button:focus-visible { outline: 2px solid currentColor; outline-offset: -2px; }
.places-lightbox button span { padding-inline-start: 4px; }
.places-lightbox figure { margin: 0; }
.places-lightbox-media { display: grid; place-items: center; }
.places-lightbox-media :is(img, video) {
  max-width: 100%;
  max-height: min(72dvh, 740px);
  border-radius: 5px;
  object-fit: contain;
}

.places-lightbox figcaption {
  max-width: 60ch;
  margin: 12px auto 0;
  font-size: clamp(14px, 2.2vw, 17px);
  text-align: center;
}

.project-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px;
  margin: 14px 0 0;
  padding: 0;
  list-style: none;
}

.project-card {
  display: flex;
  height: 100%;
  flex-direction: column;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 13px;
  background: #131017e6;
  text-decoration: none;
  text-shadow: none;
}

.project-card:is(:hover, :focus-visible) { border-color: #ffffff9e; }

.project-card-preview {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 16 / 10;
  object-fit: cover;
  background-color: #191721;
  border-bottom: 1px solid var(--line);
}

.project-card-placeholder {
  background-image: radial-gradient(circle, #e4dfe640 1px, transparent 1.5px);
  background-size: 12px 12px;
}

.project-card-body {
  display: flex;
  flex: 1;
  flex-direction: column;
  gap: 8px;
  padding: 13px 15px 15px;
}

.project-card-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 8px;
}

.project-card-heading h3 {
  margin: 0;
  font-size: 16px;
  font-weight: 600;
  line-height: 1.35;
  text-decoration: underline;
  text-decoration-color: #ffffff80;
  text-underline-offset: 4px;
}

.project-card-heading :is(time, span) {
  padding: 2px 8px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--muted);
  font-size: 11px;
  white-space: nowrap;
}

.project-card p {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.55;
}

.project-card-action {
  margin-top: auto;
  padding-top: 3px;
  font-size: 13px;
  font-weight: 600;
}

.project-list {
  display: grid;
  gap: 26px;
  margin: 28px 0 0;
  padding: 0;
  list-style: none;
}

.project-list article {
  scroll-margin-top: 76px;
  padding: clamp(16px, 4vw, 30px);
  border: 1px solid var(--line);
  border-radius: 13px;
  background: #131017eb;
  text-shadow: none;
}

.project-list header {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 14px;
}

.project-list h2 {
  font-size: clamp(22px, 3vw, 28px);
  font-weight: 600;
  line-height: 1.2;
}

.project-list time,
.project-meta { color: var(--muted); font-size: 14px; }

.project-list p { margin: 0; max-width: 64ch; }
.project-list .project-meta { margin-top: 8px; }
.project-list .writeup-intro { margin-top: 14px; }

.writeup-action {
  display: inline-block;
  margin-top: 16px;
  padding: 7px 12px;
  border: 1px solid var(--line);
  border-radius: 7px;
  color: var(--ink);
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
}

.writeup-action:hover { border-color: var(--muted); }

.project-story {
  display: grid;
  gap: 18px;
  margin-top: 21px;
  padding-top: 18px;
  border-top: 1px solid var(--line);
}

.project-story h3 {
  margin: 0 0 5px;
  font-size: 16px;
  font-weight: 600;
}

.project-story p { color: var(--muted); }

.site-footer {
  padding-block: 5px 24px;
  text-align: center;
  color: var(--muted);
  font-size: 14px;
}

.site-footer a { text-decoration: none; }
.site-footer a:hover { text-decoration: underline; }

@media (max-width: 600px) {
  .container { padding-inline: 24px; }
  .primary-nav { column-gap: 24px; }
  main.container { padding-top: 20px; }
  h1 { font-size: 36px; }
  .project-grid { grid-template-columns: minmax(0, 1fr); }
}
