:root {
  --color: #1a1d20;
  --bg-color: #ffffff;
  --bg-color-accent: #f6f2f9;
  --purple-primary: #6b2d83;
  --green-primary: #2ea265;
  --green-light: #eaf7f0;
  --card-bg: #ffffff;
  --text-muted: #6b7280;
  --font-family-base: "MyriadPro", system-ui, -apple-system, sans-serif;
}

:root.dark {
  --color: #e5e7eb;
  --bg-color: #0d0a12;
  --bg-color-accent: #171120;
  --purple-primary: #a855f7;
  --green-primary: #34d399;
  --green-light: #0d281e;
  --card-bg: #15101d;
  --text-muted: #9ca3af;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--font-family-base), sans-serif;
  background: var(--bg-color);
  color: var(--color);
  line-height: 1.65;
  transition: background-color .3s ease, color .3s ease;
}

.container {
  width: 100%;
  max-width: 760px;
  padding: 2em 1em;
  margin: auto;
}

.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1em;
  margin-bottom: 2em;
}

.site-logo { height: 40px; width: auto; }

.back-link {
  color: var(--purple-primary);
  text-decoration: none;
  font-weight: 700;
  font-size: 0.95em;
}

.back-link:hover { text-decoration: underline; }

article {
  background-color: var(--card-bg);
  border-radius: 1.5em;
  padding: 2.5em;
  border: 1px solid color-mix(in srgb, var(--color) 10%, transparent);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.03);
}

h1 {
  margin: 0 0 0.8em;
  font-size: 2em;
  font-weight: 800;
  line-height: 1.3;
}

h2 {
  margin: 1.8em 0 0.6em;
  font-size: 1.35em;
  color: var(--purple-primary);
}

p { margin: 0 0 1.2em; font-size: 1.05em; opacity: 0.92; }
ul { margin: 0 0 1.2em; padding-left: 1.4em; }
li { margin-bottom: 0.6em; font-size: 1.02em; }

blockquote,
.info-box {
  margin: 1.5em 0;
  padding: 1.2em;
  border-radius: 0.5em;
  background-color: var(--green-light);
  border-left: 4px solid var(--green-primary);
}

blockquote p:last-child,
.info-box p:last-child { margin-bottom: 0; }

.article-link { color: var(--purple-primary); font-weight: 700; }

.footer {
  margin-top: 3em;
  text-align: center;
  color: var(--text-muted);
  font-weight: 600;
  font-size: 0.9em;
}

.theme-toggle-btn {
  position: fixed;
  right: 2em;
  bottom: 2em;
  z-index: 100;
  width: 3.5em;
  height: 3.5em;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid color-mix(in srgb, var(--color) 15%, transparent);
  border-radius: 50%;
  background-color: var(--bg-color-accent);
  color: var(--color);
  box-shadow: 0 4px 12px rgba(0,0,0,0.1);
  cursor: pointer;
  transition: transform .2s ease;
}

.theme-toggle-btn:hover { transform: scale(1.1); }
.theme-toggle-btn:focus-visible { outline: 2px solid var(--purple-primary); outline-offset: 3px; }

@media (max-width: 600px) {
  article { padding: 1.5em; }
  .site-header { align-items: flex-start; }
  h1 { font-size: 1.65em; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  body, .theme-toggle-btn { transition: none; }
}
