/* General body styling */
body {
    font-family: 'Roboto', sans-serif;
    margin: 0;
    padding: 0;
    background-color: #f9f9f9;
    color: #333;
    scroll-behavior: smooth;
    transition: background-color 0.3s, color 0.3s;
}

/* Dark mode styles */
body.dark-mode {
    background-color: #121212;
    color: #f0f0f0;
}

body.dark-mode .card,
body.dark-mode .card-panel {
    background-color: #1e1e1e;
    color: #f0f0f0;
}

body.dark-mode .white {
    background-color: #121212 !important;
}

body.dark-mode .grey.lighten-4 {
    background-color: #1a1a1a !important;
}

body.dark-mode .card-title {
    color: #64b5f6 !important;
}

body.dark-mode .collection,
body.dark-mode .collection-item {
    background-color: #1e1e1e;
    color: #f0f0f0;
    border-color: #333;
}

/* -----------------------------------
   Header & Navigation
------------------------------------- */
header {
    position: sticky;
    top: 0;
    z-index: 1000;
}

nav {
    box-shadow: 0 4px 6px rgba(0,0,0,0.2);
}

nav ul li a {
    transition: color 0.3s ease, background-color 0.3s ease;
}

nav ul li a:hover {
    background-color: rgba(255, 255, 255, 0.2);
}

nav ul li.active a {
    background-color: rgba(255, 255, 255, 0.3);
    font-weight: 500;
}

/* -----------------------------------
   About Hero Section
------------------------------------- */
#about-hero {
    padding: 5rem 1rem;
    background: linear-gradient(to right, #42a5f5, #64b5f6);
    color: #fff;
    text-align: center;
}

/* Remove the old gradient effect */
#about-hero:after {
    display: none;
}

/* Wave Animation */
.hero-waves {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 60px;
    overflow: hidden;
}

/* Dark mode adjustment for wave3 */
body.dark-mode .wave3 {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1200 120' preserveAspectRatio='none'%3E%3Cpath fill='rgba(18, 18, 18, 1)' d='M0,0V46.29c47.79,22.2,103.59,32.17,158,28,70.36-5.37,136.33-33.31,206.8-37.5C438.64,32.43,512.34,53.67,583,72.05c69.27,18,138.3,24.88,209.4,13.08,36.15-6,69.85-17.84,104.45-29.34C989.49,25,1113-14.29,1200,52.47V0Z'/%3E%3C/svg%3E");
}

@keyframes wave-animation {
    0% {
        transform: translateX(0) translateZ(0) scaleY(1);
    }
    50% {
        transform: translateX(-25%) translateZ(0) scaleY(0.9);
    }
    100% {
        transform: translateX(-50%) translateZ(0) scaleY(1);
    }
}

/* -----------------------------------
   Section Styling
------------------------------------- */
.section {
    padding: 4rem 0;
}

.section-title {
    margin-bottom: 2rem;
    font-weight: 500;
    color: #1565c0;
    position: relative;
    padding-bottom: 15px;
}

body.dark-mode .section-title {
    color: #64b5f6;
}

.section-title:after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 3px;
    background-color: #1565c0;
}

body.dark-mode .section-title:after {
    background-color: #64b5f6;
}

/* Glass card effect */
.glass-card {
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-radius: 10px;
    border: 1px solid rgba(255, 255, 255, 0.18);
    box-shadow: 0 8px 32px 0 rgba(31, 38, 135, 0.37);
    transition: transform 0.3s ease;
}

.glass-card:hover {
    transform: translateY(-5px);
}

/* -----------------------------------
   Experience Section
------------------------------------- */
#experience .card-title {
    font-weight: 500;
    margin-bottom: 10px;
}

#experience .collection {
    border: none;
    margin: 0;
}

#experience .collection-item {
    border-bottom: 1px solid #e0e0e0;
    padding: 15px;
    line-height: 1.5;
}

#experience .collection-item:last-child {
    border-bottom: none;
}

/* -----------------------------------
   Education Section
------------------------------------- */
.education-card {
    transition: transform 0.3s ease;
    height: 100%;
}

.education-card:hover {
    transform: translateY(-8px);
}

.education-card .card-title {
    font-weight: 500;
    margin-bottom: 10px;
}

/* -----------------------------------
   Skills & Tech Section
------------------------------------- */
.skill-card {
    transition: transform 0.3s ease;
    height: 100%;
}

.skill-card:hover {
    transform: scale(1.05);
}

.skill-icon {
    padding: 20px 0;
}

.tech-icons {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 30px;
    margin-top: 30px;
}

.tech-icon {
    width: 60px;
    height: 60px;
    transition: transform 0.3s ease;
}

.tech-icon:hover {
    transform: translateY(-10px);
}

.tech-icon img {
    width: 100%;
    height: 100%;
}

/* -----------------------------------
   Achievements & Publications
------------------------------------- */
.achievement-item,
.publication-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 20px;
}

.achievement-item h5,
.publication-item h5 {
    margin: 15px 0 10px;
    color: #1565c0;
}

body.dark-mode .achievement-item h5,
body.dark-mode .publication-item h5 {
    color: #64b5f6;
}

/* -----------------------------------
   Quote Section
------------------------------------- */
#quote {
    padding: 3rem 0;
}

.fancy-quote {
    font-style: italic;
    font-size: 1.5rem;
    position: relative;
    padding: 20px 40px;
    margin: 0;
}

.fancy-quote:before,
.fancy-quote:after {
    content: '"';
    font-size: 4rem;
    position: absolute;
    opacity: 0.3;
}

.fancy-quote:before {
    top: -20px;
    left: 0;
}

.fancy-quote:after {
    bottom: -60px;
    right: 0;
}

/* -----------------------------------
   Footer & Back-to-top
------------------------------------- */
footer {
    padding: 1.5rem 0;
}

/* -----------------------------------
   Back-to-Top Button
------------------------------------- */

#back-to-top {
    position: fixed;
    bottom: 20px;
    right: 20px;
    display: none;
    z-index: 999;
    opacity: 0;
    transition: all 0.3s ease;
    width: 45px;
    height: 45px;
    background-color: #1565c0;
    color: white;
    border-radius: 50%;
    text-align: center;
    box-shadow: 0 2px 5px rgba(0,0,0,0.3);
}

body.dark-mode #back-to-top {
    background-color: #64b5f6;
    color: #121212;
}

#back-to-top.visible {
    display: block;
    opacity: 1;
}

#back-to-top:hover {
    transform: translateY(-3px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.3);
}

/* -----------------------------------
   Responsive Design
------------------------------------- */
@media only screen and (max-width: 992px) {
    #about-hero {
        padding: 4rem 1rem;
    }
    
    .section {
        padding: 3rem 0;
    }
}

@media only screen and (max-width: 600px) {
    #about-hero {
        padding: 3rem 1rem;
    }
    
    .section {
        padding: 2rem 0;
    }
    
    .fancy-quote {
        font-size: 1.2rem;
        padding: 10px 30px;
    }
    
    .tech-icons {
        gap: 20px;
    }
    
    .tech-icon {
        width: 50px;
        height: 50px;
    }
}