/* ═══════════════════════════════════════════════════════════
   LOGBLOG — Stylesheet v3 — Ocean Blue Palette
   ═══════════════════════════════════════════════════════════ */

@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:wght@400;600;700;900&family=Inter:wght@300;400;500;600;700&family=JetBrains+Mono:wght@400;500&display=swap');

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

:root {
    --deep-twilight: #03045e;
    --french-blue: #023e8a;
    --teal-blue: #0077b6;
    --blue-green: #0096c7;
    --turquoise: #00b4d8;
    --sky-aqua: #48cae4;
    --frosted-blue: #90e0ef;
    --frosted-blue-2: #ade8f4;
    --light-cyan: #caf0f8;

    --bg-dark: var(--deep-twilight);
    --bg-dark-2: var(--french-blue);
    --bg-dark-3: #020340;
    --accent-primary: var(--turquoise);
    --accent-primary-glow: var(--blue-green);
    --accent-secondary: var(--sky-aqua);
    --accent-deep: var(--teal-blue);

    --text-light: var(--light-cyan);
    --text-muted-dark: var(--frosted-blue);
    --text-muted-dark-2: rgba(144, 224, 239, 0.6);

    --bg-light: #ffffff;
    --bg-light-2: var(--light-cyan);
    --bg-light-3: #f5fcfe;
    --text-dark: var(--deep-twilight);
    --text-body: var(--french-blue);
    --text-muted: #5a87a8;
    --link: var(--teal-blue);
    --link-light: var(--light-cyan);
    --border: #d4ecf4;
    --border-strong: var(--frosted-blue-2);

    --shadow-sm: 0 1px 4px rgba(3, 4, 94, 0.08);
    --shadow-md: 0 4px 24px rgba(3, 4, 94, 0.1);
    --shadow-lg: 0 12px 48px rgba(3, 4, 94, 0.15);
    --radius: 14px;
    --radius-sm: 8px;
    --transition: 0.3s cubic-bezier(0.4, 0, 0.2, 1);

    --logo-1: var(--sky-aqua);
    --logo-2: var(--teal-blue);
}

html { scroll-behavior: smooth; }
body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    line-height: 1.7;
    overflow-x: hidden;
}

/* ═══ NAVIGATION ═══ */
.navbar {
    position: fixed; top: 0; left: 0; right: 0; z-index: 1000;
    display: flex; justify-content: space-between; align-items: center;
    padding: 1.2rem 3rem; transition: var(--transition);
}
.navbar.scrolled {
    background: rgba(3, 4, 94, 0.88);
    backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px);
    padding: 0.8rem 3rem; box-shadow: 0 4px 30px rgba(0,0,0,0.15);
}
.navbar.light {
    background: rgba(255,255,255,0.88);
    backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px);
    box-shadow: 0 1px 12px rgba(3, 4, 94, 0.06);
}
.navbar.light.scrolled { padding: 0.7rem 3rem; }

.nav-logo {
    font-family: 'Playfair Display', serif;
    font-size: 1.7rem; font-weight: 700;
    text-decoration: none; display: flex; align-items: center;
    letter-spacing: -0.02em;
}
.nav-logo .logo-log { color: var(--logo-1); text-shadow: 0 0 24px rgba(72, 202, 228, 0.5); }
.nav-logo .logo-blog { color: var(--logo-2); text-shadow: 0 0 24px rgba(0, 119, 182, 0.5); }
.navbar.light .nav-logo .logo-log { color: var(--turquoise); text-shadow: none; }
.navbar.light .nav-logo .logo-blog { color: var(--french-blue); text-shadow: none; }

.nav-links { display: flex; gap: 2.5rem; list-style: none; align-items: center; }
.nav-links a {
    text-decoration: none; font-size: 0.95rem; font-weight: 500;
    transition: var(--transition); position: relative;
}
.navbar:not(.light) .nav-links a { color: var(--text-light); opacity: 0.75; }
.navbar:not(.light) .nav-links a:hover, .navbar:not(.light) .nav-links a.active { opacity: 1; color: var(--turquoise); }
.navbar.light .nav-links a { color: var(--text-body); }
.navbar.light .nav-links a:hover, .navbar.light .nav-links a.active { color: var(--teal-blue); }
.nav-links a::after {
    content: ''; position: absolute; bottom: -4px; left: 0;
    width: 0; height: 2px; border-radius: 1px; transition: width var(--transition);
}
.navbar:not(.light) .nav-links a:hover::after, .navbar:not(.light) .nav-links a.active::after { width: 100%; background: linear-gradient(90deg, var(--turquoise), var(--sky-aqua)); }
.navbar.light .nav-links a:hover::after, .navbar.light .nav-links a.active::after { width: 100%; background: var(--teal-blue); }
.nav-login-mini { font-size: 0.82rem !important; opacity: 0.45 !important; font-family: 'JetBrains Mono', monospace !important; }
.nav-login-mini:hover { opacity: 0.8 !important; }

