/* Body Reset */
body {
    background: linear-gradient(135deg, #1C1C1C, #333333);
    background-attachment: fixed;
    /* Fix the background to avoid breaks */
    background-size: cover;
    /* Ensures the gradient covers the entire page */
    background-color: #1C1C1C;
    color: white;
}

/* Removing background color from main */
main {
    background: none;
    /* No own background for the main element */
    margin-top: 60px;
    /* Space for the fixed header */
    margin-left: 25%;
    margin-right: 25%;
    text-align: center;
    font-size: x-large;
}

/* Move title towards the middle */
.page h2 {
    margin-top: 100px;
}

/* Header Navigation Styling */
.header-bar {
    background-color: rgba(0, 0, 0, 0.9);
    display: flex;
    justify-content: flex-start;
    align-items: center;
    padding: 10px 20px;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    box-sizing: border-box;
    overflow-x: auto;
    white-space: nowrap;
}

/* Adjustment only for the English header */
.english-header {
    justify-content: center;
    gap: 30px;
}

.english-header .nav-link {
    flex: 1;
    text-align: center;
}

.nav-link {
    margin: 0 50px;
    color: white;
    text-decoration: none;
    font-size: 24px;
    font-weight: bold;
}

.nav-link.active {
    color: #FFCC00 !important;
}

/* Language switcher styling */
.language-switcher {
    display: flex;
    align-items: center;
    gap: 10px;
}

.language-flag {
    width: 30px;
    height: 20px;
    cursor: pointer;
    margin-left: 10px;
    display: inline-block;
    background-size: cover;
    background-position: center;
}

/* Opacity for the active and inactive flag */
.inactive-flag {
    opacity: 0.1;
}

.active-flag {
    opacity: 0.3;
}

/* Create space for the header */
main {
    margin-top: 60px;
    text-align: center;
    font-size: x-large;
}

/* Welcome text and icon styling */
main h2 {
    font-size: 24px;
    color: white;
}

.icon-left,
.icon-right {
    margin: 0 30px;
}

.person-icon,
.career-icon,
.education-icon,
.skills-icon,
.contact-icon {
    margin-top: 20px;
    transition: transform 0.3s;
    width: 30%;
}

.person-icon:hover,
.career-icon:hover,
.education-icon:hover,
.skills-icon:hover,
.contact-icon:hover {
    transform: scale(1.1);
}

/* Animations */
@keyframes slideIn {
    from {
        transform: translateX(100%);
        opacity: 0;
    }

    to {
        transform: translateX(0);
        opacity: 1;
    }
}

@keyframes slideOut {
    from {
        transform: translateX(0);
        opacity: 1;
    }

    to {
        transform: translateX(100%);
        opacity: 0;
    }
}

/* Add animation to the page */
.page {
    animation: slideIn 0.5s forwards;
}

/* Class for sliding out, added via JavaScript */
.page.out {
    animation: slideOut 0.5s forwards;
}

/* Header text styling for Home and other pages */
.header-bar h1 {
    font-size: 24px;
    margin: 0;
    color: black;
    flex-grow: 1;
    text-align: center;
}

/* Button styling for Career and Education sections */
.career-timeline,
.education-timeline {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-top: 20px;
}

.career-button,
.education-button {
    background-color: #FFCC00;
    color: white;
    border: none;
    padding: 10px 20px;
    margin: 60px 0;
    font-size: 28px;
    border-radius: 10px;
    cursor: pointer;
    transition: transform 0.5s, opacity 0.5s; /* Apply smooth transition for both transform and opacity */
}

.career-button:hover,
.education-button:hover {
    background-color: #0047FF;
    transform: 0.5s;
    opacity: 0.5s;
}

/* Skills styling */
.skills-container {
    margin-top: 80px;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.skill {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 80%;
    margin: 20px 0;
}

.skill-rating {
    display: flex;
    gap: 10px;
}

.skill-rating span {
    display: inline-block;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    border: 2px solid #FFCC00;
}

.filled {
    background-color: #FFCC00;
}

/* Contact form styling */
.contact-form {
    background-color: rgba(0, 0, 0, 0.9);
    padding: 20px 40px;
    border-radius: 10px;
    width: 80%;
    max-width: 600px;
    margin: 0 auto;
    margin-top: 50px;
}

.contact-form label {
    display: block;
    margin-bottom: 10px;
    font-size: 18px;
    color: white;
    text-align: center;
}

.contact-form input[type="text"],
.contact-form input[type="email"],
.contact-form textarea {
    width: 100%;
    padding: 10px;
    margin-bottom: 20px;
    border: none;
    border-radius: 5px;
    font-size: 16px;
    color: black;
    box-sizing: border-box;
}

.contact-form input[type="submit"] {
    background-color: #FFCC00;
    color: #1C1C1C;
    padding: 10px 20px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 18px;
    width: 100%;
}

.contact-form input[type="submit"]:hover {
    background-color: #FFCC00;
}

/* Back-to-Top button styling */
#backToTop {
    position: fixed;
    right: 20px;
    bottom: 20px;
    width: 75px;
    height: 100px;
    display: flex;
    flex-direction: column;
    align-items: center;
    cursor: pointer;
    z-index: 1000;
    opacity: 0.8;
    transition: transform 0.3s, opacity 0.3s; /* Apply smooth transition for both transform and opacity */
}

#backToTop:hover {
    transform: scale(1.2);
}

