@font-face {
   font-family: 'HLR'; 
   font-style: normal; 
   font-weight: 400; 
   src: url(/fonts/ibmplexserif-light.woff2) format('woff2');
}
@font-face {
   font-family: 'CLIG';
   font-style: normal;
   font-weight: 400;
   src: url(https://fonts.clig.dev/iAWriterDuospace-Regular.woff2) format('woff2');
}
@font-face {
   font-family: 'CLIG';
   font-style: italic;
   font-weight: 400;
   src: url(https://fonts.clig.dev/iAWriterDuospace-Italic.woff2) format('woff2');
}
@font-face {
   font-family: 'CLIG';
   font-style: normal;
   font-weight: 600;
   src: url(https://fonts.clig.dev/iAWriterDuospace-Bold.woff2) format('woff2');
}
@font-face {
   font-family: 'CLIG';
   font-style: italic;
   font-weight: 600;
   src: url(https://fonts.clig.dev/iAWriterDuospace-BoldItalic.woff2) format('woff2');
}
@font-face {
   font-family: 'CLIG';
   font-style: normal;
   font-weight: 800;
   src: url(https://fonts.clig.dev/EditorialNew-Regular.woff2) format('woff2');
}
@font-face {
   font-family: 'HLR'; 
   font-style: italic; 
   font-weight: 400; 
   src: url(/fonts/ibmplexserif-lightitalic.woff2) format('woff2');
}
@font-face {
   font-family: 'HLR'; 
   font-style: normal; 
   font-weight: 800; 
   src: url(/fonts/texgyreheros-bold.woff2) format('woff2');
}
@font-face {
   font-family: 'HLR'; 
   font-style: italic; 
   font-weight: 800; 
   src: url(/fonts/texgyreheros-bolditalic.woff2) format('woff2');
}
@font-face {
   font-family: 'CLIG-PRE'; 
   font-style: normal; 
   font-weight: 400; 
   src: url(/fonts/ibmplexmono-regular.woff2) format('woff2');
}
@font-face {
   font-family: 'CLIG-PRE'; 
   font-style: normal; 
   font-weight: 800; 
   src: url(/fonts/ibmplexmono-bold.woff2) format('woff2');
}

* {
   font-family: inherit;
   font-size: inherit;
   font-weight: inherit;
   line-height: inherit;
   letter-spacing: inherit;
   vertical-align: baseline;
    
   margin: 0;
   padding: 0;
    
   color: inherit;
   text-decoration: none;
   text-underline-offset: 0.2em;
   text-decoration-thickness: 1px;
}

html {
   font-family: 'CLIG', 'HLR', serif;
   font-weight: 400;
   font-size: 62.5%;
   -webkit-font-smoothing: antialiased;
   text-align: left;
}

body {
   font-size: 1.55rem;
   line-height: 1.42;
}
@media (min-width: 1000px) {
   body {
      font-size: 1.6rem;
   }
}
@media (min-width: 1200px) {
   body {
      font-size: 17px;
   }
}
@media (min-width: 1600px) {
   body {
      font-size: 20px;
   }
}

@media (min-width: 901px) {
   body {
      display: grid;
      grid-template-columns: 25% 75%;
      grid-gap: 0;
   }
   #TableOfContents {
      grid-column: 1 / 2;
      grid-row: 1 / 2;
      box-sizing: border-box;
      margin-top: 100vh;
   }
   #TableOfContents > ul {
      position: -webkit-sticky;
      position: sticky;
      top: 0;
      padding: calc(1.5em *0.5) 0;
      height: 100vh;
      box-sizing: border-box;
      overflow: auto;
   }
   main {
      grid-column: 1 / 3;
      grid-row: 1 / 2;
      box-sizing: border-box;
   }
}

@media (min-width: 901px) and (min-height: 800px) {
   #TableOfContents > ul {
      padding-top: 1.5em;
   }
}

#TableOfContents {
   text-align: left;
   top: 0;
   left: 0;
   bottom: 0;
   right: 0;
   z-index: 100;
   -webkit-backdrop-filter: blur(3px);
   backdrop-filter: blur(3px);
}

#menu-button {
   display: none;
}

@media (max-width: 900px) {
   .menu-open {
      overflow: hidden;
   }
   #menu-button {
      display: inline-block;
      width: 100%;
      position: fixed;
      top: 0;
      left: 0;
      right: 0;
      text-align: right;
      padding: calc(1.5em *0.5) 2em;
      z-index: 200;
      border: none;
      background: none;
      cursor: pointer;
      font-weight: 800;
      font-size: 1.1em;
   }
   .menu-open #menu-button {
      display: none;
   }
   #TableOfContents {
      display: none;
      position: fixed;
      overflow: scroll;
      padding: calc(1.5em *0.5) 0 1.5em;
      font-weight: 800;
      line-height: 1.2;
   }
   .menu-open #TableOfContents {
      display: block;
   }
}

#TableOfContents ul {
   list-style: none;
}

@media (min-width: 901px) {
   #TableOfContents > ul {
      max-width: 18em;
      margin: 0 auto;
   }
   #TableOfContents a {
      display: inline-block;
      opacity: 0.7;
      transition: opacity 0.3s ease;
   }
}

#TableOfContents > ul > li {
   padding: 0 1.5em;
}

#TableOfContents ul ul {
   padding: calc(1.5em * 0.25) 0 calc(1.5em * 0.25) 1.5em;
   font-size: 66%;
}

#TableOfContents ul ul li {
   margin-top: 0;
   border-top: none;
   padding: calc(1.5em * 0.05) 0;
}

#TableOfContents a:hover,
#TableOfContents a:focus {
   opacity: 1;
   text-decoration: underline;
}

#TableOfContents .active > a {
   opacity: 1;
}

@media (max-width: 900px) {
   #TableOfContents a {
      font-size: 250%;
      opacity: 1;
      letter-spacing: -0.02em;
   }
}

main {
   padding: 0 1.5em;
}

@media (min-width: 901px) {
   main > section > section {
      padding-left: 25%;
   }
}

