/*
Theme Name: Portfolio — Photographer & Videographer
Theme URI: https://yoursite.com
Author: Your Name
Description: A minimal, image-forward portfolio theme for photographers and videographers. White primary, dark grey secondary.
Version: 1.6
License: GNU General Public License v2 or later
Text Domain: portfolio-pv
*/

/* ─── Variables ──────────────────────────────────────────────── */
:root {
  --white:       #ffffff;
  --dark:        #1e1e1e;
  --mid:         #7a7a7a;
  --muted:       #b0b0b0;
  --light-grey:  #f2f2f2;
  --rule:        #e0e0e0;

  --sidebar-w:   220px;
  --header-h:    58px;

  --font-display: 'Outfit', Helvetica, sans-serif;
  --font-body:    'DM Sans', Helvetica, sans-serif;

  --ease: cubic-bezier(0.4, 0, 0.2, 1);
}

/* ─── Reset ──────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 16px; -webkit-font-smoothing: antialiased; }
body {
  font-family: var(--font-body);
  background: var(--white);
  color: var(--dark);
  min-height: 100vh;
}
a { color: inherit; text-decoration: none; }
img, video { max-width: 100%; display: block; }
ul { list-style: none; }

/* ─── Google Fonts loaded via functions.php ──────────────────── */

/* ─── Outer centering wrapper ────────────────────────────────── */
body {
  background: var(--white);
}

#page-outer {
  max-width: 1000px;
  margin: 0 auto;
  min-height: 100vh;
  box-shadow: 0 0 60px rgba(0,0,0,0.06);
}

/* ─── Layout Shell ───────────────────────────────────────────── */
#page-wrapper {
  display: grid;
  grid-template-columns: var(--sidebar-w) 1fr;
  grid-template-rows: var(--header-h) 1fr;
  grid-template-areas:
    "header  header"
    "sidebar main";
  min-height: 100vh;
}

/* ─── Header ─────────────────────────────────────────────────── */
#site-header {
  grid-area: header;
  display: flex;
  align-items: center;
  padding: 0 40px;
  position: sticky;
  top: 0;
  background: var(--white);
  z-index: 100;
}

.site-title {
  font-family: var(--font-display);
  font-size: 1.1rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  color: var(--dark);
}
.site-title a { color: inherit; }
.site-title .title-dot {
  color: var(--mid);
  margin-left: 1px;
  font-weight: 400;
}

/* Mobile menu toggle — hidden on desktop */
.menu-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
  margin-left: auto;
}
.menu-toggle span {
  display: block;
  width: 22px;
  height: 1px;
  background: var(--dark);
  margin: 5px 0;
  transition: all 0.3s var(--ease);
}

/* ─── Sidebar ────────────────────────────────────────────────── */
#sidebar {
  grid-area: sidebar;
  padding: 40px 32px;
  position: sticky;
  top: var(--header-h);
  height: calc(100vh - var(--header-h));
  overflow-y: auto;
  display: flex;
  flex-direction: column;
}

/* Scrollbar styling */
#sidebar::-webkit-scrollbar { width: 3px; }
#sidebar::-webkit-scrollbar-track { background: transparent; }
#sidebar::-webkit-scrollbar-thumb { background: var(--rule); border-radius: 2px; }

.nav-label {
  font-family: var(--font-body);
  font-size: 0.65rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 14px;
}

.project-nav ul {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.project-nav li a {
  display: block;
  font-family: var(--font-body);
  font-size: 0.88rem;
  font-weight: 400;
  color: var(--dark);
  padding: 6px 0;
  border-bottom: 1px solid transparent;
  transition: color 0.2s var(--ease), padding-left 0.2s var(--ease);
  line-height: 1.4;
}

.project-nav li a:hover {
  color: var(--mid);
  padding-left: 5px;
}

/* Active state — minimal: just a slight indent + colour shift */
.project-nav li.current-menu-item a,
.project-nav li.current_page_item a {
  color: var(--mid);
  padding-left: 5px;
}

/* ─── Main Content ────────────────────────────────────────────── */
#main-content {
  grid-area: main;
  padding: 56px 64px 80px;
  max-width: 1100px;
}

