/* About page — scrolling content layered on the shared homepage navigation/menu. */

:root {
  --brand-teal: #58F0E0;
  --brand-teal-deep: #178B84;
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
body {
  min-height: 100%;
  overflow-x: hidden;
  overflow-y: auto;
  background: #020202;
  color: #D9D9D9;
  font-family: 'Bai Jamjuree', sans-serif;
}
img { display: block; max-width: 100%; }

/* Home menu → About handoff. The first About paint is the same solid cover
   that ended the homepage transition, so document navigation is invisible. */
.about-entry-curtain {
  position: fixed;
  inset: 0;
  z-index: 20000;
  visibility: hidden;
  opacity: 0;
  background: #020202;
  pointer-events: none;
}
html.from-home-curtain,
html.from-home-curtain body { overflow: hidden; }
html.from-home-curtain .about-entry-curtain {
  visibility: visible;
  opacity: 1;
}
html.from-home-curtain.is-about-ready .about-entry-curtain {
  opacity: 0;
  transition: opacity 720ms cubic-bezier(0.37, 0, 0.63, 1);
}
html.from-home-curtain .about-page {
  filter: blur(10px) brightness(0.58);
  transform: scale(1.012);
  transform-origin: 50% 0;
}
html.from-home-curtain .ab-hero-stage {
  transform: translate3d(0, 18px, 0);
}
html.from-home-curtain .navbar {
  opacity: 0;
  filter: blur(6px);
}
html.from-home-curtain.is-about-ready .about-page {
  filter: blur(0) brightness(1);
  transform: scale(1);
  transition:
    filter 920ms cubic-bezier(0.37, 0, 0.63, 1),
    transform 920ms cubic-bezier(0.37, 0, 0.63, 1);
}
html.from-home-curtain.is-about-ready .ab-hero-stage {
  transform: translate3d(0, 0, 0);
  transition: transform 860ms cubic-bezier(0.16, 1, 0.3, 1) 80ms;
}
html.from-home-curtain.is-about-ready .navbar {
  opacity: 1;
  filter: blur(0);
  transition:
    opacity 620ms cubic-bezier(0.33, 0, 0.2, 1) 180ms,
    filter 720ms cubic-bezier(0.37, 0, 0.63, 1) 120ms;
}
html.about-entry-complete .about-page {
  filter: none;
  transform: none;
}
html.about-entry-complete .ab-hero-stage {
  transform: none;
}
html.about-entry-complete .navbar {
  opacity: 1;
  filter: none;
}

/* ── Page shell ── */
.about-page { padding: 0 56px 160px; }

/* ── Hero ── */
.ab-hero { padding-top: 180px; }
.ab-hero-name {
  font-family: 'Bai Jamjuree', sans-serif;
  font-weight: 400;
  font-size: 28px;
  font-style: italic;
  line-height: 1.2;
  letter-spacing: -0.03em;
  color: #9e9e9e;
  margin-bottom: 32px;
}
.ab-hero-headline {
  max-width: 26ch;
  margin-bottom: 72px;
  font-weight: 400;
  font-size: clamp(48px, 6.5vw, 96px);
  line-height: 1.05;
  letter-spacing: -0.03em;
}
.ab-hero-headline .m-line {
  display: block;
}
.ab-hero-accent {
  font-style: italic;
  font-weight: 400;
}
.ab-hero-media {
  width: 600px;
  height: 400px;
  max-width: 100%;
  overflow: hidden;
  border-radius: 0;
}
.ab-hero-media img,
.ab-hero-media video {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Editorial relay handoff: copy and portrait leave as one locked composition,
   while About enters through the same continuous overlap. */
@media (prefers-reduced-motion: no-preference) {
  html.ab-handoff-on .ab-about .ab-split-left {
    opacity: var(--about-title-opacity, 0);
    transform: translate3d(0, var(--about-title-handoff-y, 0px), 0);
    will-change: transform, opacity;
  }
  html.ab-handoff-on .ab-about-copy {
    opacity: var(--about-copy-opacity, 0);
    transform: translate3d(0, var(--about-copy-handoff-y, 0px), 0);
    will-change: transform, opacity;
  }
  html.ab-handoff-on.ab-handoff-complete .ab-about .ab-split-left,
  html.ab-handoff-on.ab-handoff-complete .ab-about-copy {
    opacity: 1;
    transform: none;
    will-change: auto;
  }
  html.ab-cinematic-on .ab-about .ab-split-title {
    opacity: var(--ab-section-exit-opacity, 1);
    filter: blur(var(--ab-section-exit-blur, 0px));
    transform: translate3d(0, var(--ab-section-exit-y, 0px), 0);
    will-change: transform, opacity, filter;
  }
  html.ab-cinematic-on .ab-about-copy p:last-child {
    opacity: var(--ab-section-exit-opacity, 1);
    filter: blur(var(--ab-section-exit-blur, 0px));
    transform: translate3d(0, var(--ab-section-exit-y, 0px), 0);
    will-change: transform, opacity, filter;
  }
  html.ab-cinematic-on .ab-work > .ab-split-left,
  html.ab-cinematic-on .ab-work .ab-work-item:last-child {
    opacity: var(--ab-section-exit-opacity, 1);
    filter: blur(var(--ab-section-exit-blur, 0px));
    transform: translate3d(0, var(--ab-section-exit-y, 0px), 0);
    will-change: transform, opacity, filter;
  }
}

/* ── Split sections (About / Work Experience) ── */
.ab-split {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.4fr);
  gap: 56px;
  padding-top: 160px;
}
.ab-split-title,
.ab-outside-sub {
  font-family: 'Bai Jamjuree', sans-serif;
  font-size: 28px;
  font-style: italic;
  font-weight: 400;
  line-height: 1.2;
  letter-spacing: -0.03em;
  color: #9e9e9e;
}
.ab-about-copy p {
  position: relative;
  font-family: 'Bai Jamjuree', sans-serif;
  font-size: 32px;
  font-weight: 400;
  line-height: 1.5;
  letter-spacing: -0.025em;
  color: #D9D9D9;
}
.ab-about {
  --ab-section-spacing: 32svh;
  position: relative;
  z-index: 2;
  /* Only tighten the hero → About transition. Keep About → Work unchanged. */
  padding-top: 16svh;
  /* Keep the handoff continuous: Work begins revealing while the final About
     paragraph clears, leaving breathing room without an empty viewport. */
  padding-bottom: var(--ab-section-spacing);
}
.ab-about .ab-split-left { align-self: stretch; }
.ab-about .ab-split-title {
  position: sticky;
  top: 18vh;
}
.ab-about-copy {
  display: flex;
  flex-direction: column;
  gap: 120px;
  width: 100%;
  max-width: none;
  justify-self: stretch;
}
.ab-about-copy p + p {
  margin-top: 0;
}

/* Shared Codrops-inspired scroll reveal. About, Work, and Outside Design use
   the same scrubbed word opacity; non-text media follows the same progress. */
.ab-blur-content,
.ab-blur-visual {
  display: block;
  width: 100%;
}
.ab-blur-word {
  display: inline-block;
  white-space: nowrap;
}
html.ab-blur-on .ab-blur-content {
  transform: translate3d(0, var(--ab-scene-y, 7px), 0);
}
html.ab-blur-on .ab-blur-word {
  opacity:
    clamp(
      0.14,
      calc(var(--ab-blur-opacity, 0) - var(--ab-word-opacity-threshold, 0)),
      1
    );
}
html.ab-blur-on [data-blur-block] {
  opacity: clamp(0.14, var(--ab-block-opacity, 0), 1);
  transform: translate3d(0, var(--ab-block-y, 7px), 0);
  will-change: transform, opacity;
}

/* ── Work experience ── */
.ab-work {
  align-items: stretch;
  padding-top: 0;
}
.ab-work .ab-split-left { align-self: stretch; }
.ab-work-list {
  display: flex;
  flex-direction: column;
  gap: 72px;
  width: min(100%, 788px);
  justify-self: start;
}
.ab-work-sticky {
  position: sticky;
  top: 18vh;
}

.ab-work-item {
  position: relative;
  min-height: 0;
  padding: 0;
}
.ab-work-item + .ab-work-item { margin-top: 0; }
.ab-work-card {
  display: grid;
  grid-template-columns: 80px minmax(0, 1fr);
  align-items: start;
  gap: 40px;
  width: min(100%, 788px);
  transform-origin: center;
}
.ab-work-logo {
  width: 80px;
  height: 80px;
  overflow: hidden;
  /* Same angular brand silhouette as the menu component and Figma asset. */
  clip-path: polygon(0 0, 80% 0, 100% 16.25%, 100% 100%, 10% 100%, 0 90%);
}
.ab-work-logo img {
  width: 80px;
  height: 80px;
  object-fit: cover;
}
.ab-work-copy {
  display: flex;
  min-width: 0;
  flex-direction: column;
  align-items: flex-start;
  gap: 32px;
  font-family: 'Bai Jamjuree', sans-serif;
  font-weight: 400;
  line-height: normal;
}
.ab-work-heading {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 16px;
}
.ab-work-item h3 {
  color: #fff;
  font-size: 32px;
  font-weight: 400;
  line-height: normal;
  letter-spacing: -0.03em;
}
.ab-work-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0 8px;
  color: #9e9e9e;
  font-size: 24px;
  font-weight: 400;
  line-height: normal;
  letter-spacing: -0.03em;
}
.ab-work-meta-separator { line-height: 1; }
.ab-work-description {
  width: 100%;
  color: #9e9e9e;
  font-size: 24px;
  font-weight: 400;
  line-height: normal;
  letter-spacing: -0.03em;
}

