/* Latin cuts only. Self-hosted so the Pi does not fetch fonts. */

@font-face {
  font-family: 'Fraunces Variable';
  font-style: normal;
  font-display: swap;
  font-weight: 100 900;
  src: url('../fonts/fraunces-latin-full-normal.woff2') format('woff2');
}

@font-face {
  font-family: 'Fraunces Variable';
  font-style: italic;
  font-display: swap;
  font-weight: 100 900;
  src: url('../fonts/fraunces-latin-full-italic.woff2') format('woff2');
}

@font-face {
  font-family: 'Source Serif 4 Variable';
  font-style: normal;
  font-display: swap;
  font-weight: 200 900;
  src: url('../fonts/source-serif-4-latin-opsz-normal.woff2') format('woff2');
}

@font-face {
  font-family: 'Source Serif 4 Variable';
  font-style: italic;
  font-display: swap;
  font-weight: 200 900;
  src: url('../fonts/source-serif-4-latin-opsz-italic.woff2') format('woff2');
}

:root {
  color-scheme: light;
  --display: 'Fraunces Variable', serif;
  --body: 'Source Serif 4 Variable', serif;
  --paper: #f3eee4;
  --paper-top: #f7f3eb;
  --ink: #231c16;
  --muted: #51483e;
  --copper: #8a4030;
  --copper-deep: #6a3122;
  --line: rgba(70, 44, 24, 0.18);
  --slot: #e5d9c4;
  --slot-edge: rgba(70, 44, 24, 0.28);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--body);
  font-optical-sizing: auto;
  font-weight: 450;
  font-size: 1.125rem;
  line-height: 1.65;
  text-rendering: optimizeLegibility;
}

img {
  max-width: 100%;
  height: auto;
}

a {
  color: inherit;
}

a:hover {
  color: var(--copper-deep);
}

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

::selection {
  background: #e4c7b4;
  color: var(--ink);
}

.skip {
  position: absolute;
  left: 1rem;
  top: -4rem;
  background: var(--ink);
  color: var(--paper);
  padding: 0.5rem 0.75rem;
  z-index: 2;
}

.skip:focus {
  top: 1rem;
}

.banner {
  padding: 1.25rem 1rem 1.35rem;
  text-align: center;
  border-bottom: 1px solid var(--line);
  margin-bottom: 2.25rem;
}

.banner-home {
  padding-top: 1.6rem;
  padding-bottom: 1.7rem;
  margin-bottom: 2.5rem;
  background: radial-gradient(ellipse at center 30%, var(--paper-top), transparent 72%);
}

.wordmark-wrap {
  width: min(100%, 20rem);
  margin: 0 auto;
}

.banner-home .wordmark-wrap {
  width: min(100% - 0.5rem, 64rem);
}

.wordmark-link {
  display: block;
  color: inherit;
  text-decoration: none;
}

.wordmark-link:hover {
  color: inherit;
}

.wordmark-wrap img,
.wordmark-wrap picture {
  display: block;
  width: 100%;
  height: auto;
}

.byline {
  margin: 0.35rem 0 0.85rem;
  font-family: var(--display);
  font-style: italic;
  font-weight: 460;
  font-size: 1.15rem;
  color: var(--muted);
  font-variation-settings: 'SOFT' 20, 'WONK' 0;
}

.nav-list,
.nav-sub {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.35rem 1.2rem;
  list-style: none;
  margin: 0;
  padding: 0;
}

.nav-list > li,
.nav-sub > li {
  list-style: none;
}

