/* About, next pass — loaded only by about-next.html, after main.css.
   Nothing here overrides a rule the shipping pages depend on; the shared
   pieces (.about-block, .about__facts, .about__links, .projects__grid,
   .project) are reused as-is. New work is prefixed nx-.

   Four moves against the current page:
     1. Section labels stick, so the 367px column stops being dead air.
     2. Skills carry meaning — grouped by practice, one line each — in ~600px
        rather than 2250px of empty squares.
     3. A selected-work block, so the page has an exit into the work.
     4. Experience reads as entries with outcomes, not a two-row table.
   And it closes on a statement instead of trailing off into a paragraph. */

/* ── Sticky labels ──────────────────────────────────────────── */
/* align-self keeps the label its own height rather than stretching to the row,
   which is what lets it travel. Block rather than the inline-block that
   [data-reveal] sets, since sticky wants a block box. */
.about-block__label {
  display: block;
  position: sticky;
  top: calc(var(--header-h) + 32px);
  align-self: start;
}

/* ── Intro ──────────────────────────────────────────────────── */

.about-block__content .nx-lead {
  max-width: 24ch;
  margin-bottom: 12px;
  font-family: var(--font-display);
  font-weight: 500;
  font-size: clamp(22px, 2.4vw, 30px);
  line-height: 1.4;
  letter-spacing: 0.5px;
}

/* The intro is long enough to fill the column, so it drops the 54ch / 24ch
   measures and runs the full width, less 8px on the right. */
#about .about-block__content p,
#about .about-block__content .nx-lead {
  max-width: none;
  padding-right: 8px;
}

/* Four facts here rather than the three main.css lays out; phones keep the
   single column. */
@media (min-width: 861px) {
  #about .about__facts {
    grid-template-columns: repeat(4, 1fr);
    margin-right: 8px;
  }
}

/* ── Skills, the unstacking list ───────────────────────────────
   Rebuilt from the recording of loop-agency.framer.website/studio, "Our
   Awards". Every row is `position: sticky` against the BOTTOM of the
   viewport, so any row you haven't reached yet is pulled up onto one line
   (--nx-pile) instead of sitting off-screen. Earlier rows paint over later
   ones (z-index counts down), and every row is opaque, so that line shows a
   single row — the next one due. Scroll, and the row above slides up and
   uncovers it from the top down; it holds on the line until the row above
   has cleared it, then follows. Below each moving row you see its own rule
   and the pile's rule beneath it, which is the double line in the reference.

   No JavaScript. Two things it depends on:
   - One container. Sticky is bounded by its containing block, so the rows
     share a single <ol>; splitting them up would make one pile per list.
   - That container's top. A row can't be pulled above the top of the <ol>,
     so until the list itself reaches the line, the pile simply sits at the
     top of the list, under row 01 — the reference does the same. */

.nx-award-rows {
  /* Where the pile sits: this far up from the bottom of the viewport. */
  --nx-pile: clamp(56px, 16vh, 150px);
  list-style: none;
  margin: 0;
  padding: 0;
  border-top: 1px solid rgba(34, 34, 34, 0.15);
}

.nx-award-row {
  position: sticky;
  bottom: var(--nx-pile);
  display: grid;
  grid-template-columns: minmax(0, 190px) minmax(0, 1fr) auto;
  align-items: baseline;
  column-gap: 32px;
  /* Copy at the top, air underneath, rule at the bottom — so the row coming
     out from under shows its text first, the way the reference does. */
  padding: 22px 0 44px;
  /* The same hairline gray as the facts row and Experience. */
  border-bottom: 1px solid rgba(34, 34, 34, 0.15);
  /* Opaque, or the pile shows through as eight rows of overprinted text. */
  background: var(--white);
}

/* Earlier on top. Eight rows; extend if more are added. */
.nx-award-row:nth-child(1) { z-index: 8; }
.nx-award-row:nth-child(2) { z-index: 7; }
.nx-award-row:nth-child(3) { z-index: 6; }
.nx-award-row:nth-child(4) { z-index: 5; }
.nx-award-row:nth-child(5) { z-index: 4; }
.nx-award-row:nth-child(6) { z-index: 3; }
.nx-award-row:nth-child(7) { z-index: 2; }
.nx-award-row:nth-child(8) { z-index: 1; }

