/*
Theme Name: The Peter Perspective
Theme URI: https://thepeterperspective.com
Author: Peter O'Neill
Description: Custom cinematic dark theme for The Peter Perspective.
Version: 2.0
Text Domain: peter-perspective
*/

:root {
  --black: #080808;
  --deep: #0f0f0f;
  --panel: #141414;
  --border: rgba(255,255,255,0.07);
  --muted: rgba(255,255,255,0.35);
  --text: rgba(255,255,255,0.85);
  --white: #f5f0eb;
  --blue: #4a9eff;
  --blue-dim: rgba(74,158,255,0.15);
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }

body {
  background: var(--black);
  color: var(--text);
  font-family: 'DM Sans', sans-serif;
  font-weight: 300;
  overflow-x: hidden;
  cursor: none;
}

/* CURSOR */
.cursor {
  position: fixed;
  width: 8px; height: 8px;
  background: var(--blue);
  border-radius: 50%;
  pointer-events: none;
  z-index: 9999;
  transform: translate(-50%, -50%);
  transition: width 0.3s, height 0.3s;
}
.cursor-ring {
  position: fixed;
  width: 36px; height: 36px;
  border: 1px solid rgba(74,158,255,0.5);
  border-radius: 50%;
  pointer-events: none;
  z-index: 9998;
  transform: translate(-50%, -50%);
  transition: width 0.3s, height 0.3s;
}
.cursor.expand { width: 14px; height: 14px; }
.cursor-ring.expand { width: 60px; height: 60px; border-color: var(--blue); }

/* GRAIN */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)' opacity='0.04'/%3E%3C/svg%3E");
  pointer-events: none;
  z-index: 100;
  opacity: 0.4;
}

/* NAV */
nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 500;
  padding: 28px 60px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: linear-gradient(to bottom, rgba(8,8,8,0.95), transparent);
}
.nav-logo {
  font-family: 'Bebas Neue', sans-serif;
  font-size: 1.3rem;
  letter-spacing: 0.25em;
  color: var(--white);
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 10px;
}
.nav-logo::before {
  content: '';
  width: 6px; height: 6px;
  background: var(--blue);
  border-radius: 50%;
  display: inline-block;
}
.nav-links { display: flex; gap: 42px; list-style: none; }
.nav-links a {
  font-size: 0.72rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--muted);
  text-decoration: none;
  transition: color 0.3s;
  position: relative;
}
.nav-links a::after {
  content: '';
  position: absolute;
  bottom: -4px; left: 0; right: 0;
  height: 1px;
  background: var(--blue);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.3s;
}
.nav-links a:hover, .nav-links a.active { color: var(--white); }
.nav-links a:hover::after, .nav-links a.active::after { transform: scaleX(1); }

/* PAGE HEADER (inner pages) */
.page-header {
  padding: 160px 60px 80px;
  border-bottom: 1px solid var(--border);
}
.page-header .section-label {
  font-size: 0.65rem;
  letter-spacing: 0.4em;
  text-transform: uppercase;
  color: var(--blue);
  margin-bottom: 20px;
  display: flex;
  align-items: center;
  gap: 16px;
}
.page-header .section-label::before {
  content: '';
  width: 40px; height: 1px;
  background: var(--blue);
}
.page-header h1 {
  font-family: 'Cormorant Garamond', serif;
  font-size: clamp(3rem, 6vw, 6rem);
  font-weight: 300;
  color: var(--white);
  line-height: 1;
}
.page-header h1 em { font-style: italic; color: var(--blue); }

/* SECTION COMMON */
section { padding: 80px 60px; }
.section-label {
  font-size: 0.65rem;
  letter-spacing: 0.4em;
  text-transform: uppercase;
  color: var(--blue);
  margin-bottom: 20px;
  display: flex;
  align-items: center;
  gap: 16px;
}
.section-label::before { content: ''; width: 40px; height: 1px; background: var(--blue); }
.section-title {
  font-family: 'Cormorant Garamond', serif;
  font-size: clamp(2.5rem, 5vw, 4.5rem);
  font-weight: 300;
  line-height: 1.05;
  color: var(--white);
}

