/* ============================================================
   Toma Strelčiūnė — portfolio
   A sibling of strelciunas.lt: same build and the same Apple HIG
   discipline (glass only on the functional layer, opaque content,
   every setting respected), with its own voice:
     · warm paper and ink instead of pure white and black
     · Newsreader, a serif, for display type
     · a rose accent, used for interactive things only
     · the signature: the career written on a five-line staff
   Contrast ratios beside colours are WCAG, measured.
   ============================================================ */

@font-face {
  font-family: "Newsreader";
  src: url("fonts/newsreader-latin.woff2?v=20260929-1") format("woff2");
  font-weight: 200 800;
  font-style: normal;
  font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Newsreader";
  src: url("fonts/newsreader-latin-ext.woff2?v=20260929-1") format("woff2");
  font-weight: 200 800;
  font-style: normal;
  font-display: swap;
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: "Newsreader";
  src: url("fonts/newsreader-italic-latin.woff2?v=20260929-1") format("woff2");
  font-weight: 200 800;
  font-style: italic;
  font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Newsreader";
  src: url("fonts/newsreader-italic-latin-ext.woff2?v=20260929-1") format("woff2");
  font-weight: 200 800;
  font-style: italic;
  font-display: swap;
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

/* ---------- Dark appearance (default) ---------- */
:root {
  color-scheme: dark;

  --bg:          #0c0a09;
  --surface:     #1c1917;
  --surface-2:   #2a2522;
  --hairline:    rgba(255,246,240,0.10);
  --hairline-2:  rgba(255,246,240,0.18);
  --track:       rgba(255,246,240,0.06);
  --staff:       rgba(255,246,240,0.22);

  --text:        #f6f1ec;   /* 17.60:1 on bg · 15.58:1 on surface */
  --text-2:      #aea49b;   /*  8.07:1 on bg ·  7.15:1 on surface */
  --chip-text:   #aea49b;   /*  6.19:1 on surface-2               */

  --accent:      #ff7a9a;   /*  8.00:1 on bg ·  7.08:1 on surface */
  --accent-fill: #c8325e;   /* white label on it = 5.15:1         */
  --accent-press:#b02a52;   /* white on it 6.37:1                 */
  --accent-hi:   #ff9ab2;

  --live:        #30d158;
  --ink:         #8a8078;   /* note heads and beams, 4.9:1 on bg  */

  --glass-bg:     rgba(40, 34, 31, 0.52);
  --glass-edge:   rgba(255,246,240,0.12);
  --glass-hi:     rgba(255,246,240,0.16);
  --glass-shadow: 0 10px 36px rgba(0,0,0,0.45);
  --glass-solid:  #1c1917;
  --material-bg:  rgba(28, 25, 23, 0.72);

  --glow-1: rgba(255, 106, 145, 0.26);
  --glow-2: rgba(255, 176, 92, 0.18);
  --glow-3: rgba(168, 120, 255, 0.16);

  --font: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", Roboto,
          "Helvetica Neue", Helvetica, Arial, sans-serif;
  --serif: "Newsreader", "New York", ui-serif, "Iowan Old Style", Georgia, serif;

  --maxw: 980px;
  --gutter: 22px;
  --r-card: 18px;
  --r-panel: 30px;
  --r-pill: 980px;
  --nav-h: 52px;
  --nav-top: calc(env(safe-area-inset-top, 0px) + 12px);

  --gap: 44px;              /* staff space */
  --clef-w: 118px;
}

/* ---------- Light appearance: warm paper ---------- */
@media (prefers-color-scheme: light) {
  :root:not([data-theme="dark"]) {
    color-scheme: light;
    --bg:          #faf7f2;
    --surface:     #ffffff;
    --surface-2:   #efe9e1;
    --hairline:    rgba(60,40,30,0.10);
    --hairline-2:  rgba(60,40,30,0.18);
    --track:       rgba(60,40,30,0.06);
    --staff:       rgba(60,40,30,0.24);
    --text:        #1f1a17;   /* 16.13:1 on bg */
    --text-2:      #6d635b;   /*  5.48:1 on bg · 4.86:1 on surface-2 */
    --chip-text:   #6d635b;
    --accent:      #b0264f;   /*  6.07:1 on bg */
    --accent-fill: #b0264f;   /* white on it 6.49:1 */
    --accent-press:#971f43;
    --accent-hi:   #c22d5a;
    --live:        #34c759;
    --ink:         #857a71;   /*  4.1:1 on bg */
    --glass-bg:     rgba(255,253,250,0.58);
    --glass-edge:   rgba(60,40,30,0.08);
    --glass-hi:     rgba(255,255,255,0.9);
    --glass-shadow: 0 10px 34px rgba(60,30,20,0.10);
    --glass-solid:  #ffffff;
    --material-bg:  rgba(255, 253, 250, 0.72);
    --glow-1: rgba(222, 72, 118, 0.17);
    --glow-2: rgba(240, 150, 60, 0.16);
    --glow-3: rgba(140, 100, 230, 0.12);
  }
}
:root[data-theme="light"] {
  color-scheme: light;
  --bg:          #faf7f2;
  --surface:     #ffffff;
  --surface-2:   #efe9e1;
  --hairline:    rgba(60,40,30,0.10);
  --hairline-2:  rgba(60,40,30,0.18);
  --track:       rgba(60,40,30,0.06);
  --staff:       rgba(60,40,30,0.24);
  --text:        #1f1a17;
  --text-2:      #6d635b;
  --chip-text:   #6d635b;
  --accent:      #b0264f;
  --accent-fill: #b0264f;
  --accent-press:#971f43;
  --accent-hi:   #c22d5a;
  --live:        #34c759;
  --ink:         #857a71;
  --glass-bg:     rgba(255,253,250,0.58);
  --glass-edge:   rgba(60,40,30,0.08);
  --glass-hi:     rgba(255,255,255,0.9);
  --glass-shadow: 0 10px 34px rgba(60,30,20,0.10);
  --glass-solid:  #ffffff;
  --material-bg:  rgba(255, 253, 250, 0.72);
  --glow-1: rgba(222, 72, 118, 0.17);
  --glow-2: rgba(240, 150, 60, 0.16);
  --glow-3: rgba(140, 100, 230, 0.12);
}

/* ---------- Reset & base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 17px;
  line-height: 1.55;
  letter-spacing: -0.01em;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

a { color: inherit; text-decoration: none; }
b { font-weight: 600; }
ul, ol { margin: 0; padding: 0; list-style: none; }
h1, h2, h3 { margin: 0; font-weight: 600; letter-spacing: -0.02em; }
p, blockquote { margin: 0; }
figure { margin: 0; }

::selection { background: var(--accent-fill); color: #fff; }

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 6px;
}
.button:focus-visible,
.link-chevron:focus-visible,
.theme-toggle:focus-visible,
.lang-switch:focus-visible,
.skip:focus-visible { border-radius: var(--r-pill); }

.wrap {
  max-width: var(--maxw);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

section[id] { scroll-margin-top: calc(var(--nav-top) + var(--nav-h) + 12px); }
.role[id]   { scroll-margin-top: calc(var(--nav-top) + var(--nav-h) + 12px); }

.skip {
  position: absolute;
  left: 50%;
  top: 8px;
  transform: translate(-50%, -200%);
  z-index: 100;
  padding: 10px 18px;
  background: var(--surface);
  border: 1px solid var(--hairline-2);
  border-radius: var(--r-pill);
  font-size: 15px;
  font-weight: 500;
}
.skip:focus { transform: translate(-50%, 0); }

/* ============================================================
   Glass — functional layer only (nav, the CV button)
   ============================================================ */
.glass {
  background: var(--glass-bg);
  -webkit-backdrop-filter: blur(22px) saturate(1.8);
  backdrop-filter: blur(22px) saturate(1.8);
  border: 1px solid var(--glass-edge);
  box-shadow: inset 0 1px 0 var(--glass-hi), var(--glass-shadow);
}
.material {
  background: var(--material-bg);
  -webkit-backdrop-filter: blur(30px) saturate(1.2);
  backdrop-filter: blur(30px) saturate(1.2);
  border: 1px solid var(--hairline);
}
@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
  .glass, .material { background: var(--glass-solid); }
}

