/* dariohug.ch — one small stylesheet, text-first and deliberately plain. */

:root {
  --maxw: 46rem;
  --fg: #1a1a1a;
  --muted: #666;
  --rule: #ddd;
  --link: #0b5cab;
  --bg: #ffffff;
  --code-bg: #f6f6f6;
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  color: var(--fg);
  background: var(--bg);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica,
    Arial, sans-serif;
  font-size: 18px;
  line-height: 1.6;
}

/* Centered single column for everything. */
.site-header,
.content,
.site-footer { max-width: var(--maxw); margin-inline: auto; padding: 0 1.25rem; }

/* Header & navigation */
.site-header {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.5rem 1.5rem;
  padding-top: 1.5rem;
  padding-bottom: 1rem;
  margin-bottom: 2rem;
  border-bottom: 1px solid var(--rule);
}
.site-title {
  font-weight: 700;
  font-size: 1.3rem;
  text-decoration: none;
  color: var(--fg);
}
.site-nav { display: flex; flex-wrap: wrap; gap: 1.1rem; }
.site-nav a { text-decoration: none; color: var(--muted); }
.site-nav a:hover { color: var(--link); }
.site-nav a.active { color: var(--fg); font-weight: 600; }

/* Links & typography */
a { color: var(--link); }
a:hover { color: #08406f; }

.content { min-height: 60vh; }

.prose h1 { font-size: 1.7rem; line-height: 1.25; margin: 0 0 0.75rem; }
.prose h2 { font-size: 1.3rem; margin-top: 2rem; }
.prose h3 { font-size: 1.1rem; margin-top: 1.5rem; }
.prose p, .prose ul, .prose ol { margin: 0 0 1rem; }
.prose img { max-width: 100%; height: auto; }
.prose blockquote {
  margin: 1rem 0;
  padding-left: 1rem;
  border-left: 3px solid var(--rule);
  color: var(--muted);
}
hr { border: 0; border-top: 1px solid var(--rule); margin: 2rem 0; }

/* Code */
code, pre, .highlight {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.9em;
}
code { background: var(--code-bg); padding: 0.1em 0.3em; border-radius: 3px; }
pre, .highlight {
  background: var(--code-bg);
  padding: 0.9rem 1rem;
  border-radius: 4px;
  overflow-x: auto;
}
pre code, .highlight code { background: none; padding: 0; }

/* Blog / post lists */
.post-list { list-style: none; padding: 0; }
.post-list li { margin-bottom: 1.1rem; }
.post-list .date { color: var(--muted); font-variant-numeric: tabular-nums; margin-right: 0.6rem; }
.post-list .summary { margin: 0.2rem 0 0; color: var(--muted); font-size: 0.95rem; }
.post .meta, .home-posts h2 { color: var(--muted); }
.post .meta { font-size: 0.95rem; margin-top: -0.3rem; }
.post .back { margin-top: 2.5rem; }
.home-posts { margin-top: 2.5rem; border-top: 1px solid var(--rule); padding-top: 1rem; }

/* Documents: breadcrumbs, folder list, file table */
.breadcrumbs { font-size: 0.9rem; color: var(--muted); margin-bottom: 0.5rem; }
.breadcrumbs a { text-decoration: none; }

.folder-list { list-style: none; padding: 0; }
.folder-list li { padding: 0.35rem 0; border-bottom: 1px solid var(--rule); }
.folder-list a { font-weight: 600; text-decoration: none; }
.folder-list .count { color: var(--muted); font-size: 0.85rem; margin-left: 0.5rem; }

table.file-list { width: 100%; border-collapse: collapse; margin: 1rem 0; }
table.file-list th, table.file-list td {
  text-align: left;
  padding: 0.4rem 0.6rem;
  border-bottom: 1px solid var(--rule);
}
table.file-list th { color: var(--muted); font-weight: 600; font-size: 0.85rem; }
table.file-list td:nth-child(2),
table.file-list td:nth-child(3) { color: var(--muted); font-size: 0.9rem; white-space: nowrap; }

/* File viewer */
.file-view .actions { color: var(--muted); }
.pdf-embed { margin-top: 1rem; }
.pdf-embed embed { width: 100%; height: 80vh; border: 1px solid var(--rule); }

/* Theatre: responsive YouTube embeds */
.videos { display: grid; gap: 1.8rem; margin-top: 1.5rem; }
.video { margin: 0; }
.video-embed { position: relative; aspect-ratio: 16 / 9; background: #000; }
.video-embed iframe {
  position: absolute; inset: 0; width: 100%; height: 100%; border: 0;
}
.video figcaption { margin-top: 0.5rem; color: var(--muted); font-size: 0.95rem; }

/* Footer */
.site-footer {
  margin-top: 4rem;
  padding-top: 1rem;
  padding-bottom: 2.5rem;
  border-top: 1px solid var(--rule);
  color: var(--muted);
  font-size: 0.9rem;
}
.site-footer p { margin: 0.2rem 0; }

@media (max-width: 480px) {
  body { font-size: 17px; }
  .site-header { flex-direction: column; gap: 0.4rem; }
}
