/* ============================================================
   THEME VARIABLES
   Controlled via: <html data-theme="light|dark|grayscale|high-contrast">
   ============================================================ */

/* ---- Light (default) ---- */
:root {

  --text-xl: 0.75rem;
  --text-md: 1.25rem;
  --text-lg: 2rem;

  --text-def: white;
  --text-def-inverse: rgb(0, 0, 0);
  --text-def-hover: #9bd5f9;

  --evhrdc-bg: #0194d6;
  --ink: #1a1a2e;
  --cream: #f5f0e8;
  --sand: #e8dfd0;
  --rust: #c0533a;
  --sage: #4a7c6f;
  --mist: #dce8e5;
  --shadow: rgba(26, 26, 46, 0.10);
  --box-title: white;
}

:root,
[data-theme="light"] {
  --bg-primary: #ffffff;
  --bg-secondary: #2694d9;
  --bg-card: #ffffff;
  --bg-code: #f0ece5;

  --text-primary: #000000;
  --text-secondary: #000000;
  --text-muted: #7a736a;
  --text-inverse: #f8f5f0;

  --accent-primary: #c0392b;
  --accent-hover: #a93226;
  --accent-subtle: rgba(192, 57, 43, 0.08);

  --border-subtle: rgba(71, 71, 71, 0.664);
  --border-default: rgba(0, 0, 0, 0.14);
  --border-strong: rgba(0, 0, 0, 0.30);

  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.08);
  --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.10);
  --shadow-lg: 0 12px 32px rgba(0, 0, 0, 0.12);

  --nav-bg: #2694d9;
  --overlay: rgba(26, 23, 20, 0.50);
}

/* ---- Dark ---- */
[data-theme="dark"] {
  --bg-primary: #141210;
  --bg-secondary: #1e1b18;
  --bg-card: #252220;
  --bg-code: #1a1714;

  --text-primary: #e8e2d9;
  --text-secondary: #b0a898;
  --text-muted: #7a7068;
  --text-inverse: #e8e2d9;

  --accent-primary: #e05a4a;
  --accent-hover: #e8705f;
  --accent-subtle: rgba(224, 90, 74, 0.12);

  --border-subtle: rgba(255, 255, 255, 0.06);
  --border-default: rgba(255, 255, 255, 0.10);
  --border-strong: rgba(255, 255, 255, 0.22);

  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.30);
  --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.40);
  --shadow-lg: 0 12px 32px rgba(0, 0, 0, 0.50);

  --nav-bg: rgba(20, 18, 16, 0.92);
  --overlay: rgba(0, 0, 0, 0.65);
}

/* ---- Grayscale ---- */
[data-theme="grayscale"] {
  --bg-primary: #f2f2f2;
  --bg-secondary: #e4e4e4;
  --bg-card: #ffffff;
  --bg-code: #ebebeb;

  --text-inverse: #e8e2d9;
  --text-secondary: #444444;
  --text-muted: #777777;
  --text-inverse: #e8e2d9;

  --accent-primary: #333333;
  --accent-hover: #111111;
  --accent-subtle: rgba(0, 0, 0, 0.06);

  --border-subtle: rgba(0, 0, 0, 0.07);
  --border-default: rgba(0, 0, 0, 0.14);
  --border-strong: rgba(0, 0, 0, 0.28);

  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.07);
  --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.09);
  --shadow-lg: 0 12px 32px rgba(0, 0, 0, 0.11);

  --nav-bg: rgba(242, 242, 242, 0.92);
  --overlay: rgba(17, 17, 17, 0.50);
}

/* ---- High Contrast ---- */
[data-theme="high-contrast"] {
  --bg-primary: #000000;
  --bg-secondary: #0a0a0a;
  --bg-card: #000000;
  --bg-code: #0d0d0d;

  --text-primary: #ffffff;
  --text-secondary: #eeeeee;
  --text-muted: #cccccc;
  --text-inverse: #000000;

  --accent-primary: #ffff00;
  --accent-hover: #fffb80;
  --accent-subtle: rgba(255, 255, 0, 0.10);

  --border-subtle: rgba(255, 255, 255, 0.30);
  --border-default: rgba(255, 255, 255, 0.60);
  --border-strong: #ffffff;

  --shadow-sm: 0 0 0 1px #ffffff;
  --shadow-md: 0 0 0 2px #ffffff;
  --shadow-lg: 0 0 0 3px #ffffff;

  --nav-bg: #000000;
  --overlay: rgba(0, 0, 0, 0.85);
}

/* ============================================================
   RESET & BASE
   ============================================================ */

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

