/* ============================================================
   WALDGEWUSEL THEME — main.css
   Colors, typography, layout, components — all in one file.
   Edit the :root variables to retheme without touching markup.
   ============================================================ */

/* ---- Variables ---- */
:root {
  --color-bg:       #e6e1d6;
  --color-primary:  #4f6f64;
  --color-primary-dark: #3a5249;
  --color-accent:   #a8b8a4;
  --color-text:     #2d3a37;
  --color-muted:    #5f6361;
  --color-white:    #FFFFFF;
  --color-border:   #d5cec4;
  --color-card-bg:  #FFFFFF;

  --font-heading: 'Lora', Georgia, serif;
  --font-body:    'Inter', system-ui, sans-serif;

  --radius:    8px;
  --radius-lg: 16px;
  --shadow:    0 2px 12px rgba(44, 36, 22, 0.08);
  --shadow-lg: 0 8px 32px rgba(44, 36, 22, 0.12);

  --container: 1100px;
  --gap:       1.5rem;
}

/* ---- Reset ---- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
img, video { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration: none; }
ul, ol { list-style: none; }
button { cursor: pointer; background: none; border: none; font: inherit; }

/* ---- Base ---- */
html { font-size: 16px; scroll-behavior: smooth; }

body {
  font-family: var(--font-body);
  font-size: 1rem;
  line-height: 1.7;
  color: var(--color-text);
  background: var(--color-bg);
}

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading);
  font-weight: 600;
  line-height: 1.25;
  color: var(--color-text);
}

h1 { font-size: clamp(2rem, 5vw, 3.5rem); }
h2 { font-size: clamp(1.5rem, 3vw, 2.25rem); }
h3 { font-size: 1.25rem; }

p { margin-bottom: 1rem; }
p:last-child { margin-bottom: 0; }

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

main { min-height: 60vh; }

/* ---- Buttons ---- */
.btn {
  display: inline-block;
  padding: 0.75rem 1.75rem;
  border-radius: var(--radius);
  font-family: var(--font-body);
  font-size: 0.9375rem;
  font-weight: 600;
  transition: background 0.2s, color 0.2s, transform 0.15s;
  cursor: pointer;
}

.btn-primary {
  background: var(--color-primary);
  color: var(--color-white);
}
.btn-primary:hover {
  background: var(--color-primary-dark);
  transform: translateY(-1px);
}

.btn-outline {
  border: 2px solid var(--color-primary);
  color: var(--color-primary);
  background: transparent;
}
.btn-outline:hover {
  background: var(--color-primary);
  color: var(--color-white);
}

/* ---- Header ---- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--color-bg);
  border-bottom: 1px solid var(--color-border);
  padding: 0.875rem 0;
}

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

.site-logo {
  display: flex;
  align-items: center;
}
.site-logo img { height: 40px; width: auto; }
.site-name {
  font-family: var(--font-heading);
  font-size: 1.375rem;
  font-weight: 600;
  color: var(--color-primary);
}

.site-nav ul {
  display: flex;
  gap: 2rem;
  align-items: center;
}

.site-nav a {
  font-size: 0.9375rem;
  font-weight: 500;
  color: var(--color-text);
  transition: color 0.2s;
  padding-bottom: 2px;
  border-bottom: 2px solid transparent;
}
.site-nav a:hover,
.site-nav a.active {
  color: var(--color-primary);
  border-bottom-color: var(--color-accent);
}

.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  padding: 4px;
}
.nav-toggle span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--color-text);
  border-radius: 2px;
  transition: transform 0.2s, opacity 0.2s;
}

/* ---- Hero ---- */
.hero {
  position: relative;
  min-height: 85vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  background-color: var(--color-primary);
  background-image: var(--hero-bg);
  background-size: cover;
  background-position: center;
  padding: 4rem 1.25rem;
}

.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to bottom,
    rgba(44, 36, 22, 0.3) 0%,
    rgba(44, 36, 22, 0.55) 100%
  );
}

.hero-content {
  position: relative;
  z-index: 1;
  max-width: 720px;
}

.hero-title {
  font-family: var(--font-heading);
  font-size: clamp(2.5rem, 8vw, 5rem);
  font-weight: 600;
  color: var(--color-white);
  text-shadow: 0 2px 16px rgba(0,0,0,0.35);
  margin-bottom: 1rem;
}

