/* ==========================================================================
   PyDevC — Minima overrides
   Fonts: Newsreader (text) + JetBrains Mono (code)
   Theme: auto (system) + manual toggle via html[data-theme]
   ========================================================================== */

/* ---------- 1. Palette ---------- */
:root,
html[data-theme="light"] {
  --bg:          #fdfdfd;
  --bg-alt:      #f5f5f4;
  --surface:     #ffffff;
  --text:        #14161a;
  --text-muted:  #5b6068;
  --border:      #e6e6e4;
  --brand:       #2a6fdb;
  --brand-hover: #1c56b0;
  --code-bg:     #f5f5f4;
  --code-text:   #24292f;
  --shadow:      0 1px 2px rgba(0, 0, 0, .06);
}

html[data-theme="dark"] {
  /* compline palette */
  --bg:          #1a1d21;
  --bg-alt:      #22262b;
  --surface:     #1f2228;
  --text:        #f0efeb;
  --text-muted:  #8b919a;
  --border:      #3d424a;
  --brand:       #b4c0c8;
  --brand-hover: #d4ccb4;
  --code-bg:     #22262b;
  --code-text:   #e0dcd4;
  --shadow:      0 1px 2px rgba(0, 0, 0, .35);
}

/* ---------- 2. Typography ---------- */
:root {
  --font-text: "Newsreader", Georgia, "Times New Roman", serif;
  --font-mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}

body {
  font-family: var(--font-text);
  background-color: var(--bg);
  color: var(--text);
  font-size: 18px;      /* Newsreader runs small; 18px reads like Minima's 16px sans */
  line-height: 1.65;
}

h1, h2, h3, h4, h5, h6,
.site-title,
.post-title,
.page-heading,
.footer-heading {
  font-family: var(--font-text);
  letter-spacing: -0.01em;
}
h1, h2 { font-weight: 600; }
h3     { font-weight: 500; }

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

code, pre, kbd, samp, .post-meta, .button, .theme-toggle {
  font-family: var(--font-mono);
}

code {
  font-size: .85em;
  background: var(--code-bg);
  color: var(--code-text);
  padding: .15em .35em;
  border-radius: 4px;
}
pre {
  background: var(--code-bg);
  color: var(--code-text);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 1em 1.1em;
  overflow-x: auto;
}
pre code { background: none; padding: 0; }

/* ---------- 3. Chrome: header / footer ---------- */
.site-header,
.site-footer {
  background-color: var(--bg-alt);
  border-color: var(--border);
}
.site-title,
.site-title:visited { color: var(--text); font-weight: 600; }
.site-nav .page-link { color: var(--text-muted); }
.site-nav .page-link:hover { color: var(--text); }

/* Header row: nav sits to the right, theme toggle pinned at the far-right end */
.site-header .wrapper {
  display: flex;
  align-items: center;
}
.site-header .wrapper::after { display: none; }
.site-title { float: none; margin-right: auto; }
.site-nav   { float: none; }

/* ---------- 4. Theme toggle ---------- */
.theme-toggle {
  display: inline-block;
  flex: 0 0 auto;
  vertical-align: middle;
  margin-left: .6rem;
  background: none;
  border: 1px solid var(--border);
  border-radius: 6px;
  color: var(--text-muted);
  cursor: pointer;
  font-size: .9rem;
  line-height: 1;
  padding: .35rem .5rem;
}
.theme-toggle:hover { color: var(--text); border-color: var(--text-muted); }
.theme-toggle__sun,
.theme-toggle__moon { display: none; }
html[data-theme="light"] .theme-toggle__sun  { display: inline; }
html[data-theme="dark"]  .theme-toggle__moon { display: inline; }

/* On small screens the nav becomes an absolute hamburger; keep the toggle clear of it */
@media screen and (max-width: 600px) {
  .theme-toggle { margin-right: 2.75rem; }
}

/* ---------- 5. Content ---------- */
hr { border-color: var(--border); }
blockquote {
  color: var(--text-muted);
  border-left: 3px solid var(--border);
  padding-left: 1rem;
  font-style: italic;
}
table, table th, table td { border-color: var(--border); }

/* ---------- 6. Home hero ---------- */
.hero { padding: 1.75rem 0 1rem; }
.hero__avatar {
  width: 120px; height: 120px;
  border-radius: 50%;
  object-fit: cover;
  border: 1px solid var(--border);
  margin-bottom: 1rem;
}
.hero h1 { margin-bottom: .35rem; }
.hero p  { color: var(--text-muted); }

.button-row { display: flex; flex-wrap: wrap; gap: .6rem; margin-top: 1rem; }
.button {
  display: inline-flex;
  align-items: center;
  gap: .45em;
  font-size: .85rem;
  text-decoration: none;
  border: 1px solid var(--brand);
  color: var(--brand);
  border-radius: 6px;
  padding: .45rem .9rem;
}
.button:hover { background: var(--brand); color: var(--bg); text-decoration: none; }
.button--solid { background: var(--brand); color: var(--bg); }
.button--solid:hover { background: var(--brand-hover); border-color: var(--brand-hover); }

.button .icon { width: 1em; height: 1em; flex: 0 0 auto; fill: currentColor; }

/* ---------- 7. Reader Stack list ---------- */
.reader-list {
  list-style: none;
  margin: 1.25rem 0;
  padding: 0;
}
.reader-list li {
  padding: .55rem 0;
  border-bottom: 1px solid var(--border);
}
.reader-list li:first-child { border-top: 1px solid var(--border); }
.reader-list a { color: var(--text); text-decoration: none; }
.reader-list a:hover { color: var(--brand); text-decoration: underline; }

/* ---------- 8. Header nav with several items ---------- */
.site-nav .trigger { display: flex; flex-wrap: wrap; align-items: center; }
.site-nav .page-link:not(:last-child) { margin-right: 1rem; }

@media screen and (max-width: 820px) and (min-width: 601px) {
  .site-nav .page-link:not(:last-child) { margin-right: .7rem; }
  .site-nav .page-link { font-size: .85rem; }
}

