/* ============================================
   CREATIVE GENERALIST PORTFOLIO
   Single-JSON Architecture | Mobile-First
   Clean, maintainable, professional
   ============================================ */

/* ============================================
   CUSTOM FONTS
   ============================================ */

@font-face {
  font-family: 'Agency FB';
  src: url('/assets/fonts/AgencyFB-RegularCondensed.otf') format('opentype');
  font-weight: normal;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'Bernina Sans';
  src: url('/assets/fonts/BerninaSans-CompressedExbold.otf') format('opentype');
  font-weight: 800;
  font-style: normal;
  font-display: swap;
}

/* ============================================
   CSS VARIABLES
   ============================================ */

:root {
  /* Colors */
  --color-bg-primary: #1f1f1f;
  --color-bg-secondary: #363635;
  --color-bg-tile: #1a1a1a;
  --color-bg-dark: #0f0f0f;
  --color-text-primary: #EBEBEB;
  --color-text-secondary: #D7CDCC;
  --color-accent: #9C528B;
  --color-accent-active: #7d4070;
  --color-border: #474545;

  /* Accent Variations */
  --color-accent-mauve: #C99CAD;
  --color-accent-blue: #8FA9B3;
  --color-accent-terracotta: #C9A68A;

  /* Tag Colors */
  --color-tag-subsection: #8FA9B3;
  --color-tag-role: #C9A68A;
  --color-tag-contextual: #C99CAD;

  /* Spacing (rem-based: 1rem = 16px) */
  --space-xs: 0.5rem;
  /* 8px */
  --space-sm: 1rem;
  /* 16px */
  --space-md: 1.5rem;
  /* 24px */
  --space-lg: 2rem;
  /* 32px */
  --space-xl: 3rem;
  /* 48px */
  --space-xxl: 4rem;
  /* 64px */

  /* Typography */
  --font-family-base: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
  --font-size-xs: 0.75rem;
  /* 12px */
  --font-size-sm: 0.875rem;
  /* 14px */
  --font-size-base: 1rem;
  /* 16px */
  --font-size-md: 1.125rem;
  /* 18px */
  --font-size-lg: 1.5rem;
  /* 24px */
  --font-size-xl: 2rem;
  /* 32px */
  --font-size-xxl: 2.5rem;
  /* 40px */
  --font-size-xxxl: 3rem;
  /* 48px */

  --font-weight-normal: 400;
  --font-weight-medium: 500;
  --font-weight-semibold: 600;
  --font-weight-bold: 700;
  --font-weight-heavy: 800;

  --line-height-tight: 1.2;
  --line-height-normal: 1.5;
  --line-height-relaxed: 1.75;

  /* Animation */
  --duration-fast: 200ms;
  --duration-normal: 300ms;
  --duration-slow: 400ms;
  --easing: cubic-bezier(0.4, 0.0, 0.2, 1);

  /* Layout */
  --max-content-width: 75rem;
  /* 1200px */
  --tile-shadow: 0 0.125rem 0.5rem rgba(0, 0, 0, 0.4), 0 0.25rem 1rem rgba(0, 0, 0, 0.3);
  --tile-shadow-hover: 0 0.25rem 0.75rem rgba(0, 0, 0, 0.5), 0 0.375rem 1.25rem rgba(0, 0, 0, 0.4);

  /* Flow block vertical rhythm (v4.2.3) */
  --flow-rhythm: var(--space-md);

  /* Subtle background tint for alternating sections (v4.2.3) */
  --color-tint: rgba(255, 255, 255, 0.03);
}

/* ============================================
   RESET & BASE
   ============================================ */

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  scroll-behavior: smooth;
  scroll-padding-top: 6rem;
}

body {
  font-family: var(--font-family-base);
  font-size: var(--font-size-base);
  font-weight: var(--font-weight-normal);
  line-height: var(--line-height-normal);
  color: var(--color-text-primary);
  background-color: var(--color-bg-primary);
  overflow-x: hidden;
}

/* Subtle background effects */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  background-repeat: repeat;
  opacity: 0.03;
  pointer-events: none;
  z-index: -1;
}

body::after {
  content: '';
  position: fixed;
  top: 0;
  left: 35%;
  transform: translateX(-50%);
  width: 60vw;
  height: 100vh;
  background: linear-gradient(to right, transparent 0%, rgba(110, 110, 110, 0.16) 50%, transparent 100%);
  pointer-events: none;
  z-index: -1;
}

/* ============================================
   TYPOGRAPHY
   ============================================ */

h1,
h2,
h3,
h4,
h5,
h6 {
  font-weight: var(--font-weight-bold);
  line-height: var(--line-height-tight);
}

h1 {
  font-size: var(--font-size-xxl);
  margin-bottom: var(--space-md);
}

h2 {
  font-size: var(--font-size-xl);
  margin-bottom: var(--space-sm);
}

h3 {
  font-size: var(--font-size-lg);
  margin-bottom: var(--space-sm);
}

h4,
h5 {
  font-size: var(--font-size-sm);
  font-weight: var(--font-weight-semibold);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: var(--space-xs);
}

p {
  margin-bottom: var(--space-md);
}

a {
  color: var(--color-accent);
  text-decoration: none;
  transition: color var(--duration-fast) var(--easing);
}

a:hover {
  color: var(--color-accent-active);
}

p a,
li a {
  text-decoration: underline;
  text-decoration-color: rgba(156, 82, 139, 0.4);
  text-underline-offset: 0.1875rem;
  text-decoration-thickness: 0.0625rem;
}

p a:hover,
li a:hover {
  text-decoration-color: var(--color-accent);
}

::selection {
  background: rgba(156, 82, 139, 0.3);
  color: var(--color-text-primary);
}

/* ============================================
   LAYOUT
   ============================================ */

.container {
  width: 100%;
  max-width: var(--max-content-width);
  margin: 0 auto;
  padding: 0 var(--space-md);
}

@media (min-width: 48rem) {
  .container {
    padding: 0 var(--space-lg);
  }
}

@media (min-width: 64rem) {
  .container {
    padding: 0 var(--space-xl);
  }
}

/* ============================================
   HEADER
   ============================================ */

/* Entry-page site nav — same hide-on-scroll + .nav-pill hamburger pattern
   as the homepage (see landing.css). Sticky top bar; the SAH monogram on
   the left is a small clickable "home" affordance, the inline nav-links
   sit on the right. Hides via .hide when the user scrolls down past 200px,
   returns on scroll-up; .nav-pill appears as a hamburger to bring it back. */
.site-nav--entry {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  width: 100%;
  background: var(--color-bg-primary);
  border-bottom: 0.0625rem solid rgba(255, 255, 255, 0.06);
  padding: var(--space-xs) 0;
  z-index: 100;
  transition: transform .3s ease;
}

.site-nav--entry.hide {
  transform: translateY(-100%);
}

.site-nav--entry .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.site-logo {
  /* Favicon-as-logo: small SVG mark, unobtrusive, just a clickable
     home affordance. */
  display: inline-flex;
  align-items: center;
  text-decoration: none;
  opacity: 0.75;
  transition: opacity var(--duration-fast) var(--easing);
}

.site-logo img {
  height: 1.75rem;
  width: auto;
  display: block;
}

