/*
 * Page sections: hero, profile, education, experience route, skills index,
 * qualities, HR guide and contact. Shared pieces live in design/base.css.
 */

/* ======================= Hero ======================= */

.hero {
  position: relative;
  min-height: 100svh;
  overflow: hidden;
}

/* Mimi Pink colour block that the arch image sits on. */
.hero-wash {
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  width: 40%;
  background: var(--mimi);
}

.hero-grid {
  position: relative;
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  column-gap: clamp(16px, 2vw, 32px);
  row-gap: clamp(32px, 5vh, 64px);
  min-height: 100svh;
  align-items: end;
  padding-top: clamp(104px, 13vh, 160px);
  padding-bottom: clamp(32px, 5vh, 64px);
}

.hero-text {
  grid-column: 1 / 8;
  grid-row: 1;
}

.hero-label {
  color: var(--rose);
  margin-bottom: clamp(20px, 3vh, 36px);
}

.hero-title {
  font-family: var(--font-display);
  /* Bounded by height too, so the whole hero (name → highlights) fits one screen. */
  font-size: min(var(--text-hero), 12.5svh);
  font-weight: 300;
  line-height: 0.88;
  letter-spacing: -0.045em;
}

.hero-line {
  display: block;
  overflow: hidden;
  padding-bottom: 0.06em;
}

.hero-line--indent {
  padding-left: 1.05em;
}

.hero-line--far {
  padding-left: 0.42em;
}

.hero-word {
  display: inline-block;
}

.hero-word--rose {
  color: var(--rose);
}

.hero-copy {
  max-width: 36ch;
  margin-top: clamp(24px, 4vh, 40px);
  color: var(--plum);
  font-size: var(--text-lead);
  line-height: 1.55;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 16px 32px;
  margin-top: clamp(28px, 4vh, 44px);
}

.hero-figure {
  position: relative;
  grid-column: 8 / 13;
  grid-row: 1 / span 2;
  align-self: center;
  isolation: isolate;
}

/* Hairline arch offset behind the photo — depth without a drop shadow. */
.hero-figure::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  border: 1px solid var(--rose);
  border-radius: 999px 999px 0 0;
  transform: translate(18px, 18px);
}

.hero-arch {
  aspect-ratio: 3 / 4.1;
  overflow: hidden;
  border-radius: 999px 999px 0 0;
  background: var(--thistle);
}

.hero-arch picture {
  height: 100%;
}

.hero-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 64% 50%;
}

.hero-ledger {
  display: grid;
  grid-column: 1 / 8;
  grid-row: 2;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 24px;
}

.hero-ledger > div {
  border-top: 1px solid var(--line-strong);
  padding-top: 16px;
}

.hero-ledger dt {
  font-family: var(--font-display);
  font-size: clamp(1.125rem, 1rem + 0.6vw, 1.5rem);
  font-weight: 420;
  line-height: 1.2;
}

.hero-ledger dd {
  margin-top: 6px;
  color: var(--plum);
  font-size: var(--text-small);
}

/* Hero entrance — runs when site.js adds .is-in (right after the logo intro). */
.js-motion .hero:not(.is-in) .hero-word {
  transform: translateY(108%);
}

.js-motion .hero:not(.is-in) .hero-label,
.js-motion .hero:not(.is-in) .hero-copy,
.js-motion .hero:not(.is-in) .hero-actions,
.js-motion .hero:not(.is-in) .hero-ledger > div {
  opacity: 0;
  transform: translateY(var(--reveal-distance));
}

.js-motion .hero:not(.is-in) .hero-label .label-arrow {
  transform: scaleX(0);
}

.js-motion .hero:not(.is-in) .hero-arch {
  clip-path: inset(100% 0 0 0 round 999px 999px 0 0);
}

.js-motion .hero:not(.is-in) .hero-image {
  transform: scale(1.14);
}

.js-motion .hero:not(.is-in) .hero-figure::before {
  opacity: 0;
  transform: translate(0, 0);
}

.js-motion .hero-word,
.js-motion .hero-label,
.js-motion .hero-copy,
.js-motion .hero-actions,
.js-motion .hero-ledger > div,
.js-motion .hero-label .label-arrow,
.js-motion .hero-figure::before {
  transition:
    opacity var(--dur-long) var(--ease-out),
    transform var(--dur-long) var(--ease-out);
}

.js-motion .hero-arch {
  clip-path: inset(0 0 0 0 round 999px 999px 0 0);
  transition: clip-path 1.2s var(--ease-in-out);
}

