:root {
  --mono-font: "IoskeleyMono", "IBM Plex Mono", "JetBrains Mono", "SFMono-Regular", Menlo, Consolas, monospace;
  --font-mono: var(--mono-font);
  --bg-main: #0a0a0a;
  --text-main: #c5c5c5;
  --text-headings: #e8e8e8;
  --text-title: #ffffff;
  --text-muted: #999999;
  --text-caption: #999999;
  --link-static: #8ec07c;
  --link-hover: #d3869b;
  --code-block-bg: #121212;
  --code-block-text: #d8d8d8;
  --code-block-border: #333333;
  --inline-code-bg: #1a1a1a;
  --inline-code-text: #9d86d3;
  --border-subtle: #333333;
  --blockquote-border: #444444;
  --nav-bg: #0c0c0c;
  --nav-border: #333333;
  --callout-bg: #101010;
  --callout-border: #444444;
  --code-keyword: #83a598;
  --code-function: #b6b86a;
  --code-executable: #b8bb26;
  --code-string: #8ec07c;
  --code-datatype: #fabd2f;
  --code-special-string: #8ec07c;
  --code-attribute: #a584db;
  --code-decimal: #fe8019;
  --code-character: #8ec07c;
  --code-comment: #665c54;
  --code-variable: #ebdbb2;
  --code-operator: #d8d8d8;
  --code-preprocessor: #c5c5c5;
  --code-alert: #fb4934;
}

.theme-light {
  --bg-main: #fffaf0;
  --text-main: #1c1b1a;
  --text-headings: #100f0f;
  --text-title: #100f0f;
  --text-muted: #43423e;
  --text-caption: #575653;
  --link-static: #205ea6;
  --link-hover: #5e409d;
  --code-block-bg: #f2f0e5;
  --code-block-text: #1c1b1a;
  --code-block-border: #dad8ce;
  --inline-code-bg: #e6e4d9;
  --inline-code-text: #205ea6;
  --border-subtle: #b7b5ac;
  --blockquote-border: #878580;
  --nav-bg: #f2f0e5;
  --nav-border: #dad8ce;
  --callout-bg: #f2f0e5;
  --callout-border: #b7b5ac;
  --code-keyword: #205ea6;
  --code-function: #66800b;
  --code-executable: #66800b;
  --code-string: #66800b;
  --code-datatype: #bc5215;
  --code-special-string: #24837b;
  --code-attribute: #a02f6f;
  --code-decimal: #bc5215;
  --code-character: #66800b;
  --code-comment: #b7b5ac;
  --code-variable: #100f0f;
  --code-operator: #100f0f;
  --code-preprocessor: #6f6e69;
  --code-alert: #af3029;
}

