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

html, body {
  overscroll-behavior: none;
  background: linear-gradient(135deg, #6B5B95 0%, #1B1464 100%);
  background-attachment: fixed;
  transition: background 0.6s ease;
}

body {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  font-family: 'JetBrains Mono', ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
}

/* === Light mode === */
html.light-mode, html.light-mode body {
  background: linear-gradient(135deg, #AEDAFE 0%, #DBC7ED 100%);
  background-attachment: fixed;
}

/* === Mode toggle button === */
.mode-toggle {
  position: fixed;
  top: 1.5rem;
  right: 1.5rem;
  z-index: 10;
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(8px);
  border: 1.5px solid rgba(255, 255, 255, 0.2);
  border-radius: 0.75rem;
  padding: 0.5rem 0.75rem;
  cursor: pointer;
  font-family: inherit;
  font-size: 1.1rem;
  line-height: 1;
  color: #EDD2FC;
  transition: all 0.2s ease;
}

.mode-toggle:hover {
  background: rgba(255, 255, 255, 0.18);
  border-color: rgba(255, 255, 255, 0.35);
}

.light-mode .mode-toggle {
  background: rgba(255, 255, 255, 0.3);
  border-color: rgba(100, 80, 150, 0.2);
  color: #6b5a8e;
}

.light-mode .mode-toggle:hover {
  background: rgba(255, 255, 255, 0.45);
  border-color: rgba(100, 80, 150, 0.35);
}

/* === Page container (used by sub-pages) === */
.container {
  position: relative;
  z-index: 1;
  max-width: 48rem;
  margin: 0 auto;
  padding: 4rem 2rem;
  color: #EDD2FC;
}

.light-mode .container {
  color: #6b5a8e;
}

.back-link {
  display: inline-block;
  font-size: 0.875rem;
  color: #FADFA9;
  text-decoration: none;
  margin-bottom: 2rem;
  opacity: 0.8;
  transition: opacity 0.15s ease;
}

.back-link:hover {
  opacity: 1;
}

.light-mode .back-link {
  color: #8b6eb5;
}

/* === Typography === */
h1 {
  font-size: 2.5rem;
  font-weight: 300;
  letter-spacing: 0.08em;
  margin-bottom: 0.5rem;
  color: #fff;
  text-shadow:
    0 0 1.5px #d9a4f947,
    0 0 3.2px #d9a4f966,
    0 0 6.21px #d9a4f980;
}

.light-mode h1 {
  color: #5c4a80;
  text-shadow:
    0 0 1.5px #9b6dc247,
    0 0 3.2px #9b6dc266,
    0 0 6.21px #9b6dc240;
}

h2 {
  font-size: 1.1rem;
  font-weight: 500;
  letter-spacing: 0.05em;
  margin-top: 2.5rem;
  margin-bottom: 1rem;
  color: #fff;
  text-shadow:
    0 0 1.5px #d9a4f947,
    0 0 3.2px #d9a4f940;
}

.light-mode h2 {
  color: #5c4a80;
  text-shadow: none;
}

h3 {
  font-size: 0.9rem;
  font-weight: 500;
  letter-spacing: 0.03em;
  margin-top: 1.5rem;
  margin-bottom: 0.75rem;
  color: #EDD2FC;
  opacity: 0.9;
}

.light-mode h3 {
  color: #6b5a8e;
}

.last-updated {
  font-size: 0.8rem;
  opacity: 0.6;
  margin-bottom: 3rem;
}

p {
  font-size: 0.8rem;
  line-height: 2;
  opacity: 0.85;
  margin-bottom: 1rem;
}

/* === Links === */
a {
  color: #FADFA9;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.light-mode a {
  color: #8b6eb5;
}

a:hover {
  opacity: 0.8;
}
