/*
Tooplate 2160 Exhibit Studio
https://www.tooplate.com/view/2160-exhibit-studio
Free HTML CSS Template
*/

/* ═══════════════════════════════════════════════════════════════
       DESIGN TOKENS — Edit these to restyle the entire template
       ═══════════════════════════════════════════════════════════════ */
    :root {

      /* ── Palette ─────────────────────────────────────────────── */
      --color-page-background:    #1a121c;   /* Very dark warm purple          */
      --color-surface:            #261824;   /* Raised panels, text on cream   */
      --color-text-primary:       #f4eadc;   /* Cream text                      */
      --color-text-secondary:     #c9a3ad;   /* Dusty pink details              */
      --color-text-tertiary:      #8d6d76;   /* Fainter pink rules              */
      --color-accent:             #c9a3ad;   /* Dusty pink accents              */
      --color-border-subtle:      rgba(201, 163, 173, 0.35);

      /* ── Emotion accents — details, titles and light, not fills ─ */
      --color-joy:                #e2c07a;   /* Warm golden yellow             */
      --color-sadness:            #9bb4cc;   /* Soft blue                       */
      --color-love:               #d4a3ad;   /* Dusty pink                      */
      --color-nostalgia:          #c4a484;   /* Warm brown                      */
      --color-anxiety:            #c16a6a;   /* Dark red                        */
      --color-peace:              #aebda8;   /* Soft sage green                 */

      /* ── Caption Overlay ─────────────────────────────────────── */
      --color-caption-background: rgba(26, 18, 28, 0.82);
      --color-caption-text:       #f4eadc;
      --color-caption-meta:       #c9a3ad;

      /* ── Lightbox (Lightroom Mode) ───────────────────────────── */
      --color-lightbox-backdrop:  rgba(12, 8, 14, 0.96);
      --color-lightbox-ui:        #f4eadc;
      --color-lightbox-ui-hover:  #fff8ee;
      --color-lightbox-meta:      #c9a3ad;

      /* ── Typography ──────────────────────────────────────────── */
      --font-serif:               'Cormorant Garamond', Georgia, 'Times New Roman', serif;
      --font-family:              'Source Sans 3', -apple-system, BlinkMacSystemFont, sans-serif;
      --font-size-wordmark:       0.8125rem;  /* NAV logo text             */
      --font-size-label:          0.8125rem;  /* Tags, meta, small labels  */
      --font-size-caption-title:  0.8125rem;  /* Overlay photo title       */
      --font-size-caption-meta:   0.8125rem;  /* Overlay photographer meta */
      --font-size-hero-title:     clamp(2.25rem, 6vw, 5rem);
      --font-size-hero-sub:       clamp(0.75rem, 1.5vw, 0.875rem);
      --font-size-footer:         0.8125rem;
      --letter-spacing-wide:      0.12em;
      --letter-spacing-wider:     0.18em;

      /* ── Page Spacing ────────────────────────────────────────── */
      --space-page-x:             clamp(1.5rem, 5vw, 6rem);  /* Left/right margin  */
      --space-page-top:           2rem;
      --space-nav-height:         4.5rem;
      --space-hero-top:           clamp(3rem, 6vw, 6rem);
      --space-hero-bottom:        clamp(2.5rem, 5vw, 5rem);
      --space-section-gap:        clamp(1rem, 2vw, 1.5rem);
      --space-footer-top:         clamp(3rem, 5vw, 5rem);

      /* ── Masonry Grid ────────────────────────────────────────── */
      --grid-column-gap:          clamp(0.625rem, 1.25vw, 1.125rem); /* Gap between columns */
      --grid-item-margin-bottom:  clamp(0.625rem, 1.25vw, 1.125rem); /* Gap between rows    */
      --grid-columns-wide:        4;   /* ≥1400px */
      --grid-columns-desktop:     3;   /* ≥900px  */
      --grid-columns-tablet:      2;   /* ≥560px  */
      --grid-columns-mobile:      1;   /* <560px  */
      --grid-border-radius:       2px;

      /* ── Transitions ─────────────────────────────────────────── */
      --transition-caption:       transform 0.38s cubic-bezier(0.4, 0, 0.2, 1),
                                  opacity  0.38s cubic-bezier(0.4, 0, 0.2, 1);
      --transition-image-scale:   transform 0.55s cubic-bezier(0.25, 0.46, 0.45, 0.94);
      --transition-lightbox:      opacity 0.5s ease;
      --transition-lightbox-img:  opacity 0.5s ease;

    }

    /* ═══════════════════════════════════════════════════════════════
       RESET & BASE
       ═══════════════════════════════════════════════════════════════ */
    *, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

    html {
      font-family:          var(--font-family);
      font-size:            16px;
      background-color:     var(--color-page-background);
      color:                var(--color-text-primary);
      color-scheme:         dark;
      -webkit-font-smoothing: antialiased;
      text-rendering:       optimizeLegibility;
      scroll-behavior:      smooth;
    }

    h1, h2, h3 {
      font-family: var(--font-serif);
      font-weight: 500;
      line-height:  1.15;
    }

    body { min-height: 100vh; }

    /* The room glow reaches past the intro; clip it so the page cannot scroll sideways. */
    html:has(body.room),
    body.room { overflow-x: clip; }

    img { display: block; width: 100%; height: auto; }

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

    /* A quiet cream ring, visible only while using the keyboard. */
    :focus-visible {
      outline:        2px solid var(--color-text-primary);
      outline-offset: 3px;
    }

    /* ═══════════════════════════════════════════════════════════════
       NAVIGATION
       ═══════════════════════════════════════════════════════════════ */
    .site-nav {
      position:         sticky;
      top:              0;
      z-index:          200;
      background-color: var(--color-page-background);
      border-bottom:    1px solid var(--color-border-subtle);
    }

    /* ── Top bar (wordmark + hamburger / desktop links) ────────── */
    .nav__bar {
      display:          flex;
      align-items:      center;
      justify-content:  space-between;
      height:           var(--space-nav-height);
      padding:          0 var(--space-page-x);
    }

    .nav__wordmark {
      display:         flex;
      align-items:     center;
      align-self:      stretch;
      flex-shrink:     0;
      font-family:     var(--font-serif);
      font-size:       1.375rem;
      font-weight:     500;
      line-height:     1;
      letter-spacing:  0.18em;
      text-transform:  uppercase;
      white-space:     nowrap;
      color:           var(--color-text-primary);
    }

    .nav__wordmark span {
      font-weight:    300;
      color:          var(--color-text-secondary);
    }

    /* ── Desktop links (hidden on mobile) ───────────────────────── */
    .nav__links {
      display:        flex;
      align-items:    center;
      gap:            2rem;
      list-style:     none;
    }

    .nav__links a {
      font-size:      var(--font-size-label);
      font-weight:    500;
      letter-spacing: var(--letter-spacing-wide);
      text-transform: uppercase;
      color:          var(--color-text-secondary);
      transition:     color 0.2s ease;
    }

    .nav__links a:hover { color: var(--color-text-primary); }

    /* Tablet links keep the same type, with a larger quiet tap area. */
    @media (min-width: 681px) and (max-width: 1100px) {
      .nav__links { gap: 0.35rem; }

      .nav__links a,
      .nav__links .nav__motion {
        display:         inline-flex;
        align-items:     center;
        min-height:      2.75rem;
        margin:          0 -0.15rem;
        padding:         0.85rem 0.7rem;
      }
    }

    .nav__motion {
      padding:         0;
      border:          0;
      background:      none;
      font:            inherit;
      font-size:       var(--font-size-label);
      font-weight:     500;
      letter-spacing:  0.08em;
      text-transform:  uppercase;
      color:           var(--color-text-secondary);
      white-space:     nowrap;
      cursor:          pointer;
    }

    .nav__links .nav__motion { margin-left: 0.15rem; }

    .nav__motion:hover,
    .nav__motion:focus-visible { color: var(--color-text-primary); }

    .nav__mobile-menu .nav__motion {
      display:         block;
      width:           100%;
      padding:         0.9rem 0;
      font-size:       0.75rem;
      letter-spacing:  var(--letter-spacing-wide);
      color:           var(--color-text-secondary);
      text-align:      left;
    }

    .nav__links .nav__link--active { color: var(--color-text-primary); }

    /* ── Hamburger button (hidden on desktop) ───────────────────── */
    .nav__hamburger {
      display:          none;
      flex-direction:   column;
      justify-content:  center;
      align-items:      center;
      gap:              5px;
      width:            2.5rem;
      height:           2.5rem;
      background:       transparent;
      border:           none;
      cursor:           pointer;
      padding:          0.25rem;
      border-radius:    4px;
      -webkit-tap-highlight-color: transparent;
    }

    .nav__hamburger-line {
      display:          block;
      width:            22px;
      height:           1.5px;
      background:       var(--color-text-primary);
      border-radius:    2px;
      transition:       transform 0.3s ease, opacity 0.3s ease, width 0.3s ease;
      transform-origin: center;
    }

    /* Animate to X when open */
    .nav__hamburger[aria-expanded="true"] .nav__hamburger-line:nth-child(1) {
      transform: translateY(6.5px) rotate(45deg);
    }
    .nav__hamburger[aria-expanded="true"] .nav__hamburger-line:nth-child(2) {
      opacity:  0;
      width:    0;
    }
    .nav__hamburger[aria-expanded="true"] .nav__hamburger-line:nth-child(3) {
      transform: translateY(-6.5px) rotate(-45deg);
    }

    /* ── Mobile drawer ──────────────────────────────────────────── */
    .nav__mobile-menu {
      display:          none;           /* JS toggles .is-open */
      flex-direction:   column;
      padding:          0 var(--space-page-x) 1.5rem;
      border-top:       1px solid var(--color-border-subtle);
      background-color: var(--color-page-background);

      /* Slide-down animation */
      overflow:         hidden;
      max-height:       0;
      opacity:          0;
      transition:       max-height 0.35s cubic-bezier(0.4, 0, 0.2, 1),
                        opacity    0.25s ease,
                        padding    0.35s ease;
    }

    .nav__mobile-menu.is-open {
      max-height:       20rem;
      opacity:          1;
      padding-top:      1.25rem;
      background-color: var(--color-page-background);
    }

    .nav__mobile-menu li {
      list-style: none;
      border-bottom: 1px solid var(--color-border-subtle);
    }

    .nav__mobile-menu li:last-child { border-bottom: none; }

    .nav__mobile-menu a {
      display:          block;
      padding:          0.9rem 0;
      font-size:        0.8125rem;
      font-weight:      500;
      letter-spacing:   var(--letter-spacing-wide);
      text-transform:   uppercase;
      color:            var(--color-text-secondary);
      transition:       color 0.2s ease;
    }

    .nav__mobile-menu a:hover,
    .nav__mobile-menu .nav__link--active { color: var(--color-text-primary); }

    /* ── Responsive switch ──────────────────────────────────────── */
    @media (max-width: 680px) {
      .nav__links     { display: none; }
      .nav__hamburger { display: flex; }
      .nav__mobile-menu { display: flex; }
    }

    /* ═══════════════════════════════════════════════════════════════
       HERO HEADER
       ═══════════════════════════════════════════════════════════════ */
    .site-hero {
      padding:         var(--space-hero-top) var(--space-page-x) var(--space-hero-bottom);
      border-bottom:   1px solid var(--color-border-subtle);
    }

    /* On a computer, keep the introduction closer so the doors begin on the first screen. */
    @media (min-width: 1101px) {
      .site-hero {
        padding-top:    2.25rem;
        padding-bottom: 1.5rem;
      }
    }

    .hero__tag {
      display:         inline-block;
      font-size:       var(--font-size-label);
      font-weight:     500;
      letter-spacing:  var(--letter-spacing-wider);
      text-transform:  uppercase;
      color:           var(--color-text-secondary);
      margin-bottom:   1.5rem;
    }

    .hero__title {
      font-family:     var(--font-serif);
      font-size:       var(--font-size-hero-title);
      font-weight:     500;
      line-height:     1.12;
      letter-spacing:  -0.02em;
      max-width:       14ch;
      margin-bottom:   1.75rem;
    }

    .hero__title strong { font-weight: 600; }

    /* ═══════════════════════════════════════════════════════════════
       HOME ENTRANCE
       Full-screen photograph. Text stays left; the sculpture stays clear.
       ═══════════════════════════════════════════════════════════════ */
    .home .site-nav {
      position: fixed;
      top: 0;
      left: 0;
      right: 0;
      background: transparent;
      border-bottom-color: transparent;
    }

    .home .site-nav::before {
      content:          "";
      position:         absolute;
      inset:            0;
      z-index:          -1;
      background-color: var(--color-page-background);
      border-bottom:    1px solid var(--color-border-subtle);
      opacity:          var(--nav-fade, 0);
      pointer-events:   none;
    }

    .home .nav__wordmark,
    .home .nav__links a,
    .home .nav__links .nav__motion {
      text-shadow: 0 0 2px rgba(12, 8, 12, 0.95), 0 1px 12px rgba(12, 8, 12, 0.95);
    }

    .home .nav__hamburger-line {
      box-shadow: 0 0 8px rgba(12, 8, 12, 0.85);
    }

    @media (max-width: 680px) {
      .home .nav__mobile-menu {
        padding-bottom: 0;
        background-color: transparent;
      }

      .home .nav__mobile-menu.is-open {
        padding-bottom: 1.5rem;
      }

      .home .site-nav:has(.nav__mobile-menu.is-open),
      .home .nav__mobile-menu.is-open {
        background-color: var(--color-page-background);
      }
    }

    .home-hero {
      position:        relative;
      display:         flex;
      align-items:     center;
      min-height:      100vh;
      min-height:      100svh;
      margin-top:      0;
      padding:         calc(var(--space-nav-height) + clamp(2rem, 6vh, 4rem)) var(--space-page-x) clamp(2.5rem, 6vh, 4rem);
      background:      var(--color-page-background);
      overflow:        hidden;
    }

    .home-hero__frame {
      position:         absolute;
      inset:            -8%;
      transform-origin: 70% 38%;
      animation:        room-breathe 24s ease-in-out infinite;
    }

    .home-hero__photo {
      width:            100%;
      height:           100%;
      object-fit:       cover;
      object-position:  68% center;
    }

    .home-hero__shade {
      position:   absolute;
      inset:      0;
      background:
        linear-gradient(
          to bottom,
          rgba(12, 8, 12, 0.82) 0,
          rgba(12, 8, 12, 0.8) 4.5rem,
          rgba(12, 8, 12, 0.22) 9.5rem,
          transparent 15rem
        ),
        linear-gradient(
          90deg,
          rgba(14, 9, 14, 0.86) 0%,
          rgba(14, 9, 14, 0.62) 30%,
          rgba(14, 9, 14, 0.22) 52%,
          rgba(14, 9, 14, 0.02) 72%,
          transparent 84%
        );
    }

    .home-hero__content {
      position:  relative;
      z-index:   1;
      max-width: 38rem;
      animation: home-enter 1.15s ease both;
    }

    .home-hero__kicker {
      font-size:      var(--font-size-label);
      font-weight:    500;
      letter-spacing: 0.14em;
      text-transform: uppercase;
      color:          var(--color-text-secondary);
      margin-bottom:  1.25rem;
    }

    .home-hero__title {
      font-family:    var(--font-serif);
      font-size:      clamp(3rem, 6.5vw, 5.5rem);
      font-weight:    500;
      line-height:    1.05;
      letter-spacing: -0.02em;
      color:          var(--color-text-primary);
      margin-bottom:  1.25rem;
    }

    .home-hero__title em {
      font-style:  italic;
      font-weight: 500;
      color:       var(--color-text-secondary);
    }

    .home-hero__lead {
      max-width:    34ch;
      margin-bottom: 2rem;
      font-size:    clamp(1rem, 1.5vw, 1.2rem);
      font-weight:  300;
      line-height:  1.6;
      color:        var(--color-text-primary);
    }

    .home-hero .btn--ghost {
      border-color: rgba(244, 234, 220, 0.45);
      background:   rgba(14, 9, 14, 0.28);
    }

    @keyframes home-enter {
      from { opacity: 0; transform: translateY(14px); }
      to   { opacity: 1; transform: none; }
    }

    .home-intro {
      padding:    clamp(4rem, 8vw, 7rem) var(--space-page-x);
      border-top: 1px solid var(--color-border-subtle);
    }

    .home-intro h2 {
      max-width:      14ch;
      margin-bottom:  2.75rem;
      font-size:      clamp(2.1rem, 4vw, 3.4rem);
      font-weight:    500;
      line-height:    1.15;
      letter-spacing: -0.02em;
    }

    .home-steps {
      display:               grid;
      grid-template-columns: repeat(3, minmax(0, 20rem));
      gap:                   clamp(1.5rem, 4vw, 3.5rem);
      list-style:            none;
    }

    .home-steps li {
      font-family: var(--font-serif);
      font-size:   clamp(1.35rem, 2vw, 1.75rem);
      font-weight: 500;
      line-height: 1.2;
    }

    .home-steps span {
      display:        block;
      margin-bottom:  0.7rem;
      font-family:    var(--font-family);
      font-size:      var(--font-size-label);
      font-weight:    500;
      letter-spacing: 0.16em;
      color:          var(--color-text-secondary);
    }

    .home-steps p {
      max-width:    32ch;
      margin-top:   0.7rem;
      font-family:  var(--font-family);
      font-size:    1.0625rem;
      font-weight:  300;
      line-height:  1.55;
      color:        var(--color-text-secondary);
    }

    .home-close {
      max-width:    22em;
      margin-top:   clamp(2.75rem, 5vw, 4rem);
      font-family:  var(--font-serif);
      font-size:    clamp(1.45rem, 2.2vw, 1.85rem);
      font-weight:  500;
      font-style:   italic;
      line-height:  1.3;
      color:        var(--color-text-primary);
    }

    .home-intro .btn {
      margin-top: 1.6rem;
    }

    @media (max-width: 700px) {
      .home-hero {
        align-items: flex-end;
      }

      .home-hero__frame {
        transform-origin: 78% 30%;
      }

      .home-hero__photo {
        object-position: 78% 28%;
      }

      .home-hero__shade {
        background:
          linear-gradient(
            to bottom,
            rgba(12, 8, 12, 0.82) 0,
            rgba(12, 8, 12, 0.8) 4.5rem,
            rgba(12, 8, 12, 0.22) 9.5rem,
            transparent 15rem
          ),
          linear-gradient(
            to top,
            rgba(14, 9, 14, 0.9) 0%,
            rgba(14, 9, 14, 0.72) 36%,
            rgba(14, 9, 14, 0.18) 62%,
            transparent 100%
          );
      }

      .home-steps { grid-template-columns: 1fr; }
    }

    @media (prefers-reduced-motion: reduce) {
      html:not(.motion-on) .home-hero__content,
      html:not(.motion-on) .home-hero__frame { animation: none; }
    }

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

    .hero__count {
      font-size:       var(--font-size-hero-sub);
      font-weight:     400;
      letter-spacing:  var(--letter-spacing-wide);
      color:           var(--color-text-secondary);
    }

    .hero__rule {
      flex:            1;
      max-width:       4rem;
      height:          1px;
      background:      var(--color-text-tertiary);
    }

    .hero__desc {
      font-size:       var(--font-size-hero-sub);
      color:           var(--color-text-secondary);
      max-width:       48ch;
      line-height:     1.6;
    }

    /* ═══════════════════════════════════════════════════════════════
       FILTER BAR  (optional — remove this section if not needed)
       ═══════════════════════════════════════════════════════════════ */

    /* ═══════════════════════════════════════════════════════════════
       FILTER BAR  (optional — remove this section if not needed)
       ═══════════════════════════════════════════════════════════════ */
    .gallery-filter-wrap {
      border-bottom: 1px solid var(--color-border-subtle);
    }

    .gallery-filter {
      display:         flex;
      align-items:     center;
      flex-wrap:       wrap;       /* All buttons visible — no hidden scroll */
      gap:             0.375rem;
      padding:         0.75rem var(--space-page-x);
    }

    .filter__btn {
      /* 44px minimum tap target height for touch usability */
      min-height:      2.75rem;
      padding:         0 1rem;
      font-family:     var(--font-family);
      font-size:       var(--font-size-label);
      font-weight:     500;
      letter-spacing:  var(--letter-spacing-wide);
      text-transform:  uppercase;
      color:           var(--color-text-secondary);
      background:      transparent;
      border:          1px solid transparent;
      border-radius:   999px;
      cursor:          pointer;
      transition:      all 0.2s ease;
      -webkit-tap-highlight-color: transparent;
      white-space:     nowrap;     /* Each label stays on one line */
    }

    .filter__btn:hover {
      color:           var(--color-text-primary);
      border-color:    var(--color-border-subtle);
    }

    .filter__btn.is-active {
      color:           var(--color-surface);
      background:      var(--color-text-primary);
      border-color:    var(--color-text-primary);
    }

    .filter__btn[data-filter="joy"].is-active       { color: #1a121c; background: var(--color-joy); border-color: var(--color-joy); }
    .filter__btn[data-filter="sadness"].is-active   { color: #1a121c; background: var(--color-sadness); border-color: var(--color-sadness); }
    .filter__btn[data-filter="love"].is-active      { color: #1a121c; background: var(--color-love); border-color: var(--color-love); }
    .filter__btn[data-filter="nostalgia"].is-active { color: #1a121c; background: var(--color-nostalgia); border-color: var(--color-nostalgia); }
    .filter__btn[data-filter="anxiety"].is-active   { color: #1a121c; background: var(--color-anxiety); border-color: var(--color-anxiety); }
    .filter__btn[data-filter="peace"].is-active     { color: #1a121c; background: var(--color-peace); border-color: var(--color-peace); }

    .artworks__title {
      margin:         0;
      padding:        clamp(3rem, 6vw, 5rem) var(--space-page-x) 0.25rem;
      font-size:      clamp(2.1rem, 4vw, 3.4rem);
      font-weight:    500;
      line-height:    1.15;
      letter-spacing: -0.02em;
    }

    /* On touch devices: always show caption (no hover state exists) */
    @media (hover: none) {
      .gallery__caption {
        transform:   translateY(0);
        opacity:     1;
      }
    }

    /* ═══════════════════════════════════════════════════════════════
       MASONRY GALLERY  ← THE GRID
       CSS Columns masonry — no JavaScript required for the layout.
       ═══════════════════════════════════════════════════════════════ */
    .gallery {
      padding:         var(--space-section-gap) var(--space-page-x);

      /* CSS Columns masonry */
      column-count:    var(--grid-columns-desktop);
      column-gap:      var(--grid-column-gap);
    }

    /* ── Responsive column counts ─────────────────────────────── */
    @media (min-width: 1400px) {
      .gallery { column-count: var(--grid-columns-wide); }
    }

    @media (max-width: 900px) {
      .gallery { column-count: var(--grid-columns-tablet); }
    }

    @media (max-width: 560px) {
      .gallery { column-count: var(--grid-columns-mobile); }
    }

    /* ── Gallery Item ─────────────────────────────────────────── */
    .gallery__item {
      position:        relative;
      display:         block;          /* Prevents column-break artifacts */
      break-inside:    avoid;          /* Prevents images from splitting   */
      margin-bottom:   var(--grid-item-margin-bottom);
      border-radius:   var(--grid-border-radius);
      overflow:        hidden;
      cursor:          pointer;
      background:      transparent;
    }

    .gallery__item:focus-visible {
      outline:        2px solid var(--color-text-primary);
      outline-offset: 4px;
    }

    /* ── Image zoom on hover ──────────────────────────────────── */
    .gallery__image {
      width:           100%;
      height:          auto;
      display:         block;
      transition:      var(--transition-image-scale);
      will-change:     transform;
    }

    .gallery__item:hover .gallery__image {
      transform:       scale(1.035);
    }

    /* ── Caption Overlay ──────────────────────────────────────── */
    .gallery__caption {
      position:        static;
      padding:         0.8rem 0.15rem 0.2rem;
      background:      transparent;
      transform:       none;
      opacity:         1;
    }

    .gallery__caption-title {
      display:         block;
      font-family:     var(--font-serif);
      font-size:       1.25rem;
      font-weight:     500;
      line-height:     1.2;
      color:           var(--color-caption-text);
      margin-bottom:   0.2rem;
    }

    .gallery__caption-meta {
      display:         block;
      font-size:       0.75rem;
      font-weight:     400;
      letter-spacing:  0.08em;
      color:           var(--color-caption-meta);
    }

    .gallery__caption-desc {
      display:      block;
      margin-top:   0.4rem;
      font-size:    0.9375rem;
      font-weight:  300;
      line-height:  1.5;
      color:        var(--color-text-secondary);
    }
    .gallery__item[data-category="joy"] .gallery__caption-meta       { color: var(--color-joy); }
    .gallery__item[data-category="sadness"] .gallery__caption-meta   { color: var(--color-sadness); }
    .gallery__item[data-category="love"] .gallery__caption-meta      { color: var(--color-love); }
    .gallery__item[data-category="nostalgia"] .gallery__caption-meta { color: var(--color-nostalgia); }
    .gallery__item[data-category="anxiety"] .gallery__caption-meta   { color: #d08a8a; }
    .gallery__item[data-category="peace"] .gallery__caption-meta     { color: var(--color-peace); }

    /* ── Lightbox indicator icon ──────────────────────────────── */
    .gallery__expand-icon {
      position:        absolute;
      top:             0.75rem;
      right:           0.75rem;
      width:           1.75rem;
      height:          1.75rem;
      display:         flex;
      align-items:     center;
      justify-content: center;
      background:      rgba(0, 0, 0, 0.45);
      border-radius:   50%;
      opacity:         0;
      transition:      opacity 0.25s ease;
    }

    .gallery__expand-icon svg {
      width:  12px;
      height: 12px;
      stroke: var(--color-text-primary);
      fill:   none;
    }

    .gallery__item:hover .gallery__expand-icon { opacity: 1; }

    /* ═══════════════════════════════════════════════════════════════
       LIGHTBOX  —  "Lightroom Mode"
       Opened via JS when any gallery image is clicked.
       ═══════════════════════════════════════════════════════════════ */
    .lightbox {
      position:        fixed;
      inset:           0;
      z-index:         1000;
      display:         flex;
      flex-direction:  column;
      background:      var(--color-lightbox-backdrop);

      /* Hidden state */
      opacity:         0;
      pointer-events:  none;
      transition:      var(--transition-lightbox);
    }

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

    /* ── Lightbox top bar ─────────────────────────────────────── */
    .lightbox__bar {
      display:         flex;
      align-items:     center;
      justify-content: space-between;
      padding:         1rem 1.5rem;
      flex-shrink:     0;
    }

    .lightbox__counter {
      font-size:       var(--font-size-label);
      font-weight:     400;
      letter-spacing:  var(--letter-spacing-wide);
      color:           var(--color-lightbox-meta);
    }

    .lightbox__close {
      width:           2.75rem;
      height:          2.75rem;
      display:         flex;
      align-items:     center;
      justify-content: center;
      background:      transparent;
      border:          none;
      border-radius:   50%;
      color:           var(--color-lightbox-ui);
      cursor:          pointer;
      transition:      background 0.2s ease, color 0.2s ease;
    }

    .lightbox__close:hover {
      background:      rgba(255,255,255,0.1);
      color:           var(--color-lightbox-ui-hover);
    }

    .lightbox__close svg {
      width:  18px;
      height: 18px;
      stroke: currentColor;
      fill:   none;
      stroke-width: 1.5;
    }

    /* ── Lightbox stage (image area) ──────────────────────────── */
    .lightbox__stage {
      flex:            1 1 auto;
      min-height:      0;
      display:         flex;
      align-items:     center;
      justify-content: center;
      position:        relative;
      padding:         0 5rem;
      overflow:        hidden;
    }

    @media (max-width: 560px) {
      .lightbox__stage { padding: 0 3rem; }
    }

    .lightbox__image {
      display:         block;
      width:           auto;
      height:          auto;
      max-width:       calc(100vw - 8rem);
      max-height:      calc(100vh - 8.5rem);
      object-fit:      contain;
      object-position: center;
      aspect-ratio:    auto;
      border-radius:   1px;
      box-shadow:      0 30px 80px rgba(0,0,0,0.6);

      /* Fade only. The artwork itself stays still. */
      opacity:         1;
      transition:      var(--transition-lightbox-img);
    }

    @media (max-width: 560px) {
      .lightbox__image {
        max-width:  calc(100vw - 5.5rem);
        max-height: calc(100vh - 8.5rem);
      }
    }

    .lightbox__image.is-loading {
      opacity:         0;
    }

    /* ── Lightbox navigation arrows ───────────────────────────── */
    .lightbox__nav {
      position:        absolute;
      top:             50%;
      transform:       translateY(-50%);
      width:           3rem;
      height:          3rem;
      display:         flex;
      align-items:     center;
      justify-content: center;
      background:      rgba(255,255,255,0.08);
      border:          1px solid rgba(255,255,255,0.12);
      border-radius:   50%;
      color:           var(--color-lightbox-ui);
      cursor:          pointer;
      transition:      background 0.2s ease, color 0.2s ease;
    }

    .lightbox__nav:hover {
      background:      rgba(255,255,255,0.18);
      color:           var(--color-lightbox-ui-hover);
    }

    .lightbox__nav svg {
      width:  16px;
      height: 16px;
      stroke: currentColor;
      fill:   none;
      stroke-width: 1.75;
    }

    .lightbox__nav--prev { left:  1.25rem; }
    .lightbox__nav--next { right: 1.25rem; }

    /* ── Lightbox caption / bottom bar ───────────────────────── */
    .lightbox__caption {
      padding:         1.25rem 1.5rem 1.75rem;
      flex-shrink:     0;
      text-align:      center;
    }

    .lightbox__caption-title {
      font-size:       0.9375rem;
      font-weight:     500;
      color:           var(--color-lightbox-ui);
      margin-bottom:   0.3rem;
    }

    .lightbox__caption-meta {
      font-size:       var(--font-size-label);
      font-weight:     400;
      letter-spacing:  var(--letter-spacing-wide);
      text-transform:  uppercase;
      color:           var(--color-lightbox-meta);
    }

    /* ═══════════════════════════════════════════════════════════════
       FOOTER
       ═══════════════════════════════════════════════════════════════ */
    .site-footer {
      padding:         var(--space-footer-top) var(--space-page-x) 3rem;
      border-top:      1px solid var(--color-border-subtle);
      display:         flex;
      align-items:     flex-start;
      justify-content: space-between;
      gap:             2rem;
      flex-wrap:       wrap;
    }

    .footer__brand {
      font-family:     var(--font-serif);
      font-size:       1.05rem;
      font-weight:     500;
      line-height:     1;
      letter-spacing:  0.18em;
      text-transform:  uppercase;
      color:           var(--color-text-primary);
      margin-bottom:   0.65rem;
    }

    .footer__credit {
      font-size:       var(--font-size-footer);
      color:           var(--color-text-secondary);
      line-height:     1.7;
    }

    .footer__credit a {
      color:           var(--color-text-primary);
      text-decoration: underline;
      text-underline-offset: 2px;
    }

    .footer__linkedin {
      display:     inline-flex;
      align-items: center;
      gap:         0.4rem;
      margin:      0 0 0.45rem;
      font-family: var(--font-serif);
      font-size:   0.95rem;
      font-weight: 500;
      font-style:  italic;
      line-height: 1.2;
      color:       var(--color-text-secondary);
    }

    .footer__linkedin svg {
      display: block;
      width:   0.9rem;
      height:  0.9rem;
      flex:    none;
    }

    .footer__linkedin:hover { color: var(--color-text-primary); }

    .footer__nav {
      display:         flex;
      gap:             1.5rem;
      list-style:      none;
    }

    .footer__nav a {
      font-size:       var(--font-size-footer);
      font-weight:     500;
      letter-spacing:  var(--letter-spacing-wide);
      text-transform:  uppercase;
      color:           var(--color-text-secondary);
      transition:      color 0.2s ease;
    }

    .footer__nav a:hover { color: var(--color-text-primary); }

    @media (max-width: 680px) {
      .footer__nav { gap: 0.35rem 1rem; }

      .footer__nav a,
      .footer__linkedin,
      .footer__credit a,
      .room-back a {
        display:     inline-flex;
        align-items: center;
        min-height:  2.75rem;
        padding:     0.35rem 0;
      }
    }

    /* ═══════════════════════════════════════════════════════════════
       UTILITIES
       ═══════════════════════════════════════════════════════════════ */
    .visually-hidden {
      position:   absolute;
      width:      1px;
      height:     1px;
      overflow:   hidden;
      clip:       rect(0,0,0,0);
      white-space: nowrap;
    }

/* ═══════════════════════════════════════════════════════════════
       PAGE HERO
       ═══════════════════════════════════════════════════════════════ */
    .page-hero {
      padding:       var(--space-hero-top) var(--space-page-x) var(--space-hero-bottom);
      border-bottom: 1px solid var(--color-border-subtle);
    }

    .page-hero__tag {
      display:        inline-block;
      font-size:      var(--font-size-label);
      font-weight:    500;
      letter-spacing: var(--letter-spacing-wider);
      text-transform: uppercase;
      color:          var(--color-text-secondary);
      margin-bottom:  1.5rem;
    }

    .page-hero__title {
      font-family:    var(--font-serif);
      font-size:      var(--font-size-hero-title);
      font-weight:    500;
      line-height:    1.12;
      letter-spacing: -0.02em;
      max-width:      14ch;
    }

    .page-hero__title strong { font-weight: 600; }

    .page-hero--feelings {
      padding-top:    1.35rem;
      padding-bottom: 0.85rem;
    }

    .page-hero--feelings .page-hero__title {
      max-width:   none;
      font-size:   clamp(2.1rem, 4vw, 3.4rem);
      line-height: 1.15;
    }

    .feelings-lead {
      max-width:     36rem;
      margin-top:    0.65rem;
      font-size:     1rem;
      font-weight:   300;
      line-height:   1.6;
      color:         var(--color-text-secondary);
    }

    .feelings-note {
      max-width:   36rem;
      margin-top:  0.35rem;
      font-size:   0.9rem;
      font-weight: 300;
      line-height: 1.5;
      color:       var(--color-text-secondary);
    }

    .feelings {
      padding: clamp(1.15rem, 2vw, 1.5rem) var(--space-page-x) clamp(4rem, 8vw, 6rem);
    }

    .feelings__grid {
      display:               grid;
      grid-template-columns: repeat(2, minmax(0, 1fr));
      grid-auto-rows:        1fr;
      gap:                   clamp(1rem, 2vw, 1.5rem);
      scroll-margin-top:     calc(var(--space-nav-height) + 1.25rem);
    }

    .feelings__grid:focus { outline: none; }

    .feeling-card {
      display:         flex;
      align-items:     center;
      width:           100%;
      padding:         0.9rem 1.15rem;
      background:
        radial-gradient(circle at 0% 0%, var(--mark-soft), transparent 46%),
        var(--color-surface);
      border:          1px solid color-mix(in srgb, var(--mark) 32%, transparent);
      border-left:     2px solid var(--mark);
      border-radius:   2px;
      color:           var(--color-text-primary);
      font:            inherit;
      text-align:      left;
      cursor:          pointer;
      transition:      border-color 0.45s ease, box-shadow 0.45s ease;
    }

    .feeling-card__quote {
      display:               grid;
      grid-template-columns: auto minmax(0, 1fr);
      column-gap:            0.45rem;
      align-items:           center;
      width:                 100%;
      font-family:           var(--font-serif);
      font-size:             clamp(1.35rem, 2vw, 1.7rem);
      font-weight:           500;
      line-height:           1.35;
    }

    .feeling-card__mark {
      color:       var(--mark);
      font-size:   2.35em;
      line-height: 1;
    }

    .feeling-card__words { min-width: 0; }

    .feeling-card__close {
      white-space: nowrap;
    }

    .feeling-card__close .feeling-card__mark {
      margin-left:    0.14em;
      vertical-align: -0.08em;
    }

    .feeling-card:hover,
    .feeling-card:focus-visible,
    .feeling-card.is-chosen {
      border-color:      color-mix(in srgb, var(--mark) 70%, transparent);
      border-left-color: var(--mark);
      box-shadow:        0 0 28px color-mix(in srgb, var(--mark) 34%, transparent);
    }

    .feeling-card:focus-visible {
      outline:        2px solid var(--mark);
      outline-offset: 3px;
    }

    .feeling-card.is-chosen {
      border-color: color-mix(in srgb, var(--mark) 88%, transparent);
      box-shadow:   0 0 34px color-mix(in srgb, var(--mark) 46%, transparent);
    }

    .feeling-card--joy       { --mark: var(--color-joy);       --mark-soft: rgba(226, 192, 122, 0.24); }
    .feeling-card--sadness   { --mark: var(--color-sadness);   --mark-soft: rgba(155, 180, 204, 0.24); }
    .feeling-card--love      { --mark: var(--color-love);      --mark-soft: rgba(212, 163, 173, 0.24); }
    .feeling-card--nostalgia { --mark: var(--color-nostalgia); --mark-soft: rgba(196, 164, 132, 0.24); }
    .feeling-card--anxiety   { --mark: var(--color-anxiety);   --mark-soft: rgba(193, 106, 106, 0.24); }
    .feeling-card--peace     { --mark: var(--color-peace);     --mark-soft: rgba(174, 189, 168, 0.24); }

    @media (max-width: 720px) {
      .feelings__grid {
        grid-template-columns: 1fr;
        gap:                   0.7rem;
      }

      .feeling-card { padding: 0.55rem 0.8rem; }

      .feeling-card__quote {
        column-gap:  0.3rem;
        font-size:   1.15rem;
        line-height: 1.28;
      }

      .feeling-card__mark { font-size: 1.85em; }
    }

    @media (prefers-reduced-motion: reduce) {
      html:not(.motion-on) .feeling-card { transition: none; }
    }

    /* One closed door. A chosen sentence gives it a color and opens it. */
    .chosen-door {
      --door:            #8d6d76;
      scroll-margin-top: calc(var(--space-nav-height) + 1.25rem);
      max-width:         46rem;
      margin:            clamp(1.5rem, 3vw, 2.35rem) auto 0;
      text-align:        center;
    }

    .chosen-door__invite {
      margin-bottom:  1.75rem;
      font-family:    var(--font-serif);
      font-size:      clamp(1.45rem, 2.4vw, 1.9rem);
      font-weight:    500;
      line-height:    1.3;
      color:          #e4d7c6;
    }

    .chosen-door__frame {
      display:         inline-block;
      width:           min(68vw, 13.75rem);
      color:           inherit;
      text-decoration: none;
    }

    .chosen-door__frame:not([href]) { cursor: default; }
    .chosen-door__frame[href] { cursor: pointer; }

    .chosen-door--joy       { --door: var(--color-joy); }
    .chosen-door--sadness   { --door: var(--color-sadness); }
    .chosen-door--love      { --door: var(--color-love); }
    .chosen-door--nostalgia { --door: var(--color-nostalgia); }
    .chosen-door--anxiety   { --door: #d08a8a; }
    .chosen-door--peace     { --door: var(--color-peace); }

    .chosen-door__stage {
      display:       block;
      position:      relative;
      aspect-ratio:  3 / 5.2;
    }

    .chosen-door__stage::after {
      content:        "";
      position:       absolute;
      z-index:        2;
      left:           8%;
      right:          8%;
      bottom:         -1.35rem;
      height:         1.35rem;
      border-radius:  50%;
      background:     radial-gradient(ellipse at center, var(--door), transparent 70%);
      filter:         blur(8px);
      opacity:        0.45;
      pointer-events: none;
    }

    .chosen-door__room {
      position:         absolute;
      inset:            0;
      border-radius:    50% 50% 0 0 / 28% 28% 0 0;
      background:       #140e16 center 40% / cover no-repeat;
    }

    .chosen-door__arch {
      display:       block;
      position:      absolute;
      inset:         0 0 0;
      overflow:      hidden;
      perspective:   1100px;
      border:        2px solid var(--door);
      border-radius: 50% 50% 0 0 / 32% 32% 0 0;
      box-shadow:
        0 18px 32px rgba(0, 0, 0, 0.4),
        0 0 22px color-mix(in srgb, var(--door) 28%, transparent);
      transition:    border-color 0.6s ease, box-shadow 0.6s ease;
    }

    .chosen-door__leaf {
      display:          block;
      width:            100%;
      height:           100%;
      transform-origin: left center;
      transform:        rotateY(0deg);
      transition:       transform 1.7s cubic-bezier(0.22, 0.61, 0.36, 1);
    }

    .chosen-door__panel {
      display:    block;
      position:   relative;
      width:      100%;
      height:     100%;
      background:
        linear-gradient(90deg, rgba(0, 0, 0, 0.28), transparent 16%, transparent 78%, rgba(0, 0, 0, 0.34)),
        linear-gradient(#3c2c36, #241820 70%);
    }

    .chosen-door__panel::after {
      content:       "";
      position:      absolute;
      top:           52%;
      right:         12%;
      width:         0.7rem;
      height:        0.7rem;
      border-radius: 50%;
      background:    var(--door);
      box-shadow:    0 0 10px var(--door);
    }

    .chosen-door__frame.is-open .chosen-door__leaf {
      transform: rotateY(-86deg);
    }

    .chosen-door__frame.is-open .chosen-door__arch {
      box-shadow:
        0 18px 32px rgba(0, 0, 0, 0.4),
        0 0 48px color-mix(in srgb, var(--door) 80%, transparent);
    }

    .chosen-door__frame.is-open .chosen-door__stage::after { opacity: 0.9; }

    .chosen-door__step {
      position:       absolute;
      z-index:        3;
      left:           50%;
      bottom:         11%;
      transform:      translateX(-50%);
      padding:        0.22rem 0.72rem;
      border:         1px solid var(--door);
      border-radius:  999px;
      background:     rgba(20, 14, 22, 0.62);
      font-family:    var(--font-serif);
      font-size:      0.75rem;
      font-weight:    500;
      line-height:    1.4;
      letter-spacing: 0.03em;
      color:          #f4eadc;
      white-space:    nowrap;
      opacity:        0;
      pointer-events: none;
      transition:     opacity 0.8s ease;
    }

    .chosen-door.is-ready .chosen-door__step { opacity: 1; }

    .chosen-door__copy {
      max-width:  34rem;
      margin:     2.75rem auto 0;
    }

    .chosen-door__copy[hidden] { display: none; }
    .chosen-door__copy.is-held { visibility: hidden; }

    .chosen-door__emotion {
      font-family: var(--font-serif);
      font-size:   clamp(1.35rem, 2vw, 1.7rem);
      font-weight: 500;
      color:       var(--door);
    }

    .chosen-door__name {
      margin-top:     0.3rem;
      font-size:      clamp(2rem, 4vw, 3rem);
      font-weight:    500;
      line-height:    1.08;
      letter-spacing: -0.02em;
    }

    .chosen-door__lead {
      max-width:   38ch;
      margin:      1rem auto 0;
      font-size:   1.0625rem;
      font-weight: 300;
      line-height: 1.65;
      color:       var(--color-text-primary);
    }

    .chosen-door__actions {
      display:         flex;
      flex-wrap:       wrap;
      justify-content: center;
      gap:             0.75rem;
      margin-top:      1.75rem;
    }

    .chosen-door__actions .btn { text-decoration: none; }

    @media (max-width: 720px) {
      .chosen-door__frame { width: min(58vw, 12.25rem); }
    }

    @media (max-width: 560px) {
      .chosen-door__actions { flex-direction: column; align-items: center; }
      .chosen-door__actions .btn {
        width:           min(100%, 18rem);
        justify-content: center;
      }
    }

    @media (prefers-reduced-motion: reduce) {
      html:not(.motion-on) .chosen-door__leaf,
      html:not(.motion-on) .chosen-door__arch,
      html:not(.motion-on) .chosen-door__step { transition: none; }
      html:not(.motion-on) .chosen-door__frame.is-open .chosen-door__leaf {
        transform: none;
        opacity:   0;
      }
    }

    /* ── Emotion rooms: accent on titles, rules and a quiet light ─ */
    .room--joy       { --room-accent: var(--color-joy); }
    .room--sadness   { --room-accent: var(--color-sadness); }
    .room--love      { --room-accent: var(--color-love); }
    .room--nostalgia { --room-accent: var(--color-nostalgia); }
    .room--anxiety   { --room-accent: var(--color-anxiety); }
    .room--peace     { --room-accent: var(--color-peace); }

    .room .page-hero {
      position:          relative;
      isolation:         isolate;
      overflow:          hidden;
      border-bottom-color: color-mix(in srgb, var(--room-accent) 42%, transparent);
    }

    .room .page-hero::before {
      content:    "";
      position:   absolute;
      z-index:    -1;
      left:       -10%;
      right:      -10%;
      top:        -40%;
      height:     160%;
      background: radial-gradient(
                    ellipse at 18% 30%,
                    color-mix(in srgb, var(--room-accent) 24%, transparent) 0%,
                    transparent 62%
                  );
      pointer-events: none;
      animation:  room-light 10s ease-in-out infinite;
    }

    .room .page-hero__tag,
    .room .page-hero__title {
      color: var(--room-accent);
    }

    .emotion { color: var(--emotion, var(--color-text-secondary)); }
    .emotion--joy       { --emotion: var(--color-joy); }
    .emotion--sadness   { --emotion: var(--color-sadness); }
    .emotion--love      { --emotion: var(--color-love); }
    .emotion--nostalgia { --emotion: var(--color-nostalgia); }
    .emotion--anxiety   { --emotion: var(--color-anxiety); }
    .emotion--peace     { --emotion: var(--color-peace); }

    .emotion:hover { text-decoration: underline; text-underline-offset: 0.22em; }

    @keyframes room-light {
      0%, 100% { opacity: 0.55; }
      50%      { opacity: 1; }
    }

    @media (prefers-reduced-motion: reduce) {
      html:not(.motion-on) .room .page-hero::before { animation: none; opacity: 0.8; }
    }

    /* ── Room page: picture beside the writing, artworks below ── */
    .room-page {
      padding: clamp(1.75rem, 4vw, 3.25rem) var(--space-page-x) clamp(3rem, 6vw, 5rem);
    }

    .room-back {
      margin-bottom: clamp(1.5rem, 3vw, 2.25rem);
    }

    .room-back a {
      font-size:      var(--font-size-label);
      font-weight:    500;
      letter-spacing: var(--letter-spacing-wide);
      text-transform: uppercase;
      color:          var(--color-text-secondary);
    }

    .room-back a:hover { color: var(--color-text-primary); }

    .room-intro {
      display:               grid;
      grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr);
      gap:                   clamp(1.75rem, 4vw, 4.5rem);
      align-items:           center;
      position:              relative;
    }

    .room-intro::before {
      content:    "";
      position:   absolute;
      z-index:    -1;
      left:       30%;
      right:      -20%;
      top:        -30%;
      height:     160%;
      background: radial-gradient(
                    ellipse at 70% 40%,
                    color-mix(in srgb, var(--room-accent) 22%, transparent) 0%,
                    transparent 64%
                  );
      pointer-events: none;
      animation:  room-light 10s ease-in-out infinite;
    }

    .room-intro__picture {
      position:      relative;
      margin:        0;
      overflow:      hidden;
      border-radius: 2px;
    }

    .room-intro__picture img {
      width:           100%;
      height:          auto;
      display:         block;
      border-radius:   2px;
      transform-origin: center center;
      animation:       room-breathe 24s ease-in-out infinite;
    }

    /* Particles stay inside the picture, so they never cover the writing. */
    .room-atmosphere {
      position:       absolute;
      inset:          0;
      overflow:       hidden;
      pointer-events: none;
      contain:        paint;
    }

    .room-atmosphere span,
    .room-atmosphere svg {
      position: absolute;
      left:     var(--x);
      top:      0;
      height:   100%;
      animation-duration: var(--dur);
      animation-delay:    var(--delay);
      animation-timing-function: linear;
      animation-iteration-count: infinite;
    }

    .room-atmosphere--joy span {
      width:          32px;
      animation-name: joy-rise;
    }

    .room-atmosphere--joy span:nth-child(even) { animation-name: joy-rise-alt; }

    .room-atmosphere--nostalgia span {
      width:          22px;
      animation-name: mote-rise;
    }

    .room-atmosphere--nostalgia span:nth-child(even) { animation-name: mote-rise-alt; }

    .room-atmosphere--joy span::before,
    .room-atmosphere--nostalgia span::before,
    .room-atmosphere--sadness span::before,
    .room-atmosphere--love span::before {
      content:  "";
      position: absolute;
      top:      0;
      left:     0;
    }

    .room-atmosphere--joy span::before {
      width:         var(--size);
      height:        var(--size);
      border-radius: 50%;
      background:    radial-gradient(circle, rgba(255, 252, 242, 1) 0%, rgba(236, 198, 112, 0.78) 28%, transparent 72%);
      box-shadow:    0 0 14px 4px rgba(232, 192, 104, 0.62);
    }

    .room-atmosphere--sadness span {
      width:          16px;
      animation-name: rain-drop;
    }

    .room-atmosphere--sadness span::before {
      left:          6px;
      width:         2px;
      height:        var(--len);
      border-radius: 2px;
      background:    linear-gradient(to bottom, transparent, rgba(246, 250, 253, 0.98) 42%, rgba(214, 226, 236, 0.92) 62%, transparent);
      box-shadow:    0 0 6px rgba(232, 240, 248, 0.9);
      transform:     rotate(var(--slant));
    }

    .room-atmosphere--love span {
      width:            18px;
      transform-origin: 8px 8px;
      animation-name:   petal-fall;
    }

    .room-atmosphere--love span::before {
      width:         10px;
      height:        15px;
      border-radius: 80% 15% 75% 25%;
      background:    radial-gradient(circle at 35% 30%, rgba(255, 206, 216, 0.96), rgba(214, 86, 118, 0.84) 54%, transparent 78%);
      box-shadow:    0 0 10px rgba(214, 90, 122, 0.5);
    }

    .room-atmosphere--love span:nth-child(odd)::before {
      width:  12px;
      height: 16px;
    }

    .room-atmosphere--nostalgia span::before {
      width:         var(--size);
      height:        var(--size);
      border-radius: 50%;
      background:    radial-gradient(circle, rgba(244, 228, 196, 0.95) 0%, rgba(196, 164, 116, 0.5) 32%, transparent 72%);
      box-shadow:    0 0 8px 2px rgba(196, 160, 110, 0.4);
    }

    .room-atmosphere--anxiety::before {
      content:    "";
      position:   absolute;
      inset:      0;
      background:
        linear-gradient(to right, rgba(36, 0, 8, 0.8), transparent 22%, transparent 78%, rgba(36, 0, 8, 0.8)),
        linear-gradient(to bottom, rgba(36, 0, 8, 0.66), transparent 26%, transparent 74%, rgba(36, 0, 8, 0.72));
      box-shadow: inset 0 0 90px 26px rgba(92, 8, 18, 0.62);
      animation:  heart-glow 4.8s ease-in-out infinite;
    }

    .room-atmosphere--anxiety .ash {
      width:          12px;
      animation-name: ash-drift;
      animation-timing-function: ease-in-out;
    }

    .room-atmosphere--anxiety .ash:nth-child(even) { animation-name: ash-drift-alt; }

    .room-atmosphere--anxiety .ash::before {
      content:       "";
      position:      absolute;
      top:           0;
      left:          0;
      width:         var(--size);
      height:        var(--size);
      border-radius: 50%;
      background:    radial-gradient(circle, rgba(176, 64, 68, 0.95) 0%, rgba(110, 24, 32, 0.45) 55%, transparent 74%);
      box-shadow:    0 0 6px rgba(140, 28, 36, 0.55);
      animation:     ash-tremble var(--tremble) ease-in-out infinite;
    }

    .room-atmosphere--peace .ripple-source {
      position:  absolute;
      left:      var(--x);
      top:       var(--y);
      width:     52%;
      height:    30%;
      transform: translate(-50%, -50%);
    }

    .room-atmosphere--peace .ripple-source span {
      left:            0;
      top:             0;
      width:           100%;
      height:          100%;
      border:          2px solid rgba(88, 112, 80, 0.72);
      border-radius:   50%;
      box-shadow:      0 0 8px rgba(88, 112, 80, 0.28);
      opacity:         0;
      animation-name:  water-ripple;
      animation-timing-function: ease-out;
      animation-fill-mode: backwards;
    }

    .room-atmosphere--peace .ripple-source span:nth-child(2) {
      animation-delay: calc(var(--delay) + 1.8s);
    }

    .room-atmosphere--peace .ripple-source span:nth-child(3) {
      animation-delay: calc(var(--delay) + 3.6s);
    }

    @keyframes room-breathe {
      0%, 100% { transform: scale(1); }
      50%      { transform: scale(1.06); }
    }

    @keyframes joy-rise {
      0%   { transform: translate3d(0, 108%, 0); opacity: 0; }
      18%  { opacity: 0.95; }
      100% { transform: translate3d(var(--drift), -18%, 0); opacity: 0; }
    }

    @keyframes joy-rise-alt {
      0%   { transform: translate3d(0, 100%, 0); opacity: 0; }
      22%  { opacity: 0.88; }
      100% { transform: translate3d(calc(var(--drift) * -1), -14%, 0); opacity: 0; }
    }

    @keyframes mote-rise {
      0%   { transform: translate3d(0, 108%, 0); opacity: 0; }
      14%  { opacity: 0.82; }
      100% { transform: translate3d(var(--drift), -16%, 0); opacity: 0; }
    }

    @keyframes mote-rise-alt {
      0%   { transform: translate3d(0, 96%, 0); opacity: 0; }
      22%  { opacity: 0.7; }
      100% { transform: translate3d(calc(var(--drift) * -1), -20%, 0); opacity: 0; }
    }

    @keyframes rain-drop {
      0%   { transform: translate3d(0, -10%, 0); opacity: 0; }
      8%   { opacity: 0.85; }
      88%  { opacity: 0.7; }
      100% { transform: translate3d(var(--drift), 110%, 0); opacity: 0; }
    }

    @keyframes petal-fall {
      0%   { transform: translate3d(0, -18%, 0) rotate(0deg); opacity: 0; }
      16%  { opacity: 0.92; }
      100% { transform: translate3d(var(--drift), 114%, 0) rotate(var(--spin)); opacity: 0; }
    }

    @keyframes heart-glow {
      0%, 100% { opacity: 0.48; }
      16%      { opacity: 1; }
      34%      { opacity: 0.44; }
      50%      { opacity: 0.86; }
      72%      { opacity: 0.42; }
    }

    @keyframes ash-drift {
      0%   { transform: translate3d(0, 92%, 0); opacity: 0; }
      20%  { opacity: 0.8; }
      55%  { transform: translate3d(var(--drift), 36%, 0); opacity: 0.55; }
      100% { transform: translate3d(calc(var(--drift) * -0.7), -12%, 0); opacity: 0; }
    }

    @keyframes ash-drift-alt {
      0%   { transform: translate3d(0, 28%, 0); opacity: 0; }
      22%  { opacity: 0.72; }
      60%  { transform: translate3d(calc(var(--drift) * -1), 70%, 0); opacity: 0.5; }
      100% { transform: translate3d(var(--drift), -8%, 0); opacity: 0; }
    }

    @keyframes ash-tremble {
      0%, 100% { transform: translate3d(0, 0, 0); }
      50%      { transform: translate3d(2px, -2px, 0); }
    }

    @keyframes water-ripple {
      0%   { transform: scale(0.06); opacity: 0; }
      16%  { opacity: 0.72; }
      100% { transform: scale(1); opacity: 0; }
    }

    @media (max-width: 560px) {
      .room-atmosphere--joy span:nth-child(n + 21),
      .room-atmosphere--love span:nth-child(n + 21),
      .room-atmosphere--nostalgia span:nth-child(n + 21),
      .room-atmosphere--sadness span:nth-child(n + 17),
      .room-atmosphere--anxiety .ash:nth-child(n + 12),
      .room-atmosphere--peace .ripple-source:nth-child(n + 5) {
        display: none;
      }
    }

    .room-intro__emotion {
      font-family:    var(--font-serif);
      font-size:      clamp(1.35rem, 2vw, 1.75rem);
      font-weight:    500;
      line-height:     1.2;
      color:           var(--room-accent);
      margin-bottom:   1.35rem;
    }

    .room--anxiety .room-intro__emotion { color: #d08a8a; }

    .room-intro__name {
      font-size:      clamp(2.4rem, 4.5vw, 4.25rem);
      font-weight:    500;
      line-height:    1.05;
      letter-spacing: -0.02em;
      margin-bottom:  0.35rem;
    }

    .room-intro__lead {
      max-width:   38ch;
      font-size:   1.0625rem;
      font-weight: 300;
      line-height: 1.65;
      color:       var(--color-text-primary);
    }

    .room-intro__note {
      max-width:   36ch;
      margin-top:  1.25rem;
      font-family: var(--font-serif);
      font-size:   clamp(1.25rem, 2vw, 1.5rem);
      font-style:  italic;
      font-weight: 500;
      line-height: 1.45;
      color:       #e4d7c6;
    }

    .room-intro__more {
      margin-top: 1.75rem;
    }

    .room-artworks {
      margin-top:       clamp(3.5rem, 7vw, 6rem);
      scroll-margin-top: calc(var(--space-nav-height) + 1.25rem);
    }

    .room-artworks__title {
      margin-bottom:  clamp(1.5rem, 3vw, 2.25rem);
      font-size:      clamp(1.8rem, 3vw, 2.4rem);
      font-weight:    500;
    }

    .room-artworks .gallery {
      display:               grid;
      column-count:          auto;
      grid-template-columns: repeat(3, minmax(0, 1fr));
      gap:                   clamp(1rem, 2vw, 1.75rem);
      padding:               0;
    }

    .room-artworks .gallery__image {
      width:           100%;
      height:          auto;
      aspect-ratio:    3 / 4;
      object-fit:      cover;
      object-position: center;
    }

    .room-artworks .gallery__caption-meta {
      margin-top:     0.35rem;
      font-size:      0.9375rem;
      font-weight:    300;
      letter-spacing: 0;
      line-height:    1.5;
      color:          var(--color-text-secondary);
    }

    .room-pager {
      display:               grid;
      grid-template-columns: 1fr auto 1fr;
      gap:                   1.25rem 2rem;
      align-items:           end;
      margin-top:            clamp(3rem, 6vw, 5rem);
      padding-top:           1.5rem;
      border-top:            1px solid var(--color-border-subtle);
    }

    .room-pager a {
      display:     block;
      font-family: var(--font-serif);
      font-size:   clamp(1.2rem, 2vw, 1.5rem);
      font-weight: 500;
      line-height: 1.2;
      color:       var(--color-text-primary);
    }

    .room-pager a span {
      display:        block;
      margin-bottom:  0.35rem;
      font-family:    var(--font-family);
      font-size:      var(--font-size-label);
      font-weight:    500;
      letter-spacing: var(--letter-spacing-wide);
      text-transform: uppercase;
      color:          var(--color-text-secondary);
    }

    .room-pager a:hover { color: var(--room-accent); }
    .room--anxiety .room-pager a:hover { color: #d08a8a; }

    .room-pager__next { text-align: right; }

    .room-pager__all {
      align-self:     center;
      font-family:    var(--font-family);
      font-size:      var(--font-size-label);
      font-weight:    500;
      letter-spacing: var(--letter-spacing-wide);
      text-transform: uppercase;
      color:          var(--color-text-secondary);
    }

    .room-pager__all:hover { color: var(--color-text-primary); }

    @media (max-width: 860px) {
      .room-intro { grid-template-columns: 1fr; }
      .room-artworks .gallery { grid-template-columns: 1fr; }
    }

    @media (max-width: 640px) {
      .room-pager {
        grid-template-columns: 1fr;
      }
      .room-pager__next { text-align: left; }
    }

    @media (prefers-reduced-motion: reduce) {
      html:not(.motion-on) .room-intro::before { animation: none; opacity: 0.8; }
      html:not(.motion-on) .room-intro__picture img { animation: none; }
      html:not(.motion-on) .room-atmosphere { display: none; }
    }

    /* ═══════════════════════════════════════════════════════════════
       ABOUT LAYOUT
       ═══════════════════════════════════════════════════════════════ */
    .about-page {
      display:     flex;
      align-items: flex-start;
      min-height:  calc(100svh - var(--space-nav-height));
      padding:     0.6rem var(--space-page-x) 1.35rem;
    }

    .about-story {
      display:               grid;
      grid-template-columns: 1fr 1fr;
      gap:                   clamp(1.75rem, 4vw, 4.5rem);
      align-items:           center;
      width:                 100%;
    }

    .about-frame {
      position:      relative;
      height:        auto;
      width:         100%;
      max-width:     none;
      aspect-ratio:  4 / 5;
      margin:        0;
      overflow:      hidden;
      border-radius: 50% 50% 0 0 / 28% 28% 0 0;
    }

    .about-frame img {
      position:         absolute;
      inset:            0;
      width:            100%;
      height:           100%;
      object-fit:       cover;
      object-position:  center 42%;
      transform-origin: center center;
      animation:        room-breathe 24s ease-in-out infinite;
    }

    .about-atmosphere {
      position:       absolute;
      z-index:        2;
      inset:          0;
      overflow:       hidden;
      pointer-events: none;
    }

    .about-atmosphere span {
      position: absolute;
      left:     var(--x);
      top:      0;
      width:    16px;
      height:   100%;
      animation: about-dust var(--dur) linear var(--delay) infinite;
    }

    .about-atmosphere span:nth-child(even) { animation-name: about-dust-alt; }

    .about-atmosphere span::before {
      content:       "";
      position:      absolute;
      top:           0;
      left:          0;
      width:         var(--size);
      height:        var(--size);
      border-radius: 50%;
      background:    radial-gradient(circle, rgba(244, 234, 220, 0.85), rgba(196, 164, 132, 0.28) 42%, transparent 74%);
      box-shadow:    0 0 8px rgba(226, 192, 122, 0.28);
    }

    .about-copy .about-kicker {
      max-width:      none;
      margin:         0 0 0.7rem;
      font-size:      var(--font-size-label);
      font-weight:    500;
      line-height:    1.4;
      letter-spacing: 0.16em;
      text-transform: uppercase;
      color:          var(--color-text-secondary);
    }

    .about-copy h1 {
      max-width:      8.4em;
      font-size:      clamp(2.4rem, 4.5vw, 4.25rem);
      font-weight:    500;
      line-height:    1.08;
      letter-spacing: -0.02em;
    }

    .about-copy p {
      max-width:   66ch;
      margin-top:  0.95rem;
      font-size:   1.0625rem;
      font-weight: 300;
      line-height: 1.65;
    }

    .about-copy .about-curator {
      max-width:   none;
      margin-top:  1.4rem;
      padding-top: 1.05rem;
      border-top:  1px solid var(--color-border-subtle);
      font-family: var(--font-serif);
      font-size:   1.2rem;
      font-weight: 500;
      font-style:  italic;
      line-height: 1.3;
    }

    .about-copy .about-curator a {
      display:     inline-flex;
      align-items: center;
      gap:         0.55rem;
      color:       var(--color-text-secondary);
    }

    .about-copy .about-curator a:hover { color: var(--color-text-primary); }

    .about-copy .about-curator svg {
      display: block;
      width:   1rem;
      height:  1rem;
      flex:    none;
    }

    @keyframes about-dust {
      0%   { transform: translate3d(0, 108%, 0); opacity: 0; }
      20%  { opacity: 0.75; }
      68%  { opacity: 0.4; }
      100% { transform: translate3d(var(--drift), -16%, 0); opacity: 0; }
    }

    @keyframes about-dust-alt {
      0%   { transform: translate3d(0, 96%, 0); opacity: 0; }
      24%  { opacity: 0.62; }
      100% { transform: translate3d(calc(var(--drift) * -1), -18%, 0); opacity: 0; }
    }

    @media (max-width: 860px) {
      .about-page {
        display:    block;
        min-height: 0;
        padding:    clamp(1.5rem, 4vw, 2.5rem) var(--space-page-x) clamp(3rem, 6vw, 4.5rem);
      }
      .about-story {
        grid-template-columns: 1fr;
        align-items:           start;
        justify-content:       stretch;
        gap:                   clamp(2rem, 4vw, 3.75rem);
      }
      .about-frame {
        width:      min(100%, 28rem);
        height:     auto;
        max-width:  none;
        aspect-ratio: 3 / 4.15;
        margin:     0 auto;
      }
      .about-copy h1,
      .about-copy p { max-width: 40rem; }
    }

    @media (max-width: 560px) {
      .about-page { padding-left: 0.85rem; padding-right: 0.85rem; }
      .about-frame {
        width:     100%;
        box-shadow:
          0 0 36px rgba(201, 163, 173, 0.28),
          0 16px 28px rgba(0, 0, 0, 0.28);
      }
      .about-atmosphere::after {
        content:    "";
        position:   absolute;
        left:       0;
        right:      0;
        bottom:     0;
        height:     30%;
        background: linear-gradient(to bottom, transparent, var(--color-page-background));
      }
      .about-atmosphere span:nth-child(n + 6) { display: none; }
    }

    @media (prefers-reduced-motion: reduce) {
      html:not(.motion-on) .about-frame img { animation: none; }
      html:not(.motion-on) .about-atmosphere span { display: none; }
    }

    .btn {
      display:         inline-flex;
      align-items:     center;
      gap:             0.5rem;
      height:          2.75rem;
      padding:         0 1.5rem;
      font-family:     var(--font-family);
      font-size:       var(--font-size-label);
      font-weight:     600;
      letter-spacing:  var(--letter-spacing-wide);
      text-transform:  uppercase;
      border-radius:   2px;
      cursor:          pointer;
      transition:      all 0.2s ease;
      -webkit-tap-highlight-color: transparent;
    }

    .btn--primary {
      background:   var(--color-text-primary);
      color:        var(--color-surface);
      border:       1px solid var(--color-text-primary);
    }

    .btn--primary:hover {
      background:   transparent;
      color:        var(--color-text-primary);
    }

    .btn--ghost {
      background:   transparent;
      color:        var(--color-text-primary);
      border:       1px solid var(--color-border-subtle);
    }

    .btn--ghost:hover {
      border-color: var(--color-text-primary);
    }

    /* ═══════════════════════════════════════════════════════════════
       EXHIBITION DOORS
       ═══════════════════════════════════════════════════════════════ */
    .room-doors {
      padding: clamp(3rem, 6vw, 5rem) var(--space-page-x) clamp(1.5rem, 3vw, 2.5rem);
    }

    @media (min-width: 1101px) {
      .room-doors { padding-top: 1.75rem; }
    }

    .room-doors__title {
      margin-bottom:  clamp(2rem, 4vw, 3rem);
      font-size:      clamp(2.1rem, 4vw, 3.4rem);
      font-weight:    500;
      line-height:    1.15;
      letter-spacing: -0.02em;
    }

    .door-row {
      display:               grid;
      grid-template-columns: repeat(6, minmax(0, 1fr));
      gap:                   clamp(0.75rem, 1.6vw, 1.5rem);
      align-items:           start;
    }

    .door {
      --door: var(--color-text-secondary);
      display: block;
      color:   var(--color-text-primary);
    }

    .door--joy       { --door: var(--color-joy); }
    .door--sadness   { --door: var(--color-sadness); }
    .door--love      { --door: var(--color-love); }
    .door--nostalgia { --door: var(--color-nostalgia); }
    .door--anxiety   { --door: var(--color-anxiety); }
    .door--peace     { --door: var(--color-peace); }

    .door__stage {
      display:         block;
      position:        relative;
      aspect-ratio:    3 / 5.2;
    }

    .door__stage::after {
      content:        "";
      position:       absolute;
      z-index:        2;
      left:           4%;
      right:          4%;
      bottom:         -1.15rem;
      height:         1.15rem;
      border-radius:  50%;
      background:     radial-gradient(ellipse at center, var(--door), transparent 70%);
      filter:         blur(6px);
      opacity:        0.55;
      pointer-events: none;
    }

    .door__room {
      position:      absolute;
      inset:         0;
      width:         100%;
      height:        100%;
      object-fit:    cover;
      object-position: center 40%;
      border-radius: 50% 50% 0 0 / 30% 30% 0 0;
    }

    .door__arch {
      display:       block;
      position:      absolute;
      inset:         8% 9% 0;
      overflow:      hidden;
      perspective:   900px;
      border:        2px solid var(--door);
      border-radius: 50% 50% 0 0 / 34% 34% 0 0;
      transition:    box-shadow 0.6s ease;
      box-shadow:
        0 16px 28px rgba(0, 0, 0, 0.35),
        0 0 22px color-mix(in srgb, var(--door) 32%, transparent);
    }

    .door__leaf {
      display:          block;
      width:            100%;
      height:           100%;
      transform-origin: left center;
      transform:        rotateY(0deg);
      transition:       transform 0.75s cubic-bezier(0.22, 0.61, 0.36, 1);
    }

    .door__panel {
      display:         block;
      width:           100%;
      height:          100%;
      object-fit:      cover;
      object-position: center;
    }

    .door__caption {
      display:     block;
      margin-top:  1.45rem;
      text-align:  center;
      font-size:   0.8125rem;
      font-weight: 400;
      line-height: 1.45;
    }

    .door__emotion {
      display:     block;
      font-family: var(--font-serif);
      font-size:   1.2rem;
      font-weight: 500;
      line-height: 1.2;
      color:       var(--door);
    }

    .door__place {
      display:     block;
      margin-top:  0.25rem;
      font-size:   0.8125rem;
      font-weight: 400;
      line-height: 1.35;
      color:       #e4d7c6;
    }

    .door--anxiety .door__emotion {
      color: #d08a8a;
    }

    .door:hover .door__leaf,
    .door:focus-visible .door__leaf {
      transform: rotateY(-28deg);
    }

    .door:hover .door__arch,
    .door:focus-visible .door__arch {
      box-shadow:
        0 16px 28px rgba(0, 0, 0, 0.35),
        0 0 48px color-mix(in srgb, var(--door) 85%, transparent);
    }

    .door:hover .door__stage::after,
    .door:focus-visible .door__stage::after {
      opacity: 1;
    }

    .door.is-opening .door__leaf {
      transform:           rotateY(-86deg);
      transition-duration: 1.15s;
    }

    .door.is-opening .door__arch {
      transition-duration: 1.15s;
      box-shadow:
        0 16px 28px rgba(0, 0, 0, 0.35),
        0 0 56px color-mix(in srgb, var(--door) 90%, transparent);
    }

    .door.is-opening .door__stage::after {
      opacity: 1;
    }

    @media (prefers-reduced-motion: reduce) {
      html:not(.motion-on) .door__leaf { transition: none; }
      html:not(.motion-on) .door:hover .door__leaf,
      html:not(.motion-on) .door:focus-visible .door__leaf,
      html:not(.motion-on) .door.is-opening .door__leaf { transform: none; }
    }

    /* A visitor's Pause motion choice, remembered across pages. */
    html.motion-off { scroll-behavior: auto; }

    html.motion-off .home-hero__content,
    html.motion-off .home-hero__frame,
    html.motion-off .about-frame img,
    html.motion-off .room-intro__picture img,
    html.motion-off .room-intro::before,
    html.motion-off .room .page-hero::before,
    html.motion-off .room-atmosphere,
    html.motion-off .room-atmosphere::before { animation: none; }

    html.motion-off .room-intro::before,
    html.motion-off .room .page-hero::before { opacity: 0.8; }

    html.motion-off .about-atmosphere span,
    html.motion-off .room-atmosphere { display: none; }

    html.motion-off .feeling-card,
    html.motion-off .chosen-door__leaf,
    html.motion-off .chosen-door__arch,
    html.motion-off .chosen-door__step,
    html.motion-off .door__leaf,
    html.motion-off .lightbox__image { transition: none; }

    html.motion-off .chosen-door__frame.is-open .chosen-door__leaf {
      transform: none;
      opacity:   0;
    }

    html.motion-off .door:hover .door__leaf,
    html.motion-off .door:focus-visible .door__leaf,
    html.motion-off .door.is-opening .door__leaf { transform: none; }

    /* Artwork hover stays still: a quiet edge instead of the zoom. */
    html.motion-off .gallery__image { transition: none; }

    html.motion-off .gallery__item:hover .gallery__image { transform: none; }

    html.motion-off .gallery__item:hover {
      box-shadow:
        0 0 0 1px rgba(244, 234, 220, 0.72),
        0 0 22px rgba(201, 163, 173, 0.4);
    }

    @media (prefers-reduced-motion: reduce) {
      html:not(.motion-on) { scroll-behavior: auto; }

      html:not(.motion-on) .gallery__image { transition: none; }

      html:not(.motion-on) .gallery__item:hover .gallery__image { transform: none; }

      html:not(.motion-on) .gallery__item:hover {
        box-shadow:
          0 0 0 1px rgba(244, 234, 220, 0.72),
          0 0 22px rgba(201, 163, 173, 0.4);
      }
    }

    .door:focus-visible {
      outline:        2px solid var(--door);
      outline-offset: 6px;
    }

    @media (max-width: 1100px) {
      .door-row { grid-template-columns: repeat(3, minmax(0, 1fr)); }
    }

    @media (max-width: 680px) {
      .door-row { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    }