.nav-list > li.has-submenu {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.nav-sub {
  gap: 0.25rem 0.8rem;
  margin-top: 0.3rem;
}

.banner .nav a,
.banner .nav span {
  font-family: var(--display);
  font-weight: 520;
  font-size: 1.05rem;
  letter-spacing: 0.01em;
  color: var(--ink);
  text-decoration: none;
  box-shadow: none;
  font-variation-settings: 'SOFT' 10, 'WONK' 0;
}

.banner .nav a:hover {
  color: #140f0c;
  text-decoration: none;
  box-shadow: none;
}

.banner .nav li.active > a,
.banner .nav a.active,
.banner .nav a[aria-current='page'] {
  color: var(--copper-deep);
  text-decoration: none;
  box-shadow: inset 0 -1px 0 var(--copper-deep);
}

.banner .nav li.active > a:hover,
.banner .nav a.active:hover,
.banner .nav a[aria-current='page']:hover {
  color: var(--copper-deep);
  text-decoration: none;
  box-shadow: inset 0 -1px 0 var(--copper-deep);
}

.page-intro,
.entry-head,
.prose,
.deck,
.empty-copy {
  width: min(100% - 2rem, 40rem);
}

.page-intro {
  width: min(100% - 2rem, 68rem);
  margin: 0 auto 1.4rem;
}

.entry-head {
  margin: 1.6rem auto 0.4rem;
}

.prose {
  width: min(100% - 1.25rem, 76rem);
  margin: 1.25rem auto 0;
}

.deck {
  margin: 0 auto 2.6rem;
  font-family: var(--display);
  font-weight: 500;
  font-size: clamp(1.55rem, 3vw, 2.15rem);
  line-height: 1.22;
  letter-spacing: -0.025em;
  font-variation-settings: 'SOFT' 35, 'WONK' 1;
  text-wrap: balance;
}

.kicker {
  margin: 0 0 0.45rem;
  font-family: var(--display);
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--copper-deep);
  font-variation-settings: 'SOFT' 0, 'WONK' 0;
}

.page-title {
  margin: 0;
  font-family: var(--display);
  font-weight: 560;
  font-size: clamp(3rem, 8vw, 5.4rem);
  line-height: 0.96;
  letter-spacing: -0.035em;
  font-variation-settings: 'SOFT' 40, 'WONK' 1;
  text-wrap: balance;
}

.lede,
.dek {
  font-size: 1.28rem;
  line-height: 1.45;
  max-width: 38rem;
}

.lede {
  margin: 0.85rem 0 0;
}

.dek {
  margin: 0.85rem 0 0;
  color: var(--ink);
}

.dek p {
  margin: 0;
}

.path {
  font-style: italic;
}

.features,
.project-list,
.gallery,
.figure,
.empty-panel {
  width: min(100% - 2rem, 68rem);
  margin-left: auto;
  margin-right: auto;
}

.figure-lead,
.gallery,
.project-list,
.features {
  width: min(100% - 1.25rem, 76rem);
}

.features {
  display: grid;
  gap: 3.25rem;
}

.feature {
  display: grid;
  gap: 1.1rem;
}

.feature + .feature {
  padding-top: 3.25rem;
  border-top: 1px solid var(--line);
}

.feature .figure,
.feature .figure-lead,
.feature .figure-compact {
  width: 100%;
  margin: 0;
}

.feature-media {
  display: block;
  text-decoration: none;
  color: inherit;
}

.feature-media:hover {
  color: inherit;
}

.feature-copy h2 {
  margin: 0.15rem 0 0.55rem;
  font-family: var(--display);
  font-weight: 560;
  font-size: clamp(2rem, 4vw, 3.15rem);
  line-height: 1.02;
  letter-spacing: -0.03em;
  font-variation-settings: 'SOFT' 35, 'WONK' 1;
  text-wrap: balance;
}

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

.feature-copy .summary {
  margin: 0;
  color: var(--ink);
}

.feature-copy .summary p {
  margin: 0;
}

.project-list {
  display: grid;
  gap: 3.5rem;
  margin-top: 0.5rem;
}

.project-card .figure,
.project-card .figure-lead,
.gallery .figure,
.gallery .figure-lead {
  width: 100%;
  margin: 0;
}

.project-card a {
  display: block;
  text-decoration: none;
  color: inherit;
}

.project-card h2 {
  margin: 0.95rem 0 0.35rem;
  font-family: var(--display);
  font-weight: 560;
  font-size: clamp(2.1rem, 4vw, 3.3rem);
  line-height: 1.02;
  letter-spacing: -0.03em;
  font-variation-settings: 'SOFT' 35, 'WONK' 1;
  text-wrap: balance;
}

