@font-face {
  font-family: "Outfit";
  src: url("fonts/Outfit-Regular.woff2") format("woff2");
  font-weight: 400;
  font-display: swap;
}
@font-face {
  font-family: "Outfit";
  src: url("fonts/Outfit-Medium.woff2") format("woff2");
  font-weight: 500;
  font-display: swap;
}
@font-face {
  font-family: "Instrument Serif";
  src: url("fonts/InstrumentSerif-Italic.woff2") format("woff2");
  font-style: italic;
  font-weight: 400;
  font-display: swap;
}

:root {
  color-scheme: light;
  --ink: #081a33;
  --ink-soft: #3d5270;
  --paper: #ffffff;
  --glow: #3fa2ff;
  --glow-soft: #9dd2ff;
  --tint: #e3f1ff;
  --action: #1268cf;
  --margin: 20px;
  --serif: "Instrument Serif", "Times New Roman", serif;
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
}

* { box-sizing: border-box; }

html {
  background: var(--paper);
  -webkit-text-size-adjust: 100%;
  -webkit-tap-highlight-color: transparent;
}

::selection { background: var(--glow); color: var(--ink); }

body {
  margin: 0;
  overflow-x: clip;
  color: var(--ink);
  font: 400 1rem/1.4 "Outfit", system-ui, -apple-system, "Segoe UI", sans-serif;
}

a { color: inherit; text-decoration: none; }

a:focus-visible {
  outline: 3px solid var(--ink);
  outline-offset: 3px;
}

em {
  font-family: var(--serif);
  font-style: italic;
  font-weight: 400;
}

/* ---------- Hero: the blue glow, the name, the portrait with its floating labels ---------- */

.hero {
  position: relative;
  display: flex;
  flex-direction: column;
  min-height: 100svh;
  padding: max(14px, env(safe-area-inset-top)) max(var(--margin), env(safe-area-inset-right)) max(20px, env(safe-area-inset-bottom)) max(var(--margin), env(safe-area-inset-left));
  overflow: clip;
  background: linear-gradient(to bottom, #eaf5ff 0, #cbe6ff 6%, #9ad0ff 14%, #6cbaff 22%, #4fabff 30%, var(--glow) 37%, var(--glow) 42%, #4dabff 48%, #72bdff 54%, #a3d4ff 62%, #cfe8ff 69%, #eef7ff 76%, #fff 82%);
}

.bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 6px 12px;
}

.wordmark {
  font: italic 400 1.3125rem/1.2 var(--serif);
  white-space: nowrap;
}

.place {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 5px 11px 5px 9px;
  border-radius: 999px;
  background: var(--paper);
  font-size: 0.8125rem;
  white-space: nowrap;
}

.place i {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--action);
}

.intro {
  container-type: inline-size;
  flex: none;
  margin-top: 8px;
  text-align: center;
}

h1 {
  margin: 0;
  font-size: min(calc(100cqi / 6.8), 11svh);
  font-weight: 500;
}

h1 span { display: block; white-space: nowrap; }

.hi {
  letter-spacing: -0.035em;
  line-height: 1.12;
}

.role {
  margin-top: 0.16em;
  font: italic 400 1.5em/1.12 var(--serif);
  letter-spacing: -0.02em;
}

/* The frame takes the height left over. Its foot tucks under the buttons only where the
   portrait has already faded out, so her crossed arms always stay in view. */
.portrait-frame {
  container-type: size;
  position: relative;
  flex: 1 1 0;
  min-height: 340px;
  margin: 4px 0 -24px;
}

