:root {
  --bg: #fffdf8;
  --text: #2b2b2b;
  --muted: #6b6b6b;
  --accent: #d0532b;
  --line: #ece6da;
  --card: #ffffff;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #1c1b19;
    --text: #ece8e1;
    --muted: #a7a29a;
    --accent: #f08a62;
    --line: #34312c;
    --card: #24221f;
  }
}
* { box-sizing: border-box; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 17px/1.7 system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
}
.wrap { max-width: 760px; margin: 0 auto; padding: 0 16px; }
a { color: var(--accent); }
img { max-width: 100%; height: auto; }

.site-header { border-bottom: 1px solid var(--line); padding: 28px 0 12px; margin-bottom: 32px; text-align: center; }
.site-title { font-size: 2.2rem; font-weight: bold; color: var(--text); text-decoration: none; letter-spacing: .5px; }
.tagline { margin: 0 0 12px; color: var(--muted); font-style: italic; }
nav, .meta, .comment-meta, .site-footer, .section-title {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;
}
nav { display: flex; justify-content: center; flex-wrap: wrap; gap: 4px 22px; font-size: .95rem; }
nav a { color: var(--text); text-decoration: none; padding: 4px 0; border-bottom: 2px solid transparent; }
nav a:hover, nav a[aria-current] { border-bottom-color: var(--accent); }

h1 { font-size: 2rem; line-height: 1.2; margin: 0 0 8px; letter-spacing: -0.02em; }
h2 { line-height: 1.3; }
.meta { color: var(--muted); font-size: .85rem; margin: 0 0 20px; }
.meta a { color: var(--muted); }
.hero { display: block; width: 100%; border-radius: 6px; margin-bottom: 24px; }
.content { overflow-wrap: break-word; }
.content img { border-radius: 4px; }
.content iframe { max-width: 100%; }
.content figure { margin: 24px 0; }
.content table { border-collapse: collapse; width: 100%; }
.content td { padding: 6px; vertical-align: top; text-align: center; }
.alignleft { float: left; margin: 6px 20px 12px 0; }
.alignright { float: right; margin: 6px 0 12px 20px; }
.aligncenter { display: block; margin: 16px auto; }
.wp-caption { max-width: 100%; }
.wp-caption-text, figcaption { font-size: .85rem; color: var(--muted); text-align: center; }
.wp-block-embed__wrapper { position: relative; aspect-ratio: 16 / 9; }
.wp-block-embed__wrapper iframe { position: absolute; inset: 0; width: 100%; height: 100%; }
.content::after { content: ""; display: table; clear: both; }

.section-title { font-size: 1.1rem; text-transform: uppercase; letter-spacing: 1px; color: var(--muted); margin-top: 48px; }
.cards { display: grid; gap: 20px; }
.card { display: grid; grid-template-columns: 180px 1fr; gap: 18px; padding-bottom: 20px; border-bottom: 1px solid var(--line); }
.card:not(:has(.thumb)) { grid-template-columns: 1fr; }
.card h2 { font-size: 1.25rem; margin: 0 0 4px; }
.card h2 a { color: var(--text); text-decoration: none; }
.card h2 a:hover { color: var(--accent); }
.card .meta { margin-bottom: 6px; }
.card p { margin: 0; font-size: .95rem; }
.thumb img { width: 180px; height: 130px; object-fit: cover; border-radius: 4px; display: block; }
@media (max-width: 560px) {
  .card { grid-template-columns: 1fr; }
  .thumb img { width: 100%; height: 200px; }
  .alignleft, .alignright { float: none; margin: 12px auto; display: block; }
}

.comments-section { margin-top: 48px; padding-top: 16px; border-top: 1px solid var(--line); }
.comments-section h2 { font-size: 1.3rem; }
.comments { list-style: none; padding: 0; margin: 0; }
.comments li { background: var(--card); border: 1px solid var(--line); border-radius: 6px; padding: 12px 16px; margin-bottom: 14px; }
.comments .comments { margin: 12px 0 0 20px; }
.comment-meta { font-size: .85rem; color: var(--muted); margin: 0 0 4px; }
.comment-meta strong { color: var(--text); }
.comment-body p { margin: 6px 0; font-size: .95rem; }

