/* Additions on top of main.css for the rebuilt portfolio */

.nav__link--active { color: var(--text); }
.nav__link--active::after { width: 100%; }
.nav__cta, .mobile-menu__cta { white-space: nowrap; }

/* Shared player controls (featured video, showreel, project hero) */
.player-ui { position: absolute; right: 1.25rem; bottom: 1.25rem; display: flex; gap: 0.6rem; z-index: 3; }
.player-btn {
  height: 44px; min-width: 44px; padding: 0 1rem; border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.3); background: rgba(255, 255, 255, 0.14);
  backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
  color: #fff; font: 600 0.8rem var(--font-body); letter-spacing: 0.02em;
  display: inline-flex; align-items: center; justify-content: center; gap: 0.4rem;
  cursor: pointer; transition: background 0.3s, border-color 0.3s;
}
.player-btn:hover, .player-btn.is-on { background: var(--accent); border-color: var(--accent); }
.player-btn:focus-visible { outline: 2px solid var(--accent-3); outline-offset: 2px; }
.player-btn--play { padding: 0; width: 44px; }
.player-btn--play::before {
  content: ''; width: 0; height: 0; margin-left: 3px;
  border-left: 12px solid #fff; border-top: 7px solid transparent; border-bottom: 7px solid transparent;
}
.player-btn--play.is-playing::before { width: 12px; height: 14px; margin-left: 0; border: none; border-left: 4px solid #fff; border-right: 4px solid #fff; }
.cinema-feature__overlay, .showreel__hero .cinema-feature__vignette, .showreel__hero .cinema-feature__grain { pointer-events: none; }
.cinema-feature__overlay a { pointer-events: auto; }
.cinema-feature__meta .cinema-feature__link { display: inline-block; margin-top: 0.5rem; font-size: 0.85rem; color: var(--text-2); }
.cinema-feature__meta .cinema-feature__link:hover { color: var(--text); }

/* Project hero */
.project__hero-media video { width: 100%; height: 100%; object-fit: cover; display: block; }
.project__hero-media--portrait { display: flex; align-items: center; justify-content: center; background: #000; }
.project__hero-media--portrait video { object-fit: contain; max-height: 82vh; }
.project__ai-note {
  display: inline-flex; align-items: center; gap: 0.4rem; margin-top: 1rem; padding: 0.35rem 0.8rem;
  border: 1px solid var(--border-2); border-radius: 999px; font-size: 0.75rem; color: var(--text-2);
}
.project__ai-note::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: var(--accent-3); }

/* Card hover previews */
.hover-preview { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: 1; pointer-events: none; }
.proj-card__play, .gallery__overlay { z-index: 2; }
.work-feature__poster .work-feature__play { z-index: 2; }
.proj-card[hidden] { display: none; }

/* Work page gallery: even three-column grid, accessible stretched links */
.gallery--grid { grid-template-columns: repeat(3, 1fr); }
.gallery--grid .gallery__item, .gallery--grid .gallery__item:not(.gallery__item--featured) { grid-column: auto; }
.gallery--grid .gallery__item-inner { border-radius: var(--radius-lg); overflow: hidden; border: 1px solid var(--border); background: var(--bg-3); }
.gallery--grid .gallery__video-wrap { aspect-ratio: 16 / 9; min-height: 0; }
.gallery__link { color: inherit; }
.gallery__link::after { content: ''; position: absolute; inset: 0; z-index: 1; }
.gallery__play { z-index: 3; cursor: pointer; color: #fff; display: flex; align-items: center; justify-content: center; }
.gallery__title { font-size: 1.1rem; }
.gallery__duration { z-index: 2; }
@media (max-width: 1024px) { .gallery--grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 640px) { .gallery--grid { grid-template-columns: 1fr; } }

/* Lightbox: portrait videos and a link through to the project */
.lightbox__video--portrait { aspect-ratio: 9 / 16; width: auto; max-width: 100%; max-height: 80vh; margin: 0 auto; display: block; }
.lightbox__link { margin-left: auto; font-size: 0.85rem; color: var(--accent-3); }

/* Filmstrip tiles are links now */
.filmstrip__tile { display: block; color: inherit; }

/* About page */
.about__list { list-style: none; display: grid; gap: 0.9rem; margin-top: 2rem; padding: 0; }
.about__list li { position: relative; padding-left: 1.6rem; color: var(--text-2); }
.about__list li::before { content: ''; position: absolute; left: 0; top: 0.6em; width: 8px; height: 8px; border-radius: 50%; background: var(--gradient); }
.about__actions { display: flex; flex-wrap: wrap; gap: 1rem; margin-top: 2.5rem; }
.about__text + .about__text { margin-top: 1rem; }

/* Contact card (replaces the old form that could not send anything) */
.contact__card h3 { font-family: var(--font-display); font-size: 1.5rem; margin-bottom: 0.75rem; }
.contact__card p { color: var(--text-2); margin-bottom: 1rem; }
.contact__card ul { margin: 0 0 1.75rem 1.1rem; color: var(--text-2); display: grid; gap: 0.4rem; }
.contact__info-value { word-break: break-word; }

.projects__count { text-align: center; color: var(--text-3); font-size: 0.85rem; margin: -0.5rem 0 1.5rem; }
.section__note { text-align: center; color: var(--text-3); font-size: 0.85rem; margin-top: 2rem; }
.section__note a { color: var(--accent-3); }

@media (prefers-reduced-motion: reduce) {
  .marquee__track, .filmstrip__track { animation: none !important; }
  .reveal, .project-reveal { opacity: 1 !important; transform: none !important; transition: none !important; }
}

.cinema-feature__grain, .project__hero-grain { pointer-events: none; }
.cinema-feature .player-ui, .showreel__hero .player-ui, .project__hero-media .player-ui { z-index: 4; }
.project__aside .btn--block { margin-top: 1.5rem; justify-content: center; }

/* Project pages: clear the fixed nav so "All work" and the number are visible */
.section--project { padding-top: var(--nav-h, 72px); }

/* Keep the 3D scene as a full show on the home page, and quieter behind reading pages */
body:not(.page-home) #three-canvas { opacity: 0.3; }
