/* ============================================
   SKYBLOGGING — Premium Design System
   ============================================ */

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

/* ── Variables ────────────────────────────── */
:root {
    --bg:           #FAFAF8;
    --bg-alt:       #F3F1EC;
    --surface:      #FFFFFF;
    --border:       #E8E4DC;
    --border-hover: #C9C3B5;
    --text-primary: #111010;
    --text-secondary:#5C5754;
    --text-muted:   #9B9590;
    --accent:       #D4713A;
    --accent-hover: #B85E2E;
    --accent-soft:  rgba(212, 113, 58, 0.08);
    --nav-bg:       rgba(250, 250, 248, 0.88);
    --shadow-sm:    0 1px 3px rgba(0,0,0,0.06), 0 1px 2px rgba(0,0,0,0.04);
    --shadow-md:    0 4px 16px rgba(0,0,0,0.08), 0 2px 6px rgba(0,0,0,0.04);
    --shadow-lg:    0 20px 48px rgba(0,0,0,0.10), 0 8px 16px rgba(0,0,0,0.06);
    --radius:       14px;
    --radius-sm:    8px;
    --error-color:  #C0392B;
    --font-display: 'Playfair Display', Georgia, serif;
    --font-body:    'DM Sans', -apple-system, BlinkMacSystemFont, sans-serif;
}

[data-theme="dark"] {
    --bg:           #0E0D0C;
    --bg-alt:       #161412;
    --surface:      #1C1A17;
    --border:       #2C2925;
    --border-hover: #42403A;
    --text-primary: #F5F0E8;
    --text-secondary:#A89F94;
    --text-muted:   #6B6560;
    --accent:       #E07A42;
    --accent-hover: #C96A32;
    --accent-soft:  rgba(224, 122, 66, 0.10);
    --nav-bg:       rgba(14, 13, 12, 0.90);
    --shadow-sm:    0 1px 3px rgba(0,0,0,0.30);
    --shadow-md:    0 4px 16px rgba(0,0,0,0.40);
    --shadow-lg:    0 20px 48px rgba(0,0,0,0.50);
}

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

html { scroll-behavior: smooth; }

body {
    font-family: var(--font-body);
    background-color: var(--bg);
    color: var(--text-primary);
    line-height: 1.65;
    transition: background-color 0.4s ease, color 0.4s ease;
    overflow-x: hidden;
}

a { color: inherit; text-decoration: none; }

h1, h2, h3, h4 { line-height: 1.2; }

/* ── Ambient Background Orbs ──────────────── */
.bg-orb {
    position: fixed;
    border-radius: 50%;
    filter: blur(80px);
    pointer-events: none;
    z-index: 0;
    opacity: 0.5;
    transition: opacity 0.4s;
}
.bg-orb-1 {
    width: 600px; height: 600px;
    top: -200px; right: -150px;
    background: radial-gradient(circle, rgba(212,113,58,0.12) 0%, transparent 70%);
    animation: drift 18s ease-in-out infinite alternate;
}
.bg-orb-2 {
    width: 500px; height: 500px;
    bottom: -150px; left: -100px;
    background: radial-gradient(circle, rgba(212,113,58,0.07) 0%, transparent 70%);
    animation: drift 24s ease-in-out infinite alternate-reverse;
}
[data-theme="dark"] .bg-orb { opacity: 0.7; }

@keyframes drift {
    from { transform: translate(0, 0) scale(1); }
    to   { transform: translate(30px, 20px) scale(1.05); }
}

/* ── Navbar ───────────────────────────────── */
.navbar {
    position: sticky;
    top: 0;
    z-index: 200;
    background-color: var(--nav-bg);
    border-bottom: 1px solid var(--border);
    backdrop-filter: blur(16px) saturate(180%);
    -webkit-backdrop-filter: blur(16px) saturate(180%);
    transition: background-color 0.4s, border-color 0.4s;
}

.nav-container {
    max-width: 1180px;
    margin: 0 auto;
    padding: 0 2rem;
    height: 64px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1.5rem;
}

/* Logo */
.logo {
    font-family: var(--font-display);
    font-size: 1.4rem;
    font-weight: 800;
    letter-spacing: -0.3px;
    transition: opacity 0.2s;
    flex-shrink: 0;
}
.logo:hover { opacity: 0.8; }
.logo-sky { color: var(--accent); }
.logo-blogging { color: var(--text-primary); }