@font-face {
  font-family: "IoskeleyMono";
  src: url("../fonts/IoskeleyMono-Regular.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "IoskeleyMono";
  src: url("../fonts/IoskeleyMono-Bold.woff2") format("woff2");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "IoskeleyMono";
  src: url("../fonts/IoskeleyMono-Italic.woff2") format("woff2");
  font-weight: 400;
  font-style: italic;
  font-display: swap;
}

@font-face {
  font-family: "IoskeleyMono";
  src: url("../fonts/IoskeleyMono-BoldItalic.woff2") format("woff2");
  font-weight: 700;
  font-style: italic;
  font-display: swap;
}

*, *::before, *::after {
  box-sizing: border-box;
  font-family: inherit;
}

html {
  background: var(--bg-main);
}

body {
  font-family: var(--mono-font);
  line-height: 1.7;
  background-color: var(--bg-main);
  color: var(--text-main);
  margin: 0 auto;
  padding: 60px 0 0;
  font-size: 16px;
  max-width: 1200px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body.home,
body.archive {
  line-height: 1.6;
}

a {
  color: var(--text-main);
  text-decoration: none;
  border-bottom: 1px dotted var(--link-static);
  padding-bottom: 1px;
  transition: color 0.2s ease, border-color 0.2s ease;
}

a:hover {
  color: var(--link-hover);
  border-bottom-color: var(--link-hover);
}

nav {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  position: fixed;
  inset: 0 0 auto 0;
  width: 100%;
  z-index: 9999;
  background-color: var(--nav-bg);
  border-bottom: 1px solid var(--nav-border);
  padding: 0.75rem;
}

nav a {
  color: var(--text-main);
  border-bottom: none;
  margin-right: 1.8rem;
  font-size: 0.95rem;
  letter-spacing: 0.06em;
  padding: 0.3rem 0;
  position: relative;
}

nav a.active {
  color: var(--text-main);
}

nav .theme-toggle {
  background: transparent;
  border: 0;
  color: var(--text-muted);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-left: auto;
  margin-right: 0.75rem;
  padding: 0;
  line-height: 0;
}

nav .theme-toggle:hover {
  color: var(--link-static);
}

nav .rss-link {
  margin-left: 0;
  margin-right: 0;
  display: inline-flex;
  align-items: center;
}

.theme-icon-sun { display: none; }
.theme-icon-moon { display: inline-block; }
.theme-light .theme-icon-sun { display: inline-block; }
.theme-light .theme-icon-moon { display: none; }

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

.home-container {
  padding: 2rem;
}

.terminal-header {
  padding-bottom: 1rem;
  margin: 1.75rem 0 2rem;
  position: relative;
}

.terminal-header h1 {
  font-size: 2.5rem;
  letter-spacing: -1px;
  margin: 0 0 0.5rem;
  color: var(--text-title);
  font-weight: 400;
  line-height: 1.3;
}

.terminal-header p {
  color: var(--text-main);
  margin-top: 0;
}

.section {
  margin: 3rem 0;
  padding-top: 1rem;
  position: relative;
}

.section-header {
  display: flex;
  align-items: center;
  margin-bottom: 1.5rem;
  border-bottom: 1px solid var(--border-subtle);
  padding-bottom: 0.5rem;
}

.section-title {
  font-size: 1.5rem;
  text-transform: uppercase;
  letter-spacing: 1px;
  margin: 0;
  color: var(--text-headings);
  font-weight: 400;
}

.section-number {
  color: var(--text-muted);
  font-size: 0.8rem;
  font-weight: 700;
  margin-right: 1rem;
  min-width: 2.5rem;
}

.links-container {
  margin: 2rem auto;
}

.links-table {
  border-collapse: collapse;
  font-size: 0.9rem;
  margin: 1.5rem 0;
  width: 100%;
}

.links-table th {
  border-bottom: 1px solid var(--border-subtle);
  color: var(--text-headings);
  font-size: 0.8rem;
  font-weight: 700;
  padding: 0.5rem;
  text-align: left;
  text-transform: uppercase;
}

.links-table td {
  border-bottom: 1px dotted var(--border-subtle);
  padding: 0.8rem 0.5rem;
  vertical-align: middle;
}

.links-table tr:last-child td {
  border-bottom: none;
}

.platform-cell {
  color: var(--text-headings);
  font-size: 1rem;
  font-weight: 700;
  width: 20%;
}

.description-cell {
  color: var(--text-muted);
  font-size: 0.85rem;
  width: 50%;
}

.url-cell {
  text-align: right;
  width: 30%;
}

.url-cell a {
  font-size: 0.9rem;
}

.platform-icon {
  border: 1px solid var(--link-static);
  display: inline-block;
  height: 1rem;
  margin-right: 0.5rem;
  position: relative;
  vertical-align: middle;
  width: 1rem;
}

.platform-icon::after {
  background-color: var(--link-static);
  content: "";
  height: 8px;
  left: 3px;
  opacity: 0.6;
  position: absolute;
  top: 3px;
  width: 8px;
}

.receipt-footer {
  border-top: 1px dashed var(--border-subtle);
  color: var(--text-muted);
  font-size: 0.8rem;
  margin-top: 3rem;
  padding-top: 1rem;
  text-align: center;
}

.timestamp {
  display: block;
  margin-top: 0.5rem;
}

.cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 1.5rem;
}

.card {
  border: 1px dashed var(--border-subtle);
  padding: 1rem;
}

.card h3 {
  margin: 0 0 0.5rem;
  font-size: 1.1rem;
  color: var(--text-headings);
}

.card p {
  font-size: 0.9rem;
  margin: 0;
}

.timeline {
  position: relative;
  padding-left: 20px;
}

.timeline::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 1px;
  background-color: var(--border-subtle);
}

