/* ==========================================================================
   REAGEN NJAGI (@reagenjagi) — FLOWJAM-INSPIRED MINIMAL EDITORIAL DESIGN SYSTEM
   - Fixed Left Column (Bio, Photo, Stack, Navigation, Direct Contact)
   - Scrolling Right Stream (Minimal Accordions for Disciplines 01–04)
   - Strict 1:1 fidelity with PDF content & zero marketing filler
   - Fluid typography via clamp() (03-typography.md)
   - Zero horizontal overflow guaranteed on 375px, 768px, 1440px (13-responsive.md)
   ========================================================================== */

:root {
  /* ========================================================================
     1. COLOR SYSTEM & CONTRAST (WCAG AAA)
     ======================================================================== */
  --lime: #B0FC38;
  --lime-soft: rgba(176, 252, 56, 0.18);
  --lime-glow: rgba(176, 252, 56, 0.45);
  --lime-ink: #204000; /* 9.2:1 contrast against #FAF9F5 */
  --charcoal: #1E1E1E;
  --ink: #161616;
  --ink-muted: #4E4E4E; /* 8.2:1 contrast */
  --ink-faint: #727272; /* 4.8:1 contrast */

  /* Minimal Canvas Palette */
  --bg: #FAF9F5;
  --bg-tinted: #F3F1EB;
  --surface: #FFFFFF;
  --surface-hover: #FCFCFA;
  --line: rgba(26, 26, 26, 0.1);
  --line-strong: rgba(26, 26, 26, 0.22);

  /* Typography Families */
  --font-serif: 'Instrument Serif', Georgia, serif;
  --font-sans: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, sans-serif;

  /* Fluid Typography Scale */
  --step--1: clamp(0.75rem, 0.72rem + 0.15vw, 0.85rem);       /* Small-caps / Meta / Pills */
  --step-0:  clamp(0.95rem, 0.92rem + 0.2vw, 1.05rem);        /* Body text */
  --step-1:  clamp(1.1rem, 1.02rem + 0.35vw, 1.25rem);       /* Accordion headers */
  --step-2:  clamp(1.3rem, 1.15rem + 0.6vw, 1.6rem);         /* Subsection headers */
  --step-3:  clamp(1.6rem, 1.35rem + 1.2vw, 2.15rem);        /* Section titles */
  --step-4:  clamp(2.1rem, 1.6rem + 2vw, 3rem);              /* Brand name */

  /* 8px Rhythm Spacing */
  --space-3xs: 0.25rem;  /* 4px */
  --space-2xs: 0.5rem;   /* 8px */
  --space-xs: 0.75rem;   /* 12px */
  --space-s: 1rem;       /* 16px */
  --space-m: 1.5rem;     /* 24px */
  --space-l: 2rem;       /* 32px */
  --space-xl: 3rem;      /* 48px */
  --space-2xl: 4.5rem;   /* 72px */

  /* Easings & Shadows */
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --shadow-sm: 0 2px 10px rgba(0, 0, 0, 0.04);
  --shadow-md: 0 10px 30px -10px rgba(0, 0, 0, 0.08);
}

/* ==========================================================================
   2. RESET & ROOT OVERFLOW GUARDS
   ========================================================================== */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  min-width: 0;
}

html {
  font-size: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: 2rem;
  width: 100%;
  max-width: 100vw;
  overflow-x: clip;
}

