html, body {
    scroll-behavior: smooth;
    overflow-x: hidden;
}

:root {
    --background-color: #ffffff;
    --text-color: #000000;
    --navbar-bg-color: #f4f4f4;
    --navbar-text-color: #333;
}

body.dark-mode {
    --background-color: #121212;
    --text-color: #ffffff;
    --navbar-bg-color: #333;
    --navbar-text-color: #f4f4f4;
}

body {
    font-family: "Helvetica Neue", Arial, sans-serif;
    margin: 0;
    padding: 0;
    transition: background-color 0.3s, color 0.3s;
    background-color: var(--background-color);
    color: var(--text-color);
}

.theme-toggle {
    position: fixed;
    top: 100px;
    right: 15px;
    z-index: 101;
}

#theme-toggle-btn {
    background-color: var(--navbar-bg-color);
    color: var(--navbar-text-color);
    border: none;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    cursor: pointer;
    font-size: 1.2rem;
    transition: background-color 0.3s, color 0.3s;
    position: relative;
}

#theme-toggle-btn::before {
    content: attr(data-tooltip);
    position: absolute;
    top: 50%;
    right: 50px;
    transform: translateY(-50%);
    background-color: var(--text-color);
    color: var(--background-color);
    padding: 5px 10px;
    border-radius: 5px;
    font-size: 0.8rem;
    white-space: nowrap;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s;
}

#theme-toggle-btn:hover::before {
    opacity: 1;
}

.navbar {
    z-index: 1000;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 2rem;
    background-color: var(--navbar-bg-color);
    color: var(--navbar-text-color);
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    transition: top 0.3s ease;
}

.navbar.hidden {
    top: -100px;
}

.navbar-logo a {
    color: var(--navbar-text-color);
    text-decoration: none;
    font-size: 1.5rem;
    font-weight: bold;
    letter-spacing: 0.5px;
}

.navbar-links {
    display: flex;
    list-style: none;
}

.navbar-links li {
    margin-left: 2rem;
}

.navbar-links a {
    color: var(--navbar-text-color);
    text-decoration: none;
    font-size: 1rem;
    padding: 0.5rem;
    transition: color 0.3s ease;
}

.navbar-links a:hover {
    color: #555;
}

.navbar-toggle {
    display: none;
    flex-direction: column;
    cursor: pointer;
}

.navbar-toggle .bar {
    width: 25px;
    height: 4px;
    margin: 5px 0;
    background-color: var(--navbar-text-color);
}

#home {
    margin-top: 80px;
    padding: 4rem 2rem;
    text-align: center;
}

.home-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    max-width: 1200px;
    margin: 0 auto;
}

.home-photo {
    width: 250px;
    height: 250px;
    border-radius: 50%;
    object-fit: cover;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
}

.home-container p {
    line-height: 1.8;
    font-size: 1.2rem;
    max-width: 600px;
}

.intro-line {
    font-weight: 900;
    font-size: larger;
    font-style: oblique;
}

.Skills-container {
    display: flex;
    justify-content: space-between;
    gap: 2.5rem;
    margin: 2rem auto;
    padding: 0 2rem;
    max-width: 1200px;
}

.skill {
    flex: 1 1 30%;
    background-color: var(--background-color);
    color: var(--text-color);
    padding: 1.5rem;
    border-radius: 20px;
    box-shadow: 0 4px 8px var(--text-color);
    text-align: center;
    margin: 0 1rem;
    transition: background-color 0.3s, color 0.3s;
    position: relative;
}

.skil-photo {
    width: 200px;
    height: 150px;
    border-radius: 15%;
    object-fit: cover;
    margin: 15px auto 1rem;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.skill h3 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
}

.skill p {
    font-size: 1.2rem;
    margin-bottom: 1rem;
}

.skill a {
    display: inline-block;
    margin: 0.5rem;
    padding: 0.5rem 1rem;
    background-color: #333;
    color: white;
    text-decoration: none;
    border-radius: 4px;
    transition: background-color 0.3s ease;
}

.skill a:hover {
    background-color: #555;
}

.skill-item {
    font-size: 24px;
    text-align: center;
    padding: 10px;
    transition: transform 0.3s ease-in-out, color 0.3s ease;
}

.skill-item:hover {
    transform: scale(1.1);
    color: #ff6347;
}

.subtitle {
    font-size: 2rem;
    text-align: center;
    margin-bottom: 1.5rem;
    color: var(--text-color);
}

#education {
    padding: 2rem;
    background-color: var(--background-color);
    color: var(--text-color);
}

.timeline {
    display: flex;
    flex-direction: column;
    gap: 2rem;
    align-items: center;
}

.timeline-item {
    background-color: var(--background-color);
    color: var(--text-color);
    padding: 1rem;
    border-radius: 8px;
    box-shadow: 0 4px 10px var(--text-color);
    transition: background-color 0.3s, color 0.3s;
    width: 80%;
    text-align: center;
}

.timeline-item h3 {
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
}

.timeline-item p {
    margin: 0.5rem 0;
}

