:root {
  --ink: #111111;
  --hairline: #e0e0e0;
  --muted: rgba(17, 17, 17, 0.5);
  --faint: rgba(17, 17, 17, 0.35);
  --cover-bg: #f4f4f4;
  --font-serif: "Iowan Old Style", "Palatino Linotype", "Book Antiqua", "Baskerville", "Times New Roman", serif;
  --font-mono: "Cascadia Mono", "SFMono-Regular", Consolas, monospace;
  --font-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100dvh;
  background: #ffffff;
  color: var(--ink);
  font-family: var(--font-serif);
}

a {
  color: inherit;
}

.archive-shell {
  max-width: 80rem;
  margin: 0 auto;
  padding: 3rem 2rem 4rem;
}

.archive-topbar {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: baseline;
  gap: 0.8rem 1.5rem;
  padding-bottom: 1.4rem;
  border-bottom: 1px solid var(--hairline);
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.archive-topbar .brand {
  text-decoration: none;
}

.archive-topbar .brand:hover {
  text-decoration: underline;
  text-underline-offset: 4px;
}

  margin: 0;
  color: var(--faint);
}

/* ---- Name list (a24films.com/films clone) ---- */

.pf-list {
  position: relative;
  overflow: hidden;
}

.pf-item {
  --pf-size: clamp(1.7rem, 4.4vw, 3.75rem);
  margin-bottom: calc(var(--pf-size) * 0.3);
}

.pf-link {
  display: inline-block;
  color: var(--ink);
  text-decoration: none;
  transition: color 200ms ease-in-out;
}

.pf-link:hover,
.pf-link:focus-visible {
  color: #888888;
}

.pf-name {
  margin: 0 0 0.15em;
  font-family: var(--font-sans);
  font-size: var(--pf-size);
  font-weight: 500;
  line-height: 1;
  letter-spacing: -0.04em;
}

.pf-sup {
  display: none;
  margin-left: 1em;
  font-family: var(--font-mono);
  font-size: clamp(8px, 0.2em, 12px);
  font-weight: 300;
  letter-spacing: -0.06em;
  color: var(--muted);
  white-space: nowrap;
  position: relative;
  top: -2.65em;
  vertical-align: baseline;
}

/* The artwork slot: pinned to the right edge and painted on top of the names
   (z-index 1), so a name that reaches that far is covered by its own artwork.
   pointer-events stay off, so names under the image remain hoverable and
   clickable. */

.pf-stage {
  display: none;
  position: absolute;
  top: 0;
  right: 0;
  width: 58.33333%;
  max-height: 60vh;
  overflow: hidden;
  z-index: 1;
  opacity: 0;
  pointer-events: none;
  transition: opacity 100ms ease-in;
}

.pf-stage.is-active {
  opacity: 1;
}

.pf-stage.is-sticky {
  position: fixed;
  top: 20vh;
}

.pf-stage img {
  display: block;
  width: 100%;
  height: auto;
  max-height: 60vh;
  object-fit: contain;
  object-position: right center;
  opacity: 0;
  transition: opacity 150ms linear;
}

.pf-stage img.is-loaded {
  opacity: 1;
}

@media (min-width: 641px) {
  .pf-stage {
    display: block;
  }

  .pf-sup {
    display: inline;
  }
}

/* ---- Footer ---- */
/* ---- Footer ---- */

.archive-footer {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 1rem;
  margin-top: 3rem;
  padding-top: 1rem;
  border-top: 1px solid var(--hairline);
  color: var(--muted);
  font-size: 0.85rem;
}

.archive-footer p {
  margin: 0;
}

.archive-footer a {
  text-decoration: underline;
  text-underline-offset: 3px;
}

.archive-footer a:hover {
  color: var(--ink);
}

/* ---- Responsive ---- */

@media (max-width: 640px) {
  .archive-shell {
    padding: 2rem 1.25rem 3rem;
  }
}

/* ---- Work page (article detail) ---- */

.work-page-shell {
  max-width: 72rem;
}

.work-header {
  padding: 3.5rem 0 2.5rem;
  border-bottom: 1px solid var(--hairline);
}

.work-header-section {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--faint);
  margin: 0 0 1.2rem;
}