.timeline-item {
  margin-bottom: 1rem;
  position: relative;
}

.timeline-item::before {
  content: "";
  position: absolute;
  left: -24px;
  top: 6px;
  width: 8px;
  height: 8px;
  background-color: var(--text-muted);
}

.timeline-item.current::before {
  background-color: var(--link-hover);
}

.timeline-item h3 {
  margin: 0;
  font-size: 1rem;
  color: var(--text-headings);
}

.timeline-item p {
  margin: 0.2rem 0 0;
  font-size: 0.9rem;
  color: var(--text-muted);
}

.cert-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  justify-content: flex-start;
}

.cert-badge {
  border: 1px dashed var(--border-subtle);
  flex: 0 0 calc(20% - 1rem);
  min-width: 160px;
  padding: 1rem;
  text-align: center;
  font-size: 0.8rem;
  transition: all 0.2s ease;
}

.cert-badge:hover {
  border-style: solid;
  border-color: var(--link-hover);
  transform: translateY(-2px);
}

.cert-badge h4 {
  margin: 0.5rem 0;
  font-size: 0.9rem;
  color: var(--text-headings);
}

.cert-badge p {
  margin-bottom: 0;
}

.archive-title {
  color: var(--text-title);
  font-size: 1.5rem;
  font-weight: 400;
  margin: 3.3rem 0 2rem;
  text-align: center;
}

.archive-container {
  padding: 1rem;
}

.blogs-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.year-separator {
  color: var(--text-muted);
  font-size: 1.1rem;
  margin: 2rem 0 1rem -4rem;
  padding-bottom: 0.3rem;
  border-bottom: 1px solid rgba(153, 153, 153, 0.3);
}

.year-separator:first-child {
  margin-top: 0;
}

.blog-entry {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 1.5rem;
  align-items: baseline;
  margin-bottom: 0.5rem;
}

.blog-date {
  color: var(--text-muted);
  font-style: italic;
  white-space: nowrap;
}

.blog-title {
  font-size: 1.2rem;
  font-weight: 400;
  line-height: 2;
  margin: 0;
  min-width: 0;
}

.blog-title a {
  word-break: break-word;
  overflow-wrap: anywhere;
}

.blog-type {
  color: var(--link-static);
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: -0.5px;
  text-align: right;
  text-transform: uppercase;
  white-space: nowrap;
}

.note-type {
  color: var(--text-muted);
  font-weight: 400;
}

.blog-content {
  max-width: 800px;
  margin: 0 auto;
}

.post-header {
  margin-bottom: 3rem;
}

.post-header h1,
.post-header h2 {
  color: var(--text-headings);
  font-size: 1.8rem;
  font-weight: 400;
  line-height: 1.3;
  margin: 3.96rem 0 1.44rem;
  padding-bottom: 0.54rem;
}

.post-description {
  color: var(--text-main);
}

.post-meta {
  color: var(--text-muted);
  display: flex;
  flex-wrap: wrap;
  gap: 1.5rem;
  font-size: 0.85rem;
  margin: 0 0 1.5rem;
}

.post-content {
  margin: 2rem 0 3rem;
  max-width: 100%;
  line-height: 1.7;
}

