/* frischux.de – Stylesheet
   Farbschema: dunkles "Terminal"-Theme mit frischem Grün-Akzent. */

:root {
  --bg: #0f1419;
  --bg-alt: #171c24;
  --surface: #1d242e;
  --border: #2a323d;
  --text: #d6dde6;
  --text-muted: #8b97a5;
  --accent: #41d18a;
  --accent-dark: #2faa6c;
  --radius: 10px;
  --maxw: 820px;
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --mono: "SFMono-Regular", Consolas, "Liberation Mono", Menlo, monospace;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

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

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

/* ---------- Header ---------- */
.site-header {
  background: var(--bg-alt);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 10;
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 60px;
}
.logo {
  font-family: var(--mono);
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--text);
}
.logo span { color: var(--accent); }
.nav a {
  margin-left: 1.25rem;
  color: var(--text-muted);
  font-weight: 500;
}
.nav a:hover, .nav a.active { color: var(--accent); }

/* ---------- Hero ---------- */
.hero {
  background: radial-gradient(circle at top right, #1c2a26, var(--bg) 60%);
  padding: 4rem 0 3.5rem;
  border-bottom: 1px solid var(--border);
}
.hero h1 {
  font-size: clamp(1.8rem, 5vw, 2.8rem);
  margin: 0 0 .75rem;
  line-height: 1.15;
}
.hero-sub {
  font-size: 1.15rem;
  color: var(--text-muted);
  max-width: 600px;
  margin: 0 0 1.75rem;
}
.hero-sub strong { color: var(--text); }

.btn {
  display: inline-block;
  background: var(--accent);
  color: #08130d;
  font-weight: 600;
  padding: .7rem 1.4rem;
  border-radius: var(--radius);
  transition: background .15s ease, transform .15s ease;
}
.btn:hover { background: var(--accent-dark); color: #08130d; transform: translateY(-1px); }

/* ---------- Sections ---------- */
main { padding: 3rem 0; }
section { margin-bottom: 3.5rem; }

h2 {
  font-size: 1.5rem;
  margin: 0 0 1.25rem;
  position: relative;
  padding-left: .85rem;
}
h2::before {
  content: "";
  position: absolute;
  left: 0; top: .15em;
  width: 4px; height: 1em;
  background: var(--accent);
  border-radius: 2px;
}

/* ---------- Topic Cards ---------- */
.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1.25rem;
}
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem;
  transition: border-color .15s ease, transform .15s ease;
}
.card:hover { border-color: var(--accent); transform: translateY(-3px); }
.card-icon { font-size: 1.8rem; margin-bottom: .5rem; }
.card h3 { margin: 0 0 .4rem; font-size: 1.1rem; }
.card p { margin: 0; color: var(--text-muted); font-size: .95rem; }

/* ---------- Post List ---------- */
.post-list { list-style: none; margin: 0; padding: 0; }
.post-item { margin-bottom: 1rem; }
.post-item a {
  display: flex;
  gap: 1.1rem;
  align-items: stretch;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  transition: border-color .15s ease, transform .15s ease;
}
.post-item a:hover { border-color: var(--accent); transform: translateX(3px); }

.post-thumb {
  flex: 0 0 160px;
  background: var(--bg-alt);
  overflow: hidden;
}
.post-thumb img {
  width: 100%;
  height: 100%;
  min-height: 110px;
  object-fit: cover;
  display: block;
}
.post-item-body { padding: 1.1rem 1.3rem 1.1rem 0; }
.post-item:has(.post-thumb) .post-item-body { padding-left: 0; }
.post-item a:not(:has(.post-thumb)) .post-item-body { padding-left: 1.3rem; }

.post-item h3 { margin: 0 0 .25rem; color: var(--text); font-size: 1.15rem; }
.post-item p { margin: .35rem 0 0; color: var(--text-muted); font-size: .95rem; }
.post-list.big .post-item { margin-bottom: 1.25rem; }

/* Titelbild im Einzelbeitrag */
.post-hero {
  margin: 0 0 2rem;
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--border);
}
.post-hero img {
  width: 100%;
  height: auto;
  display: block;
}

@media (max-width: 540px) {
  .post-item a { flex-direction: column; }
  .post-thumb { flex-basis: auto; }
  .post-thumb img { min-height: 150px; }
  .post-item-body,
  .post-item:has(.post-thumb) .post-item-body { padding: 1.1rem 1.3rem; }
}

.post-meta {
  font-family: var(--mono);
  font-size: .8rem;
  color: var(--accent);
}

.more-link { display: inline-block; margin-top: .5rem; font-weight: 600; }

/* ---------- About ---------- */
.about p { color: var(--text-muted); max-width: 680px; }

/* ---------- Blog / Post pages ---------- */
.page-title { font-size: 2rem; margin: 0 0 .25rem; }
.page-intro { color: var(--text-muted); margin: 0 0 2rem; }

.back-link { display: inline-block; margin-bottom: 1.5rem; font-weight: 600; }

.post-article { max-width: 720px; }
.post-header { margin-bottom: 2rem; border-bottom: 1px solid var(--border); padding-bottom: 1rem; }
.post-header h1 { font-size: 2rem; margin: 0 0 .4rem; }

.post-body { font-size: 1.05rem; }
.post-body h2 { font-size: 1.4rem; margin-top: 2.2rem; }
.post-body h3 { font-size: 1.15rem; margin-top: 1.8rem; }
.post-body p { margin: 1rem 0; }
.post-body ul, .post-body ol { padding-left: 1.4rem; }
.post-body li { margin: .35rem 0; }
.post-body a { text-decoration: underline; }

.post-body code {
  font-family: var(--mono);
  background: var(--bg-alt);
  border: 1px solid var(--border);
  border-radius: 5px;
  padding: .1rem .4rem;
  font-size: .9em;
}
.post-body pre {
  background: var(--bg-alt);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1rem 1.2rem;
  overflow-x: auto;
}
.post-body pre code { background: none; border: none; padding: 0; }

.post-body blockquote {
  margin: 1.2rem 0;
  padding: .6rem 1.1rem;
  border-left: 3px solid var(--accent);
  background: var(--surface);
  color: var(--text-muted);
}
.post-body table {
  border-collapse: collapse;
  width: 100%;
  margin: 1.2rem 0;
}
.post-body th, .post-body td {
  border: 1px solid var(--border);
  padding: .5rem .75rem;
  text-align: left;
}
.post-body th { background: var(--surface); }

.error { color: #ff6b6b; }

/* ---------- Legal Pages (Impressum etc.) ---------- */
.legal-page { max-width: 700px; }
.legal-section { margin-bottom: 2rem; }
.legal-section h2 { font-size: 1.1rem; margin-bottom: .75rem; }
.legal-section p { color: var(--text-muted); font-size: .95rem; line-height: 1.7; margin: 0; }
.site-footer a { color: var(--text-muted); }
.site-footer a:hover { color: var(--accent); }

/* ---------- Footer ---------- */
.site-footer {
  border-top: 1px solid var(--border);
  background: var(--bg-alt);
  padding: 1.5rem 0;
  text-align: center;
}
.site-footer p { margin: 0; color: var(--text-muted); font-size: .9rem; }

/* ---------- Responsive ---------- */
@media (max-width: 480px) {
  .nav a { margin-left: .9rem; font-size: .95rem; }
  .hero { padding: 3rem 0 2.5rem; }
}
