/* ===== NEOBRUTALISM DARK THEME ===== */
:root {
    /* Neobrutalism palette */
    --bg: #141514;
    --black: #000000;
    --green: #4ADE80;
    --green-mid: #22C55E;
    --green-dark: #15803D;
    --green-light: #1a331a;
    --surface: #1E201E;
    --surface-2: #262826;

    /* Hard offset shadows. Green is the signature accent; on the dark background these read
       as crisp, branded offsets (a plain black shadow would be invisible on near-black). */
    --shadow-sm: 2px 2px 0 var(--green-mid);
    --shadow: 4px 4px 0 var(--green-mid);
    --shadow-lg: 6px 6px 0 var(--green-mid);
    /* For green-filled boxes (section titles, hero): a darker-green offset stays visible
       behind the bright green fill. */
    --shadow-box: 5px 5px 0 var(--green-dark);

    /* Aliases referenced by the JS demo files and a few older rules. */
    --accent-green: var(--green);
    --border-color: #5a5a5a;
    --card-bg: var(--surface);
    --text-color: #E6E6E6;
    --muted-text: #9c9c9c;
    --heading-color: #FFFFFF;
}

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

html {
    scroll-behavior: smooth;
    /* Offset anchor jumps so section titles don't land under the fixed navbar. */
    scroll-padding-top: calc(var(--navbar-height, 80px) + 1rem);
}

body {
    background: var(--bg);
    font-family: 'Consolas', 'Lucida Console', 'Courier New', monospace;
    color: var(--text-color);
    line-height: 1.75;
    overflow-x: hidden;
}

/* ===== NAVBAR ===== */
.navbar {
    position: fixed;
    top: 0;
    width: 100%;
    background: var(--green);
    border-bottom: 3px solid var(--black);
    z-index: 1000;
    padding: 0.6rem 0;
    font-family: 'Titillium Web', 'Helvetica Neue', Arial, sans-serif;
}

.nav-inner {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 1.5rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    flex-wrap: wrap;
}

.nav-links {
    display: flex;
    gap: 0.25rem;
    flex-wrap: wrap;
}

.nav-links a {
    color: var(--black);
    text-decoration: none;
    font-weight: 700;
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    padding: 0.35rem 0.75rem;
    border: 2px solid transparent;
    transition: background 0.1s, border-color 0.1s, color 0.1s;
    font-family: 'Titillium Web', 'Helvetica Neue', Arial, sans-serif;
}

.nav-links a:hover {
    background: rgba(0, 0, 0, 0.18);
    border-color: var(--black);
}

.nav-links a.active {
    background: var(--black);
    color: var(--green);
    border-color: var(--black);
}

/* Download CV: a raised CTA, deliberately distinct from the flat section links. */
.download-cv {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    background: var(--black);
    color: var(--green);
    border: 2px solid var(--black);
    box-shadow: 3px 3px 0 rgba(0, 0, 0, 0.35);
    padding: 0.4rem 0.9rem;
    font-weight: 800;
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    text-decoration: none;
    transition: transform 0.1s, box-shadow 0.1s;
    font-family: 'Titillium Web', 'Helvetica Neue', Arial, sans-serif;
}

.download-cv:hover {
    transform: translate(-2px, -2px);
    box-shadow: 5px 5px 0 rgba(0, 0, 0, 0.35);
}

.download-cv:active {
    transform: translate(1px, 1px);
    box-shadow: 1px 1px 0 rgba(0, 0, 0, 0.35);
}

.cv-icon {
    display: block;
    flex-shrink: 0;
}

/* ===== CONTAINER ===== */
.container {
    max-width: 1100px;
    margin: 0 auto;
    padding: var(--navbar-height, 80px) 1.5rem 4rem;
}

/* ===== SECTIONS ===== */
.section {
    padding: 5rem 0;
    border-bottom: 3px solid var(--border-color);
}

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

.section h2 {
    color: var(--black);
    margin-bottom: 2.5rem;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: -0.01em;
    display: inline-block;
    background: var(--green);
    border: 3px solid var(--black);
    box-shadow: var(--shadow-box);
    padding: 0.35rem 1rem;
    font-family: 'Titillium Web', 'Helvetica Neue', Arial, sans-serif;
}

.section-subtitle {
    color: var(--muted-text);
    font-size: 0.9rem;
    font-weight: 600;
    margin-top: -1rem;
    margin-bottom: 2rem;
    font-family: Consolas, 'Courier New', monospace;
    background: var(--green-light);
    border: 2px solid var(--border-color);
    padding: 0.35rem 0.75rem;
    text-align: center;
}
/* ===== HERO ===== */
.hero-section {
    text-align: center;
    padding: 6rem 0 5rem;
    border-bottom: 3px solid var(--border-color);
}