/* HERO (homepage) */
#hero {
  position: relative;
  height: 100vh;
  display: flex;
  align-items: flex-end;
  padding: 0 60px 80px;
  overflow: hidden;
}
.hero-bg {
  position: absolute; inset: 0;
  background:
    radial-gradient(ellipse 80% 60% at 70% 30%, rgba(74,158,255,0.06) 0%, transparent 60%),
    radial-gradient(ellipse 60% 80% at 20% 80%, rgba(0,0,0,0.8) 0%, transparent 70%),
    linear-gradient(160deg, #0a0a0a 0%, #111010 50%, #0c0b0b 100%);
}
.hero-lines { position: absolute; inset: 0; overflow: hidden; }
.hero-lines::before, .hero-lines::after {
  content: '';
  position: absolute;
  top: 0; bottom: 0;
  width: 1px;
  background: linear-gradient(to bottom, transparent, rgba(74,158,255,0.15) 30%, rgba(74,158,255,0.15) 70%, transparent);
}
.hero-lines::before { left: 15%; }
.hero-lines::after { right: 15%; }
.hero-frame-dots {
  position: absolute;
  left: calc(15% - 4px);
  top: 0; bottom: 0;
  display: flex;
  flex-direction: column;
  justify-content: space-around;
  padding: 40px 0;
  pointer-events: none;
}
.frame-dot {
  width: 8px; height: 8px;
  background: rgba(74,158,255,0.2);
  border-radius: 50%;
}
.hero-content { position: relative; z-index: 2; max-width: 900px; }
.hero-eyebrow {
  font-size: 0.68rem;
  letter-spacing: 0.35em;
  text-transform: uppercase;
  color: var(--blue);
  margin-bottom: 24px;
  opacity: 0;
  animation: fadeUp 1s 0.3s forwards;
}
.hero-title {
  font-family: 'Oswald', sans-serif;
  font-size: clamp(4rem, 10vw, 8.5rem);
  font-weight: 700;
  line-height: 0.95;
  color: var(--white);
  letter-spacing: 0.02em;
  text-transform: uppercase;
  opacity: 0;
  animation: fadeUp 1s 0.5s forwards;
}
.hero-title em { font-style: normal; color: var(--blue); }
.hero-subtitle {
  margin-top: 32px;
  font-size: 0.9rem;
  line-height: 1.8;
  color: var(--muted);
  max-width: 400px;
  opacity: 0;
  animation: fadeUp 1s 0.7s forwards;
}
.hero-cta {
  margin-top: 48px;
  display: flex;
  gap: 24px;
  align-items: center;
  opacity: 0;
  animation: fadeUp 1s 0.9s forwards;
}
.btn-primary {
  padding: 14px 36px;
  background: var(--blue);
  color: var(--black);
  font-size: 0.72rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  text-decoration: none;
  font-family: 'DM Sans', sans-serif;
  font-weight: 400;
  transition: background 0.3s, transform 0.2s;
}
.btn-primary:hover { background: #6db3ff; transform: translateY(-2px); }
.btn-ghost {
  font-size: 0.72rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--muted);
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 10px;
  transition: color 0.3s;
}
.btn-ghost:hover { color: var(--white); }
.hero-scroll-indicator {
  position: absolute;
  right: 60px; bottom: 80px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  opacity: 0;
  animation: fadeIn 1s 1.2s forwards;
}
.scroll-line {
  width: 1px; height: 60px;
  background: linear-gradient(to bottom, var(--blue), transparent);
  animation: scrollPulse 2s infinite;
}
.scroll-label {
  font-size: 0.6rem;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--muted);
  writing-mode: vertical-rl;
}

