:root {
  --bg: #05060a;
  --surface: #0f1118;
  --accent: #f9c74f;
  --muted: #a0a3b1;
  --text: #f4f5fb;
  font-family: 'Space Grotesk', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

* { box-sizing: border-box; }

img.emoji {
  height: 1em;
  width: 1em;
  margin: 0 0.05em 0 0.1em;
  vertical-align: -0.1em;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
}

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

.site-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1.5rem 5vw;
  border-bottom: 1px solid rgba(255,255,255,0.05);
}

.logo a { font-size: 1.25rem; font-weight: 600; color: var(--text); }
.tagline { display: block; font-size: 0.75rem; color: var(--muted); }

nav a { margin-left: 1rem; color: var(--muted); font-size: 0.9rem; }
nav a:hover { color: var(--text); }

main { padding: 2rem 5vw 4rem; }

.hero {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 2rem;
  align-items: center;
  margin-bottom: 3rem;
}

.hero-media img {
  width: 100%;
  border-radius: 1rem;
  object-fit: cover;
  box-shadow: 0 20px 40px rgba(0,0,0,0.4);
}

.eyebrow {
  text-transform: uppercase;
  font-size: 0.75rem;
  letter-spacing: 0.08em;
  color: var(--muted);
  margin-bottom: 0.5rem;
}

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.5rem;
}

.card {
  padding: 1.5rem;
  border-radius: 1rem;
  background: var(--surface);
  border: 1px solid rgba(255,255,255,0.05);
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.cta {
  margin-top: 3rem;
  padding: 2rem;
  background: linear-gradient(135deg, rgba(249,199,79,0.1), rgba(249,199,79,0.02));
  border-radius: 1rem;
}

.page-header { margin-bottom: 2rem; }
.summary { color: var(--muted); }

.stack { display: flex; flex-direction: column; gap: 1rem; }

.post .body { line-height: 1.6; color: var(--muted); }
.prose { line-height: 1.8; color: var(--muted); }
.prose h1, .prose h2, .prose h3 { color: var(--text); margin-top: 1.5em; }
.prose pre { background: var(--surface); padding: 1rem; border-radius: 0.5rem; overflow-x: auto; }
.prose code { background: var(--surface); padding: 0.15em 0.4em; border-radius: 0.25em; font-size: 0.9em; }
.prose pre code { background: none; padding: 0; }
.prose img { max-width: 100%; border-radius: 0.5rem; }
.prose blockquote { border-left: 3px solid var(--accent); margin-left: 0; padding-left: 1rem; color: var(--muted); }
.prose table { border-collapse: collapse; width: 100%; }
.prose th, .prose td { border: 1px solid rgba(255,255,255,0.1); padding: 0.5rem; }

.hedgedoc-field { display: flex; gap: 0.5rem; align-items: center; }
.hedgedoc-field input { flex: 1; }
.btn-sm { font-size: 0.8rem; padding: 0.3rem 0.6rem; white-space: nowrap; }
.hint { font-size: 0.8rem; color: var(--muted); margin-top: -0.5rem; }
.link-sm { font-size: 0.8rem; }

footer {
  text-align: center;
  padding: 2rem;
  border-top: 1px solid rgba(255,255,255,0.05);
  color: var(--muted);
}

.admin .card { background: rgba(255,255,255,0.03); }
.admin-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 1.5rem;
}
.card-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 1rem; }

.btn {
  background: var(--accent);
  color: #1c1301;
  padding: 0.4rem 0.9rem;
  border-radius: 999px;
  font-weight: 600;
}
.btn:hover { text-decoration: none; }

.form { display: flex; flex-direction: column; gap: 1rem; }
.form input, .form textarea {
  width: 100%;
  padding: 0.7rem;
  border-radius: 0.5rem;
  border: 1px solid rgba(255,255,255,0.1);
  background: rgba(0,0,0,0.2);
  color: var(--text);
}
.form textarea { min-height: 140px; }
.checkbox { display: flex; align-items: center; gap: 0.5rem; }

.list { list-style: none; padding: 0; margin: 0; }
.list li { display: flex; justify-content: space-between; align-items: center; padding: 0.75rem 0; border-bottom: 1px solid rgba(255,255,255,0.05); }
.actions { display: flex; gap: 0.5rem; align-items: center; }
.link { background: none; border: none; color: var(--accent); cursor: pointer; font-size: 0.9rem; }

@media (max-width: 640px) {
  .site-header { flex-direction: column; align-items: flex-start; gap: 1rem; }
  nav a { margin-left: 0; margin-right: 1rem; }
}
