/* Selected sepideh.io design-system rules, adapted for standalone Playground. */

@font-face { font-family: Inter; src: url('/assets/fonts/inter.woff2') format('woff2'); font-weight: 100 900; font-display: swap; }
@font-face { font-family: 'Space Grotesk'; src: url('/assets/fonts/space-grotesk.woff2') format('woff2'); font-weight: 300 700; font-display: swap; }
@font-face { font-family: 'JetBrains Mono'; src: url('/assets/fonts/jetbrains-mono.woff2') format('woff2'); font-weight: 100 800; font-display: swap; }
:root {
  color-scheme: light;
  --bg: #ffffff;
  --bg-soft: #f6f7f9;
  --bg-raised: #ffffff;
  --ink: #0e1726;
  --text: #36414d;
  --muted: #66717d;
  --faint: #98a1ab;
  --line: #e6e9ed;
  --line-strong: #d3d8de;
  --accent: #0d7a72;
  --accent-ink: #0a6059;
  --accent-soft: #e5f2f0;
  --on-accent: #ffffff;
  --header-bg: rgba(255, 255, 255, 0.86);
  --grid-dot: #d5dae0;
  --primary-bg: #0e1726;
  --primary-fg: #ffffff;
  --primary-hover: #26313f;
  --term-bg: #0d1219;
  --term-fg: #c9d4de;
  --term-dim: #66768a;
  --term-key: #5fd3c4;
  --term-str: #e6c27a;
  --shadow: 0 1px 2px rgba(14, 23, 38, 0.04), 0 8px 24px rgba(14, 23, 38, 0.06);

  --sans: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  --display: "Space Grotesk", var(--sans);
  --grid-line: rgba(14, 23, 38, 0.045);
  --glow: rgba(13, 122, 114, 0.06);

  --wrap: 1080px;
  --read: 700px;
  --gutter: 24px;
  --radius: 10px;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    color-scheme: dark;
    --grid-line: rgba(140, 200, 220, 0.045);
    --glow: rgba(60, 198, 181, 0.075);
    --bg: #0a0e13;
    --bg-soft: #11161d;
    --bg-raised: #131a22;
    --ink: #e9eef3;
    --text: #c0c9d2;
    --muted: #8994a0;
    --faint: #5d6874;
    --line: #1d252f;
    --line-strong: #2a3440;
    --accent: #3cc6b5;
    --accent-ink: #6ad8ca;
    --accent-soft: rgba(60, 198, 181, 0.12);
    --on-accent: #06201d;
    --header-bg: rgba(10, 14, 19, 0.82);
    --grid-dot: #1f2832;
    --primary-bg: #e9eef3;
    --primary-fg: #0a0e13;
    --primary-hover: #c9d2db;
    --term-bg: #0d1219;
    --shadow: 0 1px 2px rgba(0, 0, 0, 0.3), 0 8px 24px rgba(0, 0, 0, 0.25);
  }
}
:root[data-theme="dark"] {
  color-scheme: dark;
  --grid-line: rgba(140, 200, 220, 0.045);
  --glow: rgba(60, 198, 181, 0.075);
  --bg: #0a0e13;
  --bg-soft: #11161d;
  --bg-raised: #131a22;
  --ink: #e9eef3;
  --text: #c0c9d2;
  --muted: #8994a0;
  --faint: #5d6874;
  --line: #1d252f;
  --line-strong: #2a3440;
  --accent: #3cc6b5;
  --accent-ink: #6ad8ca;
  --accent-soft: rgba(60, 198, 181, 0.12);
  --on-accent: #06201d;
  --header-bg: rgba(10, 14, 19, 0.82);
  --grid-dot: #1f2832;
  --primary-bg: #e9eef3;
  --primary-fg: #0a0e13;
  --primary-hover: #c9d2db;
  --term-bg: #0d1219;
  --shadow: 0 1px 2px rgba(0, 0, 0, 0.3), 0 8px 24px rgba(0, 0, 0, 0.25);
}


html {
  font-size: 16px;
  background: var(--bg);
}