.js-motion .hero-image {
  transition: transform 1.6s var(--ease-out);
}

/* Choreography (ms after .is-in): label 0 · name 80–320 · arch 150 · copy 450 · actions 550 · ledger 650+ */
.hero-label .label-arrow { transition-delay: 250ms; }
.hero-title .hero-line:nth-child(1) .hero-word { transition-delay: 80ms; }
.hero-title .hero-line:nth-child(2) .hero-word { transition-delay: 200ms; }
.hero-title .hero-line:nth-child(3) .hero-word { transition-delay: 320ms; }
.hero-arch,
.hero-image { transition-delay: 150ms; }
.hero-figure::before { transition-delay: 700ms; }
.hero-copy { transition-delay: 450ms; }
.hero-actions { transition-delay: 550ms; }
.hero-ledger > div:nth-child(1) { transition-delay: 650ms; }
.hero-ledger > div:nth-child(2) { transition-delay: 730ms; }
.hero-ledger > div:nth-child(3) { transition-delay: 810ms; }

@media (max-width: 960px) {
  .hero-wash {
    top: auto;
    width: 100%;
    height: 34%;
  }

  .hero-grid {
    align-items: start;
    padding-top: clamp(104px, 14vh, 140px);
  }

  .hero-text,
  .hero-figure,
  .hero-ledger {
    grid-column: 1 / -1;
    grid-row: auto;
  }

  .hero-figure {
    width: min(100% - 18px, 460px);
    justify-self: end;
    margin-right: 18px;
  }

  .hero-arch {
    aspect-ratio: 4 / 4.4;
  }
}

@media (max-width: 560px) {
  .hero-ledger {
    grid-template-columns: 1fr;
    gap: 0;
  }

  .hero-ledger > div {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 16px;
    padding-block: 14px;
  }

  .hero-ledger dd {
    margin: 0;
    text-align: right;
  }

  .hero-actions .button {
    flex: 1 1 100%;
    justify-content: space-between;
  }
}

/* ======================= Profile ======================= */

.about-grid {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: clamp(40px, 5vw, 72px) clamp(16px, 2vw, 32px);
  align-items: start;
}

.portrait {
  position: relative;
  grid-column: 1 / 6;
  isolation: isolate;
}

/* Thistle block offset behind the portrait. */
.portrait::before {
  content: "";
  position: absolute;
  inset: 14% -28px 44px 22%;
  z-index: -1;
  background: var(--thistle);
}

.portrait-frame {
  aspect-ratio: 4 / 5;
  overflow: hidden;
  background: var(--mimi);
}

.portrait-frame picture {
  height: 100%;
}

.portrait-frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 50% 30%;
  transition: transform 1.2s var(--ease-out);
}

@media (hover: hover) {
  .portrait:hover .portrait-frame img {
    transform: scale(1.04);
  }
}

.portrait figcaption {
  margin-top: 18px;
  color: var(--plum);
}

.about-copy {
  display: grid;
  grid-column: 7 / 13;
  gap: clamp(40px, 5vw, 64px);
  padding-top: clamp(0px, 9vw, 140px);
}

.about-entry {
  border-top: 1px solid var(--line-strong);
  padding-top: 24px;
}

.about-entry h3 {
  margin-bottom: 18px;
}

.about-entry p:not(.lead) {
  max-width: 44ch;
  color: var(--plum);
}

