/* =============================================
   ERIN HOYT PORTFOLIO
   ============================================= */

/* --- RESET & BASE --- */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

:root {
  --bg: #f5f3ef;
  --dark: #111110;
  --mid: #737270;
  --accent: #79b8d4;   /* matches logo blue */
  --nav-h: 56px;
  --ease: cubic-bezier(0.4, 0, 0.2, 1);
}

html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--dark);
  font-family: 'Helvetica Neue', Arial, sans-serif;
  line-height: 1.6;
  overflow-x: hidden;
}

img { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
ul { list-style: none; }
button { cursor: pointer; border: none; background: none; font: inherit; }

/* --- NAV --- */
.nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 200;
  height: var(--nav-h);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 clamp(1.5rem, 5vw, 4rem);
  transition: background 0.4s var(--ease), border-color 0.4s var(--ease);
  border-bottom: 1px solid transparent;
}

/* transparent over hero */
.nav--hero {
  background: transparent;
  color: #0a2d33;
}

/* solid after scroll */
.nav--solid {
  background: var(--bg);
  color: #0a2d33;
  border-bottom-color: rgba(0,0,0,0.08);
}

.nav__logo {
  font-size: 1rem;
  letter-spacing: 0.04em;
}

.nav__links {
  display: flex;
  align-items: center;
  gap: 2.5rem;
}

.nav__links a {
  font-size: 0.72rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  transition: opacity 0.2s;
}

.nav--solid .nav__links a {
  color: #0a2d33;
  opacity: 0.65;
}

.nav--solid .nav__links a:hover { opacity: 1; }

.nav--hero .nav__links a { color: #0a2d33; opacity: 0.7; }
.nav--hero .nav__links a:hover { opacity: 1; }

.nav__resume-link {
  padding-bottom: 2px;
  border-bottom: 1px solid currentColor;
}

.nav__hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  padding: 4px;
}

.nav__hamburger span {
  display: block;
  width: 22px;
  height: 1.5px;
  background: currentColor;
  transition: transform 0.3s var(--ease), opacity 0.3s;
}

.nav__hamburger.open span:first-child {
  transform: translateY(3.25px) rotate(45deg);
}
.nav__hamburger.open span:last-child {
  transform: translateY(-3.25px) rotate(-45deg);
}

/* mobile menu */
.mobile-menu {
  display: none;
  position: fixed;
  inset: 0;
  top: var(--nav-h);
  background: var(--bg);
  z-index: 190;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2.5rem;
}

.mobile-menu.open { display: flex; }

.mobile-menu a {
  font-size: clamp(1.8rem, 6vw, 2.5rem);
  letter-spacing: -0.01em;
}

/* --- HERO --- */
.hero {
  position: relative;
  height: 100svh;
  min-height: 500px;
  background-image: url('../photography/film & digital/IMG_6100.jpg');
  background-size: cover;
  background-position: center 60%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.hero__overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to bottom,
    rgba(0,0,0,0.08) 0%,
    rgba(0,0,0,0.25) 60%,
    rgba(0,0,0,0.55) 100%
  );
}

.hero__content {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.15rem;
  text-align: center;
  transition: opacity 0.12s ease-out;
  will-change: opacity;
}

.hero__logo {
  width: min(680px, 85vw);
  display: block;
  mix-blend-mode: multiply;
}

.hero__tagline {
  color: rgba(255,255,255,0.82);
  font-size: clamp(0.7rem, 1.5vw, 0.85rem);
  letter-spacing: 0.22em;
  text-transform: uppercase;
}

.hero__scroll {
  position: absolute;
  bottom: 2rem;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.6rem;
  z-index: 1;
}