.project-card .summary {
  margin: 0.35rem 0 0;
  max-width: 40rem;
}

.figure {
  margin: 1.75rem auto;
}

.figure-lead {
  margin-top: 0.25rem;
}

.figure picture,
.figure img {
  display: block;
  width: 100%;
  height: auto;
}

figcaption {
  margin-top: 0.7rem;
  box-sizing: border-box;
  width: 0;
  min-width: 100%;
  max-width: 100%;
  font-style: italic;
  font-weight: 430;
  font-size: 1.05rem;
  line-height: 1.45;
  color: var(--muted);
}

/* Station photo captions match the body copy (1.125rem). Journal captions stay 1.05rem. */
.gallery figcaption {
  font-size: 1em;
}

.prose span[style*="color: #686c78"] {
  font-size: 1em !important;
}

.slot {
  aspect-ratio: 16 / 9;
  display: grid;
  place-items: center;
  text-align: center;
  padding: 1.25rem;
  background:
    linear-gradient(180deg, rgba(255, 252, 247, 0.55), rgba(255, 252, 247, 0) 42%),
    var(--slot);
  border: 1px solid var(--slot-edge);
}

.figure-lead .slot,
.figure-compact .slot {
  aspect-ratio: 3 / 2;
}

.slot-kicker {
  margin: 0 0 0.35rem;
  font-family: var(--display);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--copper-deep);
  font-variation-settings: 'SOFT' 0, 'WONK' 0;
}

.slot-label {
  margin: 0;
  font-family: var(--display);
  font-weight: 540;
  font-size: clamp(1.8rem, 4vw, 2.8rem);
  line-height: 1;
  letter-spacing: -0.03em;
  font-variation-settings: 'SOFT' 30, 'WONK' 1;
}

.slot-file {
  margin: 0.75rem 0 0;
  color: var(--muted);
  font-style: italic;
  font-size: 0.98rem;
  line-height: 1.4;
  overflow-wrap: anywhere;
}

.gallery {
  display: grid;
  gap: 2.25rem;
  margin-top: 2rem;
}

.empty-panel {
  margin-top: 0.5rem;
}

.empty-copy {
  margin: 1.25rem auto 0;
}

.empty-copy h2 {
  margin: 0 0 0.45rem;
  font-family: var(--display);
  font-weight: 560;
  font-size: clamp(2rem, 4vw, 2.8rem);
  letter-spacing: -0.03em;
  font-variation-settings: 'SOFT' 30, 'WONK' 1;
}

.empty-copy p,
.prose p {
  margin: 0 0 1rem;
}

.prose img {
  display: block;
  height: auto;
  max-width: 100%;
}

.prose figure,
.post__image {
  width: fit-content;
  max-width: 100%;
  margin-top: 1.75rem;
  margin-bottom: 1.75rem;
}

.post__image img,
.prose figure img {
  display: block;
  height: auto;
  max-width: 100%;
  margin: 0;
}

.post__image--left,
.alignleft,
.align-left {
  float: left;
  margin-right: 2rem;
  max-width: 50%;
}

.post__image--right,
.alignright,
.align-right {
  float: right;
  margin-left: 2rem;
  max-width: 50%;
}

.post__image--center,
.aligncenter,
.align-center {
  display: block;
  float: none;
  margin-left: auto;
  margin-right: auto;
}

.post__image--wide,
.post__image--full {
  display: block;
  float: none;
  width: 100%;
  max-width: 100%;
}

.post__image--wide img,
.post__image--full img {
  width: 100%;
}

.prose h2,
.prose h3 {
  margin: 2rem 0 0.55rem;
  font-family: var(--display);
  font-weight: 560;
  letter-spacing: -0.03em;
  line-height: 1.1;
  font-variation-settings: 'SOFT' 30, 'WONK' 1;
}

.prose h2 {
  font-size: clamp(1.7rem, 3vw, 2.25rem);
}

.prose h3 {
  font-size: clamp(1.35rem, 2.4vw, 1.7rem);
}

