/* Art Oeuvre Page — Overhauled Styles */

/* ========== Art Page Color Overrides ========== */
body.art-page {
  --art-accent-1: #e84caf;   /* hot magenta */
  --art-accent-2: #ff6b35;   /* electric orange */
  --art-accent-3: #a855f7;   /* vivid purple */
  --art-accent-4: #facc15;   /* golden yellow */
  --art-accent-5: #06b6d4;   /* cyan */
  --art-gradient: linear-gradient(135deg, #e84caf, #ff6b35, #a855f7);
  --art-bg-deep: #0a0a0f;
  --art-bg-mid: #12101a;
  background: var(--art-bg-deep);
}

/* ========== Animated Background Glow ========== */
body.art-page::before {
  content: "";
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background:
    radial-gradient(ellipse 80% 60% at 20% 10%, rgba(232, 76, 175, 0.12) 0%, transparent 60%),
    radial-gradient(ellipse 60% 80% at 80% 30%, rgba(168, 85, 247, 0.10) 0%, transparent 60%),
    radial-gradient(ellipse 70% 50% at 50% 90%, rgba(255, 107, 53, 0.08) 0%, transparent 60%);
  pointer-events: none;
  z-index: 0;
  animation: glow-drift 12s ease-in-out infinite alternate;
}
@keyframes glow-drift {
  0% {
    background:
      radial-gradient(ellipse 80% 60% at 20% 10%, rgba(232, 76, 175, 0.12) 0%, transparent 60%),
      radial-gradient(ellipse 60% 80% at 80% 30%, rgba(168, 85, 247, 0.10) 0%, transparent 60%),
      radial-gradient(ellipse 70% 50% at 50% 90%, rgba(255, 107, 53, 0.08) 0%, transparent 60%);
  }
  33% {
    background:
      radial-gradient(ellipse 70% 70% at 70% 20%, rgba(168, 85, 247, 0.13) 0%, transparent 60%),
      radial-gradient(ellipse 80% 60% at 20% 70%, rgba(6, 182, 212, 0.10) 0%, transparent 60%),
      radial-gradient(ellipse 60% 50% at 50% 40%, rgba(232, 76, 175, 0.08) 0%, transparent 60%);
  }
  66% {
    background:
      radial-gradient(ellipse 60% 80% at 40% 80%, rgba(255, 107, 53, 0.12) 0%, transparent 60%),
      radial-gradient(ellipse 80% 60% at 80% 60%, rgba(250, 204, 21, 0.08) 0%, transparent 60%),
      radial-gradient(ellipse 70% 70% at 10% 30%, rgba(168, 85, 247, 0.10) 0%, transparent 60%);
  }
  100% {
    background:
      radial-gradient(ellipse 80% 60% at 60% 15%, rgba(6, 182, 212, 0.12) 0%, transparent 60%),
      radial-gradient(ellipse 60% 80% at 30% 50%, rgba(232, 76, 175, 0.10) 0%, transparent 60%),
      radial-gradient(ellipse 70% 50% at 70% 80%, rgba(168, 85, 247, 0.08) 0%, transparent 60%);
  }
}

/* ========== Film Grain Overlay ========== */
body.art-page::after {
  content: "";
  position: fixed;
  top: -100%;
  left: -50%;
  width: 300%;
  height: 300%;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)' opacity='0.4'/%3E%3C/svg%3E");
  opacity: 0.035;
  pointer-events: none;
  z-index: 9999;
  animation: grain 8s steps(10) infinite;
}
@keyframes grain {
  0%, 100% { transform: translate(0, 0); }
  10% { transform: translate(-5%, -10%); }
  30% { transform: translate(7%, -25%); }
  50% { transform: translate(-15%, 10%); }
  70% { transform: translate(0%, 15%); }
  90% { transform: translate(-10%, 10%); }
}

