/* ============================================================
   Blog page — post list + search, reader view, Medium cards
   ============================================================ */

.page-header {
    padding: calc(var(--nav-height) + 72px) 0 24px;
    background-image:
        radial-gradient(ellipse 55% 60% at 50% 0%, rgba(34, 211, 238, 0.07), transparent 70%),
        radial-gradient(rgba(148, 163, 184, 0.1) 1px, transparent 1px);
    background-size: 100% 100%, 28px 28px;
}

.page-header h1 {
    font-size: clamp(2rem, 5vw, 3rem);
    font-weight: 800;
    color: #fff;
    letter-spacing: -0.02em;
    margin-bottom: 12px;
}

.page-header p {
    max-width: 680px;
    color: var(--muted);
}

.page-header a:hover {
    text-decoration: underline;
}

.blog-section {
    padding: 48px 0;
}

.blog-section .section-title i {
    color: var(--accent);
    font-size: 0.85em;
}

/* ---------- search ---------- */

.blog-search {
    position: relative;
    max-width: 460px;
    margin-bottom: 28px;
}

.blog-search i {
    position: absolute;
    left: 16px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--muted);
    font-size: 0.9rem;
    pointer-events: none;
}

.blog-search input {
    width: 100%;
    font-family: var(--font-mono);
    font-size: 0.92rem;
    color: var(--text);
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 12px 16px 12px 42px;
    outline: none;
    transition: border-color 0.25s ease, box-shadow 0.25s ease;
}

.blog-search input::placeholder {
    color: var(--muted);
    opacity: 0.7;
}

.blog-search input:focus {
    border-color: rgba(34, 211, 238, 0.5);
    box-shadow: var(--glow);
}

/* ---------- post list ---------- */

.post-list {
    display: grid;
    gap: 20px;
}

.post-card {
    display: flex;
    flex-direction: column;
    gap: 12px;
    color: var(--text);
}

.post-card-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 10px;
}

.post-date {
    font-family: var(--font-mono);
    font-size: 0.82rem;
    color: var(--muted);
}

.post-card h3 {
    font-size: 1.2rem;
    color: #fff;
    line-height: 1.4;
}

.post-card > p {
    color: var(--muted);
    font-size: 0.94rem;
}

.post-card .read-more {
    font-family: var(--font-mono);
    font-size: 0.85rem;
    color: var(--accent);
}

.post-card .read-more i {
    font-size: 0.75em;
    transition: transform 0.25s ease;
}

.post-card:hover .read-more i {
    transform: translateX(4px);
}

.post-list-status {
    color: var(--muted);
    font-family: var(--font-mono);
    font-size: 0.9rem;
    padding: 12px 2px;
}

/* ---------- reader view ---------- */

.post-reader {
    max-width: 760px;
}

.back-link {
    display: inline-block;
    font-family: var(--font-mono);
    font-size: 0.88rem;
    color: var(--muted);
    margin-bottom: 24px;
    transition: color 0.25s ease;
}

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

.back-link i {
    font-size: 0.8em;
    margin-right: 6px;
}

.post-meta {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 14px;
    margin-bottom: 24px;
}

/* ---------- markdown body ---------- */

.post-body h1 {
    font-size: clamp(1.7rem, 4vw, 2.3rem);
    font-weight: 800;
    color: #fff;
    letter-spacing: -0.02em;
    line-height: 1.3;
    margin-bottom: 20px;
}

.post-body h2 {
    font-size: 1.4rem;
    color: #fff;
    margin: 36px 0 14px;
}

.post-body h3 {
    font-size: 1.15rem;
    color: #fff;
    margin: 28px 0 12px;
}

.post-body p {
    color: var(--text);
    margin-bottom: 16px;
}

.post-body a {
    color: var(--accent);
}

.post-body a:hover {
    text-decoration: underline;
}

.post-body ul,
.post-body ol {
    margin: 0 0 16px 24px;
    color: var(--text);
}

.post-body li {
    margin-bottom: 6px;
}

.post-body code {
    font-family: var(--font-mono);
    font-size: 0.88em;
    color: var(--accent);
    background: var(--accent-soft);
    border: 1px solid rgba(34, 211, 238, 0.2);
    border-radius: 6px;
    padding: 2px 6px;
}

.post-body pre {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 20px;
    margin-bottom: 20px;
    overflow-x: auto;
}

.post-body pre code {
    color: var(--text);
    background: none;
    border: none;
    padding: 0;
    font-size: 0.86rem;
    line-height: 1.6;
}

.post-body blockquote {
    border-left: 3px solid var(--accent);
    background: var(--surface);
    border-radius: 0 var(--radius) var(--radius) 0;
    padding: 14px 20px;
    margin-bottom: 16px;
    color: var(--muted);
}

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

.post-body img {
    border-radius: var(--radius);
    border: 1px solid var(--border);
    margin: 8px 0 20px;
}

.post-body hr {
    border: none;
    border-top: 1px solid var(--border);
    margin: 32px 0;
}

/* ---------- Medium section ---------- */

.medium-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
    margin-bottom: 28px;
}

.medium-card {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.medium-icon {
    font-size: 1.6rem;
    color: var(--accent);
}

.medium-card h3 {
    font-size: 1.05rem;
    color: #fff;
    line-height: 1.4;
}

.medium-card p {
    color: var(--muted);
    font-size: 0.92rem;
    flex: 1;
}

.medium-card a {
    font-family: var(--font-mono);
    font-size: 0.85rem;
    color: var(--accent);
}

.medium-card a i {
    font-size: 0.75em;
    margin-left: 4px;
}

.medium-card a:hover {
    text-decoration: underline;
}

.medium-more {
    text-align: center;
}
