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

:root {
    /* GitHub-inspired color palette */
    --github-blue: #0969da;
    --github-blue-hover: #0860ca;
    --github-blue-light: #ddf4ff;
    --github-green: #1a7f37;
    --github-green-light: #dafbe1;
    --github-orange: #bf8700;
    --github-orange-light: #fff8c5;
    --github-red: #cf222e;
    --github-red-light: #ffebe9;
    
    /* BuildByte and Professor Modules colors */
    --buildbyte-color: #0969da;
    --professor-modules-color: #1a7f37;
    
    /* GitHub-inspired grays */
    --text-primary: #24292f;
    --text-secondary: #57606a;
    --text-tertiary: #8b949e;
    --bg-primary: #ffffff;
    --bg-secondary: #f6f8fa;
    --bg-tertiary: #eaeef2;
    --border-color: #d0d7de;
    --border-color-hover: #afb8c1;
    
    /* Subtle shadows like GitHub */
    --shadow-sm: 0 1px 0 rgba(27, 31, 35, 0.04);
    --shadow-md: 0 3px 6px rgba(140, 149, 159, 0.15);
    --shadow-lg: 0 8px 24px rgba(140, 149, 159, 0.2);
    
    /* Spacing */
    --spacing-xs: 0.25rem;
    --spacing-sm: 0.5rem;
    --spacing-md: 1rem;
    --spacing-lg: 1.5rem;
    --spacing-xl: 2rem;
    --spacing-2xl: 3rem;
}

/* Dark Mode Variables */
[data-theme="dark"] {
    /* GitHub dark mode color palette */
    --github-blue: #58a6ff;
    --github-blue-hover: #79c0ff;
    --github-blue-light: rgba(88, 166, 255, 0.1);
    --github-green: #3fb950;
    --github-green-light: rgba(63, 185, 80, 0.1);
    --github-orange: #d29922;
    --github-orange-light: rgba(210, 153, 34, 0.1);
    --github-red: #f85149;
    --github-red-light: rgba(248, 81, 73, 0.1);
    
    /* BuildByte and Professor Modules colors (adjusted for dark) */
    --buildbyte-color: #58a6ff;
    --professor-modules-color: #3fb950;
    
    /* GitHub dark mode grays */
    --text-primary: #e6edf3;
    --text-secondary: #8b949e;
    --text-tertiary: #6e7681;
    --bg-primary: #0d1117;
    --bg-secondary: #161b22;
    --bg-tertiary: #21262d;
    --border-color: #30363d;
    --border-color-hover: #484f58;
    
    /* Dark mode shadows */
    --shadow-sm: 0 1px 0 rgba(27, 31, 35, 0.1);
    --shadow-md: 0 3px 6px rgba(0, 0, 0, 0.3);
    --shadow-lg: 0 8px 24px rgba(0, 0, 0, 0.4);
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Noto Sans', Helvetica, Arial, sans-serif, 'Apple Color Emoji', 'Segoe UI Emoji';
    line-height: 1.5;
    color: var(--text-primary);
    background-color: var(--bg-primary);
    font-size: 14px;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    transition: background-color 0.2s, color 0.2s;
}

.container {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 24px;
}

.main {
    min-height: calc(100vh - 200px);
}

/* Header - GitHub style */
.header {
    background-color: var(--bg-primary);
    border-bottom: 1px solid var(--border-color);
    padding: 2rem 0;
    position: sticky;
    top: 0;
    z-index: 100;
    transition: background-color 0.2s, border-color 0.2s;
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
}

.theme-toggle {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 6px;
    padding: 0.5rem 1rem;
    cursor: pointer;
    font-size: 1.25rem;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background-color 0.2s, border-color 0.2s;
    min-width: 44px;
    height: 36px;
}

.theme-toggle:hover {
    background: var(--bg-tertiary);
    border-color: var(--border-color-hover);
}

.theme-icon {
    display: inline-block;
    transition: transform 0.3s;
}

.theme-toggle:hover .theme-icon {
    transform: scale(1.1);
}

.header h1 {
    font-size: 2rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: var(--text-primary);
    letter-spacing: -0.5px;
    transition: color 0.2s;
}

.subtitle {
    font-size: 1rem;
    color: var(--text-secondary);
    font-weight: 400;
    transition: color 0.2s;
}

/* Navigation - GitHub style */
.nav {
    background-color: var(--bg-secondary);
    border-bottom: 1px solid var(--border-color);
    position: sticky;
    top: 73px;
    z-index: 99;
    transition: background-color 0.2s, border-color 0.2s;
}

