/*
Theme Name: Minimal Portfolio
Author: [Your Name]
Description: A clean, gallery-first photography portfolio. One combined gallery on the homepage with header-driven category filtering (logo = all photos; Events / Landscape / Headshots filter). Built from a custom design.
Version: 1.9.1
Requires at least: 6.0
Tested up to: 6.7
*/

:root {
  --cream: #F5F5F5;
  --navy: #1F3A8C;
  --rose: #F2A0B2;
  --ink: #2b2b33;
  --line: #e5e5e5;
  --gutter: 12px;
  --serif: "Leifa", "Fraunces", Georgia, serif;
  --sans: "Schibsted Grotesk", "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono: ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
img { max-width: 100%; display: block; }

body {
  background: var(--cream);
  color: var(--ink);
  font-family: var(--sans);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration: none; }

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: var(--cream);
  border-bottom: 1px solid var(--line);
  display: flex; align-items: center; justify-content: space-between;
  flex-wrap: wrap; gap: 12px 24px; padding: 16px 32px;
}
.brand { display: flex; align-items: center; gap: 12px; cursor: pointer; background: none; border: 0; }
.logo-mark { width: 30px; height: 30px; border-radius: 50%; background: var(--rose); flex: none; }
.wordmark { font-family: var(--serif); font-weight: 700; font-size: 1.35rem; color: var(--navy); letter-spacing: 0.01em; }
.main-nav { display: flex; flex-wrap: wrap; gap: 26px; }
.main-nav a {
  font-size: 0.92rem; color: var(--navy); letter-spacing: 0.02em;
  padding: 4px 0; cursor: pointer; border-bottom: 1px solid transparent;
  transition: border-color 0.2s ease, opacity 0.2s ease;
}
.main-nav a:hover { border-color: var(--navy); }
.main-nav a.active { border-color: var(--navy); font-weight: 600; }
.main-nav a:focus-visible { outline: 2px solid var(--navy); outline-offset: 4px; }

/* ---------- Views ---------- */
.wrap { max-width: 1500px; margin: 0 auto; padding: 0 24px; }
.view { padding: 40px 0 72px; }
.view[hidden] { display: none; }
.fade-in { animation: fade 0.35s ease; }
@keyframes fade { from { opacity: 0; } to { opacity: 1; } }

/* ---------- Collage landing (the gallery's own tiles, gathered then settled) ---------- */
#gallery-view.with-hero { padding-top: 105vh; }
.hero-phrase {
  position: fixed; top: 16vh; left: 50%; transform: translateX(-50%);
  z-index: 5; width: min(90vw, 880px); text-align: center;
  font-family: var(--serif); font-weight: 600; color: var(--navy);
  font-size: clamp(1.8rem, 4.4vw, 3.4rem); line-height: 1.2;
  pointer-events: none;
}
.hero-phrase[hidden] { display: none; }
.scroll-hint {
  position: fixed; bottom: 26px; left: 50%; transform: translateX(-50%);
  z-index: 5; font-family: var(--sans); font-size: 0.66rem;
  letter-spacing: 0.25em; text-transform: uppercase; color: #a39c90; pointer-events: none;
}
.scroll-hint[hidden] { display: none; }
.tile.morph { position: relative; z-index: 8; box-shadow: 0 10px 34px rgba(40,38,60,0.12); will-change: transform; }
.tile.settled { box-shadow: none; z-index: auto; }

