@font-face {
  font-family: 'Commit Mono';
  src: url('/fonts/CommitMono-Regular.woff2') format('woff2');
  font-weight: 400;
  font-display: swap;
}
@font-face {
  font-family: 'Commit Mono';
  src: url('/fonts/CommitMono-Bold.woff2') format('woff2');
  font-weight: 700;
  font-display: swap;
}

* { box-sizing: border-box; }

html {
  background: #ffffff;
  color-scheme: light;
}

body {
  margin: 0;
  background: #888 url('/images/frosted-glass.png') center / cover fixed no-repeat;
  color: #111111;
  font-family: 'Commit Mono', Consolas, 'IBM Plex Mono', monospace;
  font-size: 15px;
  line-height: 1.65;
}

.site-wrap {
  max-width: 1240px;
  margin: 0 auto;
  background: #ffffff;
  box-shadow: 0 0 60px rgba(0,0,0,0.35);
  min-height: 100vh;
}

header.site-header {
  border-bottom: 3px solid #031d2c;
  padding: 20px 24px;
  background: #031d2c;
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
}
header.site-header .site-name {
  font-size: 30px;
  font-weight: 700;
  color: #ffffff;
  letter-spacing: 0.5px;
  text-decoration: none;
  display: inline-block;
}
.top-nav a {
  color: #ffffff;
  text-decoration: none;
  font-size: 15px;
  font-weight: 700;
  text-transform: capitalize;
  letter-spacing: 0.5px;
  margin-left: 20px;
}
.top-nav a:hover { text-decoration: underline; }

.search-box {
  margin-bottom: 20px;
}
.search-box input {
  width: 100%;
  max-width: 400px;
  padding: 8px 12px;
  font-family: inherit;
  font-size: 13px;
  color: #111;
  background: #ffffff;
  border: 1px solid #ccc;
  border-radius: 0;
}
.search-box input:focus {
  outline: none;
  border-color: #031d2c;
}
.entry.hidden { display: none; }

.layout {
  display: flex;
  align-items: stretch;
}

