/* About: one full screen. Top left the title "Mattia / Dallapiccola"; the definitions and a big sentence in the left column, the last line on the bottom edge of the photo;
   the photo on the right (about-photos.js covers it with another one while the mouse is on it, when there is more than one). Nothing else.
   Margins: 3vw on the left and right (min 20 px), 5vw on phones; the photo starts 2vw under the top bar and ends 3vw above the bottom
   of the screen; the title is aligned with the top of the photo, the paragraph with its bottom edge. */
:root { --about-margin: max(3vw, 20px); --about-top-gap: 2vw; --about-bottom-gap: 3vw; --about-photo-w: 33vw }
.section.about { padding: 0; }
.about-grid {
  display: grid; align-content: start; align-items: start;                  /* the row is as high as the photo, not stretched */
  grid-template-columns: minmax(0, 1fr) var(--about-photo-w); column-gap: 3vw;   /* the left column ends 3vw before the photo */
  box-sizing: border-box; min-height: 100vh; min-height: 100svh;
  padding: calc(var(--bar-h) + var(--about-top-gap)) var(--about-margin) var(--about-bottom-gap);
}
.about-title { grid-column: 1 / -1; grid-row: 1; justify-self: start; margin-top: calc(-0.05 * clamp(56px, 10vw, 220px)); pointer-events: none; }   /* not a link, no hover; same style as the Contact title (.big-title in site.css); the top of the tall letters is on the top of the photo */
/* the left column: the definitions, then the big sentence, on the bottom edge of the photo (the space between the title and the definitions stays empty) */
.about-left { grid-column: 1; grid-row: 1; align-self: end; min-width: 0; }
.about-defs {
  list-style: none; margin: 0 0 var(--space-2); padding: 0;                                           /* no line; close to the sentence under it */
  display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); column-gap: 2vw; align-items: start;
  font-family: var(--font-mono); font-weight: 400; font-size: var(--fs-label); line-height: 1.3; letter-spacing: 0.04em; text-transform: uppercase; color: var(--text);
}
.about-defs li { margin: 0; padding: 0; min-width: 0; }
.about-line {
  margin: 0; max-width: 100%; text-wrap: balance;                            /* the last line is on the bottom edge of the photo */
  font-family: var(--font-display); font-weight: var(--fw-display); font-size: clamp(22px, 2.8vw, 56px); line-height: 1.08; letter-spacing: -0.02em; color: var(--text); text-align: left;
}
.about-line i { font-style: italic; }
/* the letters of the sentence (about-fx.js): a word is never broken, a letter moves on its own (only transform) */
.about-line .pw, .about-line .pl { display: inline-block; }
@media (min-width: 701px) {                                                      /* the same type as the caption of the phone (.contact-note): DM Mono capitals, small, soft */
  .about-line { font-family: var(--font-mono); font-weight: var(--nav-fw); font-size: 12px; line-height: 1.5; letter-spacing: 0.04em; text-transform: uppercase; color: rgb(var(--text-rgb) / var(--soft-a, 0.6)); text-wrap: wrap; }
  .about-line i { font-style: normal; }
}

.about.is-moving .pl { will-change: transform; }
.portrait {
  grid-column: 2; grid-row: 1; margin: 0; position: relative; overflow: hidden;
  height: calc(100vh - var(--bar-h) - var(--about-top-gap) - var(--about-bottom-gap));
  height: calc(100svh - var(--bar-h) - var(--about-top-gap) - var(--about-bottom-gap));
}
/* The photos: all in one box (cover, centred, square corners), one layer each, on top of each other; only the current one is visible.
   The photo that comes (works in about-photos.js with the Web Animations API, nothing is looped) covers the current one: a curtain that
   rises from the bottom (clip-path, 280 ms, sharp edge) while the photo settles from a zoom of 1.28 to 1 (transform, 600 ms, long deceleration).
   The photo below does not move. will-change only while this runs.
   Which layer is seen is told by opacity, never by visibility: visibility is inherited, so a layer that declared visibility: visible would show itself again inside a section
   that is hidden (a section that is not the current one is inert: mobile.css). */
.portrait .ab-layer { position: absolute; inset: 0; z-index: 0; overflow: hidden; opacity: 0; }
.portrait .ab-layer.is-current { z-index: 1; opacity: 1; }
.portrait .ab-layer.is-incoming { z-index: 2; opacity: 1; clip-path: inset(100% 0 0 0); }     /* before the curtain starts it shows nothing */
.portrait .ab-img { display: block; width: 100%; height: 100%; object-fit: cover; object-position: center; transform-origin: 50% 50%; border: 0; box-shadow: none; border-radius: 0; background: none; }
.portrait.is-changing .ab-layer.is-incoming { will-change: clip-path; }
.portrait.is-changing .ab-layer.is-incoming .ab-img { will-change: transform; }

/* phone: title, then the definitions (one column), the sentence (about 6vw), then the photo across the whole width (about 4:5) under them; margins 5vw */
@media (max-width: 900px) {
  :root { --about-margin: 5vw; }
  .about-grid { grid-template-columns: minmax(0, 1fr); min-height: 0; padding-bottom: var(--about-margin); }
  .about-title { grid-column: 1; grid-row: 1; margin-bottom: calc(2 * 0.88 * clamp(56px, 10vw, 220px) - 2 * var(--lh-display) * var(--fs-display)); }   /* stacked: what is under the title stays where it was (two lines of the old size) */
  .about-left { grid-column: 1; grid-row: 2; align-self: start; margin-top: clamp(16px, var(--space-4), 40px); }
  .about-defs { display: block; margin-bottom: clamp(10px, var(--space-2), 20px); }
  .about-defs li { padding: 0 0 6px; }
  .about-line { font-size: 6vw; }
  .portrait { grid-column: 1; grid-row: 3; height: auto; aspect-ratio: 4 / 5; margin-top: clamp(16px, var(--space-4), 40px); }
}
/* 701-860 px: the old size of the title was clamp(48px, 14vw, 120px): the top and what is under the title stay where they were */
@media (min-width: 701px) and (max-width: 860px) {
  .about-title { margin-top: calc(-0.05 * clamp(48px, 14vw, 120px)); margin-bottom: calc(2 * 0.88 * clamp(48px, 14vw, 120px) - 2 * var(--lh-display) * var(--fs-display)); }
}

.about-title .pw, .about-title .pl { display: inline-block; }                 /* the letters of the title (the lens of about-fx.js): inline, not blocks like the lines of .big-title */
