@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600&family=Outfit:wght@700;800;900&display=swap');

/* Jhonn Blog - Premium & Purista Edition */
:root {
    --bg: #030303;
    --card: #0A0A0A;
    --card-hover: #111111;
    --border: rgba(255, 255, 255, 0.08);
    --border-hover: rgba(59, 130, 246, 0.3);
    --text: #F4F4F5;
    --muted: #71717A;
    --accent: #3B82F6;
    --accent-glow: rgba(59, 130, 246, 0.4);
    --radius: 16px;
    --transition: cubic-bezier(0.4, 0, 0.2, 1);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

body {
    background-color: var(--bg);
    color: var(--text);
    font-family: 'Inter', sans-serif;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    animation: fadeIn 0.8s var(--transition);
}

.container {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 1.5rem;
    width: 100%;
}

/* Navigation - Modern Glassmorphism */
nav {
    position: sticky;
    top: 0;
    z-index: 100;
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border);
    padding: 1rem 0;
}

.nav-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 80px;
}

.nav-right {
    display: none;
    align-items: center;
    gap: 0.5rem;
}

.nav-search-btn,
.nav-menu-btn {
    background: transparent;
    border: none;
    color: var(--text);
    cursor: pointer;
    padding: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    transition: background 0.2s;
}

.nav-search-btn:hover,
.nav-menu-btn:hover {
    background: rgba(255, 255, 255, 0.05);
}

.nav-links-desktop {
    display: flex;
    gap: 1.5rem;
}

.nav-links-desktop a {
    text-decoration: none;
    color: var(--muted);
    font-size: 0.9rem;
    font-weight: 500;
    transition: color 0.2s;
}

.nav-links-desktop a:hover,
.nav-links-desktop a.active {
    color: var(--accent);
}

.search-form-header {
    display: flex;
    align-items: center;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border);
    border-radius: 50px;
    padding: 2px 5px 2px 15px;
    width: 100%;
    max-width: 320px;
    transition: all 0.3s ease;
    margin: 0 1rem;
}

.search-form-header:focus-within {
    background: rgba(255, 255, 255, 0.08);
    border-color: var(--accent);
    box-shadow: 0 0 0 4px rgba(59, 130, 246, 0.1);
}

.search-form-header input {
    background: transparent;
    border: none;
    color: var(--text);
    padding: 8px 0;
    width: 100%;
    font-size: 0.85rem;
    outline: none;
}

.search-form-header button {
    background: transparent;
    border: none;
    color: var(--muted);
    padding: 8px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: color 0.2s;
}

.search-form-header button:hover {
    color: var(--accent);
}

/* AUTOCOMPLETE SEARCH DROPDOWN */
.search-wrapper-autocomplete {
    position: relative;
    width: 100%;
    max-width: 320px;
}

.search-dropdown {
    position: absolute;
    top: calc(100% + 10px);
    left: 0;
    right: 0;
    background: rgba(10, 10, 11, 0.9);
    backdrop-filter: blur(20px);
    border: 1px solid var(--border);
    border-radius: 12px;
    overflow: hidden;
    z-index: 1000;
    opacity: 0;
    transform: translateY(-10px);
    pointer-events: none;
    transition: all 0.3s var(--transition);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.5);
}

.search-dropdown.active {
    opacity: 1;
    transform: translateY(0);
    pointer-events: all;
}

.search-result-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 0.75rem 1rem;
    text-decoration: none;
    color: var(--text);
    transition: background 0.2s;
    border-bottom: 1px solid var(--border);
}

.search-result-item:last-child {
    border-bottom: none;
}

.search-result-item:hover {
    background: rgba(255, 255, 255, 0.05);
}

.search-result-item img {
    width: 48px;
    height: 48px;
    border-radius: 8px;
    object-fit: cover;
    background: #1A1A1E;
}

.result-placeholder {
    width: 48px;
    height: 48px;
    border-radius: 8px;
    background: linear-gradient(45deg, #1A1A1E, #27272A);
}

.result-info {
    display: flex;
    flex-direction: column;
}

.result-title {
    font-size: 0.9rem;
    font-weight: 600;
    line-height: 1.2;
}

.search-no-results {
    padding: 1.5rem;
    text-align: center;
    color: var(--muted);
    font-size: 0.85rem;
}

.logo {
    font-size: 1.25rem;
    font-weight: 800;
    text-decoration: none;
    color: #FFFFFF;
}
.nav-links {
    display: flex;
    gap: 1.5rem;
}

.nav-links a {
    text-decoration: none;
    color: var(--muted);
    font-size: 0.9rem;
    font-weight: 500;
    transition: color 0.2s;
}

.nav-links a:hover,
.nav-links a.active {
    color: var(--accent);
}

/* Header & Intro */
header {
    text-align: center;
}

header h1 {
    font-family: 'Outfit', sans-serif;
    font-size: 4rem;
    font-weight: 900;
    letter-spacing: -3px;
    margin-bottom: 1rem;
    background: linear-gradient(135deg, #FFF 0%, #AAA 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

header .subtitle {
    color: var(--muted);
    font-size: 1.25rem;
    max-width: 600px;
    margin: 0 auto;
}

/* Home - Posts Grid */
.blog-posts {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
    padding: 2rem 0 5rem;
}

.post-card {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    text-decoration: none;
    color: inherit;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    position: relative;
    transition: transform 0.4s var(--transition), border-color 0.4s var(--transition), box-shadow 0.4s var(--transition);
}

.post-card:hover {
    transform: translateY(-10px) scale(1.02);
    border-color: var(--border-hover);
    box-shadow: 0 30px 60px -12px rgba(0, 0, 0, 0.5), 0 18px 36px -18px rgba(0, 0, 0, 0.5);
}

.post-card::after {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: var(--radius);
    padding: 1px;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.1), transparent, rgba(255, 255, 255, 0.05));
    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    pointer-events: none;
}

.post-card-image {
    width: 100%;
    aspect-ratio: 16 / 9;
    overflow: hidden;
    background: #0F0F12;
}

.post-card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s var(--transition);
}