.hero-tagline {
  font-size: clamp(1rem, 2.5vw, 1.375rem);
  color: rgba(255,255,255,0.9);
  margin-bottom: 2rem;
  font-style: italic;
}

/* Hero social links */
.hero .social-links {
  justify-content: center;
}
.hero .social-link {
  background: rgba(255,255,255,0.15);
  color: var(--color-white);
  border: 1px solid rgba(255,255,255,0.35);
}
.hero .social-link:hover {
  background: rgba(255,255,255,0.28);
}

/* ---- Social Links ---- */
.social-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  align-items: center;
}

.social-link {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 1rem;
  border-radius: 100px;
  font-size: 0.9rem;
  font-weight: 500;
  background: var(--color-card-bg);
  color: var(--color-text);
  border: 1px solid var(--color-border);
  transition: background 0.2s, transform 0.15s;
}
.social-link:hover { transform: translateY(-2px); }
.social-link svg { flex-shrink: 0; }

/* ---- About Teaser ---- */
.about-teaser {
  padding: 5rem 0;
  background: var(--color-white);
}

.about-teaser-inner {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2.5rem;
  align-items: center;
}

.about-teaser-image {
  width: 200px;
  height: 200px;
  border-radius: 50%;
  object-fit: cover;
  margin: 0 auto;
  box-shadow: var(--shadow-lg);
  border: 4px solid var(--color-bg);
}

.about-teaser-text h2 { margin-bottom: 0.75rem; }
.about-teaser-text p  { margin-bottom: 1.5rem; color: var(--color-muted); }

/* ---- Section shared ---- */
.section-title {
  margin-bottom: 2rem;
  text-align: center;
}

.section-footer {
  text-align: center;
  margin-top: 2.5rem;
}

/* ---- Recent Posts / Post Grid ---- */
.recent-posts {
  padding: 5rem 0;
}

.post-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--gap);
}

/* ---- Post Card ---- */
.post-card {
  background: var(--color-card-bg);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow);
  display: flex;
  flex-direction: column;
  transition: box-shadow 0.2s, transform 0.2s;
}
.post-card:hover {
  box-shadow: var(--shadow-lg);
  transform: translateY(-3px);
}

.post-card-image-link { display: block; overflow: hidden; aspect-ratio: 16/9; }
.post-card-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
}
.post-card:hover .post-card-image { transform: scale(1.04); }

.post-card-content {
  padding: 1.25rem 1.5rem 1.5rem;
  display: flex;
  flex-direction: column;
  flex: 1;
}

.post-card-meta {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-size: 0.8125rem;
  color: var(--color-muted);
  margin-bottom: 0.5rem;
}

.post-card-tag {
  background: var(--color-bg);
  color: var(--color-primary);
  padding: 0.2rem 0.6rem;
  border-radius: 4px;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.post-card-title {
  font-size: 1.125rem;
  margin-bottom: 0.5rem;
}
.post-card-title a:hover { color: var(--color-primary); }

.post-card-excerpt {
  font-size: 0.9rem;
  color: var(--color-muted);
  flex: 1;
  margin-bottom: 1rem;
}

.post-card-link {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--color-accent);
  margin-top: auto;
}
.post-card-link:hover { color: var(--color-primary); }

/* ---- Social CTA section ---- */
.social-cta {
  padding: 5rem 0;
  background: var(--color-primary);
  color: var(--color-white);
  text-align: center;
}
.social-cta h2 { color: var(--color-white); margin-bottom: 0.75rem; }
.social-cta p  { color: rgba(255,255,255,0.8); margin-bottom: 2rem; max-width: 560px; margin-left: auto; margin-right: auto; }
.social-cta .social-links { justify-content: center; }
.social-cta .social-link {
  background: rgba(255,255,255,0.15);
  color: var(--color-white);
  border-color: rgba(255,255,255,0.3);
}
.social-cta .social-link:hover { background: rgba(255,255,255,0.25); }

/* ---- Footer ---- */
.site-footer {
  background: var(--color-text);
  color: rgba(255,255,255,0.75);
  padding: 3rem 0 2rem;
  text-align: center;
}
.site-footer .social-links { justify-content: center; margin-bottom: 1.5rem; }
.site-footer .social-link {
  background: rgba(255,255,255,0.1);
  color: rgba(255,255,255,0.85);
  border-color: rgba(255,255,255,0.2);
}
.site-footer .social-link:hover { background: rgba(255,255,255,0.18); }
.site-footer .copyright { font-size: 0.875rem; color: rgba(255,255,255,0.5); }