.prose a {
  color: var(--copper-deep);
  text-underline-offset: 0.16em;
}

.prose ul,
.prose ol {
  margin: 0 0 1rem;
  padding-left: 1.2rem;
}

.prose li + li {
  margin-top: 0.35rem;
}

.prose blockquote {
  margin: 1.5rem 0;
  padding-left: 1rem;
  border-left: 2px solid var(--copper);
  font-family: var(--display);
  font-style: italic;
  font-weight: 480;
  font-size: 1.4rem;
  line-height: 1.35;
  font-variation-settings: 'SOFT' 30, 'WONK' 1;
}

.prose code,
.hint code {
  font-family: var(--body);
  font-style: italic;
  font-size: 0.98em;
}

.prose pre,
.prose table {
  max-width: 100%;
  overflow-x: auto;
}

.prose hr {
  border: 0;
  border-top: 1px solid var(--line);
  margin: 2rem 0;
}

.prose .gallery {
  width: 100%;
  max-width: none;
  margin: 1.5rem 0;
}

.prose p,
.prose h2,
.prose h3,
.prose h4,
.prose ul,
.prose ol,
.prose blockquote,
.prose hr,
.prose pre {
  max-width: 40rem;
  margin-left: auto;
  margin-right: auto;
}


.footer {
  margin-top: 4.5rem;
  padding: 1.6rem 1rem 2.8rem;
  border-top: 1px solid var(--line);
  text-align: center;
}

.footer-mark {
  margin: 0;
  font-family: var(--display);
  font-style: italic;
  font-weight: 520;
  font-size: 1.6rem;
  letter-spacing: -0.02em;
  font-variation-settings: 'SOFT' 25, 'WONK' 1;
}

.footer-note {
  margin: 0.15rem 0 0;
  color: var(--muted);
  font-style: italic;
}

.pager-wrap {
  width: min(100% - 2rem, 40rem);
  margin: 2.6rem auto 0;
}

.pager {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.35rem 1rem;
  list-style: none;
  margin: 0;
  padding: 0;
}

.pager a,
.pager strong {
  font-family: var(--display);
  font-weight: 520;
  font-size: 1.05rem;
  text-decoration: none;
  font-variation-settings: 'SOFT' 10, 'WONK' 0;
}

.pager strong {
  color: var(--copper-deep);
  box-shadow: inset 0 -1px 0 var(--copper-deep);
}

.pager-note {
  margin: 0.7rem 0 0;
  text-align: center;
  color: var(--muted);
  font-style: italic;
}

@media (min-width: 860px) {
  .feature {
    grid-template-columns: 1.35fr 0.85fr;
    gap: 2rem 2.4rem;
    align-items: center;
  }
}

@media (max-width: 420px) {
  body {
    font-size: 1.05rem;
  }

  .banner {
    padding-left: 0.75rem;
    padding-right: 0.75rem;
  }
}

/* journal-width: 1275px */
.wordmark-wrap,
.banner-home .wordmark-wrap {
  width: min(100% - 0.5rem, 1275px) !important;
  max-width: 1275px !important;
}
.page-intro,
.entry-head,
.prose,
.deck,
.empty-copy,
.pager-wrap {
  width: min(100% - 2.5rem, 1275px) !important;
  max-width: 1275px !important;
}
.prose p,
.prose h2,
.prose h3,
.prose h4,
.prose ul,
.prose ol,
.prose blockquote,
.deck {
  max-width: none !important;
}


