/* Blog-specific styles (shared styles loaded from site_kit) */

/* Main content */
main {
  padding: 2rem 0 4rem;
}

/* Index page */
.post-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.post-list li {
  padding: 1.25rem 0;
  border-bottom: 1px solid var(--border);
}

.post-list li:last-child {
  border-bottom: none;
}

.post-list > li > a {
  color: var(--text);
  text-decoration: none;
  display: block;
}

.post-list > li > a:hover .post-title {
  color: var(--link);
}

.post-title {
  font-size: 1.2rem;
  font-weight: 600;
  margin: 0 0 0.25rem;
  transition: color 0.15s;
}

.post-date {
  font-size: 0.85rem;
  color: var(--text-muted);
}

.post-thumbnail {
  display: block;
  max-width: 100%;
  max-height: 200px;
  object-fit: cover;
  border-radius: 6px;
  margin-bottom: 0.5rem;
}

.post-excerpt {
  font-size: 0.95rem;
  color: var(--text-muted);
  margin-top: 0.3rem;
  line-height: 1.5;
}

/* Post page */
article h1 {
  font-size: 1.8rem;
  line-height: 1.3;
  margin: 0 0 0.5rem;
}

article .post-meta {
  color: var(--text-muted);
  font-size: 0.9rem;
  margin-bottom: 2rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--border);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
}

/* Video embeds */
.video-embed {
  position: relative;
  padding-bottom: 56.25%;
  height: 0;
  overflow: hidden;
  margin: 1em 0;
  border-radius: 4px;
}

.video-embed iframe {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
}

/* Audio / video figures (self-hosted media) */
.audio-figure,
.video-figure {
  margin: 1.5rem 0;
  text-align: center;
}

.audio-figure audio {
  width: 100%;
  max-width: 600px;
  display: block;
  margin: 0 auto;
}

.video-figure video {
  display: block;
  width: 100%;
  max-width: 100%;
  height: auto;
  margin: 0 auto;
  border-radius: 6px;
  background: #000;
}

.audio-figure figcaption,
.video-figure figcaption {
  font-size: 0.9rem;
  color: var(--text-muted);
  margin-top: 0.5rem;
  line-height: 1.4;
}

/* Comments */
.comments {
  margin-top: 3rem;
  padding-top: 2rem;
  border-top: 1px solid var(--border);
}

.comment {
  margin-bottom: 1.5rem;
  padding: 0.75em 1em;
  border-left: 4px solid var(--blockquote-border);
  background: var(--code-bg);
  border-radius: 0 4px 4px 0;
}

.comment-header {
  font-size: 0.9rem;
  margin-bottom: 0.4em;
}

/* Two-image side-by-side grid */
.image-grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  margin: 1.5rem 0;
}
.image-grid-2 figure {
  margin: 0;
  text-align: center;
}
.image-grid-2 img {
  width: 100%;
  height: auto;
  border-radius: 6px;
  background: #000;
}
.image-grid-2 figcaption {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-top: 0.4rem;
  line-height: 1.35;
}

/* Note / source boxes */
.note {
  margin: 1.5rem 0;
  padding: 0.75em 1.1em;
  border-left: 4px solid var(--blockquote-border);
  background: var(--code-bg);
  border-radius: 0 4px 4px 0;
}
.note p {
  margin: 0.4em 0;
}
.note p:first-child {
  margin-top: 0;
}
.note p:last-child {
  margin-bottom: 0;
}

.comment-date {
  color: var(--text-muted);
  font-size: 0.85rem;
}

.comment-body {
  line-height: 1.6;
}

/* Comment form */
.comment-form-wrapper h3 {
  margin-top: 2rem;
  margin-bottom: 0.75rem;
}

.comment-form-wrapper[data-endpoint=""] {
  display: none;
}

.comment-form .form-field {
  margin-bottom: 0.75rem;
}

.comment-form label {
  display: block;
  font-size: 0.9rem;
  margin-bottom: 0.25rem;
  color: var(--text-muted);
}

