/* ── Reset & Root ─────────────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
    --bg:             #fbfbfd;
    --surface:        #ffffff;
    --surface-alt:    #f5f5f7;
    --border:         #d2d2d7;
    --border-light:   #e8e8ed;
    --text-primary:   #1d1d1f;
    --text-secondary: #6e6e73;
    --text-tertiary:  #aeaeb2;
    --accent:         #0066cc;
    --accent-hover:   #0055aa;
    --accent-subtle:  rgba(0, 102, 204, 0.08);
    --nav-bg:         rgba(251, 251, 253, 0.85);
    --tag-bg:         #f0f0f5;
    --tag-text:       #3a3a3c;
    --danger:         #d70015;
    --success:        #1d7a3a;

    --radius-sm:  6px;
    --radius-md:  10px;
    --radius-lg:  16px;
    --shadow-sm:  0 1px 3px rgba(0,0,0,0.06), 0 1px 2px rgba(0,0,0,0.04);
    --shadow-md:  0 4px 12px rgba(0,0,0,0.08), 0 2px 4px rgba(0,0,0,0.04);

    --font-sans:  -apple-system, BlinkMacSystemFont, "SF Pro Text", "Helvetica Neue", Arial, sans-serif;
    --font-mono:  "SF Mono", "JetBrains Mono", Menlo, Monaco, Consolas, monospace;

    --max-w:      720px;
    --max-w-wide: 960px;
}

/* ── Base ─────────────────────────────────────────────────────────────────── */
html { scroll-behavior: smooth; }

