/* Source: vendor/open-props/open-props-core-1.7.23.min.css */
/*
 Open Props 1.7.23 — selected core token subset
 Source: https://www.npmjs.com/package/open-props/v/1.7.23
 License: MIT
 Included groups: sizes 1–10, radii 1–6 + round, eases 1–5.
*/
:where(html){
  --size-1:.25rem;
  --size-2:.5rem;
  --size-3:1rem;
  --size-4:1.25rem;
  --size-5:1.5rem;
  --size-6:1.75rem;
  --size-7:2rem;
  --size-8:3rem;
  --size-9:4rem;
  --size-10:5rem;

  --radius-1:2px;
  --radius-2:5px;
  --radius-3:1rem;
  --radius-4:2rem;
  --radius-5:4rem;
  --radius-6:8rem;
  --radius-round:1e5px;

  --ease-1:cubic-bezier(.25,0,.5,1);
  --ease-2:cubic-bezier(.25,0,.4,1);
  --ease-3:cubic-bezier(.25,0,.3,1);
  --ease-4:cubic-bezier(.25,0,.2,1);
  --ease-5:cubic-bezier(.25,0,.1,1);
}

/* Source: portfolio.css */
:root {
  --bg: #eceff1;
  --bg-2: #e4e9ec;
  --text: #0b1014;
  --text-2: #33424d;
  --muted: #53616a;
  --line: rgba(11,16,20,.10);
  --line-soft: rgba(11,16,20,.06);
  --blue: #0077c8;
  --cyan: #49c9f2;
  --teal: #0cb9a5;
  --yellow: #f2c84b;
  --nav-active-fg: #ffffff;
  --max: 77.5rem;

  /* Licat semantic scale — backed by Open Props 1.7.23 */
  --space-1: var(--size-1);
  --space-2: var(--size-2);
  --space-3: var(--size-3);
  --space-4: var(--size-4);
  --space-5: var(--size-5);
  --space-6: var(--size-6);
  --space-7: var(--size-7);
  --space-8: var(--size-8);
  --space-9: var(--size-9);
  --space-10: var(--size-10);

  --radius-control: var(--radius-2);
  --radius-card: var(--radius-3);
  --radius-panel: var(--radius-4);
  --radius-pill: var(--radius-round);

  --ease-ui: var(--ease-3);
  --ease-emphasized: var(--ease-5);

  --apple-font-family: -apple-system, BlinkMacSystemFont, "SF Pro Display", "SF Pro Text", "Helvetica Neue", Arial, sans-serif;
  /* Neutral material, tinted by the existing blue/teal environment beneath it. */
  --apple-glass-blur: 18px;
  --apple-glass-saturate: 145%;
  --apple-glass-bg-ultra-thin: rgba(245,250,253,.58);
  --apple-glass-bg-regular: rgba(249,252,255,.71);
  --apple-glass-bg-thick: rgba(252,254,255,.86);
  --apple-glass-border: rgba(255,255,255,.78);
  --apple-glass-sheen: rgba(255,255,255,.54);
  --apple-glass-inner-rim: inset 0 1px 0 rgba(255,255,255,.94), inset 0 -1px 0 rgba(38,74,99,.13);
  --apple-glass-shadow: 0 16px 36px rgba(29,55,70,.11), 0 3px 10px rgba(29,55,70,.04);
}

*,
*::before,
*::after { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  min-height: 100vh;
  overflow-x: hidden;
  color: var(--text);
  background:
    radial-gradient(circle at 12% 5%, rgba(72,198,240,.13), transparent 24%),
    radial-gradient(circle at 88% 34%, rgba(10,185,165,.10), transparent 25%),
    linear-gradient(180deg, #f0f3f5 0%, var(--bg) 48%, #f5f7f8 100%);
  font-family: var(--apple-font-family);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  opacity: .42;
  background:
    radial-gradient(circle at 1px 1px, rgba(13,31,41,.045) 1px, transparent 1.35px) 0 0 / 22px 22px;
}

a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }
a:focus-visible { outline: 3px solid rgba(0,119,200,.26); outline-offset: 4px; }
.shell { width: min(var(--max), calc(100% - 2.625rem)); margin: 0 auto; }

/* Apple material: kept as material, not composition */
.apple-glass-base {
  border: 1px solid var(--apple-glass-border);
  box-shadow: var(--apple-glass-shadow), var(--apple-glass-inner-rim);
  backdrop-filter: blur(var(--apple-glass-blur)) saturate(var(--apple-glass-saturate));
  -webkit-backdrop-filter: blur(var(--apple-glass-blur)) saturate(var(--apple-glass-saturate));
  transform: translateZ(0);
}
.apple-glass-ultra-thin { background: var(--apple-glass-bg-ultra-thin); }
.apple-glass-regular { background: var(--apple-glass-bg-regular); }
.apple-glass-thick { background: var(--apple-glass-bg-thick); }

/* ───────────────────────── Header / floating capsule */
.site-header {
  position: fixed;
  top: .875rem;
  left: 0;
  right: 0;
  z-index: 80;
  width: min(var(--max), calc(100% - 2.625rem));
  margin: 0 auto;
  border-radius: var(--radius-pill);
  /* The leading highlight catches light without an optical distortion shader. */
  background:
    linear-gradient(122deg, var(--apple-glass-sheen), rgba(255,255,255,0) 58%),
    var(--apple-glass-bg-ultra-thin);
  box-shadow: 0 15px 42px rgba(25,56,81,.15), var(--apple-glass-inner-rim);
}
.site-header .shell { width: 100%; }
.nav {
  min-height: 4.375rem;
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: var(--space-4);
  padding: var(--space-2) .625rem var(--space-2) .875rem;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: .625rem;
  flex-shrink: 0;
}
.brand img {
  width: 2.375rem;
  height: 2.375rem;
  object-fit: contain;
  border-radius: 50%;
  background: rgba(255,255,255,.88);
  box-shadow: 0 3px 12px rgba(0,0,0,.08);
}
.brand span { display: flex; flex-direction: column; line-height: 1; }
.brand strong { font-size: .8125rem; letter-spacing: .08em; }
.brand small { margin-top: var(--space-1); color: var(--muted); font: 700 .5625rem/1 var(--apple-font-family); letter-spacing: .13em; }

.nav-links {
  --nav-indicator-x: .1875rem;
  --nav-indicator-w: 0;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: .1875rem;
  min-width: 0;
  padding: .1875rem;
  overflow-x: auto;
  overflow-y: hidden;
  scroll-snap-type: x mandatory;
  scroll-behavior: smooth;
  scroll-padding-inline: 40%;
  overscroll-behavior-inline: contain;
  scrollbar-width: none;
}
.nav-links::-webkit-scrollbar { display: none; }

.nav-indicator {
  position: absolute;
  z-index: 0;
  top: .1875rem;
  left: 0;
  width: var(--nav-indicator-w);
  height: calc(100% - .375rem);
  border-radius: var(--radius-pill);
  background: var(--text);
  box-shadow:
    0 6px 18px rgba(0,0,0,.13),
    inset 0 1px 0 rgba(255,255,255,.28),
    inset 0 -1px 0 rgba(0,0,0,.14);
  opacity: 0;
  transform: translate3d(var(--nav-indicator-x),0,0);
  pointer-events: none;
  will-change: transform, width;
  transition:
    transform .46s cubic-bezier(.16,1,.3,1),
    width .46s cubic-bezier(.16,1,.3,1),
    opacity .18s ease,
    background-color .3s cubic-bezier(.16,1,.3,1);
}
.nav-links.nav-ready .nav-indicator { opacity: 1; }
.nav-links.nav-instant .nav-indicator { transition: none; }

.nav-pill {
  position: relative;
  z-index: 1;
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  gap: .4375rem;
  padding: .625rem .9375rem;
  border-radius: var(--radius-pill);
  color: var(--text-2);
  background: transparent;
  font-size: .8125rem;
  font-weight: 620;
  scroll-snap-align: center;
  scroll-snap-stop: always;
  transition:
    color .32s cubic-bezier(.16,1,.3,1),
    transform .25s ease,
    opacity .25s ease;
}
.nav-pill > span:first-child {
  width: var(--space-1);
  height: var(--space-1);
  border-radius: 50%;
  background: currentColor;
  opacity: .38;
  transition: opacity .25s ease, background-color .25s ease, transform .25s ease;
}
.nav-pill:hover { transform: translateY(-1px); }
.nav-pill.active { color: var(--nav-active-fg); }
.nav-pill.active > span:first-child {
  opacity: 1;
  background: var(--cyan);
  transform: scale(1.15);
}

.nav-actions { display: flex; align-items: center; gap: var(--space-2); }

.theme-toggle {
  width: 2.625rem;
  height: 2.625rem;
  flex: 0 0 2.625rem;
  display: grid;
  place-items: center;
  padding: 0;
  border: 1px solid var(--apple-glass-border);
  border-radius: 50%;
  color: var(--text);
  background:
    linear-gradient(130deg, var(--apple-glass-sheen), transparent 66%),
    var(--apple-glass-bg-regular);
  box-shadow: 0 6px 18px rgba(29,55,70,.10), var(--apple-glass-inner-rim);
  backdrop-filter: blur(14px) saturate(135%);
  -webkit-backdrop-filter: blur(14px) saturate(135%);
  cursor: pointer;
  transform: translateZ(0);
  transition:
    background-color .3s cubic-bezier(.16,1,.3,1),
    color .3s cubic-bezier(.16,1,.3,1),
    border-color .3s cubic-bezier(.16,1,.3,1),
    box-shadow .3s cubic-bezier(.16,1,.3,1);
}
.theme-toggle:hover {
  background:
    linear-gradient(130deg, var(--apple-glass-sheen), transparent 66%),
    var(--apple-glass-bg-thick);
  box-shadow: 0 9px 21px rgba(29,55,70,.14), var(--apple-glass-inner-rim);
}
.theme-toggle-track {
  position: relative;
  width: 1.1875rem;
  height: 1.1875rem;
  display: block;
}
.theme-icon {
  position: absolute;
  inset: 0;
  width: 1.1875rem;
  height: 1.1875rem;
  transition:
    opacity .28s cubic-bezier(.16,1,.3,1),
    transform .42s cubic-bezier(.16,1,.3,1);
}
.theme-icon-sun { opacity: 1; transform: rotate(0deg) scale(1); }
.theme-icon-moon { opacity: 0; transform: rotate(-55deg) scale(.55); }
:root[data-theme="dark"] .theme-icon-sun { opacity: 0; transform: rotate(55deg) scale(.55); }
:root[data-theme="dark"] .theme-icon-moon { opacity: 1; transform: rotate(0deg) scale(1); }

.lang {
  display: inline-flex;
  padding: .1875rem;
  border: 1px solid var(--apple-glass-border);
  border-radius: var(--radius-pill);
  background: var(--apple-glass-bg-regular);
  box-shadow: inset 0 1px 0 var(--apple-glass-sheen), 0 2px 7px rgba(29,55,70,.06);
}
.lang a {
  min-width: 2.125rem;
  padding: var(--space-2) .5625rem;
  border-radius: var(--radius-pill);
  color: var(--muted);
  text-align: center;
  font-size: .6875rem;
  font-weight: 750;
}
.lang a[aria-current="page"] {
  color: #fff;
  background: var(--text);
  box-shadow: 0 3px 10px rgba(18,34,47,.19), inset 0 1px 0 rgba(255,255,255,.25);
}
.github-cta {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  padding: .3125rem .3125rem .3125rem .875rem;
  border: 1px solid var(--apple-glass-border);
  border-radius: var(--radius-pill);
  background:
    linear-gradient(125deg, var(--apple-glass-sheen), transparent 66%),
    var(--apple-glass-bg-regular);
  box-shadow: 0 5px 18px rgba(29,55,70,.10), var(--apple-glass-inner-rim);
  font-size: .8125rem;
  font-weight: 650;
}
.github-mark { width: var(--space-3); height: var(--space-3); }
.github-cta b {
  width: 2.125rem;
  height: 2.125rem;
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: #fff;
  background: var(--text);
  font-size: var(--space-3);
}

/* ───────────────────────── Hero */
.hero-wrap {
  position: relative;
  width: 100%;
  min-height: 100svh;
  min-height: 100dvh;
  margin: 0;
  overflow: hidden;
  isolation: isolate;
  background:
    radial-gradient(circle at 14% 22%, rgba(255,255,255,.56), transparent 32%),
    linear-gradient(180deg, rgba(232,242,247,.84), rgba(238,243,245,.48));
}
.hero {
  position: relative;
  z-index: 7;
  min-height: 100svh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding-top: clamp(8.25rem, 14vh, 10.75rem);
  padding-bottom: clamp(3.375rem, 7vh, 5.25rem);
}

.hero-ghost {
  position: absolute;
  z-index: 0;
  left: 50%;
  top: 50%;
  transform: translate(-50%,-50%);
  white-space: nowrap;
  user-select: none;
  pointer-events: none;
  color: transparent;
  -webkit-text-stroke: 1.6px rgba(12,32,43,.075);
  font-size: clamp(11.25rem, 23vw, 24.375rem);
  font-weight: 900;
  line-height: .78;
  letter-spacing: -.07em;
}

.system-flow {
  position: absolute;
  z-index: 4;
  top: 4vh;
  right: -9vw;
  width: min(1980px, 118vw);
  height: min(780px, 68vh);
  pointer-events: none;
  filter: drop-shadow(0 28px 50px rgba(43,125,167,.10));
  will-change: transform;
}
.system-flow svg {
  width: 100%;
  height: 100%;
  overflow: visible;
}
.flow-ribbon-shadow,
.flow-ribbon-back,
.flow-ribbon-main,
.flow-ribbon-front {
  stroke: none;
}
.flow-ribbon-shadow { opacity: .82; }
.flow-ribbon-back { opacity: .88; }
.flow-ribbon-main { opacity: .95; }
.flow-ribbon-front { opacity: .72; }
.flow-rim {
  fill: none;
  stroke-width: 2.2;
  stroke-linecap: round;
  stroke-linejoin: round;
  vector-effect: non-scaling-stroke;
}

.flow-glow {
  position: absolute;
  z-index: 1;
  border-radius: 50%;
  pointer-events: none;
  filter: blur(70px);
  will-change: transform;
}
.flow-glow-a {
  width: 720px;
  height: 720px;
  top: -130px;
  right: -120px;
  background: radial-gradient(circle, rgba(54,194,244,.31), transparent 69%);
}
.flow-glow-b {
  width: 560px;
  height: 560px;
  top: 36%;
  right: 18%;
  background: radial-gradient(circle, rgba(21,198,170,.20), transparent 70%);
}