/* PORTFOLIO */
.portfolio-filter { display: flex; gap: 8px; margin: 40px 0; }
.filter-btn {
  padding: 8px 20px;
  font-size: 0.68rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  border: 1px solid var(--border);
  background: none;
  color: var(--muted);
  cursor: none;
  transition: all 0.3s;
}
.filter-btn.active, .filter-btn:hover { border-color: var(--blue); color: var(--blue); }
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: 16px;
}
.gallery-item { position: relative; overflow: hidden; background: var(--panel); }
.gallery-item:nth-child(1) { grid-column: span 7; grid-row: span 2; height: 540px; }
.gallery-item:nth-child(2) { grid-column: span 5; height: 260px; }
.gallery-item:nth-child(3) { grid-column: span 5; height: 260px; }
.gallery-item:nth-child(4) { grid-column: span 4; height: 320px; }
.gallery-item:nth-child(5) { grid-column: span 4; height: 320px; }
.gallery-item:nth-child(6) { grid-column: span 4; height: 320px; }
.gallery-placeholder {
  width: 100%; height: 100%;
  position: relative;
  overflow: hidden;
  background-size: cover;
  background-position: center;
}
.g1 { background-image: url('https://thepeterperspective.com/wp-content/uploads/2025/07/DSC02585.jpg'); }
.g2 { background-image: url('https://thepeterperspective.com/wp-content/uploads/2025/07/DSC00708.jpg'); }
.g3 { background-image: url('https://thepeterperspective.com/wp-content/uploads/2025/07/DSC09009.jpg'); }
.g4 { background-image: url('https://thepeterperspective.com/wp-content/uploads/2025/07/DSC07887.jpg'); }
.g5 { background-image: url('https://thepeterperspective.com/wp-content/uploads/2025/07/DSC02636.jpg'); }
.g6 { background-image: url('https://thepeterperspective.com/wp-content/uploads/2025/07/DSC00271.jpg'); }
.gallery-overlay {
  position: absolute; inset: 0;
  background: linear-gradient(to top, rgba(8,8,8,0.9) 0%, transparent 50%);
  opacity: 0;
  transition: opacity 0.5s;
  display: flex;
  align-items: flex-end;
  padding: 28px;
}
.gallery-item:hover .gallery-overlay { opacity: 1; }
.gallery-item:hover .gallery-placeholder { transform: scale(1.04); transition: transform 0.6s ease; }
.gallery-info h3 { font-family: 'Cormorant Garamond', serif; font-size: 1.3rem; font-weight: 300; color: var(--white); }
.gallery-info span { font-size: 0.65rem; letter-spacing: 0.2em; text-transform: uppercase; color: var(--blue); }