@media (max-width: 860px) {
  .portrait,
  .about-copy {
    grid-column: 1 / -1;
  }

  .portrait {
    width: min(100% - 28px, 440px);
  }

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

/* ======================= Education ======================= */

.record {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
  gap: clamp(32px, 5vw, 80px);
  border-top: 1px solid var(--ink);
  padding-top: clamp(28px, 4vw, 48px);
}

.record + .record {
  margin-top: clamp(48px, 6vw, 88px);
}

.record-level {
  margin-bottom: 14px;
  color: var(--rose);
}

.record-date {
  color: var(--rose);
  font-family: var(--font-display);
  font-size: clamp(1.75rem, 1.2rem + 2.2vw, 3.25rem);
  font-weight: 300;
  letter-spacing: -0.02em;
  line-height: 1.05;
}

.record-place h3 {
  margin-top: clamp(20px, 3vw, 36px);
}

.record-address {
  max-width: 28ch;
  margin-top: 10px;
  color: var(--plum);
  font-size: var(--text-small);
}

.record-course h3 {
  font-size: clamp(1.625rem, 1.2rem + 1.8vw, 2.75rem);
  font-weight: 340;
  line-height: 1.1;
}

.record-course p {
  max-width: 46ch;
  margin-top: 20px;
  color: var(--plum);
  font-size: var(--text-lead);
}

@media (max-width: 760px) {
  .record {
    grid-template-columns: 1fr;
  }
}

/* ======================= Experience route ======================= */

.route {
  --route-inset: clamp(36px, 5vw, 72px);
  position: relative;
  padding-left: var(--route-inset);
}

.route-line {
  position: absolute;
  top: 12px;
  bottom: 0;
  left: 6px;
  width: 1px;
  background: var(--line-strong);
}

.route-line-fill {
  position: absolute;
  inset: 0;
  background: var(--rose);
  transform: scaleY(var(--route, 0));
  transform-origin: top center;
}

.stop {
  position: relative;
  padding-bottom: clamp(56px, 8vw, 112px);
}

.stop:last-child {
  padding-bottom: 0;
}

/* Waypoint: a diamond on the line that fills in as you arrive. */
.stop::before {
  content: "";
  position: absolute;
  top: 12px;
  left: calc(-1 * var(--route-inset) + 1px);
  width: 11px;
  height: 11px;
  border: 1.5px solid var(--rose);
  background: var(--paper);
  transform: rotate(45deg);
  transition: background-color var(--dur-medium) var(--ease-out) 300ms;
}

.stop.is-in::before {
  background: var(--rose);
}

.stop-inner {
  display: grid;
  grid-template-columns: minmax(160px, 3fr) minmax(0, 9fr);
  gap: clamp(20px, 4vw, 64px);
}

.stop-date {
  position: sticky;
  top: 112px;
  align-self: start;
  color: var(--rose);
  font-family: var(--font-display);
  font-size: clamp(1.375rem, 1rem + 1.4vw, 2.125rem);
  font-weight: 340;
  letter-spacing: -0.01em;
  line-height: 1.1;
}

.stop-body h3 {
  margin-bottom: 18px;
  font-size: clamp(1.625rem, 1.2rem + 1.8vw, 2.75rem);
  font-weight: 340;
}

.stop-body > p {
  max-width: 58ch;
  color: var(--plum);
  font-size: var(--text-lead);
}

.trait-list {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 28px;
  margin-top: 28px;
}

.trait-list li {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: var(--text-small);
  font-weight: 500;
}

.trait-list li::before {
  content: "";
  width: 5px;
  height: 5px;
  background: var(--rose);
  transform: rotate(45deg);
}

@media (max-width: 760px) {
  .stop-inner {
    grid-template-columns: 1fr;
  }

  .stop-date {
    position: static;
  }
}

/* ======================= Skills index ======================= */

.skill-index {
  border-top: 1px solid var(--ink);
}

.skill-row {
  position: relative;
  display: grid;
  grid-template-columns: 56px minmax(0, 5fr) minmax(0, 6fr);
  gap: 16px clamp(16px, 3vw, 48px);
  align-items: baseline;
  padding: clamp(24px, 3vw, 36px) clamp(8px, 1.4vw, 20px);
  border-bottom: 1px solid var(--line-strong);
  isolation: isolate;
}

/* Reading highlight: pink sweeps in behind the row under the pointer. */
.skill-row::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: var(--pink);
  transform: scaleX(0);
  transform-origin: left center;
  transition: transform var(--dur-medium) var(--ease-out);
}

.skill-num {
  color: var(--rose);
  font-family: var(--font-display);
  font-size: 1.125rem;
}

.skill-row h3 {
  font-size: clamp(1.5rem, 1.1rem + 1.6vw, 2.5rem);
  font-weight: 340;
  transition: transform var(--dur-medium) var(--ease-out);
}

.skill-row p {
  max-width: 40ch;
  color: var(--plum);
}

@media (hover: hover) {
  .skill-row:hover::before {
    transform: scaleX(1);
  }

  .skill-row:hover h3 {
    transform: translateX(10px);
  }
}

@media (max-width: 760px) {
  .skill-row {
    grid-template-columns: 36px minmax(0, 1fr);
  }

  .skill-row p {
    grid-column: 2;
  }
}

/* ======================= Qualities ======================= */

.qualities {
  padding-block: clamp(72px, 9vw, 140px);
}

.qualities-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.quality {
  padding-inline: clamp(20px, 3vw, 44px);
  border-left: 1px solid var(--line-strong);
}

