/* ==========================================================================
   Graduate profile page
   Index: page track · breadcrumb bar · profile card · panels (about / skills)
          · portfolio grid · contact call · privacy note
   Mobile-first; two columns start at 56rem (896px).
   ========================================================================== */

/* The design's content column on this page is 1192px. Used together with .container. */
.grad-track { --container: 74.5rem; }

/* ---- Breadcrumb bar ---------------------------------------------------- */
.grad-bar { background: var(--surface); }
.grad-bar__inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0 var(--sp-4);
}

.grad-bar__back {
  display: inline-flex;
  align-items: center;
  gap: var(--sp-1);
  min-height: 2.75rem;
  font-size: var(--fs-14);
  font-weight: 700;
  color: var(--burgundy-deep);
}
.grad-bar__back .icon { font-size: .75rem; }
@media (hover: hover) {
  .grad-bar__back:hover { text-decoration: underline; text-underline-offset: .25em; }
}

/* ---- Page ground ------------------------------------------------------- */
/* --grad-h2: the fluid heading size shared by the portfolio and contact headings */
/* overflow-x: clip keeps the panels that slide in from the side inside the page width */
.grad-page {
  overflow-x: clip;
  --grad-h2: clamp(var(--fs-22), 1rem + 1.4vw, var(--fs-28));
  padding-block: var(--sp-8) var(--sp-10);
  background: var(--tint-cool);
}
.grad-page__stack { display: flex; flex-direction: column; gap: var(--sp-8); }

/* ---- Profile card ------------------------------------------------------ */
.profile {
  position: relative;
  isolation: isolate;
  overflow: clip;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: var(--sp-5);
  padding: var(--sp-6) var(--sp-5);
  background: var(--gray);
  border-radius: var(--r-16);
  box-shadow: var(--sh-soft);
}
/* a soft blue glow in the far corner and a short burgundy rule under the portrait corner */
.profile::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background:
    linear-gradient(to left, var(--burgundy-deep), transparent) 100% 100% / 8rem .25rem no-repeat,
    radial-gradient(14rem 14rem at 0 0, color-mix(in srgb, var(--line-cool) 70%, transparent), transparent 70%);
}
.profile__photo {
  flex: none;
  width: 7.5rem;
  height: 7.5rem;
  object-fit: cover;
  border: .25rem solid var(--surface);
  border-radius: 50%;
  box-shadow: var(--sh-sm);
}
.profile__body {
  display: flex;
  flex-direction: column;
  gap: var(--sp-1);
  min-width: 0;
}
.profile__badges {
  display: flex;
  flex-wrap: wrap;
  gap: var(--sp-1);
  margin-block-end: var(--sp-2);
}
.profile__name {
  font-size: var(--fs-h2);
  font-weight: 700;
  line-height: 1.35;
  color: var(--navy);
}
.profile__lead { font-size: var(--fs-16); line-height: 1.625; color: var(--text); }

/* ---- Panels: about + skills -------------------------------------------- */
.grad-details { display: grid; gap: var(--sp-6); align-items: start; }
.panel {
  display: flex;
  flex-direction: column;
  gap: var(--sp-2);
  padding: var(--sp-6) var(--sp-5);
  background: var(--surface);
  border-radius: var(--r-16);
  box-shadow: var(--sh-xs);
}
.panel__title {
  display: flex;
  align-items: center;
  gap: var(--sp-1);
  padding-block-end: var(--sp-2);
  font-size: var(--fs-22);
  font-weight: 700;
  line-height: 1.45;
  color: var(--navy);
  border-block-end: 1px solid var(--line-cool);
}
.panel__title::before {
  content: "";
  flex: none;
  width: .625rem;
  height: 1.5rem;
  border-radius: var(--r-full);
  background: var(--burgundy);
}
.panel--amber .panel__title::before { background: var(--amber); }
.panel__text { font-size: var(--fs-16); line-height: 1.625; color: var(--text); }
.panel__text--strong { color: var(--ink); }
.panel__text--sm { font-size: var(--fs-14); line-height: 1.7; }

.facts {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: var(--sp-2);
  margin-block-start: var(--sp-4);
}
.facts__item {
  display: flex;
  flex-direction: column-reverse;
  align-items: center;
  justify-content: flex-end;
  gap: .375rem;
  padding: var(--sp-2) var(--sp-2) var(--sp-3);
  text-align: center;
  background: var(--tint-cool);
  border-radius: var(--r-12);
}
.facts__value .count { justify-items: center; }
.facts__value {
  font-size: var(--fs-22);
  font-weight: 600;
  line-height: 1.45;
  color: var(--navy);
}
.facts__label { font-size: var(--fs-12); line-height: 1.5; color: var(--text); }

