/* LINA RAPHAEL — Painter Portfolio */

@import url('https://fonts.googleapis.com/css2?family=Cormorant+Garamond:ital,wght@0,300;0,400;0,500;1,300;1,400&family=Inter:wght@300;400&display=swap');

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

html {
  scroll-behavior: smooth;
}

body {
  font-family: 'Inter', sans-serif;
  font-weight: 300;
  color: #1a1a1a;
  background: #fff;
  line-height: 1.6;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

/* ── Navigation ── */

nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

.nav-inner {
  max-width: 600px;
  margin: 0 auto;
  padding: 24px 48px 16px;
  text-align: center;
}

.nav-top {
  display: flex;
  justify-content: center;
  align-items: center;
  position: relative;
}

nav .logo {
  font-family: 'Cormorant Garamond', serif;
  font-size: 18px;
  font-weight: 400;
  letter-spacing: 3px;
  text-transform: uppercase;
  color: #1a1a1a;
  text-decoration: none;
}

.view-toggle {
  position: absolute;
  right: 0;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
  color: #999;
  transition: color 0.3s ease;
  display: flex;
  align-items: center;
}

.view-toggle:hover {
  color: #1a1a1a;
}

nav .links {
  display: flex;
  justify-content: center;
  gap: 36px;
  list-style: none;
  margin-top: 8px;
  padding: 0;
}

nav .links a {
  font-size: 11px;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: #999;
  text-decoration: none;
  touch-action: manipulation;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

nav .links a.active {
  color: #1a1a1a;
}

/* ── Mobile Menu ── */

.menu-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
}

.menu-toggle span {
  width: 20px;
  height: 1px;
  background: #1a1a1a;
  transition: all 0.3s ease;
}

/* ── Hero / Landing ── */

.hero {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  padding: 120px 48px 80px;
}

.hero h1 {
  font-family: 'Cormorant Garamond', serif;
  font-size: clamp(36px, 6vw, 72px);
  font-weight: 300;
  letter-spacing: 8px;
  text-transform: uppercase;
  margin-bottom: 12px;
}

.hero .subtitle {
  font-family: 'Cormorant Garamond', serif;
  font-size: clamp(14px, 2vw, 18px);
  font-weight: 300;
  letter-spacing: 6px;
  text-transform: uppercase;
  color: #999;
  margin-bottom: 48px;
}

.hero .scroll-indicator {
  position: absolute;
  bottom: 40px;
  left: 50%;
  transform: translateX(-50%);
  font-size: 10px;
  letter-spacing: 3px;
  text-transform: uppercase;
  color: #ccc;
}

.hero .scroll-indicator::after {
  content: '';
  display: block;
  width: 1px;
  height: 40px;
  background: #ddd;
  margin: 12px auto 0;
  animation: scrollPulse 2s ease-in-out infinite;
}

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

/* ── Section Common ── */

section {
  padding: 80px 48px;
}

.section-title {
  font-family: 'Cormorant Garamond', serif;
  font-size: clamp(24px, 3vw, 36px);
  font-weight: 300;
  letter-spacing: 4px;
  text-transform: uppercase;
  text-align: center;
  margin-bottom: 60px;
}

/* ── Gallery Grid (for gallery page) ── */

.gallery-page {
  max-width: 1400px;
  margin: 0 auto;
}

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 32px;
}

.gallery-item {
  cursor: pointer;
  position: relative;
  overflow: hidden;
  background: #f5f5f5;
  aspect-ratio: auto;
  transition: transform 0.4s ease, box-shadow 0.4s ease;
}

.gallery-item:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.08);
}

.gallery-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.6s ease;
}

.gallery-item:hover img {
  transform: scale(1.03);
}

.gallery-item .overlay {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 24px;
  background: linear-gradient(to top, rgba(0,0,0,0.5), transparent);
  opacity: 0;
  transition: opacity 0.3s ease;
}

.gallery-item:hover .overlay {
  opacity: 1;
}

.overlay .painting-title {
  font-family: 'Cormorant Garamond', serif;
  color: #fff;
  font-size: 16px;
  letter-spacing: 2px;
}