/* The landscape is now an immersive environment layer, not a card. */
.hero-scene {
  position: absolute;
  z-index: 2;
  inset: 0 0 0 36%;
  width: auto;
  height: 100%;
  margin: 0;
  overflow: hidden;
  border: 0;
  border-radius: 0;
  opacity: .76;
  box-shadow: none;
  transform: translateZ(0);
  -webkit-mask-image:
    linear-gradient(90deg, transparent 0%, rgba(0,0,0,.16) 8%, #000 36%, #000 100%);
  mask-image:
    linear-gradient(90deg, transparent 0%, rgba(0,0,0,.16) 8%, #000 36%, #000 100%);
}
.hero-scene::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  background:
    linear-gradient(90deg, rgba(238,243,245,.44) 0%, transparent 34%),
    linear-gradient(180deg, rgba(230,240,245,.06), rgba(230,240,245,.08) 65%, rgba(236,241,244,.44) 100%);
  pointer-events: none;
}
.hero-scene::after {
  content: "";
  position: absolute;
  inset: auto 0 0;
  z-index: 2;
  height: 34%;
  background: linear-gradient(180deg, transparent, rgba(236,241,244,.54));
  pointer-events: none;
}
.hero-scene img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 58% center;
  filter: saturate(.86) contrast(.96) brightness(1.04);
  transform: scale(1.035);
  will-change: transform;
}

.eyebrow {
  position: relative;
  z-index: 6;
  display: inline-flex;
  align-items: center;
  align-self: flex-start;
  gap: .5625rem;
  margin: 0 0 clamp(1.125rem,2.4vh,1.75rem);
  color: var(--text-2);
  font-size: .6875rem;
  font-weight: 700;
  letter-spacing: .12em;
}
.eyebrow::before {
  content: "";
  width: .75rem;
  height: 1px;
  background: currentColor;
}
.eyebrow::after {
  content: "";
  width: var(--space-1);
  height: var(--space-1);
  margin-left: .1875rem;
  border-radius: 50%;
  background: var(--teal);
}

.hero-title {
  position: relative;
  z-index: 6;
  margin: 0;
  max-width: min(73.75rem, 90vw);
  color: var(--text);
  font-size: clamp(4.5rem, 7.45vw, 7.75rem);
  font-weight: 840;
  line-height: .90;
  letter-spacing: -.062em;
}
html[lang="zh-CN"] .hero-title {
  font-size: clamp(4.875rem, 8.4vw, 8.5rem);
  line-height: .92;
  letter-spacing: -.06em;
}
.hero-line {
  display: flex;
  align-items: center;
  gap: clamp(.625rem,1.15vw,1.25rem);
  min-height: .95em;
}
.hero-line:not(.hero-line-mixed) { overflow: hidden; }
.hero-word { display: inline-block; will-change: transform, opacity; }
.hero-accent { color: var(--blue); }
.hero-line-mixed { flex-wrap: wrap; }
.hero-inline-note {
  width: min(16.25rem, 18vw);
  margin-right: var(--space-1);
  color: var(--text-2);
  font-size: clamp(.6875rem,.86vw,.875rem);
  font-weight: 440;
  line-height: 1.42;
  letter-spacing: 0;
}
.hero-paren {
  display: inline-block;
  color: var(--text);
  font-size: .72em;
  font-weight: 420;
  line-height: 1;
}
.hero-logo-token {
  width: clamp(3.375rem, 4.5vw, 4.5rem);
  height: clamp(3.375rem, 4.5vw, 4.5rem);
  display: inline-grid;
  place-items: center;
  overflow: hidden;
  border-radius: 50%;
  background: rgba(255,255,255,.76);
  border: 1px solid rgba(255,255,255,.90);
  box-shadow: 0 12px 26px rgba(26,71,95,.13), inset 0 1px 0 rgba(255,255,255,.95);
}
.hero-logo-token img { width: 86%; height: 86%; object-fit: contain; }
.hero-signal {
  display: inline-flex;
  align-items: center;
  min-height: clamp(2.875rem, 4vw, 4rem);
  padding: 0 1.125rem;
  border-radius: var(--radius-pill);
  color: #fff;
  background: linear-gradient(135deg, #0a85c4, #0aa897);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.32), 0 18px 30px rgba(0,119,200,.16);
  font-size: clamp(.625rem,.76vw,.75rem);
  font-weight: 800;
  letter-spacing: .08em;
  white-space: nowrap;
}

.hero-badge {
  position: absolute;
  z-index: 9;
  left: 53%;
  top: 61%;
  width: 7.375rem;
  height: 7.375rem;
  will-change: transform;
}
.hero-badge > svg { position: absolute; inset: 0; width: 100%; height: 100%; animation: ring-spin 18s linear infinite; }
.hero-badge text { fill: var(--text-2); font-size: .5rem; font-weight: 720; letter-spacing: .125rem; }
.hero-badge defs path { fill: none; }
.hero-badge > span {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 2.25rem;
  height: 2.25rem;
  transform: translate(-50%,-50%);
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: rgba(255,255,255,.82);
  box-shadow: 0 6px 15px rgba(0,0,0,.08), inset 0 1px 0 #fff;
}
.hero-badge img { width: 1.875rem; height: 1.875rem; object-fit: contain; }
@keyframes ring-spin { to { transform: rotate(360deg); } }

.hero-bottom {
  position: relative;
  z-index: 8;
  display: grid;
  grid-template-columns: 1fr minmax(20.625rem, 25.625rem);
  align-items: end;
  gap: 3.5rem;
  margin-top: clamp(2.625rem, 6vh, 4.5rem);
}
.hero-actions { display: flex; flex-wrap: wrap; gap: .625rem; }
.hero-cta {
  display: inline-flex;
  align-items: center;
  gap: 1.375rem;
  padding: var(--space-2) var(--space-2) var(--space-2) 1.25rem;
  border: 1px solid var(--apple-glass-border);
  border-radius: var(--radius-pill);
  background:
    linear-gradient(125deg, var(--apple-glass-sheen), transparent 60%),
    var(--apple-glass-bg-regular);
  box-shadow: 0 9px 26px rgba(24,65,87,.13), var(--apple-glass-inner-rim);
  backdrop-filter: blur(14px) saturate(135%);
  -webkit-backdrop-filter: blur(14px) saturate(135%);
  font-size: .8125rem;
  font-weight: 670;
}
.hero-cta b {
  width: 2.125rem;
  height: 2.125rem;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 4px 10px rgba(0,0,0,.06);
}
.hero-cta-dark {
  color: #fff;
  border-color: rgba(255,255,255,.2);
  background: var(--text);
  box-shadow: 0 10px 28px rgba(15,32,43,.19), inset 0 1px 0 rgba(255,255,255,.2);
}
.hero-cta:not(.hero-cta-dark):hover,
.github-cta:hover { box-shadow: 0 12px 28px rgba(24,65,87,.16), var(--apple-glass-inner-rim); }
.theme-toggle:focus-visible { outline: 3px solid var(--blue); outline-offset: 3px; }
.hero-cta-dark b { color: var(--text); }

.hero-resources {
  position: relative;
  z-index: 9;
  display: grid;
  border-top: 1px solid rgba(12,32,43,.16);
  backdrop-filter: blur(5px);
  -webkit-backdrop-filter: blur(5px);
}
.hero-resource {
  display: grid;
  grid-template-columns: 5.125rem 1fr auto;
  align-items: center;
  gap: .75rem;
  padding: .75rem var(--space-1);
  border-bottom: 1px solid rgba(12,32,43,.16);
  color: var(--muted);
  transition: color .22s ease, padding .22s ease;
}
.hero-resource span { font-size: .625rem; font-weight: 760; letter-spacing: .06em; text-transform: uppercase; }
.hero-resource strong { color: currentColor; font-size: .8125rem; font-weight: 680; }
.hero-resource b { font-size: .9375rem; }
.hero-resource:hover,
.hero-resource.active { color: var(--text); padding-left: var(--space-2); }

/* ───────────────────────── Sections */
.section { padding: 6.5rem 0; }
.section-head {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 2.125rem;
  margin-bottom: 2.125rem;
}
.kicker {
  margin: 0 0 var(--space-2);
  color: var(--muted);
  font-size: .625rem;
  font-weight: 780;
  letter-spacing: .22em;
}
.section h2 {
  margin: 0;
  font-size: clamp(2.5rem,4.6vw,4rem);
  line-height: .98;
  letter-spacing: -.045em;
}
.section-note { max-width: 26.875rem; margin: 0; color: var(--muted); text-align: right; font-size: .8125rem; line-height: 1.7; }

/* Purposeful colour behind the project glass; not a page-wide neon wash. */
#projects {
  background:
    radial-gradient(ellipse at 18% 25%, rgba(73,174,217,.16), transparent 50%),
    radial-gradient(ellipse at 88% 84%, rgba(231,188,152,.13), transparent 48%);
}

