

:root {
  --bg:            #0a101a;   
  --bg-soft:       #101a28;   
  --copper:        #c3714e;   
  --light-copper:  #cc8566;
  --tab:           #ffffff;   
  --green:         #99e550;   
  --green-line:    #69bf5e;   
  --green-deep:    #37946e;   
  --text:          #d7dee6;   
  --muted-light:   #acb3bf;
  --muted:         #898f99;   
  --rule:          #363c42;   

  --font-pixel: "Silkscreen", "Courier New", monospace;
  --font-body:  system-ui, -apple-system, sans-serif;
  --font-mono:  "JetBrains Mono", "Courier New", monospace;
  --font-headers: "Share Tech", "Courier New", monospace; 

  --maxw: 780px;

  
  --shoggoth-w: 400px;          
  --shoggoth-w-compact: 300px;  
}

* { box-sizing: border-box; }

html { scrollbar-color: var(--green-deep) var(--bg);}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}


.shoggoth, .mask { image-rendering: pixelated; image-rendering: crisp-edges; }

a { color: var(--green); text-decoration: none; }
a:hover { text-decoration: underline; }


.site-header {
  position: relative;
  height: 96px;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 28px;
}


.brand {
  position: absolute;
  left: 48px;
  top: 50%;
  z-index: 5;
  transform: translateY(-50%);
  font-family: var(--font-pixel);
  font-weight: 700;
  font-size: 18px;
  line-height: 1.25;
  color: var(--copper);
  text-shadow: 0 2px 0 rgba(0, 0, 0, .45);
}
.brand:hover { text-decoration: none; filter: brightness(1.12); }


.tabs {
  position: absolute;
  left: 50%;
  top: 50%;
  z-index: 5;
  transform: translate(-50%, -50%);
  display: flex;
  gap: 34px;
  align-items: center;
  padding-top: 14px;          
}

.tab {
  font-family: var(--font-pixel);
  font-size: 18px;
  letter-spacing: .5px;
  color: var(--tab);
  padding: 4px 2px;
  transition: color .2s ease;
}
.tab:hover { color: var(--green); text-decoration: none; }
.tab.is-active { color: var(--green); }


.slider {
  position: absolute;
  top: 0;
  left: 0;
  height: 5px;
  width: 0;
  background: var(--green-line);
  box-shadow: 0 0 8px rgba(105, 191, 94, .6);
  transform: translateX(0);
  opacity: 0;
  transition: transform .28s cubic-bezier(.5, 0, .2, 1),
              width .28s cubic-bezier(.5, 0, .2, 1),
              opacity .2s ease;
  pointer-events: none;
}


.no-js .slider { display: none; }
.no-js .tab.is-active {
  box-shadow: inset 0 4px 0 -1px var(--green-line);
}


.shoggoth {
  position: absolute;
  right: -48px;
  bottom: 0;
  transform: translateY(calc(31.25% + 5px));
  width: var(--shoggoth-w);  
  height: auto;
  z-index: 2;                
}


.divider {
  height: 10px;
  background: var(--green-line);
  box-shadow: 0 0 10px rgba(105, 191, 94, .35);
  position: relative;
  z-index: 1;
}


.content {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 48px 28px 80px;
}

.intro-title {
  font-family: var(--font-pixel);
  color: var(--green);
  font-size: 25px;
  margin: 0 0 10px;
  text-align: center;
}
.intro-lede { color: var(--muted); margin: 0 0 8px; font-size: 18px;   text-align: center; }

.page-heading,
.post-heading {
  font-family: var(--font-pixel);
  color: var(--green);
  font-weight: normal;
  line-height: 1.35;
}
.page-heading { font-size: 25px; margin: 0 0 28px; }
.post-heading { font-size: 35px; margin: 0 0 12px; }


.post-list { list-style: none; margin: 32px 0 0; padding: 0; }
.post-item {
  padding: 20px 0;
  border-top: 2px solid var(--rule);
}
.post-item:first-child { border-top: none; }
.post-list > :last-child { padding-bottom: 0; }
.post-item.empty { color: var(--muted); border: none; }

.post-title {
  font-family: var(--font-pixel);
  font-size: 17px;
  color: var(--text);
  transition: color .2s ease;
}
.post-link:hover .post-title { color: var(--green); }
.post-link { text-decoration: none; }
.post-link:hover { text-decoration: none; }

.post-meta {
  display: block;
  margin-top: 6px;
  font-family: var(--font-mono);
  font-size: 17px;
  color: var(--muted);
}
.post-summary { margin: 10px 0 0; color: var(--text); opacity: .88; }


.post { margin: 0; }