.nx-award-row__name {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: clamp(17px, 1.6vw, 20px);
  line-height: 1.3;
}

.nx-award-row__desc {
  max-width: 46ch;
  font-size: 15px;
  line-height: 1.55;
  color: #4a4a4a;
}

.nx-award-row__num {
  font-family: var(--font-body);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.08em;
}

/* Scroll-linked movement, so it goes with the other motion. Rows just sit in
   order, which is what the stack resolves to anyway. */
@media (prefers-reduced-motion: reduce) {
  .nx-award-row {
    position: static;
  }
}

/* ── Selected work ──────────────────────────────────────────── */
/* Styled from the Figma card (node 984:1543) — a bordered panel with a soft
   ambient shadow instead of the drop shadow work.html's cards use, and a
   Hatton Ultralight title instead of Medium. Frame size stays this
   section's own (360px, not the 538px on work.html); only the type and the
   card's surface treatment are pulled from that node. */

.nx-work__grid {
  margin-bottom: 8px;
}

/* The cards are 360 here rather than the 538 they get on work.html, and at
   that width "ismetozkan.com" at 36px sets a min-content floor wider than its
   1fr track — so column 2 grew and the two cards came out different sizes.
   min-width: 0 lets the track hold, and the name steps down to fit it. */
.nx-work__grid > li {
  min-width: 0;
}

/* "See all work" sits under the heading, lined up with its right edge. The
   pair is shrink-wrapped to the heading's width, and it is the pair that
   sticks now rather than the label alone, so the button travels with it. */
.nx-work__side {
  position: sticky;
  top: calc(var(--header-h) + 32px);
  align-self: start;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  width: max-content;
  max-width: 100%;
}

.nx-work__side .about-block__label {
  position: static;
}

.nx-work__side .about__links {
  margin-top: 8px;
}

/* A plain text link rather than a pill: no fill, no stroke, in #6b6b6b with
   the cards' own ↗ beside it. The arrow is the same icon drawn as a mask over
   currentColor, so it takes the link's colour. On hover it underlines and
   the arrow nudges out. */
.about__links a.nx-work__all,
.about__links a.nx-work__all:hover {
  gap: 2px;
  padding: 0;
  background: none;
  border: 0;
  border-radius: 0;
  color: #6b6b6b;
  text-underline-offset: 4px;
}

.about__links a.nx-work__all:hover {
  text-decoration: underline;
}

.nx-work__arrow {
  width: 22px;
  height: 22px;
  background: currentColor;
  -webkit-mask: url("../assets/svg/icon-arrow.svg") center / contain no-repeat;
  mask: url("../assets/svg/icon-arrow.svg") center / contain no-repeat;
  transition: transform 0.2s var(--ease);
}

.nx-work__all:hover .nx-work__arrow {
  transform: translate(2px, -2px);
}

.nx-work__grid .project {
  border: 2px solid var(--gray);
  /* The two-direction, gray-tinted shadow from the Figma node, in place of
     work.html's single dark drop shadow. */
  box-shadow:
    -2px -2px 6px rgba(238, 234, 230, 0.75),
    2px 2px 6px rgba(238, 234, 230, 0.75);
}

.nx-work__grid .project:hover {
  box-shadow:
    -2px -2px 6px rgba(238, 234, 230, 0.75),
    2px 2px 6px rgba(238, 234, 230, 0.75);
}

.nx-work__grid .project__label {
  align-items: flex-end;
  gap: 24px;
  padding: 20px 24px 24px;
}

.nx-work__grid .project__name {
  font-weight: 200;
  font-size: clamp(18px, 1.8vw, 26px);
  line-height: 1.5;
  letter-spacing: 0.02em;
}

.nx-work__grid .project__arrow {
  width: 28px;
  height: 28px;
}

/* ── Experience ─────────────────────────────────────────────── */

.nx-exp {
  list-style: none;
  margin: 0;
  padding: 0;
}

.nx-exp__item {
  display: grid;
  grid-template-columns: 88px 1fr;
  gap: 24px;
  padding: 28px 0;
  border-top: 1px solid rgba(34, 34, 34, 0.15);
}