.hero-title {
    font-size: clamp(3rem, 8vw, 6rem);
    font-weight: 900;
    color: var(--black);
    text-transform: uppercase;
    letter-spacing: -0.03em;
    line-height: 1;
    margin-bottom: 2rem;
    display: inline-block;
    background: var(--green);
    border: 3px solid var(--black);
    box-shadow: var(--shadow-box);
    padding: 0.5rem 1.5rem;
    font-family: 'Titillium Web', 'Helvetica Neue', Arial, sans-serif;
}

.hero-subtitle {
    font-size: 1.1rem;
    color: var(--heading-color);
    font-weight: 700;
    margin-bottom: 2rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    font-family: 'Titillium Web', 'Helvetica Neue', Arial, sans-serif;
}

.hero-description {
    font-size: 1.05rem;
    max-width: 700px;
    margin: 0 auto;
    color: var(--text-color);
    background: var(--green-light);
    border: 2px solid var(--border-color);
    box-shadow: var(--shadow);
    padding: 1rem 1.5rem;
    line-height: 1.8;
}

.opportunities-link {
    color: inherit;
    text-decoration: none;
    cursor: pointer;
}

/* ===== CARDS ===== */
.card {
    background: var(--surface);
    border: 3px solid var(--border-color);
    box-shadow: var(--shadow);
    padding: 2rem;
    margin-bottom: 2rem;
    transition: transform 0.1s, box-shadow 0.1s;
}

.card:hover {
    transform: translate(-2px, -2px);
    box-shadow: var(--shadow-lg);
}

.card-header {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    gap: 1rem;
    margin-bottom: 0.4rem;
    flex-wrap: wrap;
}

.card-header h3 {
    margin-bottom: 0;
}

.course-label {
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--black);
    background: var(--green);
    border: 2px solid var(--black);
    padding: 0.15rem 0.5rem;
    white-space: nowrap;
    flex-shrink: 0;
    font-family: 'Titillium Web', 'Helvetica Neue', Arial, sans-serif;
}

.card h3 {
    color: var(--heading-color);
    margin-bottom: 0.4rem;
    font-size: 1.25rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.01em;
    font-family: 'Titillium Web', 'Helvetica Neue', Arial, sans-serif;
}

.card p {
    margin-bottom: 0.75rem;
    color: var(--text-color);
    line-height: 1.8;
}

.bullet-item {
    display: block;
    margin-bottom: 0.5rem;
    line-height: 1.8;
}

.card p .present {
    color: var(--green-mid);
    font-weight: 700;
}

.card p .time {
    font-style: italic;
}

/* ===== TAGS ===== */
.tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: 0.75rem;
}

.tag {
    background: var(--green-light);
    color: var(--text-color);
    padding: 0.2rem 0.6rem;
    font-size: 0.8rem;
    font-weight: 700;
    border: 2px solid var(--border-color);
    box-shadow: var(--shadow-sm);
    text-transform: uppercase;
    letter-spacing: 0.03em;
    font-family: 'Titillium Web', 'Helvetica Neue', Arial, sans-serif;
}

.tag.link {
    text-decoration: none;
    background: var(--green);
    color: var(--black);
    border-color: var(--black);
    transition: transform 0.1s, box-shadow 0.1s;
}

.tag.link:hover {
    transform: translate(-1px, -1px);
    box-shadow: 3px 3px 0 var(--green-mid);
}

/* ===== BUTTONS ===== */
.btn {
    background: var(--green);
    color: var(--black);
    border: 2px solid var(--black);
    box-shadow: var(--shadow-sm);
    padding: 0.5rem 1.25rem;
    font-weight: 700;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    cursor: pointer;
    text-decoration: none;
    display: inline-block;
    transition: transform 0.1s, box-shadow 0.1s;
    font-family: 'Titillium Web', 'Helvetica Neue', Arial, sans-serif;
}

.btn:hover {
    transform: translate(-2px, -2px);
    box-shadow: 4px 4px 0 var(--green-mid);
}

.btn:active {
    transform: translate(1px, 1px);
    box-shadow: 1px 1px 0 var(--green-mid);
}

.btn:disabled {
    background: #444;
    cursor: not-allowed;
    transform: none;
    box-shadow: var(--shadow-sm);
}

/* ===== INTERACTIVE SECTION ===== */
.interactive-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(420px, 100%), 1fr));
    gap: 2.5rem;
}

