/* ============================================================
   Eddie Rea — Photography Portfolio
   Editorial dark theme · warm gold accent
   ============================================================ */

:root {
  /* Color */
  --bg:        #0c0c0e;
  --bg-2:      #121216;
  --surface:   #16161b;
  --surface-2: #1d1d23;
  --line:      rgba(255,255,255,.10);
  --line-soft: rgba(255,255,255,.06);

  --text:      #f3f1ec;
  --muted:     #a6a39c;
  --muted-2:   #75726c;

  --gold:      #c89b4a;
  --gold-2:    #e3bd72;
  --gold-soft: rgba(200,155,74,.14);

  /* Type */
  --display: "Playfair Display", Georgia, serif;
  --sans:    "Inter", system-ui, -apple-system, sans-serif;
  --cond:    "Oswald", "Inter", sans-serif;

  /* Metrics */
  --maxw: 1240px;
  --gutter: clamp(20px, 5vw, 64px);
  --radius: 4px;
  --ease: cubic-bezier(.22,.61,.36,1);

  --nav-h: 76px;
}

/* ---------- Reset ---------- */
*,*::before,*::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  font-family: var(--sans);
  background: var(--bg);
  color: var(--text);
  line-height: 1.65;
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: clip;
}

img { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-decoration: none; }
button { font: inherit; cursor: pointer; border: none; background: none; color: inherit; }
ul { list-style: none; }
::selection { background: var(--gold); color: #1a1308; }

/* ---------- Shared bits ---------- */
.overline {
  font-family: var(--cond);
  text-transform: uppercase;
  letter-spacing: .32em;
  font-size: .76rem;
  font-weight: 500;
  color: var(--gold);
  display: inline-block;
}

.section {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: clamp(72px, 11vw, 150px) var(--gutter);
}
.section__head { max-width: 760px; margin-bottom: clamp(36px, 6vw, 64px); }
.section__title {
  font-family: var(--display);
  font-weight: 600;
  font-size: clamp(2rem, 5vw, 3.4rem);
  line-height: 1.08;
  letter-spacing: -.01em;
  margin: 14px 0 0;
}
.section__intro { color: var(--muted); margin-top: 20px; font-size: 1.06rem; max-width: 60ch; }

.btn {
  display: inline-flex; align-items: center; justify-content: center;
  gap: .5em;
  font-family: var(--cond);
  text-transform: uppercase;
  letter-spacing: .14em;
  font-size: .84rem;
  font-weight: 500;
  padding: 15px 30px;
  border-radius: var(--radius);
  transition: transform .35s var(--ease), background .35s var(--ease), color .35s var(--ease), border-color .35s var(--ease);
  will-change: transform;
}
.btn--solid { background: var(--gold); color: #1a1308; }
.btn--solid:hover { background: var(--gold-2); transform: translateY(-3px); }
.btn--ghost { border: 1px solid var(--line); color: var(--text); }
.btn--ghost:hover { border-color: var(--gold); color: var(--gold-2); transform: translateY(-3px); }

/* ---------- Preloader ---------- */
.preloader {
  position: fixed; inset: 0; z-index: 999;
  background: var(--bg);
  display: grid; place-items: center;
  transition: opacity .6s ease, visibility .6s ease;
}
.preloader.is-done { opacity: 0; visibility: hidden; }
.preloader__mark {
  font-family: var(--display); font-size: 2.6rem; font-weight: 600;
  letter-spacing: .12em; color: var(--gold);
  position: relative;
}
.preloader__mark::after {
  content: ""; position: absolute; left: 0; bottom: -14px; height: 2px; width: 0;
  background: var(--gold); animation: loadbar 1.1s var(--ease) forwards;
}
@keyframes loadbar { to { width: 100%; } }

/* ---------- Navigation ---------- */
.nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  height: var(--nav-h);
  display: flex; align-items: center;
  transition: background .4s var(--ease), backdrop-filter .4s var(--ease), border-color .4s var(--ease), height .4s var(--ease);
  border-bottom: 1px solid transparent;
  background: linear-gradient(180deg, rgba(8,8,10,.62) 0%, rgba(8,8,10,0) 100%);
  text-shadow: 0 1px 16px rgba(0,0,0,.6);
}
.nav__links a { color: #e0ddd7; }
.nav.is-stuck {
  background: rgba(12,12,14,.82);
  backdrop-filter: saturate(140%) blur(14px);
  -webkit-backdrop-filter: saturate(140%) blur(14px);
  border-bottom-color: var(--line-soft);
  height: 64px;
  text-shadow: none;
}
.nav__inner {
  width: 100%; max-width: var(--maxw); margin: 0 auto;
  padding: 0 var(--gutter);
  display: flex; align-items: center; justify-content: space-between;
}
.nav__brand { display: flex; flex-direction: column; line-height: 1; }
.nav__brand-mark { font-family: var(--display); font-size: 1.32rem; font-weight: 600; letter-spacing: .01em; }
.nav__brand-sub {
  font-family: var(--cond); text-transform: uppercase; letter-spacing: .42em;
  font-size: .58rem; color: var(--gold); margin-top: 5px; padding-left: 2px;
}
.nav__links { display: flex; gap: 38px; }
.nav__links a {
  font-family: var(--cond); text-transform: uppercase; letter-spacing: .16em;
  font-size: .82rem; color: var(--muted); position: relative; padding: 6px 0;
  transition: color .3s var(--ease);
}
.nav__links a::after {
  content: ""; position: absolute; left: 0; bottom: 0; height: 1px; width: 0;
  background: var(--gold); transition: width .3s var(--ease);
}
.nav__links a:hover, .nav__links a.is-active { color: var(--text); }
.nav__links a:hover::after, .nav__links a.is-active::after { width: 100%; }

.nav__toggle { display: none; width: 30px; height: 22px; position: relative; }
.nav__toggle span {
  position: absolute; left: 0; height: 2px; width: 100%; background: var(--text);
  transition: transform .35s var(--ease), opacity .25s var(--ease), top .35s var(--ease);
}
.nav__toggle span:nth-child(1) { top: 2px; }
.nav__toggle span:nth-child(2) { top: 10px; }
.nav__toggle span:nth-child(3) { top: 18px; }
.nav.is-open .nav__toggle span:nth-child(1) { top: 10px; transform: rotate(45deg); }
.nav.is-open .nav__toggle span:nth-child(2) { opacity: 0; }
.nav.is-open .nav__toggle span:nth-child(3) { top: 10px; transform: rotate(-45deg); }

/* ---------- Hero ---------- */
.hero {
  position: relative; min-height: 100svh;
  display: flex; flex-direction: column; justify-content: center;
  padding: calc(var(--nav-h) + 4vh) var(--gutter) 14vh;
  overflow: hidden;
  max-width: var(--maxw); margin: 0 auto;
}
.hero__media {
  position: absolute; inset: 0; z-index: -2;
  background:
    radial-gradient(120% 90% at 78% 18%, rgba(200,155,74,.16), transparent 55%),
    radial-gradient(90% 80% at 12% 92%, rgba(60,80,120,.18), transparent 60%),
    linear-gradient(180deg, #101015 0%, #0c0c0e 60%, #0a0a0c 100%);
  background-size: cover; background-position: center;
  transform: scale(1.04);
}
.hero__media.has-photo { animation: kenburns 22s ease-in-out infinite alternate; }
@keyframes kenburns {
  from { transform: scale(1.04) translate(0,0); }
  to   { transform: scale(1.16) translate(-1.5%, -2%); }
}
.hero__scrim {
  position: absolute; inset: 0; z-index: -1;
  background: linear-gradient(90deg, rgba(8,8,10,.78) 0%, rgba(8,8,10,.42) 45%, rgba(8,8,10,.18) 100%);
}
/* faint film-grain texture */
.hero::before {
  content:""; position:absolute; inset:0; z-index:-1; opacity:.5; pointer-events:none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.8' numOctaves='2'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='.035'/%3E%3C/svg%3E");
}
.hero__inner { max-width: 880px; }
.hero__overline { margin-bottom: 22px; }
.hero__title {
  font-family: var(--display);
  font-weight: 600;
  font-size: clamp(3.6rem, 13vw, 9.5rem);
  line-height: .92;
  letter-spacing: -.02em;
  display: flex; flex-wrap: wrap; align-items: baseline; gap: 0 .28em;
}
.hero__title span { display: block; }
.hero__title-accent {
  color: transparent;
  -webkit-text-stroke: 1.4px var(--gold-2);
  font-style: italic;
}
.hero__lede {
  margin-top: 30px; max-width: 50ch;
  font-size: clamp(1.05rem, 1.7vw, 1.32rem);
  color: var(--muted); font-weight: 300; line-height: 1.6;
}
.hero__actions { margin-top: 42px; display: flex; flex-wrap: wrap; gap: 16px; }

.hero__scroll {
  position: absolute; left: var(--gutter); bottom: 34px;
  display: flex; align-items: center; gap: 14px;
  font-family: var(--cond); text-transform: uppercase; letter-spacing: .3em;
  font-size: .68rem; color: var(--muted);
}
.hero__scroll-line { width: 54px; height: 1px; background: var(--muted-2); position: relative; overflow: hidden; }
.hero__scroll-line::after {
  content:""; position:absolute; inset:0; background: var(--gold);
  transform: translateX(-100%); animation: scrollline 2.4s var(--ease) infinite;
}
@keyframes scrollline { 0%{transform:translateX(-100%);} 55%,100%{transform:translateX(100%);} }

/* ---------- Marquee strip ---------- */
.strip {
  border-top: 1px solid var(--line-soft); border-bottom: 1px solid var(--line-soft);
  background: var(--bg-2); overflow: hidden; padding: 20px 0;
}
.strip__track {
  display: inline-flex; align-items: center; gap: 30px; white-space: nowrap;
  font-family: var(--display); font-style: italic; font-size: 1.25rem; color: var(--muted);
  animation: marquee 38s linear infinite; padding-left: 30px;
}
.strip__track i { color: var(--gold); font-style: normal; font-size: .7rem; }
@keyframes marquee { from{transform:translateX(0);} to{transform:translateX(-50%);} }
.strip:hover .strip__track { animation-play-state: paused; }

/* ---------- Gallery ---------- */
.gallery__filters { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 34px; }
.gallery__filter {
  font-family: var(--cond); text-transform: uppercase; letter-spacing: .14em;
  font-size: .76rem; color: var(--muted);
  padding: 9px 18px; border: 1px solid var(--line); border-radius: 100px;
  transition: all .3s var(--ease);
}
.gallery__filter:hover { color: var(--text); border-color: var(--muted); }
.gallery__filter.is-active { background: var(--gold); border-color: var(--gold); color: #1a1308; }

.gallery { columns: 3; column-gap: 16px; }
@media (max-width: 900px) { .gallery { columns: 2; } }
@media (max-width: 560px) { .gallery { columns: 1; } }

.gallery__item {
  break-inside: avoid; margin-bottom: 16px; position: relative;
  border-radius: var(--radius); overflow: hidden; background: var(--surface);
  cursor: pointer; display: block; width: 100%;
  opacity: 0; transform: translateY(18px);
  transition: opacity .7s var(--ease), transform .7s var(--ease);
}
.gallery__item.is-in { opacity: 1; transform: none; }
.gallery__item img { width: 100%; transition: transform .9s var(--ease), filter .6s; }
.gallery__item:hover img { transform: scale(1.05); }
.gallery__item::after {
  content:""; position:absolute; inset:0;
  background: linear-gradient(180deg, transparent 45%, rgba(8,8,10,.72));
  opacity: 0; transition: opacity .4s var(--ease);
}
.gallery__item:hover::after { opacity: 1; }
.gallery__cap {
  position: absolute; left: 16px; right: 16px; bottom: 14px; z-index: 2;
  transform: translateY(8px); opacity: 0;
  transition: opacity .4s var(--ease), transform .4s var(--ease);
}
.gallery__item:hover .gallery__cap { opacity: 1; transform: none; }
.gallery__cap-title { font-family: var(--display); font-size: 1.05rem; }
.gallery__cap-tag {
  font-family: var(--cond); text-transform: uppercase; letter-spacing: .18em;
  font-size: .64rem; color: var(--gold-2);
}
.gallery__empty {
  columns: 1; color: var(--muted-2); text-align: center;
  padding: 70px 20px; border: 1px dashed var(--line); border-radius: var(--radius);
}

/* ---------- Pagination ---------- */
.pagination {
  display: flex; flex-wrap: wrap; justify-content: center; align-items: center;
  gap: 8px; margin-top: clamp(34px, 5vw, 52px);
}
.pagination__btn {
  min-width: 44px; height: 44px; padding: 0 14px;
  display: inline-flex; align-items: center; justify-content: center;
  font-family: var(--cond); font-size: .95rem; letter-spacing: .04em;
  color: var(--muted); background: var(--surface);
  border: 1px solid var(--line); border-radius: var(--radius);
  transition: color .25s var(--ease), border-color .25s var(--ease), background .25s var(--ease);
}
.pagination__btn:hover:not(:disabled) { color: var(--text); border-color: var(--muted); }
.pagination__btn.is-active { background: var(--gold); border-color: var(--gold); color: #1a1308; }
.pagination__btn--nav { font-size: 1.15rem; }
.pagination__btn:disabled { opacity: .35; cursor: default; }
.pagination__ellipsis { color: var(--muted-2); align-self: center; padding: 0 2px; font-family: var(--cond); letter-spacing: .1em; }
@media (max-width: 560px) {
  .pagination { gap: 6px; }
  .pagination__btn { min-width: 38px; height: 38px; padding: 0 8px; font-size: .85rem; }
}

/* ---------- About ---------- */
.about__grid {
  display: grid; grid-template-columns: 0.85fr 1.15fr; gap: clamp(32px, 6vw, 80px);
  align-items: center;
}
@media (max-width: 880px) { .about__grid { grid-template-columns: 1fr; } }
.about__portrait { position: relative; }
.about__portrait img {
  width: 100%; border-radius: var(--radius);
  filter: grayscale(18%) contrast(1.02);
  border: 1px solid var(--line);
}
.about__portrait::before {
  content:""; position:absolute; inset: 14px -14px -14px 14px; z-index:-1;
  border: 1px solid var(--gold); border-radius: var(--radius); opacity:.55;
}
.about__portrait-badge {
  position: absolute; bottom: 16px; left: 16px; max-width: 60%;
  background: rgba(12,12,14,.82); backdrop-filter: blur(6px);
  border: 1px solid var(--line); border-radius: var(--radius);
  padding: 9px 15px; font-family: var(--cond); text-transform: uppercase;
  letter-spacing: .13em; font-size: .66rem; line-height: 1.3; color: var(--gold-2);
}
.about__prose p { margin-top: 18px; color: var(--muted); font-size: 1.05rem; }
.about__prose strong { color: var(--text); font-weight: 500; }
.about__sign { font-family: var(--display); font-style: italic; font-size: 1.4rem; color: var(--text); margin-top: 26px; }

.stats {
  display: grid; grid-template-columns: repeat(4, 1fr);
  gap: 20px; margin-top: clamp(48px, 8vw, 90px);
  border-top: 1px solid var(--line); padding-top: clamp(36px, 5vw, 56px);
}
@media (max-width: 700px) { .stats { grid-template-columns: repeat(2, 1fr); gap: 32px 20px; } }
.stat { text-align: left; }
.stat__num {
  font-family: var(--cond); font-weight: 600; color: var(--gold-2);
  font-size: clamp(2.6rem, 6vw, 4rem); line-height: 1; display: block;
}
.stat__label { color: var(--muted); font-size: .92rem; margin-top: 8px; display: block; max-width: 22ch; }

/* ---------- Resume ---------- */
.resume { background: var(--bg-2); max-width: none; }
.resume > * { max-width: var(--maxw); margin-left: auto; margin-right: auto; }
.resume__grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: clamp(28px, 4vw, 52px); }
@media (max-width: 880px) { .resume__grid { grid-template-columns: 1fr; gap: 40px; } }
.resume__col-title {
  font-family: var(--cond); text-transform: uppercase; letter-spacing: .2em;
  font-size: .9rem; color: var(--gold); padding-bottom: 16px; margin-bottom: 8px;
  border-bottom: 1px solid var(--line);
}
.resume__list li {
  display: flex; flex-direction: column; padding: 16px 0;
  border-bottom: 1px solid var(--line-soft);
}
.resume__list span { font-family: var(--display); font-size: 1.18rem; }
.resume__list em { font-style: normal; color: var(--muted-2); font-size: .82rem; margin-top: 3px;
  font-family: var(--cond); text-transform: uppercase; letter-spacing: .12em; }
.resume__note { margin-top: 22px; color: var(--muted); font-style: italic; font-family: var(--display); font-size: 1.08rem; }

/* ---------- Contact ---------- */
.contact { text-align: center; }
.contact__inner { max-width: 720px; margin: 0 auto; }
.contact__title { margin-bottom: 18px; }
.contact__lede { color: var(--muted); font-size: 1.08rem; max-width: 52ch; margin: 0 auto; }
.contact__email-big {
  display: inline-block;
  font-family: var(--display);
  font-size: clamp(1.7rem, 5vw, 3rem);
  line-height: 1.12;
  color: var(--gold-2);
  margin: 38px 0 32px;
  padding-bottom: 5px;
  border-bottom: 1px solid rgba(227,189,114,.35);
  transition: color .3s var(--ease), border-color .3s var(--ease);
  word-break: break-word;
}
.contact__email-big:hover { color: var(--gold); border-bottom-color: var(--gold-2); }
.contact__cta-row { display: flex; justify-content: center; }

/* ---------- Footer ---------- */
.footer { border-top: 1px solid var(--line); background: var(--bg-2); }
.footer__inner {
  max-width: var(--maxw); margin: 0 auto; padding: 44px var(--gutter);
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 22px;
}
.footer__brand { font-family: var(--display); font-size: 1.3rem; display: flex; align-items: baseline; gap: 10px; }
.footer__brand em {
  font-family: var(--cond); font-style: normal; text-transform: uppercase;
  letter-spacing: .28em; font-size: .6rem; color: var(--gold);
}
.footer__links { display: flex; gap: 26px; }
.footer__links a {
  font-family: var(--cond); text-transform: uppercase; letter-spacing: .14em;
  font-size: .78rem; color: var(--muted); transition: color .3s;
}
.footer__links a:hover { color: var(--gold-2); }
.footer__copy { color: var(--muted-2); font-size: .82rem; width: 100%; padding-top: 18px; border-top: 1px solid var(--line-soft); }

/* ---------- Lightbox ---------- */
.lightbox {
  position: fixed; inset: 0; z-index: 200;
  background: rgba(7,7,9,.96); backdrop-filter: blur(8px);
  display: flex; align-items: center; justify-content: center; gap: 1vw;
  padding: 5vh 4vw;
  opacity: 0; visibility: hidden; transition: opacity .4s var(--ease), visibility .4s var(--ease);
}
.lightbox.is-open { opacity: 1; visibility: visible; }
.lightbox__stage { max-width: 88vw; max-height: 90vh; display: flex; flex-direction: column; align-items: center; }
.lightbox__img {
  max-width: 100%; max-height: 82vh; object-fit: contain; border-radius: var(--radius);
  box-shadow: 0 30px 80px rgba(0,0,0,.6);
  transform: scale(.96); transition: transform .4s var(--ease);
}
.lightbox.is-open .lightbox__img { transform: scale(1); }
.lightbox__caption {
  margin-top: 18px; text-align: center; color: var(--muted);
  font-family: var(--display); font-style: italic; font-size: 1.05rem;
}
.lightbox__close {
  position: absolute; top: 22px; right: 28px; font-size: 2.4rem; line-height: 1;
  color: var(--muted); transition: color .3s, transform .3s;
}
.lightbox__close:hover { color: var(--gold-2); transform: rotate(90deg); }
.lightbox__nav {
  font-size: 2.6rem; color: var(--muted); width: 56px; height: 56px;
  border-radius: 50%; border: 1px solid var(--line); flex: none;
  display: grid; place-items: center; transition: all .3s var(--ease);
}
.lightbox__nav:hover { color: var(--gold-2); border-color: var(--gold); }
@media (max-width: 640px) {
  .lightbox__nav { position: absolute; bottom: 4vh; }
  .lightbox__nav--prev { left: 28%; }
  .lightbox__nav--next { right: 28%; }
}

/* ---------- Reveal on scroll ---------- */
.reveal { opacity: 0; transform: translateY(30px); transition: opacity .9s var(--ease), transform .9s var(--ease); }
.reveal.is-in { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  .reveal, .gallery__item { opacity: 1 !important; transform: none !important; }
  .hero__media, .strip__track, .hero__scroll-line::after { animation: none !important; }
}

/* ---------- Mobile nav ---------- */
@media (max-width: 760px) {
  .nav__toggle { display: block; z-index: 110; }
  .nav__links {
    position: fixed; inset: 0; flex-direction: column; justify-content: center; align-items: center;
    gap: 30px; background: rgba(10,10,12,.97); backdrop-filter: blur(10px);
    transform: translateX(100%); transition: transform .5s var(--ease);
  }
  .nav__links a { font-size: 1.3rem; color: var(--text); }
  .nav.is-open .nav__links { transform: none; }
  /* The stuck nav's backdrop-filter creates a containing block that would trap this
     fixed fullscreen menu inside the 64px nav bar. Drop the blur on mobile (the solid
     background stays) so the menu overlay always fills the viewport. */
  .nav.is-stuck { backdrop-filter: none; -webkit-backdrop-filter: none; }
}