.nav-link:hover {
    color: #FFCC00; /* Change text color on hover */
    transition: color 0.3s ease; /* Smooth transition */
}

#backToTop:hover .arrow-up {
    /* border-bottom-width: 36px; */
    transform: scale(1.1); /* Slightly enlarge both icon and text on hover */
    /* border-bottom-color: #0047FF; */
    transition: 1.1;
}

#backToTop:hover .back-to-top-text {
    font-size: 18px;
}

.arrow-up {
    width: 0;
    height: 0;
    border-left: 15px solid transparent;
    border-right: 15px solid transparent;
    border-bottom: 30px solid #FFCC00;
    margin-bottom: 10px;
}

.back-to-top-text {
    font-size: 16px;
    color: white;
    margin-top: 2px;
    text-align: center;
    opacity: 0.8;
}

/* Timeline styling */
.timeline-section {
    margin: 40px 0;
    padding: 0;
    border-left: none;
    background-color: transparent;
}

.timeline-header {
    width: 100%;
    margin-bottom: 10px;
}

.timeline-header h3 {
    background-color: #FFCC00;
    color: #FFFFFF;
    padding: 10px;
    text-align: center;
    font-size: 2rem;
    width: 100%;
    box-sizing: border-box;
    border-radius: 8px;
}

.timeline-content {
    padding: 10px;
    background-color: transparent;
    border-radius: 8px;
    color: #FFFFFF;
}

.timeline-content h3 {
    margin-top: 0;
    color: wheat;
}

.timeline-content h2 {
    margin-top: auto;
    color: wheat;
}

.timeline-content p {
    margin: 5px 0;
}

.timeline-content ul {
    padding-left: 20px;
}

.timeline-content ul li {
    list-style-type: disc;
    margin-bottom: 15px;
}

.timeline-content ul li::marker {
    color: white;
}

/* Image adjustments in the "About Me" section */
.about-image img {
    max-width: 100%;
    height: auto;
    border-radius: 10px;
}

/* GitHub cat icon and text container styling */
.github-link {
    position: fixed;
    left: 20px;
    bottom: 20px;
    max-width: 20%;
    display: flex;
    flex-direction: column;
    align-items: center;
    cursor: pointer;
    z-index: 1000;
    opacity: 1;
    transition: transform 0.3s, opacity 0.3s; /* Apply smooth transition for both transform and opacity */
    text-decoration: none;
}

/* Icon styling */
.github-cat {
    max-width: 20%; /* Ensure the icon fills the container width */
    max-height: 20%; /* Ensure the icon height adapts to the container */
    transition: inherit; /* Inherit transition behavior from parent */
}

/* Styling for the text below the GitHub icon */
.github-text {
    color: white;
    font-size: 16px;
    margin-top: 5px; /* Add space between the icon and text */
    text-align: center;
    transition: inherit; /* Inherit transition behavior from parent */
    text-decoration: none;
}

/* Hover effect on the entire link (icon + text) */
.github-link:hover {
    transform: scale(1.1); /* Slightly enlarge both icon and text on hover */
    opacity: 1; /* Make the icon and text fully visible */
}