body {
  margin: 0 !important; /* the theme's sticky-footer script sets margin-bottom */
  padding: 0;
  background: transparent;
  color: var(--text);
  font-family: var(--sans);
  font-size: 1rem;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

h1, h2, h3, h4, h5, h6 {
  font-family: var(--display);
  color: var(--ink);
  letter-spacing: -0.015em;
  line-height: 1.25;
}

a {
  color: var(--accent-ink);
  text-decoration-thickness: 1px;
  text-underline-offset: 0.2em;
}
a:hover { color: var(--accent); }
a:focus-visible,
button:focus-visible,
summary:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 4px;
}

::selection { background: var(--accent-soft); color: var(--ink); }

code, kbd, pre, samp, tt { font-family: var(--mono); }
.mono { font-family: var(--mono); }
hr { border: 0; border-top: 1px solid var(--line); }

.sr-only {
  position: absolute !important;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0, 0, 0, 0);
  white-space: nowrap; border: 0;
}


#main.wrap {
  width: 100%;
  max-width: calc(var(--wrap) + 2 * var(--gutter));
  margin: 0 auto;
  padding: 64px var(--gutter) 96px;
  flex: 1 0 auto;
  animation: none;
}
#main.wrap--read { max-width: calc(var(--read) + 2 * var(--gutter)); }

.wrap .page,
.wrap .archive {
  float: none;
  width: auto;
  margin: 0;
  padding: 0;
}

.section { margin-top: 96px; }
.section:first-child { margin-top: 0; }


.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: var(--header-bg);
  -webkit-backdrop-filter: saturate(180%) blur(12px);
  backdrop-filter: saturate(180%) blur(12px);
  border-bottom: 1px solid var(--line);
}
.site-header__inner {
  max-width: calc(var(--wrap) + 2 * var(--gutter));
  margin: 0 auto;
  padding: 0 var(--gutter);
  height: 60px;
  display: flex;
  align-items: center;
  gap: 24px;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-right: auto;
  color: var(--ink);
  text-decoration: none;
  white-space: nowrap;
}
.brand:hover { color: var(--ink); }
.brand__mark { width: 20px; height: 20px; color: var(--accent); flex: none; }
.brand__name { font-weight: 600; letter-spacing: -0.01em; }
.brand__tag {
  font-family: var(--mono);
  font-size: 0.72rem;
  color: var(--faint);
  padding-left: 10px;
  border-left: 1px solid var(--line-strong);
}
.site-nav { display: flex; gap: 2px; }
.site-nav a,
.site-nav summary {
  padding: 6px 11px;
  border-radius: 6px;
  color: var(--muted);
  font-size: 0.9rem;
  font-weight: 500;
  text-decoration: none;
  white-space: nowrap;
}
.site-nav a:hover,
.site-nav summary:hover,
.site-nav__group[open] summary { color: var(--ink); background: var(--bg-soft); }
.site-nav a[aria-current="page"] { color: var(--ink); background: var(--bg-soft); }

.site-nav__group { position: relative; }
.site-nav summary { display: block; cursor: pointer; list-style: none; }
.site-nav summary::-webkit-details-marker { display: none; }
.site-nav summary::after {
  content: "";
  display: inline-block;
  width: 0.4em;
  height: 0.4em;
  margin-left: 0.6em;
  border-right: 1px solid;
  border-bottom: 1px solid;
  vertical-align: 0.2em;
  transform: rotate(45deg);
}
.site-nav__group[open] summary::after { transform: rotate(225deg); vertical-align: 0; }
.site-nav__submenu {
  position: absolute;
  top: calc(100% + 4px);
  right: 0;
  min-width: max-content;
  padding: 4px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--bg-raised);
  box-shadow: var(--shadow);
}
.site-nav__submenu a { display: block; }

.theme-toggle {
  display: inline-grid;
  place-items: center;
  width: 34px;
  height: 34px;
  flex: none;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
}
.theme-toggle:hover { color: var(--ink); border-color: var(--line-strong); }
.theme-toggle svg { width: 16px; height: 16px; }
.theme-toggle .icon-sun { display: none; }
:root[data-theme="dark"] .theme-toggle .icon-sun { display: block; }
:root[data-theme="dark"] .theme-toggle .icon-moon { display: none; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .theme-toggle .icon-sun { display: block; }
  :root:not([data-theme="light"]) .theme-toggle .icon-moon { display: none; }
}

