/* CS525 Course Website Styles */

:root {
    --accent: #2563eb;
    --accent-dark: #1d4ed8;
    --text: #1f2937;
    --text-light: #6b7280;
    --bg: #ffffff;
    --bg-alt: #f9fafb;
    --border: #e5e7eb;
}

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

html {
    scroll-behavior: smooth;
    scroll-padding-top: 5rem;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    font-size: 16px;
    line-height: 1.6;
    color: var(--text);
    background: var(--bg);
}

.container {
    max-width: 960px;
    margin: 0 auto;
    padding: 0 1.5rem;
}

/* Header */
header {
    background: #4a6fa5;
    color: white;
    padding: 2rem 0;
    text-align: center;
}

header h1 {
    font-size: 1.4rem;
    font-weight: 500;
}

/* Navigation */
nav {
    background: var(--bg-alt);
    border-bottom: 1px solid var(--border);
    position: sticky;
    top: 0;
    z-index: 100;
}

nav .container {
    display: flex;
    gap: 0.5rem;
    padding-top: 0.75rem;
    padding-bottom: 0.75rem;
    flex-wrap: wrap;
}

nav a {
    color: var(--text);
    text-decoration: none;
    padding: 0.5rem 1rem;
    border-radius: 4px;
    font-size: 0.95rem;
    transition: background 0.2s, color 0.2s;
}

nav a:hover {
    background: var(--accent);
    color: white;
}

/* Dropdown */
.dropdown {
    position: relative;
    display: flex;
    align-items: center;
}

.dropdown-toggle {
    cursor: pointer;
    display: block;
    padding: 0.5rem 1rem;
    border-radius: 4px;
    font-size: 0.95rem;
    transition: background 0.2s, color 0.2s;
}

.dropdown-toggle:hover {
    background: var(--accent);
    color: white;
}

.dropdown-menu {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    background: white;
    border: 1px solid var(--border);
    border-radius: 4px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    min-width: 420px;
    z-index: 200;
    padding: 0.5rem 0;
}

.dropdown:hover .dropdown-menu {
    display: block;
}

.dropdown-menu a {
    display: block;
    padding: 0.4rem 1rem;
    color: var(--text);
    font-size: 0.85rem;
    border-radius: 0;
}

.dropdown-menu a:hover {
    background: var(--bg-alt);
    color: var(--accent);
}

/* Main content */
main {
    padding: 2rem 0 4rem;
}

section {
    margin-bottom: 3rem;
    padding-top: 1rem;
}

h2 {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--accent);
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid var(--border);
}

h3 {
    font-size: 1.15rem;
    font-weight: 600;
    margin-top: 1.5rem;
    margin-bottom: 0.75rem;
}

p {
    margin-bottom: 1rem;
    max-width: 65ch;
}

ul {
    margin-left: 1.5rem;
    margin-bottom: 1rem;
}

li {
    margin-bottom: 0.5rem;
}

a {
    color: var(--accent);
    text-decoration: none;
}

a:hover {
    text-decoration: underline;
}

/* Schedule table */
table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 1rem;
    font-size: 0.9rem;
}

th, td {
    padding: 0.75rem;
    text-align: left;
    border-bottom: 1px solid var(--border);
}

th {
    background: var(--bg-alt);
    font-weight: 600;
    white-space: nowrap;
}

tbody tr:hover {
    background: var(--bg-alt);
}

tbody tr[data-href] {
    cursor: pointer;
}

tbody tr[data-href]:hover {
    background: #e0e7ff;
}

tr.no-class {
    background: var(--bg-alt);
    color: var(--text-light);
    font-style: italic;
}

tr.no-class:hover {
    background: var(--bg-alt);
}

tr.separator {
    background: #dbeafe;
    font-weight: 500;
    font-size: 0.85rem;
    color: var(--text-light);
}

tr.future {
    color: var(--text-light);
}

tr.future:hover {
    background: var(--bg-alt);
}

tr.separator td {
    padding: 0.5rem 0.75rem;
    border-bottom: 2px solid var(--border);
}

tr.separator:hover {
    background: #dbeafe;
}

td:first-child {
    white-space: nowrap;
    font-weight: 500;
}

/* Milestones table */
table.milestones {
    max-width: 500px;
}

/* Deadline badges in schedule */
.deadline {
    display: inline-block;
    background: #dc2626;
    color: white;
    font-size: 0.7rem;
    padding: 0.15rem 0.4rem;
    border-radius: 3px;
    margin-left: 0.5rem;
    font-weight: 500;
    vertical-align: middle;
}

/* Lecture detail cards */
.lecture {
    background: var(--bg-alt);
    border: 1px solid var(--border);
    border-radius: 6px;
    padding: 1.25rem 1.5rem;
    margin-bottom: 1.5rem;
}

.lecture h3 {
    margin-top: 0;
    margin-bottom: 0.5rem;
    color: var(--text);
}

.lecture-links {
    font-size: 0.85rem;
    font-weight: normal;
    margin-left: 1rem;
}

.lecture h4 {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-light);
    margin-top: 1rem;
    margin-bottom: 0.5rem;
    border-bottom: none;
}

.lecture .markdown h2 {
    font-size: 1.05rem;
    font-weight: 600;
    color: var(--text);
    margin-top: 1.25rem;
    margin-bottom: 0.5rem;
    border-bottom: none;
}

.lecture .markdown h3 {
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--text);
    margin-top: 1rem;
    margin-bottom: 0.35rem;
}

.lecture .markdown > p:first-child {
    margin-top: 0;
}

.lecture p {
    margin-bottom: 0.5rem;
    color: var(--text-light);
}

.lecture .markdown p {
    color: var(--text);
}

.lecture .markdown li {
    color: var(--text);
    max-width: 65ch;
}

.lecture .markdown ul {
    margin-top: 0.25rem;
    margin-bottom: 1rem;
}

.lecture li {
    margin-bottom: 0.35rem;
}

/* Footer */
footer {
    background: var(--bg-alt);
    border-top: 1px solid var(--border);
    padding: 1.5rem 0;
    text-align: center;
    color: var(--text-light);
    font-size: 0.9rem;
}

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

    table {
        display: block;
        overflow-x: auto;
    }

    nav .container {
        justify-content: center;
    }
}