/* Mobile adjustments */
@media (max-width: 768px) {
    .header-bar {
        display: block;
        overflow-x: auto;
        white-space: nowrap;
        padding: 10px 0;
        position: fixed;
    }

    .nav-link {
        font-size: 16px;
        display: inline-block;
    }

    .language-switcher {
        position: fixed;
        top: 50px;
        left: 20px;
        display: flex;
        gap: 10px;
        z-index: 1000;
    }

    main h2 {
        font-size: 20px;
        text-align: center;
    }

    main p,
    main ul,
    main li {
        font-size: 16px;
        text-align: center;
    }

    main {
        margin-top: 120px;
        margin-left: 0;
        margin-right: 0;
    }

    .person-icon,
    .career-icon,
    .education-icon,
    .skills-icon,
    .contact-icon {
        width: 50%;
        height: auto;
        margin-top: 30px;
    }

    .skills-container {
        width: 100%;
    }

    .skill {
        flex-direction: column;
    }

    .contact-form {
        padding: 10px;
    }

    .career-button,
    .education-button {
        font-size: 20px;
        padding: 8px 16px;
    }

    .timeline-content {
        text-align: center;
    }

    .timeline-header h3 {
        font-size: 1.5rem;
        padding: 15px;
        width: 90%;
        margin: 0 auto;
        display: inline-block;
    }

    .about-image img {
        width: 80%;
        margin: 0 auto;
        display: block;
    }

    #backToTop:hover {
        transform: none;
    }

    #backToTop:hover .arrow-up {
        border-bottom-width: 30px;
        border-bottom-color: #FFCC00;
    }

    #backToTop:hover .back-to-top-text {
        font-size: 16px;
    }

    #backToTop {
        right: 20px;
        bottom: 40px;
        position: fixed;
    }
}

.language-switcher {
    margin-left: auto;
    display: flex;
    align-items: center;
}

.language-flag {
    width: 30px;
    height: 20px;
    object-fit: contain;
    background-color: rgba(0, 0, 0, 0.1);
}

@supports (-webkit-touch-callout: none) {
    .header-bar {
        position: sticky;
        top: 0;
        z-index: 1000;
    }
}

/* Toggle switch styles */
.theme-switch-wrapper {
    position: fixed;
    top: 80px;
    right: 20px;
    z-index: 100;
}

.theme-switch {
    display: inline-block;
    height: 34px;
    position: relative;
    width: 60px;
}

.theme-switch input {
    display: none;
}

.slider {
    background-color: #ccc;
    bottom: 0;
    cursor: pointer;
    left: 0;
    position: absolute;
    right: 0;
    top: 0;
    transition: 0.4s;
    border-radius: 34px;
}

.slider:before {
    background-color: white;
    bottom: 4px;
    content: "";
    height: 26px;
    left: 4px;
    position: absolute;
    transition: 0.4s;
    width: 26px;
    border-radius: 50%;
}

.slider.round:before {
    background-size: cover;
}

input:checked + .slider {
    background-color: #333;
}

input:checked + .slider::before {
    transform: translateX(26px);
}

/* Light mode adjustments */
body.light-mode {
    background: linear-gradient(135deg, #D3D3D3, #FFFFFF);
    background-size: 100% 100%;
    background-attachment: fixed;
    color: #333;
}

body.light-mode .skill-rating span {
    display: inline-block;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    border: 2px solid #0047FF !important;
}

body.light-mode .filled {
    background-color: #0047FF;
}

body.light-mode h2 {
    color: darkgray;
}

body.light-mode ul li::marker {
    color: black;
}

body.light-mode ul {
    color: black;
}

body.light-mode .nav-link:hover {
    color: darkgray;
    transition: color 0.3s ease;
}

body.light-mode h3 {
    color: black;
}

body.light-mode .header-bar {
    background-color: #0047FF;
}

body.light-mode .nav-link {
    color: wheat;
}

body.light-mode .nav-link.active {
    color: darkgray !important;
}

body.light-mode .career-button,
body.light-mode .education-button,
body.light-mode .contact-form input[type="submit"] {
    background-color: #0047FF;
    color: wheat;
}

body.light-mode .timeline-header h3 {
    background-color: #0047FF;
    color: wheat;
}

body.light-mode .career-button:hover,
body.light-mode .education-button:hover {
    background-color: darkgray;
}

body.light-mode .slider {
    background-color: #ccc;
}

body.light-mode .back-to-top-text {
    color: black;
}

body.light-mode .github-text{
    color: black;
}

/* body.light-mode #backToTop:hover .arrow-up {
    border-bottom-color: darkgray;
} */

body.light-mode .arrow-up {
    border-bottom: 30px solid #0047FF;
}