:root {
    --primary-color: #000080; /* Navy Blue */
    --accent-color: #00FFFF; /* Electric Cyan */
    --light-color: #ffffff; /* White */
    --dark-color: #343a40; /* Dark Grey */
    --text-color: #f8f9fa; /* Light text for dark backgrounds */
    --body-bg: #f4f7f6;
    --font-family: 'Open Sans', sans-serif;
    --heading-font: 'Roboto', sans-serif;
}

html, body {
    font-family: var(--font-family);
    background-color: var(--body-bg);
    color: var(--dark-color);
    margin: 0;
    padding: 0;
    height: 100%;
}

.main-container {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

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

/* Navbar */
.navbar.bg-primary {
    background-color: var(--primary-color) !important;
}

.navbar {
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.navbar-brand {
    font-family: var(--heading-font);
    font-weight: 700;
    color: var(--light-color) !important;
}

.nav-link {
    color: var(--light-color) !important;
    opacity: 0.8;
    transition: opacity 0.2s ease-in-out;
}

.nav-link:hover, .nav-link.active {
    opacity: 1;
    font-weight: 500;
}

/* Footer */
.footer {
    background-color: var(--primary-color);
    color: var(--dark-color);
    padding: 1rem 0;
    text-align: center;
    font-size: 0.9rem;
}

.footer a {
    color: var(--dark-color);
    font-weight: 600;
    text-decoration: none;
    transition: opacity 0.2s ease-in-out;
}

.footer a:hover {
    opacity: 0.8;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
    font-family: var(--heading-font);
    font-weight: 700;
    color: var(--accent-color); /* Use dark grey for headings */
}

/* Buttons */
.btn-primary {
    background-color: var(--accent-color);
    border-color: var(--accent-color);
    color: var(--light-color);
    transition: background-color 0.2s ease-in-out, border-color 0.2s ease-in-out;
}

.btn-primary:hover {
    background-color: #495057; /* Lighter Grey */
    border-color: #495057;
}

/* Home Page */
.hero-section {
    text-align: center;
    padding: 5rem 1rem;
    background-color: #e9ecef;
}

.hero-section h1 {
    font-size: 2.5rem;
    margin-bottom: 0.5rem;
}

.hero-section h2 {
    font-size: 1.25rem;
    font-weight: 400;
    color: var(--dark-color);
    margin-bottom: 2rem;
}

.intro-section, .featured-projects {
    padding: 4rem 1rem;
    text-align: center;
}

.featured-projects {
    background-color: #e9ecef;
}

.project-card {
    background-color: var(--light-color);
    border: none;
    border-radius: 0.5rem;
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    text-align: left;
}

.project-card h5 {
    color: var(--accent-color);
}

.project-card .skills {
    font-size: 0.9rem;
    color: #6c757d;
    margin-bottom: 1rem;
}

/* About Page */
.about-section {
    padding: 4rem 1rem;
}

/* Skills Page */
.skills-category {
    margin-bottom: 2rem;
}

.skills-category h3 {
    border-bottom: 2px solid var(--accent-color);
    padding-bottom: 0.5rem;
    margin-bottom: 1rem;
}

/* Project Page */
.project-case-study {
    background-color: var(--light-color);
    border-radius: 0.5rem;
    padding: 2rem;
    margin-bottom: 2rem;
    box-shadow: 0 4px 8px rgba(0,0,0,0.05);
}

.project-case-study h3 {
    color: var(--primary-color); /* Use seafoam for project titles */
}

/* Blazor-specific */
#blazor-error-ui {
    background: lightyellow;
    bottom: 0;
    box-shadow: 0 -1px 2px rgba(0, 0, 0, 0.2);
    display: none;
    left: 0;
    padding: 0.6rem 1.25rem 0.7rem 1.25rem;
    position: fixed;
    width: 100%;
    z-index: 1000;
}

#blazor-error-ui .dismiss {
    cursor: pointer;
    position: absolute;
    right: 0.75rem;
    top: 0.5rem;
}

/* Loading Spinner */
#app {
    position: relative;
    min-height: 100vh;
}

.loading-progress {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 5rem;
    height: 5rem;
}

.loading-progress circle {
    fill: none;
    stroke-width: 6px;
    stroke-linecap: round;
    transform-origin: 50% 50%;
}

.loading-progress circle:first-child {
    stroke: #f3f3f3;
}

.loading-progress circle:last-child {
    stroke: var(--primary-color); /* Use seafoam for spinner */
    stroke-dasharray: 250;
    stroke-dashoffset: 250;
    animation: loading-spinner 2s cubic-bezier(0.4, 0.15, 0.6, 0.85) infinite;
}

.loading-progress-text {
    position: absolute;
    top: calc(50% + 3rem);
    left: 50%;
    transform: translateX(-50%);
    color: var(--dark-color);
    font-family: var(--heading-font);
}

@keyframes loading-spinner {
    0% {
        stroke-dashoffset: 250;
        transform: rotate(0deg);
    }
    50% {
        stroke-dashoffset: 62.5;
        transform: rotate(180deg);
    }
    100% {
        stroke-dashoffset: 250;
        transform: rotate(360deg);
    }
}

/* Media Queries for Mobile-Friendly Spacing */
@media (max-width: 768px) {
    .content {
        padding: 1rem;
    }

    .hero-section {
        padding: 3rem 1rem;
    }

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

    .hero-section h2 {
        font-size: 1rem;
    }

    .intro-section, .featured-projects {
        padding: 2rem 1rem;
    }

    .project-card {
        padding: 1rem;
    }

    .about-section {
        padding: 2rem 1rem;
    }

    .project-case-study {
        padding: 1.5rem;
    }
}