/*
Theme Name: Askino Blog
Theme URI: https://askino.chat/blog
Author: Askino
Author URI: https://askino.chat
Description: صفحه اول بلاگ اسکینو، با جستجو، دسته‌بندی و نوشته‌های وردپرس.
Version: 1.0.0
Requires at least: 6.0
Requires PHP: 7.4
Text Domain: askino-blog
*/

@font-face {
    font-family: Vazir;
    src: url("/fonts/Vazir.woff2") format("woff2");
    font-weight: 400;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: Vazir;
    src: url("/fonts/Vazir-Bold.woff2") format("woff2");
    font-weight: 700;
    font-style: normal;
    font-display: swap;
}

:root {
    color-scheme: light;
    --bg:
        radial-gradient(circle at 52% 18%, rgba(37, 99, 235, 0.26), transparent 44%),
        radial-gradient(circle at 18% 62%, rgba(14, 165, 233, 0.16), transparent 34%),
        linear-gradient(180deg, #dbeafe 0%, #eef6ff 42%, #e0f2fe 76%, #dbeafe 100%);
    --text: #0f172a;
    --muted: #6b7280;
    --blue: #2563eb;
    --header-bg: rgba(255, 255, 255, 0.82);
    --header-border: rgba(191, 219, 254, 0.95);
    --glass: rgba(255, 255, 255, 0.55);
    --glass-border: rgba(255, 255, 255, 0.5);
    --card: rgba(255, 255, 255, 0.7);
    --chip: rgba(255, 255, 255, 0.7);
    --chip-border: rgba(255, 255, 255, 0.6);
    --input: rgba(255, 255, 255, 0.8);
    --line: rgba(209, 213, 219, 0.8);
}

html.dark {
    color-scheme: dark;
    --bg:
        radial-gradient(circle at 54% 18%, rgba(37, 99, 235, 0.28), transparent 48%),
        radial-gradient(circle at 16% 58%, rgba(14, 165, 233, 0.12), transparent 34%),
        linear-gradient(180deg, #071d3b 0%, #081a32 34%, #071426 66%, #050d1f 100%);
    --text: #e2e8f0;
    --muted: #9ca3af;
    --blue: #60a5fa;
    --header-bg: rgba(11, 26, 51, 0.62);
    --header-border: rgba(147, 197, 253, 0.24);
    --glass: rgba(15, 23, 42, 0.55);
    --glass-border: rgba(255, 255, 255, 0.1);
    --card: rgba(15, 23, 42, 0.6);
    --chip: rgba(2, 6, 23, 0.4);
    --chip-border: rgba(255, 255, 255, 0.1);
    --input: rgba(2, 6, 23, 0.6);
    --line: rgba(55, 65, 81, 0.9);
}

*,
*::before,
*::after {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    min-height: 100vh;
    font-family: Vazir, ui-sans-serif, system-ui, sans-serif;
    color: var(--text);
    background: var(--bg);
    background-attachment: fixed;
}

img {
    max-width: 100%;
    display: block;
}

button,
input {
    font: inherit;
}

a {
    color: inherit;
    text-decoration: none;
}

[hidden] {
    display: none !important;
}

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.landing-orbs {
    position: fixed;
    inset: 0;
    z-index: 0;
    overflow: hidden;
    pointer-events: none;
}

.landing-orb {
    position: absolute;
    border-radius: 999px;
    filter: blur(72px);
    opacity: 0.55;
    animation: orb-float 18s ease-in-out infinite alternate;
}

.landing-orb-1 {
    top: -8%;
    inset-inline-start: -6%;
    width: 44vw;
    height: 44vw;
    background: radial-gradient(circle, rgba(59, 130, 246, 0.7), transparent 70%);
}

.landing-orb-2 {
    top: 22%;
    inset-inline-end: -10%;
    width: 38vw;
    height: 38vw;
    background: radial-gradient(circle, rgba(56, 189, 248, 0.55), transparent 70%);
    animation-delay: -6s;
    animation-duration: 22s;
}

html.dark .landing-orb {
    opacity: 0.35;
}

@keyframes orb-float {
    from { transform: translate3d(0, 0, 0) scale(1); }
    to { transform: translate3d(4vw, -5vh, 0) scale(1.12); }
}

.landing-content {
    position: relative;
    z-index: 1;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.site-header {
    position: fixed;
    z-index: 40;
    top: 1rem;
    left: 50%;
    width: min(83.333vw, 76rem);
    transform: translateX(-50%);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    height: 3.5rem;
    padding: 0 1rem 0 1.25rem;
    border: 1px solid var(--header-border);
    border-radius: 1rem;
    background: var(--header-bg);
    backdrop-filter: blur(20px);
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.85),
        0 14px 42px -16px rgba(30, 64, 175, 0.32);
}

body.admin-bar .site-header {
    top: calc(1rem + 32px);
}

.header-start {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    min-width: 0;
}

.brand {
    display: inline-flex;
    align-items: center;
}

.brand img,
.footer-brand img {
    height: 2.25rem;
    width: auto;
}

.brand-logo-dark,
html.dark .brand-logo-light,
html.dark .footer-brand .brand-logo-light {
    display: none;
}

html.dark .brand-logo-dark,
html.dark .footer-brand .brand-logo-dark {
    display: block;
}

.desktop-nav {
    display: none;
    align-items: center;
    gap: 1.5rem;
    font-size: 1rem;
    white-space: nowrap;
}

.desktop-nav a,
.header-link,
.header-desktop .btn-primary,
.header-desktop .btn-secondary {
    white-space: nowrap;
}

.desktop-nav a:hover,
.header-link:hover {
    color: var(--blue);
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex: none;
}

.header-tools {
    display: flex;
    align-items: center;
    gap: 0.35rem;
    flex: none;
}

.lang-switch {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    height: 2.25rem;
    margin: 0;
    padding: 0 0.65rem 0 0.4rem;
    border: 1px solid rgba(191, 219, 254, 0.9);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.72);
    cursor: pointer;
}

html.dark .lang-switch {
    border-color: rgba(147, 197, 253, 0.28);
    background: rgba(15, 23, 42, 0.55);
}

.lang-flag {
    width: 1.15rem;
    height: 1.15rem;
    border-radius: 999px;
    object-fit: cover;
    flex: none;
}

.lang-select {
    appearance: none;
    -webkit-appearance: none;
    border: 0;
    margin: 0;
    padding: 0;
    background: transparent;
    background-image: none;
    color: #374151;
    font: inherit;
    font-size: 0.8rem;
    font-weight: 700;
    line-height: 1;
    cursor: pointer;
    outline: none;
}

html.dark .lang-select {
    color: #e5e7eb;
}

.header-desktop {
    align-items: center;
    gap: 1rem;
}

.header-link {
    display: inline-flex;
    align-items: center;
    height: 2.25rem;
    color: #4b5563;
    line-height: 1;
}

html.dark .header-link,
html.dark .desktop-nav a {
    color: #d1d5db;
}

.icon-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2.25rem;
    height: 2.25rem;
    padding: 0;
    border: 0;
    border-radius: 999px;
    background: transparent;
    color: #4b5563;
    cursor: pointer;
}

