/* dr. Gedas blog – minimal monochrome theme (Newsreader + Geist Mono) */
:root {
  --fg: #000; --bg: #fff; --muted: #555; --soft: #444; --line: #e2e2e2;
  --serif: 'Newsreader', Georgia, 'Times New Roman', serif;
  --mono: 'Geist Mono', ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: 24px; }
body { margin: 0; background: var(--bg); color: var(--fg); font-family: var(--serif); -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility; }
a { color: inherit; text-decoration: none; }
a:hover { color: #000; text-decoration: underline; text-underline-offset: 4px; }
img { max-width: 100%; height: auto; }
:focus-visible { outline: 2px solid #000; outline-offset: 3px; }
.sr { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.skip { position: absolute; left: -9999px; top: 8px; background: #000; color: #fff; padding: 8px 12px; font-family: var(--mono); font-size: 13px; z-index: 10; }
.skip:focus { left: 8px; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.muted { color: var(--muted); }
.small { font-size: 12px; }
.meta { font-family: var(--mono); font-size: 13px; color: var(--muted); letter-spacing: .01em; }
.label { font-family: var(--mono); font-size: 12px; font-weight: 400; text-transform: uppercase; letter-spacing: .08em; margin: 0; }
.rule { padding-bottom: 14px; border-bottom: 1px solid #000; }
.box { display: flex; flex-direction: column; gap: 12px; border-top: 1px solid #000; padding-top: 20px; }

/* ---------- Layout ---------- */
.wrap { max-width: 1180px; margin: 0 auto; padding: 64px 40px 120px; display: flex; flex-wrap: wrap; gap: 56px 80px; }
.side { flex: 1 1 200px; max-width: 260px; }
.side-in { position: sticky; top: 64px; display: flex; flex-direction: column; gap: 40px; }
.logo { font-size: 28px; line-height: 1.1; letter-spacing: -.01em; font-weight: 500; align-self: flex-start; }
.logo i { font-weight: 400; }
.avatar { display: block; width: 112px; margin-top: -12px; }
.avatar svg { display: block; }
.nav { display: flex; flex-direction: column; gap: 12px; font-family: var(--mono); font-size: 13px; letter-spacing: .01em; }
.nav a { color: var(--muted); align-self: flex-start; }
.nav a[aria-current] { color: #000; }
.side-foot { font-family: var(--mono); font-size: 12px; color: var(--muted); margin-top: -16px; }
.main { flex: 999 1 520px; min-width: 0; }
.sub-bottom { display: none; }

/* ---------- Forms ---------- */
.sub-lead { margin: 0; font-size: 16px; line-height: 1.4; }
.sub-form, .stack { display: flex; flex-direction: column; gap: 8px; }
.stack { gap: 10px; }
.sub-form input[type=email], .in {
  font-family: var(--mono); font-size: 13px; padding: 11px 12px; border: 1px solid #000; background: #fff; color: #000; border-radius: 0; outline: none; width: 100%;
}
.in:focus, .sub-form input:focus { box-shadow: inset 0 0 0 1px #000; }
.in-short { max-width: 320px; }
.ta { font-family: var(--serif); font-size: 18px; line-height: 1.5; padding: 12px; resize: vertical; }
.two { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 10px; }
.btn {
  font-family: var(--mono); font-size: 13px; padding: 12px; border: 1px solid #000; background: #000; color: #fff; cursor: pointer; border-radius: 0;
  display: inline-block; text-align: center; line-height: 1.2;
}
.btn:hover { background: #fff; color: #000; text-decoration: none; }
.btn[disabled] { opacity: .5; cursor: wait; }
.btn-auto { align-self: flex-start; padding: 12px 18px; }
.btn-ghost { background: #fff; color: #000; }
.btn-ghost:hover { background: #000; color: #fff; }
.check { display: flex; gap: 8px; align-items: center; cursor: pointer; }
.check input { accent-color: #000; width: 16px; height: 16px; margin: 0; }
.form-msg { margin: 0; font-family: var(--mono); font-size: 13px; line-height: 1.5; }
.form-msg:empty { display: none; }
.form-msg.err { color: #b00020; }
.notice { font-family: var(--mono); font-size: 13px; line-height: 1.5; padding: 12px 14px; border: 1px solid #000; margin-bottom: 32px; }
.notice-err { border-color: #b00020; color: #b00020; }
.search-f { display: flex; gap: 8px; margin-top: 20px; }
.search-f .in { flex: 1; }

/* ---------- Lists ---------- */
.groups { display: flex; flex-direction: column; gap: 64px; }
.group { display: flex; flex-direction: column; }
.row { display: flex; flex-wrap: wrap; gap: 20px 32px; padding: 28px 0; border-bottom: 1px solid var(--line); }
.day { flex: 0 0 40px; font-family: var(--mono); font-size: 13px; color: var(--muted); padding-top: 8px; }
.row-b { flex: 1 1 200px; min-width: 0; display: flex; flex-direction: column; gap: 12px; }
.row-t { margin: 0; font-weight: 400; font-size: clamp(22px, 2.4vw, 30px); line-height: 1.2; letter-spacing: -.01em; text-wrap: pretty; }
.row-x { margin: 0; font-size: 17px; line-height: 1.5; color: var(--soft); text-wrap: pretty; max-width: 56ch; }
.thumb img { filter: grayscale(1); transition: filter .25s ease; display: block; }
.thumb:hover img, .row:hover .thumb img, .card:hover .thumb img { filter: none; }
.row-img { flex: 0 0 160px; height: 120px; overflow: hidden; background: #f3f3f3; }
.row-img img { width: 100%; height: 100%; object-fit: cover; }
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 56px 40px; }
.card { display: flex; flex-direction: column; gap: 14px; border-top: 1px solid #000; padding-top: 16px; }
.thumb-43 { aspect-ratio: 4/3; overflow: hidden; background: #f3f3f3; }
.thumb-43 img { width: 100%; height: 100%; object-fit: cover; }
.card-t { margin: 0; font-weight: 400; font-size: 24px; line-height: 1.2; letter-spacing: -.01em; text-wrap: pretty; }
.card-x { margin: 0; font-size: 16px; line-height: 1.5; color: var(--soft); text-wrap: pretty; }
.arch-h { display: flex; flex-direction: column; gap: 16px; margin-bottom: 48px; max-width: 680px; }
.arch-t { margin: 0; font-weight: 400; font-size: clamp(34px, 4.6vw, 56px); line-height: 1.05; letter-spacing: -.02em; }
.arch-x { margin: 0; font-size: 20px; line-height: 1.45; font-style: italic; color: var(--soft); }
.pager { display: flex; justify-content: space-between; align-items: center; margin-top: 48px; padding-top: 20px; border-top: 1px solid #000; font-family: var(--mono); font-size: 13px; }

/* ---------- Post ---------- */
.post { max-width: 680px; display: flex; flex-direction: column; gap: 28px; }
.back { font-family: var(--mono); font-size: 13px; align-self: flex-start; }
.post-h { display: flex; flex-direction: column; gap: 16px; border-top: 1px solid #000; padding-top: 20px; }
.post-meta { display: flex; flex-wrap: wrap; gap: 0 8px; }
.post-t { margin: 0; font-weight: 400; font-size: clamp(34px, 4.6vw, 56px); line-height: 1.08; letter-spacing: -.02em; text-wrap: balance; }
.byline { color: #000; }
.hero { margin: 0; width: 100%; aspect-ratio: 16/10; overflow: hidden; background: #f3f3f3; }
.hero img { width: 100%; height: 100%; object-fit: cover; }
.lede { margin: 0; font-size: 24px; line-height: 1.4; font-style: italic; text-wrap: pretty; }
.toc { border-top: 1px solid #000; border-bottom: 1px solid var(--line); padding: 14px 0; }
.toc summary { cursor: pointer; list-style: none; }
.toc summary::before { content: '+ '; }
.toc[open] summary::before { content: '– '; }
.toc ol { margin: 14px 0 0; padding-left: 0; list-style: none; display: flex; flex-direction: column; gap: 8px; font-size: 17px; }
.toc .toc-3 { padding-left: 18px; font-size: 16px; color: var(--soft); }

.prose { font-size: 19px; line-height: 1.65; overflow-wrap: break-word; }
.prose > * { margin: 0; }
.prose > * + * { margin-top: 20px; }
.prose p, .prose li { text-wrap: pretty; }
.prose h2 { margin-top: 44px; font-weight: 500; font-size: 28px; line-height: 1.2; letter-spacing: -.01em; }
.prose h3 { margin-top: 36px; font-weight: 500; font-size: 23px; line-height: 1.25; }
.prose h4, .prose h5, .prose h6 { margin-top: 28px; font-weight: 500; font-size: 20px; line-height: 1.3; }
.prose h2 + *, .prose h3 + *, .prose h4 + * { margin-top: 12px; }
.prose a { text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 3px; }
.prose a:hover { text-decoration-thickness: 2px; }
.prose strong, .prose b { font-weight: 500; }
.prose ul, .prose ol { padding-left: 1.3em; }
.prose li + li { margin-top: 6px; }
.prose li > ul, .prose li > ol { margin-top: 6px; }
.prose hr { border: 0; border-top: 1px solid #000; margin: 40px 0; }
.prose img { display: block; height: auto; }
.prose figure { margin-left: 0; margin-right: 0; }
.prose figure img { width: 100%; }
.prose figcaption, .prose .wp-element-caption { font-family: var(--mono); font-size: 12px; color: var(--muted); margin-top: 10px; line-height: 1.5; }
.prose blockquote { margin: 36px 0; padding: 24px 0; border-top: 1px solid #000; border-bottom: 1px solid #000; font-size: clamp(22px, 2.8vw, 30px); line-height: 1.3; font-style: italic; letter-spacing: -.01em; text-wrap: balance; }
.prose blockquote p { margin: 0; }
.prose blockquote p + p { margin-top: 12px; }
.prose blockquote cite { display: block; margin-top: 12px; font-family: var(--mono); font-size: 12px; font-style: normal; color: var(--muted); }
.prose code { font-family: var(--mono); font-size: .82em; background: #f2f2f2; padding: .1em .3em; }
.prose pre { position: relative; background: #000; color: #fff; padding: 18px 16px; overflow-x: auto; font-family: var(--mono); font-size: 14px; line-height: 1.65; margin-top: 28px; margin-bottom: 8px; }
.prose pre[data-lang] { padding-top: 52px; }
.prose pre[data-lang]::before { content: attr(data-lang); position: absolute; top: 0; left: 0; right: 0; padding: 10px 16px; border-bottom: 1px solid #333; font-size: 12px; letter-spacing: .04em; text-transform: capitalize; }
.prose pre code { background: none; padding: 0; font-size: inherit; color: inherit; }
.table-wrap { overflow-x: auto; margin-top: 28px; }
.prose table { width: 100%; border-collapse: collapse; font-size: 16px; line-height: 1.4; }
.prose th { text-align: left; font-family: var(--mono); font-size: 12px; font-weight: 500; text-transform: uppercase; letter-spacing: .06em; padding: 10px 16px 10px 0; border-bottom: 1px solid #000; vertical-align: bottom; }
.prose td { padding: 12px 16px 12px 0; border-bottom: 1px solid var(--line); vertical-align: top; }
.prose table figure, .prose figure.wp-block-table { margin: 0; }
.embed { position: relative; aspect-ratio: 16/9; }
.embed iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.prose iframe { max-width: 100%; border: 0; }
/* WordPress legacy blocks */
.prose .wp-block-columns { display: flex; flex-wrap: wrap; gap: 24px; }
.prose .wp-block-column { flex: 1 1 240px; min-width: 0; }
.prose .wp-block-column > * + * { margin-top: 16px; }
.prose .has-text-align-center, .prose .aligncenter { text-align: center; }
.prose .wp-block-gallery { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 16px; }
.prose .wp-block-gallery figure { margin: 0; }
.prose .wp-block-button__link { display: inline-block; font-family: var(--mono); font-size: 13px; padding: 12px 18px; background: #000; color: #fff; text-decoration: none; }
.prose .wp-block-spacer { height: 16px !important; }

.tags { display: flex; flex-wrap: wrap; gap: 6px 14px; }
.author-box { display: flex; gap: 18px; align-items: center; border-top: 1px solid #000; padding-top: 20px; }
.author-box p { margin: 6px 0 0; font-size: 17px; line-height: 1.45; }
.author-img { flex: 0 0 64px; width: 64px; height: 64px; overflow: hidden; }
.author-img img { width: 100%; height: 100%; object-fit: cover; }
.comments { gap: 20px; margin-top: 8px; }
.comment { display: flex; flex-direction: column; gap: 6px; padding-bottom: 20px; border-bottom: 1px solid var(--line); }
.comment-h { display: flex; flex-wrap: wrap; gap: 4px 12px; align-items: baseline; color: #000; }
.comment-h strong { font-weight: 500; }
.comment-h time { color: var(--muted); }
.comment-t { margin: 0; font-size: 18px; line-height: 1.55; text-wrap: pretty; overflow-wrap: anywhere; }
.badge { font-size: 11px; border: 1px solid #000; padding: 1px 6px; text-transform: uppercase; letter-spacing: .06em; }
.comment-form { margin-top: 4px; }
.related-l { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; font-size: 19px; line-height: 1.35; }
.pn { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 24px; border-top: 1px solid #000; padding-top: 20px; margin-top: 8px; }
.pn-a { display: flex; flex-direction: column; gap: 8px; }
.pn-next { text-align: right; grid-column: -2; }
.pn-t { font-size: 20px; line-height: 1.25; }

/* ---------- About ---------- */
.about { max-width: 680px; display: flex; flex-direction: column; gap: 28px; }
.about-top { display: flex; flex-wrap: wrap; gap: 32px; align-items: flex-start; }
.about-img { flex: 0 0 200px; height: 250px; overflow: hidden; background: #f3f3f3; }
.about-img img { width: 100%; height: 100%; object-fit: cover; }
.about-h { flex: 1 1 260px; display: flex; flex-direction: column; gap: 16px; }
.about-cta { flex-direction: row; flex-wrap: wrap; }
.inline-sub { margin: 32px 0; max-width: 420px; }

/* ---------- Mobile ---------- */
@media (max-width: 820px) {
  .wrap { padding: 32px 16px 80px; gap: 36px; }
  .side { max-width: none; flex-basis: 100%; }
  .side-in { position: static; gap: 24px; }
  .avatar { display: none; }
  .nav { flex-direction: row; flex-wrap: wrap; gap: 8px 16px; }
  .sub-side, .side-foot { display: none; }
  .sub-bottom { display: flex; flex-basis: 100%; max-width: 420px; }
  .row { gap: 14px 16px; padding: 22px 0; }
  .day { flex-basis: 28px; }
  .row-img { flex: 0 0 100%; height: auto; aspect-ratio: 16/9; order: -1; }
  .prose { font-size: 18px; }
  .lede { font-size: 21px; }
  .pn-next { grid-column: auto; }
}
@media print {
  .side, .sub-bottom, .comments, .pn, .related, .back, .toc { display: none !important; }
  .wrap { display: block; padding: 0; }
  .thumb img { filter: none; }
}
