:root {
  /* Fonts */
  --font-sans: 'Noto Sans', ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-serif: 'Noto Serif', ui-serif, Georgia, Cambria, 'Times New Roman', Times, serif;

  /* Pastel Palette (OKLCH) */
  --color-purple-400: oklch(0.75 0.08 300);
  --color-purple-600: oklch(0.55 0.1 300);
  --color-purple-700: oklch(0.45 0.08 300);

  --color-teal-300: oklch(0.85 0.06 180);
  --color-teal-500: oklch(0.65 0.1 180);
  --color-teal-900: oklch(0.28 0.04 180);

  --color-blue-600: oklch(0.55 0.1 250);
  --color-blue-700: oklch(0.45 0.08 250);

  --color-slate-100: #f1f5f9;
  --color-slate-800: #1e293b;
  --color-yellow-500: #eab308;

  /* Theme Defaults (Light) */
  --color-bg: oklch(1 0 0);
  --color-fg: oklch(0.28 0.003 0);
}

html.dark {
  --color-bg: oklch(0.21 0.002 0);
  --color-fg: oklch(0.97 0.001 0);
}

@media (prefers-color-scheme: dark) {
  html:not(.light):not(.dark) {
    --color-bg: oklch(0.21 0.002 0);
    --color-fg: oklch(0.97 0.001 0);
  }
}

*, *::before, *::after {
  box-sizing: border-box;
}

html, body {
  height: 100%;
  margin: 0;
  padding: 0;
}

body {
  font-family: var(--font-sans);
  background-color: var(--color-bg);
  color: var(--color-fg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  line-height: 1.5;
  transition: background-color 200ms ease, color 200ms ease;
}

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-serif);
  margin: 0;
  font-weight: 800;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Page Layout */
.page-container {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.content-wrapper {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 3rem 1.5rem;
}

.content-card {
  max-width: 42rem;
  width: 100%;
  text-align: center;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.page-title {
  font-size: 2.25rem;
  line-height: 2.5rem;
  color: var(--color-purple-400);
}

@media (min-width: 640px) {
  .page-title {
    font-size: 3rem;
    line-height: 1;
  }
}

.prose {
  font-size: 1.125rem;
  line-height: 1.75;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.prose p {
  margin: 0;
}

.nav-actions {
  padding-top: 1rem;
}

.link {
  color: var(--color-blue-600);
  text-decoration: none;
  font-weight: 500;
  transition: color 150ms ease;
}

.link:hover {
  color: var(--color-blue-700);
  text-decoration: underline;
}

/* Navigation */
.navbar {
  position: sticky;
  top: 0;
  z-index: 50;
  background-color: var(--color-purple-600);
  border-bottom: 1px solid var(--color-purple-700);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
}

.navbar-inner {
  max-width: 80rem;
  margin: 0 auto;
  padding: 0 1.5rem;
  height: 4rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.navbar-brand {
  font-family: var(--font-serif);
  font-size: 1.25rem;
  color: #ffffff;
  text-decoration: none;
  transition: color 150ms ease;
}

.navbar-brand:hover {
  color: var(--color-teal-300);
}

.navbar-controls {
  display: flex;
  align-items: center;
  gap: 2rem;
}

.navbar-links {
  display: flex;
  align-items: center;
  gap: 2rem;
  list-style: none;
  margin: 0;
  padding: 0;
}

.nav-item-link {
  font-size: 0.875rem;
  font-weight: 500;
  text-decoration: none;
  padding-bottom: 0.25rem;
  border-bottom: 2px solid transparent;
  color: var(--color-slate-100);
  transition: color 150ms ease, border-color 150ms ease;
}

.nav-item-link:hover {
  color: var(--color-teal-500);
  border-bottom-color: var(--color-teal-500);
}

.nav-item-link.active {
  color: var(--color-teal-900);
  border-bottom-color: var(--color-teal-900);
}

/* Theme Toggle Button */
.theme-toggle-btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  width: 3.5rem;
  height: 1.75rem;
  border-radius: 9999px;
  border: none;
  cursor: pointer;
  background-color: rgba(241, 245, 249, 0.3);
  overflow: hidden;
  padding: 0;
  outline: none;
  transition: background-color 200ms ease;
}

html.dark .theme-toggle-btn {
  background-color: var(--color-teal-500);
}

.toggle-thumb {
  position: absolute;
  top: 4px;
  left: 4px;
  width: 1.25rem;
  height: 1.25rem;
  border-radius: 9999px;
  background-color: #ffffff;
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -2px rgba(0, 0, 0, 0.1);
  transition: transform 200ms cubic-bezier(0.4, 0, 0.2, 1);
  z-index: 20;
}

html.dark .toggle-thumb {
  transform: translateX(1.75rem);
}

.toggle-icon {
  position: absolute;
  top: 4px;
  left: 4px;
  width: 1.25rem;
  height: 1.25rem;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 200ms cubic-bezier(0.4, 0, 0.2, 1), opacity 200ms ease;
  z-index: 30;
  pointer-events: none;
}

.icon-sun {
  color: var(--color-yellow-500);
  opacity: 1;
  transform: translateX(0);
}

html.dark .icon-sun {
  opacity: 0;
  transform: translateX(1.75rem);
}

.icon-moon {
  color: var(--color-slate-800);
  opacity: 0;
  transform: translateX(0);
}

html.dark .icon-moon {
  opacity: 1;
  transform: translateX(1.75rem);
}