main > section > h1 {
   position: relative;
   height: 75vh;
   max-width: 10em;
   margin: 0;
   display: flex;
   flex-direction: column;
   justify-content: flex-start;
   /* text-align: center; */
   box-sizing: border-box;
   padding: calc(1.5em * 0.1) 0 0;
   font-size: 14vw;
   left: -0.025em;
   line-height: 1;
   letter-spacing: -0.05em;
   font-weight: 800;
}
@media (max-width: 750px) and (orientation: landscape) {
   main > section > h1 {
      font-size: 10vw;
   }
}
@media (min-width: 1000px) {
   main > section > h1 {
      font-size: 150px;
   }
}
@media (min-width: 120vh) {
   main > section > h1 {
      font-size: 16vh;
   }
}

main > section > h1 + p {
   position: relative;
   height: 25vh;
   display: table-cell;
   vertical-align: bottom;
   margin: 0 auto;
   box-sizing: border-box;
   padding: 0 0 1.5em;
   max-width: 35em;
   font-weight: 800;
}

main > section > h1 + p a {
   display: inline;
}

.github-button {
   margin: 1.5em auto;
}

/* HACK: this makes the table of contents highlighting work when you click on a link in the table of contents */
section {
   margin-bottom: 1px;
}

section section:after {
   content: " ";
   display: block;
   width: 100%;
   height: calc(33vh - (1.5em * 2));
}

section section:last-child::after {
   content: none;
}

h2, h3 {
   position: -webkit-sticky;
   position: sticky;
   top: 0;
   margin: 0 auto 0;
   padding: calc(1.5em *0.5) 7em calc(1.5em *0.5) 0;
   z-index: 50;
   font-weight: 800;
}

h3 {
   white-space: nowrap;
}

@media (min-width: 901px) and (min-height: 800px) {
   h2, h3 {
      padding-top: 1.5em;
      padding-right: 0;
   }
}

h3:before {
   content: attr(data-parent-heading)" ";
   display: inline-block;
   font-weight: 400;
   padding-right: 0.5em;
   position: relative;
   opacity: 0.7;
}

h2:after, h3:after {
   content: " ";
   position: absolute;
   top: calc(1.5em *-0.5);
   left: 0;
   right: 0;
   bottom: 0;
   z-index: -1;
}

h4, h5, h6 {
   font-weight: 800;
}

h1 a.permalink {
   display: none;
}

a.permalink::before {
   content: "#";
}

a.permalink {
   font-weight: 400;
   text-decoration: none;
   margin-left: 0.5em;
   opacity: 0.7;
}

@media (max-width: 900px) {
   a.permalink {
      display: none;
   }
}

a.permalink:hover,
a.permalink:focus {
   opacity: 1;
   text-decoration: none;
}

a.permalink:hover::after,
a.permalink:focus::after {
   content: " permalink ";
   font-size: 60%;
   text-transform: uppercase;
   vertical-align: middle;
}

main p, 
main ol, 
main ul,
main iframe, 
main img, 
main blockquote, 
main table, 
main hr { 
   margin: 1.7em 0;
   font-weight: 400;
}

main ol li, 
main ul li {
   padding-left: 3em;
}

main ul li {
   list-style: none;
}

main ul li:before {
   content: " ";
   position: relative;
   float: left;
   margin-left: -1.5em;
   top: 0.45em;
   width: 0.6em;
   height: 0.6em;
   border-radius: 50%;
}

main ol {
   counter-reset: ordered-list;
}

main ol > li {
   list-style: none;
   counter-increment: ordered-list;
}

main ol > li:before {
   content: counter(ordered-list)". ";
   float: left;
   min-width: 3em;
   margin-left: -3em;
   text-align: center;
}

main a {
   text-decoration: underline;
}

main strong {
   font-weight: 600;
}

main img {
   display: block;
   width: 100%;
   height: auto;
   margin: 4rem auto;
}

main quote {
   font-style: italic;
}

main quote:before {
   content: "\201C";
   padding-right: 0.1em;
}

main quote:after {
   content: "\201D";
   padding-left: 0.05em;
}

main blockquote {
   font-style: italic;
   padding-left: 1.5em;
   padding-right: 1.5em;
   box-sizing: border-box;
   margin: 4rem auto 0;
}

main blockquote p:first-child::before {
   content: "\201C";
   position: relative;
   float: left;
   text-align: right;
   width: 1.4em;
   margin-left: -1.5em;
   padding-right: 0.1em;
}

main blockquote p:last-child::after {
   content: "\201D";
   padding-left: 0.05em;
}

main cite {
   position: relative;
   display: block;
   padding-left: 1.5em;
   box-sizing: border-box;
   font-style: normal;
   margin: 0 auto 4rem;
}

main cite:before {
   content: "–";
   position: relative;
   float: left;
   margin-left: -1.5em;
   width: 1.5em;
}

main table {
   width: 100%;
   height: auto;
   margin: 4rem auto;
   border-collapse: collapse;
}

main table th {
   font-weight: 600;
   padding: calc(1.7em * 0.25) 0;
   border-bottom: 2px solid;
}

main table td {
   border-top: 1px solid;
   padding: calc(1.7em * 0.25) 0;
}

main hr {
   border: none;
   border-bottom: 1px solid;
   margin: 4rem auto;
}

h2+p, h3+p {
   margin-top: calc(1.7em *0.5);
}

code {
   font-family: 'CLIG-PRE';
   padding: 0 0.25em;
}

pre {
   display: block;
   position: relative;
   width: 100%;
   box-sizing: border-box;
   margin: 4rem auto;
   padding: 2.5em 5px 5px;
   font-size: 14px;
   line-height: 1.8;
   color: white;
   border-radius: 5px;
}

pre code {
   display: block;
   overflow-x: auto;
   padding: 3em 3rem;
   font-weight: 400;
   border-radius: 0 0 3px 3px;
}

pre code strong {
   font-weight: 600;
}

@media (min-width: 750px) {
   body section h2,
   body section h3,
   body section h4,
   body section h5,
   body section h6,
   body section p,
   body section ol,
   body section ul,
   body section pre,
   body section iframe,
   body section img,
   body section blockquote,
   body section table,
   body section hr {
      margin-left: auto;
      margin-right: auto;
      max-width: 78rem;
   }
}

@media (min-width: 900px) {
   body section h2,
   body section h3,
   body section h4,
   body section h5,
   body section h6,
   body section p,
   body section ol,
   body section ul,
   body section pre,
   body section iframe,
   body section img,
   body section blockquote,
   body section table,
   body section hr {
      max-width: 60rem;
   }
}

