/* assets/css/styles.css */

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

html,
body {
  margin: 0;
  padding: 0;
}

/* Base */
body {
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: #05060a;
  color: #f5f5f5;
  line-height: 1.6;
}

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

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

/* Layout helper */
.container {
  width: 100%;
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

/* Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  background: rgba(5, 6, 10, 0.96);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 60px;
}

.logo {
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  font-size: 0.85rem;
}

.nav a {
  margin-left: 1.2rem;
  font-size: 0.9rem;
  opacity: 0.78;
  position: relative;
}

.nav a.active,
.nav a:hover {
  opacity: 1;
}

.nav a.active::after,
.nav a:hover::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -0.35rem;
  width: 100%;
  height: 2px;
  background: #f97316;
  border-radius: 999px;
}

/* Hero */
.hero {
  padding: 4rem 0 3rem;
  background: radial-gradient(circle at top left, #273356, #05060a 55%);
}

.hero-inner {
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

.hero-text {
  max-width: 640px;
}

.hero-title {
  margin: 0 0 1rem;
}

.hero-line-small {
  display: block;
  font-size: 0.9rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  opacity: 0.75;
}

/* Name crossfade: VIOREL BALAS → SABORAVELLI */
.hero-name-anim {
  display: block;
  margin-top: 0.2rem;
  font-size: clamp(2.1rem, 4vw, 3rem);
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  position: relative;
  height: 1.2em;
  overflow: hidden;
}

/* Stack both names */
.hero-name-anim .name-viorel,
.hero-name-anim .name-sabor {
  position: absolute;
  left: 0;
  top: 0;
  width: 100%;
  text-rendering: optimizeLegibility;
}

/* Highlight letters inside SABORAVELLI that come from VIOREL */
.hero-name-anim .name-sabor .hl {
  color: #f97316;
}

/* Viorel stays visible first, then fades out */
.hero-name-anim .name-viorel {
  opacity: 1;
  animation: nameFadeOut 1.2s ease forwards;
  animation-delay: 2.5s;
}

/* Saboravelli fades in after Viorel */
.hero-name-anim .name-sabor {
  opacity: 0;
  animation: nameFadeIn 1.2s ease forwards;
  animation-delay: 3.7s;
}

/* Keyframes for crossfade */
@keyframes nameFadeOut {
  0% { opacity: 1; }
  100% { opacity: 0; }
}

@keyframes nameFadeIn {
  0% { opacity: 0; }
  100% { opacity: 1; }
}

/* Anagram note (visibility controlled by JS changing inline opacity) */
.hero-anagram-note {
  margin-top: 0.4rem;
  font-size: 0.85rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: rgba(248, 250, 252, 0.72);
  transition: opacity 0.7s ease;
}

.hero-anagram-label {
  color: #f97316;
  font-weight: 600;
}

.hero-anagram-original {
  font-weight: 500;
}

/* Hero body text */
.hero-text p {
  margin-top: 0.5rem;
  opacity: 0.9;
}

.hero-tagline {
  margin-top: 0.5rem;
  font-style: italic;
  opacity: 0.95;
}

.hero-actions {
  margin-top: 1.5rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.55rem 1.3rem;
  border-radius: 999px;
  border: 1px solid transparent;
  font-size: 0.92rem;
  cursor: pointer;
  transition: transform 0.15s ease,
    box-shadow 0.15s ease,
    background 0.15s ease,
    border-color 0.15s ease;
}

.btn.primary {
  background: #f97316;
  color: #05060a;
  box-shadow: 0 10px 26px rgba(249, 115, 22, 0.4);
}

.btn.primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 14px 32px rgba(249, 115, 22, 0.55);
}

.btn.secondary {
  border-color: rgba(255, 255, 255, 0.25);
  background: transparent;
}

.btn.secondary:hover {
  border-color: rgba(255, 255, 255, 0.5);
  background: rgba(255, 255, 255, 0.04);
}

/* Sections */
.section {
  padding: 3rem 0;
}

.section-title {
  font-size: 1.7rem;  /* slightly larger than 1.6 */
  margin: 0 0 0.2rem;
  font-weight: 600;
}

.section-subtitle {
  opacity: 0.78;
  margin: 0 0 2rem;
  max-width: 620px;
  margin-bottom: 1.6rem;
}

/* Bring Artist Statement closer to the bio on About page */
body[data-page="about"] .section-artist-statement {
  padding-top: 0.1rem;  /* effectively no gap above */
}

/* Center the Artist Statement block on the About page */
body[data-page="about"] .artist-statement {
  max-width: 720px;      /* nice readable width */
  margin: 0 auto;        /* centers the whole block */
}

/* Center the Artist Statement title */
body[data-page="about"] .artist-statement h2 {
  text-align: center;
  margin-bottom: 1rem;
}

.muted {
  opacity: 0.75;
  font-size: 0.88rem;
}

.small {
  font-size: 0.88rem;
}

/* Gallery grid */
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 1.8rem; /* from 1.6 */
}

/* Painting cards */
.painting-card {
  background: #10121c;
  border-radius: 1rem;
  overflow: hidden;
  box-shadow: 0 14px 32px rgba(0, 0, 0, 0.55);
  border: 1px solid rgba(255, 255, 255, 0.04);
  transition: transform 0.18s ease, box-shadow 0.18s ease,
    border-color 0.18s ease;
  text-decoration: none;
  display: flex;
  flex-direction: column;
}

.painting-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 22px 46px rgba(0, 0, 0, 0.72);
  border-color: rgba(249, 115, 22, 0.45);
}