/* Nav links */
.nav-links {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

/* Theme toggle */
.theme-toggle {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 50%;
    width: 38px; height: 38px;
    display: flex; align-items: center; justify-content: center;
    cursor: pointer;
    font-size: 1rem;
    transition: border-color 0.2s, transform 0.2s, box-shadow 0.2s;
    flex-shrink: 0;
}
.theme-toggle:hover {
    border-color: var(--accent);
    transform: rotate(20deg);
    box-shadow: 0 0 0 3px var(--accent-soft);
}

/* ── Buttons ──────────────────────────────── */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.55rem 1.2rem;
    border-radius: 999px;
    font-family: var(--font-body);
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    border: none;
    transition: all 0.22s ease;
    white-space: nowrap;
}

.btn-primary {
    background: var(--accent);
    color: #fff;
    box-shadow: 0 2px 8px rgba(212,113,58,0.25);
}
.btn-primary:hover {
    background: var(--accent-hover);
    transform: translateY(-1px);
    box-shadow: 0 6px 18px rgba(212,113,58,0.35);
}

.btn-outline {
    background: transparent;
    border: 1.5px solid var(--border);
    color: var(--text-primary);
}
.btn-outline:hover {
    border-color: var(--text-primary);
    background: var(--accent-soft);
}

.btn-ghost {
    background: transparent;
    color: var(--text-secondary);
    border: 1.5px solid var(--border);
}
.btn-ghost:hover {
    color: var(--text-primary);
    border-color: var(--border-hover);
    background: var(--bg-alt);
}

.w-100 { width: 100%; }
.mt-1  { margin-top: 1rem; }
.mb-2  { margin-bottom: 2rem; }

/* ── Main layout ──────────────────────────── */
.main-content {
    max-width: 1180px;
    margin: 0 auto;
    padding: 0 2rem 4rem;
    position: relative;
    z-index: 1;
}

/* ── Hero ─────────────────────────────────── */
.hero {
    padding: 7rem 0 5rem;
    text-align: center;
    position: relative;
}

.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.35rem 1rem;
    border-radius: 999px;
    border: 1px solid var(--border);
    background: var(--surface);
    font-size: 0.8rem;
    font-weight: 500;
    color: var(--text-muted);
    letter-spacing: 0.04em;
    text-transform: uppercase;
    margin-bottom: 2.2rem;
    box-shadow: var(--shadow-sm);
    animation: fadeUp 0.6s ease both;
}

.hero-headline {
    font-family: var(--font-display);
    font-size: clamp(3.2rem, 7vw, 6rem);
    font-weight: 800;
    letter-spacing: -2px;
    line-height: 1.05;
    color: var(--text-primary);
    margin-bottom: 1.4rem;
    animation: fadeUp 0.7s 0.1s ease both;
}

.hero-accent {
    color: var(--accent);
    position: relative;
    display: inline-block;
}
.hero-accent::after {
    content: '';
    position: absolute;
    bottom: 4px; left: 0;
    width: 100%; height: 4px;
    background: linear-gradient(90deg, var(--accent), transparent);
    border-radius: 2px;
    opacity: 0.5;
}

.hero-sub {
    font-size: 1.15rem;
    color: var(--text-secondary);
    max-width: 520px;
    margin: 0 auto 2.5rem;
    line-height: 1.7;
    font-weight: 400;
    animation: fadeUp 0.7s 0.2s ease both;
}

.hero-cta {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.8rem;
    animation: fadeUp 0.7s 0.3s ease both;
    flex-wrap: wrap;
}
.hero-cta .btn-primary { padding: 0.7rem 1.8rem; font-size: 0.95rem; }
.hero-cta .btn-ghost   { padding: 0.7rem 1.5rem; font-size: 0.95rem; }

.hero-divider {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    margin: 4rem auto 0;
    max-width: 200px;
    animation: fadeUp 0.7s 0.4s ease both;
}
.hero-divider span:not(.divider-dot) {
    flex: 1;
    height: 1px;
    background: var(--border);
}
.divider-dot {
    font-size: 0.75rem;
    color: var(--accent);
    opacity: 0.6;
}

