/* Léo Le Coguic — editorial portfolio */

:root {
  --bg: #f4f2ef;
  --ink: #0a0a0a;
  --muted: #6b6b6b;
  --line: rgba(10, 10, 10, 0.14);
  --accent: #0a0a0a;
  --serif: "Cormorant Garamond", "Times New Roman", Georgia, serif;
  --sans: "Helvetica Neue", Helvetica, Arial, sans-serif;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

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

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  font-weight: 400;
  line-height: 1.45;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

/* —— Holographic mouse trail —— */
#holoTrail {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  z-index: 150;
  pointer-events: none;
  overflow: hidden;
}

a {
  color: inherit;
  text-decoration: none;
}

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

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

/* —— Header —— */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.1rem 1.5rem;
  mix-blend-mode: difference;
  color: #fff;
  pointer-events: none;
}

.site-header a,
.site-header button {
  pointer-events: auto;
}

.brand {
  font-size: 0.68rem;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  font-weight: 500;
}

.nav-toggle {
  background: none;
  border: none;
  color: inherit;
  font: inherit;
  font-size: 0.68rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  cursor: pointer;
  padding: 0;
}

.nav-panel {
  position: fixed;
  inset: 0;
  z-index: 200;
  background: var(--ink);
  color: var(--bg);
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 4rem 2rem;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.5s var(--ease), visibility 0.5s;
}

.nav-panel.is-open {
  opacity: 1;
  visibility: visible;
}

.nav-panel__close {
  position: absolute;
  top: 1.1rem;
  right: 1.5rem;
  background: none;
  border: none;
  color: inherit;
  font-size: 0.68rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  cursor: pointer;
}

.nav-panel ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

.nav-panel li {
  margin: 0.15em 0;
}

.nav-panel a {
  font-family: var(--serif);
  font-size: clamp(2.5rem, 8vw, 5.5rem);
  font-weight: 300;
  line-height: 1.05;
  display: inline-block;
  transition: opacity 0.3s;
}

.nav-panel a:hover {
  opacity: 0.45;
}

/* Strikethrough nav — editorial "barré" */
.nav-panel a .strike {
  text-decoration: line-through;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.12em;
}

.nav-panel a:hover .strike {
  text-decoration: none;
}

.nav-panel a:hover .reveal {
  text-decoration: line-through;
}

/* —— Hero —— */
.hero {
  min-height: 100vh;
  display: grid;
  grid-template-rows: 1fr auto;
  padding: 5rem 1.5rem 2rem;
}

.hero__title {
  align-self: end;
  margin: 0;
  font-family: var(--serif);
  font-weight: 300;
  font-size: clamp(3.2rem, 14vw, 11rem);
  line-height: 0.88;
  letter-spacing: -0.03em;
}

.hero__title .line {
  display: block;
}

.hero__title .barré {
  text-decoration: line-through;
  text-decoration-thickness: 2px;
  text-decoration-color: var(--ink);
}

