/*
  SIMPLE PAGES — About (about.html) and Studio (studio.html).
  Studio's image tiles reuse the case-study figure (.cs-fig in project.css).
*/

.page__main {
  padding: calc(var(--nav-height) + clamp(24px, 5vw, 56px)) var(--grid-margin) 0;
  min-height: 70vh;
}

.page__eyebrow {
  font-size: var(--text-small-size);
  font-weight: 400;
  color: var(--text-muted);
  margin-bottom: clamp(12px, 2vw, 20px);
}

.page__head .text-title { font-size: min(var(--text-title-size), 15vw); }

.page__lede {
  margin-top: clamp(14px, 2vw, 24px);
  max-width: 34ch;
  font-size: var(--text-h1-size);
  font-weight: 300;
  line-height: 1.15;
  color: var(--text-soft);
}
.page__lede:empty { display: none; }
/* Studio's top matches a project page's (css/project.css .cs-hero__name,
   __subtitle, __hook): the name, its type as a small mono label, and the
   quote at tagline size */
.page__head--studio .page__name {
  display: block;
  font-size: clamp(52px, 7.2vw, 120px);
  line-height: 1.02;
}
.page__kind {
  display: block;
  margin-top: var(--space-item);
  font-family: var(--font-mono);
  font-size: clamp(13px, 1vw, 16px);
  font-weight: 400;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--text-soft);
}
.page__head--studio .page__lede {
  margin-top: var(--space-block);
  max-width: 40ch;
  font-size: clamp(20px, 1.9vw, 30px);
  line-height: 1.3;
}
/* bold word in the Studio intro: the heaviest loaded weight, not a faked bold */
.page__lede strong { font-weight: 500; color: var(--text-strong); }

/* ---------- about ---------- */

/* the header shares the content's two columns: name on the left, the
   portrait filling the right column, lined up with the Education / Based
   facts below it */
.page__head--about {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr);
  column-gap: var(--grid-gutter);
  align-items: start;
}
.page__head--about > * { grid-column: 1; }
/* desktop / tablet: the portrait fills the right column's width, a wide
   frame running from the top of the "Sadie Gold" letters down to the
   baseline of "Product & Brand Designer" (the em offsets trim each line's
   spacing above / below the letters), its photo cropped to fill */
/* no eyebrow: the name's letters start where the old "About" eyebrow's
   letters did (0.21 of the small size down), minus the title's own space
   above its capitals (0.089em) */
.page__head--about h1 { margin-top: calc(var(--text-small-size) * 0.21 - 0.089em); }
/* About sits 56px lower under the nav than the other pages, and its
   subtitle 24px further below the name (the portrait stretches to match) */
.page__head--about { padding-top: 56px; }
.page__head--about .page__lede { margin-top: calc(clamp(14px, 2vw, 24px) + 24px); }
.page__head--about > .about__portrait {
  grid-column: 2;
  grid-row: 1 / span 2;
  align-self: stretch;
  justify-self: stretch;
  width: auto;
  aspect-ratio: auto;
  margin-top: calc(var(--text-small-size) * 0.21);
  margin-bottom: calc(var(--text-h1-size) * 0.23);
}
.about__portrait {
  position: relative;
  width: clamp(96px, 10vw, 150px);
  aspect-ratio: 3 / 4;
  background: var(--color-missing);
  overflow: hidden;
}
.about__portrait img {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 45% calc(48% + 20px);   /* the face centred in the wide frame, nudged 20px down */
}

.about {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr);
  gap: 40px var(--grid-gutter);
  margin-top: clamp(48px, 7vw, 96px);
  padding-bottom: clamp(64px, 10vw, 140px);
}

.about__bio { max-width: 39ch; }   /* 55 characters a line at most */
.about__bio { text-wrap: pretty; }   /* pretty: no lone word on a last line */
/* paragraph breaks (about.html): each screen shows only its own */
.about__break { display: none; height: 0.8em; }
@media (min-width: 761px) { .about__break.is-desk { display: block; } }
@media (max-width: 760px) { .about__break.is-phone { display: block; } }

.about__facts {
  display: flex;
  flex-direction: column;
  gap: 20px;
}
.about__facts dt { color: var(--text-muted); }
.about__facts dd {
  margin-top: 6px;
  font-size: var(--text-small-size);
  font-weight: 400;
  line-height: 1.4;
}