/* Project teaser: one bordered link. Picture left, title upper right, description lower right. */
.prose .project-teasers {
  display: grid;
  gap: 1.15rem;
  width: 100%;
  max-width: 100%;
  margin: 1.35rem 0 0;
  clear: both;
  float: none;
}
.prose a.project-teaser {
  --photo: 11rem;
  position: relative;
  display: grid;
  grid-template-columns: var(--photo) minmax(0, 1fr);
  grid-template-areas:
    "photo title"
    "photo text";
  column-gap: 0;
  row-gap: 0.35rem;
  align-items: stretch;
  box-sizing: border-box;
  width: 100%;
  max-width: 100%;
  margin: 0 0 1.15rem;
  padding: 0;
  float: none;
  clear: both;
  text-decoration: none;
  color: var(--ink);
  background: var(--paper-top);
  border: 1px solid var(--line);
}
.prose .project-teasers > a.project-teaser { margin: 0; }
.prose a.project-teaser:hover,
.prose a.project-teaser:hover h2,
.prose a.project-teaser:hover .project-teaser-title {
  color: var(--copper);
  text-decoration: none;
}
.prose a.project-teaser:hover { border-color: var(--copper); }
.prose a.project-teaser > img {
  grid-area: photo;
  position: static;
  z-index: 0;
  width: 100%;
  height: 100%;
  max-height: none;
  min-height: 0;
  align-self: stretch;
  overflow: hidden;
  margin: 0;
  float: none;
  object-fit: cover;
  object-position: center;
}
.prose a.project-teaser h2,
.prose a.project-teaser .project-teaser-title {
  display: block;
  grid-area: title;
  position: relative;
  z-index: 1;
  align-self: end;
  margin: 0;
  max-width: 100%;
  padding: 0.9rem 1.05rem 0 1.15rem;
  clear: none;
  float: none;
  font-family: var(--display);
  font-weight: 700;
  font-size: clamp(2.2rem, 3.6vw, 3.05rem);
  line-height: 1.05;
  letter-spacing: -0.03em;
  text-decoration: none;
  color: var(--ink);
  font-variation-settings: "SOFT" 35, "WONK" 1;
  text-wrap: balance;
}
.prose a.project-teaser > p,
.prose a.project-teaser .project-teaser-text {
  grid-area: text;
  font-size: 1.3rem;
  position: relative;
  z-index: 1;
  align-self: start;
  margin: 0;
  max-width: 100%;
  padding: 0 1.05rem 0.95rem 1.15rem;
  clear: none;
  float: none;
  color: var(--ink);
  line-height: 1.45;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
  overflow: hidden;
}
@media (max-width: 859px) {
  .prose a.project-teaser {
    --photo: 100%;
    grid-template-columns: minmax(0, 1fr);
    grid-template-areas: "photo" "title" "text";
    row-gap: 0.55rem;
  }
  .prose a.project-teaser > img {
    position: static !important;
    width: 100% !important;
    max-width: 100% !important;
    height: auto !important;
    aspect-ratio: 3 / 2;
    grid-area: photo;
  }
}

/* teaser-photo-fills-card */
.prose a.project-teaser > img {
  position: absolute !important;
  z-index: 0;
  top: 0 !important;
  bottom: 0 !important;
  left: 0 !important;
  right: auto !important;
  width: var(--photo) !important;
  height: auto !important;
  max-height: none !important;
  min-height: 0 !important;
  margin: 0 !important;
  object-fit: cover !important;
  object-position: center center !important;
}

/* teaser-photo-natural */
.prose a.project-teaser {
  --photo: min(24rem, 46%);
  align-items: stretch !important;
}
.prose a.project-teaser > img {
  position: static !important;
  top: auto !important;
  right: auto !important;
  bottom: auto !important;
  left: auto !important;
  width: 100% !important;
  height: auto !important;
  max-height: none !important;
  min-height: 0 !important;
  margin: 0 !important;
  object-fit: contain !important;
  object-position: center top !important;
  align-self: start !important;
}
.prose a.project-teaser h2,
.prose a.project-teaser .project-teaser-title {
  align-self: end !important;
}
.prose a.project-teaser > p,
.prose a.project-teaser .project-teaser-text {
  align-self: start !important;
}

/* raivin-audio */
.prose audio {
  display: block;
  width: min(72%, 36rem);
  margin: 2.25rem auto 3.5rem;
  transform: scale(1.45);
  transform-origin: center center;
}

/* raivin-audio-title */
.prose .raivin-audio-title {
  margin: 1.6rem 0 0.2rem;
  text-align: center;
}
.prose .raivin-audio-title + audio {
  margin-top: 0.85rem;
}
