:root {
    --bg: #0d0d0d;
    --surface: #151515;
    --surface-2: #1b1b1b;
    --border: #2a2a2a;
    --text: #f1eee8;
    --muted: #9b9a96;
    --orange: #ff7a1a;
    --orange-bright: #ff9b4a;
    --shadow: 0 18px 45px rgba(0,0,0,.24);
    --radius: 14px;
    --container: 1180px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; background: var(--bg); color: var(--text); font-family: 'DM Sans', system-ui, sans-serif; line-height: 1.7; }
a { color: var(--orange-bright); text-decoration: none; }
a:hover { color: var(--orange); }
img { max-width: 100%; height: auto; display: block; }
button, input, textarea { font: inherit; }
.container { width: min(calc(100% - 40px), var(--container)); margin-inline: auto; }
.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; }
.skip-link:focus { position: fixed; z-index: 999; top: 12px; left: 12px; width: auto; height: auto; padding: 10px 14px; clip: auto; background: var(--orange); color: #111; }

.site-header { position: sticky; top: 0; z-index: 20; background: rgba(13,13,13,.92); border-bottom: 1px solid var(--border); backdrop-filter: blur(14px); }
.header-inner { min-height: 76px; display: flex; align-items: center; gap: 26px; }
.site-branding { margin-right: auto; }
.brand-mark { display: inline-flex; align-items: center; gap: 5px; color: var(--text); font-family: 'JetBrains Mono', monospace; font-weight: 600; font-size: 1.05rem; }
.brand-prompt, .prompt-symbol { color: var(--orange); }
.brand-cursor { color: var(--orange); animation: blink 1.2s steps(2, start) infinite; }
@keyframes blink { 50% { opacity: 0; } }
.custom-logo { max-height: 48px; width: auto; }
.main-navigation ul { display: flex; gap: 24px; list-style: none; padding: 0; margin: 0; }
.main-navigation a { color: var(--muted); font-size: .94rem; font-weight: 600; }
.main-navigation a:hover { color: var(--text); }
.header-search { color: var(--muted); font-size: 1.7rem; line-height: 1; }
.menu-toggle { display: none; background: none; border: 0; padding: 6px; cursor: pointer; }
.menu-toggle span:not(.screen-reader-text) { display: block; width: 22px; height: 2px; margin: 4px; background: var(--text); }
.search-panel { border-bottom: 1px solid var(--border); padding: 18px 0; background: var(--surface); }
.search-form { display: flex; gap: 10px; }
.search-form label { flex: 1; }
.search-field, textarea, input[type='text'], input[type='email'], input[type='url'] { width: 100%; border: 1px solid var(--border); background: var(--bg); color: var(--text); border-radius: 9px; padding: 12px 14px; }
.button, button[type='submit'] { display: inline-flex; align-items: center; justify-content: center; border: 0; border-radius: 8px; padding: 11px 17px; background: var(--orange); color: #111; font-weight: 700; cursor: pointer; }
.button:hover, button[type='submit']:hover { background: var(--orange-bright); color: #111; }

.site-main { padding: 64px 0 90px; }
.content-layout { display: grid; grid-template-columns: minmax(0, 1fr) 290px; gap: 70px; align-items: start; }
.content-column { min-width: 0; }
.hero-intro { padding: 12px 0 56px; max-width: 760px; }
.eyebrow { margin: 0 0 13px; color: var(--muted); font-family: 'JetBrains Mono', monospace; font-size: .82rem; letter-spacing: .02em; }
.hero-intro h1, .archive-header h1 { margin: 0; font-size: clamp(2.7rem, 6vw, 5.6rem); line-height: 1.02; letter-spacing: -.05em; }
.hero-description { margin: 24px 0 0; color: var(--muted); font-size: 1.15rem; max-width: 650px; }
.section-heading { display: flex; align-items: center; justify-content: space-between; margin-bottom: 20px; border-top: 1px solid var(--border); padding-top: 22px; }
.section-heading h2 { margin: 0; font-size: 1.2rem; }
.post-grid { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 22px; }
.post-card { overflow: hidden; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); transition: transform .2s ease, border-color .2s ease, box-shadow .2s ease; }
.post-card:hover { transform: translateY(-3px); border-color: #454545; box-shadow: var(--shadow); }
.card-image { aspect-ratio: 16 / 9; overflow: hidden; display: block; background: var(--surface-2); }
.card-image img { width: 100%; height: 100%; object-fit: cover; transition: transform .3s ease; }
.post-card:hover .card-image img { transform: scale(1.03); }
.card-body { padding: 22px; }
.category-label { display: inline-block; margin-bottom: 11px; color: var(--orange); font-family: 'JetBrains Mono', monospace; font-size: .72rem; font-weight: 600; text-transform: uppercase; letter-spacing: .08em; }
.card-title { margin: 0; font-size: 1.4rem; line-height: 1.2; letter-spacing: -.02em; }
.card-title a { color: var(--text); }
.card-title a:hover { color: var(--orange-bright); }
.card-excerpt { color: var(--muted); margin-top: 12px; font-size: .95rem; }
.card-excerpt p { margin: 0; }
.card-footer, .single-meta, .entry-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 9px; color: var(--muted); font-size: .78rem; }
.card-footer { margin-top: 20px; padding-top: 14px; border-top: 1px solid var(--border); }
.meta-separator { color: var(--orange); }

.sidebar { position: sticky; top: 105px; }
.widget { padding: 24px 0; border-top: 1px solid var(--border); }
.widget:first-child { padding-top: 0; border-top: 0; }
.widget-title { margin: 0 0 12px; font-size: 1.15rem; line-height: 1.2; }
.widget p { color: var(--muted); font-size: .92rem; }
.widget ul { list-style: none; padding: 0; margin: 0; }
.widget li { padding: 8px 0; border-bottom: 1px solid var(--border); }
.widget li a { color: var(--muted); }
.widget li a:hover { color: var(--orange-bright); }

.archive-header { padding-bottom: 45px; }
.archive-description { color: var(--muted); max-width: 700px; margin-top: 18px; }
.pagination, .nav-links { display: flex; gap: 8px; margin-top: 32px; flex-wrap: wrap; }
.page-numbers { border: 1px solid var(--border); padding: 8px 12px; border-radius: 7px; color: var(--muted); }
.page-numbers.current, .page-numbers:hover { background: var(--orange); border-color: var(--orange); color: #111; }

.single-post { max-width: 820px; }
.entry-header { margin-bottom: 28px; }
.entry-title { font-size: clamp(2.5rem, 5vw, 4.6rem); line-height: 1.04; letter-spacing: -.05em; margin: 0 0 18px; }
.featured-image { margin: 0 0 34px; border-radius: var(--radius); overflow: hidden; border: 1px solid var(--border); }
.entry-content { font-size: 1.08rem; }
.entry-content h2, .entry-content h3, .entry-content h4 { line-height: 1.2; margin-top: 2em; }
.entry-content pre { overflow: auto; padding: 20px; border-radius: 10px; background: #090909; border: 1px solid var(--border); font-family: 'JetBrains Mono', monospace; font-size: .88rem; }
.entry-content code { font-family: 'JetBrains Mono', monospace; background: #1b1b1b; padding: .15em .35em; border-radius: 4px; font-size: .88em; }
.entry-content pre code { background: transparent; padding: 0; }
.entry-content blockquote { margin: 28px 0; padding: 4px 0 4px 22px; border-left: 3px solid var(--orange); color: var(--muted); }
.entry-content table { width: 100%; border-collapse: collapse; }
.entry-content th, .entry-content td { border: 1px solid var(--border); padding: 10px; text-align: left; }
.entry-footer { margin-top: 36px; }
.post-tags { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.post-tags span { color: var(--muted); margin-right: 6px; }
.post-tags a { padding: 5px 9px; border: 1px solid var(--border); border-radius: 99px; font-size: .8rem; }
.post-navigation { margin-top: 48px; padding-top: 24px; border-top: 1px solid var(--border); display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.post-navigation .nav-next { text-align: right; }
.post-navigation a { display: flex; flex-direction: column; gap: 4px; }
.post-navigation span { color: var(--muted); font-size: .8rem; }
.post-navigation strong { color: var(--text); }
.comments-area { margin-top: 56px; padding-top: 32px; border-top: 1px solid var(--border); }
.comments-title { font-size: 1.3rem; }
.comment-list { padding-left: 20px; }
.comment-list article { padding: 16px 0; border-bottom: 1px solid var(--border); }
.comment-meta, .comment-metadata { color: var(--muted); font-size: .85rem; }
.comment-form-comment label, .comment-form-author label, .comment-form-email label, .comment-form-url label { display: block; margin-bottom: 6px; color: var(--muted); font-size: .9rem; }

.not-found { max-width: 700px; padding: 90px 0; }
.not-found h1 { font-size: clamp(2.6rem, 6vw, 5rem); line-height: 1; letter-spacing: -.05em; margin: 0 0 20px; }
.not-found p:not(.eyebrow) { color: var(--muted); font-size: 1.1rem; margin-bottom: 26px; }
.empty-state { padding: 60px 0; }

.site-footer { border-top: 1px solid var(--border); padding: 50px 0 24px; background: #0a0a0a; }
.footer-grid { display: grid; grid-template-columns: 1fr auto; gap: 40px; }
.footer-brand { font-size: 1rem; }
.footer-note { max-width: 420px; color: var(--muted); font-size: .9rem; }
.footer-links ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.footer-links a { color: var(--muted); }
.footer-bottom { margin-top: 42px; padding-top: 18px; border-top: 1px solid var(--border); display: flex; justify-content: space-between; gap: 20px; color: #666; font-size: .78rem; }

@media (max-width: 900px) {
    .content-layout { grid-template-columns: 1fr; gap: 48px; }
    .sidebar { position: static; }
}
@media (max-width: 700px) {
    .container { width: min(calc(100% - 28px), var(--container)); }
    .header-inner { min-height: 66px; }
    .menu-toggle { display: block; }
    .main-navigation { display: none; position: absolute; top: 66px; left: 0; right: 0; padding: 18px 14px; background: var(--surface); border-bottom: 1px solid var(--border); }
    .main-navigation.is-open { display: block; }
    .main-navigation ul { flex-direction: column; gap: 0; }
    .main-navigation li { padding: 10px 0; border-bottom: 1px solid var(--border); }
    .post-grid { grid-template-columns: 1fr; }
    .site-main { padding: 42px 0 60px; }
    .hero-intro { padding-bottom: 42px; }
    .footer-grid, .footer-bottom { grid-template-columns: 1fr; display: grid; }
    .footer-bottom { gap: 5px; }
    .search-form { flex-direction: column; }
    .post-navigation { grid-template-columns: 1fr; }
    .post-navigation .nav-next { text-align: left; }
}
