:root {
  --bg: #050505;
  --panel: rgba(9, 9, 9, 0.78);
  --panel-border: rgba(255, 255, 255, 0.08);
  --text: #fafafa;
  --muted: rgba(255, 255, 255, 0.74);
  --body-text: var(--text);
  --meta-label: rgba(255, 255, 255, 0.52);
  --rule-line: rgba(255, 255, 255, 0.92);
  --nav-link: var(--text);
  --about-brand: rgba(255, 255, 255, 0.78);
  --about-cta-border: rgba(255, 255, 255, 0.68);
  --about-cta-text: var(--text);
}

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

html {
  background-color: var(--bg);
  overscroll-behavior: none;
}

body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  overscroll-behavior: none;
  color: var(--body-text);
  font-family: "Space Mono", "Consolas", "Courier New", monospace;
}

a {
  color: inherit;
  text-decoration: none;
}

.about-nav a {
  color: var(--nav-link);
  opacity: 0.95;
}

.about-nav a:hover {
  opacity: 1;
  color: var(--nav-link);
}

.about-shell {
  width: min(1280px, calc(100% - 24px));
  margin: 0 auto;
  padding: 0.4rem 0 3rem;
}

.about-header {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 1rem;
  padding: 1.1rem 1.45rem;
  border-radius: 30px;
  background: var(--panel);
  border: 1px solid var(--panel-border);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.08),
    0 18px 36px rgba(0, 0, 0, 0.18);
}

.about-brand {
  font-size: 2rem;
  color: var(--about-brand);
}

.about-nav {
  display: flex;
  justify-content: center;
  gap: 2rem;
}

.about-cta {
  padding: 0.7rem 1.2rem;
  border-radius: 999px;
  border: 1px solid var(--about-cta-border);
  color: var(--about-cta-text);
  font-size: 0.95rem;
  font-weight: 600;
  transition: border-color 0.2s ease, color 0.2s ease;
}

.about-page {
  padding: 2.2rem 0 0;
}

.about-content {
  width: min(100%, 1120px);
  margin-left: 12%;
}

.about-content h1 {
  margin: 0;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(2.6rem, 5vw, 4.2rem);
  font-weight: 500;
  color: var(--text);
}

.about-rule {
  width: 64px;
  height: 2px;
  margin: 0.6rem 0 2.8rem;
  background: var(--rule-line);
}

.about-copy p {
  margin: 0 0 0.55rem;
  max-width: 76ch;
  color: var(--body-text);
  font-size: clamp(1rem, 1.7vw, 1.18rem);
  line-height: 1.9;
}

.about-meta {
  display: grid;
  gap: 1rem;
  margin-top: 1.5rem;
}

.about-meta span {
  display: block;
  margin-bottom: 0.45rem;
  color: var(--meta-label);
}

.about-meta a,
.about-meta p {
  margin: 0;
  color: var(--body-text);
  font-size: clamp(1rem, 1.7vw, 1.16rem);
}

@media (max-width: 900px) {
  .about-shell {
    width: min(100% - 16px, 1200px);
  }

  .about-header {
    grid-template-columns: 1fr;
    justify-items: start;
  }

  .about-nav {
    justify-content: flex-start;
    flex-wrap: wrap;
    gap: 1rem 1.5rem;
  }

  .about-content {
    margin-left: 0;
  }
}

@media (prefers-color-scheme: light) {
  html:not([data-theme="dark"]):not([data-theme="light"]) {
    --bg: #f0f4ee;
    --panel: rgba(255, 255, 255, 0.94);
    --panel-border: rgba(22, 37, 27, 0.12);
    --text: #142a1d;
    --body-text: #1a3024;
    --muted: rgba(23, 38, 29, 0.75);
    --nav-link: #1c3325;
    --meta-label: rgba(23, 40, 31, 0.6);
    --rule-line: rgba(22, 40, 32, 0.5);
    --about-brand: #0d7a3d;
    --about-cta-border: rgba(22, 40, 31, 0.4);
    --about-cta-text: #1a2e22;
    background: var(--bg);
  }

  html:not([data-theme="dark"]):not([data-theme="light"]) body {
    background: var(--bg);
    color: var(--body-text);
  }

  html:not([data-theme="dark"]):not([data-theme="light"]) .about-header {
    box-shadow:
      inset 0 1px 0 rgba(255, 255, 255, 0.9),
      0 16px 30px rgba(20, 35, 26, 0.08);
  }
}

/* Explicit light (theme toggle): same palette — previously body text was dark but paragraphs stayed white. */
html[data-theme="light"] {
  color-scheme: light;
  --bg: #f0f4ee;
  --panel: rgba(255, 255, 255, 0.94);
  --panel-border: rgba(22, 37, 27, 0.12);
  --text: #142a1d;
  --body-text: #1a3024;
  --muted: rgba(23, 38, 29, 0.75);
  --nav-link: #1c3325;
  --meta-label: rgba(23, 40, 31, 0.6);
  --rule-line: rgba(22, 40, 32, 0.5);
  --about-brand: #0d7a3d;
  --about-cta-border: rgba(22, 40, 31, 0.4);
  --about-cta-text: #1a2e22;
  background: var(--bg);
}

html[data-theme="light"] body {
  background: var(--bg);
  color: var(--body-text);
}

html[data-theme="light"] .about-header {
  background: var(--panel);
  border: 1px solid var(--panel-border);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.9),
    0 12px 28px rgba(20, 35, 26, 0.1);
}