/* ---------- Site footer ---------- */

.site-footer {
  flex-shrink: 0;
  border-top: 1px solid var(--line);
  background: transparent;
  color: var(--muted);
  font-size: 0.85rem;
}
.site-footer__inner {
  max-width: calc(var(--wrap) + 2 * var(--gutter));
  margin: 0 auto;
  padding: 28px var(--gutter) 36px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px 32px;
}
.site-footer nav { display: flex; flex-wrap: wrap; gap: 4px 18px; }
.site-footer a { color: var(--muted); text-decoration: none; }
.site-footer a:hover { color: var(--ink); }
.site-footer__build { font-family: var(--mono); font-size: 0.72rem; color: var(--faint); }


.eyebrow {
  margin: 0 0 14px;
  font-family: var(--mono);
  font-size: 0.74rem;
  font-weight: 500;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--muted);
}
.ph { margin-bottom: 48px; }
.ph__title {
  margin: 0;
  font-size: clamp(2rem, 4.2vw, 2.75rem);
  font-weight: 650;
  letter-spacing: -0.03em;
  line-height: 1.1;
}
.ph__lead {
  margin: 18px 0 0;
  max-width: 640px;
  font-size: 1.125rem;
  line-height: 1.6;
  color: var(--muted);
}
.ph__meta { margin: 18px 0 0; font-family: var(--mono); font-size: 0.78rem; color: var(--faint); }

.section-head { margin-bottom: 32px; }
.section-head h2 {
  margin: 0;
  font-size: 1.6rem;
  font-weight: 650;
  letter-spacing: -0.025em;
}
.section-head .section-intro { margin: 10px 0 0; max-width: 620px; color: var(--muted); }

.actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 28px; }
.button,
a.button {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 9px 16px;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 0.9rem;
  font-weight: 500;
  line-height: 1.3;
  text-decoration: none;
  transition: border-color 0.15s, background-color 0.15s;
}
.button:hover { border-color: var(--ink); color: var(--ink); background: var(--bg); }
.button--primary,
a.button--primary {
  background: var(--primary-bg);
  border-color: var(--primary-bg);
  color: var(--primary-fg);
}
.button--primary:hover { background: var(--primary-hover); border-color: var(--primary-hover); color: var(--primary-fg); }
.button i { font-size: 0.9em; opacity: 0.85; }

.prose { font-size: 1.0625rem; line-height: 1.75; color: var(--text); overflow-wrap: break-word; }
.prose p, .prose li { overflow-wrap: anywhere; }
.prose > :first-child { margin-top: 0; }
.prose p, .prose ul, .prose ol { margin: 0 0 1.2em; }
.prose h2 { margin: 2.4em 0 0.7em; padding: 0; border: 0; font-size: 1.45rem; font-weight: 650; }
.prose h3 { margin: 2em 0 0.5em; font-size: 1.15rem; font-weight: 600; }
.prose h4 { margin: 1.6em 0 0.4em; font-size: 1rem; font-weight: 600; }
.prose li { margin-bottom: 0.4em; }
.prose strong { color: var(--ink); font-weight: 600; }
.prose img { max-width: 100%; height: auto; border-radius: 8px; }
.prose img[align="right"] { float: right; width: 240px; margin: 6px 0 20px 32px; border: 1px solid var(--line); }
.prose blockquote { margin: 1.6em 0; padding: 2px 0 2px 20px; border-left: 2px solid var(--accent); color: var(--muted); font-style: normal; }
.prose hr { margin: 2.4em 0; }
.prose code { padding: 0.12em 0.36em; border-radius: 4px; background: var(--bg-soft); border: 1px solid var(--line); font-size: 0.86em; color: var(--ink); }
.prose pre { padding: 16px 18px; overflow-x: auto; border: 0; border-radius: 8px; background: var(--term-bg); color: var(--term-fg); font-size: 0.85rem; }
.prose pre code { padding: 0; border: 0; background: none; color: inherit; font-size: inherit; }
/* the theme wraps code blocks in a light box with a label tab: remove both */
.prose div.highlighter-rouge,
.prose figure.highlight { margin: 0 0 1.4em; padding: 0; border: 0; background: none; }
.prose div.highlighter-rouge::before,
.prose figure.highlight::before { display: none; }
.prose .highlight pre { margin: 0; font-size: 0.8rem; line-height: 1.7; }
.prose table { font-size: 0.92rem; border-color: var(--line); }
.prose th, .prose td { border-color: var(--line); }
.prose th { background: var(--bg-soft); color: var(--ink); }
.prose .MathJax_Display { overflow-x: auto; overflow-y: hidden; }