/* ── Blog Section ─────────────────────────── */
.blog-section { padding-top: 3rem; }

.section-header {
    display: flex;
    align-items: center;
    gap: 1.2rem;
    margin-bottom: 2.5rem;
}

.section-title {
    font-family: var(--font-display);
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-primary);
    white-space: nowrap;
}

.section-line {
    flex: 1;
    height: 1px;
    background: linear-gradient(90deg, var(--border), transparent);
}

/* ── Blog Grid ────────────────────────────── */
.blog-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 1.5rem;
}

/* ── Blog Card ────────────────────────────── */
.blog-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1.8rem;
    cursor: pointer;
    position: relative;
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
    transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
    box-shadow: var(--shadow-sm);
    animation: fadeUp 0.5s ease both;
}
.blog-card:nth-child(2) { animation-delay: 0.05s; }
.blog-card:nth-child(3) { animation-delay: 0.10s; }
.blog-card:nth-child(4) { animation-delay: 0.15s; }
.blog-card:nth-child(5) { animation-delay: 0.20s; }
.blog-card:nth-child(6) { animation-delay: 0.25s; }

.blog-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
    border-color: var(--border-hover);
}

.blog-card::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: var(--radius);
    background: linear-gradient(135deg, var(--accent-soft) 0%, transparent 60%);
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
}
.blog-card:hover::before { opacity: 1; }

.card-inner { flex: 1; min-width: 0; }
.card-top   { margin-bottom: 1.4rem; }

.blog-card h3 {
    font-family: var(--font-display);
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 0.6rem;
    line-height: 1.35;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.blog-card p {
    font-size: 0.9rem;
    color: var(--text-secondary);
    line-height: 1.65;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.blog-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.meta-author {
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--text-primary);
    background: var(--bg-alt);
    padding: 0.2rem 0.65rem;
    border-radius: 999px;
    border: 1px solid var(--border);
}

.meta-date {
    font-size: 0.8rem;
    color: var(--text-muted);
    font-weight: 400;
}

.card-arrow {
    font-size: 1.1rem;
    color: var(--text-muted);
    flex-shrink: 0;
    margin-top: 0.1rem;
    transition: transform 0.2s ease, color 0.2s ease;
}
.blog-card:hover .card-arrow {
    color: var(--accent);
    transform: translateX(4px);
}

/* ── No Posts ─────────────────────────────── */
.no-posts {
    grid-column: 1 / -1;
    text-align: center;
    padding: 5rem 2rem;
    color: var(--text-muted);
}
.no-posts-icon {
    font-size: 2rem;
    margin-bottom: 1rem;
    color: var(--accent);
    opacity: 0.5;
}
.no-posts p { font-size: 1.05rem; }
.no-posts a {
    color: var(--accent);
    font-weight: 600;
    border-bottom: 1px solid var(--accent);
}
.no-posts a:hover { opacity: 0.75; }

/* ── Forms ────────────────────────────────── */
.form-page {
    max-width: 420px;
    margin: 5rem auto;
    position: relative; z-index: 1;
}

.form-container h2 {
    font-family: var(--font-display);
    text-align: center;
    margin-bottom: 2rem;
    font-size: 2rem;
}

.form-group {
    margin-bottom: 1.5rem;
}
.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    font-size: 0.9rem;
}
.form-group input {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 1.5px solid var(--border);
    border-radius: var(--radius-sm);
    background-color: var(--surface);
    color: var(--text-primary);
    font-family: var(--font-body);
    font-size: 0.95rem;
    transition: border-color 0.2s, box-shadow 0.2s;
    outline: none;
}
.form-group input:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 3px var(--accent-soft);
}

.error-message {
    color: var(--error-color);
    font-size: 0.88rem;
    margin-bottom: 1rem;
    padding: 0.6rem 1rem;
    background: rgba(192,57,43,0.06);
    border-radius: var(--radius-sm);
    border: 1px solid rgba(192,57,43,0.15);
}

/* ── Editor ───────────────────────────────── */
.editor-page { max-width: 760px; }

.editor-title {
    width: 100%;
    font-family: var(--font-display);
    font-size: 2.5rem;
    font-weight: 800;
    border: none;
    background: transparent;
    color: var(--text-primary);
    outline: none;
    margin-bottom: 1rem;
    letter-spacing: -0.5px;
}
.editor-title::placeholder { color: var(--text-muted); }