/* Bento project composition */
.projects {
  display: grid;
  grid-template-columns: repeat(12, minmax(0,1fr));
  gap: var(--space-3);
}
.project {
  position: relative;
  min-height: 18.25rem;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  padding: 1.5625rem;
  border-radius: 1.5rem;
  transform-style: preserve-3d;
  will-change: transform;
  transition: border-color .25s ease, box-shadow .25s ease;
}
.project:nth-child(1),
.project:nth-child(4),
.project:nth-child(5),
.project:nth-child(8) { grid-column: span 7; }
.project:nth-child(2),
.project:nth-child(3),
.project:nth-child(6),
.project:nth-child(7) { grid-column: span 5; }
.project:nth-child(1),
.project:nth-child(4) { min-height: 20.625rem; }
.project::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    radial-gradient(circle at 95% 5%, rgba(70,165,205,.14), transparent 37%),
    linear-gradient(140deg, rgba(255,255,255,.32), transparent 47%);
}
.project::after {
  position: absolute;
  right: 1.25rem;
  bottom: -1.375rem;
  color: rgba(18,47,63,.055);
  font-size: 7.25rem;
  font-weight: 900;
  line-height: 1;
  letter-spacing: -.08em;
}
.project:nth-child(1)::after { content: "01"; }
.project:nth-child(2)::after { content: "02"; }
.project:nth-child(3)::after { content: "03"; }
.project:nth-child(4)::after { content: "04"; }
.project:nth-child(5)::after { content: "05"; }
.project:nth-child(6)::after { content: "06"; }
.project:nth-child(7)::after { content: "07"; }
.project:nth-child(8)::after { content: "08"; }
.project > * { position: relative; z-index: 1; }
.project:hover {
  border-color: rgba(255,255,255,.95);
  box-shadow: 0 23px 49px rgba(29,66,86,.17), var(--apple-glass-inner-rim);
}
.project-top { display: flex; justify-content: space-between; align-items: start; }
.project-icon {
  width: 3.125rem;
  height: 3.125rem;
  display: grid;
  place-items: center;
  border-radius: .9375rem;
  color: #096b99;
  background: rgba(226,245,252,.74);
  border: 1px solid var(--apple-glass-border);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.93), inset 0 -1px 0 rgba(33,103,133,.10);
}
.project-icon svg { width: var(--space-5); height: var(--space-5); }
.project-arrow { color: #80919b; font-size: var(--space-4); }
.project h3 { margin: 1.625rem 0 .625rem; font-size: clamp(1.1875rem,1.7vw,1.5625rem); line-height: 1.08; letter-spacing: -.025em; }
.project p { max-width: 40.625rem; margin: 0; color: #62717b; font-size: .84375rem; line-height: 1.72; }
.tags { display: flex; flex-wrap: wrap; gap: .375rem; margin-top: 1.1875rem; }
.tag {
  padding: .3125rem var(--space-2);
  border-radius: var(--radius-pill);
  color: #3f7189;
  background: rgba(235,247,251,.72);
  border: 1px solid rgba(255,255,255,.80);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.82);
  font-size: .625rem;
  font-weight: 720;
}
.project-meta {
  display: flex;
  flex-wrap: wrap;
  gap: .4375rem .75rem;
  margin-top: auto;
  padding-top: var(--space-5);
  color: #71818b;
  font-size: .65625rem;
  font-weight: 650;
}
.project-meta span + span::before { content: "•"; margin-right: .75rem; color: #b7c3c9; }

/* Journey */
.journey {
  position: relative;
  overflow: hidden;
  background: rgba(255,255,255,.22);
  border-top: 1px solid rgba(255,255,255,.68);
  border-bottom: 1px solid rgba(255,255,255,.68);
}
.journey::before {
  content: "BUILD / ITERATE / MAINTAIN";
  position: absolute;
  right: -1.25rem;
  top: 1.125rem;
  color: transparent;
  -webkit-text-stroke: 1px rgba(15,37,49,.06);
  font-size: clamp(4.375rem,11vw,10.625rem);
  font-weight: 900;
  letter-spacing: -.06em;
  white-space: nowrap;
  pointer-events: none;
}
.timeline {
  position: relative;
  display: grid;
  grid-template-columns: repeat(3,1fr);
  gap: var(--space-8);
  margin-top: 2.625rem;
}
.timeline::before {
  content: "";
  position: absolute;
  top: 1.0625rem;
  left: 1.0625rem;
  right: 1.0625rem;
  height: 1px;
  background: rgba(31,92,122,.24);
}
.phase { position: relative; padding-top: 3.25rem; }
.phase-dot {
  position: absolute;
  top: 0;
  left: 0;
  z-index: 2;
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: #06709f;
  background: rgba(237,249,252,.82);
  border: 5px solid #eef2f4;
  box-shadow: 0 0 0 1px rgba(44,160,197,.25);
  font-size: .625rem;
  font-weight: 850;
}
.phase time { color: var(--muted); font-size: .6875rem; font-weight: 760; letter-spacing: .04em; }
.phase h3 { margin: .6875rem 0 .4375rem; font-size: 1.125rem; }
.phase p { margin: 0; color: #76858e; font-size: .8125rem; line-height: 1.7; }

/* Principles */
.principles { display: grid; grid-template-columns: repeat(3,1fr); gap: var(--space-3); }
.principle {
  min-height: 11.5rem;
  position: relative;
  padding: 1.625rem 1.5625rem 1.5rem 4.875rem;
  border-radius: 1.375rem;
  transform-style: preserve-3d;
  will-change: transform;
}
.principle-icon {
  position: absolute;
  left: var(--space-5);
  top: 1.625rem;
  width: 2.375rem;
  height: 2.375rem;
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: #087ca9;
  background: rgba(226,246,252,.76);
}
.principle-no { position: absolute; right: 1.25rem; top: 1.0625rem; color: #b7c3c9; font-size: .625rem; font-weight: 800; }
.principle h3 { margin: var(--space-1) 0 var(--space-2); font-size: var(--space-4); letter-spacing: -.02em; }
.principle p { margin: 0; color: #75848d; font-size: .8125rem; line-height: 1.65; }

/* Footer */
.site-footer {
  border-left: 0;
  border-right: 0;
  border-bottom: 0;
}
.footer-row {
  min-height: 8rem;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: var(--space-6);
}
.footer-brand { display: flex; align-items: center; gap: .75rem; }
.footer-brand img { width: 2.75rem; height: 2.75rem; object-fit: contain; }
.footer-brand strong { display:block; font-size:.75rem; letter-spacing:.06em; }
.footer-brand small { display:block; margin-top:var(--space-1); color:var(--muted); font-size:.6875rem; }
.footer-links { display:flex; flex-wrap:wrap; gap:var(--space-4); color:var(--text-2); font-size:.75rem; }
.footer-note { justify-self:end; max-width:17.5rem; color:var(--muted); text-align:right; font-size:.75rem; }

/* Dark material */
:root[data-theme="dark"] {
  color-scheme: dark;
  --bg: #101416;
  --bg-2: #171c1f;
  --text: #f5f5f7;
  --text-2: #d1d1d6;
  --muted: #9ea7ad;
  --line: rgba(255,255,255,.12);
  --line-soft: rgba(255,255,255,.07);
  --blue: #38a7ff;
  --nav-active-fg: #111111;
  --apple-glass-bg-ultra-thin: rgba(25,37,45,.66);
  --apple-glass-bg-regular: rgba(28,40,48,.76);
  --apple-glass-bg-thick: rgba(30,43,52,.87);
  --apple-glass-border: rgba(228,244,255,.20);
  --apple-glass-sheen: rgba(231,248,255,.12);
  --apple-glass-inner-rim: inset 0 1px 0 rgba(235,248,255,.23), inset 0 -1px 0 rgba(0,0,0,.28);
  --apple-glass-shadow: 0 17px 39px rgba(0,0,0,.28), 0 3px 10px rgba(0,0,0,.12);
}
:root[data-theme="light"] { color-scheme: light; }

:root[data-theme="dark"] body {
  background:
    radial-gradient(circle at 12% 5%, rgba(44,153,224,.12), transparent 24%),
    radial-gradient(circle at 88% 34%, rgba(13,186,165,.09), transparent 25%),
    linear-gradient(180deg,#101416,#13191c 48%,#0d1113);
}
:root[data-theme="dark"] body::before { opacity: .20; filter: invert(1); }
:root[data-theme="dark"] .brand img,
:root[data-theme="dark"] .hero-logo-token,
:root[data-theme="dark"] .hero-badge > span { background: rgba(255,255,255,.94); }
:root[data-theme="dark"] .github-cta b,
:root[data-theme="dark"] .hero-cta-dark { background: #f5f5f7; color: #111; }
:root[data-theme="dark"] .github-cta {
  background:
    linear-gradient(125deg, var(--apple-glass-sheen), transparent 66%),
    var(--apple-glass-bg-regular);
}
:root[data-theme="dark"] .theme-toggle {
  color: #f5f5f7;
  background:
    linear-gradient(130deg, var(--apple-glass-sheen), transparent 66%),
    var(--apple-glass-bg-regular);
  border-color: var(--apple-glass-border);
  box-shadow: 0 7px 20px rgba(0,0,0,.24), var(--apple-glass-inner-rim);
}
:root[data-theme="dark"] .theme-toggle:hover { background: var(--apple-glass-bg-thick); }
:root[data-theme="dark"] .lang { background: var(--apple-glass-bg-regular); }
:root[data-theme="dark"] .lang a[aria-current="page"] {
  background: #f5f5f7; color: #111;
  box-shadow: 0 3px 10px rgba(0,0,0,.25), inset 0 1px 0 rgba(255,255,255,.55);
}
:root[data-theme="dark"] .hero-ghost { -webkit-text-stroke-color: rgba(255,255,255,.055); }
:root[data-theme="dark"] .system-flow {
  opacity: .72;
  filter: drop-shadow(0 24px 44px rgba(0,0,0,.20));
}
:root[data-theme="dark"] .flow-ribbon-shadow { opacity: .46; }
:root[data-theme="dark"] .flow-ribbon-back { opacity: .64; }
:root[data-theme="dark"] .flow-ribbon-main { opacity: .78; }
:root[data-theme="dark"] .flow-ribbon-front { opacity: .56; }
:root[data-theme="dark"] .flow-rim { opacity: .34; }
:root[data-theme="dark"] .hero-wrap {
  background:
    radial-gradient(circle at 14% 22%, rgba(20,36,45,.58), transparent 32%),
    linear-gradient(180deg, #0f171b, #101416);
}
:root[data-theme="dark"] .hero-scene { opacity:.56; }
:root[data-theme="dark"] .hero-scene::before {
  background:
    linear-gradient(90deg, rgba(16,20,22,.54) 0%, transparent 36%),
    linear-gradient(180deg, rgba(16,20,22,.08), rgba(16,20,22,.10) 65%, rgba(16,20,22,.52) 100%);
}
:root[data-theme="dark"] .hero-scene::after {
  background: linear-gradient(180deg, transparent, rgba(16,20,22,.62));
}
:root[data-theme="dark"] .hero-scene img { filter: saturate(.74) contrast(1.04) brightness(.60); }
:root[data-theme="dark"] .hero-resource,
:root[data-theme="dark"] .hero-resources { border-color: rgba(255,255,255,.13); }
:root[data-theme="dark"] .hero-cta {
  background: linear-gradient(125deg, var(--apple-glass-sheen), transparent 62%), var(--apple-glass-bg-regular);
  border-color: var(--apple-glass-border);
}
:root[data-theme="dark"] .hero-cta-dark {
  color: #111;
  background: #f5f5f7;
  border-color: transparent;
}
:root[data-theme="dark"] .hero-cta b { background:#f5f5f7; color:#111; }
:root[data-theme="dark"] .hero-cta-dark b { background:#111; color:#fff; }
:root[data-theme="dark"] .project p,
:root[data-theme="dark"] .project-meta,
:root[data-theme="dark"] .phase p,
:root[data-theme="dark"] .phase time,
:root[data-theme="dark"] .principle p,
:root[data-theme="dark"] .section-note { color: var(--muted); }
:root[data-theme="dark"] .project::after { color: rgba(255,255,255,.04); }
:root[data-theme="dark"] .tag { color:#b8dff3; background:rgba(41,151,255,.09); border-color:rgba(255,255,255,.08); }
:root[data-theme="dark"] .journey { background:rgba(0,0,0,.12); border-color:rgba(255,255,255,.08); }
:root[data-theme="dark"] .journey::before { -webkit-text-stroke-color: rgba(255,255,255,.04); }
:root[data-theme="dark"] .phase-dot { border-color:#13191c; background:rgba(41,151,255,.13); color:#7ec8ff; }
:root[data-theme="dark"] #projects {
  background:
    radial-gradient(ellipse at 18% 25%, rgba(61,151,194,.13), transparent 52%),
    radial-gradient(ellipse at 88% 84%, rgba(149,117,87,.10), transparent 48%);
}

/* Fallback */
@supports not ((-webkit-backdrop-filter: blur(10px)) or (backdrop-filter: blur(10px))) {
  .apple-glass-ultra-thin,
  .apple-glass-regular,
  .apple-glass-thick,
  .hero-cta,
  .theme-toggle,
  .lang,
  .github-cta { background: rgba(250,253,255,.97); }

  :root[data-theme="dark"] .apple-glass-ultra-thin,
  :root[data-theme="dark"] .apple-glass-regular,
  :root[data-theme="dark"] .apple-glass-thick,
  :root[data-theme="dark"] .hero-cta,
  :root[data-theme="dark"] .theme-toggle,
  :root[data-theme="dark"] .lang,
  :root[data-theme="dark"] .github-cta { background: rgba(28,36,42,.97); }
  .hero-cta-dark { background: #0b1014; color: #fff; }
  :root[data-theme="dark"] .hero-cta-dark { background: #f5f5f7; color: #111; }
}

/* Responsive */
@media (max-width: 1050px) {
  .site-header { border-radius: 1.75rem; }
  .nav {
    grid-template-columns: 1fr auto;
    row-gap: .1875rem;
    padding-bottom: .5625rem;
  }
  .nav-links {
    grid-column: 1 / -1;
    grid-row: 2;
    justify-content: flex-start;
    width: 100%;
    padding: .1875rem;
  }

  .hero {
    min-height: 100svh;
    min-height: 100dvh;
    padding-top: clamp(9.75rem, 17vh, 11.75rem);
  }
  .hero-title { font-size: clamp(4rem, 8.4vw, 6rem); }
  html[lang="zh-CN"] .hero-title { font-size: clamp(4.375rem, 9.3vw, 6.75rem); }
  .hero-inline-note { width: 13.4375rem; }
  .hero-badge { left: 58%; top: 61%; }
  .system-flow {
    top: 2vh;
    right: -32vw;
    width: 146vw;
    height: 62vh;
  }
  .hero-scene { left: 43%; opacity: .62; }
  .project:nth-child(n) { grid-column: span 6; }
}

@media (max-width: 760px) {
  .shell { width:min(var(--max),calc(100% - 1.75rem)); }

  .site-header {
    position: fixed;
    top: .625rem;
    width: calc(100% - 1.25rem);
    margin: 0 auto;
    border-radius: 1.5rem;
  }
  .nav { min-height:3.875rem; padding:.4375rem .5rem .5625rem .6875rem; row-gap: var(--space-1); }
  .brand img { width:2.125rem; height:2.125rem; }
  .nav-links {
    margin-top: .125rem;
    padding-inline: .1875rem;
    scroll-padding-inline: 34%;
  }
  .nav-pill { padding: .5625rem .8125rem; font-size: .75rem; }
  .theme-toggle { width:2.375rem; height:2.375rem; flex-basis:2.375rem; }
  .theme-toggle-track,.theme-icon { width:1.0625rem; height:1.0625rem; }
  .github-cta span,.github-mark { display:none; }
  .github-cta { padding:var(--space-1); background:transparent; box-shadow:none; }
  .lang a { min-width:1.875rem; padding:.4375rem; }

  .hero-wrap {
    min-height: 100svh;
    min-height: 100dvh;
  }
  .hero {
    min-height: 100svh;
    min-height: 100dvh;
    justify-content: flex-start;
    padding-top: clamp(9.25rem, 18vh, 11rem);
    padding-bottom: 2.75rem;
  }

  .system-flow {
    top: 8px;
    right: -470px;
    width: 1120px;
    height: 470px;
    opacity: .88;
  }
  .flow-glow-a { width:430px; height:430px; right:-130px; top:-40px; }
  .flow-glow-b { width:340px; height:340px; top:34%; right:-60px; }

  .hero-ghost {
    top: 45%;
    font-size: clamp(8.25rem, 42vw, 11.875rem);
    opacity: .74;
  }

  .hero-scene {
    inset: auto -38% 0 32%;
    width: auto;
    height: 48%;
    opacity: .48;
    -webkit-mask-image:
      linear-gradient(90deg, transparent 0%, rgba(0,0,0,.28) 15%, #000 46%, #000 100%);
    mask-image:
      linear-gradient(90deg, transparent 0%, rgba(0,0,0,.28) 15%, #000 46%, #000 100%);
  }
  .hero-scene img {
    object-position: 63% center;
    transform: scale(1.06);
  }

  .eyebrow { margin-bottom:1.125rem; font-size:.5625rem; }
  .hero-title {
    max-width: 100%;
    font-size: clamp(3.125rem, 14.8vw, 4.5rem);
    line-height:.92;
  }
  html[lang="zh-CN"] .hero-title {
    max-width: 100%;
    font-size: clamp(3.25rem, 15.2vw, 4.625rem);
    line-height:.94;
  }
  .hero-line { gap:var(--space-2); }
  .hero-line-mixed { margin:.3125rem 0; }
  .hero-inline-note {
    order:5;
    width:100%;
    max-width:20.625rem;
    margin:.625rem 0 var(--space-1);
    font-size:.6875rem;
    line-height:1.5;
  }
  .hero-logo-token { width:2.875rem; height:2.875rem; }
  .hero-signal { min-height:2.625rem; padding:0 .75rem; font-size:.5625rem; }
  .hero-badge { display:none; }

  .hero-bottom {
    grid-template-columns:1fr;
    gap:1.875rem;
    margin-top: auto;
    padding-top: 2.375rem;
  }
  .hero-resources { max-width:100%; }

  .section { padding:4.25rem 0; }
  .section-head { align-items:start; flex-direction:column; gap:.9375rem; }
  .section-note { text-align:left; }
  .projects { grid-template-columns:1fr; }
  /* Repeated content cards stay readable without sampling many backdrops on small GPUs. */
  .project,
  .principle { backdrop-filter: none; -webkit-backdrop-filter: none; background: var(--apple-glass-bg-thick); }
  .project:nth-child(n) { grid-column:1; min-height:17.1875rem; }
  .timeline { grid-template-columns:1fr; gap:0; }
  .timeline::before { top:1.0625rem; bottom:1.875rem; left:1.0625rem; right:auto; width:1px; height:auto; }
  .phase { padding:0 0 2.375rem 3.625rem; }
  .phase-dot { top:-.25rem; }
  .principles { grid-template-columns:1fr; }
  .footer-row { min-height:0; padding:1.875rem 0; grid-template-columns:1fr; gap:var(--space-4); }
  .footer-note { justify-self:start; text-align:left; }
}

@media (max-width: 430px) {
  .brand span { display:none; }
  .hero {
    padding-top: 9.375rem;
  }
  .hero-title { font-size: clamp(2.875rem, 14.2vw, 4rem); }
  html[lang="zh-CN"] .hero-title { font-size: clamp(3rem, 14.6vw, 4.125rem); }
  .hero-paren { font-size:.62em; }
  .hero-logo-token { width:2.625rem; height:2.625rem; }
  .hero-signal { min-height:2.375rem; padding:0 .5625rem; }
  .hero-actions { width:100%; }
  .hero-cta { flex:1; justify-content:space-between; }
  .hero-resource { grid-template-columns:4.5rem 1fr auto; }
}

#projects,
#journey,
#principles { scroll-margin-top: 9.375rem; }

@supports (animation-timeline: view(inline)) {
  @media (max-width: 1050px) {
    .nav-pill {
      animation: nav-picker-focus linear both;
      animation-timeline: view(inline);
      animation-range: entry 15% cover 50%;
    }
    @keyframes nav-picker-focus {
      from { opacity: .62; transform: scale(.95); }
      to { opacity: 1; transform: scale(1); }
    }
  }
}

/* Accessibility: avoid translucency when the user requests stable high-contrast surfaces. */
@media (prefers-reduced-transparency: reduce), (prefers-contrast: more) {
  .apple-glass-base,
  .hero-cta,
  .theme-toggle,
  .lang,
  .github-cta { backdrop-filter: none; -webkit-backdrop-filter: none; }
  .site-header, .project, .principle, .hero-cta:not(.hero-cta-dark), .theme-toggle, .lang, .github-cta {
    background: #f5f9fc;
    border-color: #8497a4;
  }
  :root[data-theme="dark"] .site-header,
  :root[data-theme="dark"] .project,
  :root[data-theme="dark"] .principle,
  :root[data-theme="dark"] .hero-cta:not(.hero-cta-dark),
  :root[data-theme="dark"] .theme-toggle,
  :root[data-theme="dark"] .lang,
  :root[data-theme="dark"] .github-cta {
    background: #202d35;
    border-color: #8aabbf;
  }
}

@media (forced-colors: active) {
  .apple-glass-base, .hero-cta, .theme-toggle, .github-cta, .lang, .tag {
    color: CanvasText;
    background: Canvas;
    border: 1px solid CanvasText;
    box-shadow: none;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
  }
  .nav-indicator { background: Highlight; box-shadow: none; }
  .nav-pill.active { color: HighlightText; }
  .lang a[aria-current="page"] { color: HighlightText; background: Highlight; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior:auto; }
  *,*::before,*::after { animation-duration:.001ms !important; animation-iteration-count:1 !important; transition:none !important; }
}

::view-transition-old(root),
::view-transition-new(root) {
  animation-duration: .36s;
  animation-timing-function: cubic-bezier(.16,1,.3,1);
}

/* Source: site-header.css */
:root {
 /* Shared header: common CSS for homepage, Blog and Prompt Library. */
 --max:77.5rem;
 --text-2:var(--ink2);
 --nav-active-fg:#fff;--cyan:#49c9f2;--radius-pill:var(--radius-round);
 /* The language selection and GitHub arrow use paired foreground/background colors. */
 --header-control-bg:#0b1014;--header-control-fg:#fff;
 --space-1:var(--size-1);--space-2:var(--size-2);--space-3:var(--size-3);--space-4:var(--size-4);
 --apple-font-family:-apple-system,BlinkMacSystemFont,"SF Pro Display","SF Pro Text","Helvetica Neue",Arial,sans-serif;
 --apple-glass-blur:18px;--apple-glass-saturate:145%;
 --apple-glass-bg-ultra-thin:rgba(245,250,253,.58);--apple-glass-bg-regular:rgba(249,252,255,.71);
 --apple-glass-bg-thick:rgba(252,254,255,.86);--apple-glass-border:rgba(255,255,255,.78);
 --apple-glass-sheen:rgba(255,255,255,.54);
 --apple-glass-inner-rim:inset 0 1px 0 rgba(255,255,255,.94),inset 0 -1px 0 rgba(38,74,99,.13);
 --apple-glass-shadow:0 16px 36px rgba(29,55,70,.11),0 3px 10px rgba(29,55,70,.04);
}
:root[data-theme="dark"]{
 --apple-glass-bg-ultra-thin:rgba(32,44,53,.61);--apple-glass-bg-regular:rgba(36,49,59,.7);
 --apple-glass-bg-thick:rgba(38,53,63,.9);--apple-glass-border:rgba(227,244,255,.28);
 --apple-glass-sheen:rgba(245,253,255,.12);
 --apple-glass-inner-rim:inset 0 1px 0 rgba(240,250,255,.21),inset 0 -1px 0 rgba(0,0,0,.22);
 --apple-glass-shadow:0 16px 36px rgba(0,0,0,.27),0 3px 10px rgba(0,0,0,.13);
 --header-control-bg:#f5f5f7;--header-control-fg:#111;
}
.apple-glass-base {
  border: 1px solid var(--apple-glass-border);
  box-shadow: var(--apple-glass-shadow), var(--apple-glass-inner-rim);
  backdrop-filter: blur(var(--apple-glass-blur)) saturate(var(--apple-glass-saturate));
  -webkit-backdrop-filter: blur(var(--apple-glass-blur)) saturate(var(--apple-glass-saturate));
  transform: translateZ(0);
}
.apple-glass-ultra-thin { background: var(--apple-glass-bg-ultra-thin); }
.apple-glass-regular { background: var(--apple-glass-bg-regular); }
.apple-glass-thick { background: var(--apple-glass-bg-thick); }

/* ───────────────────────── Header / floating capsule */
.site-header {
  position: fixed;
  top: .875rem;
  left: 0;
  right: 0;
  z-index: 80;
  width: min(var(--max), calc(100% - 2.625rem));
  margin: 0 auto;
  border-radius: var(--radius-pill);
  /* The leading highlight catches light without an optical distortion shader. */
  background:
    linear-gradient(122deg, var(--apple-glass-sheen), rgba(255,255,255,0) 58%),
    var(--apple-glass-bg-ultra-thin);
  box-shadow: 0 15px 42px rgba(25,56,81,.15), var(--apple-glass-inner-rim);
}
.site-header .shell { width: 100%; }
.site-header .nav {
  min-height: 4.375rem;
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: var(--space-4);
  padding: var(--space-2) .625rem var(--space-2) .875rem;
}
.site-header .brand {
  display: inline-flex;
  align-items: center;
  gap: .625rem;
  flex-shrink: 0;
}
.site-header .brand img {
  width: 2.375rem;
  height: 2.375rem;
  object-fit: contain;
  border-radius: 50%;
  background: rgba(255,255,255,.88);
  box-shadow: 0 3px 12px rgba(0,0,0,.08);
}
.site-header .brand span { display: flex; flex-direction: column; line-height: 1; }
.site-header .brand strong { font-size: .8125rem; letter-spacing: .08em; }
.site-header .brand small { margin-top: var(--space-1); color: var(--muted); font: 700 .5625rem/1 var(--apple-font-family); letter-spacing: .13em; }

.site-header .nav-links {
  --nav-indicator-x: .1875rem;
  --nav-indicator-w: 0;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: .1875rem;
  min-width: 0;
  padding: .1875rem;
  /* Four primary links fit: allow the AI child menu to escape the capsule. */
  overflow: visible;
  scroll-behavior: smooth;
}
.site-header .nav-links::-webkit-scrollbar { display: none; }

.site-header .nav-indicator {
  position: absolute;
  z-index: 0;
  top: .1875rem;
  left: 0;
  width: var(--nav-indicator-w);
  height: calc(100% - .375rem);
  border-radius: var(--radius-pill);
  background: var(--text);
  box-shadow:
    0 6px 18px rgba(0,0,0,.13),
    inset 0 1px 0 rgba(255,255,255,.28),
    inset 0 -1px 0 rgba(0,0,0,.14);
  opacity: 0;
  transform: translate3d(var(--nav-indicator-x),0,0);
  pointer-events: none;
  will-change: transform, width;
  transition:
    transform .46s cubic-bezier(.16,1,.3,1),
    width .46s cubic-bezier(.16,1,.3,1),
    opacity .18s ease,
    background-color .3s cubic-bezier(.16,1,.3,1);
}
.site-header .nav-links.nav-ready .nav-indicator { opacity: 1; }
.site-header .nav-links.nav-instant .nav-indicator { transition: none; }

.site-header .nav-pill {
  position: relative;
  z-index: 1;
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  gap: .4375rem;
  padding: .625rem .9375rem;
  border-radius: var(--radius-pill);
  color: var(--text-2);
  background: transparent;
  font-size: .8125rem;
  font-weight: 620;
  scroll-snap-align: center;
  scroll-snap-stop: always;
  transition:
    color .32s cubic-bezier(.16,1,.3,1),
    transform .25s ease,
    opacity .25s ease;
}
.site-header .nav-pill > span:first-child {
  width: var(--space-1);
  height: var(--space-1);
  border-radius: 50%;
  background: currentColor;
  opacity: .38;
  transition: opacity .25s ease, background-color .25s ease, transform .25s ease;
}
.site-header .nav-pill:hover { transform: translateY(-1px); }
.site-header .nav-pill.active { color: var(--nav-active-fg); }
.site-header .nav-pill.active > span:first-child {
  opacity: 1;
  background: var(--cyan);
  transform: scale(1.15);
}

/* AI is one primary navigation item with two accessible child links. */
.site-header .nav-group {
  position: relative;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  flex: 0 0 auto;
}
.site-header .nav-group .nav-pill { padding-right: .375rem; }
.site-header .nav-submenu-trigger {
  position: relative;
  z-index: 2;
  display: grid;
  place-items: center;
  width: 2.25rem;
  height: 2.5rem;
  padding: 0;
  border: 0;
  border-radius: .75rem;
  background: transparent;
  color: var(--text-2);
  cursor: pointer;
}
.site-header .nav-group:has(.nav-pill.active) .nav-submenu-trigger { color: var(--nav-active-fg); }
.site-header .nav-submenu-trigger svg { width: .875rem; height: .875rem; transition: transform .2s ease; }
.site-header .nav-submenu-trigger[aria-expanded="true"] svg { transform: rotate(180deg); }
.site-header .nav-submenu-trigger:focus-visible,
.site-header .ai-subnav a:focus-visible { outline: 2px solid var(--cyan); outline-offset: 2px; }
.site-header .ai-subnav {
  position: absolute;
  z-index: 90;
  top: 100%;
  left: 0;
  min-width: 10.5rem;
  display: grid;
  gap: .1875rem;
  padding: .5rem;
  border-radius: 1rem;
  /* The shared GlassSurface owns tint and refraction; no opaque white wash. */
  background: transparent;
  border: 1px solid var(--apple-glass-border);
  box-shadow: 0 12px 30px rgba(16, 35, 52, .17), var(--apple-glass-inner-rim);
}
.site-header .ai-subnav[hidden] { display: none; }
.site-header .ai-subnav > a {
  position: relative;
  z-index: 5;
  display: block;
  white-space: nowrap;
  padding: .6875rem .875rem;
  border-radius: .7rem;
  color: var(--text);
  font-size: .8125rem;
  font-weight: 650;
}
.site-header .ai-subnav > a:hover,
.site-header .ai-subnav > a[aria-current="page"] {
  background: var(--apple-glass-bg-ultra-thin);
  box-shadow: inset 0 0 0 1px var(--apple-glass-border);
}
@media (max-width: 760px) {
  .site-header .nav-group .nav-pill { padding-right: .125rem; }
  .site-header .nav-submenu-trigger { width: 2rem; height: 2.5rem; }
  .site-header .ai-subnav { min-width: 9rem; }
}

.site-header .nav-actions { display: flex; align-items: center; gap: var(--space-2); }

.site-header .theme-toggle {
  width: 2.625rem;
  height: 2.625rem;
  flex: 0 0 2.625rem;
  display: grid;
  place-items: center;
  padding: 0;
  border: 1px solid var(--apple-glass-border);
  border-radius: 50%;
  color: var(--text);
  background:
    linear-gradient(130deg, var(--apple-glass-sheen), transparent 66%),
    var(--apple-glass-bg-regular);
  box-shadow: 0 6px 18px rgba(29,55,70,.10), var(--apple-glass-inner-rim);
  backdrop-filter: blur(14px) saturate(135%);
  -webkit-backdrop-filter: blur(14px) saturate(135%);
  cursor: pointer;
  transform: translateZ(0);
  transition:
    background-color .3s cubic-bezier(.16,1,.3,1),
    color .3s cubic-bezier(.16,1,.3,1),
    border-color .3s cubic-bezier(.16,1,.3,1),
    box-shadow .3s cubic-bezier(.16,1,.3,1);
}
.site-header .theme-toggle:hover {
  background:
    linear-gradient(130deg, var(--apple-glass-sheen), transparent 66%),
    var(--apple-glass-bg-thick);
  box-shadow: 0 9px 21px rgba(29,55,70,.14), var(--apple-glass-inner-rim);
}
.site-header .theme-toggle-track {
  position: relative;
  width: 1.1875rem;
  height: 1.1875rem;
  display: block;
}
.site-header .theme-icon {
  position: absolute;
  inset: 0;
  width: 1.1875rem;
  height: 1.1875rem;
  transition:
    opacity .28s cubic-bezier(.16,1,.3,1),
    transform .42s cubic-bezier(.16,1,.3,1);
}
.site-header .theme-icon-sun { opacity: 1; transform: rotate(0deg) scale(1); }
.site-header .theme-icon-moon { opacity: 0; transform: rotate(-55deg) scale(.55); }
:root[data-theme="dark"] .site-header .theme-icon-sun { opacity: 0; transform: rotate(55deg) scale(.55); }
:root[data-theme="dark"] .site-header .theme-icon-moon { opacity: 1; transform: rotate(0deg) scale(1); }

.site-header .lang {
  display: inline-flex;
  padding: .1875rem;
  border: 1px solid var(--apple-glass-border);
  border-radius: var(--radius-pill);
  background: var(--apple-glass-bg-regular);
  box-shadow: inset 0 1px 0 var(--apple-glass-sheen), 0 2px 7px rgba(29,55,70,.06);
}
.site-header .lang a {
  min-width: 2.125rem;
  padding: var(--space-2) .5625rem;
  border-radius: var(--radius-pill);
  color: var(--muted);
  text-align: center;
  font-size: .6875rem;
  font-weight: 750;
}
.site-header .lang a[aria-current="page"] {
  color: var(--header-control-fg);
  background: var(--header-control-bg);
  box-shadow: 0 3px 10px rgba(18,34,47,.19), inset 0 1px 0 rgba(255,255,255,.25);
}
.site-header .github-cta {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  padding: .3125rem .3125rem .3125rem .875rem;
  border: 1px solid var(--apple-glass-border);
  border-radius: var(--radius-pill);
  background:
    linear-gradient(125deg, var(--apple-glass-sheen), transparent 66%),
    var(--apple-glass-bg-regular);
  box-shadow: 0 5px 18px rgba(29,55,70,.10), var(--apple-glass-inner-rim);
  font-size: .8125rem;
  font-weight: 650;
}
.site-header .github-mark { width: var(--space-3); height: var(--space-3); }
.site-header .github-cta b {
  width: 2.125rem;
  height: 2.125rem;
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: var(--header-control-fg);
  background: var(--header-control-bg);
  font-size: var(--space-3);
}

@media (max-width:1050px){
 .site-header{border-radius:1.75rem}
 .site-header .nav{grid-template-columns:1fr auto;row-gap:.1875rem;padding-bottom:.5625rem}
 .site-header .nav-links{grid-column:1/-1;grid-row:2;justify-content:flex-start;width:100%;padding:.1875rem}
}
@media (max-width:760px){
 .site-header{top:.625rem;width:calc(100% - 1.25rem);border-radius:1.5rem}
 .site-header .nav{min-height:3.875rem;padding:.4375rem .5rem .5625rem .6875rem;row-gap:var(--space-1)}
 .site-header .brand img{width:2.125rem;height:2.125rem}
 .site-header .nav-links{margin-top:.125rem;padding-inline:.1875rem;gap:.125rem;justify-content:flex-start;overflow-x:auto;overflow-y:hidden;scrollbar-width:none;scroll-padding-inline:34%}
 .site-header .nav-links:has(.nav-submenu-trigger[aria-expanded="true"]){overflow:visible}
 .site-header .nav-pill{padding:.5rem .5rem;font-size:.75rem}
 .site-header .theme-toggle{width:2.375rem;height:2.375rem;flex-basis:2.375rem}
 .site-header .theme-toggle-track,.site-header .theme-icon{width:1.0625rem;height:1.0625rem}
 .site-header .github-cta span,.site-header .github-mark{display:none}
 .site-header .github-cta{padding:var(--space-1);background:transparent;box-shadow:none}
 .site-header .lang a{min-width:1.875rem;padding:.4375rem}
}
.prompts-page #main{padding-top:clamp(110px,12vw,150px)}
.prompts-page .site-header .brand span{display:flex;flex-direction:column;align-items:flex-start;gap:0}
.prompts-page .site-header .nav-links{scrollbar-width:none}
.prompts-page .site-header .nav-links a{white-space:nowrap}
.prompts-page .site-header .github-cta b{font-size:var(--space-3)}
@media(max-width:760px){.prompts-page #main{padding-top:132px}}
@media(max-width:430px){.prompts-page .site-header .brand span{display:none}}

/* Source: portfolio-liquid-glass.css */
/*
 * Portfolio liquid glass adaptation of Witters Amand's "Liquid Glass Apple"
 * https://codepen.io/wprod/pen/raVpwJL (MIT)
 *
 * Each material is composed from three independent layers:
 * backdrop refraction, translucent tint, and an optical edge highlight.
 * Content, motion and layout remain owned by portfolio.css.
 */
:root {
  --lg-demo-overlay: rgba(246, 252, 255, .19);
  --lg-demo-reflection: rgba(255, 255, 255, .32);
  --lg-demo-rim: rgba(255, 255, 255, .94);
  --lg-demo-depth: rgba(32, 79, 108, .16);
}
:root[data-theme="dark"] {
  --lg-demo-overlay: rgba(32, 44, 53, .29);
  --lg-demo-reflection: rgba(225, 244, 255, .075);
  --lg-demo-rim: rgba(231, 248, 255, .40);
  --lg-demo-depth: rgba(0, 0, 0, .37);
}

/* Remove the original opaque card wash so background can pass through the glass. */
.liquid-demo {
  isolation: isolate;
  background: transparent;
  border-color: rgba(255, 255, 255, .68);
  box-shadow:
    0 11px 30px var(--lg-demo-depth),
    0 2px 9px rgba(24, 64, 89, .045),
    inset 0 1px 0 var(--lg-demo-rim);
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
}
:root[data-theme="dark"] .liquid-demo { border-color: rgba(225, 243, 255, .24); }

/* Three explicit layers, matching the demo's glass-filter, overlay, specular. */
.liquid-demo > .lg-glass-filter,
.liquid-demo > .lg-glass-overlay,
.liquid-demo > .lg-glass-specular {
  position: absolute;
  inset: 0;
  display: block;
  border-radius: inherit;
  pointer-events: none;
}
.liquid-demo > .lg-glass-filter {
  z-index: 0;
  -webkit-backdrop-filter: blur(8px) saturate(142%) brightness(1.055);
  backdrop-filter: blur(8px) saturate(142%) brightness(1.055);
}
.liquid-demo > .lg-glass-overlay {
  z-index: 1;
  background:
    linear-gradient(130deg, var(--lg-demo-reflection), transparent 53%),
    var(--lg-demo-overlay);
}
.liquid-demo > .lg-glass-specular {
  z-index: 2;
  box-shadow:
    inset 1px 1px 0 var(--lg-demo-rim),
    inset -1px -1px 0 rgba(255, 255, 255, .16),
    inset 0 0 8px rgba(255, 255, 255, .21),
    inset 0 -12px 19px -20px rgba(41, 101, 130, .24);
}
:root[data-theme="dark"] .liquid-demo > .lg-glass-specular {
  box-shadow:
    inset 1px 1px 0 var(--lg-demo-rim),
    inset -1px -1px 0 rgba(0, 0, 0, .47),
    inset 0 0 7px rgba(221, 244, 255, .10);
}

/* AI submenu: reuse the same three GlassSurface layers, but keep the
 * compact popover genuinely translucent. The header's opaque submenu tint
 * previously hid the backdrop even though its glass layers were present.
 * Avoid applying backdrop blur to the outer menu, which would create a nested
 * backdrop root and prevent the inner refraction layer from seeing the page. */
.site-header .ai-subnav.liquid-demo {
  background: transparent;
  box-shadow:
    0 17px 38px rgba(21, 53, 76, .18),
    0 4px 12px rgba(22, 56, 81, .09),
    inset 0 1px 0 var(--lg-demo-rim);
}
.site-header .ai-subnav.liquid-demo > .lg-glass-filter {
  -webkit-backdrop-filter: blur(14px) saturate(165%) brightness(1.04);
  backdrop-filter: blur(14px) saturate(165%) brightness(1.04);
}
.site-header .ai-subnav.liquid-demo > .lg-glass-overlay {
  background:
    linear-gradient(135deg, rgba(255, 255, 255, .39), rgba(222, 244, 255, .10) 53%, rgba(125, 182, 214, .12)),
    rgba(239, 250, 255, .07);
}
.site-header .ai-subnav.liquid-demo > .lg-glass-specular {
  box-shadow:
    inset 1px 1px 0 rgba(255, 255, 255, .92),
    inset -1px -1px 0 rgba(165, 204, 226, .31),
    inset 0 0 12px rgba(255, 255, 255, .20);
}
:root[data-theme="dark"] .site-header .ai-subnav.liquid-demo {
  box-shadow: 0 17px 38px rgba(0, 0, 0, .36),
              0 4px 12px rgba(0, 0, 0, .19),
              inset 0 1px 0 rgba(225, 248, 255, .30);
}
:root[data-theme="dark"] .site-header .ai-subnav.liquid-demo > .lg-glass-overlay {
  background:
    linear-gradient(140deg, rgba(228, 246, 255, .12), rgba(63, 101, 125, .09) 48%, rgba(12, 25, 36, .19)),
    rgba(18, 35, 46, .16);
}
:root[data-theme="dark"] .site-header .ai-subnav.liquid-demo > .lg-glass-specular {
  box-shadow:
    inset 1px 1px 0 rgba(220, 246, 255, .30),
    inset -1px -1px 0 rgba(0, 0, 0, .29),
    inset 0 0 10px rgba(190, 229, 250, .08);
}

/* Optical edge refraction is deliberately restricted to compact, reusable controls.
 * Broad bento panels keep standard blur to avoid large filtered repaint areas. */
@supports (filter: url("#portfolioLensFilter")) {
  .liquid-demo.site-header > .lg-glass-filter,
  .liquid-demo.github-cta > .lg-glass-filter,
  .liquid-demo.theme-toggle > .lg-glass-filter,
  .liquid-demo.lang > .lg-glass-filter,
  .liquid-demo.hero-cta:not(.hero-cta-dark) > .lg-glass-filter {
    filter: url("#portfolioLensFilter");
  }
}

/* Original semantic children always float above all three optical layers. */
:root[data-theme="dark"] .liquid-demo:not(.hero-cta-dark) { background: transparent; }
/* The header glass layers already inherit its rounded border. Keeping the
 * header itself clipped would cut off the AI submenu, regardless of z-index. */
.site-header.liquid-demo {
  overflow: visible;
}
.site-header.liquid-demo > .nav,
.site-footer.liquid-demo > .footer-row,
.project.liquid-demo > :not(.lg-glass-filter):not(.lg-glass-overlay):not(.lg-glass-specular),
.principle.liquid-demo > :not(.lg-glass-filter):not(.lg-glass-overlay):not(.lg-glass-specular) {
  z-index: 3;
}
.site-header.liquid-demo > .nav,
.site-footer.liquid-demo > .footer-row { position: relative; }
.project.liquid-demo > .lg-glass-filter,
.project.liquid-demo > .lg-glass-overlay,
.project.liquid-demo > .lg-glass-specular {
  position: absolute; /* override existing .project > * position rule */
}
.project.liquid-demo::after { z-index: 2; }
.project.liquid-demo > .lg-glass-filter { -webkit-backdrop-filter: blur(11px) saturate(135%); backdrop-filter: blur(11px) saturate(135%); }
.project.liquid-demo > .lg-glass-overlay { background: linear-gradient(145deg, var(--lg-demo-reflection), transparent 64%), var(--lg-demo-overlay); }
.project.liquid-demo::before { z-index: 2; }
.principle.liquid-demo {
  overflow: hidden;
  transition: box-shadow .25s ease, border-color .25s ease;
}
.principle.liquid-demo > .lg-glass-filter { -webkit-backdrop-filter: blur(10px) saturate(130%); backdrop-filter: blur(10px) saturate(130%); }
.principle.liquid-demo > :not(.lg-glass-filter):not(.lg-glass-overlay):not(.lg-glass-specular) { position: relative; z-index: 3; }
.principle.liquid-demo > .principle-icon,
.principle.liquid-demo > .principle-no { position: absolute; }
.site-footer.liquid-demo { border-left: 0; border-right: 0; border-bottom: 0; }

/* Keep nav and action hit targets intact; the optic layers are passive. */
.liquid-demo.github-cta,
.liquid-demo.theme-toggle,
.liquid-demo.lang,
.liquid-demo.hero-cta:not(.hero-cta-dark) {
  position: relative;
  overflow: hidden;
}
.liquid-demo.github-cta > :not(.lg-glass-filter):not(.lg-glass-overlay):not(.lg-glass-specular),
.liquid-demo.theme-toggle > :not(.lg-glass-filter):not(.lg-glass-overlay):not(.lg-glass-specular),
.liquid-demo.lang > :not(.lg-glass-filter):not(.lg-glass-overlay):not(.lg-glass-specular),
.liquid-demo.hero-cta:not(.hero-cta-dark) > :not(.lg-glass-filter):not(.lg-glass-overlay):not(.lg-glass-specular) {
  position: relative;
  z-index: 3;
}
.liquid-demo.github-cta:hover,
.liquid-demo.hero-cta:not(.hero-cta-dark):hover,
.liquid-demo.theme-toggle:hover {
  box-shadow: 0 15px 30px var(--lg-demo-depth), inset 0 1px 0 var(--lg-demo-rim);
}
.liquid-demo.github-cta:active,
.liquid-demo.hero-cta:not(.hero-cta-dark):active,
.liquid-demo.theme-toggle:active { transform: scale(.985); }

/* Small screens: avoid stacked background sampling across many cards. */
@media (max-width: 760px) {
  .project.liquid-demo > .lg-glass-filter,
  .principle.liquid-demo > .lg-glass-filter {
    -webkit-backdrop-filter: none;
    backdrop-filter: none;
    background: rgba(249, 252, 255, .65);
  }
  :root[data-theme="dark"] .project.liquid-demo > .lg-glass-filter,
  :root[data-theme="dark"] .principle.liquid-demo > .lg-glass-filter { background: rgba(27, 39, 48, .67); }
  .liquid-demo.site-header > .lg-glass-filter { filter: none; }
}
/* Fully opaque fallbacks when backdrop sampling is not supported. */
@supports not ((-webkit-backdrop-filter: blur(2px)) or (backdrop-filter: blur(2px))) {
  .liquid-demo > .lg-glass-filter { filter: none; }
  .liquid-demo > .lg-glass-overlay { background: rgba(248, 252, 255, .96); }
  :root[data-theme="dark"] .liquid-demo > .lg-glass-overlay { background: rgba(31, 43, 52, .96); }
}
/* Respect system preferences and keep text readable in high-contrast modes. */
@media (prefers-reduced-transparency: reduce), (prefers-contrast: more) {
  .liquid-demo > .lg-glass-filter { filter: none; backdrop-filter: none; -webkit-backdrop-filter: none; }
  .liquid-demo > .lg-glass-overlay { background: #f5f9fc; }
  :root[data-theme="dark"] .liquid-demo > .lg-glass-overlay { background: #202d35; }
  .liquid-demo > .lg-glass-specular { box-shadow: none; }
  .liquid-demo { border-color: #8497a4; }
}
@media (forced-colors: active) {
  .liquid-demo > .lg-glass-filter,
  .liquid-demo > .lg-glass-overlay,
  .liquid-demo > .lg-glass-specular { display: none; }
  .liquid-demo { background: Canvas; border-color: CanvasText; box-shadow: none; }
}
@media (prefers-reduced-motion: reduce) {
  .liquid-demo { transition: none; }
}

/* Navigation: convex glass selection.
 * Keep the existing JS indicator geometry and spring-like slide transition;
 * only replace the former opaque black/white active material.
 */
.site-header .nav-links .nav-indicator {
  overflow: hidden;
  isolation: isolate;
  border: 1px solid rgba(255, 255, 255, .82);
  background:
    linear-gradient(160deg,
      rgba(255, 255, 255, .72) 0%,
      rgba(255, 255, 255, .37) 41%,
      rgba(231, 246, 252, .18) 76%,
      rgba(255, 255, 255, .33) 100%);
  box-shadow:
    0 4px 12px rgba(30, 78, 101, .15),
    0 1px 3px rgba(30, 78, 101, .075),
    inset 0 1px 0 rgba(255, 255, 255, .98),
    inset 0 -1px 0 rgba(74, 125, 152, .17);
  -webkit-backdrop-filter: blur(12px) saturate(155%);
  backdrop-filter: blur(12px) saturate(155%);
}
.site-header .nav-links .nav-indicator::before {
  content: "";
  position: absolute;
  inset: 1px;
  border-radius: inherit;
  background:
    linear-gradient(155deg, rgba(255, 255, 255, .58), transparent 50%),
    linear-gradient(0deg, rgba(255, 255, 255, .12), transparent 48%);
  pointer-events: none;
}
.site-header .nav-links .nav-indicator::after {
  content: "";
  position: absolute;
  left: 20%;
  right: 20%;
  bottom: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, .92), transparent);
  pointer-events: none;
}
.site-header .nav-pill.active {
  color: #173240;
  font-weight: 730;
}
.site-header .nav-pill.active > span:first-child {
  background: #168aab;
  box-shadow: 0 0 0 2px rgba(22, 138, 171, .12);
  opacity: 1;
}
/* The AI label and disclosure chevron share one continuous selection glass.
 * The JS indicator follows the outer group, not the anchor's narrower box. */
.site-header .nav-group:has(.nav-pill.active) .nav-submenu-trigger {
  color: #173240;
  /* Match the active link's color easing during light/dark theme changes. */
  transition: color .32s cubic-bezier(.16,1,.3,1);
}
/* The pre-JS fallback must also cover BOTH controls, not just the link. */
.site-header .nav-links:not(.nav-ready) .nav-pill.active {
  background: rgba(255, 255, 255, .52);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .7);
}
.site-header .nav-links:not(.nav-ready) .nav-group:has(.nav-pill.active) {
  border-radius: var(--radius-pill);
  background: rgba(255, 255, 255, .52);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .7);
}
.site-header .nav-links:not(.nav-ready) .nav-group .nav-pill.active {
  background: transparent;
  box-shadow: none;
}
:root[data-theme="dark"] .site-header .nav-links .nav-indicator {
  border-color: rgba(227, 244, 255, .39);
  background:
    linear-gradient(153deg,
      rgba(213, 237, 249, .26) 0%,
      rgba(133, 180, 205, .13) 48%,
      rgba(129, 174, 193, .08) 78%,
      rgba(195, 231, 245, .13) 100%);
  box-shadow:
    0 5px 15px rgba(0, 0, 0, .22),
    inset 0 1px 0 rgba(247, 254, 255, .40),
    inset 0 -1px 0 rgba(0, 0, 0, .28);
}
:root[data-theme="dark"] .site-header .nav-links .nav-indicator::before {
  background: linear-gradient(150deg, rgba(237, 250, 255, .21), transparent 58%);
}
:root[data-theme="dark"] .site-header .nav-pill.active { color: #f1fbff; }
:root[data-theme="dark"] .site-header .nav-pill.active > span:first-child {
  background: #68cadb;
  box-shadow: 0 0 0 2px rgba(104, 202, 219, .12);
}
:root[data-theme="dark"] .site-header .nav-group:has(.nav-pill.active) .nav-submenu-trigger { color: #f1fbff; }
:root[data-theme="dark"] .site-header .nav-links:not(.nav-ready) .nav-pill.active,
:root[data-theme="dark"] .site-header .nav-links:not(.nav-ready) .nav-group:has(.nav-pill.active) {
  background: rgba(194, 227, 242, .18);
  box-shadow: inset 0 0 0 1px rgba(227, 244, 255, .26);
}
:root[data-theme="dark"] .site-header .nav-links:not(.nav-ready) .nav-group .nav-pill.active {
  background: transparent;
  box-shadow: none;
}
/* Accessibility overrides retain the same contrast and forced-color semantics. */
@media (prefers-reduced-transparency: reduce), (prefers-contrast: more) {
  .site-header .nav-links .nav-indicator {
    -webkit-backdrop-filter: none;
    backdrop-filter: none;
    background: #f5f9fc;
    border-color: #526b7d;
    box-shadow: none;
  }
  :root[data-theme="dark"] .site-header .nav-links .nav-indicator {
    background: #263a45;
    border-color: #c6e1f0;
    box-shadow: none;
  }
  .site-header .nav-links .nav-indicator::before,
  .site-header .nav-links .nav-indicator::after { display: none; }
}
@media (forced-colors: active) {
  .site-header .nav-links .nav-indicator {
    background: Highlight;
    border-color: Highlight;
    box-shadow: none;
    -webkit-backdrop-filter: none;
    backdrop-filter: none;
  }
  .site-header .nav-pill.active { color: HighlightText; }
  .site-header .nav-group:has(.nav-pill.active) .nav-submenu-trigger { color: HighlightText; }
  .site-header .nav-pill.active > span:first-child { background: HighlightText; box-shadow: none; }
  .site-header .nav-links:not(.nav-ready) .nav-pill.active,
  .site-header .nav-links:not(.nav-ready) .nav-group:has(.nav-pill.active) {
    background: Highlight;
    box-shadow: none;
  }
  .site-header .nav-links:not(.nav-ready) .nav-group .nav-pill.active { background: transparent; }
}
/* Optical glass clarity study v4: moderate frost for text contrast.
   Keep the Demo-derived refractive edge and cached Hero WebP; increase only
   interior blur/tint and typography contrast. No image or script changes. */
#projects {
  position: relative;
  isolation: isolate;
  background:
    linear-gradient(rgba(14, 32, 40, .065), rgba(14, 32, 40, .08)),
    url("/assets/licat-hero.webp") center 54% / cover no-repeat,
    linear-gradient(155deg, #b6c7cf, #d4dbdc 50%, #c5c9c7);
}
#projects > .shell { position: relative; z-index: 1; }
#projects .project.liquid-demo {
  background: transparent;
  border: 1px solid rgba(255, 255, 255, .86);
  box-shadow:
    0 14px 27px rgba(22, 52, 67, .17),
    inset 0 1px 0 rgba(255, 255, 255, .95),
    inset 0 -1px 0 rgba(74, 99, 107, .19);
}
#projects .project.liquid-demo > .lg-glass-filter {
  -webkit-backdrop-filter: blur(2.35px) saturate(125%) brightness(1.015);
  backdrop-filter: blur(2.35px) saturate(125%) brightness(1.015);
  filter: url("#portfolioCardLensFilter");
}
#projects .project.liquid-demo > .lg-glass-overlay {
  background: rgba(250, 253, 255, .12);
}
#projects .project.liquid-demo > .lg-glass-specular {
  box-shadow:
    inset 1px 1px 1px rgba(255, 255, 255, .97),
    inset -1px -1px 0 rgba(255, 255, 255, .62),
    inset 5px 5px 11px -9px rgba(255, 255, 255, .87),
    inset -5px -8px 15px -14px rgba(27, 65, 87, .48);
}
#projects .project.liquid-demo::before {
  background: none;
}
#projects .project.liquid-demo:hover {
  border-color: #fff;
  box-shadow: 0 17px 36px rgba(22, 52, 67, .21), inset 0 1px 0 #fff;
}
:root[data-theme="dark"] #projects {
  background:
    linear-gradient(rgba(0, 12, 18, .56), rgba(0, 12, 18, .64)),
    url("/assets/licat-hero.webp") center 54% / cover no-repeat,
    linear-gradient(150deg, #1d2b33, #303b40 52%, #2a3131);
}
:root[data-theme="dark"] #projects .project.liquid-demo {
  background: transparent;
  border-color: rgba(231, 244, 251, .40);
  box-shadow:
    0 14px 26px rgba(0,0,0,.28),
    inset 0 1px 0 rgba(238,250,255,.36);
}
:root[data-theme="dark"] #projects .project.liquid-demo > .lg-glass-filter {
  -webkit-backdrop-filter: blur(2.1px) saturate(127%) brightness(1);
  backdrop-filter: blur(2.1px) saturate(127%) brightness(1);
}
:root[data-theme="dark"] #projects .project.liquid-demo > .lg-glass-overlay {
  background: rgba(8, 24, 32, .11);
}
:root[data-theme="dark"] #projects .project.liquid-demo > .lg-glass-specular {
  box-shadow:
    inset 1px 1px 1px rgba(245, 251, 255, .70),
    inset -1px -1px 0 rgba(204, 227, 236, .26),
    inset 4px 5px 11px -9px rgba(245, 251, 255, .32),
    inset -5px -8px 14px -13px rgba(0, 10, 18, .55);
}
/* Typography must remain readable when glass overlaps bright scenery. */
#projects .project p { color: #425563; }
#projects .project-meta { color: #526575; }
:root[data-theme="dark"] #projects .project p,
:root[data-theme="dark"] #projects .project-meta {
  color: rgba(235, 246, 251, .94);
}
/* Use a low-cost, lighter blur for touch devices. The expensive SVG distortion is
   omitted on narrow screens; the strong specular rim still reads as glass. */
@media (max-width: 760px) {
  #projects .project.liquid-demo > .lg-glass-filter {
    filter: none;
    background: none;
    -webkit-backdrop-filter: blur(1.8px) saturate(125%);
    backdrop-filter: blur(1.8px) saturate(125%);
  }
  :root[data-theme="dark"] #projects .project.liquid-demo > .lg-glass-filter {
    filter: none;
    background: none;
    -webkit-backdrop-filter: blur(1.8px) saturate(125%);
    backdrop-filter: blur(1.8px) saturate(125%);
  }
}
/* Stable, solid fallbacks for accessibility or older browsers. */
@supports not ((-webkit-backdrop-filter: blur(2px)) or (backdrop-filter: blur(2px))) {
  #projects .project.liquid-demo > .lg-glass-filter { filter:none; }
  #projects .project.liquid-demo > .lg-glass-overlay { background:rgba(242,248,251,.95); }
  :root[data-theme="dark"] #projects .project.liquid-demo > .lg-glass-overlay { background:rgba(23,37,46,.95); }
}
@media (prefers-reduced-transparency: reduce), (prefers-contrast: more) {
  #projects .project.liquid-demo > .lg-glass-filter {
    -webkit-backdrop-filter:none; backdrop-filter:none; filter:none;
  }
  #projects .project.liquid-demo > .lg-glass-overlay { background: #f5f9fc; }
  :root[data-theme="dark"] #projects .project.liquid-demo > .lg-glass-overlay { background: #202d35; }
}
@media (forced-colors: active) {
  #projects, :root[data-theme="dark"] #projects { background:Canvas; }
  #projects .project.liquid-demo > .lg-glass-filter { -webkit-backdrop-filter:none; backdrop-filter:none; filter:none; }
  #projects .project.liquid-demo > .lg-glass-overlay { background: Canvas; }
  #projects .project.liquid-demo > .lg-glass-specular { box-shadow:none; }
  #projects .project.liquid-demo { border-color:CanvasText; box-shadow:none; }
}

/* Glass text legibility: narrow optical separation from uneven scenery.
 * Avoid broad halos or text outlines that make the interface look luminous.
 * Restrict changes to the Demo's scenic projects section only. */
#projects .project h3 {
  text-shadow:
    0 1px 1px rgba(255, 255, 255, .88),
    0 0 2px rgba(255, 255, 255, .54);
}
#projects .project p,
#projects .project-meta,
#projects .section-note {
  text-shadow:
    0 1px 1px rgba(255, 255, 255, .95),
    0 0 3px rgba(255, 255, 255, .64);
}
:root[data-theme="dark"] #projects .project h3 {
  text-shadow:
    0 1px 2px rgba(0, 12, 20, .86),
    0 0 3px rgba(0, 12, 20, .58);
}
:root[data-theme="dark"] #projects .project p,
:root[data-theme="dark"] #projects .project-meta,
:root[data-theme="dark"] #projects .section-note {
  text-shadow:
    0 1px 2px rgba(0, 12, 20, .94),
    0 0 3px rgba(0, 12, 20, .68);
}
/* When OS contrast features are enabled, use the solid contrast materials,
 * not simulated edge shadows. */
