:root {
  color-scheme: light;
  --ink: #0b0b0a;
  --ink-soft: #171715;
  --paper: #f1f0ea;
  --paper-bright: #faf9f5;
  --muted: #6f6d67;
  --line: #c9c6bd;
  --line-dark: #393936;
  --accent: #a64f2a;
  --gutter: clamp(1.25rem, 4.5vw, 5rem);
  --frame: 90rem;
  --reading: 45rem;
  --curtain-height: clamp(10rem, 38vw, 40rem);
  --display: "Arial Narrow", "Helvetica Neue", Helvetica, Arial, sans-serif;
  --body: "Helvetica Neue", Helvetica, Arial, sans-serif;
}

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

html {
  scroll-behavior: smooth;
  background: var(--ink);
}

body {
  margin: 0;
  min-width: 20rem;
  background: var(--ink);
  color: var(--ink);
  font-family: var(--body);
  font-size: 1rem;
  line-height: 1.65;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}

body.lightbox-open {
  overflow: hidden;
}

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

button,
input,
summary {
  font: inherit;
}

button,
summary {
  cursor: pointer;
}

a {
  color: inherit;
  text-decoration-thickness: 0.08em;
  text-underline-offset: 0.18em;
}

a:hover {
  text-decoration-style: solid;
}

::selection {
  background: var(--accent);
  color: var(--paper-bright);
}

:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 4px;
}