.editor-content {
    width: 100%;
    min-height: 400px;
    font-size: 1.15rem;
    border: none;
    background: transparent;
    color: var(--text-primary);
    outline: none;
    resize: none;
    font-family: var(--font-body);
    line-height: 1.85;
}
.editor-content::placeholder { color: var(--text-muted); }

/* ── Post Page ────────────────────────────── */
.post-page { max-width: 680px; }

.post-header { margin-bottom: 2.5rem; }

.post-title {
    font-family: var(--font-display);
    font-size: clamp(2rem, 5vw, 3rem);
    font-weight: 800;
    letter-spacing: -1px;
    margin-bottom: 1.2rem;
    color: var(--text-primary);
}

.post-author-meta {
    display: flex;
    align-items: center;
    gap: 1rem;
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.post-body {
    font-size: 1.15rem;
    line-height: 1.9;
    margin-bottom: 4rem;
    white-space: pre-wrap;
    color: var(--text-primary);
}

/* ── Comments ─────────────────────────────── */
.comments-section {
    border-top: 1px solid var(--border);
    padding-top: 2.5rem;
}

.comment-input {
    width: 100%;
    min-height: 110px;
    padding: 1rem;
    border: 1.5px solid var(--border);
    border-radius: var(--radius-sm);
    background: var(--surface);
    color: var(--text-primary);
    font-family: var(--font-body);
    font-size: 0.95rem;
    resize: vertical;
    outline: none;
    transition: border-color 0.2s, box-shadow 0.2s;
}
.comment-input:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 3px var(--accent-soft);
}

.comment {
    padding: 1.5rem 0;
    border-bottom: 1px solid var(--border);
}
.comment-meta {
    font-weight: 600;
    margin-bottom: 0.5rem;
    font-size: 0.9rem;
}
.comment-date {
    color: var(--text-muted);
    font-weight: 400;
    margin-left: 0.5rem;
}
.comment-content {
    color: var(--text-primary);
    line-height: 1.65;
}
.no-comments {
    text-align: center;
    padding: 2rem;
    color: var(--text-muted);
}
.comment-form { margin-bottom: 2rem; }

/* ── Error container ──────────────────────── */
.error-container {
    text-align: center;
    padding: 4rem 2rem;
}
.error-container h2 {
    font-family: var(--font-display);
    margin-bottom: 1rem;
    font-size: 2rem;
}

/* ── Delete button ────────────────────────── */
.btn-delete {
    color: var(--error-color);
    background: none;
    border: none;
    cursor: pointer;
    font-size: 0.85rem;
    font-family: var(--font-body);
    transition: opacity 0.2s;
}
.btn-delete:hover { opacity: 0.7; text-decoration: underline; }

/* ── Animations ───────────────────────────── */
@keyframes fadeUp {
    from { opacity: 0; transform: translateY(18px); }
    to   { opacity: 1; transform: translateY(0);    }
}

/* ══════════════════════════════════════════════
   FOOTER — NEW STYLES (added only, nothing changed above)
   ══════════════════════════════════════════════ */

/* ── site-footer wrapper ──────────────────── */
.site-footer {
    position: relative;
    z-index: 1;
    margin-top: 5rem;
    border-top: 1px solid var(--border);
    background: var(--bg-alt);
    transition: background-color 0.4s, border-color 0.4s;
}

[data-theme="dark"] .site-footer {
    background: var(--bg-alt);
}

/* ── Contact Us band ──────────────────────── */
.footer-contact {
    padding: 4rem 2rem 3.5rem;
    text-align: center;
    border-bottom: 1px solid var(--border);
    position: relative;
}

.footer-contact-inner {
    max-width: 600px;
    margin: 0 auto;
}

/* ornamental divider row */
.footer-contact-divider {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    max-width: 160px;
    margin: 0 auto 2rem;
}
.footer-contact-divider span:not(.footer-divider-icon) {
    flex: 1;
    height: 1px;
    background: var(--border);
}
.footer-divider-icon {
    font-size: 0.7rem;
    color: var(--accent);
    opacity: 0.55;
}