.post-list li { margin-bottom: 6px; }
.site-footer { border-top: 1px solid var(--line); margin-top: 64px; padding: 20px 0; font-size: .85rem; color: var(--muted); text-align: center; }
video { width: 100%; border-radius: 4px; }

.gallery { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin: 24px 0; }
.gallery br { display: none; }
.gallery-item { margin: 0; }
.gallery-item img { width: 100%; aspect-ratio: 1; object-fit: cover; display: block; }
.gallery-caption { margin-top: 4px; line-height: 1.3; }
@media (max-width: 560px) { .gallery { grid-template-columns: repeat(2, 1fr); } }

.site-title img { display: block; margin: 0 auto 14px; width: 100%; max-width: 420px; height: auto; }
@media (prefers-color-scheme: dark) { .site-title img { filter: invert(1); } }
.site-title img { mix-blend-mode: multiply; }
@media (prefers-color-scheme: dark) { .site-title img { mix-blend-mode: screen; } }
.content figure img, .content > p img { max-height: 80vh; width: auto; display: block; margin: 0 auto; }
.home-page > h1 { display: none; }
.content .gallery-item { margin: 0; }

h2, h3 { letter-spacing: -0.01em; }
.card h2 { font-weight: 650; }
.has-medium-font-size { font-size: 1.25rem; font-weight: 600; }

/* Floated photos (About me, Goals, Travel): real breathing room, never crowd the text */
.content figure.alignleft, .content figure.alignright { width: 42%; margin-top: 6px; margin-bottom: 20px; }
.content figure.alignleft { float: left; margin-left: 0; margin-right: 32px; }
.content figure.alignright { float: right; margin-right: 0; margin-left: 32px; }
.content figure.alignleft img, .content figure.alignright img { width: 100%; height: auto; max-height: none; border-radius: 8px; }
.content h2, .content h3 { clear: both; }
@media (max-width: 560px) {
  .content figure.alignleft, .content figure.alignright { float: none; width: 100%; max-width: 360px; margin: 8px auto 24px; }
}

/* Resources page: image + link side by side */
.content .wp-block-media-text { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; align-items: center; margin: 28px 0; }
.content .wp-block-media-text figure { margin: 0; }
.content .wp-block-media-text img { width: 100%; max-height: none; border-radius: 8px; }
.content .wp-block-media-text__content p { font-size: 1.2rem; font-weight: 600; margin: 0; }
@media (max-width: 560px) { .content .wp-block-media-text { grid-template-columns: 1fr; gap: 12px; } }
.tagline { font-style: normal; }

/* Charts redrawn from the old Visualizer plugin */
:root { --chart: #d0532b; }
@media (prefers-color-scheme: dark) { :root { --chart: #e06a3c; } }
.chart { margin: 28px 0; }
.chart figcaption { font-weight: 600; text-align: left; color: var(--text); font-size: .95rem; margin-bottom: 10px; }
.chart svg { width: 100%; height: auto; font-family: inherit; overflow: visible; }
.chart-bar { fill: var(--chart); }
.chart-row:hover .chart-bar { opacity: .8; }
.chart-label { fill: var(--text); font-size: 13px; }
.chart-value { fill: var(--muted); font-size: 13px; }
.chart-axis { stroke: var(--line); stroke-width: 1; }
.chart-table { margin-top: 12px; font-size: .85rem; }
.chart-table summary { cursor: pointer; color: var(--accent); }
.table-scroll { overflow-x: auto; }
.chart-table table { border-collapse: collapse; margin-top: 8px; }
.chart-table th, .chart-table td { padding: 4px 8px; border-bottom: 1px solid var(--line); text-align: right; white-space: nowrap; }
.chart-table th:first-child { text-align: left; }
.chart-source { color: var(--muted); }