footer {
   margin-top: 100vh;
   padding: 1.5em;
   grid-column: 1 / 3;
}
footer a {
   text-decoration: underline;
}
footer strong {
   font-weight: 600;
}

body section iframe {
   display: block;
   margin-left:auto!important;
   margin-right:auto!important;
   width: 100%!important;
}


body {
   color: rgba(0,0,0,1);
   background: rgba(255,255,255,1);
}
#TableOfContents {
   background: rgba(255,255,255,0.6);
}
h2:after, h3:after {
   background: rgba(255,255,255,1);
   box-shadow: 0 0 25px rgba(255,255,255,1);
}
main ul li:before {
   background: rgba(0,0,0,1);
}
code {
   background: rgba(0,0,0,0.3);
}
pre {
   background: rgba(0,0,0,0.3);
}
pre code {
   color: rgb(255,255,255,1);
   background: rgba(0,0,0,0.5);
}
/* ===== Homepage & List Page Overrides ===== */
/* ===== Homepage: sidebar + post list ===== */
/* ===== Global nav & search ===== */
.site-nav {
   display: flex;
   align-items: center;
   gap: 1em;
   position: relative;
   z-index: 90;
   padding: calc(1.5em * 0.5) 1em;
   border-bottom: 1px solid rgba(0,0,0,0.1);
}

.nav-logo {
   display: inline-flex;
   align-items: center;
   justify-content: center;
   text-decoration: none;
   flex-shrink: 0;
}

.nav-logo svg {
   display: block;
}

.nav-links {
   display: flex;
   gap: 1em;
   align-items: center;
}

.nav-links a {
   font-weight: 800;
   font-size: 0.9em;
   text-decoration: none;
   opacity: 0.6;
   transition: opacity 0.2s ease;
}

.nav-links a:hover,
.nav-links a[aria-current="page"] {
   opacity: 1;
   text-decoration: underline;
}

.theme-toggle {
   margin-left: auto;
   display: inline-flex;
   align-items: center;
   justify-content: center;
   background: none;
   border: none;
   cursor: pointer;
   padding: 0.25em;
   opacity: 0.55;
   transition: opacity 0.2s ease;
   color: inherit;
}

.theme-toggle:hover {
   opacity: 1;
}

.lang-toggle {
   display: inline-flex;
   align-items: center;
   justify-content: center;
   background: none;
   border: none;
   cursor: pointer;
   padding: 0.25em 0.35em;
   opacity: 0.55;
   transition: opacity 0.2s ease;
   color: inherit;
   font-family: 'CLIG-PRE', monospace;
   font-size: 13px;
   min-width: 1.8em;
}

.lang-toggle:hover {
   opacity: 1;
}

.top-btn {
   display: inline-flex;
   align-items: center;
   justify-content: center;
   background: rgba(128,128,128,0.1);
   border: 1px solid rgba(128,128,128,0.25);
   cursor: pointer;
   padding: 0.45rem;
   color: inherit;
   font-family: 'CLIG-PRE', monospace;
   font-size: 13px;
   line-height: 1;
   min-width: 2.2em;
   min-height: 2.2em;
   opacity: 0.85;
   transition: opacity 0.2s ease, background 0.2s ease, border-color 0.2s ease;
   -webkit-backdrop-filter: blur(12px);
   backdrop-filter: blur(12px);
   box-sizing: border-box;
}

.top-btn:hover {
   opacity: 1;
   background: rgba(128,128,128,0.18);
   border-color: rgba(128,128,128,0.4);
}

.top-btn svg {
   width: 1em;
   height: 1em;
}

.article-back {
   display: none;
   text-decoration: none;
}

.toc-back {
   display: inline-block;
   margin-bottom: 1.2em;
   font-weight: 800;
   font-size: 1.15em;
   opacity: 0.55;
   text-decoration: none;
}

.toc-back:hover,
.toc-back:focus {
   opacity: 1;
   text-decoration: underline;
}

@media (min-width: 901px) {
   .lang-toggle-nav {
      display: inline-flex;
      position: fixed;
      top: 0.85rem;
      right: 4.5rem;
      top: max(0.85rem, env(safe-area-inset-top));
      right: max(4.5rem, env(safe-area-inset-right));
      z-index: 200;
      margin-left: 0;
   }
   .theme-toggle-nav {
      display: inline-flex;
      position: fixed;
      top: 0.85rem;
      right: 0.85rem;
      top: max(0.85rem, env(safe-area-inset-top));
      right: max(0.85rem, env(safe-area-inset-right));
      z-index: 200;
      margin-left: 0;
   }
   .theme-toggle-left {
      display: inline-flex;
      position: fixed;
      top: 0.85rem;
      left: 0.85rem;
      top: max(0.85rem, env(safe-area-inset-top));
      left: max(0.85rem, env(safe-area-inset-left));
      z-index: 200;
      margin-left: 0;
   }

   /* Article page: both toggles sit side-by-side on the right */
   .single-page .theme-toggle-left {
      left: auto;
      right: 0.85rem;
      right: max(0.85rem, env(safe-area-inset-right));
   }
}

@media (max-width: 900px) {
   .lang-toggle-nav,
   .theme-toggle-nav {
      top: 0.85rem;
      top: max(0.85rem, env(safe-area-inset-top));
      bottom: auto;
      z-index: 201;
      margin-left: 0;
   }
   .lang-toggle-nav {
      display: inline-flex;
      position: fixed;
      right: 4.5rem;
      right: max(4.5rem, env(safe-area-inset-right));
   }
   .theme-toggle-nav {
      display: inline-flex;
      position: fixed;
      right: 0.85rem;
      right: max(0.85rem, env(safe-area-inset-right));
   }
   .theme-toggle-left {
      display: inline-flex;
      position: fixed;
      top: calc(1.5em * 0.5);
      left: 1.5em;
      z-index: 201;
      margin-left: 0;
   }
}

/* REPL search */
.repl-search {
   position: fixed;
   bottom: 0;
   left: 0;
   right: 0;
   z-index: 100;
   display: flex;
   align-items: center;
   gap: 0.5em;
   padding: 0.75em 1em;
   border-top: 1px solid rgba(0,0,0,0.15);
   background: rgba(255,255,255,0.95);
   font-family: 'CLIG-PRE', monospace;
   font-size: 0.95em;
}

