/* ═══════════════════════════════════════════
   SHARED STYLES — Oliver Loree Portfolio
   Dark earthy theme: browns, forest greens, tans
   ═══════════════════════════════════════════ */

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

:root {
  --bg-primary: #1a1714;
  --bg-secondary: #201d18;
  --bg-card: #252119;
  --bg-card-hover: #2c2720;
  --accent: #5a7a56;
  --accent-light: #7a9e74;
  --accent-glow: rgba(90, 122, 86, 0.12);
  --tan: #c4a97d;
  --tan-dim: rgba(196, 169, 125, 0.5);
  --tan-subtle: rgba(196, 169, 125, 0.08);
  --text-primary: #e4ddd2;
  --text-secondary: #a09484;
  --text-dim: #6b5f50;
  --border: rgba(196, 169, 125, 0.08);
  --border-hover: rgba(196, 169, 125, 0.18);
  --font-display: 'DM Serif Display', serif;
  --font-body: 'Atkinson Hyperlegible', sans-serif;
  --radius: 8px;
  --radius-lg: 14px;
}

html { scroll-behavior: smooth; }

body {
  background: var(--bg-primary);
  color: var(--text-primary);
  font-family: var(--font-body);
  font-weight: 400;
  line-height: 1.75;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--accent-light); text-decoration: none; transition: color 0.3s; }
a:hover { color: var(--tan); }

/* ── BACKGROUND LAYERS (full version for landing/archive) ── */
.texture-bg {
  position: fixed; inset: 0; z-index: 0; pointer-events: none;
  background:
    radial-gradient(ellipse 50% 35% at 15% 8%, rgba(90,122,86,0.06), transparent),
    radial-gradient(ellipse 40% 30% at 85% 15%, rgba(196,169,125,0.04), transparent),
    radial-gradient(ellipse 55% 40% at 70% 75%, rgba(90,122,86,0.05), transparent),
    radial-gradient(ellipse 35% 25% at 25% 85%, rgba(160,130,90,0.04), transparent),
    radial-gradient(circle 600px at 50% 50%, rgba(30,27,22,0.8), transparent);
}
.topo-lines {
  position: fixed; inset: 0; z-index: 0; pointer-events: none; opacity: 0.025;
  background-image: url("data:image/svg+xml,%3Csvg width='600' height='600' xmlns='http://www.w3.org/2000/svg'%3E%3Cdefs%3E%3Cfilter id='t'%3E%3CfeTurbulence type='turbulence' baseFrequency='0.008' numOctaves='3' seed='3' stitchTiles='stitch' result='turb'/%3E%3CfeColorMatrix type='saturate' values='0' in='turb' result='gray'/%3E%3CfeComponentTransfer in='gray'%3E%3CfeFuncR type='discrete' tableValues='0 1 0 1 0 1 0 1 0 1'/%3E%3CfeFuncG type='discrete' tableValues='0 1 0 1 0 1 0 1 0 1'/%3E%3CfeFuncB type='discrete' tableValues='0 1 0 1 0 1 0 1 0 1'/%3E%3C/feComponentTransfer%3E%3C/filter%3E%3C/defs%3E%3Crect width='100%25' height='100%25' filter='url(%23t)'/%3E%3C/svg%3E");
  background-size: 600px 600px;
}
.noise {
  position: fixed; inset: 0; z-index: 1; pointer-events: none; opacity: 0.05;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 512 512' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.75' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  background-repeat: repeat; background-size: 512px;
}
.vignette {
  position: fixed; inset: 0; z-index: 1; pointer-events: none;
  background: radial-gradient(ellipse 75% 70% at 50% 50%, transparent 50%, rgba(10,9,7,0.5) 100%);
}

/* ── SIMPLE BACKGROUND (project detail pages — just noise) ── */
.bg-simple {
  position: fixed; inset: 0; z-index: 0; pointer-events: none;
  background:
    radial-gradient(ellipse 60% 50% at 50% 20%, rgba(90,122,86,0.03), transparent),
    radial-gradient(ellipse 50% 40% at 50% 80%, rgba(196,169,125,0.02), transparent);
}

/* ── SCROLL REVEAL ── */
.reveal {
  opacity: 0; transform: translateY(30px);
  transition: opacity 0.9s cubic-bezier(0.22, 1, 0.36, 1), transform 0.9s cubic-bezier(0.22, 1, 0.36, 1);
}
.reveal.visible { opacity: 1; transform: translateY(0); }
.reveal-delay-1 { transition-delay: 0.12s; }
.reveal-delay-2 { transition-delay: 0.24s; }
.reveal-delay-3 { transition-delay: 0.36s; }
.reveal-delay-4 { transition-delay: 0.48s; }