html.dark .icon-btn {
    color: #d1d5db;
}

.icon-btn svg,
.menu-toggle svg {
    width: 1.25rem;
    height: 1.25rem;
}

.theme-toggle .icon-sun { display: none; }
html.dark .theme-toggle .icon-moon { display: none; }
html.dark .theme-toggle .icon-sun { display: block; }

.btn-primary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
    padding: 0.5rem 1.25rem;
    border-radius: 999px;
    color: #fff;
    font-size: 0.95rem;
    font-weight: 700;
    background: linear-gradient(120deg, #2563eb 0%, #0ea5e9 100%);
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.35),
        0 16px 32px -14px rgba(37, 99, 235, 0.55);
}

.btn-primary:hover {
    filter: brightness(1.06);
}

.btn-secondary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
    padding: 0.5rem 1.25rem;
    border: 1px solid #2563eb;
    border-radius: 999px;
    color: #2563eb;
    font-size: 0.95rem;
    font-weight: 700;
    background: transparent;
}

.btn-secondary:hover {
    background: rgba(37, 99, 235, 0.08);
}

html.dark .btn-secondary {
    border-color: #93c5fd;
    color: #dbeafe;
}

html.dark .btn-secondary:hover {
    background: rgba(147, 197, 253, 0.12);
}