@media (prefers-contrast: more), (forced-colors: active) {
  #projects .project h3,
  #projects .project p,
  #projects .project-meta,
  #projects .section-note { text-shadow: none; }
}

/* Demo material rollout: apply the accepted moderate frost and narrow
 * text separation beyond projects, without changing the production homepage.
 * Hero controls, timeline milestones, principles, and footer use optical
 * layers with contrast-safe fallbacks; the filled primary CTA stays filled. */

/* Hero's existing resource list is one restrained glass slab, not three
 * competing floating cards. The existing link hit targets remain intact. */
.hero-resources.liquid-demo {
  overflow: hidden;
  padding: .25rem .875rem;
  border: 1px solid rgba(255, 255, 255, .76);
  border-radius: 1.125rem;
  box-shadow: 0 12px 28px rgba(24, 61, 83, .14), inset 0 1px 0 rgba(255, 255, 255, .91);
  -webkit-backdrop-filter: none;
  backdrop-filter: none;
}
.hero-resources.liquid-demo > .lg-glass-filter {
  -webkit-backdrop-filter: blur(2.35px) saturate(125%);
  backdrop-filter: blur(2.35px) saturate(125%);
  filter: url("#portfolioLensFilter");
}
.hero-resources.liquid-demo > .lg-glass-overlay {
  background: rgba(250, 253, 255, .15);
}
.hero-resources.liquid-demo > .lg-glass-specular {
  box-shadow: inset 1px 1px 1px rgba(255,255,255,.95),
              inset -1px -1px 0 rgba(255,255,255,.60),
              inset -4px -7px 12px -11px rgba(30,70,94,.39);
}
.hero-resources.liquid-demo > .hero-resource {
  position: relative;
  z-index: 3;
  border-bottom-color: rgba(27, 67, 88, .20);
  text-shadow: 0 1px 1px rgba(255,255,255,.85), 0 0 2px rgba(255,255,255,.52);
}
.hero-resources.liquid-demo > .hero-resource:last-child { border-bottom: 0; }
.hero-resources.liquid-demo > .hero-resource:focus-visible {
  outline: 2px solid #168aab;
  outline-offset: -2px;
  border-radius: .375rem;
}
:root[data-theme="dark"] .hero-resources.liquid-demo {
  border-color: rgba(231, 244, 251, .34);
  box-shadow: 0 12px 28px rgba(0,0,0,.26), inset 0 1px 0 rgba(238,250,255,.24);
}
:root[data-theme="dark"] .hero-resources.liquid-demo > .lg-glass-filter {
  -webkit-backdrop-filter: blur(2.1px) saturate(127%);
  backdrop-filter: blur(2.1px) saturate(127%);
}
:root[data-theme="dark"] .hero-resources.liquid-demo > .lg-glass-overlay {
  background: rgba(8, 24, 32, .19);
}
:root[data-theme="dark"] .hero-resources.liquid-demo > .hero-resource {
  border-bottom-color: rgba(231, 244, 251, .13);
  text-shadow: 0 1px 2px rgba(0, 10, 18, .89), 0 0 3px rgba(0,10,18,.64);
}
:root[data-theme="dark"] .hero-resources.liquid-demo > .hero-resource:last-child { border-bottom: 0; }