.grad-skills {
  display: flex;
  flex-wrap: wrap;
  gap: var(--sp-3);
  margin-block-start: var(--sp-2);
}
.skill {
  display: inline-flex;
  align-items: center;
  gap: var(--sp-2);
  padding: .625rem .875rem;
  font-size: var(--fs-14);
  font-weight: 600;
  line-height: 1.45;
  color: var(--navy);
  background: var(--tint-cool);
  border-radius: var(--r-12);
  box-shadow: var(--sh-xs);
}
.skill__icon { font-size: .9375rem; color: var(--burgundy); }
.skill__icon--navy { color: var(--navy); }
.skill__icon--amber { color: var(--amber); }
.skill__icon--soft { color: var(--navy-soft); }
.skill__icon--ink { color: var(--amber-ink); }
.seal {
  display: flex;
  align-items: flex-start;
  gap: var(--sp-2);
  margin-block-start: var(--sp-4);
  padding: var(--sp-2) var(--sp-3);
  font-size: var(--fs-12);
  line-height: 2;
  color: var(--text);
  background: var(--navy-tint);
  border-radius: var(--r-12);
}
.seal__icon { margin-block-start: .25rem; font-size: 1.125rem; color: var(--burgundy-deep); }

/* ---- Portfolio --------------------------------------------------------- */
.grad-works { display: flex; flex-direction: column; gap: var(--sp-4); }
.grad-works__head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: var(--sp-2) var(--sp-4);
  padding-block-end: var(--sp-1);
  border-block-end: 1px solid var(--line-cool);
}
.grad-works__title {
  display: flex;
  align-items: center;
  gap: var(--sp-2);
  font-size: var(--grad-h2);
  font-weight: 700;
  line-height: 1.45;
  color: var(--navy);
}
.grad-works__title::before {
  content: "";
  flex: none;
  width: .625rem;
  height: 1.5rem;
  border-radius: var(--r-full);
  background: var(--burgundy);
}
.grad-works__lead {
  margin-block-start: var(--sp-1);
  font-size: var(--fs-16);
  line-height: 1.75;
  color: var(--text);
}
.grad-works__count {
  display: inline-flex;
  align-items: center;
  gap: var(--sp-2);
  padding-block-end: var(--sp-1);
  font-size: var(--fs-12);
  line-height: 1.5;
  color: var(--text-muted);
}
.grad-works__count .icon { font-size: .9375rem; }
.grad-works__grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: var(--sp-4); }

/* a work card: photo, dark foot, tag in the top corner; the whole card opens the gallery */
.work {
  position: relative;
  isolation: isolate;
  overflow: clip;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  align-items: flex-start;
  min-height: 15rem;
  width: 100%;
  padding: var(--sp-4);
  border-radius: var(--r-16);
  background: var(--navy);
  box-shadow: var(--sh-sm);
}
/* the photo fills the card behind the scrim (shared .card__media / .media supply the fit, skeleton and zoom) */
.work__media {
  position: absolute;
  inset: 0;
  z-index: -2;
  aspect-ratio: auto;
}
.work::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background: linear-gradient(
    to top,
    color-mix(in srgb, var(--ink) 90%, transparent),
    color-mix(in srgb, var(--ink) 20%, transparent) 50%,
    transparent
  );
}
.work__tag {
  padding: .125rem .625rem;
  font-size: var(--fs-12);
  line-height: 1.5;
  color: var(--navy);
  background: color-mix(in srgb, var(--surface) 90%, transparent);
  border-radius: var(--r-full);
  box-shadow: var(--sh-xs);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
}
.work__caption {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: var(--sp-1) var(--sp-3);
  width: 100%;
  color: var(--text-on-dark);
}
.work__title { font-size: var(--fs-16); font-weight: 700; line-height: 1.4; }
.work__link::after { content: ""; position: absolute; inset: 0; }
.work__link:focus-visible { box-shadow: none; }
.work:has(.work__link:focus-visible) { box-shadow: var(--focus); }
.work__arrow {
  justify-self: end;
  font-size: .6875rem;
  color: var(--on-dark-70);
  transition: translate var(--t-fast) var(--ease);
}
.work__meta {
  font-size: var(--fs-12);
  line-height: 1.35;
  color: color-mix(in srgb, var(--amber) 42%, var(--text-on-dark));
}
.work__year {
  justify-self: end;
  font-size: var(--fs-11);
  line-height: 1.45;
  color: var(--on-dark-60);
}
@media (hover: hover) {
  .work:hover .work__arrow { translate: calc(var(--dir) * 3px) 0; }
}

.grad-works__more { display: flex; justify-content: center; padding-block-start: var(--sp-4); }
.grad-works__behance {
  min-height: 2.75rem;
  padding-inline: var(--sp-6);
  white-space: normal;
  text-align: center;
  box-shadow: var(--sh-xs);
}
.grad-works__behance .icon { font-size: .875rem; }