.nav-list {
    list-style: none;
    display: flex;
    flex-wrap: wrap;
    gap: 0;
    padding: 0;
    border-bottom: 1px solid var(--border-color);
}

.nav-list li {
    border-bottom: 2px solid transparent;
    margin-bottom: -1px;
}

.nav-list a {
    color: var(--text-secondary);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.2s, border-color 0.2s;
    padding: 1rem 1.5rem;
    display: block;
    font-size: 14px;
    border-bottom: 2px solid transparent;
    margin-bottom: -2px;
}

.nav-list a:hover {
    color: var(--text-primary);
    border-bottom-color: var(--border-color-hover);
}

.nav-list a.active {
    color: var(--text-primary);
    border-bottom-color: var(--github-blue);
    font-weight: 600;
}

/* Sections */
.section {
    padding: 3rem 0;
}

.section h2 {
    font-size: 1.5rem;
    margin-bottom: 1.5rem;
    color: var(--text-primary);
    font-weight: 600;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid var(--border-color);
    transition: color 0.2s, border-color 0.2s;
}

/* Summary Grid - GitHub card style */
.summary-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1rem;
    margin-top: 1.5rem;
}

.summary-card {
    background: var(--bg-primary);
    border: 1px solid var(--border-color);
    border-radius: 6px;
    padding: 1.5rem;
    transition: border-color 0.2s, box-shadow 0.2s, background-color 0.2s;
}

.summary-card:hover {
    border-color: var(--border-color-hover);
    box-shadow: var(--shadow-md);
}

.summary-card.buildbyte {
    border-left: 3px solid var(--buildbyte-color);
}

.summary-card.professor-modules {
    border-left: 3px solid var(--professor-modules-color);
}

.summary-card h3 {
    font-size: 1.25rem;
    margin-bottom: 1rem;
    color: var(--text-primary);
    font-weight: 600;
    transition: color 0.2s;
}

.stats {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.stat {
    display: flex;
    justify-content: space-between;
    padding: 0.5rem 0;
    border-bottom: 1px solid var(--bg-secondary);
}

.stat:last-child {
    border-bottom: none;
}

.stat-label {
    font-weight: 400;
    color: var(--text-secondary);
    font-size: 14px;
    transition: color 0.2s;
}

.stat-value {
    font-weight: 600;
    color: var(--text-primary);
    font-size: 14px;
    transition: color 0.2s;
}

/* Modules Container - GitHub style */
.modules-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(500px, 1fr));
    gap: 1.5rem;
    margin-top: 1.5rem;
}

.module-section {
    background: var(--bg-primary);
    border: 1px solid var(--border-color);
    border-radius: 6px;
    padding: 1.5rem;
    transition: background-color 0.2s, border-color 0.2s;
}

.buildbyte-title {
    color: var(--buildbyte-color);
    font-size: 1.25rem;
    margin-bottom: 1rem;
    padding-bottom: 0.75rem;
    border-bottom: 1px solid var(--border-color);
    font-weight: 600;
    transition: color 0.2s, border-color 0.2s;
}

.professor-modules-title {
    color: var(--professor-modules-color);
    font-size: 1.25rem;
    margin-bottom: 1rem;
    padding-bottom: 0.75rem;
    border-bottom: 1px solid var(--border-color);
    font-weight: 600;
    transition: color 0.2s, border-color 0.2s;
}

.module-category {
    margin-bottom: 1.5rem;
}

.module-category:last-child {
    margin-bottom: 0;
}

.module-category h4 {
    color: var(--text-primary);
    font-size: 1rem;
    margin-bottom: 0.75rem;
    font-weight: 600;
    transition: color 0.2s;
}

.module-list {
    list-style-position: inside;
    padding-left: 0;
}

.module-list li {
    margin-bottom: 0.5rem;
    padding: 0.5rem 0.75rem;
    background: var(--bg-secondary);
    border-radius: 6px;
    border: 1px solid transparent;
    transition: background-color 0.2s, border-color 0.2s, color 0.2s;
    font-size: 14px;
    line-height: 1.5;
}

.module-list li:hover {
    background: var(--bg-tertiary);
    border-color: var(--border-color);
}

/* Comparison Grid - GitHub table style */
.comparison-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
    gap: 1rem;
    margin-top: 1.5rem;
}

.comparison-card {
    background: var(--bg-primary);
    border: 1px solid var(--border-color);
    border-radius: 6px;
    padding: 1.5rem;
    transition: background-color 0.2s, border-color 0.2s;
}

.comparison-card h3 {
    font-size: 1rem;
    margin-bottom: 1rem;
    color: var(--text-primary);
    font-weight: 600;
    transition: color 0.2s;
}

