/* =========================================================
   Base layout
   ========================================================= */

body {
  font-family: system-ui, -apple-system, BlinkMacSystemFont,
               "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  background: #ffffff;
  color: #1a1a1a;
  line-height: 1.75;
  margin: 0;
  padding: 0;
  font-size: 18px;
}

a {
  color: #6fa8ff;
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

hr {
  border: none;
  border-top: 1px solid #333;
  margin: 2.5rem auto;
}


/* =========================================================
   Dark mode (system dependent)
   ========================================================= */

@media (prefers-color-scheme: dark) {
  body {
    background: #111;
    color: #eaeaea;
  }

  a {
    color: #6fa8ff;
  }

  hr {
    border-top-color: #333;
  }
}


/* =========================================================
   Article container
   ========================================================= */

article {
  position: relative;
  padding: 4.5rem 1.5rem 5.5rem;
}


/* =========================================================
   Language switch (top)
   ========================================================= */

.top-switch {
  position: absolute;
  top: 1.5rem;
  right: 2rem;
  display: flex;
  gap: 1.4rem;
  font-size: 0.85rem;
  letter-spacing: 0.06em;
}

article[dir="rtl"] .top-switch {
  right: auto;
  left: 2rem;
}

.top-switch a {
  color: #6fa8ff;
}

.top-switch a:hover {
  text-decoration: underline;
}

/* =========================================================
   Default (LTR) post header
   ========================================================= */

article:not([dir="rtl"]) h1 {
  max-width: 820px;
  margin: 0 auto 0.8rem;
  font-size: 2.3rem;
}

article:not([dir="rtl"]) p small {
  display: block;
  max-width: 820px;
  margin: 0 auto 2.5rem;
  color: #666;
}

@media (prefers-color-scheme: dark) {
  article:not([dir="rtl"]) p small {
    color: #aaa;
  }
}

/* =========================================================
   LTR Essay Header (Deutsch)
   ========================================================= */

.ltr-header {
  text-align: center;
  margin: 4.5rem auto 3rem;
  max-width: 980px;
}

.ltr-header h1 {
  font-size: 2.6rem;
  font-weight: 600;
  line-height: 1.25;
  margin-bottom: 1.4rem;
}

.ltr-header h2.subtitle {
  font-size: 1.5rem;
  font-weight: 400;
  line-height: 1.5;
  color: #555;
  margin-bottom: 0.6rem;
}

.ltr-header h3.subtitle2 {
  font-size: 1.1rem;
  font-weight: 500;
  color: #666;
  margin-bottom: 1.8rem;
}

.ltr-header time {
  font-size: 0.95rem;
  color: #777;
}

/* Dark mode */
@media (prefers-color-scheme: dark) {
  .ltr-header h2.subtitle {
    color: #c2c2c2;
  }
  .ltr-header h3.subtitle2 {
    color: #b0b0b0;
  }
  .ltr-header time {
    color: #9a9a9a;
  }
}


/* =========================================================
   RTL Essay Header (Sorani)
   ========================================================= */

.rtl-header {
  text-align: center;
  margin: 4.5rem auto 3rem;
  max-width: 980px;
}

.rtl-header h1 {
  font-size: 2.6rem;
  font-weight: 600;
  line-height: 2.6;
  margin-bottom: 1.6rem;
}

.rtl-header h2 {
  font-size: 1.65rem;   /* ⬅️ größerer Subtitel */
  font-weight: 600;
  line-height: 2.2;
  color: #c2c2c2;
  margin-bottom: 1.8rem;
}

/* Second subtitle (third line under title) */
.rtl-header .subtitle2 {
  font-size: 1.15rem;
  font-weight: 500;
  line-height: 2.1;
  color: #b0b0b0;
  margin-top: 0.5rem;
  margin-bottom: 1.8rem;
}

.rtl-header h3.subtitle2 {
  font-size: 1.15rem;
  font-weight: 500;
  line-height: 2.1;
  color: #666;
  margin-top: 0.2rem;
  margin-bottom: 1.8rem;
}

.rtl-header time {
  font-size: 0.95rem;
  color: #9a9a9a;
}

/* Dark-mode colors for RTL header */
@media (prefers-color-scheme: dark) {
  .rtl-header h2.subtitle {
    color: #c2c2c2;
  }
  .rtl-header h3.subtitle2 {
    color: #b0b0b0;
  }
  .rtl-header time {
    color: #9a9a9a;
  }
}

/* Divider under RTL header */
.post-divider {
  max-width: 340px;
  margin: 2.5rem auto 3.5rem;
}

/* =========================================================
   Post content – LTR
   ========================================================= */

.post-content {
  max-width: 820px;
  margin: 0 auto;
  font-size: 1.05rem;
}

.post-content p {
  text-align: justify;
  margin-bottom: 1.8rem;
}


/* =========================================================
   Post content – RTL (Sorani)
   ========================================================= */

article[dir="rtl"] .post-content {
  direction: rtl;
  unicode-bidi: isolate;
  max-width: 820px;
  margin: 0 auto;
  line-height: 1.90;          /* ⬅️ größerer Zeilenabstand */
  font-size: 1.45rem;         /* ⬅️ größere Textschrift */
  font-family: "Noto Naskh Arabic",
               "Amiri",
               "Scheherazade",
               serif;
}

/* Real justification */
article[dir="rtl"] .post-content p {
  unicode-bidi: plaintext;
  text-align: justify;
  text-align-last: right;
  margin-bottom: 2.4rem;      /* ⬅️ mehr Abstand zwischen Absätzen */
}


/* =========================================================
   Headings inside RTL content
   ========================================================= */

article[dir="rtl"] .post-content h2,
article[dir="rtl"] .post-content h3 {
  text-align: right;
  margin-top: 3rem;
  margin-bottom: 1.2rem;
}


/* =========================================================
   Responsive adjustments
   ========================================================= */

@media (max-width: 700px) {

  body {
    font-size: 17px;
  }

  .rtl-header h1 {
    font-size: 2.1rem;
  }

  .rtl-header h2 {
    font-size: 1.25rem;
  }

  article[dir="rtl"] .post-content {
    font-size: 1.1rem;
    line-height: 2.25;
  }

  .top-switch {
    top: 1rem;
    right: 1.2rem;
  }

  article[dir="rtl"] .top-switch {
    left: 1.2rem;
  }
}

@media (max-width: 600px) {
  article:not([dir="rtl"]) .post-content p {
    text-align: left;
  }
  article[dir="rtl"] .post-content p {
    text-align: right;
  }  
}

/* =========================================================
   Language switch – active state
   ========================================================= */

.top-switch .lang {
  font-size: 0.85rem;
  letter-spacing: 0.08em;
  opacity: 0.7;
}

.top-switch .lang.active {
  font-weight: 600;
  opacity: 1;
  cursor: default;
  text-decoration: none;
}

/* Optional: kleine visuelle Trennung */
.top-switch .lang + .lang::before {
  content: "·";
  margin: 0 0.6rem;
  opacity: 0.4;
}

/* Dark/Light Feinabstimmung */
@media (prefers-color-scheme: dark) {
  .top-switch .lang {
    opacity: 0.75;
  }
  .top-switch .lang.active {
    opacity: 1;
  }
}
/* ===============================
   Index page layout
   =============================== */

.index-page {
  text-align: center;
  max-width: 900px;
  margin: 0 auto;
}

.index-section {
  margin: -6rem 0;
}

.index-section h2 {
  margin-bottom: -1rem;
}

.index-post {
  text-align: center;
  margin: 3.5rem 0;
}

.index-post h3 {
  margin-bottom: 0.4rem;
}

.index-post time {
  display: block;
  font-size: 0.9rem;
  opacity: 0.7;
  margin-bottom: 0.8rem;
}

.index-post p {
  max-width: 680px;
  margin: 1.5rem auto 0;
  line-height: 1.8;
  text-align: justify;
}

/* RTL Anpassung */
.index-section[dir="rtl"] {
  direction: rtl;
}

.index-section[dir="rtl"] .index-post p {
  text-align: justify;
}

.index-tagline {
  opacity: 0.75;
  margin-bottom: 2.5rem;
}

.index-langs {
  margin: 0.8rem 0 0;
  font-size: 0.9rem;
  opacity: 0.7;
  letter-spacing: 0.05em;
}

.index-langs a {
  text-decoration: none;
}

.index-langs a:hover {
  opacity: 1;
}

.index-post p {
  direction: rtl;
  text-align: justify;
  text-align-last: center;
}

.index-tagline {
  opacity: 0.75;
  margin-bottom: 2.5rem;
}

.index-tagline .sep {
  margin: 0 0.5rem;
  opacity: 0.5;
}