/* ═══ HOMEPAGE ═══ */
.home-body { background: var(--deep-twilight); color: var(--text-light); position: relative; }
.home-body::before {
    content: ''; position: fixed; top: 0; left: 0; right: 0; bottom: 0;
    background:
        radial-gradient(ellipse 80% 60% at 50% 0%, rgba(0, 180, 216, 0.1) 0%, transparent 50%),
        radial-gradient(ellipse 60% 50% at 85% 90%, rgba(72, 202, 228, 0.07) 0%, transparent 50%),
        radial-gradient(ellipse 60% 50% at 15% 70%, rgba(2, 62, 138, 0.15) 0%, transparent 50%);
    z-index: 0; pointer-events: none;
}
#math-canvas { position: fixed; top: 0; left: 0; width: 100%; height: 100%; z-index: 0; }

.hero {
    position: relative; z-index: 1; min-height: 100vh;
    display: flex; align-items: center; justify-content: center;
    text-align: center; padding: 6rem 2rem 4rem;
}
.hero-content { max-width: 820px; animation: fadeInUp 1s ease; }
.hero-badge {
    display: inline-flex; align-items: center; gap: 0.5rem;
    padding: 0.4rem 1.2rem;
    background: rgba(0, 180, 216, 0.12); border: 1px solid rgba(0, 180, 216, 0.3);
    border-radius: 50px; font-family: 'JetBrains Mono', monospace;
    font-size: 0.8rem; letter-spacing: 0.15em; text-transform: uppercase;
    color: var(--turquoise); margin-bottom: 2rem;
}
.hero-badge .pulse { width: 8px; height: 8px; border-radius: 50%; background: var(--turquoise); animation: pulse 2s ease infinite; }
.hero h1 {
    font-family: 'Playfair Display', serif;
    font-size: clamp(2.5rem, 7vw, 5.5rem); font-weight: 700;
    line-height: 1.05; margin-bottom: 1.5rem; color: var(--text-light);
}
.hero-subtitle {
    font-size: clamp(1rem, 2vw, 1.25rem); color: var(--text-muted-dark);
    font-weight: 300; margin-bottom: 2.5rem; max-width: 600px; margin-left: auto; margin-right: auto;
}
.hero-buttons { display: flex; gap: 1rem; justify-content: center; flex-wrap: wrap; }

.btn-cyan {
    display: inline-flex; align-items: center; gap: 0.5rem;
    padding: 0.9rem 2.5rem; background: var(--turquoise); color: var(--deep-twilight);
    text-decoration: none; font-weight: 600; font-size: 0.95rem;
    border-radius: 50px; border: none; cursor: pointer; transition: var(--transition);
    box-shadow: 0 4px 20px rgba(0, 180, 216, 0.35);
}
.btn-cyan:hover { background: var(--sky-aqua); transform: translateY(-2px); box-shadow: 0 8px 30px rgba(72, 202, 228, 0.45); }
.btn-ghost {
    display: inline-flex; align-items: center; gap: 0.5rem;
    padding: 0.9rem 2.5rem; background: transparent; color: var(--text-light);
    text-decoration: none; font-weight: 500; font-size: 0.95rem;
    border-radius: 50px; border: 1.5px solid rgba(202, 240, 248, 0.2); cursor: pointer; transition: var(--transition);
}
.btn-ghost:hover { border-color: var(--turquoise); color: var(--turquoise); background: rgba(0, 180, 216, 0.06); transform: translateY(-2px); }

.scroll-indicator { position: absolute; bottom: 2rem; left: 50%; transform: translateX(-50%); color: var(--text-muted-dark); font-size: 1.5rem; animation: bounce 2s infinite; z-index: 2; opacity: 0.4; }
.hero-features { display: flex; gap: 2rem; justify-content: center; margin-top: 3rem; flex-wrap: wrap; }
.feature-pill {
    display: flex; align-items: center; gap: 0.5rem;
    padding: 0.5rem 1.2rem; background: rgba(202, 240, 248, 0.06);
    border: 1px solid rgba(202, 240, 248, 0.12); border-radius: 50px;
    font-size: 0.85rem; color: var(--text-muted-dark); backdrop-filter: blur(8px);
}
.feature-pill .dot { width: 6px; height: 6px; border-radius: 50%; }

