@font-face {
  font-family: Manrope;
  src: url("./assets/fonts/Manrope-Variable.ttf") format("truetype");
  font-style: normal;
  font-weight: 200 800;
  font-display: swap;
}

:root {
  color-scheme: dark;
  --color-paper: #f8f5ed;
  --color-ink: #11110f;
  --color-muted: #575550;
  --color-rule: #d7d4cd;
  --color-marker: var(--color-spotify-marker);
  --color-spotify-marker: var(--color-acid);
  --color-marker-ink: #11110f;
  --color-lavender: #e2d1ff;
  --color-orange: #ff7626;
  --color-coral: #ff9279;
  --color-violet: #aa91ff;
  --color-acid: #d8ff00;
  --color-instagram-marker: #e84a8a;
  --color-youtube-marker: #ff5a4e;
  --color-github-marker: #e6edf3;
  --font-sans: Manrope, Arial, sans-serif;
  --font-mono: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
  --type-display-weight: 400;
  --type-display-tracking: -0.055em;
  --type-display-leading: 0.93;
  --space-1: 0.5rem;
  --space-2: 1rem;
  --space-3: 1.5rem;
  --space-4: 2rem;
  --space-5: 3rem;
  --space-6: 4rem;
  --page-gutter: clamp(1.25rem, 4vw, 10rem);
  --page-padding-top: clamp(1.5rem, 3svh, 3rem);
  --page-padding-bottom: clamp(1rem, 2svh, 2.5rem);
  --layout-gap: clamp(2rem, 4vw, 10rem);
  /* Preserve the approved wide-screen ratios from 2560 CSS px upward.
     Below that point, a rem contribution keeps secondary text readable. */
  --type-support-unit: max(1vw, calc(0.75rem + 0.53125vw));
  --type-meta: clamp(0.8125rem, calc(var(--type-support-unit) * 0.7), 2.5rem);
  --type-control: clamp(0.875rem, calc(var(--type-support-unit) * 0.75), 3rem);
  --type-description: clamp(1.5rem, calc(var(--type-support-unit) * 1.7), 6rem);
  --type-body: clamp(1.125rem, calc(var(--type-support-unit) * 1.05), 3.5rem);
  --duration: 140ms;
  --photo-position: 50% 50%;
  --photo-ratio: 0.5617597293;
  --paper-grain-opacity: 0.035;
  --video-grain-opacity: 0.065;
  --background-video-opacity: 1;
  --background-video-shade: 0.2;
  --background-vignette-strength: 0.18;
  --description-marker-opacity: 95%;
  --hover-exit-delay: 33ms;
  font-family: var(--font-sans);
  color: var(--color-ink);
  background: #151511;
  font-synthesis: none;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

*, *::before, *::after { box-sizing: border-box; }
html { scrollbar-gutter: stable; }
html:has(body.has-video-backdrop) { color-scheme: dark; background: #151511; scrollbar-color: #8b8781 #151511; }
body { margin: 0; isolation: isolate; }
body::before { content: ""; position: fixed; inset: 0; z-index: -1; pointer-events: none; background-image: url("./assets/paper-grain.svg"); background-size: 180px 180px; opacity: var(--paper-grain-opacity); mix-blend-mode: soft-light; }
.background-poster, .background-video { position: fixed; inset: 0; width: 100%; height: 100%; object-fit: cover; pointer-events: none; }
.background-poster { z-index: -3; }
.background-video { z-index: -2; opacity: 0; transition: opacity 240ms ease-in-out; }
body.has-video-backdrop { --color-ink: #f8f5ed; --color-muted: #e5e1d8; --color-rule: #8b8781; --paper-grain-opacity: var(--video-grain-opacity); color: var(--color-ink); }
.has-video-backdrop::after { content: ""; position: fixed; inset: 0; z-index: -1; background: radial-gradient(ellipse at center, transparent 48%, rgb(0 0 0 / var(--background-vignette-strength)) 100%), rgb(0 0 0 / var(--background-video-shade)); pointer-events: none; }
/* Cover the expanded Safari viewport without resizing the composition as its
   toolbar opens and closes. All backdrop layers keep the same extent. */
.background-poster, .background-video, body::before, .has-video-backdrop::after { min-height: 100lvh; }
.has-video-backdrop .background-video.is-playing { opacity: var(--background-video-opacity); }
button, a { -webkit-tap-highlight-color: transparent; }
button { font: inherit; }
button, p, h1, figure { margin: 0; }
[hidden] { display: none !important; }
::selection { color: var(--color-marker-ink); background: var(--color-orange); }

.page {
  min-height: 100svh;
  padding: var(--page-padding-top) var(--page-gutter) var(--page-padding-bottom);
  padding-top: calc(var(--page-padding-top) + env(safe-area-inset-top, 0px));
  padding-right: max(var(--page-gutter), env(safe-area-inset-right, 0px));
  padding-bottom: calc(var(--page-padding-bottom) + env(safe-area-inset-bottom, 0px));
  padding-left: max(var(--page-gutter), env(safe-area-inset-left, 0px));
  display: flex;
  flex-direction: column;
}

.masthead { display: flex; justify-content: end; align-items: start; }
.masthead .video-credit { --service-marker: var(--color-youtube-marker); display: block; width: max-content; max-width: 100%; padding: 0; font: 400 var(--type-meta)/1.5 var(--font-sans); letter-spacing: 0; text-transform: none; text-align: right; }
.video-credit-first-line { display: block; letter-spacing: -0.01em; }
.video-credit-title { font-weight: 500; }
.masthead .video-credit-artist { display: inline; white-space: nowrap; }
.masthead .video-credit::before { content: none; }
.video-credit .credit-line { -webkit-box-decoration-break: clone; box-decoration-break: clone; transition: background-color var(--duration) ease; }
.video-credit-production > .credit-line { justify-self: end; max-width: 100%; }
.masthead .video-credit:focus-visible { outline: none; }
.video-credit:focus-visible .credit-line { background-color: var(--service-marker); outline: 1px solid var(--color-ink); outline-offset: 3px; }
@media (hover: hover) { .video-credit:hover .credit-line { background-color: var(--service-marker); } }
.language { display: flex; align-items: center; gap: 0.125rem; flex: none; }
.language-button, .background-toggle { min-width: max(44px, 2.75em); min-height: max(44px, 2.75em); display: inline-grid; place-items: center; }

/* Shared marker shape; services select the closest accent from the identity. */
.marker {
  position: relative;
  isolation: isolate;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 0;
  border-radius: 0;
  padding: 0.375rem 0.25rem;
  background: transparent;
  color: var(--color-muted);
  font-size: var(--type-control);
  font-weight: 400;
  line-height: 1.4;
  letter-spacing: 0.025em;
  text-decoration: none;
  text-transform: uppercase;
  cursor: pointer;
  transition: color var(--duration) ease;
}
.marker::before {
  content: "";
  position: absolute;
  z-index: -1;
  inset: 0.625rem 0;
  background: var(--service-marker, var(--color-marker));
  opacity: 0;
  transition: opacity var(--duration) ease;
}
.language-button::before, .background-toggle::before { inset: 0.625rem 0.25rem; }
.marker[aria-pressed="true"] { color: var(--color-marker-ink); }
.marker[aria-pressed="true"]::before, .marker:focus-visible::before { opacity: 1; }
.marker:focus-visible { color: var(--color-marker-ink); outline: 1px solid var(--color-ink); outline-offset: 3px; }
@media (hover: hover) {
  .marker:hover { color: var(--color-marker-ink); }
  .marker:hover::before { opacity: 1; }
}

.composition {
  flex: 1;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  align-items: center;
  gap: var(--layout-gap);
  padding-block: clamp(2rem, 5svh, 6rem);
}
.introduction { position: relative; z-index: 2; min-width: 0; container-type: inline-size; }
.name {
  position: relative;
  isolation: isolate;
  font-size: max(2rem, min(13.4vw, 22svh));
  font-size: max(2rem, min(20.7cqi, 22svh));
  font-weight: var(--type-display-weight);
  line-height: var(--type-display-leading);
  letter-spacing: var(--type-display-tracking);
}
.name { background-repeat: no-repeat; }
.name-line { display: block; position: relative; }
.name-line:first-child { z-index: 2; }
.name-line:last-child { z-index: 1; }
.name.has-custom-selection::selection, .name.has-custom-selection .name-line::selection { color: var(--color-marker-ink); background: transparent; }
.stable-copy { display: grid; }
.stable-copy > * { grid-area: 1 / 1; min-width: 0; }
.translation-reserve { visibility: hidden; pointer-events: none; user-select: none; }
.details { margin-top: clamp(2.5rem, 5svh, 6rem); }
.description { max-width: 26.5em; font-size: var(--type-description); line-height: 1.5; letter-spacing: -0.025em; text-wrap: wrap; }
/* Opaque line fragments overlap before their shared alpha is composited.
   This closes fractional-pixel seams without darkening the joins or the text. */
.description-current { align-self: start; display: grid; }
.description-current > * { grid-area: 1 / 1; min-width: 0; }
.description-marker { opacity: var(--description-marker-opacity); pointer-events: none; user-select: none; }
.description-marker > span { color: transparent; background: var(--color-marker); padding-block: calc(0.067em + 1px); -webkit-box-decoration-break: clone; box-decoration-break: clone; }
.description-text { position: relative; color: var(--color-marker-ink); opacity: 1; }
.invitation { margin-top: clamp(1.5rem, 2.2svh, 3rem); }
.invitation-copy { max-width: 38em; color: var(--color-muted); font-size: var(--type-body); line-height: 1.65; text-wrap: pretty; }
.inline-link { display: inline; padding: 0; font: inherit; letter-spacing: inherit; text-transform: none; white-space: nowrap; -webkit-box-decoration-break: clone; box-decoration-break: clone; transition: color var(--duration) ease, background-color var(--duration) ease; }
.inline-link::before { content: none; }
.inline-link:focus-visible { background-color: var(--service-marker, var(--color-marker)); }
@media (hover: hover) { .inline-link:hover { background-color: var(--service-marker, var(--color-marker)); } }
.contact { min-width: 0; }
.copy-email, .email-link { --service-marker: var(--color-lavender); min-height: max(44px, 2.75em); font-size: var(--type-control); }
.copy-email { display: inline-flex; justify-content: start; }
.email-default { transition: opacity var(--duration) ease; }
.copy-feedback { opacity: 0; pointer-events: none; isolation: isolate; transition: opacity var(--duration) ease; position: absolute; inset: 0; padding: inherit; display: flex; align-items: center; justify-content: center; width: max(100%, 9ch); }
.copy-feedback::before { content: ""; position: absolute; inset: 0.625rem 0; z-index: -1; background: var(--service-marker, var(--color-marker)); }
.copy-email[data-copied="true"] { color: var(--color-marker-ink); }
.copy-email[data-copied="true"] .email-default { opacity: 0; }
.copy-email[data-copied="true"] .copy-feedback { opacity: 1; pointer-events: auto; }
.copy-email[data-copied="true"]::before { opacity: 0; }
.copy-error { max-width: 30em; margin-top: var(--space-1); color: var(--color-muted); font-size: 0.875rem; line-height: 1.6; }
.selectable-email { display: block; width: fit-content; color: var(--color-ink); user-select: all; }
.selectable-email:focus-visible { color: var(--color-marker-ink); outline: 1px solid var(--color-ink); outline-offset: 3px; background: var(--color-marker); }

.composition.has-photo { grid-template-columns: minmax(0, 1.9fr) minmax(0, 1fr); }
.performance { align-self: center; justify-self: center; width: min(100%, calc(72svh * var(--photo-ratio))); }
.performance-image { display: block; width: 100%; height: auto; object-fit: contain; object-position: var(--photo-position); }
.performance.is-movable { position: relative; z-index: 1; outline: none; user-select: none; -webkit-user-select: none; }
.performance.is-movable::after { content: ""; position: absolute; inset-inline-start: 0; bottom: -8px; width: 32px; height: 2px; background: var(--color-ink); opacity: 0; pointer-events: none; }
.performance.is-movable:focus-visible::after { opacity: 1; }
.performance.is-dragging { will-change: transform; }
@media (any-pointer: fine) {
  .performance.is-movable { cursor: grab; }
  .performance.is-dragging { cursor: grabbing; }
}

.footer { padding-top: var(--space-3); border-top: 1px solid var(--color-rule); display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: end; gap: var(--space-4); }
.footer-links { min-width: 0; display: flex; flex-wrap: wrap; align-items: start; gap: var(--space-1) clamp(1rem, 1.5vw, 3rem); }
.footer .language { justify-self: end; }
.footer-actions { display: flex; flex-wrap: wrap; align-items: center; justify-content: end; gap: clamp(0.25rem, 1vw, 1rem); }
.footer-actions .language { margin-inline-start: auto; }
.background-toggle svg { width: 1.25em; height: 1.25em; }
.background-toggle[data-playing="true"] .icon-play, .background-toggle[data-playing="false"] .icon-pause { display: none; }
.footer-links .marker, .unconfirmed-profile { font-size: var(--type-control); letter-spacing: 0.035em; line-height: 1.4; }
.footer-links .marker { min-height: max(44px, 2.75em); margin-inline-start: -0.25rem; }
.footer-links .marker::before { inset-block: 0.625rem; }
.unconfirmed-profile { color: var(--color-muted); text-transform: uppercase; padding-inline: 0.25rem; }
.footer-links .unconfirmed-profile { min-height: 44px; display: inline-flex; align-items: center; }
[data-social="instagram"] { --service-marker: var(--color-instagram-marker); }
[data-social="youtube"] { --service-marker: var(--color-youtube-marker); }
[data-social="spotify"] { --service-marker: var(--color-spotify-marker); }
[data-social="linktree"] { --service-marker: var(--color-acid); }
[data-social="github"] { --service-marker: var(--color-github-marker); }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; border: 0; }

@media (min-width: 1600px) { .composition.has-photo { grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); } }
@media (min-width: 1101px) { .performance { translate: -3vw 0; } }
@media (max-width: 1100px) {
  .composition.has-photo { grid-template-columns: minmax(0, 1.7fr) minmax(0, 1fr); }
  .details { margin-top: var(--space-5); }
}
@media (min-width: 761px) and (max-height: 800px) {
  .composition { padding-block: clamp(1rem, 3svh, 2rem); }
  .name { font-size: max(2rem, min(20.7cqi, 20svh)); }
  .details { margin-top: clamp(1.5rem, 4svh, 2.5rem); }
}
@media (max-width: 760px) {
  .page { --page-padding-top: var(--space-3); }
  .composition, .composition.has-photo { grid-template-columns: minmax(0, 1fr); gap: var(--space-5); padding-block: var(--space-6) var(--space-5); }
  .name { font-size: max(2rem, 20.7cqi); }
  .details { margin-top: var(--space-5); }
  .invitation { margin-top: var(--space-3); }
  .performance { max-width: 28rem; width: 100%; justify-self: center; }
  .performance-image { width: 100%; max-height: none; }
  .footer { grid-template-columns: minmax(0, 1fr); gap: var(--space-2); }
  .footer-actions, .footer-links { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); column-gap: var(--space-2); }
  .footer-actions .background-toggle { justify-self: start; margin-inline-start: -0.25rem; }
  .footer-actions .language { grid-column: 2 / -1; margin-inline-start: 0; justify-self: end; }
  .footer-links > * { justify-self: start; }
  .footer-links > :nth-child(3n + 2) { justify-self: center; }
  .footer-links > :nth-child(3n) { justify-self: end; }
  .footer-links .marker { margin-inline: -0.25rem; }
}
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { transition: none !important; scroll-behavior: auto !important; } }
@media (forced-colors: active) { .marker:focus-visible { outline: 2px solid Highlight; } .marker[aria-pressed="true"] { outline: 1px solid ButtonText; } }

/* Link labels stay together; the surrounding sentence wraps as normal prose. */
.invitation-contact { display: inline; }
/* Entry stays immediate; brief pointer exits retain the current marker. */
@media (hover: hover) {
  .marker, .marker::before, .video-credit .credit-line { transition-delay: var(--hover-exit-delay); }
  .marker:hover, .marker:hover::before, .video-credit:hover .credit-line,
  .marker:focus-visible, .marker:focus-visible::before, .video-credit:focus-visible .credit-line { transition-delay: 0s; transition-duration: 0s; }
}