[hidden] {
  display: none !important;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.skip-link {
  position: fixed;
  top: 0.75rem;
  left: 0.75rem;
  z-index: 200;
  padding: 0.65rem 0.9rem;
  background: var(--paper-bright);
  color: var(--ink);
  transform: translateY(-150%);
}

.skip-link:focus {
  transform: translateY(0);
}

.page-transition-flash {
  position: fixed;
  inset: 0;
  z-index: 1000;
  background: var(--paper);
  opacity: 0;
  pointer-events: none;
  transition: opacity 320ms cubic-bezier(0.4, 0, 0.2, 1);
}

.page-transition-flash[data-theme="dark"] {
  background: var(--ink);
}

.page-transition-flash[data-theme="light"] {
  background: var(--paper);
}

html.is-route-flashing .page-transition-flash {
  opacity: 1;
}

html.is-route-revealing .page-transition-flash {
  opacity: 0;
  transition: none;
}

::view-transition-old(root) {
  animation: route-color-hold 700ms linear both;
}

::view-transition-new(root) {
  animation: route-new-in 560ms cubic-bezier(0.16, 1, 0.3, 1) 110ms both;
}

@keyframes route-color-hold {
  from,
  to { opacity: 1; }
}

@keyframes route-new-in {
  from {
    opacity: 0;
    transform: translateY(0.3rem);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.micro-label,
.page-hero-meta,
.section-index,
.hero-rail,
.hero-footer,
.article-header-meta,
.featured-post-meta,
.footer-meta {
  font-size: 0.7rem;
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: 0.11em;
  text-transform: uppercase;
}

.light {
  color: var(--paper-bright);
}

.text-link {
  display: inline-flex;
  gap: 0.55rem;
  align-items: center;
  width: fit-content;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-decoration: none;
  text-transform: uppercase;
}

.text-link span {
  transition: transform 180ms ease;
}

.text-link:hover span {
  transform: translate(0.2rem, -0.2rem);
}

/* Header */

.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 5rem;
  padding: 0 var(--gutter);
  border-bottom: 1px solid var(--line);
  background: color-mix(in srgb, var(--paper) 94%, transparent);
  backdrop-filter: blur(16px);
}

.home-page .site-header,
.article-page .site-header,
.photo-page .site-header,
.contact-page .site-header {
  border-color: var(--line-dark);
  background: color-mix(in srgb, var(--ink) 94%, transparent);
  color: var(--paper-bright);
}

.wordmark {
  display: inline-flex;
  align-items: center;
  text-decoration: none;
}

.wordmark img {
  width: 5.75rem;
  height: auto;
  filter: invert(1);
}

.home-page .wordmark img,
.article-page .wordmark img,
.photo-page .wordmark img,
.contact-page .wordmark img {
  filter: none;
}

.desktop-nav {
  display: flex;
  align-items: center;
  gap: clamp(1rem, 2.5vw, 2.5rem);
}

.desktop-nav a {
  display: flex;
  gap: 0.42rem;
  align-items: baseline;
  padding: 1rem 0;
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.035em;
  text-decoration: none;
  text-transform: uppercase;
}

.desktop-nav a span {
  font-size: 0.55rem;
  opacity: 0.68;
}

.desktop-nav a:hover,
.desktop-nav a.active {
  color: inherit;
}

.mobile-nav {
  display: none;
}

.site-main {
  min-height: 65vh;
}

.site-layer {
  position: relative;
  z-index: 2;
  min-height: 100svh;
  margin-bottom: var(--curtain-height);
  overflow: clip;
  border-radius: 0 0 0.85rem 0.85rem;
  background: var(--paper);
  box-shadow: 0 1.5rem 4rem rgb(0 0 0 / 28%);
}

/* Footer in the document flow */

.site-footer {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(14rem, 0.65fr);
  gap: clamp(3rem, 7vw, 8rem);
  padding: clamp(4rem, 8vw, 8rem) var(--gutter) 2rem;
  border-top: 1px solid var(--line);
  background: var(--paper);
  color: var(--ink);
}

.footer-identity p {
  max-width: 38rem;
  margin: 0;
}

.footer-identity p:last-child {
  margin-top: 1.25rem;
  font-family: var(--display);
  font-size: clamp(1.8rem, 3.2vw, 3.6rem);
  font-weight: 500;
  line-height: 1.04;
  letter-spacing: -0.045em;
}

.footer-links {
  display: flex;
  flex-direction: column;
  align-self: end;
  border-top: 1px solid var(--line);
}

.footer-links a {
  display: flex;
  justify-content: space-between;
  padding: 0.85rem 0;
  border-bottom: 1px solid var(--line);
  font-size: 0.76rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-decoration: none;
  text-transform: uppercase;
}

.footer-meta {
  display: flex;
  grid-column: 1 / -1;
  justify-content: space-between;
  padding-top: 1.5rem;
  border-top: 1px solid var(--line);
  color: var(--muted);
}

/* Decorative curtain after the footer */

.curtain-signature {
  position: fixed;
  right: 0;
  bottom: 0;
  left: 0;
  z-index: 1;
  display: grid;
  place-items: center;
  width: 100vw;
  height: var(--curtain-height);
  padding: 0;
  overflow: hidden;
  background: #000;
  color: #fff;
}

.curtain-wordmark {
  display: block;
  width: min(94vw, 95rem);
  height: auto;
  max-height: 88%;
}

/* Home */

.home-hero {
  position: relative;
  display: grid;
  grid-template-rows: auto 1fr auto;
  gap: clamp(1.5rem, 3vw, 3rem);
  min-height: calc(100svh - 5rem);
  padding: 1.35rem var(--gutter) 1.75rem;
  overflow: hidden;
  background: var(--ink);
  color: var(--paper-bright);
}

.hero-rail,
.hero-footer {
  position: relative;
  z-index: 2;
  display: flex;
  grid-column: 1 / -1;
  justify-content: space-between;
}

.hero-rail {
  padding-bottom: 1.1rem;
  border-bottom: 1px solid var(--line-dark);
  color: #9a9992;
}

.hero-copy {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-width: 0;
  padding: 2rem 0;
}

.hero-copy h1 {
  max-width: 11ch;
  margin: 1.7rem 0 1.8rem;
  font-family: var(--display);
  font-size: clamp(5rem, 12.1vw, 12.5rem);
  font-weight: 500;
  line-height: 0.79;
  letter-spacing: -0.075em;
}

.hero-intro {
  max-width: 37rem;
  margin: 0;
  color: #b8b6af;
  font-size: clamp(1rem, 1.45vw, 1.3rem);
  line-height: 1.45;
}

.hero-footer {
  align-items: end;
  padding-top: 1rem;
  border-top: 1px solid var(--line-dark);
  color: #9a9992;
}

.hero-footer a {
  display: flex;
  gap: 0.75rem;
  color: var(--paper-bright);
  text-decoration: none;
}

.editorial-section {
  display: grid;
  grid-template-columns: minmax(8rem, 0.23fr) minmax(0, 1fr);
  gap: clamp(2rem, 5vw, 6rem);
  padding: clamp(5rem, 9vw, 9rem) var(--gutter);
  border-bottom: 1px solid var(--line);
}

.section-index {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
  color: var(--muted);
}

.section-body {
  min-width: 0;
}

.about-grid,
.now-grid,
.photo-status-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(17rem, 0.8fr);
  gap: clamp(3rem, 7vw, 8rem);
  align-items: start;
}

.about-grid h2,
.now-grid h2,
.photo-status-grid h2,
.section-heading-row h2 {
  max-width: 14ch;
  margin: 0;
  font-family: var(--display);
  font-size: clamp(2.7rem, 5.5vw, 6rem);
  font-weight: 500;
  line-height: 0.98;
  letter-spacing: -0.055em;
}

.body-copy {
  max-width: 34rem;
  font-size: clamp(1rem, 1.3vw, 1.16rem);
}

.body-copy p:first-child {
  margin-top: 0;
}

.body-copy p {
  color: #33332f;
}

.body-copy .text-link {
  margin-top: 1.5rem;
}

.dark-section {
  border-color: var(--line-dark);
  background: var(--ink);
  color: var(--paper-bright);
}

.section-heading-row {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 2rem;
  margin-bottom: clamp(3rem, 6vw, 6rem);
}

.indexed-list,
.post-index-list,
.contact-list,
.book-list {
  padding: 0;
  margin: 0;
  list-style: none;
}

.indexed-list li {
  display: grid;
  grid-template-columns: 3.5rem 1fr auto;
  gap: 1rem;
  align-items: center;
  border-top: 1px solid var(--line-dark);
}

.indexed-list li:last-child {
  border-bottom: 1px solid var(--line-dark);
}

.indexed-list a {
  display: flex;
  flex-direction: column;
  gap: 0.38rem;
  padding: 1.6rem 0;
  text-decoration: none;
}

.item-index,
.item-meta,
.item-arrow {
  color: #8d8c86;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.07em;
  text-transform: uppercase;
}

.item-title {
  font-family: var(--display);
  font-size: clamp(1.25rem, 2.1vw, 2.05rem);
  line-height: 1.1;
  letter-spacing: -0.035em;
}

.indexed-list li:hover .item-title {
  text-decoration: underline;
  text-underline-offset: 0.16em;
}

.indexed-list li:hover .item-arrow {
  color: var(--paper-bright);
  transform: translate(0.2rem, -0.2rem);
}

.now-grid h2 {
  font-size: clamp(2.7rem, 5vw, 5rem);
}

.status-list {
  margin: 0;
  border-top: 1px solid var(--line);
}

.status-list > div {
  padding: 1.35rem 0;
  border-bottom: 1px solid var(--line);
}

.status-list dt {
  margin-bottom: 0.7rem;
  color: var(--muted);
  font-size: 0.67rem;
  font-weight: 700;
  letter-spacing: 0.08em;
}

.status-list dd {
  margin: 0;
  font-size: 1.05rem;
  line-height: 1.5;
}

.portal-section {
  padding-bottom: clamp(6rem, 11vw, 11rem);
}

.portal-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  border-top: 1px solid var(--ink);
  border-left: 1px solid var(--ink);
}