/* Soft colour fields behind the hero and the contact panel */
.hero, .section-contact { position: relative; isolation: isolate; overflow: clip; }
.hero::before,
.section-contact::before {
  content: "";
  position: absolute;
  z-index: -1;
  pointer-events: none;
  filter: blur(30px);
}
.hero::before {
  inset: -10% -10% 0;
  background:
    radial-gradient(40% 46% at 80% 22%, var(--glow-1), transparent 70%),
    radial-gradient(34% 40% at 20% 10%, var(--glow-2), transparent 70%),
    radial-gradient(30% 36% at 55% 80%, var(--glow-3), transparent 72%);
}
.section-contact::before {
  inset: 10% 0 0;
  background:
    radial-gradient(34% 50% at 24% 58%, var(--glow-2), transparent 70%),
    radial-gradient(36% 52% at 78% 40%, var(--glow-1), transparent 70%);
}

/* ---------- Floating capsule nav ---------- */
.chrome {
  position: fixed;
  top: var(--nav-top);
  left: 0;
  right: 0;
  z-index: 50;
  padding-inline: 12px;
  pointer-events: none;
}
.bar {
  pointer-events: auto;
  display: flex;
  align-items: center;
  gap: 12px;
  max-width: calc(var(--maxw) - 2 * var(--gutter));
  margin-inline: auto;
  padding: 0 6px 0 20px;
  height: var(--nav-h);
  border-radius: var(--r-pill);
  transition: box-shadow 0.35s ease, background-color 0.35s ease;
}
.chrome.is-scrolled .bar { --glass-shadow: 0 12px 40px rgba(0,0,0,0.28); }

