/*
Theme Name: Bold Portfolio
Theme URI: 
Author: Custom
Description: A dark, bold masonry grid portfolio theme for creatives.
Version: 1.6
Requires at least: 5.6
Tested up to: 6.5
Requires PHP: 7.4
License: GNU General Public License v2 or later
Text Domain: bold-portfolio
Tags: portfolio, dark, masonry, grid, custom-menu, featured-images, full-width-template
*/

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

html {
  font-size: 16px;
  -webkit-text-size-adjust: 100%;
}

body {
  background: #0a0a0a;
  color: #ccc;
  font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;
  font-size: 14px;
  line-height: 1.6;
  overflow-x: hidden;
}

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

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

ul, ol {
  list-style: none;
}

/* ============================================================
   TYPOGRAPHY
   ============================================================ */
h1, h2, h3, h4, h5, h6 {
  font-weight: 700;
  line-height: 1.1;
  color: #fff;
  letter-spacing: -0.02em;
}

p {
  margin-bottom: 1.5em;
  color: #999;
}

/* ============================================================
   HEADER
   ============================================================ */
#masthead {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 100;
  padding: 1.25rem 2rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: linear-gradient(to bottom, rgba(0,0,0,0.9) 0%, rgba(0,0,0,0) 100%);
  transition: background 0.3s ease;
}

#masthead.scrolled {
  background: rgba(10,10,10,0.97);
  border-bottom: 1px solid #1a1a1a;
}

.site-branding .site-title {
  font-size: 1.1rem;
  font-weight: 700;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: #fff;
  margin: 0;
}

.site-branding .site-title a {
  color: #fff;
}

.site-branding .site-description {
  font-size: 0.7rem;
  color: #666;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  margin-top: 0.1rem;
}

/* ============================================================
   NAVIGATION — HAMBURGER
   ============================================================ */
#menu-toggle {
  display: flex;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
  padding: 4px;
  background: none;
  border: none;
  z-index: 200;
}

#menu-toggle span {
  display: block;
  width: 28px;
  height: 2px;
  background: #fff;
  transition: all 0.3s ease;
  transform-origin: center;
}

#menu-toggle.active span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

#menu-toggle.active span:nth-child(2) {
  opacity: 0;
  transform: scaleX(0);
}

#menu-toggle.active span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

/* ============================================================
   NAVIGATION — FULLSCREEN OVERLAY
   ============================================================ */
#nav-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.97);
  z-index: 99;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.35s ease;
}

#nav-overlay.open {
  opacity: 1;
  pointer-events: all;
}

#nav-overlay .main-navigation ul {
  text-align: center;
  padding: 0;
  margin: 0;
  list-style: none;
}

#nav-overlay .main-navigation ul li {
  margin: 0.75rem 0;
  opacity: 0;
  transform: translateY(12px);
  transition: opacity 0.3s ease, transform 0.3s ease;
}

#nav-overlay.open .main-navigation ul li {
  opacity: 1;
  transform: translateY(0);
}

/* Stagger nav items */
#nav-overlay.open .main-navigation ul li:nth-child(1) { transition-delay: 0.05s; }
#nav-overlay.open .main-navigation ul li:nth-child(2) { transition-delay: 0.10s; }
#nav-overlay.open .main-navigation ul li:nth-child(3) { transition-delay: 0.15s; }
#nav-overlay.open .main-navigation ul li:nth-child(4) { transition-delay: 0.20s; }
#nav-overlay.open .main-navigation ul li:nth-child(5) { transition-delay: 0.25s; }

#nav-overlay .main-navigation ul li a {
  font-size: clamp(2rem, 5vw, 3.5rem);
  font-weight: 700;
  color: #fff;
  letter-spacing: -0.02em;
  text-transform: uppercase;
  transition: color 0.2s ease;
  display: inline-block;
  line-height: 1.2;
}

#nav-overlay .main-navigation ul li a:hover {
  color: #c9a84c;
}

/* ============================================================
   MAIN CONTENT
   ============================================================ */
