/* ==========================================================================
   AIFORA BLOG - CSS STYLING (CLEAN & STANDARD W3C)
   ========================================================================== */

:root {
    --bg-color: #f8fafc;
    --text-color: #1e293b;
    --text-muted: #64748b;
    --card-bg: rgba(255, 255, 255, 0.8);
    --border-color: rgba(0, 0, 0, 0.1);
    --accent-color: #0284c7;
    --accent-hover: #0369a1;
    --nav-bg: rgba(255, 255, 255, 0.85);
    --shadow: 0 10px 30px rgba(0, 0, 0, 0.05);
}

[data-theme="dark"] {
    --bg-color: #0b1120;
    --text-color: #f8fafc;
    --text-muted: #94a3b8;
    --card-bg: rgba(30, 41, 59, 0.6);
    --border-color: rgba(255, 255, 255, 0.1);
    --accent-color: #38bdf8;
    --accent-hover: #7dd3fc;
    --nav-bg: rgba(11, 17, 32, 0.85);
    --shadow: 0 10px 30px rgba(0, 0, 0, 0.4);
}

* { 
    margin: 0; 
    padding: 0; 
    box-sizing: border-box; 
}

body { 
    font-family: 'Inter', sans-serif; 
    background-color: var(--bg-color); 
    color: var(--text-color); 
    transition: background-color 0.4s ease; 
    line-height: 1.6; 
}

a { 
    text-decoration: none; 
    transition: 0.3s; 
}

/* --- GLASS NAVIGATION --- */
.glass-nav { 
    position: fixed; 
    top: 0; 
    width: 100%; 
    z-index: 1000; 
    background: var(--nav-bg); 
    backdrop-filter: blur(12px); 
    -webkit-backdrop-filter: blur(12px); 
    border-bottom: 1px solid var(--border-color); 
    padding: 15px 0; 
}

.nav-container { 
    max-width: 1200px; 
    margin: 0 auto; 
    padding: 0 20px; 
    display: flex; 
    justify-content: space-between; 
    align-items: center; 
}

.brand-logo { 
    font-size: 1.2rem; 
    font-weight: 800; 
    color: var(--text-color); 
    display: flex; 
    align-items: center; 
    gap: 8px; 
}

.brand-logo i { 
    color: var(--accent-color); 
    font-size: 1.5rem; 
}

.brand-logo span { 
    font-weight: 400; 
    color: var(--text-muted); 
}

.nav-actions { 
    display: flex; 
    align-items: center; 
    gap: 20px; 
}

.btn-back { 
    font-size: 0.9rem; 
    font-weight: 600; 
    color: var(--text-color); 
    border: 1px solid var(--border-color); 
    padding: 8px 16px; 
    border-radius: 20px; 
    transition: 0.3s; 
}

.btn-back:hover { 
    background: var(--accent-color); 
    color: #fff; 
    border-color: var(--accent-color); 
}

#theme-toggle { 
    background: transparent; 
    border: none; 
    color: var(--text-color); 
    font-size: 1.2rem; 
    cursor: pointer; 
    transition: 0.3s; 
}

#theme-toggle:hover { 
    color: var(--accent-color); 
    transform: rotate(30deg); 
}

/* --- HERO SECTION --- */
.blog-hero { 
    padding: 150px 20px 80px; 
    text-align: center; 
    background: radial-gradient(circle at center, rgba(2, 132, 199, 0.1) 0%, transparent 70%); 
}

.hero-content h1 { 
    font-size: 3rem; 
    font-weight: 800; 
    margin-bottom: 15px; 
    background: linear-gradient(135deg, var(--text-color), var(--accent-color)); 
    -webkit-background-clip: text; 
    background-clip: text; 
    -webkit-text-fill-color: transparent; 
    color: transparent;
}

.hero-content p { 
    font-size: 1.1rem; 
    color: var(--text-muted); 
    max-width: 600px; 
    margin: 0 auto; 
}

/* --- MAIN CONTENT & GRID --- */
.container { 
    max-width: 1100px; 
    margin: 0 auto; 
    padding: 0 20px 80px; 
}

.section-title-wrapper { 
    margin-bottom: 40px; 
}

.section-title-wrapper h2 { 
    font-size: 2rem; 
    font-weight: 700; 
    margin-bottom: 10px; 
}

