:root {
  /* Light theme */
  --bg1: #fff;
  --bg2: #f8f9fa;
  --bg3: rgba(209,218,224,0.5);
  --tx1: #5C6165;
  --tx2: #8A9199;
  --tx3: #AAAEB0;
  --ui1: #E6EAED;
  --color-blue: #399ee6;
  --hl1: rgba(3,91,214,0.15);
  
  /* HSL Color Variables - Light Theme */
  --accent-h: 36;
  --accent-s: 100%;
  --accent-l: 50%;
  --accent: hsl(var(--accent-h), var(--accent-s), var(--accent-l));
  --accent-light: hsl(var(--accent-h), var(--accent-s), 70%);
  --accent-lighter: hsl(var(--accent-h), var(--accent-s), 85%);
  --accent-dark: hsl(var(--accent-h), var(--accent-s), 30%);
  --accent-darker: hsl(var(--accent-h), var(--accent-s), 20%);
  --accent-muted: hsl(var(--accent-h), 50%, var(--accent-l));
  --accent-bg: hsl(var(--accent-h), var(--accent-s), 95%);
  --accent-border: hsl(var(--accent-h), var(--accent-s), 80%);
}

@media (prefers-color-scheme: dark) {
  :root {    
    /* Dark theme */
    --bg1: #232937;
    --bg2: #1E2431;
    --bg3: rgba(51,61,80,0.5);
    --tx1: #cccac2;
    --tx2: #707A8C;
    --tx3: #495063;
    --ui1: #333C4A;
    --color-blue: #73d0ff;
    --hl1: rgba(64,159,255,0.25);
  }
      /* HSL Color Variables - Dark Theme */
    --accent-h: 35;
    --accent-s: 100%;
    --accent-l: 60%;
    --accent: hsl(var(--accent-h), var(--accent-s), var(--accent-l));
    --accent-light: hsl(var(--accent-h), var(--accent-s), 75%);
    --accent-lighter: hsl(var(--accent-h), var(--accent-s), 85%);
    --accent-dark: hsl(var(--accent-h), var(--accent-s), 40%);
    --accent-darker: hsl(var(--accent-h), var(--accent-s), 25%);
    --accent-muted: hsl(var(--accent-h), 60%, var(--accent-l));
    --accent-bg: hsl(var(--accent-h), var(--accent-s), 15%);
    --accent-border: hsl(var(--accent-h), var(--accent-s), 25%);
}


@font-face {
    font-family: 'EB Garamond';
    src: url('/fonts/eb-garamond-regular.woff2') format('woff2'),
        url('/fonts/eb-garamond-regular.woff') format('woff');
    font-weight: normal;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'EB Garamond';
    src: url('/fonts/eb-garamond-italic.woff2') format('woff2'),
        url('/fonts/eb-garamond-italic.woff') format('woff');
    font-weight: normal;
    font-style: italic;
    font-display: swap;
}

@font-face {
    font-family: 'EB Garamond';
    src: url('/fonts/EBGaramond-SemiBold.woff2') format('woff2');
    font-weight: 600;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'EB Garamond';
    src: url('/fonts/EBGaramond-SemiBoldItalic.woff2') format('woff2');
    font-weight: 600;
    font-style: italic;
    font-display: swap;
}

@font-face {
    font-family: 'EB Garamond';
    src: url('/fonts/EBGaramond-Bold.woff2') format('woff2');
    font-weight: 700;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'EB Garamond';
    src: url('/fonts/EBGaramond-BoldItalic.woff2') format('woff2');
    font-weight: 700;
    font-style: italic;
    font-display: swap;
}

@font-face {
    font-family: 'Cormorant Garamond';
    src: url('/fonts/cormorant-garamond-light.woff2') format('woff2'),
        url('/fonts/cormorant-garamond-light.woff') format('woff');
    font-weight: 300;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Cormorant Garamond';
    src: url('/fonts/cormorant-garamond-light-italic.woff2') format('woff2'),
        url('/fonts/cormorant-garamond-light-italic.woff') format('woff');
    font-weight: 300;
    font-style: italic;
    font-display: swap;
}

body {
  max-width: none;
  margin: 0;
  padding: 0;
  font-family: 'EB Garamond', 'Cormorant Garamond', Georgia, serif;
  font-weight: 300;
  font-size: 18px;
  line-height: 1.6em;
  color: var(--tx1);
  background-color: var(--bg1);
}

.container {
  display: flex;
  max-width: 1200px;
  margin: 0 auto;
  gap: 2rem;
  flex-direction: row-reverse;
}

.main-content {
  flex: 1;
  max-width: 40em; 
  padding: 5px 1rem;
}

.sidebar {
  width: 240px; 
  background-color: var(--bg2);
  padding: 2rem 1.5rem 1.5rem 1.5rem;
  border-radius: 8px;
  height: fit-content;
  position: sticky;
  top: 2rem;
}

