/* Existing styles */
body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    color: #ccc;
    margin: 0;
    padding: 0;
    background-color: #121212;
}

.header-content {
    position: relative;
    text-align: center;
    color: white;
    padding: 2em 0;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    height: 100%;
}

.header-content h1 {
    margin: 0;
    font-size: 3em;
    animation: fadeInDown 1s ease-in-out;
}

.header-content p {
    margin: 0;
    font-size: 1.5em;
    animation: fadeInDown 1s ease-in-out;
}

nav ul {
    list-style-type: none;
    padding: 0;
}

nav ul li {
    display: inline;
    margin: 0 15px;
    animation: fadeInUp 1s ease-in-out;
}

nav ul li a {
    color: #ccc;
    text-decoration: none;
    font-size: 1.2em;
    transition: color 0.3s, text-decoration 0.3s;
}

nav ul li a:hover {
    color: #00aaff;
    text-decoration: underline;
}

section {
    padding: 2em;
    background-color: #1e1e1e;
    margin: 2em;
    border-radius: 10px;
    animation: fadeIn 1s ease-in-out;
}

section h2 {
    color: #005f99; 
    animation: fadeInLeft 1s ease-in-out;
    font-size: 2.5em; /* Increased font size */
}

a {
    color: #1e90ff; /* Dodger Blue */
    text-decoration: underline; 
    transition: color 0.3s, text-decoration 0.3s;
    animation: fadeInRight 1s ease-in-out;
}

a:hover {
    color: #104e8b; /* Darker Blue */
}

footer {
    text-align: center;
    padding: 1em 0;
    background-color: #1e1e1e;
    color: #ccc;
    animation: fadeInUp 1s ease-in-out;
}

.gallery {
    display: flex;
    flex-wrap: wrap;
    gap: 1em;
    padding: 1em;
}

.gallery img {
    width: 100%;
    max-width: 20%;
    height: auto;
    cursor: pointer;
    transition: transform 0.2s, opacity 0.2s;
    object-fit: cover;
}

.gallery img:hover {
    transform: scale(1.05);
}

.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0, 0, 0, 0.8);
}

.modal-content {
    margin: auto;
    display: block;
    max-width: 80%;
    max-height: 80%;
    width: auto;
    height: auto;
    object-fit: contain;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

.modal .close {
    position: absolute;
    top: 15px;
    right: 35px;
    color: #fff;
    font-size: 40px;
    font-weight: bold;
}

.modal .close:hover,
.modal .close:focus {
    color: #bbb;
    text-decoration: none;
    cursor: pointer;
}

.modal .prev, .modal .next {
    cursor: pointer;
    position: absolute;
    top: 50%;
    width: auto;
    padding: 16px;
    margin-top: -22px;
    color: white;
    font-weight: bold;
    font-size: 30px; /* Increased font size for bigger buttons */
    transition: 0.3s;
    user-select: none;
    text-decoration: none; /* Remove underline */
}

.modal .prev {
    left: 10px; /* Move button closer to the edge */
}

.modal .next {
    right: 10px; /* Move button closer to the edge */
}

.modal .prev:hover, .modal .next:hover {
    color: #bbb;
}

.fade-in {
    opacity: 0;
    transition: opacity 1s ease-in-out;
}

.fade-in.visible {
    opacity: 1;
}

.slide-in {
    transform: translateX(-100%);
    transition: transform 1s ease-in-out;
}

.slide-in.visible {
    transform: translateX(0);
}

.zoom-in {
    transform: scale(0);
    transition: transform 0.5s ease-in-out;
}

.zoom-in.visible {
    transform: scale(1);
}

.fade-in-left {
    opacity: 0;
    transform: translateX(-20px);
    transition: opacity 1s ease-in-out, transform 1s ease-in-out;
}

.fade-in-left.visible {
    opacity: 1;
    transform: translateX(0);
}

.parallax {
    background-image: url('stars-background.jpg');
    min-height: 400px;
    background-attachment: fixed;
    background-position: center;
    background-repeat: no-repeat;
    background-size: cover;
    display: flex;
    justify-content: center;
    align-items: center;
}

/* New styles for the home section */
#home {
    padding: 2em;
    background-color: #1e1e1e;
    margin: 2em;
    border-radius: 10px;
    animation: fadeIn 1s ease-in-out;
}

#home h2 {
    color: #005f99;
    animation: fadeInLeft 1s ease-in-out;
    width: 100%; /* Ensure the heading takes full width */
}

.home-content {
    display: flex;
    align-items: center;
    gap: 2em;
    flex-wrap: wrap; /* Allow wrapping for smaller screens */
}

.home-content img {
    width: 40%; /* Set the desired width */
    max-width: 400px; /* Set the maximum width */
    height: auto;
    flex-shrink: 0;
}

.home-content p {
    width: 50%;
    flex-grow: 1;
    margin: 0;
}

#contact {
    padding: 2em;
    background-color: #1e1e1e;
    margin: 2em;
    border-radius: 10px;
    animation: fadeIn 1s ease-in-out;
}

#contact h2 {
    color: #005f99;
    animation: fadeInLeft 1s ease-in-out;
}

#contact a {
    color: #1e90ff; /* Dodger Blue */
    text-decoration: none;
    transition: color 0.3s, text-decoration 0.3s;
}

#contact a:hover {
    color: #104e8b; /* Darker Blue */
}

#projects p {
    font-size: 1.5em; /* Increased font size */
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

@keyframes fadeInDown {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeInLeft {
    from {
        opacity: 0;
        transform: translateX(-20px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes fadeInRight {
    from {
        opacity: 0;
        transform: translateX(20px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes slideIn {
    from {
        transform: translateX(-100%);
    }
    to {
        transform: translateX(0);
    }
}

@keyframes zoomIn {
    from {
        transform: scale(0);
    }
    to {
        transform: scale(1);
    }
}

/* Compatibility with forced dark mode */
@media (prefers-color-scheme: dark) {
    body {
        color: #ccc;
        background-color: #121212;
    }

    a {
        color: #1e90ff;
    }

    a:hover {
        color: #104e8b;
    }

    nav ul li a {
        color: #ccc;
    }

    nav ul li a:hover {
        color: #00aaff;
    }

    footer {
        background-color: #1e1e1e;
    }
}
