/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary: #2563eb; /* Professional Blue */
    --primary-hover: #1d4ed8;
    --text-main: #1f2937;
    --text-muted: #4b5563;
    --bg-main: #ffffff;
    --bg-alt: #f3f4f6;
    --border: #e5e7eb;
    --header-height: 70px;
    --max-width: 1000px;
    --radius: 8px;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    color: var(--text-main);
    background-color: var(--bg-main);
    line-height: 1.6;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

a {
    color: var(--primary);
    text-decoration: none;
    transition: color 0.2s;
}

a:hover {
    color: var(--primary-hover);
    text-decoration: underline;
}

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

/* Header */
.header {
    background-color: var(--bg-main);
    border-bottom: 1px solid var(--border);
    position: sticky;
    top: 0;
    z-index: 100;
}

.header-container {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 20px;
    height: var(--header-height);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-main);
    text-decoration: none;
}

.logo:hover {
    color: var(--primary);
    text-decoration: none;
}

.nav-links {
    display: flex;
    gap: 20px;
    list-style: none;
}

.nav-links a {
    color: var(--text-muted);
    font-weight: 500;
    text-decoration: none;
}

.nav-links a:hover {
    color: var(--text-main);
}

/* Main Content */
.main {
    flex-grow: 1;
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 40px 20px;
    width: 100%;
}

/* Markdown Content Styles (Single Pages) */
.content h1, .content h2, .content h3, .content h4 {
    color: var(--text-main);
    margin-top: 2rem;
    margin-bottom: 1rem;
    font-weight: 600;
    line-height: 1.3;
}

.content h1 { font-size: 2.2rem; margin-top: 0; }
.content h2 { font-size: 1.8rem; border-bottom: 1px solid var(--border); padding-bottom: 0.5rem; }
.content h3 { font-size: 1.4rem; }

.content p, .content ul, .content ol {
    margin-bottom: 1.2rem;
    color: var(--text-muted);
}

.content ul, .content ol {
    padding-left: 2rem;
}

.content li {
    margin-bottom: 0.5rem;
}

.content pre {
    background: var(--bg-alt);
    padding: 1rem;
    border-radius: var(--radius);
    overflow-x: auto;
    margin-bottom: 1.2rem;
}

.content code {
    background: var(--bg-alt);
    padding: 0.2rem 0.4rem;
    border-radius: 4px;
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
    font-size: 0.9em;
}

.content pre code {
    background: transparent;
    padding: 0;
}

/* List Pages */
.list-item {
    margin-bottom: 1.5rem;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid var(--border);
}

.list-title {
    font-size: 1.4rem;
    margin-bottom: 0.5rem;
}

/* Footer */
.footer {
    border-top: 1px solid var(--border);
    padding: 40px 20px;
    text-align: center;
    color: var(--text-muted);
    background-color: var(--bg-alt);
}

.footer-links {
    margin-top: 15px;
    display: flex;
    justify-content: center;
    gap: 15px;
    flex-wrap: wrap;
}

.footer-links a {
    color: var(--text-muted);
    font-size: 0.9rem;
}

.footer-links a:hover {
    color: var(--text-main);
}

/* Responsive Design */
@media (max-width: 768px) {
    .header-container {
        flex-direction: column;
        height: auto;
        padding: 15px 20px;
        gap: 12px;
    }
    
    .nav-links {
        flex-wrap: wrap;
        justify-content: center;
        gap: 12px;
    }

    .main {
        padding: 20px 15px;
    }

    .footer {
        padding: 30px 15px;
    }
}