/* ABOUT */
.about-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 100px;
  align-items: center;
}
.about-visual { position: relative; }
.about-img-frame {
  width: 100%;
  aspect-ratio: 3/4;
  background: linear-gradient(160deg, #1a1410 0%, #2a1f15 40%, #0f0c0a 100%);
  position: relative;
  overflow: hidden;
}
.about-corner { position: absolute; width: 40px; height: 40px; border-color: var(--blue); border-style: solid; border-width: 0; }
.about-corner.tl { top: -12px; left: -12px; border-top-width: 1px; border-left-width: 1px; }
.about-corner.br { bottom: -12px; right: -12px; border-bottom-width: 1px; border-right-width: 1px; }
.about-accent {
  position: absolute;
  bottom: -30px; right: -30px;
  width: 180px; height: 120px;
  background: var(--blue-dim);
  border: 1px solid rgba(74,158,255,0.2);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 4px;
}
.accent-num { font-family: 'Cormorant Garamond', serif; font-size: 2.8rem; font-weight: 300; color: var(--blue); line-height: 1; }
.accent-label { font-size: 0.6rem; letter-spacing: 0.25em; text-transform: uppercase; color: var(--muted); }
.about-text .section-title { margin-bottom: 32px; }
.about-text p { color: var(--muted); line-height: 1.9; margin-bottom: 20px; font-size: 0.95rem; }
.about-signature { margin-top: 48px; font-family: 'Cormorant Garamond', serif; font-style: italic; font-size: 2.2rem; font-weight: 300; color: var(--blue); }

/* JOURNAL */
.blog-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 2px; margin-top: 60px; }
.blog-card {
  background: var(--panel);
  padding: 48px 40px;
  border-top: 1px solid var(--border);
  transition: background 0.4s;
  position: relative;
  overflow: hidden;
}
.blog-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 1px;
  background: var(--blue);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.4s;
}
.blog-card:hover::before { transform: scaleX(1); }
.blog-card:hover { background: #181818; }
.blog-num { font-family: 'Bebas Neue', sans-serif; font-size: 3.5rem; color: rgba(74,158,255,0.08); line-height: 1; margin-bottom: 24px; }
.blog-tag { font-size: 0.62rem; letter-spacing: 0.25em; text-transform: uppercase; color: var(--blue); margin-bottom: 16px; }
.blog-title { font-family: 'Cormorant Garamond', serif; font-size: 1.6rem; font-weight: 300; color: var(--white); line-height: 1.25; margin-bottom: 16px; }
.blog-excerpt { font-size: 0.85rem; line-height: 1.8; color: var(--muted); margin-bottom: 32px; }
.blog-date { font-size: 0.65rem; letter-spacing: 0.2em; text-transform: uppercase; color: rgba(255,255,255,0.2); }
.read-more { display: inline-flex; align-items: center; gap: 8px; font-size: 0.68rem; letter-spacing: 0.2em; text-transform: uppercase; color: var(--blue); text-decoration: none; margin-top: 24px; transition: gap 0.3s; }
.read-more:hover { gap: 16px; }

/* CONTACT */
.contact-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 100px; align-items: start; }
.contact-info .section-title { margin-bottom: 32px; }
.contact-info p { color: var(--muted); line-height: 1.9; font-size: 0.95rem; margin-bottom: 48px; }
.contact-detail { display: flex; flex-direction: column; gap: 24px; }
.contact-item { display: flex; align-items: center; gap: 16px; padding-bottom: 24px; border-bottom: 1px solid var(--border); }
.contact-icon { width: 36px; height: 36px; border: 1px solid var(--border); display: flex; align-items: center; justify-content: center; color: var(--blue); font-size: 0.85rem; flex-shrink: 0; }
.contact-item-info { display: flex; flex-direction: column; gap: 2px; }
.contact-item-label { font-size: 0.6rem; letter-spacing: 0.25em; text-transform: uppercase; color: rgba(255,255,255,0.25); }
.contact-item-value { font-size: 0.9rem; color: var(--text); }
.contact-form { display: flex; flex-direction: column; gap: 20px; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.form-group { display: flex; flex-direction: column; gap: 10px; }
.form-label { font-size: 0.62rem; letter-spacing: 0.25em; text-transform: uppercase; color: var(--muted); }
.form-input, .form-textarea {
  background: var(--panel);
  border: 1px solid var(--border);
  color: var(--text);
  padding: 16px 20px;
  font-family: 'DM Sans', sans-serif;
  font-size: 0.9rem;
  font-weight: 300;
  outline: none;
  transition: border-color 0.3s;
  cursor: none;
  resize: none;
}
.form-input:focus, .form-textarea:focus { border-color: var(--blue); }
.form-textarea { height: 140px; }
.form-submit {
  padding: 18px 40px;
  background: var(--blue);
  color: var(--black);
  border: none;
  font-family: 'DM Sans', sans-serif;
  font-size: 0.72rem;
  font-weight: 400;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  cursor: none;
  transition: background 0.3s;
  align-self: flex-start;
}
.form-submit:hover { background: #6db3ff; }

/* SOCIAL STRIP */
.social-strip {
  background: var(--panel);
  border-top: 1px solid var(--border);
  padding: 32px 60px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.social-label { font-size: 0.62rem; letter-spacing: 0.3em; text-transform: uppercase; color: var(--muted); }
.social-links { display: flex; gap: 4px; }
.social-link {
  width: 44px; height: 44px;
  border: 1px solid var(--border);
  display: flex; align-items: center; justify-content: center;
  color: var(--muted);
  text-decoration: none;
  font-size: 0.75rem;
  transition: all 0.3s;
}
.social-link:hover { border-color: var(--blue); color: var(--blue); background: var(--blue-dim); }

/* FOOTER */
footer {
  background: var(--black);
  border-top: 1px solid var(--border);
  padding: 40px 60px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.footer-logo { font-family: 'Bebas Neue', sans-serif; font-size: 1rem; letter-spacing: 0.25em; color: var(--muted); }
.footer-copy { font-size: 0.72rem; color: rgba(255,255,255,0.2); }
.footer-tagline { font-family: 'Cormorant Garamond', serif; font-style: italic; font-size: 0.9rem; color: var(--blue); opacity: 0.6; }

/* ANIMATIONS */
@keyframes fadeUp { from { opacity: 0; transform: translateY(30px); } to { opacity: 1; transform: translateY(0); } }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes scrollPulse { 0%, 100% { opacity: 0.4; } 50% { opacity: 1; } }
.reveal { opacity: 0; transform: translateY(40px); transition: opacity 0.9s ease, transform 0.9s ease; }
.reveal.visible { opacity: 1; transform: translateY(0); }
.reveal-delay-1 { transition-delay: 0.1s; }
.reveal-delay-2 { transition-delay: 0.2s; }

/* =====================
   WORK PAGE — TABS
   ===================== */
.work-tabs {
  display: flex;
  gap: 0;
  padding: 0 60px;
  border-bottom: 1px solid var(--border);
  margin-top: 0;
}
.tab-btn {
  padding: 20px 40px;
  font-size: 0.72rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  background: none;
  border: none;
  border-bottom: 2px solid transparent;
  color: var(--muted);
  cursor: none;
  transition: all 0.3s;
  margin-bottom: -1px;
}
.tab-btn.active, .tab-btn:hover {
  color: var(--white);
  border-bottom-color: var(--blue);
}

/* =====================
   MASONRY PHOTO GRID
   ===================== */
.masonry-grid {
  columns: 3;
  column-gap: 12px;
  padding: 0 60px 80px;
}
@media (max-width: 1024px) { .masonry-grid { columns: 2; } }
@media (max-width: 600px)  { .masonry-grid { columns: 1; } }

.masonry-item {
  break-inside: avoid;
  margin-bottom: 12px;
  position: relative;
  overflow: hidden;
  display: block;
}
.masonry-item img {
  width: 100%;
  height: auto;
  display: block;
  transition: transform 0.6s ease;
}
.masonry-item:hover img { transform: scale(1.03); }

.masonry-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(8,8,8,0.85) 0%, transparent 50%);
  opacity: 0;
  transition: opacity 0.4s;
  display: flex;
  align-items: flex-end;
  padding: 20px;
}
.masonry-item:hover .masonry-overlay { opacity: 1; }
.masonry-location {
  font-size: 0.7rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--white);
}

/* =====================
   LIGHTBOX
   ===================== */
.lightbox {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.95);
  z-index: 9000;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 60px;
}
.lightbox.active { display: flex; }
.lightbox-img-wrap {
  max-width: 90vw;
  max-height: 90vh;
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
}
.lightbox-img-wrap img {
  max-width: 100%;
  max-height: 85vh;
  width: auto;
  height: auto;
  object-fit: contain;
  display: block;
}
.lightbox-caption {
  font-size: 0.7rem;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  color: var(--muted);
}
.lightbox-close {
  position: fixed;
  top: 32px; right: 40px;
  background: none;
  border: 1px solid var(--border);
  color: var(--muted);
  font-size: 1.2rem;
  width: 44px; height: 44px;
  cursor: none;
  transition: all 0.3s;
  display: flex;
  align-items: center;
  justify-content: center;
}
.lightbox-close:hover { border-color: var(--blue); color: var(--white); }
.lightbox-prev, .lightbox-next {
  position: fixed;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: 1px solid var(--border);
  color: var(--muted);
  font-size: 2rem;
  width: 52px; height: 52px;
  cursor: none;
  transition: all 0.3s;
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
}
.lightbox-prev { left: 24px; }
.lightbox-next { right: 24px; }
.lightbox-prev:hover, .lightbox-next:hover { border-color: var(--blue); color: var(--white); }

/* =====================
   VIDEO GRID
   ===================== */
#tab-videos { padding: 60px 60px 80px; }
.video-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 32px;
}
@media (max-width: 900px) { .video-grid { grid-template-columns: 1fr; } }

.video-card {
  background: var(--panel);
  border: 1px solid var(--border);
  overflow: hidden;
  transition: border-color 0.3s;
}
.video-card:hover { border-color: var(--blue); }

.video-embed {
  position: relative;
  width: 100%;
  padding-bottom: 56.25%; /* 16:9 */
  height: 0;
  overflow: hidden;
  background: #000;
}
.video-embed iframe {
  position: absolute;
  top: 0; left: 0;
  width: 100%;
  height: 100%;
  border: none;
}
.video-info {
  padding: 20px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}
.video-title {
  font-family: 'Cormorant Garamond', serif;
  font-size: 1.15rem;
  font-weight: 300;
  color: var(--white);
}
.video-tag {
  font-size: 0.6rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--blue);
  white-space: nowrap;
}
