:root {
    /* Color Palette */
    --primary-bg: #f8f9fa;
    --sidebar-bg: #1a1b26;
    --sidebar-text: #a9b1d6;
    --sidebar-hover: #dccae4;
    /* Lavender Hover (Middle Ground) */
    --accent-color: #583f99;
    /* Purple Accent (Middle Ground) */
    --text-primary: #1a1b26;
    --text-secondary: #565f89;
    --card-bg: #ffffff;
    --border-color: #e0e0e0;
    --gradient-start: #583f99;
    /* Purple Gradient (Middle Ground) */
    --gradient-end: #1a1b26;

    /* Spacing */
    --sidebar-width: 280px;
    --header-height: 60px;
}

* {
    box-sizing: border-box;
}

body {
    font-family: 'Inter', sans-serif;
    line-height: 1.6;
    color: var(--text-primary);
    background-color: var(--primary-bg);
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
}

h1,
h2,
h3,
h4 {
    font-family: 'Merriweather', serif;
    color: var(--text-primary);
    margin-top: 0;
}

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

a:hover {
    color: #2ac3de;
}

/* Layout */
.app-container {
    display: flex;
    min-height: 100vh;
}

/* Sidebar */
.sidebar {
    width: var(--sidebar-width);
    background-color: var(--sidebar-bg);
    color: var(--sidebar-text);
    position: fixed;
    height: 100vh;
    left: 0;
    top: 0;
    display: flex;
    flex-direction: column;
    padding: 2rem;
    overflow-y: auto;
    z-index: 1000;
    transition: transform 0.3s ease;
}

.sidebar-header {
    display: flex;
    align-items: center;
    margin-bottom: 3rem;
}

.sidebar-logo {
    width: 40px;
    margin-right: 1rem;
}

.sidebar-header h1 {
    font-family: 'Inter', sans-serif;
    font-size: 1.2rem;
    font-weight: 700;
    color: #fff;
    margin: 0;
}

.sidebar nav {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.nav-link {
    color: var(--sidebar-text);
    padding: 0.75rem 1rem;
    border-radius: 8px;
    font-size: 0.95rem;
    transition: all 0.2s;
}

.nav-link:hover {
    background-color: rgba(255, 255, 255, 0.05);
    color: var(--sidebar-hover);
    transform: translateX(5px);
}

.nav-link.active {
    background-color: rgba(255, 255, 255, 0.1);
    color: var(--sidebar-hover);
    border-left: 3px solid var(--sidebar-hover);
    padding-left: calc(1rem - 3px);
    /* Compensate for border */
}

.sidebar-footer {
    margin-top: 2rem;
    font-size: 0.8rem;
    opacity: 0.5;
}

/* Main Content */
.main-content {
    flex: 1;
    margin-left: var(--sidebar-width);
    padding: 3rem 4rem;
    max-width: 1200px;
}

/* Mobile Header */
.mobile-header {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: var(--header-height);
    background-color: var(--sidebar-bg);
    padding: 0 1.5rem;
    align-items: center;
    justify-content: space-between;
    z-index: 2000;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.mobile-header .logo-area {
    display: flex;
    align-items: center;
    color: white;
    font-weight: bold;
}

.mobile-logo {
    width: 30px;
    margin-right: 10px;
}

#menu-toggle {
    background: none;
    border: none;
    cursor: pointer;
    padding: 0;
    width: 30px;
    height: 20px;
    position: relative;
}

#menu-toggle span {
    display: block;
    width: 100%;
    height: 2px;
    background-color: white;
    margin-bottom: 6px;
    transition: 0.3s;
}

/* Sections */
.content-section {
    margin-bottom: 4rem;
    scroll-margin-top: 2rem;
}

.hero-section {
    padding: 4rem 0;
    margin-bottom: 2rem;
    border-bottom: 1px solid var(--border-color);
}

.hero-content h1 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
    background: linear-gradient(135deg, #24283b 0%, #7aa2f7 100%);
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.subtitle {
    font-size: 1.2rem;
    color: var(--text-secondary);
    max-width: 700px;
}

/* Cards */
.card {
    background: var(--card-bg);
    border-radius: 12px;
    padding: 2rem;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05), 0 2px 4px -1px rgba(0, 0, 0, 0.03);
    border: 1px solid var(--border-color);
    margin-bottom: 1.5rem;
}

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

.track-card {
    border-top: 4px solid var(--accent-color);
    transition: transform 0.2s;
}

