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

/* ── Screen-reader utility ─────────────────── */

.about-sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* ── Section layout (two-column) ───────────── */

.about-section {
  display: flex;
  align-items: flex-start;
  /* padding-top = stack top from header (79px → 80px normalized) */
  padding: 80px 130px 80px;
  background-color: var(--color-page-bg);
}

/* ── Left column: text ─────────────────────── */

.about-text {
  flex: 0 0 516px;
  max-width: 516px;
  /* text top is 28px below stack top → total from header: 80+28=108px */
  margin-top: 28px;
}

.about-heading {
  font-family: var(--font-condensed);
  font-size: clamp(32px, 3.75vw, 48px);
  font-weight: 400;
  color: #1e1e1e;
  letter-spacing: -1.2px;
  line-height: 1.1;
  margin: 0 0 24px;
}

.about-body {
  display: flex;
  flex-direction: column;
  gap: 24px;
  margin-bottom: 32px;
}

.about-body p {
  font-family: var(--font-sans);
  font-weight: 700;
  font-size: 18px;
  color: #000;
  letter-spacing: -0.16px;
  line-height: 1.45;
  margin: 0;
}

.about-resume {
  display: inline-block;
  font-family: var(--font-condensed);
  font-size: clamp(32px, 3.75vw, 48px);
  font-weight: 400;
  color: #1e1e1e;
  letter-spacing: -1.2px;
  line-height: 1.1;
  text-decoration: none;
  transition: opacity 200ms ease;
}

.about-resume:hover {
  opacity: 0.6;
}

/* ── Right column: photo stack ─────────────── */

.about-stack-wrap {
  flex-shrink: 0;
  margin-left: auto;
  margin-top: -90px;
  /* Clip overhangs above — allow it to render without cropping */
  overflow: visible;
}

.about-stack {
  position: relative;
  /* Width gives comfortable room for the largest rotated card (+13.51°) */
  width: 420px;
  /* Height: clip (279px) + gap (top: 10px) + card top offset (190px) + card height (305px) = 545px + buffer */
  height: 550px;
  overflow: visible;
  cursor: pointer;
  -webkit-user-select: none;
  user-select: none;
}

.about-stack:focus-visible {
  outline: 2px solid var(--color-logo);
  outline-offset: 8px;
  border-radius: 4px;
}

/* Photo cards: all centered horizontally, positioned with top offset for the clip */
.stack-card {
  position: absolute;
  width: 325px;
  height: 305px;
  left: 50%;
  top: 190px;
  /* translate(-50%,0) centers horizontally; rotate() spins around card center */
  transform: translate(-50%, 0) rotate(0deg);
  transform-origin: center center;
  border-radius: 16px;
  overflow: hidden;
  /* Transition set by JS; reduced-motion zeroed by global.css */
  will-change: transform;
}

.stack-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  pointer-events: none;
}

/* Clip — always rendered above all photo cards */
.stack-clip {
  position: absolute;
  width: 190px;
  height: 279px;
  left: 50%;
  top: 10px;
  transform: translateX(-50%);
  z-index: 10;
  pointer-events: none;
  overflow: hidden;
}

.stack-clip img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* ── Responsive ────────────────────────────── */

/* Tablet: compress margins, keep two columns */
@media (max-width: 1100px) {
  .about-section {
    padding: 80px 64px 80px;
    gap: 40px;
  }

  .about-text {
    flex: 0 1 460px;
    max-width: 460px;
  }

  .about-stack {
    width: 360px;
  }

  .stack-card {
    width: 280px;
    height: 265px;
  }

  .stack-clip {
    width: 160px;
    height: 235px;
  }
}

/* Tablet/mobile breakpoint: stack columns vertically */
@media (max-width: 767px) {
  .about-section {
    flex-direction: column;
    align-items: center;
    padding: 64px 32px 0;
    gap: 0;
  }

  .about-text {
    flex: none;
    max-width: 100%;
    width: 100%;
    margin-top: 0;
  }

  .about-stack-wrap {
    margin-left: 0;
    margin-top: 200px;
  }

  .about-stack {
    width: 340px;
    height: 480px;
  }

  .stack-card {
    width: 260px;
    height: 244px;
    top: 120px;
  }

  .stack-clip {
    width: 140px;
    height: 206px;
    top: 8px;
  }
}

@media (max-width: 480px) {
  .about-section {
    padding: 48px 24px 0;
    gap: 0;
  }

  .about-stack-wrap {
    margin-top: 48px;
  }

  .about-heading {
    font-size: clamp(28px, 8vw, 40px);
  }

  .about-resume {
    font-size: clamp(28px, 8vw, 40px);
  }

  .about-body p {
    font-size: 16px;
  }

  .about-stack {
    width: 300px;
    height: 430px;
  }

  .stack-card {
    width: 230px;
    height: 216px;
    top: 108px;
  }

  .stack-clip {
    width: 120px;
    height: 177px;
    top: 6px;
  }
}