h1, h2, h3, h4, h5, h6 {
  color: var(--text-headings);
  font-weight: 400;
  line-height: 1.3;
}

.post-content h1 {
  border-bottom: 1px dashed var(--border-subtle);
  color: var(--text-title);
  font-size: 1.8rem;
  margin: 2.5rem 0 1.2rem;
  padding-bottom: 0.3em;
}

.post-content h1:first-child {
  margin-top: 0;
}

.post-content h2 {
  border-bottom: 1px dashed var(--border-subtle);
  font-size: 1.7rem;
  margin: 2.5rem 0 1.2rem;
  padding-bottom: 0.3em;
}

.post-content h3 {
  font-size: 1.4rem;
  margin: 2.2rem 0 1rem;
}

.post-content p,
.post-content ul,
.post-content ol,
.post-content pre,
.post-content figure,
.post-content blockquote {
  margin-bottom: 1.5rem;
}

.post-content img {
  border: 1px solid var(--border-subtle);
  display: block;
  height: auto;
  margin: 2rem auto;
  max-width: 100%;
}

figure {
  margin: 2rem 0;
  text-align: center;
  position: relative;
}

figcaption {
  display: block;
  font-size: 0.8rem;
  color: var(--text-muted);
  margin: 0;
  padding: 0.3rem 0;
  text-align: center;
  max-width: 90%;
  line-height: 1.4;
  font-style: italic;
}

.video-player {
  position: relative;
  margin: 2rem 0;
  border: 1px solid var(--border-subtle);
  background: #000;
  max-width: 100%;
}

.video-player video {
  display: block;
  width: 100%;
  cursor: pointer;
  margin: 0;
  border: none;
}

.video-controls {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.4rem 0.6rem;
  background: var(--bg-main);
  border-top: 1px solid var(--border-subtle);
  font-family: var(--mono-font);
  font-size: 0.75rem;
}

.video-controls button {
  background: none;
  border: 1px solid var(--border-subtle);
  color: var(--text-muted);
  cursor: pointer;
  padding: 0.15rem 0.4rem;
  font-size: 0.75rem;
  line-height: 1;
  font-family: var(--mono-font);
}

.video-controls button:hover {
  color: var(--text-main);
  border-color: var(--text-muted);
}

.video-time,
.video-duration {
  color: var(--text-muted);
  min-width: 3ch;
  text-align: center;
}

.video-seek {
  flex: 1;
  appearance: none;
  height: 4px;
  background: var(--border-subtle);
  outline: none;
  cursor: pointer;
  padding: 8px 0;
  box-sizing: content-box;
  background-clip: content-box;
}

.video-seek::-webkit-slider-thumb {
  appearance: none;
  width: 12px;
  height: 16px;
  background: var(--text-muted);
  border-radius: 0;
  cursor: pointer;
}

.video-seek::-moz-range-thumb {
  width: 12px;
  height: 16px;
  background: var(--text-muted);
  border: none;
  border-radius: 0;
  cursor: pointer;
}

.annotated-content {
  position: relative;
  margin-bottom: 40px;
  width: 100%;
}

.main-text {
  position: relative;
  width: 100%;
  max-width: 100%;
  display: block;
}

.annotations-container {
  position: absolute;
  top: -3.75em;
  right: -350px;
  width: 300px;
  height: 100%;
}

.annotation {
  position: relative;
  width: 100%;
  color: var(--text-muted);
  font-size: 0.85em;
  font-style: italic;
  padding-left: 15px;
  line-height: 1.4;
  opacity: 1;
  margin-bottom: 30px;
  border-left: 1px solid var(--blockquote-border);
}

.annotation::before {
  content: "";
  position: absolute;
  border-top: 1px solid;
  border-color: inherit;
  width: 30px;
  left: -30px;
  top: 10px;
}

.post-content table {
  border: 1px solid var(--border-subtle);
  border-collapse: collapse;
  margin: 2rem 0;
  width: 100%;
}