/* Journey: preserve the timeline line/dots and reversible motion. A glass
 * surface wraps only the milestone copy, with no change to the dot geometry. */
#journey {
  background:
    radial-gradient(ellipse 43% 65% at 6% 35%, rgba(88, 147, 166, .20), transparent 80%),
    radial-gradient(ellipse 44% 65% at 94% 75%, rgba(184, 156, 126, .17), transparent 80%),
    linear-gradient(145deg, #dce7e9, #e7ebeb 51%, #e8e5e0);
}
#journey > .shell, #principles > .shell { position: relative; z-index: 1; }
#journey .phase-glass.liquid-demo {
  /* Scope the absolute glass layers to this one card, not .phase above it. */
  position: relative;
  min-height: 12.5rem;
  padding: 1.125rem 1.25rem;
  border: 1px solid rgba(255,255,255,.77);
  border-radius: 1.125rem;
  box-shadow: 0 12px 27px rgba(30,68,87,.11), inset 0 1px 0 rgba(255,255,255,.92);
  overflow: hidden;
}
#journey .phase-glass > .lg-glass-filter {
  -webkit-backdrop-filter: blur(2.35px) saturate(125%);
  backdrop-filter: blur(2.35px) saturate(125%);
  /* Large low-contrast milestones do not need SVG displacement.
     This avoids a secondary distorted rim inside each card. */
  filter: none;
}
#journey .phase-glass > .lg-glass-overlay { background: rgba(250,253,255,.12); }
#journey .phase-glass > .lg-glass-specular {
  box-shadow: inset 1px 1px 1px rgba(255,255,255,.97),
              inset -1px -1px 0 rgba(255,255,255,.62),
              inset -5px -7px 15px -13px rgba(30,70,94,.34);
}
#journey .phase-glass > :not(.lg-glass-filter):not(.lg-glass-overlay):not(.lg-glass-specular) {
  position: relative;
  z-index: 3;
}
#journey .phase h3 { color: #1b303c; }
#journey .phase p { color: #475c68; }
#journey .phase time { color: #446777; }
#journey .phase-glass h3,
#journey .phase-glass p,
#journey .phase-glass time,
#journey .section-note { text-shadow: 0 1px 1px rgba(255,255,255,.90), 0 0 2px rgba(255,255,255,.47); }

