/* ============================================
   Page: About
   ============================================ */

.about-page {
  padding-top: var(--space-2xl);
  padding-bottom: var(--space-2xl);
}

/* --- Hero --- */
.about-hero {
  padding-inline: var(--edge-margin);
}

.about-title {
  font-family: var(--font-display-current);
  font-size: var(--text-display);
  line-height: 1.1;
  font-weight: 400;
  color: var(--surface-text);
  margin-bottom: var(--space-md);
}

.about-hero-text {
  font-family: var(--font-body);
  font-size: var(--text-h3);
  line-height: 1.5;
  color: var(--surface-text);
  opacity: 0.9;
  max-width: 50ch;
}

/* --- Philosophy --- */
.about-philosophy {
  margin-top: var(--space-2xl);
  padding-inline: var(--edge-margin);
}

.about-philosophy__inner {
  border-top: 1px solid color-mix(in srgb, var(--surface-text) 20%, transparent);
}

.philosophy-item {
  display: grid;
  grid-template-columns: clamp(72px, 10vw, 110px) 1fr;
  gap: var(--space-md);
  align-items: start;
  padding: var(--space-lg) 0;
  border-bottom: 1px solid color-mix(in srgb, var(--surface-text) 10%, transparent);
}

/* Cropped number box */
.philosophy-label {
  position: relative;
  width: clamp(85px, 12vw, 180px);
  aspect-ratio: 2 / 1;
  overflow: hidden;
  border-radius: 10px;
  border: 1px solid color-mix(in srgb, var(--accent-current) 15%, transparent);
}

.philosophy-label__num {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
  font-family: var(--font-ui);
  font-size: clamp(6.75rem, 11.2vw, 11.2rem);
  font-weight: 600;
  line-height: 1;
  letter-spacing: -0.075em;
  color: var(--accent-current);
  pointer-events: none;
  user-select: none;
  padding-top: 5%;
}

.philosophy-content {
  display: flex;
  flex-direction: column;
  gap: var(--space-xs);
  padding-top: 0.15em;
}

.philosophy-heading {
  font-family: var(--font-display-current);
  font-size: var(--text-h2);
  font-weight: 400;
  color: var(--surface-text);
}

.philosophy-text {
  font-family: var(--font-body);
  font-size: var(--text-body);
  line-height: 1.6;
  color: var(--surface-text);
  opacity: 0.7;
  max-width: 50ch;
}

/* --- Profile --- */
.about-profile {
  margin-top: var(--space-2xl);
  padding-inline: var(--edge-margin);
}

.about-profile__inner {
  display: flex;
  flex-direction: column;
  gap: var(--space-xl);
}

.profile-image {
  width: 100%;
  aspect-ratio: 3 / 4;
  background-color: var(--surface-bg);
  overflow: hidden;
  border-radius: var(--radius-card);
}

.profile-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: grayscale(100%);
  transition: filter 0.5s ease;
}

.profile-image:hover img {
  filter: grayscale(0%);
}

/* Stacked dual-video for crossfade loop */
.profile-video-wrap {
  position: relative;
  width: 100%;
  height: 100%;
}

.profile-video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: grayscale(100%);
  transition: filter 0.5s ease, opacity 1s ease;
}

.profile-video--b {
  opacity: 0;
}

.profile-video.is-fading-out {
  opacity: 0;
}

.profile-video.is-fading-in {
  opacity: 1;
}

.profile-image:hover .profile-video {
  filter: grayscale(0%);
}

.profile-details {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: var(--space-md);
}

.profile-role {
  font-family: var(--font-ui);
  font-size: var(--text-small);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--accent-current);
  margin-bottom: var(--space-xs);
  display: block;
}

.profile-name {
  font-family: var(--font-display-current);
  font-size: var(--text-h1);
  line-height: 1.1;
  font-weight: 400;
  margin-bottom: var(--space-sm);
}

.profile-bio {
  font-family: var(--font-body);
  font-size: var(--text-body);
  line-height: 1.6;
  color: var(--surface-text);
  max-width: 48ch;
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
}

.profile-bio p {
  opacity: 0.8;
}

