/* ============================================
   LZLY Blog — Light Premium Theme
   Clean, airy, glassmorphism + subtle elegance
   ============================================ */

/* ── Variables ── */
:root {
    --bg: #f5f5f7;
    --bg-card: #ffffff;
    --bg-card-hover: #ffffff;
    --border: rgba(0, 0, 0, 0.06);
    --border-hover: rgba(0, 0, 0, 0.12);
    --text: #1d1d1f;
    --text-secondary: #6e6e73;
    --text-dim: #86868b;
    --accent: #6c5ce7;
    --accent-soft: rgba(108, 92, 231, 0.08);
    --accent2: #00b894;
    --radius: 16px;
    --radius-sm: 10px;
    --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.04);
    --shadow-md: 0 4px 20px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 8px 40px rgba(0, 0, 0, 0.08);
    --font: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
        "Noto Sans SC", sans-serif;
    --font-mono: "JetBrains Mono", "Fira Code", "Consolas", monospace;
    --nav-h: 60px;
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font);
    background: var(--bg);
    color: var(--text);
    line-height: 1.8;
    min-height: 100vh;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* ── Container ── */
.container {
    max-width: 740px;
    margin: 0 auto;
    padding: 0 24px;
}

/* ── Navigation ── */
.nav {
    position: sticky;
    top: 0;
    z-index: 100;
    height: var(--nav-h);
    backdrop-filter: blur(24px) saturate(1.6);
    -webkit-backdrop-filter: blur(24px) saturate(1.6);
    background: rgba(255, 255, 255, 0.72);
    border-bottom: 1px solid var(--border);
}

.nav .container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 100%;
}

.logo {
    font-size: 1.25rem;
    font-weight: 800;
    color: var(--accent);
    text-decoration: none;
    letter-spacing: 1.5px;
    background: linear-gradient(135deg, var(--accent), var(--accent2));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.nav-links {
    display: flex;
    gap: 4px;
}

.nav-links a {
    color: var(--text-dim);
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 500;
    padding: 6px 16px;
    border-radius: 8px;
    transition: all 0.2s;
}

.nav-links a:hover {
    color: var(--text);
    background: rgba(0, 0, 0, 0.04);
}

/* ── Hero ── */
.hero {
    text-align: center;
    padding: 80px 0 56px;
    position: relative;
}

.hero::after {
    content: "";
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 48px;
    height: 3px;
    border-radius: 2px;
    background: linear-gradient(90deg, var(--accent), var(--accent2));
}

.hero h1 {
    font-size: 2.6rem;
    font-weight: 800;
    color: var(--text);
    margin-bottom: 10px;
    letter-spacing: -0.5px;
}

.hero p {
    color: var(--text-secondary);
    font-size: 1.1rem;
    font-weight: 400;
}

/* ── Post List ── */
.post-list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 16px;
    padding-bottom: 56px;
}

.post-item {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 28px 32px;
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    position: relative;
    overflow: hidden;
    box-shadow: var(--shadow-sm);
}

.post-item::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(
        135deg,
        var(--accent-soft) 0%,
        transparent 50%
    );
    opacity: 0;
    transition: opacity 0.4s;
    pointer-events: none;
}

.post-item:hover {
    border-color: var(--border-hover);
    transform: translateY(-3px);
    box-shadow: var(--shadow-lg);
}

.post-item:hover::before {
    opacity: 1;
}

.post-item a {
    text-decoration: none;
    color: inherit;
    display: block;
    position: relative;
    z-index: 1;
}

.post-item h2 {
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--text);
    margin-bottom: 8px;
    transition: color 0.2s;
}

.post-item:hover h2 {
    color: var(--accent);
}

