/* ============================================
   ABOUT PAGE — ROW-BASED LAYOUT
   ============================================ */

/* -----------------------------------------------
   FIXED STAR FIELD BACKGROUND
   ----------------------------------------------- */
.about-bg-particles {
  position: fixed;
  top: 0; left: 0;
  width: 100%; height: 100%;
  z-index: 0;
  pointer-events: none;
  background: var(--color-bg-base);
}

/* Main content sits above star layer */
body > main#main-content {
  position: relative;
  z-index: 1;
}

/* All about-page rows become transparent so stars show through */
.about-row-hero,
.about-row-residencies,
.about-row-symbol,
.about-row-awards,
.about-row-contact {
  background: transparent;
}

/* -----------------------------------------------
   SHARED: Typography & Spacing Tokens for About
   ----------------------------------------------- */
.about-label {
  font-family: var(--font-display);
  font-size: clamp(0.7rem, 0.65rem + 0.1vw, 0.8rem);
  font-weight: 400;
  color: var(--color-accent);
  letter-spacing: 0.3em;
  text-transform: uppercase;
  margin-bottom: var(--space-sm);
}

.about-name {
  font-family: var(--font-display);
  font-size: 1.125rem;
  font-weight: 300;
  color: var(--color-accent);
  margin-bottom: 2.5rem;
  text-transform: uppercase;
  letter-spacing: 0.3em;
}

/* Shared paragraph style for all sections */
.about-bio p,
.about-book-item,
.about-residencies p,
.about-awards p {
  font-family: var(--font-body);
  font-size: clamp(1.3rem, 1.24rem + 0.3vw, 1.5rem);
  line-height: 1.9;
  color: var(--color-text-secondary);
  margin-bottom: var(--space-xs);
}

/* Elegant divider (reused across rows) */
.about-divider {
  margin: var(--space-sm) 0;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-sm);
}

.about-divider-line {
  flex: 1;
  height: 1px;
  background: linear-gradient(
    to right,
    transparent,
    var(--color-border-medium),
    transparent
  );
}

.about-divider-glyph {
  font-family: var(--font-display);
  font-size: 0.9rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--color-crimson);
  opacity: 0.75;
  text-shadow: 0 0 8px rgba(255, 61, 61, 0.25);
}


/* -----------------------------------------------
   ROW 1: HERO — Portrait + Author + Books
   Full viewport on load — tightened to fit
   ----------------------------------------------- */
.about-row-hero {
  min-height: 100vh;                    /* fallback: Safari < 15.4 */
  min-height: calc(var(--vh, 1vh) * 100); /* polyfill override */
  min-height: 100svh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: clamp(5rem, 10vh, 8rem) 0 clamp(1rem, 2vw, 2rem);
  position: relative;
  overflow: hidden;
}

.about-hero-grid {
  display: grid;
  grid-template-columns: 1fr 1.15fr;   /* give text column ~15% more width to prevent short-word wrapping */
  gap: var(--space-lg);
  max-width: 1200px;
  width: 100%;
  margin: 0 auto;
  padding: 0 var(--space-md);
  align-items: start;
}

