/*
 * Style matching vanderbei.princeton.edu
 * Dark academic theme with orange accents
 */

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

body {
    background-color: rgba(11, 21, 31, 0.98);
    color: #e6edf6;
    font-family: "Lucida Grande", Arial, Helvetica, sans-serif;
    font-size: 11pt;
    line-height: 1.6;
    min-height: 100vh;
}

/* Container */
.container {
    max-width: 1140px;
    margin: 0 auto;
    padding: 20px 16px;
}

/* Header */
header {
    background: linear-gradient(180deg, rgba(225,115,5,0.82) 0%, rgba(145,75,5,0.82) 100%);
}

header .container {
    display: flex;
    align-items: center;
    gap: 16px;
}

header h1 {
    color: #fff;
    font-size: 1.8em;
    font-weight: 500;
    margin: 0;
}

header h1 a {
    color: #fff;
    text-decoration: none;
}

header h1 a:hover {
    color: #e6edf6;
}

.github-badge {
    margin-left: auto;
    color: #fff;
    opacity: 0.8;
    transition: opacity 0.25s ease;
}

.github-badge:hover {
    opacity: 1;
}

/* Navigation */
nav {
    margin-left: auto;
}

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

nav a {
    color: #fff;
    text-decoration: none;
    font-family: Verdana, sans-serif;
    font-size: 12px;
    font-weight: 600;
    padding: 8px 12px;
    border-radius: 4px;
    transition: background-color 0.25s ease;
}

nav a:hover {
    background-color: rgba(255, 255, 255, 0.15);
}

/* Main Content */
main {
    padding-bottom: 40px;
}

/* Section Headers */
h1 {
    color: #fff;
    font-size: 1.8em;
    font-weight: 500;
    margin-bottom: 20px;
}

h1 a,
h1 a:visited {
    color: #fff;
}

h1 a:hover {
    color: #e6edf6;
}

h2 {
    color: #e6edf6;
    font-size: 1.4em;
    font-weight: 500;
    margin: 30px 0 15px 0;
    border-bottom: 1px solid #22314d;
    padding-bottom: 8px;
}

h3 {
    color: #9fb0ca;
    font-size: 1.1em;
    font-weight: 600;
    margin: 20px 0 10px 0;
}

/* Paragraphs */
p {
    color: #bbb;
    margin-bottom: 15px;
}

/* Lists */
ul {
    color: #bbb;
    margin-bottom: 15px;
    padding-left: 1.2em;
    list-style-position: outside;
}

li {
    margin-bottom: 4px;
}

/* Links */
a {
    color: #ffaa55;
    text-decoration: none;
    transition: color 0.25s ease;
}

a:hover {
    color: #00ff00;
}

a:visited {
    color: #ffaa55;
}

a:active {
    color: #552200;
}

/* Tables */
table {
    width: 100%;
    border-collapse: collapse;
    margin: 20px 0;
    background-color: #0f172a;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0,0,0,.45);
}

thead {
    background: linear-gradient(180deg, rgba(225,115,5,0.6) 0%, rgba(145,75,5,0.6) 100%);
}

th {
    color: #fff;
    font-weight: 600;
    text-align: left;
    padding: 12px 16px;
    font-size: 0.9em;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

td {
    padding: 12px 16px;
    border-bottom: 1px solid #22314d;
    color: #e6edf6;
}

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

tr:hover {
    background-color: rgba(255, 170, 85, 0.08);
}

/* Anchor offset for deep links */
td[id], a[id] {
    scroll-margin-top: 20px;
}

/* Code/Directory styling */
code {
    background-color: #222222;
    color: #9fb0ca;
    padding: 2px 6px;
    border-radius: 4px;
    font-family: "SF Mono", Monaco, "Courier New", monospace;
    font-size: 0.9em;
}

/* Muted text for notes */
.muted, em {
    color: #9fb0ca;
    font-style: italic;
}

/* GitHub link styling */
a[href*="github.com"]:not(.github-badge) {
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

a[href*="github.com"]:not(.github-badge):hover {
    color: #00ff00;
}

a[href*="github.com"]:not(.github-badge)::before {
    content: "";
    display: inline-block;
    width: 16px;
    height: 16px;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%23ffaa55'%3E%3Cpath d='M12 0c-6.626 0-12 5.373-12 12 0 5.302 3.438 9.8 8.207 11.387.599.111.793-.261.793-.577v-2.234c-3.338.726-4.033-1.416-4.033-1.416-.546-1.387-1.333-1.756-1.333-1.756-1.089-.745.083-.729.083-.729 1.205.084 1.839 1.237 1.839 1.237 1.07 1.834 2.807 1.304 3.492.997.107-.775.418-1.305.762-1.604-2.665-.305-5.467-1.334-5.467-5.931 0-1.311.469-2.381 1.236-3.221-.124-.303-.535-1.524.117-3.176 0 0 1.008-.322 3.301 1.23.957-.266 1.983-.399 3.003-.404 1.02.005 2.047.138 3.006.404 2.291-1.552 3.297-1.23 3.297-1.23.653 1.653.242 2.874.118 3.176.77.84 1.235 1.911 1.235 3.221 0 4.609-2.807 5.624-5.479 5.921.43.372.823 1.102.823 2.222v3.293c0 .319.192.694.801.576 4.765-1.589 8.199-6.086 8.199-11.386 0-6.627-5.373-12-12-12z'/%3E%3C/svg%3E");
    background-size: contain;
    background-repeat: no-repeat;
}

/* Footer */
footer {
    background-color: #0f172a;
    border-top: 1px solid #22314d;
    padding: 20px 0;
    margin-top: 40px;
}

footer .container {
    text-align: center;
    color: #9fb0ca;
    font-size: 0.9em;
}

footer a {
    color: #ffaa55;
}

/* Responsive */
@media (max-width: 800px) {
    header .container {
        flex-direction: column;
        text-align: center;
    }

    nav {
        margin-left: 0;
        margin-top: 15px;
    }

    nav ul {
        flex-wrap: wrap;
        justify-content: center;
    }

    table {
        font-size: 0.85em;
    }

    th, td {
        padding: 8px 10px;
    }

    .hide-mobile {
        display: none;
    }
}
