/* assets/style.css */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&display=swap');

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --bg-main: #0f172a;
    --bg-card: #1e293b;
    --accent: #3b82f6;
    --accent-hover: #2563eb;
    --text-primary: #f8fafc;
    --text-secondary: #94a3b8;
    --border: #334155;
}

body {
    margin: 0;
    font-family: 'Inter', sans-serif;
    background-color: var(--bg-main);
    color: var(--text-primary);
}

.sidebar {
    position: fixed;
    width: 250px;
    height: 100vh;
    background: var(--bg-card);
    border-right: 1px solid var(--border);
    padding: 2rem 1rem;
    transition: transform 0.3s ease;
    z-index: 1000;
    overflow-y: auto;
    scrollbar-width: none;
    /* Firefox */
    -ms-overflow-style: none;
    /* IE and Edge */
}

.sidebar::-webkit-scrollbar {
    display: none;
    /* Chrome, Safari and Opera */
}

.user-top-bar {
    position: fixed;
    top: 1rem;
    right: 2rem;
    display: flex;
    align-items: center;
    gap: 1rem;
    z-index: 950;
    background: rgba(30, 41, 59, 0.6);
    backdrop-filter: blur(8px);
    padding: 0.5rem 1rem;
    border-radius: 9999px;
    border: 1px solid var(--border);
    color: white;
}

.user-top-bar img {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    object-fit: cover;
    border: 1.5px solid var(--accent);
}

.user-top-bar span {
    font-size: 0.875rem;
    font-weight: 500;
}

.main-content {
    margin-left: 250px;
    /* Reduced from 270px for tighter fit */
    padding: 2rem;
    transition: margin-left 0.3s ease, padding-left 0.3s ease;
}

/* Sidebar Hidden State */
body.sidebar-hidden .sidebar {
    transform: translateX(-100%);
}

body.sidebar-hidden .main-content {
    margin-left: 0;
    padding-left: 5rem;
}

/* Toggle Buttons */
.close-sidebar {
    display: none;
}

.sidebar-overlay {
    display: none;
}

.open-sidebar {
    position: fixed;
    top: 1rem;
    left: 1rem;
    z-index: 1100;
    cursor: pointer;
    background: var(--bg-card);
    border: 1px solid var(--border);
    color: white;
    padding: 0.6rem;
    border-radius: 0.5rem;
    display: flex;
    pointer-events: auto;
    align-items: center;
    justify-content: center;
    transition: background 0.2s, transform 0.2s;
}

.open-sidebar:hover {
    background: #334155;
    transform: scale(1.05);
}

.card {
    --card-bg: var(--bg-card);
    --card-text: var(--text-primary);
    --card-text-sec: var(--text-secondary);
    --card-border: var(--border);
    --card-title: var(--text-primary);

    background: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: 0.75rem;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    position: relative;
    overflow: hidden;
    color: var(--card-text);
}

.card-published {
    --card-bg: #1e3a8a;
    /* Biru Donker / Navy Blue */
    --card-text: #f8fafc;
    --card-text-sec: #cbd5e1;
    --card-border: #3b82f6;
    --card-title: #ffffff;

    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
}

.card-published h3 {
    color: var(--card-title) !important;
}

.card-published p,
.card-published .project-info {
    color: var(--card-text-sec) !important;
}

.btn {
    display: inline-block;
    margin-top: 0.75rem;
    padding: 0.5rem 1rem;
    border-radius: 0.5rem;
    text-decoration: none;
    font-weight: 500;
    cursor: pointer;
    border: none;
    transition: all 0.2s;
}

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

.btn-primary:hover {
    background: var(--accent-hover);
}

.btn-sm {
    padding: 0.25rem 0.6rem;
    font-size: 0.75rem;
    margin-top: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.btn-sm i,
.btn-sm svg {
    width: 14px !important;
    height: 14px !important;
}

.status-badge {
    padding: 0.25rem 0.5rem;
    border-radius: 0.5rem;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    display: inline-block;
}

.status-ongoing {
    background: #f59e0b;
    color: white;
}

.status-completed {
    background: #10b981;
    color: white;
}

.status-published {
    background: #3b82f6;
    color: white;
}

.status-draft {
    background: #64748b;
    color: white;
}

.status-review {
    background: #8b5cf6;
    color: white;
}

.status-empty {
    background: #ef4444;
    color: white;
}

nav a {
    display: block;
    padding: 0.75rem 1rem;
    color: var(--text-secondary);
    text-decoration: none;
    border-radius: 0.5rem;
    margin-bottom: 0.5rem;
}

nav a.active,
nav a:hover {
    background: #334155;
    color: white;
}

h1,
h2,
h3 {
    margin-top: 0;
}

/* UGC Styles (User Generated Content) */
.ugc {
    line-height: 1.6;
    color: var(--text-primary);
    font-size: 1rem;
}

.ugc h1,
.ugc h2,
.ugc h3,
.ugc h4,
.ugc h5 {
    display: block;
    font-weight: 700;
    margin-top: 1.5rem;
    margin-bottom: 0.75rem;
    color: var(--accent);
}

.ugc h1 {
    font-size: 1.75rem;
}

.ugc h2 {
    font-size: 1.5rem;
}

.ugc h3 {
    font-size: 1.25rem;
}

.ugc h4 {
    font-size: 1.1rem;
}

.ugc h5 {
    font-size: 1rem;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.ugc p {
    font-size: 1rem;
    margin-bottom: 1rem;
    font-weight: 400 !important;
    color: var(--text-primary);
}

.ugc img {
    max-width: 100%;
    height: auto;
    border-radius: 0.5rem;
    margin: 1.5rem 0;
    display: block;
}

.ugc ul,
.ugc ol {
    margin: 1rem 0 1rem 1.5rem;
}

.ugc table {
    width: 100%;
    border-collapse: collapse;
    margin: 1.5rem 0;
    background: transparent !important;
}

.ugc td,
.ugc th {
    border: 1px solid var(--border);
    padding: 0.75rem;
    text-align: left;
    color: var(--text-primary);
}

.ugc th {
    background: rgba(255, 255, 255, 0.05);
}

/* Projects Grid Responsive */
.project-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.5rem;
}

@media (max-width: 768px) {
    .project-grid {
        grid-template-columns: 1fr;
    }

    .sidebar {
        transform: translateX(-100%);
        width: 80%;
        max-width: 300px;
    }

    body:not(.sidebar-hidden) .sidebar {
        transform: translateX(0);
        box-shadow: 0 0 50px rgba(0, 0, 0, 0.5);
    }

    .main-content {
        margin-left: 0 !important;
        padding: 1.5rem !important;
        transition: padding-left 0.3s ease;
    }

    body.sidebar-hidden .main-content {
        padding-left: 4.5rem !important;
    }

    /* Overlay when sidebar is open on mobile */
    body.has-sidebar:not(.sidebar-hidden) .sidebar-overlay {
        display: block;
        position: fixed;
        inset: 0;
        background: rgba(0, 0, 0, 0.4);
        z-index: 950;
        animation: fadeIn 0.3s ease;
    }
}