/*
Theme Name: Amanda Chao Photography
Theme URI: https://amandachao.ca
Author: Amanda Chao
Author URI: https://amandachao.ca
Description: A minimal documentary photography portfolio theme with a filmstrip and grid work view, an About page and a Contact page. Photos are managed as a custom post type ("Photos") so they're editable from wp-admin without touching code.
Version: 1.0
Requires at least: 6.0
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: amanda-chao-photography
*/

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --cream:    #F1EEE6;
  --ink:      #161412;
  --line:     rgba(22,20,18,0.12);
  --dim:      rgba(22,20,18,0.45);
  --burgundy: #6B2737;
}

html { scroll-behavior: smooth; }

body {
  background: var(--cream);
  color: var(--ink);
  font-family: 'Outfit', sans-serif;
  font-weight: 300;
  font-size: 13px;
  letter-spacing: 0.02em;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }

/* ── SCROLL REVEAL (shared utility) ── */
.reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.8s cubic-bezier(0.16, 1, 0.3, 1), transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}
.reveal.is-visible { opacity: 1; transform: translateY(0); }
@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
}

/* ── HEADER (shared) ── */
header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 2.2rem 3vw 1.6rem;
  flex-wrap: wrap;
  gap: 1.2rem;
}
.logo {
  font-family: 'Marcellus', serif;
  font-style: normal;
  font-weight: 400;
  font-size: 1.7rem;
  letter-spacing: 0.02em;
}
.logo:hover { opacity: 0.7; }

nav { display: flex; align-items: center; gap: 2.4rem; }
.nav-links { display: flex; gap: 2.2rem; list-style: none; }
.nav-links a {
  font-size: 0.92rem; letter-spacing: 0.04em;
  transition: color 0.25s, border-color 0.25s; padding-bottom: 2px;
  border-bottom: 1px solid transparent;
}
.nav-links a:hover { color: var(--burgundy); border-bottom-color: var(--burgundy); }
.nav-links .current-menu-item a, .nav-links a.active {
  border-bottom-color: var(--ink);
}
.socials { display: flex; gap: 1.2rem; align-items: center; }
.socials a { display: flex; color: var(--ink); transition: color 0.25s; }
.socials a:hover { color: var(--burgundy); }
.socials svg { width: 17px; height: 17px; }

/* ── FOOTER (shared) ── */
footer {
  padding: 2rem 3vw 2.4rem;
  border-top: 1px solid var(--line);
  display: flex; justify-content: flex-end; align-items: center;
  flex-wrap: wrap; gap: 1rem;
  font-size: 0.8rem; color: var(--dim);
}
footer .accent {
  font-family: 'Cormorant Garamond', serif; font-style: italic;
  font-size: 1.3rem; color: var(--ink); letter-spacing: 0.02em;
}

@media (max-width: 720px) {
  body { font-size: 12px; }
  header { padding: 1.6rem 5vw 1.2rem; }
  .nav-links { gap: 1.4rem; }
  .nav-links a { font-size: 0.82rem; }
  .socials { gap: 0.9rem; }
  footer { padding: 2rem 5vw; flex-direction: column; align-items: flex-start; }
}

/* ══════════════════════════════════════
   VIEW TOGGLE (Filmstrip / Grid switch)
   ══════════════════════════════════════ */
.view-toggle {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0 3vw 0.8rem;
  justify-content: flex-end;
}
.view-toggle-btn {
  background: none;
  border: none;
  color: var(--dim);
  font-family: 'Outfit', sans-serif;
  font-size: 0.78rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  cursor: pointer;
  padding: 0.2rem 0;
  border-bottom: 1px solid transparent;
  transition: color 0.2s, border-color 0.2s;
}
.view-toggle-btn:hover { color: var(--ink); }
.view-toggle-btn.is-active { color: var(--burgundy); border-bottom-color: var(--burgundy); }
.view-toggle-divider { color: var(--line); font-size: 0.78rem; }

/* ══════════════════════════════════════
   WORK — FILMSTRIP TEMPLATE
   ══════════════════════════════════════ */
main.strip-main {
  flex: 1;
  display: flex;
  align-items: center;
  overflow-x: auto;
  overflow-y: hidden;
  padding: 3vh 0;
  scrollbar-width: none;
}
main.strip-main::-webkit-scrollbar { display: none; }