.site-logo:hover {
  opacity: 1;
}

/* Entry-page nav-links — match the homepage .nav-links spacing/sizing
   so the experience reads consistently across the site. */
.site-nav--entry .nav-links {
  list-style: none;
  display: flex;
  gap: var(--space-md);
  margin: 0;
  padding: 0;
}

.site-nav--entry .nav-links a {
  font-size: 0.875rem;
  color: var(--color-text-secondary);
  text-decoration: none;
  transition: color var(--duration-fast) var(--easing);
}

.site-nav--entry .nav-links a:hover {
  color: var(--color-accent-blue);
}

/* Spacer so page content isn't hidden under the fixed nav. Applies to both
   entry pages (.entry-container) and section pages (.section-main). */
body > main.entry-container,
body > main.section-main,
body > main.collection-main {
  padding-top: 4rem;
}

/* Hamburger nav-pill — visible only when the nav is hidden via .hide.
   Mirrors the .nav-pill styles in landing.css. */
.nav-pill {
  position: fixed;
  top: 16px;
  right: 16px;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: rgba(20, 20, 20, 0.85);
  border: 1px solid rgba(255, 255, 255, 0.1);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  cursor: pointer;
  opacity: 0;
  transform: scale(0.85);
  transition: opacity .25s ease, transform .25s ease;
  z-index: 101;
  pointer-events: none;
}

.nav-pill.vis {
  opacity: 1;
  transform: scale(1);
  pointer-events: auto;
}

.nav-pill span {
  display: block;
  width: 18px;
  height: 1.5px;
  background: var(--color-text-primary);
  border-radius: 1px;
}

/* Legacy .site-header rules retained in case any older entry-page assets
   reference them — but the new structure above doesn't use site-header. */
.site-header {
  display: none;
}

/* ============================================
   FOOTER
   ============================================ */

.site-footer {
  padding: var(--space-lg) 0;
  background: var(--color-bg-primary);
  border-top: 0.0625rem solid rgba(255, 255, 255, 0.06);
  margin-top: var(--space-xxl);
  font-size: var(--font-size-xs);
  color: var(--color-text-secondary);
  text-align: center;
}

.site-footer p {
  margin-bottom: var(--space-xs);
}

@media (max-width: 47.9375rem) {
  .site-footer {
    font-size: 0.6875rem;
  }
}

/* ============================================
   UNIFIED TILE SYSTEM
   Magazine aesthetic with horizontal scroll
   ============================================ */

/* Tile Wrapper - Contains entire tile */
.tile {
  width: 100%;
  max-width: 25rem;
  margin: 0 auto var(--space-md);
  display: flex;
  flex-direction: column;
}

/* Gallery Container - Absolute positioned scroll area */
.tile-gallery {
  position: relative;
  top: 0;
  left: 0;
  display: flex;
  gap: var(--space-sm);
  overflow-x: auto;
  overflow-y: hidden;
  scroll-behavior: smooth;
  scrollbar-width: none;
  padding: var(--space-xs) 0;
}

.tile-gallery::-webkit-scrollbar {
  display: none;
}

.tile-image {
  flex-shrink: 0;
  width: 21.875rem;
  /* 350px */
  aspect-ratio: 16 / 9;
  object-fit: cover;
  border: 0.125rem solid #ffffff;
  box-shadow: var(--tile-shadow);
}

/* Text Area - 90% width for visual offset */
.tile-text-area {
  background: var(--color-bg-dark);
  box-shadow: var(--tile-shadow);
  padding: 0.75rem 0.875rem;
  color: var(--color-text-primary);
  width: 90%;
  height: 7.5rem;
  margin: 0;
  text-decoration: none;
  transition: background var(--duration-fast) var(--easing),
    box-shadow var(--duration-normal) var(--easing);
  align-self: center;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 0.5rem;
}

.tile-text-area:hover {
  background: #0a0a0a;
  box-shadow: var(--tile-shadow-hover);
}

.tile-text {
  font-size: 0.875rem;
  line-height: 1.4;
  margin: 0;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  transition: opacity var(--duration-fast) var(--easing);
}