.title-line { 
    width: 50px; 
    height: 4px; 
    background: var(--accent-color); 
    border-radius: 4px; 
}

.blog-grid { 
    display: grid; 
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); 
    gap: 30px; 
}

.loading-state { 
    grid-column: 1 / -1; 
    text-align: center; 
    padding: 50px; 
    color: var(--text-muted); 
    font-size: 1.2rem; 
}

/* --- ARTICLE CARD --- */
.article-card { 
    background: var(--card-bg); 
    backdrop-filter: blur(10px); 
    border: 1px solid var(--border-color); 
    border-radius: 16px; 
    overflow: hidden; 
    box-shadow: var(--shadow); 
    transition: 0.4s; 
    display: flex; 
    flex-direction: column; 
}

.article-card:hover { 
    transform: translateY(-10px); 
    border-color: var(--accent-color); 
}

.card-img { 
    width: 100%; 
    height: 200px; 
    object-fit: cover; 
    border-bottom: 1px solid var(--border-color); 
    background: rgba(0,0,0,0.05); 
}

.card-body { 
    padding: 25px; 
    display: flex; 
    flex-direction: column; 
    flex-grow: 1; 
}

.card-meta { 
    display: flex; 
    justify-content: space-between; 
    font-size: 0.85rem; 
    color: var(--text-muted); 
    margin-bottom: 12px; 
}

.card-tag { 
    background: rgba(2, 132, 199, 0.1); 
    color: var(--accent-color); 
    padding: 4px 10px; 
    border-radius: 6px; 
    font-weight: 600; 
    text-transform: uppercase; 
    letter-spacing: 0.5px; 
    font-size: 0.75rem; 
}

.card-title { 
    font-size: 1.25rem; 
    font-weight: 700; 
    margin-bottom: 10px; 
    color: var(--text-color); 
    line-height: 1.4; 
}

.card-excerpt { 
    font-size: 0.95rem; 
    color: var(--text-muted); 
    margin-bottom: 20px; 
    flex-grow: 1; 
}

.read-more { 
    font-weight: 600; 
    color: var(--accent-color); 
    display: inline-flex; 
    align-items: center; 
    gap: 8px; 
}

.read-more:hover { 
    color: var(--accent-hover); 
    gap: 12px; 
}

/* --- FOOTER --- */
.glass-footer { 
    text-align: center; 
    padding: 30px; 
    border-top: 1px solid var(--border-color); 
    color: var(--text-muted); 
    font-size: 0.9rem; 
    margin-top: auto; 
}

@media (max-width: 768px) { 
    .hero-content h1 { font-size: 2.2rem; } 
    .btn-back span { display: none; } 
}

/* ==========================================================================
   ANIMASI ROBOT LOADING AIFORA (TAMBAHAN BARU)
   ========================================================================== */
.cute-robot-loader {
    grid-column: 1 / -1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 60px 20px;
    text-align: center;
}

.robot-body {
    animation: floatBot 2s ease-in-out infinite;
    filter: drop-shadow(0 10px 15px rgba(2, 132, 199, 0.3));
    margin-bottom: 10px;
}

.robot-bulb {
    animation: blinkBulb 1s infinite alternate;
}

.robot-eye {
    animation: blinkEye 3s infinite;
    transform-origin: center;
}

.robot-shadow {
    animation: shadowPulse 2s ease-in-out infinite;
}

.robot-text {
    font-family: 'JetBrains Mono', monospace;
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--accent-color);
    letter-spacing: 0.5px;
}

.dots::after {
    content: '.';
    animation: loadingDots 1.5s steps(4, end) infinite;
}

@keyframes floatBot {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-15px); }
}

@keyframes shadowPulse {
    0%, 100% { transform: scale(1); opacity: 0.5; }
    50% { transform: scale(0.8); opacity: 0.2; }
}

@keyframes blinkEye {
    0%, 90%, 100% { transform: scaleY(1); }
    95% { transform: scaleY(0.1); }
}

@keyframes blinkBulb {
    0% { fill: #ef4444; filter: drop-shadow(0 0 2px #ef4444); }
    100% { fill: #facc15; filter: drop-shadow(0 0 8px #facc15); }
}

@keyframes loadingDots {
    0%, 20% { content: '.'; }
    40% { content: '..'; }
    60% { content: '...'; }
    80%, 100% { content: ''; }
}