.hero__meta {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
  padding-top: 3rem;
  border-top: 1px solid var(--line);
  margin-top: 2rem;
  font-size: 0.75rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.hero__meta p {
  margin: 0;
  max-width: 28ch;
}

.hero__meta .tag {
  text-align: right;
  color: var(--muted);
}

/* —— Marquee —— */
.marquee {
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  overflow: hidden;
  padding: 0.85rem 0;
  background: var(--ink);
  color: var(--bg);
}

.marquee__track {
  display: flex;
  width: max-content;
  animation: scroll 28s linear infinite;
  gap: 3rem;
}

.marquee__track span {
  font-size: 0.7rem;
  letter-spacing: 0.35em;
  text-transform: uppercase;
  white-space: nowrap;
}

@keyframes scroll {
  from {
    transform: translateX(0);
  }
  to {
    transform: translateX(-50%);
  }
}

/* —— Sections —— */
.section {
  padding: 5rem 1.5rem;
}

.section--dark {
  background: var(--ink);
  color: var(--bg);
}

.section--dark .section__label {
  color: rgba(244, 242, 239, 0.5);
}

.section__label {
  font-size: 0.65rem;
  letter-spacing: 0.32em;
  text-transform: uppercase;
  color: var(--muted);
  margin: 0 0 2.5rem;
}

.section__headline {
  font-family: var(--serif);
  font-weight: 300;
  font-size: clamp(2rem, 6vw, 4.2rem);
  line-height: 1.05;
  margin: 0 0 2rem;
  max-width: 14ch;
}

/* —— About —— */
.about {
  display: grid;
  gap: 3rem;
}

@media (min-width: 900px) {
  .about {
    grid-template-columns: minmax(280px, 420px) 1fr;
    gap: 4rem;
    align-items: start;
  }
}

.about__cv {
  margin: 0;
  width: 100%;
  max-width: 420px;
  align-self: start;
  flex-shrink: 0;
}

.about__cv-trigger {
  display: block;
  width: 100%;
  padding: 0;
  border: none;
  background: none;
  cursor: crosshair;
  text-align: left;
}

.about__portrait {
  width: 100%;
  height: auto;
  max-width: 100%;
  aspect-ratio: 2480 / 3508;
  object-fit: contain;
  object-position: top center;
  border-radius: 2px;
  filter: grayscale(100%);
  transition: filter 0.6s var(--ease);
}

.about__cv-trigger:hover .about__portrait {
  filter: grayscale(0%);
}

.about__text {
  font-size: clamp(1rem, 2vw, 1.15rem);
  max-width: 52ch;
}

.about__text p {
  margin: 0 0 1.25em;
}

.about__text .lead {
  font-family: var(--serif);
  font-size: clamp(1.35rem, 3vw, 1.85rem);
  line-height: 1.25;
  margin-bottom: 1.5em;
}

/* —— Experience —— */
.exp-list {
  list-style: none;
  margin: 0;
  padding: 0;
  border-top: 1px solid var(--line);
}

.section--dark .exp-list {
  border-color: rgba(244, 242, 239, 0.15);
}

.exp-list li {
  display: grid;
  gap: 0.5rem 2rem;
  padding: 1.75rem 0;
  border-bottom: 1px solid var(--line);
}

.section--dark .exp-list li {
  border-color: rgba(244, 242, 239, 0.15);
}

@media (min-width: 700px) {
  .exp-list li {
    grid-template-columns: 120px 1fr 1.2fr;
    align-items: baseline;
  }
}

.exp-list .year {
  font-size: 0.7rem;
  letter-spacing: 0.12em;
  color: var(--muted);
}

.section--dark .exp-list .year {
  color: rgba(244, 242, 239, 0.45);
}

.exp-list .role {
  font-size: 0.95rem;
  font-weight: 500;
  letter-spacing: 0.02em;
}

.exp-list .detail {
  font-size: 0.85rem;
  color: var(--muted);
  line-height: 1.5;
}

.section--dark .exp-list .detail {
  color: rgba(244, 242, 239, 0.65);
}

/* —— Archives / PDF grid —— */
.archives-grid {
  display: grid;
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
}

@media (min-width: 600px) {
  .archives-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 1100px) {
  .archives-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

.archive-card {
  background: var(--bg);
  display: flex;
  flex-direction: column;
  width: 100%;
  padding: 0;
  border: none;
  font: inherit;
  color: inherit;
  text-align: left;
  cursor: pointer;
  transition: background 0.4s var(--ease);
}

.archive-card:hover {
  background: var(--ink);
  color: var(--bg);
}

.archive-card__media {
  aspect-ratio: 4 / 5;
  overflow: hidden;
  position: relative;
}

.archive-card__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.7s var(--ease), filter 0.5s;
  filter: grayscale(30%);
}

.archive-card:hover .archive-card__media img {
  transform: scale(1.04);
  filter: grayscale(0%);
}

.archive-card__body {
  padding: 1.25rem 1.35rem 1.5rem;
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 1rem;
}

.archive-card__index {
  font-size: 0.6rem;
  letter-spacing: 0.25em;
  color: var(--muted);
}

.archive-card:hover .archive-card__index {
  color: rgba(244, 242, 239, 0.5);
}

.archive-card__title {
  font-family: var(--serif);
  font-size: 1.65rem;
  font-weight: 400;
  line-height: 1.1;
  margin: 0;
}

.archive-card__title .barré-hover {
  text-decoration: line-through;
  text-decoration-thickness: 1px;
}

.archive-card:hover .archive-card__title .barré-hover {
  text-decoration: none;
}

.archive-card__sub {
  font-size: 0.72rem;
  letter-spacing: 0.04em;
  color: var(--muted);
  margin: 0.35em 0 0;
}

.archive-card:hover .archive-card__sub {
  color: rgba(244, 242, 239, 0.6);
}

.archive-card__link {
  font-size: 0.65rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  display: inline-flex;
  align-items: center;
  gap: 0.5em;
}

.archive-card__link::after {
  content: "→";
  transition: transform 0.3s var(--ease);
}

.archive-card:hover .archive-card__link::after {
  transform: translateX(4px);
}

/* —— Skills —— */
.skills {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 0.75rem;
  margin-top: 2rem;
}

.skill-tag {
  font-size: 0.68rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  padding: 0.55em 1em;
  border: 1px solid var(--line);
}

.section--dark .skill-tag {
  border-color: rgba(244, 242, 239, 0.25);
}

/* —— Contact —— */
.contact-block {
  display: grid;
  gap: 3rem;
}

@media (min-width: 800px) {
  .contact-block {
    grid-template-columns: 1fr 1fr;
    align-items: end;
  }
}

.contact-block__email {
  font-family: var(--serif);
  font-size: clamp(1.5rem, 4vw, 3rem);
  font-weight: 300;
  word-break: break-all;
  transition: opacity 0.3s;
}

.contact-block__email:hover {
  opacity: 0.5;
}

.contact-links {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  font-size: 0.72rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.contact-links a .strike {
  text-decoration: line-through;
}

.contact-links a:hover .strike {
  text-decoration: none;
}

/* —— Footer —— */
.site-footer {
  padding: 2rem 1.5rem 3rem;
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  font-size: 0.62rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--muted);
  border-top: 1px solid var(--line);
}

/* —— CV download —— */
.cv-banner {
  margin-top: 3rem;
  padding: 1.5rem;
  border: 1px solid var(--line);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.cv-banner__actions {
  display: flex;
  gap: 1.5rem;
  align-items: center;
}

.cv-banner__view,
.cv-banner a {
  font-size: 0.68rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  border-bottom: 1px solid currentColor;
  padding-bottom: 2px;
}

.cv-banner__view {
  background: none;
  border: none;
  border-bottom: 1px solid currentColor;
  color: inherit;
  cursor: pointer;
  padding: 0 0 2px;
}

/* —— Document viewer —— */
.viewer {
  position: fixed;
  inset: 0;
  z-index: 300;
  display: flex;
  align-items: stretch;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.4s var(--ease), visibility 0.4s;
}

.viewer.is-open {
  opacity: 1;
  visibility: visible;
}

.viewer__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(10, 10, 10, 0.92);
}

.viewer__panel {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 1rem 1rem 1.25rem;
  height: 100%;
}

.viewer__bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid rgba(244, 242, 239, 0.15);
  flex-shrink: 0;
}