.repl-prompt {
   opacity: 0.5;
   flex-shrink: 0;
}

#home-search {
   flex: 1;
   border: none;
   background: transparent;
   outline: none;
   font-family: 'CLIG-PRE', monospace;
   font-size: inherit;
   color: inherit;
   padding: 0;
   min-width: 0;
}

#home-search::placeholder {
   opacity: 0.4;
}

/* ===== Homepage ===== */
body.home {
   display: block;
   color: rgba(255,255,255,0.9);
   background: rgb(3,3,3);
}

.home #menu-button,
.home #TableOfContents {
   display: none;
}

.home .site-nav {
   color: rgba(255,255,255,0.9);
   background: rgb(3,3,3);
   border-bottom-color: rgba(255,255,255,0.09);
}

.home .repl-search {
   background: rgba(3,3,3,0.95);
   border-top-color: rgba(255,255,255,0.12);
}

.home-main {
   max-width: none;
   margin: 0;
   padding: 0.9em clamp(26px, 4.3vw, 56px) 5.5em;
}

/* Hero */
.hero {
   min-height: auto;
   display: flex;
   flex-direction: column;
   align-items: flex-start;
   justify-content: flex-start;
   text-align: left;
   width: 100%;
   max-width: 64em;
   margin: 0;
   padding: 0.25em 0 1.45em;
   box-sizing: border-box;
}

.hero-headline {
   width: 100%;
}

.hero-title {
   font-family: 'HLR', serif;
   font-weight: 400;
   font-size: clamp(66px, 12.5vw, 172px);
   line-height: 0.86;
   letter-spacing: -0.032em;
   margin: 0;
   padding: 0;
}

.hero-title > span {
   display: block;
}

.type-char {
   display: inline;
}

.type-cursor {
   display: inline;
   animation: blink 1s step-end infinite;
}

@keyframes blink {
   0%, 100% { opacity: 1; }
   50% { opacity: 0; }
}

.hero-about {
   margin-top: 2.9em;
   max-width: 52rem;
   color: rgba(255,255,255,0.68);
   line-height: 1.68;
}

.hero-about p {
   margin: 0;
   font-size: 15px;
}

.hero-about p + p {
   margin-top: 0.9em;
}

.hero-name {
   font-family: 'HLR', serif !important;
   font-size: clamp(28px, 2.25vw, 34px) !important;
   line-height: 1.05;
   margin-bottom: 0.7em !important;
   color: rgba(255,255,255,0.8);
}

.hero-oneline {
   font-size: 14px;
   opacity: 0.5;
   font-weight: 400;
   margin-left: 0.3em;
}

.hero-skills {
   font-family: 'CLIG-PRE', monospace;
   font-size: 15px !important;
   margin-top: 1.35em !important;
   color: rgba(255,255,255,0.58) !important;
}

.hero-motto {
   margin-top: 0.75em !important;
   color: rgba(255,255,255,0.52) !important;
}

.hero-about strong {
   color: rgba(255,255,255,0.86);
   font-weight: 800;
}

/* Notes section */
.notes-section {
   width: 100%;
   max-width: none;
   margin: 0;
   padding: 0 0 5em;
}

.ls-page-main {
   width: 100%;
   max-width: 88em;
   margin: 0 auto;
   padding: 1em 1.2em 5.5em;
}

.ls-section {
   width: 100%;
   max-width: none;
   margin: 0;
}

.notes-index-main {
   width: 100%;
   max-width: 96em;
   margin: 0 auto;
   padding: 1em 2em 5.5em 1em;
}

.notes-index-section {
   width: 100%;
}

@media (max-width: 900px) {
   .home-main {
      padding-top: 0.6em;
   }

   .hero {
      justify-content: flex-start;
      min-height: auto;
      max-width: 100%;
      padding-top: 0.1em;
   }

   .hero-title {
      font-size: clamp(48px, 13vw, 96px);
      line-height: 0.9;
   }

   .hero-about {
      margin-top: 1.8em;
      max-width: 100%;
      line-height: 1.62;
   }

   .hero-about p {
      font-size: 14px;
   }

   .hero-about p + p {
      margin-top: 0.85em;
   }

   .hero-about br {
      display: initial;
   }

   .hero-name {
      font-size: 25px !important;
   }

   .notes-section {
      width: 100%;
      padding-left: 1.15em;
      padding-right: 1.15em;
      box-sizing: border-box;
   }

   .ls-page-main {
      padding-left: 1.15em;
      padding-right: 1.15em;
      box-sizing: border-box;
   }

   .notes-index-main {
      padding-left: 1.15em;
      padding-right: 1.15em;
      box-sizing: border-box;
   }
}

/* ls table */
.ls-table {
   width: 100%;
   border-collapse: collapse;
   font-family: 'CLIG-PRE', monospace;
   font-size: 13px;
   line-height: 1.5;
   table-layout: auto;
   margin: 0;
}

.ls-head {
   border-bottom: 1px solid rgba(0,0,0,0.2);
}

.ls-head td {
   border-top: none;
   padding: 0.4em 0;
   opacity: 0.35;
   font-size: 12px;
}

.ls-columns td {
   padding: 0.3em 0 0.1em;
   opacity: 0.3;
   font-size: 11px;
   text-transform: uppercase;
   letter-spacing: 0.05em;
}

.ls-total {
   margin-left: 1em;
}

.ls-row {
   border-bottom: 1px solid rgba(0,0,0,0.1);
   transition: background 0.15s ease;
}

.ls-row:last-child {
   border-bottom: none;
}

.ls-row:hover {
   background: rgba(0,0,0,0.03);
}

.ls-row[hidden] {
   display: none;
}

.ls-id,
.ls-date {
   white-space: nowrap;
   padding: 0.5em 1.5em 0.5em 0;
   opacity: 0.5;
   width: 1%;
}

.ls-title {
   width: 100%;
   padding: 0.5em 1.5em 0.5em 0;
}

.ls-title a {
   font-weight: 600;
   text-decoration: none;
   font-family: inherit;
   font-size: 13px;
   opacity: 0.9;
}

.ls-title a:hover {
   text-decoration: underline;
}