.tile-title {
  font-family: 'Bernina Sans', 'Agency FB', sans-serif;
  font-weight: 800;
  font-size: 1.625rem;
  line-height: 1;
  letter-spacing: 0.01em;
  text-transform: uppercase;
  margin: 0;
  color: var(--color-text-primary);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* Tile tag pills */
.tile-tags {
  display: flex;
  gap: 0.375rem;
  padding: 0.375rem 0.75rem;
  overflow-x: auto;
  scrollbar-width: none;
}

.tile-tags::-webkit-scrollbar { display: none; }

.tile-tag {
  font-size: 0.625rem;
  padding: 2px 8px;
  background: rgba(201, 166, 138, 0.08);
  color: rgba(201, 166, 138, 0.6);
  border-radius: 2px;
  white-space: nowrap;
  flex-shrink: 0;
  /* v4.2.3: prevent overflow on desktop/tablet — tag pills clip with ellipsis
     when constrained by the parent track. */
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* v4.2.3: allow grid/flex parents of .tile to shrink children below content size
   so .tile-tag's max-width can take effect. */
.tile {
  min-width: 0;
}

/* Mobile: Full bleed with 90vw images */
@media (max-width: 47.9375rem) {
  .tile {
    width: 100vw;
    max-width: 100vw;
    margin-left: calc(-1 * var(--space-md));
    margin-right: calc(+1 * var(--space-md));
  }

  .tile-image {
    width: 90vw;
  }
}

/* Tablet: Single column with appropriate sizing */
@media (min-width: 48rem) and (max-width: 63.9375rem) {
  .tile {
    max-width: 48rem;
  }

  .tile-image {
    width: 18.75rem;
    /* 300px */
  }
}

/* Desktop: Standard sizing in grid */
@media (min-width: 64rem) {
  .tile-image {
    width: 21.875rem;
    /* 350px */
  }
}

/* ============================================
   HOMEPAGE TILES (Dual-Row Variant)
   Simple scroll structure - no absolute positioning
   ============================================ */

.tile-homepage {
  width: 100%;
  max-width: 50rem;
  margin: 0 auto var(--space-lg);
}

/* Gallery - scroll container holding both rows */
.tile-homepage-gallery {
  display: flex;
  flex-direction: column;
  gap: var(--space-xs);
  overflow-x: auto;
  overflow-y: hidden;
  scroll-behavior: smooth;
  scrollbar-width: none;
  padding: var(--space-xs) 0;
}

.tile-homepage-gallery::-webkit-scrollbar {
  display: none;
}

/* Each row of images */
.tile-homepage-gallery-row {
  display: flex;
  gap: var(--space-sm);
  flex-shrink: 0;
}

/* Stagger second row */
.tile-homepage-gallery-row:nth-child(2) {
  margin-left: 3rem;
}

.tile-homepage-image {
  flex-shrink: 0;
  width: 20rem;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  border: 0.125rem solid #ffffff;
  box-shadow: var(--tile-shadow);
}

/* Text area */
.tile-homepage-text {
  background: var(--color-bg-dark);
  box-shadow: var(--tile-shadow);
  padding: 0.75rem;
  max-width: 17rem;
  margin: 0 auto;
  text-decoration: none;
  color: var(--color-text-primary);
  transition: background var(--duration-fast) var(--easing),
    box-shadow var(--duration-normal) var(--easing);
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: var(--space-sm);
  position: relative;
}

/* Decorative line trio pointing to section name */
.tile-homepage-text::before {
  content: '';
  position: absolute;
  left: 0.75rem;
  width: 1.5rem;
  height: 2rem;
  background:
    linear-gradient(var(--color-accent-terracotta), #6f5139) left 0 / 1.5rem 0.25rem no-repeat,
    linear-gradient(var(--color-accent-blue), #3c525b) left 0.75rem / 1.25rem 0.25rem no-repeat,
    linear-gradient(var(--color-accent-mauve), #402a32) left 1.5rem / 1rem 0.25rem no-repeat;
}

.tile-homepage-text:hover {
  background: #0a0a0a;
  box-shadow: var(--tile-shadow-hover);
}

.tile-homepage-header {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 0.125rem;
}

.tile-homepage-section {
  font-size: 1.1rem;
  font-weight: var(--font-weight-semibold);
  text-transform: uppercase;
  line-height: 1;
  color: var(--color-text-primary);
  transition: color var(--duration-fast) var(--easing);
}

.tile-homepage-count {
  font-size: 0.8125rem;
  font-weight: var(--font-weight-normal);
  color: var(--color-text-secondary);
  line-height: 1;
}

/* Section hover colors */
.tile-homepage[data-section="Web"] .tile-homepage-text:hover .tile-homepage-section {
  color: var(--color-accent-terracotta);
}

.tile-homepage[data-section="Print"] .tile-homepage-text:hover .tile-homepage-section {
  color: var(--color-accent-blue);
}

.tile-homepage[data-section="Digital"] .tile-homepage-text:hover .tile-homepage-section {
  color: var(--color-accent-mauve);
}

.tile-homepage[data-section="Video"] .tile-homepage-text:hover .tile-homepage-section {
  color: var(--color-accent-terracotta);
}

/* Mobile */
@media (max-width: 47.9375rem) {
  .tile-homepage {
    max-width: none;
  }

  .tile-homepage-gallery {
    width: 100vw;
    margin-left: calc(-1 * var(--space-md));
  }

  .tile-homepage-gallery-row:nth-child(2) {
    margin-left: calc(3rem - var(--space-md));
  }

  .tile-homepage-image {
    width: 85vw;
  }

  .tile-homepage-section {
    font-size: 0.95rem;
  }

  .tile-homepage-count {
    font-size: 0.75rem;
  }
}

/* Tablet */
@media (min-width: 48rem) and (max-width: 63.9375rem) {
  .tile-homepage {
    max-width: 40rem;
    width: 100%;
  }

  .tile-homepage-image {
    width: 16rem;
  }
}

/* ============================================
   TILE GRIDS
   ============================================ */

/* Homepage Grid - Single column on all devices */
.grid-homepage {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-lg);
  max-width: 87.5rem;
  /* 1400px */
  margin: 0 auto;
  padding: 0;
}

@media (max-width: 47.9375rem) {
  .grid-homepage {
    padding: 0;
  }
}

/* Section Page Grid - Single column mobile, dual column desktop */
.grid-section {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-lg);
  max-width: 87.5rem;
}

@media (min-width: 64rem) {
  .grid-section {
    grid-template-columns: repeat(2, 1fr);
    gap: var(--space-xl);
  }
}

/* Related Posts Grid */
.grid-related {
  display: flex;
  flex-direction: column;
  gap: var(--space-lg);
  padding: 0;
}

@media (min-width: 48rem) {
  .grid-related {
    padding: 0 var(--space-xl);
  }

  .grid-related::-webkit-scrollbar {
    display: none;
  }

  .grid-related .tile {
    max-width: 100rem;
    margin-left: calc(-2 * var(--space-md));
  }

  .grid-related .tile-text-area {
    width: 60%;
  }
}

/* ============================================
   SECTION TOOLBAR (heading + filter)
   ============================================ */

.section-toolbar {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0;
  padding: var(--space-lg) 0 var(--space-sm);
  margin-bottom: var(--space-sm);
  border-bottom: 0.0625rem solid rgba(255, 255, 255, 0.06);
}

.section-toolbar h1 {
  font-size: 1.25rem;
  font-weight: 700;
  margin-bottom: 0.25rem;
  letter-spacing: -0.01em;
  color: var(--color-text-secondary);
}

.section-toolbar p {
  font-size: 0.8125rem;
  color: var(--color-text-secondary);
  margin-bottom: 0;
}

.section-toolbar-filter {
  width: 100%;
  margin-top: var(--space-sm);
}

/* ============================================
   PAGE HEADER (legacy — kept for compatibility)
   ============================================ */

.page-header {
  margin-bottom: var(--space-md);
}

.page-header h1 {
  font-size: 1.75rem;
  font-weight: 800;
  margin-bottom: 0.25rem;
  letter-spacing: -0.02em;
}

.page-header p {
  margin-bottom: 0;
  font-size: 0.8125rem;
  color: var(--color-text-secondary);
}

/* ============================================
   ANIMATIONS
   ============================================ */

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(1.25rem);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.fade-in-item {
  opacity: 0;
  animation: fadeInUp var(--duration-slow) var(--easing) forwards;
}

.fade-in-item:nth-child(1) {
  animation-delay: 0ms;
}

.fade-in-item:nth-child(2) {
  animation-delay: 100ms;
}

.fade-in-item:nth-child(3) {
  animation-delay: 200ms;
}

.fade-in-item:nth-child(4) {
  animation-delay: 300ms;
}

.fade-in-item:nth-child(5) {
  animation-delay: 400ms;
}

.fade-in-item:nth-child(6) {
  animation-delay: 500ms;
}

.fade-in-item:nth-child(7) {
  animation-delay: 600ms;
}

.fade-in-item:nth-child(8) {
  animation-delay: 700ms;
}

/* ============================================
   HOMEPAGE SECTIONS
   ============================================ */

.homepage-section {
  padding: var(--space-xxl) 0;
}

@media (max-width: 47.9375rem) {
  .homepage-section {
    padding: var(--space-lg) 0;
  }
}

.section-heading {
  font-size: var(--font-size-xl);
  font-weight: var(--font-weight-semibold);
  margin-bottom: var(--space-lg);
  text-align: left;
  letter-spacing: -0.01em;
}

@media (max-width: 47.9375rem) {
  .section-heading {
    font-size: var(--font-size-lg);
    margin-bottom: var(--space-md);
  }
}

/* About Section */
.about-section {
  max-width: 56.25rem;
  margin: 0 auto;
}

.about-container {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: var(--space-lg);
  text-align: left;
}

@media (min-width: 48rem) {
  .about-container {
    flex-direction: row;
    align-items: flex-start;
  }
}

.profile-pic {
  width: 9.375rem;
  height: 9.375rem;
  border-radius: 50%;
  border: 0.25rem solid var(--color-accent-mauve);
  box-shadow: 0 0.25rem 1rem rgba(201, 156, 173, 0.3),
    0 0 0 0.0625rem rgba(201, 156, 173, 0.1);
  object-fit: cover;
  flex-shrink: 0;
  transition: transform var(--duration-normal) var(--easing),
    box-shadow var(--duration-normal) var(--easing);
}

@media (max-width: 47.9375rem) {
  .profile-pic {
    width: 7.5rem;
    height: 7.5rem;
  }
}

.profile-pic:hover {
  transform: scale(1.05);
  box-shadow: 0 0.5rem 1.5rem rgba(201, 156, 173, 0.4),
    0 0 0 0.0625rem rgba(201, 156, 173, 0.2);
}

.about-content {
  max-width: 37.5rem;
  padding: var(--space-lg);
  background: linear-gradient(to right,
      rgba(255, 255, 255, 0.03) 0%,
      rgba(255, 255, 255, 0.06) 50%,
      rgba(255, 255, 255, 0.03) 100%);
  border-left: 0.1875rem solid var(--color-accent-mauve);
  border-radius: 0.25rem;
}

@media (max-width: 47.9375rem) {
  .about-content {
    padding: var(--space-md);
  }
}

.about-title {
  font-size: var(--font-size-xl);
  font-weight: var(--font-weight-semibold);
  margin-bottom: var(--space-xs);
  color: var(--color-text-primary);
  letter-spacing: -0.01em;
  line-height: 1.3;
}

@media (max-width: 47.9375rem) {
  .about-title {
    font-size: var(--font-size-lg);
  }
}

.about-subtitle {
  font-size: var(--font-size-lg);
  font-weight: var(--font-weight-normal);
  margin-bottom: var(--space-md);
  color: var(--color-text-secondary);
  letter-spacing: -0.01em;
  line-height: 1.3;
}

@media (max-width: 47.9375rem) {
  .about-subtitle {
    font-size: var(--font-size-md);
  }
}

.about-content p {
  line-height: var(--line-height-relaxed);
  color: var(--color-text-secondary);
}

/* Contact Section */
.contact-section {
  max-width: 37.5rem;
  margin: 0 auto;
}

.social-links {
  display: flex;
  gap: var(--space-lg);
  justify-content: center;
  align-items: center;
  flex-wrap: wrap;
}

.social-link {
  display: inline-flex;
  width: 3.5rem;
  height: 3.5rem;
  align-items: center;
  justify-content: center;
  color: var(--color-text-primary);
  background: rgba(156, 82, 139, 0.05);
  border-radius: 50%;
  border: 0.0625rem solid transparent;
  transition: transform var(--duration-normal) var(--easing),
    color var(--duration-fast) var(--easing),
    background var(--duration-fast) var(--easing),
    border-color var(--duration-fast) var(--easing);
  text-decoration: none;
}

@media (max-width: 47.9375rem) {
  .social-link {
    width: 3rem;
    height: 3rem;
  }
}

.social-link:hover {
  transform: translateY(-0.25rem);
  color: var(--color-accent-terracotta);
  background: rgba(201, 166, 138, 0.15);
  border-color: var(--color-accent-terracotta);
  box-shadow: 0 0.25rem 0.75rem rgba(201, 166, 138, 0.4);
}

.social-link svg {
  width: 2rem;
  height: 2rem;
}

@media (max-width: 47.9375rem) {
  .social-link svg {
    width: 1.75rem;
    height: 1.75rem;
  }
}

.social-links--footer {
  gap: var(--space-md);
  margin-bottom: var(--space-lg);
}

.social-links--footer .social-link {
  width: 2rem;
  height: 2rem;
}

.social-links--footer .social-link svg {
  width: 1.5rem;
  height: 1.5rem;
}

/* Mobile: lay the 8 footer social icons out as two tidy rows of four. */
@media (max-width: 47.9375rem) {
  .social-links--footer {
    display: grid;
    grid-template-columns: repeat(4, auto);
    justify-content: center;
    gap: var(--space-md);
  }
}

.footer-email {
  margin-bottom: var(--space-xs);
  font-size: var(--font-size-sm);
}

.footer-email a {
  color: var(--color-text-secondary);
  text-decoration: none;
  border-bottom: 0.0625rem solid transparent;
  transition: color var(--duration-fast) var(--easing),
    border-color var(--duration-fast) var(--easing);
}

.footer-email a:hover {
  color: var(--color-text-primary);
  border-bottom-color: currentColor;
}

/* ============================================
   ENTRY PAGE
   ============================================ */

.entry-container {
  max-width: 75rem;
  margin: 0 auto;
  padding: var(--space-lg);
}

@media (max-width: 47.9375rem) {
  .entry-container {
    padding: var(--space-md);
  }
}

/* Tags Layout */
.entry-tags-layout {
  margin-bottom: var(--space-lg);
}

.entry-bottom-tags {
  margin-top: var(--space-xxl);
  margin-bottom: 0;
}

.entry-tags-card {
  max-width: 100%;
  padding: var(--space-sm) var(--space-md);
  background: rgba(255, 255, 255, 0.02);
  border: 0.0625rem solid rgba(255, 255, 255, 0.06);
  border-radius: 0.375rem;
  font-size: 0.8125rem;
  line-height: var(--line-height-normal);
  transition: border-color var(--duration-fast) var(--easing),
    background var(--duration-fast) var(--easing);
  position: relative;
}

@media (max-width: 47.9375rem) {
  .entry-tags-card {
    max-width: 100%;
    width: 100%;
  }
}

.entry-tags-card:hover {
  border-color: rgba(255, 255, 255, 0.1);
  background: rgba(255, 255, 255, 0.03);
}

.entry-tag {
  display: inline-block;
  padding: 0.25rem 0.625rem;
  border-radius: 0.25rem;
  font-size: 0.75rem;
  text-decoration: none;
  transition: background var(--duration-fast) var(--easing),
    color var(--duration-fast) var(--easing);
  margin: 0.125rem;
}

.entry-tag-role {
  color: var(--color-accent-terracotta);
  background: rgba(201, 166, 138, 0.1);
  border: 0.0625rem solid rgba(201, 166, 138, 0.2);
}

.entry-tag-role:hover {
  background: rgba(201, 166, 138, 0.2);
  color: var(--color-text-primary);
}

.entry-tag-skill {
  color: var(--color-text-secondary);
  background: rgba(255, 255, 255, 0.05);
  border: 0.0625rem solid var(--color-border);
}

.entry-tag-skill:hover {
  background: rgba(255, 255, 255, 0.1);
  color: var(--color-text-primary);
}

.entry-tag-product {
  color: var(--color-accent-blue);
  background: rgba(143, 169, 179, 0.1);
  border: 0.0625rem solid rgba(143, 169, 179, 0.2);
}

.entry-tag-product:hover {
  background: rgba(143, 169, 179, 0.2);
  color: var(--color-text-primary);
}

.tag-pill-group {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem;
  margin-bottom: 0.5rem;
}

.tag-pill-group:last-child {
  margin-bottom: 0;
}

/* Entry Header */
.entry-header {
  margin-bottom: var(--space-xxl);
  padding-left: var(--space-lg);
  border-left: 0.25rem solid var(--color-accent-terracotta);
}

@media (max-width: 47.9375rem) {
  .entry-header {
    padding-left: var(--space-md);
    border-left-width: 0.1875rem;
  }
}

#entry-title {
  font-size: var(--font-size-xxxl);
  font-weight: var(--font-weight-bold);
  margin-bottom: var(--space-sm);
  letter-spacing: -0.02em;
  line-height: 1.2;
}

@media (max-width: 47.9375rem) {
  #entry-title {
    font-size: var(--font-size-xl);
  }
}

#entry-subtitle {
  font-size: var(--font-size-lg);
  font-weight: var(--font-weight-normal);
  color: var(--color-text-secondary);
  line-height: var(--line-height-relaxed);
}

