:root {
    --navy-blue: #1B263B;
    --white: #FFFFFF;
    --black: #000000;
    --gold-accent: #FFD700;
}

body {
    font-family: 'Roboto', sans-serif;
    background-color: var(--white);
    color: var(--black);
    margin: 0;
    overflow-x: hidden;
    transition: opacity 0.3s ease;
}

body.fade-out {
    opacity: 0;
}

.skip-link {
    position: absolute;
    top: -40px;
    left: 0;
    background: var(--navy-blue);
    color: var(--white);
    padding: 8px;
    z-index: 1000;
}

.skip-link:focus {
    top: 0;
}

.navbar {
    background-color: var(--navy-blue);
    padding: 1rem 2rem;
    animation: slideDown 0.8s ease-out;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.2);
}

.navbar-brand, .nav-link {
    color: var(--white) !important;
    font-family: 'Poppins', sans-serif;
    font-weight: 600;
    position: relative;
    transition: all 0.3s ease;
}

.navbar-brand:hover, .nav-link:hover, .navbar-brand:focus, .nav-link:focus {
    color: var(--gold-accent) !important;
    transform: scale(1.1);
}

.nav-link::after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    bottom: -2px;
    left: 0;
    background-color: var(--gold-accent);
    transition: width 0.3s ease;
}

.nav-link:hover::after, .nav-link:focus::after {
    width: 100%;
}

.navbar-toggler-icon {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3E%3Cpath stroke='rgba%28255, 255, 255, 0.8%29' stroke-width='2' d='M4 7h22M4 15h22M4 23h22'/%3E%3C/svg%3E");
}

h1, h2, h3, h4, h5, h6 {
    font-family: 'Poppins', sans-serif;
    color: var(--navy-blue);
}

.content-section {
    margin-bottom: 2rem;
    padding: 1.5rem;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    backdrop-filter: blur(5px);
    opacity: 0;
    transition: all 0.6s ease;
}

.content-section.visible {
    opacity: 1;
}

.page-index .content-section {
    transform: translateX(-100px);
}

.page-index .content-section.visible {
    transform: translateX(0);
    animation: slideInLeft 0.8s ease-out;
}

.page-education .content-section {
    transform: scale(0.8) rotate(5deg);
}

.page-education .content-section.visible {
    transform: scale(1) rotate(0);
    animation: zoomIn 0.8s ease-out;
}

.page-experience .content-section {
    transform: translateY(50px);
}

.page-experience .content-section.visible {
    transform: translateY(0);
    animation: bounceIn 0.8s ease-out;
}

.page-experience .content-section:nth-child(2) { animation-delay: 0.1s; }
.page-experience .content-section:nth-child(3) { animation-delay: 0.2s; }
.page-experience .content-section:nth-child(4) { animation-delay: 0.3s; }
.page-experience .content-section:nth-child(5) { animation-delay: 0.4s; }

.page-skills .content-section {
    transform: translateY(50px);
}

.page-skills .content-section.visible {
    transform: translateY(0);
    animation: waveIn 0.8s ease-out;
}

.page-skills .content-section:nth-child(2) { animation-delay: 0.1s; }
.page-skills .content-section:nth-child(3) { animation-delay: 0.2s; }
.page-skills .content-section:nth-child(4) { animation-delay: 0.3s; }
.page-skills .content-section:nth-child(5) { animation-delay: 0.4s; }
.page-skills .content-section:nth-child(6) { animation-delay: 0.5s; }

.page-publications .content-section {
    transform: scale(0);
}

.page-publications .content-section.visible {
    transform: scale(1);
    animation: expandIn 0.8s ease-out;
}

.page-projects .content-section {
    transform: rotate(10deg) scale(0.8);
}

.page-projects .content-section.visible {
    transform: rotate(0) scale(1);
    animation: spiralIn 0.8s ease-out;
}

.page-honors .content-section {
    opacity: 0;
}

.page-honors .content-section.visible {
    opacity: 1;
    animation: fadeIn 0.8s ease-out;
}

.page-references .content-section {
    transform: translateX(100px);
}

.page-references .content-section.visible {
    transform: translateX(0);
    animation: slideInRight 0.8s ease-out;
}

.profile-img {
    transition: transform 0.5s ease;
}

.profile-img:hover {
    transform: rotate(5deg) scale(1.1);
    filter: drop-shadow(0 0 10px var(--gold-accent));
}