.nx-exp__item:last-child {
  border-bottom: 1px solid rgba(34, 34, 34, 0.15);
}

/* The Skills list's unstacking, on the Experience rows — see "Skills, the
   unstacking list" above for how it works. The rows' own design is
   untouched; the only addition is the page's white behind each one, which
   looks the same but has to be opaque so the pile shows one row, not all of
   them overprinted. Same pile line as Skills, and the same caveats: one <ol>,
   and earlier rows on top (extend the z-index list if rows are added). */
.nx-exp {
  --nx-pile: clamp(56px, 16vh, 150px);
}

.nx-exp__item {
  position: sticky;
  bottom: var(--nx-pile);
  background: var(--white);
}

/* These rows draw their rule at the top, so while a row slides up the next
   one's rule is still under it and the two entries would run together. A
   1px line under each row (but the last, which has its own bottom border)
   travels with it instead, as the Skills rows' bottom rules do. At rest it
   lands exactly on the next row's top border, so nothing changes: it is that
   border's colour already composited on the white (0.15 of #222 on #fafafa),
   opaque so the overlap doesn't darken it. */
.nx-exp__item:not(:last-child) {
  box-shadow: 0 1px 0 #dadada;
}

.nx-exp__item:nth-child(1) { z-index: 4; }
.nx-exp__item:nth-child(2) { z-index: 3; }
.nx-exp__item:nth-child(3) { z-index: 2; }
.nx-exp__item:nth-child(4) { z-index: 1; }

@media (prefers-reduced-motion: reduce) {
  .nx-exp__item {
    position: static;
  }
}

.nx-exp__year {
  padding-top: 7px;
  font-family: var(--font-body);
  font-size: 11px;
  letter-spacing: 0.14em;
  color: #6b6b6b;
}

.nx-exp__role {
  font-family: var(--font-display);
  font-size: clamp(18px, 1.9vw, 24px);
  line-height: 1.3;
}

.nx-exp__client {
  color: #6b6b6b;
}

.nx-exp__note {
  margin-top: 8px;
  max-width: 52ch;
  font-size: 15px;
  line-height: 1.6;
}

/* ── Closing statement ──────────────────────────────────────── */
/* Replaces the "What inspires me" paragraph, which was the quietest thing on
   the page in its last position. */

.nx-closing {
  padding: clamp(80px, 12vw, 180px) clamp(20px, 10.42vw, 150px) 0;
}

.nx-closing__text {
  max-width: 18ch;
  font-family: var(--font-display);
  font-weight: 500;
  font-size: clamp(30px, 4.4vw, 62px);
  line-height: 1.2;
  letter-spacing: 1px;
}

/* Pink as a fill with black on it — 7.5:1 — rather than pink type, which is
   2.1:1 on this background. Same call the footer already makes, and the
   rounded fill echoes the hero's knockout. */
.nx-closing__text mark {
  background: var(--pink);
  color: var(--black);
  padding: 0 0.1em;
  border-radius: 10px;
  /* The phrase wraps on narrow screens; clone so both fragments get the full
     radius instead of one open end each. */
  -webkit-box-decoration-break: clone;
  box-decoration-break: clone;
}

.nx-closing__note {
  margin-top: 28px;
  max-width: 46ch;
  font-size: 15px;
  line-height: 1.6;
  color: #5a5a5a;
}

@media (max-width: 860px) {
  /* One column, so there is no second column for a label to ride alongside. */
  .about-block__label,
  .nx-work__side {
    position: static;
  }

  .nx-exp__item {
    grid-template-columns: 1fr;
    gap: 8px;
  }

  .nx-exp__year {
    padding-top: 0;
  }

  /* Name and number on one line, the sentence under them. */
  .nx-award-row {
    grid-template-columns: minmax(0, 1fr) auto;
    column-gap: 16px;
    row-gap: 10px;
    padding: 18px 0 32px;
  }

  .nx-award-row__desc {
    grid-column: 1 / -1;
    grid-row: 2;
  }

  .nx-closing {
    padding: 64px var(--page-gutter) 0;
  }
}