.overlay .painting-meta {
  color: rgba(255,255,255,0.7);
  font-size: 11px;
  letter-spacing: 1px;
  margin-top: 4px;
}

/* ── Bio Page ── */

.bio-container {
  max-width: 800px;
  margin: 0 auto;
  padding: 160px 48px 120px;
}

.bio-quote {
  font-family: 'Cormorant Garamond', serif;
  font-size: clamp(22px, 3vw, 32px);
  font-weight: 300;
  font-style: italic;
  line-height: 1.5;
  text-align: center;
  color: #444;
  margin-bottom: 64px;
  padding-bottom: 64px;
  border-bottom: 1px solid #eee;
}

.bio-text {
  font-size: 15px;
  line-height: 2;
  color: #555;
  text-align: justify;
}

.bio-text p {
  margin-bottom: 24px;
}

/* ── Contact Page ── */

.contact-container {
  max-width: 600px;
  margin: 0 auto;
  padding: 160px 48px 120px;
  text-align: center;
}

.contact-intro {
  font-family: 'Cormorant Garamond', serif;
  font-size: clamp(18px, 2.5vw, 24px);
  font-weight: 300;
  color: #666;
  line-height: 1.8;
  margin-bottom: 48px;
}

.commission-note {
  background: #fafafa;
  border-left: 2px solid #ddd;
  padding: 24px 32px;
  margin: 48px auto;
  max-width: 500px;
  text-align: left;
}

.commission-note p {
  font-size: 13px;
  color: #777;
  line-height: 1.8;
  font-style: italic;
}

.contact-details {
  margin-top: 48px;
}

.contact-details a {
  display: block;
  font-size: 13px;
  letter-spacing: 2px;
  color: #999;
  text-decoration: none;
  transition: color 0.3s ease;
  margin-bottom: 16px;
}

.contact-details a:hover {
  color: #1a1a1a;
}

/* ── Lightbox ── */

.lightbox {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 200;
  background: rgba(255, 255, 255, 0.97);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  justify-content: center;
  align-items: center;
  flex-direction: column;
}

.lightbox.active {
  display: flex;
}

.lightbox-close {
  position: absolute;
  top: 28px;
  right: 48px;
  background: none;
  border: none;
  font-size: 13px;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: #999;
  cursor: pointer;
  transition: color 0.3s ease;
  z-index: 201;
}

.lightbox-close:hover {
  color: #1a1a1a;
}

.lightbox img {
  max-width: 85vw;
  max-height: 75vh;
  object-fit: contain;
}

.lightbox-info {
  text-align: center;
  margin-top: 24px;
}

.lightbox-info .painting-title {
  font-family: 'Cormorant Garamond', serif;
  font-size: 18px;
  letter-spacing: 2px;
}

.lightbox-info .painting-meta {
  font-size: 11px;
  color: #999;
  letter-spacing: 1px;
  margin-top: 4px;
}

.lightbox-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  font-size: 28px;
  color: #ccc;
  cursor: pointer;
  padding: 24px;
  transition: color 0.3s ease;
}

.lightbox-nav:hover {
  color: #1a1a1a;
}

.lightbox-prev { left: 16px; }
.lightbox-next { right: 16px; }

/* ── Footer ── */

footer {
  text-align: center;
  padding: 40px 48px;
  border-top: 1px solid #f0f0f0;
}

footer p {
  font-size: 10px;
  letter-spacing: 2px;
  color: #ccc;
  text-transform: uppercase;
}

/* ── Fade-in Animation ── */

.fade-in {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.8s ease, transform 0.8s ease;
}

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

/* ── Gallery Grid View ── */

.gallery-grid-view {
  padding: 48px;
  max-width: 1400px;
  margin: 0 auto;
}

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 32px;
}

.gallery-item {
  cursor: pointer;
  position: relative;
  overflow: hidden;
  background: #f5f5f5;
  transition: transform 0.4s ease, box-shadow 0.4s ease;
}

.gallery-item:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.08);
}

