/* Global Variables & Reset */
:root {
    --primary: #1e3a8a; /* Deep professional blue */
    --primary-light: #3b82f6;
    --secondary: #0f172a; /* Dark slate */
    --bg-light: #f8fafc;
    --text-dark: #334155;
    --text-light: #64748b;
    --border: #e2e8f0;

    /* Course Page Aliases — kept in sync with the palette above so index.html
       and the course pages (CSXI/CSXII) always render the same brand colors */
    --primary-color: var(--secondary);
    --secondary-color: var(--primary-light);
    --accent-color: #ef4444;
    --bg-color: var(--bg-light);
    --card-bg: #ffffff;
    --text-color: var(--text-dark);
    --border-color: var(--border);
    --success-color: #10b981;
    --warning-color: #f59e0b;
}

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

body {
    font-family: 'Inter', 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: var(--bg-light);
    color: var(--text-dark);
    line-height: 1.6;
}

/* Glass Navbar Styling */
.glass-nav {
    position: fixed;
    top: 20px;
    left: 50%;
    transform: translateX(-50%) translateY(-150%);
    width: 90%;
    max-width: 1000px;
    height: 60px;
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 30px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 25px;
    z-index: 1000;
    box-shadow: 0 8px 32px 0 rgba(31, 38, 135, 0.15);
    transition: transform 0.4s cubic-bezier(0.165, 0.84, 0.44, 1), opacity 0.3s ease;
    opacity: 0;
    pointer-events: none;
}

.glass-nav.visible,
.glass-nav:hover {
    transform: translateX(-50%) translateY(0);
    opacity: 1;
    pointer-events: auto;
}

/* Invisible trigger zone at the top of the viewport */
.nav-trigger {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 80px;
    z-index: 999;
}

.nav-trigger:hover + .glass-nav,
.glass-nav:hover {
    transform: translateX(-50%) translateY(0);
    opacity: 1;
    pointer-events: auto;
}

.nav-logo {
    font-weight: 700;
    color: #1e293b;
    text-decoration: none;
    font-size: 1.1rem;
    display: flex;
    align-items: center;
    gap: 8px;
}

.nav-links {
    display: flex;
    gap: 20px;
    list-style: none;
    margin: 0;
    padding: 0;
}

.nav-links a {
    text-decoration: none;
    color: #475569;
    font-weight: 500;
    font-size: 0.9rem;
    transition: color 0.2s;
    padding: 8px 12px;
    border-radius: 20px;
}

.nav-links a:hover {
    color: #3b82f6;
    background: rgba(59, 130, 246, 0.1);
}

.nav-links a.active {
    background: #3b82f6;
    color: white;
}

@media (max-width: 600px) {
    .glass-nav { width: 95%; padding: 0 15px; height: 55px; }
    .nav-links { gap: 5px; }
    .nav-links a { padding: 6px 10px; font-size: 0.8rem; }
    .nav-logo span { display: none; }
}

/* Profile Page Styling (index.html) */
.container {
    max-width: 1100px;
    margin: 100px auto 40px;
    padding: 0 20px;
}

.profile-grid {
    display: grid;
    grid-template-columns: 1fr 2fr;
    gap: 30px;
}

@media (max-width: 768px) { .profile-grid { grid-template-columns: 1fr; } }

aside {
    background: #ffffff;
    padding: 40px 30px;
    border-radius: 12px;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05), 0 2px 4px -1px rgba(0, 0, 0, 0.03);
    height: fit-content;
    text-align: center;
}

.profile-img-container {
    width: 150px;
    height: 150px;
    margin: 0 auto 20px;
    border-radius: 50%;
    overflow: hidden;
    border: 4px solid var(--primary-light);
    background: #e2e8f0;
    display: flex;
    align-items: center;
    justify-content: center;
}

.profile-img-container img { width: 100%; height: 100%; object-fit: cover; }

.title {
    font-size: 1rem;
    color: var(--primary);
    font-weight: 500;
    margin-bottom: 25px;
}

.contact-info {
    text-align: left;
    margin-top: 25px;
    border-top: 1px solid var(--border);
    padding-top: 25px;
}