.about__links {
  grid-column: 1 / -1;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 20px clamp(24px, 4vw, 48px);
}
/* the Instagram + LinkedIn icons, right after the email */
.about__resume { display: inline-flex; align-items: center; gap: 4px; }
/* Resume sits before the icons on phones only */
.about__resume-link { display: none; margin-right: 10px; }
@media (max-width: 760px) { .about__resume-link { display: inline; } }
.about__social { width: 32px; height: 32px; }
.about__social svg { width: 20px; height: 20px; }
/* the email reads in full, not shouted in caps */
.about__links [data-about-email] { text-transform: none; letter-spacing: 0.02em; }

/* Skills (js/skills.js): app icons the size of the Instagram / LinkedIn
   ones, evenly spaced. The active one's icon fades as its name rises in
   letter by letter (same swap as "Say hi"), centred on it, and the icons
   it covers fade (.is-faded). Computers only: phones show labels. */
.about__facts dd[data-skills] { margin-top: 10px; }
.about__sub { color: var(--text-muted); }
.skills {
  position: relative;   /* the offsets js/skills.js measures are the row's own */
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 10px 14px;
}
/* phones: labelled icons, no swap (js/skills.js), so no tap cursor */
@media (max-width: 760px) { .skill__btn { cursor: default; } }
.skill { transition: opacity 240ms ease; }
/* computers: icons under a showing name fade out (js/skills.js) but keep
   their hover spot, so running the pointer along a row names each icon
   in turn, hidden or not */
.skill.is-faded { opacity: 0; }
.skill__btn {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  color: var(--color-ink);
  cursor: pointer;
}
.skill__icon { display: flex; transition: opacity 240ms ease, transform 320ms cubic-bezier(0.22, 1, 0.36, 1); }
.skill__icon.is-out { opacity: 0; transform: translateY(-0.4em); }
.skill__icon svg {
  width: 20px;
  height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.5;
  stroke-linecap: round;
  stroke-linejoin: round;
  overflow: visible;
}
.skill__icon .dot { fill: currentColor; stroke: none; }
.skill__icon text {
  fill: currentColor;
  stroke: none;
  font-family: var(--font-display);
  font-size: 8.5px;
  font-weight: 500;
}
.skill__name {
  position: absolute;
  top: 0;
  left: 0;
  height: 32px;
  display: flex;
  align-items: center;
  white-space: pre;
  font-size: var(--text-small-size);
  font-weight: 400;
  pointer-events: none;
}
.skill__name > span {
  display: inline-block;
  transition: transform 320ms cubic-bezier(0.22, 1, 0.36, 1), opacity 240ms ease;
  transition-delay: calc(var(--i, 0) * 16ms);
}
.skill__name.is-below > span { transform: translateY(0.6em); opacity: 0; }
.skill__name.is-above > span { transform: translateY(-0.6em); opacity: 0; transition-delay: calc(var(--i, 0) * 12ms); }
.skill__name.is-still > span { transition: none; }
@media (prefers-reduced-motion: reduce) {
  .skill, .skill__icon, .skill__name > span { transition: none; }
}
/* phones only: every skill icon gets its name in very small, light mono
   print, centred beneath it (Instagram / LinkedIn stay unlabelled). The
   skills become an even grid of cells wide enough for the names. */
.skill__label { display: none; }
@media (max-width: 760px) {
  .skills {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(54px, 1fr));
    gap: 12px 4px;
  }
  .skill { display: flex; flex-direction: column; align-items: center; }
  .skill__label {
    display: block;
    font-family: var(--font-mono);
    font-size: 8px;
    line-height: 1.2;
    letter-spacing: 0.02em;
    text-align: center;
    color: var(--color-ink);
    opacity: 0.35;
    margin-top: 2px;
    max-width: 100%;
  }
}

/* ---------- studio ---------- */

.studio__group {
  margin-top: clamp(56px, 8vw, 112px);
}

.studio__grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));  /* 3 across on a full desktop */
  gap: var(--space-row) var(--grid-gutter);
  margin-top: var(--space-block);
  align-items: start;  /* pieces keep their own heights */
}

/* Studio pieces are never cropped: each image shows whole at its own
   proportions, scaled to the column width (overrides the case-study
   tile's fixed shape + cover crop). */
.studio__grid .cs-fig__open {
  aspect-ratio: auto;
  background: none;
}
.studio__grid .cs-fig__media {
  height: auto;
  object-fit: contain;
}