.quality:first-child {
  padding-left: 0;
  border-left: 0;
}

.quality-num {
  display: block;
  color: var(--rose);
  font-family: var(--font-display);
  font-size: clamp(4rem, 2rem + 6vw, 8.5rem);
  font-weight: 250;
  letter-spacing: -0.05em;
  line-height: 0.9;
  font-variant-numeric: lining-nums;
}

.quality h3 {
  margin-top: clamp(20px, 3vw, 36px);
}

.quality p {
  max-width: 30ch;
  margin-top: 12px;
  color: var(--plum);
}

@media (max-width: 760px) {
  .qualities-grid {
    grid-template-columns: 1fr;
  }

  .quality,
  .quality:first-child {
    padding: 32px 0;
    border-left: 0;
    border-top: 1px solid var(--line-strong);
  }

  .quality:first-child {
    padding-top: 0;
    border-top: 0;
  }
}

/* ======================= HR guide ======================= */

.guide-grid {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: 48px clamp(16px, 2vw, 32px);
  align-items: start;
}

.guide-head {
  grid-column: 1 / 6;
  margin-bottom: 0;
}

.guide-card {
  grid-column: 7 / 13;
  border-radius: 32px 32px 32px 6px;
  padding: clamp(28px, 4vw, 48px);
  background: var(--mimi);
}

.guide-intro {
  display: flex;
  gap: 16px;
  align-items: flex-start;
}

.guide-status {
  flex: none;
  width: 10px;
  height: 10px;
  margin-top: 12px;
  background: var(--rose);
  transform: rotate(45deg);
}

.guide-intro h3 {
  margin-bottom: 12px;
}

.guide-intro p {
  color: var(--plum);
}

.guide-questions {
  display: grid;
  margin-top: clamp(28px, 4vw, 40px);
  border-bottom: 1px solid var(--line-strong);
}

.guide-questions button {
  display: flex;
  min-height: 56px;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  border: 0;
  border-top: 1px solid var(--line-strong);
  padding: 14px 4px;
  background: transparent;
  cursor: pointer;
  font-family: var(--font-display);
  font-size: clamp(1.125rem, 1rem + 0.6vw, 1.375rem);
  font-weight: 400;
  text-align: left;
}

.guide-questions button span {
  transition: transform var(--dur-short) var(--ease-out);
}

.guide-questions .icon-arrow {
  color: var(--rose);
}

@media (hover: hover) {
  .guide-questions button:hover span {
    transform: translateX(8px);
  }

  .guide-questions button:hover .icon-arrow {
    transform: translateX(4px);
  }
}

@media (max-width: 860px) {
  .guide-head,
  .guide-card {
    grid-column: 1 / -1;
  }
}

/* ======================= Contact ======================= */

.contact .section-label {
  margin-bottom: clamp(24px, 3vw, 36px);
}

.contact-title {
  max-width: 17ch;
  color: var(--mimi);
  font-size: clamp(2.5rem, 1.4rem + 4.6vw, 6.25rem);
  font-weight: 300;
}

.contact-links {
  display: grid;
  margin-top: clamp(56px, 7vw, 104px);
  border-bottom: 1px solid var(--line-on-night);
}

.contact-links a {
  display: flex;
  min-height: 64px;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  border-top: 1px solid var(--line-on-night);
  padding-block: clamp(20px, 3vw, 32px);
  color: var(--paper);
  font-family: var(--font-display);
  font-size: clamp(1.25rem, 0.8rem + 2.6vw, 3rem);
  font-weight: 340;
  letter-spacing: -0.015em;
  transition: color var(--dur-short) var(--ease-out);
}

.contact-links a span {
  min-width: 0;
  overflow-wrap: anywhere;
  transition: transform var(--dur-medium) var(--ease-out);
}

.contact-links .icon-arrow {
  width: 40px;
  height: 18px;
  color: var(--pink);
}

.contact-links a:focus-visible {
  outline-color: var(--pink);
}

@media (hover: hover) {
  .contact-links a:hover {
    color: var(--pink);
  }

  .contact-links a:hover span {
    transform: translateX(12px);
  }

  .contact-links a:hover .icon-arrow {
    transform: translateX(8px);
  }
}

.contact-signoff {
  --logo-size: clamp(88px, 12vw, 132px);
  --logo-shaft: 3.4;
  --logo-glyph: 4.6;
  --signal: var(--pink);
  display: flex;
  justify-content: center;
  margin-top: clamp(72px, 10vw, 140px);
}
