/* ======================================
   ROOT / THEME
====================================== */

:root {
  --accent: #4fd1ff;
  --accent-alt: #a78bfa;

  --bg-main: #0b0e14;
  --bg-radial-start: #111827;
  --bg-radial-end: #030712;

  --text-main: #f4f5f7;
}


/* ======================================
   GLOBAL / BODY
====================================== */

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

body {
  margin: 0;
  /* font-family: 'Inter', sans-serif; */
  /* font-family: "Source Sans 3", system-ui, sans-serif; */
  font-family:
    "Source Sans 3",
    "Inter",
    system-ui,
    sans-serif;
  color: var(--text-main);
  background:
    radial-gradient(circle at top, var(--bg-radial-start), var(--bg-radial-end));
  background-color: var(--bg-main);
  overflow-x: hidden;
}


/* ======================================
   BACKGROUND CANVAS (WEBGL)
====================================== */

#bg-canvas {
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
}


/* ======================================
   HERO
====================================== */

.hero {
  min-height: 40vh;            /* enables vertical centering */
  padding: 120px 20px 80px;
  display: flex;
  flex-direction: column;
  justify-content: center;      /* vertical centering */
  align-items: center;          /* horizontal centering */
  text-align: center;
}

.hero h1 {
  font-weight: 600;   /* avoid ultra-bold */
  letter-spacing: -0.02em;
}

.hero p {
  line-height: 1.55;
}


.hero h1 {
  margin: 0;
  text-align: center; /* keep heading centered */
  font-size: clamp(2.4rem, 6vw, 3.2rem);
  font-weight: 700;
  background: linear-gradient(90deg, var(--accent), var(--accent-alt));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.hero p {
  margin-top: 16px;
  max-width: 600px;
  opacity: 0.85;
  font-size: 1.05rem;
  text-align: justify;
  text-align-last: left;
}

/* ======================================
   MODAL POPOVER
====================================== */

/* Top-right link */
.about-link {
  position: fixed;
  top: 20px;
  right: 40px;
  font-weight: 600;
  color: var(--accent);
  text-decoration: none;
  z-index: 1000;
  transition: color 0.2s ease;
}

.about-link:hover {
  color: var(--accent-alt);
}

/* Modal background */
.modal {
  position: fixed;
  inset: 0;
  background: rgba(10, 12, 18, 0.95);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 999;
  backdrop-filter: blur(8px);
  transition: opacity 0.3s ease;
}

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

/* Modal content */
.modal-content {
  background: #111827;
  border-radius: 16px;
  padding: 40px 30px 30px;
  max-width: 500px;
  width: 90%;
  text-align: center;
  position: relative;
  color: #f4f5f7;
  overflow: hidden;
}

/* Close button */
.modal-close {
  position: absolute;
  top: 16px;
  right: 16px;
  background: none;
  border: none;
  font-size: 2rem;
  color: #fff;
  cursor: pointer;
}

/* Artist photo */
.artist-photo {
  width: 120px;
  height: 120px;
  border-radius: 50%;
  object-fit: cover;
  margin-bottom: 20px;
  border: 2px solid var(--accent);
}

/* Modal text */
.modal-content h2 {
  margin-top: 0;
  font-size: 1.8rem;
  background: linear-gradient(90deg, var(--accent), var(--accent-alt));
  -webkit-background-clip: text;
  color: transparent;
}

.modal-content p {
  font-size: 1rem;
  line-height: 1.6;
}


@keyframes slideIn {
  from { transform: translateY(-20px); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}


/* ======================================
   GALLERY LAYOUT
====================================== */

.gallery {
  padding: 80px 40px;
}

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: clamp(24px, 4vw, 40px);
  align-items: start;
}


/* ======================================
   WEBGL ART CARDS
====================================== */

.art-webgl {
  position: relative;
  width: 100%;
  aspect-ratio: 1 / 1; /* fallback until JS sets real ratio */
  border-radius: 20px;
  overflow: hidden;

  background: rgba(255, 255, 255, 0.02);
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.4);

  cursor: pointer;
}

.art-webgl canvas {
  width: 100%;
  height: 100%;
  display: block;
}

.art-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 16px;
  background: linear-gradient(to top, rgba(0,0,0,0.6), transparent);
  color: #fff;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
  border-radius: 20px;
}

.art-webgl:hover .art-overlay {
  opacity: 1;
  pointer-events: auto;
}

.art-overlay h3 {
  margin: 0;
  font-size: 1.2rem;
  font-weight: 600;
}

.art-overlay p {
  margin: 4px 0 0;
  font-size: 0.9rem;
  line-height: 1.2;
  opacity: 0.9;
}


/* ======================================
   LIGHTBOX
====================================== */

.lightbox {
  position: fixed;
  inset: 0;
  z-index: 999;

  display: flex;
  align-items: center;
  justify-content: center;

  background: rgba(10, 12, 18, 0.9);
  backdrop-filter: blur(8px);

  transition: opacity 0.3s ease;
}

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

.lightbox img {
  max-width: 90vw;
  max-height: 85vh;

  border-radius: 16px;
  box-shadow: 0 40px 120px rgba(0, 0, 0, 0.6);

  animation: zoomIn 0.35s ease;
  transition: opacity 0.25s ease;
}


/* ======================================
   LIGHTBOX NAVIGATION
====================================== */

.lightbox-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);

  width: 56px;
  height: 56px;
  border-radius: 50%;

  background: rgba(255, 255, 255, 0.06);
  border: none;

  color: #ffffff;
  font-size: 3rem;
  cursor: pointer;

  backdrop-filter: blur(6px);
  opacity: 0.7;

  transition: opacity 0.2s ease, background 0.2s ease;
}

.lightbox-nav:hover {
  opacity: 1;
  background: rgba(255, 255, 255, 0.12);
}

.lightbox-nav.prev {
  left: 40px;
}

.lightbox-nav.next {
  right: 40px;
}


/* ======================================
   ANIMATIONS
====================================== */

@keyframes zoomIn {
  from {
    transform: scale(0.96);
    opacity: 0;
  }
  to {
    transform: scale(1);
    opacity: 1;
  }
}


/* ======================================
   RESPONSIVE POLISH
====================================== */

@media (max-width: 768px) {
  .gallery {
    padding: 60px 20px;
  }

  .lightbox-nav {
    width: 44px;
    height: 44px;
    font-size: 2.2rem;
  }

  .lightbox-nav.prev {
    left: 16px;
  }

  .lightbox-nav.next {
    right: 16px;
  }
}

/* ======================================
   SOCIAL LINKS
====================================== */

.social-links {
  position: fixed;
  top: 24px;
  left: 32px;
  display: flex;
  gap: 16px;
  z-index: 1000;
}

.social-links a {
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.04);
  backdrop-filter: blur(6px);
  color: #cbd5f5; /* controls SVG color */
  transition: transform 0.25s ease, background 0.25s ease, color 0.25s ease;
}

.social-links a:hover {
  transform: translateY(-2px);
  background: rgba(255, 255, 255, 0.08);
  color: var(--accent);
}

.social-links svg {
  width: 18px !important;
  height: 18px !important;
  display: block;
  flex-shrink: 0;
}

.social-links a:hover svg {
  filter: drop-shadow(0 0 6px rgba(79, 209, 255, 0.6));
}

/* Mobile positioning */
@media (max-width: 768px) {
  .social-links {
    left: 20px;
    bottom: 20px;
  }
}