/* ─── Page / Post Header ─────────────────────────────────────── */
.entry-header {
  margin-bottom: 48px;
  padding-bottom: 32px;
}

.entry-title {
  font-family: var(--font-display);
  font-size: clamp(1.8rem, 4vw, 2.4rem);
  font-weight: 600;
  line-height: 1.1;
  letter-spacing: -0.01em;
  color: var(--dark);
  margin-bottom: 14px;
}

.entry-meta {
  font-size: 0.72rem;
  font-weight: 500;
  color: var(--mid);
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

/* ─── Project Content ────────────────────────────────────────── */
.entry-content {
  font-size: 0.92rem;
  line-height: 1.85;
  font-weight: 400;
  color: var(--dark);
}

.entry-content p { margin-bottom: 1.4em; }
.entry-content h2 {
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 600;
  margin: 2em 0 0.6em;
}
.entry-content h3 {
  font-family: var(--font-display);
  font-size: 1.15rem;
  font-weight: 600;
  margin: 1.6em 0 0.5em;
  color: var(--mid);
}
.entry-content blockquote {
  border-left: 1px solid var(--rule);
  padding-left: 24px;
  margin: 2em 0;
  font-size: 1.05rem;
  font-style: normal;
  font-weight: 300;
  color: var(--mid);
}

/* ─── Image Gallery / Grid ───────────────────────────────────── */
.project-gallery {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
  margin: 40px 0;
}

.project-gallery .gallery-full {
  grid-column: 1 / -1;
}

.project-gallery figure {
  overflow: hidden;
  background: var(--light-grey);
}

.project-gallery figure img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.6s var(--ease), opacity 0.4s var(--ease);
  opacity: 0.92;
}

.project-gallery figure:hover img {
  transform: scale(1.02);
  opacity: 1;
}

/* WordPress default gallery override */
.gallery {
  display: grid !important;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)) !important;
  gap: 10px !important;
  margin: 32px 0 !important;
}
.gallery-item {
  margin: 0 !important;
  overflow: hidden;
}
.gallery-item img {
  width: 100%;
  object-fit: cover;
  transition: transform 0.5s var(--ease);
}
.gallery-item:hover img { transform: scale(1.03); }

/* Single image */
.entry-content img {
  width: 100%;
  height: auto;
  margin: 24px 0;
}

/* ─── Video Embed ────────────────────────────────────────────── */
.wp-block-embed,
.video-wrap {
  position: relative;
  padding-bottom: 56.25%;
  height: 0;
  overflow: hidden;
  margin: 32px 0;
  background: var(--dark);
}

.wp-block-embed iframe,
.video-wrap iframe {
  position: absolute;
  top: 0; left: 0;
  width: 100%; height: 100%;
  border: 0;
}

/* ─── Homepage / Archive ─────────────────────────────────────── */
.projects-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
}

/* First project card spans full width */
.project-card--wide {
  grid-column: 1 / -1;
  aspect-ratio: 16 / 7 !important;
}

.project-card {
  position: relative;
  overflow: hidden;
  background: var(--light-grey);
  aspect-ratio: 4/3;
  cursor: pointer;
}

.project-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.7s var(--ease), opacity 0.4s var(--ease);
}

.project-card-overlay {
  position: absolute;
  inset: 0;
  background: rgba(30,30,30,0);
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 24px;
  transition: background 0.4s var(--ease);
}

.project-card:hover .project-card-overlay {
  background: rgba(30,30,30,0.55);
}

.project-card:hover img {
  transform: scale(1.04);
  opacity: 0.9;
}

.project-card-title {
  font-family: var(--font-display);
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--white);
  transform: translateY(8px);
  opacity: 0;
  transition: all 0.35s var(--ease);
  letter-spacing: 0.01em;
}

.project-card:hover .project-card-title {
  transform: translateY(0);
  opacity: 1;
}

.project-card-meta {
  font-size: 0.68rem;
  font-weight: 400;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.65);
  margin-top: 4px;
  transform: translateY(8px);
  opacity: 0;
  transition: all 0.4s var(--ease) 0.05s;
}

.project-card:hover .project-card-meta {
  transform: translateY(0);
  opacity: 1;
}