.publication-img {
    max-width: 300px;
    transition: transform 0.3s ease, filter 0.3s ease;
}

.publication-img:hover {
    transform: scale(1.05);
    filter: drop-shadow(0 0 8px var(--gold-accent));
}

.publication-video {
    max-width: 400px;
    height: auto;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.figure-caption {
    font-family: 'Roboto', sans-serif;
    color: var(--navy-blue);
    font-size: 0.9rem;
    margin-top: 0.5rem;
}

@keyframes slideDown {
    0% { transform: translateY(-100%); }
    100% { transform: translateY(0); }
}

@keyframes slideInLeft {
    0% { opacity: 0; transform: translateX(-100px); }
    100% { opacity: 1; transform: translateX(0); }
}

@keyframes zoomIn {
    0% { opacity: 0; transform: scale(0.8) rotate(5deg); }
    100% { opacity: 1; transform: scale(1) rotate(0); }
}

@keyframes bounceIn {
    0% { opacity: 0; transform: translateY(50px); }
    60% { opacity: 1; transform: translateY(-10px); }
    100% { transform: translateY(0); }
}

@keyframes waveIn {
    0% { opacity: 0; transform: translateY(50px); }
    50% { transform: translateY(-10px); }
    100% { opacity: 1; transform: translateY(0); }
}

@keyframes expandIn {
    0% { opacity: 0; transform: scale(0); }
    100% { opacity: 1; transform: scale(1); }
}

@keyframes spiralIn {
    0% { opacity: 0; transform: rotate(10deg) scale(0.8); }
    100% { opacity: 1; transform: rotate(0) scale(1); }
}

@keyframes fadeIn {
    0% { opacity: 0; }
    100% { opacity: 1; }
}

@keyframes slideInRight {
    0% { opacity: 0; transform: translateX(100px); }
    100% { opacity: 1; transform: translateX(0); }
}

main {
    font-size: 1.1rem;
}

p, li, td, th {
    color: var(--black);
}

.table {
    background: rgba(255, 255, 255, 0.2);
    border-radius: 8px;
    backdrop-filter: blur(5px);
}

a:focus {
    outline: 3px solid var(--gold-accent);
    outline-offset: 3px;
}

#back-to-top {
    position: fixed;
    bottom: 20px;
    right: 20px;
    background-color: var(--navy-blue);
    color: var(--white);
    border: none;
    border-radius: 50%;
    width: 50px;
    height: 50px;
    font-size: 1.5rem;
    cursor: pointer;
    display: none;
    transition: background-color 0.3s ease, transform 0.3s ease;
}

#back-to-top:hover {
    background-color: var(--gold-accent);
    transform: scale(1.2);
}

.footer {
    background-color: var(--navy-blue);
    color: var(--white);
    padding: 2rem 0;
    margin-top: 2rem;
    opacity: 0;
    transition: opacity 0.6s ease;
}

.footer.visible {
    opacity: 1;
    animation: fadeIn 0.8s ease-out;
}

.footer h5 {
    font-family: 'Poppins', sans-serif;
    color: var(--white);
    margin-bottom: 1rem;
    border-bottom: 2px solid var(--gold-accent);
    padding-bottom: 0.5rem;
}

.footer p, .footer a {
    color: var(--white);
    font-size: 1rem;
    margin-bottom: 0.5rem;
    transition: color 0.3s ease;
}

.footer a:hover, .footer a:focus {
    color: var(--gold-accent);
    text-decoration: none;
}

.footer-nav, .footer-social {
    list-style: none;
    padding: 0;
}

.footer-nav li, .footer-social li {
    margin-bottom: 0.5rem;
    display: flex;
    align-items: center;
}

.footer i {
    margin-right: 0.5rem;
    font-size: 1.2rem;
}

.footer-sections {
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
    padding-bottom: 1rem;
    margin-bottom: 1rem;
}

.footer-section {
    padding: 1rem;
}

.footer-bottom {
    padding-top: 1rem;
}

.footer-cta {
    font-style: italic;
    margin-bottom: 0.5rem;
    font-size: 1.1rem;
}

.footer-copyright {
    font-size: 0.9rem;
    opacity: 0.8;
}

@media (max-width: 768px) {
    main {
        font-size: 1rem;
    }

    .profile-img {
        max-width: 150px;
    }

    .content-section {
        padding: 1rem;
    }

    .footer .col-md-3 {
        text-align: center;
    }
}