.footer-contact-heading {
    font-family: var(--font-display);
    font-size: 2rem;
    font-weight: 800;
    color: var(--text-primary);
    letter-spacing: -0.5px;
    margin-bottom: 0.75rem;
}

.footer-contact-sub {
    font-size: 0.95rem;
    color: var(--text-secondary);
    line-height: 1.7;
    margin-bottom: 2.2rem;
}

/* ── Social icon buttons ──────────────────── */
.footer-social-links {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    flex-wrap: wrap;
}

.social-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.55rem;
    padding: 0.65rem 1.4rem;
    border-radius: 999px;
    font-family: var(--font-body);
    font-size: 0.9rem;
    font-weight: 600;
    border: 1.5px solid var(--border);
    background: var(--surface);
    color: var(--text-primary);
    cursor: pointer;
    transition: transform 0.22s ease, box-shadow 0.22s ease,
    border-color 0.22s ease, color 0.22s ease, background 0.22s ease;
    text-decoration: none;
}

.social-icon {
    width: 17px;
    height: 17px;
    flex-shrink: 0;
    transition: color 0.22s ease;
}

/* LinkedIn button */
.social-btn-linkedin:hover {
    color: #fff;
    background: #0A66C2;
    border-color: #0A66C2;
    transform: translateY(-3px);
    box-shadow: 0 8px 22px rgba(10, 102, 194, 0.30);
}

/* GitHub button */
.social-btn-github:hover {
    color: #fff;
    background: #24292F;
    border-color: #24292F;
    transform: translateY(-3px);
    box-shadow: 0 8px 22px rgba(36, 41, 47, 0.28);
}

[data-theme="dark"] .social-btn-github:hover {
    background: #e6edf3;
    border-color: #e6edf3;
    color: #24292F;
    box-shadow: 0 8px 22px rgba(230, 237, 243, 0.15);
}

/* ── Footer bottom bar ────────────────────── */
.footer-bottom {
    padding: 1.4rem 2rem;
}

.footer-bottom-inner {
    max-width: 1180px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    flex-wrap: wrap;
}

/* Brand logo in footer */
.footer-brand { flex-shrink: 0; }

.footer-logo {
    font-family: var(--font-display);
    font-size: 1.05rem;
    font-weight: 800;
    letter-spacing: -0.2px;
}

/* Policy links row */
.footer-policy-links {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: wrap;
    justify-content: center;
}

.footer-policy-link {
    font-size: 0.82rem;
    font-weight: 500;
    color: var(--text-muted);
    text-decoration: none;
    transition: color 0.2s ease;
    position: relative;
}

.footer-policy-link::after {
    content: '';
    position: absolute;
    bottom: -1px;
    left: 0;
    width: 0;
    height: 1px;
    background: var(--accent);
    transition: width 0.25s ease;
}

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

.footer-policy-link:hover::after {
    width: 100%;
}

.policy-sep {
    font-size: 0.75rem;
    color: var(--border-hover);
    user-select: none;
}

/* Copyright line */
.footer-copy {
    font-size: 0.8rem;
    color: var(--text-muted);
    white-space: nowrap;
}

/* ── Responsive ───────────────────────────── */
@media (max-width: 768px) {
    .hero           { padding: 4.5rem 0 3.5rem; }
    .hero-headline  { letter-spacing: -1px; }
    .main-content   { padding: 0 1.25rem 3rem; }
    .blog-grid      { grid-template-columns: 1fr; gap: 1rem; }
    .nav-container  { padding: 0 1.25rem; }
    .section-line   { display: none; }

    /* footer responsive */
    .footer-contact        { padding: 3rem 1.25rem 2.5rem; }
    .footer-contact-heading { font-size: 1.6rem; }
    .footer-bottom-inner   {
        flex-direction: column;
        align-items: center;
        gap: 0.75rem;
        text-align: center;
    }
    .footer-copy           { white-space: normal; text-align: center; }
}

@media (max-width: 480px) {
    .hero-cta               { flex-direction: column; align-items: stretch; }
    .hero-cta .btn          { text-align: center; justify-content: center; }
    .blog-card              { padding: 1.4rem; }
    .footer-social-links    { flex-direction: column; align-items: stretch; }
    .social-btn             { justify-content: center; }
    .hide-mobile            { display: none; }
}