:root {
    --bg-main: #fafafa;
    --bg-surface: #ffffff;
    --border-light: #eaeaea;
    --border-dark: #d4d4d4;
    --text-main: #111111;
    --text-muted: #666666;
    --accent: #000000;
    --radius: 6px;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

body {
    background-color: var(--bg-main);
    color: var(--text-main);
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
}

/* Navbar */
.navbar {
    background-color: var(--bg-surface);
    border-bottom: 1px solid var(--border-light);
    position: sticky;
    top: 0;
    z-index: 100;
}

.nav-content {
    max-width: 1000px;
    margin: 0 auto;
    padding: 1rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-weight: 700;
    font-size: 1.2rem;
    color: var(--text-main);
    text-decoration: none;
    letter-spacing: -0.5px;
}

.nav-actions {
    display: flex;
    gap: 1rem;
    align-items: center;
}

/* Forms & Buttons */
.input-field {
    padding: 0.5rem 0.75rem;
    border: 1px solid var(--border-light);
    border-radius: var(--radius);
    font-size: 0.9rem;
    background-color: var(--bg-main);
    color: var(--text-main);
    transition: border-color 0.2s;
    outline: none;
}

.input-field:focus {
    border-color: var(--text-main);
    background-color: var(--bg-surface);
}

.btn {
    padding: 0.5rem 1rem;
    border-radius: var(--radius);
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
    border: 1px solid transparent;
}

.btn.primary {
    background-color: var(--accent);
    color: white;
}

.btn.primary:hover {
    background-color: #333333;
}

.btn.ghost {
    background-color: transparent;
    color: var(--text-muted);
}

.btn.ghost:hover {
    color: var(--text-main);
    background-color: var(--bg-main);
}

/* Layout */
.container {
    max-width: 1000px;
    margin: 2rem auto;
    padding: 0 2rem;
}

.layout {
    display: grid;
    grid-template-columns: 200px 1fr;
    gap: 3rem;
}

/* Sidebar */
.nav-group {
    margin-bottom: 2rem;
}

.nav-label {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--text-muted);
    font-weight: 600;
    margin-bottom: 0.75rem;
}

.nav-list {
    list-style: none;
}

.nav-list li {
    font-size: 0.9rem;
    color: var(--text-muted);
    padding: 0.4rem 0;
    cursor: pointer;
    transition: color 0.2s;
}

.nav-list li:hover, .nav-list li.active {
    color: var(--text-main);
    font-weight: 500;
}

.tags-list li {
    font-family: monospace;
    font-size: 0.85rem;
}

/* Feed & Cards */
.feed {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.card {
    background-color: var(--bg-surface);
    border: 1px solid var(--border-light);
    border-radius: var(--radius);
    padding: 1.5rem;
    transition: border-color 0.2s;
}

.card:hover {
    border-color: var(--border-dark);
}

.card-meta {
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-bottom: 0.5rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.author {
    font-weight: 500;
    color: var(--text-main);
}

.card-title {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    letter-spacing: -0.3px;
}

.card-excerpt {
    font-size: 0.95rem;
    color: var(--text-muted);
    margin-bottom: 1rem;
}

.card-footer {
    font-size: 0.85rem;
    color: var(--text-muted);
}

/* Modal */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0, 0, 0, 0.4);
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s ease;
    z-index: 1000;
}

.modal-overlay.active {
    opacity: 1;
    pointer-events: all;
}

.modal-content {
    width: 100%;
    max-width: 500px;
    padding: 2rem;
    box-shadow: 0 10px 40px rgba(0,0,0,0.1);
}

.modal-content h2 {
    margin-bottom: 1.5rem;
    font-size: 1.2rem;
}

.form-group {
    margin-bottom: 1rem;
}

.full-width {
    width: 100%;
}

textarea.input-field {
    resize: vertical;
}

.modal-actions {
    display: flex;
    justify-content: flex-end;
    gap: 0.5rem;
    margin-top: 1.5rem;
}

/* Utilities */
.fade-in {
    animation: fadeIn 0.4s ease-in-out;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(5px); }
    to { opacity: 1; transform: translateY(0); }
}

@media (max-width: 768px) {
    .layout { grid-template-columns: 1fr; }
    .sidebar { display: none; }
}