.contact-item { display: flex; align-items: center; margin-bottom: 15px; font-size: 0.9rem; }
.contact-item i { color: var(--primary); width: 25px; margin-right: 10px; }
.contact-item a { color: var(--text-dark); text-decoration: none; }
.contact-item a:hover { color: var(--primary-light); }

.social-links { display: flex; justify-content: center; gap: 15px; margin-top: 25px; border-top: 1px solid var(--border); padding-top: 25px; }
.social-links a { display: inline-flex; align-items: center; justify-content: center; width: 40px; height: 40px; border-radius: 50%; background: var(--bg-light); color: var(--secondary); transition: all 0.3s; }
.social-links a:hover { background: var(--primary); color: #fff; transform: translateY(-3px); }

main { display: flex; flex-direction: column; gap: 30px; }
section { background: #ffffff; padding: 40px; border-radius: 12px; box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05), 0 2px 4px -1px rgba(0, 0, 0, 0.03); }
section h2 { font-size: 1.3rem; color: var(--secondary); border-bottom: 2px solid var(--primary-light); padding-bottom: 8px; margin-bottom: 20px; display: flex; align-items: center; gap: 10px; }
section h2 i { color: var(--primary); }

.timeline-item { margin-bottom: 25px; padding-left: 20px; border-left: 2px solid var(--border); position: relative; }
.timeline-item::before { content: ''; position: absolute; left: -6px; top: 6px; width: 10px; height: 10px; border-radius: 50%; background: var(--primary-light); }
.timeline-header { display: flex; justify-content: space-between; align-items: baseline; flex-wrap: wrap; margin-bottom: 8px; }
.job-title, .edu-title { font-size: 1.1rem; font-weight: 600; color: var(--secondary); }
.company, .institution { font-size: 0.95rem; color: var(--primary); font-weight: 500; }
.date { font-size: 0.85rem; color: var(--text-light); background: var(--bg-light); padding: 2px 10px; border-radius: 20px; }

.timeline-content ul { list-style-type: square; padding-left: 20px; font-size: 0.95rem; }
.timeline-content li { margin-bottom: 6px; }

.skills-container { display: flex; flex-direction: column; gap: 20px; }
.skill-category h3 { font-size: 1rem; color: var(--secondary); margin-bottom: 10px; }
.tags { display: flex; flex-wrap: wrap; gap: 8px; }
.tag { background: var(--bg-light); padding: 6px 14px; border-radius: 20px; font-size: 0.85rem; border: 1px solid var(--border); }

/* Course Page Styling (CSXI, CSXII) */
.header-banner {
    background: linear-gradient(135deg, #eff6ff 0%, #f8fafc 100%);
    color: var(--secondary);
    padding: 100px 20px 60px 20px;
    text-align: center;
    border-bottom: 5px solid var(--secondary-color);
}

.header-banner h1 { margin: 0; font-size: 2.5rem; letter-spacing: -0.5px; color: var(--secondary); }
.header-banner p { margin: 10px 0 0 0; font-size: 1.1rem; color: var(--text-light); }

.course-container { max-width: 1000px; margin: 40px auto; padding: 0 20px; }
.card { background: #fff; border-radius: 12px; padding: 30px; margin-bottom: 30px; border: 1px solid var(--border-color); box-shadow: 0 4px 6px -1px rgba(0,0,0,0.05); }
.card h2, .card h3 { color: var(--primary-color); font-size: 1.6rem; border-bottom: 2px solid var(--border-color); padding-bottom: 10px; display: flex; align-items: center; gap: 10px; }

.welcome-text { font-size: 1.1rem; font-style: italic; background: #f1f5f9; padding: 20px; border-left: 5px solid var(--secondary-color); border-radius: 4px; }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; margin-top: 20px; margin-bottom: 20px; }
.stat-box { background: #f8fafc; border: 1px solid var(--border-color); border-radius: 8px; padding: 20px; text-align: center; }
.stat-box .number { font-size: 3rem; font-weight: bold; color: var(--secondary-color); }
.stat-box .label { font-weight: 600; color: var(--primary-color); text-transform: uppercase; font-size: 0.9rem; }

.badge { display: inline-block; padding: 4px 8px; border-radius: 4px; font-size: 0.8rem; font-weight: 600; }
.badge.practical { background: #dcfce7; color: #15803d; }
.badge.theory { background: #f1f5f9; color: #475569; }
.badge.marks { background: var(--secondary-color); color: white; border-radius: 20px; }
.badge.marks-alt { background: var(--primary-color); color: white; border-radius: 20px; }

/* Redesign Task 006: Unit Cards & Grading Summary Styles Below */

/* Grading Summary */
.grading-summary {
    max-width: 1000px;
    margin: -50px auto 0;
    padding: 0 20px;
    position: relative;
    z-index: 5;
}
.grading-card {
    background: var(--card-bg);
    border-radius: 16px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    overflow: hidden;
    border: 1px solid var(--border-color);
}
.grading-card .stat {
    padding: 20px 25px;
    border-right: 1px solid var(--border-color);
}
.grading-card .stat:last-child { border-right: none; }
.grading-card .stat .num { font-size: 1.8rem; font-weight: 700; color: var(--primary-light); }
.grading-card .stat .num small { font-size: 0.9rem; color: var(--text-light); font-weight: 500; }
.grading-card .stat .label { font-size: 0.75rem; color: var(--text-light); font-weight: 600; text-transform: uppercase; letter-spacing: 0.05em; margin-top: 5px; }
.grading-card .stat.split .num { color: var(--warning-color); }

/* Unit Cards */
.unit-list { display: flex; flex-direction: column; gap: 15px; margin-top: 20px; }
.unit-card {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
    overflow: hidden;
    transition: box-shadow 0.2s ease;
}
.unit-card[open] { box-shadow: 0 10px 20px rgba(0, 0, 0, 0.05); }
.unit-card summary {
    list-style: none;
    cursor: pointer;
    display: grid;
    grid-template-columns: 50px 1fr auto auto;
    align-items: center;
    gap: 15px;
    padding: 15px 20px;
    position: relative;
}
.unit-card summary::-webkit-details-marker { display: none; }
.unit-card summary::before {
    content: "";
    position: absolute; left: 0; top: 0; bottom: 0; width: 4px;
}
.unit-card.theory summary::before { background: var(--primary-light); }
.unit-card.practical summary::before { background: var(--warning-color); }

.unit-num {
    font-family: monospace;
    font-size: 0.8rem; font-weight: 600;
    color: var(--text-light);
    background: var(--bg-light);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    width: 40px; height: 40px;
    display: flex; align-items: center; justify-content: center;
}
.unit-title-wrap h3 { font-size: 1.1rem; font-weight: 600; color: var(--primary-color); border-bottom: none; padding-bottom: 0; margin-bottom: 0; display: block; }
.unit-title-wrap .unit-desc { font-size: 0.8rem; color: var(--text-light); margin-top: 2px; display: -webkit-box; -webkit-line-clamp: 1; -webkit-box-orient: vertical; overflow: hidden; }
.unit-badge {
    font-size: 0.7rem; font-weight: 700; padding: 4px 10px; border-radius: 100px;
    white-space: nowrap; text-transform: uppercase; letter-spacing: 0.03em;
}
.unit-card.theory .unit-badge { color: var(--primary-light); background: #eff6ff; }
.unit-card.practical .unit-badge { color: var(--warning-color); background: #fff7ed; }
.unit-card .chev { color: var(--text-light); transition: transform 0.2s ease; }
.unit-card[open] .chev { transform: rotate(180deg); }

.unit-body { padding: 0 20px 20px 20px; border-top: 1px solid var(--border-color); }
.unit-body-inner { padding-top: 15px; display: flex; flex-direction: column; gap: 15px; }
.unit-full-desc { font-size: 0.9rem; color: var(--text-light); line-height: 1.6; }

.resource-groups { display: flex; flex-wrap: wrap; gap: 10px; }
.res-pill {
    display: inline-flex; align-items: center; gap: 6px;
    font-size: 0.8rem; font-weight: 600; text-decoration: none;
    padding: 6px 12px; border-radius: 100px;
    border: 1px solid var(--border-color); background: var(--bg-light); color: var(--text-dark);
    transition: all 0.2s ease;
}
.res-pill:hover { border-color: var(--primary-light); color: var(--primary-light); background: #eff6ff; }
.res-pill.disabled { opacity: 0.5; pointer-events: none; }
.res-pill .tag { font-family: monospace; font-size: 0.65rem; color: var(--text-light); text-transform: uppercase; }

/* Activity-Assessment Pair Colors */
.pair-c1 .tag { color: #3b82f6; border-color: #3b82f6; }
.pair-c1 { border-left: 3px solid #3b82f6; padding-left: 10px; }
.pair-c2 .tag { color: #10b981; border-color: #10b981; }
.pair-c2 { border-left: 3px solid #10b981; padding-left: 10px; }
.pair-c3 .tag { color: #8b5cf6; border-color: #8b5cf6; }
.pair-c3 { border-left: 3px solid #8b5cf6; padding-left: 10px; }
.pair-c4 .tag { color: #f59e0b; border-color: #f59e0b; }
.pair-c4 { border-left: 3px solid #f59e0b; padding-left: 10px; }
.pair-c5 .tag { color: #ef4444; border-color: #ef4444; }
.pair-c5 { border-left: 3px solid #ef4444; padding-left: 10px; }
.pair-c6 .tag { color: #06b6d4; border-color: #06b6d4; }
.pair-c6 { border-left: 3px solid #06b6d4; padding-left: 10px; }

/* Section Shell */
.section { max-width: 1000px; margin: 0 auto; padding: 60px 20px 0; }
.section-head { margin-bottom: 25px; }
.section-head .kicker {
    font-family: monospace;
    font-size: 0.8rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.05em;
    color: var(--primary-light); display: block; margin-bottom: 8px;
}
.section-head h2 { font-size: 1.5rem; color: var(--primary-color); border-bottom: none; padding-bottom: 0; }
.section-head p { color: var(--text-light); font-size: 0.95rem; margin-top: 8px; max-width: 600px; }

/* Misc Cards */
.two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; margin-top: 20px; }
.misc-card {
    background: var(--card-bg); border: 1px solid var(--border-color); border-radius: 12px;
    padding: 20px; box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}
.misc-card h4 { font-size: 0.9rem; margin-bottom: 12px; display: flex; align-items: center; gap: 8px; color: var(--primary-color); border-bottom: none; padding-bottom: 0; }
.misc-item {
    display: flex; align-items: center; justify-content: space-between; gap: 10px;
    padding: 10px 0; border-top: 1px solid var(--border-color); font-size: 0.85rem;
}
.misc-item:first-of-type { border-top: none; }
.misc-item .filetype { font-family: monospace; font-size: 0.65rem; color: var(--text-light); background: var(--bg-light); border: 1px solid var(--border-color); padding: 2px 6px; border-radius: 4px; margin-right: 5px; }
.misc-item a { text-decoration: none; font-weight: 600; color: var(--primary-light); }

/* CTA Band */
.cta-band { margin-top: 40px; margin-bottom: 40px; padding: 0 20px; }
.cta-inner {
    background: linear-gradient(135deg, var(--secondary) 0%, var(--primary-color) 100%);
    border-radius: 16px; padding: 25px 30px; color: #fff;
    display: flex; align-items: center; justify-content: space-between; gap: 20px; flex-wrap: wrap;
    max-width: 960px; margin: 0 auto;
}
.cta-inner h3 { font-size: 1.2rem; color: #fff; border-bottom: none; padding-bottom: 0; margin-bottom: 0; }
.cta-inner p { font-size: 0.9rem; opacity: 0.9; margin-top: 5px; }
.cta-btn {
    background: #fff; color: var(--primary-color); text-decoration: none;
    font-weight: 700; font-size: 0.9rem; padding: 10px 20px; border-radius: 100px;
    white-space: nowrap;
}

.alert-box.critical {
    background: #fffbeb;
    border: 1px solid #fde68a;
    border-left: 4px solid var(--warning-color);
    border-radius: 8px;
    padding: 1.5rem;
}
.alert-box.critical h3 { color: #92400e; margin-bottom: 0.75rem; }
.alert-box.critical p { color: #78350f; line-height: 1.7; }
.alert-box.critical .report-requirements li { margin-bottom: 0.5rem; color: #78350f; }

@media (max-width: 640px) {
    .grading-card { grid-template-columns: 1fr; }
    .grading-card .stat { border-right: none; border-bottom: 1px solid var(--border-color); }
    .unit-card summary { grid-template-columns: 40px 1fr auto; }
    .unit-badge { display: none; }
    .two-col { grid-template-columns: 1fr; }
}