/* ── Outside Design ── */
.ab-outside { padding-top: clamp(120px, 14vw, 220px); }
.ab-outside-header {
  max-width: 980px;
  margin-bottom: clamp(48px, 6vw, 88px);
}
.ab-outside-sub {
  margin-bottom: 24px;
}
.ab-outside-title {
  font-weight: 600;
  font-size: clamp(44px, 5.6vw, 82px);
  line-height: 1.02;
  letter-spacing: -0.035em;
  max-width: 15ch;
}
.ab-outside-body {
  max-width: 31ch;
  margin-top: 32px;
  font-size: clamp(20px, 2.25vw, 32px);
  line-height: 1.3;
  letter-spacing: -0.015em;
  color: rgba(217, 217, 217, 0.68);
  text-wrap: pretty;
}
.ab-gallery {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  width: 100%;
  gap: clamp(14px, 1.55vw, 24px);
}
.ab-gallery-card {
  min-width: 0;
  border-radius: 24px;
  transform-style: preserve-3d;
  transition:
    transform 620ms cubic-bezier(0.16, 1, 0.3, 1),
    box-shadow 320ms ease;
}
.ab-gallery-card.is-tilting {
  will-change: transform;
  box-shadow:
    0 38px 90px rgba(0, 0, 0, 0.48),
    0 0 0 0.5px rgba(255, 255, 255, 0.03);
}
.ab-gallery-visual {
  position: relative;
  aspect-ratio: 320 / 426;
  overflow: hidden;
  border: 1px solid #464646;
  border-radius: 24px;
  background: #fff;
  transition: border-color 320ms ease;
}
.ab-gallery img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.ab-gallery-overlay {
  position: absolute;
  z-index: 1;
  bottom: 0;
  left: -1px;
  width: 100%;
  height: 49.21875%;
  pointer-events: none;
  background: linear-gradient(to top, #000 0%, rgba(0, 0, 0, 0) 100%);
}
.ab-gallery-info {
  position: absolute;
  z-index: 2;
  right: 24px;
  bottom: 24px;
  left: 24px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 11px;
}
.ab-gallery-info h3 {
  color: #fff;
  font-size: 24px;
  font-weight: 400;
  line-height: normal;
  letter-spacing: -0.72px;
  white-space: nowrap;
}
.ab-gallery-info p {
  max-width: 100%;
  color: #aaa;
  font-size: 16px;
  font-weight: 400;
  line-height: normal;
  letter-spacing: -0.48px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
@media (hover: hover) and (pointer: fine) {
  .ab-gallery-card.is-tilting .ab-gallery-visual {
    border-color: #464646;
  }
}

/* ── Footer: back to homepage ── */
.ab-footer { padding-top: 40px; text-align: center; }
.ab-footer-sub {
  font-size: 14px; text-transform: uppercase; letter-spacing: 0.04em;
  opacity: 0.5; margin-bottom: 20px;
}
.ab-footer-link {
  display: inline-block; text-decoration: none; color: inherit;
  font-family: 'Recoleta', Georgia, serif; font-weight: 300;
  font-size: clamp(56px, 9vw, 128px); line-height: 1.05; letter-spacing: -0.02em;
}
.ab-footer-arrow {
  display: block; margin: 40px auto 0;
  width: 28px; height: 28px;
  color: var(--brand-teal);
  opacity: 0.7;
  animation: ab-footer-arrow-float 1800ms cubic-bezier(0.45, 0, 0.55, 1) infinite;
  transition: opacity 240ms ease;
}
.ab-footer-link:hover .ab-footer-arrow { opacity: 1; }

@keyframes ab-footer-arrow-float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(7px); }
}

