/* 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: prompt-library.css */
:root{
  --paper:#edf1f3;--text:#0c151b;--ink2:#3f515c;--muted:#788995;--blue:#087ac2;--teal:#0aaba6;
  --border:rgba(40,75,93,.12);--glass:rgba(255,255,255,.69);--shadow:0 18px 52px rgba(35,63,76,.08);
  --font:-apple-system,BlinkMacSystemFont,"SF Pro Display","SF Pro Text","Helvetica Neue","PingFang SC","Microsoft YaHei",sans-serif;
  color-scheme:light
}
:root[data-theme="dark"]{
  --paper:#10171c;--text:#eaf4f6;--ink2:#c2d1d9;--muted:#92a5af;--blue:#63c7ff;--teal:#7fddd3;
  --border:rgba(177,218,234,.13);--glass:rgba(26,37,46,.8);--shadow:0 20px 60px rgba(0,0,0,.2);
  color-scheme:dark
}
*,*::before,*::after{box-sizing:border-box}
html{scroll-behavior:smooth}
body{margin:0;background:var(--paper);color:var(--text);font:16px/1.65 var(--font);-webkit-font-smoothing:antialiased;overflow-x:hidden}
body::before{content:"";position:fixed;inset:0;background-image:radial-gradient(circle at 1px 1px,rgba(108,147,163,.15) 1px,transparent 1.5px);background-size:24px 24px;opacity:.34;pointer-events:none;z-index:-2}
.page-glow{position:absolute;inset:0 0 auto;height:640px;z-index:-1;pointer-events:none;background:radial-gradient(ellipse at 70% 20%,rgba(76,215,212,.19),transparent 37%),radial-gradient(ellipse at 8% 24%,rgba(83,170,240,.16),transparent 33%)}
:root[data-theme="dark"] .page-glow{opacity:.48}
a{color:inherit;text-decoration:none}
button,input{font:inherit}button{cursor:pointer}
button:focus-visible,a:focus-visible,input:focus-visible{outline:3px solid rgba(40,160,233,.57);outline-offset:3px}
[hidden]{display:none!important}
.shell{width:min(1190px,calc(100% - 48px));margin:0 auto}
.site-top{position:relative;z-index:10;padding:26px 0}
.top-row{display:flex;align-items:center;justify-content:space-between;gap:20px}
.brand,.footer-identity{display:flex;align-items:center;gap:11px}
.brand img,.footer-identity img{width:36px;height:36px}
.brand span,.footer-identity span{display:flex;align-items:baseline;gap:5px}
.brand strong,.footer-identity strong{font-size:16px;letter-spacing:-.04em;font-weight:850}
.brand small{font-size:13px;font-weight:750;color:var(--muted)}
.top-center{display:flex;gap:11px;align-items:center;font:700 11px/1.2 var(--font);letter-spacing:.13em;color:var(--muted)}
.signal{width:6px;height:6px;background:#04bfae;border-radius:50%;box-shadow:0 0 0 4px rgba(0,192,174,.1)}
.edition{color:var(--blue)}
.top-actions{display:flex;align-items:center;gap:12px}
.home-link,.theme-toggle{min-height:41px;padding:8px 16px;border:1px solid var(--border);border-radius:999px;background:var(--glass);backdrop-filter:blur(16px);font-size:12px;font-weight:720;box-shadow:0 8px 20px rgba(31,59,70,.035)}
.home-link span{margin-left:6px;color:var(--blue)}
.theme-toggle{width:42px;padding:0;display:grid;place-items:center;color:var(--text)}
.theme-dark{display:none}
:root[data-theme="dark"] .theme-light{display:none}
:root[data-theme="dark"] .theme-dark{display:inline}
.hero{position:relative;display:grid;grid-template-columns:1.16fr .84fr;min-height:465px;align-items:center;gap:30px;padding:70px 0 84px}
.eyebrow{font-size:11px;letter-spacing:.15em;font-weight:760;color:var(--blue);display:flex;align-items:center;gap:10px}
.mini-line{width:19px;height:2px;background:var(--teal)}
h1,h2,h3,p{margin-top:0}
.hero h1{font-size:clamp(43px,6.2vw,88px);line-height:1.13;letter-spacing:-.072em;font-weight:810;margin:24px 0 25px}
.hero h1 em{font-style:normal;color:var(--blue)}
.hero-description{max-width:580px;color:var(--ink2);font-size:16px;line-height:1.95}
.hero-meta{margin-top:39px;display:flex;flex-wrap:wrap;align-items:center;gap:17px;color:var(--muted);font-size:12px;letter-spacing:.01em}
.hero-meta strong{color:var(--text);font-size:18px;font-weight:800}
.hero-meta i{width:1px;height:16px;background:var(--border)}
.pulse{display:inline-block;margin-left:7px;width:5px;height:5px;border-radius:50%;background:var(--teal)}
.hero-art{height:370px;position:relative;display:grid;place-items:center}
.orbit{border:1px solid rgba(51,141,179,.24);position:absolute;inset:12% 10%;border-radius:50%;transform:rotate(-24deg)}
.orbit-two{inset:3% 20%;transform:rotate(46deg);border-color:rgba(39,164,163,.24)}
.orbit-one::after{content:"";position:absolute;top:12%;left:20%;width:9px;height:9px;background:#62bedb;border:3px solid var(--paper);border-radius:50%;box-shadow:0 0 0 1px var(--border)}
.art-core{width:225px;height:225px;display:grid;place-items:center;border-radius:44px;transform:rotate(-12deg);background:linear-gradient(147deg,rgba(255,255,255,.76),rgba(217,237,244,.46));border:1px solid rgba(255,255,255,.85);box-shadow:0 26px 64px rgba(44,136,169,.14),inset 0 0 34px rgba(255,255,255,.55);backdrop-filter:blur(14px)}
:root[data-theme="dark"] .art-core{background:linear-gradient(147deg,rgba(34,64,77,.76),rgba(17,33,43,.55));border-color:rgba(191,228,236,.17)}
.art-core img{width:132px;height:132px;transform:rotate(12deg);filter:drop-shadow(0 8px 15px rgba(42,116,134,.16))}
.art-note{position:absolute;font-size:10px;font-weight:800;line-height:1.35;letter-spacing:.19em;color:var(--muted)}
.note-a{top:4%;left:15%}.note-b{bottom:7%;right:13%}
.art-x{position:absolute;top:8%;right:17%;font-size:32px;color:var(--teal)}
.catalogue-heading{border-top:1px solid var(--border);padding-top:45px;display:flex;align-items:end;justify-content:space-between;gap:22px}
.catalogue-heading h2{font-size:clamp(28px,3.2vw,43px);letter-spacing:-.05em;line-height:1.3;font-weight:800;margin:6px 0 0}
.heading-count{font-size:17px;color:var(--muted);letter-spacing:-.04em;margin-left:14px;font-weight:650}
.search-wrap{width:min(360px,100%);height:47px;display:flex;align-items:center;gap:10px;padding:0 15px;border:1px solid var(--border);border-radius:15px;background:var(--glass);box-shadow:0 6px 18px rgba(42,72,89,.03)}
.search-wrap svg{width:17px;height:17px;fill:none;stroke:var(--muted);stroke-width:1.8;flex:none}
.search-wrap input{border:0;outline:0;background:transparent;min-width:0;flex:1;color:var(--text);font-size:13px}
.search-wrap input::placeholder{color:var(--muted)}
.search-wrap kbd{font-family:inherit;background:rgba(111,153,171,.12);color:var(--muted);border-radius:5px;padding:1px 7px;font-size:11px}
.filter-row{display:flex;align-items:center;gap:7px;overflow-x:auto;padding:31px 0 17px;scrollbar-width:none}
.filter-row::-webkit-scrollbar{display:none}
.filter{background:transparent;color:var(--ink2);border:1px solid transparent;padding:9px 15px;white-space:nowrap;border-radius:99px;font-size:12px;font-weight:690;transition:background .2s,border-color .2s}
.filter:hover{background:rgba(113,151,170,.09)}
.filter.active{color:var(--text);background:var(--glass);border-color:var(--border);box-shadow:0 4px 12px rgba(29,64,79,.06)}
.filter span{font-size:11px;color:var(--muted);margin-left:3px}
.result-status{font-size:12px;color:var(--muted);min-height:20px;margin:0 0 16px}
.prompt-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:17px;align-items:stretch}
.prompt-card{display:flex;flex-direction:column;position:relative;overflow:hidden;min-height:270px;padding:29px 27px 22px;border-radius:22px;border:1px solid var(--border);background:linear-gradient(130deg,rgba(238,250,254,.93),rgba(252,255,255,.68) 48%,rgba(223,249,245,.6));backdrop-filter:blur(18px);box-shadow:var(--shadow);transition:transform .24s,border-color .24s,box-shadow .24s}
.prompt-card::before{content:"";height:3px;position:absolute;left:25px;right:74%;top:0;border-radius:0 0 8px 8px;background:linear-gradient(90deg,var(--blue),var(--teal));transition:right .25s}
.prompt-card:hover{transform:translateY(-5px);border-color:rgba(15,136,185,.32);box-shadow:0 27px 60px rgba(33,86,108,.12)}
.prompt-card:hover::before{right:25px}
.card-kicker{font-size:10px;letter-spacing:.12em;font-weight:780;color:var(--blue)}
.prompt-card h3{font-size:23px;line-height:1.35;letter-spacing:-.035em;font-weight:800;margin:20px 0 12px}
.prompt-card p{font-size:13px;line-height:1.85;color:var(--ink2);margin:0 0 23px;flex:1}
.card-foot{display:flex;align-items:center;justify-content:space-between;border-top:1px solid var(--border);padding-top:13px}
.card-cta{font-size:12px;font-weight:750;color:var(--blue)}
.card-count{color:var(--muted);font:700 10px/1.3 var(--font);letter-spacing:.04em}
:root[data-theme="dark"] .prompt-card{background:linear-gradient(140deg,rgba(25,53,68,.9),rgba(28,43,50,.8))}
.empty-state{text-align:center;padding:75px 18px;border:1px dashed var(--border);border-radius:18px;color:var(--muted)}
.empty-state>div{font-size:34px}
.empty-state h3{margin:7px 0;color:var(--text)}
.empty-state button{border:0;border-radius:999px;padding:9px 18px;background:var(--text);color:var(--paper)}
.library-end{margin:73px 0 90px;display:flex;justify-content:center;align-items:center;gap:14px;font-size:10px;font-weight:780;letter-spacing:.22em;color:var(--muted)}
.library-end span{color:var(--teal)}
.detail-view{padding:38px 0 110px}
.detail-shell{max-width:1130px}
.back-link,.detail-bottom button{border:0;background:none;padding:10px 0;font-size:13px;font-weight:750;color:var(--blue)}
.back-link:hover,.detail-bottom button:hover{text-decoration:underline}
.detail-header{padding:55px 0 45px;border-bottom:1px solid var(--border)}
.detail-topline{display:flex;align-items:center;justify-content:space-between;gap:12px;color:var(--blue);font-size:11px;font-weight:800;letter-spacing:.12em}
.detail-index{color:var(--muted)}
.detail-header h1{font-size:clamp(34px,5.1vw,61px);letter-spacing:-.065em;line-height:1.23;margin:21px 0 15px;font-weight:800;max-width:1000px}
.detail-summary{color:var(--ink2);font-size:17px;line-height:1.85;max-width:800px;margin:0}
.detail-tags{display:flex;flex-wrap:wrap;gap:7px;margin-top:23px}
.detail-tag{font-size:11px;padding:5px 11px;border-radius:99px;border:1px solid var(--border);color:var(--ink2);background:var(--glass)}
.detail-actions{display:flex;flex-wrap:wrap;align-items:center;gap:10px;margin-top:35px}
.action-primary,.action-secondary,.action-text{border-radius:11px;font-size:13px;font-weight:760;padding:11px 18px;min-height:44px}
.action-primary{background:var(--text);color:var(--paper);border:1px solid var(--text)}
.action-secondary{background:var(--glass);color:var(--text);border:1px solid var(--border)}
.action-text{padding:10px 12px;color:var(--blue)}
.action-primary span,.action-secondary span{margin-left:12px}
.reading-layout{display:grid;grid-template-columns:200px minmax(0,1fr);gap:52px;padding:56px 0 24px}
.reading-margin{position:sticky;top:36px;align-self:start;font-size:11px;color:var(--muted)}
.reading-margin>span{font-size:10px;letter-spacing:.16em;font-weight:800;color:var(--blue)}
.reading-line{height:1px;background:var(--border);width:88px;margin:20px 0}
.reading-margin p{line-height:1.9;max-width:178px}
.prompt-article{background:var(--glass);border:1px solid var(--border);border-radius:20px;padding:clamp(24px,4.5vw,58px);box-shadow:var(--shadow);min-width:0;overflow-wrap:anywhere;font-size:15px;line-height:2.02}
.prompt-article h1,.prompt-article h2,.prompt-article h3,.prompt-article h4{line-height:1.45;letter-spacing:-.035em;font-weight:780;scroll-margin-top:40px;color:var(--text)}
.prompt-article h1{font-size:clamp(26px,3vw,35px);margin:0 0 25px}
.prompt-article h2{font-size:24px;margin:43px 0 16px;border-bottom:1px solid var(--border);padding-bottom:12px}
.prompt-article h3{font-size:18px;margin:32px 0 10px}
.prompt-article h4{font-size:15px;margin:25px 0 10px}
.prompt-article p{line-height:2;margin:0 0 17px;color:var(--ink2)}
.prompt-article strong{color:var(--text);font-weight:780}
.prompt-article ul,.prompt-article ol{padding-left:25px;margin:3px 0 25px;color:var(--ink2)}
.prompt-article li{padding-left:5px;margin:5px 0;line-height:1.9}
.prompt-article li::marker{color:var(--blue)}
.prompt-article blockquote{border-left:3px solid var(--teal);margin:21px 0 25px;padding:13px 22px;background:rgba(44,156,175,.075);border-radius:0 11px 11px 0;color:var(--text)}
.prompt-article a{color:var(--blue);text-decoration:underline;text-underline-offset:3px}
.prompt-article table{border-collapse:collapse;font-size:13px;min-width:540px;width:100%;color:var(--ink2)}
.prompt-article .table-scroll{overflow-x:auto;margin:22px 0 28px}
.prompt-article th,.prompt-article td{border-bottom:1px solid var(--border);padding:10px 14px;text-align:left;vertical-align:top}
.prompt-article th{color:var(--text);background:rgba(78,152,175,.07)}
.prompt-article>*:last-child{margin-bottom:0}
.detail-bottom{display:flex;justify-content:space-between;gap:15px;margin:35px 0}
.site-bottom{border-top:1px solid var(--border);background:rgba(245,250,251,.17);padding:32px 0}
.footer-row{display:flex;align-items:center;gap:25px;justify-content:space-between}
.footer-identity img{width:28px;height:28px}
.footer-identity span{display:flex;flex-direction:column;align-items:start;gap:0;line-height:1.45}
.footer-identity strong{font-size:13px}
.footer-identity small{color:var(--muted);font-size:11px}
.footer-links{display:flex;gap:26px;font-size:12px;font-weight:690;color:var(--ink2)}
.footer-links a:hover{color:var(--blue)}
.footer-caption{color:var(--muted);font-size:11px}
.toast{position:fixed;z-index:99;bottom:28px;left:50%;transform:translate(-50%,20px);border-radius:99px;padding:12px 21px;background:#152831;color:#fff;box-shadow:0 13px 35px rgba(0,0,0,.15);font-size:12px;font-weight:650;opacity:0;pointer-events:none;transition:opacity .24s,transform .24s;max-width:calc(100vw - 35px);text-align:center}
.toast.show{opacity:1;transform:translate(-50%,0)}
.noscript{padding:22px;text-align:center;background:var(--glass)}
.noscript a{text-decoration:underline}
@media(max-width:950px){
 .hero{grid-template-columns:1fr .72fr}.hero-art{height:300px}.art-core{width:180px;height:180px}.art-core img{width:105px;height:105px}
 .prompt-grid{grid-template-columns:repeat(2,minmax(0,1fr))}
 .reading-layout{grid-template-columns:145px minmax(0,1fr);gap:25px}
}
@media(max-width:650px){
 .shell{width:min(100% - 36px,1190px)}
 .site-top{padding:17px 0}.top-center{display:none}.top-actions{gap:8px}.home-link{padding:9px 12px}
 .hero{display:block;padding:57px 0 48px;min-height:0}.hero h1{font-size:clamp(40px,10vw,61px);margin:20px 0}.hero-description{font-size:14px;line-height:1.85}.hero-meta{margin-top:24px}
 .hero-art{display:none}
 .catalogue-heading{display:block;padding-top:30px}.catalogue-heading h2{font-size:33px}.search-wrap{margin-top:22px;width:100%}
 .filter-row{padding:22px 0 16px;margin-right:-18px}.filter{padding:8px 12px}
 .prompt-grid{grid-template-columns:1fr;gap:12px}.prompt-card{min-height:200px;padding:24px}.prompt-card h3{font-size:21px;margin:15px 0 9px}.prompt-card p{margin-bottom:20px}
 .library-end{margin:54px 0 65px}
 .detail-view{padding:16px 0 50px}.detail-header{padding:28px 0 35px}.detail-header h1{font-size:36px}.detail-summary{font-size:14px}.detail-actions{align-items:stretch}
 .action-primary{width:100%;text-align:center}.action-secondary,.action-text{flex:1;text-align:center}
 .reading-layout{display:block;padding-top:29px}.reading-margin{position:static;margin-bottom:18px}.reading-margin p,.reading-line{display:none}
 .prompt-article{font-size:14px;padding:23px 20px;border-radius:16px}.prompt-article h2{font-size:21px;margin-top:34px}.prompt-article h3{font-size:17px}
 .detail-bottom{flex-wrap:wrap}.footer-row{flex-wrap:wrap;gap:20px}.footer-caption{display:none}.footer-links{gap:15px;flex-wrap:wrap}
}
@media(prefers-reduced-motion:reduce){html{scroll-behavior:auto}.prompt-card,.toast,.prompt-card::before{transition:none}}

/* 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;
}
/* The same landscape in a smaller mobile WebP; preserve opacity, crop and dark tint. */
@media (max-width: 760px) {
  body:where(.home-page)::before {
    background-image:
      linear-gradient(rgba(230, 240, 245, .30), rgba(227, 237, 242, .29)),
      url("/assets/licat-hero-mobile.webp");
  }
  :root[data-theme="dark"] body:where(.home-page)::before {
    background-image:
      linear-gradient(rgba(8, 17, 24, .68), rgba(8, 19, 27, .70)),
      url("/assets/licat-hero-mobile.webp");
  }
}
: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");
  }
}
