/* =============================================
   Paula Soper Fine Art — Portfolio Styles
   ============================================= */

/* --- Custom Properties --- */
:root {
  --bg: #FAF8F5;
  --surface: #F3F1ED;
  --text: #2D2926;
  --text-muted: #8A8580;
  --text-faint: #B8B3AE;
  --lavender: #9B7FB0;
  --lavender-soft: rgba(155, 127, 176, 0.12);
  --teal: #5BB8B2;
  --teal-soft: rgba(91, 184, 178, 0.12);
  --border: #DDD9D4;
  --overlay: rgba(26, 25, 23, 0.85);

  --font-display: 'Cormorant', Georgia, serif;
  --font-body: 'Switzer', system-ui, sans-serif;

  --space-xs: 4px;
  --space-sm: 8px;
  --space-md: 16px;
  --space-lg: 24px;
  --space-xl: 32px;
  --space-2xl: 48px;
  --space-3xl: 64px;
  --space-4xl: 96px;

  --radius-sm: 4px;
  --radius-md: 8px;
  --radius-lg: 16px;

  --shadow-sm: 0 1px 3px rgba(45, 41, 38, 0.06);
  --shadow-md: 0 4px 16px rgba(45, 41, 38, 0.08);
  --shadow-lg: 0 8px 32px rgba(45, 41, 38, 0.12);
  --shadow-xl: 0 16px 48px rgba(45, 41, 38, 0.16);

  --transition-base: 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  --transition-slow: 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}

[data-theme="dark"] {
  --bg: #1A1917;
  --surface: #232220;
  --text: #E8E6E3;
  --text-muted: #9B9895;
  --text-faint: #5A5856;
  --lavender: #B8A0C8;
  --lavender-soft: rgba(184, 160, 200, 0.15);
  --teal: #7AD0C8;
  --teal-soft: rgba(122, 208, 200, 0.15);
  --border: #3A3836;
  --overlay: rgba(0, 0, 0, 0.88);
  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.2);
  --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.25);
  --shadow-lg: 0 8px 32px rgba(0, 0, 0, 0.3);
  --shadow-xl: 0 16px 48px rgba(0, 0, 0, 0.4);
}

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

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.6;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

a {
  color: var(--teal);
  text-decoration: none;
  transition: color var(--transition-base);
}

a:hover {
  color: var(--lavender);
}

button {
  font-family: inherit;
  cursor: pointer;
  border: none;
  background: none;
}

/* --- Typography --- */
.font-display {
  font-family: var(--font-display);
  font-weight: 500;
}

h1, h2, h3 {
  font-family: var(--font-display);
  font-weight: 500;
  line-height: 1.15;
}

/* --- Navigation --- */
.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  padding: var(--space-md) var(--space-xl);
  display: flex;
  align-items: center;
  justify-content: space-between;
  transition: background var(--transition-base),
              box-shadow var(--transition-base),
              transform var(--transition-base);
}

.nav--scrolled {
  background: color-mix(in srgb, var(--bg) 92%, transparent);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  box-shadow: var(--shadow-sm);
}

.nav--hidden {
  transform: translateY(-100%);
}

.nav__logo {
  height: 40px;
  width: auto;
  border-radius: var(--radius-sm);
}

.nav__links {
  display: flex;
  gap: var(--space-lg);
  list-style: none;
  align-items: center;
}

.nav__link {
  font-family: var(--font-body);
  font-size: 14px;
  font-weight: 500;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--text-muted);
  transition: color var(--transition-base);
  text-decoration: none;
}

.nav__link:hover,
.nav__link--active {
  color: var(--lavender);
}

.nav__theme-btn {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  transition: color var(--transition-base), background var(--transition-base);
}

.nav__theme-btn:hover {
  color: var(--lavender);
  background: var(--lavender-soft);
}

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

.nav__hamburger span {
  display: block;
  height: 2px;
  background: var(--text);
  border-radius: 2px;
  transition: transform var(--transition-base), opacity var(--transition-base);
}

/* --- Mobile Nav --- */
.mobile-nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 99;
  background: color-mix(in srgb, var(--bg) 97%, transparent);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: var(--space-xl);
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--transition-base);
}

.mobile-nav--open {
  opacity: 1;
  pointer-events: all;
}

.mobile-nav__link {
  font-family: var(--font-display);
  font-size: 32px;
  font-weight: 500;
  color: var(--text);
  text-decoration: none;
  transition: color var(--transition-base);
}

.mobile-nav__link:hover {
  color: var(--lavender);
}

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

.hero__bg {
  position: absolute;
  inset: 0;
  z-index: 0;
}

.hero__bg img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero__overlay {
  position: absolute;
  inset: 0;
  z-index: 1;
}

[data-theme="light"] .hero__overlay,
:root:not([data-theme="dark"]) .hero__overlay {
  background: linear-gradient(
    180deg,
    rgba(250, 248, 245, 0.3) 0%,
    rgba(250, 248, 245, 0.6) 40%,
    rgba(250, 248, 245, 0.85) 70%,
    rgba(250, 248, 245, 0.95) 100%
  );
}

