/* jrcarlos2000.dev shared stylesheet. Single source of truth for all pages.
   Standard: 680px measure, 15px/1.7 body, system font stack.
   Themes via CSS variables; html[data-theme] set by inline script in each page head. */

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

:root {
    color-scheme: light;
    --bg: #fff;
    --text: #222;
    --text-soft: #555;
    --muted: #999;
    --faint: #bbb;
    --border: #eee;
    --code-bg: #f5f5f5;
    --pre-bg: #f7f7f7;
    --link-underline: #ccc;
}

html[data-theme="dark"] {
    color-scheme: dark;
    --bg: #111;
    --text: #ddd;
    --text-soft: #aaa;
    --muted: #888;
    --faint: #666;
    --border: #262626;
    --code-bg: #1d1d1d;
    --pre-bg: #191919;
    --link-underline: #444;
}

body {
    font-family: -apple-system, system-ui, sans-serif;
    max-width: 680px;
    margin: 0 auto;
    padding: 56px 24px;
    background: var(--bg);
    color: var(--text);
    font-size: 15px;
    line-height: 1.7;
}

a { color: var(--text); text-decoration: none; border-bottom: 1px solid var(--link-underline); }
a:hover { border-bottom-color: var(--text); }

h1 { font-size: 20px; font-weight: 600; margin-bottom: 4px; line-height: 1.3; }
h2 { font-size: 16px; font-weight: 600; margin: 28px 0 10px 0; }
p { margin-bottom: 14px; }

/* home */
.contact { font-size: 13px; color: var(--muted); margin-bottom: 36px; }
.contact a { color: var(--muted); border: none; }
.section { font-size: 12px; font-weight: 600; text-transform: uppercase; letter-spacing: 1.2px; color: var(--faint); margin-top: 32px; margin-bottom: 10px; }
.role { margin-bottom: 14px; }
.role p { margin-bottom: 0; }
.role-title { font-weight: 500; }
.role-meta { font-size: 12px; color: var(--faint); }
.item { font-size: 14px; margin-bottom: 5px; color: var(--text-soft); }
.footer { margin-top: 40px; font-size: 12px; color: var(--faint); }
.writing-date { font-size: 12px; color: var(--faint); margin-left: 6px; }

/* posts */
.post h1 { font-size: 22px; margin: 24px 0 4px 0; }
.back { font-size: 13px; color: var(--muted); border: none; }
.date { font-size: 13px; color: var(--faint); margin-bottom: 32px; }

code {
    font-family: ui-monospace, SFMono-Regular, monospace;
    font-size: 13px;
    background: var(--code-bg);
    padding: 1px 5px;
    border-radius: 3px;
}
pre {
    background: var(--pre-bg);
    border: 1px solid var(--border);
    border-radius: 6px;
    padding: 14px 16px;
    overflow-x: auto;
    margin-bottom: 16px;
}
pre code { background: none; padding: 0; font-size: 13px; line-height: 1.55; }

figure { margin: 20px 0 24px 0; }
figure img, figure svg, figure object {
    width: 100%;
    height: auto;
    border: 1px solid var(--border);
    border-radius: 6px;
    background: #fff; /* charts and whiteboard images stay on white in both themes */
}
figcaption { font-size: 12px; color: var(--muted); margin-top: 6px; text-align: center; }

table { border-collapse: collapse; width: 100%; margin-bottom: 16px; font-size: 14px; }
th, td { text-align: left; padding: 6px 10px; border-bottom: 1px solid var(--border); }
th { font-weight: 600; font-size: 13px; }

blockquote { border-left: 3px solid var(--faint); padding: 2px 0 2px 16px; color: var(--text-soft); margin-bottom: 16px; }
.callout { background: var(--pre-bg); border: 1px solid var(--border); border-radius: 6px; padding: 12px 16px; font-size: 14px; margin-bottom: 16px; }

ul, ol { margin: 0 0 16px 0; padding-left: 20px; }
li { margin-bottom: 4px; }
.footnote { font-size: 12px; color: var(--muted); margin-top: 40px; }

.theme-toggle {
    background: none;
    border: none;
    cursor: pointer;
    color: var(--muted);
    padding: 6px;
    margin-left: 6px;
    line-height: 0;
    vertical-align: middle;
}
.theme-toggle svg { width: 15px; height: 15px; }
.theme-toggle:hover { color: var(--text); }
.topbar { display: flex; justify-content: space-between; align-items: center; }

@media (max-width: 768px) {
    body { padding: 32px 20px; }
}
