/* ============================================
   Style by Jesús — Portfolio
   Aesthetic: Dark editorial gallery
   ============================================ */

:root {
  --color-bg: #0e0d0c;
  --color-surface: #1a1918;
  --color-cream: #f5f0e8;
  --color-cream-muted: #c8bfb0;
  --color-chocolate: #4a3728;
  --color-chocolate-light: #6b5443;
  --color-gold: #c9a96e;
  --color-gold-dim: rgba(201, 169, 110, 0.15);
  --color-text: #e8e2d8;
  --color-text-muted: #9a938a;

  --font-display: 'Cormorant Garamond', 'Georgia', serif;
  --font-body: 'Libre Franklin', 'Helvetica Neue', sans-serif;

  --nav-height: 72px;
  --ease-out-expo: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-out-quart: cubic-bezier(0.25, 1, 0.5, 1);
}

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

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-body);
  font-weight: 300;
  background: var(--color-bg);
  color: var(--color-text);
  line-height: 1.6;
  overflow-x: hidden;
}

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

/* ---- Navigation ---- */
.nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  height: var(--nav-height);
  background: linear-gradient(to bottom, rgba(0, 0, 0, 0.55) 0%, transparent 100%);
  transition: background 0.4s ease, box-shadow 0.4s ease;
}

.nav--scrolled {
  background: rgba(14, 13, 12, 0.92);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  box-shadow: 0 1px 0 rgba(201, 169, 110, 0.08);
}

.nav__inner {
  max-width: 1400px;
  margin: 0 auto;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 clamp(24px, 4vw, 48px);
}

.nav__logo {
  font-family: var(--font-display);
  font-size: 1.35rem;
  font-weight: 400;
  font-style: italic;
  letter-spacing: 0.02em;
  color: var(--color-cream);
  transition: opacity 0.3s ease;
}
.nav__logo:hover { opacity: 0.7; }

.nav__links {
  display: flex;
  gap: 36px;
}

.nav__links a {
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--color-cream-muted);
  transition: color 0.3s ease;
  position: relative;
}

.nav__links a::after {
  content: '';
  position: absolute;
  bottom: -4px; left: 0;
  width: 0; height: 1px;
  background: var(--color-gold);
  transition: width 0.3s var(--ease-out-expo);
}

.nav__links a:hover { color: var(--color-cream); }
.nav__links a:hover::after { width: 100%; }

@media (max-width: 640px) {
  .nav__logo { display: none; }
  .nav__links { width: 100%; justify-content: center; }
}

/* ---- Hero ---- */
.hero {
  position: relative;
  height: 100vh;
  min-height: 600px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.hero__bg {
  position: absolute;
  inset: 0;
}

.hero__bg-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 30%;
  transform: scale(1.05);
  transition: transform 8s linear;
}

.hero__bg-img.loaded {
  transform: scale(1);
}

.hero__overlay {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(to bottom,
      rgba(14, 13, 12, 0.55) 0%,
      rgba(14, 13, 12, 0.45) 40%,
      rgba(14, 13, 12, 0.7) 75%,
      rgba(14, 13, 12, 1) 100%
    );
}

.hero__content {
  position: relative;
  z-index: 2;
  text-align: center;
  padding: 120px 10px;
  width: 100%;
  max-width: 800px;
  background: radial-gradient(ellipse 50% 50% at center, rgba(0, 0, 0, 0.6) 0%,  transparent 100%);
  animation: heroFadeIn 1.2s var(--ease-out-expo) both;
  animation-delay: 0.3s;
}

@keyframes heroFadeIn {
  from { opacity: 0; transform: translateY(24px); }
  to { opacity: 1; transform: translateY(0); }
}

.hero__brand {
  font-family: var(--font-display);
  font-size: clamp(4rem, 10vw, 8rem);
  font-weight: 400;
  font-style: italic;
  color: #fff;
  letter-spacing: 0.01em;
  line-height: 1;
  margin-bottom: 24px;
  text-shadow:
    0 1px 3px rgba(0, 0, 0, 0.9),
    0 4px 12px rgba(0, 0, 0, 0.7),
    0 8px 40px rgba(0, 0, 0, 0.5),
    0 16px 80px rgba(0, 0, 0, 0.4);
}

