/* ============================================
   PAKBLOG - MAIN STYLESHEET
   Global Reset, Variables, Typography
   ============================================ */

/* --- CSS VARIABLES --- */
:root {
    /* Colors */
    --primary: #0f172a;
    --primary-light: #1e293b;
    --accent: #dc2626;
    --accent-hover: #b91c1c;
    
    --text: #1e293b;
    --text-light: #475569;
    --text-lighter: #64748b;
    --text-white: #ffffff;
    --text-white-muted: #94a3b8;
    
    --bg: #ffffff;
    --bg-light: #f8fafc;
    --bg-dark: #0f172a;
    
    --border: #e2e8f0;
    --border-light: #f1f5f9;
    
    /* Fonts */
    --font-heading: 'Playfair Display', Georgia, 'Times New Roman', serif;
    --font-body: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    
    /* Sizes */
    --text-xs: 0.75rem;
    --text-sm: 0.875rem;
    --text-base: 1rem;
    --text-lg: 1.125rem;
    --text-xl: 1.25rem;
    --text-2xl: 1.5rem;
    --text-3xl: 1.875rem;
    --text-4xl: 2.25rem;
    
    /* Spacing */
    --space-1: 0.25rem;
    --space-2: 0.5rem;
    --space-3: 0.75rem;
    --space-4: 1rem;
    --space-5: 1.5rem;
    --space-6: 2rem;
    --space-8: 3rem;
    --space-10: 4rem;
    
    /* Radius */
    --radius-sm: 4px;
    --radius-md: 8px;
    --radius-lg: 12px;
    --radius-xl: 16px;
    --radius-full: 9999px;
    
    /* Shadows */
    --shadow-sm: 0 1px 2px rgba(0,0,0,0.05);
    --shadow-md: 0 4px 6px rgba(0,0,0,0.07);
    --shadow-lg: 0 10px 25px rgba(0,0,0,0.1);
    
    /* Transitions */
    --transition-fast: 150ms ease;
    --transition-base: 250ms ease;
    --transition-slow: 400ms ease;
}

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

html {
    font-size: 16px;
    scroll-behavior: smooth;
    -webkit-text-size-adjust: 100%;
}

body {
    font-family: var(--font-body);
    font-size: var(--text-base);
    line-height: 1.6;
    color: var(--text);
    background: var(--bg);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* --- TYPOGRAPHY --- */
h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-heading);
    font-weight: 700;
    line-height: 1.2;
    color: var(--text);
    margin-bottom: var(--space-4);
}

h1 { font-size: var(--text-4xl); }
h2 { font-size: var(--text-3xl); }
h3 { font-size: var(--text-2xl); }
h4 { font-size: var(--text-xl); }
h5 { font-size: var(--text-lg); }
h6 { font-size: var(--text-base); }

p {
    margin-bottom: var(--space-4);
    color: var(--text-light);
}

a {
    color: var(--accent);
    text-decoration: none;
    transition: color var(--transition-fast);
}

a:hover {
    color: var(--accent-hover);
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

blockquote {
    border-left: 4px solid var(--accent);
    padding: var(--space-4) var(--space-5);
    margin: var(--space-5) 0;
    background: var(--bg-light);
    font-style: italic;
    color: var(--text-light);
    border-radius: 0 var(--radius-md) var(--radius-md) 0;
}

hr {
    border: none;
    border-top: 1px solid var(--border);
    margin: var(--space-6) 0;
}

/* --- SELECTION --- */
::selection {
    background: var(--accent);
    color: var(--text-white);
}

/* --- SCROLLBAR --- */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: var(--bg-light);
}

::-webkit-scrollbar-thumb {
    background: var(--text-lighter);
    border-radius: var(--radius-full);
}

/* --- UTILITY CLASSES --- */
.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 var(--space-4);
}

.hidden {
    display: none !important;
}

.text-center { text-align: center; }
.text-muted { color: var(--text-lighter); }

.mt-1 { margin-top: var(--space-1); }
.mt-2 { margin-top: var(--space-2); }
.mt-4 { margin-top: var(--space-4); }
.mt-5 { margin-top: var(--space-5); }
.mt-6 { margin-top: var(--space-6); }

.mb-2 { margin-bottom: var(--space-2); }
.mb-4 { margin-bottom: var(--space-4); }
.mb-5 { margin-bottom: var(--space-5); }
.mb-6 { margin-bottom: var(--space-6); }

/* --- BUTTONS --- */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-2);
    padding: var(--space-3) var(--space-5);
    font-family: var(--font-body);
    font-size: var(--text-sm);
    font-weight: 600;
    border: none;
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: all var(--transition-base);
    white-space: nowrap;
}

.btn:active {
    transform: scale(0.97);
}

.btn-primary {
    background: var(--accent);
    color: var(--text-white);
}

.btn-primary:hover {
    background: var(--accent-hover);
    color: var(--text-white);
    box-shadow: var(--shadow-md);
}

.btn-secondary {
    background: var(--bg-light);
    color: var(--text);
    border: 1px solid var(--border);
}

.btn-secondary:hover {
    background: var(--border-light);
}

/* --- SKELETON LOADERS --- */
.skeleton {
    background: linear-gradient(
        90deg,
        var(--border-light) 25%,
        var(--border) 50%,
        var(--border-light) 75%
    );
    background-size: 200% 100%;
    animation: skeleton-loading 1.5s infinite;
    border-radius: var(--radius-md);
}

@keyframes skeleton-loading {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

/* --- EMPTY STATE --- */
.empty-state {
    text-align: center;
    padding: var(--space-10) var(--space-4);
}

.empty-state i {
    font-size: 48px;
    color: var(--text-lighter);
    margin-bottom: var(--space-4);
}

.empty-state h3 {
    font-size: var(--text-xl);
    margin-bottom: var(--space-2);
}

/* --- BADGES --- */
.badge {
    display: inline-flex;
    align-items: center;
    padding: var(--space-1) var(--space-3);
    font-size: var(--text-xs);
    font-weight: 600;
    border-radius: var(--radius-full);
    letter-spacing: 0.5px;
    text-transform: uppercase;
}

.badge-primary {
    background: rgba(220, 38, 38, 0.1);
    color: var(--accent);
}

.badge-secondary {
    background: var(--bg-light);
    color: var(--text-light);
}