/* Bio Section */
.bio-section { position: relative; z-index: 1; padding: 6rem 2rem; }
.bio-section::before { content: ''; position: absolute; top: 0; left: 0; right: 0; height: 1px; background: linear-gradient(90deg, transparent, rgba(0,180,216,0.3), rgba(72,202,228,0.3), transparent); }
.bio-container { max-width: 1100px; margin: 0 auto; display: grid; grid-template-columns: 300px 1fr; gap: 4rem; align-items: start; }
.bio-photo-wrapper { position: sticky; top: 100px; }
.bio-photo {
    width: 100%; aspect-ratio: 1; border-radius: var(--radius); overflow: hidden;
    background: linear-gradient(135deg, var(--french-blue), var(--bg-dark-3));
    display: flex; align-items: center; justify-content: center;
    position: relative; border: 1px solid rgba(0, 180, 216, 0.15);
}
.bio-photo::after { content: ''; position: absolute; top: 0; left: 0; right: 0; bottom: 0; border-radius: var(--radius); box-shadow: inset 0 0 60px rgba(0, 180, 216, 0.1); pointer-events: none; }
.bio-photo img { width: 100%; height: 100%; object-fit: cover; }
.bio-photo-placeholder { text-align: center; padding: 2rem; }
.bio-photo-placeholder .symbol { font-family: 'Playfair Display', serif; font-size: 4.5rem; background: linear-gradient(135deg, var(--sky-aqua), var(--turquoise)); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; margin-bottom: 0.5rem; }
.bio-photo-placeholder p { color: var(--text-muted-dark-2); font-size: 0.85rem; }
.bio-content h2 { font-family: 'Playfair Display', serif; font-size: clamp(1.8rem, 4vw, 2.5rem); margin-bottom: 0.5rem; color: var(--text-light); }
.bio-content .bio-role { font-family: 'JetBrains Mono', monospace; font-size: 0.88rem; color: var(--turquoise); margin-bottom: 2rem; letter-spacing: 0.03em; }
.bio-content p { color: var(--text-muted-dark); margin-bottom: 1.5rem; font-size: 1.05rem; line-height: 1.9; }
.bio-content p strong { color: var(--text-light); font-weight: 500; }
.bio-interests { display: flex; flex-wrap: wrap; gap: 0.7rem; margin-top: 2rem; }
.interest-tag { padding: 0.4rem 1.1rem; background: rgba(0, 180, 216, 0.1); border: 1px solid rgba(0, 180, 216, 0.25); border-radius: 50px; font-size: 0.83rem; color: var(--turquoise); transition: var(--transition); }
.interest-tag:hover { background: rgba(0, 180, 216, 0.2); border-color: var(--turquoise); }
.interest-tag:nth-child(even) { background: rgba(72, 202, 228, 0.1); border-color: rgba(72, 202, 228, 0.25); color: var(--sky-aqua); }
.interest-tag:nth-child(even):hover { background: rgba(72, 202, 228, 0.2); border-color: var(--sky-aqua); }
.home-cta { position: relative; z-index: 1; padding: 4rem 2rem 6rem; text-align: center; }
.home-cta h3 { font-family: 'Playfair Display', serif; font-size: 1.8rem; color: var(--text-light); margin-bottom: 0.5rem; }
.home-cta p { color: var(--text-muted-dark); margin-bottom: 2rem; }

/* ═══ BLOG PAGE ═══ */
.light-body { background: var(--bg-light); color: var(--text-body); }
.page-header { padding: 8rem 2rem 2rem; text-align: center; background: var(--bg-light); }
.page-header h1 { font-family: 'Playfair Display', serif; font-size: clamp(2rem, 5vw, 3rem); color: var(--text-dark); margin-bottom: 0.3rem; }
.page-header .subtitle { color: var(--text-muted); font-size: 1.05rem; }
.header-divider { width: 60px; height: 3px; background: linear-gradient(90deg, var(--teal-blue), var(--turquoise), var(--sky-aqua)); margin: 1rem auto 1.5rem; border-radius: 2px; }
.blog-list { max-width: 900px; margin: 0 auto; padding: 1rem 2rem 5rem; }

.post-card { background: var(--bg-light); border: 1px solid var(--border); border-radius: var(--radius); padding: 2rem 2.5rem; margin-bottom: 1.5rem; transition: var(--transition); position: relative; overflow: hidden; }
.post-card::before { content: ''; position: absolute; top: 0; left: 0; width: 100%; height: 3px; background: linear-gradient(90deg, var(--teal-blue), var(--turquoise), var(--sky-aqua)); transform: scaleX(0); transform-origin: left; transition: transform var(--transition); }
.post-card:hover { box-shadow: var(--shadow-lg); transform: translateY(-3px); }
.post-card:hover::before { transform: scaleX(1); }
.post-meta { display: flex; align-items: center; gap: 1rem; font-size: 0.85rem; color: var(--text-muted); margin-bottom: 0.8rem; }
.post-date { font-family: 'JetBrains Mono', monospace; font-weight: 500; }
.post-pdf-badge { padding: 0.15rem 0.6rem; background: var(--light-cyan); color: var(--teal-blue); border-radius: 4px; font-size: 0.75rem; font-weight: 600; letter-spacing: 0.03em; }
.post-card h2 { font-family: 'Playfair Display', serif; font-size: 1.5rem; color: var(--text-dark); margin-bottom: 0.6rem; line-height: 1.3; }
.post-card h2 a { text-decoration: none; color: inherit; transition: var(--transition); }
.post-card h2 a:hover { color: var(--teal-blue); }
.post-card .post-desc { color: var(--text-body); margin-bottom: 1.2rem; font-size: 0.98rem; }
.post-actions { display: flex; gap: 0.8rem; flex-wrap: wrap; align-items: center; }

