:root {
    --primary: #0066cc;
    --secondary: #f5a623;
    --background: #f8f9fa;
    --text: #2c3e50;
    --border: #e0e0e0;
    --card-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    line-height: 1.6;
    color: var(--text);
    background: var(--background);
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.site-header {
    background: linear-gradient(135deg, var(--primary) 0%, #0052a3 100%);
    color: white;
    padding: 60px 0;
    margin-bottom: 40px;
    text-align: center;
}

.site-header h1 {
    font-size: 2.5em;
    margin-bottom: 10px;
}

.site-header .tagline {
    font-size: 1.1em;
    opacity: 0.95;
    margin-bottom: 30px;
}

.main-nav {
    display: flex;
    justify-content: center;
    gap: 30px;
}

.main-nav a {
    color: white;
    text-decoration: none;
    font-weight: 500;
    transition: opacity 0.3s;
}

.main-nav a:hover,
.main-nav a.active {
    opacity: 0.8;
    text-decoration: underline;
}

.sidebar-layout {
    display: grid;
    grid-template-columns: 1fr 300px;
    gap: 40px;
    margin-bottom: 60px;
}

.filter-bar {
    display: flex;
    gap: 15px;
    margin-bottom: 30px;
}

.search-box,
.filter-select {
    padding: 12px 15px;
    border: 1px solid var(--border);
    border-radius: 6px;
    font-size: 1em;
    background: white;
}

.search-box {
    flex: 1;
    min-width: 200px;
}

.filter-select {
    min-width: 180px;
}

.search-box:focus,
.filter-select:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(0,102,204,0.1);
}

.skills-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
}

.skill-card {
    background: white;
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 20px;
    box-shadow: var(--card-shadow);
    transition: transform 0.2s, box-shadow 0.2s;
    display: flex;
    flex-direction: column;
}

.skill-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 16px rgba(0,0,0,0.15);
}

.skill-header {
    display: flex;
    justify-content: space-between;
    align-items: start;
    margin-bottom: 12px;
    gap: 12px;
}

.skill-header h3 {
    font-size: 1.2em;
    flex: 1;
}

.skill-header a {
    color: var(--primary);
    text-decoration: none;
}

.skill-header a:hover {
    text-decoration: underline;
}

.category-badge {
    background: var(--secondary);
    color: white;
    padding: 4px 10px;
    border-radius: 4px;
    font-size: 0.75em;
    font-weight: 600;
    white-space: nowrap;
}

.skill-description {
    color: #666;
    margin-bottom: 12px;
    font-size: 0.95em;
    flex-grow: 1;
}

.skill-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
    font-size: 0.9em;
}

.frameworks {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
}

.framework-tag {
    background: #e8f0ff;
    color: var(--primary);
    padding: 3px 8px;
    border-radius: 3px;
    font-size: 0.8em;
    font-weight: 500;
}

.rating {
    color: var(--secondary);
    font-weight: 600;
}

.skill-tags {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.tag {
    background: #f0f0f0;
    color: #555;
    padding: 4px 10px;
    border-radius: 3px;
    font-size: 0.8em;
}

.affiliate-sidebar {
    position: sticky;
    top: 20px;
    height: fit-content;
}

.affiliate-widget {
    background: white;
    border: 2px solid var(--secondary);
    border-radius: 8px;
    padding: 20px;
    box-shadow: var(--card-shadow);
}

.affiliate-widget h3 {
    color: var(--primary);
    margin-bottom: 12px;
    font-size: 1.1em;
}

.affiliate-disclaimer {
    font-size: 0.85em;
    color: #666;
    margin-bottom: 15px;
    font-style: italic;
}

.affiliate-books {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.affiliate-link {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px;
    background: #f9f9f9;
    border-radius: 6px;
    text-decoration: none;
    color: var(--primary);
    border: 1px solid var(--border);
    transition: all 0.2s;
}

.affiliate-link:hover {
    background: #f0f7ff;
    border-color: var(--primary);
    transform: translateX(4px);
}

.book-cover {
    font-size: 1.8em;
    width: 40px;
    text-align: center;
}

.affiliate-link span {
    font-size: 0.9em;
    font-weight: 500;
}

.site-footer {
    background: #2c3e50;
    color: white;
    text-align: center;
    padding: 40px 0;
    margin-top: 60px;
}

.site-footer p {
    margin-bottom: 8px;
}

.site-footer small {
    opacity: 0.8;
    font-size: 0.85em;
}

@media (max-width: 768px) {
    .sidebar-layout {
        grid-template-columns: 1fr;
    }
    
    .affiliate-sidebar {
        position: static;
    }
    
    .skills-grid {
        grid-template-columns: 1fr;
    }
    
    .filter-bar {
        flex-direction: column;
    }
    
    .site-header h1 {
        font-size: 1.8em;
    }
    
    .main-nav {
        flex-direction: column;
        gap: 15px;
    }
}