.portrait {
  --w: min(100cqw, 67.7cqh);
  position: absolute;
  bottom: 0;
  left: calc(50cqw - var(--w) / 2);
  display: block;
  width: var(--w);
  height: auto;
  -webkit-mask-image: linear-gradient(to bottom, #000 88%, transparent 100%);
  mask-image: linear-gradient(to bottom, #000 88%, transparent 100%);
  pointer-events: none;
  user-select: none;
}

/* Labels floating off her hair and shoulders: clear of her face and her hands. */
.chips {
  margin: 0;
  padding: 0;
  list-style: none;
}

.chips li {
  --w: min(100cqw, 67.7cqh);
  --top: calc(100cqh - var(--w) * 1.477);
  position: absolute;
  padding: 7px 13px 8px;
  border-radius: 999px;
  background: var(--paper);
  box-shadow: 0 6px 18px rgb(8 26 51 / 0.16);
  font-size: 0.875rem;
  font-weight: 500;
  line-height: 1.2;
  white-space: nowrap;
}

.chip-a { top: calc(var(--top) + var(--w) * 0.36); left: 0; rotate: -5deg; }
.chip-b { top: calc(var(--top) + var(--w) * 0.56); right: 0; rotate: 4deg; }
.chip-c { top: calc(var(--top) + var(--w) * 0.8); left: 2px; rotate: 3deg; }

.actions {
  container-type: inline-size;
  position: relative;
  z-index: 1;
  flex: none;
  display: grid;
  gap: 8px;
  width: 100%;
  max-width: 560px;
  margin: 8px auto 0;
}

.pill {
  display: flex;
  align-items: center;
  gap: 10px;
  border-radius: 999px;
  transition: transform 260ms var(--ease-out), background-color 160ms ease-out;
}

.pill-ink, .pill-paper {
  min-height: 56px;
  padding: 6px 18px 6px 6px;
}

.pill-paper { padding-right: 14px; }

.pill-ink { background: var(--ink); color: var(--paper); }

.pill-paper {
  background: var(--paper);
  box-shadow: 0 8px 24px rgb(8 26 51 / 0.14);
}

.badge {
  flex: none;
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--paper);
}

.pill-paper .badge { background: var(--tint); }

.badge svg {
  width: 22px;
  height: 22px;
  fill: var(--ink);
}

.pill-text {
  flex: 1;
  min-width: 0;
  font-size: 1.0625rem;
  font-weight: 500;
  line-height: 1.2;
}

.pill-text small {
  display: block;
  font-size: 0.8125rem;
  font-weight: 400;
}

.email {
  display: block;
  font-size: min(calc((100cqi - 70px) / 17.4), 1.0625rem);
  white-space: nowrap;
}

.arrow {
  flex: none;
  width: 16px;
  height: 16px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.75;
  transition: transform 260ms var(--ease-out);
}

/* Press lands on touch-down and lets go slowly. */
.pill:active { transform: scale(0.97); transition-duration: 80ms, 0ms; }

/* ---------- The CV: two sheets fanned over a second glow, buttons clear beneath ---------- */

.pages {
  container-type: inline-size;
  position: relative;
  padding: 48px var(--margin) 52px;
  overflow: clip;
  text-align: center;
  background:
    radial-gradient(72% 44% at 50% 56%, var(--glow-soft), rgb(157 210 255 / 0)),
    var(--paper);
}

h2 {
  margin: 0;
  font-size: min(calc(100cqi / 9.4), 4.5rem);
  font-weight: 500;
  letter-spacing: -0.03em;
  line-height: 1.12;
}

h2 em {
  display: block;
  font-size: 1.2em;
  letter-spacing: -0.015em;
  line-height: 1.1;
}

.swoop {
  position: absolute;
  top: 128px;
  right: 7%;
  width: 56px;
  height: 42px;
  fill: none;
  stroke: var(--action);
  stroke-width: 3.5;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.fan {
  position: relative;
  width: min(66cqi, 400px);
  aspect-ratio: 900 / 1273;
  margin: 60px auto 34px;
}

.page {
  position: absolute;
  inset: 0;
  display: block;
  background: var(--paper);
  box-shadow: 0 18px 44px rgb(8 26 51 / 0.2);
  transform: translateX(var(--x)) translateY(var(--y, 0)) rotate(var(--r));
}

.page img {
  display: block;
  width: 100%;
  height: auto;
}

.page-en { --x: -15%; --r: -5deg; }
.page-fr { --x: 17%; --y: 3%; --r: 6deg; }

.page-tags {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  max-width: 420px;
  margin-inline: auto;
}

.page-tag {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 50px;
  padding: 0 14px;
  border-radius: 999px;
  background: var(--ink);
  color: var(--paper);
  font-weight: 500;
  white-space: nowrap;
  transition: transform 260ms var(--ease-out);
}

.page-tag:active { transform: scale(0.97); transition-duration: 80ms; }

/* ---------- The close: her name, as large as the page allows ---------- */

.close {
  container-type: inline-size;
  padding: 36px var(--margin) max(20px, env(safe-area-inset-bottom));
  overflow: clip;
  background: var(--paper);
}

.talk {
  margin: 0;
  font-size: min(calc(100cqi / 10.5), 4.5rem);
  font-weight: 500;
  letter-spacing: -0.03em;
  line-height: 1.12;
  white-space: nowrap;
}

.talk em { font-size: 1.1em; letter-spacing: -0.015em; }

.close-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0 20px;
  margin: 6px 0 16px;
  color: var(--ink-soft);
}

.close-links a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  text-decoration: underline;
  text-decoration-color: var(--glow);
  text-decoration-thickness: 2px;
  text-underline-offset: 4px;
  overflow-wrap: anywhere;
}

.giant {
  margin: 0;
  color: var(--action);
  font-family: var(--serif);
  font-style: italic;
  letter-spacing: -0.02em;
  white-space: nowrap;
}

.giant span { display: block; }
.giant span:first-child { font-size: calc(100cqi / 2.56); line-height: 1.36; }
.giant span:last-child { font-size: calc(100cqi / 5.32); line-height: 1.2; }