.comment-form input[type="text"],
.comment-form textarea {
  width: 100%;
  padding: 0.5em 0.75em;
  font-family: inherit;
  font-size: 0.95rem;
  color: var(--text);
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 4px;
  transition: border-color 0.15s;
}

.comment-form input[type="text"]:focus,
.comment-form textarea:focus {
  outline: none;
  border-color: var(--link);
}

.comment-form textarea {
  resize: vertical;
  min-height: 80px;
}

.comment-form button[type="submit"] {
  padding: 0.5em 1.5em;
  font-family: inherit;
  font-size: 0.95rem;
  color: #fff;
  background: var(--link);
  border: none;
  border-radius: 4px;
  cursor: pointer;
  transition: background 0.15s;
}

.comment-form button[type="submit"]:hover {
  background: var(--link-hover);
}

/* Honeypot field */
.hp-field {
  position: absolute;
  left: -9999px;
  height: 0;
  overflow: hidden;
  opacity: 0;
}

/* Responsive */
@media (max-width: 768px) {
  article h1 {
    font-size: 1.5rem;
  }
}

/* Interactive graph link chip (frontmatter: graph: files/.../*.html) */
.graph-link {
  display: inline-block;
  font-size: 0.8rem;
  padding: 0.12rem 0.6rem;
  margin-left: 0.35rem;
  border: 1px solid var(--link);
  border-radius: 999px;
  color: var(--link);
  text-decoration: none;
  transition: background 0.15s, color 0.15s;
}

.graph-link:hover {
  background: var(--link);
  color: var(--bg);
}

/* Reverse-interview question table
   Full-bleed on desktop, fixed column widths, sticky header, and a card
   reflow on narrow screens so long cells stay readable on mobile. */
.qtable-wrap {
  width: 100vw;
  position: relative;
  left: 50%;
  margin-left: -50vw;
  margin-right: -50vw;
  padding: 0 1rem;
  margin-top: 2rem;
  margin-bottom: 2.5rem;
}

.qtable {
  width: 100%;
  max-width: 1600px;
  margin: 0 auto;
  border-collapse: separate;
  border-spacing: 0;
  table-layout: fixed;
  font-size: 0.9rem;
  line-height: 1.5;
  border: 1px solid var(--border);
}

.qtable col.c-id   { width: 5%; }
.qtable col.c-q    { width: 33%; }
.qtable col.c-sig  { width: 11%; }
.qtable col.c-good { width: 25.5%; }
.qtable col.c-weak { width: 25.5%; }

.qtable th,
.qtable td {
  border: 0;
  border-right: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  padding: 0.55em 0.7em;
  text-align: left;
  vertical-align: top;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.qtable th:last-child,
.qtable td:last-child { border-right: none; }
.qtable tbody tr:last-child td { border-bottom: none; }

.qtable thead th {
  position: sticky;
  top: 3.7rem;
  z-index: 5;
  background: var(--header-bg);
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--text-muted);
  white-space: nowrap;
}

.qtable tr.group > th {
  background: var(--code-bg);
  font-size: 1rem;
  color: var(--text);
  border-right: none;
}
.qtable tr.cat > th {
  background: transparent;
  color: var(--text-muted);
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  border-right: none;
  padding-top: 0.9em;
}

.qtable .sig {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 600;
  padding: 0.05em 0.5em;
  border-radius: 999px;
  border: 1px solid var(--border);
  white-space: nowrap;
}
.qtable .sig-high { color: var(--text); border-color: var(--link); }
.qtable .sig-med  { color: var(--text-muted); }
.qtable .v {
  display: inline-block;
  font-size: 0.72rem;
  color: var(--text-muted);
  margin-top: 0.15em;
}
.qtable .fail {
  display: inline-block;
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.03em;
  padding: 0 0.4em;
  border-radius: 3px;
  background: var(--code-bg);
  border: 1px solid var(--border);
  color: var(--text-muted);
}