.hero__scroll span {
  color: rgba(255,255,255,0.5);
  font-size: 0.6rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.hero__scroll-line {
  width: 1px;
  height: 40px;
  background: rgba(255,255,255,0.35);
  transform-origin: top;
  animation: pulse-line 1.8s ease-in-out infinite;
}

@keyframes pulse-line {
  0%, 100% { opacity: 0.3; transform: scaleY(0.5); }
  50%       { opacity: 1;   transform: scaleY(1); }
}

/* --- RETRO LOADER --- */
.loader {
  position: absolute;
  inset: 0;
  min-height: 220px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1.1rem;
  z-index: 20;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease;
  background: var(--bg);
}

.loader.visible {
  opacity: 1;
}

.loader__spinner {
  width: 26px;
  height: 26px;
  border: 2px dashed var(--dark);
  animation: loader-spin 1.8s linear infinite;
}

.loader__label {
  font-size: 0.55rem;
  letter-spacing: 0.35em;
  text-transform: uppercase;
  color: var(--mid);
}

.loader__dot {
  opacity: 0;
  animation: loader-dot 1.5s ease-in-out infinite;
}
.loader__dot:nth-child(1) { animation-delay: 0s; }
.loader__dot:nth-child(2) { animation-delay: 0.5s; }
.loader__dot:nth-child(3) { animation-delay: 1s; }

/* Dark variant — for use on dark backgrounds */
.loader--dark {
  background: #0f0f0e;
}
.loader--dark .loader__spinner {
  border-color: rgba(255,255,255,0.45);
}
.loader--dark .loader__label {
  color: rgba(255,255,255,0.4);
}

@keyframes loader-spin {
  to { transform: rotate(360deg); }
}
@keyframes loader-dot {
  0%, 100% { opacity: 0; }
  33%       { opacity: 1; }
}

/* --- SCROLL HINT --- */
.scroll-hint {
  position: fixed;
  bottom: 2rem;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.6rem;
  z-index: 50;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.5s ease;
}

.scroll-hint.visible  { opacity: 1; }
.scroll-hint.hidden   { opacity: 0; }

.scroll-hint span {
  font-size: 0.6rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.5);
}

.scroll-hint__line {
  width: 1px;
  height: 40px;
  background: rgba(255,255,255,0.35);
  transform-origin: top;
  animation: scroll-hint-pulse 1.8s ease-in-out infinite;
}

/* Dark variant for light-background sections */
.scroll-hint--dark span {
  color: rgba(0,0,0,0.35);
}

.scroll-hint--dark .scroll-hint__line {
  background: rgba(0,0,0,0.2);
}

@keyframes scroll-hint-pulse {
  0%, 100% { opacity: 0.3; transform: scaleY(0.5); }
  50%       { opacity: 1;   transform: scaleY(1); }
}

/* --- WORK / TABS --- */
.work-section {
  padding: 0 clamp(1.5rem, 5vw, 4rem);
  padding-bottom: 6rem;
}

.work-header {
  position: sticky;
  top: var(--nav-h);
  z-index: 100;
  background: var(--bg);
}

.tabs {
  display: flex;
  gap: 0;
  border-bottom: 1px solid rgba(0,0,0,0.1);
  padding-top: 1.5rem;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}

.tabs::-webkit-scrollbar { display: none; }

.tab {
  flex-shrink: 0;
  padding: 0.85rem 1.5rem;
  font-size: 0.72rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--mid);
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
  transition: color 0.2s, border-color 0.2s;
}

.tab:hover { color: var(--dark); }

.tab.active {
  color: var(--dark);
  border-bottom-color: var(--dark);
}

.work-section__footer {
  display: flex;
  justify-content: center;
  padding-top: 3rem;
}

.btn--dark {
  background: #0a2d33;
  border-color: #0a2d33;
  color: var(--bg);
  padding: 1rem 2.5rem;
  font-size: 0.8rem;
}

.btn--dark:hover {
  background: transparent;
  color: #0a2d33;
}

/* --- PHOTO SUB-NAV --- */
.photo-subnav {
  display: flex;
  gap: 0;
  padding: 1rem 0 0;
  border-bottom: 1px solid rgba(0,0,0,0.07);
  margin-bottom: -1px;
}

.photo-subnav[hidden] { display: none; }

.photo-sub {
  padding: 0.6rem 1.25rem;
  font-size: 0.68rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--mid);
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
  transition: color 0.2s, border-color 0.2s;
}

.photo-sub:hover { color: var(--dark); }

.photo-sub.active {
  color: var(--dark);
  border-bottom-color: var(--dark);
}

/* --- WORK GRID --- */
.work-grid {
  position: relative;
  margin-top: 2.5rem;
  columns: 3;
  column-gap: 1rem;
  min-height: 200px;
}

.work-item {
  break-inside: avoid;
  margin-bottom: 1rem;
  overflow: hidden;
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 0.45s var(--ease), transform 0.45s var(--ease);
}

.work-item.visible {
  opacity: 1;
  transform: none;
}

.work-item img,
.work-item video {
  width: 100%;
  height: auto;
  display: block;
  transition: transform 0.5s var(--ease);
}

.work-item:hover img {
  transform: scale(1.02);
}


.work-item figcaption {
  padding: 0.4rem 0 0;
  font-size: 0.68rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--mid);
}