body {
  background-color: var(--bg);
  color: var(--ink);
  font-family: var(--font-sans);
  font-size: var(--step-0);
  line-height: 1.6;
  width: 100%;
  max-width: 100vw;
  overflow-x: clip;
  position: relative;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body.lightbox-open {
  overflow: hidden;
}

img,
video {
  max-width: 100%;
  height: auto;
  display: block;
}

h1, h2, h3, h4 {
  font-family: var(--font-sans);
  font-weight: 700;
  line-height: 1.15;
  color: var(--charcoal);
  text-wrap: balance;
  overflow-wrap: break-word;
}

p {
  max-width: 65ch;
  overflow-wrap: break-word;
  text-wrap: pretty;
}

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

button {
  font-family: inherit;
  font-size: inherit;
  color: inherit;
  background: none;
  border: none;
  cursor: pointer;
  touch-action: manipulation;
}

:focus-visible {
  outline: 2px solid var(--charcoal);
  box-shadow: 0 0 0 4px var(--lime);
  outline-offset: 2px;
}

.lime-dot {
  display: inline-block;
  width: 0.5rem;
  height: 0.5rem;
  border-radius: 50%;
  background-color: var(--lime);
  box-shadow: 0 0 0 2px rgba(176, 252, 56, 0.4);
  flex-shrink: 0;
}

.font-serif {
  font-family: var(--font-serif);
}

.italic {
  font-style: italic;
}

.text-accent {
  display: inline;
  padding-inline: 0.1em;
  background: linear-gradient(180deg, transparent 65%, var(--lime) 65%);
}

/* ==========================================================================
   3. FLOWJAM-INSPIRED SPLIT LAYOUT (Desktop Fixed Left + Scroll Right)
   ========================================================================== */
.site-layout {
  display: flex;
  flex-direction: column;
  width: 100%;
  max-width: 100vw;
  min-height: 100vh;
}

@media (min-width: 64rem) {
  .site-layout {
    display: grid;
    grid-template-columns: minmax(380px, 440px) 1fr;
    min-height: 100vh;
  }
}

/* ==========================================================================
   4. LEFT SIDEBAR (Sticky on Desktop, Clean Stack on Mobile)
   ========================================================================== */
.sidebar-col {
  width: 100%;
  max-width: 100%;
  background-color: var(--bg);
  border-bottom: 1px solid var(--line);
  padding: clamp(1.75rem, 3.5vw, 3rem) clamp(1.25rem, 2.5vw, 2.25rem);
  box-sizing: border-box;
}

@media (min-width: 64rem) {
  .sidebar-col {
    position: sticky;
    top: 0;
    height: 100vh;
    overflow-y: auto;
    overflow-x: hidden;
    border-bottom: none;
    border-right: 1px solid var(--line);
    scrollbar-width: thin;
    scrollbar-color: rgba(0, 0, 0, 0.18) transparent;
    display: flex;
    flex-direction: column;
  }
  .sidebar-col::-webkit-scrollbar {
    width: 4px;
    display: block;
  }
  .sidebar-col::-webkit-scrollbar-track {
    background: transparent;
  }
  .sidebar-col::-webkit-scrollbar-thumb {
    background: rgba(0, 0, 0, 0.12);
    border-radius: 9999px;
    transition: background 0.2s ease;
  }
  .sidebar-col:hover::-webkit-scrollbar-thumb {
    background: rgba(0, 0, 0, 0.28);
  }
}

.sidebar-inner {
  display: flex;
  flex-direction: column;
  gap: clamp(1.5rem, 2.5vw, 2.25rem);
  width: 100%;
}

/* Header */
.sidebar-header {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.brand-badge-row {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: var(--step--1);
  font-weight: 600;
  letter-spacing: 0.02em;
  color: var(--ink-muted);
}

.brand-handle {
  display: inline-flex;
  align-items: center;
  text-transform: lowercase;
  color: var(--charcoal);
  font-weight: 700;
  letter-spacing: 0.01em;
  text-decoration: none;
  transition: color 0.18s ease, text-decoration-color 0.18s ease;
}

.brand-handle:hover,
.brand-handle:focus-visible {
  color: var(--lime-ink);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.meta-divider {
  display: inline-block;
  width: 1px;
  height: 0.85rem;
  background: var(--line-strong);
  margin: 0 0.1rem;
  flex-shrink: 0;
}

.brand-location {
  text-transform: none;
  letter-spacing: 0.01em;
  font-weight: 500;
  color: var(--ink-muted);
}

.brand-header-divider {
  width: 100%;
  height: 1px;
  background: var(--line);
  margin-top: 0.4rem;
  margin-bottom: 0.2rem;
}

.brand-name {
  font-size: var(--step-4);
  font-weight: 700;
  letter-spacing: -0.03em;
  color: var(--charcoal);
  margin-top: 0.2rem;
}

.brand-role {
  font-size: var(--step-0);
  font-weight: 500;
  color: var(--ink-muted);
}

/* Portrait Card */
.portrait-card {
  position: relative;
  border-radius: 1.25rem;
  overflow: hidden;
  background: #EFEFEA;
  border: 1px solid var(--line);
  box-shadow: var(--shadow-sm);
  width: 100%;
  max-width: 22rem;
  margin-bottom: clamp(0.35rem, 1vw, 0.75rem);
}

.portrait-frame {
  position: relative;
  aspect-ratio: 4 / 4.6;
  overflow: hidden;
  background: linear-gradient(180deg, #EBE9E2 0%, #D8D6CE 100%);
}

.portrait-frame picture {
  display: block;
  width: 100%;
  height: 100%;
}

.portrait-frame img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top center;
}

.portrait-status {
  position: absolute;
  bottom: 0.75rem;
  left: 0.75rem;
  right: 0.75rem;
  display: flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.45rem 0.75rem;
  background: rgba(255, 255, 255, 0.94);
  backdrop-filter: blur(8px);
  border-radius: 9999px;
  border: 1px solid rgba(0, 0, 0, 0.06);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

.pulse-beacon {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #6FCF00;
  box-shadow: 0 0 0 0 rgba(111, 207, 0, 0.7);
  animation: pulseBeacon 2s infinite cubic-bezier(0.66, 0, 1, 1);
  flex-shrink: 0;
}

@keyframes pulseBeacon {
  to { box-shadow: 0 0 0 8px rgba(111, 207, 0, 0); }
}

.status-label {
  font-size: var(--step--1);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--lime-ink);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Sidebar Bio & Quotes */
.sidebar-bio {
  display: flex;
  flex-direction: column;
  gap: clamp(1.4rem, 2.4vw, 2rem);
}

.bio-text {
  font-size: var(--step-0);
  color: var(--ink-muted);
  line-height: 1.6;
}

.bio-quote {
  font-family: var(--font-serif);
  font-size: var(--step-1);
  font-style: italic;
  line-height: 1.45;
  color: var(--charcoal);
  padding-left: 1rem;
  border-left: 2px solid var(--lime);
}

.bio-quote strong {
  font-style: normal;
  font-weight: 600;
}

/* Software Stack Pills */
.sidebar-tools {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  margin-top: clamp(1.1rem, 2vw, 1.75rem);
}

.tools-heading {
  font-size: var(--step--1);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--ink-faint);
}

.tools-pills-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.tool-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.35rem 0.7rem;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 9999px;
  font-size: var(--step--1);
  font-weight: 600;
  color: var(--charcoal);
  white-space: nowrap;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.03);
  transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

.tool-pill:hover {
  transform: translateY(-1px);
  border-color: rgba(0, 0, 0, 0.22);
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.06);
}

.tool-pill img {
  width: 1.125rem;
  height: 1.125rem;
  object-fit: contain;
  border-radius: 0.25rem;
  flex-shrink: 0;
}

.tool-pill--highlight {
  background: var(--lime-soft);
  border-color: rgba(176, 252, 56, 0.6);
  color: var(--lime-ink);
  font-weight: 700;
}

.tool-pill--highlight small {
  font-style: italic;
  font-weight: 400;
  color: var(--ink-muted);
  font-size: 0.6875rem;
}

/* Sidebar Navigation (Scrollspy Anchor List) */
.sidebar-nav {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  padding-top: var(--space-xs);
  border-top: 1px solid var(--line);
}

.nav-heading {
  font-size: var(--step--1);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--ink-faint);
}