.viewer__title {
  margin: 0;
  font-family: var(--serif);
  font-size: 1.35rem;
  font-weight: 300;
  color: var(--bg);
  letter-spacing: 0.02em;
}

.viewer__actions {
  display: flex;
  align-items: center;
  gap: 1.25rem;
}

.viewer__download,
.viewer__close {
  font-size: 0.65rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--bg);
}

.viewer__download {
  opacity: 0.65;
  transition: opacity 0.3s;
}

.viewer__download:hover {
  opacity: 1;
}

.viewer__close {
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
  font: inherit;
}

.viewer__content {
  flex: 1;
  min-height: 0;
  margin-top: 1rem;
  background: #1a1a1a;
  border-radius: 2px;
  overflow: hidden;
}

.viewer__iframe {
  width: 100%;
  height: 100%;
  border: none;
  display: block;
  background: #525252;
}

.viewer__image-wrap {
  width: 100%;
  height: 100%;
  overflow: auto;
  display: flex;
  justify-content: center;
  align-items: flex-start;
  padding: 1.5rem;
  -webkit-overflow-scrolling: touch;
}

.viewer__image {
  max-width: 100%;
  width: auto;
  height: auto;
  object-fit: contain;
  box-shadow: 0 12px 48px rgba(0, 0, 0, 0.45);
}