.sidebar-nav {
  margin-bottom: 1rem;
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.sidebar-nav a {
  color: var(--tx3);
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  border-bottom: 1px solid var(--ui1); 
  padding-bottom: 0.2rem; 
  display: inline-block;
}

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

.sidebar-inactive {
  color: var(--tx3);
  font-size: 0.9rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.search-box {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 1rem;
}

.search-box input {
  flex: 1;
  background-color: var(--bg1);
  border: 1px solid var(--ui1);
  color: var(--tx1);
  padding: 0.5rem;
  border-radius: 4px;
  font-family: 'EB Garamond', 'Cormorant Garamond', Georgia, serif;
  font-size: 0.9rem;
  text-transform: uppercase;
}

.search-box input::placeholder {
  color: var(--tx2);
  text-transform: uppercase;
}

.search-box button {
  background-color: var(--accent);
  color: var(--bg1);
  border: none;
  padding: 0.5rem 1rem;
  border-radius: 4px;
  cursor: pointer;
  font-family: 'EB Garamond', 'Cormorant Garamond', Georgia, serif;
  font-size: 0.9rem;
  font-weight: 600;
}

.search-box button:hover {
  background-color: var(--accent-dark);
}

.sidebar-section {
  margin-bottom: 2rem;
}

.sidebar-section:last-child {
  margin-bottom: 0;
}

.sidebar-section h3 {
  color: var(--tx3);
  font-size: 1.1rem;
  font-weight: 600;
  margin-bottom: 1rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.sidebar-section:nth-child(2) h3,
.sidebar-section:nth-child(3) h3 {
  border-bottom: 1px solid var(--ui1);
  padding-bottom: 0.5rem;
}

.sidebar #sidebar-newsletter input {
  background-color: var(--bg1);
  border: 1px solid var(--ui1);
  color: var(--tx1);
  padding: 0.5rem;
  border-radius: 4px;
  font-family: 'EB Garamond', 'Cormorant Garamond', Georgia, serif;
  font-size: 0.9rem;
}

.sidebar #newsletter input::placeholder {
  color: var(--tx2);
}

.newsletter-form button {
margin-top: 0.75rem;
  background-color: var(--accent);
  color: var(--bg1);
  border: none;
  padding: 0.5rem 1rem;
  border-radius: 4px;
  cursor: pointer;
  font-family: 'EB Garamond', 'Cormorant Garamond', Georgia, serif;
  font-size: 0.9rem;
  font-weight: 600;
}

.newsletter-form button:hover {
  background-color: var(--accent-dark) !important;
}

.sidebar .newsletter-form input {
  background-color: var(--bg1);
  border: 1px solid var(--ui1);
  color: var(--tx1);
  padding: 0.5rem;
  border-radius: 4px;
  font-family: 'EB Garamond', 'Cormorant Garamond', Georgia, serif;
  font-size: 0.9rem;
}

.sidebar .newsletter-form input::placeholder {
  color: var(--tx2);
}

.sidebar .newsletter-message .success,
.sidebar .newsletter-message .error {
  font-size: 0.8rem;
  margin-top: 0.5rem;
}

a {
  color: var(--accent); 
  text-decoration: underline;
  font-weight: normal;
}

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

a:visited {
  color: var(--accent-muted); 
}


h1 {
  color: var(--accent);
  font-family: 'EB Garamond', 'Cormorant Garamond', Georgia, serif;
  font-weight: 700;
}

h1 a {
  color: var(--accent) !important; 
  text-decoration: none;
}

h1 a:visited {
  color: var(--accent-muted) !important; 
}

h1 a:hover {
  color: var(--accent-dark);
  text-decoration: underline;
}

h2 {
  color: var(--tx1);
  font-family: 'EB Garamond', 'Cormorant Garamond', Georgia, serif;
  font-weight: 700; 
  font-size: 1.6em;
}

h2 a {
  color: var(--tx1); 
  text-decoration: none;
}

h2 a:hover {
  text-decoration: underline;
}

h3 {
  color: var(--tx2);
  font-family: 'EB Garamond', 'Cormorant Garamond', Georgia, serif;
  font-weight: 600; 
  font-size: 1.3em;
}

h3 a {
  color: var(--tx2);
  text-decoration: none;
}

h3 a:hover {
  text-decoration: underline;
}

h4 {
  color: var(--accent);
  font-family: 'EB Garamond', 'Cormorant Garamond', Georgia, serif;
  font-weight: 600; 
  font-size: 1.2em;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

h4 a {
  color: var(--accent);
  text-decoration: none;
}

h4 a:visited {
  color: var(--accent-muted); 
}

h4 a:hover {
  color: var(--accent-dark);
  text-decoration: underline;
}

h5 {
  color: var(--tx2);
  font-family: 'EB Garamond', 'Cormorant Garamond', Georgia, serif;
  font-weight: 600; 
  font-size: 1.1em;
}

h5 a {
  color: var(--tx2);
  text-decoration: none;
}

h5 a:hover {
  text-decoration: underline;
}

h6 {
  color: var(--tx3);
  font-family: 'EB Garamond', 'Cormorant Garamond', Georgia, serif;
  font-weight: 600; 
  font-size: 1em;
}

h6 a {
  color: var(--tx3);
  text-decoration: none;
}

h6 a:hover {
  text-decoration: underline;
}

strong, b {
  color: var(--tx1);
  font-weight: 600; 
}

em, i {
  color: hsl(var(--accent-h), 30%, calc(var(--accent-l) - 10%));
  font-style: italic;
  font-weight: 400;
}

date {
  display: block;
  margin-bottom: 1em; 
  color: var(--tx3);
  font-size: 0.9em;
}

tags {
  display: none;
}

blockquote {
  border-left: 3px solid hsl(var(--accent-h), 40%, 60%);
  margin: 0 0 0 1em;
  padding: 0.75em 1em 0.75em 1.5em;
  font-style: normal;
  background-color: hsl(var(--accent-h), 30%, 95%);
  color: var(--tx2);
  border-radius: 0 4px 4px 0;
  font-size: inherit;
}

form label {
  display: block;
  margin-bottom: 0.5rem;
  font-weight: 600;
  color: var(--accent);
}


@media (prefers-color-scheme: dark) {

  strong, b {
    color: var(--tx1);
    text-shadow: 0 0 1px rgba(255, 255, 255, 0.1);
    font-weight: 600;
  }
  
  em, i {
    color: hsl(var(--accent-h), 30%, calc(var(--accent-l) + 10%));
    font-style: italic;
    background-color: hsl(var(--accent-h), 30%, 12%);
    font-weight: 400;
    padding: 0 2px;
    border-radius: 2px;
  }

  blockquote {
    background-color: hsl(var(--accent-h), 20%, 15%);
    border-left-color: hsl(var(--accent-h), 50%, 40%);
    color: var(--tx2);
  }
}

#newsletter {
  margin: 2rem 0;
  background-color: var(--bg2);
  padding: 1.5rem;
  border-radius: 8px;
  border: 1px solid var(--ui1);
}

#newsletter h3 {
  color: var(--accent);
  margin-top: 0;
}