/* Principles: the original three cards already contain the optical layers.
 * Replace their white wash with the approved project-glass clarity/frost. */
#principles {
  background:
    radial-gradient(ellipse 45% 65% at 96% 22%, rgba(99,156,173,.22), transparent 80%),
    radial-gradient(ellipse 44% 66% at 10% 82%, rgba(185,157,128,.15), transparent 79%),
    linear-gradient(150deg, #e9e9e6, #dce8e9 56%, #e5e8e6);
}
#principles .principle.liquid-demo {
  border: 1px solid rgba(255,255,255,.77);
  box-shadow: 0 12px 28px rgba(30,68,87,.12), inset 0 1px 0 rgba(255,255,255,.94);
}
#principles .principle.liquid-demo > .lg-glass-filter {
  -webkit-backdrop-filter: blur(2.35px) saturate(125%);
  backdrop-filter: blur(2.35px) saturate(125%);
  filter: url("#portfolioCardLensFilter");
}
#principles .principle.liquid-demo > .lg-glass-overlay { background: rgba(250,253,255,.12); }
#principles .principle.liquid-demo > .lg-glass-specular {
  box-shadow: inset 1px 1px 1px rgba(255,255,255,.97),
              inset -1px -1px 0 rgba(255,255,255,.62),
              inset 4px 4px 12px -10px rgba(255,255,255,.88),
              inset -5px -7px 15px -13px rgba(30,70,94,.35);
}
/* Earlier base CSS had a high-specificity direct-child rule that accidentally
 * made the positioned number and icon relative. Restore the intended layout. */