/* ─── Contact page ───────────────────────────────────────────── */
.contact-block { margin-bottom: 22px; }
.contact-label {
  font-size: 0.62rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 5px;
}
.contact-value {
  font-size: 0.95rem;
  font-weight: 400;
  color: var(--dark);
  line-height: 1.5;
}
.contact-value a {
  color: var(--dark);
  border-bottom: 1px solid var(--rule);
  transition: border-color 0.2s;
}
.contact-value a:hover { border-color: var(--dark); }

.pv-contact-form input,
.pv-contact-form textarea {
  width: 100%;
  padding: 10px 14px;
  border: 1px solid var(--rule);
  font-family: var(--font-body);
  font-size: 0.88rem;
  font-weight: 400;
  color: var(--dark);
  background: var(--white);
  transition: border-color 0.2s;
  outline: none;
  border-radius: 0;
}
.pv-contact-form input:focus,
.pv-contact-form textarea:focus { border-color: var(--mid); }
.pv-contact-form button {
  padding: 10px 24px;
  background: var(--dark);
  color: var(--white);
  border: none;
  font-family: var(--font-body);
  font-size: 0.74rem;
  font-weight: 600;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  cursor: pointer;
  transition: background 0.2s;
}
.pv-contact-form button:hover { background: var(--mid); }

/* ─── Wishlist page ──────────────────────────────────────────── */
.wishlist-section { margin-bottom: 36px; }
.wishlist-section-title {
  font-size: 0.65rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 14px;
}
.wishlist-item {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 16px;
  padding: 14px 0;
  border-bottom: 1px solid #f0f0f0;
  align-items: start;
}
.wishlist-item-name {
  font-size: 0.92rem;
  font-weight: 600;
  color: var(--dark);
  margin-bottom: 3px;
}
.wishlist-item-desc {
  font-size: 0.8rem;
  font-weight: 400;
  color: var(--mid);
}
.wishlist-item-price {
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--mid);
  white-space: nowrap;
}

/* ─── Sidebar secondary nav + copyright ──────────────────────── */
.sidebar-secondary-nav {
  margin-top: 24px;
  padding-top: 20px;
  border-top: 1px solid var(--rule);
}

.sidebar-secondary-nav a {
  display: block;
  font-size: 0.82rem;
  font-weight: 400;
  color: var(--mid);
  padding: 5px 0;
  transition: color 0.2s var(--ease), padding-left 0.2s var(--ease);
}

.sidebar-secondary-nav a:hover,
.sidebar-secondary-nav li.current-menu-item a {
  color: var(--dark);
  padding-left: 4px;
}

.sidebar-copyright {
  margin-top: 20px;
  font-size: 0.65rem;
  color: #c0c0c0;
  letter-spacing: 0.03em;
}

/* ─── Responsive ─────────────────────────────────────────────── */
@media (max-width: 900px) {
  :root { --sidebar-w: 200px; }
  #main-content { padding: 40px 40px 60px; }
}

@media (max-width: 700px) {
  #page-wrapper {
    grid-template-columns: 1fr;
    grid-template-rows: var(--header-h) auto 1fr;
    grid-template-areas:
      "header"
      "sidebar"
      "main";
  }

  #sidebar {
    position: relative;
    top: 0;
    height: auto;
    max-height: 0;
    overflow: hidden;
    padding: 0 24px;
    border-right: none;
    transition: max-height 0.4s var(--ease), padding 0.3s var(--ease);
  }

  #sidebar.is-open {
    max-height: 700px;
    padding: 28px 24px;
  }

  #site-header { padding: 0 24px; }
  .menu-toggle { display: block; }

  #main-content { padding: 32px 24px 48px; }

  .project-gallery { grid-template-columns: 1fr; }

  .projects-grid { grid-template-columns: 1fr; }
}

/* ─── Fade-in on load ─────────────────────────────────────────── */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(16px); }
  to   { opacity: 1; transform: translateY(0); }
}

.entry-header  { animation: fadeUp 0.5s var(--ease) both; }
.entry-content { animation: fadeUp 0.5s var(--ease) 0.08s both; }
.projects-grid { animation: fadeUp 0.5s var(--ease) 0.06s both; }