.ls-tags {
   white-space: nowrap;
   text-align: right;
   padding: 0.5em 0;
   width: 1%;
}

.ls-tag {
   display: inline-block;
   opacity: 0.55;
}

.ls-tag + .ls-tag:before {
   content: " ";
}

.notes-index-table {
   width: 100%;
   border-collapse: collapse;
   font-family: 'CLIG-PRE', monospace;
   font-size: 13px;
   line-height: 1.5;
   table-layout: auto;
   margin: 0;
}

.notes-index-head {
   border-bottom: 1px solid rgba(0,0,0,0.2);
}

.notes-index-head td {
   border-top: none;
   padding: 0.4em 0;
   opacity: 0.35;
   font-size: 12px;
}

.notes-index-columns td {
   padding: 0.3em 0 0.1em;
   opacity: 0.3;
   font-size: 11px;
   text-transform: uppercase;
   letter-spacing: 0.05em;
}

.notes-index-total {
   margin-left: 1em;
}

.notes-index-row {
   border-bottom: 1px solid rgba(0,0,0,0.1);
   transition: background 0.15s ease;
}

.notes-index-row:last-child {
   border-bottom: none;
}

.notes-index-row:hover {
   background: rgba(0,0,0,0.03);
}

.notes-index-id,
.notes-index-date {
   white-space: nowrap;
   padding: 0.5em 1.5em 0.5em 0;
   opacity: 0.5;
   width: 1%;
}

.notes-index-title {
   width: 100%;
   padding: 0.5em 1.5em 0.5em 0;
}

.notes-index-title a {
   font-weight: 600;
   text-decoration: none;
   font-family: inherit;
   font-size: 13px;
   opacity: 0.9;
}

.notes-index-title a:hover {
   text-decoration: underline;
}

.notes-index-tags {
   white-space: nowrap;
   text-align: right;
   padding: 0.5em 0;
   width: 1%;
}

.notes-index-tag {
   display: inline-block;
   opacity: 0.55;
}

.notes-index-tag + .notes-index-tag:before {
   content: " ";
}

.no-results {
   padding: 2em 0;
   text-align: center;
   opacity: 0.5;
   font-family: 'CLIG-PRE', monospace;
}

/* ===== Article meta & TLDR ===== */
.page-toc {
   display: none;
}

.article-meta {
   text-align: center;
   margin: 1.35em 0 2.2em;
   font-size: 0.9em;
   opacity: 0.5;
}

.article-meta time + .article-tags:before {
   content: " · ";
}

.article-tag {
   text-decoration: none;
}

.article-tag:hover {
   text-decoration: underline;
}

.article-tldr {
   display: flex;
   align-items: flex-start;
   gap: 0.9em;
   max-width: 30.5em;
   margin: 0 auto;
   padding: 0.9em 1.2em;
   border-left: none;
   font-size: 0.95em;
   line-height: 1.5;
   opacity: 0.85;
}

.article-tldr-rule {
   flex: 0 0 auto;
   width: 3px;
   height: 2.3em;
   margin-top: 0.15em;
   background: currentColor;
}

.article-tldr-copy {
   min-width: 0;
}

.article-tldr strong {
   display: inline;
   margin-right: 0.55em;
   font-weight: 600;
}

.single-main .article-meta,
.single-main .article-tldr {
   max-width: var(--article-measure);
}

.single-main .article-meta {
   text-align: left;
}

.single-main .article-tldr {
   margin-left: 0;
   margin-right: 0;
}

.single-main {
   --article-measure: min(100%, 72rem);
   --article-hero-measure: min(100%, 112rem);
   --article-title-measure: 6em;
   padding: 0 clamp(20px, 5vw, 72px) 6em;
   font-size: 16px;
   line-height: 1.45;
   overflow-wrap: break-word;
}

.single-main article {
   max-width: var(--article-hero-measure);
   margin: 0 auto;
}

.single-main article > section {
   margin-bottom: 0;
}

.single-main article > section::after,
.single-main article section section::after {
   content: none;
}

.single-main h1 {
   font-family: 'CLIG', 'HLR', serif;
   display: flex;
   align-items: center;
   justify-content: center;
   min-height: 75vh;
   box-sizing: border-box;
   padding: 0.5em 0 0;
   font-size: clamp(56px, 12vw, 150px);
   font-weight: 800;
   line-height: 1;
   letter-spacing: -0.02em;
   text-align: center;
   margin: 0 auto;
   max-width: var(--article-title-measure);
}

@media (min-width: 744px) {
   .single-main h1 {
      font-size: clamp(72px, 13vw, 165px);
   }
}

@media (min-width: 120vh) {
   .single-main h1 {
      font-size: min(16vh, 165px);
   }
}

.single-main .article-tldr {
   min-height: 25vh;
   box-sizing: border-box;
   padding-top: calc(12.5vh - 2.6em);
   padding-bottom: 1.7em;
   text-align: left;
   max-width: min(100%, 38em);
   margin: 0 auto;
}

.single-main .article-meta {
   max-width: var(--article-measure);
   margin-left: auto;
   margin-right: auto;
   text-align: left;
   font-family: 'CLIG', 'HLR', serif;
}

.single-main h2,
.single-main h3 {
   position: -webkit-sticky;
   position: sticky;
   top: 0;
   padding: 0.58em 8.5rem 0.58em 0;
   z-index: 45;
   max-width: var(--article-measure);
   line-height: 1.18;
}

.single-main h2 {
   font-size: 1.45em;
   margin-top: 1.9em;
   margin-bottom: 0.45em;
}

.single-main h3 {
   font-size: 1.1em;
   margin-top: 1.45em;
   margin-bottom: 0.38em;
   white-space: normal;
}

.single-main h3::before {
   content: attr(data-parent-heading)" ";
   display: inline-block;
   font-weight: 400;
   padding-right: 0.45em;
   opacity: 0.52;
}

.single-main h2::after,
.single-main h3::after {
   content: " ";
   position: absolute;
   top: 0;
   left: -0.7em;
   right: -0.7em;
   bottom: 0;
   z-index: -1;
   background: rgba(255,255,255,0.74);
   -webkit-backdrop-filter: blur(8px);
   backdrop-filter: blur(8px);
}

