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

/* ═══════════════════════════════════════════
   DESIGN TOKENS
   ═══════════════════════════════════════════ */
:root {
  --bg-primary: #faf8f4;
  --bg-secondary: #ffffff;
  --bg-tertiary: #f2efe8;
  --accent: #a0793d;
  --accent-light: #c9a96e;
  --accent-glow: rgba(160, 121, 61, 0.12);
  --text-heading: #1a1a1a;
  --text-body: #3d3d3d;
  --text-muted: #888888;
  --border: rgba(0, 0, 0, 0.08);
  --border-hover: rgba(160, 121, 61, 0.35);
  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.04);
  --shadow-md: 0 8px 30px rgba(0, 0, 0, 0.06);
  --shadow-lg: 0 20px 60px rgba(0, 0, 0, 0.08);
  --shadow-card-hover: 0 24px 48px rgba(0, 0, 0, 0.12);
  --header-bg: rgba(250, 248, 244, 0.82);
  --overlay-bg: rgba(250, 248, 244, 0.97);
  --menu-bg: rgba(255, 255, 255, 0.98);

  /* Hero-specific (light mode keeps images vivid) */
  --hero-gradient-top: rgba(0, 0, 0, 0.35);
  --hero-gradient-bottom: rgba(20, 18, 14, 0.7);

  --font-display: 'Cormorant Garamond', serif;
  --font-body: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  --section-gap: 120px;
  --container-max: 1400px;
  --container-padding: clamp(20px, 5vw, 80px);
  --ease-out-expo: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-in-out: cubic-bezier(0.4, 0, 0.2, 1);
}

/* ═══════════════════════════════════════════
   DARK THEME
   ═══════════════════════════════════════════ */
[data-theme="dark"] {
  --bg-primary: #0c0c0c;
  --bg-secondary: #161616;
  --bg-tertiary: #1c1c1c;
  --accent: #d4a853;
  --accent-light: #e8c47a;
  --accent-glow: rgba(212, 168, 83, 0.1);
  --text-heading: #f0ece4;
  --text-body: #b0aca4;
  --text-muted: #666;
  --border: rgba(255, 255, 255, 0.06);
  --border-hover: rgba(212, 168, 83, 0.4);
  --shadow-sm: none;
  --shadow-md: 0 8px 30px rgba(0, 0, 0, 0.3);
  --shadow-lg: 0 20px 60px rgba(0, 0, 0, 0.5);
  --shadow-card-hover: 0 24px 48px rgba(0, 0, 0, 0.5), 0 0 0 1px var(--border-hover);
  --header-bg: rgba(12, 12, 12, 0.82);
  --overlay-bg: rgba(0, 0, 0, 0.97);
  --menu-bg: rgba(22, 22, 22, 0.98);
  --hero-gradient-top: rgba(0, 0, 0, 0.5);
  --hero-gradient-bottom: rgba(0, 0, 0, 0.85);
}

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

html {
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: var(--font-body);
  background: var(--bg-primary);
  color: var(--text-body);
  line-height: 1.7;
  overflow-x: hidden;
  transition: background-color 0.5s var(--ease-in-out),
              color 0.5s var(--ease-in-out);
}

/* Page load animation */
body.loading {
  overflow: hidden;
}

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

button {
  font-family: inherit;
  cursor: pointer;
}

a {
  color: inherit;
  text-decoration: none;
}

/* ═══════════════════════════════════════════
   ICON BASE (inline SVG)
   ═══════════════════════════════════════════ */
.icon {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
  vertical-align: middle;
}

.panel-link-icon {
  width: 18px;
  height: 18px;
}

.panel-close .icon {
  width: 22px;
  height: 22px;
}

.slide-arrow .icon {
  width: 18px;
  height: 18px;
}

.art-card-zoom .icon {
  width: 20px;
  height: 20px;
}

.lightbox-close .icon {
  width: 28px;
  height: 28px;
}

.social-btn .icon {
  width: 18px;
  height: 18px;
}