.project {
    display: flex;
    justify-content: space-around;
    align-items: stretch;
    flex-wrap: wrap;
    gap: 0.5rem;
    padding: 2rem;
}

.pro {
    margin: 0 0.5rem;
    max-width: 450px;
    background-color: var(--background-color);
    color: var(--text-color);
    padding: 1.5rem;
    border-radius: 20px;
    box-shadow: 0 4px 8px var(--text-color);
    text-align: center;
    transition: background-color 0.3s, color 0.3s;
    position: relative;
}

.pro a {
    display: inline-block;
    margin: 0.5rem;
    padding: 0.5rem 1rem;
    background-color: #333;
    color: white;
    text-decoration: none;
    border-radius: 4px;
    transition: background-color 0.3s ease;
}

.pro a:hover {
    background-color: #555;
}

.propho {
    width: 200px;
    height: 200px;
    border-radius: 15%;
    object-fit: cover;
    margin: 15px auto;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.connect-section {
    padding: 3rem 2rem;
    background-color: var(--background-color);
    color: var(--text-color);
    text-align: center;
    margin: 3rem 0;
    border-radius: 8px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.subtitle {
    font-size: 2rem;
    font-weight: bold;
    margin-bottom: 2rem;
    margin-top: 2rem;
}

.connect-section p {
    color: var(--text-color);
    margin-bottom: 2rem;
}

.contact-links {
    display: flex;
    justify-content: center;
    gap: 1rem;
}

.contact-link {
    display: inline-block;
    text-decoration: none;
    outline: none;
}

.conlogo {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
    margin-right: 8px;
    transition: transform 0.3s;
}

.conlogo:hover {
    transform: scale(1.1);
}

.contact-link:focus {
    outline: none;
}

h1 {
    font-size: 36px;
    text-align: center;
    color: #fff;
    text-shadow: 0 0 10px #FFFFFF, 0 0 20px #FFFFFF, 0 0 30px #FFFFFF, 0 0 40px #FFFFFF;
    animation: glow 1.5s infinite alternate;
}

.contact-form {
    background-color: #f9f9f9;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
    margin-top: 30px;
    margin-bottom: 0px;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

body.dark-mode .contact-form {
    background-color: #333;
    color: #fff;
}

.contact-form h3 {
    font-size: 24px;
    margin-bottom: 15px;
    color: var(--text-color);
    text-align: center;
}

.contact-form .form-group {
    margin-bottom: 20px;
    text-align: left;
}

.contact-form label {
    display: block;
    font-weight: bold;
    margin-bottom: 8px;
    color: var(--text-color);
}

.contact-form input,
.contact-form textarea {
    width: 100%;
    padding: 10px;
    font-size: 16px;
    border-radius: 4px;
    border: 1px solid #ccc;
    box-sizing: border-box;
}

.contact-form textarea {
    resize: vertical;
}

body.dark-mode .contact-form input,
body.dark-mode .contact-form textarea {
    background-color: #555;
    color: #fff;
}

.contact-form button {
    background-color: #f4d03f;
    color: #333;
    padding: 12px 20px;
    border: none;
    border-radius: 5px;
    font-size: 16px;
    cursor: pointer;
    transition: background-color 0.3s;
}

.contact-form button:hover {
    background-color: #e0c039;
}

.footer {
    text-align: center;
    padding: 1rem;
    background-color: var(--navbar-bg-color);
    color: var(--navbar-text-color);
    font-size: 1rem;
}

.footer p {
    margin: 0;
    padding: 0px;
    font-family: Arial, sans-serif;
    font-weight: 400;
}

@keyframes glow {
    0% {
        text-shadow: 0 0 10px #FFFFFF, 0 0 20px #FFFFFF;
    }
    100% {
        text-shadow: 0 0 30px #FFFFFF, 0 0 50px #FFFFFF;
    }
}

section {
    margin-bottom: 7%;
}

@media screen and (max-width: 768px) {
    .navbar-links {
        display: none;
        flex-direction: column;
        position: absolute;
        top: 80px; 
        right: 0;
        background-color: var(--navbar-bg-color);
        padding: 1rem;
        box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
        z-index: 101;
    }

    .navbar-links.active {
        display: flex;
    }

    .navbar-toggle {
        display: flex;
    }

    .navbar-links li {
        margin: 1rem 0;
    }
    
    .home-container {
        flex-direction: column;
        align-items: center;
        text-align: center;
        gap: 2rem;
    }

    .home-photo {
        width: 250px;
        height: 250px;
        order: -1;
    }

    #home {
        padding: 2rem 1rem;
    }

    .Skills-container {
        flex-direction: column; 
        gap: 1rem; 
        padding: 0 10px; 
    }

    .skill {
        margin: 0 0 1rem 0; 
    }

    .project {
        flex-direction: column;
        align-items: center; 
        gap: 1rem;
    }

    .pro {
        flex: 1 1 auto; 
        max-width: 100%; 
    }

    .propho {
        width: 150px; 
        height: 120px;
    }

}