/* ===== Brand color tokens for light mode ===== */
:root,
[data-theme="light"] {
  --brand-black: rgb(28, 24, 18);
  --brand-gold: rgb(189, 151, 76);
  --brand-text-light: rgb(95, 84, 67);
  --brand-cream: rgb(247, 241, 227);
  --brand-cream-2: rgb(255, 250, 239);

  --theme: var(--brand-cream);
  --entry: var(--brand-cream-2);
  --primary: var(--brand-text-light);
  --secondary: var(--brand-text-light);
  --tertiary: rgb(217, 202, 166);
  --content: var(--brand-text-light);
  --code-bg: rgb(241, 233, 216);
  --code-block-bg: rgb(31, 27, 22);
  --border: rgb(211, 190, 141);
  color-scheme: light;
}

/* ===== Dark mode theme tokens ===== */
[data-theme="dark"] {
  --theme: rgb(31, 27, 26);
  --entry: rgb(31, 27, 26);
  --primary: rgb(247, 238, 215);
  --secondary: rgb(201, 183, 144);
  --tertiary: rgb(90, 76, 48);
  --content: rgb(225, 210, 176);
  --code-bg: rgb(31, 27, 26);
  --code-block-bg: rgb(30, 25, 19);
  --border: rgb(139, 113, 56);
  color-scheme: dark;
}

/* ===== Global typography ===== */
body {
  font-family: Georgia, serif;
  line-height: 1.7;
}

/* ===== Page surface backgrounds ===== */
.list {
  background: var(--code-bg);
}

.about-page {
  background: var(--code-bg);
}

[data-theme="dark"] .list {
  background: var(--theme);
}

[data-theme="dark"] .about-page {
  background: var(--theme);
}

/* Force dark background on key containers (overrides theme defaults when needed). */
html[data-theme="dark"] body,
[data-theme="dark"] body,
html[data-theme="dark"] .list,
[data-theme="dark"] .list,
html[data-theme="dark"] .about-page,
[data-theme="dark"] .about-page,
html[data-theme="dark"] .post-single,
[data-theme="dark"] .post-single,
html[data-theme="dark"] .archive-post,
[data-theme="dark"] .archive-post,
html[data-theme="dark"] .toc,
[data-theme="dark"] .toc,
html[data-theme="dark"] .terms-tags a,
[data-theme="dark"] .terms-tags a {
  background-color: #1f1b1a !important;
}

/* ===== Card-like containers ===== */
.post-single,
.archive-post,
.terms-tags a,
.toc {
  background: var(--entry);
  border-color: var(--border);
}

/* Match single post pages to your about-page card style. */
.post-single {
  margin-bottom: var(--gap);
  padding: var(--gap);
  border-radius: var(--radius);
  background: var(--entry);
  border: 1px solid var(--brand-gold);
  border-left: 4px solid var(--brand-gold);
}

/* ===== Headings and links ===== */
h1,
h2,
h3,
h4,
h5,
h6 {
  color: var(--brand-gold);
  font-weight: 600;
}

[data-theme="light"] h1,
[data-theme="light"] h2,
[data-theme="light"] h3,
[data-theme="light"] h4,
[data-theme="light"] h5,
[data-theme="light"] h6 {
  color: var(--brand-text-light);
}

a {
  color: var(--brand-gold);
}

[data-theme="light"] a {
  color: var(--brand-text-light);
}

a:hover {
  opacity: 0.9;
}

.main {
  max-width: 760px;
}

.post-entry {
  border-left: 4px solid var(--brand-gold);
}



/* ===== Header and logo layout ===== */
.header,
.nav {
  border-bottom: 1px solid var(--border);
}

.logo a {
  position: relative;
  display: block;
  width: 150px;
  height: 42px;
}

.site-logo {
  position: absolute;
  top: 0;
  left: 0;
  width: 150px;
  height: auto;
  display: block;
}

.nav {
  align-items: flex-start;
}

.logo {
  margin-right: auto;
}

/* ===== Footer and social links ===== */
.footer {
  padding: 1rem 0;
  border-top: 1px solid var(--border);
}

.home-page .page-footer {
  display: none;
}

.footer-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
}

.social-links {
  display: flex;
  gap: 0.6rem;
  list-style: none;
  margin: 0;
  padding: 0;
  align-items: center;
}

.social-item {
  margin: 0;
  padding: 0;
  display: inline-block;
}

.social-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  color: var(--primary);
  background: transparent;
  border: 1px solid transparent;
  border-radius: 6px;
  text-decoration: none;
  transition: background 0.15s, color 0.15s, transform 0.08s, border-color 0.15s;
}

.social-link:hover {
  background: var(--entry);
  border-color: var(--border);
  color: var(--brand-gold);
  transform: translateY(-1px);
}

.icon {
  width: 20px;
  height: 20px;
  fill: currentColor;
  display: block;
}

/* ===== Home page profile block ===== */
.home-info img {
  width: 180px;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  border-radius: 50%;
}

.first-entry.home-info,
.home-info .entry-header,
.home-info .entry-content,
.home-info .entry-content p {
  text-align: center;
}

.home-info .entry-content {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.home-info .entry-header h1 {
  font-size: 34px;
}

.home-info .entry-content p strong {
  font-size: 17px;
  display: inline-block;
  margin-top: 14px;
}

[data-theme="dark"] .home-info .entry-content p strong {
  color: var(--brand-gold);
}

/* ===== Comments section ===== */
.comments-section {
  margin-top: calc(var(--gap) * 1.25);
  padding-top: var(--gap);
  border-top: 1px solid var(--border);
}

.comments-heading {
  margin: 0 0 1rem;
  color: var(--brand-gold);
  font-size: 1.35rem;
  font-weight: 600;
}

[data-theme="light"] .comments-heading {
  color: var(--brand-text-light);
}

.comments-note {
  margin: 0;
  padding: 0.85rem 1rem;
  border: 1px dashed var(--border);
  border-radius: var(--radius);
  background: var(--entry);
  color: var(--secondary);
}