.nav-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.nav-anchor {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  padding: 0.45rem 0.6rem;
  border-radius: 0.5rem;
  font-size: var(--step--1);
  font-weight: 600;
  color: var(--ink-muted);
  transition: all 0.2s ease;
  min-height: 2.5rem; /* Tap target */
}

.nav-num {
  font-family: var(--font-serif);
  font-style: italic;
  font-size: 1rem;
  color: var(--ink-faint);
  min-width: 1.25rem;
}

.nav-title {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.nav-anchor:hover {
  background: rgba(0, 0, 0, 0.04);
  color: var(--charcoal);
}

.nav-anchor.active {
  background: var(--surface);
  color: var(--charcoal);
  border: 1px solid var(--line);
  font-weight: 700;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.04);
}

.nav-anchor.active .nav-num {
  color: var(--lime-ink);
  font-weight: 700;
}

/* Sidebar Contact Box */
.sidebar-contact {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  padding-top: var(--space-xs);
  border-top: 1px solid var(--line);
}

.contact-kicker {
  font-size: var(--step--1);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--ink-faint);
}

.contact-links {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.contact-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.55rem 0.85rem;
  border-radius: 0.625rem;
  font-size: var(--step--1);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  min-height: 2.75rem; /* Accessible touch target */
  transition: all 0.2s ease;
}

