/* ============ Fonts (self-hosted) ============ */
@font-face { font-family: "Inter"; font-style: normal; font-display: swap; font-weight: 100 900;
	src: url("../fonts/inter-latin.woff2") format("woff2");
	unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Inter"; font-style: normal; font-display: swap; font-weight: 100 900;
	src: url("../fonts/inter-latin-ext.woff2") format("woff2");
	unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "JetBrains Mono"; font-style: normal; font-display: swap; font-weight: 100 800;
	src: url("../fonts/jbmono-latin.woff2") format("woff2");
	unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "JetBrains Mono"; font-style: normal; font-display: swap; font-weight: 100 800;
	src: url("../fonts/jbmono-latin-ext.woff2") format("woff2");
	unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }

@font-face { font-family: "Inter"; font-style: normal; font-display: swap; font-weight: 100 900;
	src: url("../fonts/inter-cyrillic.woff2") format("woff2"); unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }
@font-face { font-family: "JetBrains Mono"; font-style: normal; font-display: swap; font-weight: 100 800;
	src: url("../fonts/jbmono-cyrillic.woff2") format("woff2"); unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }

/* ============ Tokens ============ */
:root {
	--ok: #16A34A;
	--bad: #DC2626;
	--bg: #F6F5F1;
	--surface: #FDFCFA;
	--text: #111111;
	--muted: #6B6B6B;
	--line: #E2E0DA;
	--accent: #FF4F00;
	--accent-ink: #C2410C;
	--on-accent: #111111;
	--code-bg: #141414;
	--code-text: #EDEDEA;

	--sans: "Inter", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
	--mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;

	--wrap: 1120px;
	--narrow: 700px;
	--pad: clamp(20px, 4vw, 40px);
	--radius: 6px;
	--ease: cubic-bezier(.2, .7, .2, 1);
	color-scheme: light;
}
@media (prefers-color-scheme: dark) {
	:root:not([data-theme="light"]) {
		--ok: #22C55E; --bad: #EF4444;
		--bg: #0F0F0F; --surface: #161616; --text: #EDEDEA; --muted: #8E8E8A; --line: #262626;
		--accent: #FF5A14; --accent-ink: #FF7A3D; --code-bg: #1A1A1A;
		color-scheme: dark;
	}
}
:root[data-theme="dark"] {
	--ok: #22C55E; --bad: #EF4444;
	--bg: #0F0F0F; --surface: #161616; --text: #EDEDEA; --muted: #8E8E8A; --line: #262626;
	--accent: #FF5A14; --accent-ink: #FF7A3D; --code-bg: #1A1A1A;
	color-scheme: dark;
}

/* ============ Base ============ */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 80px; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } * { transition: none !important; animation: none !important; } }
body {
	margin: 0; background: var(--bg); color: var(--text);
	font-family: var(--sans); font-size: 17px; line-height: 1.6;
	-webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility;
}
img, svg, video { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration: none; }
a:focus-visible, button:focus-visible, input:focus-visible, textarea:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 3px; }
::selection { background: var(--accent); color: var(--on-accent); }
h1, h2, h3, h4 { line-height: 1.15; letter-spacing: -0.02em; margin: 0; font-weight: 600; }
p { margin: 0; }

.wrap { width: 100%; max-width: calc(var(--wrap) + var(--pad) * 2); margin: 0 auto; padding: 0 var(--pad); }
.wrap-narrow { width: 100%; max-width: calc(var(--narrow) + var(--pad) * 2); margin: 0 auto; padding: 0 var(--pad); }
.mono { font-family: var(--mono); font-size: 0.8125rem; letter-spacing: 0; }
.muted { color: var(--muted); }
.sr-only, .skip-link:not(:focus) { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip-link:focus { position: fixed; top: 12px; left: 12px; z-index: 100; background: var(--accent); color: var(--on-accent); padding: 8px 14px; border-radius: var(--radius); }
.dot { display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: var(--accent); margin-right: 8px; vertical-align: 1px; box-shadow: 0 0 0 0 color-mix(in srgb, var(--accent) 50%, transparent); animation: pulse 2.4s infinite; }
.dot--up { background: var(--ok); animation-name: pulse-ok; }
.dot--down { background: var(--bad); animation: none; }
@keyframes pulse-ok { 0% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--ok) 45%, transparent); } 70% { box-shadow: 0 0 0 7px transparent; } 100% { box-shadow: 0 0 0 0 transparent; } }
@keyframes pulse { 0% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--accent) 45%, transparent); } 70% { box-shadow: 0 0 0 7px transparent; } 100% { box-shadow: 0 0 0 0 transparent; } }

