/* Structure and typography only. All colors/fonts come from CSS variables
   defined by the active theme (src/assets/css/themes/<name>.css). */

*, *::before, *::after { box-sizing: border-box; }

html { color-scheme: light dark; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font-family: var(--font-body);
  font-size: var(--font-size, 1.0625rem);
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}

.wrap { max-width: var(--measure, 44rem); margin: 0 auto; padding: 0 1.25rem; }
main.wrap { padding-top: 2rem; padding-bottom: 4rem; min-height: 60vh; }

a { color: var(--accent); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { color: var(--accent-hover, var(--accent)); }

h1, h2, h3, h4 { font-family: var(--font-heading, var(--font-body)); line-height: 1.25; margin: 2rem 0 .75rem; }
h1 { font-size: 2.1rem; margin-top: 0; }
h2 { font-size: 1.5rem; }
h3 { font-size: 1.2rem; }

.muted, time, .meta { color: var(--muted); }
.meta { font-size: .9rem; margin: 0; }

/* Header / footer */
.site-header { border-bottom: 1px solid var(--border); background: var(--header-bg, transparent); }
.site-header .bar { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding-top: 1rem; padding-bottom: 1rem; flex-wrap: wrap; }
.brand { font-family: var(--font-heading, var(--font-body)); font-weight: 700; font-size: 1.15rem; color: var(--fg); text-decoration: none; }
.site-header nav { display: flex; align-items: center; gap: 1.1rem; }
.site-header nav a { color: var(--muted); text-decoration: none; font-size: .95rem; }
.site-header nav a:hover, .site-header nav a[aria-current="page"] { color: var(--fg); }
#theme-toggle { background: none; border: 1px solid var(--border); color: var(--muted); border-radius: var(--radius, 6px); width: 2rem; height: 2rem; cursor: pointer; font-size: 1rem; line-height: 1; }
#theme-toggle:hover { color: var(--fg); border-color: var(--muted); }

.site-footer { border-top: 1px solid var(--border); padding: 2rem 0; font-size: .9rem; }
.site-footer p { margin: .25rem 0; }

/* Home */
.hero { padding: 1.5rem 0 2rem; }
.hero .lead { font-size: 1.2rem; color: var(--muted); margin: 0; }
.section-title { font-size: .85rem; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); margin-top: 1rem; }

.post-list, .tag-cloud { list-style: none; padding: 0; margin: 0; }
.post-list li { padding: 1rem 0; border-bottom: 1px solid var(--border); }
.post-list li:last-child { border-bottom: 0; }
.post-list .post-title { display: block; font-family: var(--font-heading, var(--font-body)); font-size: 1.25rem; font-weight: 600; text-decoration: none; }
.post-list time { font-size: .875rem; }
.post-list p { margin: .35rem 0 0; color: var(--muted); }

.tag-cloud { display: flex; flex-wrap: wrap; gap: .75rem 1.25rem; }
.tag { text-decoration: none; font-size: .9rem; }

/* Post / page */
.post-header { margin-bottom: 1.5rem; }
.post-footer { margin-top: 3rem; padding-top: 1rem; border-top: 1px solid var(--border); }

.prose > :first-child { margin-top: 0; }
.prose img, .prose video, .prose iframe { max-width: 100%; height: auto; border-radius: var(--radius, 6px); }
.prose blockquote { margin: 1.25rem 0; padding: .1rem 1.1rem; border-left: 3px solid var(--accent); color: var(--muted); }
.prose hr { border: 0; border-top: 1px solid var(--border); margin: 2rem 0; }
.prose table { border-collapse: collapse; width: 100%; margin: 1.25rem 0; font-size: .95rem; }
.prose th, .prose td { border: 1px solid var(--border); padding: .45rem .7rem; text-align: left; }
.prose th { background: var(--code-bg); }

code, pre { font-family: var(--font-mono); font-size: .9em; }
:not(pre) > code { background: var(--code-bg); padding: .12em .4em; border-radius: 4px; }
pre { background: var(--code-bg); border: 1px solid var(--border); border-radius: var(--radius, 6px); padding: 1rem; overflow-x: auto; line-height: 1.5; }
pre code { background: none; padding: 0; }

/* Syntax highlighting (Prism token classes, themed by variables) */
.token.comment, .token.prolog, .token.doctype, .token.cdata { color: var(--tok-comment); font-style: italic; }
.token.punctuation, .token.operator { color: var(--tok-punct); }
.token.keyword, .token.atrule, .token.boolean, .token.important { color: var(--tok-keyword); }
.token.string, .token.char, .token.attr-value, .token.template-string, .token.regex { color: var(--tok-string); }
.token.number, .token.constant, .token.symbol, .token.property, .token.tag { color: var(--tok-number); }
.token.function, .token.class-name, .token.builtin, .token.attr-name { color: var(--tok-function); }

/* Content helpers usable from Markdown / raw HTML */
.callout { background: var(--code-bg); border-left: 4px solid var(--accent); padding: .75rem 1rem; border-radius: 0 var(--radius, 6px) var(--radius, 6px) 0; }
.skill-grid { test-align: left; display: grid; grid-template-columns: repeat(auto-fit, minmax(13rem, 1fr)); gap: 1rem; margin: 1rem 0; }
.skill-grid > div { border: 0.1em solid var(--border); border-radius: var(--radius, 1.5em); padding: .9rem 1rem; line-height: 1.5; }

button:not(#theme-toggle) { font: inherit; background: var(--accent); color: var(--accent-contrast, #fff); border: 0; border-radius: var(--radius, 6px); padding: .4rem .9rem; cursor: pointer; }
button:not(#theme-toggle):hover { filter: brightness(1.1); }

@media (max-width: 30rem) { h1 { font-size: 1.7rem; } }


/* my modifications */
body, h1, h2, h3, h4, h5, h6 {
  font-family: "CMU Serif", "Latin Modern Roman", Georgia, serif;
}

code, pre, kbd, samp {
  font-family: "CMU Typewriter Text", "Latin Modern Mono", monospace;
}

body {
  font-size: 1.15rem;
  line-height: 1.5;
  /*max-width: 42em;       /* i changed it originally it was 42 narrow measure like a printed page */
  text-align: justify;
  hyphens: auto;
}
h1, h2, h3 { text-align: left; }  /* keep headings from stretching */

/* add blur behind the post list and text so the animation is not distracting */
.prose {
  backdrop-filter: blur(2px);
  -webkit-backdrop-filter: blur(2px);  /* Safari fallback, still worth including */
}

.post-list {
  backdrop-filter: blur(2px);
  -webkit-backdrop-filter: blur(2px);  /* Safari fallback, still worth including */
}