/* --- ABOUT --- */
.about-section {
  background: var(--dark);
  color: #fff;
  padding: clamp(4rem, 8vw, 8rem) clamp(1.5rem, 5vw, 4rem);
}

.about-inner {
  max-width: 680px;
}

.about__label {
  display: block;
  font-size: 0.68rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.35);
  margin-bottom: 2rem;
}

.about__intro {
  font-size: clamp(1.1rem, 2.2vw, 1.45rem);
  line-height: 1.75;
  margin-bottom: 1.5rem;
  font-weight: 300;
}

.about__body {
  font-size: 0.95rem;
  color: rgba(255,255,255,0.6);
  line-height: 1.8;
  margin-bottom: 2.5rem;
}

.btn {
  display: inline-block;
  padding: 0.75rem 2rem;
  font-size: 0.72rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  border: 1px solid rgba(255,255,255,0.4);
  color: #fff;
  transition: background 0.25s, border-color 0.25s;
}

.btn:hover {
  background: rgba(255,255,255,0.1);
  border-color: rgba(255,255,255,0.8);
}

/* --- FOOTER --- */
.footer {
  background: #0a0a09;
  color: #fff;
  padding: clamp(4rem, 8vw, 7rem) clamp(1.5rem, 5vw, 4rem);
}

.footer__cta {
  font-size: clamp(2rem, 5.5vw, 4rem);
  font-weight: 300;
  line-height: 1.1;
  letter-spacing: -0.02em;
  margin-bottom: 1.25rem;
}

.footer__email {
  display: inline-block;
  font-size: clamp(0.9rem, 1.8vw, 1.1rem);
  color: var(--accent);
  border-bottom: 1px solid var(--accent);
  padding-bottom: 2px;
  margin-bottom: 3rem;
  transition: opacity 0.2s;
}

.footer__email:hover { opacity: 0.7; }

.footer__socials {
  display: flex;
  gap: 2rem;
  margin-bottom: 3rem;
}

.footer__socials a {
  font-size: 0.7rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.35);
  transition: color 0.2s;
}

.footer__socials a:hover { color: #fff; }

.footer__credit {
  font-size: 0.65rem;
  color: rgba(255,255,255,0.2);
}

/* --- LIGHTBOX --- */
.lightbox {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 500;
  background: rgba(0,0,0,0.94);
  align-items: center;
  justify-content: center;
}

.lightbox.open { display: flex; }

.lightbox__img-wrap {
  max-width: 90vw;
  max-height: 90vh;
  display: flex;
  align-items: center;
  justify-content: center;
}

.lightbox__img {
  max-width: 90vw;
  max-height: 90vh;
  object-fit: contain;
}

.lightbox__close {
  position: absolute;
  top: 1.25rem;
  right: 1.5rem;
  font-size: 2rem;
  color: rgba(255,255,255,0.55);
  line-height: 1;
  transition: color 0.2s;
}

.lightbox__close:hover { color: #fff; }

.lightbox__prev,
.lightbox__next {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  font-size: 1.5rem;
  color: rgba(255,255,255,0.4);
  padding: 1rem;
  transition: color 0.2s;
}

.lightbox__prev { left: 1rem; }
.lightbox__next { right: 1rem; }
.lightbox__prev:hover,
.lightbox__next:hover { color: #fff; }

/* --- RESUME MODAL --- */
.resume-modal {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 500;
  background: rgba(0,0,0,0.92);
  overflow-y: auto;
  padding: 2rem;
}

.resume-modal.open { display: block; }

.resume-modal__close {
  position: fixed;
  top: 1.25rem;
  right: 1.5rem;
  font-size: 2rem;
  color: rgba(255,255,255,0.55);
  line-height: 1;
  z-index: 501;
  transition: color 0.2s;
}

.resume-modal__close:hover { color: #fff; }

.resume-modal__inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.5rem;
  padding-top: 3rem;
}

.resume-modal__inner img {
  max-width: min(800px, 92vw);
  box-shadow: 0 8px 40px rgba(0,0,0,0.5);
}

/* --- RESPONSIVE --- */
@media (max-width: 900px) {
  .work-grid { columns: 2; }
  .nav__links { display: none; }
  .nav__hamburger { display: flex; }
}

@media (max-width: 560px) {
  .work-grid { columns: 1; }
  .tab { padding: 0.85rem 1rem; }
}

/* ─── IMAGE PROTECTION ─────────────────────── */
img {
  -webkit-user-drag: none;
  user-drag: none;
  -webkit-user-select: none;
  user-select: none;
}