.post-body > :last-child { margin-bottom: 0; }
.post-body .sn-tail { margin-bottom: 0; }
.post .post-meta { margin-bottom: 40px; }
.post-body { font-size: 17px; }
.post-body h1,
.post-body h2,
.post-body h3 {
  font-family: var(--font-headers);
  margin-top: 0.75em;
  letter-spacing: 1px;
  
}
.post-body h1 { font-size: 30px; color: var(--green); }
.post-body h2 { font-size: 25px; color: var(--green-line); }
.post-body h3 { font-size: 21px; color: var(--green-deep); }
.post-body a { text-decoration: underline; }
.post-body blockquote {
  margin: 1.4em 0;
  padding: 4px 18px;
  background: var(--bg-soft);
  border-left: 3px solid var(--green-deep);
  color: var(--muted-light);
  font-style: italic;
}
.post-body code {
  font-family: var(--font-mono);
  font-size: .9em;
  background: var(--bg-soft);
  padding: 2px 6px;
  
}
.post-body pre {
  background: var(--bg-soft);
  border: 2px solid var(--rule);
  
  padding: 16px 18px;
  overflow-x: auto;
}
.post-body pre code { background: none; padding: 0; }


.post-body details.collapse {
  margin: 1.4em 0;
  background: var(--bg);
  border: 1px solid var(--rule);
  border-left: 3px solid var(--green-deep);
  
  padding: 0 18px;
}
.post-body details.collapse > summary {
  cursor: pointer;
  list-style: none;               
  padding: 12px 0;
  color: var(--light-copper);
  font-weight: 600;
  user-select: none;
}
.post-body details.collapse > summary::-webkit-details-marker { display: none; }

.post-body details.collapse > summary::before {
  content: "";
  display: inline-block;
  width: 1.8em;
  height: 1.1em;
  margin-right: 8px;
  vertical-align: -0.05em;        
  background: url("../img/shoggy_eye_closed.png") center / contain no-repeat;
  image-rendering: pixelated;     
}
.post-body details.collapse[open] > summary::before {
  background-image: url("../img/shoggy_eye_open.png");
}
.post-body details.collapse[open] { padding-bottom: 10px; }

.post-body details.collapse[open] > summary { margin-bottom: 4px; }
.post-body details.collapse > :last-child { margin-bottom: 0; }

.post-body details.collapse details.collapse { margin: 1em 0; }
.post-body img {
  max-width: 100%;
  height: auto;
  ;
  border: 4px solid;
  border-color: var(--green-deep);
}
.post-body hr { border: none; border-top: 2px solid var(--rule); margin: 40px 0; }

.tag {
  font-family: var(--font-mono);
  font-size: 17px;
  color: var(--copper);
}



.post-body .footnote-ref {
  font-family: var(--font-mono);
  font-size: .75em;
  color: var(--green);
  text-decoration: none;
  padding: 0 1px;
}
.post-body .footnote-ref:hover { text-decoration: underline; }


.post-body .footnote {
  margin-top: 0em;
  padding-top: 0em;
  font-size: 15.5px;
  color: var(--muted);
}

.post-body .footnote::after {
  content: "";
  display: block;
  border-top: 2px solid var(--rule);   
  margin-top: 40px;                    
}
.post-body .footnote ol { padding-left: 1.3em; }

.post-body .footnote li::marker { color: var(--green-deep); }
.post-body .footnote-backref { text-decoration: none; margin-left: 5px; color: var(--green-deep); }


.post-body { position: relative; }
.post-body.has-sidenotes .footnote { display: none; }  
.sidenote {
  position: absolute;
  left: calc(100% + 28px);
  width: 200px;
  margin: 0;
  font-family: var(--font-body);
  font-size: 14px;
  line-height: 1.5;
  color: var(--muted);
  border-left: 2px solid var(--green-deep);
  padding-left: 12px;
}
.sidenote p { margin: 0 0 .5em; }
.sidenote p:last-child { margin-bottom: 0; }
.sidenote-num {
  color: var(--green);
  font-family: var(--font-mono);
  font-size: .9em;
  margin-right: 6px;
}


.pager {
  display: flex;
  align-items: center;
  gap: 18px;
  margin-top: 44px;
  font-family: var(--font-mono);
  font-size: 14px;
}
.pager .disabled { color: var(--rule); }
.pager-count { color: var(--muted); }


.site-footer {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 40px 28px 56px;
  border-top: 2px solid var(--rule);
  text-align: center;
}
.mask {
  width: 96px;
  height: 96px;
  opacity: .9;
  margin-bottom: 0px;
}
.footer-text {
  font-family: var(--font-mono);
  font-size: 14px;
  color: var(--copper);
  margin: 0;
}
.footer-links {
  font-family: var(--font-mono);
  font-size: 14px;
  margin: 8px 0 0;
}
.footer-links a { color: var(--green-deep); }

.footer-sep { color: var(--muted); margin: 0 6px; }


body { overflow-x: hidden; }   

@media (max-width: 900px) {
  .site-header {
    height: auto;
    text-align: center;
    padding: 14px 20px 0;
    
    padding-bottom: calc(var(--shoggoth-w-compact) * 0.19 + 6px);
  }
  .brand {
    position: static;
    transform: none;
    display: block;
  }
  .tabs {
    position: relative;   
    left: auto;           
    top: auto;
    transform: none;
    margin: 12px auto 0;  
    gap: 22px;
    justify-content: center;
    flex-wrap: wrap;
  }
  .shoggoth {
    right: auto;
    left: 50%;
    transform: translateX(-50%) translateY(calc(31.25% + 5px));
    width: var(--shoggoth-w-compact);   
    opacity: 1;                          
  }
}
