/* About page */

.about-page #dot-grid {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 0;
  pointer-events: none;
  overflow: hidden;
}

.about-page .dot-grid__dot {
  position: absolute;
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background-color: #e6e7ea;
  transform: translate(0, 0);
  transition: transform 600ms ease-out;
}

#about {
  position: relative;
  width: 100%;
  padding-top: 96px;
  /* ~2 rows of dots (40px spacing) below last content before footer */
  padding-bottom: 80px;
  /* Margins shrink before content: 180px at ≥1440, floor 48px until mobile */
  padding-left: max(48px, min(180px, calc((100vw - 1080px) / 2)));
  padding-right: max(48px, min(180px, calc((100vw - 1080px) / 2)));
  box-sizing: border-box;
}

.about__inner {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 1080px;
  margin-inline: auto;
  display: flex;
  flex-direction: column;
  gap: 120px;
}

.about-section h1,
.about-section h2 {
  font-family: var(--font-display);
  font-size: 40px;
  font-weight: var(--font-regular);
  line-height: 1.2;
  color: var(--color-primary);
}

/* Prefer break after “designing for,” when the heading wraps to two lines */
.about-heading-rest {
  white-space: nowrap;
}

.about-body {
  display: flex;
  flex-direction: column;
  gap: 16px;
  font-size: 16px;
  line-height: 1.2;
  letter-spacing: 0.32px;
  color: var(--color-primary);
}

.about-body p + p {
  margin: 0;
}

/* Shared photo frame chrome */
.about-frame {
  box-sizing: border-box;
  border: 4px solid #fff;
  border-radius: 16px;
  overflow: hidden;
  background-color: var(--color-secondary-3);
}

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

.about-frame--shadow {
  box-shadow: 0 5.067px 15.2px 1.267px rgba(0, 0, 0, 0.1);
}

/* Match homepage spacing above “Let’s Create!” (dots live in about padding) */
.about-page #footer {
  padding-top: 48px;
}

/* —— Intro —— */
.about-intro {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: clamp(72px, 8vw, 118px);
  min-width: 0;
  /* Room for sticker overflowing above the portrait (clears nav) */
  padding-top: 80px;
}

.about-intro__media {
  position: relative;
  flex: 0 1 390px;
  width: 390px;
  max-width: 390px;
  min-width: 0;
  aspect-ratio: 390 / 480;
  flex-shrink: 1;
}

.about-frame--portrait {
  position: relative;
  width: 100%;
  height: 100%;
  aspect-ratio: 390 / 480;
}

.about-intro__sticker {
  position: absolute;
  left: 60%;
  top: -20%;
  width: 61%;
  height: auto;
  transform: rotate(10deg);
  transform-origin: center center;
  pointer-events: none;
  z-index: 2;
  filter: drop-shadow(0 5.067px 15.2px rgba(0, 0, 0, 0.1));
}

/* Text shrinks 573 → 331 before images give up space.
   Vertically centered to the portrait via align-items: center —
   only recenters when text height changes (e.g. wrapping). */
.about-intro__text {
  flex: 0 100 520px;
  width: 100%;
  max-width: 520px;
  min-width: 331px;
  display: flex;
  flex-direction: column;
  gap: 24px;
}

/* —— Community —— */
.about-community {
  display: flex;
  flex-direction: row-reverse;
  align-items: center;
  gap: clamp(24px, 4vw, 59px);
  min-width: 0;
}

.about-community__media {
  position: relative;
  flex: 0 1 537px;
  width: 537px;
  max-width: 537px;
  min-width: 0;
  aspect-ratio: 537 / 433;
  flex-shrink: 1;
}

