/*
  About 12 — About + Stacked Media, standalone HTML/CSS/JS implementation.
  No build step, no framework, no external dependency: copy this file,
  index.html, and script.js into any project and open it as-is.
*/

:root {
  --color-brand: #39ff14;
  --color-brand-foreground: #252525;
  --color-foreground: #252525;
  --color-background: #ffffff;
  --color-border: #e4e4e4;
  --color-muted: #f7f7f7;
  --color-muted-foreground: #8d8d8d;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family:
    -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  color: var(--color-foreground);
  background: var(--color-background);
  line-height: 1.5;
}

.about12 {
  background: var(--color-background);
  padding: 4rem 1rem;
}

.about12__inner {
  display: grid;
  grid-template-columns: 1fr;
  align-items: center;
  gap: 3.5rem;
  width: 100%;
  max-width: 64rem;
  margin: 0 auto;
}

.about12__stack {
  position: relative;
  width: 100%;
  max-width: 24rem;
  margin: 0 auto;
  padding-bottom: 3.5rem;
}

.about12__portrait {
  position: relative;
  width: 100%;
  aspect-ratio: 4 / 5;
  overflow: hidden;
  border-radius: 1.5rem;
  background: var(--color-muted);
}

.about12__detail {
  position: absolute;
  right: 0;
  bottom: 0;
  width: 40%;
  aspect-ratio: 1 / 1;
  overflow: hidden;
  border-radius: 1rem;
  background: var(--color-muted);
  box-shadow: 0 20px 40px -20px rgba(15, 23, 42, 0.35);
  outline: 4px solid var(--color-background);
  outline-offset: -4px;
  /* The modern individual `rotate` property (not `transform`) so this
     resting tilt never collides with the `transform: translateY(...)`
     entrance animation below — the two compose independently instead of
     one clobbering the other. */
  rotate: -3deg;
}

.about12__portrait img,
.about12__detail img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.about12__content {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}

.about12__badge {
  display: inline-flex;
  align-items: center;
  border: 1px solid var(--color-border);
  background: var(--color-background);
  border-radius: 999px;
  padding: 0.25rem 0.75rem;
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  color: var(--color-muted-foreground);
}

.about12__heading {
  margin: 1.25rem 0 0;
  font-size: clamp(2rem, 1.6rem + 1.8vw, 2.75rem);
  line-height: 1.1;
  font-weight: 600;
  letter-spacing: -0.01em;
  color: var(--color-foreground);
}

.about12__bio {
  margin: 1.5rem 0 0;
  max-width: 34rem;
  font-size: 1rem;
  line-height: 1.65;
  color: var(--color-muted-foreground);
}

@media (min-width: 640px) {
  .about12__stack {
    padding-bottom: 4rem;
  }

  .about12__detail {
    width: 33%;
  }
}

@media (min-width: 1024px) {
  .about12 {
    padding: 6rem 2rem;
  }

  .about12__inner {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 4rem;
  }

  .about12__stack {
    max-width: none;
    margin: 0;
    padding-bottom: 5rem;
  }
}

/* Motion — a single IntersectionObserver in script.js watches the section
   and adds `is-visible` once; the portrait then reveals through a
   `clip-path: inset(...)` shape mask expanding from a small, pill-shaped
   opening to the frame's full rounded bounds, while the detail photo
   fades and slides up on a later delay. The `.about12--js` gate means
   the pending/hidden state below only applies once JavaScript has
   actually attached the observer — without JS the portrait renders fully
   unmasked and the detail photo sits at full opacity, so nothing here
   depends on JS to become visible. */
@media (prefers-reduced-motion: no-preference) {
  @keyframes al-about12-up {
    from {
      opacity: 0;
      transform: translateY(16px);
    }
    to {
      opacity: 1;
      transform: translateY(0);
    }
  }

  @keyframes al-about12-mask {
    from {
      clip-path: inset(30% round 9999px);
    }
    to {
      clip-path: inset(0% round 1.5rem);
    }
  }

  @keyframes al-about12-detail-in {
    from {
      opacity: 0;
      transform: translateY(20px);
    }
    to {
      opacity: 1;
      transform: translateY(0);
    }
  }

  .about12--js .about12__reveal {
    opacity: 0;
    transform: translateY(16px);
  }

  .about12--js.is-visible .about12__reveal {
    animation: al-about12-up 700ms cubic-bezier(0.16, 1, 0.3, 1) both;
  }

  .about12--js .about12__portrait {
    clip-path: inset(30% round 9999px);
  }

  .about12--js.is-visible .about12__portrait {
    animation: al-about12-mask 900ms cubic-bezier(0.16, 1, 0.3, 1) both;
  }

  .about12--js .about12__detail {
    opacity: 0;
    transform: translateY(20px);
  }

  .about12--js.is-visible .about12__detail {
    animation: al-about12-detail-in 650ms cubic-bezier(0.16, 1, 0.3, 1) both;
  }
}