@media (max-width: 760px) {
  .qtable-wrap { padding: 0 0.75rem; }
  .qtable {
    display: block;
    max-width: none;
    border: none;
    table-layout: auto;
    font-size: 0.92rem;
  }
  .qtable colgroup,
  .qtable thead { display: none; }
  .qtable tbody { display: block; }

  .qtable tr.group,
  .qtable tr.cat {
    display: block;
    margin: 1.25rem 0 0.5rem;
  }
  .qtable tr.group > th {
    display: block;
    background: none;
    border: none;
    border-bottom: 2px solid var(--border);
    padding: 0;
    font-size: 1.1rem;
  }
  .qtable tr.cat > th {
    display: block;
    border: none;
    padding: 0;
  }

  .qtable tr:not(.group):not(.cat) {
    display: block;
    border: 1px solid var(--border);
    border-radius: 8px;
    margin-bottom: 0.85rem;
    overflow: hidden;
    background: var(--bg);
  }
  .qtable td {
    display: block;
    border: none;
    border-bottom: 1px solid var(--border);
    padding: 0.6em 0.8em;
  }
  .qtable td:last-child { border-bottom: none; }
  .qtable td::before {
    content: attr(data-label);
    display: block;
    font-size: 0.68rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-muted);
    margin-bottom: 0.2em;
  }
}

/* Foldable audience / category headings */
.qtable th.toggle {
  cursor: pointer;
  user-select: none;
}
.qtable th.toggle:hover {
  background: var(--border);
}
.qtable th.toggle:focus-visible {
  outline: 2px solid var(--link);
  outline-offset: -2px;
}
.qtable .caret {
  display: inline-block;
  width: 0;
  height: 0;
  margin-right: 0.55em;
  border-top: 5px solid transparent;
  border-bottom: 5px solid transparent;
  border-left: 6px solid currentColor;
  transition: transform 0.15s ease;
  vertical-align: middle;
}
.qtable tr.open > th .caret {
  transform: rotate(90deg);
}
.qtable tr[hidden] {
  display: none !important;
}

