/*
Theme Name: WebifySwift Journal
Author: WebifySwift
Description: Custom Minimalist Personal Journal Theme
Version: 1.1
*/

/* --- 1. COLOR PALETTE DEFINITION --- */
:root {
    --bg-color: #f7f7f5;          /* Dominan (60%): Warm Light Gray/Off-White */
    --card-bg: #ffffff;           /* Kad Kandungan: Pure White */
    --text-primary: #1a1a1a;      /* Struktur (30%): Deep Charcoal */
    --text-muted: #666666;        /* Teks Sekunder: Muted Gray */
    --accent-color: #2e5a44;      /* Accent (10%): Muted Forest Green (Modern & Fit Vibe) */
    --accent-hover: #1e3d2e;      /* Hover state untuk link */
    --border-color: #e5e5e0;      /* Garisan halus */
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    background-color: var(--bg-color);
    color: var(--text-primary);
    line-height: 1.6;
}

/* Container Utama */
.site-container {
    max-width: 1000px;
    margin: 40px auto;
    background: var(--card-bg);
    padding: 40px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.03);
    border-radius: 12px;
    border: 1px solid var(--border-color);
}

/* Header & Navigasi */
header {
    text-align: center;
    border-bottom: 2px solid var(--accent-color); /* Sentuhan warna accent */
    padding-bottom: 25px;
    margin-bottom: 35px;
}

header h1 a {
    font-size: 2.5rem;
    color: var(--text-primary);
    text-decoration: none;
    font-weight: 700;
    letter-spacing: -0.5px;
}

nav ul {
    list-style: none;
    display: flex;
    justify-content: center;
    gap: 25px;
    margin-top: 20px;
}

nav a {
    text-decoration: none;
    color: var(--text-muted);
    font-size: 0.95rem;
    font-weight: 600;
    transition: color 0.2s ease;
}

nav a:hover {
    color: var(--accent-color); /* Accent bila hover */
}

/* Main Layout Grid */
.main-content {
    display: grid;
    grid-template-columns: 2.2fr 1fr;
    gap: 40px;
}

/* Post Card Styling */
.post-card {
    margin-bottom: 40px;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 30px;
}

.post-card h2 a {
    color: var(--text-primary);
    text-decoration: none;
    font-size: 1.8rem;
    line-height: 1.3;
    transition: color 0.2s ease;
}

.post-card h2 a:hover {
    color: var(--accent-color); /* Tajuk bertukar ke accent bila hover */
}

.post-meta {
    font-size: 0.85rem;
    color: var(--text-muted);
    margin: 10px 0 15px 0;
}

.featured-image img {
    width: 100%;
    height: auto;
    border-radius: 8px;
    margin-bottom: 20px;
}

.post-excerpt {
    color: #333333;
    font-size: 1rem;
}

/* Sidebar Profile & Widgets */
.sidebar-profile {
    text-align: center;
    padding-bottom: 25px;
    border-bottom: 1px solid var(--border-color);
    margin-bottom: 25px;
}

.profile-img {
    width: 110px;
    height: 110px;
    border-radius: 50%;
    object-fit: cover;
    margin-bottom: 15px;
    border: 3px solid var(--accent-color); /* Border warna accent pada gambar profil */
}

.profile-bio {
    font-size: 0.9rem;
    color: var(--text-muted);
}

.widget-title {
    font-size: 1.1rem;
    font-weight: 700;
    margin-bottom: 15px;
    color: var(--text-primary);
    border-left: 3px solid var(--accent-color);
    padding-left: 10px;
}

.sidebar-widget {
    margin-bottom: 30px;
}

.sidebar-widget ul {
    list-style: none;
}

.sidebar-widget li {
    margin-bottom: 12px;
}

.sidebar-widget a {
    text-decoration: none;
    color: var(--text-primary);
    font-size: 0.9rem;
    transition: color 0.2s ease;
}

.sidebar-widget a:hover {
    color: var(--accent-color);
    text-decoration: underline;
}

/* Responsive Mobile Layout */
/* Header & Navigasi */
header {
    text-align: center;
    border-bottom: 2px solid var(--accent-color);
    padding-bottom: 20px;
    margin-bottom: 35px;
}

header h1 a {
    font-size: 2.3rem;
    color: var(--text-primary);
    text-decoration: none;
    font-weight: 700;
    letter-spacing: -0.5px;
}

/* Base Nav */
nav {
    margin-top: 20px;
    width: 100%;
}

nav ul {
    list-style: none;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 20px;
    white-space: nowrap; /* Elak teks terputus/patah 2 baris */
}

nav a {
    text-decoration: none;
    color: var(--text-muted);
    font-size: 0.9rem;
    font-weight: 600;
    transition: color 0.2s ease;
    display: inline-block;
}

nav a:hover {
    color: var(--accent-color);
}

/* --- RESPONSIVE MOBILE FIX --- */
@media (max-width: 768px) {
    .site-container {
        padding: 20px 15px;
        margin: 0;
        border-radius: 0;
        border: none;
    }

    /* Make Navigation Scrollable Horizontally on Phone */
    nav {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch; /* Smooth scroll di iPhone */
        padding-bottom: 10px;
    }

    nav ul {
        justify-content: flex-start; /* Flow dari kiri ke kanan */
        padding: 0 10px;
        gap: 18px;
    }

    /* Sembunyikan scrollbar supaya nampak clean */
    nav::-webkit-scrollbar {
        display: none;
    }
    nav {
        -ms-overflow-style: none;
        scrollbar-width: none;
    }

    .main-content {
        grid-template-columns: 1fr;
    }
}