:root {
  color-scheme: dark;
  --paper: #f6f6ef;
  --cream: #efe6cf;
  --ink: #111c15;
  --meadow: url("assets/meadow.webp");
  --moon-mask: url("assets/moon-focus.svg");
  --scene-x: 50%;
  --scene-y: 22%;
  --response: 260ms ease;
  font-family: "Space Grotesk", "Avenir Next", system-ui, sans-serif;
  color: var(--paper);
  background: #182d0f;
}
*, *::before, *::after { box-sizing: border-box; }
body {
  margin: 0;
  min-height: 100svh;
  padding: max(24px, env(safe-area-inset-top)) max(16px, env(safe-area-inset-right)) max(28px, env(safe-area-inset-bottom)) max(16px, env(safe-area-inset-left));
  display: grid;
  place-items: center;
  isolation: isolate;
}
.scene {
  position: fixed;
  inset: 0;
  background: #182d0f var(--meadow) var(--scene-x) var(--scene-y) / cover no-repeat;
  pointer-events: none;
}
body > .scene { z-index: -1; background-image: url("assets/meadow-soft.webp"); }
/* The lunar disc and its halo use a single sample of the sharp plate. The mask
   uses the plate's intrinsic coordinates and the same viewport cover transform. */
.lunar-focus {
  z-index: -1;
  mask: var(--moon-mask) var(--scene-x) var(--scene-y) / cover no-repeat;
}
/* The sharp window covers this vignette. The top of the landscape stays clear. */
body > .scene::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(to bottom, transparent 28%, rgb(83 61 69 / 5%) 49%, rgb(83 61 69 / 5%)),
    linear-gradient(to bottom, transparent 44%, rgb(9 24 13 / 5%) 63%, rgb(9 24 13 / 14%) 100%);
}
.panel {
  position: relative;
  width: min(100%, 540px);
  padding: clamp(23px, 3vh, 34px) clamp(18px, 3.4vw, 43px) clamp(35px, 5.5vh, 65px);
  --shell-radius: clamp(34px, 5vw, 60px);
  border-radius: var(--shell-radius);
  text-align: center;
  isolation: isolate;
}
.window, .optics { position: absolute; inset: 0; border-radius: inherit; pointer-events: none; }
.window { z-index: -2; clip-path: inset(0 round var(--shell-radius)); }
.optics {
  z-index: -1;
  box-shadow: inset 2px 1px 6px -3px #edf7d85c, inset -3px -2px 9px -3px #e3ebbb42,
              0 2px 8px #091c101c;
}
.optics::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  padding: 1px;
  background:
    radial-gradient(ellipse 75px 44px at 3% 2%, #ffffe0ab, transparent),
    radial-gradient(ellipse 16px 82px at 0% 90%, #f4ffcf88, transparent),
    radial-gradient(ellipse 21px 77px at 100% 72%, #e7f4d34f, transparent),
    linear-gradient(138deg, #e3f4da32, #b1d5ab10 31%, transparent 49%, #d0e6b72e 79%, #efffdf4a);
  mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  mask-composite: exclude;
}
.portrait { display: block; width: clamp(96px, 13.7vh, 132px); height: auto; aspect-ratio: 1; object-fit: cover; border-radius: 50%; margin: auto; }
h1 { margin: clamp(19px, 3vh, 31px) 0 0; line-height: 0; }
h1 img { width: min(100%, 290px); height: auto; filter: drop-shadow(0 0 5px #f7ffe743); }
header p { font-size: clamp(15px, 2.05vh, 19px); margin: clamp(13px, 2.2vh, 22px) 0 0; text-shadow: 0 1px 4px #10230b; line-height: 1.35; }
.social { display: flex; justify-content: center; gap: clamp(13px, 2.5vw, 25px); margin: clamp(10px, 2.1vh, 21px) 0 clamp(13px, 2.8vh, 28px); }
a { color: inherit; text-decoration: none; -webkit-tap-highlight-color: transparent; }
.social a { display: grid; place-items: center; width: 44px; height: 44px; opacity: .93; transition: opacity var(--response); }
.social svg { width: 29px; height: 29px; }
.links { display: grid; gap: clamp(9px, 1.45vh, 14px); }
.pill {
  min-height: clamp(44px, 6vh, 60px);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 9px 12px;
  border-radius: 999px;
  border: 1px solid #e4f1d030;
  background: linear-gradient(180deg, #365c27b8, #294e1ccb);
  backdrop-filter: blur(5px);
  -webkit-backdrop-filter: blur(5px);
  font-weight: 500;
  font-size: clamp(15px, 2.16vh, 21px);
  line-height: 1.2;
  transition: background-color var(--response), box-shadow 150ms ease-out, filter var(--response), transform var(--response);
}
.pill.primary { background: var(--cream); color: var(--ink); font-weight: 650; border-color: #fff8e6a6; margin-bottom: 2px; }
.pill svg { width: 23px; height: 23px; flex-shrink: 0; }
a:focus-visible { outline: 2px solid #fff9e7; outline-offset: 4px; }
/* A uniform inset wash follows the native pill radius, behind the label. */
.pill { --press-wash: rgb(219 248 200 / 10%); --press-edge: rgb(223 247 208 / 19%); }
.pill.primary { --press-wash: rgb(255 248 225 / 25%); --press-edge: rgb(255 252 240 / 48%); }
@media (hover: hover) and (pointer: fine) {
  .social a:hover { opacity: 1; }
  .pill:hover { filter: brightness(1.12); }
  .pill.primary:hover { filter: brightness(1.04); box-shadow: 0 0 21px #f4e7c45e; transform: translateY(-1px); }
}
.links .pill[data-pressed] {
  box-shadow: inset 0 0 0 1px var(--press-edge), inset 0 0 0 100vmax var(--press-wash);
  transition-duration: 0s;
}
@media (prefers-reduced-motion: reduce) {
  a { transition: none !important; transform: none !important; }
}

/* The two registered plates share a camera. The exterior softening excludes the moon. */
.pill { background: linear-gradient(167deg, #77954766, #41632da6 49%, #74905079); font-family: Arial, sans-serif; font-weight: 400; }
.pill.primary { font-weight: 500; background: var(--cream); }

@media (min-width: 641px) {
  :root { --u: clamp(.74px, .092081vh, 1.08px); --scene-y: 0%; }
  body { padding: calc(43 * var(--u)) 16px; }
  .panel { width: calc(616 * var(--u)); padding: calc(26 * var(--u)) calc(49 * var(--u)) calc(84 * var(--u)); --shell-radius: calc(68 * var(--u)); }
  .portrait { width: calc(138 * var(--u)); }
  h1 { margin: calc(22 * var(--u)) 0 0; }
  h1 img { width: calc(334 * var(--u)); }
  header p { font-family: Arial, sans-serif; font-size: calc(21.5 * var(--u)); margin: calc(15 * var(--u)) 0 0; line-height: calc(27 * var(--u)); }
  .social { gap: calc(33 * var(--u)); margin: calc(19 * var(--u)) 0 calc(30 * var(--u)); }
  .social svg { width: calc(34 * var(--u)); height: calc(34 * var(--u)); }
  .links { gap: calc(14 * var(--u)); }
  .pill { height: calc(63 * var(--u)); font-size: calc(23 * var(--u)); }
  .pill.primary { margin-bottom: calc(4 * var(--u)); }
}
@media (max-width: 640px) {
  :root {
    --meadow: url("assets/mobile.webp");
    --moon-mask: url("assets/moon-focus-mobile.svg");
    --scene-y: 0%;
  }
  body { align-items: start; }
  body > .scene { background-image: url("assets/mobile-soft.webp"); }
  .panel { padding-top: 23px; }
  .portrait { width: clamp(86px, 13vh, 110px); }
  .social svg { width: 26px; height: 26px; }
  h1 img { width: min(76%, 236px); }
  header p { max-width: 30ch; margin-inline: auto; text-wrap: balance; }
  .links { gap: 10px; }
  .pill { min-height: 44px; padding-block: 8px; font-size: 16px; }
}

/* Keep the cream label on one line at the narrowest mobile width. */
@media (max-width: 340px) {
  .pill.primary { padding-inline: 4px; column-gap: 6px; }
}