/* Thumb with fixed aspect ratio (2:3, like 250x375) */
.painting-thumb-wrapper {
  aspect-ratio: 2 / 3;
  overflow: hidden;
  background: #090b10;
}

.painting-thumb-wrapper img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}

.painting-card:hover .painting-thumb-wrapper img {
  transform: scale(1.04);
}

.painting-card-body {
  padding: 0.9rem 1rem 1rem;
  position: relative;
}

.painting-card-body h3 {
  margin: 0 0 0.3rem;
  font-size: 1.02rem;
}

.meta-line {
  margin: 0 0 0.5rem;
}

/* Availability badges */
.availability-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.1rem 0.6rem;
  border-radius: 999px;
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-top: 0.4rem;
}

.badge-available {
  background: rgba(16, 185, 129, 0.16);
  color: #6ee7b7;
}

.badge-not-available {
  background: rgba(248, 113, 113, 0.16);
  color: #fecaca;
}

/* Pagination */
.pagination {
  margin-top: 2rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  align-items: center;
}

.page-link {
  padding: 0.3rem 0.7rem;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  font-size: 0.8rem;
  opacity: 0.85;
}

.page-link:hover {
  opacity: 1;
  border-color: rgba(249, 115, 22, 0.7);
}

.page-link.current {
  background: #f97316;
  color: #05060a;
  border-color: #f97316;
  opacity: 1;
}

/* Painting detail */
.painting-detail-header h1 {
  margin: 0 0 0.3rem;
  font-size: 1.8rem;
}

.painting-detail-body {
  margin-top: 2rem;
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr);
  gap: 2rem;
}

/* Container for the main painting image on detail page */
.painting-detail-image {
  position: relative;
  cursor: zoom-in;
  overflow: hidden; /* so the image can move inside without showing edges */
}


/* Base state of detail image */
.painting-detail-image img#main-image {
  border-radius: 1rem;
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.75);

  /* Keep painting visible without scrolling */
  max-height: 70vh;
  width: auto;
  height: auto;
  object-fit: contain;

  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

/* Zoomed state */
.painting-detail-image.zoomed {
  cursor: zoom-out;
}

.painting-detail-image.zoomed img#main-image {
  max-height: none;
  width: min(1100px, 100%);
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.85);
}


/* Small “click to zoom” hint */
.zoom-hint {
  position: absolute;
  right: 0.75rem;
  bottom: 0.75rem;
  padding: 0.18rem 0.55rem;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.7);
  font-size: 0.7rem;
  display: flex;
  align-items: center;
  gap: 0.25rem;
  opacity: 0.9;
  pointer-events: none;
}