[data-theme="dark"] .hero__overlay {
  background: linear-gradient(
    180deg,
    rgba(26, 25, 23, 0.3) 0%,
    rgba(26, 25, 23, 0.6) 40%,
    rgba(26, 25, 23, 0.85) 70%,
    rgba(26, 25, 23, 0.95) 100%
  );
}

.hero__content {
  position: relative;
  z-index: 2;
  text-align: center;
  padding: var(--space-xl);
  max-width: 700px;
}

.hero__logo {
  width: clamp(200px, 40vw, 360px);
  height: auto;
  margin: 0 auto var(--space-xl);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  background: rgba(255,255,255,0.85);
  padding: var(--space-md) var(--space-lg);
}

.hero__name {
  font-family: var(--font-display);
  font-size: clamp(40px, 7vw, 80px);
  font-weight: 400;
  font-style: italic;
  color: var(--lavender);
  line-height: 1.1;
  margin-bottom: var(--space-md);
}

.hero__tagline {
  font-family: var(--font-body);
  font-size: clamp(14px, 2vw, 17px);
  color: var(--text-muted);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  font-weight: 400;
}

.hero__scroll {
  position: absolute;
  bottom: var(--space-xl);
  left: 50%;
  transform: translateX(-50%);
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-sm);
  color: var(--text-faint);
  font-size: 12px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  animation: bobUp 2s ease-in-out infinite;
}

.hero__scroll svg {
  width: 20px;
  height: 20px;
  stroke: var(--text-faint);
}

@keyframes bobUp {
  0%, 100% { transform: translateX(-50%) translateY(0); }
  50% { transform: translateX(-50%) translateY(-6px); }
}

/* --- Section --- */
.section {
  padding: clamp(var(--space-3xl), 8vw, var(--space-4xl)) var(--space-xl);
  max-width: 1400px;
  margin: 0 auto;
}

.section__header {
  text-align: center;
  margin-bottom: var(--space-3xl);
}

.section__title {
  font-family: var(--font-display);
  font-size: clamp(28px, 4vw, 42px);
  font-weight: 500;
  color: var(--text);
  margin-bottom: var(--space-sm);
}

.section__subtitle {
  font-size: 15px;
  color: var(--text-muted);
  max-width: 480px;
  margin: 0 auto;
}

.section__divider {
  width: 48px;
  height: 2px;
  background: var(--lavender);
  margin: var(--space-md) auto 0;
  border-radius: 1px;
}

/* --- Gallery --- */
.gallery__filters {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: var(--space-sm);
  margin-bottom: var(--space-2xl);
}

.filter-btn {
  font-family: var(--font-body);
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  padding: var(--space-sm) var(--space-md);
  border-radius: 100px;
  color: var(--text-muted);
  background: transparent;
  border: 1px solid var(--border);
  transition: all var(--transition-base);
}

.filter-btn:hover {
  color: var(--lavender);
  border-color: var(--lavender);
}

.filter-btn--active {
  color: #fff;
  background: var(--lavender);
  border-color: var(--lavender);
}

.gallery__grid {
  columns: 4;
  column-gap: var(--space-md);
}

.gallery__item {
  break-inside: avoid;
  margin-bottom: var(--space-md);
  border-radius: var(--radius-md);
  overflow: hidden;
  cursor: pointer;
  position: relative;
  transition: transform var(--transition-base), box-shadow var(--transition-base);
}

.gallery__item:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-lg);
}

.gallery__item img {
  width: 100%;
  height: auto;
  display: block;
  transition: transform var(--transition-slow);
}

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

.gallery__item-overlay {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: var(--space-lg) var(--space-md) var(--space-md);
  background: linear-gradient(to top, rgba(0,0,0,0.65), transparent);
  opacity: 0;
  transition: opacity var(--transition-base);
}

.gallery__item:hover .gallery__item-overlay {
  opacity: 1;
}

.gallery__item-title {
  font-family: var(--font-display);
  font-size: 17px;
  font-weight: 500;
  color: #fff;
}

.gallery__item-medium {
  font-size: 12px;
  color: rgba(255,255,255,0.75);
  margin-top: 2px;
}

/* animate items */
.gallery__item {
  opacity: 0;
  transform: translateY(16px);
  animation: fadeUp 0.5s ease forwards;
}

@keyframes fadeUp {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* --- Lightbox --- */
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 200;
  background: var(--overlay);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--transition-base);
  cursor: zoom-out;
}

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

.lightbox__content {
  position: relative;
  max-width: 90vw;
  max-height: 88vh;
  cursor: default;
}

.lightbox__img {
  max-width: 90vw;
  max-height: 80vh;
  object-fit: contain;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-xl);
}

.lightbox__info {
  text-align: center;
  margin-top: var(--space-md);
}

.lightbox__title {
  font-family: var(--font-display);
  font-size: clamp(20px, 3vw, 28px);
  font-weight: 500;
  color: #fff;
}