.menu-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.4rem;
    border: 0;
    background: transparent;
    color: #4b5563;
    cursor: pointer;
}

html.dark .menu-toggle {
    color: #d1d5db;
}

.mobile-drawer[hidden] {
    display: none;
}

.mobile-drawer {
    position: fixed;
    inset: 0;
    z-index: 60;
}

.mobile-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(4px);
}

.mobile-panel {
    position: absolute;
    top: 0;
    right: 0;
    display: flex;
    flex-direction: column;
    width: min(20rem, 85vw);
    height: 100%;
    background: var(--header-bg);
    backdrop-filter: blur(20px);
    box-shadow: 0 20px 50px rgba(15, 23, 42, 0.25);
}

.mobile-panel-head,
.mobile-panel-foot {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1.5rem;
    border-bottom: 1px solid var(--line);
}

.mobile-panel-foot {
    border-bottom: 0;
    border-top: 1px solid var(--line);
    gap: 0.75rem;
}

.mobile-panel h2 {
    margin: 0;
    font-size: 1.25rem;
}

.mobile-panel nav {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    flex: 1;
    padding: 1.5rem;
    font-size: 1.125rem;
    font-weight: 500;
}

.site-main {
    flex: 1;
    padding: 7rem 0 4rem;
}

.wrap {
    width: min(80rem, calc(100% - 2rem));
    margin: 0 auto;
}

.blog-hero {
    position: relative;
    min-height: 22rem;
    overflow: hidden;
    padding: 2rem;
    border: 1px solid var(--glass-border);
    border-radius: 2rem;
    background: var(--glass);
    backdrop-filter: blur(18px);
    box-shadow: 0 30px 80px -50px rgba(15, 23, 42, 0.5);
}

.hero-glow {
    position: absolute;
    width: 14rem;
    height: 14rem;
    border-radius: 999px;
    filter: blur(48px);
    pointer-events: none;
}

.hero-glow-a {
    top: -4rem;
    inset-inline-end: -4rem;
    background: rgba(59, 130, 246, 0.2);
}

.hero-glow-b {
    bottom: -5rem;
    inset-inline-start: -2.5rem;
    background: rgba(34, 211, 238, 0.2);
}

.hero-logo {
    position: absolute;
    inset-block: 0;
    inset-inline-end: -4rem;
    z-index: 0;
    width: min(52vw, 40rem);
    min-width: 28rem;
    pointer-events: none;
}

.hero-logo canvas {
    display: block;
    width: 100%;
    height: 100%;
}

.hero-copy {
    position: relative;
    z-index: 1;
    max-width: 42rem;
}

.blog-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.35rem 0.75rem;
    border: 1px solid rgba(191, 219, 254, 0.7);
    border-radius: 999px;
    background: rgba(239, 246, 255, 0.8);
    color: #1d4ed8;
    font-size: 0.75rem;
    font-weight: 700;
}

html.dark .blog-badge {
    border-color: rgba(30, 64, 175, 0.6);
    background: rgba(23, 37, 84, 0.5);
    color: #bfdbfe;
}

.blog-badge svg,
.post-card-time svg,
.post-card-more svg,
.results-line svg,
.back-link svg,
.section-link svg {
    width: 1rem;
    height: 1rem;
}

.search-form {
    position: relative;
    max-width: 36rem;
    margin-top: 1.5rem;
}

.search-form > svg {
    position: absolute;
    top: 50%;
    inset-inline-start: 1rem;
    width: 1.25rem;
    height: 1.25rem;
    transform: translateY(-50%);
    color: #9ca3af;
    pointer-events: none;
}

.search-clear svg {
    width: 1rem;
    height: 1rem;
}

.search-form input {
    width: 100%;
    padding: 0.9rem 2.75rem;
    border: 1px solid var(--chip-border);
    border-radius: 1rem;
    background: var(--input);
    color: var(--text);
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
    outline: none;
}

.search-form input:focus {
    border-color: #93c5fd;
    box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.1);
}

