/* Diamond Block inspired editorial design for H@CKERBOY.
   One final layer; works with existing static pages and light/dark themes. */
:root[data-theme="light"]{
  --bg:#f8f9fc;--bg-soft:#edf1f6;--surface:#ffffff;--surface-2:#e7edf5;
  --text:#172235;--muted:#536278;--dim:#617187;
  --accent:#255f9a;--accent-2:#3c7eb7;--line:rgba(34,61,95,.10);
  --line-strong:rgba(34,61,95,.20);--hairline:rgba(34,61,95,.10);
  --ui-card:#ffffff;--ui-card-hover:#f5f8fc;
  --ui-primary:#24466e;--ui-primary-hover:#345b86;
  --max:1260px;--hb-space:clamp(86px,10vw,152px);
}
:root[data-theme="dark"]{
  --bg:#131a24;--bg-soft:#1a2330;--surface:#222e3e;--surface-2:#2b3a4d;
  --text:#f4f7fd;--muted:#bdc9d8;--dim:#96aabd;
  --accent:#9fc9ff;--accent-2:#c8e0ff;--line:rgba(217,232,251,.12);
  --line-strong:rgba(217,232,251,.25);--hairline:rgba(217,232,251,.12);
  --ui-card:#1e2938;--ui-card-hover:#253347;
  --ui-primary:#bedbff;--ui-primary-hover:#dbeaff;
  --max:1260px;--hb-space:clamp(86px,10vw,152px);
}
body{background:var(--bg)!important;color:var(--text);font-family:-apple-system,BlinkMacSystemFont,"Segoe UI",Inter,system-ui,sans-serif}
.site-header{
  min-height:52px!important;background:color-mix(in srgb,var(--bg) 86%,transparent)!important;
  backdrop-filter:saturate(140%) blur(24px)!important;
  -webkit-backdrop-filter:saturate(140%) blur(24px)!important;
  border-bottom:1px solid var(--hairline)!important;
}
.site-header .header-inner{min-height:52px!important}
.brand-copy strong{font-weight:680!important;letter-spacing:-.045em!important}
.site-nav a{font-weight:540!important}
:root[data-theme="light"] .brand-mark{background:var(--surface)!important}
:is(.command-launch,.icon-button,.menu-button){background:transparent!important}
:is(.command-launch,.icon-button,.menu-button):hover{background:var(--surface-2)!important}
:root[data-theme="dark"] :is(.button-primary,a.button-primary,.header-cta,body .smart-query button){
  background:#bedbff!important;color:#17263b!important;border-color:#bedbff!important;
}
:root[data-theme="dark"] :is(.button-primary,a.button-primary,.header-cta,body .smart-query button):hover{
  background:#dbeaff!important;color:#17263b!important;border-color:#dbeaff!important;
}
:root[data-theme="light"] :is(.button-primary,a.button-primary,.header-cta,body .smart-query button){
  background:#24466e!important;color:#fff!important;border-color:#24466e!important;
}
:root[data-theme="light"] :is(.button-primary,a.button-primary,.header-cta,body .smart-query button):hover{
  background:#345b86!important;color:#fff!important;border-color:#345b86!important;
}
.button{font-weight:620!important;letter-spacing:-.018em!important}
:where(.button,.project-link,.text-link,.header-cta):focus-visible{outline:2px solid var(--text)!important;outline-offset:5px!important}
.portfolio-hero{
  min-height:0!important;padding:clamp(92px,8vw,138px) 0 clamp(92px,9vw,148px)!important;
  background:var(--bg)!important;
}
.portfolio-hero::after{
  background:radial-gradient(ellipse,rgba(128,128,138,.12),rgba(128,128,138,.03) 45%,transparent 71%)!important;
  opacity:.54;
}
.portfolio-hero::before{
  background:linear-gradient(90deg,color-mix(in srgb,var(--bg) 98%,transparent),color-mix(in srgb,var(--bg) 84%,transparent) 65%,color-mix(in srgb,var(--bg) 54%,transparent))!important;
}
.portfolio-hero-image{opacity:.24!important;filter:grayscale(1) contrast(1.08)!important}
.portfolio-hero-grid{
  grid-template-columns:minmax(0,.92fr) minmax(0,1.08fr)!important;
  align-items:center;gap:clamp(28px,5vw,84px)!important;min-height:550px;
}
.portfolio-hero h1{
  max-width:720px!important;font-size:clamp(3.2rem,6.1vw,6.6rem)!important;
  line-height:.99!important;letter-spacing:-.077em!important;font-weight:680!important;
}
.portfolio-hero h1 em{
  background:none!important;color:color-mix(in srgb,var(--text) 43%,var(--bg))!important;
  -webkit-text-fill-color:currentColor!important;text-shadow:none!important;
}
.portfolio-hero-copy .eyebrow{font-size:.72rem!important;font-weight:630!important;color:var(--dim)!important;letter-spacing:.12em!important;text-transform:uppercase!important}
.portfolio-hero .hero-text{max-width:53ch!important;font-size:clamp(.98rem,1.3vw,1.12rem)!important;line-height:1.75!important}
.portfolio-hero .hero-proof{font-size:.77rem!important;line-height:1.5!important}
.hero-actions{gap:12px!important}
.hero-console{
  width:100%!important;min-height:445px!important;max-width:650px;border:1px solid var(--line)!important;
  border-radius:30px!important;background:color-mix(in srgb,var(--surface) 95%,transparent)!important;
  box-shadow:0 32px 80px rgba(0,0,0,.1)!important;
}
:root[data-theme="dark"] .hero-console{box-shadow:0 30px 86px rgba(0,0,0,.32)!important}
.hero-console .console-bar{padding:21px 25px!important;border-bottom:1px solid var(--line)!important}
.hero-console .console-body{padding:clamp(26px,4vw,46px)!important}
.console-body .prompt,.console-body .cyan{color:var(--dim)!important}
.hero-discovery{margin-top:35px;color:var(--dim)}
.hero-discovery a{color:var(--text)}
.hero-discovery a span{color:var(--text)}
.proof-strip,.signal-strip{background:var(--bg-soft)!important;border:0!important}
.proof-grid>div,.signal-grid>div{border-color:var(--line)!important}
.proof-grid strong{letter-spacing:-.035em}
.proof-grid p{color:var(--muted)!important}
.section-heading{align-items:end!important}
.section-heading h2{
  max-width:16ch;line-height:1.04!important;letter-spacing:-.065em!important;
  font-size:clamp(2.8rem,5.3vw,5.75rem)!important;font-weight:665!important;
}
.section-heading>p{max-width:40ch!important;line-height:1.75!important;font-size:.96rem!important}
:is(.projects-section,.exploits-section,.expertise-section,.articles-section,.about-section,.contact-section){background:var(--bg)}
.projects-grid{gap:clamp(16px,2vw,25px)!important}
:where(.project-card,.post-card){
  border-radius:28px!important;border:1px solid var(--line)!important;
  box-shadow:none!important;background:var(--bg-soft)!important;
}
:where(.project-card,.post-card):hover{box-shadow:0 16px 48px rgba(0,0,0,.08)!important}
.project-card,.post-card{background:var(--bg-soft)!important;box-shadow:none!important}
.project-card:hover,.post-card:hover{box-shadow:0 20px 54px rgba(0,0,0,.12)!important}
.project-visual,.card-image{background:#e8e8e8!important;isolation:isolate}
:root[data-theme="dark"] :is(.project-visual,.card-image){background:#19191a!important}
.project-visual img,.card-image img{filter:saturate(.74) contrast(1.01)!important;opacity:1!important}
.project-card.project-featured{border-color:var(--line)!important}
.featured-work-tag{
  color:var(--muted)!important;background:var(--surface-2)!important;
  border:1px solid var(--line)!important;font-size:.66rem!important;letter-spacing:.11em!important;
  text-transform:uppercase;
}
.featured-work-tag::before{background:var(--text)!important}
.project-meta,.card-meta{font-size:.69rem!important;color:var(--dim)!important;letter-spacing:.05em}
.project-content h3{font-size:clamp(1.6rem,2.5vw,2.35rem)!important;font-weight:645!important;letter-spacing:-.057em!important}
.post-card .card-body h3{font-weight:640!important;letter-spacing:-.04em!important}
.project-content p,.card-body p{font-size:.87rem!important;line-height:1.7!important}
.project-actions .project-link,.card-body>.text-link{
  background:transparent!important;color:var(--text)!important;
  border-color:var(--line-strong)!important;font-weight:600!important;
}
.project-actions .project-link:hover,.card-body>.text-link:hover{
  background:var(--surface-2)!important;border-color:var(--text)!important;
  color:var(--text)!important;
}
.project-proof span,.case-proof-item{border-color:var(--line)!important;color:var(--muted)!important;background:var(--surface)!important}
.project-status{border:1px solid var(--line)!important;box-shadow:none!important}
.social-card,.expertise-item,.case-aside-card,.aside-card{box-shadow:none!important}
.social-card{background:var(--bg-soft)!important}
.social-card::before{background:var(--text)!important;opacity:.24!important}
.smart-finder{background:var(--bg-soft)!important;border:1px solid var(--line)!important;box-shadow:none!important}
.smart-finder::after{display:none!important}
.smart-query{background:var(--surface)!important}
:root[data-theme="dark"] .manifesto-scene{
  background:#202b3b!important;color:var(--text)!important;
}
:root[data-theme="light"] .manifesto-scene{
  background:#e8eff7!important;color:var(--text)!important;
}
.manifesto-scene::before{
  background:radial-gradient(ellipse at 80% 22%,rgba(137,185,238,.17),transparent 57%)!important;
}
.manifesto-scene h2{color:var(--text)!important}
.manifesto-scene h2 em{color:color-mix(in srgb,var(--text) 44%,var(--bg))!important}
.manifesto-scene p{color:var(--muted)!important}
.manifesto-scene .eyebrow{color:var(--dim)!important}
.manifesto-scene .manifesto-link{color:var(--text);border-color:var(--line-strong)}
.manifesto-scene .manifesto-index{color:color-mix(in srgb,var(--text) 9%,transparent)}
.page-intro,.article-hero,.case-hero{background:var(--bg)!important}
.page-intro h1,.article-hero h1,.case-hero h1{
  font-weight:660!important;line-height:1.03!important;letter-spacing:-.066em!important;
}
.article-cover,.case-cover,.vision-image,.about-image{border-radius:28px!important;overflow:hidden;box-shadow:none!important}
.page-intro .eyebrow,.article-kicker,.case-kicker{letter-spacing:.08em!important}
:root[data-theme="light"] :is(.article-cover,.case-cover){border-color:var(--line)!important}
.site-footer{background:var(--bg-soft)!important;border-top:1px solid var(--line)!important}
.site-footer .footer-label{color:var(--muted)!important}
.site-footer a:hover{color:var(--text)}
/* The animated story remains semantic content, even with scripting disabled. */
.db-story{
  position:relative;padding:clamp(90px,10vw,150px) 0;
  background:var(--bg);border-top:1px solid var(--line);
}
.db-story-heading{max-width:920px;margin-bottom:clamp(34px,6vw,76px)}
.db-story-heading .eyebrow{font-size:.71rem!important;letter-spacing:.13em!important;text-transform:uppercase!important}
.db-story-heading h2{
  margin:19px 0 20px;color:var(--text);
  max-width:15ch;font-size:clamp(2.8rem,6.4vw,7rem);font-weight:650;
  line-height:.99;letter-spacing:-.075em;text-wrap:balance;
}
.db-story-heading h2 em{font-style:normal;color:color-mix(in srgb,var(--text) 46%,var(--bg))}
.db-story-heading p{max-width:56ch;color:var(--muted);font-size:clamp(.97rem,1.4vw,1.12rem);line-height:1.75}
.db-story-grid{display:grid;grid-template-columns:minmax(0,1.12fr) minmax(0,.88fr);gap:clamp(35px,8vw,124px);align-items:start}
.db-story-stage{position:sticky;top:clamp(76px,8vh,120px);height:min(73svh,690px);min-height:380px}
.db-story-visual{
  position:relative;width:100%;height:100%;overflow:hidden;
  border-radius:clamp(23px,3vw,35px);background:var(--surface-2);
  box-shadow:0 20px 60px rgba(0,0,0,.12);
}
.db-story-visual .db-story-media{
  position:absolute;inset:0;margin:0;opacity:0;
  transform:scale(1.075);transition:opacity .8s cubic-bezier(.16,1,.3,1),transform 1.4s cubic-bezier(.16,1,.3,1);
}
.db-story-visual .db-story-media.is-current{opacity:1;transform:scale(1)}
.db-story-media img{width:100%;height:100%;object-fit:cover;filter:saturate(.67) contrast(1.02)}
.db-story-visual::after{
  content:"";position:absolute;inset:0;pointer-events:none;
  background:linear-gradient(180deg,rgba(0,0,0,.06) 28%,transparent 51%,rgba(0,0,0,.65) 100%);
}
.db-story-visual-caption{
  position:absolute;z-index:1;inset:auto 28px 28px;
  display:flex;justify-content:space-between;align-items:flex-end;gap:16px;
  color:white;
}
.db-story-visual-caption strong{font-size:clamp(1.15rem,2vw,2rem);letter-spacing:-.04em;font-weight:600}
.db-story-visual-caption .db-story-count{
  font:500 .77rem/1.4 ui-monospace,Consolas,monospace;letter-spacing:.1em;white-space:nowrap;
}
.db-story-track{position:absolute;z-index:2;top:25px;left:26px;right:26px;display:flex;gap:7px}
.db-story-track span{height:2px;flex:1;background:rgba(255,255,255,.32);overflow:hidden;border-radius:99px}
.db-story-track span::before{content:"";display:block;width:100%;height:100%;background:white;transform:scaleX(0);transform-origin:left;transition:transform .45s cubic-bezier(.16,1,.3,1)}
.db-story-track span.is-past::before,.db-story-track span.is-current::before{transform:scaleX(1)}
.db-story-chapters{display:flex;flex-direction:column}
.db-story-chapter{
  min-height:70svh;display:flex;flex-direction:column;justify-content:center;
  padding:clamp(50px,7vw,90px) 0;
  border-bottom:1px solid var(--line);opacity:.82;
  transition:opacity .5s ease;
}
.db-story-chapter:last-child{border-bottom:0}
.db-story-chapter.is-current{opacity:1}
.db-story-chapter .db-step{font:600 .75rem/1.4 ui-monospace,Consolas,monospace;color:var(--dim);letter-spacing:.1em}
.db-story-chapter h3{
  max-width:12ch;margin:20px 0;font-size:clamp(2.35rem,4.2vw,4.6rem);
  font-weight:650;line-height:1.06;letter-spacing:-.068em;text-wrap:balance;
}
.db-story-chapter p{max-width:43ch;color:var(--muted);font-size:clamp(.98rem,1.2vw,1.09rem);line-height:1.77}
.db-story-chapter .db-chapter-link{
  display:inline-flex;align-self:flex-start;align-items:center;gap:9px;
  margin-top:24px;padding-bottom:7px;border-bottom:1px solid var(--line-strong);
  color:var(--text);text-decoration:none;font-weight:600;font-size:.87rem;
}
.db-story-chapter .db-chapter-link:hover{border-color:var(--text)}
.db-story-mobile{display:none}
.db-story-nojs .db-story-chapter{opacity:1}
@media(min-width:981px){
 body[data-page="home"] .projects-grid .project-card.project-featured{
   grid-column:1/-1!important;display:grid!important;
   grid-template-columns:minmax(0,1.12fr) minmax(0,.88fr)!important;
 }
 body[data-page="home"] .projects-grid .project-card.project-featured .project-visual{
   height:100%;min-height:420px;aspect-ratio:auto!important;
 }
 body[data-page="home"] .project-featured .project-content{justify-content:center;padding:clamp(32px,4vw,58px)!important}
 body[data-page="home"] .projects-grid .project-card:nth-child(2),
 body[data-page="home"] .projects-grid .project-card:nth-child(3),
 body[data-page="home"] .projects-grid .project-card:nth-child(4){grid-column:auto!important}
 body[data-page="home"] .projects-grid{grid-template-columns:repeat(3,minmax(0,1fr))!important}
}
@media(max-width:1100px){
 .portfolio-hero-grid{grid-template-columns:minmax(0,1fr)!important;gap:36px!important;min-height:0}
 .hero-console{width:min(100%,690px)!important}
}
@media(max-width:980px){
 .section-heading{align-items:flex-start!important}
 .db-story-grid{grid-template-columns:minmax(0,1fr);gap:0}
 .db-story-stage{display:none}
 .db-story-chapter{opacity:1;min-height:0;padding:22px 0 70px}
 .db-story-chapter h3{font-size:clamp(2.4rem,7vw,4.6rem)}
 .db-story-mobile{display:block;width:100%;aspect-ratio:16/11;overflow:hidden;border-radius:26px;background:var(--surface-2);margin:0 0 28px}
 .db-story-mobile img{width:100%;height:100%;object-fit:cover;filter:saturate(.72)}
}
@media(max-width:720px){
 :root[data-theme="light"],:root[data-theme="dark"]{--hb-space:74px}
 .portfolio-hero{padding:82px 0 72px!important}
 .portfolio-hero h1{font-size:clamp(2.8rem,11.3vw,4.9rem)!important;line-height:1.01!important}
 .hero-console{min-height:315px!important;border-radius:24px!important}
 .hero-console .console-body{padding:25px!important}
 .section-heading h2{font-size:clamp(2.6rem,11vw,4.3rem)!important}
 .project-card,.post-card{border-radius:24px!important}
 .db-story{padding:80px 0}
 .db-story-heading{margin-bottom:45px}
 .db-story-heading h2{font-size:clamp(2.65rem,11vw,5rem)}
 .db-story-chapter{padding-bottom:55px}
 .db-story-mobile{aspect-ratio:4/3;border-radius:24px}
 .db-story-chapter h3{font-size:clamp(2.4rem,10vw,3.8rem)}
}
@media(prefers-reduced-motion:reduce){
 .db-story-media,.db-story-chapter,.db-story-track span::before{transition:none!important}
 .db-story-chapter{opacity:1}
}

/* Graphite & Glacier — legible depth in both light and dark themes. */
html{background:var(--bg)!important}
:root[data-theme="dark"]{color-scheme:dark}
:root[data-theme="light"]{color-scheme:light}
:root[data-theme="dark"] .site-header{background:rgba(19,26,36,.91)!important;border-bottom-color:rgba(217,232,251,.13)!important}
:root[data-theme="light"] .site-header{background:rgba(248,249,252,.90)!important}
:root[data-theme="dark"] .portfolio-hero{background:radial-gradient(ellipse 80% 82% at 88% 6%,rgba(102,151,215,.17),transparent 66%),linear-gradient(155deg,#131a24,#192638)!important}
:root[data-theme="light"] .portfolio-hero{background:radial-gradient(ellipse 75% 86% at 90% 12%,rgba(164,200,236,.24),transparent 65%),#f8f9fc!important}
:root[data-theme="dark"] .portfolio-hero::before{background:linear-gradient(90deg,rgba(19,26,36,.94) 0%,rgba(19,26,36,.79) 51%,rgba(19,26,36,.15) 100%)!important}
:root[data-theme="light"] .portfolio-hero::before{background:linear-gradient(90deg,rgba(248,249,252,.95),rgba(248,249,252,.75) 55%,rgba(248,249,252,.12))!important}
.portfolio-hero::after{background:radial-gradient(ellipse,rgba(124,170,225,.21),rgba(110,148,200,.05) 54%,transparent 74%)!important}
.portfolio-hero-image{opacity:.30!important;filter:saturate(.85) contrast(1.03)!important}
.portfolio-hero h1 em{color:var(--accent)!important;-webkit-text-fill-color:var(--accent)!important;background:none!important}
:root[data-theme="dark"] .hero-console{background:linear-gradient(150deg,#26364a,#1d2938)!important;border:1px solid rgba(217,232,251,.2)!important;box-shadow:0 22px 65px rgba(7,14,25,.23)!important}
:root[data-theme="light"] .hero-console{background:linear-gradient(150deg,#ffffff,#f4f7fb)!important;border:1px solid var(--line-strong)!important;box-shadow:0 28px 68px rgba(36,61,92,.09)!important}
:root[data-theme] .console-body :is(.cyan,.prompt){color:var(--accent)!important}
:root[data-theme="dark"] :is(.project-card,.post-card,.social-card,.expertise-item,.case-aside-card,.aside-card,.contact-panel,.bot-card){background:var(--ui-card)!important;border-color:var(--line)!important}
:root[data-theme="light"] :is(.project-card,.post-card,.social-card,.expertise-item,.case-aside-card,.aside-card,.contact-panel,.bot-card){background:var(--ui-card)!important;border-color:var(--line)!important}
:root[data-theme="dark"] :is(.project-card,.post-card):is(:hover,:focus-within){background:var(--ui-card-hover)!important;border-color:rgba(172,205,245,.35)!important;box-shadow:0 20px 55px rgba(5,14,28,.24)!important}
:root[data-theme="light"] :is(.project-card,.post-card):is(:hover,:focus-within){border-color:rgba(83,123,173,.30)!important;box-shadow:0 18px 45px rgba(30,59,92,.09)!important}
:root[data-theme="dark"] :is(.project-visual,.card-image,.db-story-visual,.db-story-mobile){background:#243245!important}
:root[data-theme="light"] :is(.project-visual,.card-image,.db-story-visual,.db-story-mobile){background:#e3ebf5!important}
:root[data-theme] :is(.project-visual img,.card-image img){filter:saturate(.9) contrast(1.03)!important;opacity:1!important}
:root[data-theme="dark"] :is(.project-status,.project-card.project-featured .project-status){background:rgba(28,40,58,.9)!important;color:#f5f8ff!important;border-color:rgba(224,236,255,.3)!important}
:root[data-theme="light"] :is(.project-status,.project-card.project-featured .project-status){background:rgba(32,46,65,.86)!important;color:#fff!important;border-color:rgba(255,255,255,.15)!important}
:root[data-theme] .project-meta span:first-child{color:var(--accent)!important}
:root[data-theme="dark"] .featured-work-tag{color:var(--accent)!important;background:rgba(159,201,255,.1)!important;border-color:rgba(159,201,255,.24)!important}
:root[data-theme="light"] .featured-work-tag{color:var(--accent)!important;background:#e8f0fa!important;border-color:rgba(37,95,154,.18)!important}
:root[data-theme="dark"] .db-story{background:linear-gradient(180deg,#182230 0%,#131a24 76%)!important}
:root[data-theme="light"] .db-story{background:linear-gradient(180deg,#f0f4f9 0%,#f8f9fc 76%)!important}
.db-story-heading h2 em,.manifesto-scene h2 em{color:var(--accent)!important}
.db-story-media img{filter:saturate(.9) contrast(1.04)!important}
:root[data-theme="dark"] :is(.proof-strip,.signal-strip,.exploits-section,.site-footer){background:#1a2330!important}
:root[data-theme="light"] :is(.proof-strip,.signal-strip,.exploits-section,.site-footer){background:#edf1f6!important}
:root[data-theme] :is(.projects-section,.articles-section,.expertise-section,.about-section,.contact-section,.journal-section){background:var(--bg)!important}
:root[data-theme="dark"] .smart-finder{background:linear-gradient(145deg,#253347,#1c2735)!important;border-color:var(--line-strong)!important}
:root[data-theme="light"] .smart-finder{background:linear-gradient(145deg,#ffffff,#eff3f9)!important;border-color:var(--line)!important}
:root[data-theme="dark"] .manifesto-scene::before{background:radial-gradient(ellipse 75% 85% at 85% 22%,rgba(121,166,230,.18),transparent 65%)!important}
:root[data-theme="dark"] .article-content :is(pre,code){background:#1c2837!important;border-color:var(--line-strong)!important}
:root[data-theme="dark"] .article-content blockquote{background:#202d3e!important}
:root[data-theme="light"] .article-content blockquote{background:#ecf2f9!important}
:root[data-theme="dark"] :is(.back-to-top,.palette-dialog){background:#222e3e!important;color:var(--text)!important;border-color:var(--line-strong)!important}
:root[data-theme="light"] :is(.back-to-top,.palette-dialog){background:#fff!important;color:var(--text)!important;border-color:var(--line-strong)!important}
:root[data-theme="dark"] .palette-result:is(:hover,.is-active,:focus-visible){background:#2b3a4d!important}
:root[data-theme="dark"] :is(.button-ghost,.project-actions .project-link,.card-body>.text-link){border-color:rgba(200,223,251,.3)!important}
:root[data-theme="dark"] :is(.button-ghost,.project-actions .project-link,.card-body>.text-link):hover{background:#2b3a4d!important;border-color:var(--accent)!important}
:root[data-theme="light"] :is(.button-ghost,.project-actions .project-link,.card-body>.text-link):hover{background:#e7edf5!important;border-color:var(--accent)!important}
:root[data-theme="dark"] :is(.filter-button,.smart-chip).is-active{background:var(--accent)!important;border-color:var(--accent)!important;color:#17263b!important}
:root[data-theme="light"] :is(.filter-button,.smart-chip).is-active{background:var(--accent)!important;border-color:var(--accent)!important;color:#fff!important}
:root[data-theme="dark"] :is(.site-nav .is-current,.site-nav a[aria-current]){background:rgba(159,201,255,.11)!important;color:var(--accent)!important}
:root[data-theme="light"] :is(.site-nav .is-current,.site-nav a[aria-current]){background:rgba(37,95,154,.08)!important;color:var(--accent)!important}
:root[data-theme="dark"] .menu-button.is-open{background:#2b3a4d!important}
@media(max-width:980px){
 :root[data-theme="dark"] .site-header .site-nav{background:#263447!important;border-color:var(--line-strong)!important;box-shadow:0 18px 55px rgba(4,12,25,.38)!important}
 :root[data-theme="light"] .site-header .site-nav{background:#fff!important;border-color:var(--line-strong)!important}
}
@media(forced-colors:active){.portfolio-hero h1 em{-webkit-text-fill-color:currentColor!important}}


/* LEARNING EXPERIENCE V1 — iconography, accessible teaching cards, editorial journey */
.hb-icon{display:inline-block;width:1.05em;height:1.05em;min-width:1.05em;flex-shrink:0;vertical-align:-.15em;stroke:currentColor;pointer-events:none}
:is(.project-actions a,.button,.text-link,.db-chapter-link,.manifesto-link,.hero-discovery a,.project-status,.project-proof span:first-child,.reference-list a,.learning-resource){display:inline-flex;align-items:center;gap:8px}
:is(.project-actions a,.button,.text-link,.db-chapter-link,.manifesto-link) .hb-icon{width:16px;height:16px;min-width:16px}
.project-status .hb-icon,.project-proof .hb-icon{width:13px;height:13px;min-width:13px}
.expertise-item h3:has(>.hb-icon){display:flex;align-items:center;gap:10px}
.expertise-item h3>.hb-icon{color:var(--accent);width:23px;height:23px;min-width:23px}
.course-overview>div>.hb-icon{display:block;width:21px;height:21px;margin-bottom:13px;color:var(--accent)}
:is(.course-objectives,.course-summary,.exercise-card,.reference-box,.quiz-section,.guided-lab) h2:has(>.hb-icon){display:flex;align-items:center;flex-wrap:wrap;gap:12px}
:is(.course-objectives,.course-summary,.exercise-card,.reference-box,.quiz-section,.guided-lab) h2>.hb-icon{color:var(--accent);width:23px;height:23px;min-width:23px}
.learning-section{padding:clamp(100px,10vw,165px) 0;background:var(--bg)!important;position:relative}
.learning-section::before{content:"";position:absolute;inset:0 0 auto;height:1px;background:var(--line)}
.learning-header{display:flex;align-items:end;justify-content:space-between;gap:clamp(25px,5vw,80px);margin-bottom:clamp(34px,5vw,67px)}
.learning-header>div:first-child{min-width:0;flex:1}
.learning-header h2{font-size:clamp(2.9rem,6.1vw,6.7rem);font-weight:680;letter-spacing:-.074em;line-height:1.02;margin:17px 0 23px;max-width:900px}
.learning-header h2 em{color:var(--accent);font-style:normal}
.learning-header p{color:var(--muted);max-width:68ch;line-height:1.8;margin:0;font-size:clamp(.94rem,1.35vw,1.08rem)}
.learning-counter{flex:0 0 clamp(190px,20vw,260px);border:1px solid var(--line-strong);background:var(--surface);padding:22px;border-radius:22px}
.learning-counter span,.learning-counter small{display:block;color:var(--muted);font-size:.75rem}
.learning-counter strong{display:block;margin:9px 0;font:650 clamp(2.25rem,3vw,3.6rem)/1.1 ui-monospace,Consolas,monospace;letter-spacing:-.06em;color:var(--text)}
.learning-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:12px}
.learning-item{display:flex;flex-direction:column;min-width:0;min-height:262px;padding:clamp(20px,2.2vw,29px);border:1px solid var(--line);border-radius:23px;background:var(--ui-card);text-decoration:none;color:var(--text);box-shadow:none;transition:transform .35s cubic-bezier(.16,1,.3,1),background .25s,border-color .25s,box-shadow .25s}
.learning-item:hover,.learning-item:focus-visible{background:var(--ui-card-hover);border-color:var(--accent);box-shadow:0 15px 45px rgba(8,25,45,.1);transform:translateY(-3px)}
.learning-item:focus-visible{outline:3px solid var(--accent);outline-offset:3px}
.learning-item-top{display:flex;justify-content:space-between;align-items:center;gap:12px}
.learning-number{display:block;font:600 .76rem/1.4 ui-monospace,Consolas,monospace;color:var(--accent)}
.learning-category{font-size:.67rem;color:var(--dim);letter-spacing:.03em}
.learning-item h3{font-size:clamp(1.17rem,1.65vw,1.55rem);letter-spacing:-.045em;line-height:1.16;font-weight:680;margin:35px 0 11px}
.learning-item p{color:var(--muted);font-size:.83rem;line-height:1.65;margin:0 0 23px}
.learning-item-bottom{display:flex;justify-content:space-between;align-items:center;gap:10px;margin-top:auto;border-top:1px solid var(--line);padding-top:15px;font-size:.76rem;font-weight:620;color:var(--muted)}
.learning-item-bottom>span:last-child{font-size:1.14rem;color:var(--accent)}
.learning-item.is-complete{border-color:color-mix(in srgb,var(--accent) 38%,var(--line))}
.learning-item.is-complete .learning-status{color:var(--accent)}
.learning-disclaimer{margin:22px 0 0;color:var(--dim);font-size:.77rem;line-height:1.6}
.guided-lab{margin:clamp(35px,6vw,70px) 0;padding:clamp(23px,3.9vw,44px);border:1px solid var(--line-strong);background:var(--ui-card);border-radius:28px;position:relative;overflow:hidden}
.guided-lab::before{content:"";position:absolute;top:0;left:0;right:0;height:3px;background:linear-gradient(90deg,var(--accent),transparent)}
.guided-lab .guided-label{display:block;color:var(--accent);font-size:.72rem;letter-spacing:.11em;font-weight:730;text-transform:uppercase;margin-bottom:12px}
.guided-lab h2{font-size:clamp(1.65rem,2.7vw,2.45rem);line-height:1.14!important;letter-spacing:-.045em!important;margin:0 0 20px!important}
.guided-lab h3{font-size:clamp(1.12rem,2vw,1.32rem);font-weight:680;letter-spacing:-.03em;margin:28px 0 14px!important}
.guided-lab p,.guided-lab li{color:var(--muted);line-height:1.78;font-size:.95rem}
.guided-lab li{margin:0}
.guided-steps{display:grid;gap:13px;padding-left:26px;margin:14px 0 26px}
.guided-steps li::marker{color:var(--accent);font-weight:750}
.guided-code{max-width:100%;overflow:auto;padding:24px!important;border:1px solid rgba(187,207,238,.14)!important;border-radius:18px!important;background:#101927!important;box-shadow:inset 0 1px 0 rgba(255,255,255,.03)}
.guided-code code{display:block;white-space:pre;max-width:none;background:transparent!important;color:#e1edff!important;border:0!important;padding:0!important;font:500 .85rem/1.75 ui-monospace,SFMono-Regular,Consolas,monospace;tab-size:2}
.guided-result,.guided-warning{padding:16px 20px;border-radius:15px;border:1px solid var(--line);background:var(--bg-soft);margin:17px 0!important}
.guided-result strong{color:var(--accent)}
.guided-warning{border-left:3px solid #d39c59}
.guided-warning strong{color:var(--text)}
.guided-selfcheck{margin-top:36px}
.guided-selfcheck details{border-bottom:1px solid var(--line);padding:11px 0}
.guided-selfcheck summary{display:list-item;padding:10px 6px 10px 0;color:var(--text);font-weight:640;cursor:pointer;font-size:.9rem}
.guided-selfcheck details[open] summary{color:var(--accent)}
.guided-selfcheck details p{margin:5px 0 14px;padding-left:15px}
.guided-resources{margin-top:28px}
.guided-resources .learning-resource{width:100%;min-height:43px;padding:12px 0;border-bottom:1px solid var(--line);justify-content:space-between;text-decoration:none;color:var(--accent);font-size:.87rem;font-weight:600;line-height:1.5}
.guided-resources .learning-resource:hover{text-decoration:underline;text-underline-offset:3px}
.guided-completion{display:flex;align-items:center;justify-content:space-between;flex-wrap:wrap;gap:17px;margin-top:34px;padding:23px;border:1px solid var(--line);border-radius:20px;background:var(--bg-soft)}
.guided-completion p{max-width:40ch;margin:0;font-size:.85rem}
.complete-lesson{display:inline-flex;align-items:center;justify-content:center;min-height:46px;padding:12px 18px;border:1px solid var(--accent);border-radius:999px;background:var(--accent);color:var(--bg);font:650 .83rem/1.3 inherit;font-family:inherit;font-size:.83rem;font-weight:650;cursor:pointer;transition:transform .2s,box-shadow .2s,background .2s}
.complete-lesson:hover{transform:translateY(-2px);box-shadow:0 8px 28px rgba(12,35,66,.2)}
.complete-lesson:focus-visible{outline:3px solid var(--accent);outline-offset:4px}
.complete-lesson[aria-pressed="true"]{background:var(--surface);color:var(--accent)}
:root[data-theme="dark"] .complete-lesson{color:#142238}
:root[data-theme="dark"] .complete-lesson[aria-pressed="true"]{color:var(--accent)}
/* Meta-inspired story: a single active segment follows scroll position; no scroll hijacking. */
.db-story-track span.is-current::before{transform:scaleX(var(--chapter-progress,0));transition:none}
.db-story-track span.is-past::before{transform:scaleX(1)}
@media(min-width:981px) and (prefers-reduced-motion:no-preference){
 .db-story-visual .db-story-media.is-current{transform:scale(var(--story-scale,1.025)) translate3d(0,var(--story-shift,0px),0)}
 .db-story-visual-caption{transform:translate3d(0,var(--caption-shift,0px),0);transition:transform .1s linear}
}
@media(max-width:1100px){.learning-grid{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media(max-width:800px){.learning-header{display:block}.learning-counter{width:max-content;max-width:100%;margin-top:30px;min-width:205px}}
@media(max-width:560px){.learning-section{padding:78px 0}.learning-header h2{font-size:clamp(2.65rem,10vw,4.1rem)}.learning-grid{grid-template-columns:minmax(0,1fr)}.learning-item{min-height:198px}.learning-item h3{margin-top:23px}.guided-lab{padding:20px;border-radius:21px}.guided-code{padding:15px!important}.guided-code code{font-size:.76rem}.guided-completion{padding:17px}.complete-lesson{width:100%}}
@media(prefers-reduced-motion:reduce){.learning-item,.complete-lesson{transition:none!important}.learning-item:hover{transform:none!important}.db-story-track span.is-current::before{transform:scaleX(1)}}

/* Discoverability for all guided lessons. */
.learning-return{display:inline-flex;align-items:center;gap:8px;margin:0 0 24px;padding:10px 15px;border:1px solid var(--line-strong);border-radius:999px;background:var(--surface);color:var(--text)!important;font-size:.8rem;font-weight:650;text-decoration:none!important}
.learning-return:hover{background:var(--surface-2);border-color:var(--accent)}
.learning-return:focus-visible{outline:3px solid var(--accent);outline-offset:4px}


/* --------------------------------------------------------------------------
   ARTICLE DESIGN SYSTEM 2.0 — long-form technical reading experience
   Overrides only article routes; keeps portfolio and projects unchanged.
   -------------------------------------------------------------------------- */
body[data-page="article"] {
  --reading-width: 780px;
  --article-ink: var(--text);
  --article-muted: var(--muted);
  --article-edge: var(--line-strong);
  --article-panel: var(--surface);
  --article-subtle: var(--bg-soft);
  --article-radius: 26px;
}
body[data-page="article"] .article-page {
  width:100%;
  min-width:0;
  padding-bottom:clamp(85px,10vw,160px)!important;
  background:var(--bg)!important;
}
body[data-page="article"] .article-page .shell {
  max-width:1260px;
}
body[data-page="article"] .reading-progress {
  top:0;
  height:3px!important;
  z-index:100!important;
  background:transparent!important;
}
body[data-page="article"] .reading-progress span {
  background:linear-gradient(90deg,var(--accent),var(--accent-2))!important;
}
body[data-page="article"] .article-hero {
  position:relative;
  padding:clamp(45px,6vw,90px) 0 clamp(56px,7vw,95px)!important;
  border-bottom:1px solid var(--line);
  background:transparent!important;
}
body[data-page="article"] .article-kicker {
  display:flex;
  flex-wrap:wrap;
  gap:12px;
  align-items:center;
  margin:0 0 clamp(24px,4vw,44px)!important;
  color:var(--dim)!important;
  font-size:.76rem!important;
  font-weight:630;
  letter-spacing:.02em!important;
}
body[data-page="article"] .article-kicker a {
  display:inline-flex;
  align-items:center;
  min-height:38px;
  padding:8px 13px;
  border:1px solid var(--line-strong);
  border-radius:999px;
  background:var(--surface);
  color:var(--text)!important;
  text-decoration:none;
}
body[data-page="article"] .article-kicker a:hover {
  border-color:var(--accent);
  background:var(--surface-2);
}
body[data-page="article"] .article-kicker .dot {
  width:4px;height:4px;border-radius:50%;background:var(--accent)!important;
}
body[data-page="article"] .article-hero-grid {
  display:grid!important;
  grid-template-columns:minmax(0,1.12fr) minmax(290px,.73fr)!important;
  gap:clamp(32px,6vw,88px)!important;
  align-items:center!important;
  margin:0!important;
}
body[data-page="article"] .article-hero-grid>div:first-child{min-width:0}
body[data-page="article"] .article-hero h1 {
  max-width:17ch!important;
  margin:0 0 clamp(22px,3vw,32px)!important;
  font-size:clamp(2.8rem,5.25vw,5.8rem)!important;
  line-height:1.04!important;
  font-weight:680!important;
  letter-spacing:-.065em!important;
  overflow-wrap:break-word;
  text-wrap:balance;
}
body[data-page="article"] .article-lead{
  max-width:57ch!important;
  margin:0 0 24px!important;
  color:var(--muted)!important;
  font-size:clamp(1rem,1.4vw,1.17rem)!important;
  line-height:1.8!important;
  text-wrap:pretty;
}
body[data-page="article"] .course-meta {
  display:flex;align-items:center;flex-wrap:wrap;
  gap:8px!important;margin:26px 0 0!important;
}
body[data-page="article"] .course-pill {
  display:inline-flex;align-items:center;min-height:34px;
  padding:8px 12px!important;
  border:1px solid var(--line-strong);
  border-radius:999px!important;
  background:var(--surface)!important;
  color:var(--muted)!important;
  font-size:.72rem!important;
  font-weight:650;
}
body[data-page="article"] .article-meta{
  display:flex!important;align-items:center;flex-wrap:wrap;
  gap:12px 18px!important;margin-top:26px!important;
  color:var(--dim)!important;
  font:500 .73rem/1.55 -apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif!important;
  letter-spacing:0!important;text-transform:none!important;
}
body[data-page="article"] .save-article {
  display:inline-flex;align-items:center;justify-content:center;
  min-height:39px!important;
  padding:9px 14px!important;
  border:1px solid var(--line-strong)!important;
  border-radius:999px!important;
  background:var(--surface)!important;
  color:var(--text)!important;
  font-size:.75rem!important;font-weight:650;
  cursor:pointer;
  box-shadow:none!important;
}
body[data-page="article"] .save-article:hover,
body[data-page="article"] .save-article.is-saved{
  border-color:var(--accent)!important;
  color:var(--accent)!important;
  background:color-mix(in srgb,var(--accent) 9%,var(--surface))!important;
}
body[data-page="article"] .article-cover{
  width:100%;
  aspect-ratio:4/3!important;
  min-height:260px;
  border-radius:clamp(20px,2.7vw,32px)!important;
  border:1px solid var(--line-strong)!important;
  background:var(--surface-2)!important;
  box-shadow:0 20px 60px rgba(9,25,45,.12)!important;
  transform:none!important;
  overflow:hidden;
}
body[data-page="article"] .article-cover img{
  width:100%;height:100%;
  object-fit:cover;
  opacity:1!important;
  filter:saturate(.9) contrast(1.03)!important;
}
body[data-page="article"] .article-layout{
  display:grid!important;
  grid-template-columns:minmax(210px,260px) minmax(0,var(--reading-width))!important;
  gap:clamp(34px,5vw,74px)!important;
  align-items:start!important;
  justify-content:center!important;
  padding-top:clamp(40px,6vw,84px);
}
body[data-page="article"] .article-aside {
  position:sticky!important;
  top:75px!important;
  display:grid!important;
  gap:15px!important;
  align-self:start!important;
  order:0!important;
  max-height:calc(100dvh - 95px);
  overflow-y:auto;
  overscroll-behavior:contain;
  scrollbar-width:thin;
  scrollbar-color:var(--line-strong) transparent;
}
body[data-page="article"] .article-aside .aside-card {
  min-width:0;
  margin:0!important;
  padding:21px!important;
  border:1px solid var(--line)!important;
  border-radius:22px!important;
  background:var(--surface)!important;
  box-shadow:none!important;
}
body[data-page="article"] .article-aside .aside-card>.footer-label {
  display:block;
  color:var(--text)!important;
  font-size:.78rem!important;
  font-weight:700!important;
  letter-spacing:0!important;
  text-transform:none!important;
}
body[data-page="article"] .toc {
  display:grid!important;
  align-content:start;
  gap:4px!important;
  margin:15px 0 0!important;
  min-width:0;
}
body[data-page="article"] .toc a {
  position:relative;
  display:block!important;
  padding:9px 11px!important;
  border:1px solid transparent;
  border-radius:11px;
  background:transparent!important;
  color:var(--muted)!important;
  font-size:.76rem!important;
  line-height:1.42!important;
  text-decoration:none!important;
  font-weight:570;
  overflow-wrap:anywhere;
  transform:none!important;
}
body[data-page="article"] .toc a:hover {
  background:var(--surface-2)!important;
  color:var(--text)!important;
  border-color:var(--line);
}
body[data-page="article"] .toc a.is-current,
body[data-page="article"] .toc a[aria-current="location"] {
  border-color:color-mix(in srgb,var(--accent) 20%,var(--line))!important;
  background:color-mix(in srgb,var(--accent) 10%,var(--surface))!important;
  color:var(--accent)!important;
  font-weight:700;
}
body[data-page="article"] .article-aside .aside-callout{
  padding:18px 20px!important;
  background:var(--bg-soft)!important;
}
body[data-page="article"] .aside-callout p{
  margin:9px 0 0!important;
  font-size:.78rem!important;
  line-height:1.65!important;
  color:var(--muted)!important;
}
body[data-page="article"] .article-content{
  min-width:0;
  max-width:var(--reading-width);
  color:var(--text)!important;
  font-size:clamp(.99rem,1.25vw,1.08rem);
  line-height:1.8;
  letter-spacing:-.008em;
  order:1!important;
}
body[data-page="article"] .article-content > section,
body[data-page="article"] .article-content > header,
body[data-page="article"] .article-content > nav,
body[data-page="article"] .article-content > footer{
  margin:0 0 clamp(40px,6vw,70px)!important;
  padding:clamp(32px,4vw,53px) 0 0!important;
  border-top:1px solid var(--line)!important;
  background:transparent;
  scroll-margin-top:110px;
}
/* Practical components keep their own card surfaces rather than being flattened. */
body[data-page="article"] .article-content > :is(.course-objectives,.course-summary,.exercise-card,.reference-box,.quiz-section,.lab-section,.guided-lab) {
  padding:clamp(22px,3.3vw,36px)!important;
  border:1px solid var(--line-strong)!important;
  border-radius:25px!important;
  background:var(--surface)!important;
  box-shadow:0 12px 36px rgba(9,25,45,.035)!important;
}
body[data-page="article"] .article-content > .course-objectives{
  background:linear-gradient(140deg,color-mix(in srgb,var(--accent) 10%,var(--surface)),var(--surface))!important;
  border-color:color-mix(in srgb,var(--accent) 27%,var(--line))!important;
}
body[data-page="article"] .article-content > .guided-lab{
  background:var(--surface)!important;
  border-color:color-mix(in srgb,var(--accent) 35%,var(--line))!important;
}
body[data-page="article"] .article-content > .exercise-card,
body[data-page="article"] .article-content > .lab-section{
  background:var(--bg-soft)!important;
}
body[data-page="article"] .article-content > :is(.course-summary,.reference-box){
  background:var(--bg-soft)!important;
}
body[data-page="article"] .article-content > section > h2,
body[data-page="article"] .article-content > section > .lab-heading > h2 {
  display:flex;align-items:center;flex-wrap:wrap;gap:11px;
  max-width:26ch;
  margin:0 0 23px!important;
  color:var(--text)!important;
  font-size:clamp(1.7rem,2.65vw,2.55rem)!important;
  font-weight:675!important;
  line-height:1.22!important;
  letter-spacing:-.048em!important;
  overflow-wrap:break-word;
}
body[data-page="article"] .article-content h3{
  margin:clamp(23px,3vw,36px) 0 12px!important;
  font-size:clamp(1.07rem,1.65vw,1.34rem)!important;
  font-weight:675!important;
  line-height:1.35!important;
  letter-spacing:-.02em!important;
  color:var(--text)!important;
}
body[data-page="article"] .article-content :is(p,li){
  color:var(--muted)!important;
  font-size:clamp(.95rem,1.25vw,1.04rem)!important;
  line-height:1.82!important;
  letter-spacing:0;
}
body[data-page="article"] .article-content p{margin:0 0 18px!important}
body[data-page="article"] .article-content :is(ul,ol):not(.reference-list):not(.checklist){
  padding-left:1.35rem;
  margin:13px 0 23px;
}
body[data-page="article"] .article-content li{margin:8px 0!important;padding-left:3px}
body[data-page="article"] .article-content li::marker{color:var(--accent)}
body[data-page="article"] .article-content strong{color:var(--text)!important;font-weight:700}
body[data-page="article"] .article-content a{overflow-wrap:anywhere}
body[data-page="article"] .article-content > .course-overview{
  display:grid!important;
  grid-template-columns:repeat(3,minmax(0,1fr))!important;
  gap:12px!important;
  margin:0 0 35px!important;
}
body[data-page="article"] .course-overview>div{
  display:flex;flex-direction:column;align-items:start;
  min-width:0;padding:20px!important;
  border:1px solid var(--line)!important;border-radius:19px!important;
  background:var(--surface)!important;
}
body[data-page="article"] .course-overview span{font-size:.72rem!important;color:var(--dim)!important}
body[data-page="article"] .course-overview strong{
  font-size:.9rem!important;line-height:1.45!important;font-weight:650!important;
}
body[data-page="article"] .course-overview .hb-icon{width:22px;height:22px;color:var(--accent)}
body[data-page="article"] .article-content :not(pre) > code{
  padding:.16em .4em;
  border:1px solid color-mix(in srgb,var(--accent) 16%,var(--line));
  border-radius:6px;
  background:color-mix(in srgb,var(--accent) 8%,var(--surface))!important;
  color:var(--accent)!important;
  font:600 .86em/1.45 ui-monospace,SFMono-Regular,Consolas,monospace!important;
  overflow-wrap:anywhere;
}
body[data-page="article"] .article-content pre,
body[data-page="article"] .article-content pre.guided-code{
  display:block;
  max-width:100%;
  margin:0!important;
  padding:clamp(17px,2.6vw,25px)!important;
  background:#0e1928!important;
  color:#e5efff!important;
  border:0!important;
  border-radius:0 0 18px 18px!important;
  box-shadow:none!important;
  overflow-x:auto!important;
  white-space:pre!important;
  tab-size:2;
  overscroll-behavior-x:contain;
}
body[data-page="article"] .article-content pre > code,
body[data-page="article"] .article-content pre.guided-code > code{
  display:block;
  width:max-content;
  min-width:100%;
  padding:0!important;margin:0!important;
  border:0!important;border-radius:0!important;
  background:transparent!important;
  color:#e5efff!important;
  font:500 clamp(.77rem,1.1vw,.89rem)/1.8 ui-monospace,SFMono-Regular,Consolas,monospace!important;
  white-space:pre!important;
  overflow-wrap:normal!important;
  word-break:normal!important;
}
body[data-page="article"] .code-window{
  min-width:0;max-width:100%;
  margin:22px 0 28px;
  border:1px solid rgba(173,196,231,.20);
  border-radius:19px;
  overflow:hidden;
  background:#0e1928;
  box-shadow:0 13px 38px rgba(4,15,30,.13);
}
body[data-page="article"] .code-window-top{
  display:flex;align-items:center;justify-content:space-between;gap:15px;
  padding:10px 13px 10px 17px;
  border-bottom:1px solid rgba(202,220,248,.12);
  background:#17273b;
  color:#bed5f3;
}
body[data-page="article"] .code-window-title{
  display:inline-flex;align-items:center;gap:10px;
  font:600 .72rem/1.4 ui-monospace,Consolas,monospace;letter-spacing:.02em;
}
body[data-page="article"] .code-window-title::before{
  content:"";width:8px;height:8px;border-radius:50%;background:#9fc9ff;
  box-shadow:12px 0 #e6ac74,24px 0 #92c9ac;margin-right:28px;
}
body[data-page="article"] .code-copy{
  display:inline-flex;align-items:center;gap:7px;min-height:34px;
  padding:7px 11px;
  border:1px solid rgba(207,226,255,.18);
  border-radius:9px;background:rgba(255,255,255,.055);
  color:#e1eaff;
  font:600 .7rem/1.3 -apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;
  cursor:pointer;
}
body[data-page="article"] .code-copy:hover{border-color:#a6d1ff;background:rgba(159,201,255,.15)}
body[data-page="article"] .code-copy:focus-visible{outline:2px solid #bedbff;outline-offset:3px}
body[data-page="article"] .article-content pre:not(.code-window pre){
  border-radius:18px!important;
  margin:22px 0!important;
}
body[data-page="article"] .course-grid{
  display:grid!important;grid-template-columns:repeat(2,minmax(0,1fr))!important;
  gap:12px!important;margin:25px 0 30px!important;
}
body[data-page="article"] .course-card,
body[data-page="article"] .lesson-note{
  min-width:0;padding:20px!important;margin:0!important;
  border:1px solid var(--line)!important;
  border-radius:17px!important;
  background:var(--bg-soft)!important;
}
body[data-page="article"] .course-card h3{margin:0 0 8px!important;font-size:1.03rem!important}
body[data-page="article"] .course-card p{margin:0!important;font-size:.87rem!important}
body[data-page="article"] .lesson-note{margin:24px 0!important}
body[data-page="article"] .lesson-label{color:var(--accent)!important}
body[data-page="article"] .article-content :is(.course-summary,.exercise-card,.reference-box,.lab-section,.quiz-section) h2{
  max-width:none;
}
body[data-page="article"] .quiz-section{
  background:color-mix(in srgb,var(--accent) 5%,var(--surface))!important;
}
body[data-page="article"] .quiz-options{
  display:grid!important;gap:10px!important;margin-top:20px!important;
}
body[data-page="article"] .quiz-options button{
  width:100%;min-height:52px;
  padding:14px 17px!important;
  border:1px solid var(--line-strong)!important;
  border-radius:13px!important;
  background:var(--surface)!important;
  color:var(--text)!important;
  font:550 .92rem/1.5 -apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif!important;
  text-align:left!important;
  cursor:pointer;
  transform:none!important;
}
body[data-page="article"] .quiz-options button:hover,
body[data-page="article"] .quiz-options button:focus-visible{
  border-color:var(--accent)!important;background:var(--surface-2)!important;outline-offset:3px;
}
body[data-page="article"] .quiz-options button.is-correct{
  border-color:#67a897!important;background:color-mix(in srgb,#67a897 17%,var(--surface))!important;
}
body[data-page="article"] .quiz-options button.is-wrong{
  border-color:var(--danger)!important;background:color-mix(in srgb,var(--danger) 9%,var(--surface))!important;
}
body[data-page="article"] .quiz-feedback{font:600 .83rem/1.6 -apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif!important;color:var(--text)!important}
body[data-page="article"] .guided-lab{overflow:visible!important}
body[data-page="article"] .guided-lab::before{border-radius:25px 25px 0 0}
body[data-page="article"] .guided-selfcheck details{
  padding:8px 0;border-bottom:1px solid var(--line);
}
body[data-page="article"] .guided-selfcheck details summary{color:var(--text)!important;cursor:pointer}
body[data-page="article"] .guided-resources .learning-resource,
body[data-page="article"] .reference-list a{
  display:flex!important;align-items:center;justify-content:space-between;
  gap:12px;min-width:0;
  padding:13px 0!important;
  color:var(--accent)!important;
  font-size:.85rem!important;line-height:1.5;
  text-decoration:none!important;
}
body[data-page="article"] :is(.reference-list a,.guided-resources .learning-resource):hover{text-decoration:underline!important;text-underline-offset:4px}
body[data-page="article"] .article-content table{
  display:block;max-width:100%;overflow-x:auto;
  margin:22px 0;border-radius:15px;border:1px solid var(--line);
  background:var(--surface);
}
body[data-page="article"] .article-content :is(th,td){padding:13px 16px;border-bottom:1px solid var(--line)}
body[data-page="article"] .article-content th{color:var(--text);background:var(--surface-2)}
body[data-page="article"] .article-content blockquote{
  margin:26px 0;padding:22px 27px!important;
  border:1px solid var(--line)!important;border-left:3px solid var(--accent)!important;
  border-radius:16px!important;
  background:var(--bg-soft)!important;
}
body[data-page="article"] .article-tools {
  display:flex;align-items:center;justify-content:space-between;flex-wrap:wrap;gap:12px;
  padding:0 0 22px;margin:0 0 25px;border-bottom:1px solid var(--line);
}
body[data-page="article"] .article-tools-count{color:var(--dim);font-size:.79rem;font-weight:620}
body[data-page="article"] .article-tools-actions{display:flex;gap:8px;flex-wrap:wrap}
body[data-page="article"] .article-tools button{
  display:inline-flex;align-items:center;justify-content:center;gap:8px;
  min-height:39px;padding:8px 13px;border:1px solid var(--line-strong);
  border-radius:999px;background:var(--surface);color:var(--text);
  font:600 .76rem/1.3 -apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;
  cursor:pointer;
}
body[data-page="article"] .article-tools button:hover{background:var(--surface-2);border-color:var(--accent)}
body[data-page="article"] .article-tools button:focus-visible{outline:3px solid var(--accent);outline-offset:3px}
body[data-page="article"] .toc-toggle{display:none}
body[data-page="article"] .article-content > section.reveal,
body[data-page="article"] .article-content > section[data-immersive]{
  opacity:1!important;
  transform:none!important;
  filter:none!important;
  visibility:visible!important;
}
body[data-page="article"] .article-end{
  display:flex!important;justify-content:space-between;align-items:center!important;
  gap:25px;margin-top:clamp(50px,7vw,95px)!important;
  padding:35px clamp(24px,4vw,45px)!important;
  border:1px solid var(--line-strong)!important;
  border-radius:25px!important;
  background:var(--surface)!important;
}
body[data-page="article"] .article-end h2{margin:10px 0 0;font-size:clamp(1.5rem,2.5vw,2.3rem)!important;letter-spacing:-.04em}
body[data-page="article"] .article-end .button{flex:0 0 auto}
body[data-page="article"] .learning-return{margin:0 0 10px;display:inline-flex}
@media(max-width:1050px){
 body[data-page="article"] .article-hero-grid{grid-template-columns:minmax(0,1fr) minmax(245px,.7fr)!important;gap:30px!important}
 body[data-page="article"] .article-hero h1{font-size:clamp(2.5rem,5.4vw,4.7rem)!important}
 body[data-page="article"] .article-layout{grid-template-columns:minmax(180px,230px) minmax(0,1fr)!important;gap:29px!important}
}
@media(max-width:780px){
 body[data-page="article"] .article-hero{padding:38px 0 52px!important}
 body[data-page="article"] .article-kicker{margin-bottom:22px!important}
 body[data-page="article"] .article-hero-grid{grid-template-columns:minmax(0,1fr)!important;gap:26px!important}
 body[data-page="article"] .article-hero h1{max-width:19ch!important;font-size:clamp(2.6rem,8vw,4.3rem)!important}
 body[data-page="article"] .article-cover{aspect-ratio:16/9!important;min-height:0;max-width:none!important}
 body[data-page="article"] .article-layout{
  grid-template-columns:minmax(0,1fr)!important;gap:24px!important;
  padding-top:28px;
 }
 body[data-page="article"] .article-aside{
  position:relative!important;top:auto!important;max-height:none;overflow:visible;
  order:0!important;
 }
 body[data-page="article"] .article-aside .aside-card:first-child{
  padding:15px 18px!important;
 }
 body[data-page="article"] .article-aside .aside-callout{display:none}
 body[data-page="article"] .toc{grid-template-columns:1fr;max-height:310px;overflow-y:auto}
 body[data-page="article"] .article-aside.is-collapsible .toc{display:none!important}
 body[data-page="article"] .article-aside.is-collapsible.is-open .toc{display:grid!important}
 body[data-page="article"] .toc-toggle{
  display:flex;align-items:center;justify-content:space-between;
  width:100%;gap:10px;min-height:45px;
  margin:0!important;padding:8px 0;border:0;background:transparent;
  color:var(--text);font:650 .86rem/1.4 -apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;
  cursor:pointer;
 }
 body[data-page="article"] .toc-toggle:focus-visible{outline:2px solid var(--accent);outline-offset:3px}
 body[data-page="article"] .toc-toggle .toc-chevron{font-size:1.1rem;transition:transform .2s}
 body[data-page="article"] .article-aside.is-open .toc-chevron{transform:rotate(180deg)}
 body[data-page="article"] .article-content{max-width:none}
 body[data-page="article"] .article-content > .course-overview{grid-template-columns:repeat(2,minmax(0,1fr))!important}
 body[data-page="article"] .article-end{display:grid!important;align-items:start!important}
 body[data-page="article"] .article-end .button{justify-self:start}
}
@media(max-width:520px){
 body[data-page="article"] .article-hero h1{font-size:clamp(2.35rem,10.5vw,3.5rem)!important;line-height:1.08!important}
 body[data-page="article"] .article-cover{aspect-ratio:4/3!important;border-radius:19px!important}
 body[data-page="article"] .article-meta{gap:10px!important}
 body[data-page="article"] .article-layout{padding-top:21px}
 body[data-page="article"] .article-content > .course-overview{grid-template-columns:minmax(0,1fr)!important;gap:9px!important}
 body[data-page="article"] .course-overview>div{padding:16px!important}
 body[data-page="article"] .course-overview strong{font-size:.94rem!important}
 body[data-page="article"] .article-content > section{margin-bottom:33px!important;padding-top:29px!important}
 body[data-page="article"] .article-content > :is(.course-objectives,.course-summary,.exercise-card,.reference-box,.quiz-section,.lab-section,.guided-lab){padding:21px!important;border-radius:20px!important}
 body[data-page="article"] .article-content > section > h2{font-size:clamp(1.5rem,6.9vw,2.1rem)!important}
 body[data-page="article"] .article-content :is(p,li){font-size:.97rem!important;line-height:1.78!important}
 body[data-page="article"] .course-grid{grid-template-columns:minmax(0,1fr)!important}
 body[data-page="article"] .article-content pre > code{font-size:.76rem!important}
 body[data-page="article"] .code-window-top{padding:10px 12px}
 body[data-page="article"] .article-tools{gap:10px}
 body[data-page="article"] .article-tools-actions{width:100%}
 body[data-page="article"] .article-tools button{flex:1}
 body[data-page="article"] .article-end{padding:25px 20px!important}
}
@media(prefers-reduced-motion:reduce){
 body[data-page="article"] :is(.code-copy,.quiz-options button,.toc a){transition:none!important}
}
@media print{
 body[data-page="article"] .site-header,
 body[data-page="article"] .article-aside,
 body[data-page="article"] .article-tools,
 body[data-page="article"] .article-end,
 body[data-page="article"] .site-footer,
 body[data-page="article"] .reading-progress,
 body[data-page="article"] .immersive-progress{display:none!important}
 body[data-page="article"] .article-layout{display:block!important;padding:0!important}
 body[data-page="article"] .article-hero{padding:15px 0!important}
 body[data-page="article"] .article-cover{max-width:300px}
 body[data-page="article"] .article-content{max-width:none!important}
 body[data-page="article"] .article-content > section{break-inside:avoid}
 body[data-page="article"] .code-window,body[data-page="article"] pre{break-inside:avoid}
}



/* Specificity guard against older !important rules in the dark-theme layer. */
:root[data-theme="dark"] body[data-page="article"] .article-content pre,
:root[data-theme="light"] body[data-page="article"] .article-content pre,
:root[data-theme="dark"] body[data-page="article"] .article-content pre.guided-code,
:root[data-theme="light"] body[data-page="article"] .article-content pre.guided-code{
 background:#0e1928!important;
 border:0!important;
 color:#e5efff!important;
}
:root[data-theme="dark"] body[data-page="article"] .article-content pre code,
:root[data-theme="light"] body[data-page="article"] .article-content pre code{
 display:block;
 padding:0!important;
 border:0!important;
 border-radius:0!important;
 background:transparent!important;
 color:#e5efff!important;
 white-space:pre!important;
 overflow-wrap:normal!important;
 word-break:normal!important;
}
:root[data-theme="dark"] body[data-page="article"] .article-content :not(pre)>code,
:root[data-theme="light"] body[data-page="article"] .article-content :not(pre)>code{
 background:color-mix(in srgb,var(--accent) 8%,var(--surface))!important;
 color:var(--accent)!important;
 border-color:color-mix(in srgb,var(--accent) 16%,var(--line))!important;
}
:root[data-theme="dark"] body[data-page="article"] .article-content blockquote,
:root[data-theme="light"] body[data-page="article"] .article-content blockquote{
 border-left:3px solid var(--accent)!important;
 background:var(--bg-soft)!important;
 color:var(--text)!important;
}