.back-to-top {
  display: flex;
  align-items: center;
  gap: 6px;
}

.back-to-top .icon {
  width: 14px;
  height: 14px;
}

/* ═══════════════════════════════════════════
   PRELOADER
   ═══════════════════════════════════════════ */
.preloader {
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: var(--bg-primary);
  display: flex;
  justify-content: center;
  align-items: center;
  transition: opacity 0.6s ease, visibility 0.6s ease;
}

.preloader.hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.preloader-text {
  font-family: var(--font-display);
  font-size: 32px;
  font-weight: 600;
  color: var(--text-heading);
  letter-spacing: 3px;
  overflow: hidden;
}

.preloader-text span {
  display: inline-block;
  animation: preloaderReveal 0.6s var(--ease-out-expo) forwards;
  opacity: 0;
  transform: translateY(100%);
}

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

/* ═══════════════════════════════════════════
   HEADER / NAVIGATION
   ═══════════════════════════════════════════ */
.header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 100;
  padding: 0 var(--container-padding);
  background: transparent;
  border-bottom: 1px solid transparent;
  transition: all 0.4s var(--ease-in-out);
}

.header.scrolled {
  background: var(--header-bg);
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  border-bottom-color: var(--border);
}

.header-inner {
  max-width: var(--container-max);
  margin: 0 auto;
  height: 72px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.logo {
  display: flex;
  align-items: center;
  gap: 14px;
  text-decoration: none;
}

.logo-img {
  height: 42px;
  width: 42px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid rgba(255,255,255,0.3);
  transition: border-color 0.3s;
}

.header.scrolled .logo-img {
  border-color: var(--border);
}

.logo:hover .logo-img {
  border-color: var(--accent);
}

.logo-text {
  font-family: var(--font-display);
  font-size: 24px;
  font-weight: 600;
  color: #fff;
  letter-spacing: 0.5px;
  transition: color 0.4s;
  text-shadow: 0 1px 4px rgba(0,0,0,0.3);
}

.header.scrolled .logo-text {
  color: var(--text-heading);
  text-shadow: none;
}

.logo-text span {
  color: var(--accent-light);
}

.header.scrolled .logo-text span {
  color: var(--accent);
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 4px;
}

.icon-btn {
  background: transparent;
  border: none;
  color: #fff;
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
  transition: all 0.25s var(--ease-in-out);
  filter: drop-shadow(0 1px 2px rgba(0,0,0,0.4));
}

.header.scrolled .icon-btn {
  color: var(--text-body);
  filter: none;
}

.icon-btn:hover {
  background: var(--accent-glow);
  color: var(--accent);
  filter: none;
}

/* ═══════════════════════════════════════════
   SIDE PANEL
   ═══════════════════════════════════════════ */
.menu-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.4);
  backdrop-filter: blur(4px);
  z-index: 200;
  opacity: 0;
  visibility: hidden;
  transition: all 0.4s var(--ease-in-out);
}

.menu-backdrop.open {
  opacity: 1;
  visibility: visible;
}

.side-panel {
  position: fixed;
  top: 0;
  right: 0;
  width: min(380px, 85vw);
  height: 100%;
  background: var(--menu-bg);
  backdrop-filter: blur(30px);
  border-left: 1px solid var(--border);
  z-index: 201;
  transform: translateX(100%);
  transition: transform 0.5s var(--ease-out-expo);
  display: flex;
  flex-direction: column;
  padding: 30px;
  overflow-y: auto;
}

.side-panel.open {
  transform: translateX(0);
}

.panel-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 40px;
}

.panel-title {
  font-family: var(--font-display);
  font-size: 20px;
  color: var(--text-heading);
  font-weight: 600;
}

.panel-close {
  background: transparent;
  border: none;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 4px;
  transition: color 0.3s, transform 0.3s;
}

.panel-close:hover {
  color: var(--accent);
  transform: rotate(90deg);
}