body {
    font-family: var(--font-sans);
    background-color: var(--bg);
    color: var(--text-primary);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* ── Typography ───────────────────────────────────────────────────────────── */
h1 {
    font-size: clamp(2.2rem, 5vw, 3.5rem);
    font-weight: 700;
    letter-spacing: -0.02em;
    line-height: 1.1;
    color: var(--text-primary);
}

h2 {
    font-size: clamp(1.75rem, 3vw, 2.5rem);
    font-weight: 600;
    letter-spacing: -0.015em;
    line-height: 1.2;
    color: var(--text-primary);
}

h3 {
    font-size: 1.375rem;
    font-weight: 600;
    letter-spacing: -0.01em;
    color: var(--text-primary);
}

h4 { font-size: 1.125rem; font-weight: 600; color: var(--text-primary); }

p {
    font-size: 1.0625rem;
    color: var(--text-secondary);
    line-height: 1.75;
    margin-bottom: 1.25rem;
}

a {
    color: var(--accent);
    text-decoration: none;
    transition: color 0.15s ease;
}
a:hover { color: var(--accent-hover); text-decoration: underline; }

/* ── Layout ───────────────────────────────────────────────────────────────── */
.container {
    max-width: var(--max-w);
    margin: 0 auto;
    padding: 100px 24px 80px;
}

.container--wide {
    max-width: var(--max-w-wide);
    margin: 0 auto;
    padding: 100px 24px 80px;
}

/* ── Navigation ───────────────────────────────────────────────────────────── */
header {
    position: fixed;
    top: 0; left: 0; right: 0;
    height: 52px;
    background: var(--nav-bg);
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    border-bottom: 1px solid var(--border-light);
    z-index: 1000;
}

nav { height: 100%; }

.nav-inner {
    max-width: var(--max-w-wide);
    margin: 0 auto;
    padding: 0 24px;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.nav-links {
    display: flex;
    gap: 28px;
    align-items: center;
}

.nav-links a {
    color: var(--text-primary);
    font-size: 13px;
    font-weight: 400;
    letter-spacing: 0;
    opacity: 0.75;
    transition: opacity 0.15s;
    text-decoration: none;
}
.nav-links a:hover,
.nav-links a.active { opacity: 1; }
.nav-links a.active { font-weight: 500; }

.nav-search {
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    padding: 6px;
    border-radius: var(--radius-sm);
    transition: background 0.15s, color 0.15s;
    text-decoration: none !important;
    opacity: 1;
}
.nav-search:hover { background: var(--surface-alt); color: var(--text-primary); }

/* ── Page Hero ────────────────────────────────────────────────────────────── */
.hero { margin-bottom: 4rem; }
.hero h1 { margin-bottom: 1rem; }
.lead {
    font-size: clamp(1.25rem, 2.5vw, 1.625rem);
    font-weight: 500;
    color: var(--text-primary);
    line-height: 1.45;
    letter-spacing: -0.01em;
    margin-bottom: 1.5rem;
}

/* ── Fade-in ──────────────────────────────────────────────────────────────── */
.fade-in {
    animation: fadeIn 0.6s ease-out forwards;
    opacity: 0;
    transform: translateY(12px);
}
@keyframes fadeIn { to { opacity: 1; transform: translateY(0); } }

/* ── Work Items ───────────────────────────────────────────────────────────── */
.work-grid { display: flex; flex-direction: column; gap: 0; }

.work-item {
    padding: 2.5rem 0;
    border-bottom: 1px solid var(--border-light);
}
.work-item:first-child { padding-top: 0; }
.work-item:last-child  { border-bottom: none; }

.work-item h3 { margin-bottom: 0.5rem; }
.work-item p  { margin-bottom: 0; }

.work-tag {
    display: inline-block;
    background: var(--tag-bg);
    color: var(--tag-text);
    font-size: 11px;
    font-weight: 500;
    padding: 3px 10px;
    border-radius: 20px;
    margin-right: 6px;
    margin-bottom: 10px;
    letter-spacing: 0.02em;
}

/* ── Blog List ────────────────────────────────────────────────────────────── */
.blog-grid { display: flex; flex-direction: column; gap: 0; }

.blog-card {
    padding: 2.5rem 0;
    border-bottom: 1px solid var(--border-light);
    text-decoration: none;
    display: block;
    transition: none;
}
.blog-card:first-child { padding-top: 0; }
.blog-card:last-child  { border-bottom: none; }
.blog-card:hover h3    { color: var(--accent); }

.post-meta {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 0.75rem;
}

.post-date {
    font-size: 13px;
    color: var(--text-tertiary);
    font-weight: 400;
}

.post-reading-time {
    font-size: 13px;
    color: var(--text-tertiary);
}
.post-reading-time::before { content: '·'; margin-right: 12px; }

.blog-card h3 {
    margin-bottom: 0.5rem;
    transition: color 0.15s;
    color: var(--text-primary);
    text-decoration: none;
}

.blog-card p {
    font-size: 1rem;
    margin-bottom: 0.75rem;
    color: var(--text-secondary);
}

.post-tags { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 0.5rem; }

.tag {
    background: var(--tag-bg);
    color: var(--tag-text);
    font-size: 11px;
    font-weight: 500;
    padding: 3px 10px;
    border-radius: 20px;
    letter-spacing: 0.02em;
    text-decoration: none;
}
.tag:hover { background: var(--border); color: var(--text-primary); text-decoration: none; }

/* ── Post / Article ───────────────────────────────────────────────────────── */
.post-header { margin-bottom: 3rem; padding-bottom: 2rem; border-bottom: 1px solid var(--border-light); }
.post-header .post-meta { margin-bottom: 1rem; }
.post-header h1 { margin-bottom: 1rem; }
.post-excerpt {
    font-size: 1.2rem;
    color: var(--text-secondary);
    line-height: 1.65;
    font-weight: 400;
}

/* ── Post Content (rich) ──────────────────────────────────────────────────── */
.post-content { font-size: 1.0625rem; line-height: 1.8; color: var(--text-primary); }

.post-content p {
    color: var(--text-primary);
    margin-bottom: 1.5rem;
    font-size: 1.0625rem;
    line-height: 1.8;
}

.post-content h2 {
    font-size: 1.75rem;
    font-weight: 700;
    letter-spacing: -0.015em;
    margin: 3rem 0 1rem;
    padding-top: 1rem;
    color: var(--text-primary);
}

.post-content h3 {
    font-size: 1.3rem;
    font-weight: 600;
    margin: 2.5rem 0 0.75rem;
    color: var(--text-primary);
}

.post-content h4 {
    font-size: 1.1rem;
    font-weight: 600;
    margin: 2rem 0 0.5rem;
    color: var(--text-primary);
}

.post-content a { color: var(--accent); text-decoration: underline; text-underline-offset: 3px; }
.post-content a:hover { color: var(--accent-hover); }

.post-content ul,
.post-content ol {
    margin: 0 0 1.5rem 1.5rem;
    color: var(--text-primary);
}

.post-content li {
    margin-bottom: 0.5rem;
    font-size: 1.0625rem;
    line-height: 1.7;
}

.post-content strong { font-weight: 600; color: var(--text-primary); }
.post-content em     { font-style: italic; }

/* Images in posts */
.post-content img {
    max-width: 100%;
    height: auto;
    border-radius: var(--radius-md);
    margin: 2rem 0;
    display: block;
    box-shadow: var(--shadow-sm);
}

.post-content figure {
    margin: 2.5rem 0;
}

.post-content figcaption {
    text-align: center;
    font-size: 0.875rem;
    color: var(--text-tertiary);
    margin-top: 0.75rem;
    font-style: italic;
}

/* Blockquotes */
.post-content blockquote {
    border-left: 3px solid var(--accent);
    padding: 0.75rem 0 0.75rem 1.5rem;
    margin: 2rem 0;
    background: var(--accent-subtle);
    border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
}

.post-content blockquote p {
    font-size: 1.125rem;
    font-style: italic;
    color: var(--text-primary);
    margin-bottom: 0;
}

/* Code */
.post-content code {
    font-family: var(--font-mono);
    font-size: 0.875em;
    background: var(--surface-alt);
    padding: 2px 6px;
    border-radius: 4px;
    color: var(--text-primary);
    border: 1px solid var(--border-light);
}

.post-content pre {
    background: #1a1a2e;
    color: #e2e8f0;
    padding: 1.5rem;
    border-radius: var(--radius-md);
    overflow-x: auto;
    margin: 2rem 0;
    font-family: var(--font-mono);
    font-size: 0.875rem;
    line-height: 1.7;
}

.post-content pre code {
    background: transparent;
    border: none;
    padding: 0;
    color: inherit;
    font-size: inherit;
}

/* Tables */
.post-content table {
    width: 100%;
    border-collapse: collapse;
    margin: 2rem 0;
    font-size: 0.9375rem;
    border-radius: var(--radius-md);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
}

.post-content th {
    background: var(--surface-alt);
    color: var(--text-primary);
    font-weight: 600;
    font-size: 0.875rem;
    text-align: left;
    padding: 12px 16px;
    border-bottom: 2px solid var(--border);
    letter-spacing: 0.02em;
    text-transform: uppercase;
}

.post-content td {
    padding: 11px 16px;
    border-bottom: 1px solid var(--border-light);
    color: var(--text-primary);
    vertical-align: top;
}

.post-content tr:last-child td { border-bottom: none; }
.post-content tr:hover td { background: var(--accent-subtle); }

/* Horizontal rule */
.post-content hr {
    border: none;
    border-top: 1px solid var(--border-light);
    margin: 3rem 0;
}

/* ── Post Footer / Related ────────────────────────────────────────────────── */
.post-footer {
    margin-top: 4rem;
    padding-top: 2.5rem;
    border-top: 1px solid var(--border-light);
}

.related-posts h3 { margin-bottom: 1.5rem; }

.related-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 1rem;
}

.related-card {
    padding: 1.25rem;
    background: var(--surface);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-md);
    text-decoration: none;
    transition: box-shadow 0.15s, border-color 0.15s;
}

