/* ============================================
   Художник Анна Ладыженко — Site Styles
   Warm artistic palette inspired by painting
   ============================================ */

:root {
  --cream: #FDF6EC;
  --warm-white: #FAF3E8;
  --gold: #C8A96E;
  --gold-light: #E8D5A8;
  --brown: #6B4C3B;
  --brown-dark: #3E2A1E;
  --text: #3E2A1E;
  --text-light: #7A6554;
  --accent: #B85C3A;
  --accent-soft: #D4926D;
  --sage: #8B9B72;
  --shadow: rgba(62, 42, 30, 0.12);
  --radius: 8px;
  --transition: 0.3s ease;
}

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

html { scroll-behavior: smooth; }

body {
  font-family: 'Montserrat', sans-serif;
  font-weight: 300;
  color: var(--text);
  background: var(--cream);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

/* ---- HERO ---- */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background:
    linear-gradient(135deg, rgba(200, 169, 110, 0.15) 0%, rgba(184, 92, 58, 0.1) 50%, rgba(139, 155, 114, 0.12) 100%),
    var(--cream);
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 20% 30%, rgba(200, 169, 110, 0.2) 0%, transparent 50%),
    radial-gradient(circle at 80% 70%, rgba(184, 92, 58, 0.12) 0%, transparent 50%);
  pointer-events: none;
}

.hero-content {
  position: relative;
  z-index: 2;
  text-align: center;
  padding: 2rem;
  max-width: 600px;
}

.profile-pic-wrap {
  width: 160px;
  height: 160px;
  margin: 0 auto 1.5rem;
  border-radius: 50%;
  padding: 4px;
  background: linear-gradient(135deg, var(--gold), var(--accent-soft), var(--sage));
  box-shadow: 0 8px 32px var(--shadow);
}

.profile-pic {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
  border: 4px solid var(--cream);
}

.hero-name {
  font-family: 'Playfair Display', serif;
  font-size: 2.8rem;
  font-weight: 700;
  color: var(--brown-dark);
  margin-bottom: 0.3rem;
  letter-spacing: 0.02em;
}

.hero-tagline {
  font-family: 'Cormorant Garamond', serif;
  font-size: 1.4rem;
  font-style: italic;
  color: var(--accent);
  margin-bottom: 1.5rem;
}

.hero-bio {
  font-size: 0.95rem;
  color: var(--text-light);
  margin-bottom: 1.5rem;
  line-height: 1.8;
  white-space: pre-line;
}

.hero-stats {
  display: flex;
  gap: 2rem;
  justify-content: center;
  margin-bottom: 1.5rem;
}

.stat-item {
  text-align: center;
}

.stat-num {
  font-family: 'Playfair Display', serif;
  font-size: 1.6rem;
  font-weight: 700;
  color: var(--brown-dark);
  display: block;
}

.stat-label {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-light);
}

.hero-links {
  display: flex;
  gap: 1rem;
  justify-content: center;
}

.hero-link {
  display: inline-block;
  padding: 0.6rem 1.6rem;
  font-size: 0.85rem;
  font-weight: 500;
  text-decoration: none;
  color: var(--brown-dark);
  border: 1.5px solid var(--gold);
  border-radius: 30px;
  transition: var(--transition);
  letter-spacing: 0.05em;
}

.hero-link:hover {
  background: var(--gold);
  color: white;
}

.scroll-hint {
  position: absolute;
  bottom: 2rem;
  left: 50%;
  transform: translateX(-50%);
  animation: bounce 2s infinite;
  color: var(--gold);
  font-size: 1.2rem;
  opacity: 0.6;
}

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

/* ---- TOOLBAR ---- */
.toolbar {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(253, 246, 236, 0.95);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--gold-light);
  padding: 0.8rem 0;
}

.toolbar-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1.5rem;
  display: flex;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
}

.search-input {
  flex: 1;
  min-width: 180px;
  padding: 0.55rem 1rem;
  border: 1.5px solid var(--gold-light);
  border-radius: 30px;
  background: white;
  font-family: inherit;
  font-size: 0.85rem;
  color: var(--text);
  outline: none;
  transition: var(--transition);
}

.search-input:focus {
  border-color: var(--gold);
  box-shadow: 0 0 0 3px rgba(200, 169, 110, 0.15);
}

.filter-group {
  display: flex;
  gap: 0.4rem;
}

