:root {
    --primary-color: #2c3e50;
    --accent-color: #3498db;
    --bg-color: #f8f9fa;
    --text-color: #333;
    --light-text: #666;
    --card-bg: #ffffff;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    line-height: 1.6;
    color: var(--text-color);
    background-color: var(--bg-color);
}

/* Header */
header {
    background-color: var(--card-bg);
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
    position: sticky;
    top: 0;
    z-index: 100;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 70px;
}

.logo {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary-color);
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 10px;
}

.nav-links {
    display: flex;
    gap: 30px;
}

.nav-links a {
    text-decoration: none;
    color: var(--text-color);
    font-weight: 500;
    transition: color 0.3s;
}

.nav-links a:hover {
    color: var(--accent-color);
}

/* Hero Section */
.hero {
    background: linear-gradient(135deg, #2c3e50 0%, #3498db 100%);
    color: white;
    padding: 80px 0;
    text-align: center;
    margin-bottom: 50px;
}

.hero h1 {
    font-size: 2.5rem;
    margin-bottom: 20px;
}

.hero p {
    font-size: 1.2rem;
    opacity: 0.9;
    max-width: 600px;
    margin: 0 auto;
}

/* Content Grid */
.section-title {
    text-align: center;
    margin-bottom: 40px;
    color: var(--primary-color);
    font-size: 2rem;
}

.notes-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
    margin-bottom: 60px;
}

.note-card-link {
    text-decoration: none;
    color: inherit;
    display: block;
}

.note-card {
    background: var(--card-bg);
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 4px 6px rgba(0,0,0,0.05);
    transition: transform 0.3s, box-shadow 0.3s;
    cursor: pointer;
    height: 100%;
}

.note-card-link:hover .note-card {
    transform: translateY(-5px);
    box-shadow: 0 10px 15px rgba(0,0,0,0.1);
}

.card-image {
    height: 160px;
    background-color: #e9ecef;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #adb5bd;
    font-size: 3rem;
}

.card-content {
    padding: 25px;
}

.category {
    color: var(--accent-color);
    font-size: 0.85rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 10px;
    display: block;
}

.card-title {
    font-size: 1.25rem;
    margin-bottom: 10px;
    color: var(--primary-color);
}

.card-excerpt {
    color: var(--light-text);
    font-size: 0.95rem;
    margin-bottom: 20px;
}

.card-meta {
    display: flex;
    justify-content: space-between;
    color: #999;
    font-size: 0.85rem;
    border-top: 1px solid #eee;
    padding-top: 15px;
}

/* Article Detail Page Styles */
.article-header {
    background: var(--bg-color);
    padding: 40px 0;
    text-align: center;
    border-bottom: 1px solid #eee;
}

.article-meta {
    color: var(--light-text);
    font-size: 0.9rem;
    margin-top: 10px;
}

.article-content {
    background: var(--card-bg);
    padding: 40px;
    margin-top: -20px;
    border-radius: 10px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.05);
    margin-bottom: 60px;
}

.article-content h2 {
    color: var(--primary-color);
    margin-top: 30px;
    margin-bottom: 15px;
    font-size: 1.5rem;
}

.article-content p {
    margin-bottom: 20px;
    line-height: 1.8;
}

.article-content code {
    background: #f1f3f5;
    padding: 2px 5px;
    border-radius: 3px;
    font-family: monospace;
    color: #e83e8c;
}

.article-content pre {
    background: #2d3436;
    color: #f1f2f6;
    padding: 20px;
    border-radius: 5px;
    overflow-x: auto;
    margin-bottom: 20px;
}

.back-link {
    display: inline-block;
    margin-top: 20px;
    color: var(--accent-color);
    text-decoration: none;
    font-weight: 500;
}

.back-link:hover {
    text-decoration: underline;
}

/* Footer */
footer {
    background-color: var(--primary-color);
    color: white;
    padding: 40px 0;
    text-align: center;
    margin-top: auto;
}

.footer-content p {
    opacity: 0.7;
    margin-bottom: 10px;
    font-size: 0.9rem;
}

.icp {
    font-size: 0.8rem;
    opacity: 0.5;
}

@media (max-width: 768px) {
    .hero h1 {
        font-size: 2rem;
    }
    .nav-links {
        display: none;
    }
    .article-content {
        padding: 20px;
    }
}