.track-card:hover {
    transform: translateY(-5px);
}

/* Lists */
.feature-list {
    list-style: none;
    padding: 0;
}

.feature-list li {
    padding-left: 1.5rem;
    position: relative;
    margin-bottom: 0.5rem;
}

.feature-list li::before {
    content: "•";
    color: var(--accent-color);
    font-weight: bold;
    position: absolute;
    left: 0;
}

/* Timeline */
.timeline {
    position: relative;
    border-left: 2px solid var(--border-color);
    margin-left: 1rem;
    padding-left: 2rem;
}

.timeline-item {
    margin-bottom: 2rem;
    position: relative;
}

.timeline-marker {
    position: absolute;
    left: -2.6rem;
    top: 0.5rem;
    width: 1rem;
    height: 1rem;
    background-color: var(--accent-color);
    border-radius: 50%;
    border: 3px solid #fff;
}

.timeline-marker.future {
    background-color: var(--border-color);
}

/* Dynamic Content Styles */
.track-section {
    margin-bottom: 2rem;
}

.grant-list,
.media-list {
    list-style: none;
    padding: 0;
}

.grant-item {
    margin-bottom: 1.5rem;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid #f0f0f0;
}

.grant-item:last-child {
    border-bottom: none;
}

.grant-item h4 {
    margin-bottom: 0.5rem;
    color: #2c3e50;
}

.awarded-to {
    font-size: 0.9rem;
    color: var(--text-secondary);
    margin-top: 0.5rem;
}

.subsection-divider {
    height: 1px;
    background-color: var(--border-color);
    margin: 2rem 0;
}

.alert-box {
    background-color: #fff3cd;
    color: #856404;
    padding: 1rem;
    border-radius: 8px;
    border: 1px solid #ffeeba;
    margin-bottom: 1.5rem;
}

/* Responsive */
@media (max-width: 768px) {
    .mobile-header {
        display: flex;
    }

    .sidebar {
        transform: translateX(-100%);
        width: 100%;
        padding-top: calc(var(--header-height) + 2rem);
    }

    .sidebar.active {
        transform: translateX(0);
    }

    .main-content {
        margin-left: 0;
        padding: 2rem 1.5rem;
        padding-top: calc(var(--header-height) + 2rem);
    }

    .hero-content h1 {
        font-size: 2rem;
    }
}

/* GitHub Activity Feed */
.activity-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.activity-item {
    padding: 1rem 0;
    border-bottom: 1px solid var(--border-color);
}

.activity-item:last-child {
    border-bottom: none;
}

.activity-header {
    display: flex;
    justify-content: space-between;
    font-size: 0.85rem;
    margin-bottom: 0.3rem;
    color: var(--text-secondary);
}

.activity-repo {
    font-weight: 600;
    color: var(--accent-color);
}

.activity-body {
    font-size: 0.95rem;
}

.activity-body code {
    background-color: #f0f0f0;
    padding: 0.1rem 0.3rem;
    border-radius: 4px;
    font-family: monospace;
    font-size: 0.9em;
}

.loading-text {
    color: var(--text-secondary);
    font-style: italic;
    text-align: center;
    padding: 2rem;
}
/* Video Grid */
.video-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.video-card {
    display: block;
    background: #fff;
    border-radius: 12px;
    overflow: hidden;
    text-decoration: none;
    color: inherit;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
    transition: transform 0.2s, box-shadow 0.2s;
    border: 1px solid var(--border-color);
}

.video-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 16px rgba(0,0,0,0.1);
    color: inherit;
}

.video-thumbnail {
    position: relative;
    padding-top: 56.25%; /* 16:9 Aspect Ratio */
    background: #000;
}

.video-thumbnail img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.play-icon {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 48px;
    height: 40px;
    background: rgba(255, 0, 0, 0.9);
    color: white;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    opacity: 0.9;
    transition: transform 0.2s;
}

.video-card:hover .play-icon {
    transform: translate(-50%, -50%) scale(1.1);
    background: #FF0000;
}

.video-info {
    padding: 1rem;
}

.video-info h4 {
    font-size: 0.95rem;
    margin: 0;
    line-height: 1.4;
    font-family: 'Inter', sans-serif;
    color: var(--text-primary);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
/* Grant Metadata */
.grant-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 1.5rem;
    margin-top: 0.5rem;
    font-size: 0.9rem;
    color: var(--text-secondary);
}

.grant-meta p {
    margin: 0;
}

.grant-period {
    color: var(--text-secondary);
}