.panel-section-title {
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 2px;
  color: var(--text-muted);
  margin-bottom: 16px;
  margin-top: 10px;
}

.panel-link {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  color: var(--text-body);
  text-decoration: none;
  border-radius: 10px;
  font-size: 15px;
  font-weight: 400;
  transition: all 0.25s var(--ease-in-out);
  margin-bottom: 4px;
}

.panel-link:hover {
  background: var(--accent-glow);
  color: var(--accent);
  transform: translateX(4px);
}

.panel-link-icon {
  font-size: 18px;
  width: 24px;
  text-align: center;
  flex-shrink: 0;
}

/* ═══════════════════════════════════════════
   HERO
   ═══════════════════════════════════════════ */
.hero {
  position: relative;
  width: 100%;
  height: 100vh;
  min-height: 600px;
  overflow: hidden;
}

.hero-slides {
  width: 100%;
  height: 100%;
  position: relative;
}

.hero-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  transition: opacity 1.2s var(--ease-in-out);
}

.hero-slide.active {
  opacity: 1;
}

.hero-slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scale(1.05);
  transition: transform 8s linear;
}

.hero-slide.active img {
  transform: scale(1);
}

/* Gradient overlay — designed to NOT wash out images
   Uses solid dark tones for readability, not theme bg color */
.hero-gradient {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg,
      var(--hero-gradient-top) 0%,
      transparent 35%,
      transparent 55%,
      var(--hero-gradient-bottom) 100%
    );
  pointer-events: none;
}

/* Bottom fade strip to blend into page bg */
.hero-fade {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 120px;
  background: linear-gradient(to top, var(--bg-primary), transparent);
  pointer-events: none;
  z-index: 2;
  transition: background 0.5s var(--ease-in-out);
}

.hero-content {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  pointer-events: none;
  z-index: 3;
  padding: 0 20px;
}

.hero-tag {
  font-family: var(--font-body);
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 5px;
  color: rgba(255, 255, 255, 0.85);
  margin-bottom: 16px;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.7);
  opacity: 0;
  transform: translateY(20px);
  animation: heroFadeIn 1s 0.6s var(--ease-out-expo) forwards;
}

.hero-heading {
  font-family: var(--font-display);
  font-size: clamp(48px, 8vw, 110px);
  font-weight: 300;
  font-style: italic;
  color: #fff;
  line-height: 1.05;
  text-shadow: 0 4px 30px rgba(0, 0, 0, 0.5);
  opacity: 0;
  transform: translateY(30px);
  animation: heroFadeIn 1s 0.8s var(--ease-out-expo) forwards;
}

.hero-heading strong {
  font-weight: 700;
}

.hero-heading .accent {
  color: var(--accent-light);
}

.hero-sub {
  font-size: clamp(14px, 1.5vw, 18px);
  color: rgba(255, 255, 255, 0.75);
  margin-top: 20px;
  letter-spacing: 1px;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.7);
  opacity: 0;
  transform: translateY(20px);
  animation: heroFadeIn 1s 1s var(--ease-out-expo) forwards;
}

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

/* Scroll indicator */
.scroll-hint {
  position: absolute;
  bottom: 100px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 4;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  opacity: 0;
  animation: heroFadeIn 1s 1.5s var(--ease-out-expo) forwards;
}

.scroll-hint span {
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 2px;
  color: rgba(255,255,255,0.5);
}

.scroll-line {
  width: 1px;
  height: 40px;
  background: linear-gradient(to bottom, rgba(255,255,255,0.5), transparent);
  animation: scrollPulse 2s infinite;
}

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

.hero-controls {
  position: absolute;
  bottom: 40px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 12px;
  align-items: center;
  z-index: 5;
}

.slide-arrow {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.25);
  color: #fff;
  font-size: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s;
  backdrop-filter: blur(10px);
}

.slide-arrow:hover {
  background: var(--accent);
  border-color: var(--accent);
}

.slide-dots {
  display: flex;
  gap: 8px;
  padding: 0 10px;
}