/* ---------- Masonry gallery ---------- */
.masonry { column-count: 3; column-gap: var(--gutter); }
.tile {
  display: block; width: 100%; margin: 0 0 var(--gutter);
  padding: 0; border: 0; cursor: pointer; overflow: hidden;
  break-inside: avoid; background: none; line-height: 0;
}
.ph { width: 100%; height: auto; display: block; border-radius: 2px; transition: transform 0.4s ease, opacity 0.4s ease; }
.tile:hover .ph { opacity: 0.88; transform: scale(1.02); }
.tile:focus-visible { outline: 2px solid var(--navy); outline-offset: 3px; }
.gallery-empty { color: #7a766c; font-size: 0.95rem; padding: 8px 0 24px; }

/* ---------- About ---------- */
.section-title { font-family: var(--serif); font-weight: 600; font-size: clamp(1.6rem, 3vw, 2.4rem); color: var(--navy); margin-bottom: 28px; }
.about-grid { display: grid; grid-template-columns: 240px 1fr; gap: 48px; align-items: start; }
.headshot { width: 100%; aspect-ratio: 4/5; border-radius: 2px; }
.about-body { max-width: 56ch; }
.about-body p { margin-bottom: 1rem; font-size: 1.05rem; }
.lede { font-family: var(--serif); font-size: clamp(1.3rem, 2.5vw, 1.8rem); color: var(--navy); line-height: 1.35; margin-bottom: 1.5rem; }

/* ---------- Contact ---------- */
.contact-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 48px; }
.field { margin-bottom: 18px; }
.field label { display: block; font-size: 0.82rem; color: var(--navy); margin-bottom: 6px; letter-spacing: 0.02em; }
.field input, .field textarea { width: 100%; padding: 12px 14px; font: inherit; color: var(--ink); background: #fff; border: 1px solid var(--line); border-radius: 2px; }
.field input:focus, .field textarea:focus { outline: 2px solid var(--rose); border-color: var(--rose); }
.btn { font: inherit; font-weight: 600; cursor: pointer; background: var(--navy); color: var(--cream); border: 0; border-radius: 2px; padding: 12px 28px; transition: opacity 0.2s ease; }
.btn:hover { opacity: 0.88; }
.contact-detail { font-size: 1.05rem; }
.contact-detail a { color: var(--navy); border-bottom: 1px solid var(--rose); }
.form-status { margin-top: 12px; font-size: 0.92rem; color: var(--navy); min-height: 1.2em; }

/* ---------- Footer ---------- */
.site-footer { border-top: 1px solid var(--line); padding: 32px 0; font-size: 0.85rem; color: #7a766c; }
.site-footer .wrap { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 12px; }

/* ---------- Lightbox (editorial, no arrows) ---------- */
.lightbox { position: fixed; inset: 0; z-index: 100; background: #F5F5F5; display: none; align-items: center; justify-content: center; padding: 24px; }
.lightbox.open { display: flex; }
.lb-meta { position: absolute; top: 22px; left: 26px; max-width: 240px; font-family: var(--sans); font-size: 0.72rem; line-height: 1.55; letter-spacing: 0.03em; text-transform: uppercase; color: #111; }
.lb-count { margin-bottom: 20px; }
.lb-info .lb-title { margin-bottom: 8px; }
.lb-close { position: absolute; top: 22px; right: 26px; background: none; border: 0; cursor: pointer; font-family: var(--sans); font-size: 0.72rem; letter-spacing: 0.03em; text-transform: uppercase; color: #111; }
.lb-close:hover { opacity: 0.6; }
.lb-close:focus-visible, .lb-stage:focus-visible { outline: 2px solid var(--navy); outline-offset: 3px; }
.lb-stage { display: flex; align-items: center; justify-content: center; max-width: min(64vw, 1000px); max-height: 82vh; cursor: pointer; }
.lb-img { width: 100%; max-height: 82vh; object-fit: contain; background: #fff; border: 1px solid #e3e3e3; }
.lb-img[hidden] { display: none; }
@media (max-width: 760px) {
  .lightbox { flex-direction: column; padding-top: 120px; }
  .lb-meta { position: static; max-width: none; margin-bottom: 14px; }
  .lb-stage { max-width: 92vw; }
}

/* ---------- Responsive ---------- */
@media (max-width: 1000px) {
  .masonry { column-count: 2; }
  .about-grid { grid-template-columns: 160px 1fr; gap: 28px; }
  .contact-grid { grid-template-columns: 1fr; }
}
@media (max-width: 620px) {
  .site-header { padding: 14px 18px; }
  .about-grid { grid-template-columns: 1fr; }
  .headshot { max-width: 220px; }
  .lb-prev { left: 8px; } .lb-next { right: 8px; }
}
@media (prefers-reduced-motion: reduce) { *, .fade-in { animation: none !important; transition: none !important; } }

/* ---------- v1.2: mobile header + hamburger ---------- */
.nav-toggle { display: none; background: none; border: 0; cursor: pointer; padding: 8px; }
.nav-toggle span { display: block; width: 22px; height: 2px; background: var(--navy); margin: 5px 0; transition: transform 0.25s ease, opacity 0.25s ease; }
.nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

@media (max-width: 760px) {
  .site-header { flex-wrap: nowrap; padding: 12px 18px; }
  .nav-toggle { display: block; }
  .main-nav {
    display: none;
    position: absolute; top: 100%; left: 0; right: 0;
    background: var(--cream); border-bottom: 1px solid var(--line);
    flex-direction: column; gap: 0; padding: 6px 0 12px;
    box-shadow: 0 14px 30px rgba(40,38,60,0.08);
  }
  .main-nav.open { display: flex; }
  .main-nav a { padding: 12px 24px; font-size: 1rem; }
  .hero-phrase { font-size: clamp(1.35rem, 6.2vw, 2.1rem); width: 92vw; }
}

/* ---------- v1.2: hold-to-drag collage tiles ---------- */
.tile.morph { cursor: grab; touch-action: pan-y; user-select: none; -webkit-user-select: none; }
.tile.morph.dragging { cursor: grabbing; z-index: 40; box-shadow: 0 18px 50px rgba(40,38,60,0.22); }
.tile.morph.dragging .ph { opacity: 1; }

/* ---------- v1.3: brand fonts & buttons ---------- */
@font-face {
  font-family: "Leifa";
  src: url("assets/fonts/Leifa-ExtraBold.woff2") format("woff2"),
       url("assets/fonts/Leifa-ExtraBold.woff") format("woff"),
       url("assets/fonts/Leifa-ExtraBold.otf") format("opentype");
  font-weight: 800;
  font-style: normal;
  font-display: swap;
}
.wordmark, .hero-phrase, .section-title { font-weight: 800; }

/* Buttons: pink, blue text */
.btn { background: var(--rose); color: var(--navy); }
.btn:hover { opacity: 0.85; }

/* Resume button: white, outlined */
.btn-resume {
  display: inline-block; margin-top: 10px;
  background: var(--cream); color: var(--navy);
  border: 1px solid var(--navy); border-radius: 2px;
  padding: 12px 28px; font-weight: 600; line-height: 1.6;
  transition: background 0.2s ease, color 0.2s ease;
}
.btn-resume:hover { background: var(--navy); color: var(--cream); }

/* ---------- v1.4: block-editor pages rendered in the theme ---------- */
.page-view .entry-content { max-width: 760px; }
.entry-content p { margin-bottom: 1.1rem; font-size: 1.05rem; }
.entry-content h2, .entry-content h3, .entry-content h4 {
  font-family: var(--serif); font-weight: 800; color: var(--navy);
  margin: 2rem 0 0.8rem; line-height: 1.25;
}
.entry-content h2 { font-size: 1.7rem; }
.entry-content h3 { font-size: 1.35rem; }
.entry-content a { color: var(--navy); border-bottom: 1px solid var(--rose); }
.entry-content ul, .entry-content ol { margin: 0 0 1.1rem 1.3rem; }
.entry-content li { margin-bottom: 0.4rem; }
.entry-content img { border-radius: 2px; height: auto; }
.entry-content figure { margin: 1.6rem 0; }
.entry-content figcaption { font-size: 0.85rem; color: #7a7a7a; margin-top: 6px; }
.entry-content blockquote {
  border-left: 2px solid var(--rose); padding-left: 18px; margin: 1.6rem 0;
  font-family: var(--serif); color: var(--navy); font-size: 1.15rem;
}
.entry-content .wp-block-button__link {
  background: var(--rose); color: var(--navy); border-radius: 2px;
  font-weight: 600; text-decoration: none; border-bottom: 0;
}


/* ---------- v1.8: collage fixes ---------- */
.tile img { -webkit-user-drag: none; user-drag: none; -webkit-user-select: none; user-select: none; }

/* ---------- v1.9: real logo + editable text + working contact form ---------- */
.logo-img { height: 36px; width: auto; max-width: 200px; object-fit: contain; }
img.headshot { object-fit: cover; }

/* ---------- v1.9.1: constrain the About headshot ---------- */
.about-grid .headshot,
img.headshot {
  display: block;
  width: 100%;
  max-width: 240px;
  height: auto;
  aspect-ratio: 4 / 5;
  object-fit: cover;   /* fills the frame, crops overflow neatly */
  border-radius: 2px;
}
@media (max-width: 620px) {
  .about-grid .headshot, img.headshot { max-width: 200px; }
}