.comparison-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    overflow: hidden;
}

.comparison-table th {
    background: var(--bg-secondary);
    padding: 0.75rem;
    text-align: left;
    font-weight: 600;
    border-bottom: 1px solid var(--border-color);
    font-size: 13px;
    color: var(--text-primary);
}

.comparison-table td {
    padding: 0.75rem;
    border-bottom: 1px solid var(--border-color);
    color: var(--text-primary);
    transition: color 0.2s, background-color 0.2s;
}

.comparison-table tr:last-child td {
    border-bottom: none;
}

.comparison-table tr:hover {
    background: var(--bg-secondary);
    transition: background-color 0.2s;
}

.check {
    color: var(--github-green);
    font-weight: 600;
}

.cross {
    color: var(--github-red);
    font-weight: 600;
}

/* Pros and Cons - GitHub style */
.pros-cons-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(500px, 1fr));
    gap: 1.5rem;
    margin-top: 1.5rem;
}

.pros-cons-card {
    background: var(--bg-primary);
    border: 1px solid var(--border-color);
    border-radius: 6px;
    padding: 1.5rem;
    transition: background-color 0.2s, border-color 0.2s;
}

.pros-cons-card.buildbyte {
    border-left: 3px solid var(--buildbyte-color);
}

.pros-cons-card.professor-modules {
    border-left: 3px solid var(--professor-modules-color);
}

.pros-cons-card h3 {
    font-size: 1.25rem;
    margin-bottom: 1.5rem;
    font-weight: 600;
    transition: color 0.2s;
}

.pros-section, .cons-section {
    margin-bottom: 1.5rem;
}

.pros-section:last-child, .cons-section:last-child {
    margin-bottom: 0;
}

.pros-title {
    color: var(--github-green);
    font-size: 1rem;
    margin-bottom: 0.75rem;
    font-weight: 600;
    transition: color 0.2s;
}

.cons-title {
    color: var(--github-red);
    font-size: 1rem;
    margin-bottom: 0.75rem;
    font-weight: 600;
    transition: color 0.2s;
}

.pros-list, .cons-list {
    list-style: none;
    padding-left: 0;
}

.pros-list li, .cons-list li {
    padding: 0.5rem 0.75rem;
    margin-bottom: 0.5rem;
    border-radius: 6px;
    border-left: 3px solid;
    font-size: 14px;
    line-height: 1.5;
    transition: background-color 0.2s, border-color 0.2s;
}

.pros-list li {
    background: var(--github-green-light);
    border-left-color: var(--github-green);
}

.cons-list li {
    background: var(--github-red-light);
    border-left-color: var(--github-red);
}

/* Gap Analysis - GitHub style */
.gap-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
    gap: 1rem;
    margin-top: 1.5rem;
}

.gap-card {
    background: var(--bg-primary);
    border: 1px solid var(--border-color);
    border-radius: 6px;
    padding: 1.5rem;
    transition: background-color 0.2s, border-color 0.2s;
}

.gap-card h3 {
    font-size: 1rem;
    margin-bottom: 1rem;
    color: var(--text-primary);
    font-weight: 600;
    transition: color 0.2s;
}

.gap-list {
    list-style: none;
    padding-left: 0;
}

.gap-list li {
    padding: 0.5rem 0.75rem;
    margin-bottom: 0.5rem;
    background: var(--bg-secondary);
    border-radius: 6px;
    border-left: 3px solid var(--github-blue);
    font-size: 14px;
    line-height: 1.5;
    transition: background-color 0.2s, border-color 0.2s;
}

/* Verdict - GitHub style */
.verdict-section {
    background: var(--bg-secondary);
    border-top: 1px solid var(--border-color);
    border-bottom: 1px solid var(--border-color);
}

.verdict-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
    gap: 1.5rem;
    margin-top: 1.5rem;
}

.verdict-card {
    background: var(--bg-primary);
    border: 1px solid var(--border-color);
    border-radius: 6px;
    padding: 1.5rem;
    transition: background-color 0.2s, border-color 0.2s;
}

.verdict-card.best-approach {
    border: 2px solid var(--github-green);
    background: var(--github-green-light);
}

.verdict-card h3 {
    font-size: 1.25rem;
    margin-bottom: 1rem;
    color: var(--text-primary);
    font-weight: 600;
    transition: color 0.2s;
}

.verdict-option {
    margin-bottom: 1.5rem;
}

.verdict-option:last-child {
    margin-bottom: 0;
}

.verdict-option h4 {
    font-size: 1rem;
    margin-bottom: 0.75rem;
    color: var(--text-primary);
    font-weight: 600;
    transition: color 0.2s;
}

