﻿@import url('https://fonts.googleapis.com/css2?family=DM+Mono:ital,wght@0,300;0,400;0,500;1,300;1,400&family=DM+Serif+Display&display=swap');



    /* ─── Reset ─────────────────────────────────────────── */
    @font-face {
      font-family: 'P22Underground';
      src: url('/fonts/P22 Underground Heavy/P22Underground-Heavy.otf') format('opentype');
    }

    *, *::before, *::after {
      box-sizing: border-box;
      margin: 0;
      padding: 0;
    }

    html, body {
      width: 100%;
      min-height: 100vh;
      background-color: #ffffff;
      font-family: 'DM Mono', monospace;
      color: #111;
    }

    /* ─── Site Wrapper ───────────────────────────────────── */
    .site-wrapper {
      max-width: 1200px;
      width: 100%;
      margin: 0 auto;
      padding: 0 24px;
    }

    /* ─── Header ─────────────────────────────────────────── */
    header {
      position: fixed;
      top: 0;
      left: 0;
      right: 0;
      z-index: 100;
      background-color: #fff;
      border-bottom: 1px solid #e8e8e8;
    }

    .header-inner {
      max-width: 1200px;
      margin: 0 auto;
      padding: 0 24px;
      height: 64px;
      display: flex;
      align-items: center;
      justify-content: space-between;
    }

    /* ─── Logo ───────────────────────────────────────────── */
    .logo {
      display: flex;
      align-items: flex-end;
      gap: 6px;
      text-decoration: none;
      flex-shrink: 0;
    }

    .logo img {
      height: 28px;
      width: auto;
      display: block;
/*      filter: invert(1);*/
    }

    .logo-text {
      font-family: 'P22Underground', 'DM Mono', monospace;
      font-size: 15.6px;
      letter-spacing: 0.06em;
      text-transform: uppercase;
      color: #111;
      line-height: 1;
      white-space: nowrap;
    }

    /* ─── Nav ────────────────────────────────────────────── */
    nav {
      display: flex;
      align-items: center;
      gap: 0;
      margin-top: 8px;
    }

    .nav-links {
      display: flex;
      align-items: center;
      gap: 12px;
      list-style: none;
    }

    .nav-item {
      position: relative;
    }

    .nav-link {
      display: block;
      padding: 8px 0;
      font-size: 12px;
      font-weight: 400;
      letter-spacing: 0.2em;
      text-transform: uppercase;
      text-decoration: none;
      color: #111;
      white-space: nowrap;
      transition: color 0.15s ease;
    }

    .nav-link:hover {
      color: #555;
    }

    .nav-link--active {
      font-family: 'DM Serif Display', serif;
      font-style: italic;
    }

    /* Dropdown arrow */
    .nav-link.has-dropdown::after {
      content: '';
      display: inline-block;
      width: 5px;
      height: 5px;
      border-right: 1.5px solid currentColor;
      border-bottom: 1.5px solid currentColor;
      transform: rotate(45deg) translateY(-2px);
      margin-left: 5px;
      vertical-align: middle;
      transition: transform 0.15s ease;
    }

    .nav-item:hover .nav-link.has-dropdown::after {
      transform: rotate(225deg) translateY(-2px);
    }

    /* Dropdown menu */
    .dropdown {
      position: absolute;
      top: calc(100% + 1px);
      left: 0;
      background-color: #fff;
      border: 1px solid #e8e8e8;
      min-width: 180px;
      list-style: none;
      opacity: 0;
      visibility: hidden;
      transform: translateY(-4px);
      transition: opacity 0.15s ease, transform 0.15s ease, visibility 0.15s;
    }

    .nav-item:hover .dropdown {
      opacity: 1;
      visibility: visible;
      transform: translateY(0);
    }

    .dropdown li a {
      display: block;
      padding: 10px 16px;
      font-size: 12px;
      font-weight: 400;
      letter-spacing: 0.06em;
      text-transform: uppercase;
      text-decoration: none;
      color: #111;
      transition: background-color 0.12s ease;
      white-space: nowrap;
    }

    .dropdown li a:hover {
      background-color: #f4f4f2;
    }

    /* Divider */
    .nav-divider {
      width: 1px;
      height: 18px;
      background-color: #d0d0d0;
      margin: 0 12px;
      flex-shrink: 0;
    }

    /* ─── Social Icons ───────────────────────────────────── */
    .social-links {
      display: flex;
      align-items: center;
      gap: 12px;
      list-style: none;
    }

    .social-links a {
      display: flex;
      align-items: center;
      color: #111;
      opacity: 0.6;
      transition: opacity 0.15s ease;
    }

    .social-links a:hover {
      opacity: 1;
    }

    .social-links svg {
      width: 16px;
      height: 16px;
      fill: currentColor;
    }

    .nav-search-item { border-left: 1px solid #d0d0d0; padding-left: 12px; }
    .mobile-search-wrap { display: none; }
    .nav-search-btn {
      all: unset;
      display: flex;
      align-items: center;
      cursor: pointer;
      color: #111;
      opacity: 0.7;
      transition: opacity 0.15s ease;
    }
    .nav-search-btn:hover { opacity: 1; }
    .nav-search-btn svg { width: 16px; height: 16px; fill: currentColor; }

    /* ─── Page offset for fixed header ──────────────────── */
    .page-content {
      padding-top: 64px;
    }

    /* ─── Mobile hamburger ───────────────────────────────── */
    .menu-toggle {
      display: none;
      flex-direction: column;
      gap: 5px;
      cursor: pointer;
      background: none;
      border: none;
      padding: 8px;
    }

    .menu-toggle span {
      display: block;
      width: 22px;
      height: 2px;
      background-color: #111;
      transition: all 0.2s ease;
    }

    /* ─── Responsive ─────────────────────────────────────── */
    @media (max-width: 900px) {
      .menu-toggle { display: flex; }

      nav {
        display: none;
        position: absolute;
        top: 64px;
        left: 0;
        right: 0;
        background-color: #fff;
        border-bottom: 1px solid #e8e8e8;
        padding: 12px 24px 20px;
        flex-direction: column;
        align-items: flex-start;
        gap: 0;
      }

      nav.open { display: flex; }

      .nav-links {
        flex-direction: column;
        align-items: flex-start;
        width: 100%;
        gap: 0;
      }

      .nav-link { padding: 10px 0; font-size: 10px; }

      .nav-link.has-dropdown::after { display: none; }

      .dropdown {
        position: static;
        opacity: 1;
        visibility: visible;
        transform: none;
        border: none;
        border-left: 2px solid #e8e8e8;
        padding-left: 8px;
        margin-left: 8px;
        margin-bottom: 4px;
        display: block;
      }

      .nav-divider { width: 100%; height: 1px; margin: 12px 0; }

      .nav-search-item { display: none; }

      .mobile-search-wrap {
        display: flex;
        align-self: stretch;   /* fill the full menu width (was shrink-wrapping to ~half) */
        align-items: center;
        gap: 12px;
        margin: 0 -24px 12px;
        padding: 6px 24px 6px 12px;
        background: #fff;
        border-bottom: 1px solid #e0e0e0;
        box-shadow: 0 2px 8px rgba(0,0,0,0.08);
      }

      .mobile-search-input {
        flex: 1;
        background: transparent;
        border: none;
        color: #111;
        font-size: 14px;
        font-family: inherit;
        padding: 0;
        outline: none;
        min-width: 0;
      }

      .mobile-search-input::placeholder { color: #bbb; }
      .mobile-search-input::-webkit-search-cancel-button { display: none; }
    }

    @media (max-width: 480px) {
      .header-inner { padding: 0 16px; }
      .logo-name { font-size: 11px; }
    }

    /* ─── Demo Reel Section ──────────────────────────────── */
    .reel-section {
      position: relative;
      width: 100%;
      height: calc(100vh - 64px);
      overflow: hidden;
      background: #111;
    }

    .reel-videos {
      position: absolute;
      inset: 0;
    }

    .reel-clip {
      position: absolute;
      inset: 0;
      width: 100%;
      height: 100%;
      object-fit: cover;
      opacity: 0;
      transition: opacity 0.8s ease;
    }

    .reel-clip.active {
      opacity: 1;
    }

    .reel-overlay {
      position: absolute;
      inset: 0;
      display: flex;
      align-items: center;
      justify-content: center;
      background: rgba(255, 255, 255, 0);
      opacity: 0;
      transition: opacity 0.35s ease, background 0.35s ease;
    }

    .reel-section:hover .reel-overlay {
      opacity: 1;
      background: rgba(0, 0, 0, 0.3);
    }

    /* Touch devices — overlay always visible (no hover on mobile) */
    @media (hover: none) {
      .reel-overlay {
        opacity: 1;
        background: rgba(0, 0, 0, 0.3);
      }
    }

    .reel-overlay-content {
      text-align: center;
      color: #fff;
    }

    .reel-name {
      font-family: 'DM Serif Display', serif;
      font-size: clamp(42px, 7.5vw, 96px);
      font-weight: 400;
      letter-spacing: 0.05em;
      text-transform: uppercase;
      line-height: 1;
      margin-bottom: 10px;
    }

    .reel-tags {
      font-family: 'DM Serif Display', serif;
      font-style: italic;
      font-size: clamp(15px, 1.65vw, 20px);
      font-weight: 400;
      letter-spacing: 0.2em;
      text-transform: uppercase;
      opacity: 0.8;
      margin-bottom: 32px;
    }

    .reel-cta {
      display: inline-block;
      font-family: 'DM Mono', monospace;
      font-size: 11px;
      font-weight: 500;
      letter-spacing: 0.16em;
      text-transform: uppercase;
      text-decoration: none;
      color: #fff;
      border: 1px solid rgba(255,255,255,0.7);
      padding: 10px 24px;
      transition: background-color 0.2s ease, color 0.2s ease;
    }

    .reel-cta:hover {
      background-color: #fff;
      color: #111;
    }

    /* ─── Site Tagline ───────────────────────────────────── */
    .site-tagline {
      width: 50%;
      margin: 48px auto;
      text-align: center;
      font-family: 'DM Serif Display', serif;
      font-style: italic;
      font-size: 18px;
      font-weight: 400;
      line-height: 1.7;
      letter-spacing: 0.02em;
      color: #111;
    }

    @media (max-width: 1200px) {
      .site-tagline { width: 70%; }
    }

    @media (max-width: 768px) {
      .site-tagline { width: 80%; }
    }

    /* ─── Work Grid ──────────────────────────────────────── */
    .work-grid {
      display: grid;
      grid-template-columns: repeat(3, 1fr);
      grid-auto-rows: 10px;   /* masonry: rows are 1-unit tracks; JS sets span per item */
      column-gap: 24px;       /* row gap handled by JS span calculation (+32px) */
      padding: 10px 0 80px;
    }

    .work-item {
      display: flex;
      flex-direction: column;
      gap: 12px;
      align-self: start; /* masonry: item sits at natural height, not stretched to row */
    }

    .work-thumb {
      display: block;
      position: relative;
      overflow: hidden;
      cursor: pointer;
    }

    .work-thumb img {
      width: 100%;
      height: auto;
      display: block;
      transition: transform 0.4s ease;
    }

    .work-thumb video {
      width: 100%;
      height: auto;
      display: block;
      pointer-events: none;
      transition: transform 0.4s ease;
    }

    .work-thumb:hover img,
    .work-thumb:hover video {
      transform: scale(1.03);
    }

    /* Gallery thumbnails (Template C) — forced 1:1, cycling images stacked */
    .work-thumb[data-cycling] {
      aspect-ratio: 1 / 1;
    }
    .work-thumb[data-cycling] img {
      position: absolute;
      inset: 0;
      width: 100%;
      height: 100%;
      object-fit: cover;
      opacity: 0;
      transition: opacity 0.4s ease, transform 0.4s ease;
    }
    .work-thumb[data-cycling] img.cycling-active {
      opacity: 1;
    }

    /* ─── Thumbnail hover overlay ────────────────────────── */
    .work-thumb-overlay {
      position: absolute;
      inset: 0;
      background: rgba(0, 0, 0, 0.3);
      display: flex;
      flex-direction: column;
      align-items: center;
      justify-content: center;
      gap: 6px;
      padding: 20px;
      opacity: 0;
      transition: opacity 0.35s ease;
      pointer-events: none;
    }

    .work-thumb:hover .work-thumb-overlay,
    .work-thumb.playing .work-thumb-overlay {
      opacity: 1;
    }

    /* Title box — wraps both title and subtitle */
    .overlay-title-box {
      display: inline-block;
      background-color: #fff;
      padding: 12px 20px;
      text-align: center;
      pointer-events: auto;
    }

    /* Main title — DM Serif Display, uppercase, large */
    .overlay-main-title {
      display: block;
      font-family: 'DM Serif Display', serif;
      font-size: 22px;
      font-weight: 400;
      letter-spacing: 0.05em;
      text-transform: uppercase;
      line-height: 1;
      color: #111;
      margin: 0;
    }

    /* Sub-title — DM Serif Display italic, small */
    .overlay-sub-title {
      display: block;
      font-family: 'DM Serif Display', serif;
      font-style: italic;
      font-size: 12px;
      font-weight: 400;
      letter-spacing: 0.02em;
      line-height: 1;
      color: #111;
      margin: 4px 0 0 0;
    }

    /* Date — month + year */
    .work-thumb-overlay .overlay-date {
      font-family: 'DM Mono', monospace;
      font-size: 12px;
      font-weight: 400;
      font-style: italic;
      line-height: 1;
      color: #fff;
      text-align: center;
      margin: 0;
    }

    .work-meta {
      display: flex;
      flex-direction: column;
      gap: 6px;
    }

    .work-title {
      font-family: 'DM Mono', monospace;
      font-size: 16px;
      font-weight: 500;
      color: #000;
      letter-spacing: 0.02em;
      line-height: 1.3;
    }

    .work-date {
      font-family: 'DM Mono', monospace;
      font-size: 13px;
      font-weight: 400;
      font-style: italic;
      color: #000;
      margin: 2px 0 4px;
    }

    .work-tags {
      display: flex;
      flex-wrap: wrap;
      justify-content: center;
      gap: 0;
      list-style: none;
      padding: 0;
      margin: 0;
    }

    .work-tags li {
      font-family: 'DM Mono', monospace;
      font-size: 10px;
      font-weight: 400;
      letter-spacing: 0.06em;
      text-transform: uppercase;
      color: #000;
    }

    .work-tags li:not(:last-child)::after {
      content: ' //';
      margin: 0 3px;
      color: #000;
    }

    /* Tag links — plain text style, underline on hover */
    .work-tags li a {
      color: #000;
      text-decoration: none;
    }
    .work-tags li a:hover {
      text-decoration: underline;
    }

    /* Awards & Publications — grid item (above the tags) */
    .work-awards {
      list-style: none;
      margin: 0 0 4px;
      padding: 0;
      text-align: center;
    }
    .work-awards li {
      font-family: 'DM Serif Display', serif;
      font-style: italic;
      font-size: 12px;
      line-height: 1;
      color: #555;
    }
    .work-awards li + li { margin-top: 0.5em; }

    /* ─── Category / Tag page heading ───────────────────────── */
    /* Title entrance — fade + rise on load, mirrors apps.the2457design.com hero */
    @keyframes fadeUp {
      from { opacity: 0; transform: translateY(28px); }
      to   { opacity: 1; transform: translateY(0); }
    }
    @media (prefers-reduced-motion: reduce) {
      .page-heading h1, .page-heading .page-subhead { animation: none; opacity: 1; }
    }

    /* Work-grid item fades in when its thumbnail media loads (works with lazy-loading) */
    @keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
    .work-item { opacity: 0; }
    .work-item.is-loaded { animation: fadeIn 0.9s ease forwards; }
    .search-overlay .work-item { opacity: 1; animation: none; }   /* dropdown results = instant */
    @media (prefers-reduced-motion: reduce) { .work-item { opacity: 1; animation: none; } }

    .page-heading {
      padding: 40px 0 16px;
    }
    .page-heading h1 {
      font-family: 'DM Serif Display', serif;
      font-size: clamp(48px, 6vw, 80px);
      font-weight: 400;
      font-style: normal;
      letter-spacing: 0.01em;
      text-transform: none;
      color: #111;
      margin: 0;
      line-height: 0.95;
      opacity: 0;
      animation: fadeUp 1s 0.15s forwards;
    }
    .page-heading h1 .head-l2 {
      display: block;
      font-family: 'DM Serif Display', serif;
      font-style: italic;
      font-weight: 400;
      font-size: clamp(46px, 5.8vw, 78px);
      color: #888;
      letter-spacing: 0.01em;
      line-height: 1;
    }
    .page-heading .page-subhead {
      font-family: 'DM Mono', monospace;
      font-size: 13px;
      line-height: 1.65;
      color: #666;
      margin: 16px 0 0;
      max-width: 50%;
      opacity: 0;
      animation: fadeUp 1.1s 0.35s forwards;
    }

    /* Empty grid state */
    .grid-empty {
      font-family: 'DM Mono', monospace;
      font-size: 14px;
      color: #999;
      padding: 40px 0;
      grid-column: 1 / -1;
    }

    /* Responsive grid */
    /* Responsive grid — row gap always handled by masonry JS, never set here */
    @media (max-width: 1200px) {
      .work-grid { grid-template-columns: repeat(3, 1fr); }
    }

    @media (max-width: 768px) {
      .work-grid { grid-template-columns: repeat(2, 1fr); column-gap: 16px; }
    }

    @media (max-width: 767px) and (orientation: portrait) {
      .work-grid { grid-template-columns: 1fr; column-gap: 0; }
    }

    @media (max-width: 767px) and (orientation: landscape) {
      .work-grid { grid-template-columns: repeat(3, 1fr); column-gap: 12px; }
    }


    /* ─── Search box (floats below nav, right-aligned) ──────────── */
    .nav-search-bar {
      position: fixed;
      top: 64px;
      left: 40%; /* fallback — alignSearchBar() pins this to the HOME nav link on open */
      right: calc(max(0px, (100% - 1200px) / 2) + 24px); /* align with the header frame's right edge (100%, not 100vw — excludes the scrollbar like the centered header does) */
      background: #fff;
      border-bottom: 1px solid #e0e0e0;
      display: none;
      align-items: center;
      gap: 12px;
      padding: 2px 24px 2px 10px;
      z-index: 999;
      box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    }
    .nav-search-bar.active { display: flex; }

    .search-input {
      flex: 1;
      background: transparent;
      border: none;
      color: #111;
      font-size: 14px;
      font-family: inherit;
      padding: 0;
      outline: none;
      min-width: 0;
    }
    .search-input::placeholder { color: #bbb; }
    .search-input::-webkit-search-cancel-button { display: none; }
    .search-close {
      all: unset;
      color: #999;
      font-size: 11px;
      font-family: 'DM Mono', monospace;
      font-weight: 500;
      letter-spacing: 0.05em;
      cursor: pointer;
      padding: 4px 0;
      transition: color 0.15s ease;
      white-space: nowrap;
      flex-shrink: 0;
    }
    .search-close:hover { color: #111; }

    /* ─── Search Results Panel ────────────────────────────────── */
    .search-overlay {
      position: fixed;
      top: 108px;
      left: 0;
      right: 0;
      bottom: 0;
      background: #fff;
      z-index: 997;
      overflow-y: auto;
      box-shadow: 0 4px 24px rgba(0,0,0,0.08);
      opacity: 0;
      pointer-events: none;
      transition: opacity 0.2s ease;
    }
    .search-overlay.active {
      opacity: 1;
      pointer-events: all;
    }
    .search-inner {
      max-width: 1200px;
      margin: 0 auto;
      padding: 32px 40px 80px;
    }
    .search-no-results {
      color: #999;
      font-size: 15px;
      padding: 40px 0;
      grid-column: 1 / -1;
    }
    .search-inner .work-grid { padding-bottom: 0; }

    /* ─── Segmented search results (Tag / Industries / Post) ─────── */
    .search-seg { margin: 0 0 30px; }
    .search-seg-label {
      font-family: 'DM Serif Display', serif;
      font-size: 26px;
      font-weight: 400;
      letter-spacing: 0.01em;
      line-height: 1.1;
      color: #111;
      margin: 0 0 22px;
      padding-top: 26px;
      border-top: 1px solid rgba(0, 0, 0, 0.11);
    }
    .search-seg-links {
      list-style: none;
      margin: 0;
      padding: 0;
      display: flex;
      flex-wrap: wrap;
      gap: 10px;
    }
    .search-seg-links a {
      display: inline-flex;
      align-items: center;
      font-family: 'DM Mono', monospace;
      font-size: 13px;
      letter-spacing: 0.04em;
      color: #444;
      background: none;
      text-decoration: none;
      border: 1px solid #ccc;
      padding: 9px 16px;
      transition: border-color 0.2s ease, color 0.2s ease;
    }
    .search-seg-links a:hover {
      border-color: #111;
      color: #111;
    }

    /* ─── YouTube Video Overlay (sixnfive-style) ────────────── */
    /* ─── YouTube Video Overlay ─────────────────────────────── */
    .video-overlay {
      position: fixed;
      inset: 0;
      z-index: 1000;
      background: rgba(0, 0, 0, 0.92);
      display: flex;
      flex-direction: column;
      overflow: hidden;
      opacity: 0;
      pointer-events: none;
      transition: opacity 0.35s ease;
    }
    .video-overlay.active {
      opacity: 1;
      pointer-events: all;
    }

    /* Close button — always pinned top-right, never scrolls, all viewports */
    .video-overlay-close {
      position: absolute;
      top: 10px;
      right: 0px;
      padding: 8px 5px;
      z-index: 1001;
	  background-color: #7F7F7F;
      background: none;
      border: none;
      color: #fff;
      font-size: 11px;
      font-family: 'DM Mono', monospace;
      font-weight: 500;
      letter-spacing: 0.2em;
      text-transform: uppercase;
      line-height: 1;
      cursor: pointer;
      opacity: 0.7;
      transition: opacity 0.15s ease;
    }
    .video-overlay-close:hover { opacity: 1; }

    .video-overlay-body {
      flex: 1;
      min-height: 0;
      overflow-y: auto;
      width: 100%;
      display: flex;
      flex-direction: column;
      align-items: center;
    }

    /* YouTube mode — center player vertically, fill available space */
    .video-overlay:not(.page-mode) .video-overlay-body {
      justify-content: center;
    }
    .video-overlay:not(.page-mode) .video-overlay-player {
      width: min(96vw, calc((100vh - 48px) * (16 / 9)));
      max-width: none;
    }

    /* Mobile — lighter overlay so grid shows through like desktop */
    @media (hover: none) {
      .video-overlay { background: rgba(0, 0, 0, 0.65); }
    }

    /* Page mode — button inside content panel, sticky so it stays visible while scrolling */
    .overlay-page-content > .video-overlay-close {
      position: sticky;
      top: 10px;
      display: block;
      width: fit-content;
      margin-left: auto;
      margin-bottom: 16px;
      right: auto;
      background: rgba(0, 0, 0, 0.50);
      color: #fff;
      opacity: 1;
    }
    .overlay-page-content > .video-overlay-close:hover { opacity: 0.85; }

    /* Image lightbox — click a gallery image to enlarge; click/tap anywhere to close.
       Sits above the overlay (z 2000 > close 1001) and inside .video-overlay so it
       fades away with the post. No own Esc/back/scroll handlers = no overlay collisions. */
    .image-lightbox {
      position: fixed;
      inset: 0;
      z-index: 2000;
      background: rgba(0, 0, 0, 0.92);
      display: flex;
      align-items: center;
      justify-content: center;
      padding: 4vmin;
      cursor: zoom-out;
      opacity: 0;
      pointer-events: none;
      overscroll-behavior: contain;
      transition: opacity 0.2s ease;
    }
    .image-lightbox.active { opacity: 1; pointer-events: all; }
    .image-lightbox img {
      max-width: 100%;
      max-height: 100%;
      object-fit: contain;
      box-shadow: 0 8px 40px rgba(0, 0, 0, 0.5);
    }
    .post-block-images img, .gallery-img-wrap img { cursor: zoom-in; }

    /* Video player — fixed at top, never scrolls */
    .video-overlay-player {
      flex-shrink: 0;
      width: 90vw;
      max-width: 1100px;
      margin: 0 auto;
    }
    .video-overlay-player iframe {
      width: 100%;
      aspect-ratio: 16 / 9;
      display: block;
      border: none;
    }

    /* Scrollable metadata — title, date, description */
    .video-overlay-meta {
      width: 90vw;
      max-width: 1100px;
      margin: 0 auto;
      padding: 20px 0 48px;
    }
    .overlay-title {
      font-family: 'DM Mono', monospace;
      font-size: 20px;
      font-weight: 700;
      color: #fff;
      letter-spacing: 0.06em;
      text-transform: uppercase;
      margin: 0 0 6px;
      line-height: 1.3;
    }
    .overlay-date {
      font-family: 'DM Mono', monospace;
      font-size: 13px;
      font-style: italic;
      color: rgba(255, 255, 255, 0.55);
      margin: 0 0 16px;
    }
    .overlay-desc {
      font-family: 'DM Mono', monospace;
      font-size: 15px;
      line-height: 1.75;
      color: rgba(255, 255, 255, 0.8);
      margin: 0;
      white-space: pre-line;
    }

    .work-thumb { cursor: pointer; }

    /* ─── Template C — Gallery viewer ───────────────────────── */
    .gallery-viewer {
      display: flex;
      flex-direction: column;
      align-items: center;
      width: 100%;
      padding: 60px 0 40px;
      gap: 16px;
    }

    .gallery-stage {
      display: flex;
      align-items: center;
      width: 100%;
      gap: 12px;
    }

    .gallery-img-wrap {
      flex: 1;
      position: relative;
    }

    .gallery-img-wrap img {
      width: 100%;
      height: auto;
      display: block;
    }

    .gallery-counter {
      position: absolute;
      top: 12px;
      right: 12px;
      font-family: 'DM Mono', monospace;
      font-size: 11px;
      letter-spacing: 0.1em;
      color: #fff;
      background: rgba(0, 0, 0, 0.45);
      padding: 4px 8px;
      pointer-events: none;
    }

    .gallery-btn {
      flex-shrink: 0;
      background: none;
      border: none;
      color: #111;
      font-size: 40px;
      line-height: 1;
      cursor: pointer;
      padding: 8px 4px;
      opacity: 0.5;
      transition: opacity 0.15s ease;
      font-family: serif;
    }
    .gallery-btn:hover { opacity: 1; }
    .gallery-btn:disabled { opacity: 0.12; cursor: default; }

    .gallery-desc {
      font-family: 'DM Mono', monospace;
      font-size: 13px;
      line-height: 1.75;
      color: #555;
      margin: 0 0 32px;
    }

    .gallery-caption {
      font-family: 'DM Mono', monospace;
      font-size: 13px;
      font-style: italic;
      color: rgba(0, 0, 0, 0.55);
      text-align: center;
      max-width: 680px;
      margin: 0;
      min-height: 1.4em;
    }

    @media (max-width: 768px) {
      .gallery-btn { font-size: 28px; padding: 4px 2px; }
    }

    /* ─── Page overlay content (Template B / C) ─────────────── */
    .overlay-page-content {
      width: 100%;
      max-width: 860px;
      margin: 0 auto;
      padding: 20px 48px 64px;
      background: #fff;
      color: #111;
    }

    /* Page overlay header — title / subtitle / date above fetched content */
    .overlay-page-header {
      padding-bottom: 32px;
      border-bottom: 1px solid #e8e8e8;
      margin-bottom: 32px;
    }
    .overlay-page-header h2 {
      font-family: 'DM Serif Display', serif;
      font-size: clamp(40px, 5vw, 64px);
      font-weight: 400;
      font-style: normal;
      letter-spacing: 0.01em;
      text-transform: none;
      color: #111;
      margin: 0;
      line-height: 0.95;
    }
    .overlay-page-header .overlay-page-sub {
      font-family: 'DM Serif Display', serif;
      font-style: italic;
      font-weight: 400;
      font-size: clamp(38px, 4.8vw, 60px);
      letter-spacing: 0.01em;
      line-height: 1;
      color: #888;
      margin: 0 0 14px;
    }
    .overlay-page-header .overlay-page-date {
      font-family: 'DM Mono', monospace;
      font-size: 12px;
      font-style: italic;
      color: #999;
      margin: 0;
    }
    .overlay-page-header .overlay-page-awards {
      list-style: none;
      margin: 14px 0;
      padding: 0;
    }
    .overlay-page-header .overlay-page-awards li {
      font-family: 'DM Serif Display', serif;
      font-style: italic;
      font-size: 20px;
      line-height: 1;
      color: #444;
    }
    .overlay-page-header .overlay-page-awards li + li { margin-top: 0.5em; }
    .overlay-page-header .overlay-page-desc {
      font-family: 'DM Mono', monospace;
      font-size: 13px;
      line-height: 1.75;
      color: #555;
      margin: 0;
    }
    .overlay-page-header .overlay-page-desc a {
      color: #111;
      text-decoration: underline;
    }

    .overlay-loading {
      text-align: center;
      color: rgba(0,0,0,0.35);
      font-size: 13px;
      padding: 80px 0;
    }

    /* Template A — video page */
    .overlay-page-content .post-player {
      position: relative;
      width: 100%;
      padding-bottom: 56.25%;
      margin-bottom: 32px;
    }
    .overlay-page-content .post-player iframe {
      position: absolute;
      inset: 0;
      width: 100%;
      height: 100%;
      border: none;
    }
    /* 360° / VR video viewer (Template D) */
    .overlay-page-content .post-player .video-360 {
      position: absolute;
      inset: 0;
      width: 100%;
      height: 100%;
      background: #000;
      overflow: hidden;
      cursor: grab;
      touch-action: none;
    }
    .overlay-page-content .post-player .video-360:active { cursor: grabbing; }
    .overlay-page-content .post-player .video-360-canvas {
      display: block;
      width: 100% !important;
      height: 100% !important;
    }
    .overlay-page-content .post-player .video-360-hint {
      position: absolute;
      left: 12px;
      top: 12px;
      margin: 0;
      z-index: 2;
      font-family: 'DM Mono', monospace;
      font-size: 11px;
      letter-spacing: 0.02em;
      color: #fff;
      background: rgba(0,0,0,0.45);
      padding: 5px 10px;
      border-radius: 4px;
      pointer-events: none;
    }
    /* 360° player control bar (play/pause · seek · time · mute) */
    .overlay-page-content .post-player .v360-controls {
      position: absolute;
      left: 0;
      right: 0;
      bottom: 0;
      z-index: 3;
      display: flex;
      align-items: center;
      gap: 10px;
      padding: 10px 12px;
      background: linear-gradient(to top, rgba(0,0,0,0.65), rgba(0,0,0,0));
    }
    .overlay-page-content .post-player .v360-btn {
      flex-shrink: 0;
      width: 30px;
      height: 30px;
      padding: 0;
      border: none;
      background: none;
      cursor: pointer;
      display: flex;
      align-items: center;
      justify-content: center;
    }
    .overlay-page-content .post-player .v360-btn svg {
      width: 22px;
      height: 22px;
      fill: #fff;
    }
    .overlay-page-content .post-player .v360-seek {
      flex: 1;
      height: 4px;
      cursor: pointer;
      accent-color: #fff;
    }
    .overlay-page-content .post-player .v360-time {
      flex-shrink: 0;
      min-width: 88px;
      text-align: right;
      font-family: 'DM Mono', monospace;
      font-size: 11px;
      color: #fff;
    }
    .overlay-page-content .post-body {
      font-size: 14px;
      line-height: 1.8;
      color: #444;
    }
    .overlay-page-content .post-body p { margin: 0 0 12px; }
    .overlay-page-content .post-body a {
      color: #111;
      text-decoration: underline;
    }

    /* Template B — content blocks */
    .overlay-page-content .post-block { margin-bottom: 32px; }

    .overlay-page-content .post-block-heading h4 {
      font-size: 13px;
      font-weight: 700;
      letter-spacing: 0.12em;
      text-transform: uppercase;
      color: #111;
      margin: 0;
    }
    .overlay-page-content .post-block-text p {
      font-size: 14px;
      line-height: 1.8;
      color: #444;
      margin: 0;
    }
    .overlay-page-content .post-block-youtube {
      position: relative;
      width: 100%;
      padding-bottom: 56.25%;
    }
    .overlay-page-content .post-block-youtube--shorts { padding-bottom: 177.78%; }
    .overlay-page-content .post-block-youtube iframe {
      position: absolute;
      inset: 0;
      width: 100%;
      height: 100%;
      border: none;
    }
    /* Portrait / Shorts / TikTok — 9:16, full content width — any template */
    .post-player--shorts,
    .post-block-youtube--shorts {
      position: relative;
      width: 100%;
      padding-bottom: 177.78%; /* 9:16 ratio */
      height: auto;
      margin-bottom: 32px;
    }
    .post-player--shorts iframe,
    .post-block-youtube--shorts iframe {
      position: absolute;
      inset: 0;
      width: 100%;
      height: 100%;
      display: block;
    }
    .overlay-page-content .post-block-images {
      display: grid;
      grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
      gap: 8px;
    }
    .overlay-page-content .post-block-images img,
    .overlay-page-content .post-block-images video {
      width: 100%;
      height: auto;
      display: block;
    }
    /* Videos render full-width, separate from the image gallery (never gridded/adjusted) */
    .overlay-page-content .post-block-video video {
      width: 100%;
      height: auto;
      display: block;
    }
    .overlay-page-content .post-block-caption {
      text-align: left;
      font-family: 'DM Mono', monospace;
      font-size: 12px;
      font-style: italic;
      color: #888;
      margin: 8px 0 0;
    }
    /* a captioned video: video sits flush above its own caption (no 32px gap) */
    .overlay-page-content .post-block-figure { margin-bottom: 32px; }
    .overlay-page-content .post-block-figure .post-block-youtube { margin-bottom: 0; }

    /* Juxtapose (before/after slider) */
    .juxtapose-wrap {
      position: relative;
      width: 100%;
      overflow: hidden;
      cursor: col-resize;
      user-select: none;
    }
    .juxtapose-wrap .jux-after  { display: block; width: 100%; height: auto; }
    .juxtapose-wrap .jux-before {
      position: absolute;
      inset: 0;
      overflow: hidden;
      width: 50%;
    }
    .juxtapose-wrap .jux-before img { display: block; width: 100%; max-width: none; height: auto; }
    .juxtapose-handle {
      position: absolute;
      top: 0; bottom: 0;
      left: 50%;
      width: 2px;
      background: #fff;
      transform: translateX(-50%);
      display: flex;
      align-items: center;
      justify-content: center;
    }
    .juxtapose-handle::after {
      content: '◀ ▶';
      font-size: 10px;
      color: #fff;
      background: rgba(0,0,0,0.5);
      padding: 4px 6px;
      border-radius: 2px;
      white-space: nowrap;
    }

    @media (max-width: 768px) {
      .overlay-page-content { padding: 20px 20px 60px; }
    }

/* ─── Post footer ────────────────────────────────────────────────────────── */
.post-footer {
  margin-top: 48px;
  padding-top: 20px;
  border-top: 1px solid #e0e0e0;
  font-family: 'DM Mono', monospace;
  font-size: 11px;
  letter-spacing: 0.08em;
  text-align: left;
}
.post-footer-share {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 14px;
}
.post-footer-icon {
  background: none;
  border: none;
  padding: 0;
  cursor: pointer;
  color: #bbb;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: color 0.15s ease;
}
.post-footer-icon svg { width: 14px; height: 14px; }
.post-footer-icon:hover { color: #111; }
.post-footer-icon.copied { color: #22c55e; }
.post-footer-more-btn {
  background: none;
  border: none;
  padding: 0;
  cursor: pointer;
  font-family: 'DM Mono', monospace;
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: #bbb;
  transition: color 0.15s ease;
}
.post-footer-more-btn:hover { color: #111; }
.post-footer-more-items {
  display: none;
  align-items: center;
  gap: 12px;
}
.post-footer-more-items.open { display: flex; }
.post-footer-copy p {
  margin: 0 0 3px;
  color: #aaa;
  text-transform: uppercase;
}

  