.post-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; margin-top: 16px; }
.post-card {
  display: flex;
  flex-direction: column;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--bg-raised);
  overflow: hidden;
  transition: border-color 0.15s, transform 0.15s;
}
.post-card:hover { border-color: var(--line-strong); transform: translateY(-2px); }
.post-card__media { display: block; aspect-ratio: 16 / 9; overflow: hidden; background: var(--bg-soft); border-bottom: 1px solid var(--line); }
.post-card__media img { display: block; width: 100%; height: 100%; object-fit: cover; transition: transform 0.3s; }
.post-card:hover .post-card__media img { transform: scale(1.03); }
.post-card__body { display: flex; flex-direction: column; flex: 1; padding: 18px 22px 20px; }
.post-card__meta { margin: 0 0 8px; font-family: var(--mono); font-size: 0.7rem; color: var(--faint); }
.post-card h3 { margin: 0; font-size: 1.05rem; font-weight: 600; line-height: 1.4; }
.post-card h3 a { color: var(--ink); text-decoration: none; }
.post-card h3 a:hover { color: var(--accent-ink); }
.post-card p:not(.post-card__meta) { margin: 8px 0 0; font-size: 0.9rem; line-height: 1.6; color: var(--muted); }
.post-card__more { margin-top: auto; padding-top: 14px; font-size: 0.85rem; font-weight: 500; color: var(--accent-ink); text-decoration: none; }
.post-card__more:hover { text-decoration: underline; }
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background-image:
    linear-gradient(var(--grid-line) 1px, transparent 1px),
    linear-gradient(90deg, var(--grid-line) 1px, transparent 1px);
  background-size: 44px 44px;
  background-position: center top;
  -webkit-mask-image: linear-gradient(to bottom, #000 0%, rgba(0, 0, 0, 0.35) 60%, transparent 100%);
  mask-image: linear-gradient(to bottom, #000 0%, rgba(0, 0, 0, 0.35) 60%, transparent 100%);
}

/* nav as paths */
.site-nav a, .site-nav summary { font-family: var(--mono); font-size: 0.8rem; font-weight: 400; letter-spacing: -0.01em; }
.site-nav a::before, .site-nav summary::before { content: "./"; content: "./" / ""; color: var(--faint); }
.site-nav a[aria-current="page"], .site-nav__group[data-active] summary { color: var(--accent-ink); }
.brand__tag { color: var(--muted); }
.brand__name { font-family: var(--display); font-size: 1.02rem; }


*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
.skip { position: fixed; inset: .8rem auto auto .8rem; z-index: 100; transform: translateY(-180%); padding: .4rem .8rem; background: var(--bg); }
.skip:focus { transform: none; }
button, input, select { font: inherit; color: inherit; }
summary { cursor: pointer; }
.ph__title { letter-spacing: -.045em; }
.post-card__meta, .post-card .post-card__body .post-card__meta { color: var(--muted); }
.post-card__media img { aspect-ratio: 16 / 9; }
.post-card__more { display: inline-block; align-self: flex-start; }
.editorial-section { margin: 52px 0 0; scroll-margin-top: 82px; }
.editorial-section h2:first-child { margin-top: 0; }
.collection-heading { display: flex; justify-content: space-between; align-items: baseline; flex-wrap: wrap; gap: .5rem 1rem; margin-bottom: 16px; }
.collection-heading h2, .collection-heading p { margin: 0; }
.collection-heading p { color: var(--muted); }
.filters { display: grid; grid-template-columns: 1.65fr 1.25fr 1fr 1fr auto; align-items: end; gap: .65rem; padding: 0 0 20px; border-bottom: 1px solid var(--line); }
.filters > div { display: grid; gap: .25rem; min-width: 0; }
.filters label { font-size: .875rem; font-weight: 550; color: var(--muted); }
.filters :is(input, select) { min-width: 0; width: 100%; min-height: 42px; border: 1px solid var(--line-strong); border-radius: 7px; background: var(--bg-raised); color: var(--ink); padding: .45rem .55rem; }
.filters input::placeholder { color: var(--muted); opacity: 1; }
.filters button { min-height: 42px; cursor: pointer; }
button:focus-visible, input:focus-visible, select:focus-visible { outline: 2px solid var(--accent-ink); outline-offset: 3px; }
.lab-intro { max-width: var(--read); }
.lab-intro .ph { margin-bottom: 24px; }
.lab-intro .technical-article__figure { margin: 18px 0 26px; }
.lab-links { margin-top: 18px; }
.workflow { padding-left: 1.5rem; margin: 12px 0 0; }
.workflow li { margin: .3rem 0; }
.workflow time, .workflow .hours { margin-left: .6rem; color: var(--muted); }
.lab-progress { border-block: 1px solid var(--line); padding: 12px 0; }
.lab-progress summary { font-weight: 600; color: var(--ink); }
.metrics { display: flex; flex-wrap: wrap; gap: 16px 30px; margin: 14px 0; }
.metrics div { min-width: 9rem; }
.metrics dt { font-size: .9rem; color: var(--muted); }
.metrics dd { margin: 0; font-weight: 650; color: var(--ink); }
.metrics dd span { display: block; font-size: .85rem; font-weight: 400; color: var(--muted); }
.domain-progress { margin: 12px 0 0; border-top: 1px solid var(--line); padding-top: 10px; }
.domain-progress ul, .month ol { list-style: none; padding: 0; }
.domain-progress li { display: grid; grid-template-columns: minmax(11rem, 1fr) 1fr auto; gap: .6rem; padding: .4rem 0; align-items: center; }
.domain-progress progress { width: 100%; accent-color: var(--accent); }
.months { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px; }
.month li { display: grid; grid-template-columns: 6.6rem 1fr; gap: .55rem; border-top: 1px solid var(--line); padding-block: .55rem; }
.month time { color: var(--muted); font-size: .85rem; }
.article-equation { overflow-x: auto; margin: 1.25em 0; padding-block: .2em; }
.technical-article__body th, .technical-article__body td { padding: .55em .8em; border: 1px solid var(--line-strong); text-align: start; }
.technical-article__body table { border-collapse: collapse; }
.technical-article__header .technical-article__meta { margin-block: 12px 0; }
.technical-article__header .technical-article__description { margin-block: 0 12px; }
.technical-article__body pre { background: #0d1219; color: #d6e2ee; }
.hljs-keyword, .hljs-type, .hljs-built_in { color: #f2b9cc; }
.hljs-title, .hljs-function { color: #8adace; }
.hljs-string, .hljs-number { color: #e7c07c; }
.hljs-comment { color: #a6b4c4; }
.technical-article__figure.lead-figure img { width: 100%; height: auto; }
.technical-article__body h2 { scroll-margin-top: 122px; }
.article-stats { color: var(--muted); font-size: .94em; }
@media (max-width: 900px) {
  .filters { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 640px) {
  :root { --gutter: 16px; }
  #main.wrap { padding-top: 36px; padding-bottom: 60px; }
  .site-header__inner { height: auto; padding-top: 9px; padding-bottom: 8px; flex-wrap: wrap; gap: 6px 12px; }
  .site-nav { order: 3; width: 100%; flex-wrap: wrap; }
  .site-nav a { padding: 5px 8px; }
  .brand__tag { display: none; }
  .post-grid, .months { grid-template-columns: 1fr; }
  .filters { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .filters > div:first-child { grid-column: 1 / -1; }
  .domain-progress li { grid-template-columns: minmax(0, 1fr) auto; }
  .domain-progress progress { grid-row: 2; grid-column: 1 / -1; }
  .technical-article__header { margin-top: 0; }
}
@media (prefers-reduced-motion: reduce) {
  .post-card, .post-card__media img { transition: none; }
  .post-card:hover, .post-card:hover .post-card__media img { transform: none; }
}