/* Scroll edge: content fades where it meets the bar */
.chrome::before {
  content: "";
  position: absolute;
  z-index: -1;
  left: 0;
  right: 0;
  top: calc(-1 * var(--nav-top));
  height: calc(var(--nav-top) + var(--nav-h) + 22px);
  background: linear-gradient(to bottom, var(--bg) 20%, transparent);
  opacity: 0;
  transition: opacity 0.3s ease;
  pointer-events: none;
}
.chrome.is-scrolled::before { opacity: 0.85; }

.mark {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding-inline: 2px;
  font-family: var(--serif);
  font-size: 19px;
  font-weight: 560;
  font-style: italic;
  letter-spacing: 0.01em;
  flex: none;
}

.bar-links {
  position: relative;
  isolation: isolate;
  display: flex;
  align-items: center;
  gap: 4px;
  margin-inline: auto;
  min-width: 0;
}
.bar-links a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding-inline: 12px;
  font-size: 14px;
  color: var(--text-2);
  white-space: nowrap;
  transition: color 0.2s ease;
}
.bar-links a:hover,
.bar-links a[aria-current="true"] { color: var(--text); }

.nav-pill {
  position: absolute;
  z-index: -1;
  top: 50%;
  left: 0;
  height: 32px;
  width: var(--pill-w, 0);
  margin-top: -16px;
  border-radius: var(--r-pill);
  background: var(--hairline);
  box-shadow: inset 0 1px 0 var(--glass-hi);
  opacity: 0;
  transform: translateX(var(--pill-x, 0));
  transition: transform 0.5s var(--spring), width 0.5s var(--spring), opacity 0.25s ease;
}
.nav-pill.on { opacity: 1; }

.theme-toggle,
.lang-switch {
  flex: none;
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: var(--text-2);
  cursor: pointer;
  transition: background-color 0.2s ease, color 0.2s ease;
}
.lang-switch { font-size: 13px; font-weight: 600; letter-spacing: 0.02em; }
.theme-toggle:hover,
.lang-switch:hover { background: var(--hairline); color: var(--text); }
.theme-toggle:active { transform: scale(0.94); }
.theme-toggle svg { display: block; transition: transform 0.5s var(--spring); }
.theme-toggle:hover svg { transform: rotate(-18deg); }
.theme-toggle .i-moon { display: none; }
@media (prefers-color-scheme: light) {
  :root:not([data-theme="dark"]) .theme-toggle .i-sun  { display: none; }
  :root:not([data-theme="dark"]) .theme-toggle .i-moon { display: block; }
}
:root[data-theme="light"] .theme-toggle .i-sun  { display: none; }
:root[data-theme="light"] .theme-toggle .i-moon { display: block; }