@media (max-width: 47.9375rem) {
  #entry-subtitle {
    font-size: var(--font-size-md);
  }
}

/* Main Content Layout */
.entry-role-section {
  margin-bottom: var(--space-lg);
}

.entry-role-section h3 {
  font-size: var(--font-size-xl);
  font-weight: var(--font-weight-semibold);
  color: var(--color-text-primary);
}

/* Entry Content + Media: Two-column layout */
.entry-content-media {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-lg);
  margin-bottom: var(--space-xxl);
}

@media (min-width: 48rem) {
  .entry-content-media {
    /* v4.2.3: shift from 50/50 to 60/40 (main column / tag+embed column). */
    grid-template-columns: 3fr 2fr;
    gap: var(--space-xl);
  }
}

.entry-text-column {
  display: flex;
  flex-direction: column;
  gap: var(--space-lg);
}

.entry-section {
  margin-bottom: var(--space-md);
}

.section-label {
  font-size: 0.6875rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--color-accent-terracotta);
  margin-bottom: var(--space-sm);
}

.entry-section p {
  line-height: var(--line-height-relaxed);
  color: var(--color-text-secondary);
}

/* Entry hero — v4.2.3: peeking-tile gallery row, full-bleed on every viewport.
   Mirrors the .tile-gallery pattern used by section.html content tiles and the
   related-posts row at the bottom of entries, but where those only bleed at
   mobile widths, the entry hero bleeds on desktop too (per Sean's direction). */