.post-card:hover .post-card-image img {
    transform: scale(1.1);
}

.post-card-content {
    padding: 1.75rem;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.post-card-date {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    color: var(--accent);
    font-weight: 700;
    margin-bottom: 0.75rem;
}

.post-card h2 {
    font-family: 'Outfit', sans-serif;
    font-size: 1.5rem;
    line-height: 1.2;
    margin-bottom: 1rem;
    color: var(--text);
    transition: color 0.3s var(--transition);
}

.post-card:hover h2 {
    color: var(--accent);
}

.post-card p {
    color: var(--muted);
    font-size: 1rem;
    margin-bottom: 1.5rem;
    line-height: 1.6;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.post-card-meta {
    margin-top: auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 1.5rem;
    border-top: 1px solid var(--border);
}

/* Single Post Page */
.post-header {
    padding: 6rem 0 3rem;
    margin: 0 auto;
}

.post-header h1 {
    font-family: 'Outfit', sans-serif;
    font-size: 3.5rem;
    line-height: 1.1;
    margin: 1.5rem 0;
    letter-spacing: -2px;
}

.post-image-full {
    width: 100%;
    aspect-ratio: 21 / 9;
    object-fit: cover;
    border-radius: var(--radius);
    margin-bottom: 4rem;
    border: 1px solid var(--border);
    box-shadow: 0 40px 100px -20px rgba(0, 0, 0, 0.6);
}

.post-body {
    font-size: 1.25rem;
    line-height: 1.8;
    color: #D4D4D8;
    margin: 0 auto 6rem;
}

.post-body p {
    margin-bottom: 1.5rem;
    text-align: justify;
}

/* UI Components */
.badge {
    display: inline-flex;
    align-items: center;
    padding: 0.35rem 0.75rem;
    border-radius: 100px;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border);
    color: var(--muted);
    text-decoration: none;
    transition: all 0.3s var(--transition);
}

.badge:hover {
    background: var(--accent);
    color: white;
    border-color: var(--accent);
    box-shadow: 0 0 15px var(--accent-glow);
}

/* Skeleton Loader */
.skeleton {
    background: linear-gradient(90deg, #121214 25%, #1A1A1C 50%, #121214 75%);
    background-size: 200% 100%;
    animation: loading 1.5s infinite;
    border-radius: 4px;
}

@keyframes loading {
    to {
        background-position: -200% 0;
    }
}

/* Footer */
footer {
    padding: 6rem 0;
    border-top: 1px solid var(--border);
    text-align: center;
    color: var(--muted);
    font-size: 0.9rem;
    background: linear-gradient(to bottom, transparent, rgba(255, 255, 255, 0.02));
}

/* ============================================
   MOBILE SEARCH
   ============================================ */
.mobile-search {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.9);
    z-index: 1001;
    padding: 1rem;
}

.mobile-search.active {
    display: flex;
    align-items: flex-start;
    padding-top: 6rem;
}

.mobile-search-content {
    width: 100%;
    max-width: 600px;
    margin: 0 auto;
    display: flex;
    gap: 1rem;
}

.mobile-search-content form {
    flex: 1;
    display: flex;
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: 12px;
    overflow: hidden;
}

.mobile-search-content input {
    flex: 1;
    background: transparent;
    border: none;
    padding: 1rem;
    color: var(--text);
    font-size: 1rem;
    outline: none;
}

.mobile-search-content button {
    background: var(--accent);
    border: none;
    padding: 1rem;
    color: white;
    cursor: pointer;
}

.mobile-search-close {
    background: transparent;
    border: none;
    color: var(--text);
    cursor: pointer;
    padding: 0.5rem;
}

/* ============================================
   MOBILE MENU
   ============================================ */
.mobile-menu {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 1000;
}

.mobile-menu.active {
    display: block;
}

.mobile-menu-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.7);
}