.interactive-card {
    background: var(--surface);
    border: 3px solid var(--border-color);
    box-shadow: var(--shadow);
    padding: 2rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    margin-bottom: 0;
}

.interactive-card-wide {
    grid-column: 1 / -1;
}

/* ===== MNIST ===== */
.mnist-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1.25rem;
    margin: 1.25rem 0;
    width: 100%;
}

.mnist-input-area {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.75rem;
}

.mnist-canvas {
    border: 3px solid var(--black);
    box-shadow: var(--shadow);
    background: white;
    cursor: crosshair;
    touch-action: none;
}

.mnist-controls {
    display: flex;
    gap: 0.75rem;
}

.mnist-status {
    color: var(--muted-text);
    font-size: 0.85rem;
    font-weight: 600;
    margin-bottom: 0.75rem;
    background: var(--green-light);
    border: 2px solid var(--border-color);
    padding: 0.25rem 0.75rem;
    width: 100%;
    text-align: center;
}

/* ===== SENTIMENT ===== */
.sentiment-container {
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    gap: 2rem;
    margin: 1.25rem 0;
    width: 100%;
}

.sentiment-input-area {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.75rem;
    flex: 1;
    min-width: 260px;
    max-width: 460px;
}

.sentiment-textarea {
    width: 100%;
    background: var(--surface);
    color: var(--text-color);
    border: 3px solid var(--border-color);
    box-shadow: var(--shadow-sm);
    padding: 0.75rem;
    font-family: inherit;
    font-size: 0.95rem;
    resize: vertical;
}

.sentiment-textarea:focus {
    outline: none;
    box-shadow: 4px 4px 0 var(--green-mid);
}

.sentiment-controls {
    display: flex;
    gap: 0.75rem;
}

.sentiment-status {
    color: var(--muted-text);
    font-size: 0.85rem;
    font-weight: 600;
    margin-bottom: 0.75rem;
    background: var(--green-light);
    border: 2px solid var(--border-color);
    padding: 0.25rem 0.75rem;
    width: 100%;
    text-align: center;
}

.sentiment-result-section {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    min-width: 180px;
}

.sentiment-score {
    text-align: center;
    background: var(--green-light);
    border: 3px solid var(--green-mid);
    box-shadow: var(--shadow);
    padding: 1rem 1.5rem;
    min-width: 160px;
    color: var(--heading-color);
    font-weight: 700;
}

#score-value {
    font-size: 2.5rem;
    font-weight: 900;
    margin: 0.4rem 0;
}

#score-description {
    font-size: 1rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

/* ===== CONTACT ===== */
.contact-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(250px, 100%), 1fr));
    gap: 2rem;
}

.contact-card {
    text-align: center;
    background: var(--green-light);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
}

.contact-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 64px;
    height: 64px;
    margin-bottom: 0.75rem;
    color: var(--black);
    background: var(--green);
    border: 3px solid var(--black);
    box-shadow: var(--shadow-sm);
}

.contact-card h3 {
    margin-bottom: 0.25rem;
}

.contact-card p {
    margin-bottom: 0;
}

.contact-card .btn {
    margin-top: 1rem;
    background: var(--black);
    color: var(--green);
}

.contact-card .btn:hover {
    background: var(--green-mid);
    color: var(--black);
}

.small-text {
    font-size: 0.92rem;
    line-height: 1.6;
    color: var(--text-color);
    font-weight: 500;
    text-align: left;
    /* Push the explainer to the bottom so cards of different heights line up. */
    margin-top: auto;
    padding: 1rem 1.1rem;
    background: var(--surface-2);
    border: 2px solid var(--border-color);
    border-left: 5px solid var(--green);
    box-shadow: var(--shadow-sm);
    width: 100%;
}

/* "How it works" cue above the explainer body. */
.small-text::before {
    content: "How it works";
    display: block;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--green);
    margin-bottom: 0.4rem;
}

/* ===== KEYPAD (MNIST predictions) ===== */
.keypad-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 5px;
    width: 280px;
}

.keypad-btn {
    background: var(--surface);
    border: 2px solid var(--border-color);
    box-shadow: var(--shadow-sm);
    padding: 4px 2px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    transition: background 0.2s;
}

.keypad-digit {
    font-size: 1.1rem;
    font-weight: 900;
    line-height: 1.2;
}

.keypad-prob {
    font-size: 0.65rem;
    font-weight: 700;
    color: var(--muted-text);
}

.keypad-empty {
    visibility: hidden;
}

