:root {
  color-scheme: dark;
  font-family: "Segoe UI", system-ui, sans-serif;
  color: #eff7ff;
  background: #060e1b;
  --muted: #b7cde1;
  --line: #8fceff57;
  --ice: #a0dcff;
  --glass: linear-gradient(150deg, #437caa60, #142b45c9 60%, #193a5db0);
  --edge: inset 0 1px #c5eaff50, inset 0 0 18px #6db9ff12, 0 12px 25px #020b1766;
}
* { box-sizing: border-box; }
body {
  margin: 0;
  min-height: 100vh;
  background: radial-gradient(ellipse at 12% 18%, #24598b70, transparent 45%),
    radial-gradient(ellipse at 93% 70%, #255e916e, transparent 54%),
    linear-gradient(163deg, #071120 34%, #132b45 54%, #071320 68%);
}
a { color: inherit; text-underline-offset: .22em; }
a:hover { color: #c7eaff; }
:focus-visible { outline: 2px solid #a8e4ff; outline-offset: 4px; }
.skip { position: fixed; top: 0; left: 0; z-index: 2; padding: .7rem; background: #09182a; transform: translateY(-120%); }
.skip:focus { transform: none; }
.workspace {
  width: min(1350px, calc(100% - 56px));
  min-height: calc(100vh - 72px);
  margin: 36px auto;
  display: grid;
  grid-template-columns: 220px minmax(0, 1fr);
  border: 1px solid var(--line);
  border-radius: 24px;
  background: linear-gradient(145deg, #193656b8, #0a192cdd 58%, #163e6099);
  box-shadow: inset 0 1px #d8efff50, 0 0 46px #4fa8ff22, 0 24px 70px #02080899;
  backdrop-filter: blur(18px);
}
.sidebar {
  display: flex; flex-direction: column; gap: 30px; min-width: 0;
  padding: 24px 15px; border-right: 1px solid #8fceff30;
  border-radius: 23px 0 0 23px; background: #081b31a6;
}
.brand { display: flex; align-items: center; gap: 9px; text-decoration: none; font-weight: 700; padding: 0 5px; }
.brand span {
  display: grid; flex: 0 0 36px; place-items: center; height: 36px; border-radius: 10px;
  background: #3276a651; border: 1px solid #8ed4ff75; color: #a5e6ff; font-size: 1.55rem;
}
.sidebar nav { display: grid; gap: 5px; }
.sidebar-bottom { margin-top: auto; border-top: 1px solid #8fceff30; padding-top: 12px; }
.sidebar nav a, .sidebar-bottom a, .admin-nav a {
  display: flex; align-items: center; gap: 9px; text-decoration: none; color: var(--muted);
  border: 1px solid transparent; border-radius: 9px; padding: 9px 10px;
  transition: background .2s, border-color .2s;
}
.sidebar nav a:hover, .sidebar nav a[aria-current], .sidebar-bottom a:hover, .admin-nav a:hover {
  color: #f4fbff; border-color: #8dd7ff65; background: linear-gradient(105deg, #458fc889, #3475ae45);
  box-shadow: inset 0 1px #d2efff38, 0 0 18px #449fff29;
}
.nav-icon { display: inline-grid; place-items: center; width: 1.25em; color: var(--ice); }
main { min-width: 0; padding: clamp(20px, 3vw, 44px); }
h1, h2, h3, p { margin: 0 0 .8rem; }
h1 { font-size: clamp(2rem, 5vw, 4rem); line-height: 1.04; letter-spacing: -.045em; overflow-wrap: anywhere; }
h2 { font-size: clamp(1.15rem, 2.2vw, 1.55rem); letter-spacing: -.025em; }
h3 { font-size: 1.3rem; line-height: 1.2; overflow-wrap: anywhere; }
h3 a { text-decoration: none; }
h3 a:hover { text-decoration: underline; }
p { line-height: 1.65; overflow-wrap: anywhere; }
.lead { color: var(--muted); font-size: clamp(1.05rem, 2vw, 1.2rem); max-width: 43rem; }
.label { color: var(--ice); font-size: .875rem; font-weight: 650; }
.overview-head, .section-head { margin-bottom: 26px; }
.overview-grid, .grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.overview-card, .panel, .card {
  border: 1px solid var(--line); border-radius: 16px;
  background: var(--glass); box-shadow: var(--edge);
}
.overview-card {
  position: relative; overflow: hidden; display: block; padding: 16px;
  text-decoration: none; transition: transform .2s, border-color .2s;
}
.overview-card:hover, .card:hover, .card:focus-within { transform: translateY(-3px); border-color: #aee4ffb0; }
.overview-card .nav-icon { float: right; background: #87d8ff21; width: 29px; height: 29px; border-radius: 8px; }
.overview-card h2 { margin-bottom: 5px; }
.overview-card p, .card p, .featured p { margin-bottom: 0; color: var(--muted); }
.blog { --ice: #90e5c0; }
.articles { --ice: #a7ceff; }
.projects { --ice: #9be4ff; }
.dashboard-grid { display: grid; grid-template-columns: 1.65fr 1fr; gap: 14px; margin-top: 14px; align-items: start; }
.panel, .card { padding: clamp(16px, 2.4vw, 28px); }
.card { transition: transform .2s, border-color .2s; }
.recent ul, .entries { list-style: none; margin: 0; padding: 0; }
.recent li + li, .entries li { border-top: 1px solid #a0d2f52b; }
.recent li a, .entries li {
  display: flex; align-items: baseline; justify-content: space-between; flex-wrap: wrap;
  gap: 6px 14px; padding: 11px 0; text-decoration: none; overflow-wrap: anywhere;
}
.recent li a:hover span { text-decoration: underline; }
.recent small {
  color: var(--ice); font-size: .875rem; background: #061b2b6b;
  border: 1px solid #a5d9ff38; padding: 2px 8px; border-radius: 7px;
}
.featured { background: radial-gradient(ellipse at 95% 2%, #397eb069, transparent 64%), var(--glass); }
.prose, .narrow { max-width: 780px; margin-inline: auto; }
.prose p { font-size: 1.12rem; }
hr { border: 0; border-top: 1px solid var(--line); margin: 26px 0; }
.muted, .entries span { color: var(--muted); }
.actions { display: flex; align-items: center; flex-wrap: wrap; gap: 10px; margin-block: 18px; }
.button, button {
  display: inline-flex; align-items: center; justify-content: center;
  border: 1px solid #a6e0ff74; border-radius: 9px; padding: .65rem 1rem;
  min-height: 43px; font: inherit; font-weight: 650; text-decoration: none; cursor: pointer;
  color: #fff; background: linear-gradient(115deg, #275d89, #357cae);
  box-shadow: inset 0 1px #d9f4ff65, 0 0 16px #4fa7ff2e;
}
.button:hover, button:hover { background: #387daf; color: #fff; }
.secondary { background: #203a55; }
form label { display: grid; gap: 6px; margin-bottom: 14px; }
input:not([type=checkbox]), textarea, select {
  width: 100%; padding: .68rem; border-radius: 8px; background: #0d2137; color: inherit;
  border: 1px solid #a5d9ff60; font: inherit;
}
textarea { resize: vertical; }
.check { display: flex; align-items: center; }
details { margin-top: 24px; }
summary { cursor: pointer; margin-bottom: 10px; }
.danger, .danger:hover { color: #31131e; background: #ffc2d1; }
.admin-layout { display: grid; grid-template-columns: minmax(9rem, 10rem) minmax(0, 1fr); gap: 12px; align-items: start; }
.admin-nav { display: grid; gap: 4px; padding: 9px; }
.entries { margin-block: 18px 28px; }
@media (max-width: 1050px) {
  .workspace { grid-template-columns: 180px minmax(0, 1fr); }
  .admin-layout { grid-template-columns: 1fr; }
  .admin-nav { display: flex; flex-wrap: wrap; }
}
@media (max-width: 800px) {
  .workspace { width: calc(100% - 24px); margin-block: 12px; grid-template-columns: 1fr; }
  .sidebar { padding: 13px; gap: 10px; border-right: 0; border-bottom: 1px solid var(--line); border-radius: 23px 23px 0 0; }
  .sidebar nav { display: flex; flex-wrap: wrap; }
  .sidebar-bottom { padding-top: 0; border: 0; }
  .dashboard-grid { grid-template-columns: 1fr; }
}
@media (max-width: 540px) {
  .overview-grid, .grid { grid-template-columns: 1fr; }
  .sidebar nav a, .sidebar-bottom a { padding: 7px; font-size: .875rem; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; }
}


/* The overview shares its glass treatment with the reading and editing pages. */
:root {
  --line: #8fc8ff52;
  --glass: linear-gradient(149deg, #2a5179b3, #142b47e8 42%, #0b1b30ef 76%, #1b3a59e0);
  --edge: inset 0 1px #e5f7ff5e, inset 0 -1px #75c9ff36,
    inset 0 0 19px #80c5ff19, 0 12px 25px #02071191;
}
body {
  background: radial-gradient(ellipse at 12% 7%, #163f68 0%, transparent 42%),
    radial-gradient(ellipse at 93% 72%, #16436a 0%, transparent 46%),
    linear-gradient(158deg, #050a13 24%, #0a1727 48%, #183b55 50%, #0b1e32 56%, #050a13 80%);
}
.workspace {
  min-height: calc(100vh - 72px);
  grid-template-columns: 208px minmax(0, 1fr);
  background: linear-gradient(135deg, #163753cb, #071728ed 60%, #13344cbd);
  box-shadow: inset 0 1px #d8efff80, inset 0 -1px #7ac5ff45,
    0 0 54px #3a8bd83d, 0 28px 85px #02060dc4;
}
.sidebar { background: linear-gradient(165deg, #122b46df, #071323f2 72%, #112b44d1); }
.sidebar nav a[aria-current] {
  background: linear-gradient(108deg, #4286b9a8, #244d74b8);
  box-shadow: inset 0 1px #dcf5ff6c, 0 0 22px #449fff35;
}
.brand span { box-shadow: inset 0 1px #d7f4ff70, 0 0 18px #53bcff40; }
.overview-head { margin-bottom: 25px; }
.overview-head h1 { font-size: clamp(2.15rem, 4.15vw, 3.6rem); text-shadow: 0 4px 25px #75beff31; }
.overview-head p { margin-bottom: 0; }
.dashboard-grid {
  grid-template-columns: minmax(0, 1.8fr) minmax(0, 1fr);
  align-items: stretch;
  margin-top: 0;
  gap: 16px;
}
.featured {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  display: flex;
  align-items: flex-end;
  min-height: 318px;
  padding: clamp(21px, 3vw, 34px);
  border-color: #88ccff82;
  background: radial-gradient(ellipse at 82% 39%, #2c779fa6, transparent 51%),
    linear-gradient(145deg, #224c75, #0c1c34 61%, #173b61);
  box-shadow: inset 0 1px #edfcff95, inset 0 -1px #8cd9ff59,
    inset 0 0 24px #9cdeff30, 0 15px 35px #020711a6;
}
.feature-copy { z-index: 1; max-width: 19rem; }
.feature-copy .label { color: #aee2ff; font-weight: 650; margin-bottom: 8px; }
.feature-copy h2 { font-size: clamp(1.65rem, 3vw, 2.5rem); line-height: 1.05; overflow-wrap: anywhere; }
.feature-copy .button { margin-top: 18px; }
.project-art {
  position: absolute; z-index: -1; display: grid; place-items: center;
  width: 65%; aspect-ratio: 1.15; right: -4%; top: 50%; transform: translateY(-50%);
  background: radial-gradient(ellipse, #46c7ff49, transparent 65%);
}
.project-art i {
  position: absolute; width: 85%; aspect-ratio: 2.2; border-radius: 50%;
  border: 1px solid #a8e3ff89;
  box-shadow: inset 0 0 9px #97e6ff3f, 0 0 14px #67d2ff65;
  transform: rotate(-28deg);
}
.project-art i:nth-child(2) { width: 72%; transform: rotate(31deg); opacity: .55; }
.project-art i:nth-child(3) { width: 92%; transform: rotate(-43deg); opacity: .36; }
.project-art svg {
  width: 59%;
  height: auto;
  overflow: visible;
  transform: rotate(-18deg);
  filter: drop-shadow(0 0 8px #70d6ffaa) drop-shadow(0 9px 19px #1577cf9c);
  animation: logo-float 7s ease-in-out infinite alternate;
}
.project-art .loop-pulse {
  opacity: 1;
  animation: loop-travel 4s linear infinite;
}
.project-art i::after {
  content: "";
  position: absolute;
  top: 49%;
  right: -3px;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #d3f8ff;
  box-shadow: 0 0 10px 2px #78d8ff;
}
.project-art i:nth-child(2)::after { left: -3px; right: auto; }
.project-art i:nth-child(3)::after { content: none; }
@keyframes logo-float { to { transform: translateY(-8px) rotate(-14deg); } }
@keyframes loop-travel { to { stroke-dashoffset: -100; } }
.recent { padding: clamp(18px, 2.2vw, 28px); }
.recent h2 { margin-bottom: 14px; }
.recent li a { display: grid; justify-items: start; justify-content: stretch; gap: 6px; padding: 12px 0; }
.recent li a span { font-size: 1.06rem; font-weight: 600; }
.overview-grid { margin-top: 16px; gap: 16px; }
.overview-card { display: flex; align-items: flex-start; gap: 12px; padding: 19px; }
.overview-card .nav-icon {
  float: none; flex: 0 0 34px; width: 34px; height: 34px;
  border: 1px solid #a6ddff4a;
  box-shadow: inset 0 1px #def5ff41, 0 0 16px #4dbeff25;
}
.overview-card h2 { font-size: 1.13rem; }
.overview-card p { line-height: 1.46; }
.button, button {
  background: linear-gradient(125deg, #295b88, #23628e 68%, #397eaa);
  box-shadow: inset 0 1px #e2f8ff7d, 0 4px 15px #04192994;
}
.secondary { background: #203a55; }
@media (max-width: 1050px) and (min-width: 801px) {
  .workspace { grid-template-columns: 170px minmax(0, 1fr); }
  .overview-card { flex-direction: column; }
}
@media (max-width: 800px) {
  .workspace, .dashboard-grid { grid-template-columns: 1fr; }
  .workspace { min-height: calc(100vh - 24px); }
  .sidebar { display: grid; grid-template-columns: 1fr auto; }
  .sidebar nav { grid-row: 2; grid-column: 1 / -1; }
  .sidebar-bottom { margin-top: 0; }
  .sidebar-bottom a { padding: 7px; }
}
@media (max-width: 540px) {
  .featured { min-height: 330px; }
  .project-art { top: 3%; right: 4%; width: 68%; transform: none; }
  .featured { background: linear-gradient(0deg, #0c1c34 34%, transparent 72%), radial-gradient(ellipse at 72% 23%, #285b83, #0b1c33 71%); }
}
@media (prefers-reduced-motion: reduce) {
  .project-art svg, .project-art .loop-pulse { animation: none; }
  .project-art .loop-pulse { opacity: 0; }
}

/* Learning pages and interactive experiments */
.learning-hero { min-height: 410px; display: grid; align-items: center; position: relative; isolation: isolate; overflow: hidden; padding: clamp(22px,5vw,60px); container-type: inline-size; }
.hero-media { position: absolute; z-index: -1; inset: 0; }
.hero-media .cover { width: 100%; height: 100%; object-fit: cover; object-position: 67% center; animation: glass-drift 12s ease-in-out infinite alternate; }
.hero-media::after { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg,#071326 5%,#071326f5 31%,#07132657 68%,#0713261c); }
.hero-copy h1 { font-size: clamp(1.55rem, 8.7cqi, 5.75rem); margin: .18em 0; overflow-wrap: normal; }
.hero-copy h1 span { display: block; white-space: nowrap; }
.hero-copy .lead { color: #d3e9fa; max-width: 30rem; }
.hero-light {
  position: absolute; inset: -15% -10%; pointer-events: none;
  background: linear-gradient(111deg, transparent 39%, #86d9ff32 49%, #c2f1ff59 50%, transparent 60%);
  mix-blend-mode: screen; animation: glass-reflection 8s ease-in-out infinite;
}
.hero-copy > * { animation: hero-arrive .65s cubic-bezier(.2,.65,.3,1) both; }
.hero-copy h1 { animation-delay: .07s; }
.hero-copy .lead { animation-delay: .14s; }
.hero-copy .actions { animation-delay: .21s; }
.experiment .cover { transition: transform .45s ease, filter .45s ease; }
.experiment:hover .cover, .experiment:focus-within .cover { transform: scale(1.035); filter: brightness(1.14); }
.hero-copy .button { transition: transform .22s ease, box-shadow .22s ease; }
.hero-copy .button:hover, .hero-copy .button:focus-visible { transform: translateY(-2px); box-shadow: inset 0 1px #e2f8ff7d, 0 0 24px #5ebdff55; }
@keyframes glass-drift { from { transform: scale(1.025); } to { transform: translateX(-2%) scale(1.11); } }
@keyframes glass-reflection {
  0%, 100% { transform: translateX(-42%); opacity: 0; }
  18% { opacity: .7; }
  52% { transform: translateX(45%); opacity: 0; }
}
@keyframes hero-arrive { from { transform: translateY(12px); opacity: .5; } }
.home-section { margin-top: 26px; }
.section-title { display: flex; justify-content: space-between; align-items: baseline; flex-wrap: wrap; gap: .5rem 1rem; margin-bottom: .65rem; }
.section-title h2 { margin-bottom: 0; }
.experiment { display: grid; grid-template-columns: 1.2fr 1fr; align-items: center; gap: 18px; margin-top: 18px; overflow: hidden; }
.experiment .cover { width: 100%; height: auto; aspect-ratio: 2.3; object-fit: cover; border-radius: 10px; }
.cover { display: block; max-width: 100%; height: auto; }
.material-card { padding: 0; overflow: hidden; }
.material-card .cover { width: 100%; aspect-ratio: 1.6; object-fit: cover; }
.card-copy { padding: clamp(16px,2vw,23px); }
.card-copy h2 a { text-decoration: none; }
.card-copy h2 a:hover { text-decoration: underline; }
.card-copy .label { margin-bottom: .42rem; }
.article h1, .author h1, .lab h1 { font-size: clamp(2rem,4.8vw,3.4rem); margin-top: .4em; }
.article .cover { width: 100%; max-height: 350px; object-fit: cover; border-radius: 12px; margin-block: 20px 25px; }
.toc { background: #08192ba8; border: 1px solid var(--line); border-radius: 12px; margin-block: 18px; padding: 14px 18px; }
.toc ol { margin-bottom: 0; padding-inline-start: 1.4rem; }
.toc li { padding: 3px 0; }
.author img { object-fit: contain; max-width: 100%; }
.filters { display: flex; align-items: end; flex-wrap: wrap; gap: 10px 14px; margin-bottom: 18px; }
.filters label { margin: 0; flex: 1 1 8rem; }
.filters label:has(input) { flex-basis: 14rem; }
.filters a { align-self: center; }
.editor-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 0 12px; }
.lab { max-width: 900px; margin-inline: auto; }
.bits { display: grid; grid-template-columns: repeat(8,minmax(0,1fr)); gap: 8px; margin: 22px 0; }
.bits button {
  min-width: 0; min-height: 75px; display: grid; align-content: center; gap: 4px;
  padding: 3px; background: #0b1b30; transition: background .2s, box-shadow .2s, transform .2s;
}
.bits button strong { font-size: clamp(1.2rem,4vw,2rem); line-height: 1; }
.bits button span { font-size: .875rem; color: #c9e8ff; }
.bits button[aria-pressed=true] { background: #246da0; box-shadow: inset 0 1px #d1f9ff, 0 0 20px #5cdcff66; transform: translateY(-3px); }
.lab-result { font-weight: 650; font-size: 1.2rem; }
.lab-result output { color: #a5edff; }
.feedback { min-height: 1.7em; color: #bdeeff; font-weight: 650; margin-top: 12px; }
.board { display: grid; grid-template-columns: repeat(5,1fr); gap: 5px; max-width: 350px; }
.board span {
  display: grid; place-items: center; aspect-ratio: 1; border-radius: 8px;
  background: #091b31; border: 1px solid #71b8ff42; color: #a6dbff; font-size: 1.2rem;
}
.board .wall { color: #70839c; background: #182a41; }
.board .robot { background: #245f8a; color: #e6fcff; box-shadow: inset 0 0 15px #5dadff82, 0 0 12px #5dadff3d; }
.queue { display: flex; flex-wrap: wrap; gap: 8px; list-style-position: inside; padding: 0; }
.queue li { background: #0c2038; border: 1px solid var(--line); border-radius: 8px; padding: 6px 8px; }
.queue li[aria-current] { background: #265f8c; }
.prompt-fields { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 12px; margin-block: 20px; }
.prompt-fields label { display: grid; gap: 5px; }
.lab pre { white-space: pre-wrap; overflow-wrap: anywhere; min-height: 5rem; padding: 14px; border: 1px solid var(--line); border-radius: 10px; background: #091b31; font: inherit; }
button:disabled { opacity: .6; cursor: default; }
@media (max-width: 990px) {
  .hero-media::after { background: linear-gradient(90deg,#071326 0%,#071326de 49%,#07132635); }
  .grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
}
@media (max-width: 540px) {
  .learning-hero { min-height: 385px; align-items: end; }
  .hero-media .cover { object-position: 68% top; }
  .hero-media::after { background: linear-gradient(0deg,#071326 20%,#071326e6 50%,#07132640); }
  .grid, .experiment, .prompt-fields, .editor-grid { grid-template-columns: 1fr; }
  .bits { grid-template-columns: repeat(4,minmax(0,1fr)); }
  .bits button { min-height: 59px; }
}
@media (prefers-reduced-motion: reduce) {
  .hero-media .cover, .hero-copy > * { animation: none; }
  .hero-light { display: none; }
  .hero-copy .button:hover, .hero-copy .button:focus-visible, .experiment:hover .cover, .experiment:focus-within .cover { transform: none; }
}

.live-experiment { grid-template-columns: minmax(0, 1fr) minmax(0, 1.45fr); }
.live-console {
  border: 1px solid #75c8fa60; border-radius: 14px; padding: clamp(10px,2vw,18px);
  background: radial-gradient(ellipse at 50% 0%,#20547d64,transparent 74%),#08192b;
  box-shadow: inset 0 1px #a8e4ff45, inset 0 0 25px #2f89cb29;
  transition: border-color .3s, box-shadow .3s;
}
.live-console.solved { border-color: #86efc7; box-shadow: inset 0 1px #d2ffe68a, 0 0 24px #4dffd04a; }
.live-readout { display: flex; align-items: baseline; justify-content: flex-end; flex-wrap: wrap; gap: .5rem; margin-bottom: .65rem; color: #a9d5ef; }
.live-readout output { font-family: ui-monospace, Consolas, monospace; font-variant-numeric: tabular-nums; }
#live-total { min-width: 3ch; text-align: end; font-size: clamp(1.3rem,3vw,2rem); color: #d7f7ff; }
.live-bits { display: grid; grid-template-columns: repeat(8,minmax(0,1fr)); gap: 5px; }
.live-bits button {
  display: grid; gap: 2px; padding: 4px 1px; min-width: 0;
  border-color: #b3dcff45; background: linear-gradient(#1a3957,#0d2137);
  box-shadow: inset 0 1px #a9d9ff32; transition: transform .23s, box-shadow .23s, background .23s;
}
.live-bits button strong { font-size: 1.15rem; }
.live-bits button span { font-size: .78rem; color: #cae6ff; }
.live-bits button[aria-pressed=true] {
  background: linear-gradient(#398cbb,#164970); transform: translateY(-3px);
  box-shadow: inset 0 1px #c1f6ff, 0 0 13px #63d6ff8a;
}
.live-result { min-height: 1.65em; margin: .65rem 0 0; color: #aaf6d7; font-size: .9rem; }
@media (max-width: 980px) { .live-experiment { grid-template-columns: 1fr; } }
@media (max-width: 390px) { .live-bits { grid-template-columns: repeat(4,minmax(0,1fr)); } }
@media (prefers-reduced-motion: reduce) { .live-bits button[aria-pressed=true] { transform: none; } }

.learning-hero {
  gap: clamp(20px,4vw,52px);
  padding: clamp(15px,3.5vw,44px);
  border-color: #93dcff88;
  background: #081221;
  box-shadow: inset 0 1px #d4f3ff84, 0 0 36px #41adff26;
}
.hero-media .cover { object-position: 74% 47%; filter: brightness(1.18) saturate(1.12); }
.hero-media::after {
  background: linear-gradient(90deg,#071326 1%,#071326e8 22%,#07132669 51%,transparent 80%),
    linear-gradient(0deg,#071326 1%,transparent 55%);
}
.hero-copy { padding-block: clamp(10px,2.3vw,30px) 0; }
.hero-copy h1 span:last-child {
  color: #9fe8ff;
  text-shadow: 0 0 26px #55bcff64;
}
.hero-copy .button:first-child {
  color: #071927; border-color: #d4f5ff; background: linear-gradient(115deg,#bef3ff,#6ac9ff);
  box-shadow: 0 0 24px #64d6ff50;
}
.learning-hero .live-experiment {
  margin: 0; padding: clamp(12px,2vw,22px);
  background: linear-gradient(115deg,#10263df0,#0a1c30f0);
  border-color: #8ccdf86e; backdrop-filter: blur(14px);
}
.learning-hero .live-experiment h2 { margin-bottom: .38rem; }
.learning-hero .live-experiment p:not(.live-result) { margin-bottom: .42rem; }
.learning-hero .live-console { padding: 10px 12px; }
.learning-hero .live-result { margin-top: .35rem; }
.home-section .material-card:nth-child(2) { border-color: #7ce0db65; }
.home-section .material-card:nth-child(3) { border-color: #b4a2fa72; }
.home-section .material-card .cover { transition: filter .3s; }
.home-section .material-card:hover .cover, .home-section .material-card:focus-within .cover { filter: brightness(1.2); }
@media (min-width: 801px) {
  .learning-hero .live-experiment { grid-template-columns: minmax(0,1fr) minmax(0,1.35fr); }
}
@media (max-width: 540px) {
  .hero-media .cover { height: 58%; object-position: 71% center; }
  .hero-media::after { background: linear-gradient(0deg,#071326 38%,#07132600 88%),linear-gradient(90deg,#071326da,transparent); }
  .learning-hero .hero-copy > .lead { max-width: 24rem; }
}
@media (prefers-reduced-motion: no-preference) {
  .live-console:not(.solved) .live-bits button:nth-child(3),
  .live-console:not(.solved) .live-bits button:nth-child(5),
  .live-console:not(.solved) .live-bits button:nth-child(7) {
    animation: bit-hint 1.1s ease-out 1.15s;
  }
  .live-console:not(.solved) .live-bits button:nth-child(5) { animation-delay: 1.31s; }
  .live-console:not(.solved) .live-bits button:nth-child(7) { animation-delay: 1.47s; }
}
@keyframes bit-hint {
  45% { border-color: #b8edff; box-shadow: inset 0 0 14px #60cfff59, 0 0 11px #64d6ff70; }
}

.scene-canvas {
  position: absolute; inset: 0; width: 100%; height: 100%;
  pointer-events: none; opacity: .86;
}
.hero-copy .launch-button {
  color: #061827; border-color: #d4f5ff;
  background: linear-gradient(115deg,#ddf9ff,#78d7ff 64%,#94abff);
  box-shadow: inset 0 1px #ffffffa8, 0 0 28px #64d6ff64;
  transition: box-shadow .2s, transform .2s;
}
.hero-copy .launch-button[hidden] { display: none; }
.hero-copy .launch-button:hover { box-shadow: 0 0 34px #78daff9c; transform: translateY(-2px); }
.hero-copy .secondary { color: #eff8ff; background: #112a43e8; border-color: #90c7ef80; }
.learning-hero .live-experiment { border-top-color: #b0eaff9a; }
@media (prefers-reduced-motion: reduce) {
  .hero-copy .launch-button:hover { transform: none; }
}

/* Ambient light extends the glass scene beyond the hero. */
body { position: relative; isolation: isolate; }
body::before, body::after {
  content: ""; position: fixed; inset: 0; z-index: -1; pointer-events: none;
}
body::before {
  background:
    radial-gradient(ellipse at 7% 32%, #147fe64a, transparent 43%),
    radial-gradient(ellipse at 95% 83%, #075edf5c, transparent 42%),
    linear-gradient(151deg, transparent 38%, #3189ff18 49%, #6fe4ff38 51%, #1d61d322 54%, transparent 64%),
    linear-gradient(151deg, transparent 71%, #1b72ed33 78%, #80ddff31 80%, transparent 84%);
}
body::after {
  background-image:
    linear-gradient(#61b9f728 1px, transparent 1px),
    linear-gradient(90deg, #61b9f728 1px, transparent 1px);
  background-size: 47px 47px;
  mask-image: radial-gradient(ellipse at 91% 65%, #000, transparent 53%),
    radial-gradient(ellipse at 4% 28%, #000b, transparent 42%);
}
@media (prefers-reduced-motion: no-preference) {
  body::before { animation: ambient-light 19s ease-in-out infinite alternate; }
}
@keyframes ambient-light { from { opacity: .76; } to { opacity: 1; } }
.workspace { background: linear-gradient(135deg,#163753b8,#071728d6 60%,#13344ca6); }
body::after {
  background-image:
    linear-gradient(#61b9f738 1px, transparent 1px),
    linear-gradient(90deg, #61b9f738 1px, transparent 1px),
    var(--ambient-glass);
  background-size: 47px 47px, 47px 47px, clamp(720px, 74vw, 1280px) auto;
  background-position: center, center, right -24vw bottom -28vh;
  background-repeat: repeat, repeat, no-repeat;
  opacity: .55;
  mix-blend-mode: screen;
}
body { --ambient-glass: url("/assets/hero.jpg"); }