.strip { display: flex; gap: 0.6rem; padding: 0 3vw; margin: 0 auto; }

.cell {
  position: relative;
  flex: 0 0 auto;
  width: min(46vw, 420px);
  aspect-ratio: 3 / 4;
  overflow: hidden;
  background: #ddd8cc;
  cursor: default;
}
.cell img {
  width: 100%; height: 100%; display: block; object-fit: cover;
  filter: saturate(0.95) contrast(1.02);
  transition: filter 0.5s ease;
}
.cell:hover img { filter: saturate(1.04) contrast(1.0); }

.cell-tag {
  position: absolute; left: 0; bottom: 0; right: 0;
  padding: 0.8rem 0.9rem;
  background: linear-gradient(to top, rgba(22,20,18,0.55), transparent);
  color: var(--cream);
  font-size: 0.7rem; letter-spacing: 0.14em; text-transform: uppercase;
  opacity: 0; transform: translateY(6px);
  transition: opacity 0.35s, transform 0.35s;
  pointer-events: none;
}
.cell:hover .cell-tag { opacity: 1; transform: translateY(0); }

.scroll-hint {
  position: fixed; bottom: 1.8rem; left: 50%; transform: translateX(-50%);
  display: flex; gap: 0.5rem; align-items: center;
  color: var(--dim);
  font-style: italic; font-family: 'Cormorant Garamond', serif; font-size: 1.05em;
  letter-spacing: 0.04em; pointer-events: none;
  opacity: 1; transition: opacity 0.6s ease;
}
.scroll-hint.hidden { opacity: 0; }
.scroll-hint .arrow { display: inline-block; animation: nudge 1.8s ease-in-out infinite; }
@keyframes nudge { 0%, 100% { transform: translateX(0); } 50% { transform: translateX(6px); } }

.filmstrip-nav-arrow {
  position: fixed;
  top: 50%;
  transform: translateY(-50%);
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: rgba(241, 238, 230, 0.85);
  border: 1px solid var(--line);
  color: var(--ink);
  font-size: 1.6rem;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  opacity: 0.85;
  z-index: 500;
  transition: opacity 0.2s, color 0.2s;
}
.filmstrip-nav-arrow:hover { opacity: 1; color: var(--burgundy); }
.filmstrip-nav-prev { left: 1rem; }
.filmstrip-nav-next { right: 1rem; }
@media (max-width: 720px) {
  .filmstrip-nav-arrow { display: none; }
}

@media (max-width: 720px) {
  .cell { width: min(72vw, 320px); aspect-ratio: 3 / 4; }
  .scroll-hint { bottom: auto; top: 5vh; left: auto; right: 1.1rem; transform: none; }
}

/* ══════════════════════════════════════
   WORK — GRID TEMPLATE
   ══════════════════════════════════════ */
.photo-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0.6rem;
  padding: 1rem 3vw 4rem;
}
.photo-grid figure {
  position: relative; overflow: hidden; background: #ddd8cc;
  aspect-ratio: 3 / 4;
}
.photo-grid figure img {
  width: 100%; height: 100%; object-fit: cover; display: block;
  filter: saturate(0.95) contrast(1.02);
  transition: filter 0.5s ease, transform 0.6s ease;
}
.photo-grid figure:hover img { filter: saturate(1.04) contrast(1.0); transform: scale(1.015); }
.photo-grid figure figcaption {
  position: absolute; left: 0; bottom: 0; right: 0;
  padding: 0.8rem 0.9rem;
  background: linear-gradient(to top, rgba(22,20,18,0.55), transparent);
  color: var(--cream);
  font-size: 0.7rem; letter-spacing: 0.14em; text-transform: uppercase;
  opacity: 0; transform: translateY(6px);
  transition: opacity 0.35s, transform 0.35s;
  pointer-events: none;
}
.photo-grid figure:hover figcaption { opacity: 1; transform: translateY(0); }