.profile-bio .bio-lede {
  font-size: calc(var(--text-body) * 1.2);
  line-height: 1.5;
  opacity: 0.9;
}

/* Profile meta strip */
.profile-meta {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-xs) var(--space-lg);
  padding: var(--space-sm) 0;
  border-top: 1px solid color-mix(in srgb, var(--surface-text) 10%, transparent);
  border-bottom: 1px solid color-mix(in srgb, var(--surface-text) 8%, transparent);
}

.profile-meta__item {
  display: flex;
  flex-direction: column;
  gap: 3px;
  min-width: 72px;
}

.profile-meta__label {
  font-family: var(--font-ui);
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--surface-text);
  opacity: 0.4;
}

.profile-meta__value {
  font-family: var(--font-ui);
  font-size: var(--text-small);
  color: var(--surface-text);
  opacity: 0.85;
}

/* --- Animation pre-reveal states (added by JS, removed after animate) --- */

/* Hero line-wrap structure */
.line-wrap.is-pre-reveal {
  overflow: hidden;
  display: block;
}

.line-wrap.is-pre-reveal .line {
  display: block;
  transform: translateY(110%);
  opacity: 0;
}

/* Hero text */
.about-hero-text.is-pre-reveal {
  opacity: 0;
  transform: translateY(20px);
}

/* Philosophy label box */
.philosophy-label.is-pre-reveal {
  opacity: 0;
  transform: translateY(16px) scale(0.9);
}

/* Philosophy heading words */
.philosophy-heading .word.is-pre-reveal {
  opacity: 0.12;
  display: inline-block;
}

/* Philosophy text */
.philosophy-text.is-pre-reveal {
  opacity: 0;
  transform: translateY(12px);
}

/* Philosophy top border hidden for draw-on */
.about-philosophy__inner.is-pre-reveal {
  border-top-color: transparent;
}

/* Philosophy animated rule line */
.philosophy-rule-line {
  height: 1px;
  background: color-mix(in srgb, var(--surface-text) 20%, transparent);
  transform: scaleX(0);
  transform-origin: left;
}

/* Philosophy item divider (animated draw-on) */
.philosophy-item.is-pre-reveal {
  position: relative;
  border-bottom: none;
}

.philosophy-item-divider {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: color-mix(in srgb, var(--surface-text) 10%, transparent);
  transform: scaleX(0);
  transform-origin: left;
}

/* Profile image */
.profile-image.is-pre-reveal {
  clip-path: inset(100% 0 0 0);
}

.profile-image.is-pre-reveal img,
.profile-image.is-pre-reveal .profile-video-wrap {
  transform: scale(1.08);
}

/* Profile details */
.profile-details.is-pre-reveal {
  opacity: 0;
  transform: translateY(16px);
}

/* Bio paragraphs */
.profile-bio p.is-pre-reveal {
  opacity: 0;
  transform: translateY(14px);
}

/* --- Responsive --- */
@media (min-width: 768px) {
  .philosophy-item {
    grid-template-columns: clamp(90px, 10vw, 110px) 1fr;
    gap: var(--space-xl);
    padding: var(--space-xl) 0;
  }

  /* C: Asymmetric grid — 40/60 split at tablet */
  .about-profile__inner {
    display: grid;
    grid-template-columns: 4fr 6fr;
    column-gap: var(--space-md);
    row-gap: var(--space-xl);
    align-items: start;
  }

  /* profile-image fills its cell fully — border-radius visible on all 4 corners */

  .profile-details {
    border-left: 1px solid color-mix(in srgb, var(--surface-text) 12%, transparent);
    padding-left: var(--space-md);
  }
}

@media (min-width: 1100px) {

  /* C: Wider viewport — 5/7 editorial split */
  .about-profile__inner {
    grid-template-columns: 5fr 7fr;
  }

  .profile-name {
    font-size: var(--text-display);
  }
}

@media (max-width: 480px) {
  .philosophy-item {
    grid-template-columns: 1fr;
    gap: var(--space-sm);
  }

  .profile-meta {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: var(--space-md);
  }
}