body.viewer-open {
  overflow: hidden;
}

/* —— Leo: portrait (not CV ratio) —— */
.about__portrait--photo {
  aspect-ratio: auto;
  max-height: min(72vh, 640px);
  object-fit: cover;
  width: 100%;
}

/* —— Film / video cards —— */
.films-grid {
  display: grid;
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
}

@media (min-width: 700px) {
  .films-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

.film-card {
  background: var(--bg);
  padding: 0;
  border: none;
  font: inherit;
  color: inherit;
  text-align: left;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  transition: background 0.4s var(--ease);
}

.section--dark .film-card {
  background: var(--ink);
}

.film-card:hover {
  background: var(--ink);
  color: var(--bg);
}

.section--dark .film-card:hover {
  background: #1a1a1a;
}

.film-card__media {
  aspect-ratio: 16 / 10;
  overflow: hidden;
  position: relative;
}

.film-card__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: grayscale(25%);
  transition: transform 0.7s var(--ease), filter 0.5s;
}

.film-card:hover .film-card__media img {
  transform: scale(1.03);
  filter: grayscale(0%);
}

.film-card__play {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.65rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  background: rgba(10, 10, 10, 0.2);
  transition: background 0.3s;
}

.film-card:hover .film-card__play {
  background: rgba(10, 10, 10, 0.35);
}

.film-card__body {
  padding: 1.25rem 1.35rem 1.5rem;
}

.film-card__title {
  font-family: var(--serif);
  font-size: 1.35rem;
  margin: 0 0 0.35em;
  font-weight: 400;
}

.film-card__type {
  font-size: 0.7rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
}

.section--dark .film-card__type,
.film-card:hover .film-card__type {
  color: rgba(244, 242, 239, 0.55);
}

/* —— Clients strip —— */
.clients-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 2rem 2.5rem;
  align-items: center;
  margin-top: 2.5rem;
  padding-top: 2rem;
  border-top: 1px solid rgba(244, 242, 239, 0.15);
}

.clients-strip img {
  height: 28px;
  width: auto;
  opacity: 0.7;
  filter: brightness(0) invert(1);
}

/* —— Projets —— */
.projets-grid .archive-card__media {
  aspect-ratio: 16 / 11;
}

.projets-grid .archive-card__media img {
  object-fit: cover;
}

.archive-card--external .archive-card__link::after {
  content: "↗";
}

/* —— Photo masonry (réalisations) —— */
.photo-masonry {
  columns: 2;
  column-gap: 1px;
  background: var(--line);
}

@media (min-width: 700px) {
  .photo-masonry {
    columns: 3;
  }
}

@media (min-width: 1100px) {
  .photo-masonry {
    columns: 4;
  }
}

