:root {
  --bg: #0e0e0e;
  --surface: #171717;
  --line: #262626;
  --text: #e7e5e1;
  --muted: #8f8d88;
  --faint: #5f5d59;
  --sans: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --mono: ui-monospace, "JetBrains Mono", "SF Mono", Menlo, Consolas, monospace;
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 16px/1.65 var(--sans);
  -webkit-font-smoothing: antialiased;
}

main {
  max-width: 760px;
  margin: 0 auto;
  padding: 96px 24px 64px;
}

a {
  color: var(--text);
  text-decoration: underline;
  text-decoration-color: var(--faint);
  text-underline-offset: 3px;
  transition: text-decoration-color .15s;
}
a:hover { text-decoration-color: var(--text); }

/* Intro */

.intro { margin-bottom: 88px; }
.intro h1 {
  margin: 0 0 16px;
  font-size: 28px;
  font-weight: 600;
  letter-spacing: -0.01em;
}
.intro p { margin: 0 0 12px; color: var(--muted); max-width: 56ch; }
.intro .lede { color: var(--text); font-size: 18px; }

.contact { display: flex; gap: 20px; margin-top: 24px; font-size: 15px; }

/* Entries */

h2 {
  margin: 0 0 8px;
  font: 500 12px/1 var(--sans);
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--faint);
}

.entry {
  display: grid;
  grid-template-columns: 260px 1fr;
  gap: 32px;
  padding: 36px 0;
  border-bottom: 1px solid var(--line);
}
.entry:last-child { border-bottom: 0; }

.frame {
  position: relative;
  display: block;
  width: 100%;
  aspect-ratio: 4 / 3;
  padding: 0;
  border: 0;
  border-radius: 6px;
  overflow: hidden;
  background: var(--surface);
  cursor: zoom-in;
}
.frame img, .frame video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.frame video { opacity: 0; transition: opacity .25s; }
.frame.playing video { opacity: 1; }

/* Small play badge on media that has a clip; fades out once it plays */
.frame:has(video)::after {
  content: "";
  position: absolute;
  right: 10px;
  bottom: 10px;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: rgb(0 0 0 / .5) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 10 10'%3E%3Cpath d='M3 2l5 3-5 3z' fill='%23e7e5e1'/%3E%3C/svg%3E") center / 11px no-repeat;
  backdrop-filter: blur(4px);
  opacity: .85;
  transition: opacity .25s;
  pointer-events: none;
}
.frame.playing::after { opacity: 0; }

.thumbs { display: flex; gap: 6px; margin-top: 8px; }
.thumbs button {
  width: 44px;
  height: 33px;
  padding: 0;
  border: 1px solid transparent;
  border-radius: 4px;
  overflow: hidden;
  background: var(--surface);
  opacity: .5;
  cursor: pointer;
  transition: opacity .15s, border-color .15s;
}
.thumbs button:hover { opacity: .85; }
.thumbs button.active { opacity: 1; border-color: var(--faint); }
.thumbs img { width: 100%; height: 100%; object-fit: cover; display: block; }

.text p { margin: 0 0 10px; color: var(--muted); font-size: 15px; }
.head { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; }
.head h3 { margin: 0; font-size: 17px; font-weight: 600; }
.date { flex-shrink: 0; font: 13px var(--sans); font-variant-numeric: tabular-nums; color: var(--faint); }
.text .sub { margin: 2px 0 12px; font: 13px var(--sans); color: var(--faint); }
.text .links { margin-top: 14px; font-size: 14px; }
.text em { font-style: normal; color: var(--text); }
code { font: .9em var(--mono); color: var(--text); }


/* Lightbox */

.lightbox {
  max-width: min(92vw, 1400px);
  max-height: 90vh;
  padding: 0;
  border: 0;
  background: transparent;
  overflow: visible;
}
.lightbox::backdrop { background: rgb(0 0 0 / .88); }
.lightbox img, .lightbox video {
  display: block;
  max-width: min(92vw, 1400px);
  max-height: 90vh;
  border-radius: 6px;
}

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

@media (max-width: 640px) {
  main { padding: 56px 16px 48px; }
  .intro { margin-bottom: 56px; }
  .entry { grid-template-columns: 1fr; gap: 18px; padding: 28px 0; }
  .frame { aspect-ratio: 16 / 10; }
}

@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; }
}