.btn-teal, .btn-indigo {
    display: inline-flex; align-items: center; gap: 0.4rem;
    padding: 0.6rem 1.5rem; background: var(--teal-blue); color: white;
    text-decoration: none; font-size: 0.88rem; font-weight: 500;
    border-radius: var(--radius-sm); transition: var(--transition); border: none; cursor: pointer;
}
.btn-teal:hover, .btn-indigo:hover { background: var(--blue-green); transform: translateY(-1px); box-shadow: 0 4px 16px rgba(0, 119, 182, 0.35); }
.btn-outline {
    display: inline-flex; align-items: center; gap: 0.4rem;
    padding: 0.6rem 1.5rem; background: transparent; color: var(--teal-blue);
    text-decoration: none; font-size: 0.88rem; font-weight: 500;
    border-radius: var(--radius-sm); border: 1.5px solid var(--border-strong); transition: var(--transition); cursor: pointer;
}
.btn-outline:hover { border-color: var(--turquoise); background: var(--light-cyan); }
.comment-count { display: inline-flex; align-items: center; gap: 0.3rem; font-size: 0.83rem; color: var(--text-muted); margin-left: auto; }
.empty-state { text-align: center; padding: 4rem 2rem; color: var(--text-muted); }
.empty-state .icon { font-size: 3rem; margin-bottom: 1rem; opacity: 0.3; }

/* Blog expand/collapse */
.blog-card.expanded { border-color: var(--turquoise); box-shadow: 0 0 0 2px rgba(0,180,216,0.15), var(--shadow-lg); }
.blog-detail { max-height: 0; overflow: hidden; transition: max-height 0.5s cubic-bezier(0.4,0,0.2,1); }
.blog-card.expanded .blog-detail { max-height: none; }
.blog-detail-toolbar { display: flex; justify-content: space-between; align-items: center; margin: 1.5rem 0 1rem; flex-wrap: wrap; gap: 0.5rem; }
.blog-detail-toolbar .blog-detail-label { font-size: 0.85rem; color: var(--text-muted); font-family: 'JetBrains Mono', monospace; }
.blog-detail-toolbar .blog-detail-buttons { display: flex; gap: 0.6rem; }
.blog-toggle-btn { display: inline-flex; align-items: center; gap: 0.4rem; padding: 0.5rem 1.2rem; background: var(--teal-blue); color: white; border: none; border-radius: var(--radius-sm); font-size: 0.85rem; font-weight: 500; cursor: pointer; transition: var(--transition); }
.blog-toggle-btn:hover { background: var(--blue-green); }
.blog-collapse-btn { display: inline-flex; align-items: center; gap: 0.4rem; padding: 0.5rem 1.2rem; background: transparent; color: var(--text-muted); border: 1.5px solid var(--border); border-radius: var(--radius-sm); font-size: 0.85rem; font-weight: 500; cursor: pointer; transition: var(--transition); }
.blog-collapse-btn:hover { border-color: var(--turquoise); color: var(--teal-blue); background: var(--light-cyan); }
.blog-pdf-wrapper { background: var(--bg-light-3); border: 1px solid var(--border); border-radius: var(--radius); padding: 1rem; margin-bottom: 1.5rem; }
.blog-pdf-wrapper iframe { width: 100%; height: 80vh; border: none; border-radius: var(--radius-sm); background: white; }

/* POST DETAIL */
.post-detail { max-width: 900px; margin: 0 auto; padding: 2rem 2rem 4rem; }
.back-link { display: inline-flex; align-items: center; gap: 0.4rem; color: var(--text-muted); text-decoration: none; font-size: 0.9rem; margin-bottom: 1.5rem; transition: var(--transition); }
.back-link:hover { color: var(--teal-blue); }
.post-detail h1 { font-family: 'Playfair Display', serif; font-size: clamp(1.8rem, 4vw, 2.5rem); color: var(--text-dark); margin-bottom: 0.5rem; line-height: 1.3; }
.post-detail .post-meta-full { display: flex; align-items: center; gap: 1rem; font-size: 0.88rem; color: var(--text-muted); margin-bottom: 2rem; padding-bottom: 1.5rem; border-bottom: 1px solid var(--border); }
.pdf-viewer-wrapper { background: var(--bg-light-3); border: 1px solid var(--border); border-radius: var(--radius); padding: 1rem; margin-bottom: 3rem; }
.pdf-viewer-wrapper iframe { width: 100%; height: 75vh; border: none; border-radius: var(--radius-sm); background: white; }
.pdf-download-bar { display: flex; justify-content: space-between; align-items: center; margin-bottom: 0.8rem; flex-wrap: wrap; gap: 0.5rem; }
.pdf-download-bar .label { font-size: 0.85rem; color: var(--text-muted); font-family: 'JetBrains Mono', monospace; }

