/* ── Variables ── */
:root {
  --bg: #fbfcfd;
  --text: #1a1a1a;
  --text-muted: #666;
  --accent: #c8a96e;
  --font-display: "Amiri", serif;
  --font-body: "Tajawal", sans-serif;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #141414;
    --text: #f0ede8;
    --text-muted: #999;
  }
}

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

body {
  background-color: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  overflow-x: hidden;
  transition: background-color 0.4s, color 0.4s;
}

/* ── Header ── */
.site-header {
  text-align: center;
  padding: 52px 20px 20px;
}
.subtitle {
  font-family: var(--font-display);
  font-size: 1.2rem;
  color: var(--text-muted);
  margin-bottom: 8px;
}
.artist-name {
  font-family: var(--font-display);
  font-size: clamp(2.4rem, 6vw, 4rem);
  font-weight: 700;
  line-height: 1.1;
}

/* ── Carousel ── */
.carousel-wrapper {
  width: 100%;
  padding: 30px 0 10px;
}

.carousel {
  position: relative;
  width: 100%;
  height: 550px; /* fallback before JS sets it */
  overflow: hidden;
  cursor: grab;
  transition: height 0.5s ease;
}
.carousel.dragging { cursor: grabbing; }

.carousel-track {
  position: absolute;
  top: 0; left: 0;
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  will-change: transform;
}

.carousel-item {
  position: absolute;
  top: 50%;
  transform-origin: center center;
  transition:
    transform 0.5s cubic-bezier(0.25, 0.46, 0.45, 0.94),
    opacity   0.5s ease,
    box-shadow 0.5s ease;
  border-radius: 4px;
  overflow: hidden;
  cursor: pointer;
}

.carousel-item img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  pointer-events: none;
  border-radius: 4px;
}

/* ── Nav Buttons ── */
.carousel-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  font-size: 2.4rem;
  color: var(--text);
  cursor: pointer;
  opacity: 0.3;
  padding: 8px 16px;
  transition: opacity 0.2s;
  z-index: 10;
  line-height: 1;
  user-select: none;
}
.carousel-btn:hover { opacity: 0.8; }
.carousel-btn.prev { right: 8px; }
.carousel-btn.next { left: 8px; }

/* ── Dots ── */
.carousel-dots {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin-top: 18px;
}
.dot {
  width: 6px; height: 6px;
  border-radius: 50%;
  border: none;
  background: var(--text-muted);
  opacity: 0.3;
  cursor: pointer;
  transition: opacity 0.3s, transform 0.3s, background 0.3s;
}
.dot.active {
  opacity: 1;
  background: var(--accent);
  transform: scale(1.5);
}

/* ── Painting Info ── */
.painting-info {
  text-align: center;
  padding: 28px 24px 10px;
  min-height: 90px;
  transition: opacity 0.3s ease;
}
.painting-info.fade-out { opacity: 0; }
.painting-title {
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 700;
  margin-bottom: 10px;
}
.painting-desc {
  font-size: 0.97rem;
  color: var(--text-muted);
  line-height: 1.8;
  max-width: 480px;
  margin: 0 auto;
}

/* ── Bio ── */
.bio-section {
  text-align: center;
  padding: 36px 24px 10px;
  max-width: 580px;
  margin: 0 auto;
  border-top: 1px solid rgba(128,128,128,0.15);
}
.bio-text {
  font-family: var(--font-display);
  font-size: 1.05rem;
  line-height: 2;
}

/* ── Instagram ── */
.instagram-link {
  display: flex;
  justify-content: center;
  margin-top: 28px;
  margin-bottom: 40px;
}
.instagram-link a {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--text);
  text-decoration: none;
  font-size: 0.95rem;
}

/* ── Mobile ── */
@media (max-width: 600px) {
  .artist-name { font-size: 2.2rem; }
}
