:root {
    --bg: #111111;
    --text-main: #e0e0e0;
    --text-muted: #888888;
    --accent: #d2541d;
    --border: #2a2a2a;
    --bg-offset: #181818;
    
    --font-head: 'Zilla Slab', serif;
    --font-body: 'IBM Plex Sans', sans-serif;
    --font-mono: 'IBM Plex Mono', monospace;
}

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

body {
    background-color: var(--bg);
    color: var(--text-main);
    font-family: var(--font-body);
    font-size: 1.1rem;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

/* Widescreen Layout Base */
.layout-wrapper {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

.sidebar {
    padding: 3rem 2rem;
    background-color: var(--bg);
    z-index: 10;
}

.content {
    padding: 2rem 2rem 4rem 2rem;
    flex: 1;
}

/* Sidebar Elements */
h1 {
    font-family: var(--font-head);
    font-weight: 500;
    font-size: 2.5rem;
    color: var(--text-main);
    line-height: 1.2;
    margin-bottom: 0.5rem;
    cursor: default;
    display: inline-block;
}

.tagline {
    color: var(--text-muted);
    font-size: 1rem;
    margin-bottom: 2rem;
    line-height: 1.5;
}

/* Mobile Sticky Nav */
.nav-container {
    position: sticky;
    top: 0;
    background-color: var(--bg);
    padding: 1rem 0;
    border-top: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
    margin: 0 -2rem;
    padding: 1rem 2rem;
    z-index: 20;
}

.nav-group {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
}

.sidebar-bottom {
    display: none; /* Hide bottom dir on mobile to save space */
}

.nav-label {
    display: none; /* Hide label on mobile inline row */
}

.nav-link {
    font-family: var(--font-mono);
    font-size: 0.85rem;
    color: var(--text-muted);
    text-decoration: none;
    transition: color 0.2s ease;
    position: relative;
}

.nav-link:hover {
    color: var(--text-main);
}

.nav-link.active {
    color: var(--accent);
}

/* Blinking Cursor for active nav state */
.nav-link.active::after {
    content: "_";
    position: absolute;
    right: -10px;
    animation: blink 1s step-start infinite;
}

@keyframes blink {
    50% { opacity: 0; }
}

.nav-link.disabled {
    opacity: 0.4;
    pointer-events: none;
}

/* Content Elements */
.content-inner {
    max-width: 700px;
}

section {
    padding: 0 0 4rem 0;
    scroll-margin-top: 6rem;
}

.section-label {
    font-family: var(--font-mono);
    font-size: 0.85rem;
    color: var(--accent);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 1rem;
    display: block;
}

h2 {
    font-family: var(--font-head);
    font-weight: 400;
    font-size: 2rem;
    margin-bottom: 1.5rem;
    color: var(--text-main);
}

h3 {
    font-family: var(--font-body);
    font-weight: 500;
    font-size: 1.1rem;
    margin: 2rem 0 0.5rem 0;
    color: var(--text-main);
}

p {
    margin-bottom: 1.25rem;
    color: var(--text-muted);
}

p:last-child {
    margin-bottom: 0;
}

/* Lists */
ul {
    list-style: none;
    margin-bottom: 1.5rem;
}

.bullet-list li {
    color: var(--text-muted);
    margin-bottom: 0.5rem;
    padding-left: 1rem;
    position: relative;
}

.bullet-list li::before {
    content: "";
    position: absolute;
    left: 0;
    top: 0.6rem;
    width: 4px;
    height: 4px;
    background-color: var(--accent);
}

.bullet-list strong {
    color: var(--text-main);
    font-weight: 500;
}

/* Links */
.content a {
    color: var(--text-main);
    text-decoration: none;
    border-bottom: 1px solid var(--border);
    transition: border-color 0.2s ease, color 0.2s ease;
}

.content a:hover {
    color: var(--accent);
    border-bottom-color: var(--accent);
}

/* Course List */
.course-list li {
    margin-bottom: 1.25rem;
}
.course-code {
    font-family: var(--font-mono);
    color: var(--accent);
    font-size: 0.85rem;
    display: block;
    margin-bottom: 0.1rem;
}
.course-name {
    color: var(--text-main);
    font-weight: 500;
    display: block;
}
.course-desc {
    color: var(--text-muted);
    font-size: 0.95rem;
    display: block;
}

/* Tags for Toolbox */
.tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.tag {
    font-family: var(--font-mono);
    font-size: 0.75rem;
    padding: 0.3rem 0.7rem;
    background-color: var(--bg-offset);
    color: var(--text-muted);
    border: 1px solid var(--border);
    transition: all 0.2s ease;
    cursor: default;
    user-select: none;
}

.tag:hover {
    border-color: var(--accent);
    color: var(--text-main);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.2);
}

.tag:active {
    transform: translateY(0);
}

/* Project Cards */
.project-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.project {
    padding: 1.5rem;
    border: 1px solid var(--border);
    transition: border-color 0.2s ease, transform 0.2s ease, background-color 0.2s ease;
    position: relative;
    background-color: var(--bg);
}

.project:hover {
    border-color: var(--accent);
    transform: translateX(4px);
    background-color: var(--bg-offset);
}

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

.project-title {
    font-family: var(--font-head);
    font-size: 1.3rem;
    color: var(--text-main);
    margin: 0;
}

.project-title a {
    border-bottom: none;
    position: relative;
}

.project-title a::before {
    content: ">_ ";
    color: var(--accent);
    font-family: var(--font-mono);
    font-size: 1rem;
    opacity: 0;
    position: absolute;
    left: -1.5rem;
    transition: opacity 0.2s ease;
}

.project:hover .project-title a::before {
    opacity: 1;
}

.project-status {
    font-family: var(--font-mono);
    font-size: 0.75rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    flex-shrink: 0;
}

.project-desc {
    font-size: 0.95rem;
    margin-bottom: 1rem;
    color: var(--text-muted);
}

/* Empty State */
.empty-state {
    font-family: var(--font-mono);
    font-size: 0.85rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    padding: 2rem 0;
    border-top: 1px dashed var(--border);
    border-bottom: 1px dashed var(--border);
    position: relative;
    overflow: hidden;
}

.empty-state::before {
    content: "";
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background: repeating-linear-gradient(
        45deg,
        transparent,
        transparent 10px,
        rgba(42, 42, 42, 0.2) 10px,
        rgba(42, 42, 42, 0.2) 20px
    );
    z-index: -1;
}

/* Inline Lists */
.inline-list {
    display: flex;
    gap: 1.5rem;
}

footer {
    padding: 2rem 0 4rem 0;
    border-top: 1px solid var(--border);
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.9rem;
    color: var(--text-muted);
}

.version-tag {
    font-family: var(--font-mono);
    font-size: 0.75rem;
    color: var(--accent);
    margin-left: 0.5rem;
    cursor: crosshair;
}

/* Desktop Layout Override */
@media (min-width: 1024px) {
    .layout-wrapper {
        flex-direction: row;
    }

    .sidebar {
        width: 320px;
        height: 100vh;
        position: fixed;
        top: 0;
        left: 0;
        border-bottom: none;
        border-right: 1px solid var(--border);
        overflow-y: auto;
        display: flex;
        flex-direction: column;
    }

    .nav-container {
        position: static;
        padding: 0;
        border: none;
        margin: 0;
        display: flex;
        flex-direction: column;
        flex: 1;
    }

    .nav-group {
        flex-direction: column;
        gap: 0.75rem;
        margin-bottom: 2.5rem;
    }

    .sidebar-bottom {
        display: flex;
        margin-top: auto;
        margin-bottom: 0;
        padding-top: 2rem;
    }

    .nav-label {
        display: block;
        margin-bottom: 0.25rem;
    }

    .content {
        margin-left: 320px;
        padding: 5rem;
    }

    section {
        display: grid;
        grid-template-columns: 100px 1fr;
        gap: 2rem;
        padding: 0 0 6rem 0;
        scroll-margin-top: 4rem;
    }

    .section-label {
        margin-bottom: 0;
        margin-top: 0.4rem;
    }

    .section-body {
        max-width: 600px;
    }
}