.contact-btn--whatsapp {
  background: var(--lime);
  color: var(--charcoal);
  border: 1px solid rgba(0, 0, 0, 0.08);
}

.contact-btn--whatsapp:hover {
  background: #C3FB44;
  transform: translateY(-1px);
}

.email-row {
  display: flex;
  align-items: center;
  gap: 0.35rem;
}

.contact-btn--email {
  flex: 1;
  background: var(--surface);
  color: var(--charcoal);
  border: 1px solid var(--line);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  text-transform: lowercase;
  font-weight: 600;
  letter-spacing: 0.01em;
}

.contact-btn--email:hover {
  background: #FFFFFF;
  border-color: rgba(0, 0, 0, 0.25);
}

.copy-btn {
  width: 2.75rem;
  height: 2.75rem;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 0.625rem;
  color: var(--ink-muted);
  flex-shrink: 0;
  transition: all 0.2s ease;
}

.copy-btn:hover {
  color: var(--charcoal);
  border-color: rgba(0, 0, 0, 0.25);
  background: #FFFFFF;
}

/* Sidebar Scroll Affordance (Flowjam Minimal Laptop Cue) */
.sidebar-scroll-cue {
  display: none;
}

@media (min-width: 64rem) {
  .sidebar-scroll-cue {
    position: sticky;
    bottom: 1rem;
    left: 0;
    right: 0;
    display: flex;
    justify-content: center;
    pointer-events: none;
    z-index: 25;
    margin-top: -3.5rem;
    padding-bottom: 0.5rem;
    transition: opacity 0.35s ease, transform 0.35s ease;
  }

  .sidebar-scroll-cue-pill {
    pointer-events: auto;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.45rem 0.95rem;
    background: rgba(255, 255, 255, 0.94);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border: 1px solid rgba(0, 0, 0, 0.1);
    border-radius: 9999px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08);
    font-size: var(--step--1);
    font-weight: 600;
    color: var(--charcoal);
    letter-spacing: 0.01em;
    user-select: none;
    transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  }

  .sidebar-scroll-cue-pill .cue-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--lime);
    box-shadow: 0 0 0 2px rgba(176, 252, 56, 0.4);
    flex-shrink: 0;
  }

  .sidebar-scroll-cue-pill .cue-arrow {
    color: var(--lime-ink);
    transition: transform 0.2s ease;
    animation: cueArrowBounce 1.8s ease-in-out infinite;
  }

  @keyframes cueArrowBounce {
    0%, 100% {
      transform: translateY(0);
    }
    50% {
      transform: translateY(3px);
    }
  }

  /* When mouse hovers the sidebar, highlight the cue to invite scrolling */
  .sidebar-col:hover .sidebar-scroll-cue-pill {
    background: #FFFFFF;
    border-color: var(--lime);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.12), 0 0 0 2px var(--lime-glow);
  }

  .sidebar-scroll-cue-pill:hover,
  .sidebar-scroll-cue-pill:focus-visible {
    transform: translateY(-2px);
    border-color: var(--lime);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.14), 0 0 0 3px var(--lime-glow);
  }

  .sidebar-scroll-cue.is-scrolled-down {
    opacity: 0;
    transform: translateY(12px);
    pointer-events: none;
  }
}

/* ==========================================================================
   5. RIGHT CONTENT STREAM (Scrollable Accordions)
   Sky Blue Gradient with Subtle Atmospheric Clouds to Default Warm Tone
   ========================================================================== */