/* ============ Header ============ */
.site-header {
	position: sticky; top: 0; z-index: 50;
	background: color-mix(in srgb, var(--bg) 85%, transparent);
	backdrop-filter: saturate(1.4) blur(10px); -webkit-backdrop-filter: saturate(1.4) blur(10px);
	border-bottom: 1px solid transparent; transition: border-color .2s;
}
.site-header.is-scrolled { border-bottom-color: var(--line); }
.header-inner { display: flex; align-items: center; justify-content: space-between; height: 64px; }
.brand { font-family: var(--mono); font-size: 0.875rem; font-weight: 500; display: flex; align-items: center; gap: 2px; }
.brand-mark { color: var(--accent); }
.site-nav { display: flex; align-items: center; gap: 8px; }
.nav-list { list-style: none; display: flex; gap: 4px; margin: 0; padding: 0; }
.nav-list a { font-family: var(--mono); font-size: 0.8125rem; color: var(--muted); padding: 8px 10px; border-radius: var(--radius); transition: color .15s; display: block; }
.nav-list a:hover, .nav-list .current-menu-item > a { color: var(--text); }
.nav-list .slash { color: var(--accent); }
.lang-switch { list-style: none; display: flex; gap: 2px; margin: 0 0 0 6px; padding: 0; }
.lang-switch a { display: block; padding: 6px 7px; border-radius: var(--radius); color: var(--muted); font-size: 0.75rem; transition: color .15s; }
.lang-switch a:hover { color: var(--text); }
.lang-switch a.is-active { color: var(--text); }
.lang-switch li { display: flex; align-items: center; }
.lang-switch li + li::before { content: "/"; color: var(--line); font-size: 0.75rem; }
.theme-toggle { background: none; border: 1px solid var(--line); color: var(--muted); width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; cursor: pointer; margin-left: 6px; transition: color .15s, border-color .15s; }
.theme-toggle:hover { color: var(--text); border-color: var(--muted); }
.theme-toggle .icon-moon { display: none; }
:root[data-theme="dark"] .theme-toggle .icon-sun { display: none; }
:root[data-theme="dark"] .theme-toggle .icon-moon { display: block; }
@media (prefers-color-scheme: dark) {
	:root:not([data-theme="light"]) .theme-toggle .icon-sun { display: none; }
	:root:not([data-theme="light"]) .theme-toggle .icon-moon { display: block; }
}
.nav-toggle { display: none; }

@media (max-width: 760px) {
	.nav-toggle { display: grid; gap: 5px; background: none; border: 0; padding: 10px; cursor: pointer; }
	.nav-toggle .bar { display: block; width: 20px; height: 1.5px; background: var(--text); transition: transform .2s var(--ease); }
	.nav-toggle[aria-expanded="true"] .bar:first-of-type { transform: translateY(3.25px) rotate(45deg); }
	.nav-toggle[aria-expanded="true"] .bar:last-of-type { transform: translateY(-3.25px) rotate(-45deg); }
	.site-nav { position: absolute; top: 64px; left: 0; right: 0; background: var(--bg); border-bottom: 1px solid var(--line); flex-direction: column; align-items: stretch; padding: 8px var(--pad) 16px; display: none; }
	.site-nav.is-open { display: flex; }
	.nav-list { flex-direction: column; }
	.nav-list a { padding: 12px 0; font-size: 0.9375rem; }
	.theme-toggle { margin: 8px 0 0; }
	.lang-switch { margin: 8px 0 0; }
	.lang-switch a { font-size: 0.9375rem; padding: 8px 10px 8px 0; }
}