/* ---- Blog index ---- */
.blog-header {
  padding: 4rem 0 2rem;
  text-align: center;
}
.blog-header h1 { margin-bottom: 0.5rem; }
.blog-header p { color: var(--color-muted); }

.blog-feed {
  padding: 2rem 0 5rem;
}

/* ---- Single Post ---- */
.post-full-header {
  padding: 4rem 0 2rem;
  text-align: center;
}
.post-tag {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--color-accent);
  margin-bottom: 1rem;
}
.post-full-title { margin-bottom: 1rem; }
.post-full-meta {
  font-size: 0.875rem;
  color: var(--color-muted);
  display: flex;
  gap: 0.5rem;
  justify-content: center;
  align-items: center;
}

.post-full-image {
  margin: 0 0 3rem;
}
.post-full-image img {
  width: 100%;
  max-height: 540px;
  object-fit: cover;
}
.post-full-image figcaption {
  text-align: center;
  font-size: 0.8125rem;
  color: var(--color-muted);
  padding: 0.5rem 1rem;
}

.post-full-content {
  padding-bottom: 4rem;
}
.post-full-content .container { max-width: 720px; }

/* Ghost content styles */
.gh-content h2 { margin: 2rem 0 1rem; }
.gh-content h3 { margin: 1.5rem 0 0.75rem; }
.gh-content p  { margin-bottom: 1.25rem; }
.gh-content ul, .gh-content ol {
  margin: 0 0 1.25rem 1.5rem;
}
.gh-content ul { list-style: disc; }
.gh-content ol { list-style: decimal; }
.gh-content li { margin-bottom: 0.35rem; }
.gh-content blockquote {
  border-left: 4px solid var(--color-accent);
  padding: 0.75rem 1.25rem;
  margin: 1.5rem 0;
  background: var(--color-white);
  border-radius: 0 var(--radius) var(--radius) 0;
  font-style: italic;
  color: var(--color-muted);
}
.gh-content a { color: var(--color-primary); text-decoration: underline; }
.gh-content img { border-radius: var(--radius); margin: 1.5rem auto; }
.gh-content figure { margin: 1.5rem 0; }
.gh-content figcaption { text-align: center; font-size: 0.8125rem; color: var(--color-muted); }
.gh-content code {
  font-size: 0.875em;
  background: var(--color-bg);
  padding: 0.1em 0.4em;
  border-radius: 3px;
}
.gh-content pre {
  background: var(--color-text);
  color: var(--color-bg);
  padding: 1.25rem;
  border-radius: var(--radius);
  overflow-x: auto;
  margin: 1.5rem 0;
}
.gh-content pre code { background: none; padding: 0; font-size: 0.875rem; }

.gh-content .kg-width-wide {
  margin-left: calc(50% - 50vw + 1.25rem);
  margin-right: calc(50% - 50vw + 1.25rem);
  width: calc(100vw - 2.5rem);
}
.gh-content .kg-width-full {
  margin-left: calc(50% - 50vw);
  margin-right: calc(50% - 50vw);
  width: 100vw;
}

.post-full-footer { padding-bottom: 4rem; }
.post-pagination {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}
.post-pagination-prev,
.post-pagination-next {
  flex: 1;
  min-width: 200px;
  padding: 1.25rem;
  background: var(--color-card-bg);
  border-radius: var(--radius);
  border: 1px solid var(--color-border);
  transition: border-color 0.2s;
}
.post-pagination-prev:hover,
.post-pagination-next:hover { border-color: var(--color-primary); }
.post-pagination-next { text-align: right; }
.post-pagination-prev span,
.post-pagination-next span {
  display: block;
  font-size: 0.8125rem;
  color: var(--color-muted);
  margin-bottom: 0.25rem;
}
.post-pagination-prev strong,
.post-pagination-next strong {
  font-family: var(--font-heading);
  font-size: 0.9375rem;
}

/* ---- Static page ---- */
.page-full-header {
  padding: 4rem 0 2rem;
  text-align: center;
}
.page-full-image { margin-bottom: 3rem; }
.page-full-image img {
  width: 100%;
  max-height: 400px;
  object-fit: cover;
}
.page-full-content { padding-bottom: 5rem; }
.page-full-content .container { max-width: 720px; }