.mobile-menu-content {
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    width: 280px;
    max-width: 85%;
    background: var(--card);
    border-left: 1px solid var(--border);
    transform: translateX(100%);
    transition: transform 0.3s ease;
}

.mobile-menu.active .mobile-menu-content {
    transform: translateX(0);
}

.mobile-menu-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem;
    border-bottom: 1px solid var(--border);
}

.mobile-menu-title {
    font-weight: 700;
    font-size: 1.1rem;
}

.mobile-menu-header button {
    background: transparent;
    border: none;
    color: var(--text);
    cursor: pointer;
    padding: 0.5rem;
}

.mobile-menu-links {
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.mobile-menu-links a {
    display: block;
    padding: 1rem;
    color: var(--text);
    text-decoration: none;
    font-size: 1.1rem;
    border-radius: 8px;
    transition: background 0.2s;
}

.mobile-menu-links a:hover {
    background: rgba(255, 255, 255, 0.05);
}

/* Responsive adjustments */
@media (max-width: 768px) {

    .nav-right {
        display: flex;
    }

    .nav-links-desktop,
    .search-wrapper-autocomplete {
        display: none;
    }

    header h1,
    .post-header h1 {
        font-size: 1.75rem;
        letter-spacing: -0.5px;
        line-height: 1.2;
    }

    header .subtitle {
        font-size: 1rem;
    }

    .breadcrumbs-list {
        font-size: 0.75rem;
        flex-wrap: wrap;
        gap: 0.25rem;
    }

    .blog-posts {
        grid-template-columns: 1fr;
    }

    .featured-card {
        grid-template-columns: 1fr !important;
    }
    
    .featured-image {
        height: 200px;
    }

    .post-image-full {
        aspect-ratio: 16 / 9;
        margin-bottom: 2rem;
    }

    .post-body {
        font-size: 1.1rem;
    }
}

@media (max-width: 1024px) and (min-width: 769px) {
    .blog-posts {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* ============================================
   BREADCRUMBS - SEO Navigation
   ============================================ */
.breadcrumbs {
    margin-bottom: 1rem;
}

.breadcrumbs-list {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    list-style: none;
    padding: 0;
    margin: 0;
    font-size: 0.85rem;
}

.breadcrumbs-item {
    display: flex;
    align-items: center;
}

.breadcrumbs-item a {
    color: var(--muted);
    text-decoration: none;
    transition: color 0.2s;
}

.breadcrumbs-item a:hover {
    color: var(--accent);
}

.breadcrumbs-separator {
    color: var(--muted);
}

.breadcrumbs-current {
    color: var(--text);
}

/* ============================================
   FAQ SECTION - GEO Optimized
   ============================================ */
.faq-section {
    margin: 4rem 0;
    padding: 2rem;
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
}

.faq-title {
    font-size: 1.5rem;
    font-weight: 800;
    margin-bottom: 1.5rem;
    color: var(--text);
}

.faq-empty {
    color: var(--muted);
    text-align: center;
    padding: 1rem;
}

.faq-accordion {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.faq-item {
    border: 1px solid var(--border);
    border-radius: 8px;
    overflow: hidden;
}

.faq-question {
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 1.25rem;
    background: transparent;
    border: none;
    color: var(--text);
    font-size: 1rem;
    font-weight: 600;
    text-align: left;
    cursor: pointer;
    transition: background 0.2s;
}

.faq-question:hover {
    background: rgba(255, 255, 255, 0.03);
}

.faq-icon {
    width: 20px;
    height: 20px;
    flex-shrink: 0;
    transition: transform 0.3s;
}

.faq-item[data-open="true"] .faq-icon {
    transform: rotate(180deg);
}

.faq-answer {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease-out;
    background: rgba(255, 255, 255, 0.02);
}

.faq-item[data-open="true"] .faq-answer {
    max-height: 500px;
}

.faq-answer > div {
    padding: 1rem 1.25rem;
    color: var(--muted);
    line-height: 1.6;
}

/* ============================================
   RELATED POSTS
   ============================================ */
.related-posts-grid .post-card {
    transition: transform 0.3s var(--transition), border-color 0.3s;
}

.related-posts-grid .post-card:hover {
    transform: translateY(-4px);
    border-color: var(--border-hover);
}

/* ============================================
   FEATURED POST
   ============================================ */
.featured-card:hover {
    border-color: var(--border-hover);
    box-shadow: 0 20px 60px -20px rgba(0, 0, 0, 0.6);
}

.featured-card:hover img {
    transform: scale(1.05);
}

/* ============================================
   SHARE BUTTONS
   ============================================ */
.share-section a:hover, .share-section button:hover {
    transform: scale(1.1);
}

/* ============================================
   READING PROGRESS BAR
   ============================================ */
.reading-progress {
    position: fixed;
    top: 0;
    left: 0;
    width: 0%;
    height: 3px;
    background: linear-gradient(90deg, var(--accent), #8B5CF6);
    z-index: 1000;
    transition: width 0.1s linear;
}