aside {
  width: 220px;
  flex-shrink: 0;
  background: #031d2c;
  min-height: calc(100vh - 76px);
  padding: 20px 0;
}
aside .cat {
  padding: 6px 18px;
  font-size: 12px;
  text-transform: capitalize;
  letter-spacing: 0.5px;
  color: #ffffff;
  margin-top: 24px;
}
aside .cat:first-child { margin-top: 0; }
aside ul {
  list-style: none;
  margin: 0;
  padding: 4px 0;
}
aside li a {
  display: block;
  padding: 9px 18px;
  font-size: 12.5px;
  font-weight: 700;
  color: #ffffff;
  text-decoration: none;
}
aside li a:hover { background: rgba(255,255,255,0.15); }
aside li a.current {
  color: #031d2c;
  background: #ffffff;
  font-weight: 700;
}
aside li a.current::before { content: "▸ "; color: #031d2c; }

aside .archive {
  margin-top: 24px;
  padding-top: 0;
}
aside .archive-title {
  padding: 0 18px 6px;
  font-size: 12px;
  text-transform: capitalize;
  letter-spacing: 0.5px;
  color: #ffffff;
}
aside .archive a {
  display: block;
  padding: 8px 18px;
  font-size: 12px;
  font-weight: 700;
  color: #ffffff;
  text-decoration: none;
}
aside .archive a:hover { background: rgba(255,255,255,0.15); }
aside .archive .count { color: #ffffff; }

.toc {
  padding-bottom: 10px;
  margin-bottom: 0;
}
.toc-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 18px 6px;
  font-size: 12px;
  text-transform: capitalize;
  letter-spacing: 0.5px;
  color: #ffffff;
}
.toc-toggle {
  background: none;
  border: none;
  color: #ffffff;
  font-family: inherit;
  font-size: 11px;
  text-transform: capitalize;
  letter-spacing: 0.5px;
  text-decoration: underline;
  cursor: pointer;
  padding: 0;
}
.toc-toggle:hover { color: #ffffff; }
.toc ul {
  list-style: none;
  margin: 0;
  padding: 0;
  max-height: 400px;
  overflow: hidden;
  transition: max-height 0.2s ease;
}
.toc ul.collapsed {
  max-height: 0;
}
.toc li a {
  display: block;
  padding: 8px 18px;
  font-size: 12px;
  font-weight: 700;
  color: #ffffff;
  text-decoration: none;
  line-height: 1.4;
}
.toc li.toc-3 a { padding-left: 32px; }
.toc li a:hover { background: rgba(255,255,255,0.1); }
.toc li a.active {
  color: #ffffff;
  background: rgba(255,255,255,0.1);
  border-left: 2px solid #ffffff;
  padding-left: 16px;
}
.toc li.toc-3 a.active { padding-left: 30px; }

main {
  flex: 1;
  max-width: 680px;
  margin: 0;
  padding: 32px 32px 80px;
  min-width: 0;
}

.meta {
  font-size: 12px;
  color: #4bb543;
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 6px;
}

.filter-buttons {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 24px;
}
.filter-btn {
  font-family: 'Commit Mono', Consolas, 'IBM Plex Mono', monospace;
  font-size: 13px;
  font-weight: 700;
  padding: 0;
  background: none;
  color: #111;
  border: none;
  text-decoration: underline;
  cursor: pointer;
}
.filter-btn:hover {
  color: #888;
}
.filter-btn.active {
  color: #888;
}
.filter-sep {
  color: #999;
  font-family: 'Commit Mono', Consolas, 'IBM Plex Mono', monospace;
  font-size: 13px;
}
h1 {
  font-family: Georgia, 'Times New Roman', serif;
  font-size: 26px;
  color: #111;
  margin: 0 0 6px;
  font-weight: 700;
  line-height: 1.3;
}
main h2 {
  font-family: Georgia, 'Times New Roman', serif;
  font-size: 21px;
  color: #111;
  font-weight: 700;
  line-height: 1.3;
  margin: 36px 0 12px;
}
main h3 {
  font-family: Georgia, 'Times New Roman', serif;
  font-size: 18px;
  color: #111;
  font-weight: 700;
  font-style: italic;
  line-height: 1.3;
  margin: 28px 0 10px;
}
.post-meta-table {
  border-top: 1px solid #ddd;
  border-bottom: 1px solid #ddd;
  margin: 14px 0 20px;
  padding: 10px 0;
}
.meta-row {
  display: flex;
  padding: 3px 0;
  font-size: 12.5px;
}
.meta-key {
  width: 100px;
  flex-shrink: 0;
  color: #000000;
  font-family: 'Commit Mono', Consolas, 'IBM Plex Mono', monospace;
  font-weight: 700;
  text-transform: capitalize;
  letter-spacing: normal;
}
.meta-val {
  color: #333;
  font-family: 'Commit Mono', Consolas, 'IBM Plex Mono', monospace;
  text-transform: capitalize;
}
.dek {
  color: #666;
  font-size: 13px;
  font-style: italic;
  margin-bottom: 28px;
}
.subline {
  color: #666;
  font-size: 13px;
  margin-bottom: 28px;
  border-bottom: 1px solid #ddd;
  padding-bottom: 20px;
}
p { color: #1a1a1a; }
a.inline, main a { color: #031d2c; }
blockquote {
  border-left: 3px solid #4bb543;
  margin: 24px 0;
  padding: 4px 0 4px 16px;
  color: #333;
}
hr {
  border: none;
  border-top: 1px solid #4bb543;
  width: 40px;
  margin: 32px 0;
}

.entry {
  display: flex;
  justify-content: space-between;
  padding: 10px 0;
  border-bottom: 1px dotted #ccc;
  font-size: 13.5px;
}
.entry a { color: #111; text-decoration: none; }
.entry a:hover { color: #031d2c; }
.entry .date { color: #999; }

main code {
  display: block;
  padding: 14px 16px;
  background: #f4f4f4;
  border: 1px solid #ddd;
  font-size: 13px;
  word-break: break-all;
  margin: 16px 0;
}
.donate-note {
  font-size: 12.5px;
  color: #666;
  font-style: italic;
  border-left: 3px solid #ccc;
  padding-left: 12px;
}

footer.site-footer {
  text-align: center;
  font-size: 11px;
  color: #999;
  padding: 30px;
  border-top: 1px solid #eee;
}

/* Mobile: stack sidebar above content instead of squeezing side-by-side */
@media (max-width: 768px) {
  body {
    background-attachment: scroll;
  }
  .site-wrap {
    box-shadow: none;
  }
  header.site-header {
    padding: 16px 18px;
  }
  header.site-header .site-name {
    font-size: 22px;
  }
  .top-nav a {
    font-size: 13px;
    margin-left: 14px;
  }
  .layout {
    flex-direction: column;
  }
  aside {
    width: 100%;
    min-height: 0;
    padding: 14px 0;
  }
  .toc ul {
    max-height: none;
  }
  main {
    max-width: 100%;
    padding: 22px 18px 60px;
  }
  h1 {
    font-size: 22px;
  }
  main h2 {
    font-size: 19px;
  }
  .post-meta-table {
    font-size: 11.5px;
  }
  .meta-key {
    width: 84px;
  }
}