/* ---------- Buttons & links ---------- */
.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 44px;
  padding: 0 22px;
  border-radius: var(--r-pill);
  font-size: 16px;
  font-weight: 500;
  letter-spacing: -0.01em;
  transition: background-color 0.2s ease, transform 0.15s ease;
}
.button svg { flex: none; margin-left: -3px; }
.button:hover svg { animation: nudge 0.6s var(--spring); }
@keyframes nudge { 40% { transform: translateY(2px); } }
.button-primary { background: var(--accent-fill); color: #fff; }
.button-primary:hover { background: var(--accent-press); }
.button:active { transform: scale(0.98); }
.button-sm { min-height: 34px; padding: 0 16px; font-size: 14px; flex: none; }
.button-glass { color: var(--text); }
.button-glass:hover { background: var(--surface); }
.button-tinted { background: var(--hairline); color: var(--text); }
.button-tinted:hover { background: var(--hairline-2); }

.link-chevron {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  color: var(--accent);
  font-size: 16px;
}
.link-chevron::after {
  content: "›";
  margin-left: 5px;
  font-size: 20px;
  line-height: 1;
  transition: transform 0.2s ease;
}
.link-chevron:hover { color: var(--accent-hi); }
.link-chevron:hover::after { transform: translateX(3px); }

/* ============================================================
   Content layer
   ============================================================ */
.hero { padding: calc(var(--nav-top) + var(--nav-h) + 96px) 0 84px; }
.section { padding: 84px 0; border-top: 1px solid var(--hairline); }
.section-contact { padding: 72px 0 96px; }

.status {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  margin-bottom: 28px;
  padding: 7px 15px 7px 12px;
  border-radius: var(--r-pill);
  font-size: 13px;
  color: var(--text-2);
}
.status-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--live);
  flex: none;
}

.display {
  font-family: var(--serif);
  font-size: clamp(52px, 10vw, 104px);
  font-weight: 500;
  font-variation-settings: "opsz" 72;
  line-height: 0.98;
  letter-spacing: -0.025em;
}

.standfirst {
  max-width: 33em;
  margin-top: 28px;
  font-size: clamp(19px, 2.3vw, 24px);
  line-height: 1.42;
  letter-spacing: -0.015em;
  color: var(--text-2);
}
.standfirst-sm { font-size: clamp(17px, 1.9vw, 20px); margin-top: 18px; }

.actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 22px;
  margin-top: 34px;
}

.eyebrow,
.sub {
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.02em;
  color: var(--text-2);
  margin-bottom: 12px;
}
.sub { margin-bottom: 16px; }

.title {
  max-width: 21ch;
  font-family: var(--serif);
  font-size: clamp(32px, 4.6vw, 50px);
  font-weight: 500;
  font-variation-settings: "opsz" 60;
  line-height: 1.08;
  letter-spacing: -0.02em;
}
.title-lg { max-width: 17ch; font-size: clamp(34px, 5.4vw, 58px); }

/* ---------- In numbers ---------- */
.facts-band { padding: 0 0 72px; }
.facts {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  border-top: 1px solid var(--hairline-2);
}
.fact {
  display: grid;
  align-content: start;
  gap: 6px;
  padding: 22px 20px 0 0;
}
.fact + .fact { padding-left: 20px; border-left: 1px solid var(--hairline); }
.fact-fig {
  font-family: var(--serif);
  font-size: clamp(28px, 3.2vw, 36px);
  white-space: nowrap;
  font-weight: 500;
  font-variation-settings: "opsz" 48;
  line-height: 1.05;
  letter-spacing: -0.02em;
  font-variant-numeric: lining-nums;
}
.fact-cap { font-size: 14px; line-height: 1.45; color: var(--text-2); }

/* ============================================================
   Signature: the career on a five-line staff.
   Horizontal position is time, to scale; each new role climbs
   one line. Lines count from the bottom (0) to the top (4).
   ============================================================ */
.score { margin-top: 48px; padding-top: 64px; }

.staff {
  position: relative;
  height: calc(var(--gap) * 4 + 1px);
  margin-bottom: calc(var(--gap) * 1.75);   /* the clef's tail and the year labels */
  background: repeating-linear-gradient(to bottom,
              var(--staff) 0 1px, transparent 1px var(--gap));
  border-left: 1px solid var(--staff);
}

/* Treble clef, scaled so its staff matches this one exactly */
.clef {
  position: absolute;
  left: 8px;
  top: calc(var(--gap) * -1.336);
  height: calc(var(--gap) * 6.928);
  width: auto;
  fill: var(--ink);
  opacity: 0.55;
}

