/* Blog-specific styles — depends on ../styles.css being loaded first */

/* ── Breadcrumb Nav (shared with check_site / undong pattern) ── */
.nav-logo { display: flex; align-items: center; gap: 0.5rem; }

.nav-brand-link {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    text-decoration: none;
}

.nav-logo-icon { width: 30px; height: 30px; border-radius: 7px; object-fit: cover; }
.nav-logo-icon--brand { width: 30px; height: 30px; }

.nav-brand-name {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-secondary);
    transition: color 0.3s;
}

.nav-brand-link:hover .nav-brand-name { color: var(--text-primary); }

.nav-sep { color: var(--border-color); font-size: 1.25rem; font-weight: 300; margin: 0 0.1rem; }

.nav-page-name {
    font-size: 1.25rem;
    font-weight: 700;
    background: linear-gradient(135deg, var(--accent-primary), var(--accent-secondary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* ── Blog Hero ── */
.blog-hero {
    padding: 140px 0 48px;
    background: linear-gradient(180deg, var(--bg-primary) 0%, var(--bg-secondary) 100%);
    text-align: center;
}

.blog-hero-label {
    display: inline-block;
    padding: 0.4rem 1rem;
    background: rgba(99, 102, 241, 0.12);
    border: 1px solid rgba(99, 102, 241, 0.3);
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--accent-primary);
    letter-spacing: 0.05em;
    margin-bottom: 1.5rem;
}

.blog-hero-title {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 1rem;
    max-width: 680px;
    margin-left: auto;
    margin-right: auto;
    background: linear-gradient(135deg, #ffffff, #e5e5e5);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

[data-theme="light"] .blog-hero-title {
    background: linear-gradient(135deg, #111111, var(--accent-primary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.blog-hero-subtitle {
    font-size: 1.1rem;
    color: var(--text-secondary);
}

/* ── Post List ── */
.blog-list {
    padding: 80px 0 120px;
    background: var(--bg-secondary);
}

.post-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
    gap: 1.75rem;
    margin-top: 3rem;
}

.post-card {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 20px;
    padding: 2rem;
    text-decoration: none;
    color: var(--text-primary);
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    transition: all 0.3s;
    box-shadow: 0 1px 3px var(--shadow-color);
}

.post-card:hover {
    border-color: var(--accent-primary);
    transform: translateY(-5px);
    box-shadow: 0 16px 40px rgba(99, 102, 241, 0.18);
}

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

.post-app-tag {
    font-size: 0.75rem;
    font-weight: 600;
    padding: 0.25rem 0.65rem;
    border-radius: 20px;
    background: rgba(99, 102, 241, 0.12);
    border: 1px solid rgba(99, 102, 241, 0.25);
    color: var(--accent-primary);
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.post-date {
    font-size: 0.85rem;
    color: var(--text-secondary);
}

.post-card-title {
    font-size: 1.2rem;
    font-weight: 700;
    line-height: 1.4;
}

.post-card-excerpt {
    font-size: 0.9rem;
    color: var(--text-secondary);
    line-height: 1.7;
    flex: 1;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.post-read-more {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--accent-primary);
    margin-top: 0.25rem;
}

.post-card:hover .post-read-more { color: var(--accent-secondary); }

/* Empty state */
.blog-empty {
    text-align: center;
    padding: 80px 0;
    color: var(--text-secondary);
}

.blog-empty p { font-size: 1.1rem; margin-top: 0.5rem; }

/* ── Single Post ── */
.post-page {
    padding: 160px 0 100px;
    background: var(--bg-primary);
}

.post-container {
    max-width: 760px;
    margin: 0 auto;
}

.post-header {
    margin-bottom: 2.5rem;
    padding-bottom: 2rem;
    border-bottom: 1px solid var(--border-color);
}

.post-header .post-meta { margin-bottom: 1rem; }

.post-title {
    font-size: 2.5rem;
    font-weight: 800;
    line-height: 1.25;
    margin-bottom: 0;
    background: linear-gradient(135deg, #ffffff, #e5e5e5);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

[data-theme="light"] .post-title {
    background: linear-gradient(135deg, #111111, var(--accent-primary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Post body */
.post-body {
    font-size: 1.05rem;
    color: var(--text-secondary);
    line-height: 1.85;
}

.post-body p { margin-bottom: 1.25rem; }
.post-body p:last-child { margin-bottom: 0; }

.post-body h2 {
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--text-primary);
    margin: 2rem 0 0.75rem;
}

.post-body h3 {
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--text-primary);
    margin: 1.5rem 0 0.5rem;
}

.post-body ul, .post-body ol {
    padding-left: 1.5rem;
    margin-bottom: 1.25rem;
}

.post-body li { margin-bottom: 0.4rem; }

.post-back {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--accent-primary);
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 600;
    margin-bottom: 2.5rem;
    transition: color 0.3s;
}

.post-back:hover { color: var(--accent-secondary); }

/* ── Admin Page ── */
.admin-page {
    padding: 140px 0 100px;
    background: var(--bg-primary);
    min-height: 100vh;
}

.admin-container {
    max-width: 760px;
    margin: 0 auto;
}

.admin-title {
    font-size: 2rem;
    font-weight: 800;
    margin-bottom: 2rem;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    margin-bottom: 1.25rem;
}

.form-group label {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.form-group input,
.form-group select,
.form-group textarea {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 10px;
    padding: 0.75rem 1rem;
    color: var(--text-primary);
    font-size: 1rem;
    font-family: inherit;
    transition: border-color 0.3s;
    outline: none;
    width: 100%;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    border-color: var(--accent-primary);
}

.form-group textarea {
    resize: vertical;
    min-height: 280px;
    line-height: 1.7;
}

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

.admin-token-bar {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 1rem 1.25rem;
    margin-bottom: 2rem;
    display: flex;
    align-items: center;
    gap: 1rem;
}

.admin-token-bar label {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-secondary);
    white-space: nowrap;
}

.admin-token-bar input {
    flex: 1;
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 0.5rem 0.75rem;
    color: var(--text-primary);
    font-size: 0.9rem;
    font-family: monospace;
    outline: none;
    transition: border-color 0.3s;
}

.admin-token-bar input:focus { border-color: var(--accent-primary); }

.btn-submit {
    width: 100%;
    padding: 1rem;
    background: linear-gradient(135deg, var(--accent-primary), var(--accent-secondary));
    color: white;
    border: none;
    border-radius: 12px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    margin-top: 0.5rem;
}

.btn-submit:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 30px rgba(99, 102, 241, 0.35);
}

.btn-submit:disabled { opacity: 0.6; cursor: not-allowed; transform: none; }

.admin-msg {
    padding: 0.75rem 1rem;
    border-radius: 10px;
    font-size: 0.9rem;
    font-weight: 500;
    margin-top: 1rem;
    display: none;
}

.admin-msg.success {
    background: rgba(34, 197, 94, 0.12);
    border: 1px solid rgba(34, 197, 94, 0.3);
    color: #4ade80;
    display: block;
}

.admin-msg.error {
    background: rgba(239, 68, 68, 0.12);
    border: 1px solid rgba(239, 68, 68, 0.3);
    color: #f87171;
    display: block;
}

.admin-hint {
    font-size: 0.8rem;
    color: var(--text-secondary);
    margin-top: 0.35rem;
    line-height: 1.5;
}

/* ── Responsive ── */
@media (max-width: 640px) {
    .blog-hero { padding: 130px 0 60px; }
    .blog-hero-title { font-size: 1.5rem; }
    .post-grid { grid-template-columns: 1fr; }
    .post-page { padding: 130px 0 80px; }
    .post-title { font-size: 1.85rem; }
    .form-row { grid-template-columns: 1fr; }
}