.content-col {
  position: relative;
  isolation: isolate;
  background-color: var(--bg);
  background-image: linear-gradient(
    180deg,
    #CEE8FD 0%,
    #DEEFFD 14%,
    #EBF6FD 28%,
    #F4F9FD 42%,
    var(--bg) 62%,
    var(--bg) 100%
  );
  padding: clamp(1.75rem, 3.5vw, 3.5rem) clamp(1.25rem, 3.5vw, 3.5rem);
  display: flex;
  flex-direction: column;
  gap: clamp(2.5rem, 5vw, 5rem);
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
}

/* Atmospheric Subtle Clouds Overlay (Fading seamlessly down to default) */
.content-col::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: clamp(650px, 100vh, 1250px);
  background-image: url('assets/images/sky-clouds-bg.jpg');
  background-size: cover;
  background-position: top center;
  background-repeat: no-repeat;
  mask-image: linear-gradient(
    180deg,
    rgba(0, 0, 0, 1) 0%,
    rgba(0, 0, 0, 0.95) 42%,
    rgba(0, 0, 0, 0.35) 75%,
    rgba(0, 0, 0, 0) 100%
  );
  -webkit-mask-image: linear-gradient(
    180deg,
    rgba(0, 0, 0, 1) 0%,
    rgba(0, 0, 0, 0.95) 42%,
    rgba(0, 0, 0, 0.35) 75%,
    rgba(0, 0, 0, 0) 100%
  );
  pointer-events: none;
  z-index: 0;
  opacity: 0.92;
}

.content-col > * {
  position: relative;
  z-index: 1;
}

/* Work Sections */
.work-section {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  width: 100%;
}

.section-heading {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid var(--line);
}

.section-title-wrap {
  display: flex;
  align-items: baseline;
  gap: 0.75rem;
}

.section-index {
  font-family: var(--font-serif);
  font-style: italic;
  font-size: clamp(2.25rem, 1.8rem + 1.8vw, 3.25rem);
  color: var(--lime-ink);
  font-weight: 400;
  line-height: 1;
}

.section-name {
  font-size: var(--step-3);
  letter-spacing: -0.025em;
  color: var(--charcoal);
}

.section-subtitle {
  font-size: var(--step-0);
  color: var(--ink-muted);
}

.section-pdf-note {
  font-size: var(--step--1);
  font-style: italic;
  color: var(--ink-faint);
}

/* ==========================================================================
   6. MINIMAL ACCORDION LIST COMPONENT (Chosen by User)
   Silky 60fps Grid Template Rows Animation
   ========================================================================== */
.accordion-group {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  width: 100%;
}

.accordion-item {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 1.125rem;
  overflow: hidden;
  transition: border-color 0.25s ease, box-shadow 0.25s ease;
  width: 100%;
}

.accordion-item:hover {
  border-color: rgba(26, 26, 26, 0.24);
  box-shadow: var(--shadow-sm);
}

.accordion-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  width: 100%;
  padding: 0.85rem 1.25rem 1.15rem 1.25rem;
  text-align: left;
  cursor: pointer;
  min-height: 3rem; /* Accessible touch target */
  gap: 0.75rem;
  background: var(--surface);
  transition: background 0.2s ease, padding-bottom 0.2s ease;
}

.accordion-header:hover {
  background: var(--surface-hover);
}

.accordion-item.is-open .accordion-header {
  padding-bottom: 0.65rem;
}

.header-main {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  flex: 1;
  min-width: 0;
}

.header-title-row {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.item-tag {
  font-size: var(--step--1);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--ink-faint);
  min-width: auto;
  margin-right: 0.15rem;
  flex-shrink: 0;
}

.item-title {
  font-size: var(--step-1);
  font-weight: 700;
  letter-spacing: -0.015em;
  color: var(--charcoal);
  margin: 0;
}

.item-description {
  font-size: var(--step-0);
  color: var(--ink-muted);
  line-height: 1.55;
  margin: 0;
  display: -webkit-box;
  -webkit-line-clamp: 1;
  -webkit-box-orient: vertical;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: normal;
  transition: all 0.25s ease;
}