.field {
  position: absolute;
  inset: 0 0 0 var(--clef-w);
}

.barline {
  position: absolute;
  top: 0;
  bottom: 0;
  left: calc(var(--x) * 1%);
  width: 1px;
  background: var(--hairline);
}
.barline i {
  position: absolute;
  top: calc(100% + 10px);
  left: 0;
  transform: translateX(-50%);
  font-style: normal;
  font-size: 12px;
  font-weight: 500;
  color: var(--text-2);
  font-variant-numeric: tabular-nums;
}

.phrases { position: absolute; inset: 0; }
.phrase {
  position: absolute;
  left: calc(var(--s) * 1%);
  width: calc((var(--e) - var(--s)) * 1%);
  bottom: calc(var(--line) * var(--gap));
  height: 0;
}
.phrase a {
  /* a real box, from above the cue down past the beam, so the whole phrase is
     one target and the focus ring outlines it. Children sit relative to its
     bottom edge, which is 8px below the staff line. */
  position: absolute;
  left: -11px;
  right: 0;
  bottom: -8px;
  height: calc(var(--gap) - 4px);
  border-radius: 8px;
  color: var(--ink);
}

.head {
  position: absolute;
  left: 4px;
  bottom: 2.5px;
  width: 14px;
  height: 11px;
  border-radius: 50%;
  background: currentColor;
  transform: rotate(-22deg);
}
.beam {
  position: absolute;
  left: 11px;
  right: 2px;
  bottom: 6px;
  height: 4px;
  border-radius: var(--r-pill);
  background: currentColor;
  transform-origin: left center;
}

.cue {
  position: absolute;
  left: 0;
  bottom: 17px;
  display: grid;
  padding: 1px 4px 2px;
  border-radius: 4px;
  background: var(--bg);        /* lifts the words off the staff lines */
  line-height: 1.2;
  white-space: nowrap;
}
.cue b { font-size: 13px; font-weight: 600; color: var(--text); }
.cue span { font-size: 12px; color: var(--text-2); }
.is-current .cue { left: auto; right: -4px; text-align: right; }

.is-current a { color: var(--accent); }
.is-current .cue b { color: var(--accent); }

.phrase a:hover,
.phrase a:focus-visible { color: var(--accent); }
.phrase a:hover .cue b,
.phrase a:focus-visible .cue b { color: var(--accent); }
.phrase a:focus-visible { outline-offset: 2px; }