.portal-grid a {
  position: relative;
  display: flex;
  flex-direction: column;
  min-height: 21rem;
  padding: 1.5rem;
  border-right: 1px solid var(--ink);
  border-bottom: 1px solid var(--ink);
  text-decoration: none;
  transition: background 180ms ease, color 180ms ease;
}

.portal-grid strong {
  max-width: 10ch;
  margin-top: auto;
  font-family: var(--display);
  font-size: clamp(1.65rem, 2.5vw, 2.6rem);
  font-weight: 500;
  line-height: 1.03;
  letter-spacing: -0.045em;
}

.portal-grid a > span:last-child {
  position: absolute;
  right: 1.5rem;
  bottom: 1.3rem;
}

.portal-grid a:hover {
  background: var(--ink);
  color: var(--paper-bright);
}

/* Shared page heroes */

.page-hero {
  min-height: 64vh;
  padding: 1.7rem var(--gutter) clamp(4rem, 8vw, 8rem);
  border-bottom: 1px solid var(--line);
}

.page-hero-meta {
  display: flex;
  justify-content: space-between;
  padding-bottom: 1.2rem;
  border-bottom: 1px solid currentColor;
  color: var(--muted);
}

.page-hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.6fr) minmax(18rem, 0.4fr);
  gap: clamp(3rem, 8vw, 10rem);
  align-items: end;
  min-height: 42vh;
  padding-top: 4rem;
}

.page-hero-grid h1 {
  margin: 0;
  font-family: var(--display);
  font-size: clamp(5rem, 11vw, 11rem);
  font-weight: 500;
  line-height: 0.76;
  letter-spacing: -0.075em;
}

.page-hero-grid h1 span {
  display: block;
  margin-top: 1.35rem;
  color: var(--muted);
  font-size: clamp(1.25rem, 2.4vw, 2.4rem);
  line-height: 1;
  letter-spacing: -0.035em;
}

.page-hero-grid > p {
  max-width: 32rem;
  margin: 0;
  font-size: clamp(1rem, 1.4vw, 1.2rem);
  line-height: 1.5;
}

/* Bookshelf */

.catalog-hero {
  padding-bottom: 2.5rem;
}

.catalog-stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(8rem, 1fr));
  max-width: 40rem;
  margin: 4rem 0 0 auto;
  border-top: 1px solid var(--line);
  border-left: 1px solid var(--line);
}