/* ---- Links page ---- */
body.page-template-page-links .site-header,
body.page-template-page-links .site-footer {
  display: none;
}

.links-page {
  min-height: 100vh;
  background: var(--color-primary);
  background-image: radial-gradient(ellipse at top, #4f6f64 0%, #3a5249 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 3rem 1.25rem;
}

.links-container {
  width: 100%;
  max-width: 480px;
  text-align: center;
}

@media (min-width: 640px) {
  .links-container {
    max-width: 900px;
  }
}

.links-avatar {
  width: 100px;
  height: 100px;
  border-radius: 50%;
  object-fit: cover;
  margin: 0 auto 1rem;
  border: 3px solid rgba(255,255,255,0.5);
}

.links-title {
  font-family: var(--font-heading);
  font-size: 1.75rem;
  color: var(--color-white);
  margin-bottom: 0.5rem;
}

.links-bio {
  font-size: 0.9375rem;
  color: rgba(255,255,255,0.8);
  margin-bottom: 2rem;
  font-style: italic;
}

.links-categories {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2rem;
  margin-bottom: 2rem;
}

@media (min-width: 640px) {
  .links-categories {
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  }
}

.links-category {
  margin-bottom: 0;
}

.links-category-title {
  font-family: var(--font-heading);
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: rgba(255,255,255,0.5);
  margin-bottom: 0.75rem;
}

.link-cards {
  display: flex;
  flex-direction: column;
  gap: 0.875rem;
  margin-bottom: 2rem;
  text-align: left;
}

.link-card {
  display: flex;
  align-items: stretch;
  background: rgba(255,255,255,0.12);
  border: 1px solid rgba(255,255,255,0.2);
  border-radius: var(--radius);
  overflow: hidden;
  color: var(--color-white);
  text-decoration: none;
  transition: background 0.2s, transform 0.15s;
  min-height: 80px;
}
.link-card:hover {
  background: rgba(255,255,255,0.22);
  transform: translateY(-2px);
}

.link-card-image {
  flex-shrink: 0;
  width: 80px;
}
.link-card-image img {
  width: 80px;
  height: 100%;
  object-fit: cover;
  display: block;
}

.link-card-body {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 0.75rem 1rem;
  gap: 0.25rem;
  flex: 1;
  min-width: 0;
}

.link-card-title {
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: 1rem;
  color: var(--color-white);
  line-height: 1.3;
}

.link-card-desc {
  font-size: 0.875rem;
  color: rgba(255,255,255,0.7);
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.links-back {
  font-size: 0.875rem;
  color: rgba(255,255,255,0.55);
  display: inline-block;
  margin-top: 1.5rem;
  transition: color 0.2s;
}
.links-back:hover { color: rgba(255,255,255,0.9); }

/* ---- Error page ---- */
.error-page {
  min-height: 60vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 4rem 1.25rem;
}
.error-code {
  font-size: 6rem;
  color: var(--color-primary);
  opacity: 0.3;
  line-height: 1;
  margin-bottom: 0.5rem;
}
.error-message {
  font-size: 1.125rem;
  color: var(--color-muted);
  margin-bottom: 2rem;
}

/* ============================================================
   RESPONSIVE
   ============================================================ */

/* ---- Tablet+ (640px) ---- */
@media (min-width: 640px) {
  .post-grid { grid-template-columns: repeat(2, 1fr); }
  .about-teaser-inner { grid-template-columns: auto 1fr; }
  .about-teaser-image { margin: 0; }
}

/* ---- Desktop (900px) ---- */
@media (min-width: 900px) {
  .post-grid { grid-template-columns: repeat(3, 1fr); }
}

/* ---- Mobile nav (below 700px) ---- */
@media (max-width: 699px) {
  .nav-toggle { display: flex; }

  .site-nav {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--color-bg);
    border-bottom: 1px solid var(--color-border);
    padding: 1rem 1.25rem 1.5rem;
    box-shadow: var(--shadow);
  }
  .site-nav.is-open { display: block; }
  .site-nav ul { flex-direction: column; gap: 0; }
  .site-nav a {
    display: block;
    padding: 0.75rem 0;
    border-bottom: 1px solid var(--color-border);
    font-size: 1rem;
  }
  .site-nav a:last-child { border-bottom: none; }

  .site-header { position: relative; }
}