/* ---------- Motion: one short arrival, then the sheets open as you reach them ---------- */

@media (prefers-reduced-motion: no-preference) {
  .hi, .role, .actions > * { animation: rise 460ms var(--ease-out) both; }
  .role { animation-delay: 40ms; }
  .actions > :nth-child(1) { animation-delay: 110ms; }
  .actions > :nth-child(2) { animation-delay: 140ms; }

  .portrait { animation: portrait-in 680ms var(--ease-out) 40ms both; }

  .chips li { animation: chip-in 480ms var(--ease-out) both; }
  .chip-a { animation-delay: 240ms; }
  .chip-b { animation-delay: 290ms; }
  .chip-c { animation-delay: 340ms; }

  /* Only the tilt changes, so neither sheet is ever covered by the other more than at rest. */
  @supports (animation-timeline: view()) {
    .page { animation: fan-open linear both; animation-timeline: view(); animation-range: entry 5% cover 42%; }
  }
}

@keyframes rise {
  from { opacity: 0; transform: translateY(12px); }
  to { opacity: 1; transform: none; }
}

@keyframes portrait-in {
  from { opacity: 0; transform: translateY(18px); }
  to { opacity: 1; transform: none; }
}

@keyframes chip-in {
  from { opacity: 0; scale: 0.8; }
  to { opacity: 1; scale: 1; }
}

@keyframes fan-open {
  from { transform: translateX(var(--x)) translateY(var(--y, 0)) rotate(0deg); }
  to { transform: translateX(var(--x)) translateY(var(--y, 0)) rotate(var(--r)); }
}

@media (hover: hover) {
  .pill:hover .arrow-out { transform: translate(2px, -2px); }
  .page-tag:hover .arrow { transform: translateY(2px); }
}

/* The narrowest phones give the icon's room to the email address. */
@media (max-width: 359px) {
  .place { display: none; }
  .badge { display: none; }
  .pill-ink, .pill-paper { padding-left: 18px; }
  .email { font-size: calc((100cqi - 36px) / 17.4); }
}

/* ---------- Tablet: more room, same order ---------- */

@media (min-width: 700px) {
  :root { --margin: 32px; }
  .wordmark { font-size: 1.625rem; }
  .place { padding: 7px 15px 7px 12px; font-size: 0.9375rem; }
  .chips li { padding: 9px 17px 10px; font-size: 1rem; }
  .pages { padding-block: 72px 80px; }
  .swoop { top: 176px; right: 6%; width: 88px; height: 66px; }
  .fan { margin-top: 80px; }
  .close-links { font-size: 1.125rem; }

  /* With side room to spare, the labels stay close to her instead of drifting to the margins. */
  .chip-a { left: calc(50cqw - var(--w) * 0.74); }
  .chip-b { right: calc(50cqw - var(--w) * 0.72); }
  .chip-c { left: calc(50cqw - var(--w) * 0.84); }
}

/* ---------- Wide screens: portrait in the middle, labels left, actions right ---------- */

@media (min-width: 1000px) and (min-aspect-ratio: 1/1) {
  :root { --margin: 40px; }

  .hero { min-height: max(100svh, 760px); padding-top: 22px; padding-bottom: 36px; }

  h1 { font-size: min(calc(100cqi / 13.5), 10svh); }
  .role { margin-top: 0.08em; }

  .portrait-frame { min-height: 0; margin: 8px 0 -36px; }
  .portrait { --w: min(46cqw, 67.7cqh); }

  .chips li { --w: min(46cqw, 67.7cqh); padding: 11px 20px 12px; font-size: 1.125rem; }
  .chip-a { top: 16%; left: 17cqw; right: auto; }
  .chip-b { top: 44%; left: 7cqw; right: auto; }
  .chip-c { top: 72%; left: 15cqw; right: auto; }

  .actions {
    position: absolute;
    right: var(--margin);
    bottom: 36px;
    width: min(28vw, 410px);
    margin: 0;
  }

  .fan { width: min(29cqi, 430px); margin-block: 72px 44px; }
  .page-en { --x: -50%; }
  .page-fr { --x: 50%; --y: 2%; --r: 5deg; }
  .swoop { top: 150px; right: calc(50% - 480px); }
  .page-tags { max-width: 520px; }

  .giant span { display: inline; }
  .giant { font-size: calc(100cqi / 8); line-height: 1.2; }
  .giant span:first-child, .giant span:last-child { font-size: 1em; line-height: inherit; }
}

@media (prefers-reduced-motion: reduce) {
  .pill, .arrow, .page-tag { transition-duration: 0ms; }
  .pill:active, .page-tag:active { transform: none; }
}

@media (prefers-contrast: more) {
  :root { --ink-soft: var(--ink); --tint: #ffffff; }
  .pill-paper, .place, .chips li { outline: 1px solid var(--ink); }
}
