/* 03.03.2026 */

/* =====================================
   Design Tokens
   ===================================== */

:root {
  --color-text:   #000;
  --color-muted:  #555;
  --color-subtle: #888;
  --color-border: #d9d9d9;
}

/* =====================================
   Basis-Layout & Typografie
   ===================================== */

main, section {
  margin: 0;
  padding: 0;
}

body {
  font-family: monospace;
  max-width: 700px;
  margin: 2rem auto;
  line-height: 1.6;
  padding: 0 1rem;
  background-color: #fff;
  color: var(--color-text);
}

p {
  margin-bottom: 1rem;
}

/* Logo: klickbarer Link, kein H1 notwendig */
.logo,
.logo:visited,
.logo:hover {
  font-family: 'Space Grotesk', sans-serif;
  font-weight: 700;
  font-size: 2rem;
  margin-bottom: 1rem;
  color: inherit;
  text-decoration: none;
}

/* =====================================
   Headings – global
   ===================================== */

h1 {
  font-size: 1.6rem;
  margin-top: 2.5rem;
  margin-bottom: 1.25rem;
}

h2 {
  font-size: 1.4rem;
  margin-top: 2.5rem;
  margin-bottom: 1rem;
}

h3 {
  font-size: 1.1rem;
  margin-top: 2rem;
  margin-bottom: 0.75rem;
}

h4 {
  font-size: 1rem;
  margin-top: 1.5rem;
  margin-bottom: 0.5rem;
}

/* Seitentitel-Untertitel */
.page-subtitle {
  margin-top: -0.75rem;
  margin-bottom: 2rem;
  opacity: 0.9;
}

/* Paper-Titel: nutzt globale H1-Definition, bekommt nur eine andere Schrift */
.paper-title {
  font-family: 'Space Grotesk', system-ui, sans-serif;
}

/* Abschnittstrenner */
hr {
  border: 0;
  border-top: 1px solid var(--color-border);
  margin: 1.5rem 0;
}

.footer-line {
  margin: 3rem 0 1rem;
}

/* =====================================
   Paper – leichte Essay-Optik
   ===================================== */

.paper-subtitle {
  font-size: 0.9rem;
  color: var(--color-muted);
  margin-bottom: 0.75rem;
  line-height: 1.4;
}

.paper-meta {
  margin-bottom: 1.5rem;
  color: var(--color-muted);
  font-size: 0.8rem;
}

.paper {
  border-left: 1px solid var(--color-border);
  padding-left: 1rem;
}

.paper p,
.paper ol,
.paper ul {
  margin-bottom: 1.1rem;
}

/* =====================================
   Links – global & Paper-spezifisch
   ===================================== */

a {
  color: blue;
  text-decoration: underline;
}

a:visited {
  color: purple;
}

a:hover {
  text-decoration: none;
}

/* Im Paper & in Fußnoten: neutral, wie Fließtext */
.paper a,
.footnotes a {
  color: inherit;
  text-decoration: none;
}

.paper a:hover,
.footnotes a:hover {
  text-decoration: underline;
}

/* =====================================
   Fußnoten
   ===================================== */

.footnotes-separator {
  margin-top: 3rem;
  margin-bottom: 1.5rem;
  border: none;
  border-top: 1px solid var(--color-border);
}

.footnotes {
  font-size: 0.75rem;
  line-height: 1.4;
  color: var(--color-muted);
  margin-top: 2.5rem;
}

.footnotes ol {
  padding-left: 1.2rem;
  margin: 0;
}

.footnotes li {
  overflow-wrap: anywhere;
  word-break: break-word;
}

.footnotes li + li {
  margin-top: 0.35rem;
}

/* =====================================
   Podcast
   ===================================== */

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

.podcast-entry {
  margin-bottom: 2.75rem;
}

.podcast-title {
  font-weight: normal;
  line-height: 1.4;
  display: inline-block;
}

.podcast-meta {
  margin-bottom: 0.75rem;
  color: var(--color-muted);
  font-size: 0.75rem;
  line-height: 1.4;
}

/* Einzelne Podcast-Episode */

.episode-title {
  font-size: 1.6rem;
  margin-bottom: 0.3rem;
}

.episode-meta {
  font-size: 0.9rem;
  opacity: 0.65;
  margin-bottom: 1.5rem;
}