table {
  width: 100%;
  border-collapse: collapse;
  margin: 1.5rem 0;
  font-size: 0.9rem;
}

th {
  text-align: left;
  border-bottom: 1px solid var(--border-subtle);
  padding: 0.5rem;
  font-weight: 700;
  text-transform: uppercase;
  font-size: 0.8rem;
  color: var(--text-headings);
}

td {
  padding: 0.5rem;
  border-bottom: 1px dotted var(--border-subtle);
  vertical-align: top;
}

.post-content th,
.post-content td {
  padding: 0.3rem 0.5rem;
  text-align: left;
  vertical-align: top;
}

.post-content th {
  background: var(--code-block-bg);
  color: var(--text-headings);
}

pre,
div.sourceCode {
  background-color: var(--code-block-bg);
}

div.sourceCode,
.post-content pre:not(.sourceCode pre) {
  border-left: 1px dashed var(--border-subtle);
  margin: 1.5rem 0;
}

pre {
  color: var(--code-block-text);
  font-size: 0.9em;
  letter-spacing: 0.02em;
  line-height: 1.5;
  margin: 0;
  overflow: auto;
  padding: 0.5em 1.5em;
  tab-size: 4;
  white-space: pre;
}

pre code {
  background: transparent;
  color: inherit;
  font-size: 1em;
  padding: 0;
  white-space: pre;
}

p > code,
li > code,
td > code,
th > code {
  background-color: var(--inline-code-bg);
  color: var(--inline-code-text);
  font-size: 0.88em;
  padding: 0.2em 0.4em;
  white-space: nowrap;
}

blockquote {
  border-left: 2px solid var(--blockquote-border);
  color: var(--text-main);
  font-style: italic;
  margin-left: 0;
  padding-left: 1.5em;
}

.callout {
  background: var(--callout-bg);
  border-left: 2px solid var(--callout-border);
  margin: 1.5rem 0;
  padding: 0.8rem 1rem;
}

.callout-title {
  color: var(--text-headings);
  font-size: 0.85rem;
  letter-spacing: 0.05em;
  margin-bottom: 0.4rem;
  text-transform: uppercase;
}

.callout-note { --callout-border: var(--link-static); }
.callout-warning { --callout-border: var(--link-hover); }

.post-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 2rem;
}

.tag {
  color: var(--text-muted);
  font-size: 0.8rem;
}

.post-footer {
  border-top: 1px dashed var(--border-subtle);
  margin-top: 2rem;
  padding-top: 1rem;
}

footer.site-footer {
  border-top: 1px solid var(--border-subtle);
  color: var(--text-muted);
  display: flex;
  font-size: 0.85rem;
  margin-top: 3rem;
  padding: 1.5rem 0;
}

.footer-content {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
  width: 100%;
}

.footer-links {
  display: flex;
  gap: 1rem;
}

.footer-links a {
  color: var(--text-muted);
  border-bottom: none;
}

pre code .kw { color: var(--code-keyword); }
pre code .cf { color: var(--code-keyword); }
pre code .fu { color: var(--code-function); }
pre code .bu { color: var(--code-function); }
pre code .ex { color: var(--code-executable); }
pre code .st { color: var(--code-string); }
pre code .dt { color: var(--code-datatype); }
pre code .ss { color: var(--code-special-string); }
pre code .at { color: var(--code-attribute); }
pre code .dv { color: var(--code-decimal); }
pre code .bn { color: var(--code-decimal); }
pre code .fl { color: var(--code-decimal); }
pre code .ch { color: var(--code-character); }
pre code .sc { color: var(--code-character); }
pre code .vs { color: var(--code-string); }
pre code .co { color: var(--code-comment); font-style: italic; }
pre code .do { color: var(--code-comment); font-style: italic; }
pre code .an { color: var(--code-comment); font-style: italic; }
pre code .cv { color: var(--code-comment); font-style: italic; }
pre code .in { color: var(--code-comment); font-style: italic; }
pre code .va { color: var(--code-variable); }
pre code .cn { color: var(--code-variable); }
pre code .ot { color: var(--code-variable); }
pre code .op { color: var(--code-operator); }
pre code .pp { color: var(--code-preprocessor); }
pre code .im { color: var(--code-preprocessor); }
pre code .al,
pre code .er,
pre code .wa { color: var(--code-alert); }