/* ============ Buttons & links ============ */
.btn { display: inline-flex; align-items: center; gap: 10px; font-family: var(--sans); font-size: 0.9375rem; font-weight: 500; padding: 12px 20px; border-radius: 999px; border: 1px solid transparent; cursor: pointer; transition: transform .15s var(--ease), background .15s, border-color .15s, color .15s; line-height: 1; }
.btn svg { transition: transform .2s var(--ease); }
.btn:hover svg { transform: translateX(3px); }
.btn-primary { background: var(--accent); color: var(--on-accent); }
.btn-primary:hover { background: color-mix(in srgb, var(--accent) 88%, var(--text)); }
.btn-ghost { border-color: var(--line); color: var(--text); }
.btn-ghost:hover { border-color: var(--text); }
.btn[disabled] { opacity: .6; cursor: progress; }
.link-arrow { display: inline-flex; align-items: center; gap: 6px; font-family: var(--mono); font-size: 0.8125rem; color: var(--text); border-bottom: 1px solid var(--line); padding-bottom: 2px; transition: border-color .15s, color .15s; }
.link-arrow:hover { color: var(--accent-ink); border-color: var(--accent); }

/* ============ Hero ============ */
.hero { padding-top: clamp(72px, 14vh, 150px); padding-bottom: clamp(64px, 10vh, 110px); }
.hero-meta { color: var(--muted); margin-bottom: 28px; }
.hero-title { font-size: clamp(2.25rem, 5.6vw, 4.25rem); letter-spacing: -0.035em; line-height: 1.04; max-width: 17ch; font-weight: 600; }
.now { margin-top: 32px; color: var(--text); }
.now .muted { margin-right: 4px; }
.hero-sub { color: var(--muted); font-size: clamp(1.0625rem, 1.6vw, 1.25rem); line-height: 1.5; max-width: 46ch; margin-top: 24px; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 40px; }

/* ============ Sections ============ */
.section { padding-top: 24px; padding-bottom: clamp(72px, 10vw, 120px); }
.section-tight { padding-top: 0; }
.section-head { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; border-top: 1px solid var(--line); padding-top: 18px; margin-bottom: 40px; }
.section-title { font-family: var(--mono); font-size: 0.8125rem; font-weight: 500; letter-spacing: 0.06em; text-transform: uppercase; }
.section-num { color: var(--accent); margin-right: 6px; }
.section-link { font-family: var(--mono); font-size: 0.8125rem; color: var(--muted); display: inline-flex; align-items: center; gap: 6px; transition: color .15s; }
.section-link:hover { color: var(--accent-ink); }
.section-note { margin-top: 20px; }
.section-intro { max-width: 640px; margin: -8px 0 36px; }
.section-intro-title { font-size: clamp(1.4rem, 2.6vw, 1.875rem); letter-spacing: -0.025em; }
.section-intro-text { color: var(--muted); margin-top: 12px; }
.section-intro .tags { margin-top: 18px; }
.built-with { margin-top: 14px; color: var(--text); }
.built-with .muted { margin-right: 6px; }