#page {
  min-height: 100vh;
}

#content {
  padding-top: 0;
}

/* ============================================================
   MASONRY GRID
   ============================================================ */
.masonry-grid {
  columns: 3;
  column-gap: 0;
  width: 100%;
}

.grid-item {
  break-inside: avoid;
  position: relative;
  overflow: hidden;
}

/* Single wrapping link covers the whole card */
.grid-item-link {
  display: block;
  position: relative;
  overflow: hidden;
  line-height: 0;
}

.grid-item-link img {
  width: 100%;
  height: auto;
  display: block;
  transition: transform 0.6s cubic-bezier(0.25, 0.46, 0.45, 0.94),
              opacity 0.4s ease;
}

.grid-item-link:hover img {
  transform: scale(1.05);
  opacity: 0.3;
}

/* Overlay sits on top of the image inside the link */
.item-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 1.5rem;
  background: linear-gradient(to top, rgba(0,0,0,0.85) 0%, rgba(0,0,0,0) 60%);
  opacity: 0;
  transition: opacity 0.35s ease;
}

.grid-item-link:hover .item-overlay {
  opacity: 1;
}

.item-category {
  font-size: 0.65rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: #c9a84c;
  margin-bottom: 0.4rem;
  display: block;
}

.item-title {
  font-size: clamp(1rem, 2vw, 1.5rem);
  font-weight: 700;
  color: #fff;
  line-height: 1.1;
  letter-spacing: -0.01em;
  margin: 0;
}

/* Video play indicator */
.grid-item.has-video .grid-item-link::after {
  content: '';
  position: absolute;
  top: 1rem;
  right: 1rem;
  width: 38px;
  height: 38px;
  background: rgba(0,0,0,0.65) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='white'%3E%3Cpath d='M8 5v14l11-7z'/%3E%3C/svg%3E") center/18px no-repeat;
  border-radius: 50%;
  border: 1px solid rgba(255,255,255,0.25);
  z-index: 2;
  transition: background-color 0.2s ease, transform 0.2s ease;
}

.grid-item.has-video .grid-item-link:hover::after {
  background-color: #c9a84c;
  transform: scale(1.1);
}

/* Mobile: always show overlay */
@media (hover: none) {
  .item-overlay {
    opacity: 1;
    background: linear-gradient(to top, rgba(0,0,0,0.7) 0%, rgba(0,0,0,0) 50%);
  }
}

/* ============================================================
   VIDEO LIGHTBOX
   ============================================================ */
#video-lightbox {
  position: fixed;
  inset: 0;
  z-index: 999;
  background: rgba(0,0,0,0.95);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

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

#video-lightbox .lightbox-inner {
  position: relative;
  width: 90vw;
  max-width: 1100px;
}

#video-lightbox .lightbox-close {
  position: absolute;
  top: -2.5rem;
  right: 0;
  background: none;
  border: none;
  color: #fff;
  font-size: 2rem;
  cursor: pointer;
  line-height: 1;
  opacity: 0.7;
  transition: opacity 0.2s ease;
  padding: 0.25rem 0.5rem;
}

#video-lightbox .lightbox-close:hover {
  opacity: 1;
}

#video-lightbox .video-container {
  position: relative;
  width: 100%;
  padding-bottom: 56.25%;
  height: 0;
  background: #000;
}

#video-lightbox .video-container iframe,
#video-lightbox .video-container video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: none;
}

/* ============================================================
   SINGLE POST / PROJECT PAGE
   ============================================================ */
.single-project {
  padding-top: 70px; /* clear fixed header */
  min-height: 100vh;
}

.project-hero {
  width: 100%;
  max-height: 70vh;
  overflow: hidden;
  line-height: 0;
}

.project-hero img {
  width: 100%;
  height: 70vh;
  object-fit: cover;
  object-position: center top;
}

.project-content-wrap {
  width: 100%;
  max-width: 860px;
  margin: 0 auto;
  padding: 3rem 1.5rem 5rem;
}