.single-main p,
.single-main ol,
.single-main ul,
.single-main blockquote,
.single-main table,
.single-main hr,
.single-main pre {
   max-width: var(--article-measure);
}

.single-main p,
.single-main li {
   font-size: 1em;
}

.single-main li {
   line-height: 1.45;
}

.single-main ol li,
.single-main ul li {
   padding-left: 1.55em;
}

.single-main ul li::before {
   margin-left: -1.05em;
   top: 0.58em;
   width: 0.38em;
   height: 0.38em;
}

.single-main ol > li::before {
   min-width: 1.55em;
   margin-left: -1.55em;
   text-align: left;
}

.single-main p,
.single-main ol,
.single-main ul {
   margin-top: 1em;
   margin-bottom: 1em;
}

@media (min-width: 1200px) {
   .single-main {
      font-size: 17px;
   }
}

@media (min-width: 1600px) {
   .single-main {
      font-size: 20px;
   }
}

.single-main pre {
   font-size: 14px;
}

.single-main pre code {
   padding: 1.4em 1.5em;
}

.single-main table,
.single-main pre {
   overflow-x: auto;
}

.single-main table {
   display: block;
   width: max-content;
   max-width: var(--article-measure);
}

.single-main code {
   overflow-wrap: break-word;
}

@media (min-width: 1180px) {
   body.single-page {
      display: grid;
      grid-template-columns: 25% minmax(0, 75%);
   }

   .single-page .page-toc {
      display: block;
      grid-column: 1 / 2;
      grid-row: 1 / 2;
      align-self: start;
      position: sticky;
      top: 0;
      height: 100vh;
      box-sizing: border-box;
      overflow: auto;
      margin-top: 100vh;
      padding: calc(1.7em * 0.5) clamp(20px, 3vw, 40px) 1.7em 0;
      font-family: 'CLIG', 'HLR', serif;
      font-size: 1.05em;
      font-weight: 800;
      line-height: 1.4;
      border-right: none;
   }

   .single-page main {
      grid-column: 2 / 3;
      grid-row: 1 / 2;
      --article-sidebar-width: 25vw;
      padding-left: clamp(28px, 4vw, 72px);
      padding-right: clamp(28px, 6vw, 96px);
   }

   .single-main article {
      margin-left: 0;
      margin-right: auto;
   }

   .single-main h1,
   .single-main .article-tldr {
      transform: translateX(calc(var(--article-sidebar-width) / -2));
   }

   .single-page #TableOfContents {
      margin-top: 0;
      position: static;
      background: transparent;
      -webkit-backdrop-filter: none;
      backdrop-filter: none;
   }

   .single-page #TableOfContents > ul {
      position: static;
      height: auto;
      max-width: 18em;
      margin: 0 auto;
      padding: 0;
      overflow: visible;
   }

   .single-page #TableOfContents > ul > li {
      padding: 0 1.7em;
      margin-bottom: 0;
   }

   .single-page #TableOfContents ul li + li {
      padding-top: calc(1.7em * 0.25);
   }

   .single-page #TableOfContents ul ul {
      padding: 0.5em 0 0 1.7em;
      font-size: 75%;
      letter-spacing: 0.025em;
      opacity: 1;
   }

   .single-page #TableOfContents a {
      display: inline-block;
      opacity: 0.5;
   }

   .single-page #TableOfContents a:hover,
   .single-page #TableOfContents a:focus,
   .single-page #TableOfContents .active > a {
      opacity: 1;
   }

   .single-page #menu-button {
      display: none;
   }

   .single-page .toc-back {
      display: none;
   }

   .single-page .article-back {
      display: inline-flex;
      position: fixed;
      top: 0.85rem;
      top: max(0.85rem, env(safe-area-inset-top));
      right: 8.15rem;
      right: max(8.15rem, env(safe-area-inset-right));
      z-index: 200;
      margin-left: 0;
   }

   .single-main h2,
   .single-main h3 {
      padding-right: 0;
   }
}

@media (max-width: 1179px) {
   .single-page {
      --article-menu-right: clamp(28px, 4vw, 56px);
      --article-action-right: clamp(1.45rem, 4.5vw, 2.2rem);
      --article-action-bottom: calc(5.4rem + env(safe-area-inset-bottom));
      --article-action-gap: 2.8em;
   }

   .single-page.menu-open {
      display: block;
      overflow: auto;
      min-height: var(--toc-scroll-height, 100vh);
   }

   .single-page.menu-open main {
      max-height: var(--toc-scroll-height, 100vh);
      overflow: hidden;
      pointer-events: none;
      user-select: none;
   }

   .single-page.menu-open::before {
      content: "";
      position: fixed;
      inset: 0;
      z-index: 170;
      pointer-events: none;
      background: rgba(255,255,255,0.62);
      -webkit-backdrop-filter: blur(10px);
      backdrop-filter: blur(10px);
   }

   .single-page #menu-button {
      display: inline-block;
      width: auto;
      min-width: 0;
      min-height: 0;
      position: fixed;
      top: 0.85rem;
      top: max(0.85rem, env(safe-area-inset-top));
      left: auto;
      right: var(--article-menu-right);
      right: max(var(--article-menu-right), env(safe-area-inset-right));
      z-index: 200;
      padding: 0;
      border: none;
      background: transparent;
      -webkit-backdrop-filter: none;
      backdrop-filter: none;
      color: inherit;
      cursor: pointer;
      font-family: 'CLIG', 'HLR', serif;
      font-size: clamp(20px, 2.3vw, 26px);
      font-weight: 800;
      line-height: 1.4;
      box-sizing: border-box;
      opacity: 0.5;
   }

   .single-page.menu-open #menu-button {
      opacity: 1;
   }

   .single-page .page-toc {
      display: none;
   }

   .single-page.menu-open .page-toc {
      display: flex;
      flex-direction: column;
      justify-content: flex-start;
      position: absolute;
      top: 0;
      left: 0;
      right: 0;
      z-index: 180;
      box-sizing: border-box;
      min-height: var(--toc-scroll-height, 100vh);
      overflow: visible;
      padding: clamp(5rem, 12vh, 7rem) 0 1.7em;
      padding: calc(clamp(5rem, 12vh, 7rem) + env(safe-area-inset-top)) 0 calc(1.7em + env(safe-area-inset-bottom));
      background: transparent;
      -webkit-backdrop-filter: none;
      backdrop-filter: none;
      font-family: 'CLIG', 'HLR', serif;
      font-weight: 800;
      line-height: 1.4;
   }

   .single-page.menu-open #TableOfContents {
      display: block;
      position: static;
      padding: 0;
      width: 100%;
      max-width: none;
      margin-top: 0;
      background: transparent;
      -webkit-backdrop-filter: none;
      backdrop-filter: none;
   }

   .single-page.menu-open .toc-back {
      display: none;
   }

   .single-page.menu-open #TableOfContents > ul {
      max-width: none;
      margin: 0;
   }

   .single-page #TableOfContents a {
      font-size: 200%;
      letter-spacing: 0;
      opacity: 1;
   }

   .single-page #TableOfContents > ul > li {
      padding: 0 1.7em;
      margin-bottom: 0;
   }

   .single-page #TableOfContents ul li + li {
      padding-top: calc(1.7em * 0.25);
   }

   .single-page #TableOfContents ul ul {
      padding: 0.5em 0 0 1.7em;
      font-size: 75%;
      opacity: 1;
   }

   .single-main {
      padding-top: 0;
      font-size: 16px;
   }

   /* Article action buttons: thumb-friendly stack above the search bar on narrow screens */
   .single-page .theme-toggle-left,
   .single-page .lang-toggle-nav {
      position: fixed;
      left: auto;
      right: var(--article-action-right);
      right: max(var(--article-action-right), env(safe-area-inset-right));
      top: auto;
      bottom: auto;
      z-index: 201;
   }
   .single-page .theme-toggle-left {
      bottom: var(--article-action-bottom);
   }
   .single-page .lang-toggle-nav {
      bottom: calc(var(--article-action-bottom) + var(--article-action-gap));
   }

   .single-page .article-back {
      display: inline-flex;
      position: fixed;
      top: auto;
      bottom: calc(var(--article-action-bottom) + var(--article-action-gap) * 2);
      right: var(--article-action-right);
      right: max(var(--article-action-right), env(safe-area-inset-right));
      z-index: 201;
      margin-left: 0;
   }
}