/* The staff ahead of today: dotted, still to be written */
.open-line {
  position: absolute;
  left: calc(var(--s) * 1%);
  right: 0;
  bottom: calc(var(--line) * var(--gap) - 2px);
  height: 4px;
  background: radial-gradient(circle, var(--accent) 1.5px, transparent 2px) 0 50% / 9px 4px repeat-x;
  -webkit-mask-image: linear-gradient(to right, #000, transparent);
  mask-image: linear-gradient(to right, #000, transparent);
  opacity: 0.6;
}
.now {
  position: absolute;
  left: calc(var(--x) * 1%);
  bottom: calc(var(--line) * var(--gap));
  width: 9px;
  height: 9px;
  margin: 0 0 -4.5px -4.5px;
  border-radius: 50%;
  background: var(--live);
}

.score-cap {
  font-size: 14px;
  line-height: 1.5;
  color: var(--text-2);
  padding-top: 16px;
  border-top: 1px solid var(--hairline);
}

/* ---------- Roles ---------- */
.roles { display: grid; margin-top: 28px; }
.role {
  position: relative;
  isolation: isolate;
  display: grid;
  grid-template-columns: 180px 1fr;
  gap: 8px 28px;
  padding: 34px 0;
  border-top: 1px solid var(--hairline);
}
.role:first-child { border-top: none; }

.role-when { display: flex; flex-direction: column; align-items: flex-start; gap: 10px; }
.role-period { font-size: 14px; color: var(--text-2); font-variant-numeric: tabular-nums; }

.badge {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 3px 10px;
  border-radius: var(--r-pill);
  background: var(--surface-2);
  font-size: 12px;
  font-weight: 500;
  color: var(--chip-text);
}
.badge-live { color: var(--text); }

.role-title { font-size: 21px; letter-spacing: -0.02em; }
.role-org {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 2px 12px;
  margin-top: 6px;
  font-size: 15px;
  color: var(--text-2);
}
.org { font-weight: 600; color: var(--text); }

.points { margin-top: 16px; display: grid; row-gap: 9px; }
.points li {
  position: relative;
  padding-left: 19px;
  font-size: 16px;
  line-height: 1.5;
  color: var(--text-2);
}
.points li::before {
  content: "";
  position: absolute;
  left: 1px;
  top: 8px;
  width: 7px;
  height: 5.5px;
  border-radius: 50%;
  background: var(--ink);
  transform: rotate(-22deg);   /* a tiny note head */
}
.points b { color: var(--text); }

.quote {
  margin-top: 20px;
  padding: 4px 0 4px 20px;
  border-left: 2px solid var(--accent);
}
.quote p {
  font-family: var(--serif);
  font-style: italic;
  font-size: 19px;
  font-variation-settings: "opsz" 20;
  line-height: 1.45;
  color: var(--text);
}
.quote footer { margin-top: 10px; font-size: 13px; color: var(--text-2); }

/* A role reached from the score glows briefly */
.role::before {
  content: "";
  position: absolute;
  inset: 10px -18px;
  z-index: -1;
  border-radius: 22px;
  background: var(--accent);
  opacity: 0;
  pointer-events: none;
}
.role.is-flash::before { animation: flash 1.8s var(--ease-out); }
@keyframes flash {
  0%   { opacity: 0; }
  18%  { opacity: 0.1; }
  100% { opacity: 0; }
}

/* ---------- How I work ---------- */
.principles {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
  margin-top: 44px;
}
.principle {
  padding: 26px 26px 28px;
  background: var(--surface);
  border-radius: var(--r-card);
}
.principle-n {
  display: block;
  font-family: var(--serif);
  font-style: italic;
  font-size: 22px;
  line-height: 1;
  color: var(--accent);
}
.principle-title { margin-top: 16px; font-size: 20px; }
.principle p { margin-top: 8px; font-size: 16px; line-height: 1.5; color: var(--text-2); }

.split {
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: 48px;
  margin-top: 56px;
}
.tags { display: flex; flex-wrap: wrap; gap: 8px; }
.tags li {
  padding: 7px 14px;
  border-radius: var(--r-pill);
  background: var(--surface);
  font-size: 14px;
  color: var(--text-2);
}
.langs li {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 12px 0;
  border-top: 1px solid var(--hairline);
}
.langs li:first-child { border-top: none; padding-top: 4px; }
.lang-name { font-size: 16px; }
.lang-level { font-size: 14px; color: var(--text-2); }

/* ---------- Background ---------- */
.study {
  position: relative;
  overflow: hidden;
  padding: 52px 48px 50px;
  background: var(--surface);
  border-radius: var(--r-panel);
}
/* A faint staff runs through the card */
.study::after {
  content: "";
  position: absolute;
  right: 0;
  top: 64px;
  width: 38%;
  height: calc(var(--gap) * 4 * 0.62 + 1px);
  background: repeating-linear-gradient(to bottom,
              var(--staff) 0 1px, transparent 1px calc(var(--gap) * 0.62));
  -webkit-mask-image: linear-gradient(to right, transparent, #000 40%);
  mask-image: linear-gradient(to right, transparent, #000 40%);
  opacity: 0.7;
  pointer-events: none;
}
.study > * { position: relative; z-index: 1; }
.study-degree {
  margin-top: 26px;
  font-family: var(--serif);
  font-style: italic;
  font-size: clamp(21px, 2.4vw, 26px);
  line-height: 1.3;
}
.study-school { margin-top: 6px; font-size: 15px; color: var(--text-2); font-variant-numeric: tabular-nums; }
.study-body { max-width: 30em; margin-top: 22px; font-size: 17px; line-height: 1.55; color: var(--text-2); }

/* ---------- Contact ---------- */
.contact-panel { padding: 56px 52px 52px; border-radius: var(--r-panel); }

/* ---------- Footer ---------- */
.foot {
  padding: 32px 0 calc(env(safe-area-inset-bottom, 0px) + 44px);
  border-top: 1px solid var(--hairline);
  font-size: 13px;
  color: var(--text-2);
}
.foot-inner { display: flex; flex-wrap: wrap; gap: 6px 20px; justify-content: space-between; }
.foot a { color: var(--text-2); }
.foot a:hover { color: var(--text); }

/* ============================================================
   Motion — transform/opacity only, all off under Reduce Motion
   ============================================================ */
:root { --spring: cubic-bezier(0.34, 1.36, 0.64, 1); --ease-out: cubic-bezier(0.16, 1, 0.3, 1); }

@media (prefers-reduced-motion: no-preference) {
  @view-transition { navigation: auto; }
}

.theme-vt::view-transition-old(root),
.theme-vt::view-transition-new(root) { animation: none; mix-blend-mode: normal; }
.theme-vt::view-transition-new(root) { animation: theme-reveal 0.62s cubic-bezier(0.4, 0, 0.2, 1); }
@keyframes theme-reveal {
  from { clip-path: circle(0 at var(--vt-x, 50%) var(--vt-y, 0)); }
  to   { clip-path: circle(150vmax at var(--vt-x, 50%) var(--vt-y, 0)); }
}

.hero .wrap > * { animation: rise 0.9s var(--ease-out) both; }
.hero .wrap > :nth-child(2) { animation-delay: 0.06s; }
.hero .wrap > :nth-child(3) { animation-delay: 0.14s; }
.hero .wrap > :nth-child(4) { animation-delay: 0.22s; }
@keyframes rise {
  from { opacity: 0; transform: translateY(18px); }
  to   { opacity: 1; transform: none; }
}

.hero::before { animation: drift 22s ease-in-out infinite alternate; will-change: transform; }
.section-contact::before { animation: drift 26s ease-in-out infinite alternate-reverse; will-change: transform; }
@keyframes drift {
  0%   { transform: translate3d(0, 0, 0) scale(1); }
  50%  { transform: translate3d(-3%, 2%, 0) scale(1.06); }
  100% { transform: translate3d(3%, -1%, 0) scale(1.02); }
}

.status .status-dot,
.now { position: relative; }
.status .status-dot::after,
.now::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background: var(--live);
  animation: ping 2.4s var(--ease-out) 4;
}
.now { position: absolute; }
.now::after { animation-delay: 1.8s; opacity: 0; }
@keyframes ping {
  0%   { transform: scale(1);   opacity: 0.55; }
  70%  { transform: scale(3.2); opacity: 0; }
  100% { transform: scale(3.2); opacity: 0; }
}

.js .reveal { opacity: 0; transform: translateY(22px); }
.js .reveal.in {
  opacity: 1;
  transform: none;
  transition: opacity 0.7s var(--ease-out), transform 0.8s var(--ease-out);
}

/* The melody writes itself: each note lands, then its beam draws to scale */
.js .score .head { transform: rotate(-22deg) scale(0); }
.js .score .beam { transform: scaleX(0); }
.js .score .cue  { opacity: 0; }
.js .score.in .head {
  transform: rotate(-22deg) scale(1);
  transition: transform 0.45s var(--spring) calc(0.3s + var(--i) * 0.32s);
}
.js .score.in .beam {
  transform: scaleX(1);
  transition: transform 0.8s cubic-bezier(0.22, 1, 0.36, 1) calc(0.45s + var(--i) * 0.32s);
}
.js .score.in .cue {
  opacity: 1;
  transition: opacity 0.5s ease calc(0.4s + var(--i) * 0.32s);
}
.js .score .open-line,
.js .score .now { opacity: 0; }
.js .score.in .open-line { opacity: 0.6; transition: opacity 0.8s ease 1.9s; }
.js .score.in .now { opacity: 1; transition: opacity 0.4s ease 1.7s; }

/* ============================================================
   Adaptive
   ============================================================ */
@media (max-width: 860px) {
  .facts { grid-template-columns: repeat(2, 1fr); }
  .fact:nth-child(3) { padding-left: 0; border-left: none; }
  .fact:nth-child(n+3) { margin-top: 18px; border-top: 1px solid var(--hairline); }
  .role { grid-template-columns: 1fr; gap: 14px; }
  .role-when { flex-direction: row; align-items: center; gap: 12px; }
  .split { grid-template-columns: 1fr; gap: 40px; }
}

@media (max-width: 640px) {
  :root { --gutter: 20px; --nav-h: 50px; --nav-top: calc(env(safe-area-inset-top, 0px) + 10px); --gap: 40px; --clef-w: 18px; }
  .hero { padding: calc(var(--nav-top) + var(--nav-h) + 60px) 0 56px; }
  .facts-band { padding-bottom: 56px; }
  .section { padding: 60px 0; }
  .section-contact { padding: 44px 0 64px; }
  .contact-panel { padding: 36px 24px 32px; border-radius: 26px; }
  .study { padding: 36px 24px 34px; border-radius: 26px; }
  .study::after { display: none; }

  .chrome { padding-inline: 10px; }
  /* On a phone the capsule is nearly full width: keep the fade to the status
     bar strip so the glass has real content to blur. */
  .chrome::before {
    height: calc(var(--nav-top) + 8px);
    background: linear-gradient(to bottom, var(--bg) 55%, transparent);
  }
  .bar { gap: 4px; padding: 0 4px 0 16px; }
  .bar .button { display: none; }
  .bar-links {
    margin-left: 6px;
    margin-right: auto;
    overflow-x: auto;
    scrollbar-width: none;
    -webkit-mask-image: linear-gradient(to right, transparent, #000 10px, #000 calc(100% - 22px), transparent);
    mask-image: linear-gradient(to right, transparent, #000 10px, #000 calc(100% - 22px), transparent);
  }
  .bar-links::-webkit-scrollbar { display: none; }
  .bar-links a { padding-inline: 8px; font-size: 13px; }

  /* The clef would eat a third of the width: the staff starts with its
     opening barline instead. */
  .clef { display: none; }
  .barline.odd i { display: none; }
  .score { padding-top: 40px; }
  .cue b { font-size: 12.5px; }
  .cue span { font-size: 11.5px; }

  .fact { padding-right: 12px; }
  .fact + .fact { padding-left: 14px; }
  .fact:nth-child(3) { padding-left: 0; }
  .principles { grid-template-columns: 1fr; }
  .actions { gap: 4px 18px; }
}

@media (pointer: coarse) {
  .theme-toggle, .lang-switch { width: 44px; height: 44px; }
  .foot a { display: inline-block; padding-block: 12px; }
}

@media (max-width: 370px) {
  .bar-links a { padding-inline: 6px; }
  .cue span { display: none; }
}

/* ============================================================
   Accessibility settings
   ============================================================ */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation: none !important;
    transition-duration: 0.01ms !important;
    transition-delay: 0s !important;
  }
  .js .reveal { opacity: 1; transform: none; }
  .js .score .head { transform: rotate(-22deg); }
  .js .score .beam { transform: none; }
  .js .score .cue, .js .score .now { opacity: 1; }
  .js .score .open-line { opacity: 0.6; }
}

@media (prefers-reduced-transparency: reduce) {
  .glass, .material {
    background: var(--glass-solid);
    -webkit-backdrop-filter: none;
    backdrop-filter: none;
  }
}

@media (prefers-contrast: more) {
  :root {
    --text-2:     #dcd3cb;
    --chip-text:  #dcd3cb;
    --hairline:   rgba(255,246,240,0.28);
    --hairline-2: rgba(255,246,240,0.45);
    --staff:      rgba(255,246,240,0.5);
    --ink:        #b3a99f;
    --accent:     #ffa3b8;
    --glass-edge: rgba(255,246,240,0.45);
  }
  :root[data-theme="light"] {
    --text-2:     #4a423c;
    --chip-text:  #4a423c;
    --hairline:   rgba(60,40,30,0.28);
    --hairline-2: rgba(60,40,30,0.45);
    --staff:      rgba(60,40,30,0.5);
    --ink:        #5e544c;
    --accent:     #8f1c3f;
    --glass-edge: rgba(60,40,30,0.45);
  }
  .glass, .material {
    background: var(--glass-solid);
    -webkit-backdrop-filter: none;
    backdrop-filter: none;
  }
  .principle, .study, .tags li { outline: 1px solid var(--hairline); }
}
@media (prefers-contrast: more) and (prefers-color-scheme: light) {
  :root:not([data-theme="dark"]) {
    --text-2:     #4a423c;
    --chip-text:  #4a423c;
    --hairline:   rgba(60,40,30,0.28);
    --hairline-2: rgba(60,40,30,0.45);
    --staff:      rgba(60,40,30,0.5);
    --ink:        #5e544c;
    --accent:     #8f1c3f;
    --glass-edge: rgba(60,40,30,0.45);
  }
}