/* ── NAV (shared across all pages) ── */
nav.site-nav {
  position: fixed; top: 0; width: 100%; z-index: 100;
  padding: 1.25rem clamp(1.5rem, 4vw, 3rem);
  display: flex; justify-content: space-between; align-items: center;
  background: rgba(26, 23, 20, 0.75);
  backdrop-filter: blur(24px);
  border-bottom: 1px solid var(--border);
  transition: padding 0.3s;
}
nav.site-nav.scrolled { padding: 0.8rem clamp(1.5rem, 4vw, 3rem); }

.nav-logo { font-family: var(--font-display); font-size: 1.3rem; color: var(--text-primary); text-decoration: none; }

.nav-links { display: flex; gap: clamp(1.2rem, 3vw, 2.5rem); }
.nav-links a { font-size: 0.82rem; color: var(--text-secondary); text-decoration: none; transition: color 0.3s; }
.nav-links a:hover { color: var(--tan); }

.nav-toggle {
  display: none; flex-direction: column; gap: 5px; cursor: pointer;
  background: none; border: none; padding: 4px;
}
.nav-toggle span { width: 22px; height: 1.5px; background: var(--text-primary); transition: all 0.3s; }
.nav-toggle.open span:nth-child(1) { transform: rotate(45deg) translate(4px, 4px); }
.nav-toggle.open span:nth-child(2) { opacity: 0; }
.nav-toggle.open span:nth-child(3) { transform: rotate(-45deg) translate(5px, -5px); }

@media (max-width: 640px) {
  .nav-toggle { display: flex; }
  .nav-links {
    position: fixed; top: 0; right: 0; width: min(280px, 75vw); height: 100vh;
    background: var(--bg-secondary); flex-direction: column;
    padding: 5rem 2rem 2rem; gap: 1.5rem;
    border-left: 1px solid var(--border);
    transform: translateX(100%); transition: transform 0.4s cubic-bezier(0.22, 1, 0.36, 1); z-index: 99;
  }
  .nav-links.open { transform: translateX(0); }
  .nav-links a { font-size: 1rem; }
  .nav-overlay {
    position: fixed; inset: 0; background: rgba(0,0,0,0.5); z-index: 98;
    opacity: 0; visibility: hidden; transition: all 0.3s;
  }
  .nav-overlay.open { opacity: 1; visibility: visible; }
}

/* ── SECTION HELPERS ── */
.section-label {
  font-size: 0.72rem; letter-spacing: 0.2em; text-transform: uppercase;
  color: var(--text-dim); margin-bottom: 0.75rem;
}
.section-title {
  font-family: var(--font-display); font-size: clamp(1.8rem, 3.5vw, 2.8rem);
  font-weight: 400; margin-bottom: 2rem; max-width: 600px;
}
.section-title em { font-style: italic; color: var(--accent-light); }

.section-divider { position: relative; z-index: 2; max-width: 1300px; margin: 0 auto; padding: 0 clamp(1.5rem, 4vw, 3rem); }
.section-divider hr { border: none; height: 1px; background: linear-gradient(to right, transparent, var(--border-hover), transparent); }