@media (min-width: 1180px) and (max-width: 1400px) {
   .single-page {
      --article-action-right: clamp(1.45rem, 2.4vw, 2.4rem);
      --article-action-bottom: calc(5.4rem + env(safe-area-inset-bottom));
      --article-action-gap: 2.8em;
   }

   .single-page .theme-toggle-left,
   .single-page .lang-toggle-nav {
      position: fixed;
      left: auto;
      right: var(--article-action-right);
      right: max(var(--article-action-right), env(safe-area-inset-right));
      top: auto;
      bottom: auto;
      z-index: 201;
   }

   .single-page .theme-toggle-left {
      bottom: var(--article-action-bottom);
   }

   .single-page .lang-toggle-nav {
      bottom: calc(var(--article-action-bottom) + var(--article-action-gap));
   }

   .single-page .article-back {
      display: inline-flex;
      position: fixed;
      top: auto;
      bottom: calc(var(--article-action-bottom) + var(--article-action-gap) * 2);
      right: var(--article-action-right);
      right: max(var(--article-action-right), env(safe-area-inset-right));
      z-index: 201;
      margin-left: 0;
   }
}

@media (max-width: 480px) {
   .single-main {
      padding-top: 0;
      padding-left: 18px;
      padding-right: 18px;
      font-size: 15.5px;
      line-height: 1.48;
   }

   .single-main h2,
   .single-main h3 {
      padding-right: 6.4rem;
   }
}

@supports not ((-webkit-backdrop-filter: blur(1px)) or (backdrop-filter: blur(1px))) {
   .single-page #menu-button {
      background: transparent;
   }

   .single-page.menu-open .page-toc {
      background: transparent;
   }

   .single-main h2::after,
   .single-main h3::after {
      background: rgba(255,255,255,0.96);
   }

   @media (prefers-color-scheme: dark) {
      html:not([data-theme]) .single-page #menu-button,
      html:not([data-theme]) .single-main h2::after,
      html:not([data-theme]) .single-main h3::after {
         background: rgba(0,0,0,0.96);
      }
      html:not([data-theme]) .single-page.menu-open::before {
         background: rgba(0,0,0,0.82);
      }
      html:not([data-theme]) .single-page #menu-button {
         background: transparent;
      }
   }
}

html[data-theme="dark"] .single-page #menu-button {
   background: transparent;
}
html[data-theme="dark"] .single-page.menu-open .page-toc {
   background: transparent;
}
html[data-theme="dark"] .single-page.menu-open::before {
   background: rgba(0,0,0,0.82);
}
html[data-theme="dark"] .single-main h2::after,
html[data-theme="dark"] .single-main h3::after {
   background: rgba(0,0,0,0.96);
}

/* ===== List page ===== */
body.list-page,
body.about-page {
   display: block;
}

.list-page #menu-button,
.list-page #TableOfContents {
   display: none;
}

.list-page main {
   grid-column: auto;
   grid-row: auto;
   max-width: 100%;
}

.list-page-main {
   max-width: 42em;
   margin: 0 auto;
   padding: 0 1em;
}

.page-header {
   padding: 2em 1em 1em;
   text-align: center;
}

.page-header h1 {
   font-weight: 800;
   font-size: 2.5em;
   line-height: 1;
   letter-spacing: -0.02em;
   margin: 0;
}

.page-count {
   margin-top: 0.5em;
   font-size: 0.9em;
   opacity: 0.5;
}