.mnist-prediction {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    width: 100%;
    max-width: 280px;
}

/* ===== LLM PLAYGROUND ===== */
.llm-load-area {
    margin-bottom: 1rem;
    width: 100%;
}

.llm-load-row {
    display: flex;
    align-items: center;
    gap: 1rem;
    flex-wrap: wrap;
}

.llm-status {
    color: var(--muted-text);
    font-size: 0.85rem;
    font-weight: 600;
    background: var(--green-light);
    border: 2px solid var(--border-color);
    padding: 0.25rem 0.75rem;
    text-align: center;
}

.llm-progress {
    margin-top: 0.75rem;
    width: 100%;
}

.llm-progress-track {
    width: 100%;
    height: 6px;
    background: var(--surface);
    border: 2px solid var(--border-color);
}

.llm-progress-bar {
    height: 100%;
    width: 0%;
    background: var(--accent-green);
    transition: width 0.2s ease;
}

.llm-progress-text {
    display: none;
}

/* Question area */
.llm-question-area {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    width: 100%;
}

.llm-label {
    font-family: 'Titillium Web', 'Helvetica Neue', Arial, sans-serif;
    font-weight: 700;
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--green-mid);
}

.llm-opt-label {
    min-width: 24px;
    font-size: 1rem;
}

.llm-options-grid {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.llm-option-row {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.llm-option-row.llm-option-fixed {
    color: var(--muted-text);
}

.llm-option {
    flex: 1;
    background: var(--surface);
    color: var(--text-color);
    border: 2px solid var(--border-color);
    padding: 0.45rem 0.65rem;
    font-family: Consolas, 'Courier New', monospace;
    font-size: 0.85rem;
}

.llm-option:focus {
    outline: none;
    border-color: var(--accent-green);
    box-shadow: 3px 3px 0 var(--green-mid);
}

.llm-option-text {
    font-family: Consolas, 'Courier New', monospace;
    font-size: 0.85rem;
    color: var(--muted-text);
}

.llm-textarea {
    width: 100%;
    background: var(--surface);
    color: var(--text-color);
    border: 2px solid var(--border-color);
    padding: 0.45rem 0.65rem;
    font-family: Consolas, 'Courier New', monospace;
    font-size: 0.85rem;
    resize: vertical;
}

.llm-textarea:focus {
    outline: none;
    border-color: var(--accent-green);
    box-shadow: 3px 3px 0 var(--green-mid);
}

.llm-instruction {
    font-family: 'Titillium Web', 'Helvetica Neue', Arial, sans-serif;
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--muted-text);
    background: var(--green-light);
    border: 2px solid var(--border-color);
    padding: 0.35rem 0.75rem;
    text-align: center;
}

.llm-action-row {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.btn-secondary {
    background: var(--card-bg);
    color: var(--muted-text);
    border-color: var(--muted-text);
}

.btn-secondary:hover {
    background: var(--surface);
    color: var(--text-color);
    border-color: var(--text-color);
}

/* Results */
.llm-results {
    margin-top: 1.75rem;
    padding-top: 1.25rem;
    border-top: 1px solid var(--border-color);
    width: 100%;
}

.llm-results-bar-chart {
    display: flex;
    justify-content: space-around;
    align-items: flex-end;
    gap: 1.5rem;
    height: 160px;
    padding: 0.75rem 0;
}

.llm-bar-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    flex: 1;
    max-width: 70px;
}

.llm-bar-track {
    width: 100%;
    height: 110px;
    background: var(--surface);
    border: 2px solid var(--border-color);
    position: relative;
}

.llm-bar-fill {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: var(--accent-green);
    opacity: 0.30;
    transition: height 0.5s ease, opacity 0.3s ease;
}

.llm-bar-fill.predicted {
    opacity: 1;
    background: var(--accent-green);
}

.llm-bar-label {
    margin-top: 4px;
    font-family: 'Titillium Web', 'Helvetica Neue', Arial, sans-serif;
    font-weight: 900;
    font-size: 1.1rem;
    color: var(--heading-color);
}

.llm-bar-pct {
    font-family: Consolas, 'Courier New', monospace;
    font-size: 0.7rem;
    font-weight: 700;
    color: var(--muted-text);
    margin-top: 2px;
}

.llm-prediction {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.35rem;
    margin-top: 0.5rem;
    padding: 0.5rem 0.75rem;
    background: var(--green-light);
    border: 2px solid var(--border-color);
    font-size: 0.95rem;
    font-weight: 700;
}

.llm-predicted-label {
    color: var(--muted-text);
    font-family: 'Titillium Web', 'Helvetica Neue', Arial, sans-serif;
}

.llm-predicted-letter {
    color: var(--accent-green);
    font-family: Consolas, 'Courier New', monospace;
    font-weight: 900;
    font-size: 1.3rem;
}

.llm-predicted-conf {
    color: var(--muted-text);
    font-size: 0.8rem;
}

/* ===== TEXT UTILITY CLASSES ===== */
.hl {
    color: var(--green-mid);
    font-weight: 700;
}

.em {
    font-style: italic;
    font-weight: 600;
    color: var(--heading-color);
}

/* ===== LLM DELIVERY AGENT (MINI-THESIS) ===== */
.thesis-game-area {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
    margin: 1rem 0;
    width: 100%;
}

.thesis-legend {
    display: flex;
    gap: 1.5rem;
    flex-wrap: wrap;
    font-family: 'Titillium Web', 'Helvetica Neue', Arial, sans-serif;
    font-size: 0.8rem;
    font-weight: 700;
    color: var(--muted-text);
    text-transform: uppercase;
    letter-spacing: 0.03em;
    background: var(--green-light);
    border: 2px solid var(--border-color);
    padding: 0.4rem 1rem;
}

.thesis-legend span {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
}

.thesis-agent-legend {
    color: var(--accent-green);
    font-size: 1.1rem;
}

.thesis-parcel-legend {
    color: var(--accent-green);
    font-size: 1.1rem;
}

.thesis-delivery-legend {
    display: inline-block;
    width: 14px;
    height: 14px;
    background: var(--green-light);
    border: 2px solid var(--green-mid);
}

.thesis-grid {
    display: grid;
    grid-template-columns: repeat(5, 60px);
    grid-template-rows: repeat(5, 60px);
    gap: 3px;
    background: var(--border-color);
    border: 3px solid var(--border-color);
    box-shadow: var(--shadow);
}

.thesis-cell {
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--surface);
    position: relative;
    font-size: 1.4rem;
    user-select: none;
}

