:root {
  --bg: #0e0e0e;
  --text: #e6e6e6;
  --muted: #9a9a9a;
  --accent: #ffffff;
}

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

html {
  font-size: 16px;
}

body {
  margin: 0;
  background-color: var(--bg);
  color: var(--text);
  font-family: "Open Sans", system-ui, sans-serif;
  line-height: 1.75;
}

.site-header {
  padding: 4rem 1.5rem 2rem;
  text-align: center;
}

.site-header h1 {
  margin: 0;
  font-family: "Montserrat", sans-serif;
  font-weight: 700;
  font-size: clamp(2.2rem, 5vw, 3rem);
  letter-spacing: 0.04em;
}

.content {
  max-width: 720px;
  margin: 0 auto;
  padding: 0 1.5rem 4rem;
}

article p {
  margin: 0 0 2rem;
  font-size: 1.05rem;
  text-align: justify;
  text-align-last: left;
  text-justify: inter-word;
  hyphens: auto;
}

article p:last-child {
  margin-bottom: 0;
}

.site-footer {
  text-align: center;
  padding: 2rem 1.5rem;
  font-size: 0.85rem;
  color: var(--muted);
  border-top: 1px solid rgba(255, 255, 255, 0.05);
}

@media (min-width: 900px) {
  html {
    font-size: 17px;
  }
}

::selection {
  background: rgba(255, 255, 255, 0.15);
}


.tooltip {
  position: relative;
  text-decoration: underline dotted rgba(255, 255, 255, 0.3);
  text-decoration-thickness: 1px; 
  text-underline-offset: 2px;
  cursor: help;
}

.tooltip-popup {
  position: fixed;
  top: 0;
  left: 0;

  max-width: 350px;
  width: max-content;

  background-color: var(--accent);
  color: var(--bg);
  padding: 0.5rem 0.75rem;
  border-radius: 4px;
  font-size: 0.85rem;
  line-height: 1.4;
  box-shadow: 0 4px 14px rgba(0,0,0,0.3);
  z-index: 1000;
  pointer-events: none;

  text-align: center;

  opacity: 0;
  transition: opacity 0.15s ease-in-out;
}

.tooltip-popup.is-visible {
  opacity: 1;
}

.a11y-btn {
  background: transparent;
  border: 1px solid var(--muted);
  color: var(--text);
  padding: 0.5rem 1rem;
  border-radius: 2rem;
  cursor: pointer;
  font-family: "Open Sans", sans-serif;
  font-weight: 700;
  margin-top: 1rem;
  transition: all 0.2s ease;
}

.a11y-btn:hover {
  border-color: var(--accent);
  color: var(--accent);
}

body.reader-mode {
  --bg: #222222;
  --text: #f0f0f0;
}

body.reader-mode article p {
  text-align: left;
  text-align-last: auto;
  text-justify: auto;
  hyphens: none;

  font-family: "Verdana", "Arial", sans-serif;
  line-height: 2;
  letter-spacing: 0.03em;
  word-spacing: 0.1em;
}

body.reader-mode .a11y-btn {
  background-color: var(--accent);
  color: var(--bg);
}

.side-nav {
  display: none;
}

@media (min-width: 1250px) {
  .side-nav {
    display: block;
    position: fixed;
    top: 50%;
    left: 2rem;
    transform: translateY(-50%);
    width: 200px;
    z-index: 10;
  }

  .side-nav ul {
    list-style: none;
    padding: 0;
    margin: 0;
    border-left: 1px solid rgba(255, 255, 255, 0.1);
  }

  .side-nav li {
    margin-bottom: 0.8rem;
  }

  .side-nav a {
    display: block;
    padding-left: 1.5rem;
    color: var(--muted);
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 500;
    transition: all 0.2s ease;
    border-left: 2px solid transparent;
    margin-left: -1px;
  }

  .side-nav a:hover {
    color: var(--accent);
    border-left-color: var(--accent);
    padding-left: 1.8rem;
  }
}

html {
  scroll-behavior: smooth;
}