.entry-hero {
  margin: 0 0 var(--space-lg);
  /* Escape the parent .container's horizontal padding so the row reaches
     edge-to-edge. The negative margin = the container's left padding, and
     we set width: 100vw to occupy the full viewport. */
  width: 100vw;
  position: relative;
  left: 50%;
  right: 50%;
  margin-left: -50vw;
  margin-right: -50vw;
}

.entry-hero-gallery {
  display: flex;
  gap: var(--space-sm);
  overflow-x: auto;
  overflow-y: hidden;
  scroll-behavior: smooth;
  scrollbar-width: none;
  padding: var(--space-md) var(--g, 24px);
}

.entry-hero-gallery::-webkit-scrollbar {
  display: none;
}

.entry-hero-tile {
  flex-shrink: 0;
  /* Each tile fills ~80% of the viewport so one dominates the hero with the
     next tile peeking from the right edge. Cap at 80rem (~1280px) on very
     wide displays so we don't outrun the source thumbnail resolution. */
  width: min(80vw, 80rem);
  aspect-ratio: 16 / 9;
  object-fit: cover;
  border: 0.125rem solid #ffffff;
  box-shadow: var(--tile-shadow);
  cursor: zoom-in;
  display: block;
}

@media (max-width: 47.9375rem) {
  .entry-hero-tile {
    /* On mobile, let it run a touch wider so the peeking effect is preserved
       even at the smallest viewports. */
    width: 88vw;
  }
}

/* Legacy single-image hero (still defined for any references that survive) */
.entry-hero-image {
  width: 100%;
  max-height: 28rem;
  object-fit: cover;
  box-shadow: var(--tile-shadow);
}

@media (max-width: 47.9375rem) {
  .entry-hero-image {
    width: 100vw;
    margin-left: calc(-1 * var(--space-md));
    max-height: 20rem;
  }
}

/* Compact 2-column thumbnail grid with lightbox */
.entry-thumb-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.5rem;
  align-content: start;
}

.entry-thumb {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  cursor: zoom-in;
  box-shadow: var(--tile-shadow);
  transition: transform var(--duration-fast) var(--easing);
}

.entry-thumb:hover {
  transform: scale(1.03);
}

/* Lightbox overlay */
.lightbox-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.92);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  backdrop-filter: blur(4px);
}

.lightbox-img {
  max-width: 90vw;
  max-height: 85vh;
  object-fit: contain;
}

.lightbox-close {
  position: absolute;
  top: 1rem;
  right: 1.5rem;
  background: none;
  border: none;
  color: #fff;
  font-size: 2.5rem;
  cursor: pointer;
  z-index: 1001;
  line-height: 1;
}

.lightbox-prev,
.lightbox-next {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(255, 255, 255, 0.1);
  border: none;
  color: #fff;
  font-size: 3rem;
  width: 3rem;
  height: 3rem;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1001;
}

.lightbox-prev { left: 1rem; }
.lightbox-next { right: 1rem; }

.lightbox-prev:hover,
.lightbox-next:hover {
  background: rgba(255, 255, 255, 0.2);
}

.lightbox-counter {
  position: absolute;
  bottom: 1.5rem;
  left: 50%;
  transform: translateX(-50%);
  font-size: 0.875rem;
  color: rgba(255, 255, 255, 0.6);
}

/* Project Links */
#entry-project-url,
#entry-github-repo {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-sm);
  margin: var(--space-xl) auto;
  max-width: 30rem;
}

/* Retired the dated full-width bordered box for a clean ghost button (v4.4.x),
   matching the new .project-link-btn aesthetic. */
.project-link-card,
.github-repo-card {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-xs);
  padding: var(--space-sm) var(--space-md);
  background: transparent;
  border: 0.0625rem solid var(--color-border);
  border-radius: 0.25rem;
  text-decoration: none;
  color: var(--color-text-primary);
  font-weight: 600;
  transition: transform var(--duration-fast) var(--easing),
    border-color var(--duration-fast) var(--easing);
}

.project-link-card:hover,
.github-repo-card:hover {
  transform: translateY(-0.0625rem);
  border-color: var(--color-accent-terracotta);
}

/* project_link buttons stack and align to the right edge of the content
   column (consecutive ones stack vertically with a gap) — "classy". On mobile
   the right edge reads as off-center, so center them there instead. */
.flow-project-link {
  display: flex;
  justify-content: flex-end;
  max-width: var(--flow-text-measure, 56rem);
  margin: 0.75rem auto 0;
}

@media (max-width: 47.9375rem) {
  .flow-project-link {
    justify-content: center;
  }
}

/* Inline project_link flow-block button (v4.4.x) — entry pages load
   styles.css only, so these are authored here (the homepage .btn-primary
   lives in landing.css and is unavailable on entry pages). */
.project-link-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-xs);
  min-width: 16rem;
  padding: var(--space-sm) var(--space-md);
  background: var(--color-accent-terracotta);
  color: var(--color-bg-primary);
  font-weight: 600;
  border-radius: 0.25rem;
  text-decoration: none;
  transition: transform var(--duration-fast) var(--easing),
    background var(--duration-fast) var(--easing);
}
.project-link-btn:hover {
  transform: translateY(-0.0625rem);
  background: #d8b89e;
}
.project-link-btn--ghost {
  background: transparent;
  color: var(--color-text-primary);
  border: 0.0625rem solid var(--color-border);
}
.project-link-btn--ghost:hover {
  background: transparent;
  border-color: var(--color-accent-terracotta);
}

