/* Recreates the Kadence look paulmwebb.info had on WordPress:
   near-black background, gold accents, boxed content card. */
:root {
  --gold: #b99128;          /* palette1 */
  --gold-light: #d4ab3f;    /* palette2 */
  --text-strong: #f2f2f2;   /* palette3 */
  --text: #d6d6d6;          /* palette4 */
  --text-muted: #b5b5b5;    /* palette5 */
  --text-faint: #8a8a8a;    /* palette6 */
  --surface-2: #2a2a2a;     /* palette7 */
  --bg: #111111;            /* palette8 */
  --surface: #191919;       /* palette9 */
  --content-width: 1100px;
  --edge: 1.5rem;
  --heading-font: Montserrat, sans-serif;
  --body-font: "Open Sans", sans-serif;
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 17px/1.6 var(--body-font);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}
main { flex: 1; }
img { max-width: 100%; height: auto; }

a { color: var(--gold-light); text-underline-offset: 2px; }
a:hover { color: var(--gold); }
:focus-visible { outline: 2px solid var(--gold-light); outline-offset: 2px; }

h1, h2, h3, h4 { font-family: var(--heading-font); font-weight: 600; color: var(--text-strong); line-height: 1.3; }

.skip-link { position: absolute; left: -9999px; }
.skip-link:focus { left: 1rem; top: 1rem; background: var(--surface); padding: .5rem 1rem; z-index: 10; }

.wrap { max-width: var(--content-width); margin: 0 auto; padding: 0 var(--edge); }

/* Header */
#masthead { background: var(--surface); border-bottom: 2px solid var(--gold); }
.header-inner { display: flex; align-items: center; justify-content: space-between; min-height: 80px; flex-wrap: wrap; }
.site-title { font: 600 41px/1.2 var(--heading-font); color: var(--text-strong); text-decoration: none; }
.site-title:hover { color: var(--text-strong); }
.main-nav ul { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; }
.main-nav a { display: block; padding: .6em .6em; color: var(--text-muted); text-decoration: none; }
.main-nav a:hover, .main-nav a[aria-current] { color: var(--gold); }

.nav-toggle { position: absolute; opacity: 0; pointer-events: none; }
.nav-toggle-label { display: none; cursor: pointer; padding: .4em .6em; color: var(--text-muted); }
.nav-toggle-label span, .nav-toggle-label span::before, .nav-toggle-label span::after {
  display: block; width: 22px; height: 2px; background: currentColor; position: relative; content: "";
}
.nav-toggle-label span::before { position: absolute; top: -7px; }
.nav-toggle-label span::after { position: absolute; top: 7px; }

@media (max-width: 1024px) { .site-title { font-size: 36px; } }
@media (max-width: 767px) {
  .site-title { font-size: 30px; }
  .header-inner { min-height: 64px; }
  .nav-toggle-label { display: block; padding: 1em .6em; }
  .main-nav { display: none; width: 100%; }
  .nav-toggle:checked ~ .main-nav { display: block; }
  .nav-toggle:focus-visible + .nav-toggle-label { outline: 2px solid var(--gold-light); }
  .main-nav ul { flex-direction: column; padding-bottom: .5rem; }
  .main-nav a { padding: 1em 0; border-bottom: 1px solid rgba(255,255,255,.1); color: var(--text); }
}

/* Title band */
.entry-hero { text-align: center; padding: 2.5rem var(--edge) 1.5rem; }
.entry-hero h1 { margin: 0; font-size: 2.2rem; }
.entry-meta { margin: .4rem 0; color: var(--text-faint); font-size: .9rem; }
.cat {
  display: inline-block; margin: 0 .25rem; padding: .1em .6em; border-radius: 3px;
  background: var(--surface-2); color: var(--gold-light); font-size: .75rem;
  text-transform: uppercase; letter-spacing: .05em;
}
@media (max-width: 767px) {
  .entry-hero { padding-top: 1.5rem; padding-bottom: 1rem; }
  .entry-hero h1 { font-size: 1.7rem; }
}

/* Content card */
.card { background: var(--surface); padding: 2rem; border-radius: 2px; }
article.wrap.card { padding: 2rem; max-width: calc(var(--content-width) - 2 * var(--edge)); }
@media (max-width: 1100px) { article.wrap.card { margin: 0 var(--edge); } }
@media (max-width: 767px) {
  .card, article.wrap.card { padding: 1.5rem; }
  article.wrap.card { margin: 0; border-radius: 0; }
}

.entry-content h2 { margin-top: 2em; margin-bottom: .45em; }
.entry-content h3 { margin-top: 1.6em; margin-bottom: .4em; }
.entry-content > h2:first-child, .entry-content > h3:first-child { margin-top: 0; }
.entry-content li { margin-bottom: .4em; }

code {
  font-family: ui-monospace, "Cascadia Code", Consolas, monospace; font-size: .88em;
  background: var(--surface-2); padding: .1em .35em; border-radius: 3px; color: var(--text-strong);
}
pre {
  background: #0b0b0b; border: 1px solid var(--surface-2); border-left: 3px solid var(--gold);
  padding: 1rem 1.25rem; overflow-x: auto; line-height: 1.45; border-radius: 2px;
}
pre code { background: none; padding: 0; font-size: .85rem; color: var(--text); }

/* Home page doodle with the gold glow */
.doodle { margin: 0 auto 1.5rem; text-align: center; }
.doodle img {
  width: 420px;
  filter: drop-shadow(0 0 1.5px #d4ab3f) drop-shadow(0 0 1.5px #d4ab3f) drop-shadow(0 0 8px rgba(212,171,63,.45));
}

/* Blog list */
.post-list { display: grid; gap: 1.5rem; }
.post-summary h2 { margin: .2rem 0; font-size: 1.5rem; }
.post-summary h2 a { color: var(--text-strong); text-decoration: none; }
.post-summary h2 a:hover { color: var(--gold); }
.more { font-weight: 600; }
.post-nav { margin-top: 1.5rem; }

/* Footer */
#colophon { margin-top: 3rem; padding: 1.5rem var(--edge); background: var(--surface); text-align: center; color: var(--text-faint); font-size: .9rem; }
#colophon ul { list-style: none; margin: 0 0 .5rem; padding: 0; display: flex; justify-content: center; gap: 1.2rem; }
#colophon a { color: var(--text-muted); text-decoration: none; }
#colophon a:hover { color: var(--gold); }
#colophon p { margin: 0; }