.lightbox__medium {
  font-size: 14px;
  color: rgba(255,255,255,0.65);
  margin-top: 4px;
}

.lightbox__close {
  position: absolute;
  top: -48px;
  right: 0;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: rgba(255,255,255,0.7);
  font-size: 28px;
  transition: color var(--transition-base);
  background: none;
  border: none;
  cursor: pointer;
}

.lightbox__close:hover {
  color: #fff;
}

.lightbox__nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: rgba(255,255,255,0.7);
  font-size: 24px;
  background: rgba(0,0,0,0.3);
  border-radius: 50%;
  border: none;
  cursor: pointer;
  transition: all var(--transition-base);
}

.lightbox__nav:hover {
  background: rgba(0,0,0,0.5);
  color: #fff;
}

.lightbox__nav--prev {
  left: -64px;
}

.lightbox__nav--next {
  right: -64px;
}

/* --- About --- */
.about {
  background: var(--surface);
}

.about__content {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-3xl);
  align-items: center;
  max-width: 1100px;
  margin: 0 auto;
}

.about__image-wrapper {
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-md);
}

.about__image {
  width: 100%;
  height: auto;
}

.about__text h3 {
  font-family: var(--font-display);
  font-size: clamp(24px, 3vw, 32px);
  font-weight: 500;
  color: var(--text);
  margin-bottom: var(--space-md);
}

.about__text p {
  font-size: 16px;
  line-height: 1.7;
  color: var(--text-muted);
  margin-bottom: var(--space-md);
}

.about__text p:last-child {
  margin-bottom: 0;
}

.about__credential {
  display: inline-flex;
  align-items: center;
  gap: var(--space-sm);
  padding: var(--space-sm) var(--space-md);
  background: var(--lavender-soft);
  border-radius: 100px;
  font-size: 13px;
  font-weight: 500;
  color: var(--lavender);
  margin-top: var(--space-md);
}

/* --- Contact --- */
.contact__content {
  max-width: 600px;
  margin: 0 auto;
  text-align: center;
}

.contact__email {
  font-family: var(--font-display);
  font-size: clamp(20px, 3vw, 28px);
  font-weight: 500;
  color: var(--teal);
  display: inline-block;
  margin-bottom: var(--space-lg);
  transition: color var(--transition-base);
}

.contact__email:hover {
  color: var(--lavender);
}

.contact__text {
  font-size: 16px;
  color: var(--text-muted);
  line-height: 1.7;
  margin-bottom: var(--space-2xl);
}

.contact__social {
  display: flex;
  justify-content: center;
  gap: var(--space-lg);
}

.contact__social-link {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  font-size: 14px;
  font-weight: 500;
  color: var(--text-muted);
  padding: var(--space-sm) var(--space-md);
  border: 1px solid var(--border);
  border-radius: 100px;
  transition: all var(--transition-base);
  text-decoration: none;
}

.contact__social-link:hover {
  color: var(--lavender);
  border-color: var(--lavender);
  background: var(--lavender-soft);
}

.contact__social-link svg {
  width: 18px;
  height: 18px;
}

/* --- Footer --- */
.footer {
  padding: var(--space-2xl) var(--space-xl);
  border-top: 1px solid var(--border);
  text-align: center;
}

.footer__content {
  max-width: 1400px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.footer__copy {
  font-size: 13px;
  color: var(--text-faint);
}

.footer__back-top {
  font-size: 13px;
  font-weight: 500;
  color: var(--text-muted);
  text-decoration: none;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  transition: color var(--transition-base);
}

.footer__back-top:hover {
  color: var(--lavender);
}

/* --- Scroll Animations --- */
.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

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

/* --- Responsive --- */
@media (max-width: 1200px) {
  .gallery__grid {
    columns: 3;
  }
}

@media (max-width: 900px) {
  .gallery__grid {
    columns: 2;
  }
  .about__content {
    grid-template-columns: 1fr;
    gap: var(--space-2xl);
  }
  .lightbox__nav--prev { left: 8px; }
  .lightbox__nav--next { right: 8px; }
}

@media (max-width: 768px) {
  .nav__links {
    display: none;
  }
  .nav__hamburger {
    display: flex;
  }
  .section {
    padding-left: var(--space-md);
    padding-right: var(--space-md);
  }
  .nav {
    padding: var(--space-md);
  }
  .hero__content {
    padding: var(--space-md);
  }
  .footer__content {
    flex-direction: column;
    gap: var(--space-md);
  }
  .lightbox__close {
    top: -40px;
    right: -4px;
  }
}

@media (max-width: 540px) {
  .gallery__grid {
    columns: 2;
    column-gap: var(--space-sm);
  }
  .gallery__item {
    margin-bottom: var(--space-sm);
  }
  .gallery__item-overlay {
    display: none;
  }
  .contact__social {
    flex-direction: column;
    align-items: center;
  }
}

/* --- Prefers reduced motion --- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
  html { scroll-behavior: auto; }
}