.related-card:hover {
    box-shadow: var(--shadow-md);
    border-color: var(--border);
    text-decoration: none;
}

.related-card .related-date {
    font-size: 12px;
    color: var(--text-tertiary);
    margin-bottom: 0.4rem;
}

.related-card h4 {
    font-size: 0.9375rem;
    color: var(--text-primary);
    line-height: 1.4;
}

/* ── Comments ─────────────────────────────────────────────────────────────── */
.comments-section { margin-top: 4rem; }
.comments-section > h3 { margin-bottom: 2rem; }

.comment-list { display: flex; flex-direction: column; gap: 1.5rem; margin-bottom: 3rem; }

.comment {
    display: grid;
    grid-template-columns: 40px 1fr;
    gap: 1rem;
    align-items: start;
}

.comment-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--surface-alt);
    border: 1px solid var(--border-light);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 15px;
    color: var(--text-secondary);
    flex-shrink: 0;
}

.comment-body { flex: 1; }

.comment-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 0.4rem;
}

.comment-author {
    font-weight: 600;
    font-size: 0.9375rem;
    color: var(--text-primary);
}

.comment-date {
    font-size: 12px;
    color: var(--text-tertiary);
}

.comment-text {
    font-size: 0.9375rem;
    color: var(--text-primary);
    line-height: 1.65;
    margin: 0;
}