.filter-btn {
  padding: 0.45rem 1rem;
  border: 1.5px solid var(--gold-light);
  border-radius: 20px;
  background: transparent;
  font-family: inherit;
  font-size: 0.8rem;
  font-weight: 400;
  color: var(--text-light);
  cursor: pointer;
  transition: var(--transition);
}

.filter-btn:hover { border-color: var(--gold); color: var(--text); }
.filter-btn.active { background: var(--gold); color: white; border-color: var(--gold); }

.sort-select {
  padding: 0.45rem 0.8rem;
  border: 1.5px solid var(--gold-light);
  border-radius: 20px;
  background: white;
  font-family: inherit;
  font-size: 0.8rem;
  color: var(--text);
  cursor: pointer;
  outline: none;
}

.download-all-btn {
  padding: 0.5rem 1.2rem;
  border: none;
  border-radius: 20px;
  background: var(--accent);
  color: white;
  font-family: inherit;
  font-size: 0.8rem;
  font-weight: 500;
  cursor: pointer;
  transition: var(--transition);
  white-space: nowrap;
}

.download-all-btn:hover { background: var(--brown); }

/* ---- GALLERY ---- */
.gallery-section {
  max-width: 1200px;
  margin: 0 auto;
  padding: 2rem 1.5rem;
}

.gallery-info {
  text-align: center;
  margin-bottom: 1.5rem;
  font-size: 0.85rem;
  color: var(--text-light);
}

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

/* ---- CARD ---- */
.card {
  background: white;
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: 0 2px 12px var(--shadow);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  cursor: pointer;
  position: relative;
}

.card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 24px rgba(62, 42, 30, 0.18);
}

.card-media {
  position: relative;
  width: 100%;
  padding-top: 100%;
  overflow: hidden;
  background: #f0e6d6;
}

.card-media img, .card-media video {
  position: absolute;
  top: 0; left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.card-badge {
  position: absolute;
  top: 8px;
  right: 8px;
  background: rgba(62, 42, 30, 0.7);
  color: white;
  padding: 3px 8px;
  border-radius: 12px;
  font-size: 0.7rem;
  font-weight: 500;
  backdrop-filter: blur(4px);
}

.card-body {
  padding: 0.8rem 1rem;
}

.card-date {
  font-size: 0.72rem;
  color: var(--text-light);
  margin-bottom: 0.4rem;
}

.card-caption {
  font-size: 0.82rem;
  line-height: 1.5;
  color: var(--text);
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.card-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.5rem 1rem 0.8rem;
  font-size: 0.75rem;
  color: var(--text-light);
}

.card-stats span { margin-right: 0.8rem; }

.card-download {
  background: none;
  border: 1.5px solid var(--gold-light);
  border-radius: 16px;
  padding: 0.25rem 0.7rem;
  font-size: 0.7rem;
  color: var(--text-light);
  cursor: pointer;
  transition: var(--transition);
}

.card-download:hover {
  background: var(--gold);
  color: white;
  border-color: var(--gold);
}

/* ---- LOAD MORE ---- */
.load-more-wrap { text-align: center; margin-top: 2rem; }

.load-more-btn {
  padding: 0.7rem 2.5rem;
  border: 2px solid var(--gold);
  border-radius: 30px;
  background: transparent;
  font-family: 'Cormorant Garamond', serif;
  font-size: 1.1rem;
  color: var(--brown);
  cursor: pointer;
  transition: var(--transition);
}

.load-more-btn:hover { background: var(--gold); color: white; }
.load-more-btn:disabled { opacity: 0.4; cursor: default; }

/* ---- MODAL / LIGHTBOX ---- */
.modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 1000;
  background: rgba(0, 0, 0, 0.8);
  display: none;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
}

.modal-overlay.open { display: flex; }

.modal {
  background: white;
  border-radius: 12px;
  max-width: 960px;
  width: 100%;
  max-height: 90vh;
  overflow: hidden;
  position: relative;
  box-shadow: 0 20px 60px rgba(0,0,0,0.3);
}

.modal-close {
  position: absolute;
  top: 12px;
  right: 16px;
  z-index: 10;
  background: rgba(62, 42, 30, 0.7);
  color: white;
  border: none;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  font-size: 1.3rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}

