:root {
  --collection-shadow: 0 24px 60px rgba(34, 34, 34, 0.1);
}

.collection-page .article-nav a[aria-current="page"] {
  color: var(--accent);
}

.collection-page .article-nav a[aria-current="page"]::after {
  background: var(--accent);
  transform: scaleX(1);
}

.collection-page .article-shell {
  padding-bottom: clamp(80px, 10vw, 130px);
}

.collection-page .article-hero {
  min-height: clamp(500px, 52vw, 640px);
  border: 1px solid rgba(249, 249, 249, 0.14);
  background:
    radial-gradient(circle at 82% 34%, rgba(211, 202, 255, 0.14), transparent 34%),
    linear-gradient(130deg, #222 0 66%, #292929 100%);
  isolation: isolate;
}

.collection-page .article-hero::before {
  position: absolute;
  inset: 0;
  z-index: -1;
  background-image:
    radial-gradient(circle at 16% 20%, rgba(211, 202, 255, 0.18) 0 1px, transparent 1.5px),
    radial-gradient(circle at 78% 74%, rgba(249, 249, 249, 0.1) 0 1px, transparent 1.5px);
  background-size: 23px 23px, 33px 33px;
  opacity: 0.45;
  content: "";
}

.collection-page .article-hero::after {
  width: clamp(320px, 42vw, 600px);
}

.collection-page .article-kicker {
  width: fit-content;
  padding: 8px 12px;
  border: 1px solid rgba(211, 202, 255, 0.48);
  border-radius: 999px;
  background: rgba(211, 202, 255, 0.08);
}

.collection-page .article-hero h1 {
  max-width: 1020px;
}

.collection-page .article-meta span {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.collection-page .article-meta span::before {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--accent);
  content: "";
}

/* Project case studies */

.project-detail-page .article-hero h1::before {
  position: absolute;
  top: -1.2em;
  left: 42%;
  z-index: -1;
  color: rgba(249, 249, 249, 0.035);
  content: "PROJECT";
  font-size: 2.2em;
  font-weight: 800;
  letter-spacing: -0.08em;
  white-space: nowrap;
}

.project-detail-page .article-hero {
  display: grid;
  grid-template-rows: auto 1fr auto;
  align-content: stretch;
}

.project-hero-top {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.project-hero-top .article-kicker {
  margin-bottom: 0;
}

.project-counter {
  color: rgba(249, 249, 249, 0.52);
  font-size: 10px;
  font-weight: 750;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.project-hero-copy {
  position: relative;
  z-index: 1;
  display: flex;
  align-self: center;
  flex-direction: column;
  justify-content: center;
  padding-block: clamp(42px, 6vw, 76px);
}

.project-detail-page .project-hero-copy h1 {
  max-width: 920px;
}

.project-detail-page .project-hero-copy .article-dek {
  max-width: 760px;
}

.project-cover {
  position: relative;
  overflow: hidden;
  margin-top: clamp(34px, 5vw, 60px);
  border: 1px solid var(--ink);
  border-radius: clamp(24px, 4vw, 42px);
  background: var(--ink);
  box-shadow: var(--collection-shadow);
}

.project-cover::after {
  position: absolute;
  inset: 0;
  border: 1px solid rgba(249, 249, 249, 0.35);
  border-radius: inherit;
  content: "";
  pointer-events: none;
}

.project-cover-bar {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  min-height: 58px;
  padding: 0 clamp(18px, 2.5vw, 30px);
  border-bottom: 1px solid rgba(249, 249, 249, 0.16);
  background: var(--ink);
  color: var(--paper);
}

.project-browser-dots {
  display: inline-flex;
  gap: 7px;
}

.project-browser-dots i {
  width: 8px;
  height: 8px;
  border: 1px solid rgba(249, 249, 249, 0.42);
  border-radius: 50%;
}

.project-browser-dots i:first-child {
  border-color: var(--accent);
  background: var(--accent);
}

.project-cover-domain {
  overflow: hidden;
  max-width: 36vw;
  color: rgba(249, 249, 249, 0.68);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-overflow: ellipsis;
  text-transform: uppercase;
  white-space: nowrap;
}

.project-cover-bar a {
  display: inline-flex;
  align-items: center;
  justify-self: end;
  gap: 9px;
  color: var(--paper);
  font-size: 9px;
  font-weight: 750;
  letter-spacing: 0.12em;
  text-decoration: none;
  text-transform: uppercase;
}

.project-cover-bar a span {
  color: var(--accent);
  font-size: 15px;
  transition: transform 180ms ease;
}

.project-cover-bar a:hover span {
  transform: translate(2px, -2px);
}

.project-cover img {
  width: 100%;
  aspect-ratio: 16 / 8.5;
  object-fit: cover;
  transition: transform 900ms cubic-bezier(0.22, 1, 0.36, 1);
}

.project-cover:hover img {
  transform: scale(1.025);
}

.project-case-layout {
  display: grid;
  grid-template-columns: minmax(240px, 310px) minmax(0, 800px);
  justify-content: center;
  gap: clamp(48px, 7vw, 104px);
  margin-top: clamp(72px, 9vw, 118px);
}

.project-facts {
  position: sticky;
  top: 112px;
  display: grid;
  align-self: start;
  gap: 0;
  overflow: hidden;
  border: 1px solid var(--ink);
  border-radius: 24px;
  background: var(--ink);
  color: var(--paper);
  box-shadow: 0 20px 46px rgba(34, 34, 34, 0.12);
}

.project-facts-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 72px;
  padding: 0 24px;
  border-bottom: 1px solid rgba(249, 249, 249, 0.14);
  background: rgba(211, 202, 255, 0.08);
}

.project-facts-heading span {
  color: var(--accent);
  font-size: 10px;
  font-weight: 750;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.project-facts-heading strong {
  color: rgba(249, 249, 249, 0.14);
  font-size: 34px;
  font-weight: 650;
  letter-spacing: -0.07em;
  line-height: 1;
}

.project-fact {
  padding: 22px 24px;
  border-bottom: 1px solid rgba(249, 249, 249, 0.14);
}

.project-fact:last-child {
  border-bottom: 0;
}

.project-fact span {
  display: block;
  margin-bottom: 7px;
  color: rgba(249, 249, 249, 0.5);
  font-size: 9px;
  font-weight: 750;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.project-fact strong {
  display: block;
  font-size: 14px;
  line-height: 1.55;
}

.project-live-link {
  display: inline-flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  min-height: 52px;
  margin: 18px;
  padding: 0 18px;
  border-radius: 999px;
  background: var(--accent);
  color: var(--ink);
  font-size: 10px;
  font-weight: 750;
  letter-spacing: 0.1em;
  text-decoration: none;
  text-transform: uppercase;
  transition: background-color 200ms ease, transform 200ms ease;
}

.project-live-link:hover {
  background: var(--paper);
  transform: translateY(-2px);
}

.project-case-copy {
  min-width: 0;
  counter-reset: project-story;
}

.project-introduction-block {
  position: relative;
  margin: 0 0 clamp(54px, 7vw, 84px);
  padding-left: clamp(20px, 3vw, 34px);
}

.project-introduction-block::before {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 0;
  width: 3px;
  border-radius: 99px;
  background: var(--accent);
  content: "";
}

.project-introduction-block > span {
  display: block;
  margin-bottom: 16px;
  color: var(--muted);
  font-size: 10px;
  font-weight: 750;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.project-introduction {
  margin: 0;
  font-size: clamp(24px, 3vw, 36px);
  font-weight: 480;
  letter-spacing: -0.035em;
  line-height: 1.38;
}

.project-copy-section {
  position: relative;
  display: grid;
  grid-template-columns: minmax(150px, 210px) minmax(0, 1fr);
  gap: clamp(24px, 5vw, 58px);
  padding: clamp(34px, 5vw, 52px) 0;
  border-top: 1px solid var(--line);
  counter-increment: project-story;
  transition: padding-left 240ms ease;
}

.project-copy-section:last-child {
  border-bottom: 1px solid var(--line);
}

.project-copy-section h2 {
  position: relative;
  margin: 0;
  font-size: clamp(22px, 2.5vw, 31px);
  font-weight: 570;
  letter-spacing: -0.035em;
  line-height: 1.08;
}

.project-copy-section h2::before {
  display: block;
  margin-bottom: 14px;
  color: #8d8d8d;
  content: "0" counter(project-story);
  font-size: 9px;
  font-weight: 750;
  letter-spacing: 0.14em;
}

.project-copy-section:hover {
  padding-left: 14px;
}

.project-copy-section:hover h2::before {
  color: #7564cf;
}

.project-copy-section p {
  margin: 0;
  color: #484848;
  font-size: 16px;
  line-height: 1.8;
}

.project-next {
  position: relative;
  overflow: hidden;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: end;
  gap: 30px;
  margin-top: clamp(80px, 10vw, 130px);
  padding: clamp(34px, 5vw, 56px);
  border: 1px solid var(--ink);
  border-radius: clamp(24px, 4vw, 38px);
  background:
    radial-gradient(circle at 82% 30%, rgba(249, 249, 249, 0.52), transparent 23%),
    var(--accent);
  isolation: isolate;
}

.project-next::before {
  position: absolute;
  right: -54px;
  bottom: -112px;
  z-index: -1;
  width: 260px;
  aspect-ratio: 1;
  border: 1px solid rgba(34, 34, 34, 0.28);
  border-radius: 50%;
  box-shadow: 0 0 0 34px rgba(34, 34, 34, 0.04), 0 0 0 68px rgba(34, 34, 34, 0.025);
  content: "";
}

.project-next span {
  display: block;
  margin-bottom: 12px;
  font-size: 10px;
  font-weight: 750;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.project-next h2 {
  max-width: 760px;
  margin: 0;
  font-size: clamp(30px, 4vw, 50px);
  font-weight: 560;
  letter-spacing: -0.05em;
  line-height: 1;
}

.project-next a {
  position: relative;
  z-index: 1;
  display: inline-flex;
  align-items: center;
  gap: 12px;
  min-height: 50px;
  padding: 0 22px;
  border: 1px solid var(--ink);
  border-radius: 999px;
  font-size: 10px;
  font-weight: 750;
  letter-spacing: 0.1em;
  text-decoration: none;
  text-transform: uppercase;
  transition: background-color 200ms ease, color 200ms ease, transform 200ms ease;
}

.project-next a:hover {
  background: var(--paper);
  color: var(--ink);
  transform: translateY(-3px);
}

@keyframes project-reveal-up {
  from { opacity: 0; transform: translateY(18px); }
  to { opacity: 1; transform: translateY(0); }
}

.project-detail-page .project-hero-top,
.project-detail-page .project-hero-copy,
.project-detail-page .article-meta,
.project-detail-page .project-cover {
  animation: project-reveal-up 700ms both cubic-bezier(0.22, 1, 0.36, 1);
}

.project-detail-page .project-hero-copy { animation-delay: 80ms; }
.project-detail-page .article-meta { animation-delay: 150ms; }
.project-detail-page .project-cover { animation-delay: 220ms; }

/* Journal archive */

.blog-archive-page .article-hero h1::before {
  position: absolute;
  top: -1.05em;
  left: 48%;
  z-index: -1;
  color: rgba(249, 249, 249, 0.035);
  content: "JOURNAL";
  font-size: 2.15em;
  font-weight: 800;
  letter-spacing: -0.08em;
  white-space: nowrap;
}

.archive-section {
  margin-top: clamp(74px, 9vw, 118px);
}

.archive-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: clamp(30px, 4vw, 48px);
  padding-bottom: 20px;
  border-bottom: 1px solid var(--line);
}

.archive-toolbar p {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.archive-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.archive-filter {
  min-height: 38px;
  padding: 0 15px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: transparent;
  color: var(--ink);
  cursor: pointer;
  font: inherit;
  font-size: 10px;
  font-weight: 750;
  letter-spacing: 0.09em;
  text-transform: uppercase;
}

.archive-filter:is(:hover, :focus-visible),
.archive-filter[aria-pressed="true"] {
  border-color: var(--ink);
  background: var(--ink);
  color: var(--paper);
}

.archive-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(18px, 2.2vw, 28px);
}

.archive-card {
  display: flex;
  min-width: 0;
  flex-direction: column;
  overflow: hidden;
  border: 1px solid var(--ink);
  border-radius: clamp(20px, 2.4vw, 30px);
  background: var(--paper);
  box-shadow: 0 16px 38px rgba(34, 34, 34, 0.06);
  transition: transform 280ms cubic-bezier(0.22, 1, 0.36, 1), box-shadow 280ms ease;
}

.archive-card:hover {
  box-shadow: 0 26px 50px rgba(34, 34, 34, 0.13);
  transform: translateY(-7px);
}

.archive-card[hidden] {
  display: none;
}

.archive-card-media {
  display: block;
  overflow: hidden;
  background: var(--ink);
}

.archive-card-media img {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  transition: transform 600ms cubic-bezier(0.22, 1, 0.36, 1);
}

.archive-card:hover .archive-card-media img {
  transform: scale(1.035);
}

.archive-card-body {
  display: flex;
  flex: 1;
  flex-direction: column;
  align-items: flex-start;
  padding: clamp(24px, 3vw, 34px);
}

.archive-card-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 12px;
  margin-bottom: 22px;
  color: var(--muted);
  font-size: 9px;
  font-weight: 750;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.archive-card h2 {
  margin: 0 0 14px;
  font-size: clamp(23px, 2.3vw, 32px);
  font-weight: 570;
  letter-spacing: -0.045em;
  line-height: 1.04;
}

.archive-card h2 a {
  text-decoration: none;
}

.archive-card h2 a:hover {
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 5px;
}

.archive-card-body > p {
  margin: 0 0 28px;
  color: #555;
  font-size: 14px;
  line-height: 1.65;
}

.archive-card-link {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 42px;
  margin-top: auto;
  padding: 0 16px;
  border: 1px solid var(--line);
  border-radius: 999px;
  font-size: 9px;
  font-weight: 750;
  letter-spacing: 0.1em;
  text-decoration: none;
  text-transform: uppercase;
}

.archive-card-link:hover {
  border-color: var(--ink);
  background: var(--ink);
  color: var(--paper);
}

.archive-empty {
  display: none;
  padding: 54px;
  border: 1px dashed var(--line);
  border-radius: 24px;
  color: var(--muted);
  text-align: center;
}

.archive-empty.is-visible {
  display: block;
}

.blog-archive-link-wrap {
  display: flex;
  justify-content: center;
  margin-top: clamp(32px, 4vw, 52px);
}

.blog-archive-link {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  min-height: 50px;
  padding: 0 23px;
  border: 1px solid var(--ink);
  border-radius: 999px;
  color: var(--ink);
  font-size: 10px;
  font-weight: 750;
  letter-spacing: 0.1em;
  text-decoration: none;
  text-transform: uppercase;
  transition: background-color 200ms ease, color 200ms ease, transform 200ms ease;
}

.blog-archive-link:hover {
  background: var(--ink);
  color: var(--paper);
  transform: translateY(-3px);
}

@media (max-width: 900px) {
  .project-case-layout {
    grid-template-columns: 1fr;
  }

  .project-facts {
    position: static;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .project-facts-heading {
    grid-column: 1 / -1;
  }

  .project-live-link {
    grid-column: 1 / -1;
  }

  .archive-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 600px) {
  .collection-page .article-shell {
    padding-inline: 14px;
  }

  .collection-page .article-hero {
    min-height: auto;
    padding: 34px 24px;
    border-radius: 28px;
  }

  .collection-page .article-hero h1 {
    font-size: clamp(40px, 13vw, 58px);
  }

  .project-detail-page .article-hero h1::before,
  .blog-archive-page .article-hero h1::before {
    top: -0.5em;
    left: 4%;
    font-size: 1.7em;
  }

  .project-hero-top {
    align-items: flex-start;
    flex-direction: column;
    gap: 14px;
  }

  .project-counter {
    order: -1;
  }

  .project-hero-copy {
    padding-block: 34px 40px;
  }

  .project-cover-bar {
    grid-template-columns: 1fr auto;
    min-height: 52px;
  }

  .project-cover-domain {
    display: none;
  }

  .project-cover img {
    aspect-ratio: 4 / 3;
  }

  .project-facts {
    grid-template-columns: 1fr;
  }

  .project-live-link {
    grid-column: 1;
  }

  .project-copy-section {
    grid-template-columns: 1fr;
    gap: 14px;
  }

  .project-copy-section:hover {
    padding-left: 0;
  }

  .project-next {
    grid-template-columns: 1fr;
    align-items: start;
  }

  .project-next a {
    width: fit-content;
  }

  .archive-toolbar {
    align-items: flex-start;
    flex-direction: column;
  }

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

@media (prefers-reduced-motion: reduce) {
  .project-detail-page .project-hero-top,
  .project-detail-page .project-hero-copy,
  .project-detail-page .article-meta,
  .project-detail-page .project-cover,
  .project-cover img,
  .archive-card,
  .archive-card-media img {
    animation: none;
    transition: none;
  }
}