.no-comments {
    color: var(--text-tertiary);
    font-size: 0.9375rem;
    font-style: italic;
    margin-bottom: 2rem;
}

/* Comment form */
.comment-form-wrap h4 { margin-bottom: 1.5rem; font-size: 1.125rem; }

/* ── Forms ────────────────────────────────────────────────────────────────── */
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }

.form-group { margin-bottom: 1.25rem; }

label {
    display: block;
    font-size: 13px;
    font-weight: 500;
    margin-bottom: 6px;
    color: var(--text-primary);
    letter-spacing: 0.01em;
}

input[type="text"],
input[type="email"],
input[type="password"],
input[type="search"],
textarea,
select {
    width: 100%;
    padding: 11px 14px;
    font-size: 0.9375rem;
    font-family: var(--font-sans);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    background: var(--surface);
    color: var(--text-primary);
    transition: border-color 0.15s, box-shadow 0.15s;
    appearance: none;
}

input:focus, textarea:focus, select:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(0, 102, 204, 0.1);
}

textarea { resize: vertical; min-height: 120px; }

.btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 11px 22px;
    font-size: 0.9375rem;
    font-weight: 500;
    font-family: var(--font-sans);
    border-radius: 24px;
    border: none;
    cursor: pointer;
    transition: opacity 0.15s, transform 0.1s;
    text-decoration: none;
    line-height: 1;
}

.btn:hover  { opacity: 0.85; text-decoration: none; }
.btn:active { transform: scale(0.98); }

