body {
    font-family: 'Open Sans', Arial, sans-serif;
    background-color: #f1f1f1;
    margin: 0;
    padding: 0 20px 40px 20px;
    font-size: 16px;
    line-height: 1.6;
    color: #333;
}

*,
*::before,
*::after {
    box-sizing: border-box;
}

/* Container for max-width content */
body > * {
    max-width: 1000px;
    margin-left: auto;
    margin-right: auto;
}

.header {
    text-align: center;
    padding: 30px 20px;
    background-color: #333;
    color: #fff;
    max-width: 100% !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
}

.header h1 {
    margin: 10px 0;
    font-size: 32px;
    font-weight: 700;
}

.header p {
    margin: 10px 0;
    font-size: 18px;
}

.header p a {
    color: #fff;
    text-decoration: none;
    border-bottom: 2px solid rgba(255, 255, 255, 0.3);
    transition: border-color 0.3s ease;
    padding-bottom: 2px;
}

.header p a:hover {
    border-bottom-color: #fff;
}

.header img {
    max-width: 100%;
    height: auto;
    border-radius: 50%;
    border: 3px solid #fff;
    margin: 15px 0;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.section {
    margin: 25px auto;
    padding: 35px 40px;
    background-color: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.section h2 {
    color: #333;
    font-size: 28px;
    margin-top: 0;
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 2px solid #e0e0e0;
}

.section h3 {
    color: #444;
    font-size: 20px;
    margin-top: 25px;
    margin-bottom: 12px;
}

.section p {
    margin: 12px 0;
    color: #555;
    line-height: 1.7;
}

.section ul {
    margin: 15px 0;
    padding-left: 25px;
    color: #555;
}

.section li {
    margin: 10px 0;
    line-height: 1.6;
}

.section {
    overflow-wrap: anywhere;
}

.section pre {
    max-width: 100%;
    overflow-x: auto;
}

.section > p:first-of-type,
.section > ul:first-of-type {
    margin-top: 0;
}

nav {
    text-align: center;
    margin: 20px auto;
    padding: 20px;
    background: linear-gradient(135deg, #30439a 0%, #5b2e87 100%);
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    position: sticky;
    top: 20px;
    z-index: 100;
}

nav a {
    display: inline-block;
    margin: 5px 8px;
    padding: 12px 24px;
    text-decoration: none;
    color: #fff;
    background-color: rgba(255, 255, 255, 0.15);
    border-radius: 6px;
    transition: all 0.3s ease;
    font-size: 16px;
    font-weight: 600;
    border: 2px solid transparent;
}

nav a:hover {
    background-color: rgba(255, 255, 255, 0.25);
    border-color: rgba(255, 255, 255, 0.4);
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

nav a:active {
    transform: translateY(0);
}

/* External links indicator */
nav a[href^="http"]::after {
    content: " ↗";
    font-size: 14px;
    opacity: 0.8;
}
/* Resume download link */
body > p {
    text-align: center;
    margin: 20px auto;
    font-size: 16px;
}

body > p a {
    display: inline-block;
    padding: 12px 30px;
    background-color: #0056b3;
    color: #fff;
    text-decoration: none;
    border-radius: 5px;
    font-weight: 500;
    transition: background-color 0.3s ease;
}

body > p a:hover {
    background-color: #00458e;
}

.project-image {
    width: 100%;
    max-width: 400px;
    height: auto;
    border-radius: 5px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

/* Active/Current page indicator - add class="active" to current page link */
nav a.active {
    background-color: rgba(255, 255, 255, 0.95);
    color: #30439a;
    border-color: rgba(255, 255, 255, 0.95);
    font-weight: 700;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

nav a.active:hover {
    background-color: #fff;
    color: #5b2e87;
}

/* Better link styling in sections */
.section a {
    color: #30439a;
    text-decoration: none;
    border-bottom: 1px solid rgba(48, 67, 154, 0.3);
    transition: all 0.3s ease;
}

.section a:hover {
    color: #5b2e87;
    border-bottom-color: #5b2e87;
}

/* Project card buttons ("View Project Details"). Matches a .section whose h2 wraps a
   link to an .html page, and a <p> holding only one .html link. New project cards must
   keep that markup. Browsers without :has() show a plain link instead. */
.section:has(> h2 > a[href$=".html"]) p > a[href$=".html"]:only-child {
    display: inline-block;
    margin-top: 10px;
    padding: 10px 20px;
    background: linear-gradient(135deg, #30439a 0%, #5b2e87 100%);
    color: #fff;
    border: none;
    border-radius: 5px;
    font-weight: 600;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(48, 67, 154, 0.3);
}

.section:has(> h2 > a[href$=".html"]) p > a[href$=".html"]:only-child:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(48, 67, 154, 0.4);
    color: #fff;
}

/* Project metadata styling */
.section p strong {
    color: #333;
}

/* Responsive video embeds */
.video-wrapper {
    position: relative;
    width: 100%;
    max-width: 800px;
    aspect-ratio: 16 / 9;
    margin: 0 auto 16px;
}

.video-wrapper iframe {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    border: 0;
    border-radius: 5px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

footer {
    padding: 16px 10px 0;
    text-align: center;
    color: #555;
    font-size: 14px;
}

footer a {
    color: #30439a;
}

a:focus-visible {
    outline: 3px solid #bb641e;
    outline-offset: 3px;
}

nav a:focus-visible,
.header a:focus-visible {
    outline-color: #fff;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    nav {
        position: static;
        display: flex;
        flex-wrap: wrap;
        justify-content: center;
        gap: 6px;
        padding: 10px;
    }

    nav a {
        margin: 0;
        padding: 7px 10px;
        font-size: 14px;
    }

    .section {
        padding: 20px 16px;
        margin: 16px auto;
    }

    body {
        padding: 0 10px 24px;
    }

    .header {
        padding: 24px 12px;
    }
}