.about-community__text {
  flex: 0 100 503px;
  min-width: 292px;
  max-width: 503px;
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.about-frame--community1 {
  position: absolute;
  left: 0;
  top: 14.3%;
  width: 60.7%;
  aspect-ratio: 326 / 183;
  transform: rotate(-5deg);
  z-index: 2;
}

.about-frame--community2 {
  position: absolute;
  left: 56%;
  top: 5.5%;
  width: 32.4%;
  aspect-ratio: 174 / 195;
  transform: rotate(10deg);
  z-index: 3;
}

.about-frame--community3 {
  position: absolute;
  left: 37%;
  top: 46.3%;
  width: 60.3%;
  aspect-ratio: 324 / 160;
  transform: rotate(6deg);
  z-index: 1;
}

/* —— Hobbies —— */
.about-hobbies {
  display: flex;
  align-items: center;
  gap: clamp(32px, 6vw, 87px);
  min-width: 0;
}

.about-hobbies__media {
  position: relative;
  flex: 0 1 631px;
  width: 631px;
  max-width: 631px;
  min-width: 0;
  aspect-ratio: 631 / 337;
  flex-shrink: 1;
}

.about-hobbies__text {
  flex: 0 100 379px;
  min-width: 240px;
  max-width: 379px;
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.about-hobbies__lede {
  font-size: 16px;
  line-height: 1.2;
  color: var(--color-primary);
}

.about-hobbies__list {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.about-hobbies__list li {
  display: flex;
  align-items: center;
  gap: 9px;
  font-size: 16px;
  line-height: 1.2;
  color: var(--color-primary);
}

.about-hobbies__star {
  flex-shrink: 0;
  color: var(--color-primary);
}

.about-frame--catan {
  position: absolute;
  left: 21.6%;
  top: 0;
  width: 36.3%;
  aspect-ratio: 229 / 160;
  transform: rotate(-5deg);
  z-index: 1;
}

.about-frame--climbing {
  position: absolute;
  left: 52.3%;
  top: 8.9%;
  width: 44.4%;
  aspect-ratio: 280 / 210;
  transform: rotate(5deg);
  z-index: 3;
}

.about-frame--climbing img {
  transform: rotate(180deg) scaleX(-1);
}

.about-frame--badminton {
  position: absolute;
  left: 0;
  top: 31.8%;
  width: 34.9%;
  aspect-ratio: 220 / 185;
  transform: rotate(-5deg);
  z-index: 2;
}

.about-frame--flowers {
  position: absolute;
  left: 33%;
  top: 43.2%;
  width: 21.4%;
  aspect-ratio: 135 / 180;
  transform: rotate(4deg);
  z-index: 4;
}

/* —— Journey —— */
.about-journey {
  display: flex;
  flex-direction: column;
  gap: 24px;
  width: 100%;
}

.about-journey__list {
  display: flex;
  flex-direction: column;
  gap: 16px;
  width: 100%;
}

.about-journey__item {
  display: flex;
  align-items: center;
  gap: 24px;
  width: 100%;
}

.about-journey__logo {
  flex-shrink: 0;
  width: 64px;
  height: 64px;
  border-radius: 8px;
  overflow: hidden;
  background-color: var(--color-card);
}

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

.about-journey__content {
  flex: 1 1 auto;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.about-journey__top {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  width: 100%;
}

.about-journey__role {
  font-size: 20px;
  line-height: 1.2;
  letter-spacing: 0.4px;
  color: #000;
}

.about-journey__sub {
  font-size: 16px;
  line-height: 1.2;
  letter-spacing: 0.32px;
  color: var(--color-secondary-2);
}

.about-journey__years--aside {
  flex-shrink: 0;
  font-size: 16px;
  line-height: 1.2;
  letter-spacing: 0.32px;
  color: var(--color-secondary-2);
  white-space: nowrap;
}

.about-journey__years--inline {
  display: none;
}

/* —— Tablet (side-by-side, 48px margins) —— */
@media (max-width: 993px) {
  #about {
    padding-top: 112px;
    padding-left: var(--edge-margin);
    padding-right: var(--edge-margin);
  }

  .about__inner {
    gap: 96px;
  }

  .about-intro__text {
    min-width: min(331px, 100%);
  }

  .about-community__text {
    min-width: min(292px, 100%);
  }

  .about-hobbies__text {
    min-width: min(240px, 100%);
  }
}

/* —— Narrow / stacked (below 804px): mobile layout, 48px margins —— */
@media (max-width: 803px) {
  #about {
    padding-top: 88px;
    padding-left: var(--edge-margin);
    padding-right: var(--edge-margin);
  }

  .about__inner {
    gap: 80px;
  }

  .about-intro,
  .about-community,
  .about-hobbies {
    flex-direction: column;
    align-items: stretch;
    justify-content: flex-start;
    gap: 8px;
  }

  .about-intro {
    /* Sticker lives inside the media box — keep a small gap under nav */
    padding-top: 4px;
    gap: 48px;
  }

  .about-community {
    gap: 24px;
  }

  .about-hobbies {
    margin-top: 24px;
  }

  .about-intro__media,
  .about-community__media,
  .about-hobbies__media {
    width: 100%;
    max-width: 100%;
    flex: none;
  }

  .about-intro__text,
  .about-community__text,
  .about-hobbies__text {
    min-width: 0;
    max-width: 100%;
    flex: none;
    width: 100%;
    margin-top: 0;
    align-self: stretch;
  }

  .about-intro__media {
    /* Portrait (390) + slight sticker peek; height fits sticker + full portrait */
    width: 100%;
    max-width: 415px;
    margin-inline: auto;
    /* Optical center — nudge right without breaking side margins */
    translate: 12px 0;
    aspect-ratio: 415 / 576;
  }

  .about-frame--portrait {
    position: absolute;
    left: 0;
    top: 16.7%;
    width: 94%;
    height: auto;
    aspect-ratio: 390 / 480;
  }

  .about-intro__sticker {
    left: 45.5%;
    top: 0;
    width: 54.6%;
  }

  .about-community__media {
    /* Crop empty space below collage so gap matches intro image→text */
    aspect-ratio: 537 / 340;
  }

  .about-hobbies__media {
    aspect-ratio: 356 / 190;
  }

  .about-journey__item {
    gap: 16px;
  }

  .about-journey__logo {
    width: 48px;
    height: 48px;
    border-radius: 6px;
  }

  .about-journey__role {
    font-size: 16px;
    letter-spacing: 0.32px;
  }

  .about-journey__sub {
    font-size: 14px;
    letter-spacing: 0.28px;
  }

  .about-journey__years--aside {
    display: none;
  }

  .about-journey__years--inline {
    display: inline;
  }
}

/* —— Mobile: 24px margins + smaller headings —— */
@media (max-width: 480px) {
  #about {
    padding-top: 88px;
    padding-left: var(--edge-margin-mobile);
    padding-right: var(--edge-margin-mobile);
  }

  .about__inner {
    gap: 64px;
  }

  .about-section h1,
  .about-section h2 {
    font-size: 36px;
  }

  .about-intro {
    padding-top: 0;
  }
}

/* —— Scroll reveal (mirrors footer easing, lighter for content) —— */
.about-reveal {
  opacity: 0;
  transform: translateY(28px);
  transition:
    opacity 900ms cubic-bezier(0.16, 1, 0.3, 1),
    transform 900ms cubic-bezier(0.16, 1, 0.3, 1);
  will-change: opacity, transform;
}

.about-reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
  will-change: auto;
}

@media (prefers-reduced-motion: reduce) {
  .about-reveal {
    opacity: 1;
    transform: none;
    transition: none;
    will-change: auto;
  }
}