/* Comments */
.comments-section { margin-top: 3rem; }
.comments-section h3 { font-family: 'Playfair Display', serif; font-size: 1.5rem; color: var(--text-dark); margin-bottom: 1.5rem; padding-bottom: 0.8rem; border-bottom: 2px solid var(--border); }
.comment-form { background: var(--bg-light-3); border: 1px solid var(--border); border-radius: var(--radius); padding: 1.5rem; margin-bottom: 2rem; }
.comment-form label, .form-group label, .about-edit-form label { display: block; font-size: 0.85rem; font-weight: 600; color: var(--text-body); margin-bottom: 0.4rem; }
.comment-form input, .comment-form textarea, .form-group input[type="text"], .form-group textarea, .about-edit-form textarea, .about-edit-form input {
    width: 100%; padding: 0.7rem 1rem; border: 1.5px solid var(--border);
    border-radius: var(--radius-sm); font-family: inherit; font-size: 0.95rem;
    transition: var(--transition); background: white; color: var(--text-dark);
}
.comment-form input:focus, .comment-form textarea:focus, .form-group input[type="text"]:focus, .form-group textarea:focus, .about-edit-form textarea:focus, .about-edit-form input:focus { outline: none; border-color: var(--turquoise); box-shadow: 0 0 0 3px rgba(0, 180, 216, 0.12); }
.comment-form textarea { resize: vertical; min-height: 100px; margin-top: 1rem; }
.comment-form .form-row { margin-bottom: 1rem; }
.comment-list { list-style: none; }
.comment-item { padding: 1.2rem 0; border-bottom: 1px solid var(--border); }
.comment-header { display: flex; align-items: center; gap: 0.7rem; margin-bottom: 0.5rem; }
.comment-avatar { width: 36px; height: 36px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-weight: 600; font-size: 0.9rem; flex-shrink: 0; color: white; }
.comment-info { flex: 1; }
.comment-author { font-weight: 600; color: var(--text-dark); font-size: 0.92rem; }
.comment-date { font-size: 0.78rem; color: var(--text-muted); }
.comment-body { color: var(--text-body); font-size: 0.95rem; padding-left: calc(36px + 0.7rem); white-space: pre-wrap; }
.comment-delete { background: none; border: none; color: var(--text-muted); font-size: 0.78rem; cursor: pointer; opacity: 0.5; transition: var(--transition); }
.comment-delete:hover { opacity: 1; color: #b91c1c; }

/* ABOUT */
.about-content { max-width: 760px; margin: 0 auto; padding: 1rem 2rem 5rem; }
.about-text { font-size: 1.1rem; line-height: 1.9; color: var(--text-body); white-space: pre-wrap; padding: 2.5rem; background: var(--bg-light-3); border: 1px solid var(--border); border-radius: var(--radius); margin-bottom: 2rem; }
.about-alert { padding: 0.8rem 1.2rem; background: var(--light-cyan); color: var(--teal-blue); border: 1px solid var(--frosted-blue-2); border-radius: var(--radius-sm); margin-bottom: 1.5rem; font-size: 0.92rem; text-align: center; }
.about-edit-form { background: var(--bg-light-3); border: 1px solid var(--border); border-radius: var(--radius); padding: 2rem; }
.about-edit-form h3 { font-family: 'Playfair Display', serif; font-size: 1.3rem; color: var(--text-dark); margin-bottom: 1rem; }
.about-edit-form textarea { resize: vertical; min-height: 200px; margin-bottom: 1rem; }
.about-edit-hint { font-size: 0.8rem; color: var(--text-muted); margin-top: 0.5rem; }
.contact-email-card { text-align: center; padding: 2.5rem 2rem; background: var(--bg-light-3); border: 1px solid var(--border); border-radius: var(--radius); margin-top: 2rem; }
.contact-email-card .icon-circle { width: 64px; height: 64px; border-radius: 50%; background: var(--light-cyan); display: flex; align-items: center; justify-content: center; margin: 0 auto 1rem; }
.contact-email-card .icon-circle svg { width: 28px; height: 28px; fill: var(--teal-blue); }
.contact-email-card h3 { font-family: 'Playfair Display', serif; font-size: 1.2rem; color: var(--text-dark); margin-bottom: 0.5rem; }
.contact-email { font-family: 'JetBrains Mono', monospace; font-size: 1.1rem; color: var(--teal-blue); text-decoration: none; transition: var(--transition); display: inline-block; }
.contact-email:hover { text-decoration: underline; }

/* LOGIN */
.login-body { background: var(--deep-twilight); color: var(--text-light); min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 2rem; position: relative; overflow: hidden; }
.login-body::before { content: ''; position: absolute; top: 0; left: 0; right: 0; bottom: 0; background: radial-gradient(ellipse 60% 50% at 50% 50%, rgba(0, 180, 216, 0.1) 0%, transparent 60%), radial-gradient(ellipse 40% 30% at 70% 80%, rgba(72, 202, 228, 0.07) 0%, transparent 50%); pointer-events: none; }
.login-box { position: relative; z-index: 1; background: rgba(3, 4, 94, 0.8); backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px); border: 1px solid rgba(202, 240, 248, 0.12); border-radius: var(--radius); padding: 3rem; width: 100%; max-width: 420px; box-shadow: 0 20px 60px rgba(0,0,0,0.3); }
.login-box .login-logo { text-align: center; font-family: 'Playfair Display', serif; font-size: 2rem; font-weight: 700; margin-bottom: 0.5rem; }
.login-box .login-logo .logo-log { color: var(--sky-aqua); text-shadow: 0 0 24px rgba(72, 202, 228, 0.5); }
.login-box .login-logo .logo-blog { color: var(--teal-blue); text-shadow: 0 0 24px rgba(0, 119, 182, 0.5); }
.login-box .login-sub { text-align: center; color: var(--text-muted-dark); font-size: 0.9rem; margin-bottom: 2rem; }
.login-box label { display: block; font-size: 0.85rem; color: var(--turquoise); margin-bottom: 0.4rem; font-weight: 500; }
.login-box input { width: 100%; padding: 0.8rem 1rem; background: rgba(202, 240, 248, 0.06); border: 1.5px solid rgba(202, 240, 248, 0.15); border-radius: var(--radius-sm); color: var(--text-light); font-family: inherit; font-size: 0.95rem; margin-bottom: 1.2rem; transition: var(--transition); }
.login-box input:focus { outline: none; border-color: var(--turquoise); box-shadow: 0 0 0 3px rgba(0, 180, 216, 0.15); }
.login-box button { width: 100%; padding: 0.9rem; background: linear-gradient(135deg, var(--turquoise), var(--blue-green)); color: white; border: none; border-radius: var(--radius-sm); font-family: inherit; font-size: 1rem; font-weight: 600; cursor: pointer; transition: var(--transition); }
.login-box button:hover { transform: translateY(-1px); box-shadow: 0 8px 30px rgba(0, 180, 216, 0.35); }
.login-error { background: rgba(220, 38, 38, 0.15); border: 1px solid rgba(220, 38, 38, 0.3); color: #fca5a5; padding: 0.7rem 1rem; border-radius: var(--radius-sm); font-size: 0.88rem; margin-bottom: 1.2rem; text-align: center; }
.login-back { text-align: center; margin-top: 1.5rem; }
.login-back a { color: var(--text-muted-dark); font-size: 0.85rem; text-decoration: none; transition: var(--transition); }
.login-back a:hover { color: var(--turquoise); }

/* ADMIN */
.admin-body { background: var(--bg-light-3); min-height: 100vh; }
.admin-container { max-width: 900px; margin: 0 auto; padding: 7rem 2rem 4rem; }
.admin-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 2rem; flex-wrap: wrap; gap: 1rem; }
.admin-header h1 { font-family: 'Playfair Display', serif; font-size: 1.8rem; color: var(--text-dark); }
.admin-header .user-info { font-size: 0.88rem; color: var(--text-muted); }
.admin-header .user-info a { color: var(--teal-blue); text-decoration: none; }
.admin-alert { padding: 0.8rem 1.2rem; border-radius: var(--radius-sm); margin-bottom: 1.5rem; font-size: 0.92rem; }
.admin-alert.success { background: var(--light-cyan); color: var(--teal-blue); border: 1px solid var(--frosted-blue-2); }
.admin-alert.error { background: #fee2e2; color: #991b1b; border: 1px solid #fca5a5; }
.upload-form { background: white; border: 1px solid var(--border); border-radius: var(--radius); padding: 2rem; margin-bottom: 3rem; }
.upload-form h2 { font-family: 'Playfair Display', serif; font-size: 1.3rem; color: var(--text-dark); margin-bottom: 1.5rem; }
.form-group { margin-bottom: 1.2rem; }
.form-group label { display: block; font-size: 0.88rem; font-weight: 600; color: var(--text-body); margin-bottom: 0.4rem; }
.form-group input[type="text"], .form-group textarea { width: 100%; padding: 0.7rem 1rem; border: 1.5px solid var(--border); border-radius: var(--radius-sm); font-family: inherit; font-size: 0.95rem; transition: var(--transition); background: white; color: var(--text-dark); }
.form-group input[type="text"]:focus, .form-group textarea:focus { outline: none; border-color: var(--turquoise); box-shadow: 0 0 0 3px rgba(0, 180, 216, 0.12); }
.form-group textarea { resize: vertical; min-height: 80px; }
.file-drop { border: 2px dashed var(--border-strong); border-radius: var(--radius-sm); padding: 2rem; text-align: center; transition: var(--transition); cursor: pointer; background: var(--bg-light-3); }
.file-drop:hover, .file-drop.dragover { border-color: var(--turquoise); background: var(--light-cyan); }
.file-drop .drop-icon { font-size: 2rem; color: var(--text-muted); margin-bottom: 0.5rem; }
.file-drop p { color: var(--text-muted); font-size: 0.9rem; }
.file-drop .filename { color: var(--teal-blue); font-weight: 600; margin-top: 0.5rem; }
.file-drop input[type="file"] { display: none; }
.admin-posts h2 { font-family: 'Playfair Display', serif; font-size: 1.3rem; color: var(--text-dark); margin-bottom: 1rem; }
.admin-post-item { display: flex; align-items: center; gap: 1rem; background: white; border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 1rem 1.5rem; margin-bottom: 0.8rem; transition: var(--transition); }
.admin-post-item:hover { box-shadow: var(--shadow-sm); }
.admin-post-item .post-info { flex: 1; }
.admin-post-item .post-info h4 { font-size: 1rem; color: var(--text-dark); margin-bottom: 0.2rem; }
.admin-post-item .post-info h4 a { color: inherit; text-decoration: none; }
.admin-post-item .post-info .meta { font-size: 0.8rem; color: var(--text-muted); }
.btn-danger { padding: 0.4rem 1rem; background: transparent; color: #b91c1c; border: 1.5px solid #fca5a5; border-radius: var(--radius-sm); font-size: 0.82rem; cursor: pointer; transition: var(--transition); }
.btn-danger:hover { background: #b91c1c; color: white; border-color: #b91c1c; }

/* 404 */
.not-found-body { background: var(--deep-twilight); color: var(--text-light); min-height: 100vh; display: flex; align-items: center; justify-content: center; text-align: center; padding: 2rem; }
.not-found-body .code { font-family: 'Playfair Display', serif; font-size: 6rem; background: linear-gradient(135deg, var(--sky-aqua), var(--turquoise), var(--teal-blue)); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; line-height: 1; }
.not-found-body h2 { font-family: 'Playfair Display', serif; font-size: 1.5rem; margin-bottom: 1rem; }
.not-found-body p { color: var(--text-muted-dark); margin-bottom: 2rem; }

/* Footer */
.footer { position: relative; z-index: 1; text-align: center; padding: 2rem; background: rgba(3, 4, 94, 0.5); border-top: 1px solid rgba(202, 240, 248, 0.05); }
.footer.light-footer { background: var(--bg-light-3); border-top: 1px solid var(--border); }
.footer p { font-size: 0.82rem; color: var(--text-muted-dark); }
.footer.light-footer p { color: var(--text-muted); }

/* Inline edit forms */
.inline-edit-form { background: rgba(0, 180, 216, 0.06); border: 1px dashed rgba(0, 180, 216, 0.3); border-radius: var(--radius); padding: 1.5rem; margin-bottom: 2rem; }
.inline-edit-form.light { background: var(--bg-light-3); border: 1px dashed var(--frosted-blue-2); }
.inline-edit-form h3 { font-family: 'Playfair Display', serif; font-size: 1.1rem; margin-bottom: 1rem; }
.inline-edit-form label { display: block; font-size: 0.82rem; font-weight: 600; margin-bottom: 0.3rem; margin-top: 0.8rem; }
.inline-edit-form input[type="text"], .inline-edit-form input[type="email"], .inline-edit-form textarea { width: 100%; padding: 0.6rem 1rem; border: 1.5px solid var(--border); border-radius: var(--radius-sm); font-family: inherit; font-size: 0.92rem; background: white; color: var(--text-dark); transition: var(--transition); }
.inline-edit-form input[type="text"]:focus, .inline-edit-form input[type="email"]:focus, .inline-edit-form textarea:focus { outline: none; border-color: var(--turquoise); box-shadow: 0 0 0 3px rgba(0, 180, 216, 0.12); }
.inline-edit-form textarea { resize: vertical; min-height: 80px; }
.inline-edit-form .form-actions { display: flex; gap: 0.8rem; margin-top: 1rem; }
.edit-banner { padding: 0.7rem 1.2rem; background: rgba(0, 180, 216, 0.1); border: 1px solid rgba(0, 180, 216, 0.25); border-radius: var(--radius-sm); font-size: 0.88rem; color: var(--turquoise); margin-bottom: 1.5rem; text-align: center; }
.edit-banner.light { background: var(--light-cyan); border-color: var(--frosted-blue-2); color: var(--teal-blue); }

/* ANIMATIONS */
@keyframes fadeInUp { from { opacity: 0; transform: translateY(30px); } to { opacity: 1; transform: translateY(0); } }
@keyframes bounce { 0%, 100% { transform: translateX(-50%) translateY(0); } 50% { transform: translateX(-50%) translateY(10px); } }
@keyframes pulse { 0%, 100% { opacity: 1; transform: scale(1); } 50% { opacity: 0.5; transform: scale(1.2); } }
.fade-in { animation: fadeInUp 0.8s ease; }
.reveal { opacity: 0; transform: translateY(30px); transition: opacity 0.8s ease, transform 0.8s ease; }
.reveal.visible { opacity: 1; transform: translateY(0); }

/* RESPONSIVE */
@media (max-width: 768px) {
    .navbar, .navbar.scrolled { padding: 1rem 1.5rem; }
    .nav-links { gap: 1.2rem; }
    .nav-links a { font-size: 0.85rem; }
    .nav-logo { font-size: 1.3rem; }
    .bio-container { grid-template-columns: 1fr; gap: 2rem; }
    .bio-photo-wrapper { position: static; max-width: 240px; margin: 0 auto; }
    .hero { padding: 5rem 1.5rem 3rem; }
    .post-card { padding: 1.5rem; }
    .admin-container { padding: 6rem 1rem 3rem; }
    .login-box { padding: 2rem 1.5rem; }
    .hero-features { gap: 0.8rem; }
}
@media (max-width: 480px) {
    .nav-links { gap: 0.8rem; }
    .nav-links a { font-size: 0.8rem; }
    .nav-logo { font-size: 1.1rem; }
    .post-actions { flex-direction: column; }
    .post-actions .btn-teal, .post-actions .btn-outline, .post-actions .btn-indigo { width: 100%; justify-content: center; }
    .hero-buttons { flex-direction: column; align-items: stretch; }
    .hero-buttons .btn-cyan, .hero-buttons .btn-ghost { text-align: center; justify-content: center; }
}

/* ═══ BLOG LAYOUT — TWO COLUMNS ═══════════════════════════ */
.blog-layout {
    display: grid;
    grid-template-columns: 1fr 260px;
    gap: 2.5rem;
    max-width: 1200px;
    margin: 0 auto;
    padding: 1rem 2rem 5rem;
}
.blog-main { min-width: 0; }

/* ─── Sidebar ─── */
.blog-sidebar {
    position: sticky;
    top: 90px;
    align-self: start;
    background: var(--bg-light-3);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1.5rem;
    max-height: calc(100vh - 110px);
    overflow-y: auto;
}
.sidebar-title {
    font-family: 'Playfair Display', serif;
    font-size: 1.15rem;
    color: var(--text-dark);
    margin-bottom: 1rem;
    padding-bottom: 0.7rem;
    border-bottom: 2px solid var(--border);
}

/* ─── Category List ─── */
.category-list { list-style: none; margin-bottom: 0.5rem; }
.category-list li { margin-bottom: 0.3rem; }
.category-btn {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    padding: 0.6rem 0.9rem;
    background: transparent;
    border: 1.5px solid transparent;
    border-radius: var(--radius-sm);
    color: var(--text-body);
    font-family: inherit;
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition);
    text-align: left;
}
.category-btn:hover {
    background: var(--light-cyan);
    border-color: var(--frosted-blue-2);
    color: var(--teal-blue);
}
.category-btn.active {
    background: var(--teal-blue);
    color: white;
    border-color: var(--teal-blue);
}
.category-btn.active .cat-count { background: rgba(255,255,255,0.25); color: white; }

.cat-count {
    background: var(--light-cyan);
    color: var(--teal-blue);
    font-size: 0.75rem;
    font-weight: 600;
    padding: 0.1rem 0.5rem;
    border-radius: 50px;
    min-width: 24px;
    text-align: center;
}
.sidebar-hint {
    font-size: 0.82rem;
    color: var(--text-muted);
    padding: 0.5rem 0;
    line-height: 1.5;
}

/* ─── Category Admin ─── */
.category-admin {
    margin-top: 1.5rem;
    padding-top: 1.2rem;
    border-top: 2px dashed var(--border);
}
.cat-admin-title {
    font-size: 0.85rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-muted);
    margin-bottom: 0.8rem;
}
.cat-admin-row {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    margin-bottom: 0.4rem;
}
.cat-rename-form { flex: 1; }
.cat-rename-input {
    width: 100%;
    padding: 0.4rem 0.7rem;
    border: 1.5px solid var(--border);
    border-radius: 6px;
    font-family: inherit;
    font-size: 0.85rem;
    background: white;
    color: var(--text-dark);
    transition: var(--transition);
}
.cat-rename-input:focus {
    outline: none;
    border-color: var(--turquoise);
    box-shadow: 0 0 0 2px rgba(0, 180, 216, 0.12);
}
.cat-delete-btn {
    background: none;
    border: 1.5px solid var(--border);
    border-radius: 6px;
    padding: 0.35rem 0.5rem;
    font-size: 0.9rem;
    cursor: pointer;
    transition: var(--transition);
    flex-shrink: 0;
}
.cat-delete-btn:hover {
    background: #fee2e2;
    border-color: #fca5a5;
}
.cat-add-form {
    display: flex;
    gap: 0.4rem;
    margin-top: 0.8rem;
}
.cat-add-input {
    flex: 1;
    padding: 0.5rem 0.7rem;
    border: 1.5px solid var(--border);
    border-radius: 6px;
    font-family: inherit;
    font-size: 0.85rem;
    background: white;
    color: var(--text-dark);
    transition: var(--transition);
}
.cat-add-input:focus {
    outline: none;
    border-color: var(--turquoise);
    box-shadow: 0 0 0 2px rgba(0, 180, 216, 0.12);
}
.cat-add-btn {
    padding: 0.5rem 0.9rem;
    background: var(--teal-blue);
    color: white;
    border: none;
    border-radius: 6px;
    font-family: inherit;
    font-size: 0.85rem;
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition);
    white-space: nowrap;
}
.cat-add-btn:hover { background: var(--blue-green); }

/* ─── Responsive ─── */
@media (max-width: 900px) {
    .blog-layout {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    .blog-sidebar {
        position: static;
        max-height: none;
        order: -1;
    }
    .category-list {
        display: flex;
        flex-wrap: wrap;
        gap: 0.4rem;
    }
    .category-list li { margin-bottom: 0; }
    .category-btn { width: auto; }
}