/* Paired desktop+mobile video row (v4.4.x flow `video` block).
   Concrete default; equal-height side-by-side on desktop is render-tuned on dev. */
.flow-video {
  margin-block: var(--space-xl);
}
.flow-video-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-sm);
}
.flow-video-row video {
  height: 56vh;
  width: auto;
  max-width: 100%;
  display: block;
  border-radius: 0.25rem;
}
.flow-video-caption {
  margin-top: var(--space-xs);
  color: var(--color-text-secondary);
  font-size: var(--font-size-sm);
  text-align: center;
}

/* Safety net: any <video> inside an embed_html flow block (e.g. .portfolio-video)
   was UNSTYLED, so a lone MP4 rendered at intrinsic pixel size and overflowed —
   wrecking mobile. Constrain every embed video + lay the portfolio grid out
   responsively (v4.4.x). */
.flow-embed-html video,
.portfolio-video video {
  max-width: 100%;
  height: auto;
  display: block;
}
.portfolio-grid {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-sm);
  justify-content: center;
  max-width: var(--flow-text-measure, 56rem);
  margin: var(--space-lg) auto;
}
.portfolio-video {
  flex: 1 1 16rem;
  min-width: 0;
  max-width: 100%;
}
.portfolio-video video {
  width: 100%;
  border-radius: 0.25rem;
}
@media (max-width: 44.9375rem) {
  .flow-video-row {
    flex-direction: column;
    align-items: center;
  }
  .flow-video-row video {
    height: auto;
    width: 100%;
    max-height: 80vh;
  }
}

/* Related-posts tag pills: constrain to the 60% text column AND center them to
   match the centered .tile-text-area (the tile is a flex column), so the pills
   line up under the text instead of sitting at the far-left edge. Still
   horizontally scrollable. */
@media (min-width: 48rem) {
  .grid-related .tile-tags {
    width: 60%;
    align-self: center;
  }
}

.link-icon {
  font-size: 1.25rem;
  opacity: 0.7;
  flex-shrink: 0;
}

.link-url {
  font-size: 0.8125rem;
  color: var(--color-accent-blue);
  font-weight: var(--font-weight-medium);
  text-align: center;
}

.github-icon {
  width: 1.5rem;
  height: 1.5rem;
  flex-shrink: 0;
  opacity: 0.7;
}

.repo-name {
  font-size: 0.8125rem;
  color: var(--color-accent-blue);
  font-weight: var(--font-weight-medium);
  text-align: center;
}

/* Video Container */
.video-container {
  position: relative;
  width: 100%;
  padding-bottom: 56.25%;
  background: var(--color-bg-tile);
  box-shadow: var(--tile-shadow);
  overflow: hidden;
  margin-bottom: var(--space-md);
}

@media (max-width: 47.9375rem) {
  #entry-video .video-container {
    width: 100vw;
    margin-left: calc(-1 * var(--space-md));
  }
}

@media (min-width: 48rem) {
  #entry-video .video-container {
    max-width: 50rem;
    margin-left: auto;
    margin-right: auto;
  }
}

.video-container iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: none;
}

/* (Page Imagery Slideshow removed in v5.1 — replaced by multi-slideshow component) */

/* Bottom Layout */
.entry-bottom-layout {
  margin: var(--space-xxl) 0;
}

.entry-divider {
  border: none;
  border-top: 0.0625rem solid var(--color-border);
  margin-bottom: var(--space-lg);
}

.entry-bottom-row {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: var(--space-md);
  flex-wrap: wrap;
}

@media (max-width: 47.9375rem) {
  .entry-bottom-row {
    flex-direction: column;
  }
}

/* Related Posts */
.related-posts-section {
  margin: var(--space-xxl) 0;
  padding-top: var(--space-xxl);
  border-top: 0.0625rem solid var(--color-border);
}

.related-posts-section .section-heading {
  margin-bottom: var(--space-xl);
  font-size: var(--font-size-lg);
  font-weight: var(--font-weight-semibold);
  letter-spacing: -0.01em;
}

@media (max-width: 47.9375rem) {
  .related-posts-section .section-heading {
    font-size: var(--font-size-md);
  }
}

/* ============================================
   UTILITIES
   ============================================ */

.sr-only {
  position: absolute;
  width: 0.0625rem;
  height: 0.0625rem;
  padding: 0;
  margin: -0.0625rem;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border-width: 0;
}

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

.text-center {
  text-align: center;
}

.text-secondary {
  color: var(--color-text-secondary);
}

.mt-lg {
  margin-top: var(--space-lg);
}

.mb-lg {
  margin-bottom: var(--space-lg);
}

.loading {
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 50vh;
  font-size: var(--font-size-lg);
  color: var(--color-text-secondary);
}

/* ============================================
   ACCESSIBILITY & PERFORMANCE
   ============================================ */

*:focus-visible {
  outline: 0.125rem solid var(--color-accent);
  outline-offset: 0.1875rem;
  border-radius: 0.125rem;
}

* {
  -webkit-tap-highlight-color: transparent;
}

/* ============================================
   v4.2.3 ENTRY COMPONENTS
   Sticky tag+embed column, main_media, bleed,
   bleed_slides, flow blocks, chunk_break,
   collection_preview, iframe responsiveness.
   ============================================ */

/* Sticky tag + embed column (replaces the old .entry-thumb-grid slot).
   Holds tag pills + an optional media_embed iframe. Desktop: sticky inside
   the 60/40 .entry-content-media grid. Mobile (<900px): un-stick and stack
   below the main column at full width. */
.entry-tag-column {
  display: flex;
  flex-direction: column;
  gap: var(--space-md);
  align-self: start;
}

@media (min-width: 56.25rem) {
  .entry-tag-column {
    position: sticky;
    top: var(--space-md);
  }
}

@media (max-width: 56.1875rem) {
  .entry-tag-column {
    position: static;
    width: 100%;
  }
}

/* Main media: centered block with vertical rhythm between groups.
   A "group" can contain one image or a side-by-side row of images. */
.entry-main-media {
  display: flex;
  flex-direction: column;
  gap: var(--space-xl);
  max-width: 50rem;
  margin: var(--space-xl) auto;
}

.entry-main-media__group {
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
}

.entry-main-media__row {
  display: flex;
  flex-direction: row;
  gap: var(--space-sm);
  align-items: flex-start;
}

.entry-main-media__row > * {
  flex: 1;
  min-width: 0;
}

.entry-main-media img,
.entry-main-media video {
  max-width: 100%;
  height: auto;
  display: block;
  box-shadow: var(--tile-shadow);
}

@media (max-width: 44.9375rem) {
  .entry-main-media__row {
    flex-direction: column;
  }
}

/* Bleed art-wall — one continuous accent-matted panel per gallery collection.
   Mirrors the homepage .art-bleed component (landing.css): rows of images
   justified by aspect ratio (flex-grow set in JS) for one shared row height,
   6px accent matting in every gap, full-viewport-width bleed. Keep in sync
   with .art-bleed* in landing.css. */