.catalog-stats div {
  padding: 0.85rem 1rem;
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.catalog-stats dt {
  color: var(--muted);
  font-size: 0.63rem;
  font-weight: 700;
  letter-spacing: 0.07em;
  text-transform: uppercase;
}

.catalog-stats dd {
  margin: 0.6rem 0 0;
  font-family: var(--display);
  font-size: 1.8rem;
  line-height: 1;
}

.catalog-tools,
.catalog {
  max-width: var(--frame);
  padding-right: var(--gutter);
  padding-left: var(--gutter);
  margin-right: auto;
  margin-left: auto;
}

.catalog-tools {
  padding-top: clamp(3.5rem, 6vw, 6rem);
  padding-bottom: 3rem;
}

.search-field {
  display: grid;
  grid-template-columns: minmax(10rem, 0.25fr) minmax(0, 0.75fr);
  align-items: center;
  border-top: 1px solid var(--ink);
  border-bottom: 1px solid var(--ink);
}

.search-field label {
  font-size: 0.67rem;
  font-weight: 700;
  letter-spacing: 0.08em;
}

.search-field input {
  width: 100%;
  padding: 1.15rem 0;
  border: 0;
  background: transparent;
  color: var(--ink);
  font-size: clamp(1.1rem, 2vw, 1.55rem);
  outline: none;
}

.search-field input::placeholder {
  color: #97948c;
}

.search-field input::-webkit-search-cancel-button {
  display: none;
  appearance: none;
}

.search-field:focus-within {
  box-shadow: inset 0 -3px 0 var(--accent);
}

.filter-panel {
  border-bottom: 1px solid var(--line);
}

.filter-panel summary {
  display: flex;
  justify-content: space-between;
  padding: 1rem 0;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  list-style: none;
  text-transform: uppercase;
}

.filter-panel summary::-webkit-details-marker {
  display: none;
}

.filter-panel[open] summary span {
  transform: rotate(45deg);
}

.filter-panel-body {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 2rem 4rem;
  padding: 1.5rem 0 2rem;
}

.filter-group {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  padding: 0;
  border: 0;
}

.tag-filter-group {
  grid-column: 1 / -1;
}

.filter-group legend {
  width: 100%;
  margin-bottom: 0.5rem;
  color: var(--muted);
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.07em;
  text-transform: uppercase;
}

.filter-btn {
  padding: 0.48rem 0.75rem;
  border: 1px solid var(--line);
  border-radius: 0;
  background: transparent;
  color: var(--ink);
  font-size: 0.75rem;
}

.filter-btn:hover {
  border-color: var(--ink);
}

.filter-btn.active {
  border-color: var(--ink);
  background: var(--ink);
  color: var(--paper-bright);
}

.results-count {
  margin: 1.25rem 0 0;
  color: var(--muted);
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.catalog {
  padding-bottom: clamp(6rem, 10vw, 10rem);
}

.catalog-group + .catalog-group {
  margin-top: 5rem;
}

.catalog-group-header {
  display: flex;
  align-items: end;
  justify-content: space-between;
  padding-bottom: 0.85rem;
  border-bottom: 2px solid var(--ink);
}

.catalog-group-header h2 {
  margin: 0;
  font-family: var(--display);
  font-size: clamp(2.1rem, 4vw, 4.2rem);
  font-weight: 500;
  line-height: 1;
  letter-spacing: -0.05em;
}

.catalog-group-header span {
  color: var(--muted);
  font-size: 0.7rem;
  font-weight: 700;
}

.book-list li {
  display: grid;
  grid-template-columns: 3rem 2.75rem minmax(0, 1fr) minmax(11rem, 0.28fr);
  gap: 1rem;
  align-items: start;
  padding: 1.15rem 0;
  border-bottom: 1px solid var(--line);
  transition: padding 160ms ease, background 160ms ease;
}

.book-list li:hover {
  padding-right: 0.75rem;
  padding-left: 0.75rem;
  background: var(--paper-bright);
}

.book-index {
  padding-top: 0.15rem;
  color: var(--muted);
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: 0.06em;
}

.book-cover {
  width: 2.75rem;
  height: 3.85rem;
  background: var(--ink-soft);
  filter: grayscale(1);
  object-fit: cover;
}

.book-cover-placeholder {
  display: grid;
  place-items: center;
  color: var(--paper-bright);
  font-family: var(--display);
  font-size: 1.3rem;
}

.book-primary {
  min-width: 0;
}

.book-primary strong,
.book-primary > span {
  display: block;
}

.book-primary strong {
  font-family: var(--display);
  font-size: clamp(1rem, 1.5vw, 1.25rem);
  font-weight: 600;
  line-height: 1.2;
  letter-spacing: -0.025em;
}

.book-primary > span {
  margin-top: 0.25rem;
  color: var(--muted);
  font-size: 0.82rem;
}

.book-primary p {
  max-width: 50rem;
  margin: 0.65rem 0 0;
  color: #4f4e49;
  font-size: 0.82rem;
  line-height: 1.45;
}

.book-secondary {
  display: grid;
  grid-template-columns: 0.35fr 0.65fr;
  gap: 0.3rem 0.8rem;
  color: var(--muted);
  font-size: 0.63rem;
  font-weight: 700;
  line-height: 1.35;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.book-secondary span:last-child {
  grid-column: 1 / -1;
}

.empty-state {
  padding: 5rem 0;
  border-top: 1px solid var(--ink);
  border-bottom: 1px solid var(--ink);
  font-family: var(--display);
  font-size: 2rem;
}

/* Blog index */

.blog-hero .page-hero-grid h1 {
  font-size: clamp(6rem, 14vw, 14rem);
}

.featured-post {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(20rem, 0.75fr);
  min-height: 43rem;
  background: var(--ink);
  color: var(--paper-bright);
}

.featured-post-media {
  min-height: 32rem;
  overflow: hidden;
  border-right: 1px solid var(--line-dark);
}

.featured-post-media img {
  width: 100%;
  height: 100%;
  filter: grayscale(1) contrast(1.12) brightness(0.75);
  object-fit: cover;
  transition: filter 300ms ease, transform 500ms ease;
}

.featured-post:hover .featured-post-media img {
  filter: grayscale(0.25) saturate(0.7) contrast(1.08) brightness(0.82);
  transform: scale(1.015);
}

.media-placeholder {
  display: grid;
  width: 100%;
  height: 100%;
  place-items: center;
  background: var(--ink-soft);
  color: #33332f;
  font-family: var(--display);
  font-size: 15rem;
}

.featured-post-copy {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: clamp(2rem, 5vw, 5rem);
}

.featured-post-copy h2 {
  margin: 2rem 0 1.5rem;
  font-family: var(--display);
  font-size: clamp(2.5rem, 4.5vw, 5rem);
  font-weight: 500;
  line-height: 0.98;
  letter-spacing: -0.055em;
}

.featured-post-copy h2 a {
  text-decoration: none;
}

.featured-post-copy > p:not(.micro-label) {
  max-width: 34rem;
  color: #b8b6af;
}

.featured-post-meta {
  display: flex;
  gap: 1rem;
  margin: 1.2rem 0 2.5rem;
  color: #8d8c86;
}

.writing-index {
  padding: clamp(5rem, 9vw, 9rem) var(--gutter);
}

.index-header {
  display: flex;
  align-items: end;
  justify-content: space-between;
  padding-bottom: 1.2rem;
  border-bottom: 2px solid var(--ink);
}

.index-header h2 {
  margin: 0;
  font-family: var(--display);
  font-size: clamp(2.6rem, 5vw, 5.5rem);
  font-weight: 500;
  line-height: 1;
  letter-spacing: -0.055em;
}

.index-header > span {
  color: var(--muted);
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.07em;
}

.post-index-list li {
  display: grid;
  grid-template-columns: 3rem minmax(0, 1fr) minmax(10rem, 0.25fr) auto;
  gap: 1.5rem;
  align-items: start;
  padding: 1.6rem 0;
  border-bottom: 1px solid var(--line);
}

.post-number {
  color: var(--muted);
  font-size: 0.68rem;
  font-weight: 700;
}

.post-index-main a {
  font-family: var(--display);
  font-size: clamp(1.35rem, 2.3vw, 2.4rem);
  line-height: 1.08;
  letter-spacing: -0.035em;
  text-decoration: none;
}

.post-index-main a:hover {
  text-decoration: underline;
}

.post-index-main p {
  max-width: 45rem;
  margin: 0.65rem 0 0;
  color: var(--muted);
  font-size: 0.88rem;
}

.post-index-meta {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  color: var(--muted);
  font-size: 0.63rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

/* Article */

.reading-progress-bar {
  position: fixed;
  top: 0;
  left: 0;
  z-index: 210;
  width: 0;
  height: 3px;
  background: var(--accent);
}

.article-header {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  min-height: 72vh;
  padding: 1.5rem var(--gutter) clamp(3.5rem, 7vw, 7rem);
  background: var(--ink);
  color: var(--paper-bright);
}

.article-header-meta {
  display: flex;
  justify-content: space-between;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--line-dark);
  color: #9a9992;
}

.article-header-meta a {
  text-decoration: none;
}

.article-header h1 {
  max-width: 15ch;
  margin: auto 0 2rem;
  padding-top: 5rem;
  font-family: var(--display);
  font-size: clamp(3.5rem, 8vw, 9rem);
  font-weight: 500;
  line-height: 0.91;
  letter-spacing: -0.065em;
}

.article-deck {
  max-width: 46rem;
  margin: 0;
  color: #b8b6af;
  font-size: clamp(1rem, 1.5vw, 1.25rem);
  line-height: 1.5;
}

.article-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  margin-top: 2.5rem;
  color: #8d8c86;
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: 0.07em;
  text-transform: uppercase;
}

.article-tags span::before {
  content: "#";
}

.article-hero-image {
  max-width: var(--frame);
  padding: 0 var(--gutter);
  margin: clamp(3rem, 7vw, 7rem) auto 0;
}

.article-hero-image img {
  width: 100%;
  max-height: 48rem;
  filter: grayscale(0.8) saturate(0.55) contrast(1.05);
  object-fit: cover;
}

.prose {
  max-width: var(--reading);
  margin: clamp(4rem, 8vw, 8rem) auto;
  padding: 0 1.5rem;
  font-size: clamp(1.04rem, 1.3vw, 1.14rem);
  line-height: 1.8;
}

.prose > :first-child {
  margin-top: 0;
}

.prose h2,
.prose h3 {
  margin: 2.8em 0 0.8em;
  font-family: var(--display);
  font-weight: 600;
  line-height: 1.12;
  letter-spacing: -0.035em;
}

.prose h2 {
  font-size: clamp(2rem, 3.4vw, 3.2rem);
}

.prose h3 {
  font-size: clamp(1.5rem, 2.3vw, 2.1rem);
}

.prose p,
.prose ul,
.prose ol,
.prose blockquote {
  margin-top: 1.35em;
  margin-bottom: 1.35em;
}

.prose a {
  text-decoration: underline;
}

.prose blockquote {
  padding: 0.25rem 0 0.25rem 1.5rem;
  margin-right: 0;
  margin-left: 0;
  border-left: 3px solid var(--ink);
  color: #4f4e49;
  font-family: Georgia, serif;
  font-size: 1.15em;
  font-style: italic;
}

.prose code {
  padding: 0.12rem 0.3rem;
  background: #e2e0d8;
  font-size: 0.88em;
}

.prose pre {
  padding: 1.25rem;
  overflow-x: auto;
  background: var(--ink-soft);
  color: var(--paper-bright);
}

.prose pre code {
  padding: 0;
  background: transparent;
}

.article-footer {
  display: flex;
  justify-content: space-between;
  max-width: var(--reading);
  padding: 2rem 1.5rem clamp(5rem, 9vw, 9rem);
  margin: 0 auto;
  border-top: 1px solid var(--ink);
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.07em;
  text-transform: uppercase;
}

.article-footer a {
  text-decoration: none;
}

/* Contact */

.contact-hero {
  display: grid;
  grid-template-rows: auto 1fr auto;
  min-height: calc(100svh - 5rem);
  padding: 1.5rem var(--gutter) 2rem;
  background: var(--ink);
  color: var(--paper-bright);
}

.contact-hero > div:nth-child(2) {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 4rem 0;
}

.contact-hero h1 {
  max-width: 10ch;
  margin: 1.5rem 0 0;
  font-family: var(--display);
  font-size: clamp(4.2rem, 10vw, 10.5rem);
  font-weight: 500;
  line-height: 0.8;
  letter-spacing: -0.075em;
}

.contact-email {
  display: grid;
  grid-template-columns: minmax(9rem, 0.25fr) minmax(0, 1fr) auto;
  gap: 1rem;
  align-items: center;
  padding: 1.25rem 0;
  border-top: 1px solid var(--line-dark);
  border-bottom: 1px solid var(--line-dark);
  text-decoration: none;
}

.contact-email > span:first-child {
  color: #8d8c86;
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.07em;
}

.contact-email strong {
  min-width: 0;
  overflow: hidden;
  font-family: var(--display);
  font-size: clamp(1.1rem, 2.6vw, 2.7rem);
  font-weight: 500;
  letter-spacing: -0.035em;
  text-overflow: ellipsis;
}

.contact-directory {
  display: grid;
  grid-template-columns: minmax(8rem, 0.23fr) minmax(0, 1fr);
  gap: clamp(2rem, 5vw, 6rem);
  padding: clamp(5rem, 9vw, 9rem) var(--gutter);
}

.contact-directory h2 {
  margin: 0 0 4rem;
  font-family: var(--display);
  font-size: clamp(2.7rem, 5vw, 5.5rem);
  font-weight: 500;
  line-height: 1;
  letter-spacing: -0.055em;
}

.contact-list {
  border-top: 2px solid var(--ink);
}

.contact-list li {
  display: grid;
  grid-template-columns: 3rem minmax(9rem, 0.25fr) minmax(0, 1fr);
  gap: 1rem;
  align-items: center;
  padding: 1.15rem 0;
  border-bottom: 1px solid var(--line);
}

.contact-list li > span {
  color: var(--muted);
  font-size: 0.67rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.contact-list a {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  min-width: 0;
  font-family: var(--display);
  font-size: clamp(1rem, 1.7vw, 1.4rem);
  letter-spacing: -0.025em;
  text-decoration: none;
  overflow-wrap: anywhere;
}

.contact-list a:hover {
  text-decoration: underline;
}

/* Photo */

.photo-hero {
  display: grid;
  grid-template-columns: minmax(0, 0.75fr) minmax(18rem, 0.25fr);
  grid-template-rows: auto 1fr;
  gap: 2rem clamp(2rem, 5vw, 6rem);
  min-height: calc(100svh - 5rem);
  padding: 1.5rem var(--gutter) 2rem;
  background: var(--ink);
  color: var(--paper-bright);
}

.photo-hero .page-hero-meta {
  grid-column: 1 / -1;
}

.photo-title-block {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding-top: 2rem;
}

.photo-title-block h1 {
  margin: 0;
  font-family: var(--display);
  font-size: clamp(7rem, 18vw, 19rem);
  font-weight: 500;
  line-height: 0.72;
  letter-spacing: -0.085em;
}

.photo-title-block p {
  max-width: 35rem;
  margin: 4rem 0 0;
  color: #b8b6af;
  font-size: clamp(1rem, 1.4vw, 1.18rem);
}

.photo-field {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  min-height: 31rem;
  padding: 1.25rem;
  overflow: hidden;
  background:
    linear-gradient(155deg, transparent 0 43%, rgb(0 0 0 / 68%) 43% 54%, transparent 54%),
    radial-gradient(circle at 25% 16%, #ce8052, #8c3e24 34%, #1c1512 72%);
  color: var(--paper-bright);
  font-size: 0.68rem;
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: 0.08em;
}

.photo-field::after {
  position: absolute;
  inset: 0;
  border: 1px solid rgb(255 255 255 / 22%);
  content: "";
}

.photo-field span:last-child {
  align-self: end;
  font-family: var(--display);
  font-size: 4rem;
  font-weight: 500;
  letter-spacing: -0.06em;
}

.photo-status-grid p {
  max-width: 34rem;
  margin: 0 0 2rem;
  color: #4f4e49;
  font-size: 1.05rem;
}

/* Responsive */

@media (max-width: 62rem) {
  .desktop-nav {
    display: none;
  }

  .mobile-nav {
    display: block;
  }

  .mobile-nav summary {
    display: flex;
    gap: 0.55rem;
    align-items: center;
    padding: 1.4rem 0;
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.07em;
    list-style: none;
    text-transform: uppercase;
  }

  .mobile-nav summary::-webkit-details-marker {
    display: none;
  }

  .mobile-nav[open] summary span {
    transform: rotate(45deg);
  }

  .mobile-nav nav {
    position: absolute;
    top: 100%;
    right: 0;
    left: 0;
    display: flex;
    flex-direction: column;
    padding: 0 var(--gutter) 1.25rem;
    border-bottom: 1px solid var(--line);
    background: var(--paper);
    color: var(--ink);
  }

  .home-page .mobile-nav nav,
  .article-page .mobile-nav nav,
  .photo-page .mobile-nav nav,
  .contact-page .mobile-nav nav {
    border-color: var(--line-dark);
    background: var(--ink);
    color: var(--paper-bright);
  }

  .mobile-nav nav a {
    display: grid;
    grid-template-columns: 3rem 1fr;
    padding: 1rem 0;
    border-top: 1px solid currentColor;
    font-family: var(--display);
    font-size: 1.5rem;
    line-height: 1;
    letter-spacing: -0.035em;
    text-decoration: none;
  }

  .mobile-nav nav a span {
    font-family: var(--body);
    font-size: 0.6rem;
    letter-spacing: 0.05em;
  }

  .mobile-nav nav a.active {
    color: var(--accent);
  }

  .home-hero {
    grid-template-columns: 1fr;
  }

  .hero-copy h1 {
    font-size: clamp(4.4rem, 12vw, 7.5rem);
  }

  .editorial-section,
  .contact-directory {
    grid-template-columns: 1fr;
  }

  .section-index {
    flex-direction: row;
    justify-content: space-between;
    padding-bottom: 1rem;
    border-bottom: 1px solid currentColor;
  }

  .page-hero-grid {
    grid-template-columns: 1fr;
    align-content: end;
    gap: 3rem;
  }

  .page-hero-grid h1 {
    font-size: clamp(4.7rem, 15vw, 8rem);
  }

  .book-list li {
    grid-template-columns: 2.4rem 2.5rem minmax(0, 1fr);
  }

  .book-secondary {
    grid-column: 3;
    grid-template-columns: repeat(3, auto);
    justify-content: start;
  }

  .book-secondary span:last-child {
    grid-column: auto;
  }

  .featured-post {
    grid-template-columns: 1fr;
  }

  .featured-post-media {
    min-height: 28rem;
    border-right: 0;
    border-bottom: 1px solid var(--line-dark);
  }

  .post-index-list li {
    grid-template-columns: 2.5rem minmax(0, 1fr) auto;
  }

  .post-index-meta {
    grid-column: 2;
    grid-row: 2;
  }

  .post-index-list .item-arrow {
    grid-column: 3;
    grid-row: 1;
  }
}

@media (max-width: 46rem) {
  .site-header {
    min-height: 4.5rem;
  }

  .home-hero,
  .contact-hero,
  .photo-hero {
    min-height: calc(100svh - 4.5rem);
  }

  .home-hero {
    grid-template-columns: 1fr;
    grid-template-rows: auto 1fr auto;
    gap: 1.5rem;
  }

  .hero-copy {
    grid-row: 2;
    padding-bottom: 0;
  }

  .hero-copy h1 {
    margin-top: 1rem;
    font-size: clamp(3.6rem, 18.5vw, 6rem);
  }

  .hero-footer {
    grid-row: 3;
  }

  .editorial-section {
    padding-top: 4.5rem;
    padding-bottom: 4.5rem;
  }

  .about-grid,
  .now-grid,
  .photo-status-grid {
    grid-template-columns: 1fr;
    gap: 2.5rem;
  }

  .section-heading-row {
    align-items: start;
    flex-direction: column;
  }

  .indexed-list li {
    grid-template-columns: 2.4rem 1fr auto;
  }

  .item-meta {
    line-height: 1.5;
  }

  .portal-grid {
    grid-template-columns: 1fr;
  }

  .portal-grid a {
    min-height: 15rem;
  }

  .site-footer {
    grid-template-columns: 1fr;
    gap: 3.5rem;
  }

  .footer-meta {
    align-items: start;
    flex-direction: column;
    gap: 1rem;
  }

  .page-hero {
    min-height: 70vh;
  }

  .page-hero-grid {
    min-height: 50vh;
    padding-top: 3rem;
  }

  .page-hero-grid h1 {
    font-size: clamp(4.3rem, 20vw, 7rem);
  }

  .catalog-stats {
    grid-template-columns: 1fr;
    max-width: none;
  }

  .catalog-stats div {
    display: flex;
    align-items: center;
    justify-content: space-between;
  }

  .catalog-stats dd {
    margin: 0;
  }

  .search-field {
    grid-template-columns: 1fr;
    padding-top: 0.8rem;
  }

  .filter-panel-body {
    grid-template-columns: 1fr;
  }

  .tag-filter-group {
    grid-column: auto;
  }

  .book-list li,
  .book-list li:hover {
    grid-template-columns: 2rem minmax(0, 1fr);
    padding-right: 0;
    padding-left: 0;
  }

  .book-cover {
    display: none;
  }

  .book-primary,
  .book-secondary {
    grid-column: 2;
  }

  .book-secondary {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem 0.9rem;
  }

  .featured-post-media {
    min-height: 20rem;
  }

  .featured-post-copy {
    padding-top: 3.5rem;
    padding-bottom: 3.5rem;
  }

  .post-index-list li {
    grid-template-columns: 2rem minmax(0, 1fr) auto;
    gap: 0.8rem;
  }

  .post-index-main p {
    display: none;
  }

  .article-header {
    min-height: 78vh;
  }

  .article-header-meta {
    gap: 1rem;
  }

  .article-header h1 {
    padding-top: 4rem;
    font-size: clamp(3.2rem, 15vw, 5.2rem);
  }

  .article-footer {
    align-items: start;
    flex-direction: column;
    gap: 1.2rem;
  }

  .contact-email {
    grid-template-columns: 1fr auto;
  }

  .contact-email > span:first-child {
    grid-column: 1 / -1;
  }

  .contact-list li {
    grid-template-columns: 2rem 1fr;
  }

  .contact-list a {
    grid-column: 2;
  }

  .photo-hero {
    grid-template-columns: 1fr;
    grid-template-rows: auto auto auto;
  }

  .photo-hero .page-hero-meta {
    grid-column: 1;
  }

  .photo-title-block h1 {
    font-size: clamp(6rem, 35vw, 10rem);
  }

  .photo-field {
    min-height: 28rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
  }

  .page-transition-flash {
    display: none;
  }

  ::view-transition-old(root),
  ::view-transition-new(root) {
    animation: none;
  }
}

@media print {
  .site-header,
  .site-footer,
  .curtain-signature,
  .reading-progress-bar {
    display: none;
  }

  .site-layer {
    margin-bottom: 0;
    border-radius: 0;
    box-shadow: none;
  }

  body,
  .article-header {
    background: white;
    color: black;
  }

  .article-header {
    min-height: auto;
  }
}
