/* Homepage hero: "Under Construction...But, Hi I'm" kicker and the LinkedIn / Achieved Liquid Glass links.
   Every value below comes from the Portfolio Figma file (nodes 143:5–143:10):
     Kicker  — Inter Bold 16px, auto line height, 0% tracking, #FFF; left edge on MIKE, 27px above its cap height.
     Buttons — 98×42, corner radius 200, fill #3B3B3B at 40%, 19px apart, right edge on ZHANG, 27px below its baseline.
     Labels  — Inter Bold 12px, auto line height, 0% tracking, #FFF, centred.
     Glass   — frost 33, refraction 0.61, depth 20, dispersion 0.5, light −45° at 0.8, splay 0.
   The refraction and dispersion are an SVG filter built by liquid-glass.js (Chromium); other browsers get the
   frost, fill and light only. */

@font-face {
  font-family: Inter;
  src: url('assets/inter-bold.woff2') format('woff2');
  font-weight: 700;
  font-display: swap;
}

/* Same expression as the wordmark's font-size (xr-case-study-v1/home.css), so offsets track it exactly. */
.intro { --wordmark-size: max(46px, min(14cqw, 21svh)); }

/* Inter metrics at line-height .92: the cap top sits .097em below the line box top, the baseline .096em above
   its bottom. Used to measure the 27px Figma gaps from the letters themselves, not from the line box. */

/* Kicker: its own layer above the portrait (MIKE itself sits behind it), aligned to MIKE through an invisible
   copy of the word that repeats MIKE's line position and offset. */
.intro .intro-kicker-line {
  position: absolute;
  inset: 0 0 auto;
  z-index: 4;
  font: inherit;
  letter-spacing: inherit;
  line-height: inherit;
  text-align: center;
  pointer-events: none;
}
.intro .intro-kicker-anchor {
  position: relative;
  display: block;
  width: max-content;
  margin-inline: auto;
  font-style: normal;
  translate: calc(-1 * min(21cqw, 34svh)) -.1em;   /* = MIKE's offset (xr-case-study-v1/home.css) */
}
.intro .intro-kicker-ghost { font-style: normal; visibility: hidden; }
.intro .intro-kicker {
  position: absolute;
  left: calc(var(--kicker-optical, .045) * var(--wordmark-size)); /* M's side bearing: line up with the stem */
  bottom: calc(100% - .097 * var(--wordmark-size) + 27px);
  font: 700 16px/normal Inter, Arial, sans-serif;
  letter-spacing: 0;
  color: #fff;
  white-space: nowrap;
  /* Plain text, not part of the MIKE ZHANG link: catch the pointer so the link's line box underneath
     (which reaches up behind the kicker) is neither hovered nor clicked through it. */
  pointer-events: auto;
  cursor: default;
}
@media (max-width: 600px) {
  .intro .intro-kicker-anchor { translate: -24.5cqw -.1em; }
}

/* The links mirror the h1's box (same inset, font metrics and ZHANG offset); the anchor holds an invisible copy
   of "ZHANG" (hidden from assistive tech) so the row inside it is pinned to ZHANG's right edge and baseline at
   every viewport size. */
.intro-links {
  position: absolute;
  inset: auto 0 calc(var(--portrait-height) * .46 - .92em);
  z-index: 4;
  margin: 0;
  font-size: var(--wordmark-size);
  font-weight: 600;
  letter-spacing: -.055em;
  line-height: .92;
  text-align: center;
  pointer-events: none;
}
.intro-links-anchor {
  position: relative;
  display: block;
  width: max-content;
  margin-inline: auto;
  translate: min(14cqw, 22svh) 0;
}
.intro-links-ghost { visibility: hidden; }
.intro-links-row {
  position: absolute;
  right: 0;
  top: calc(100% - .096em + 27px);
  display: flex;
  gap: 19px;
  pointer-events: auto;
  letter-spacing: 0;
}
@media (max-width: 600px) {
  .intro-links-anchor { translate: 9cqw 0; }
}

/* Liquid Glass pill (Figma "Rectangle 51/52"). Scoped under .intro-links so it outranks the generic
   `.intro a { display: block }` rule, which would otherwise un-centre the label. */
.intro-links .glass-pill,
.glass-pill {
  position: relative;
  display: inline-grid;
  place-items: center;
  width: 98px;
  height: 42px;
  border-radius: 200px;
  isolation: isolate;
  overflow: hidden;
  background: rgb(60 60 60 / .4);                 /* #3B3B3B, 40% */
  -webkit-backdrop-filter: blur(16.5px);          /* frost 33 (Figma blur radius → CSS blur at half) */
  backdrop-filter: blur(16.5px);
  font: 700 12px/normal Inter, Arial, sans-serif;
  letter-spacing: 0;
  color: #fff;
  text-decoration: none;
  white-space: nowrap;
  transition: background-color .3s ease, translate .3s cubic-bezier(.2, .8, .2, 1), scale .2s ease;
}
/* Light: −45° at 0.8 — a thin specular rim, brightest at the top-left edge with its reflection at the
   bottom-right, fading to nothing along the sides. */
.glass-pill::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  padding: 1px;
  border-radius: inherit;
  background:
    radial-gradient(120% 140% at 0% 0%, rgb(255 255 255 / .55), rgb(255 255 255 / .12) 38%, transparent 62%),
    radial-gradient(120% 140% at 100% 100%, rgb(255 255 255 / .34), rgb(255 255 255 / .06) 36%, transparent 58%);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask: linear-gradient(#000 0 0) content-box exclude, linear-gradient(#000 0 0);
  pointer-events: none;
}
/* Hover/press use the individual translate/scale properties: the homepage reveal owns `transform`. */
.glass-pill:hover { background-color: rgb(60 60 60 / .55); translate: 0 -1px; }
.glass-pill:active { translate: 0 0; scale: .98; }
.glass-pill:focus-visible { outline: 2px solid #fff; outline-offset: 3px; }
/* Chromium: frost, then the refraction + dispersion filter generated for this exact pill size. */
html.glass-refract .glass-pill[data-glass-filter] {
  -webkit-backdrop-filter: blur(16.5px) var(--glass-filter);
  backdrop-filter: blur(16.5px) var(--glass-filter);
}
@media (prefers-reduced-motion: reduce) {
  .glass-pill, .glass-pill:hover, .glass-pill:active { transition: none; translate: none; scale: none; }
}