.entry-bleed {
  width: 100vw;
  margin-left: calc(50% - 50vw);
  margin-right: calc(50% - 50vw);
  margin-block: var(--space-xl);
  display: flex;
  flex-direction: column;
  gap: 6px;
  background: var(--color-accent-terracotta);
  padding: 6px 0;
}

.entry-bleed__row {
  display: flex;
  gap: 6px;
}

.entry-bleed__link {
  display: block;
  flex: 0 1 0;        /* flex-grow set per-image in JS to its aspect ratio */
  min-width: 0;
  line-height: 0;
}

.entry-bleed__image {
  width: 100%;
  height: auto;
  display: block;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.4);
  transition: transform 0.35s ease;
}

.entry-bleed__link:hover .entry-bleed__image {
  transform: translateY(-2px);
}

/* Flow layout — tag pills as a floated inset at the top-right of the single
   reading column; copy wraps around them like a magazine pull-aside. Not
   sticky (flow has no second column to anchor to). On mobile the inset spans
   the full width above the copy. */
.entry-flow-tags {
  float: right;
  width: min(20rem, 42%);
  margin: 0.25rem 0 var(--space-md) var(--space-lg);
}

@media (max-width: 47.9375rem) {
  .entry-flow-tags {
    float: none;
    width: 100%;
    margin: 0 0 var(--space-md);
  }
}

/* Flow region — narrow reading measure for text content per Sean's
   direction ("text/bullet point sections on the flow layout should be way
   narrower than full width... 900px"). Images, embeds, and the chunk-break
   button can stay wider; only the text blocks are constrained. */
#flow-region {
  --flow-text-measure: 56rem;
}

.flow-h3,
.flow-h4,
.flow-h5,
.flow-p,
.flow-list,
.flow-img,
.flow-embed-html,
.flow-collection-preview,
.flow-chunk-break {
  margin-block: var(--flow-rhythm);
}

/* Text blocks: cap width and center, so paragraphs/lists/headings read in a
   comfortable measure rather than spanning the full container. */
.flow-h3,
.flow-h4,
.flow-h5,
.flow-p,
.flow-list {
  max-width: var(--flow-text-measure);
  margin-inline: auto;
}

/* Flow heading hierarchy — three distinct visual levels (not just size deltas).
   - h3: chapter-tier top section (e.g. "Social Strategy & Production"). Large,
     bold, normal case. Reads as the dominant heading in its zone.
   - h4: sub-section (e.g. "Our First Viral Moments"). Medium, semibold,
     normal case. Reads as a clear subhead.
   - h5: leaf-level title (e.g. "Witty Superbowl Tweet Goes Viral"). Smaller,
     italic-serif accent (Instrument Serif) to feel like a chapter title in a
     novel rather than a UI label — echoes the homepage spine treatment.
*/
/* Heading hierarchy — three distinct tiers with widened gaps so each level
   reads as a different rank, not just a different size:
   - h3: chapter-tier (40px desktop), heavy bold sans, normal case
   - h4: section-tier (26px), semibold sans
   - h5: leaf-tier (20px), italic serif terracotta — different family + style
     so even at small size it stays distinct from the sans h4 above. */
.flow-h3 {
  font-size: clamp(1.875rem, 3.2vw, 2.5rem);
  font-weight: 800;
  line-height: 1.15;
  letter-spacing: -0.015em;
  text-transform: none;        /* override the global h3..h6 uppercase rule */
  color: var(--color-text-primary);
}

.flow-h4 {
  font-size: clamp(1.25rem, 2vw, 1.625rem);
  font-weight: 700;
  line-height: 1.25;
  letter-spacing: -0.005em;
  text-transform: none;        /* override the global h4/h5 uppercase rule */
  color: var(--color-text-primary);
}

.flow-h5 {
  font-family: 'Instrument Serif', Georgia, serif;
  font-style: italic;
  font-size: clamp(1.125rem, 1.6vw, 1.375rem);
  font-weight: 400;
  line-height: 1.3;
  letter-spacing: 0;
  text-transform: none;
  color: var(--color-accent-terracotta);
}

.flow-p {
  font-size: 0.9375rem;
  line-height: 1.65;
  color: var(--color-text-secondary);
}

/* Bullet lists — narrower than the text measure AND indented from the left
   so they sit visibly inset from headings and paragraphs. Smaller font than
   body text per Sean ("bullet font size feels too big"). Supports nested
   structure: top-level items are "topic" headers (bolder), nested items
   are the actual reading bullets (smaller, indented further). */
.flow-list {
  list-style: none;
  padding-left: 0;
  margin-inline: auto;
}

/* Top-level list (depth 0): topic-tier — slightly bolder. Narrower outer
   container so the whole tree sits inset from headings. */
.flow-list--depth-0 {
  max-width: 44rem !important;
  padding-inline-start: 2.5rem
}

.flow-list--depth-0 > li {
  position: relative;
  padding-left: 1rem;
  margin-bottom: 0.5rem;
  font-size: 0.9375rem;
  font-weight: 600;
  line-height: 1.5;
  color: var(--color-text-primary);
}

.flow-list--depth-0 > li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0.55em;
  width: 0.4375rem;
  height: 0.4375rem;
  border-radius: 50%;
  background: var(--color-accent-terracotta);
  opacity: 1;
}

/* Sub-list (depth 1): actual reading bullets, smaller + lighter weight,
   indented further from the topic. Marker is a small filled dot. */
.flow-list--depth-1 {
  list-style: none;
  padding-left: 0;
  padding-inline-start: 0.5rem;
  margin: 0.375rem 0 0.5rem;
  font-weight: 400;
}

.flow-list--depth-1 > li {
  position: relative;
  padding-left: 1rem;
  margin-bottom: 0.25rem;
  font-size: 0.875rem;
  font-weight: 400;
  line-height: 1.55;
  color: var(--color-text-secondary);
}

.flow-list--depth-1 > li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0.6em;
  width: 0.3125rem;
  height: 0.3125rem;
  border-radius: 50%;
  background: var(--color-text-secondary);
  opacity: 0.6;
}

/* Bluepoints variant — terracotta-tone topic bullets, blue sub-bullets. */
.flow-list.style-bluepoints.flow-list--depth-1 > li::before {
  background: var(--color-accent-blue);
  opacity: 1;
}

/* Bluepoints variant — small filled circle, brand-accent blue. */
.flow-list.style-bluepoints li::before {
  background: var(--color-accent-blue);
  opacity: 1;
}

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

/* Single-image flow rows: constrain to ~60% width centered so they read
   roughly the size a single image would in a 2-up row. Multi-image rows
   keep the full-width row layout. */
.flow-img__row {
  display: flex;
  gap: var(--space-md);
  align-items: flex-start;
}

.flow-img__row > img:only-child {
  margin-inline: auto;
  max-width: 60%
}

@media (max-width: 47.9375rem) {
  .flow-img__row > img:only-child {
    max-width: 100%
  }
}

/* Flow embed_html — center tweets (and similar embeds) so the rendered
   Twitter iframe sits in the middle of the column. The .twitter-tweet
   element widgets.js builds is a block element, so margin-inline: auto
   on the parent + max-width caps the width and centers it. */