/* ---- Contact call ------------------------------------------------------ */
.grad-cta {
  contain-intrinsic-size: auto 26rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--sp-4);
  width: min(100%, 42rem);
  margin-inline: auto;
  padding: var(--sp-8) var(--sp-5);
  text-align: center;
  background: var(--surface);
  border-radius: var(--r-16);
  box-shadow: var(--sh-xs);
}
.grad-cta__icon { color: var(--burgundy-deep); }
.grad-cta__icon .icon { font-size: 1.625rem; }
.grad-cta__title {
  font-size: var(--grad-h2);
  font-weight: 700;
  line-height: 1.45;
  color: var(--navy);
  text-wrap: balance;
}
.grad-cta__text {
  margin-block-start: calc(var(--sp-3) * -1);
  font-size: var(--fs-16);
  line-height: 1.75;
  color: var(--text);
  text-wrap: pretty;
}
.grad-cta__button { min-height: 3.25rem; padding-inline: var(--sp-10); }
.grad-cta__button .icon { font-size: 1.0625rem; }
.grad-cta__note {
  display: flex;
  align-items: flex-start;
  justify-content: center;
  gap: .375rem;
  width: 100%;
  padding-block-start: var(--sp-2);
  font-size: var(--fs-12);
  line-height: 1.5;
  color: var(--text-muted);
  border-block-start: 1px solid var(--line-cool);
}
.grad-cta__note .icon { margin-block-start: .1875rem; font-size: .8125rem; }

/* ---- Privacy note ------------------------------------------------------ */
.grad-privacy {
  display: flex;
  align-items: flex-start;
  justify-content: center;
  gap: .375rem;
  font-size: var(--fs-14);
  line-height: 1.7;
  text-align: center;
  color: var(--text);
}
.grad-privacy .icon { margin-block-start: .25rem; font-size: 1rem; color: var(--text-muted); }

/* ---- ≥ 640px: portrait beside the bio, two work cards per row ---------- */
@media (min-width: 40rem) {
  .grad-page__stack { gap: var(--sp-10); }
  .profile {
    flex-direction: row;
    align-items: center;
    gap: var(--sp-8);
    padding: var(--sp-10);
  }
  .profile__photo { width: 11rem; height: 11rem; }
  .panel, .grad-cta { padding: var(--sp-10); }
  .grad-works__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .work { min-height: 0; aspect-ratio: 588 / 384; }
}

/* ---- ≥ 896px: about (wider) beside skills (685 : 483 in the design) ---- */
@media (min-width: 56rem) {
  .grad-details { grid-template-columns: minmax(0, 685fr) minmax(0, 483fr); }
  .profile { gap: var(--sp-10); }
}

/* ---- Motion ---------------------------------------------------------------------
   Work cards fall in a wave (the shared "drop" reveal), the tilt alternating. The profile card
   and, from 56rem where the panels are on the first screen, the two panels enter once on load
   (they slide in from their own sides); below that the panels slide in when scrolled to. */
.grad-works__grid > li:nth-child(odd) { --drop-tilt: -2.5deg; }
.grad-works__grid > li:nth-child(even) { --drop-tilt: 2.5deg; }
@media (prefers-reduced-motion: no-preference) {
  .profile { animation: rise-in var(--t-slow) var(--ease) both; }
  .profile__photo { animation: profile-pop var(--t-slow) var(--ease-drop) 120ms both; }
  .profile__body > * { animation: rise-in var(--t-slow) var(--ease) both; }
  .profile__body > :nth-child(1) { animation-delay: 120ms; }
  .profile__body > :nth-child(2) { animation-delay: 240ms; }
  .profile__body > :nth-child(3) { animation-delay: 360ms; }
}
@media (prefers-reduced-motion: no-preference) and (min-width: 56rem) {
  .js-ready .panel[data-reveal] {
    opacity: 1;
    translate: none;
    filter: none;
    transition: none;
  }
  .grad-details > .panel:nth-child(1) { animation: panel-in-start var(--t-slow) var(--ease) 360ms both; }
  .grad-details > .panel:nth-child(2) { animation: panel-in-end var(--t-slow) var(--ease) 480ms both; }
}
@keyframes profile-pop {
  from { opacity: 0; scale: .8; }
}
@keyframes panel-in-start {
  from { opacity: 0; translate: calc(var(--dir) * -56px) 0; filter: blur(6px); }
}
@keyframes panel-in-end {
  from { opacity: 0; translate: calc(var(--dir) * 56px) 0; filter: blur(6px); }
}

/* ---- LTR (English) --------------------------------------------------------
   the back arrow and the "open" arrow are drawn for RTL; mirror them. */
[dir="ltr"] .icon:has(> use[href="#i-graduate-back"]),
[dir="ltr"] .icon:has(> use[href="#i-graduate-open"]) { scale: -1 1; }
/* breadcrumb separator is drawn for RTL (points left); turn it to point right */
[dir="ltr"] .crumbs__item + .crumbs__item::before { rotate: -45deg; }
