@charset "UTF-8";

/* 1. GLOBALE FARB-FIXIERUNG (Gegen das Flackern) */
:root {
  --bg: #fffcf0;
  --fg: #101010;
  --switch-bg: #e4e4e0;
  --muted: #6f6e69;
}

html[data-theme=dark] {
  --bg: #101010;
  --fg: #cecdc3;
  --switch-bg: #2c2c2c;
  --muted: #878580;
}

/* Der wichtigste Teil: Keine Übergänge für den Hintergrund beim Laden */
html, body {
  background-color: var(--bg) !important;
  color: var(--fg);
  margin: 0;
  padding: 0;
}

/* 2. BASIS-STYLING */
body {
  font-family: "Sora", sans-serif;
  font-weight: 300;
  max-width: 660px;
  margin: 60px auto;
  padding: 0 30px;
  line-height: 1.6;
  /* Transition nur für Farbe, NICHT für Background während des Ladens */
  transition: color 0.3s; 
}

/* 3. NAVIGATION */
nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 80px;
}

.nav-left {
  display: flex;
  align-items: baseline;
  gap: 24px;
}

a, .nav-link, .site-title {
  color: var(--fg);
  text-decoration: underline;
  text-decoration-color: var(--switch-bg);
  text-underline-offset: 4px;
  transition: 0.2s;
}

a:hover, .nav-link:hover {
  text-decoration-color: var(--fg);
}

.site-title {
  font-weight: 600;
  text-decoration: none;
  font-size: 1.1rem;
}

.nav-link {
  font-size: 0.9rem;
  font-weight: 400;
}

/* 4. ELEMENTE (Steph Ango Style) */
hr {
  border: 0;
  height: 1px;
  width: 100%;
  background: var(--switch-bg);
  margin: 2em 0;
  opacity: 0.5;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
  margin: 2rem auto;
  border-radius: 4px;
}

/* 5. LISTEN (INDEX) */
.notiz-item {
  display: flex;
  gap: 20px;
  margin-bottom: 12px;
  align-items: baseline;
}

.notiz-datum {
  font-size: 0.8rem;
  color: var(--muted);
  min-width: 80px;
}

/* 6. HASHTAGS (Deine Farben) */
.tag-link {
  color: #24837B !important;
  text-decoration: none !important;
  transition: 0.2s ease-in-out;
}

.tag-link:hover {
  color: #3AA99F !important;
  text-decoration: underline !important;
  text-decoration-color: #3AA99F !important;
  text-underline-offset: 4px;
}

/* 7. THEME SWITCHER */
.theme-switch {
  display: inline-block;
  height: 22px;
  position: relative;
  width: 44px;
}

.theme-switch input { display: none; }

.slider {
  background-color: var(--switch-bg);
  position: absolute;
  cursor: pointer;
  top: 0; left: 0; right: 0; bottom: 0;
  transition: 0.4s;
  border-radius: 34px;
}

.knob {
  position: absolute;
  height: 16px; width: 16px;
  left: 4px; bottom: 3px;
  display: flex; justify-content: center; align-items: center;
  transition: 0.4s; color: var(--fg);
}

input:checked + .slider .knob {
  transform: translateX(20px);
}