.verdict-card ul {
    list-style: none;
    padding-left: 0;
}

.verdict-card li {
    padding: 0.5rem 0.75rem;
    margin-bottom: 0.5rem;
    background: var(--bg-secondary);
    border-radius: 6px;
    border-left: 3px solid var(--github-blue);
    font-size: 14px;
    line-height: 1.5;
    transition: background-color 0.2s, border-color 0.2s;
}

.conclusion {
    margin-top: 1rem;
    padding: 1rem;
    background: var(--bg-secondary);
    border-radius: 6px;
    font-style: italic;
    color: var(--text-secondary);
    font-size: 14px;
    border: 1px solid var(--border-color);
}

/* Mapping - GitHub table style */
.mapping-container {
    margin-top: 1.5rem;
}

.mapping-section {
    margin-bottom: 2rem;
}

.mapping-section h3 {
    font-size: 1.25rem;
    margin-bottom: 1rem;
    color: var(--text-primary);
    font-weight: 600;
    transition: color 0.2s;
}

.mapping-table-container {
    overflow-x: auto;
    background: var(--bg-primary);
    border: 1px solid var(--border-color);
    border-radius: 6px;
    padding: 0;
    transition: background-color 0.2s, border-color 0.2s;
}

.mapping-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
}

.mapping-table th {
    background: var(--bg-secondary);
    padding: 0.75rem 1rem;
    text-align: left;
    font-weight: 600;
    border-bottom: 1px solid var(--border-color);
    font-size: 13px;
    color: var(--text-primary);
}

.mapping-table td {
    padding: 0.75rem 1rem;
    border-bottom: 1px solid var(--border-color);
    color: var(--text-primary);
}

.mapping-table tr:last-child td {
    border-bottom: none;
}

.mapping-table tr:hover {
    background: var(--bg-secondary);
    transition: background-color 0.2s;
}

.match-partial {
    color: var(--github-orange);
    font-weight: 600;
}

.match-buildbyte {
    color: var(--buildbyte-color);
    font-weight: 600;
}

.match-professor-modules {
    color: var(--professor-modules-color);
    font-weight: 600;
}

/* Footer - GitHub style */
.footer {
    background: var(--bg-primary);
    border-top: 1px solid var(--border-color);
    color: var(--text-secondary);
    padding: 2rem 0;
    text-align: center;
    margin-top: 3rem;
    font-size: 14px;
    transition: background-color 0.2s, border-color 0.2s, color 0.2s;
}

/* Responsive Design for Theme Toggle */
@media (max-width: 768px) {
    .header-content {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .theme-toggle {
        align-self: flex-end;
        margin-top: 0.5rem;
    }
}

@media (max-width: 768px) {
    .header h1 {
        font-size: 1.5rem;
    }

    .subtitle {
        font-size: 0.875rem;
    }

    .nav {
        top: 60px;
    }

    .nav-list {
        flex-direction: column;
        gap: 0;
    }

    .nav-list a {
        padding: 0.75rem 1rem;
        border-bottom: 1px solid var(--border-color);
        border-left: 3px solid transparent;
    }

    .nav-list a:hover,
    .nav-list a.active {
        border-left-color: var(--github-blue);
        border-bottom-color: var(--border-color);
    }

    .modules-container,
    .comparison-grid,
    .pros-cons-grid,
    .gap-grid,
    .verdict-container {
        grid-template-columns: 1fr;
    }

    .mapping-table-container {
        overflow-x: scroll;
    }

    .section {
        padding: 2rem 0;
    }
}

/* Smooth Scroll */
html {
    scroll-behavior: smooth;
}

/* Print Styles */
@media print {
    .nav {
        display: none;
    }
    
    .section {
        page-break-inside: avoid;
    }
}

/* GitHub-style code blocks (if needed) */
code {
    background-color: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 3px;
    padding: 0.125rem 0.375rem;
    font-size: 85%;
    font-family: 'SFMono-Regular', Consolas, 'Liberation Mono', Menlo, monospace;
}

/* Button Styles */
.btn-primary {
    display: inline-block;
    padding: 0.5rem 1rem;
    background: var(--github-blue);
    color: white;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 500;
    text-decoration: none;
    transition: background-color 0.2s;
    border: none;
    cursor: pointer;
}

.btn-primary:hover {
    background: var(--github-blue-hover);
    color: white;
    text-decoration: none;
}

[data-theme="dark"] .btn-primary {
    background: var(--github-blue);
}

[data-theme="dark"] .btn-primary:hover {
    background: var(--github-blue-hover);
}
