/* @import url('https://fonts.googleapis.com/css2?family=EB+Garamond:ital,wght@0,400;0,600;1,400&family=Inter:wght@400;500&display=swap');*/

/* ==========================================================================
   EB Garamond
   ========================================================================== */

/* Regular (Normal) */
@font-face {
  font-family: 'EB Garamond';
  src: url('fonts/EBGaramond-Regular.woff2') format('woff2');
  font-weight: normal;
  font-style: normal;
  font-display: swap;
}

/* Italic (Kursiv) */
@font-face {
  font-family: 'EB Garamond';
  src: url('fonts/EBGaramond-Italic.woff2') format('woff2');
  font-weight: normal;
  font-style: italic;
  font-display: swap;
}

/* Bold (Fett) */
@font-face {
  font-family: 'EB Garamond';
  src: url('fonts/EBGaramond-SemiBold.woff2') format('woff2');
  font-weight: bold;
  font-style: normal;
  font-display: swap;
}

/* Bold Italic (Fett & Kursiv) */
@font-face {
  font-family: 'EB Garamond';
  src: url('fonts/EBGaramond-SemiBoldItalic.woff2') format('woff2');
  font-weight: bold;
  font-style: italic;
  font-display: swap;
}


/* ==========================================================================
   Inter
   ========================================================================== */

/* Regular (Normal) */
@font-face {
  font-family: 'Inter';
  src: url('fonts/Inter-Regular.woff2') format('woff2');
  font-weight: normal;
  font-style: normal;
  font-display: swap;
}

/* ============================================================
   Design Tokens
   ============================================================ */
:root {
  --bg:          #ffffff; /* vorher: #faf4ef; */
  --text:        #1c1a18;
  --text-muted:  #888076;
  --link:        #7878b2;
  --link-hover:  #5555a0;
  --border:      #EEEBE8; /* vorher: #e8e0d8; */

  --font-serif: 'EB Garamond', Georgia, serif;
  --font-ui:    'Inter', system-ui, sans-serif;

  --width: 660px;
}

/* ============================================================
   Reset & Basis
   ============================================================ */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  font-size: 20px;
}

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-serif);
  line-height: 1.75;
  padding: clamp(1.5rem, 5vw, 3rem) clamp(1rem, 3vw, 1.25rem);
  -webkit-font-smoothing: antialiased;
}

a {
  color: var(--link);
  text-decoration: none;
}

a:hover {
  color: var(--link-hover);
  text-decoration: underline;
  text-underline-offset: 3px;
}

/* ============================================================
   Layout
   ============================================================ */
.site-header,
.site-main {
  max-width: var(--width);
  margin-left: auto;
  margin-right: auto;
}

.site-header {
  margin-bottom: 3.5rem;
  display: flex;
  align-items: baseline;
  justify-content: space-between;
}

.site-nav a {
  font-family: var(--font-ui);
  font-size: 0.78rem;
  color: var(--text-muted);
  letter-spacing: 0.03em;
  text-decoration: none;
}

.site-nav a:hover {
  color: var(--link);
}

/* ============================================================
   Header
   ============================================================ */
.site-title {
  font-family: var(--font-serif);
  font-size: 1rem;
  font-weight: 600;
  color: var(--text);
  letter-spacing: 0.01em;
  text-decoration: none;
}

.site-title:hover {
  color: var(--link);
  text-decoration: none;
}

/* ============================================================
   Postliste
   ============================================================ */
.post-list {
  list-style: none;
}

.post-item {
  display: flex;
  gap: 1.5rem;
  padding: 0.55rem 0;
  border-bottom: 1px solid var(--border);
  align-items: baseline;
}

.post-item:first-child {
  border-top: 1px solid var(--border);
}

.post-date {
  font-family: var(--font-ui);
  font-size: 0.72rem;
  color: var(--text-muted);
  white-space: nowrap;
  letter-spacing: 0.02em;
  flex-shrink: 0;
}

.post-item .post-title {
  font-family: var(--font-serif);
  font-size: 1rem;
  color: var(--text);
}

.post-item .post-title:hover {
  color: var(--link);
  text-decoration: none;
}

.empty {
  font-family: var(--font-ui);
  font-size: 0.85rem;
  color: var(--text-muted);
}

/* ============================================================
   Einzelpost
   ============================================================ */
.post-header {
  margin-bottom: 2.5rem;
}

.post h1.post-title {
  font-family: var(--font-serif);
  font-size: 2rem;
  font-weight: 600;
  line-height: 1.25;
  margin-bottom: 0.6rem;
  color: var(--text);
}

.post .post-date {
  font-family: var(--font-ui);
  font-size: 0.75rem;
  color: var(--text-muted);
  letter-spacing: 0.03em;
}

/* ============================================================
   Post-Inhalt (Markdown-Output)
   ============================================================ */
.post-content {
  margin-top: 0.5rem;
}

.post-content p {
  margin-bottom: 1.3em;
}

.post-content h2 {
  font-size: 1.35rem;
  font-weight: 600;
  margin: 2.2em 0 0.6em;
  line-height: 1.3;
}

.post-content h3 {
  font-size: 1.1rem;
  font-weight: 600;
  margin: 1.8em 0 0.4em;
}

.post-content ul,
.post-content ol {
  margin: 0 0 1.3em 1.4em;
}

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

.post-content blockquote {
  border-left: 2px solid var(--border);
  margin: 1.5em 0;
  padding: 0.2em 0 0.2em 1.2em;
  color: var(--text-muted);
  font-style: italic;
}

.post-content code {
  font-family: 'Courier New', monospace;
  font-size: 0.82em;
  background: var(--border);
  padding: 0.1em 0.35em;
  border-radius: 2px;
}

.post-content pre {
  background: var(--border);
  padding: 1rem;
  overflow-x: auto;
  margin: 1.5em 0;
  border-radius: 3px;
}

.post-content pre code {
  background: none;
  padding: 0;
}

.post-content hr {
  border: none;
  border-top: 1px solid var(--border);
  margin: 2.5em 0;
}

/* ============================================================
   Post Footer
   ============================================================ */
.post-footer {
  margin-top: 3rem;
  padding-top: 1.2rem;
  border-top: 1px solid var(--border);
}

.post-footer a {
  font-family: var(--font-ui);
  font-size: 0.78rem;
  color: var(--text-muted);
  letter-spacing: 0.02em;
}

.post-footer a:hover {
  color: var(--link);
  text-decoration: none;
}

/* ============================================================
   Bilder + Bildvergrößerer (Lightbox)
   ============================================================ */
.post-content img {
  max-width: 100%;
  height: auto;
}
.post-content img.zoomable { cursor: zoom-in; }

.zoom-backdrop {
  position: fixed;
  inset: 0;
  z-index: 90;
  background: var(--bg);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease;
}
.zoom-backdrop.is-open {
  opacity: 0.96;
  visibility: visible;
}

.post-content img.is-zoomed {
  position: relative;
  z-index: 100;
  cursor: zoom-out;
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  will-change: transform;
}

@media (prefers-reduced-motion: reduce) {
  .zoom-backdrop,
  .post-content img.is-zoomed { transition: none; }
}