.zoom-hint-icon {
  font-size: 0.9rem;
  line-height: 1;
}

/* Hide hint when zoomed */
.painting-detail-image.zoomed .zoom-hint {
  opacity: 0;
}


.painting-detail-story h2 {
  margin-top: 0;
  margin-bottom: 0.6rem;
}

.painting-detail-story p {
  margin-top: 0;
}

.availability-text {
  margin-top: 1.2rem;
  font-size: 0.9rem;
  opacity: 0.9;
  font-weight: 500;
}

/* About layout */
.about-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr); /* wider text, slightly narrower portrait column */
  gap: 1.6rem;  /* smaller gap between text and portrait */
  align-items: flex-start;
}

/* About main text column */
.about-main-text {
  max-width: 900px;  /* more characters per line */
}

.about-main-text p {
  margin-bottom: 0.7rem;
}

.about-tagline {
  font-size: 0.9rem;
  opacity: 0.85;
}

/* About portrait */
.about-portrait {
  text-align: center;
  display: flex;
  align-items: center;
  justify-content: center;
}

.about-portrait img {
  width: 85%;
  max-width: 320px; /* tweak to 220–280px if desired */
  border-radius: 1.2rem;
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.6);
  display: block;
  opacity: 0;
  transform: translateY(10px);
  animation: portraitFadeIn 0.9s ease-out forwards;
  animation-delay: 0.3s;
}

/* About page — 'Artist Statement ↓' link */
body[data-page="about"] .artist-statement-link {
  display: inline-block;
  margin-left: 0.45rem;      /* give it a bit more spacing */
  margin-top: 0.4rem;        /* small vertical separation if needed */
  font-weight: 600;
  color: #f97316;            /* on-brand orange */
  cursor: pointer;
  text-decoration: none;
  transition: opacity 0.2s ease;
}

body[data-page="about"] .artist-statement-link:hover {
  opacity: 0.75;
}



@keyframes portraitFadeIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* About divider */
.about-divider {
  border: none;
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  margin: 0.6rem 0 0.4rem;  /* much tighter */
}

/* Artist Statement block */
.artist-statement {
  max-width: 780px;
}

.artist-statement p {
  margin-bottom: 0.9rem;
}

.artist-statement h2 {
  margin-top: 0;
}

/* Contact */
.contact-layout {
  max-width: 720px;
}

.contact-main h1 {
  margin-top: 0;
}

.contact-email a {
  color: #f97316;
}

.contact-email a:hover {
  text-decoration: underline;
}

.contact-location {
  opacity: 0.85;
}

/* Back link */
.back-link {
  display: inline-flex;
  align-items: center;
  margin-bottom: 1.3rem;
  font-size: 0.88rem;
  opacity: 0.8;
}

.back-link:hover {
  opacity: 1;
}

/* Footer */
.site-footer {
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  padding: 1.25rem 0;
  margin-top: 1rem;
  font-size: 0.8rem;
  opacity: 0.78;
}

/* Reduce gap before Artist Statement on About page */
body[data-page="about"] .about-divider {
  margin-top: 1.4rem;
  margin-bottom: 1.2rem;
}

body[data-page="about"] .section .container.artist-statement {
  margin-top: -0.3rem;
}

/* Trim top + bottom padding of the first section on About page */
body[data-page="about"] .section:first-of-type {
  padding-top: 1rem !important;   /* down from 3rem */
  padding-bottom: 0 !important;   /* already tried, keep it */
}

/* Reduce space above Gallery section (homepage only) */
body[data-page="gallery"] #gallery-section {
  padding-top: 1.6rem; /* was 3rem — this tightens spacing nicely */
}

/* Responsive */
@media (max-width: 768px) {
  .header-inner {
    height: 56px;
  }

  .hero {
    padding: 3rem 0 2.5rem;
  }

  .painting-detail-body {
    grid-template-columns: minmax(0, 1fr);
  }

  .about-layout {
    grid-template-columns: minmax(0, 1fr);
    row-gap: 2rem;
  }
}