.accordion-item.is-open .item-description {
  display: block;
  -webkit-line-clamp: unset;
  overflow: visible;
}

.toggle-indicator {
  width: 2rem;
  height: 2rem;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.05);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--charcoal);
  flex-shrink: 0;
  margin-top: 0.15rem;
  transition: background 0.2s ease, transform 0.25s var(--ease);
}

.accordion-item.is-open .toggle-indicator {
  background: var(--charcoal);
  color: #FFFFFF;
}

/* CSS Grid 0fr -> 1fr Animation */
.accordion-content {
  display: grid;
  grid-template-rows: 0fr;
  overflow: hidden;
  visibility: hidden;
  transition: grid-template-rows 0.35s var(--ease), visibility 0.35s ease;
}

.accordion-item.is-open .accordion-content {
  grid-template-rows: 1fr;
  visibility: visible;
}

.item-body {
  min-height: 0;
  overflow: hidden;
  padding: 0 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  transition: padding 0.35s var(--ease);
}

.accordion-item.is-open .item-body {
  padding: 0.25rem 1.25rem 1.5rem 1.25rem;
}

/* ==========================================================================
   7. MEDIA GALLERIES INSIDE ACCORDIONS
   ========================================================================== */
.media-gallery {
  display: grid;
  gap: 1rem;
  width: 100%;
  align-items: start; /* Prevents cards from stretching to match taller neighbors */
}

.triad-gallery {
  grid-template-columns: 1fr;
}

.duo-gallery {
  grid-template-columns: 1fr;
}

@media (min-width: 40rem) {
  .triad-gallery {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
  .duo-gallery {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

.media-card {
  position: relative;
  border-radius: 0.875rem;
  overflow: hidden;
  background: var(--surface);
  border: 1px solid var(--line);
  cursor: pointer;
  transition: transform 0.3s var(--ease), box-shadow 0.3s var(--ease);
  display: flex;
  flex-direction: column;
  width: 100%;
  align-self: start; /* Strictly hugs natural image + caption height, zero excess grey area */
}

.media-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
}

.media-card img {
  width: 100%;
  height: auto;
  display: block;
  object-fit: contain;
  background: transparent;
}

.media-card figcaption {
  padding: 0.5rem 0.75rem;
  background: var(--surface);
  font-size: var(--step--1);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--ink-muted);
  border-top: 1px solid var(--line);
}

/* ==========================================================================
   8. INTERACTIVE BEFORE/AFTER COMPARISON SLIDERS (Section 03)
   ========================================================================== */
.slider-pair-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.25rem;
  width: 100%;
}

@media (min-width: 44rem) {
  .slider-pair-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

.slider-box {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  width: 100%;
}

.ba-slider {
  position: relative;
  width: 100%;
  aspect-ratio: 4 / 4.8;
  border-radius: 0.875rem;
  overflow: hidden;
  user-select: none;
  touch-action: pan-y;
  background: #EAE8E1;
  border: 1px solid var(--line);
  box-shadow: var(--shadow-sm);
}

.ba-slider .ba-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.ba-slider .ba-before-clip {
  position: absolute;
  inset: 0;
  width: 50%;
  overflow: hidden;
  z-index: 2;
  border-right: 2px solid var(--lime);
  background: #EAE8E1;
}

.ba-slider .ba-before {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  max-width: none;
  object-fit: cover;
}

.ba-badge {
  position: absolute;
  top: 0.75rem;
  z-index: 4;
  padding: 0.25rem 0.55rem;
  font-size: 0.625rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  border-radius: 9999px;
  pointer-events: none;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
}

.ba-badge--before {
  left: 0.75rem;
  background: rgba(20, 20, 20, 0.88);
  color: #FFFFFF;
}

.ba-badge--after {
  right: 0.75rem;
  background: var(--lime);
  color: var(--charcoal);
}

.ba-range {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  cursor: ew-resize;
  z-index: 5;
  margin: 0;
}

.ba-divider {
  position: absolute;
  top: 0;
  bottom: 0;
  width: 2px;
  background: var(--lime);
  z-index: 3;
  pointer-events: none;
  transform: translateX(-50%);
}

.ba-knob {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 2.25rem;
  height: 2.25rem;
  border-radius: 50%;
  background: var(--charcoal);
  color: var(--lime);
  border: 2px solid var(--lime);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.875rem;
  font-weight: 700;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.35);
}

