/* 1. DEFINE YOUR VARIABLES */
:root {
    --bg-color: #f4f4f4;      /* Default Light Background */
    --text-color: #333333;    /* Default Dark Text */
    --accent-color: #1034a6;  /* Egyptian Blue */
    --nav-color: #556b2f;     /* Dark Olive Green */
}

/* 2. DARK MODE OVERRIDES */
html.dark-mode {
    --bg-color: #002147;      /* Navy Blue */
    --text-color: #ffffff;    /* White Text */
    --nav-color: #ffffff;     /* White links for dark mode */
}

/* 3. APPLY TO THE BODY */
body {
    background-color: var(--bg-color);
    color: var(--text-color);
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    margin: 0;
    padding: 0;
    transition: background-color 0.3s, color 0.3s;
    
    display: flex;
    flex-direction: column;
    align-items: center;
    min-height: 100vh;
}

/* 4. HEADERS AND NAV */
header {
    width: 100%;
    max-width: 800px;
    text-align: center;
    padding: 40px 0 10px 0;
    margin-bottom: 40px;
    border-bottom: 2px solid var(--nav-color); 
}

nav {
    margin-top: 20px;
    padding-bottom: 10px;
}

nav a, nav a:visited {
    color: var(--nav-color);
    text-decoration: none;
    margin: 0 15px;
    font-weight: bold;
    padding-bottom: 5px;
    transition: all 0.3s ease;
}

/* THE ACTIVE PAGE INDICATOR */
nav a.active {
    color: var(--accent-color) !important;
    border-bottom: 3px solid var(--accent-color);
}

html.dark-mode nav a.active {
    color: #ffffff !important;
    border-bottom: 3px solid var(--accent-color);
}

html.dark-mode nav a:not(.active) {
    color: #ffffff;
}

/* 5. MAIN CONTENT AREA */
main {
    width: 100%;
    max-width: 800px;
    padding: 0 20px;
    text-align: center;
    line-height: 1.6;
}

ul {
    display: inline-block;
    text-align: left;
}

/* --- EDUCATION PAGE SPECIFIC STYLES --- */
.edu-item {
    margin-bottom: 20px;
}

.edu-item h3 {
    margin-bottom: 5px;
    color: var(--accent-color);
}

.edu-meta {
    font-weight: bold;
    font-style: italic;
    opacity: 0.8;
    margin-bottom: 10px;
}

.section-divider {
    border: 0;
    height: 1px;
    background: var(--nav-color);
    width: 60%;
    margin: 30px auto;
    opacity: 0.3;
}

.course-grid ul {
    list-style-type: none;
    padding: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
}

.course-grid li {
    background-color: rgba(16, 52, 166, 0.1); 
    padding: 12px 20px;
    border-radius: 8px;
    border-left: 5px solid var(--accent-color);
    width: 100%;
    max-width: 400px;
    text-align: left;
}

html.dark-mode .course-grid li {
    background-color: rgba(255, 255, 255, 0.05);
    color: #ffffff;
}

/* --- RESUME PAGE STYLES --- */
.download-btn {
    display: inline-block;
    background-color: var(--accent-color);
    color: white !important;
    padding: 15px 30px;
    text-decoration: none;
    border-radius: 5px;
    font-weight: bold;
    margin-top: 20px;
    transition: background-color 0.3s ease, transform 0.2s ease;
}

.download-btn:hover {
    background-color: var(--nav-color);
    transform: translateY(-3px);
}

html.dark-mode .download-btn {
    border: 1px solid #ffffff;
}

/* 6. FOOTER */
footer {
    margin-top: auto;
    padding: 20px;
    text-align: center;
    font-size: 0.9em;
    opacity: 0.7;
    width: 100%;
    border-top: 1px solid var(--nav-color);
}

header {
    position: relative; /* This makes the header the "anchor" for the clock */
    /* Ensure your header has enough height for the larger text */
    min-height: 80px; 
}

/* This color will apply in Light Mode */
#live-clock {
    position: absolute;
    top: 15px;
    right: 25px;
    font-size: 1.25rem;
    font-weight: 500;
    color: #333333; /* Dark gray so it's visible on light backgrounds */
    white-space: nowrap;
}

/* This color will apply only when Dark Mode is active */
.dark-mode #live-clock {
    color: #ffffff; /* White text for the dark navy background */
}

/* Optional: Adjust for mobile so it doesn't overlap the logo/menu */
@media (max-width: 600px) {
    #live-clock {
        font-size: 0.9rem;
        top: 5px;
        right: 10px;
    }
}

/* Ensure it stays white in Dark Mode */
html.dark-mode #live-clock {
    color: #ffffff;
}