/* Initial state */
.animate-on-scroll {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 1s ease, transform 1s ease;
}

/* Final state when in viewport */
.animated {
    opacity: 1;
    transform: translateY(0);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

nav {
    background-color: rgb(214, 230, 245);
    height: 50px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 96px;
    position: fixed;
    width: 100%;
    z-index: 10;
}

nav section {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 5px;

}

nav img {
    height: 23px;
}

nav div {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 18px;
}

nav a {
    white-space: nowrap;
    text-decoration: none;
    color: black;
    transition: all .45s ease;
}

nav a:hover {
    transform: scale(1.1) translateY(-3px);

    color: rgb(63, 63, 250);
}

header {
    height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 10px;
}

header .h1 {
    font-size: 60px;
    color: white;
    font-weight: bold;
    display: flex;
    justify-content: center;
    opacity: 0;
    animation: header1 2s ease 1s forwards;
}

header .h2 {
    font-size: 28px;
    color: white;
    display: flex;
    justify-content: center;
    opacity: 0;
    animation: header2 2s ease 2s forwards;

}

@keyframes header1 {
    from {}

    to {
        opacity: 1;
    }

}

@keyframes header2 {
    from {}

    to {
        opacity: 1;
    }

}

.aboutme {
    margin: 50px 150px 50px 150px;
    padding: 50px;
    border: 2px solid rgb(200, 200, 200);
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 29px;
    height: 70vh;
}

.aboutme img {
    height: 230px;
    border: 0px;
    border-radius: 50%;
}

.aboutwrite {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

main {
    border: 2px solid rgb(200, 200, 200);
    margin: 30px 100px 30px 100px;
    padding: 30px;
    height: 500px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 29px;
}

.skills {
    display: grid;
    grid-template-columns: 200px 200px 200px 200px;
    grid-template-rows: 130px 130px;
    justify-content: center;
    gap: 25px;
}

.skills>div {
    width: 134px;
    height: 120px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 8px;
    border: 2px solid rgb(200, 200, 200);
    transition: all .4s ease;

}

.skills :hover {
    transform: scale(1.1) translateY(3px);
    box-shadow: -3px 3px 8px rgb(198, 198, 198);

}

.skills img {
    height: 58px;
}

footer {
    padding: 24px;
    display: flex;
    flex-direction: column;
    gap: 15px;
    height: 400px;

}

footer div {
    display: flex;
    align-items: center;
    gap: 26px;

}

footer div a {
    text-decoration: none;
    color: white;
    border: 0px;
    border-radius: 50px;
    background-color: black;
    padding: 7.5px;
    transition: all .4s ease;
}

.fb:hover {
    background-color: blue;
    transform: scale(1.1);
    box-shadow: -3px 3px 8px rgb(166, 202, 235);
}

.ig:hover {
    background-color: rgb(231, 105, 42);
    transform: scale(1.1);
    box-shadow: -3px 3px 8px rgb(166, 202, 235);
}

.end {
    background-color: rgb(29, 28, 40);
    height: 93px;
    color: white;
    display: flex;
    justify-content: center;
    align-items: center;
}

@media only screen and (max-width: 910px) {
    nav {
        display: flex;
        flex-direction: column;
        justify-content: center;
        align-items: center;
        height: auto;

    }

    header {
        height: 100vh;
        display: flex;
        flex-direction: column;
        justify-content: center;
        align-items: center;
        gap: 10px;
        padding: 100px 60px 70px 60px;
    }

    header div {
        text-align: center;
    }

    .aboutme {
        height: auto;
        padding: 80px 30px 10px 30px;
        display: flex;
        flex-direction: column;
        justify-content: center;
        align-items: center;
        overflow: hidden;
        gap: 20px;
        width: 75vw;
        margin: auto;
        margin-top: 30px;
    }

    .aboutme img {
        width: 70%;

        height: auto;
        object-fit: contain;
        border-radius: 50%;

    }

    .aboutwrite {
        text-align: center;
    }

    .aboutwrite h1 {
        font-size: 24px;
    }

    .aboutwrite p {
        font-size: 16px;
        line-height: 1.5;
    }

    #skills {
        display: flex;
        flex-direction: column;
        gap: 20px;
        padding: 30px;
        height: auto;
    }

    #skills .skills {
        display: flex;
        flex-direction: column;
        gap: 20px;
    }
}

/* Dark mode styles */
.dark-mode {
    background-color: #1e1e1e;
    color: #f0f0f0;
}

.dark-mode nav {
    background-color: #2a2a2a;
}

.dark-mode nav section img {
    filter: brightness(0) invert(1);
}

.dark-mode nav a {
    color: #f0f0f0;
}

.dark-mode nav a:hover {
    color: #87cefa;
}

.dark-mode header {
    background-color: #333 !important;
}

.dark-mode .aboutme,
.dark-mode main {
    border-color: #444;
}

.dark-mode .skills div:nth-child(7) img {
    filter: brightness(0) invert(1);
}

.dark-mode .skills>div {
    border-color: #555;
    background-color: #2a2a2a;
}

.dark-mode footer {
    background-color: #222 !important;
}

.dark-mode .end {
    background-color: #111;
}

.dark-mode .fb:hover {
    background-color: #3b5998;
}

.dark-mode .ig:hover {
    background-color: #e1306c;
}