#principles .principle.liquid-demo > .principle-icon,
#principles .principle.liquid-demo > .principle-no {
  position: absolute;
  z-index: 4;
}
#principles .principle h3 { color: #1b303c; }
#principles .principle p { color: #475c68; }
#principles .principle h3,
#principles .principle p,
#principles .section-note { text-shadow: 0 1px 1px rgba(255,255,255,.90), 0 0 2px rgba(255,255,255,.48); }

/* Footer stays a single translucent strip. Text shadows here are subtler
 * because it has no mountain photograph directly behind the copy. */
.site-footer.liquid-demo > .lg-glass-filter {
  -webkit-backdrop-filter: blur(2.35px) saturate(125%);
  backdrop-filter: blur(2.35px) saturate(125%);
}
.site-footer.liquid-demo > .lg-glass-overlay {
  background: rgba(250,253,255,.12);
}
.site-footer.liquid-demo > .lg-glass-specular {
  box-shadow: inset 0 1px 0 rgba(255,255,255,.87);
}
.site-footer .footer-row {
  text-shadow: 0 1px 1px rgba(255,255,255,.66);
}
.site-footer a:focus-visible { outline: 2px solid #168aab; outline-offset: 5px; border-radius: .1875rem; }

/* Dark-mode geometry remains identical; only material + text contrast change. */
:root[data-theme="dark"] #journey {
  background:
    radial-gradient(ellipse 45% 70% at 7% 25%, rgba(87,142,157,.17), transparent 80%),
    linear-gradient(145deg, #1c292f, #233036 53%, #2c3131);
}
:root[data-theme="dark"] #principles {
  background:
    radial-gradient(ellipse 45% 70% at 93% 30%, rgba(92,142,157,.16), transparent 80%),
    linear-gradient(145deg, #252d31, #1c2a30 56%, #202b30);
}
:root[data-theme="dark"] #journey .phase-glass.liquid-demo,
:root[data-theme="dark"] #principles .principle.liquid-demo {
  border-color: rgba(231,244,251,.34);
  box-shadow: 0 12px 28px rgba(0,0,0,.24), inset 0 1px 0 rgba(238,250,255,.26);
}
:root[data-theme="dark"] #journey .phase-glass > .lg-glass-filter,
:root[data-theme="dark"] #principles .principle.liquid-demo > .lg-glass-filter {
  -webkit-backdrop-filter: blur(2.1px) saturate(127%);
  backdrop-filter: blur(2.1px) saturate(127%);
}
:root[data-theme="dark"] #journey .phase-glass > .lg-glass-overlay,
:root[data-theme="dark"] #principles .principle.liquid-demo > .lg-glass-overlay,
:root[data-theme="dark"] .site-footer.liquid-demo > .lg-glass-overlay {
  background: rgba(8,24,32,.11);
}
:root[data-theme="dark"] #journey .phase-glass > .lg-glass-specular,
:root[data-theme="dark"] #principles .principle.liquid-demo > .lg-glass-specular {
  box-shadow: inset 1px 1px 1px rgba(245,251,255,.57),
              inset -1px -1px 0 rgba(204,227,236,.20),
              inset -5px -7px 15px -13px rgba(0,8,14,.55);
}
:root[data-theme="dark"] #journey .phase h3,
:root[data-theme="dark"] #principles .principle h3 { color: #f5f7fa; }
:root[data-theme="dark"] #journey .phase p,
:root[data-theme="dark"] #principles .principle p { color: rgba(235,246,251,.92); }
:root[data-theme="dark"] #journey .phase time { color: rgba(196,226,238,.86); }
:root[data-theme="dark"] #journey .phase-glass h3,
:root[data-theme="dark"] #journey .phase-glass p,
:root[data-theme="dark"] #journey .phase-glass time,
:root[data-theme="dark"] #journey .section-note,
:root[data-theme="dark"] #principles .principle h3,
:root[data-theme="dark"] #principles .principle p,
:root[data-theme="dark"] #principles .section-note,
:root[data-theme="dark"] .site-footer .footer-row {
  text-shadow: 0 1px 2px rgba(0,12,20,.88), 0 0 3px rgba(0,12,20,.58);
}
:root[data-theme="dark"] .site-footer.liquid-demo > .lg-glass-filter {
  -webkit-backdrop-filter: blur(2.1px) saturate(127%);
  backdrop-filter: blur(2.1px) saturate(127%);
}

/* Mobile phones never run the expensive SVG refraction over long content. */
@media (max-width: 760px) {
  .hero-resources.liquid-demo > .lg-glass-filter,
  #journey .phase-glass > .lg-glass-filter,
  #principles .principle.liquid-demo > .lg-glass-filter {
    filter: none;
    -webkit-backdrop-filter: blur(1.8px) saturate(125%);
    backdrop-filter: blur(1.8px) saturate(125%);
    background: transparent;
  }
  #journey .phase-glass.liquid-demo { min-height: 0; }
  .hero-resources.liquid-demo { padding: 0 .625rem; }
}

/* Accessibility: disable decorative shadows and sampling when a solid
 * material is requested; preserve touch, focus and forced-colors semantics. */
@media (prefers-reduced-transparency: reduce), (prefers-contrast: more) {
  .hero-resources.liquid-demo > .lg-glass-filter,
  #journey .phase-glass > .lg-glass-filter,
  #principles .principle.liquid-demo > .lg-glass-filter {
    filter: none;
    -webkit-backdrop-filter: none;
    backdrop-filter: none;
  }
  .hero-resources.liquid-demo > .lg-glass-overlay,
  #journey .phase-glass > .lg-glass-overlay,
  #principles .principle.liquid-demo > .lg-glass-overlay { background: #f5f9fc; }
  :root[data-theme="dark"] .hero-resources.liquid-demo > .lg-glass-overlay,
  :root[data-theme="dark"] #journey .phase-glass > .lg-glass-overlay,
  :root[data-theme="dark"] #principles .principle.liquid-demo > .lg-glass-overlay { background: #202d35; }
  .hero-resources.liquid-demo .hero-resource,
  #journey .phase-glass h3,
  #journey .phase-glass p,
  #journey .phase-glass time,
  #journey .section-note,
  #principles .principle h3,
  #principles .principle p,
  #principles .section-note,
  .site-footer .footer-row { text-shadow: none; }
}
@media (forced-colors: active) {
  #journey, #principles,
  :root[data-theme="dark"] #journey,
  :root[data-theme="dark"] #principles { background: Canvas; }
  .hero-resources.liquid-demo,
  #journey .phase-glass.liquid-demo,
  #principles .principle.liquid-demo { background: Canvas; border-color: CanvasText; box-shadow: none; }
  .hero-resources.liquid-demo > .lg-glass-filter,
  #journey .phase-glass > .lg-glass-filter,
  #principles .principle.liquid-demo > .lg-glass-filter { display: none; }
  .hero-resources.liquid-demo > .lg-glass-overlay,
  #journey .phase-glass > .lg-glass-overlay,
  #principles .principle.liquid-demo > .lg-glass-overlay { display: none; }
}

/* Single pinned landscape behind the complete Demo.
 * Fixed pseudo-layer instead of background-attachment:fixed, which is
 * unreliable in iOS Safari. Reuse the existing 89 KB Hero WebP: no new asset.
 * The scene and its geometry do not animate or move with document scroll. */
body {
  position: relative;
  isolation: isolate;
  background: #d9e5e9;
}
body::before {
  content: "";
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100vh;  /* older mobile browser fallback */
  height: 100svh; /* stable mobile viewport during address-bar collapse */
  z-index: 0;
  pointer-events: none;
  opacity: 1;
  filter: none;
  background:
    linear-gradient(rgba(230, 240, 245, .30), rgba(227, 237, 242, .29)),
    url("/assets/licat-hero.webp") 58% center / cover no-repeat;
}
body > main,
body > .site-footer {
  position: relative;
  z-index: 1;
}
/* The photo used to be cropped into the Hero's right-hand column.
 * Hide that duplicated view, keeping the element as an inert animation
 * target for the original motion JS (no JS edits needed). */
