:root {
  color-scheme: light dark;
  --bg:     light-dark(#fdfcf9, #1b1a18);
  --text:   light-dark(#2b2926, #d6d1c7);
  --strong: light-dark(#14120f, #f3efe6);
  --muted:  light-dark(#6b665e, #948e83);
  --rule:   light-dark(#e6e2d9, #2d2b28);
  --code:   light-dark(#f3f0e8, #232220);
  --accent: light-dark(#8a2a2a, #e0897f);
  --serif: Charter, "Bitstream Charter", "Sitka Text", Cambria, Georgia, serif;
  --mono: "JetBrains Mono", ui-monospace, Menlo, Consolas, monospace;
}

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

html {
  background: var(--bg);
  color: var(--text);
  font-family: var(--serif);
  font-size: clamp(1.0625rem, 1rem + 0.3vw, 1.25rem);
  line-height: 1.7;
}
body { max-width: 64ch; margin: 0 auto; padding: 2.5rem 1.25rem 4rem; }

p, ul, ol, pre, blockquote { margin-bottom: 1.2rem; }
p { hyphens: auto; text-wrap: pretty; }
ul, ol { padding-left: 1.5rem; }
li { margin-bottom: 0.35rem; }

h1, h2, h3 { color: var(--strong); line-height: 1.3; margin: 2.4rem 0 0.8rem; text-wrap: balance; }
h1 { font-size: 1.85rem; margin-top: 0.5rem; }
h2 { font-size: 1.35rem; }
h3 { font-size: 1.1rem; }

a { color: var(--accent); text-underline-offset: 0.2em; }
a:hover { color: var(--strong); }

/* the # markers in headings */
h1 a, h2 a, h3 a { font: 0.8em var(--mono); color: var(--muted); text-decoration: none; margin-right: 0.4em; }

/* monospace only for the machine-ish parts */
nav, footer, small, time, code, pre { font-family: var(--mono); font-size: 0.9rem; }
small { color: var(--muted); }

nav { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 0.5rem 1.5rem;
      padding-bottom: 1rem; margin-bottom: 2.75rem; border-bottom: 1px solid var(--rule); }
nav > div { display: flex; gap: 1.25rem; }
nav a { color: var(--muted); text-decoration: none; }
nav > a { color: var(--strong); font-weight: 700; }
nav a:hover { color: var(--strong); }

/* "<- blog" back link: quiet, underlined on hover only */
main > small:first-child { display: block; margin-bottom: 1.5rem; }
main > small:first-child a { color: var(--muted); text-decoration: none; }
main > small:first-child a:hover { color: var(--accent); text-decoration: underline; }

/* listings (blog, devlogs, homepage): no bullets, date under the title */
main > ul { list-style: none; padding: 0; }
main > ul > li { margin-bottom: 1.6rem; }
main > ul > li > a { font-size: 1.1rem; text-decoration: none; }
main > ul > li > a:hover { text-decoration: underline; }
main > ul > li small { display: block; margin: 0.15rem 0 0.3rem; }
main > ul > li p { margin: 0; color: var(--muted); font-size: 0.95rem; }

hr { border: 0; border-top: 1px solid var(--rule); margin: 2.5rem 0; }
code { background: var(--code); padding: 0.1em 0.3em; }
pre { background: var(--code); padding: 1rem; overflow-x: auto; line-height: 1.5; }
pre code { background: none; padding: 0; }
blockquote { border-left: 2px solid var(--rule); padding-left: 1rem; color: var(--muted); }
img { display: block; max-width: 100%; height: auto; margin: 1.5rem 0; }

footer { display: flex; flex-wrap: wrap; gap: 1.25rem; margin-top: 4rem;
         padding-top: 1.25rem; border-top: 1px solid var(--rule); }
footer a { color: var(--muted); text-decoration: none; }
footer a:hover { color: var(--strong); }

:focus-visible { outline: 2px solid var(--muted); outline-offset: 3px; }

/* My PFP */
.intro { display: flow-root; }
.avatar { float: right; width: 96px; height: 96px; margin: 0 0 0.75rem 1.5rem; image-rendering: pixelated; }

/* Marquee Stuff */
[data-marquee] { overflow: hidden; margin: 1.5rem 0; }

[data-marquee] > div {
  display: flex;
  width: max-content;
  animation: marquee 40s linear infinite;
}
[data-marquee]:hover > div { animation-play-state: paused; }

[data-marquee] > div > div { display: flex; flex: none; }
[data-marquee] a { flex: none; margin-right: 0.5rem; }
[data-marquee] img { max-width: none; margin: 0; image-rendering: pixelated; }

@keyframes marquee { to { transform: translateX(-50%); } }

@media (prefers-reduced-motion: reduce) {
  [data-marquee] > div { animation: none; width: auto; display: block; }
  [data-marquee] > div > div { flex-wrap: wrap; }
  [data-marquee] > div > div[aria-hidden] { display: none; }
}

/* trying out some stuff with (READ MORE) thingy*/
.post-card { margin-bottom: 2.5rem;}

.post-meta { margin-top: -0.5rem; margin-bottom: 1rem; }

.continue-reading {
  margin-top: 1rem;
  font-family: var(--font-mono);
  font-size: 0.85rem;
}

.continue-reading a { color: var(--accent); text-decoration: none; }

.continue-reading a:hover { text-decoration: underline; }

.post-divider { margin: 2.5rem 0; }