.photo-grid figure.reveal:nth-child(4n+1) { transition-delay: 0s; }
.photo-grid figure.reveal:nth-child(4n+2) { transition-delay: 0.06s; }
.photo-grid figure.reveal:nth-child(4n+3) { transition-delay: 0.12s; }
.photo-grid figure.reveal:nth-child(4n+4) { transition-delay: 0.18s; }

@media (max-width: 720px) {
  .photo-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 0.4rem; padding: 1rem 5vw 3rem;
  }
}

/* ══════════════════════════════════════
   ABOUT TEMPLATE
   ══════════════════════════════════════ */
main.about-main {
  flex: 1;
  display: grid;
  grid-template-columns: 1fr 1.25fr;
  gap: 5vw;
  align-items: center;
  padding: 1rem 3vw 5rem;
  max-width: 1400px;
  margin: 0 auto;
}
.about-img { aspect-ratio: 4/5; overflow: hidden; background: #ddd8cc; }
.about-img img { width: 100%; height: 100%; object-fit: cover; filter: saturate(0.95) contrast(1.02); }
.about-label {
  font-size: 0.78rem; letter-spacing: 0.24em; text-transform: uppercase;
  color: var(--dim); margin-bottom: 1.4rem;
}
.about-title {
  font-family: 'Cormorant Garamond', serif; font-style: italic; font-weight: 400;
  font-size: clamp(2.4rem, 5vw, 4rem); line-height: 1.15; margin-bottom: 1.8rem;
}
.about-main p { font-size: 1.05rem; line-height: 2; color: #3a2820; max-width: 52ch; margin-bottom: 1.4rem; }
.about-main p strong {
  font-weight: 400; color: var(--ink);
  font-family: 'Cormorant Garamond', serif; font-style: italic; font-size: 1.15em;
}
.gear-line { display: flex; flex-wrap: wrap; gap: 0.6rem; margin-top: 2rem; }
.gear-pill {
  font-size: 0.72rem; letter-spacing: 0.1em; text-transform: uppercase;
  color: #6a5a4f; border: 1px solid var(--line);
  padding: 0.4rem 1rem; border-radius: 2px;
}

@media (max-width: 860px) {
  main.about-main { grid-template-columns: 1fr; gap: 2.4rem; padding-top: 2rem; }
  .about-img { aspect-ratio: 4/3; }
}
@media (max-width: 720px) {
  main.about-main { padding: 1rem 5vw 4rem; }
}

/* ══════════════════════════════════════
   CONTACT TEMPLATE
   ══════════════════════════════════════ */
main.contact-main {
  flex: 1;
  display: flex; flex-direction: column;
  justify-content: center; align-items: center; text-align: center;
  padding: 3.5rem 5vw 2rem;
}

.contact-label {
  font-size: 0.78rem; letter-spacing: 0.24em; text-transform: uppercase;
  color: var(--dim); margin-bottom: 1.6rem;
}
.contact-title {
  font-family: 'Cormorant Garamond', serif; font-style: italic; font-weight: 400;
  font-size: clamp(1.9rem, 4.2vw, 3.2rem); line-height: 1.2;
  margin-bottom: 1.5rem; max-width: 18ch;
}
.contact-main .lede { font-size: 0.95rem; line-height: 1.85; color: #3a2820; max-width: 44ch; margin: 0 auto 2rem; }
.contact-main .lede p { max-width: none; margin-bottom: 0; }
.contact-email {
  display: inline-flex; align-items: center; gap: 1rem;
  font-family: 'Cormorant Garamond', serif; font-style: italic;
  font-size: clamp(1.4rem, 3vw, 2rem);
  color: var(--ink); text-decoration: none;
  border-bottom: 1px solid var(--ink); padding-bottom: 0.5rem;
  transition: color 0.25s, border-color 0.25s, gap 0.3s;
}
.contact-email:hover { color: var(--burgundy); border-color: var(--burgundy); gap: 1.5rem; }
.contact-meta {
  margin-top: 3.5rem;
  display: flex; flex-direction: column; gap: 0.7rem;
  font-size: 0.85rem; letter-spacing: 0.06em; color: var(--dim);
}
.contact-meta a { transition: color 0.25s; }
.contact-meta a:hover { color: var(--ink); }

@media (max-width: 720px) {
  main.contact-main { padding: 3rem 5vw 1.5rem; }
}

.contact-strip-wrap {
  position: relative;
  padding: 0 3vw 3.5rem;
}
.contact-strip {
  display: flex;
  gap: 0.5rem;
  overflow-x: auto;
  scrollbar-width: none;
}
.contact-strip::-webkit-scrollbar { display: none; }
.contact-strip-arrow {
  position: absolute;
  top: 0;
  bottom: 3.5rem;
  width: 2.4rem;
  background: linear-gradient(to right, var(--cream) 40%, transparent);
  border: none;
  color: var(--ink);
  font-size: 1.8rem;
  line-height: 1;
  cursor: pointer;
  opacity: 0.7;
  transition: opacity 0.2s, color 0.2s;
  z-index: 2;
}
.contact-strip-arrow:hover { opacity: 1; color: var(--burgundy); }
.contact-strip-prev { left: 0; text-align: left; padding-left: 0.5rem; }
.contact-strip-next {
  right: 0; text-align: right; padding-right: 0.5rem;
  background: linear-gradient(to left, var(--cream) 40%, transparent);
}
.contact-strip-cell {
  flex: 0 0 auto;
  width: min(28vw, 240px);
  aspect-ratio: 3 / 4;
  overflow: hidden;
  background: #ddd8cc;
}
.contact-strip-cell img {
  width: 100%; height: 100%; object-fit: cover; display: block;
  filter: saturate(0.95) contrast(1.02);
  transition: filter 0.4s ease, transform 0.5s ease;
  cursor: zoom-in;
}
.contact-strip-cell:hover img {
  filter: saturate(1.04) contrast(1.0);
  transform: scale(1.03);
}
.contact-strip-cell.reveal:nth-child(4n+1) { transition-delay: 0s; }
.contact-strip-cell.reveal:nth-child(4n+2) { transition-delay: 0.06s; }
.contact-strip-cell.reveal:nth-child(4n+3) { transition-delay: 0.12s; }
.contact-strip-cell.reveal:nth-child(4n+4) { transition-delay: 0.18s; }
@media (max-width: 720px) {
  .contact-strip-cell { width: min(50vw, 200px); aspect-ratio: 3 / 4; }
}

/* ══════════════════════════════════════
   LIGHTBOX (click a photo to enlarge)
   ══════════════════════════════════════ */
.lightbox-overlay {
  position: fixed; inset: 0;
  background: rgba(22,20,18,0.94);
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  padding: 4vh 4vw;
  opacity: 0; pointer-events: none;
  transition: opacity 0.3s ease;
  z-index: 1000;
}
.lightbox-overlay.is-open { opacity: 1; pointer-events: auto; }

.lightbox-img {
  max-width: 90vw; max-height: 82vh;
  width: auto; height: auto;
  object-fit: contain;
  box-shadow: 0 20px 60px rgba(0,0,0,0.5);
}

.lightbox-caption {
  margin-top: 1.2rem;
  color: var(--cream);
  font-family: 'Cormorant Garamond', serif;
  font-style: italic;
  font-size: 1.1rem;
  letter-spacing: 0.04em;
  min-height: 1.4em;
}

.lightbox-close {
  position: absolute; top: 1.6rem; right: 2rem;
  background: none; border: none;
  color: var(--cream); font-size: 1.6rem; line-height: 1;
  cursor: pointer; opacity: 0.8; transition: opacity 0.2s, color 0.2s;
}
.lightbox-close:hover { opacity: 1; color: var(--burgundy); }

.lightbox-arrow {
  position: absolute; top: 50%; transform: translateY(-50%);
  background: none; border: none;
  color: var(--cream); font-size: 2.6rem; line-height: 1;
  cursor: pointer; opacity: 0.75; transition: opacity 0.2s, color 0.2s;
  padding: 0.5rem 1rem;
}
.lightbox-arrow:hover { opacity: 1; color: var(--burgundy); }
.lightbox-prev { left: 0.5rem; }
.lightbox-next { right: 0.5rem; }

@media (max-width: 720px) {
  .lightbox-close { top: 1rem; right: 1.2rem; }
  .lightbox-arrow { font-size: 2rem; padding: 0.4rem 0.6rem; }
  .lightbox-img { max-height: 70vh; }
}