.btn-primary  { background: var(--text-primary); color: #fff; }
.btn-accent   { background: var(--accent); color: #fff; }
.btn-outline  { background: transparent; color: var(--text-primary); border: 1px solid var(--border); }
.btn-danger   { background: var(--danger); color: #fff; }
.btn-sm       { padding: 7px 14px; font-size: 0.8125rem; border-radius: 16px; }

/* ── Search ───────────────────────────────────────────────────────────────── */
.search-box {
    display: flex;
    gap: 0;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    overflow: hidden;
    background: var(--surface);
    transition: border-color 0.15s, box-shadow 0.15s;
}
.search-box:focus-within {
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(0,102,204,0.1);
}

.search-box input {
    flex: 1;
    border: none;
    border-radius: 0;
    background: transparent;
    padding: 12px 16px;
    font-size: 1rem;
    box-shadow: none;
}
.search-box input:focus { box-shadow: none; }

.search-box button {
    background: transparent;
    border: none;
    border-left: 1px solid var(--border);
    padding: 0 16px;
    color: var(--text-secondary);
    cursor: pointer;
    transition: background 0.15s, color 0.15s;
    border-radius: 0;
}
.search-box button:hover { background: var(--surface-alt); color: var(--text-primary); }

.search-results-count {
    font-size: 0.9375rem;
    color: var(--text-secondary);
    margin: 1.5rem 0;
}

.search-result {
    padding: 1.75rem 0;
    border-bottom: 1px solid var(--border-light);
}
.search-result:last-child { border-bottom: none; }
.search-result h3 { margin-bottom: 0.4rem; font-size: 1.125rem; }
.search-result h3 a { color: var(--text-primary); }
.search-result h3 a:hover { color: var(--accent); text-decoration: none; }
.search-result .snippet { font-size: 0.9375rem; color: var(--text-secondary); line-height: 1.6; margin: 0; }

/* ── Alert / Flash messages ───────────────────────────────────────────────── */
.alert {
    padding: 12px 16px;
    border-radius: var(--radius-sm);
    font-size: 0.9375rem;
    margin-bottom: 1.5rem;
    border: 1px solid transparent;
}
.alert-success { background: #f0faf4; border-color: #a3d9b1; color: var(--success); }
.alert-error   { background: #fff0f1; border-color: #f5a8ae; color: var(--danger); }
.alert-info    { background: var(--accent-subtle); border-color: rgba(0,102,204,0.2); color: var(--accent); }

/* ── Admin ────────────────────────────────────────────────────────────────── */
.admin-layout {
    display: grid;
    grid-template-columns: 220px 1fr;
    min-height: 100vh;
}

.admin-sidebar {
    background: var(--surface);
    border-right: 1px solid var(--border-light);
    padding: 80px 0 2rem;
    position: sticky;
    top: 0;
    height: 100vh;
    overflow-y: auto;
}

.admin-sidebar a {
    display: block;
    padding: 10px 24px;
    font-size: 0.9375rem;
    color: var(--text-secondary);
    text-decoration: none;
    transition: background 0.15s, color 0.15s;
}
.admin-sidebar a:hover  { background: var(--surface-alt); color: var(--text-primary); }
.admin-sidebar a.active { background: var(--accent-subtle); color: var(--accent); font-weight: 500; }

.admin-main { padding: 80px 40px 60px; max-width: 860px; }

.admin-card {
    background: var(--surface);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-md);
    padding: 1.5rem;
    margin-bottom: 1rem;
}

.admin-card h3 { margin-bottom: 0.5rem; font-size: 1rem; }
.admin-card p  { font-size: 0.9rem; margin-bottom: 0.75rem; }

.admin-actions { display: flex; gap: 8px; flex-wrap: wrap; }

.post-status-badge {
    display: inline-block;
    font-size: 11px;
    font-weight: 500;
    padding: 2px 8px;
    border-radius: 12px;
    letter-spacing: 0.03em;
    text-transform: uppercase;
}
.status-published { background: #e6f9ee; color: var(--success); }
.status-draft     { background: var(--surface-alt); color: var(--text-secondary); }

.admin-stat {
    background: var(--surface);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-md);
    padding: 1.25rem 1.5rem;
    text-align: center;
}
.admin-stat .stat-number { font-size: 2rem; font-weight: 700; color: var(--accent); }
.admin-stat .stat-label  { font-size: 0.875rem; color: var(--text-secondary); margin: 0; }

.stats-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1rem; margin-bottom: 2rem; }

/* Rich text editor */
#content-editor {
    font-family: var(--font-mono);
    font-size: 0.875rem;
    line-height: 1.7;
    min-height: 400px;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 14px;
    background: #fafafa;
}

.editor-toolbar {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
    padding: 8px 12px;
    background: var(--surface-alt);
    border: 1px solid var(--border);
    border-bottom: none;
    border-radius: var(--radius-sm) var(--radius-sm) 0 0;
}
.editor-toolbar + #content-editor {
    border-radius: 0 0 var(--radius-sm) var(--radius-sm);
}

.toolbar-btn {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 4px;
    padding: 4px 10px;
    font-size: 12px;
    font-family: var(--font-sans);
    cursor: pointer;
    color: var(--text-primary);
    transition: background 0.1s;
}
.toolbar-btn:hover { background: var(--border-light); }

/* AI generation panel */
.ai-panel {
    background: linear-gradient(135deg, #f0f4ff 0%, #fafbff 100%);
    border: 1px solid #c7d4f0;
    border-radius: var(--radius-md);
    padding: 1.5rem;
    margin-bottom: 1.5rem;
}
.ai-panel h4 { margin-bottom: 0.75rem; color: #2c3e7a; }
.ai-panel p  { font-size: 0.875rem; color: #4a5580; margin-bottom: 1rem; }

.ai-generating {
    display: none;
    align-items: center;
    gap: 10px;
    color: var(--accent);
    font-size: 0.9375rem;
}
.ai-generating.visible { display: flex; }

.spinner {
    width: 18px; height: 18px;
    border: 2px solid rgba(0,102,204,0.2);
    border-top-color: var(--accent);
    border-radius: 50%;
    animation: spin 0.7s linear infinite;
    flex-shrink: 0;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* Image upload */
.upload-area {
    border: 2px dashed var(--border);
    border-radius: var(--radius-md);
    padding: 2rem;
    text-align: center;
    cursor: pointer;
    transition: border-color 0.15s, background 0.15s;
}
.upload-area:hover   { border-color: var(--accent); background: var(--accent-subtle); }
.upload-area.dragover { border-color: var(--accent); background: var(--accent-subtle); }
.upload-area p { margin: 0; color: var(--text-secondary); font-size: 0.9375rem; }

.uploaded-images {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    gap: 0.75rem;
    margin-top: 1rem;
}

.uploaded-image-item {
    position: relative;
    border-radius: var(--radius-sm);
    overflow: hidden;
    border: 1px solid var(--border-light);
    aspect-ratio: 1;
}
.uploaded-image-item img { width: 100%; height: 100%; object-fit: cover; display: block; }
.uploaded-image-item .copy-url {
    position: absolute;
    inset: 0;
    background: rgba(0,0,0,0.55);
    color: #fff;
    font-size: 11px;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.15s;
    cursor: pointer;
}
.uploaded-image-item:hover .copy-url { opacity: 1; }

/* ── Footer ───────────────────────────────────────────────────────────────── */
footer {
    background: var(--surface-alt);
    border-top: 1px solid var(--border-light);
    padding: 56px 24px;
    margin-top: 5rem;
}

.footer-inner {
    max-width: var(--max-w-wide);
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 3rem;
    flex-wrap: wrap;
}

.footer-name {
    font-weight: 600;
    font-size: 1rem;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
}

.footer-info p {
    font-size: 12px;
    color: var(--text-tertiary);
    margin-bottom: 0.25rem;
    line-height: 1.5;
}

.footer-cols { display: flex; gap: 3rem; }

.footer-col { display: flex; flex-direction: column; gap: 10px; }

.footer-col-label {
    font-size: 11px;
    font-weight: 600;
    color: var(--text-tertiary);
    text-transform: uppercase;
    letter-spacing: 0.08em;
    margin: 0;
}

.footer-col a {
    font-size: 13px;
    color: var(--text-secondary);
    text-decoration: none;
    transition: color 0.15s;
}
.footer-col a:hover { color: var(--text-primary); }

/* ── Pagination ───────────────────────────────────────────────────────────── */
.pagination {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin-top: 3rem;
    flex-wrap: wrap;
}

.pagination a,
.pagination span {
    padding: 8px 14px;
    border-radius: var(--radius-sm);
    font-size: 0.9375rem;
    text-decoration: none;
    color: var(--text-secondary);
    border: 1px solid var(--border-light);
    transition: background 0.15s, border-color 0.15s, color 0.15s;
}
.pagination a:hover        { background: var(--surface-alt); color: var(--text-primary); border-color: var(--border); }
.pagination span.current   { background: var(--text-primary); color: #fff; border-color: var(--text-primary); }
.pagination span.disabled  { opacity: 0.4; cursor: not-allowed; }

/* ── Responsive ───────────────────────────────────────────────────────────── */
@media (max-width: 768px) {
    .container, .container--wide { padding: 80px 20px 60px; }
    h1 { font-size: 2rem; }
    h2 { font-size: 1.625rem; }
    .lead { font-size: 1.25rem; }

    .form-row { grid-template-columns: 1fr; }
    .footer-inner { flex-direction: column; gap: 2rem; }
    .footer-cols { gap: 2rem; }

    .admin-layout { grid-template-columns: 1fr; }
    .admin-sidebar { display: none; }
    .admin-main { padding: 80px 20px 40px; }

    .stats-grid { grid-template-columns: 1fr 1fr; }
    .related-grid { grid-template-columns: 1fr; }
    .nav-links { gap: 16px; }
}

@media (max-width: 480px) {
    .stats-grid { grid-template-columns: 1fr; }
    .footer-cols { flex-direction: column; gap: 1.5rem; }
}