.photo-masonry__item {
  break-inside: avoid;
  margin-bottom: 1px;
  padding: 0;
  border: none;
  background: var(--bg);
  cursor: crosshair;
  display: block;
  width: 100%;
  font: inherit;
  position: relative;
}

.photo-masonry__item.is-mosh-frame {
  overflow: visible;
  z-index: 5;
}

.photo-masonry__item img {
  width: 100%;
  height: auto;
  display: block;
  filter: grayscale(20%);
  transition: filter 0.5s var(--ease);
}

.photo-masonry__item:hover .datamosh-host:not(.is-moshing) > img {
  filter: grayscale(0%);
}

/* —— Datamosh glitch —— */
.datamosh-host {
  display: block;
  width: 100%;
  position: relative;
  line-height: 0;
  overflow: visible;
}

.datamosh-host > img {
  width: 100%;
  height: auto;
  display: block;
  transition: opacity 0.25s ease, filter 0.5s var(--ease);
}

.datamosh-host.is-moshing > img {
  opacity: 0;
}

.datamosh-canvas {
  position: absolute;
  top: 0;
  left: 0;
  display: block;
  width: 100%;
  height: 100%;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease;
  z-index: 4;
}

.datamosh-host.is-moshing .datamosh-canvas {
  opacity: 1;
  pointer-events: auto;
  cursor: crosshair;
  filter: drop-shadow(0 8px 28px rgba(0, 0, 0, 0.18));
}

.about__cv.is-mosh-frame,
.film-card__media.is-mosh-frame,
.archive-card__media.is-mosh-frame {
  overflow: visible;
  z-index: 5;
}

.film-card__media .datamosh-host,
.archive-card__media .datamosh-host {
  width: 100%;
  height: 100%;
}

.film-card__media .datamosh-host > img,
.archive-card__media .datamosh-host > img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* —— Viewer: Vimeo —— */
.viewer__video-wrap {
  width: 100%;
  height: 100%;
  background: #000;
}

.viewer__video-wrap iframe {
  width: 100%;
  height: 100%;
  border: none;
  display: block;
}

/* —— Gallery lightbox —— */
.gallery-lightbox {
  position: fixed;
  inset: 0;
  z-index: 350;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #525252;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.4s var(--ease), visibility 0.4s;
}

.gallery-lightbox.is-open {
  opacity: 1;
  visibility: visible;
}

.gallery-lightbox__stage {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  max-width: min(92vw, 1400px);
  max-height: 88vh;
  transform: scale(0.96);
  transition: transform 0.45s var(--ease);
}

.gallery-lightbox.is-open .gallery-lightbox__stage {
  transform: scale(1);
}

.gallery-lightbox__image {
  display: block;
  max-width: min(92vw, 1400px);
  max-height: calc(88vh - 2.5rem);
  width: auto;
  height: auto;
  object-fit: contain;
  box-shadow: 0 16px 56px rgba(0, 0, 0, 0.35);
}

.gallery-lightbox__caption {
  margin: 0.85rem 0 0;
  font-family: var(--serif);
  font-size: 1.1rem;
  font-weight: 300;
  color: rgba(244, 242, 239, 0.85);
  text-align: center;
  letter-spacing: 0.02em;
}

.gallery-lightbox__close {
  position: absolute;
  top: 1.1rem;
  right: 1.5rem;
  background: none;
  border: 1px solid rgba(244, 242, 239, 0.3);
  color: var(--bg);
  font: inherit;
  font-size: 0.65rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  cursor: pointer;
  padding: 0.65em 1em;
  z-index: 2;
  transition: background 0.3s, border-color 0.3s;
}

.gallery-lightbox__close:hover {
  background: rgba(244, 242, 239, 0.08);
  border-color: var(--bg);
}

.gallery-lightbox__nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 48px;
  height: 48px;
  border: 1px solid rgba(244, 242, 239, 0.25);
  border-radius: 50%;
  background: rgba(10, 10, 10, 0.25);
  color: var(--bg);
  font-size: 1.1rem;
  line-height: 1;
  cursor: pointer;
  z-index: 2;
  transition: background 0.3s, border-color 0.3s;
}