.slider-label {
  font-size: var(--step--1);
  font-weight: 700;
  color: var(--charcoal);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

/* ==========================================================================
   9. VIDEO REELS PLAYER (Section 04)
   ========================================================================== */
.reel-view-wrap {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5rem;
  align-items: center;
  width: 100%;
}

@media (min-width: 44rem) {
  .reel-view-wrap {
    grid-template-columns: minmax(180px, 240px) 1fr;
  }
}

.phone-frame {
  position: relative;
  width: 100%;
  max-width: 15rem;
  aspect-ratio: 9 / 16;
  border-radius: 1.5rem;
  overflow: hidden;
  background: #111111;
  border: 5px solid #222222;
  box-shadow: var(--shadow-md);
  margin-inline: auto;
}

@media (min-width: 44rem) {
  .phone-frame {
    margin-inline: 0;
  }
}

.reel-video {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.video-play-btn {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 3.25rem;
  height: 3.25rem;
  border-radius: 50%;
  background: var(--lime);
  color: var(--charcoal);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.3);
  transition: transform 0.2s var(--ease), opacity 0.2s ease;
  z-index: 4;
}

.video-play-btn .icon-pause { display: none; }

.phone-frame.is-playing .video-play-btn {
  opacity: 0;
  pointer-events: none;
}

.phone-bar {
  position: absolute;
  bottom: 0.6rem;
  left: 0.6rem;
  right: 0.6rem;
  padding: 0.3rem 0.6rem;
  background: rgba(15, 15, 15, 0.88);
  backdrop-filter: blur(8px);
  border-radius: 9999px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  z-index: 5;
}

.sound-toggle-btn {
  font-size: 0.6875rem;
  font-weight: 700;
  color: var(--lime);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  min-height: 2rem;
  display: inline-flex;
  align-items: center;
}

.video-timer {
  font-size: 0.625rem;
  color: #CCCCCC;
}

.reel-meta-col {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.reel-badge {
  font-size: var(--step--1);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--lime-ink);
}

.reel-caption-quote {
  font-size: var(--step-0);
  color: var(--ink-muted);
  line-height: 1.5;
}

.direct-view-btn {
  align-self: flex-start;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.55rem 1rem;
  background: var(--charcoal);
  color: #FFFFFF;
  border-radius: 9999px;
  font-size: var(--step--1);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  min-height: 2.75rem;
  transition: all 0.2s ease;
}

.direct-view-btn:hover {
  background: #000000;
  transform: translateY(-1px);
}

/* ==========================================================================
   10. CONTACT FOOTER BLOCK (Section 05, PDF Page 20)
   ========================================================================== */
.contact-section {
  padding-top: var(--space-m);
  width: 100%;
}

.contact-card-box {
  padding: clamp(2rem, 4vw, 3.5rem);
  background: var(--charcoal);
  color: #FFFFFF;
  border-radius: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  width: 100%;
}

.contact-pre {
  font-size: var(--step--1);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--lime);
}

.contact-hero-title {
  font-size: clamp(2.2rem, 1.6rem + 3.5vw, 4.25rem);
  font-weight: 700;
  color: #FFFFFF;
  letter-spacing: -0.03em;
}

.contact-hero-title .text-accent {
  background: linear-gradient(180deg, transparent 65%, var(--lime) 65%);
  color: #FFFFFF;
}

.contact-action-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.action-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 1.4rem;
  border-radius: 9999px;
  font-size: var(--step--1);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  min-height: 3rem;
  transition: transform 0.25s var(--ease), background 0.2s ease;
}

.action-pill--primary {
  background: var(--lime);
  color: var(--charcoal);
}

.action-pill--primary:hover {
  background: #C4F82A;
  transform: translateY(-2px);
}

.action-pill--ghost {
  background: rgba(255, 255, 255, 0.1);
  color: #FFFFFF;
  border: 1px solid rgba(255, 255, 255, 0.2);
  text-transform: lowercase;
  font-weight: 600;
  letter-spacing: 0.01em;
}