/* Cut-off box: drawn 85vh tall but the wrapper only shows the top 19vh,
   so the page ends mid-box — the "torn edge" invitation to keep scrolling.
   padding-top gives the upward shadow room to render inside the
   overflow:hidden clip instead of being cut off. */
.ab-peek-wrap { height: 19vh; margin-top: 30px; padding-top: 80px; overflow: hidden; }
/* Plain placeholder frame — no homepage replica inside, so nothing
   can mismatch (blink) against the real homepage on arrival. */
.ab-peek {
  height: 85vh; margin: 0 56px; cursor: pointer;
  position: relative; overflow: hidden;
  background: #0E0E0E;
  /* from the Figma spec: white glow lifting the box off the dark page */
  box-shadow: -4px -4px 56px 4px rgba(255, 255, 255, 0.16);
}

/* ── Mobile ── */
@media (min-width: 901px) and (max-width: 1280px) {
  .about-page { padding-right: 40px; padding-left: 40px; }
}

@media (min-width: 901px) and (max-width: 1100px) {
  .ab-gallery {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    max-width: 900px;
  }
}

@media (max-width: 900px) {
  .about-page { padding: 0 20px 96px; }
  .ab-hero { padding-top: 140px; }
  .ab-split { grid-template-columns: 1fr; gap: 32px; padding-top: 96px; }
  .ab-about { padding-block: var(--ab-section-spacing); }
  .ab-about .ab-split-title { position: static; }
  .ab-about-copy {
    gap: 160px;
    max-width: 100%;
  }
  .ab-about-copy p { font-size: clamp(24px, 6vw, 32px); }
  .ab-about-copy p + p { margin-top: 0; }
  .ab-work { padding-top: 0; }
  .ab-work-sticky {
    position: static;
    display: block;
    translate: none;
  }
  .ab-work-item {
    min-height: 0;
    padding: 0;
  }
  .ab-work-card { gap: 24px; }
  .ab-work-copy { gap: 24px; }
  .ab-work-heading { gap: 12px; }
  .ab-work-item h3 { font-size: 32px; }
  .ab-work-meta,
  .ab-work-description { font-size: 20px; }
  .ab-work-item + .ab-work-item { margin-top: 0; }
  .ab-outside { padding-top: 96px; }
  .ab-outside-header { margin-bottom: 48px; }
  .ab-outside-body { margin-top: 24px; }
  .ab-gallery { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
  .ab-gallery-card,
  .ab-gallery-visual { border-radius: 10px; }
  .ab-gallery-info {
    top: auto;
    right: 14px;
    bottom: 14px;
    left: 14px;
    gap: 8px;
  }
  .ab-gallery-info h3 { font-size: 17px; }
  .ab-gallery-info p { font-size: 12px; }
  .ab-footer { padding-top: 24px; }
  .ab-peek-wrap { margin-top: 0; height: 16vh; padding-top: 64px; }
  .ab-peek { margin: 0 24px; }
}

@media (max-width: 480px) {
  .ab-hero-name {
    font-size: 24px;
    margin-bottom: 32px;
  }
  .ab-about-copy { gap: 120px; }
  .ab-about-copy p { font-size: 20px; }
  .ab-about-copy p + p { margin-top: 0; }
  .ab-work-item {
    min-height: 0;
    padding: 0;
  }
  .ab-work-card { gap: 16px; }
  .ab-work-copy { gap: 20px; }
  .ab-work-heading { gap: 10px; }
  .ab-work-item h3 { font-size: 28px; }
  .ab-work-meta,
  .ab-work-description { font-size: 18px; }
  .ab-outside-title { font-size: clamp(38px, 12vw, 52px); }
}

/* Whisper-fade: reveal targets start hidden only when JS motion is on. */
html.motion-on [data-reveal],
html.motion-on [data-reveal-scroll] { opacity: 0; }

@media (prefers-reduced-motion: reduce) {
  .about-entry-curtain { display: none; }
  .ab-hero-stage,
  .ab-hero-media,
  .ab-hero-media img,
  .ab-hero-media video,
  .ab-about .ab-split-left,
  .ab-about-copy {
    opacity: 1;
    transform: none;
  }
  .ab-blur-content,
  .ab-blur-word,
  [data-blur-block] {
    opacity: 1;
    filter: none;
    transform: none;
  }
  .ab-work-item {
    min-height: 0;
    padding: 0;
  }
  .ab-work-item + .ab-work-item { margin-top: 0; }
  .ab-gallery-card,
  .ab-gallery-visual { transition: none; }
  .ab-footer-arrow { animation: none; }
}