.flow-embed-html {
  display: flex;
  flex-direction: column;
  align-items: center;
  max-width: var(--flow-text-measure, 56rem);
  margin-inline: auto;
}

.flow-embed-html iframe,
.flow-embed-html .twitter-tweet,
.flow-embed-html .twitter-tweet-rendered {
  margin-inline: auto !important;
}

.flow-img__row {
  display: flex;
  flex-direction: row;
  gap: var(--space-sm);
  align-items: flex-start;
}

/* Desktop multi-image rows: each child shares equal width (flex: 1), but
   the image's intrinsic aspect-ratio is preserved by height: auto. */
.flow-img__row > * {
  flex: 1;
  min-width: 0;
}

.flow-img__row > img {
  max-width: 100%;
  height: auto;
  display: block;
}

/* Mobile (<720px): stack vertically and DROP flex sizing on children so
   the image keeps its intrinsic aspect ratio at 100% column width.
   With `flex: 1` in column mode, basis 0 + grow 1 collapsed image height. */
@media (max-width: 44.9375rem) {
  .flow-img__row {
    flex-direction: column;
  }
  .flow-img__row > * {
    flex: 0 0 auto;
    width: 100%;
    max-width: 100%;
  }
  .flow-img__row > img {
    width: 100%;
    height: auto;
  }
}

.flow-embed-html {
  width: 100%;
}

/* chunk_break: a CTA-styled button; subsequent siblings fade in on click. */
.flow-chunk-break {
  display: flex;
  justify-content: center;
}

.flow-chunk-break button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.875rem 1.75rem;
  font-size: var(--font-size-sm);
  font-weight: var(--font-weight-semibold);
  font-family: inherit;
  letter-spacing: 0.02em;
  color: var(--color-text-primary);
  background: var(--color-bg-tile);
  border: 0.0625rem solid var(--color-border);
  border-radius: 0.25rem;
  cursor: pointer;
  transition: background var(--duration-fast) var(--easing),
    border-color var(--duration-fast) var(--easing),
    transform var(--duration-fast) var(--easing);
}

.flow-chunk-break button:hover {
  background: var(--color-bg-secondary);
  border-color: var(--color-accent);
}

.flow-chunk-break button:active {
  transform: scale(0.98);
}

.flow-chunk-hidden {
  opacity: 0;
  transform: translateY(0.5rem);
  pointer-events: none;
}

.flow-chunk-revealed {
  opacity: 1;
  transform: none;
  pointer-events: auto;
  transition: opacity 200ms ease-out, transform 200ms ease-out;
}

/* collection_preview: horizontal scroll strip of resolved item thumbs. */
.flow-collection-preview {
  display: flex;
  flex-direction: row;
  gap: var(--space-sm);
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  padding-bottom: var(--space-xs);
}

.flow-collection-preview::-webkit-scrollbar {
  display: none;
}

.flow-collection-preview__item {
  flex-shrink: 0;
  width: 12.5rem; /* 200px desktop */
  scroll-snap-align: start;
}

.flow-collection-preview__item img {
  width: 100%;
  height: auto;
  display: block;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  box-shadow: var(--tile-shadow);
}

.flow-collection-preview__link {
  display: inline-block;
  margin-top: var(--space-sm);
  font-size: var(--font-size-sm);
  color: var(--color-accent-blue);
  font-weight: var(--font-weight-medium);
}

@media (max-width: 44.9375rem) {
  .flow-collection-preview__item {
    width: 9.375rem; /* 150px mobile */
  }
}

/* Responsive iframe rule for embedded media (Behance, YouTube, etc.).
   Modern aspect-ratio replaces padding-bottom hacks; the legacy
   .video-container padding-bottom: 56.25% remains in place as a fallback. */
.entry-tag-column iframe,
.flow-embed-html iframe,
.video-container iframe {
  aspect-ratio: 16 / 9;
  width: 100%;
  height: auto;
  display: block;
  border: none;
}

/* For .video-container the iframe is still absolutely positioned over the
   padding-bottom box — restore those properties so the modern rule above
   doesn't strand the iframe inside its own intrinsic box. */
.video-container iframe {
  position: absolute;
  inset: 0;
  height: 100%;
}

/* ============================================
   COLLECTION + MEDIA PAGE COMPONENTS (v4.2.3)
   ============================================ */

/* Breadcrumb back to the parent entry (its gallery) — top + bottom of the
   collection page. */
.collection-breadcrumb {
  margin: var(--space-md) 0;
}
.collection-breadcrumb--bottom {
  margin-top: var(--space-xl);
}
.collection-breadcrumb__link {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--color-text-secondary);
  text-decoration: none;
  transition: color var(--duration-fast) var(--easing);
}
.collection-breadcrumb__link:hover {
  color: var(--color-accent-terracotta);
}

/* Collection page — natural-aspect "gallery wall" (masonry columns), so art
   shows at its real proportions like framed pieces, not square crops (v4.4.x). */
.collection-masonry {
  column-count: 3;
  column-gap: 0.75rem;
  max-width: 75rem;
  margin: var(--space-xl) auto;
  padding: 0 var(--space-md);
}
@media (max-width: 63.9375rem) {
  .collection-masonry { column-count: 2; }
}
.collection-image-tile {
  width: 100%;
  height: auto;
  display: block;
  margin-bottom: 0.75rem;
  break-inside: avoid;
  border-radius: 2px;
  box-shadow: var(--tile-shadow);
  cursor: pointer;
  transition: transform .25s ease;
}
.collection-image-tile:hover {
  transform: translateY(-2px);
}

.collection-subtitle {
  margin-top: var(--space-xs);
  color: var(--color-text-secondary, #666);
  font-size: 1.05rem;
}

.collection-filter-chips {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-xs);
  margin-block: var(--space-md);
}

.collection-filter-chip {
  display: inline-flex;
  align-items: center;
  padding: 0.35rem 0.85rem;
  border: 1px solid currentColor;
  border-radius: 999px;
  background: transparent;
  color: inherit;
  font-size: 0.875rem;
  cursor: pointer;
  transition: background-color 0.15s ease, color 0.15s ease;
}

.collection-filter-chip:hover {
  background: currentColor;
  color: var(--color-bg, #fff);
}

.collection-filter-chip.is-active {
  background: currentColor;
  color: var(--color-bg, #fff);
}

.collection-filter-clear {
  margin-left: var(--space-xs);
  padding: 0.35rem 0.85rem;
  border: none;
  background: transparent;
  color: inherit;
  font-size: 0.875rem;
  text-decoration: underline;
  cursor: pointer;
}

.collection-empty {
  padding: var(--space-lg) 0;
  text-align: center;
  color: var(--color-text-secondary, #666);
}

/* Related-items horizontal scroll strip (media.html) */
#item-related-strip {
  display: flex;
  gap: var(--space-sm);
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  padding-bottom: var(--space-xs);
}

.tile-item--related {
  flex: 0 0 200px;
  scroll-snap-align: start;
}

@media (max-width: 720px) {
  .tile-item--related {
    flex: 0 0 150px;
  }
}

@media (prefers-reduced-motion: reduce) {

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