/* Custom styles extending LaTeX.css */

/* Layout & Horizontal Spacing for Larger Screens */
html {
  overflow-x: hidden;
}

body {
  overflow-x: visible;
  max-width: 85ch;
  width: 100%;
}

@media (min-width: 1050px) {
  body {
    max-width: 52vw;
    width: 100%;
  }
}

/* Navigation & Header */
header {
  margin-bottom: 2rem;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid #e0e0e0;
}

header nav ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  gap: 1.5rem;
}

header nav ul li {
  display: inline-block;
  margin: 0;
}

header nav ul li.page-links::before {
  content: none;
}

header nav ul li a {
  text-decoration: none;
  font-weight: 500;
  font-size: 1.05rem;
}

header nav ul li a:hover {
  text-decoration: underline;
}

/* Footer */
footer {
  margin-top: 3rem;
  padding: 1.5rem 0;
  text-align: center;
  border-top: 1px solid #e0e0e0;
  font-size: 0.9rem;
  color: #666;
  clear: both;
}

/* Author metadata on single posts */
.author {
  margin: 0.85rem 0 1.5rem 0;
  font-variant-caps: small-caps;
  text-align: center;
  color: #555;
  line-height: 1.6;
}

.author a {
  text-decoration: none;
}

.author a:hover {
  text-decoration: underline;
}

.author-sep {
  color: #999;
  margin: 0 0.35rem;
}

/* Recent posts list */
.recent-posts {
  list-style: none;
  padding-left: 0;
}

.recent-posts li {
  margin-bottom: 0.75rem;
}

.recent-posts li a {
  font-weight: 500;
}

.recent-posts .post-date {
  color: #777;
  font-size: 0.9rem;
  margin-left: 0.5rem;
}

/* Publication list */
.publication-list {
  list-style: none;
  padding-left: 0;
}

.publication-list li {
  margin-bottom: 1.25rem;
  line-height: 1.6;
}

/* ============================================================
   TrojanStego & Interactive Explainer Styles
   ============================================================ */

/* Interactive Threat Model Diagram */
.diagram-container {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  margin: 2rem 0;
  border: 1px solid #d0d7de;
  border-radius: 6px;
  padding: 1.25rem;
  background-color: #fcfcfc;
}

@media (min-width: 768px) {
  .diagram-container {
    flex-direction: row;
    justify-content: space-between;
  }
  .diagram-column {
    width: 48%;
  }
}

.diagram-column h3 {
  text-align: center;
  border-bottom: 1px solid #d0d7de;
  margin-top: 0;
  padding-bottom: 0.5rem;
  font-size: 1.15rem;
}

.node {
  border: 1px solid #c0c0c0;
  border-radius: 4px;
  background: #ffffff;
  padding: 0.9rem;
  margin-bottom: 1rem;
}

.node-dashed {
  border-style: dashed;
  color: #555;
  background: #fafafa;
}

.node h4 {
  margin-top: 0;
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  border-bottom: 1px dashed #d0d7de;
  padding-bottom: 0.2rem;
  color: #333;
}

.code-block-small {
  background: #f4f4f4;
  border: 1px solid #ddd;
  border-radius: 3px;
  padding: 0.4rem 0.6rem;
  font-family: Menlo, Monaco, Consolas, monospace;
  font-size: 0.85em;
  white-space: pre-wrap;
  margin-top: 0.5rem;
}

.blur-text {
  filter: blur(4px);
  transition: filter 0.3s ease;
  cursor: pointer;
  background: #ffebe9;
  padding: 0 4px;
  border-radius: 2px;
}

.blur-text:hover {
  filter: blur(0);
}

/* Simulation Panel */
.simulation-panel {
  border: 1px solid #d0d7de;
  border-radius: 6px;
  padding: 1.5rem;
  margin: 1.5rem 0;
  background-color: #f9f9f9;
}

.simulation-panel h3 {
  margin-top: 0;
}

.controls {
  margin-bottom: 1rem;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.controls select,
.controls button {
  font-size: 0.95rem;
  padding: 0.35rem 0.75rem;
  font-family: inherit;
  border: 1px solid #bbb;
  border-radius: 4px;
}

.controls button {
  cursor: pointer;
  background-color: #f0f0f0;
  font-weight: 500;
  transition: background-color 0.2s ease;
}

.controls button:hover {
  background-color: #e0e0e0;
}

.output-box {
  background: #fff;
  border: 1px solid #bbb;
  border-radius: 4px;
  padding: 1rem;
  min-height: 4rem;
  font-size: 1.05rem;
  line-height: 1.7;
  margin-top: 0.75rem;
}

.bit-display {
  font-family: Menlo, Monaco, Consolas, monospace;
  font-size: 1.15em;
  letter-spacing: 2px;
  margin: 0.5rem 0;
  padding: 0.5rem;
  background: #fff;
  border: 1px solid #e0e0e0;
  border-radius: 4px;
  text-align: center;
}

/* Token Parity Highlights */
.highlight-even {
  background-color: #e0f2fe;
  border-bottom: 2px solid #0284c7;
  padding: 0 3px;
  border-radius: 2px;
}

.highlight-odd {
  background-color: #fef3c7;
  border-bottom: 2px solid #d97706;
  padding: 0 3px;
  border-radius: 2px;
}

.legend {
  display: flex;
  justify-content: center;
  gap: 2rem;
  margin-top: 1rem;
  font-size: 0.9em;
}

.legend span {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}

.color-box {
  width: 1rem;
  height: 1rem;
  display: inline-block;
  border-radius: 2px;
}

.color-box.even {
  background-color: #e0f2fe;
  border: 1px solid #0284c7;
}

.color-box.odd {
  background-color: #fef3c7;
  border: 1px solid #d97706;
}

/* Evaluation Taxonomy Grid */
.taxonomy-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.25rem;
  margin-top: 1.5rem;
}

@media (min-width: 768px) {
  .taxonomy-grid {
    grid-template-columns: 1fr 1fr 1fr;
  }
}

.taxonomy-card {
  border: 1px solid #d0d7de;
  border-radius: 6px;
  padding: 1.1rem;
  background: #ffffff;
}

.taxonomy-card h3 {
  margin-top: 0;
  font-size: 1.1rem;
  border-bottom: 1px solid #eee;
  padding-bottom: 0.5rem;
}

.taxonomy-card ul {
  padding-left: 1.2rem;
  margin-top: 0.5rem;
}

.taxonomy-card li {
  margin-bottom: 0.5rem;
  font-size: 0.95rem;
}