.thesis-cell.delivery {
    background: var(--green-light);
    border: 2px solid var(--green-mid);
}

.thesis-cell.clickable {
    cursor: pointer;
    transition: background 0.1s;
}

.thesis-cell.clickable:hover {
    background: var(--surface-2);
}

.thesis-agent {
    color: var(--accent-green);
    font-size: 1.5rem;
    line-height: 1;
    z-index: 2;
}

.thesis-parcel {
    color: var(--accent-green);
    font-size: 1.2rem;
    line-height: 1;
    position: absolute;
    top: 2px;
    right: 2px;
    z-index: 1;
}

.thesis-uncertainty {
    position: absolute;
    bottom: 1px;
    left: 2px;
    font-family: Consolas, 'Courier New', monospace;
    font-size: 0.55rem;
    font-weight: 700;
    color: var(--muted-text);
    background: rgba(0, 0, 0, 0.55);
    padding: 0 2px;
    z-index: 3;
    cursor: pointer;
    white-space: nowrap;
}

.thesis-controls {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.thesis-dist {
    background: var(--surface-2);
    border: 2px solid var(--border-color);
    padding: 0.6rem 0.9rem;
    font-family: Consolas, 'Courier New', monospace;
    font-size: 0.8rem;
    color: var(--text-color);
    line-height: 1.6;
    text-align: left;
    max-width: 320px;
}

.thesis-dist strong {
    color: var(--accent-green);
}

.thesis-dist-section {
    margin-bottom: 0.5rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid var(--border-color);
}

.thesis-dist-section:last-child {
    margin-bottom: 0;
    padding-bottom: 0;
    border-bottom: none;
}

/* ===== RESPONSIVE ===== */
@media (max-width: 768px) {
    .hero-title {
        font-size: 2.8rem;
    }

    .section {
        padding: 3.5rem 0;
    }

    /* Stack the navbar: section links centered on top, CV button centered below. */
    .nav-inner {
        justify-content: center;
        gap: 0.6rem;
        padding: 0 1rem;
    }

    .nav-links {
        justify-content: center;
        gap: 0.1rem;
    }

    .nav-links a {
        font-size: 0.75rem;
        padding: 0.3rem 0.5rem;
        letter-spacing: 0.03em;
    }

    .container {
        padding-top: var(--navbar-height, 100px);
    }

    .interactive-grid {
        grid-template-columns: 1fr;
    }

    /* Let long course labels wrap instead of overflowing the card / screen. */
    .card-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }

    .course-label {
        white-space: normal;
        align-self: flex-start;
    }
}