.search-clear {
    position: absolute;
    top: 50%;
    inset-inline-end: 0.75rem;
    transform: translateY(-50%);
    border: 0;
    border-radius: 999px;
    background: transparent;
    color: #9ca3af;
    cursor: pointer;
}

.cat-row,
.results-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.5rem;
    margin-top: 1rem;
}

.cat-chip {
    display: inline-flex;
    align-items: center;
    padding: 0.5rem 1rem;
    border: 1px solid var(--chip-border);
    border-radius: 999px;
    background: var(--chip);
    color: #4b5563;
    font-size: 0.875rem;
    font-weight: 500;
    cursor: pointer;
}

html.dark .cat-chip {
    color: #d1d5db;
}

.cat-chip span {
    margin-inline-start: 0.35rem;
    opacity: 0.7;
}

.cat-chip.is-active {
    border-color: transparent;
    background: #2563eb;
    color: #fff;
    box-shadow: 0 1px 2px rgba(37, 99, 235, 0.3);
}

.results-row {
    gap: 0.75rem;
    color: var(--muted);
    font-size: 0.875rem;
}

.results-line,
.text-btn,
.back-link,
.section-link,
.post-card-more {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.text-btn,
.section-link,
.post-card-more,
.back-link:hover {
    color: var(--blue);
    font-weight: 600;
}

.text-btn {
    border: 0;
    background: transparent;
    cursor: pointer;
}

.blog-grid {
    display: grid;
    gap: 1.5rem;
    margin-top: 2rem;
}

.post-card {
    min-height: 100%;
}

.post-card-link {
    display: flex;
    flex-direction: column;
    height: 100%;
    overflow: hidden;
    border: 1px solid var(--glass-border);
    border-radius: 1.75rem;
    background: var(--card);
    box-shadow: 0 20px 60px -40px rgba(15, 23, 42, 0.45);
    backdrop-filter: blur(16px);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.post-card-link:hover {
    transform: translateY(-4px);
    box-shadow: 0 30px 80px -40px rgba(37, 99, 235, 0.45);
}

.post-card-media {
    position: relative;
    height: 11rem;
    overflow: hidden;
    background: #f3f4f6;
}

html.dark .post-card-media {
    background: #1e293b;
}

.post-card-media img,
.post-card-fallback {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.post-card-link:hover .post-card-media img {
    transform: scale(1.05);
}

.post-card-fallback {
    background:
        radial-gradient(circle at 20% 20%, rgba(255, 255, 255, 0.35), transparent 40%),
        linear-gradient(135deg, #1d4ed8, #0284c7 55%, #22d3ee);
}

.post-card-shade {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.45), rgba(0, 0, 0, 0.1) 45%, transparent);
}

.post-card-badges {
    position: absolute;
    right: 1rem;
    bottom: 1rem;
    left: 1rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
}

.post-card-category,
.post-card-time {
    border-radius: 999px;
    color: #fff;
    font-size: 0.75rem;
    backdrop-filter: blur(8px);
}

.post-card-category {
    padding: 0.25rem 0.75rem;
    background: rgba(255, 255, 255, 0.2);
    font-weight: 700;
}

.post-card-time {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    padding: 0.25rem 0.75rem;
    background: rgba(0, 0, 0, 0.25);
}

.post-card-body {
    display: flex;
    flex: 1;
    flex-direction: column;
    padding: 1.5rem;
}

.post-card-body time {
    color: var(--muted);
    font-size: 0.75rem;
    font-weight: 500;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.post-card-body h2,
.related-card h3 {
    margin: 0.5rem 0 0;
    font-size: 1.25rem;
    letter-spacing: -0.02em;
}

.post-card-link:hover h2,
.related-card:hover h3 {
    color: var(--blue);
}

.post-card-body p {
    flex: 1;
    margin: 0.75rem 0 0;
    color: #4b5563;
    font-size: 0.875rem;
    line-height: 1.75rem;
}

html.dark .post-card-body p,
html.dark .entry-excerpt,
html.dark .entry-content {
    color: #d1d5db;
}

.post-card-more {
    margin-top: 1.5rem;
    font-size: 0.875rem;
}

.post-card-more svg,
.section-link svg,
.back-link svg {
    transition: transform 0.2s ease;
}

[dir="rtl"] .point-forward,
[dir="rtl"] .point-back {
    transform: rotate(180deg);
}

.post-card-link:hover .point-forward,
.section-link:hover .point-forward {
    transform: translateX(4px);
}

[dir="rtl"] .post-card-link:hover .point-forward,
[dir="rtl"] .section-link:hover .point-forward {
    transform: rotate(180deg) translateX(4px);
}

.blog-empty {
    margin-top: 2rem;
    padding: 4rem 1.5rem;
    border: 1px dashed var(--line);
    border-radius: 1.75rem;
    background: rgba(255, 255, 255, 0.5);
    text-align: center;
}

html.dark .blog-empty {
    background: rgba(15, 23, 42, 0.4);
}

.blog-empty p {
    margin: 0;
}

.blog-empty .empty-desc {
    margin-top: 0.5rem;
    color: var(--muted);
    font-size: 0.875rem;
}

.blog-empty .btn-primary {
    margin-top: 1.25rem;
    border: 0;
    cursor: pointer;
}

.article-shell,
.page-shell,
.empty-page {
    overflow: hidden;
    border: 1px solid var(--glass-border);
    border-radius: 2rem;
    background: var(--glass);
    backdrop-filter: blur(18px);
    box-shadow: 0 30px 80px -50px rgba(15, 23, 42, 0.5);
}

.back-link {
    margin-bottom: 1.5rem;
    color: var(--muted);
    font-size: 0.875rem;
    font-weight: 500;
}

.article-cover {
    position: relative;
    height: 20rem;
    overflow: hidden;
    background: #0f172a;
}

.article-cover img,
.article-cover .post-card-fallback {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.article-cover-copy {
    position: absolute;
    right: 0;
    bottom: 0;
    left: 0;
    padding: 1.5rem 2.5rem 2rem;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.72), rgba(0, 0, 0, 0.2) 60%, transparent);
    color: #fff;
}

.article-cover-copy h1 {
    max-width: 56rem;
    margin: 1rem 0 0;
    font-size: clamp(1.5rem, 3vw, 2.4rem);
    letter-spacing: -0.03em;
}

.article-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    margin-top: 1rem;
    color: rgba(255, 255, 255, 0.9);
    font-size: 0.875rem;
}

.article-meta span {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
}

.article-meta svg {
    width: 1rem;
    height: 1rem;
}

.article-layout {
    display: grid;
    gap: 2.5rem;
    padding: 1.5rem;
}

.entry-excerpt {
    margin: 0;
    color: #4b5563;
    font-size: 1.125rem;
    line-height: 2;
}

.entry-content {
    color: #4b5563;
    font-size: 1.05rem;
    line-height: 2;
}

.entry-content > *:first-child {
    margin-top: 0;
}

.entry-content h2,
.entry-content h3 {
    margin: 2rem 0 0.75rem;
    color: var(--text);
    line-height: 1.4;
    scroll-margin-top: 6rem;
}

.entry-content p,
.entry-content ul,
.entry-content ol,
.entry-content blockquote,
.entry-content figure {
    margin: 0 0 1rem;
}

.entry-content ul,
.entry-content ol {
    padding-inline-start: 1.25rem;
}

.entry-content a {
    color: var(--blue);
}

.entry-content img {
    height: auto;
    border-radius: 1rem;
}

.entry-content blockquote {
    padding: 0.75rem 1rem;
    border-inline-start: 3px solid #2563eb;
    border-radius: 1rem;
    background: rgba(255, 255, 255, 0.55);
}

html.dark .entry-content blockquote {
    background: rgba(2, 6, 23, 0.35);
}

.entry-content pre,
.entry-content code {
    direction: ltr;
    text-align: left;
}

.entry-content pre {
    overflow: auto;
    padding: 1rem;
    border-radius: 1rem;
    background: #0f172a;
    color: #e2e8f0;
}

.toc {
    padding: 1.25rem;
    border: 1px solid var(--chip-border);
    border-radius: 1rem;
    background: var(--chip);
}

.toc h2 {
    margin: 0;
    color: var(--muted);
    font-size: 0.75rem;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.toc nav {
    display: flex;
    flex-direction: column;
    gap: 0.65rem;
    margin-top: 1rem;
}

.toc a {
    color: #4b5563;
    font-size: 0.875rem;
    line-height: 1.5;
}

html.dark .toc a {
    color: #d1d5db;
}

.toc a:hover {
    color: var(--blue);
}

.related {
    margin-top: 3rem;
}

.related-head {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.related-head h2,
.empty-page h1,
.page-shell h1 {
    margin: 0;
    font-size: 1.5rem;
    letter-spacing: -0.02em;
}

.related-grid {
    display: grid;
    gap: 1.25rem;
}

.related-card {
    display: block;
    overflow: hidden;
    padding: 1.25rem;
    border: 1px solid var(--glass-border);
    border-radius: 1rem;
    background: var(--card);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.related-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 16px 40px -24px rgba(37, 99, 235, 0.6);
}

.related-card .thumb {
    height: 7rem;
    margin-bottom: 1rem;
    overflow: hidden;
    border-radius: 0.75rem;
    background: #f3f4f6;
}

.related-card .thumb img,
.related-card .post-card-fallback {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.related-card .kicker {
    color: var(--muted);
    font-size: 0.75rem;
    font-weight: 500;
}

.related-card h3 {
    font-size: 1rem;
}

.page-shell,
.empty-page {
    padding: 2.5rem 1.5rem;
}

.page-shell .entry-content {
    margin-top: 1.5rem;
}

.empty-page p {
    color: var(--muted);
}

.site-footer {
    padding: 0 1rem 1.5rem;
}

.footer-panel {
    width: min(80rem, 100%);
    margin: 0 auto;
    padding: 3rem 1.5rem;
    border: 1px solid var(--header-border);
    border-radius: 2rem;
    background: var(--header-bg);
    backdrop-filter: blur(20px);
}

.footer-grid {
    display: grid;
    gap: 2.5rem;
}

.footer-panel p {
    max-width: 24rem;
    margin: 1rem 0 0;
    color: #4b5563;
    font-size: 0.875rem;
    line-height: 1.7;
}

html.dark .footer-panel p,
.footer-links a {
    color: #d1d5db;
}

html:not(.dark) .footer-links a {
    color: #4b5563;
}

.footer-links {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    font-size: 0.875rem;
}

.footer-links h2,
.footer-cta h2 {
    margin: 0 0 1rem;
    font-size: 1rem;
}

.footer-copy {
    margin-top: 2rem;
    color: var(--muted);
    font-size: 0.8rem;
}

@media (min-width: 640px) {
    .blog-hero {
        min-height: 24rem;
        padding: 2.5rem;
    }

    .article-cover {
        height: 22rem;
    }

    .article-layout,
    .page-shell,
    .empty-page {
        padding: 2.5rem;
    }
}

@media (min-width: 768px) {
    .desktop-nav,
    .header-desktop {
        display: flex;
    }

    .menu-toggle {
        display: none;
    }

    .blog-grid,
    .related-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .footer-grid {
        grid-template-columns: 1.4fr 1fr 1fr;
    }
}

@media (max-width: 1200px) {
    .site-header {
        gap: 0.6rem;
        width: min(96vw, 76rem);
        padding-inline: 0.75rem;
    }

    .header-start {
        gap: 0.75rem;
    }

    .desktop-nav {
        gap: 0.7rem;
        font-size: 0.9rem;
    }

    .header-desktop {
        gap: 0.55rem;
    }

    .header-desktop .btn-primary,
    .header-desktop .btn-secondary {
        padding: 0.45rem 0.8rem;
        font-size: 0.85rem;
    }

    .brand img {
        height: 1.85rem;
    }
}

@media (max-width: 1040px) {
    .desktop-nav,
    .header-desktop {
        display: none;
    }

    .menu-toggle {
        display: inline-flex;
    }
}

@media (max-width: 767px) {
    .hero-logo {
        display: none;
    }
}

@media (min-width: 1024px) {
    .blog-grid,
    .related-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .article-layout {
        grid-template-columns: minmax(0, 1fr) 15rem;
    }

    .toc {
        position: sticky;
        top: 7rem;
    }
}

@media (max-width: 782px) {
    body.admin-bar .site-header {
        top: calc(1rem + 46px);
    }
}

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation: none !important;
        transition: none !important;
    }
}