#newsletter form {
  display: flex;
  flex-direction: column;
  gap: 0.8rem;
  margin-top: 1rem;
}

#newsletter .form-row {
  display: flex;
  gap: 1rem;
  margin-bottom: 1rem;
}

#newsletter .form-row input {
  flex: 1;
}

#newsletter input {
  background-color: var(--bg2);
  border: 1px solid var(--ui1);
  color: var(--tx1);
  padding: 0.6rem;
  border-radius: 4px;
  font-family: 'EB Garamond', 'Cormorant Garamond', Georgia, serif;
  font-size: 1rem;
}

#newsletter input::placeholder {
    color: var(--tx2);
}

#newsletter button {
  width: auto;
  background-color: var(--accent);
  color: var(--bg1);
  border: none;
  padding: 0.6rem 2rem;
  align-self: flex-start;
  border-radius: 4px;
  cursor: pointer;
  font-family: 'EB Garamond', 'Cormorant Garamond', Georgia, serif;
  font-size: 1rem;
}

#newsletter button:hover {
  background-color: var(--accent-dark);
}

#newsletter .success {
  color: var(--accent);
}

#newsletter .error {
  color: #dc3545;
}

pre {
    background: var(--bg2);
    border: 1px solid var(--ui1);
    color: var(--tx1);
    border-radius: 4px;
    padding: 12px;
    margin: 16px 0;
    overflow-x: auto;
    font-family: 'EB Garamond', 'Cormorant Garamond', Georgia, serif;
    font-size: 14px;
    line-height: 1.4;
}

code {
    font-family: 'EB Garamond', 'Cormorant Garamond', Georgia, serif;
    font-size: 0.9em;
    background: var(--bg2);
    color: var(--tx1);
}

p code, li code, h1 code, h2 code, h3 code, h4 code, h5 code, h6 code {
    background: var(--bg2);
    padding: 2px 6px;
    border-radius: 3px;
    font-size: 0.85em;
    border: 1px solid var(--ui1);
    color: var(--tx1);
}

pre code {
    background: none;
    padding: 0;
    border-radius: 0;
    font-size: inherit;
    border: none;
}

.post-navigation {
  display: flex;
  justify-content: center;
  margin: 2rem 0;
  gap: 1rem;
}

.nav-button {
  display: inline-block;
  background-color: var(--accent);
  color: var(--bg1);
  padding: 0.5rem 1rem; 
  text-align: center;
  text-decoration: none;
  border-radius: 6px; 
  font-weight: 600;
  cursor: pointer;
  width: 120px;
  font-size: 1rem; 
}

.nav-button:hover {
  background-color: var(--accent-dark);
}

body, a, h1, h2, h3, h4, h5, h6 {
  transition: color 0.2s ease, background-color 0.2s ease;
}

a:focus {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

blockquote:hover {
  border-left-color: var(--accent);
}