.hero__name {
  font-family: var(--font-body);
  font-size: clamp(0.95rem, 1.8vw, 1.2rem);
  font-weight: 500;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--color-cream);
  margin-bottom: 24px;
  text-shadow:
    0 1px 2px rgba(0, 0, 0, 0.9),
    0 2px 10px rgba(0, 0, 0, 0.7),
    0 4px 30px rgba(0, 0, 0, 0.5);
}

.hero__tagline {
  font-family: var(--font-display);
  font-size: clamp(1.25rem, 2.2vw, 1.65rem);
  font-weight: 500;
  font-style: italic;
  color: var(--color-gold);
  margin-bottom: 18px;
  letter-spacing: 0.03em;
  text-shadow:
    0 1px 2px rgba(0, 0, 0, 0.9),
    0 2px 10px rgba(0, 0, 0, 0.7),
    0 4px 30px rgba(0, 0, 0, 0.5);
}

.hero__roles {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  flex-wrap: wrap;
  font-size: 0.85rem;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--color-cream-muted);
  text-shadow:
    0 1px 2px rgba(0, 0, 0, 0.9),
    0 2px 10px rgba(0, 0, 0, 0.7),
    0 4px 30px rgba(0, 0, 0, 0.5);
}

.hero__dot {
  width: 3px; height: 3px;
  border-radius: 50%;
  background: var(--color-gold);
  display: inline-block;
}

.hero__scroll {
  display: inline-flex;
  margin-top: 48px;
  color: var(--color-cream-muted);
  animation: scrollBounce 2s ease-in-out infinite;
  transition: color 0.3s ease;
}
.hero__scroll:hover { color: var(--color-gold); }

@keyframes scrollBounce {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(8px); }
}

/* ---- Shared Section Styles ---- */
.section-title {
  font-family: var(--font-display);
  font-size: clamp(2rem, 4vw, 3.2rem);
  font-weight: 300;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--color-cream);
  margin-bottom: 12px;
}

.section-subtitle {
  font-family: var(--font-display);
  font-size: clamp(1rem, 1.5vw, 1.2rem);
  font-style: italic;
  color: var(--color-text-muted);
  font-weight: 300;
}

/* ---- Portfolio / Masonry ---- */
.portfolio {
  padding: 80px 0 120px;
}

.portfolio__header {
  text-align: center;
  margin-bottom: 64px;
  padding: 0 24px;
}

.masonry {
  max-width: 1600px;
  margin: 0 auto;
  padding: 0 clamp(16px, 3vw, 40px);
  columns: 3;
  column-gap: 16px;
}

.masonry__item {
  break-inside: avoid;
  margin-bottom: 16px;
  border-radius: 4px;
  overflow: hidden;
  position: relative;
  cursor: pointer;
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.6s var(--ease-out-expo), transform 0.6s var(--ease-out-expo);
}

.masonry__item.visible {
  opacity: 1;
  transform: translateY(0);
}

.masonry__item img {
  width: 100%;
  display: block;
  transition: transform 0.6s var(--ease-out-expo);
}

.masonry__item::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to top,
    rgba(14, 13, 12, 0.3) 0%,
    transparent 40%
  );
  opacity: 0;
  transition: opacity 0.4s ease;
  pointer-events: none;
}

.masonry__item:hover img {
  transform: scale(1.03);
}

.masonry__item:hover::after {
  opacity: 1;
}

/* 2-column at medium widths */
@media (max-width: 1024px) {
  .masonry { columns: 2; }
}

/* Single column on mobile */
@media (max-width: 640px) {
  .masonry {
    columns: 1;
    padding: 0 16px;
  }
  .masonry__item {
    margin-bottom: 12px;
    border-radius: 3px;
  }
}

/* ---- About ---- */
.about {
  padding: 100px 0 120px;
  background: var(--color-surface);
  position: relative;
}

.about::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 1px;
  background: linear-gradient(to right, transparent, var(--color-gold-dim), transparent);
}