/* ============ Projects ============ */
.projects { display: grid; gap: clamp(48px, 7vw, 88px); }
.project { display: grid; grid-template-columns: 1.15fr 1fr; gap: clamp(24px, 5vw, 64px); align-items: center; }
.project-media { display: block; aspect-ratio: 16 / 10; border-radius: var(--radius); overflow: hidden; background: var(--surface); border: 1px solid var(--line); }
.project-media img { width: 100%; height: 100%; object-fit: cover; transition: transform .6s var(--ease); }
.project:hover .project-media img { transform: scale(1.02); }
.project-placeholder { height: 100%; display: flex; flex-direction: column; justify-content: space-between; padding: clamp(18px, 3vw, 28px); background: #141414; color: #EDEDEA; background-image: radial-gradient(circle at 1px 1px, rgba(255,255,255,.07) 1px, transparent 0); background-size: 18px 18px; }
.project-placeholder .muted { color: #FF5A14; }
.ph-line { color: #9A9A96; }
.ph-title { font-family: var(--sans); font-size: clamp(1.75rem, 4vw, 2.75rem); font-weight: 600; letter-spacing: -0.03em; }
.project-num { display: flex; align-items: center; gap: 16px; color: var(--accent); margin-bottom: 14px; }
.project-num .status { color: var(--text); display: inline-flex; align-items: center; }
.project-title { font-size: clamp(1.6rem, 3vw, 2.125rem); letter-spacing: -0.025em; }
.project-title a:hover { color: var(--accent-ink); }
.project-tagline { color: var(--muted); margin-top: 12px; font-size: 1.0625rem; max-width: 42ch; }
.tags { list-style: none; display: flex; flex-wrap: wrap; gap: 6px; margin: 20px 0 0; padding: 0; }
.tags li { font-size: 0.75rem; padding: 4px 9px; border: 1px solid var(--line); border-radius: 999px; color: var(--muted); }
.tags a:hover { color: var(--accent-ink); }
.project-links { display: flex; gap: 20px; margin-top: 26px; }
@media (max-width: 820px) { .project { grid-template-columns: 1fr; } }

/* ============ Gallery ============ */
.gallery-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.gallery-item { display: block; aspect-ratio: 1; overflow: hidden; border-radius: var(--radius); background: var(--surface); }
.gallery-item img { width: 100%; height: 100%; object-fit: cover; transition: transform .6s var(--ease), opacity .3s; }
.gallery-item:hover img { transform: scale(1.04); }
@media (max-width: 700px) { .gallery-grid { grid-template-columns: repeat(2, 1fr); gap: 8px; } }

/* Admin-only hint */
.admin-hint { display: block; padding: 28px; border: 1px dashed var(--line); border-radius: var(--radius); color: var(--muted); text-align: center; transition: color .15s, border-color .15s; }
.admin-hint:hover { color: var(--accent-ink); border-color: var(--accent); }

/* About (Home page content) */
.about-prose { max-width: var(--narrow); font-size: 1.1875rem; }

/* ============ Post list (home) ============ */
.post-list { list-style: none; margin: 0; padding: 0; }
.post-row a { display: grid; grid-template-columns: 120px 1fr auto; gap: 24px; align-items: baseline; padding: 20px 0; border-bottom: 1px solid var(--line); }
.post-row:first-child a { padding-top: 0; }
.post-row-title { font-size: 1.1875rem; font-weight: 500; letter-spacing: -0.01em; transition: color .15s; }
.post-row a:hover .post-row-title { color: var(--accent-ink); }
@media (max-width: 640px) { .post-row a { grid-template-columns: 1fr auto; gap: 4px 16px; } .post-row time { grid-column: 1 / -1; } }

/* ============ Contact ============ */
.contact { display: grid; grid-template-columns: 1fr 1.5fr; gap: clamp(32px, 6vw, 80px); }
.contact-intro { font-size: clamp(1.25rem, 2.2vw, 1.5rem); line-height: 1.4; letter-spacing: -0.015em; max-width: 22ch; }
.contact-form { display: grid; gap: 18px; }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.field { display: grid; gap: 8px; }
.field label { font-family: var(--mono); font-size: 0.75rem; color: var(--muted); text-transform: lowercase; }
.field input, .field textarea {
	font: inherit; font-size: 1rem; color: var(--text); background: var(--surface);
	border: 1px solid var(--line); border-radius: var(--radius); padding: 12px 14px; width: 100%;
	transition: border-color .15s, box-shadow .15s; resize: vertical;
}
.field input:focus, .field textarea:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 18%, transparent); }
.field.has-error input, .field.has-error textarea { border-color: #D93025; }
.field-error { font-family: var(--mono); font-size: 0.75rem; color: #D93025; min-height: 0; }
.field-error:empty { display: none; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.form-foot { display: flex; align-items: center; gap: 20px; flex-wrap: wrap; }
.form-status.is-ok { color: var(--text); }
.form-status.is-ok::before { content: "✓ "; color: var(--accent); }
.form-status.is-error { color: #D93025; }
@media (max-width: 820px) { .contact { grid-template-columns: 1fr; } }
@media (max-width: 560px) { .field-row { grid-template-columns: 1fr; } }

/* ============ Page heads & blog feed ============ */
.page-head { padding-top: clamp(56px, 10vh, 110px); padding-bottom: 48px; }
.page-head .mono a:hover { color: var(--accent-ink); }
.page-title { font-size: clamp(2.25rem, 5vw, 3.5rem); letter-spacing: -0.035em; margin-top: 18px; }
.page-desc { color: var(--muted); margin-top: 14px; font-size: 1.0625rem; max-width: 52ch; }
.chips { list-style: none; display: flex; flex-wrap: wrap; gap: 8px; padding: 0; margin: 28px 0 0; }
.chips a { display: block; padding: 6px 12px; border: 1px solid var(--line); border-radius: 999px; color: var(--muted); transition: color .15s, border-color .15s; }
.chips a:hover { color: var(--text); border-color: var(--muted); }
.chips a.is-active { background: var(--text); color: var(--bg); border-color: var(--text); }

.post-feed { border-top: 1px solid var(--line); }
.feed-link { display: grid; grid-template-columns: 1fr 140px; gap: 32px; align-items: center; padding: 28px 0; border-bottom: 1px solid var(--line); }
.feed-item:not(:has(.feed-thumb)) .feed-link { grid-template-columns: 1fr; }
.feed-title { font-size: 1.375rem; letter-spacing: -0.02em; margin-top: 8px; transition: color .15s; }
.feed-link:hover .feed-title { color: var(--accent-ink); }
.feed-excerpt { color: var(--muted); margin-top: 8px; max-width: 62ch; }
.feed-thumb { aspect-ratio: 1; border-radius: var(--radius); overflow: hidden; background: var(--surface); }
.feed-thumb img { width: 100%; height: 100%; object-fit: cover; }
@media (max-width: 640px) { .feed-link { grid-template-columns: 1fr 84px; gap: 16px; } .feed-excerpt { display: none; } }

.pagination { margin-top: 40px; font-family: var(--mono); font-size: 0.8125rem; }
.pagination .nav-links { display: flex; gap: 8px; flex-wrap: wrap; }
.pagination .page-numbers { padding: 8px 12px; border: 1px solid var(--line); border-radius: var(--radius); color: var(--muted); }
.pagination .page-numbers.current { background: var(--text); color: var(--bg); border-color: var(--text); }
.pagination a.page-numbers:hover { color: var(--text); border-color: var(--muted); }

/* ============ Article ============ */
.article { padding-bottom: 96px; }
.article-head { padding-top: clamp(56px, 10vh, 110px); padding-bottom: 40px; }
.article-head .mono a:hover { color: var(--accent-ink); }
.article-title { font-size: clamp(2rem, 4.6vw, 3.25rem); letter-spacing: -0.035em; margin-top: 18px; }
.article-lead { color: var(--muted); font-size: 1.25rem; line-height: 1.5; margin-top: 18px; }
.article-cover { margin: 0 auto 56px; }
.article-cover img { width: 100%; border-radius: var(--radius); border: 1px solid var(--line); }
.facts { margin: 32px 0 0; display: grid; gap: 0; border-top: 1px solid var(--line); }
.facts > div { display: grid; grid-template-columns: 100px 1fr; gap: 16px; padding: 12px 0; border-bottom: 1px solid var(--line); }
.facts dt { color: var(--muted); }
.project-cta { margin-top: 28px; }
.project-links { flex-wrap: wrap; row-gap: 12px; }
.prose img.is-zoomable { cursor: zoom-in; }
.facts dd { margin: 0; }
.facts a { color: var(--accent-ink); display: inline-flex; gap: 6px; align-items: center; }

.prose { font-size: 1.0625rem; line-height: 1.75; }
.prose > * + * { margin-top: 1.25em; }
.prose h2 { font-size: 1.625rem; margin-top: 2.2em; letter-spacing: -0.025em; }
.prose h3 { font-size: 1.25rem; margin-top: 1.8em; }
.prose h2 + *, .prose h3 + * { margin-top: .6em; }
.prose a { color: var(--accent-ink); text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 3px; }
.prose a:hover { text-decoration-thickness: 2px; }
.prose ul, .prose ol { padding-left: 1.3em; }
.prose li + li { margin-top: .4em; }
.prose li::marker { color: var(--accent); }
.prose blockquote { margin-left: 0; margin-right: 0; padding-left: 20px; border-left: 2px solid var(--accent); color: var(--muted); font-style: normal; }
.prose code { font-family: var(--mono); font-size: .875em; background: color-mix(in srgb, var(--text) 7%, transparent); padding: .15em .4em; border-radius: 4px; }
.prose pre { background: var(--code-bg); color: var(--code-text); padding: 20px 22px; border-radius: var(--radius); overflow-x: auto; font-size: .875rem; line-height: 1.6; }
.prose pre code { background: none; padding: 0; font-size: inherit; color: inherit; }
.prose img, .prose figure img { border-radius: var(--radius); }
.prose figure { margin-left: 0; margin-right: 0; }
.prose figcaption, .wp-element-caption { font-family: var(--mono); font-size: .75rem; color: var(--muted); margin-top: 10px; text-align: left; }
.prose hr { border: 0; border-top: 1px solid var(--line); margin: 2.5em 0; }
.prose table { width: 100%; border-collapse: collapse; font-size: .9375rem; }
.prose th, .prose td { text-align: left; padding: 10px 12px; border-bottom: 1px solid var(--line); }
.prose .alignwide { margin-left: calc(-1 * min(120px, 8vw)); margin-right: calc(-1 * min(120px, 8vw)); max-width: none; }
.prose .alignfull { margin-left: calc(50% - 50vw); margin-right: calc(50% - 50vw); max-width: 100vw; }
.prose .wp-block-button__link { background: var(--accent); color: var(--on-accent); border-radius: 999px; text-decoration: none; padding: 12px 20px; font-size: .9375rem; }

.article-foot { margin-top: 64px; }
.article-foot .tags { margin-bottom: 32px; }
.post-nav { display: flex; justify-content: space-between; gap: 24px; border-top: 1px solid var(--line); padding-top: 20px; }
.post-nav a { color: var(--muted); }
.post-nav a:hover { color: var(--accent-ink); }
.post-nav span:last-child { text-align: right; }

/* Comments */
.comments { margin-top: 64px; border-top: 1px solid var(--line); padding-top: 24px; }
.comments-title { font-weight: 500; text-transform: uppercase; letter-spacing: .06em; margin-bottom: 24px; }
.comment-list { list-style: none; padding: 0; margin: 0 0 40px; }
.comment-list .comment { padding: 16px 0; border-bottom: 1px solid var(--line); }
.comment-list .children { list-style: none; padding-left: 24px; }
.comment-meta { font-family: var(--mono); font-size: .75rem; color: var(--muted); }
.comment-author img { display: inline; border-radius: 50%; vertical-align: middle; margin-right: 8px; }
.comment-form p { margin-bottom: 14px; display: grid; gap: 6px; }
.comment-form .form-submit { display: block; margin-top: 8px; }
.comment-form .comment-notes { display: block; color: var(--muted); font-size: .9375rem; }
.comment-form label { font-family: var(--mono); font-size: .75rem; color: var(--muted); }
.comment-form input[type="text"], .comment-form input[type="email"], .comment-form input[type="url"], .comment-form textarea { font: inherit; color: var(--text); background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 10px 12px; width: 100%; }
.comment-form .comment-form-cookies-consent { display: flex; gap: 8px; align-items: center; }

/* 404 */
.notfound { min-height: 50vh; }
.notfound .btn { margin-top: 32px; }

/* ============ Footer ============ */
.site-footer { border-top: 1px solid var(--line); }
.footer-inner { display: flex; justify-content: space-between; align-items: center; gap: 20px; flex-wrap: wrap; padding-top: 28px; padding-bottom: 28px; }
.footer-links { list-style: none; display: flex; flex-wrap: wrap; gap: 20px; margin: 0; padding: 0; }
.footer-links a { display: inline-flex; align-items: center; gap: 4px; color: var(--muted); transition: color .15s; }
.footer-links a:hover { color: var(--accent-ink); }

/* ============ Lightbox ============ */
.lightbox { position: fixed; inset: 0; z-index: 200; background: rgba(8, 8, 8, .94); display: grid; place-items: center; padding: 56px 72px; }
.lightbox[hidden] { display: none; }
.lightbox-img { max-width: 100%; max-height: calc(100vh - 112px); width: auto; border-radius: 4px; }
.lightbox button { position: absolute; background: none; border: 0; color: #EDEDEA; cursor: pointer; padding: 12px; font-family: var(--mono); font-size: 1.25rem; opacity: .7; transition: opacity .15s; }
.lightbox button:hover { opacity: 1; }
.lightbox-close { top: 12px; right: 12px; }
.lightbox-prev { left: 12px; top: 50%; transform: translateY(-50%); }
.lightbox-next { right: 12px; top: 50%; transform: translateY(-50%); }
@media (max-width: 640px) { .lightbox { padding: 56px 12px; } .lightbox-prev, .lightbox-next { top: auto; bottom: 8px; transform: none; } }

/* Reveal on scroll */
.reveal { opacity: 0; transform: translateY(14px); transition: opacity .7s var(--ease), transform .7s var(--ease); }
.reveal.is-in { opacity: 1; transform: none; }

/* WP core helpers */
.alignleft { float: left; margin: 0 1.5em 1em 0; }
.alignright { float: right; margin: 0 0 1em 1.5em; }
.aligncenter { margin-left: auto; margin-right: auto; }
.screen-reader-text { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