/* ========== Header/Nav Gradient Override (art page only) ========== */
body.art-page .site-title a {
  background: var(--art-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

body.art-page .site-title:hover a {
  filter: brightness(1.3);
}

body.art-page .menu-item a,
body.art-page .social-item a,
body.art-page .menu-icon {
  color: rgba(255, 255, 255, 0.5);
  transition: all 0.4s ease;
}

body.art-page .menu-item:hover a,
body.art-page .social-item:hover a {
  background: var(--art-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

body.art-page .headerMobile .site-title a {
  background: var(--art-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

body.art-page .headerMobile .menu-item a,
body.art-page .headerMobile .menu-item {
  color: rgba(255, 255, 255, 0.5);
}

body.art-page .headerMobile a:hover .menu-item {
  background: var(--art-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* ========== Scroll Progress Bar ========== */
.scroll-progress {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 2px;
  background: var(--art-gradient);
  transform-origin: left;
  transform: scaleX(0);
  z-index: 10000;
  pointer-events: none;
}
@supports (animation-timeline: scroll()) {
  .scroll-progress {
    animation: grow-progress linear forwards;
    animation-timeline: scroll();
  }
}
@keyframes grow-progress {
  from { transform: scaleX(0); }
  to { transform: scaleX(1); }
}

/* ========== Page Layout ========== */
.art-content {
  font-family: europa, sans-serif;
  font-size: 18px;
  font-weight: 300;
  margin: auto;
  width: 90%;
  max-width: 1100px;
  text-align: center;
  letter-spacing: 0.02em;
  padding-bottom: 5rem;
  cursor: default;
  position: relative;
  z-index: 1;
}

.art-content h1 {
  font-size: clamp(2.5rem, 7vw, 5rem);
  background: var(--art-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  letter-spacing: 0.12em;
  margin: 0 0 1.5rem 0;
  transition: filter 0.5s ease;
}

.art-content h1:hover {
  filter: brightness(1.3);
}

.art-intro {
  color: var(--color-seven);
  max-width: 640px;
  margin: 0 auto 2rem auto;
  text-align: center;
  font-size: 1.05rem;
  line-height: 1.7;
  opacity: 0.85;
}

/* ========== Sticky Frosted Nav ========== */
.art-nav-container {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(10, 10, 15, 0.75);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid rgba(232, 76, 175, 0.12);
  border-radius: 0 0 16px 16px;
  margin: 0 auto 3rem;
  padding: 1rem 0;
  width: fit-content;
  max-width: 100%;
}

.art-nav {
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  text-align: center;
  width: 100%;
  margin: 2px auto;
  padding: 0 24px;
  gap: 0;
}

.art-nav a {
  color: white;
  padding: 6px 14px;
  transition: color 0.3s ease;
  position: relative;
  font-size: 15px;
  letter-spacing: 0.08em;
}

.art-nav a::after {
  content: "";
  position: absolute;
  bottom: 2px;
  left: 50%;
  width: 0;
  height: 2px;
  background: var(--art-gradient);
  transition: width 0.3s ease, left 0.3s ease;
  border-radius: 1px;
}

.art-nav a:hover {
  color: white;
  text-decoration: none;
}

.art-nav a:hover::after {
  width: 70%;
  left: 15%;
}

.art-nav a.active {
  color: var(--art-accent-1);
}

.art-nav a.active::after {
  width: 70%;
  left: 15%;
}

/* ========== Section Dividers ========== */
.art-section + .art-section::before {
  content: "";
  display: block;
  width: 120px;
  height: 2px;
  background: var(--art-gradient);
  margin: 2rem auto 4rem;
  border-radius: 1px;
  opacity: 0.6;
}

/* ========== Sections ========== */
.art-section {
  margin-bottom: 4rem;
  scroll-margin-top: 80px;
}

.art-section h3 {
  font-size: clamp(1.8rem, 4vw, 3rem);
  background: var(--art-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  letter-spacing: 0.1em;
  text-transform: none;
  font-weight: normal;
  text-decoration: none;
  margin-top: 20px;
  margin-bottom: 2rem;
  position: relative;
  display: inline-block;
}

.art-section h3 .h3-white {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  color: white;
  -webkit-text-fill-color: white;
  transition: opacity 0.25s ease;
}

.art-section h3.flash-gradient .h3-white {
  opacity: 0;
}

.art-section h3.flash-return .h3-white {
  opacity: 1;
}

.art-section h3 {
  overflow: hidden;
}

.art-section h3 .h3-inner {
  display: block;
}

.art-section h3.flash-rise .h3-inner,
.art-section h3.flash-rise .h3-white {
  animation: flash-rise 0.5s cubic-bezier(0.23, 1, 0.32, 1);
}

@keyframes flash-rise {
  0% {
    transform: translateY(100%);
  }
  100% {
    transform: translateY(0);
  }
}

.art-empty {
  color: rgba(255, 255, 255, 0.3);
  font-style: italic;
  font-size: 16px;
  text-align: center;
}

/* ========== Scroll Reveal Animations ========== */
.animate-on-scroll {
  opacity: 0;
  transform: translateY(40px);
  transition: opacity 0.8s cubic-bezier(0.23, 1, 0.32, 1),
              transform 0.8s cubic-bezier(0.23, 1, 0.32, 1);
}

.animate-on-scroll.in-view {
  opacity: 1;
  transform: translateY(0);
}

@media (prefers-reduced-motion: reduce) {
  .animate-on-scroll {
    opacity: 1;
    transform: none;
    transition: none;
  }
}

/* ========== Masonry (images) ========== */
.art-masonry {
  columns: 3;
  column-gap: 1.2rem;
}

.art-masonry .art-item {
  break-inside: avoid;
  margin-bottom: 1.2rem;
  display: inline-block;
  width: 100%;
}

@media only screen and (max-width: 750px) {
  .art-masonry {
    columns: 2;
  }
}

@media only screen and (max-width: 480px) {
  .art-masonry {
    columns: 1;
  }
}

/* ========== Grid (collages, images, gifs) ========== */
.art-grid {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 1.2rem;
}

.art-item {
  flex: 1 1 280px;
  max-width: 400px;
  position: relative;
  overflow: hidden;
  cursor: pointer;
  border-radius: 6px;
}

.art-item img,
.art-item video {
  width: 100%;
  height: auto;
  display: block;
  border-radius: 6px;
  transition: transform 0.5s cubic-bezier(0.23, 1, 0.32, 1),
              filter 0.5s cubic-bezier(0.23, 1, 0.32, 1);
}

/* Dim siblings on hover */
@media (hover: hover) {
  .art-grid:has(.art-item:hover) .art-item:not(:hover) {
    opacity: 0.25;
    filter: grayscale(60%) blur(1px);
    transition: all 0.5s cubic-bezier(0.23, 1, 0.32, 1);
  }

  .art-item {
    transition: opacity 0.5s cubic-bezier(0.23, 1, 0.32, 1),
                filter 0.5s cubic-bezier(0.23, 1, 0.32, 1),
                transform 0.5s cubic-bezier(0.23, 1, 0.32, 1);
  }

  .art-item:hover {
    opacity: 1;
    filter: brightness(1.08);
    z-index: 10;
  }

  .art-item:hover img,
  .art-item:hover video {
    transform: scale(1.03);
  }
}

/* Caption slides up on hover */
.art-item figcaption {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  background: linear-gradient(transparent, rgba(10, 10, 15, 0.9));
  color: rgba(255, 255, 255, 0.85);
  font-size: 14px;
  padding: 2.5rem 1rem 1rem;
  transform: translateY(100%);
  transition: transform 0.4s cubic-bezier(0.23, 1, 0.32, 1);
  text-align: center;
  border-radius: 0 0 6px 6px;
  letter-spacing: 0.04em;
}

@media (hover: hover) {
  .art-item:hover figcaption {
    transform: translateY(0);
  }
}

/* On touch devices, always show caption */
@media (hover: none) {
  .art-item figcaption {
    position: relative;
    transform: none;
    background: none;
    padding: 0.5rem 0 0;
  }
}

/* ========== Text Items (poems, stories) ========== */
.art-list {
  max-width: 625px;
  margin: 0 auto;
  text-align: left;
}

.art-text-item {
  margin-bottom: 0.5rem;
  padding-bottom: 0.5rem;
  position: relative;
  border-bottom: none;
  text-align: center;
}

/* ========== Mentor Mosaic ========== */
.mentor-mosaic {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0;
  max-width: 400px;
  margin: 1.2rem auto 1rem auto;
  overflow: hidden;
  border-radius: 8px;
}

.mentor-mosaic img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.art-text-item h4 {
  text-transform: none;
  font-weight: 500;
  letter-spacing: 0.04em;
  margin-bottom: 0.75rem;
}

.art-text-item h4 a {
  background: var(--art-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  text-decoration: none;
}

.art-text-item p {
  color: rgba(255, 255, 255, 0.7);
  line-height: 1.8;
  white-space: pre-line;
}

/* ========== Music Items ========== */
.art-music-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 1.2rem;
  justify-content: center;
}

.art-music-grid .art-music-item {
  flex: 0 1 calc(50% - 0.6rem);
}

@media only screen and (max-width: 750px) {
  .art-music-grid {
    grid-template-columns: 1fr;
  }
}

.art-music-item {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(232, 76, 175, 0.1);
  border-radius: 12px;
  padding: 0.75rem;
  transition: border-color 0.3s ease, background 0.3s ease;
}

.art-music-item:hover {
  border-color: rgba(232, 76, 175, 0.25);
  background: rgba(255, 255, 255, 0.05);
}

.art-music-item:last-child {
  margin-bottom: 0;
}

.art-music-item audio {
  width: 100%;
  margin-bottom: 0.5rem;
}

.art-music-item p {
  color: rgba(255, 255, 255, 0.6);
  font-size: 14px;
}

.art-music-item .music-title {
  font-size: 16px;
  color: white;
  margin-bottom: 0.75rem;
  letter-spacing: 0.04em;
}

.art-music-item .music-subtitle {
  font-size: 13px;
  color: rgba(255, 255, 255, 0.35);
  margin-top: 0.5rem;
}

/* YouTube embed in music section */
.art-music-item iframe {
  width: 100%;
  aspect-ratio: 16 / 9;
  border: none;
  border-radius: 8px;
  margin-bottom: 0.75rem;
}

/* ========== Lightbox ========== */
.art-lightbox {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(10, 10, 15, 0.9);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  cursor: pointer;
  padding: 2rem;
}

.art-lightbox img,
.art-lightbox video {
  max-width: 90vw;
  max-height: 90vh;
  object-fit: contain;
  border-radius: 4px;
  animation: lightbox-in 0.35s cubic-bezier(0.23, 1, 0.32, 1);
}

@keyframes lightbox-in {
  from {
    transform: scale(0.92);
    opacity: 0;
  }
  to {
    transform: scale(1);
    opacity: 1;
  }
}

/* ========== Go to Top Button ========== */
#goToTopButton {
  margin-bottom: 0;
  width: 40px;
  height: 40px;
  opacity: 0;
  display: block;
  background: rgba(10, 10, 15, 0.8);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  padding: 0 0.5rem;
  color: white;
  position: fixed;
  right: 0.8rem;
  bottom: 0.8rem;
  border-radius: 50%;
  cursor: pointer;
  text-decoration: none;
  border: 1px solid rgba(232, 76, 175, 0.2);
  z-index: 50;
  transition: opacity 0.3s ease, border-color 0.3s ease;
  pointer-events: none;
}

#goToTopButton.visible {
  opacity: 0.6;
  pointer-events: auto;
}

#goToTopButton:hover {
  opacity: 1;
  border-color: rgba(232, 76, 175, 0.5);
}

/* ========== NSFW Gate ========== */
.art-nsfw-heading {
  cursor: pointer;
}

.art-nsfw-hidden {
  display: none;
}

/* NSFW popup overlay */
.art-nsfw-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(10, 10, 15, 0.9);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 999;
  padding: 2rem;
}

.art-nsfw-popup {
  background: var(--art-bg-mid);
  border: 1px solid rgba(232, 76, 175, 0.2);
  border-radius: 16px;
  padding: 2.5rem;
  max-width: 420px;
  width: 100%;
  text-align: center;
  animation: lightbox-in 0.35s cubic-bezier(0.23, 1, 0.32, 1);
}

.art-nsfw-popup h4 {
  text-transform: none;
  font-weight: 500;
  margin-bottom: 1rem;
  letter-spacing: 0.04em;
}

.art-nsfw-popup p {
  color: rgba(255, 255, 255, 0.6);
  margin-bottom: 1.5rem;
  font-size: 16px;
  line-height: 1.6;
}

.art-nsfw-popup button {
  font-family: europa, sans-serif;
  font-size: 15px;
  padding: 10px 24px;
  border-radius: 8px;
  cursor: pointer;
  margin: 6px;
  border: none;
  transition: all 0.25s ease;
  letter-spacing: 0.04em;
}

.art-nsfw-btn-yes {
  background: var(--art-gradient);
  color: white;
}

.art-nsfw-btn-yes:hover {
  filter: brightness(1.2);
}

.art-nsfw-btn-no {
  background: rgba(255, 255, 255, 0.08);
  color: white;
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.art-nsfw-btn-no:hover {
  background: rgba(255, 255, 255, 0.15);
}

/* ========== Responsive ========== */
@media only screen and (max-width: 750px) {
  .art-content {
    width: 94%;
  }

  .art-grid {
    gap: 0.8rem;
  }

  .art-nav {
    padding: 0 12px;
    gap: 0;
  }

  .art-nav a {
    padding: 5px 10px;
    font-size: 13px;
  }

  .art-nav-container {
    border-radius: 0 0 12px 12px;
  }

  .art-section h3 {
    font-size: 1.6rem;
  }

  .art-content h1 {
    font-size: 2.2rem;
  }
}

@media only screen and (max-width: 480px) {

  .art-nsfw-popup {
    padding: 1.5rem;
  }

  .art-nav-container {
    width: 100%;
    border-radius: 0;
    top: 0;
  }
}
