/*
Theme Name: Nick Holmes Editorial
Theme URI: https://nickholmes.com
Author: Gemini AI
Description: Performance-first actor portfolio theme with precise editorial alignment.
Version: 1.0
Requires at least: 6.2
Tested up to: 6.5
Requires PHP: 7.4
*/

    /* ── RESET ── */
    *, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }
    html { scroll-behavior: smooth; }
    body {
      background: var(--bg);
      color: var(--text);
      font-family: var(--font-body);
      -webkit-font-smoothing: antialiased;
      cursor: none;
      overflow-x: hidden;
    }
    img { display: block; max-width: 100%; }
    a { color: inherit; text-decoration: none; }
    button { background: none; border: none; cursor: none; }

    /* ── CUSTOM PROPERTIES ── */
    :root {
      --bg: #060606;
      --bg-overlay: rgba(6, 6, 6, 0.92);
      --text: #e8e4de;
      --text-muted: #555;
      --text-faint: #2a2a2a;
      --font-display: 'Cormorant Garamond', serif;
      --font-body: 'Inter', sans-serif;
      --ease-spring: cubic-bezier(0.34, 1.3, 0.64, 1);
      --ease-out: cubic-bezier(0.4, 0, 0.2, 1);
      --section-pad: clamp(5rem, 10vh, 8rem) clamp(1.5rem, 5vw, 5rem);
    }

    /* ── TYPOGRAPHY ── */
    .section-label {
      font-family: var(--font-body);
      font-weight: 300;
      font-size: 0.65rem;
      letter-spacing: 0.45em;
      text-transform: uppercase;
      color: var(--text-muted);
      margin-bottom: 2.5rem;
    }

    /* ── HERO ── */
    .hero {
      position: relative;
      width: 100%;
      height: 100vh;
      overflow: hidden;
      display: flex;
      align-items: flex-end;
    }

    .hero-photo {
      position: absolute;
      inset: 0;
      width: 100%;
      height: 100%;
      object-fit: cover;
      object-position: center top;
      z-index: 1;
      will-change: transform;
    }

    /* LEFT veil: covers left ~28% of viewport only — face stays clear */
    .hero-veil-left {
      position: absolute;
      inset: 0;
      z-index: 2;
      background: linear-gradient(
        to right,
        rgba(6, 6, 6, 0.88) 0%,
        rgba(6, 6, 6, 0.55) 15%,
        rgba(6, 6, 6, 0) 30%
      );
      pointer-events: none;
    }

    /* BOTTOM veil: covers bottom ~22% — dark fade up */
    .hero-veil-bottom {
      position: absolute;
      inset: 0;
      z-index: 2;
      background: linear-gradient(
        to top,
        rgba(6, 6, 6, 0.90) 0%,
        rgba(6, 6, 6, 0.40) 12%,
        rgba(6, 6, 6, 0) 22%
      );
      pointer-events: none;
    }

    .hero-content {
      position: relative;
      z-index: 3;
      padding: 0 0 clamp(2.5rem, 6vh, 5rem) clamp(1.5rem, 5vw, 5rem);
      max-width: 55%;
    }

    .hero-tagline {
      font-family: var(--font-body);
      font-weight: 300;
      font-size: clamp(0.55rem, 1vw, 0.7rem);
      letter-spacing: 0.45em;
      text-transform: uppercase;
      color: var(--text-muted);
      margin-bottom: 0.6rem;
    }

    .hero-name {
      font-family: var(--font-display);
      font-weight: 200;
      font-size: clamp(3.5rem, 7vw, 6.5rem);
      letter-spacing: 0.18em;
      text-transform: uppercase;
      color: var(--text);
      line-height: 0.9;
    }

    /* ── HERO GLOW ── */
    .hero-glow {
      position: absolute;
      inset: 0;
      z-index: 2;
      pointer-events: none;
      background: radial-gradient(ellipse 55% 60% at 60% 42%, rgba(255, 245, 220, 0.9) 0%, transparent 70%);
      mix-blend-mode: screen;
      opacity: 0;
    }

    /* ── FILM GRAIN ── */
    .hero-grain {
      position: absolute;
      inset: 0;
      z-index: 4;
      pointer-events: none;
      background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='300' height='300'%3E%3Cfilter id='grain'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='300' height='300' filter='url(%23grain)' opacity='0.055'/%3E%3C/svg%3E");
      background-repeat: repeat;
      mix-blend-mode: overlay;
    }

    /* ── NH HAMBURGER ── */
    .nh-btn {
      position: fixed;
      top: clamp(1rem, 2.5vh, 1.8rem);
      right: clamp(1rem, 2.5vw, 2rem);
      z-index: 1001;
      padding: 0.75rem;
      display: flex;
      align-items: center;
      justify-content: center;
    }

    .nh-spin-wrap {
      transition: transform 0.75s var(--ease-spring);
    }
    .nh-btn:hover .nh-spin-wrap,
    .nh-btn.is-open .nh-spin-wrap {
      transform: rotate(360deg);
    }

    .nh-svg {
      width: 28px;
      height: 22px;
      overflow: visible;
    }

    .np {
      stroke: var(--text);
      stroke-width: 1.2px;
      stroke-linecap: round;
      fill: none;
    }

    /* Default hamburger paths */
    .np1 { d: path("M 12,6 L 44,6"); }
    .np2 { d: path("M 16,22 L 40,22"); }
    .np3 { d: path("M 12,38 L 44,38"); }
    .np4 { d: path("M 28,22 L 28,22"); opacity: 0; }
    .np5 { d: path("M 28,22 L 28,22"); opacity: 0; }
    .np6 { d: path("M 28,22 L 28,22"); opacity: 0; }

    /* Staggered transitions */
    .np1 { transition: d 0.5s var(--ease-spring) 0s,    opacity 0.3s ease 0s; }
    .np2 { transition: d 0.5s var(--ease-spring) 0.04s, opacity 0.3s ease 0.04s; }
    .np3 { transition: d 0.5s var(--ease-spring) 0.08s, opacity 0.3s ease 0.08s; }
    .np4 { transition: d 0.5s var(--ease-spring) 0.05s, opacity 0.35s ease 0.12s; }
    .np5 { transition: d 0.5s var(--ease-spring) 0.10s, opacity 0.35s ease 0.18s; }
    .np6 { transition: d 0.5s var(--ease-spring) 0.07s, opacity 0.35s ease 0.14s; }

    /* Hover / open → NH initials
       N: left-vert (0,0)→(0,44), diagonal (0,0)→(22,44), right-vert (22,0)→(22,44)
       H: left-vert (34,0)→(34,44), crossbar (34,22)→(56,22), right-vert (56,0)→(56,44) */
    .nh-btn:hover .np1,
    .nh-btn.is-open .np1 { d: path("M 0,0 L 0,44"); }
    .nh-btn:hover .np2,
    .nh-btn.is-open .np2 { d: path("M 0,0 L 22,44"); }
    .nh-btn:hover .np3,
    .nh-btn.is-open .np3 { d: path("M 22,0 L 22,44"); }
    .nh-btn:hover .np4,
    .nh-btn.is-open .np4 { d: path("M 34,0 L 34,44"); opacity: 1; }
    .nh-btn:hover .np5,
    .nh-btn.is-open .np5 { d: path("M 34,22 L 56,22"); opacity: 1; }
    .nh-btn:hover .np6,
    .nh-btn.is-open .np6 { d: path("M 56,0 L 56,44"); opacity: 1; }

    /* Ghost ring */
    .nh-btn::before {
      content: '';
      position: absolute;
      inset: 0;
      border-radius: 50%;
      border: 1px solid transparent;
      transition: border-color 0.5s ease, transform 0.75s var(--ease-spring);
    }
    .nh-btn:hover::before,
    .nh-btn.is-open::before {
      border-color: rgba(232, 228, 222, 0.14);
      transform: scale(1.15);
    }

    /* ── NAV OVERLAY ── */
    .nh-nav {
      position: fixed;
      inset: 0;
      z-index: 1000;
      background: var(--bg-overlay);
      backdrop-filter: blur(14px);
      -webkit-backdrop-filter: blur(14px);
      display: flex;
      flex-direction: column;
      justify-content: center;
      padding: 0 0 0 clamp(2rem, 10vw, 8rem);
      pointer-events: none;
      opacity: 0;
      transition: opacity 0.4s var(--ease-out);
    }
    .nh-nav.is-open {
      opacity: 1;
      pointer-events: auto;
    }

    .nav-list {
      list-style: none;
      perspective: 700px;
      display: flex;
      flex-direction: column;
      gap: clamp(0.3rem, 1vh, 0.6rem);
    }
    .nav-list li {
      transform-style: preserve-3d;
      transition: transform 0.35s var(--ease-out), opacity 0.35s var(--ease-out);
    }
    .nav-list a {
      font-family: var(--font-display);
      font-weight: 200;
      font-size: clamp(3rem, 6vw, 5.5rem);
      letter-spacing: 0.12em;
      text-transform: uppercase;
      color: var(--text);
      line-height: 1.1;
      display: block;
      opacity: 0;
      transform: translateX(-24px);
      transition: opacity 0.45s ease, transform 0.45s var(--ease-spring),
                  color 0.2s ease;
    }
    .nav-list a:hover { color: rgba(232, 228, 222, 0.6); }

    /* Stagger-in when nav opens */
    .nh-nav.is-open .nav-list li:nth-child(1) a { opacity: 1; transform: translateX(0); transition-delay: 0.05s; }
    .nh-nav.is-open .nav-list li:nth-child(2) a { opacity: 1; transform: translateX(0); transition-delay: 0.10s; }
    .nh-nav.is-open .nav-list li:nth-child(3) a { opacity: 1; transform: translateX(0); transition-delay: 0.15s; }
    .nh-nav.is-open .nav-list li:nth-child(4) a { opacity: 1; transform: translateX(0); transition-delay: 0.20s; }
    .nh-nav.is-open .nav-list li:nth-child(5) a { opacity: 1; transform: translateX(0); transition-delay: 0.25s; }

    body.nav-open { overflow: hidden; }

    .nav-social {
      display: flex;
      gap: 1.5rem;
      margin-top: clamp(2rem, 5vh, 4rem);
      opacity: 0;
      transition: opacity 0.4s ease 0.35s;
    }
    .nh-nav.is-open .nav-social { opacity: 1; }

    /* ── 3D CYLINDER DEPTH ── */
    /* data-nav-pos="0"  = hovered item (closest)   */
    /* data-nav-pos="-N" = N items above hovered     */
    /* data-nav-pos="+N" = N items below hovered     */
    .nav-list li[data-nav-pos="0"]  { transform: translateZ(22px);                    opacity: 1.0; }
    .nav-list li[data-nav-pos="-1"] { transform: translateZ(-6px)  rotateX(-2.5deg); opacity: 0.45; }
    .nav-list li[data-nav-pos="1"]  { transform: translateZ(-6px)  rotateX(2.5deg);  opacity: 0.45; }
    .nav-list li[data-nav-pos="-2"] { transform: translateZ(-16px) rotateX(-5deg);   opacity: 0.22; }
    .nav-list li[data-nav-pos="2"]  { transform: translateZ(-16px) rotateX(5deg);    opacity: 0.22; }
    .nav-list li[data-nav-pos="-3"],
    .nav-list li[data-nav-pos="-4"] { transform: translateZ(-24px) rotateX(-7deg);   opacity: 0.10; }
    .nav-list li[data-nav-pos="3"],
    .nav-list li[data-nav-pos="4"]  { transform: translateZ(-24px) rotateX(7deg);    opacity: 0.10; }

    /* ── CUSTOM CURSOR ── */
    .cursor-dot,
    .cursor-ring {
      position: fixed;
      pointer-events: none;
      z-index: 10000;
      border-radius: 50%;
      transform: translate(-50%, -50%);
    }
    .cursor-dot {
      width: 4px;
      height: 4px;
      background: var(--text);
      transition: opacity 0.3s ease;
    }
    .cursor-ring {
      width: 22px;
      height: 22px;
      border: 1px solid rgba(232, 228, 222, 0.5);
      transition: width 0.3s var(--ease-out),
                  height 0.3s var(--ease-out),
                  opacity 0.3s ease,
                  border-color 0.3s ease;
    }
    body.cursor-hover .cursor-ring {
      width: 36px;
      height: 36px;
      border-color: rgba(232, 228, 222, 0.25);
    }
    body.cursor-off .cursor-dot,
    body.cursor-off .cursor-ring { opacity: 0; }

    @media (hover: none) {
      .cursor-dot, .cursor-ring { display: none; }
      body { cursor: auto; }
      button { cursor: pointer; }
      a { cursor: pointer; }
    }

    /* ── SCROLL REVEAL ── */
    .reveal {
      opacity: 0;
      transform: translateY(28px);
      transition: opacity 0.7s var(--ease-out), transform 0.7s var(--ease-out);
    }
    .reveal.is-visible {
      opacity: 1;
      transform: translateY(0);
    }

    @media (prefers-reduced-motion: reduce) {
      .reveal {
        opacity: 1;
        transform: none;
        transition: none;
      }
    }

    /* ── REEL ── */
    .section-reel {
      padding: var(--section-pad);
      background: var(--bg);
    }
    .reel-inner { max-width: 960px; margin: 0 auto; }

    .reel-main {
      position: relative;
      width: 100%;
      padding-bottom: 56.25%;
      background: #111;
      margin-bottom: 1.5rem;
    }
    .reel-main iframe,
    .reel-main video {
      position: absolute;
      inset: 0;
      width: 100%;
      height: 100%;
    }

    .reel-clips-wrap {
      display: flex;
      align-items: center;
      gap: 0.75rem;
    }
    .reel-arrow {
      flex-shrink: 0;
      width: 2rem;
      height: 2rem;
      display: flex;
      align-items: center;
      justify-content: center;
      font-size: 1.4rem;
      color: var(--text-muted);
      transition: color 0.2s ease, opacity 0.2s ease;
      opacity: 0.7;
    }
    .reel-arrow:hover { color: var(--text); opacity: 1; }
    .reel-arrow:disabled { opacity: 0.15; pointer-events: none; }
    .reel-clips {
      flex: 1;
      min-width: 0;
      display: flex;
      gap: 1rem;
      overflow-x: auto;
      padding-bottom: 0.5rem;
      scrollbar-width: thin;
      scrollbar-color: #333 transparent;
    }
    .clip-thumb {
      flex: 0 0 180px;
      cursor: none;
    }
    .clip-placeholder {
      width: 100%;
      aspect-ratio: 16/9;
      background: #111;
      background-size: cover;
      background-position: center;
      border: 1px solid #1e1e1e;
      transition: border-color 0.2s ease;
    }
    .clip-thumb:hover .clip-placeholder { border-color: #444; }
    .clip-label {
      display: block;
      margin-top: 0.4rem;
      font-family: var(--font-body);
      font-weight: 300;
      font-size: 0.6rem;
      letter-spacing: 0.2em;
      text-transform: uppercase;
      color: var(--text-muted);
      transition: color 0.2s ease;
    }
    .clip-thumb:hover .clip-label { color: var(--text); }
    .clip-thumb.is-active .clip-placeholder { border-color: var(--text); }

    /* ── REEL IDLE STATE ── */
    .reel-preview {
      position: absolute;
      inset: 0;
      background-size: cover;
      background-position: center;
      opacity: 0;
      filter: brightness(0.25);
      transition: opacity 0.5s ease;
      pointer-events: none;
    }
    .reel-preview.is-visible { opacity: 1; }

    .reel-idle {
      position: absolute;
      inset: 0;
      display: flex;
      flex-direction: column;
      align-items: center;
      justify-content: center;
      gap: 1.1rem;
      color: var(--text);
      opacity: 1;
      transition: opacity 0.4s ease;
      pointer-events: none;
    }
    .reel-idle.is-hidden { opacity: 0; }
    .reel-idle svg {
      width: 52px;
      height: 52px;
      opacity: 0.25;
    }
    .reel-idle-label {
      font-family: var(--font-body);
      font-size: 0.55rem;
      font-weight: 300;
      letter-spacing: 0.35em;
      text-transform: uppercase;
      color: var(--text-muted);
    }

    .reel-main video,
    .reel-main iframe {
      opacity: 0;
      animation: reelFadeIn 0.5s ease 0.1s forwards;
    }
    @keyframes reelFadeIn {
      to { opacity: 1; }
    }

    /* ── GALLERY ── */
    .section-gallery {
      padding: var(--section-pad);
      background: var(--bg);
    }
    .gallery-inner { max-width: 1100px; margin: 0 auto; }

    .gallery-grid {
      display: grid;
      grid-template-columns: repeat(3, 1fr);
      gap: 0.5rem;
    }
    @media (max-width: 768px) {
      .gallery-grid { grid-template-columns: repeat(2, 1fr); }
    }
    @media (max-width: 480px) {
      .gallery-grid { grid-template-columns: 1fr; }
    }

    .gallery-item {
      position: relative;
      overflow: hidden;
      cursor: none;
      background: #111;
    }
    .gallery-item::after {
      content: '';
      position: absolute;
      inset: 0;
      border: 1px solid transparent;
      transition: border-color 0.3s ease;
      pointer-events: none;
    }
    .gallery-item:hover::after { border-color: rgba(232, 228, 222, 0.3); }

    .gallery-item img {
      width: 100%;
      aspect-ratio: 3/4;
      object-fit: cover;
      display: block;
      transition: filter 0.4s ease;
      filter: grayscale(20%);
    }
    .gallery-item:hover img { filter: grayscale(0%); }

    /* ── LIGHTBOX ── */
    .lightbox {
      position: fixed;
      inset: 0;
      z-index: 5000;
      background: rgba(6, 6, 6, 0.97);
      display: flex;
      align-items: center;
      justify-content: center;
      opacity: 0;
      pointer-events: none;
      transition: opacity 0.35s ease;
    }
    .lightbox.is-open {
      opacity: 1;
      pointer-events: auto;
    }
    .lightbox-img {
      max-width: 90vw;
      max-height: 90vh;
      object-fit: contain;
      display: block;
    }
    .lightbox-close,
    .lightbox-prev,
    .lightbox-next {
      position: absolute;
      font-family: var(--font-body);
      font-weight: 300;
      font-size: 1rem;
      color: var(--text-muted);
      padding: 1rem;
      cursor: none;
      transition: color 0.2s ease;
      background: none;
      border: none;
    }
    .lightbox-close:hover,
    .lightbox-prev:hover,
    .lightbox-next:hover { color: var(--text); }
    .lightbox-close { top: 1.5rem; right: 2rem; font-size: 1.2rem; }
    .lightbox-prev  { left: 2rem;  top: 50%; transform: translateY(-50%); font-size: 1.5rem; }
    .lightbox-next  { right: 2rem; top: 50%; transform: translateY(-50%); font-size: 1.5rem; }

    /* ── BIO + RESUME ── */
    .section-bio {
      padding: var(--section-pad);
      background: var(--bg);
      display: flex;
      justify-content: center;
    }
    .bio-inner {
      max-width: 560px;
      width: 100%;
    }
    .bio-text {
      font-family: var(--font-body);
      font-weight: 300;
      font-size: clamp(0.9rem, 1.5vw, 1.05rem);
      line-height: 1.8;
      color: rgba(232, 228, 222, 0.75);
      margin-bottom: 2rem;
    }
    .resume-link {
      display: inline-block;
      font-family: var(--font-body);
      font-weight: 300;
      font-size: 0.7rem;
      letter-spacing: 0.35em;
      text-transform: uppercase;
      color: var(--text-muted);
      border-bottom: 1px solid #2a2a2a;
      padding-bottom: 2px;
      transition: color 0.25s ease, border-color 0.25s ease;
    }
    .resume-link:hover {
      color: var(--text);
      border-color: var(--text);
    }

    /* ── REPRESENTATION ── */
    .section-representation {
      padding: var(--section-pad);
      background: var(--bg);
    }
    .representation-inner {
      max-width: 560px;
      margin: 0 auto;
    }
    .rep-rows {
      display: flex;
      flex-direction: column;
      gap: 2rem;
    }
    .rep-row {
      display: flex;
      align-items: flex-start;
      gap: 2.5rem;
      padding-bottom: 2rem;
      border-bottom: 1px solid #111;
    }
    .rep-row:last-child { border-bottom: none; padding-bottom: 0; }
    .rep-role {
      font-family: var(--font-body);
      font-size: 0.58rem;
      font-weight: 300;
      letter-spacing: 0.35em;
      text-transform: uppercase;
      color: var(--text-muted);
      width: 72px;
      flex-shrink: 0;
      padding-top: 0.15rem;
    }
    .rep-detail {
      display: flex;
      flex-direction: column;
      gap: 0.35rem;
    }
    .rep-agency {
      display: inline-flex;
      align-items: center;
      opacity: 0.55;
      transition: opacity 0.25s ease;
      margin-bottom: 0.2rem;
    }
    .rep-agency:hover { opacity: 1; }
    .atb-logo {
      height: 52px;
      width: auto;
      filter: invert(1);
      opacity: 0.7;
    }
    .rep-agency:hover .atb-logo { opacity: 1; }
    .rep-name {
      font-family: var(--font-body);
      font-size: 0.78rem;
      font-weight: 300;
      letter-spacing: 0.08em;
      color: var(--text);
    }
    .rep-person {
      font-family: var(--font-body);
      font-size: 0.7rem;
      font-weight: 300;
      letter-spacing: 0.06em;
      color: var(--text-muted);
    }
    .rep-contacts {
      display: flex;
      flex-wrap: wrap;
      gap: 0.5rem 1.5rem;
      margin-top: 0.2rem;
    }
    .rep-contact {
      font-family: var(--font-body);
      font-size: 0.65rem;
      font-weight: 300;
      letter-spacing: 0.08em;
      color: var(--text-muted);
      transition: color 0.2s ease;
    }
    .rep-contact:hover { color: var(--text); }

    /* ── FOOTER ── */
    .site-footer {
      padding: clamp(3rem, 6vh, 5rem) clamp(1.5rem, 5vw, 5rem);
      background: var(--bg);
      border-top: 1px solid #111;
    }
    .footer-inner { max-width: 1100px; margin: 0 auto; }

    .footer-top {
      display: flex;
      align-items: center;
      justify-content: space-between;
      margin-bottom: 2rem;
    }

    .footer-social { display: flex; gap: 1.2rem; align-items: center; }
    .social-icon {
      width: 20px;
      height: 20px;
      color: var(--text-muted);
      transition: color 0.25s ease;
    }
    a:hover .social-icon { color: var(--text); }

    .contact-link {
      font-family: var(--font-body);
      font-weight: 300;
      font-size: 0.7rem;
      letter-spacing: 0.35em;
      text-transform: uppercase;
      color: var(--text-muted);
      border-bottom: 1px solid #2a2a2a;
      padding-bottom: 2px;
      transition: color 0.25s ease, border-color 0.25s ease;
    }
    .contact-link:hover { color: var(--text); border-color: var(--text); }

    .footer-bottom {
      display: flex;
      align-items: center;
      justify-content: space-between;
    }
    .footer-copy {
      font-family: var(--font-body);
      font-weight: 300;
      font-size: 0.55rem;
      letter-spacing: 0.25em;
      color: #2a2a2a;
      text-transform: uppercase;
    }
    .team-robert-link {
      font-family: var(--font-body);
      font-weight: 300;
      font-size: 0.5rem;
      letter-spacing: 0.2em;
      text-transform: uppercase;
      color: #222;
      transition: color 0.25s ease;
    }
    .team-robert-link:hover { color: #444; }

    /* Social icons inside nav overlay */
    .nav-social .social-icon { width: 18px; height: 18px; color: rgba(232,228,222,0.35); }
    .nav-social a:hover .social-icon { color: rgba(232,228,222,0.8); }

    /* ── MOBILE ── */
    @media (max-width: 768px) {
      .hero-content { max-width: 80%; }
      .hero-name { font-size: clamp(2.5rem, 11vw, 3.5rem); letter-spacing: 0.12em; }

      .nh-nav { padding: 0 0 0 2rem; }
      .nav-list a { font-size: clamp(2.2rem, 9vw, 3rem); }

      .reel-clips { gap: 0.75rem; }
      .clip-thumb { flex: 0 0 140px; }

      .footer-top { flex-direction: column; align-items: flex-start; gap: 1.5rem; }
    }

    @media (max-width: 480px) {
      .hero-veil-left {
        background: linear-gradient(
          to right,
          rgba(6, 6, 6, 0.75) 0%,
          rgba(6, 6, 6, 0) 55%
        );
      }
    }