/* ── BUTTONS ── */
.btn {
  display: inline-flex; align-items: center; gap: 0.5rem;
  padding: 0.9rem 1.8rem; font-family: var(--font-body); font-size: 0.8rem;
  text-decoration: none; border: 1px solid var(--border); color: var(--text-primary);
  background: var(--bg-card); border-radius: var(--radius);
  transition: all 0.4s cubic-bezier(0.22, 1, 0.36, 1);
}
.btn:hover {
  border-color: var(--border-hover); background: var(--bg-card-hover);
  transform: translateY(-2px); box-shadow: 0 10px 30px rgba(0,0,0,0.25); color: var(--text-primary);
}
.btn.primary { background: var(--accent); border-color: var(--accent); color: #fff; }
.btn.primary:hover { background: #4e6d4a; box-shadow: 0 12px 36px var(--accent-glow); }

/* ── FOOTER ── */
footer.site-footer {
  position: relative; z-index: 2;
  padding: 2rem clamp(1.5rem, 4vw, 3rem);
  border-top: 1px solid var(--border);
  display: flex; justify-content: space-between; align-items: center;
  max-width: 1300px; margin: 0 auto; flex-wrap: wrap; gap: 0.5rem;
}
footer.site-footer span { font-size: 0.72rem; color: var(--text-dim); }

/* ═══════════════════════════════════════════
   PROJECT DETAIL PAGE STYLES
   ═══════════════════════════════════════════ */

.project-page { position: relative; z-index: 2; }

/* Hero banner */
.project-hero {
  position: relative; height: clamp(280px, 45vh, 450px); overflow: hidden;
  margin-top: 60px; /* clear fixed nav */
}
.project-hero img {
  width: 100%; height: 100%; object-fit: cover; opacity: 0.6;
  transition: transform 0.6s;
}
.project-hero::after {
  content: ''; position: absolute; inset: 0;
  background: linear-gradient(to top, var(--bg-primary) 0%, rgba(26,23,20,0.4) 40%, rgba(26,23,20,0.2) 100%);
}
.project-hero-title {
  position: absolute; bottom: 2rem; left: clamp(1.5rem, 4vw, 3rem); z-index: 2;
  font-family: var(--font-display); font-size: clamp(2rem, 4.5vw, 3.5rem);
  font-weight: 400; color: var(--text-primary); max-width: 700px;
}

/* Meta bar */
.project-meta {
  max-width: 1100px; margin: 0 auto;
  padding: 2rem clamp(1.5rem, 4vw, 3rem);
  display: flex; justify-content: center; gap: 3rem; flex-wrap: wrap;
  border-bottom: 1px solid var(--border);
  font-size: 0.85rem; color: var(--text-secondary);
}
.project-meta strong { color: var(--tan); }

/* Content container */
.project-container {
  max-width: 1100px; margin: 0 auto;
  padding: 0 clamp(1.5rem, 4vw, 3rem);
}

/* Text + Image sections */
.text-image-section {
  display: grid; grid-template-columns: 1fr 1fr;
  gap: clamp(1.5rem, 4vw, 3rem); align-items: center;
  margin: clamp(2.5rem, 5vw, 4rem) 0;
}
.text-content h2 {
  font-family: var(--font-display); font-size: clamp(1.2rem, 2vw, 1.6rem);
  font-weight: 400; margin-bottom: 1rem; color: var(--text-primary);
}
.text-content p {
  font-size: 0.92rem; color: var(--text-secondary); margin-bottom: 1rem; line-height: 1.8;
}
.image-content img {
  width: 100%; border-radius: var(--radius-lg);
  border: 1px solid var(--border); transition: transform 0.5s;
}
.image-content img:hover { transform: scale(1.02); }

/* Centered text */
.centered-text {
  max-width: 750px; margin: clamp(2.5rem, 5vw, 4rem) auto;
  text-align: center;
}
.centered-text h2 {
  font-family: var(--font-display); font-size: clamp(1.2rem, 2vw, 1.6rem);
  font-weight: 400; margin-bottom: 1rem;
}
.centered-text p {
  font-size: 0.92rem; color: var(--text-secondary); margin-bottom: 1rem; line-height: 1.8;
}

/* Three images row */
.three-images {
  display: grid; grid-template-columns: repeat(3, 1fr);
  gap: clamp(0.75rem, 2vw, 1.25rem);
  margin: clamp(2.5rem, 5vw, 4rem) 0;
}
.three-images img {
  width: 100%; border-radius: var(--radius);
  border: 1px solid var(--border); transition: transform 0.5s;
}
.three-images img:hover { transform: scale(1.03); }

/* Video */
.video-wrapper {
  max-width: 900px; margin: clamp(2rem, 4vw, 3rem) auto;
}
.video-wrapper video {
  width: 100%; border-radius: var(--radius-lg);
  border: 1px solid var(--border);
}

/* Nav buttons at bottom of project pages */
.project-nav {
  display: flex; justify-content: center; gap: 1rem;
  margin: clamp(3rem, 6vw, 5rem) 0 clamp(2rem, 4vw, 3rem);
  flex-wrap: wrap;
}
.project-nav .btn[disabled] { opacity: 0.3; cursor: not-allowed; pointer-events: none; }

/* ═══════════════════════════════════════════
   ARCHIVE PAGE STYLES
   ═══════════════════════════════════════════ */

.archive-header {
  position: relative; z-index: 2;
  padding: clamp(7rem, 14vh, 10rem) clamp(1.5rem, 4vw, 3rem) 2rem;
  max-width: 1300px; margin: 0 auto; text-align: center;
}
.archive-header h1 {
  font-family: var(--font-display); font-size: clamp(2.5rem, 5vw, 4rem);
  font-weight: 400; margin-bottom: 0.5rem;
}
.archive-header h1 em { font-style: italic; color: var(--accent-light); }

.archive-grid {
  position: relative; z-index: 2;
  max-width: 1300px; margin: 0 auto;
  padding: 2rem clamp(1.5rem, 4vw, 3rem);
  display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 1.75rem;
}

.archive-card {
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: var(--radius-lg); overflow: hidden;
  transition: all 0.5s cubic-bezier(0.22, 1, 0.36, 1); cursor: pointer;
  text-decoration: none; color: inherit; display: block;
}
.archive-card:hover {
  border-color: var(--border-hover); transform: translateY(-5px);
  box-shadow: 0 24px 50px rgba(0,0,0,0.35); color: inherit;
}

.archive-card-image {
  aspect-ratio: 4/3; overflow: hidden; position: relative;
}
.archive-card-image img {
  width: 100%; height: 100%; object-fit: cover; opacity: 0.8;
  transition: transform 0.6s;
}
.archive-card:hover .archive-card-image img { transform: scale(1.05); }

.archive-card-body { padding: 1.5rem 1.75rem; }
.archive-card-body h3 {
  font-family: var(--font-display); font-size: 1.15rem; font-weight: 400;
  margin-bottom: 0.4rem;
}
.archive-card-date { font-size: 0.72rem; color: var(--text-dim); margin-bottom: 0.75rem; }
.archive-card-body p { font-size: 0.82rem; color: var(--text-secondary); line-height: 1.65; }

.archive-card-tags { display: flex; flex-wrap: wrap; gap: 0.4rem; margin-top: 0.9rem; }
.archive-card-tag {
  font-size: 0.62rem; letter-spacing: 0.06em; text-transform: uppercase;
  padding: 0.25rem 0.6rem; background: var(--tan-subtle); color: var(--tan-dim);
  border-radius: 4px; transition: all 0.3s;
}
.archive-card:hover .archive-card-tag { background: rgba(196,169,125,0.12); color: var(--tan); }

/* ═══════════════════════════════════════════
   EXPERIENCE PAGE STYLES
   ═══════════════════════════════════════════ */

.experience-grid {
  position: relative; z-index: 2;
  max-width: 1300px; margin: 0 auto;
  padding: 2rem clamp(1.5rem, 4vw, 3rem);
  display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 1.75rem;
}

.experience-card {
  background: var(--bg-card); border: 1px solid var(--border);
  border-radius: var(--radius-lg); overflow: hidden;
  transition: all 0.5s cubic-bezier(0.22, 1, 0.36, 1);
}
.experience-card:hover {
  border-color: var(--border-hover); transform: translateY(-4px);
  box-shadow: 0 20px 40px rgba(0,0,0,0.3);
}

.experience-card-image {
  aspect-ratio: 4/3; overflow: hidden; position: relative; background: var(--bg-secondary);
}
.experience-card-image img { width: 100%; height: 100%; object-fit: cover; opacity: 0.7; }
.experience-card-image .placeholder {
  width: 100%; height: 100%; display: flex; align-items: center; justify-content: center;
  font-family: var(--font-display); font-size: 3rem; color: var(--text-dim); opacity: 0.3;
}
.experience-card-overlay {
  position: absolute; bottom: 0; left: 0; right: 0; padding: 1.25rem;
  background: linear-gradient(to top, rgba(26,23,20,0.95), transparent);
}
.experience-card-overlay h3 { font-family: var(--font-display); font-size: 1.15rem; font-weight: 400; }
.experience-card-overlay .role { font-size: 0.82rem; color: var(--tan); font-style: italic; }
.experience-card-overlay .dates { font-size: 0.72rem; color: var(--text-dim); }

.experience-card-body {
  padding: 1.25rem 1.5rem; border-top: 1px solid var(--border);
  font-size: 0.85rem; color: var(--text-secondary); line-height: 1.65;
}
.experience-card-body ul { margin-top: 0.6rem; padding-left: 1rem; }
.experience-card-body li { margin-bottom: 0.3rem; }

/* Two images row */
.two-images {
  display: grid; grid-template-columns: repeat(2, 1fr);
  gap: clamp(0.75rem, 2vw, 1.25rem);
  margin: clamp(2.5rem, 5vw, 4rem) 0;
}
.two-images img {
  width: 100%; border-radius: var(--radius);
  border: 1px solid var(--border); transition: transform 0.5s;
}
.two-images img:hover { transform: scale(1.03); }

/* Two images — taller / full-bleed variant */
.two-images-full {
  display: grid; grid-template-columns: 1fr 1fr;
  gap: clamp(1rem, 2.5vw, 1.75rem);
  margin: clamp(2.5rem, 5vw, 4rem) 0;
}
.two-images-full img {
  width: 100%; height: 420px; object-fit: cover;
  border-radius: var(--radius); border: 1px solid var(--border);
  transition: transform 0.5s;
}
.two-images-full img:hover { transform: scale(1.03); }

/* ── RESPONSIVE ── */
@media (max-width: 700px) {
  .text-image-section { grid-template-columns: 1fr; }
  .three-images { grid-template-columns: 1fr; }
  .two-images { grid-template-columns: 1fr; }
  .two-images-full { grid-template-columns: 1fr; }
  .two-images-full img { height: auto; }
  .archive-grid { grid-template-columns: 1fr; }
  .experience-grid { grid-template-columns: 1fr; }
}