/* Left column: portrait centered in its column */
.about-hero-visual {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.about-portrait {
  position: relative;
  width: 100%;
  max-width: 460px;
  max-height: calc(100vh - 10rem);
  overflow: visible;
  padding-top: 16px;
  padding-right: 16px;
  transition: transform var(--transition-slow);
}

.portrait-frame {
  position: absolute;
  top: 0;
  left: -16px;
  right: 32px;
  bottom: 16px;
  border: 1px solid var(--color-accent, #d4a853);
  pointer-events: none;
  z-index: 1;
  opacity: 0.6;
  transition: opacity 0.5s ease;
}
.about-portrait:hover .portrait-frame {
  opacity: 1;
}

.portrait-img-clip {
  position: relative;
  overflow: hidden;
  z-index: 2;
  max-height: inherit;
}

.portrait-img-clip img {
  width: 100%;
  height: 100%;
  max-height: inherit;
  object-fit: cover;
  object-position: top;
  display: block;
}

.portrait-figure {
  position: relative;
  margin: 0;
  padding: 0;
  display: block;
  cursor: pointer; /* opens UGV fullscreen viewer on click */
}

/* figcaption hidden — credit line moved to .portrait-copyright below the image
   so it's never clipped by overflow:hidden or covered by the hover scale effect */
.portrait-figure figcaption {
  display: none;
}

/* Photo credit below the portrait — sits above the image clip (z-index: 3)
   so it's never covered by the hover scale animation.
   width + max-width mirror the portrait so text-align: right
   lines up with the image's right edge. */
.portrait-copyright {
  position: relative;
  z-index: 3;
  width: 100%;
  max-width: 460px;
  margin-top: 1.2rem;
  text-align: right;
  font-family: var(--font-display, 'Montserrat', sans-serif);
  font-size: 0.7rem;
  letter-spacing: 0.05em;
  color: var(--color-text-muted);
}

/* Override <small> shrink so credit never falls below the 11px floor */
.portrait-copyright small {
  font-size: inherit;
}

.about-portrait img {
  width: 100%;
  height: auto;
  display: block;
  transition: transform var(--transition-slow);
}

.about-portrait:hover img {
  transform: scale(1.04);
}

.portrait-ink-effect {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: radial-gradient(
    ellipse at 30% 70%,
    rgba(196, 165, 127, 0.1) 0%,
    transparent 50%
  );
  pointer-events: none;
  mix-blend-mode: overlay;
}

/* Right column: text left-aligned */
.about-hero-text {
  text-align: left;
  background: var(--color-bg-card);
  padding: 1.5rem 0.85rem;   /* tighter horizontal padding — prevents orphan wraps like "RO)." */
  border-radius: 4px;
}

.about-bio {
  margin-bottom: 0;
}

.about-books-block {
  margin-top: 0;
}

.about-books {
  margin-top: var(--space-xs);
}


/* -----------------------------------------------
   ROW 2: International Residencies & Fellowships
   Dark-compatible subtle gradient, centered box, left text
   ----------------------------------------------- */
.about-row-residencies {
  padding: var(--space-xl) var(--space-md);
  display: flex;
  justify-content: center;
}

.about-row-content {
  max-width: 800px;
  width: 100%;
  text-align: left;
  background: var(--color-bg-card);
  padding: 1.5rem;
  border-radius: 4px;
}

.about-residencies,
.about-awards {
  margin-top: var(--space-xs);
}

/* Bullet lists in Books and Residencies sections */
.about-books ul,
.about-residencies ul {
  list-style-position: inside;
  padding-left: 0;
  margin: 0.4rem 0 0.6rem;
}

.about-books ul li,
.about-residencies ul li {
  padding-left: 0;
  margin-bottom: 0.4rem;
  font-family: var(--font-body);
  font-size: clamp(1.3rem, 1.24rem + 0.3vw, 1.5rem);
  font-style: normal;
  line-height: 1.9;
  color: var(--color-text-secondary);
}

.about-books ul li::marker,
.about-residencies ul li::marker {
  color: var(--color-crimson);
}


/* -----------------------------------------------
   DECORATIVE SYMBOLS
   Centered, responsive, slow animation
   ----------------------------------------------- */
.about-row-symbol {
  padding: var(--space-md) var(--space-md);
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Trio row: 3 symbols side by side */
.about-row-symbol--trio {
  gap: clamp(1.2rem, 3vw, 2.5rem);
  padding: var(--space-sm) var(--space-md);
}

.symbol {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: var(--space-md);
  background: var(--color-bg-card);
  border-radius: 999px;
  border: 1px solid var(--color-border-subtle);
  box-shadow: 0 18px 45px rgba(0, 0, 0, 0.35);
  /* Fixed aspect ratio circle */
  width: clamp(120px, 14vw, 190px);
  height: clamp(120px, 14vw, 190px);
}

/* Smaller variant for trio */
.symbol--sm {
  width: clamp(80px, 9vw, 130px);
  height: clamp(80px, 9vw, 130px);
  padding: var(--space-sm);
}

.symbol__svg {
  width: 70%;
  height: auto;
  animation: symbolRotate 36s linear infinite;
}

/* Varied animation speeds for visual interest */
.symbol__svg--slow {
  animation: symbolRotate 44s linear infinite;
}

.symbol__svg--med {
  animation: symbolRotate 30s linear infinite reverse;
}

.symbol__svg--slow2 {
  animation: symbolRotate 50s linear infinite;
}

.symbol:hover .symbol__svg {
  animation-duration: 16s;
}

/* PERF-009: paused while scrolled off-screen (toggled by about.js IntersectionObserver).
   Resumes from the same rotation position → seamless. */
.symbol__svg.is-paused {
  animation-play-state: paused;
}

.symbol__ring {
  fill: none;
  stroke: var(--color-accent);
  stroke-width: 0.5;
  opacity: 0.18;
}

.symbol__feather path {
  fill: none;
  stroke: var(--color-accent);
  stroke-width: 1;
  stroke-linecap: round;
  stroke-linejoin: round;
  opacity: 0.9;
}

.symbol__core {
  fill: var(--color-crimson);
  opacity: 0.7;
}

.symbol__core--bright {
  opacity: 1;
  filter: drop-shadow(0 0 4px var(--color-crimson));
}

@keyframes symbolRotate {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}


/* -----------------------------------------------
   ROW 4: Grants and Awards
   Centered box, left-aligned text
   ----------------------------------------------- */
.about-row-awards {
  padding: var(--space-xl) var(--space-md);
  display: flex;
  justify-content: center;
}


/* -----------------------------------------------
   SIGNATURE & CONTACT
   ----------------------------------------------- */
.about-row-contact {
  padding: var(--space-lg) var(--space-md) var(--space-xl);
  display: flex;
  justify-content: center;
}

.about-contact-inner {
  max-width: 800px;
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  background: var(--color-bg-card);
  padding: 1.5rem;
  border-radius: 4px;
}

/* Handwritten "Andra" signature */
.about-signature {
  margin-bottom: var(--space-md);
}

.about-signature svg {
  width: clamp(180px, 22vw, 280px);
  height: auto;
}

/* Contact links */
.contact-links {
  display: flex;
  gap: var(--space-sm);
  margin-bottom: var(--space-sm);
}

.contact-link {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 50px;
  height: 50px;
  border: 1px solid var(--color-border-medium);
  border-radius: 50%;
  color: var(--color-text-muted);
  text-decoration: none;
  transition: color var(--transition-fast), border-color var(--transition-fast), transform var(--transition-fast), box-shadow var(--transition-fast);
}

/* Dark gold hover on social icons */
.contact-link:hover {
  border-color: var(--color-accent-dark);
  color: var(--color-accent-dark);
  transform: translateY(-3px);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.3);
}

.contact-link svg {
  width: 20px;
  height: 20px;
}

/* The about-divider inside contact stretches full width */
.about-contact-inner .about-divider {
  width: 100%;
}


/* -----------------------------------------------
   RESPONSIVE: Mobile (under 768px)
   ----------------------------------------------- */
@media (max-width: 768px) {
  /* Row 1 hero: stack vertically */
  .about-row-hero {
    min-height: auto;
    padding: calc(var(--space-xl) + 60px) 0 var(--space-xl);
  }

  .about-hero-grid {
    grid-template-columns: 1fr;
    gap: var(--space-lg);
  }

  .about-hero-visual {
    order: 0;
  }

  .about-hero-text {
    order: 1;
    padding: 1rem 0.5rem;       /* tighter padding on mobile — maximise text width */
  }

  .about-portrait {
    max-width: 360px;
    max-height: 420px;
    overflow: hidden;
  }

  .about-portrait img {
    width: 100%;
    height: 100%;
    object-fit: cover;
  }

  /* Extra margin clears the padding-top offset that pushes the clip
     past the overflow:hidden boundary on small screens */
  .portrait-copyright {
    max-width: 360px;
    margin-top: 1.5rem;
  }

  /* Tight mobile padding — use almost all screen width */
  .about-row-residencies,
  .about-row-awards,
  .about-row-symbol,
  .about-row-contact {
    padding-left: 0.5rem;
    padding-right: 0.5rem;
  }

  .about-row-content,
  .about-contact-inner {
    padding: 1rem 0.5rem;       /* match hero-text mobile padding */
  }

  .about-hero-grid {
    padding: 0 0.5rem;
  }

  /* -----------------------------------------------
     MOBILE: More spacing between real paragraph lines
     Each <p> is a "real line" entry (year: description).
     Give them extra bottom margin so they stand out
     from the soft-wrapped virtual lines within each <p>.
     ----------------------------------------------- */
  .about-bio p,
  .about-book-item,
  .about-residencies p,
  .about-awards p {
    margin-bottom: clamp(0.9rem, 2.5vw, 1.4rem);
    padding-bottom: clamp(0.5rem, 1.5vw, 0.8rem);
    border-bottom: 1px solid var(--color-border-subtle);
  }

  /* Remove border on last item to keep it clean */
  .about-bio p:last-child,
  .about-books .about-book-item:last-child,
  .about-residencies p:last-child,
  .about-awards p:last-child {
    border-bottom: none;
    padding-bottom: 0;
  }
}