.studio__caption {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin-top: 10px;
}
.studio__name {
  font-size: var(--text-small-size);
  font-weight: 400;
}
.studio__title {
  font-size: var(--text-h2-size);
  font-weight: 400;
}
.studio__details,
.studio__award {
  font-size: var(--text-small-size);
  font-weight: 400;
}
.studio__details { color: var(--text-muted); }
.studio__award { color: var(--text-strong); }
.studio__award::before { content: '\2605  '; }

.studio__empty {
  margin-top: clamp(48px, 7vw, 96px);
  color: var(--text-muted);
}

.page__more {
  display: flex;
  gap: clamp(24px, 4vw, 48px);
  padding: clamp(72px, 10vw, 140px) 0 clamp(48px, 6vw, 80px);
}

/* small desktop + tablet: 2 across */
@media (max-width: 1200px) {
  .studio__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

/* ---------- Studio sketchbook (js/studio.js) ---------- */
/* Sits beside the painting, taking the next two columns so it has room to
   open into a two-page spread without moving anything sideways; opening
   only makes the row taller. --pw is one page's width: the closed book is
   a small cover, the open book two full pages. The columns and --pw ease
   together, so the book grows and the page below glides down. Leaves turn
   on the spine (the right column's left edge) in 3D. */
@property --pw {
  syntax: '<length>';
  inherits: true;
  initial-value: 170px;
}
.studio__book { grid-column: span 2; }
@media (max-width: 1200px) {
  .studio__book { grid-column: 1 / -1; }   /* its own row under the painting */
}
.sketchbook {
  --pw: var(--pw-closed, 170px);
  --book-ease: cubic-bezier(0.65, 0, 0.35, 1);
  display: grid;
  grid-template-columns: 0px var(--pw);
  width: max-content;
  height: calc(var(--pw) * 4 / 3);
  perspective: 2400px;
  cursor: pointer;
  outline-offset: 8px;
  transition:
    --pw 850ms var(--book-ease),
    grid-template-columns 850ms var(--book-ease),
    translate var(--duration-base) var(--ease-smooth);
}
.sketchbook.is-open {
  --pw: var(--pw-open, 380px);
  grid-template-columns: var(--pw) var(--pw);
  cursor: default;
}
/* closing past the last page: shut on the left, then it resets */
.sketchbook.is-open.is-closing-back {
  --pw: var(--pw-closed, 170px);
  grid-template-columns: var(--pw) 0px;
}
.sketchbook.no-anim,
.sketchbook.no-anim * { transition: none !important; }
.sketchbook__right {
  position: relative;
  transform-style: preserve-3d;
}
.sketchbook__leaf {
  position: absolute;
  top: 0;
  left: 0;
  width: var(--pw);
  height: 100%;
  transform-origin: left center;
  transform-style: preserve-3d;
  transition: transform 900ms var(--book-ease);
}
.sketchbook__leaf.is-flipped { transform: rotateY(-180deg); }
.sketchbook__leaf.is-fast { transition-duration: 450ms; }
.sketchbook__face {
  position: absolute;
  inset: 0;
  overflow: hidden;
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
}
.sketchbook__face--back { transform: rotateY(180deg); }

/* paper pages: the sketch sits on the page, darker toward the spine */
.sketchbook__page {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 7%;
  background: #FBF8F3;
  box-shadow: 0 1px 2px rgba(29, 27, 24, 0.12);
}
.sketchbook__page img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  mix-blend-mode: multiply;
  user-select: none;
}
.sketchbook__page::after {
  content: '';
  position: absolute;
  inset: 0;
  pointer-events: none;
}
.sketchbook__page--right::after { background: linear-gradient(to right, rgba(29, 27, 24, 0.14), rgba(29, 27, 24, 0) 12%); }
.sketchbook__page--left::after { background: linear-gradient(to left, rgba(29, 27, 24, 0.14), rgba(29, 27, 24, 0) 12%); }
/* a turning page catches a little shadow mid-turn */
.sketchbook__leaf.is-turning .sketchbook__page::after { animation: page-shade 900ms var(--book-ease); }
.sketchbook__leaf.is-turning.is-fast .sketchbook__page::after { animation-duration: 450ms; }
@keyframes page-shade {
  50% { background-color: rgba(29, 27, 24, 0.12); }
}