.slide-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.35);
  border: none;
  cursor: pointer;
  transition: all 0.4s var(--ease-out-expo);
}

.slide-dot.active {
  width: 28px;
  border-radius: 4px;
  background: var(--accent);
}

/* ═══════════════════════════════════════════
   INTRO BAND (between hero and gallery)
   ═══════════════════════════════════════════ */
.intro-band {
  text-align: center;
  padding: 80px var(--container-padding) 0;
  max-width: 700px;
  margin: 0 auto;
}

.intro-band p {
  font-family: var(--font-display);
  font-size: clamp(20px, 2.5vw, 26px);
  font-weight: 300;
  font-style: italic;
  color: var(--text-body);
  line-height: 1.7;
  opacity: 0;
  transform: translateY(30px);
}

.intro-band p.revealed {
  opacity: 1;
  transform: translateY(0);
  transition: all 0.8s var(--ease-out-expo);
}

.intro-band .accent-line {
  display: inline-block;
  width: 40px;
  height: 1px;
  background: var(--accent);
  vertical-align: middle;
  margin: 0 12px;
}

/* ═══════════════════════════════════════════
   SECTION LAYOUT
   ═══════════════════════════════════════════ */
.section {
  padding: var(--section-gap) var(--container-padding);
  max-width: var(--container-max);
  margin: 0 auto;
}

.section-header {
  text-align: center;
  margin-bottom: 60px;
}

.section-label {
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 3px;
  color: var(--accent);
  margin-bottom: 12px;
}

.section-heading {
  font-family: var(--font-display);
  font-size: clamp(32px, 4vw, 52px);
  font-weight: 300;
  color: var(--text-heading);
  line-height: 1.2;
}

.section-heading em {
  font-style: italic;
  font-weight: 600;
}

.section-divider {
  width: 50px;
  height: 1px;
  background: var(--accent);
  border: none;
  margin: 20px auto 0;
}

/* ═══════════════════════════════════════════
   GALLERY GRID
   ═══════════════════════════════════════════ */
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 28px;
}

.art-card {
  position: relative;
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: 16px;
  overflow: hidden;
  cursor: pointer;
  box-shadow: var(--shadow-sm);
  transition: all 0.5s var(--ease-out-expo);
  opacity: 0;
  transform: translateY(40px);
}

.art-card.revealed {
  opacity: 1;
  transform: translateY(0);
}

.art-card:hover {
  transform: translateY(-8px);
  box-shadow: var(--shadow-card-hover);
  border-color: var(--border-hover);
}

.art-card-visual {
  position: relative;
  width: 100%;
  aspect-ratio: 4 / 5;
  overflow: hidden;
}

.art-card-visual img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.7s var(--ease-out-expo);
}

.art-card:hover .art-card-visual img {
  transform: scale(1.06);
}

.art-card-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 40%, rgba(0,0,0,0.55) 100%);
  opacity: 0;
  transition: opacity 0.4s;
}

.art-card:hover .art-card-overlay {
  opacity: 1;
}

.art-card-zoom {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) scale(0.8);
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.15);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.3);
  color: #fff;
  font-size: 22px;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: all 0.4s var(--ease-out-expo);
}

.art-card:hover .art-card-zoom {
  opacity: 1;
  transform: translate(-50%, -50%) scale(1);
}

.art-card-body {
  padding: 20px 22px;
}

.art-card-title {
  font-family: var(--font-display);
  font-size: 22px;
  font-weight: 600;
  color: var(--text-heading);
  margin-bottom: 4px;
}

.art-card-technique {
  font-size: 13px;
  color: var(--text-muted);
  font-weight: 400;
}

/* ═══════════════════════════════════════════
   LIGHTBOX
   ═══════════════════════════════════════════ */
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 300;
  background: var(--overlay-bg);
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  padding: 40px;
  opacity: 0;
  visibility: hidden;
  transition: all 0.4s var(--ease-in-out);
}