html {
  font-size: 16px;
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  background-color: var(--bg-primary);
  color: var(--text-primary);
  /* font-family: 'Lora', 'Georgia', serif; */
  font-family: "Helvetica Neue", Helvetica, Roboto, Arial, sans-serif;
  font-size: 1.0625rem;
  line-height: 1.5;
  font-weight: normal;
  -webkit-font-smoothing: antialiased;
  padding: 0;
  margin: 0;
  transition: background-color 0.2s ease, color 0.2s ease;
}

/* ============================================================
   TYPOGRAPHY
   ============================================================ */

h1,
h2,
h3,
h4,
h5,
h6 {
  /* font-family: 'Playfair Display', 'Georgia', serif; */
  font-weight: 700;
  line-height: 1.2;
  color: var(--text-primary);
  letter-spacing: -0.01em;
}

h1 {
  font-size: clamp(2rem, 5vw, 3.25rem);
}

h2 {
  font-size: clamp(1.5rem, 3.5vw, 2.25rem);
}

h3 {
  font-size: clamp(1.2rem, 2.5vw, 1.65rem);
}

h4 {
  font-size: 1.25rem;
}

h5 {
  font-size: 1.1rem;
}

h6 {
  font-size: 1rem;
}

p {
  margin-bottom: 1.25rem;
  /* text-align: justify; */
}

p:last-child {
  margin-bottom: 0;
  text-align: justify;
}

a {
  color: var(--accent-primary);
  text-decoration: none;
  text-underline-offset: 3px;
  text-decoration-thickness: 1px;
  transition: color 0.15s ease, text-decoration-color 0.15s ease;
}

a:hover {
  color: var(--accent-hover);
}

[data-theme="high-contrast"] a {
  text-decoration-thickness: 2px;
}

strong,
b {
  font-weight: 700;
}

em,
i {
  font-style: italic;
}

small {
  font-size: 0.8125rem;
}

blockquote {
  border-left: 3px solid var(--accent-primary);
  padding: 0.75rem 1.25rem;
  margin: 1.5rem 0;
  background: var(--accent-subtle);
  color: var(--text-secondary);
  font-style: italic;
  border-radius: 0 4px 4px 0;
}

code {
  font-family: 'JetBrains Mono', 'Fira Code', monospace;
  font-size: 0.875em;
  background: var(--bg-code);
  color: var(--accent-primary);
  padding: 0.15em 0.4em;
  border-radius: 3px;
  border: 1px solid var(--border-subtle);
}

pre {
  background: var(--bg-code);
  border: 1px solid var(--border-default);
  border-radius: 6px;
  padding: 1.25rem 1.5rem;
  overflow-x: auto;
  margin: 1.5rem 0;
}

pre code {
  background: none;
  border: none;
  padding: 0;
  font-size: 0.875rem;
  color: var(--text-primary);
}

hr {
  border: none;
  border-top: 1px solid var(--border-default);
  margin: 2.5rem 0;
}

/* Lists */
/* ul,
ol {
  padding-left: 1.5rem;
  margin-bottom: 1.25rem;
} */

/* li {
  margin-bottom: 0.35rem;
} */

/* li:last-child {
  margin-bottom: 0;
} */

/* Tables */
table {
  width: 100%;
  border-collapse: collapse;
  margin: 1.5rem 0;
  font-size: 0.9375rem;
}

th {
  background: var(--bg-secondary);
  color: var(--text-primary);
  font-weight: 700;
  text-align: left;
  padding: 0.6rem 1rem;
  border-bottom: 2px solid var(--border-strong);
}

td {
  padding: 0.6rem 1rem;
  border-bottom: 1px solid var(--border-subtle);
  color: var(--text-secondary);
}

tr:last-child td {
  border-bottom: none;
}

tr:hover td {
  background: var(--accent-subtle);
}

/* Images */
img {
  /* width: 100%; */
  max-width: 100%;
  height: auto;
  display: block;
}

/* Focus styles (accessibility) */
:focus-visible {
  outline: 2px solid var(--accent-primary);
  outline-offset: 3px;
  border-radius: 2px;
}

[data-theme="high-contrast"] :focus-visible {
  outline: 3px solid var(--accent-primary);
  outline-offset: 2px;
}




/* Pre Hero */
.pst-time-container{
    display: flex;
    flex-direction: row;
}

.pst-container{
    justify-items: center;
}

.custom-hero{
  font-size: 3.5rem;
  color: white;
  font-weight: 600;
}


/* Pagination */
.pagination {
    display: flex;
    gap: 2rem;
    align-items: center;
    justify-content: center;
}


.article-item:not(:last-child) {
  border-bottom: 2px solid rgb(224, 224, 224);
  margin-bottom: 1em;
}