.about__inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 clamp(24px, 4vw, 48px);
  display: grid;
  grid-template-columns: 1fr 1.3fr;
  gap: clamp(40px, 6vw, 80px);
  align-items: start;
}

.about__portrait {
  width: 100%;
  border-radius: 4px;
  position: sticky;
  top: calc(var(--nav-height) + 24px);
}

.about__text-col .section-title {
  margin-bottom: 32px;
}

.about__bio {
  font-size: 0.95rem;
  line-height: 1.75;
  color: var(--color-text-muted);
  margin-bottom: 20px;
}

.about__bio:first-of-type {
  font-size: 1.05rem;
  color: var(--color-text);
}

.about__details {
  margin-top: 40px;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  padding-top: 32px;
  border-top: 1px solid rgba(201, 169, 110, 0.1);
}

.about__label {
  display: block;
  font-size: 0.65rem;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--color-gold);
  margin-bottom: 6px;
}

.about__value {
  display: block;
  font-family: var(--font-display);
  font-size: 1.1rem;
  font-weight: 400;
  color: var(--color-cream);
}

@media (max-width: 768px) {
  .about__inner {
    grid-template-columns: 1fr;
    gap: 48px;
  }
  .about__portrait {
    position: relative;
    top: 0;
    max-height: 50vh;
    object-fit: cover;
  }
  .about__details {
    grid-template-columns: 1fr;
    gap: 16px;
  }
}

/* ---- Contact / Footer ---- */
.contact {
  padding: 100px 0 60px;
  text-align: center;
  position: relative;
  background: var(--color-bg);
}

.contact::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 1px;
  background: linear-gradient(to right, transparent, var(--color-gold-dim), transparent);
}

.contact__inner {
  max-width: 600px;
  margin: 0 auto;
  padding: 0 24px;
}

.contact__email {
  display: inline-block;
  font-family: var(--font-display);
  font-size: clamp(1.3rem, 3vw, 2rem);
  font-weight: 400;
  font-style: italic;
  color: var(--color-gold);
  margin-top: 20px;
  padding-bottom: 4px;
  border-bottom: 1px solid transparent;
  transition: border-color 0.3s ease, color 0.3s ease;
}

.contact__email:hover {
  border-color: var(--color-gold);
  color: var(--color-cream);
}

.contact__brand {
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-style: italic;
  color: var(--color-chocolate-light);
  margin-top: 64px;
  margin-bottom: 12px;
}

.contact__copy {
  font-size: 0.72rem;
  letter-spacing: 0.06em;
  color: var(--color-text-muted);
  opacity: 0.5;
}

/* ---- Lightbox ---- */
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 1000;
  background: rgba(10, 9, 8, 0.96);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.35s ease;
}

.lightbox.active {
  opacity: 1;
  pointer-events: all;
}

.lightbox__close {
  position: absolute;
  top: 20px; right: 24px;
  font-size: 2rem;
  color: var(--color-cream-muted);
  z-index: 10;
  width: 48px; height: 48px;
  display: flex; align-items: center; justify-content: center;
  transition: color 0.3s ease;
}
.lightbox__close:hover { color: var(--color-cream); }

.lightbox__prev,
.lightbox__next {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  color: var(--color-cream-muted);
  z-index: 10;
  padding: 16px;
  transition: color 0.3s ease;
}
.lightbox__prev:hover,
.lightbox__next:hover { color: var(--color-cream); }
.lightbox__prev { left: 12px; }
.lightbox__next { right: 12px; }

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

.lightbox__img {
  max-width: 90vw;
  max-height: 85vh;
  object-fit: contain;
  border-radius: 3px;
  transition: opacity 0.25s ease;
}

.lightbox__counter {
  position: absolute;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%);
  font-size: 0.72rem;
  letter-spacing: 0.12em;
  color: var(--color-text-muted);
}

@media (max-width: 640px) {
  .lightbox__prev { left: 4px; padding: 8px; }
  .lightbox__next { right: 4px; padding: 8px; }
}

/* ---- Scroll reveal utility ---- */
.reveal {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.7s var(--ease-out-expo), transform 0.7s var(--ease-out-expo);
}
.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}