.project-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 1.5rem 2.5rem;
  margin-bottom: 2rem;
  padding-bottom: 2rem;
  border-bottom: 1px solid #1a1a1a;
}

.meta-item {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
}

.meta-label {
  font-size: 0.65rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: #444;
}

.meta-value {
  font-size: 0.875rem;
  color: #aaa;
}

.meta-value a {
  color: #aaa;
  transition: color 0.2s;
}

.meta-value a:hover {
  color: #c9a84c;
}

.project-title {
  font-size: clamp(1.75rem, 5vw, 3.5rem);
  color: #fff;
  margin-bottom: 2rem;
  letter-spacing: -0.03em;
  line-height: 1.05;
}

.project-body {
  font-size: 1rem;
  line-height: 1.85;
  color: #999;
}

.project-body p {
  margin-bottom: 1.5em;
  color: #999;
}

.project-body h2,
.project-body h3,
.project-body h4 {
  color: #fff;
  margin: 2.5rem 0 1rem;
}

.project-body img {
  width: 100%;
  height: auto;
  margin: 2rem 0;
}

.project-body a {
  color: #c9a84c;
  border-bottom: 1px solid rgba(201,168,76,0.3);
  transition: border-color 0.2s;
}

.project-body a:hover {
  border-color: #c9a84c;
}

/* Project prev/next nav */
.project-nav {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 1rem;
  padding: 2rem 1.5rem;
  border-top: 1px solid #1a1a1a;
  max-width: 860px;
  margin: 0 auto;
}

.project-nav a {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  max-width: 45%;
  transition: color 0.2s;
}

.project-nav a:hover {
  color: #c9a84c;
}

.project-nav .nav-direction {
  font-size: 0.65rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: #444;
}

.project-nav .nav-title {
  font-size: 0.9rem;
  color: #aaa;
  line-height: 1.3;
}

.project-nav a:hover .nav-title {
  color: #c9a84c;
}

.project-nav-next {
  text-align: right;
  margin-left: auto;
}

/* ============================================================
   FOOTER
   ============================================================ */
#colophon {
  padding: 1.5rem 2rem;
  border-top: 1px solid #1a1a1a;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.site-info {
  font-size: 0.7rem;
  color: #444;
  letter-spacing: 0.05em;
}

/* ============================================================
   UTILITIES
   ============================================================ */
.screen-reader-text {
  position: absolute !important;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(1px,1px,1px,1px);
  word-wrap: normal !important;
}

.no-posts {
  padding: 8rem 2rem;
  text-align: center;
}

/* ============================================================
   RESPONSIVE — TABLET (768px)
   ============================================================ */
@media (max-width: 1024px) {
  .masonry-grid {
    columns: 2;
  }
}

@media (max-width: 768px) {
  #masthead {
    padding: 1rem 1.25rem;
  }

  .project-hero img {
    height: 45vw;
    min-height: 240px;
  }

  .project-content-wrap {
    padding: 2rem 1.25rem 4rem;
  }

  .project-nav {
    padding: 1.5rem 1.25rem;
    flex-direction: column;
    gap: 1.5rem;
  }

  .project-nav a {
    max-width: 100%;
  }

  .project-nav-next {
    text-align: left;
    margin-left: 0;
  }

  #colophon {
    flex-direction: column;
    text-align: center;
    gap: 0.5rem;
  }
}

/* ============================================================
   RESPONSIVE — MOBILE (480px)
   ============================================================ */
@media (max-width: 480px) {
  .masonry-grid {
    columns: 1;
  }

  #nav-overlay .main-navigation ul li a {
    font-size: 2rem;
  }

  .project-hero img {
    height: 56vw;
  }

  .project-title {
    font-size: 1.75rem;
  }

  .project-content-wrap {
    padding: 1.5rem 1rem 3rem;
  }

  .project-meta {
    gap: 1rem;
  }

  #video-lightbox .lightbox-inner {
    width: 96vw;
  }
}