@media (max-width: 768px) {
  body {
    font-size: 14px;
  }

  nav {
    padding: 0.5rem;
  }

  nav a {
    font-size: 0.85rem;
    margin-right: 1.2rem;
  }

  .container,
  .home-container {
    padding-left: 1rem;
    padding-right: 1rem;
  }

  .section-number {
    min-width: 2rem;
  }

  .links-container {
    padding-left: 1rem;
    padding-right: 1rem;
  }

  .links-table,
  .links-table thead,
  .links-table tbody,
  .links-table th,
  .links-table td,
  .links-table tr {
    display: block;
  }

  .links-table thead tr {
    left: -9999px;
    position: absolute;
    top: -9999px;
  }

  .links-table tr {
    border-bottom: 1px solid var(--border-subtle);
    margin-bottom: 1.5rem;
    padding-bottom: 0.5rem;
  }

  .links-table tr:last-child {
    margin-bottom: 0;
  }

  .links-table td {
    border-bottom: none;
    padding: 0.5rem 0;
  }

  .platform-cell,
  .description-cell,
  .url-cell {
    width: 100%;
  }

  .platform-cell {
    font-size: 1.1rem;
    padding-bottom: 0.2rem;
  }

  .description-cell {
    padding-bottom: 0.2rem;
    padding-top: 0.2rem;
  }

  .url-cell {
    padding-top: 0.2rem;
    text-align: left;
  }

  .url-cell a {
    display: inline-block;
    max-width: 100%;
    overflow-wrap: anywhere;
  }

  .archive-container {
    padding: 0.75rem;
  }

  .terminal-header h1 {
    font-size: 2rem;
  }

  .archive-title {
    font-size: 1.2rem;
  }

  .blog-entry {
    gap: 1rem;
    margin-bottom: 1rem;
  }

  .blog-date {
    font-size: 0.75rem;
  }

  .blog-title {
    font-size: 0.9rem;
    line-height: 1.4;
  }

  .blog-type {
    font-size: 0.65rem;
  }

  .year-separator {
    margin-left: 0;
  }

  .post-header h1,
  .post-header h2,
  .post-content h1 {
    font-size: 1.8em;
  }

  .post-content h2 {
    font-size: 1.5em;
  }

  .cert-badge {
    flex: 0 0 calc(50% - 1rem);
  }

  .annotations-container {
    position: relative;
    left: auto;
    right: auto;
    top: auto;
    width: 100%;
    margin-top: 20px;
    border-top: 1px dashed var(--border-subtle);
    padding-top: 15px;
  }

  .annotation {
    margin-left: 20px;
    padding-top: 8px;
    width: calc(100% - 20px);
    border-left: none;
    padding-left: 15px;
  }

  .annotation::before {
    display: none;
  }
}

@media (max-width: 1200px) {
  .cert-badge {
    flex: 0 0 calc(25% - 1rem);
  }
}

@media (max-width: 992px) {
  .cert-badge {
    flex: 0 0 calc(33.333% - 1rem);
  }
}

@media (max-width: 768px) {
  .cert-badge {
    flex: 0 0 calc(50% - 1rem);
  }
}

@media (max-width: 480px) {
  body {
    font-size: 13px;
  }

  nav a {
    font-size: 0.8rem;
    margin-right: 1.1rem;
  }

  .blog-entry {
    grid-template-columns: auto 1fr auto;
    gap: 0.75rem;
  }

  .cert-badge {
    flex: 0 0 100%;
  }
}