@media (prefers-color-scheme: dark) {
   html:not([data-theme]) body {
      color: rgba(255,255,255,1);
      background: rgba(0,0,0,1);
   }
   html:not([data-theme]) #TableOfContents {
      background: rgba(0,0,0,0.6);
   }
   html:not([data-theme]) h2:after,
   html:not([data-theme]) h3:after {
      background: rgba(0,0,0,1);
      box-shadow: 0 0 25px rgba(0,0,0,1);
   }
   html:not([data-theme]) main ul li:before {
      background: rgba(255,255,255,1);
   }
   html:not([data-theme]) code {
      background: rgba(80,80,80,1);
   }
   html:not([data-theme]) pre {
      background: rgba(126,126,126,0.3);
   }
   html:not([data-theme]) pre code {
      background: rgba(80,80,80,1);
   }
   html:not([data-theme]) .repl-search {
      background: rgba(0,0,0,0.95);
      border-top-color: rgba(255,255,255,0.15);
   }
   html:not([data-theme]) .single-page.menu-open .page-toc {
      background: transparent;
   }
   html:not([data-theme]) .single-page.menu-open::before {
      background: rgba(0,0,0,0.62);
   }
   html:not([data-theme]) .single-page #TableOfContents {
      background: transparent;
   }
   html:not([data-theme]) .single-main h2::after,
   html:not([data-theme]) .single-main h3::after {
      background: rgba(0,0,0,0.74);
      box-shadow: none;
   }
   html:not([data-theme]) .single-page #menu-button {
      background: transparent;
   }
}

html[data-theme="dark"] body {
   color: rgba(255,255,255,1);
   background: rgba(0,0,0,1);
}
html[data-theme="dark"] #TableOfContents {
   background: rgba(0,0,0,0.6);
}
html[data-theme="dark"] h2:after,
html[data-theme="dark"] h3:after {
   background: rgba(0,0,0,1);
   box-shadow: 0 0 25px rgba(0,0,0,1);
}
html[data-theme="dark"] main ul li:before {
   background: rgba(255,255,255,1);
}
html[data-theme="dark"] code {
   background: rgba(80,80,80,1);
}
html[data-theme="dark"] pre {
   background: rgba(126,126,126,0.3);
}
html[data-theme="dark"] pre code {
   background: rgba(80,80,80,1);
}
html[data-theme="dark"] .repl-search {
   background: rgba(0,0,0,0.95);
   border-top-color: rgba(255,255,255,0.15);
}
html[data-theme="dark"] .single-page.menu-open .page-toc {
   background: transparent;
}
html[data-theme="dark"] .single-page.menu-open::before {
   background: rgba(0,0,0,0.62);
}
html[data-theme="dark"] .single-page #TableOfContents {
   background: transparent;
}
html[data-theme="dark"] .single-main h2::after,
html[data-theme="dark"] .single-main h3::after {
   background: rgba(0,0,0,0.74);
   box-shadow: none;
}
html[data-theme="dark"] .single-page #menu-button {
   background: transparent;
}

/* ===== Light mode override (homepage default is dark) ===== */
html[data-theme="light"] body.home {
   color: rgba(0,0,0,0.85);
   background: rgba(255,255,255,1);
}
html[data-theme="light"] .home .site-nav {
   color: rgba(0,0,0,0.85);
   background: rgba(255,255,255,1);
   border-bottom-color: rgba(0,0,0,0.1);
}
html[data-theme="light"] .home .repl-search {
   background: rgba(255,255,255,0.95);
   border-top-color: rgba(0,0,0,0.15);
}
html[data-theme="light"] .hero-about {
   color: rgba(0,0,0,0.68);
}
html[data-theme="light"] .hero-name {
   color: rgba(0,0,0,0.8);
}
html[data-theme="light"] .hero-skills {
   color: rgba(0,0,0,0.58) !important;
}
html[data-theme="light"] .hero-motto {
   color: rgba(0,0,0,0.52) !important;
}
html[data-theme="light"] .hero-about strong {
   color: rgba(0,0,0,0.86);
}

/* ===== About / Timeline ===== */
.about-main {
   max-width: 52em;
   margin: 0 auto;
   padding: 2em 1.5em 5.5em;
}

.about-identity {
   display: flex;
   flex-direction: column;
   align-items: center;
   text-align: center;
   margin: 0.5em 0 3em;
   gap: 0.6em;
}

.about-logo {
   display: block;
   width: 96px;
   height: 45px;
   object-fit: contain;
   opacity: 0.9;
   margin: 0 0 0.4em;
   padding: 0.35em;
   box-sizing: content-box;
   background: rgba(255,255,255,0.92);
}

.about-name {
   position: static;
   font-family: 'HLR', serif;
   font-size: 26px;
   font-weight: 800;
   line-height: 1.15;
   margin: 0;
   padding: 0;
   z-index: auto;
}

.about-name::after {
   content: none;
}

.about-links {
   display: flex;
   flex-wrap: wrap;
   align-items: center;
   justify-content: center;
   gap: 0.2em 1em;
   font-family: 'CLIG-PRE', monospace;
   font-size: 13px;
   margin-top: 0.2em;
}

.about-links a {
   text-decoration: none;
   opacity: 0.55;
   transition: opacity 0.2s ease;
}

.about-links a:hover {
   opacity: 1;
   text-decoration: underline;
}

.about-title {
   font-family: 'HLR', serif;
   font-size: 32px;
   font-weight: 800;
   margin-bottom: 1.5em;
}

.timeline {
   margin-top: 2em;
}

.timeline-item {
   margin-bottom: 2.5em;
   padding-left: 1.5em;
   border-left: 2px solid rgba(128,128,128,0.25);
   position: relative;
}

.timeline-item::before {
   content: '';
   position: absolute;
   left: -5px;
   top: 0.35em;
   width: 8px;
   height: 8px;
   border-radius: 50%;
   background: currentColor;
}

.timeline-header {
   font-family: 'CLIG', 'HLR', serif;
   font-size: 17px;
   margin-bottom: 0.4em;
   display: flex;
   align-items: baseline;
   justify-content: space-between;
   gap: 0.8em;
}

.timeline-header-main {
   display: flex;
   align-items: baseline;
   gap: 0.3em;
   flex-wrap: wrap;
}

.timeline-period {
   font-family: 'CLIG-PRE', monospace;
   font-size: 13px;
   opacity: 0.5;
   white-space: nowrap;
   flex-shrink: 0;
}

.timeline-dept {
   font-size: 14px;
   opacity: 0.55;
}

.timeline-role {
   font-weight: 600;
}

.timeline-sep {
   opacity: 0.4;
   margin: 0 0.2em;
}

.timeline-org {
   opacity: 0.7;
}

.timeline-desc {
   opacity: 0.75;
   line-height: 1.6;
   font-size: 15px;
}

a:focus, button:focus {
   color: rgb(0,0,0);
   background: yellow;
   outline: none;
   text-decoration: underline;
}