.modal-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 10;
  background: rgba(255,255,255,0.9);
  border: none;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  font-size: 1.4rem;
  cursor: pointer;
  color: var(--brown-dark);
  box-shadow: 0 2px 8px var(--shadow);
  transition: var(--transition);
}

.modal-nav:hover { background: var(--gold); color: white; }
.modal-prev { left: 12px; }
.modal-next { right: 12px; }

.modal-content {
  display: flex;
  max-height: 90vh;
}

.modal-media {
  flex: 1.2;
  background: #1a1a1a;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 400px;
  position: relative;
}

.modal-media img {
  max-width: 100%;
  max-height: 85vh;
  object-fit: contain;
}

.modal-media video {
  max-width: 100%;
  max-height: 85vh;
}

.modal-sidebar {
  flex: 0.8;
  padding: 1.5rem;
  overflow-y: auto;
  max-height: 90vh;
  display: flex;
  flex-direction: column;
}

.modal-header {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  margin-bottom: 1rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--gold-light);
}

.modal-avatar {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  object-fit: cover;
}

.modal-username {
  font-weight: 500;
  font-size: 0.9rem;
}

.modal-date {
  font-size: 0.75rem;
  color: var(--text-light);
}

.modal-caption {
  font-size: 0.88rem;
  line-height: 1.7;
  color: var(--text);
  white-space: pre-line;
  margin-bottom: 1rem;
  flex: 1;
}

.modal-stats {
  font-size: 0.8rem;
  color: var(--text-light);
  margin-bottom: 1rem;
  padding-top: 0.8rem;
  border-top: 1px solid var(--gold-light);
}

.modal-downloads {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.modal-dl-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.5rem 1rem;
  border: 1.5px solid var(--gold);
  border-radius: 20px;
  background: transparent;
  font-family: inherit;
  font-size: 0.78rem;
  color: var(--brown);
  text-decoration: none;
  cursor: pointer;
  transition: var(--transition);
  text-align: center;
  justify-content: center;
}

.modal-dl-btn:hover {
  background: var(--gold);
  color: white;
}

.carousel-controls {
  display: flex;
  justify-content: center;
  gap: 0.5rem;
  margin-top: 0.8rem;
  flex-wrap: wrap;
}

.carousel-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  border: 1.5px solid var(--gold);
  background: transparent;
  cursor: pointer;
  padding: 0;
  transition: var(--transition);
}

.carousel-dot.active { background: var(--gold); }

/* ---- FOOTER ---- */
.footer {
  text-align: center;
  padding: 3rem 1.5rem;
  background: var(--brown-dark);
  color: var(--gold-light);
}

.footer p {
  font-family: 'Cormorant Garamond', serif;
  font-size: 1.1rem;
}

.footer-sub {
  margin-top: 0.4rem;
  font-size: 0.85rem !important;
  opacity: 0.7;
}

/* ---- IMAGE PLACEHOLDER ---- */
.card-media .placeholder {
  position: absolute;
  top: 0; left: 0;
  width: 100%; height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #f0e6d6 0%, #e8dac8 100%);
  color: var(--gold);
  font-size: 2.5rem;
}

.card-media .placeholder svg {
  width: 48px; height: 48px;
  opacity: 0.4;
}

/* ---- ANIMATIONS ---- */
@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(16px); }
  to { opacity: 1; transform: translateY(0); }
}

.card { animation: fadeInUp 0.4s ease both; }

/* ---- RESPONSIVE ---- */
@media (max-width: 768px) {
  .hero-name { font-size: 2rem; }
  .toolbar-inner { flex-direction: column; align-items: stretch; }
  .filter-group { justify-content: center; flex-wrap: wrap; }
  .gallery { grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 0.8rem; }
  .card-body { padding: 0.5rem 0.7rem; }
  .card-caption { -webkit-line-clamp: 2; font-size: 0.75rem; }
  .modal-content { flex-direction: column; }
  .modal-sidebar { max-height: 40vh; }
  .modal-media { min-height: 250px; }
  .modal-prev { left: 8px; }
  .modal-next { right: 8px; }
  .modal-nav { width: 36px; height: 36px; font-size: 1rem; }
}

@media (max-width: 480px) {
  .gallery { grid-template-columns: repeat(2, 1fr); gap: 0.5rem; }
  .card-footer { display: none; }
  .hero-stats { gap: 1rem; }
}