.post-meta {
    font-size: 0.82rem;
    color: var(--text-dim);
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.post-meta::before {
    content: "📅";
    font-size: 0.8rem;
}

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

/* ── Single Post ── */
.post {
    padding: 48px 0;
    animation: fadeUp 0.5s ease;
}

@keyframes fadeUp {
    from {
        opacity: 0;
        transform: translateY(16px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ── Post Typography ── */
.post h1 {
    font-size: 2.2rem;
    font-weight: 800;
    color: var(--text);
    margin-bottom: 10px;
    letter-spacing: -0.5px;
    line-height: 1.3;
}

.post .post-meta {
    font-size: 0.85rem;
    color: var(--text-dim);
    margin-bottom: 36px;
    padding-bottom: 24px;
    border-bottom: 1px solid var(--border);
}

.post .post-meta::before {
    content: "📅 ";
}

.post p {
    margin-bottom: 1.3em;
    color: var(--text-secondary);
    font-size: 1.02rem;
    line-height: 1.85;
}

.post h2 {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text);
    margin: 40px 0 14px;
    letter-spacing: -0.3px;
}

.post h3 {
    font-size: 1.2rem;
    font-weight: 600;
    color: var(--text);
    margin: 32px 0 12px;
}

.post ul,
.post ol {
    margin: 0 0 1.3em 24px;
    color: var(--text-secondary);
}

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

.post li::marker {
    color: var(--accent);
}

.post strong {
    color: var(--text);
    font-weight: 700;
}

/* ── Inline Code ── */
.post code:not(pre code) {
    background: var(--accent-soft);
    color: var(--accent);
    padding: 2px 10px;
    border-radius: 6px;
    font-size: 0.88em;
    font-family: var(--font-mono);
    font-weight: 500;
}

/* ── Code Blocks ── */
.post pre {
    background: #fafafa;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 24px;
    overflow-x: auto;
    margin-bottom: 1.5em;
    font-size: 0.88rem;
    line-height: 1.7;
    box-shadow: var(--shadow-sm);
}

.post pre code {
    background: none;
    padding: 0;
    color: #1d1d1f;
    font-family: var(--font-mono);
}

/* ── Blockquote ── */
.post blockquote {
    border-left: 3px solid var(--accent);
    padding: 16px 24px;
    margin: 0 0 1.3em;
    background: var(--accent-soft);
    border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
    color: var(--text-secondary);
}

.post blockquote p {
    margin-bottom: 0;
    color: var(--text-secondary);
}

/* ── Links ── */
.post a {
    color: var(--accent);
    text-decoration: none;
    border-bottom: 1px solid transparent;
    transition: all 0.2s;
    font-weight: 500;
}

.post a:hover {
    color: #5a4bd1;
    border-bottom-color: var(--accent);
}

/* ── Images ── */
.post img {
    max-width: 100%;
    border-radius: var(--radius-sm);
    margin: 24px 0;
    border: 1px solid var(--border);
    box-shadow: var(--shadow-sm);
    transition: box-shadow 0.3s;
}

.post img:hover {
    box-shadow: var(--shadow-md);
}

/* ── Horizontal Rule ── */
.post hr {
    border: none;
    height: 1px;
    background: var(--border);
    margin: 40px 0;
}

/* ── Footer ── */
.footer {
    border-top: 1px solid var(--border);
    text-align: center;
    padding: 32px 0;
    color: var(--text-dim);
    font-size: 0.82rem;
}

.footer p {
    opacity: 0.6;
}

/* ── Responsive ── */
@media (max-width: 600px) {
    .hero h1 {
        font-size: 1.8rem;
    }
    .post h1 {
        font-size: 1.6rem;
    }
    .post-item {
        padding: 20px;
    }
    .container {
        padding: 0 16px;
    }
    .hero {
        padding: 48px 0 40px;
    }
}

/* ── Smooth Scrollbar ── */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: transparent;
}

::-webkit-scrollbar-thumb {
    background: rgba(0, 0, 0, 0.1);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: rgba(0, 0, 0, 0.2);
}

/* ── Selection ── */
::selection {
    background: rgba(108, 92, 231, 0.15);
    color: var(--text);
}