.gallery-lightbox__nav:hover {
  background: rgba(244, 242, 239, 0.1);
  border-color: var(--bg);
}

.gallery-lightbox__nav--prev {
  left: 1.5rem;
}

.gallery-lightbox__nav--next {
  right: 1.5rem;
}

.gallery-lightbox__counter {
  position: absolute;
  bottom: 1.25rem;
  left: 50%;
  transform: translateX(-50%);
  margin: 0;
  font-size: 0.65rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: rgba(244, 242, 239, 0.55);
}

body.gallery-open {
  overflow: hidden;
}

@media (max-width: 768px) {
  .gallery-lightbox__nav {
    width: 40px;
    height: 40px;
  }

  .gallery-lightbox__nav--prev {
    left: 0.75rem;
  }

  .gallery-lightbox__nav--next {
    right: 0.75rem;
  }

  .gallery-lightbox__close {
    top: 0.75rem;
    right: 0.75rem;
  }
}

/* Reduced motion */
/* —— Articles page —— */
.articles-masthead {
  padding-bottom: 3rem;
}

.articles-masthead__count {
  margin: 0;
  font-size: 0.72rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--muted);
}

.articles-feed {
  padding-top: 0;
}

.articles-feed__hint {
  max-width: 42ch;
  font-size: 0.88rem;
  opacity: 0.7;
  margin: -1rem 0 2rem;
}

.articles-grid {
  display: grid;
  gap: 1px;
  background: rgba(244, 242, 239, 0.15);
  border-top: 1px solid rgba(244, 242, 239, 0.15);
}

.article-card {
  background: var(--ink);
  color: var(--bg);
  transition: background 0.4s var(--ease);
}

.article-card__open {
  display: block;
  width: 100%;
  padding: 0;
  border: none;
  background: inherit;
  color: inherit;
  font: inherit;
  text-align: left;
  cursor: pointer;
  transition: background 0.4s var(--ease);
}

.article-card__open:hover,
.article-card__open:focus-visible {
  background: #1a1a1a;
  outline: none;
}

.article-card__preview {
  padding: 2rem 1.5rem 2.25rem;
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
  pointer-events: none;
}

.article-card--featured .article-card__preview {
  padding: 2.5rem 1.5rem 2.75rem;
}

.article-meta {
  margin: 0;
  font-size: 0.62rem;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: rgba(244, 242, 239, 0.45);
}

.article-title {
  margin: 0;
  font-family: var(--serif);
  font-weight: 300;
  line-height: 1.08;
  letter-spacing: -0.02em;
}

.article-card--featured .article-title {
  font-size: clamp(1.75rem, 4vw, 3rem);
}

.article-card:not(.article-card--featured) .article-title {
  font-size: clamp(1.35rem, 3vw, 2rem);
}

.article-card__excerpt {
  margin: 0;
  max-width: 52ch;
  font-size: 0.95rem;
  line-height: 1.6;
  color: rgba(244, 242, 239, 0.68);
}

.article-card__cta {
  margin-top: 0.5rem;
  font-size: 0.65rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  align-self: flex-start;
  border-bottom: 1px solid currentColor;
  padding-bottom: 2px;
  opacity: 0.7;
  transition: opacity 0.3s;
}

.article-card__open:hover .article-card__cta,
.article-card__open:focus-visible .article-card__cta {
  opacity: 1;
}

.nav-panel a[aria-current="page"] {
  opacity: 0.45;
}

/* Article viewer */
.article-viewer {
  position: fixed;
  inset: 0;
  z-index: 400;
  display: none;
  align-items: stretch;
  justify-content: center;
  pointer-events: none;
}

.article-viewer.is-open {
  display: flex;
  pointer-events: auto;
}

