/* General Layout and Body */
body {
    font-family: 'Montserrat', sans-serif;
    margin: 0;
    padding: 0;
    background-image: url('images/background.jpg');
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    background-color: #d9f1ff;
    line-height: 1.6;
    transition: all 0.3s ease;
}

/* Dark Mode Styling */
.dark-mode {
    background-image: url('images/dark-mode.jpg');
    background-color: #121212;
    color: white;
}

.dark-mode header p,
.dark-mode #h1-dark-mode-change,
.dark-mode p,
.dark-mode figcaption,
.dark-mode ul,
.dark-mode ol {
    color: white;
}

/* Header and Text */
header {
    text-align: center;
    padding: 0 20px;
    margin-bottom: 5px;
}

header h1 {
    font-size: 4rem;
    margin: 0;
    color: #000;
}

header p {
    font-size: 1.3rem;
    color: #666;
    margin: 0 0 10px;
    transition: color 0.3s ease;
}

#h1-dark-mode-change {
    color: #000;
    transition: color 0.3s ease;
}

.dark-mode #h1-dark-mode-change {
    color: #399bd8;
}

/* Navigation */
nav ul {
    list-style: none;
    text-align: center;
    margin: 0;
    padding: 0;
}

nav ul li {
    display: inline;
    margin: 0 6px;
}

nav ul li a {
    color: #f78a2f;
    font-weight: bold;
    text-decoration: none;
    font-size: 20px;
    padding: 2px 5px;
}

nav ul li a:hover {
    text-decoration: underline;
}

/* Main Content */
main h1 {
    font-size: 3rem;
    text-align: center;
    color: #f78a2f;
    margin: 10px 0 20px;
    line-height: 1.4;
}

.content {
    text-align: center;
    padding: 20px 10px;
    max-width: 1000px;
    margin: 0 auto;
}

/* Flex Containers */
.home-text-and-image {
    display: flex;
    align-items: flex-start;
    justify-content: center;
    gap: 20px;
    margin-bottom: 20px;
    max-width: 1000px;
    margin: 0 auto;
    padding: 0 50px;
}

.text-and-image {
    display: flex;
    align-items: flex-start;
    justify-content: center;
    gap: 20px;
    margin-bottom: 20px;
    max-width: 1000px;
    margin: 0 auto;
}

.image-column {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.image-column img {
    max-width: auto;
    border-radius: 8px;
    display: block;
}

.text-column {
    flex: 1;
    text-align: justify;
    font-size: 1.2rem;
    line-height: 1.6;
}

.generic-image {
    max-width: 350px;
    border-radius: 8px;
    display: block;
}

/* Skills and Grades Scroll */
.skills-container,
.grades-container {
    text-align: center;
    margin-top: 5px;
    padding: 0;
}

.skills-scroll,
.grades-scroll {
    display: flex;
    overflow: hidden;
    white-space: nowrap;
    gap: 50px;
    padding: 10px 0;
}

.skill-item,
.grade-item {
    flex-shrink: 0;
    transition: transform 0.3s ease;
}

.skill-item {
    height: 70px;
    object-fit: contain;
}

.grade-item {
    font-size: 18px;
    font-weight: bold;
    color: #f78a2f;
    margin-right: 20px;
    padding: 5px 10px;
}

.grade-item:hover,
.skill-item:hover {
    transform: scale(1.2);
}

.skill-tooltip,
.grade-tooltip {
    position: absolute;
    background-color: rgba(0, 0, 0, 0.85);
    color: white;
    padding: 8px 12px;
    border-radius: 5px;
    font-size: 14px;
    max-width: 250px;
    white-space: normal;
    word-wrap: break-word;
    display: none;
    z-index: 1000;
    box-shadow: 0px 4px 6px rgba(0, 0, 0, 0.2);
}

/* Button Styles */
button {
    padding: 10px 20px;
    font-size: 16px;
    cursor: pointer;
    border: none;
    background-color: transparent;
    color: white;
    border-radius: 5px;
    position: absolute;
    margin: 20px;
    right: 10px;
    z-index: 50;
}

button img {
    width: 50px;
    height: 50px;
}

/* Typing Text Effect */
#typing-text {
    font-size: 1.3rem;
    color: #666;
    white-space: nowrap;
    overflow: hidden;
    border-right: 2px solid #666;
    animation: blink-cursor 0.7s steps(2) infinite;
}

.dark-mode #typing-text {
    color: white;
    border-right: 2px solid white;
}

@keyframes blink-cursor {
    0%, 100% {
        border-color: transparent;
    }
    50% {
        border-color: #666;
    }
}

/* Lists */
main p,
ul,
ol {
    font-size: 1.2rem;
    line-height: 1.6;
    color: #666;
    text-align: justify;
    margin-bottom: 30px;
    padding: 0 15px;
}

ul ul {
    list-style: circle;
    margin: 5px 0 5px 20px;
}

/* Figures and Captions */
figcaption {
    text-align: center;
    font-size: 1em;
    font-style: italic;
    margin-top: 5px;
    color: #555;
}

/* Image Containers */
.research-image,
.audience-award2 {
    border-radius: 8px;
    display: block;
    margin: 0 auto;
}

.audience-award2 {
    max-width: 700px;
}

a {
    color: #1E90FF;
}

.dark-mode a {
    color: #FFD700; 
}

.dark-mode nav a {
    color: #f78a2f;
}

/* Logo */
.logo {
    float: right;
    margin-left: 10px;
    max-width: 50px;
    border-radius: 8px;
}

/* Responsive Design */
@media (max-width: 768px) {
    header h1 {
        font-size: 2.5rem;
    }

    header p {
        font-size: 1rem;
    }

    .home-text-and-image,
    .text-and-image {
        flex-direction: column;
        align-items: center;
        justify-content: center;
        text-align: center;
        padding: 0 20px;
    }

    .image-column {
        width: 100%;
        display: flex;
        flex-direction: row;
        flex-wrap: wrap;
        justify-content: center;
        align-items: center;
    }

    .image-column img {
        max-width: 100%;
        width: 80%; 
        height: auto;
        margin: 10px 0;
        display: block;
    }

    .text-column {
        text-align: center;
        font-size: 1.2rem;
        width: 100%;
    }
    .generic-image {
        max-width: 350px;
        width: 90%;
        display: block;
        margin: 0 auto;
    }

    .research-image,
    .audience-award2 {
        max-width: 450px;
        width: 90%;
        display: block;
        margin: 0 auto;
    }

    button {
        padding: 9px 18px;
        font-size: 15px;
        margin: 10px;
        top: 100px;          
        right: 8px;       
        position: absolute; 
    }

    button img {
        width: 40px;       
        height: 40px;       
    }

    ul, ol {
        padding-left: 30px; 
    }
}

@media (max-width: 480px) {
    header h1 {
        font-size: 2rem;
    }

    nav ul li a {
        font-size: 16px;
    }

    .generic-image {
        max-width: 300px;
        width: 100%;
        display: block;
        margin: 0 auto;
    }

    .research-image,
    .audience-award2 {
        max-width: 400px;
        width: 100%;
        display: block;
        margin: 0 auto;
    }

    .text-column {
        font-size: 1rem;
        text-align: center;
    }

    button {
        padding: 8px 15px;
        font-size: 14px;
        margin: 10px;
        top: 90px;         
        right: 5px;        
        position: absolute;
    }

    button img {
        width: 30px;       
        height: 30px;      
    }

    ul, ol {
        padding-left: 25px; 
    }
}
