/* ==========================================================================
   Nord-Inspired Minimal Black Theme (Native System Fonts)
   Palette Accent Mapping:
   - Frost (Ice):      #88c0d0 (Links/Headings)
   - Frost (Teal):     #8fbcbb (Special Highlights)
   - Snow Storm:       #e5e9f0 (Primary Text)
   - Polar Night:      #000000 (Pure Black Canvas)
   ========================================================================== */

/* 1. Base Setup & Variables */
:root {
  --bg-black: #000000;
  --nord-snow-light: #eceff4;
  --nord-snow-main: #e5e9f0;
  --nord-snow-muted: #d8dee9;
  --nord-frost-ice: #88c0d0;
  --nord-frost-teal: #8fbcbb;
  --nord-frost-blue: #81a1c1;
  --nord-night-subtle: #2e3440;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  background-color: var(--bg-black);
  color: var(--nord-snow-main);
  line-height: 1.5;

  font-size: 16px;
}

/* 2. Centered Layout & 80-Character Limit */
body {
  /* Center page content */
  margin-left: auto;
  margin-right: auto;
  padding: 2rem 1rem;

  /* Limit width to exactly 80 characters */
  max-width: 80ch;
  width: 100%;

  /* Word wrap protection for long strings/URLs */
  overflow-wrap: break-word;
  word-break: break-word;

  font-family: 'Times New Roman', Times, serif;

}

/* 3. Headings & Structural Elements */
h1, h2, h3, h4, h5, h6 {
  color: var(--nord-snow-light);
  font-family: 'Times New Roman', Times, serif;
  font-weight: 600;
  line-height: 1.25;
  margin-top: 1.8rem;
  margin-bottom: 0.8rem;
}

h1 {
  color: var(--nord-frost-ice);
  margin-top: 0;
}

p, ul, ol, dl, blockquote, pre, table {
  margin-bottom: 1.2rem;
}

/* 4. Links & Interactive States */
a {
  color: var(--nord-frost-ice);
  text-decoration: underline;
  text-underline-offset: 3px;
}

a:hover,
a:focus {
  color: var(--nord-frost-teal);
}

a:visited {
  color: var(--nord-frost-blue);
}

/* 5. Lists */
ul, ol {
  padding-left: 1.5rem;
}

li {
  margin-bottom: 0.3rem;
}

/* 6. Code & Monospace Blocks */
code, pre, kbd {
  /* Native monospace stack (matches terminal/code editors on the user's OS) */
  font-family: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas,
               "Liberation Mono", monospace;
}

code {
  background-color: var(--nord-night-subtle);
  color: var(--nord-frost-ice);
  padding: 0.15em 0.4em;
  border-radius: 3px;
}

pre {
  background-color: var(--nord-night-subtle);
  padding: 1rem;
  border-radius: 4px;
  overflow-x: auto;
  white-space: pre-wrap; /* Ensures code wraps within the 80ch limit */
}

pre code {
  background-color: transparent;
  padding: 0;
  color: inherit;
}

/* 7. Quotes & Subtle Dividers */
blockquote {
  border-left: 3px solid var(--nord-frost-ice);
  padding-left: 1rem;
  color: var(--nord-snow-muted);
  font-style: italic;
}

hr {
  border: 0;
  border-top: 1px solid var(--nord-night-subtle);
  margin: 2rem 0;
}

/* 8. Simple Tables */
table {
  width: 100%;
  border-collapse: collapse;
}

th, td {
  padding: 0.5rem;
  text-align: left;
  border-bottom: 1px solid var(--nord-night-subtle);
}

th {
  color: var(--nord-snow-light);
}