.episode-player {
  margin-bottom: 2rem;
}

.episode-description p {
  margin-bottom: 1rem;
}

.episode-source {
  font-size: 0.75rem;
  color: var(--color-muted);
  margin-top: 0.3rem;
}

.episode-source a {
  color: inherit;
  text-decoration: none;
}

.episode-source a:hover {
  text-decoration: underline;
}

/* Episode-page headings: smaller than global h2/h3 to match body text rhythm */
.podcast-episode h2 {
  font-size: 1rem;
  margin-top: 2rem;
  margin-bottom: 0.25rem;
}

.podcast-episode h3 {
  font-size: 1rem;
  font-weight: normal;
  color: var(--color-muted);
  margin-top: 1.5rem;
  margin-bottom: 0.25rem;
}

/* Player fades in when animation completes */
.podcast-episode .episode-player {
  opacity: 0;
  transition: opacity 0.4s ease;
}

@media (prefers-reduced-motion: reduce) {
  .podcast-episode .episode-player {
    opacity: 1;
    transition: none;
  }
}

[data-bjolo="ready"] .podcast-episode .episode-player {
  opacity: 1;
}

/* =====================================
   Footer
   ===================================== */

footer {
  margin-top: 1.5rem;
  text-align: left;
  font-size: 0.75rem;
  color: var(--color-subtle);
}

footer p {
  margin: 0.2rem 0;
}

footer a,
footer a:visited {
  color: inherit;
  text-decoration: none;
}

footer a:hover {
  text-decoration: underline;
}

.copyright {
  color: var(--color-muted);
  margin-top: 0.5rem !important;
}

/* =====================================
   Terminal (Homepage & 404)
   ===================================== */

.home-terminal {
  margin-top: 1.5rem;
}

.t-line {
  font-family: monospace;
  line-height: 1.6;
  white-space: pre-wrap;
  word-break: break-all;
}

.t-line.t-cmd::before { content: '$ '; color: var(--color-subtle); }
.t-line.t-out { color: var(--color-muted); }
.t-line.t-err { color: #c00; }
.home-terminal p.t-err { color: #c00; }

.home-terminal .t-line {
  margin-bottom: 0.2rem;
}

.home-terminal .t-line.t-cmd {
  margin-top: 1.5rem;
}

.home-terminal .t-line:not(.t-cmd) {
  padding-left: 1.5rem;
}

/* Homepage terminal – static typed content */

.home-terminal p {
  margin-top: 0;
  margin-bottom: 0.2rem;
  overflow-wrap: anywhere;
}

.home-terminal p:not(.t-cmd) {
  padding-left: 1.5rem;
}

/* Entry slug lines: extra top margin groups entries visually */
.home-terminal p.t-entry {
  margin-top: 0.8rem;
}

/* First entry immediately after a command line: no extra gap */
.home-terminal p.t-cmd + p.t-entry {
  margin-top: 0;
}

.home-terminal p.t-cmd {
  margin-top: 2rem;
  margin-bottom: 0.15rem;
}

#ht-history > p.t-cmd:first-child {
  margin-top: 0;
}

.home-terminal p.t-cmd::before {
  content: '$ ';
  color: var(--color-subtle);
}

.home-terminal p.t-cmd a,
.home-terminal p.t-cmd a:visited {
  color: blue;
  text-decoration: none;
}

.home-terminal p.t-cmd a:hover {
  text-decoration: underline;
}

.home-terminal .t-muted {
  color: var(--color-muted);
}

.home-terminal .terminal-input-row {
  margin-top: 1.5rem;
}

.terminal-input-row {
  display: flex;
  align-items: center;
  gap: 0.3rem;
  margin-top: 0.25rem;
}

.terminal-input-row > span {
  font-family: monospace;
  user-select: none;
}

.terminal-input-row input {
  font-family: monospace;
  font-size: inherit;
  border: none;
  background: transparent;
  outline: none;
  flex: 1;
  color: var(--color-text);
  caret-color: var(--color-text);
  padding: 0;
}

/* =====================================
   Logo cursor blink
   ===================================== */

@keyframes logo-blink {
  0%, 100% { opacity: 1; }
  50%       { opacity: 0; }
}

.logo-cursor {
  animation: logo-blink 1s step-end infinite;
}

