/*
Theme Name: Bold Portfolio
Theme URI: 
Author: Custom
Description: A dark, bold masonry grid portfolio theme for creatives.
Version: 1.0
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
   ============================================================ */
#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;
}

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

#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.4s ease;
}

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

#nav-overlay .main-navigation ul {
  text-align: center;
}

#nav-overlay .main-navigation ul li {
  margin: 1rem 0;
}

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

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

/* ============================================================
   MAIN CONTENT AREA
   ============================================================ */
#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;
  cursor: pointer;
}

.grid-item .post-thumb {
  position: relative;
  overflow: hidden;
  line-height: 0;
}

.grid-item .post-thumb 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:hover .post-thumb img {
  transform: scale(1.05);
  opacity: 0.3;
}

/* Overlay */
.grid-item .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.4s ease;
}

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

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

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

/* Always-visible title on mobile */
.grid-item .item-title-bar {
  display: none;
  background: #111;
  padding: 0.75rem 1rem;
}

.grid-item .item-title-bar .item-title {
  font-size: 0.9rem;
  color: #fff;
}

/* ============================================================
   SINGLE POST / PROJECT PAGE
   ============================================================ */
.single-project {
  padding-top: 80px;
}

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

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

.project-content-wrap {
  max-width: 860px;
  margin: 0 auto;
  padding: 4rem 2rem;
}

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

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

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

.project-meta .meta-value {
  font-size: 0.9rem;
  color: #ccc;
}

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

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

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

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

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

/* Project navigation */
.project-nav {
  display: flex;
  justify-content: space-between;
  padding: 2rem;
  border-top: 1px solid #1a1a1a;
  margin-top: 4rem;
}

.project-nav a {
  font-size: 0.75rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #555;
  transition: color 0.2s ease;
}

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

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

.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;
}

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

@media (max-width: 600px) {
  .masonry-grid {
    columns: 1;
  }

  #masthead {
    padding: 1rem 1.25rem;
  }

  .grid-item .item-overlay {
    opacity: 1;
    background: linear-gradient(to top, rgba(0,0,0,0.75) 0%, rgba(0,0,0,0) 50%);
  }

  .grid-item .post-thumb img {
    transform: none !important;
    opacity: 1 !important;
  }

  .project-meta {
    flex-wrap: wrap;
    gap: 1rem;
  }

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