.gallery-item img {
  width: 100%;
  height: auto;
  display: block;
  transition: transform 0.6s ease;
}

.gallery-item:hover img {
  transform: scale(1.03);
}

.gallery-item .overlay {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 24px;
  background: linear-gradient(to top, rgba(0,0,0,0.5), transparent);
  opacity: 0;
  transition: opacity 0.3s ease;
}

.gallery-item:hover .overlay {
  opacity: 1;
}

.overlay .painting-title {
  font-family: 'Cormorant Garamond', serif;
  color: #fff;
  font-size: 16px;
  letter-spacing: 2px;
}

.overlay .painting-meta {
  color: rgba(255,255,255,0.7);
  font-size: 11px;
  letter-spacing: 1px;
  margin-top: 4px;
}

/* Hide scroll elements when in grid view */
body.grid-view .scroll-container {
  display: none !important;
}

body.grid-view .scroll-dots {
  display: none !important;
}

body.grid-view #gallery::after {
  content: '';
  display: block;
  clear: both;
}

/* ── Arrow Navigation (per-section) ── */

.scroll-arrow-prev,
.scroll-arrow-next {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 200;
  width: 48px;
  height: 48px;
  background: #fff;
  border: 2px solid #bbb;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 26px;
  color: #333;
  opacity: 0.9;
  transition: all 0.2s ease;
  padding: 0;
  line-height: 1;
  box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.scroll-arrow-prev {
  left: 4px;
}

.scroll-arrow-next {
  right: 4px;
}

.scroll-arrow-prev:hover,
.scroll-arrow-next:hover {
  opacity: 1;
  color: #000;
  border-color: #888;
  box-shadow: 0 3px 14px rgba(0,0,0,0.15);
}

/* ── Scroll Sections ── */

.scroll-container {
  overflow: visible;
  height: auto;
  margin-top: 0;
}

.scroll-section {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  padding: 100px 48px 60px;
  opacity: 0.3;
  transition: opacity 0.6s ease;
  position: relative;
}

.scroll-section.active {
  opacity: 1;
}

.scroll-section img {
  max-width: 90vw;
  max-height: 75vh;
  object-fit: contain;
  display: block;
}

.scroll-info {
  text-align: center;
  margin-top: 24px;
}

.scroll-info .painting-title {
  font-family: 'Cormorant Garamond', serif;
  font-size: 18px;
  letter-spacing: 2px;
}

.scroll-info .painting-meta {
  font-size: 11px;
  color: #999;
  letter-spacing: 1px;
  margin-top: 4px;
}

/* Scroll progress dots */
.scroll-dots {
  position: fixed;
  right: 32px;
  top: 50%;
  transform: translateY(-50%);
  z-index: 100;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.scroll-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #ddd;
  transition: all 0.3s ease;
  cursor: pointer;
}

.scroll-dot.active {
  background: #1a1a1a;
  transform: scale(1.3);
}

/* Hide scroll dots on mobile */
@media (max-width: 768px) {
  .scroll-dots {
    display: none !important;
  }
  
  .scroll-section {
    padding: 90px 20px 40px;
  }
}

/* ── Responsive ── */

@media (max-width: 768px) {
  .nav-inner {
    padding: 16px 20px 12px;
  }

  .view-toggle svg {
    width: 16px;
    height: 16px;
  }

  nav .links {
    gap: 20px;
  }

  nav .links a {
    font-size: 10px;
  }

  .scroll-arrow-prev,
  .scroll-arrow-next {
    width: 36px;
    height: 36px;
    font-size: 18px;
    opacity: 0.7;
  }
  
  .scroll-arrow-prev {
    left: 4px;
  }
  
  .scroll-arrow-next {
    right: 4px;
  }

  section,
  .bio-container,
  .contact-container {
    padding-left: 24px;
    padding-right: 24px;
  }

  .gallery-grid {
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 16px;
  }

  .hero {
    padding: 100px 24px 80px;
  }
}

@media (max-width: 480px) {
  .gallery-grid {
    grid-template-columns: 1fr;
  }
}