/* Pygments - light */
pre { line-height: 125%; }
td.linenos .normal { color: inherit; background-color: transparent; padding-left: 5px; padding-right: 5px; }
span.linenos { color: inherit; background-color: transparent; padding-left: 5px; padding-right: 5px; }
td.linenos .special { color: #000000; background-color: #ffffc0; padding-left: 5px; padding-right: 5px; }
span.linenos.special { color: #000000; background-color: #ffffc0; padding-left: 5px; padding-right: 5px; }
.highlight .hll { background-color: #ffffcc }
.highlight { background: #f8f8f8; }
.highlight .c { color: #3D7B7B; font-style: italic } /* Comment */
.highlight .err { border: 1px solid #F00 } /* Error */
.highlight .k { color: #008000; font-weight: bold } /* Keyword */
.highlight .o { color: #666 } /* Operator */
.highlight .ch { color: #3D7B7B; font-style: italic } /* Comment.Hashbang */
.highlight .cm { color: #3D7B7B; font-style: italic } /* Comment.Multiline */
.highlight .cp { color: #9C6500 } /* Comment.Preproc */
.highlight .cpf { color: #3D7B7B; font-style: italic } /* Comment.PreprocFile */
.highlight .c1 { color: #3D7B7B; font-style: italic } /* Comment.Single */
.highlight .cs { color: #3D7B7B; font-style: italic } /* Comment.Special */
.highlight .gd { color: #A00000 } /* Generic.Deleted */
.highlight .ge { font-style: italic } /* Generic.Emph */
.highlight .ges { font-weight: bold; font-style: italic } /* Generic.EmphStrong */
.highlight .gr { color: #E40000 } /* Generic.Error */
.highlight .gh { color: #000080; font-weight: bold } /* Generic.Heading */
.highlight .gi { color: #008400 } /* Generic.Inserted */
.highlight .go { color: #717171 } /* Generic.Output */
.highlight .gp { color: #000080; font-weight: bold } /* Generic.Prompt */
.highlight .gs { font-weight: bold } /* Generic.Strong */
.highlight .gu { color: #800080; font-weight: bold } /* Generic.Subheading */
.highlight .gt { color: #04D } /* Generic.Traceback */
.highlight .kc { color: #008000; font-weight: bold } /* Keyword.Constant */
.highlight .kd { color: #008000; font-weight: bold } /* Keyword.Declaration */
.highlight .kn { color: #008000; font-weight: bold } /* Keyword.Namespace */
.highlight .kp { color: #008000 } /* Keyword.Pseudo */
.highlight .kr { color: #008000; font-weight: bold } /* Keyword.Reserved */
.highlight .kt { color: #B00040 } /* Keyword.Type */
.highlight .m { color: #666 } /* Literal.Number */
.highlight .s { color: #BA2121 } /* Literal.String */
.highlight .na { color: #687822 } /* Name.Attribute */
.highlight .nb { color: #008000 } /* Name.Builtin */
.highlight .nc { color: #00F; font-weight: bold } /* Name.Class */
.highlight .no { color: #800 } /* Name.Constant */
.highlight .nd { color: #A2F } /* Name.Decorator */
.highlight .ni { color: #717171; font-weight: bold } /* Name.Entity */
.highlight .ne { color: #CB3F38; font-weight: bold } /* Name.Exception */
.highlight .nf { color: #00F } /* Name.Function */
.highlight .nl { color: #767600 } /* Name.Label */
.highlight .nn { color: #00F; font-weight: bold } /* Name.Namespace */
.highlight .nt { color: #008000; font-weight: bold } /* Name.Tag */
.highlight .nv { color: #19177C } /* Name.Variable */
.highlight .ow { color: #A2F; font-weight: bold } /* Operator.Word */
.highlight .w { color: #BBB } /* Text.Whitespace */
.highlight .mb { color: #666 } /* Literal.Number.Bin */
.highlight .mf { color: #666 } /* Literal.Number.Float */
.highlight .mh { color: #666 } /* Literal.Number.Hex */
.highlight .mi { color: #666 } /* Literal.Number.Integer */
.highlight .mo { color: #666 } /* Literal.Number.Oct */
.highlight .sa { color: #BA2121 } /* Literal.String.Affix */
.highlight .sb { color: #BA2121 } /* Literal.String.Backtick */
.highlight .sc { color: #BA2121 } /* Literal.String.Char */
.highlight .dl { color: #BA2121 } /* Literal.String.Delimiter */
.highlight .sd { color: #BA2121; font-style: italic } /* Literal.String.Doc */
.highlight .s2 { color: #BA2121 } /* Literal.String.Double */
.highlight .se { color: #AA5D1F; font-weight: bold } /* Literal.String.Escape */
.highlight .sh { color: #BA2121 } /* Literal.String.Heredoc */
.highlight .si { color: #A45A77; font-weight: bold } /* Literal.String.Interpol */
.highlight .sx { color: #008000 } /* Literal.String.Other */
.highlight .sr { color: #A45A77 } /* Literal.String.Regex */
.highlight .s1 { color: #BA2121 } /* Literal.String.Single */
.highlight .ss { color: #19177C } /* Literal.String.Symbol */
.highlight .bp { color: #008000 } /* Name.Builtin.Pseudo */
.highlight .fm { color: #00F } /* Name.Function.Magic */
.highlight .vc { color: #19177C } /* Name.Variable.Class */
.highlight .vg { color: #19177C } /* Name.Variable.Global */
.highlight .vi { color: #19177C } /* Name.Variable.Instance */
.highlight .vm { color: #19177C } /* Name.Variable.Magic */
.highlight .il { color: #666 } /* Literal.Number.Integer.Long */

/* Pygments - dark */
pre { line-height: 125%; }
td.linenos .normal { color: inherit; background-color: transparent; padding-left: 5px; padding-right: 5px; }
span.linenos { color: inherit; background-color: transparent; padding-left: 5px; padding-right: 5px; }
td.linenos .special { color: #000000; background-color: #ffffc0; padding-left: 5px; padding-right: 5px; }
span.linenos.special { color: #000000; background-color: #ffffc0; padding-left: 5px; padding-right: 5px; }
[data-theme="dark"] .highlight .hll { background-color: #49483e }
[data-theme="dark"] .highlight { background: #272822; color: #F8F8F2 }
[data-theme="dark"] .highlight .c { color: #959077 } /* Comment */
[data-theme="dark"] .highlight .err { color: #ED007E; background-color: #1E0010 } /* Error */
[data-theme="dark"] .highlight .esc { color: #F8F8F2 } /* Escape */
[data-theme="dark"] .highlight .g { color: #F8F8F2 } /* Generic */
[data-theme="dark"] .highlight .k { color: #66D9EF } /* Keyword */
[data-theme="dark"] .highlight .l { color: #AE81FF } /* Literal */
[data-theme="dark"] .highlight .n { color: #F8F8F2 } /* Name */
[data-theme="dark"] .highlight .o { color: #FF4689 } /* Operator */
[data-theme="dark"] .highlight .x { color: #F8F8F2 } /* Other */
[data-theme="dark"] .highlight .p { color: #F8F8F2 } /* Punctuation */
[data-theme="dark"] .highlight .ch { color: #959077 } /* Comment.Hashbang */
[data-theme="dark"] .highlight .cm { color: #959077 } /* Comment.Multiline */
[data-theme="dark"] .highlight .cp { color: #959077 } /* Comment.Preproc */
[data-theme="dark"] .highlight .cpf { color: #959077 } /* Comment.PreprocFile */
[data-theme="dark"] .highlight .c1 { color: #959077 } /* Comment.Single */
[data-theme="dark"] .highlight .cs { color: #959077 } /* Comment.Special */
[data-theme="dark"] .highlight .gd { color: #FF4689 } /* Generic.Deleted */
[data-theme="dark"] .highlight .ge { color: #F8F8F2; font-style: italic } /* Generic.Emph */
[data-theme="dark"] .highlight .ges { color: #F8F8F2; font-weight: bold; font-style: italic } /* Generic.EmphStrong */
[data-theme="dark"] .highlight .gr { color: #FF4689 } /* Generic.Error */
[data-theme="dark"] .highlight .gh { color: #F8F8F2 } /* Generic.Heading */
[data-theme="dark"] .highlight .gi { color: #A6E22E } /* Generic.Inserted */
[data-theme="dark"] .highlight .go { color: #66D9EF } /* Generic.Output */
[data-theme="dark"] .highlight .gp { color: #FF4689; font-weight: bold } /* Generic.Prompt */
[data-theme="dark"] .highlight .gs { color: #F8F8F2; font-weight: bold } /* Generic.Strong */
[data-theme="dark"] .highlight .gu { color: #959077 } /* Generic.Subheading */
[data-theme="dark"] .highlight .gt { color: #66D9EF } /* Generic.Traceback */
[data-theme="dark"] .highlight .kc { color: #66D9EF } /* Keyword.Constant */
[data-theme="dark"] .highlight .kd { color: #66D9EF } /* Keyword.Declaration */
[data-theme="dark"] .highlight .kn { color: #FF4689 } /* Keyword.Namespace */
[data-theme="dark"] .highlight .kp { color: #66D9EF } /* Keyword.Pseudo */
[data-theme="dark"] .highlight .kr { color: #66D9EF } /* Keyword.Reserved */
[data-theme="dark"] .highlight .kt { color: #66D9EF } /* Keyword.Type */
[data-theme="dark"] .highlight .ld { color: #E6DB74 } /* Literal.Date */
[data-theme="dark"] .highlight .m { color: #AE81FF } /* Literal.Number */
[data-theme="dark"] .highlight .s { color: #E6DB74 } /* Literal.String */
[data-theme="dark"] .highlight .na { color: #A6E22E } /* Name.Attribute */
[data-theme="dark"] .highlight .nb { color: #A6E22E } /* Name.Builtin */
[data-theme="dark"] .highlight .nc { color: #A6E22E } /* Name.Class */
[data-theme="dark"] .highlight .no { color: #66D9EF } /* Name.Constant */
[data-theme="dark"] .highlight .nd { color: #A6E22E } /* Name.Decorator */
[data-theme="dark"] .highlight .ni { color: #F8F8F2 } /* Name.Entity */
[data-theme="dark"] .highlight .ne { color: #A6E22E } /* Name.Exception */
[data-theme="dark"] .highlight .nf { color: #A6E22E } /* Name.Function */
[data-theme="dark"] .highlight .nl { color: #F8F8F2 } /* Name.Label */
[data-theme="dark"] .highlight .nn { color: #F8F8F2 } /* Name.Namespace */
[data-theme="dark"] .highlight .nx { color: #A6E22E } /* Name.Other */
[data-theme="dark"] .highlight .py { color: #F8F8F2 } /* Name.Property */
[data-theme="dark"] .highlight .nt { color: #FF4689 } /* Name.Tag */
[data-theme="dark"] .highlight .nv { color: #F8F8F2 } /* Name.Variable */
[data-theme="dark"] .highlight .ow { color: #FF4689 } /* Operator.Word */
[data-theme="dark"] .highlight .pm { color: #F8F8F2 } /* Punctuation.Marker */
[data-theme="dark"] .highlight .w { color: #F8F8F2 } /* Text.Whitespace */
[data-theme="dark"] .highlight .mb { color: #AE81FF } /* Literal.Number.Bin */
[data-theme="dark"] .highlight .mf { color: #AE81FF } /* Literal.Number.Float */
[data-theme="dark"] .highlight .mh { color: #AE81FF } /* Literal.Number.Hex */
[data-theme="dark"] .highlight .mi { color: #AE81FF } /* Literal.Number.Integer */
[data-theme="dark"] .highlight .mo { color: #AE81FF } /* Literal.Number.Oct */
[data-theme="dark"] .highlight .sa { color: #E6DB74 } /* Literal.String.Affix */
[data-theme="dark"] .highlight .sb { color: #E6DB74 } /* Literal.String.Backtick */
[data-theme="dark"] .highlight .sc { color: #E6DB74 } /* Literal.String.Char */
[data-theme="dark"] .highlight .dl { color: #E6DB74 } /* Literal.String.Delimiter */
[data-theme="dark"] .highlight .sd { color: #E6DB74 } /* Literal.String.Doc */
[data-theme="dark"] .highlight .s2 { color: #E6DB74 } /* Literal.String.Double */
[data-theme="dark"] .highlight .se { color: #AE81FF } /* Literal.String.Escape */
[data-theme="dark"] .highlight .sh { color: #E6DB74 } /* Literal.String.Heredoc */
[data-theme="dark"] .highlight .si { color: #E6DB74 } /* Literal.String.Interpol */
[data-theme="dark"] .highlight .sx { color: #E6DB74 } /* Literal.String.Other */
[data-theme="dark"] .highlight .sr { color: #E6DB74 } /* Literal.String.Regex */
[data-theme="dark"] .highlight .s1 { color: #E6DB74 } /* Literal.String.Single */
[data-theme="dark"] .highlight .ss { color: #E6DB74 } /* Literal.String.Symbol */
[data-theme="dark"] .highlight .bp { color: #A6E22E } /* Name.Builtin.Pseudo */
[data-theme="dark"] .highlight .fm { color: #A6E22E } /* Name.Function.Magic */
[data-theme="dark"] .highlight .vc { color: #F8F8F2 } /* Name.Variable.Class */
[data-theme="dark"] .highlight .vg { color: #F8F8F2 } /* Name.Variable.Global */
[data-theme="dark"] .highlight .vi { color: #F8F8F2 } /* Name.Variable.Instance */
[data-theme="dark"] .highlight .vm { color: #F8F8F2 } /* Name.Variable.Magic */
[data-theme="dark"] .highlight .il { color: #AE81FF } /* Literal.Number.Integer.Long */
