/* ==========================================================================
   Shared building blocks for the inner pages
   (Projects, About, Blog, Post, Experiments, Library)
   ========================================================================== */

.container {
  max-width: calc(var(--max) + var(--gutter) * 2);
  margin: 0 auto;
  padding: 0 var(--gutter);
}

/* --------------------------------------------------------------------------
   Page hero
   -------------------------------------------------------------------------- */
.page-hero {
  position: relative;
  padding-top: calc(var(--header-h) + 60px);
  padding-bottom: 70px;
}
.page-hero__eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 15px;
  color: var(--blue-text);
  background: var(--blue-soft);
  padding: 8px 16px 8px 12px;
  border-radius: var(--r-pill);
  margin-bottom: 26px;
}
.page-hero__eyebrow::before {
  content: "";
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--blue);
  animation: blink 1.6s ease-in-out infinite;
}
@keyframes blink { 50% { opacity: .25; } }

.page-hero__title {
  font-size: clamp(56px, 11vw, 168px);
  font-weight: 500;
  line-height: 1.02;
  letter-spacing: var(--track-display);
  margin-left: -0.04em;
}
.page-hero__title .accent { color: var(--blue); }
.page-hero__title sup {
  font-size: .22em;
  letter-spacing: var(--track-title);
  vertical-align: top;
  position: relative;
  top: .55em;
  margin-left: .2em;
  color: var(--blue);
  font-weight: 400;
}
.page-hero__row {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 40px;
  margin-top: 36px;
  flex-wrap: wrap;
}
.page-hero__intro {
  font-size: clamp(18px, 1.6vw, 21px);
  line-height: 1.55;
  max-width: 28em;
}

/* --------------------------------------------------------------------------
   Section heading
   -------------------------------------------------------------------------- */
.section { padding-top: var(--s-10); }
.section-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 30px;
  margin-bottom: 48px;
  flex-wrap: wrap;
}
.section-head__kicker {
  font-size: 15px;
  color: var(--blue-text);
  margin-bottom: 12px;
}
.section-head__title {
  font-size: clamp(36px, 4.6vw, 60px);
  font-weight: 500;
  line-height: 1.08;
  letter-spacing: var(--track-display);
  max-width: 14em;
}
.section-head__aside { font-size: 17px; line-height: 1.55; max-width: 26em; color: rgba(0,0,0,.65); }

/* --------------------------------------------------------------------------
   Filter chips
   -------------------------------------------------------------------------- */
.chips { display: flex; flex-wrap: wrap; gap: 10px; }
.chip {
  position: relative;
  height: 40px;
  padding: 0 18px;
  border-radius: var(--r-pill);
  border: 1px solid rgba(0,0,0,.14);
  background: #fff;
  color: var(--ink);
  font: inherit;
  font-size: 15px;
  cursor: pointer;
  overflow: hidden;
  isolation: isolate;
  transition: color .4s var(--ease-out), border-color .4s;
}
.chip::before {
  content: "";
  position: absolute; inset: 0;
  background: var(--blue);
  border-radius: inherit;
  transform: scale(0);
  transition: transform .5s var(--ease-out);
  z-index: -1;
}
.chip:hover { border-color: var(--blue); }
.chip.is-active { color: #fff; border-color: var(--blue); }
.chip.is-active::before { transform: scale(1.05); }
.chip__count { font-size: 12px; opacity: .6; margin-left: 4px; }

/* --------------------------------------------------------------------------
   Marquee
   -------------------------------------------------------------------------- */
.marquee {
  overflow: hidden;
  padding: 26px 0;
  border-block: 1px solid rgba(0,0,0,.08);
  white-space: nowrap;
}
.marquee__track { display: inline-flex; will-change: transform; }
.marquee__item {
  display: inline-flex;
  align-items: center;
  gap: 40px;
  padding-right: 40px;
  font-size: clamp(30px, 4.4vw, 58px);
  font-weight: 500;
  letter-spacing: var(--track-display);
}
.marquee__item::after {
  content: "";
  width: .32em; height: .32em;
  border-radius: 50%;
  background: var(--blue);
}
.marquee__item:nth-child(even) { color: transparent; -webkit-text-stroke: 1px var(--ink); }

/* --------------------------------------------------------------------------
   Generated artwork (thumbnails for posts, experiments, concepts)
   -------------------------------------------------------------------------- */
.art { position: relative; overflow: hidden; background: var(--blue-soft); }
.art svg { display: block; width: 100%; height: 100%; }
.art .spin { transform-box: fill-box; transform-origin: center; animation: spin-slow 24s linear infinite; }
@keyframes spin-slow { to { transform: rotate(360deg); } }

/* --------------------------------------------------------------------------
   "Have a Project for me?" banner (same as case studies)
   -------------------------------------------------------------------------- */
.page-cta {
  position: relative;
  height: 423px;
  margin-top: 140px;
  overflow: hidden;
  background: #000;
  color: #fff;
  display: flex;
  align-items: center;
}
.page-cta__bg {
  position: absolute; inset: -15% 0;
  width: 100%; height: 130%;
  object-fit: cover;
  opacity: .9;
}
.page-cta__inner {
  position: relative;
  width: 100%;
  max-width: 640px;
  margin: 0 auto;
  padding: 0 var(--gutter);
}
.page-cta__title {
  font-size: clamp(44px, 5.9vw, 76px);
  font-weight: 400;
  line-height: 1.1;
  letter-spacing: var(--track-heading);
  margin-bottom: 30px;
}
.page-cta .btn svg { margin-left: 10px; }
.page-cta + .footer { margin-top: -40px; z-index: 2; }

/* Split-text line masks */
.line-mask { display: block; overflow: hidden; }

/* Generic modal shell */
.no-scroll { overflow: hidden; }

@media (max-width: 860px) {
  .page-hero { padding-top: calc(var(--header-h) + 30px); padding-bottom: 50px; }
  .section { padding-top: var(--s-9); }
  .page-cta { height: 380px; margin-top: 90px; }
}

.visually-hidden {
  position: absolute !important;
  width: 1px; height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

/* Page hero mascot: sits top-right beside the title on desktop */
.page-hero__mascot {
  position: absolute;
  top: calc(var(--header-h) + 24px);
  right: var(--gutter);
  width: clamp(150px, 15vw, 210px);
  z-index: 1;
}
.page-hero:has(.page-hero__mascot) .page-hero__title { padding-right: clamp(160px, 16vw, 230px); }
@media (max-width: 860px) {
  .page-hero__mascot { position: static; width: 116px; margin-bottom: 12px; }
  .page-hero:has(.page-hero__mascot) .page-hero__title { padding-right: 0; }
}

/* 404 page */
.nf { text-align: center; min-height: 80vh; display: flex; flex-direction: column; align-items: center; justify-content: center; }
.nf__mascot { width: clamp(150px, 15vw, 200px); margin-bottom: var(--s-5); }
.nf .page-hero__title { font-size: clamp(48px, 8vw, 120px); }
.nf__intro { margin: var(--s-5) auto 0; max-width: 30em; }
.nf__links { display: flex; flex-wrap: wrap; justify-content: center; gap: var(--s-3); margin-top: var(--s-6); }
.nf__links .btn { padding: 16px 26px; }