.hero-scene { display: none; }
.hero-wrap {
  background:
    radial-gradient(circle at 14% 22%, rgba(255,255,255,.33), transparent 33%),
    linear-gradient(180deg, rgba(228,238,243,.15), rgba(228,238,243,.04));
}
#projects {
  background: rgba(230, 239, 243, .07);
}
#journey {
  background:
    linear-gradient(145deg, rgba(220,232,237,.19), rgba(236,240,238,.22));
}
#principles {
  background:
    linear-gradient(150deg, rgba(231,238,240,.21), rgba(222,235,238,.17));
}
/* Scenic details vary behind the small Hero list; avoid washed-out links. */
.hero-resources.liquid-demo > .hero-resource { color: #294453; }
.hero-resources.liquid-demo > .hero-resource.active,
.hero-resources.liquid-demo > .hero-resource:hover { color: #102936; }
:root[data-theme="dark"] .hero-resources.liquid-demo > .hero-resource { color: #d5e4ec; }
:root[data-theme="dark"] .hero-resources.liquid-demo > .hero-resource.active,
:root[data-theme="dark"] .hero-resources.liquid-demo > .hero-resource:hover { color: #f5fbff; }
/* Keep typography legible while glass is over bright mountain/snow detail. */
#journey > .shell .section-note,
#principles > .shell .section-note,
#projects > .shell .section-note {
  color: #435969;
  text-shadow: 0 1px 1px rgba(255,255,255,.9), 0 0 3px rgba(255,255,255,.6);
}
:root[data-theme="dark"] body { background: #101c25; }
:root[data-theme="dark"] body::before {
  opacity: 1;
  filter: none;
  background:
    linear-gradient(rgba(8, 17, 24, .68), rgba(8, 19, 27, .70)),
    url("/assets/licat-hero.webp") 58% center / cover no-repeat;
}
:root[data-theme="dark"] .hero-wrap {
  background:
    radial-gradient(circle at 14% 22%, rgba(20,38,48,.28), transparent 33%),
    linear-gradient(180deg, rgba(9,20,27,.14), rgba(11,23,29,.04));
}
:root[data-theme="dark"] #projects { background: rgba(8,18,26,.08); }
:root[data-theme="dark"] #journey {
  background: linear-gradient(145deg, rgba(12,27,35,.20), rgba(17,28,33,.24));
}
:root[data-theme="dark"] #principles {
  background: linear-gradient(150deg, rgba(15,28,36,.24), rgba(10,24,31,.22));
}
:root[data-theme="dark"] #journey > .shell .section-note,
:root[data-theme="dark"] #principles > .shell .section-note,
:root[data-theme="dark"] #projects > .shell .section-note {
  color: rgba(234,244,249,.86);
  text-shadow: 0 1px 2px rgba(0,10,18,.94), 0 0 3px rgba(0,10,18,.7);
}
/* Opaque fallbacks should retain their contrast, not expose a busy photo. */
@media (prefers-reduced-transparency: reduce), (prefers-contrast: more) {
  body::before { background: #e6edf0; }
  :root[data-theme="dark"] body::before { background: #17252d; }
  #journey,
  #principles,
  #projects { background: rgba(238,245,248,.96); }
  :root[data-theme="dark"] #journey,
  :root[data-theme="dark"] #principles,
  :root[data-theme="dark"] #projects { background: rgba(23,37,46,.96); }
}
@media (forced-colors: active) {
  body::before,
  :root[data-theme="dark"] body::before { background: Canvas; }
  .hero-wrap,
  #journey,
  #principles,
  #projects,
  :root[data-theme="dark"] .hero-wrap,
  :root[data-theme="dark"] #journey,
  :root[data-theme="dark"] #principles,
  :root[data-theme="dark"] #projects { background: Canvas; }
}

/* Performance: SVG displacement + backdrop blur on EVERY full-size project
 * slab forced costly repeated compositing while scrolling. Preserve all
 * approved tint, frosted backdrop and specular/rim optics at rest; reserve
 * high-cost refraction for the single card being deliberately inspected.
 * While a real scroll is active, never compute that interactive refraction.
 * The fallback without JS retains the hover behavior.
 */
@media (min-width: 761px) and (prefers-reduced-transparency: no-preference) and (prefers-contrast: no-preference) and (forced-colors: none) {
  #projects .project.liquid-demo > .lg-glass-filter {
    filter: none;
  }
  html:not(.portfolio-is-scrolling) #projects .project.liquid-demo:is(:hover, :focus-visible) > .lg-glass-filter {
    filter: url("#portfolioCardLensFilter");
  }
}

/* Source: blog.css */
/* Blog: a small extension to the existing Licat design system. */
.blog-page { min-height: 100vh; }
.blog-page .blog-main { width: min(900px, calc(100% - 3rem)); margin: 0 auto; padding: clamp(9rem, 15vw, 12rem) 0 7rem; }
.blog-page .site-header { z-index: 30; }
.blog-page .nav-links { min-width: 0; }
.blog-page .nav-pill { text-decoration: none; }
.blog-page .site-header .nav-links a:focus-visible { outline-offset: -3px; }
.blog-page .blog-intro { padding-bottom: clamp(2rem, 5vw, 3.5rem); border-bottom: 1px solid var(--line); }
.blog-page .blog-eyebrow { font-size: .74rem; letter-spacing: .17em; font-weight: 720; color: var(--blue); }
.blog-page .blog-intro h1 { margin: .8rem 0 1rem; line-height: 1.06; letter-spacing: -.055em; font-size: clamp(4rem, 10vw, 6.8rem); font-weight: 810; }
.blog-page .blog-title-dot { color: var(--blue); }
.blog-page .blog-intro > p { font-size: clamp(1rem, 2vw, 1.2rem); color: var(--text-2); margin: 0; }
.blog-page .blog-archive { padding-top: 2.5rem; }
.blog-page .blog-archive-heading { display: flex; align-items: center; justify-content: space-between; gap: 1rem; margin-bottom: 1rem; }
.blog-page .blog-archive-heading h2 { margin: 0; font-size: 1rem; font-weight: 700; }
.blog-page .blog-archive-heading span { font-size: .82rem; color: var(--muted); }
.blog-page .blog-list-item { padding: 2rem 0 2.25rem; border-bottom: 1px solid var(--line); }
.blog-page .blog-list-item:last-child { border-bottom: none; }
.blog-page .blog-list-meta, .blog-page .blog-article-header time { color: var(--muted); font-size: .82rem; font-variant-numeric: tabular-nums; }
.blog-page .blog-list-item h3 { margin: .55rem 0 .55rem; font-size: clamp(1.45rem, 3vw, 2rem); letter-spacing: -.025em; line-height: 1.32; font-weight: 740; }
.blog-page .blog-list-item h3 a { color: var(--text); text-decoration: none; }
.blog-page .blog-list-item h3 a:hover { color: var(--blue); }
.blog-page .blog-list-item p { margin: 0 0 .8rem; max-width: 64ch; line-height: 1.8; color: var(--text-2); }
.blog-page .blog-read-link { color: var(--blue); font-size: .82rem; font-weight: 650; text-decoration: none; }
.blog-page .blog-read-link:hover { text-decoration: underline; }
.blog-page .blog-empty { padding: 2rem 0; color: var(--muted); }
.blog-page .blog-footer { display: flex; justify-content: space-between; gap: 1rem; width: min(900px, calc(100% - 3rem)); margin: 0 auto; padding: 1.5rem 0 2rem; border-top: 1px solid var(--line); font-size: .8rem; color: var(--muted); }
.blog-page .blog-footer a { color: var(--text-2); text-decoration: none; }
.blog-page .blog-footer a:hover { color: var(--blue); }
.blog-page .blog-article { max-width: 820px; margin: auto; }
.blog-page .blog-back { display: inline-flex; gap: .5rem; align-items: center; margin-bottom: 2.7rem; font-size: .88rem; text-decoration: none; color: var(--text-2); }
.blog-page .blog-back:hover { color: var(--blue); }
.blog-page .blog-article-header { margin-bottom: 3.2rem; padding-bottom: 2rem; border-bottom: 1px solid var(--line); }
.blog-page .blog-article-header h1 { margin: .9rem 0 1rem; font-size: clamp(2.25rem, 6vw, 3.6rem); letter-spacing: -.045em; line-height: 1.2; font-weight: 770; }
.blog-page .blog-article-header p { margin: 0; color: var(--text-2); font-size: 1.05rem; line-height: 1.8; }
.blog-page .blog-prose { color: var(--text-2); font-size: 1.05rem; line-height: 1.9; overflow-wrap: anywhere; }
.blog-page .blog-prose > :first-child { margin-top: 0; }
.blog-page .blog-prose h2, .blog-page .blog-prose h3, .blog-page .blog-prose h4 { color: var(--text); font-weight: 750; line-height: 1.35; letter-spacing: -.025em; }
.blog-page .blog-prose h2 { font-size: 1.65rem; margin: 2.6rem 0 1rem; }
.blog-page .blog-prose h3 { font-size: 1.3rem; margin: 2rem 0 .8rem; }
.blog-page .blog-prose p, .blog-page .blog-prose ul, .blog-page .blog-prose ol, .blog-page .blog-prose blockquote { margin: 1rem 0; }
.blog-page .blog-prose ul, .blog-page .blog-prose ol { padding-left: 1.6rem; }
.blog-page .blog-prose li { margin: .3rem 0; }
.blog-page .blog-prose a { color: var(--blue); text-underline-offset: .2em; }
.blog-page .blog-prose blockquote { margin-left: 0; padding: .3rem 1.2rem; border-left: 3px solid var(--blue); color: var(--muted); }
.blog-page .blog-prose pre { margin: 1.4rem 0; padding: 1.2rem; max-width: 100%; overflow-x: auto; border: 1px solid var(--line); border-radius: .85rem; background: var(--bg-2); font-size: .86rem; line-height: 1.65; }
.blog-page .blog-prose .highlight { margin: 1.4rem 0; }
.blog-page .blog-prose .highlight pre { margin: 0; }
.blog-page .blog-prose code { padding: .15em .3em; border-radius: .25rem; background: var(--bg-2); font-size: .86em; }
.blog-page .blog-prose pre code { padding: 0; background: transparent; font-size: inherit; }
.blog-page .blog-prose img { max-width: 100%; height: auto; border-radius: .8rem; }
.blog-page .blog-prose table { display: block; width: max-content; max-width: 100%; overflow-x: auto; border-collapse: collapse; margin: 1.5rem 0; font-size: .95rem; }
.blog-page .blog-prose th, .blog-page .blog-prose td { border: 1px solid var(--line); padding: .55rem .8rem; text-align: left; }
.blog-page .blog-prose th { color: var(--text); background: var(--bg-2); }
.blog-page .blog-article-end { margin-top: 4rem; padding-top: 1.5rem; border-top: 1px solid var(--line); }
.blog-page .blog-article-end a { text-decoration: none; color: var(--blue); font-size: .88rem; }
@media (max-width: 760px) {
  .blog-page .blog-main { width: min(900px, calc(100% - 2.25rem)); padding-top: 8rem; padding-bottom: 4.5rem; }
  .blog-page .blog-footer { width: min(900px, calc(100% - 2.25rem)); }
  .blog-page .blog-article-header { margin-bottom: 2rem; }
  .blog-page .blog-list-item { padding: 1.65rem 0; }
  .blog-page .nav-links { scrollbar-width: none; }
}
@media (prefers-reduced-motion: reduce) { .blog-page * { scroll-behavior: auto !important; } }

/* Article table of contents */
.blog-page .blog-main { width: min(1180px, calc(100% - 3rem)); }
.blog-page .blog-article-layout {
  display: grid;
  grid-template-columns: minmax(0, 820px) minmax(190px, 220px);
  gap: clamp(2rem, 4vw, 3.5rem);
  align-items: start;
  justify-content: center;
}
.blog-page .blog-article { width: 100%; max-width: 820px; min-width: 0; margin: 0; }
.blog-page .blog-toc-desktop {
  position: sticky;
  top: 6.5rem;
  max-height: calc(100vh - 8rem);
  overflow-y: auto;
  padding: .8rem .65rem .8rem .8rem;
  border: 1px solid var(--line);
  border-radius: .85rem;
  background: color-mix(in srgb, var(--bg-2) 84%, transparent);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
  scrollbar-width: thin;
  scrollbar-color: var(--line) transparent;
}
.blog-page .blog-toc-title {
  margin: 0 0 .7rem;
  padding: 0 .55rem;
  color: var(--muted);
  font-size: .72rem;
  font-weight: 760;
  letter-spacing: .09em;
  text-transform: uppercase;
}
.blog-page .blog-toc-list,
.blog-page .blog-toc-list ol { margin: 0; padding: 0; list-style: none; }
.blog-page .blog-toc-list > li { margin: .1rem 0; }
.blog-page .blog-toc-list ol {
  margin: .12rem 0 .32rem .55rem;
  padding-left: .55rem;
  border-left: 1px solid var(--line);
}
.blog-page .blog-toc-link {
  display: block;
  padding: .32rem .5rem;
  border-radius: .38rem;
  color: var(--text-2);
  font-size: .79rem;
  line-height: 1.45;
  text-decoration: none;
  transition: color .18s ease, background-color .18s ease;
}
.blog-page .blog-toc-link--sub { color: var(--muted); font-size: .73rem; }
.blog-page .blog-toc-link:hover { color: var(--blue); background: var(--bg-2); }
.blog-page .blog-toc-link.is-active {
  color: var(--blue);
  background: color-mix(in srgb, var(--blue) 9%, transparent);
  font-weight: 720;
}
.blog-page .blog-toc-link:focus-visible { outline: 2px solid var(--blue); outline-offset: 2px; }
.blog-page .blog-toc-mobile { display: none; }
.blog-page .blog-prose :is(h2, h3, h4)[id] { scroll-margin-top: 7rem; }
html:has(body.blog-page) { scroll-behavior: smooth; }

@media (max-width: 1140px) {
  .blog-page .blog-main { width: min(900px, calc(100% - 3rem)); }
  .blog-page .blog-article-layout { display: block; }
  .blog-page .blog-toc-desktop { display: none; }
  .blog-page .blog-toc-mobile {
    display: block;
    margin: 0 0 2rem;
    border: 1px solid var(--line);
    border-radius: .85rem;
    background: var(--bg-2);
  }
  .blog-page .blog-toc-mobile > summary {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: .85rem 1rem;
    color: var(--text);
    font-size: .9rem;
    font-weight: 720;
    cursor: pointer;
    list-style: none;
  }
  .blog-page .blog-toc-mobile > summary::-webkit-details-marker { display: none; }
  .blog-page .blog-toc-mobile > summary::after {
    content: '+';
    color: var(--blue);
    font-size: 1.15rem;
    line-height: 1;
  }
  .blog-page .blog-toc-mobile[open] > summary::after { content: '−'; }
  .blog-page .blog-toc-mobile__count {
    margin-left: auto;
    color: var(--muted);
    font-size: .75rem;
    font-weight: 500;
  }
  .blog-page .blog-toc-mobile nav {
    max-height: min(50vh, 24rem);
    overflow: auto;
    padding: 0 1rem 1rem;
    overscroll-behavior: contain;
  }
}
@media (prefers-reduced-motion: reduce) {
  html:has(body.blog-page) { scroll-behavior: auto; }
  .blog-page .blog-toc-link { transition: none; }
}

/* H2 chapters stay visible; H3 knowledge points live in a single-open accordion. */
.blog-page .blog-toc-item { margin: .12rem 0; }
.blog-page .blog-toc-item__row {
  display: flex;
  align-items: center;
  gap: .2rem;
}
.blog-page .blog-toc-link--chapter { flex: 1 1 auto; min-width: 0; }
.blog-page .blog-toc-toggle {
  display: grid;
  place-items: center;
  flex: 0 0 1.8rem;
  width: 1.8rem;
  height: 1.8rem;
  padding: 0;
  border: 0;
  border-radius: .4rem;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  transition: color .18s ease, background-color .18s ease;
}
.blog-page .blog-toc-toggle::before {
  content: '';
  width: .42rem;
  height: .42rem;
  border-right: 1.7px solid currentColor;
  border-bottom: 1.7px solid currentColor;
  transform: rotate(45deg) translateY(-.08rem);
  transition: transform .18s ease;
}
.blog-page .blog-toc-item.is-expanded > .blog-toc-item__row .blog-toc-toggle::before {
  transform: rotate(225deg) translateY(-.08rem);
}
.blog-page .blog-toc-toggle:hover {
  color: var(--blue);
  background: var(--bg-2);
}
.blog-page .blog-toc-toggle:focus-visible {
  outline: 2px solid var(--blue);
  outline-offset: 2px;
}
.blog-page .blog-toc-children {
  margin: .1rem 0 .45rem .55rem !important;
  padding: .08rem 0 .08rem .55rem !important;
  border-left: 1px solid var(--line);
}
.blog-page .blog-toc-children[hidden] { display: none !important; }
.blog-page .blog-toc-children > li { margin: .06rem 0; }
.blog-page .blog-toc-link--sub { padding-top: .28rem; padding-bottom: .28rem; }
@media (prefers-reduced-motion: reduce) {
  .blog-page .blog-toc-toggle,
  .blog-page .blog-toc-toggle::before { transition: none; }
}

/* One-click control for all H2/H3 sections. */
.blog-page .blog-toc-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .45rem;
  margin-bottom: .55rem;
}
.blog-page .blog-toc-heading .blog-toc-title { margin: 0; }
.blog-page .blog-toc-global-toggle {
  flex: 0 0 auto;
  padding: .32rem .48rem;
  border: 0;
  border-radius: .4rem;
  background: transparent;
  color: var(--blue);
  font: inherit;
  font-size: .7rem;
  font-weight: 680;
  line-height: 1.25;
  white-space: nowrap;
  cursor: pointer;
  transition: background-color .18s ease, color .18s ease;
}
.blog-page .blog-toc-global-toggle:hover {
  color: var(--blue);
  background: var(--bg-2);
}
.blog-page .blog-toc-global-toggle:focus-visible {
  outline: 2px solid var(--blue);
  outline-offset: 2px;
}
.blog-page .blog-toc-toolbar {
  display: flex;
  justify-content: flex-end;
  margin: 0 0 .35rem;
}