.work-header-title {
  margin: 0;
  font-size: clamp(2rem, 4.5vw, 3.6rem);
  font-weight: 400;
  font-style: italic;
  line-height: 1.1;
  letter-spacing: -0.01em;
}

.work-header-summary {
  margin: 1.5rem 0 0;
  max-width: 60ch;
  color: var(--muted);
  font-size: 1rem;
  line-height: 1.7;
}

.work-header-meta {
  margin: 1.2rem 0 0;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.1em;
  color: var(--faint);
}

.work-content-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(200px, 0.38fr);
  gap: 3rem 2.5rem;
  align-items: start;
  padding-top: 2.5rem;
}

.work-content-body {
  min-width: 0;
}

.work-content {
  max-width: 68ch;
  font-size: 1.05rem;
  line-height: 1.75;
}

.work-content h2 {
  margin: 2.5rem 0 1rem;
  font-size: 1.4rem;
  font-weight: 400;
  font-style: italic;
}

.work-content h3 {
  margin: 2rem 0 0.8rem;
  font-size: 1.15rem;
  font-weight: 400;
}

.work-content p {
  margin: 0 0 1.2rem;
}

.work-content blockquote {
  margin: 1.5rem 0;
  padding: 0.8rem 1.2rem;
  border-left: 2px solid var(--hairline);
  color: var(--muted);
  font-style: italic;
}

.work-content img {
  max-width: 100%;
  height: auto;
  margin: 1.5rem 0;
}

.work-content table {
  width: 100%;
  border-collapse: collapse;
  margin: 1.5rem 0;
  font-size: 0.92rem;
}

.work-content th,
.work-content td {
  padding: 0.6rem 0.8rem;
  border: 1px solid var(--hairline);
  text-align: left;
}

.work-content th {
  font-weight: 600;
  background: var(--cover-bg);
}

.work-sidebar {
  position: sticky;
  top: 2rem;
}

.work-sidebar-inner {
  padding-top: 0.3rem;
  border-top: 1px solid var(--hairline);
}

.sidebar-label {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--faint);
  margin: 0 0 0.5rem;
}

.sidebar-link {
  margin: 0 0 1.2rem;
  font-size: 0.88rem;
}

.sidebar-link a {
  text-decoration: underline;
  text-underline-offset: 3px;
}

.sidebar-related {
  margin-top: 1.5rem;
  padding-top: 1.2rem;
  border-top: 1px solid var(--hairline);
}

.related-list {
  margin: 0.5rem 0 0;
  padding: 0;
  list-style: none;
}

.related-item {
  padding: 0.5rem 0;
  border-bottom: 1px solid var(--hairline);
}

.related-item:last-child {
  border-bottom: none;
}

.related-title {
  display: block;
  font-size: 0.88rem;
  font-style: italic;
  line-height: 1.4;
}

.related-title a {
  text-decoration: none;
}

.related-title a:hover {
  opacity: 0.7;
}

.related-meta {
  display: block;
  font-family: var(--font-mono);
  font-size: 0.68rem;
  color: var(--faint);
  margin-top: 0.2rem;
}

@media (max-width: 900px) {
  .work-content-layout {
    grid-template-columns: 1fr;
    gap: 2rem;
  }

  .work-sidebar {
    position: static;
  }
}

@media (max-width: 640px) {
  .work-header {
    padding: 2rem 0 1.5rem;
  }

  .work-header-title {
    font-size: clamp(1.6rem, 6vw, 2.4rem);
  }
}

/* ---- Lightbox ---- */

.pf-lightbox {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 4vmin;
  background: rgba(10, 10, 10, 0.92);
  cursor: zoom-out;
}

.pf-lightbox.open {
  display: flex;
}

.pf-lightbox img {
  max-width: 94vw;
  max-height: 90vh;
  width: auto;
  height: auto;
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.55);
}

.pf-lightbox-close {
  position: fixed;
  top: 1.1rem;
  right: 1.3rem;
  width: 2.5rem;
  height: 2.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  border: 1px solid rgba(255, 255, 255, 0.45);
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.4);
  color: #ffffff;
  font-size: 1.3rem;
  line-height: 1;
  cursor: pointer;
  transition: background 0.2s ease, color 0.2s ease;
}

.pf-lightbox-close:hover {
  background: #ffffff;
  color: #111111;
}

/* ---- responsive ---- */