/* the covers: black, with an elastic band down the right edge */
.sketchbook__cover {
  display: flex;
  align-items: flex-end;
  padding: 10%;
  background: #141312;
  border-radius: 2px 6px 6px 2px;
  box-shadow: 0 10px 24px rgba(29, 27, 24, 0.22), 0 2px 6px rgba(29, 27, 24, 0.18);
}
.sketchbook__face--back.sketchbook__cover { border-radius: 6px 2px 2px 6px; }
.sketchbook__title {
  font-size: calc(var(--pw) * 0.085);
  font-weight: 300;
  letter-spacing: 0.02em;
  color: rgba(253, 249, 245, 0.62);
}
.sketchbook__band {
  position: absolute;
  top: 0;
  bottom: 0;
  right: 11%;
  width: 4%;
  background: #2A2724;
}
.sketchbook__face--back .sketchbook__band { right: auto; left: 11%; }
.sketchbook__endpaper { background: #26231F; }

/* closed, on hover: the cover eases open a touch, showing the first page */
.sketchbook:not(.is-open):hover,
.sketchbook:not(.is-open):focus-visible { translate: 0 -3px; }
.sketchbook:not(.is-open):hover .sketchbook__leaf--cover,
.sketchbook:not(.is-open):focus-visible .sketchbook__leaf--cover {
  transform: rotateY(-24deg);
  transition-duration: 600ms;
}

@media (prefers-reduced-motion: reduce) {
  .sketchbook, .sketchbook * { transition: none !important; animation: none !important; }
}

@media (max-width: 760px) {
  .about { grid-template-columns: 1fr; }
  /* phones: no portrait for now */
  .page__head--about { grid-template-columns: 1fr; }
  .page__head--about > .about__portrait { display: none; }
  /* phones: short lines (about 50 characters) */
  .about__bio { max-width: 42ch; }
  /* phone: one piece per line */
  .studio__grid { grid-template-columns: 1fr; }
}

/* ---------- About: content arrives chunk by chunk ---------- */
/* Each .chunk rises a little and fades in, in the order set by --chunk,
   quick and overlapping: the same entrance as the project pages
   (.load-rise), just paced piece by piece. The bio's sentences
   (.chunk--line, inline so the paragraph still wraps as one) only fade.
   Each lands on its own resting opacity. */
.chunk {
  animation: chunk-in 760ms cubic-bezier(0.22, 1, 0.36, 1) both;
  animation-delay: calc(60ms + var(--chunk, 0) * 55ms);
}
@keyframes chunk-in {
  from { opacity: 0; transform: translateY(18px); }
}
.chunk--line { animation-name: chunk-line; }
@keyframes chunk-line {
  from { opacity: 0; }
}
/* pieces of work (Studio) arrive a little further and slower than text */
.chunk--piece {
  animation-name: chunk-piece;
  animation-duration: 1000ms;
}
@keyframes chunk-piece {
  from { opacity: 0; transform: translateY(36px); }
}

/* held at the start (invisible, nothing shifting underneath) until the
   page is built and the font (and on Studio the first pieces) have
   loaded; about.html / js/studio.js remove .is-loading. The nav fades in
   with the first chunk instead of popping in */
.is-loading .chunk { animation-play-state: paused; }
[data-page="about"] .site-nav,
[data-page="studio"] .site-nav { transition: opacity 400ms ease; }
.is-loading body[data-page="about"] .site-nav,
.is-loading body[data-page="studio"] .site-nav { opacity: 0; }
@media (prefers-reduced-motion: reduce) {
  .chunk { animation: none; }
}

/* "grab my resume and let's talk ->" at the end of the bio (about.html):
   bold, no underline, the arrow nudging right on hover */
.about__cta {
  font-weight: 500;   /* the heaviest loaded weight, not a faked bold */
  color: var(--text-strong);
  transition: color var(--duration-base) var(--ease-smooth);
}
.about__cta:hover,
.about__cta:focus-visible { color: var(--color-ink); }
.about__cta-arrow {
  display: inline-block;
  margin-left: 0.3em;
  transition: transform var(--duration-base) var(--ease-smooth);
}
.about__cta:hover .about__cta-arrow,
.about__cta:focus-visible .about__cta-arrow { transform: translateX(4px); }
/* computers: the rolling words (about.html rolling()). Two copies stacked
   in one cell; letters leave upward and arrive from below, left to right,
   a beat apart (--i) */
/* the letter roll itself (.about__cta-swap / -layer) lives in
   css/components.css: project pages use it too */
}