.article-viewer__backdrop {
  position: absolute;
  inset: 0;
  background: #525252;
}

.article-viewer__panel {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  width: 100%;
  max-width: 820px;
  height: 100%;
  margin: 0 auto;
  padding: 1rem 1.25rem 1.5rem;
}

.article-viewer__bar {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1.5rem;
  flex-shrink: 0;
  padding-bottom: 1.25rem;
  border-bottom: 1px solid rgba(244, 242, 239, 0.15);
}

.article-viewer__meta {
  margin: 0 0 0.65rem;
  font-size: 0.62rem;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: rgba(244, 242, 239, 0.5);
}

.article-viewer__title {
  margin: 0;
  font-family: var(--serif);
  font-size: clamp(1.45rem, 3.5vw, 2.4rem);
  font-weight: 300;
  line-height: 1.1;
  color: var(--bg);
  max-width: 28ch;
}

.article-viewer__actions {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 0.85rem;
  flex-shrink: 0;
}

.article-viewer__counter {
  font-size: 0.65rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: rgba(244, 242, 239, 0.55);
}

.article-viewer__close {
  background: none;
  border: 1px solid rgba(244, 242, 239, 0.3);
  color: var(--bg);
  font: inherit;
  font-size: 0.65rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  cursor: pointer;
  padding: 0.65em 1em;
  transition: background 0.3s, border-color 0.3s;
}

.article-viewer__close:hover {
  background: rgba(244, 242, 239, 0.08);
  border-color: var(--bg);
}

.article-viewer__scroll {
  flex: 1;
  min-height: 0;
  overflow: auto;
  margin-top: 1.5rem;
  padding-right: 0.35rem;
  -webkit-overflow-scrolling: touch;
}

.article-viewer__body {
  max-width: 62ch;
  margin: 0 auto;
  color: rgba(244, 242, 239, 0.9);
  font-size: 1.02rem;
  line-height: 1.7;
}

.article-viewer__body p {
  margin: 0 0 1.2em;
}

.article-viewer__body .lead {
  font-family: var(--serif);
  font-size: clamp(1.15rem, 2.5vw, 1.45rem);
  line-height: 1.45;
  color: var(--bg);
  margin-bottom: 1.5em;
}

.article-viewer__body strong {
  font-weight: 600;
  color: var(--bg);
}

.article-viewer__body em {
  font-style: italic;
}

.article-viewer__nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 48px;
  height: 48px;
  border: 1px solid rgba(244, 242, 239, 0.25);
  border-radius: 50%;
  background: rgba(10, 10, 10, 0.25);
  color: var(--bg);
  font-size: 1.1rem;
  line-height: 1;
  cursor: pointer;
  z-index: 2;
  transition: background 0.3s, border-color 0.3s;
}

.article-viewer__nav:hover {
  background: rgba(244, 242, 239, 0.1);
  border-color: var(--bg);
}

.article-viewer__nav--prev {
  left: 1.5rem;
}

.article-viewer__nav--next {
  right: 1.5rem;
}

body.article-viewer-open {
  overflow: hidden;
}

@media (max-width: 768px) {
  .article-viewer__bar {
    flex-direction: column;
  }

  .article-viewer__actions {
    flex-direction: row;
    align-items: center;
    width: 100%;
    justify-content: space-between;
  }

  .article-viewer__nav {
    width: 40px;
    height: 40px;
  }

  .article-viewer__nav--prev {
    left: 0.75rem;
  }

  .article-viewer__nav--next {
    right: 0.75rem;
  }
}

.site-footer a {
  transition: opacity 0.3s;
}

.site-footer a:hover {
  opacity: 0.5;
}

@media (prefers-reduced-motion: reduce) {
  .marquee__track {
    animation: none;
  }

  html {
    scroll-behavior: auto;
  }

  #holoTrail {
    display: none;
  }
}