.lightbox.open {
  opacity: 1;
  visibility: visible;
}

.lightbox-close {
  position: absolute;
  top: 24px;
  right: 28px;
  background: transparent;
  border: none;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 301;
  transition: all 0.3s;
}

.lightbox-close:hover {
  color: var(--accent);
  transform: rotate(90deg);
}

.lightbox-img {
  max-width: min(90vw, 1000px);
  max-height: 75vh;
  object-fit: contain;
  border-radius: 8px;
  box-shadow: var(--shadow-lg);
  transform: scale(0.95);
  transition: transform 0.5s var(--ease-out-expo);
}

.lightbox.open .lightbox-img {
  transform: scale(1);
}

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

.lightbox-title {
  font-family: var(--font-display);
  font-size: 26px;
  font-weight: 600;
  color: var(--text-heading);
}

.lightbox-desc {
  font-size: 14px;
  color: var(--text-muted);
  margin-top: 4px;
}

/* ═══════════════════════════════════════════
   FOOTER
   ═══════════════════════════════════════════ */
.footer {
  background: var(--bg-secondary);
  border-top: 1px solid var(--border);
  transition: all 0.5s var(--ease-in-out);
}

.footer-inner {
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 80px var(--container-padding) 40px;
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 60px;
  margin-bottom: 60px;
}

.footer-brand-text {
  font-family: var(--font-display);
  font-size: 28px;
  font-weight: 600;
  color: var(--text-heading);
  margin-bottom: 12px;
}

.footer-brand-text span {
  color: var(--accent);
}

.footer-brand p {
  color: var(--text-muted);
  font-size: 14px;
  max-width: 320px;
  line-height: 1.7;
}

.footer-col-title {
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 2px;
  color: var(--text-muted);
  margin-bottom: 20px;
}

.footer-links {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.footer-links a {
  color: var(--text-body);
  text-decoration: none;
  font-size: 14px;
  transition: color 0.3s;
}

.footer-links a:hover {
  color: var(--accent);
}

.social-row {
  display: flex;
  gap: 10px;
}

.social-btn {
  width: 42px;
  height: 42px;
  border-radius: 12px;
  background: var(--bg-tertiary);
  border: 1px solid var(--border);
  color: var(--text-body);
  display: flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  font-size: 15px;
  font-weight: 600;
  transition: all 0.3s var(--ease-in-out);
}

.social-btn:hover {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
  transform: translateY(-3px);
}

.footer-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 30px;
  border-top: 1px solid var(--border);
  color: var(--text-muted);
  font-size: 12px;
}

.footer-bottom a {
  color: var(--text-muted);
  text-decoration: none;
  transition: color 0.3s;
}

.footer-bottom a:hover {
  color: var(--accent);
}

/* ═══════════════════════════════════════════
   RESPONSIVE
   ═══════════════════════════════════════════ */

@media (max-width: 1024px) {
  .gallery-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 24px;
  }

  .footer-grid {
    grid-template-columns: 1fr 1fr;
    gap: 40px;
  }

  .footer-brand {
    grid-column: 1 / -1;
  }
}

@media (max-width: 640px) {
  :root {
    --section-gap: 80px;
  }

  .header-inner {
    height: 60px;
  }

  .logo-text {
    font-size: 18px;
  }

  .logo-img {
    height: 34px;
    width: 34px;
  }

  .hero {
    height: 85vh;
    min-height: 500px;
  }

  .scroll-hint {
    display: none;
  }

  .gallery-grid {
    grid-template-columns: 1fr;
    gap: 20px;
  }

  .art-card-visual {
    aspect-ratio: 3 / 4;
  }

  .footer-grid {
    grid-template-columns: 1fr;
    gap: 30px;
  }

  .footer-bottom {
    flex-direction: column;
    gap: 10px;
    text-align: center;
  }

  .lightbox {
    padding: 20px;
  }

  .lightbox-close {
    top: 16px;
    right: 16px;
  }
}