.action-pill--ghost:hover {
  background: rgba(255, 255, 255, 0.2);
  transform: translateY(-2px);
}

.contact-footer-meta {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  padding-top: 1.5rem;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  font-size: var(--step--1);
  color: #999999;
}

@media (min-width: 40rem) {
  .contact-footer-meta {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
  }
}

.back-top-link {
  color: var(--lime);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  min-height: 2.5rem;
  display: inline-flex;
  align-items: center;
}

/* ==========================================================================
   11. LIGHTBOX MODAL & TOAST
   ========================================================================== */
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 2000;
  background: rgba(15, 15, 15, 0.94);
  backdrop-filter: blur(12px);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.35s var(--ease);
  padding: 1.5rem;
}

.lightbox.open {
  opacity: 1;
  pointer-events: auto;
}

.lightbox-figure {
  max-width: 90vw;
  max-height: 85vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.75rem;
}

.lightbox-figure img {
  max-width: 100%;
  max-height: 80vh;
  object-fit: contain;
  border-radius: 0.5rem;
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.5);
}

.lightbox-caption {
  font-size: var(--step--1);
  color: #D6D6D6;
  text-align: center;
}

.lightbox-close {
  position: absolute;
  top: 1.25rem;
  right: 1.25rem;
  padding: 0.5rem 1rem;
  background: rgba(255, 255, 255, 0.15);
  color: #FFFFFF;
  border-radius: 9999px;
  font-size: var(--step--1);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  min-height: 2.75rem;
  display: inline-flex;
  align-items: center;
}

.lightbox-close:hover { background: rgba(255, 255, 255, 0.28); }

.lightbox-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 3rem;
  height: 3rem;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.15);
  color: #FFFFFF;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
}

.lightbox-nav:hover { background: rgba(255, 255, 255, 0.28); }

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

/* Toast */
.toast {
  position: fixed;
  bottom: 1.5rem;
  right: 1.5rem;
  z-index: 3000;
  padding: 0.75rem 1.25rem;
  background: var(--charcoal);
  color: var(--lime);
  border: 1px solid var(--lime);
  border-radius: 9999px;
  font-size: var(--step--1);
  font-weight: 700;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.25);
  transform: translateY(1.5rem);
  opacity: 0;
  pointer-events: none;
  transition: transform 0.3s var(--ease), opacity 0.3s ease;
  max-width: calc(100vw - 3rem);
}

.toast.show {
  transform: translateY(0);
  opacity: 1;
}

/* ==========================================================================
   12. REDUCED MOTION (Awwwards Mandatory)
   ========================================================================== */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

/* ==========================================================================
   13. MOBILE & TABLET VARIANT ADJUSTMENTS (Viewports under 64rem / 1024px)
   Keeps laptop/PC desktop layout completely intact as requested
   ========================================================================== */
@media (max-width: 63.99rem) {
  /* 1. Remove initial CTA from sidebar so visitors focus on work first */
  .sidebar-contact {
    display: none !important;
  }

  /* 2. In final bottom CTA: make email small letters */
  .action-pill--ghost {
    text-transform: lowercase;
    font-weight: 600;
    letter-spacing: 0.01em;
  }

  /* 3. In final bottom CTA: 'TOGETHER' in Times New Roman italic with #d1ff89 highlight rectangle */
  .contact-hero-title .text-accent {
    font-family: 'Times New Roman', 'Instrument Serif', Georgia, serif;
    font-style: italic;
    background: linear-gradient(180deg, transparent 60%, #d1ff89 60%);
    color: #FFFFFF;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.45);
    padding-inline: 0.15em;
  }

  /* 4. Tablet variant only: Portrait card fills the empty right section with 16:9 uncropped image */
  @media (min-width: 40rem) {
    .portrait-card {
      max-width: 100%;
      width: 100%;
    }
    .portrait-frame {
      aspect-ratio: 16 / 9;
      max-height: 440px;
    }
    .portrait-frame img {
      object-fit: cover;
      object-position: center center;
    }
  }
}
