/*
Theme Name: Themmin
Description: A compact, private editorial theme.
Version: 1.0.2
Requires at least: 6.0
Requires PHP: 8.0
Text Domain: themmin
*/

:root {
    --site-accent: #1859a9;
    --site-accent-hover: #103f79;
    --site-text: #171717;
    --site-muted: #646464;
    --site-border: #e7e7e7;
    --site-canvas: #fff;
    --content-width: 760px;
    --wide-width: 1120px;
}

*, *::before, *::after { box-sizing: border-box; }
body {
    margin: 0;
    background: var(--site-canvas);
    color: var(--site-text);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;
    font-size: 16px;
    line-height: 1.65;
    text-rendering: optimizeLegibility;
}
img { display: block; max-width: 100%; height: auto; }
figure { margin: 0; }
a { color: var(--site-accent); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { color: var(--site-accent-hover); }
button, input, textarea, select { font: inherit; }
:focus-visible { outline: 2px solid var(--site-accent); outline-offset: 3px; }
.screen-reader-text {
    position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
    overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0;
}
.screen-reader-text:focus {
    position: fixed; top: 12px; left: 12px; z-index: 100000; width: auto; height: auto;
    margin: 0; padding: 10px 14px; clip: auto; background: #fff; color: #171717;
    border: 1px solid var(--site-border);
}
h1, h2, h3, h4, h5, h6 { margin: 0 0 .75em; line-height: 1.25; letter-spacing: -.015em; }
h1 { font-size: 26px; }
h2 { font-size: 22px; }
h3 { font-size: 19px; }
h4, h5, h6 { font-size: 17px; }
p, ul, ol, blockquote, pre, table { margin-top: 0; margin-bottom: 1.25em; }
.site-header { border-bottom: 1px solid var(--site-border); }
.site-header-inner, .site-footer-inner {
    width: min(calc(100% - 32px), var(--wide-width)); margin: 0 auto;
}
.site-header-inner { display: flex; align-items: center; gap: 28px; min-height: 72px; }
.site-branding { margin-right: auto; min-width: 0; }
.custom-logo { max-height: 52px; width: auto; }
.site-title { color: var(--site-text); font-size: 21px; font-weight: 700; text-decoration: none; }
.site-description { margin: 2px 0 0; color: var(--site-muted); font-size: 13px; line-height: 1.35; }
.menu { display: flex; flex-wrap: wrap; gap: 20px; margin: 0; padding: 0; list-style: none; }
.menu a { color: var(--site-text); font-size: 14px; text-decoration: none; }
.menu a:hover { color: var(--site-accent); }
.menu-toggle { display: none; border: 1px solid var(--site-border); background: #fff; color: var(--site-text); padding: 7px 10px; }
.content-container { width: min(calc(100% - 32px), 920px); margin: 0 auto; padding: 44px 0 64px; }
.article-container { width: min(calc(100% - 32px), var(--content-width)); margin: 0 auto; padding: 32px 0 72px; }
.page-header { margin-bottom: 28px; padding-bottom: 16px; border-bottom: 1px solid var(--site-border); }
.page-header h1 { margin: 0; }
.archive-description { color: var(--site-muted); }
.article-row { display: grid; grid-template-columns: minmax(180px, 240px) 1fr; gap: 24px; padding: 24px 0; border-bottom: 1px solid var(--site-border); }
.article-row > .article-row-content:only-child { grid-column: 1 / -1; }
.article-row:first-child { padding-top: 0; }
.article-row-image img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; }
.article-row-title { margin: 5px 0 8px; font-size: 20px; }
.article-row-title a { color: var(--site-text); text-decoration: none; }
.article-meta { display: flex; flex-wrap: wrap; gap: 6px; color: var(--site-muted); font-size: 13px; }
.article-meta a { color: inherit; }
.article-excerpt { color: #333; }
.article-excerpt p { margin-bottom: 8px; }
.read-more { font-size: 14px; font-weight: 600; }
.navigation.pagination { margin-top: 32px; }
.nav-links { display: flex; flex-wrap: wrap; gap: 8px; }
.page-numbers { padding: 6px 10px; border: 1px solid var(--site-border); text-decoration: none; }
.page-numbers.current { border-color: var(--site-text); color: var(--site-text); }
.breadcrumb { margin-bottom: 24px; color: var(--site-muted); font-size: 13px; }
.breadcrumb ol { display: flex; flex-wrap: wrap; gap: 6px; margin: 0; padding: 0; list-style: none; }
.breadcrumb li:not(:last-child)::after { content: "/"; margin-left: 6px; color: #a0a0a0; }
.breadcrumb a { color: var(--site-muted); }
.entry-header { margin-bottom: 24px; }
.entry-header h1 { margin: 8px 0 0; font-size: 26px; }
.featured-image { margin-bottom: 28px; }
.featured-image img { width: 100%; }
.entry-content { overflow-wrap: anywhere; }
.entry-content h2, .entry-content h3 { scroll-margin-top: 20px; margin-top: 1.7em; }
.entry-content blockquote { margin-left: 0; padding-left: 18px; border-left: 3px solid var(--site-border); color: #3d3d3d; }
.entry-content table { display: block; width: 100%; overflow-x: auto; border-collapse: collapse; }
.entry-content th, .entry-content td { padding: 8px 10px; border: 1px solid var(--site-border); text-align: left; }
.entry-content pre { overflow-x: auto; padding: 14px; background: #f7f7f7; }
.table-of-contents { margin: 0 0 28px; padding: 14px 16px; border: 1px solid var(--site-border); }
.table-of-contents summary { cursor: pointer; font-size: 14px; font-weight: 700; }
.table-of-contents ul { margin: 12px 0 0; padding: 0; list-style: none; }
.table-of-contents li { margin: 5px 0; font-size: 14px; }
.table-of-contents .toc-level-3 { margin-left: 18px; }
.post-tags { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 28px; font-size: 13px; }
.post-tags a { padding: 3px 7px; border: 1px solid var(--site-border); text-decoration: none; }
.share-controls { display: flex; align-items: center; flex-wrap: wrap; gap: 10px; margin-top: 24px; padding-top: 20px; border-top: 1px solid var(--site-border); }
.share-action { padding: 6px 10px; border: 1px solid var(--site-border); font-size: 14px; text-decoration: none; }
.share-status { color: var(--site-muted); font-size: 13px; }
.author-profile, .post-navigation, .related-articles { margin-top: 36px; padding-top: 24px; border-top: 1px solid var(--site-border); }
.author-label { margin-bottom: 3px; color: var(--site-muted); font-size: 13px; }
.author-profile h2, .related-articles > h2 { font-size: 19px; }
.post-navigation { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; }
.post-navigation a { display: flex; flex-direction: column; gap: 4px; text-decoration: none; }
.post-navigation span { color: var(--site-muted); font-size: 13px; }
.post-navigation strong { color: var(--site-text); font-size: 16px; }
.post-next { text-align: right; }
.related-item { display: grid; grid-template-columns: 120px 1fr; gap: 16px; padding: 16px 0; border-bottom: 1px solid var(--site-border); }
.related-item > div:only-child { grid-column: 1 / -1; }
.related-image img { width: 120px; aspect-ratio: 16 / 9; object-fit: cover; }
.related-item h3 { margin: 0 0 4px; font-size: 17px; }
.related-item h3 a { color: var(--site-text); text-decoration: none; }
.related-item time { color: var(--site-muted); font-size: 13px; }
.site-sidebar { width: min(calc(100% - 32px), var(--content-width)); margin: 0 auto 48px; }
.widget { padding: 18px 0; border-top: 1px solid var(--site-border); }
.widget-title { font-size: 17px; }
.site-footer { border-top: 1px solid var(--site-border); }
.site-footer-inner { display: flex; justify-content: space-between; align-items: center; gap: 24px; padding-top: 28px; padding-bottom: 28px; }
.footer-menu { gap: 14px; }
.site-copyright { margin: 0; color: var(--site-muted); font-size: 13px; }
.no-results, .error-404 { padding: 28px 0; }

@media (max-width: 720px) {
    h1, .entry-header h1 { font-size: 24px; }
    h2 { font-size: 21px; }
    h3 { font-size: 18px; }
    .site-header-inner { flex-wrap: wrap; gap: 12px; padding-top: 14px; padding-bottom: 14px; }
    .has-js .menu-toggle { display: inline-flex; }
    .primary-navigation { width: 100%; }
    .has-js .primary-navigation { display: none; }
    .has-js .primary-navigation.is-open { display: block; }
    .primary-menu { flex-direction: column; gap: 8px; padding-top: 8px; }
    .article-row { grid-template-columns: 1fr; gap: 14px; }
    .article-row-image img { max-height: 340px; }
    .post-navigation { grid-template-columns: 1fr; }
    .post-next { text-align: left; }
    .site-footer-inner { flex-direction: column; align-items: flex-start; }
}

@media (max-width: 420px) {
    .content-container, .article-container, .site-header-inner, .site-footer-inner { width: min(calc(100% - 24px), var(--wide-width)); }
    .related-item { grid-template-columns: 92px 1fr; gap: 12px; }
    .related-image img { width: 92px; }
}
