/* gauland.de — static site styles */

:root {
  --max-width: 720px;
  --bg: #121212;
  --fg: #eaeaea;
  --muted: #9a9a9a;
  --accent: #5aa9ef;
  --border: #2a2a2a;
  --card-bg: #1b1b1b;
  --code-bg: #1e1e1e;
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --font-mono: "SFMono-Regular", Consolas, "Liberation Mono", Menlo, monospace;
  color-scheme: dark;
}

* { box-sizing: border-box; }

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

body {
  margin: 0;
  font-family: var(--font);
  font-size: 18px;
  line-height: 1.65;
  color: var(--fg);
  background: var(--bg);
  transition: background-color 0.2s ease, color 0.2s ease;
}

.container {
  width: 100%;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 1.25rem;
}

a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }

/* ── Header ── */
.site-header {
  border-bottom: 1px solid var(--border);
  padding: 2rem 0 1.25rem;
}

.site-header__bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.site-title {
  display: inline-block;
  font-size: 1.6rem;
  font-weight: 700;
  color: var(--fg);
}

.site-tagline {
  margin: 0.25rem 0 1rem;
  color: var(--muted);
  font-size: 0.95rem;
}

.site-nav ul {
  display: flex;
  flex-wrap: wrap;
  gap: 1.25rem;
  list-style: none;
  margin: 0;
  padding: 0;
}

.site-nav a {
  color: var(--fg);
  font-weight: 500;
}

.site-nav a[aria-current="page"] { color: var(--accent); }

/* ── Main ── */
/* `main.container` (not just `main`) so this beats the `.container` padding
   rule above, which otherwise wins on specificity and zeroes the top gap. */
main.container { padding-top: 4.5rem; padding-bottom: 3rem; }

.page-title {
  font-size: 1.35rem;
  margin: 0 0 1.5rem;
}

/* ── Post list (blog index) ── */
.post-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 1.25rem;
}

.post-card {
  border: 1px solid var(--border);
  background: var(--card-bg);
  border-radius: 10px;
  padding: 0 0 1.25rem;
  overflow: hidden;
}

.post-card__cover {
  display: block;
  line-height: 0;
}

.post-card__cover img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 2 / 1;
  object-fit: cover;
  border-bottom: 1px solid var(--border);
  transition: transform 0.3s ease;
}

.post-card:hover .post-card__cover img { transform: scale(1.03); }

.post-card > :not(.post-card__cover) {
  margin-left: 1.5rem;
  margin-right: 1.5rem;
}

.post-card__title {
  margin: 1.1rem 0 0.35rem;
  font-size: 1.25rem;
  line-height: 1.3;
}

.post-card__meta {
  margin: 0 0 0.75rem;
  color: var(--muted);
  font-size: 0.85rem;
}

.post-card__excerpt { margin: 0 0 0.75rem; }

.post-card__more { font-weight: 600; font-size: 0.95rem; }

/* ── Single post ── */
.post-hero {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 2 / 1;
  object-fit: cover;
  border: 1px solid var(--border);
  border-radius: 12px;
  margin: 0 0 1.75rem;
}

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

.post-header h1 {
  font-size: 1.8rem;
  line-height: 1.25;
  margin: 0 0 0.5rem;
}

.post-meta {
  color: var(--muted);
  font-size: 0.85rem;
  margin: 0 0 0.5rem;
}

.post-tags { margin: 0.5rem 0 0; }

.tag {
  display: inline-block;
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 0.1rem 0.5rem;
  font-size: 0.8rem;
  color: var(--muted);
  margin-right: 0.35rem;
}

.post-content { max-width: 100%; }

.post-content h2 {
  font-size: 1.35rem;
  margin: 2rem 0 0.75rem;
}

.post-content h3 {
  font-size: 1.1rem;
  margin: 1.5rem 0 0.5rem;
}

.post-content p { margin: 0 0 1rem; }

.post-content ul,
.post-content ol {
  margin: 0 0 1rem;
  padding-left: 1.5rem;
}

.post-content li { margin-bottom: 0.3rem; }

.post-content pre {
  background: var(--code-bg);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 1rem 1.25rem;
  overflow-x: auto;
  margin: 0 0 1.25rem;
  font-size: 0.88rem;
  line-height: 1.55;
}

.post-content code {
  font-family: var(--font-mono);
  font-size: 0.9em;
  background: var(--code-bg);
  border: 1px solid var(--border);
  border-radius: 3px;
  padding: 0.1em 0.35em;
}

.post-content pre code {
  background: none;
  border: none;
  padding: 0;
  font-size: inherit;
}

.post-back {
  display: inline-block;
  margin-bottom: 1.5rem;
  font-size: 0.9rem;
}

/* ── About page ── */
.about-portrait {
  display: block;
  width: 100%;
  height: auto;
  border: 1px solid var(--border);
  border-radius: 12px;
  margin: 0 0 2rem;
}

.about-section { margin-bottom: 2.5rem; }

.about-section h2 {
  font-size: 1.2rem;
  margin: 0 0 0.75rem;
  color: var(--fg);
}

.about-section p { margin: 0 0 0.75rem; }

.about-section ul {
  margin: 0 0 0.75rem;
  padding-left: 1.5rem;
}

/* ── Contact ── */
.contact-body { max-width: 480px; }
.contact-body p { margin: 0 0 1rem; }

/* ── Footer ── */
.site-footer {
  border-top: 1px solid var(--border);
  padding: 1.5rem 0 2.5rem;
  color: var(--muted);
  font-size: 0.9rem;
}

.site-footer a { color: var(--muted); }
.site-footer a:hover { color: var(--accent); }

/* ── Prose (privacy policy etc.) ── */
.prose h2 { font-size: 1.2rem; margin: 2rem 0 0.6rem; }
.prose h3 { font-size: 1rem; margin: 1.25rem 0 0.4rem; }
.prose p { margin: 0 0 0.9rem; }
.prose ul { margin: 0 0 0.9rem; padding-left: 1.5rem; }
.prose li { margin-bottom: 0.3rem; }
