* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    text-decoration: none;
    scroll-behavior: smooth;
    font-family: "Poppins";
}
:root {
    --bg-color:#080808;
    --second-bg-color:#101010;
    --text-color: white;
    --main-color:#ea580c;
}
html {
    font-size: 60%;
    overflow-x: hidden;
    scroll-padding-top: 12rem;
}
body{
    background: var(--bg-color);
    color: var(--text-color);
    overflow-y: scroll; 
}
section {
    scroll-snap-align: start; 
}

/*----------- HEADER ------------- */

.header{
    position: fixed;
    width: 100%;
    top: 0;
    left: 0;
    padding: 4rem 15%;
    background: rgba(0, 0, 0, 0.3);
    backdrop-filter: blur(10px);
    display: flex;
    justify-content: space-between;
    align-items: center;
    z-index: 1000;
}
#menu-icon{
    font-size: 3.5rem;
    color: var(--main-color);
    display: none;
    cursor: pointer;
    padding: 0.5rem;
}
#menu-icon:hover {
    transform: scale(1.1);
}
.logo{
    font-size: 3rem;
    color:var(--text-color);
    font-weight: 800;
    cursor: pointer;
    transition: 0.3s ease-in-out;
}
.logo:hover{
    transform: scale(1.1);
}
span{
background: linear-gradient(270deg, #DF8908 10%, #ff1d15 100%);
background-clip: text;
color: transparent;
}
.navbar a{
    font-size: 1.8rem;
    color: var(--text-color);
    margin-left: 4rem;
    font-weight: 500;
    transition: 0.3s ease-in-out;
    border-bottom: 3px solid transparent;
}
.navbar a:hover{
    color: var(--main-color);
    border-bottom: 3px solid var(--main-color);
}
.gradient-btn{
    font-size: 1.8rem;
    padding: 1rem 2rem;
    border-radius: 3rem;
    background: linear-gradient(270deg, #DF8908 10%, #ff1d15 100%);
    letter-spacing: 1px;
    cursor: pointer;
    transition: 0.3s ease-in-out;
    color: white;
    border: none;
    text-wrap: nowrap; 
}
.gradient-btn:hover{
    transform: scale(1.05);
}
section{
    min-height: 100vh;
    padding: 10rem 15%;
}

/*----------- HOME ------------- */

.home{
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15rem;
}
.home-content{
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    text-align: right;
}
.home-content h1{
    font-size: 8rem;
    font-weight: 700;
    margin-top: 1.5rem;
    line-height: 1;
}
.home-content h3{
    margin: 1rem 0;
    font-size: 4rem;
}

.home-content p{
    font-size: 1.5rem;
    font-weight: 500;
    line-height: 1.8;
}
.home-img img{
    width: 24vw;
    border-radius: 50%;
    box-shadow: 0 0 25px var(--main-color);          
    transition: 0.4s ease-in-out;
}
.home-img img:hover{
    box-shadow: 0 0 25px var(--main-color),
                0 0 50px var(--main-color),
                0 0 100px var(--main-color);
}
.social-icons a{
    display: inline-flex;
    justify-content: center;
    align-items: center;
    font-size: 3rem;
    padding: 1rem;
    background: transparent;
    border: 2px solid var(--main-color);
    border-radius: 50%;
    color: var(--main-color);
    margin: 3rem 0.5rem;
    transition: 0.3s ease-in-out;
}
.social-icons a:hover{
    color: var(--text-color);
    background-color: var(--main-color);
    transform: scale(1.2)translateY(-5px);
    box-shadow: 0 0 25px var(--main-color);
}
.btn-group{
    display: flex;
    gap: 1.5rem;
}
.btn{
    display: inline-block;
    padding: 1rem 3rem;
    background-color: var(--main-color);
    box-shadow: 0 0 25px var(--main-color);
    border-radius: 3rem;
    font-size: 1.8rem;
    color: black;
    border: 2px solid transparent;
    font-weight: 600;
    transition: 0.3s ease-in-out;
}
.btn:hover{
    transform: scale(1.05);
    box-shadow: 0 0 25px var(--main-color),
                0 0 50px var(--main-color);
}
.btn-group a:nth-of-type(2){
    background-color: black;
    color: var(--main-color);
    border: 2px solid var(--main-color);
    box-shadow: 0 0 25px transparent;
}
.btn-group a:nth-last-of-type(2):hover{
    box-shadow: 0 0 25px var(--main-color);
    background-color: var(--main-color);
    color: black;
}
.btn i {
    margin-right: 0.5rem;
    font-size: 2rem;
    vertical-align: middle;
}

/*----------- ABOUT ME ------------- */
.about{
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10rem;
    background-color: var(--second-bg-color);
}
.about-img img{
    width: 24vw;
    border: 50%;
    border-radius: 50%;
    box-shadow: 0 0 25px var(--main-color);
    transition: 0.4s ease-in-out;
}
.about-img img:hover{
    box-shadow:  0 0 25px var(--main-color),
                 0 0 50px var(--main-color),
                 0 0 100px var(--main-color);
}
.about-content h2{
    font-size: 7rem;
    text-align: left;
}
.about-content p {
    font-size: 1.5rem;
}
.about-content .btn{
    margin: 3rem 0;
}

/*----------- SKILLS ------------- */

.skills {
    background-color: var(--bg-color);
    padding: 10rem 15%;
    text-align: center;
}
.skills h2 {
    font-size: 7rem;
    margin-bottom: 2rem;
}

.skills p {
    font-size: 1.5rem;
    line-height: 1.8;
    max-width: 800px;
    margin: 0 auto 5rem auto;
    text-align: center;
    font-weight: 500;
}

.skills h2 span {
    background: linear-gradient(270deg, #DF8908 10%, #ff1d15 100%);
    background-clip: text;
    color: transparent;
}
.skills-container {
    display: flex;
    justify-content: center;
}
.skill-card {
    background-color: var(--second-bg-color);
    padding: 3rem;
    border-radius: 2rem;
    display: flex;
    gap: 3rem;
    flex-wrap: wrap;
    justify-content: center;
    box-shadow: 0 0 20px var(--main-color);
}
.skill {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 14rem;
}
.skill img {
    width: 8rem;
    margin-bottom: 1rem;
}
.skill .bxl-github {
    font-size: 8rem;
    color: var(--text-color);
    margin-bottom: 1rem;
}
.skill h3 {
    font-size: 1.8rem;
    color: var(--text-color);
}

/*----------- PROJECTS ------------- */
.projects{
    background-color: var(--second-bg-color);
    padding: 10rem 0;
    min-height: 100vh;
}
.projects h2{
    font-size: 7rem;
    margin-bottom: 5rem;
    text-align: center;
}
.project span {
    background: linear-gradient(270deg, #DF8908 10%, #ff1d15 100%);
    background-clip: text;
    color: transparent;
}

.project-box{
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    place-items: center;
    gap: 3rem;
    row-gap: 5rem;
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 15%;
}
.project-card{
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    background-color: var(--bg-color);
    border:2px solid var(--main-color);
    border-radius: 3rem;
    gap: 2rem;
    padding: 5rem 2rem;
    overflow: hidden;
    cursor: pointer;
    box-shadow: 0 0 5px var(--main-color);
    transition: 0.3s ease;
}
.project-card:hover{
    box-shadow: 0 0 25px var(--main-color),
                0 0 25px var(--main-color);
    transform: scale(1.02);            
}
.project-card img{
    width: 100%;
    max-width: 800px;
    border-radius: 2rem;
    object-fit: cover;
}
.project-card h3{
    font-size: 3rem;
}
.project-card p{
    font-size: 1.6rem;
}

/*----------- QUIZ ------------- */

form input#nickname {
    font-size: 1.8rem;
    padding: 1.5rem;
    border-radius: 1rem;
    border: 2px solid var(--main-color);
    background-color: var(--bg-color);
    color: var(--text-color);
    width: 100%;
    max-width: 400px;
    margin-bottom: 3rem;
    transition: all 0.3s ease-in-out;
}

form label[for="nickname"] {
    font-size: 1.8rem;
    color: var(--text-color);
    margin-bottom: 1rem;
    display: block;
    text-align: center;
}

.quiz {
    padding: 10rem 15%;
    background-color: var(--bg-color);
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.quiz h2 {
    font-size: 7rem;
    margin-top: 5rem;
    margin-bottom: 5rem;
    color: var(--text-color);
    font-weight: 700;
}

/*----------- Kysymys-tyyli ------------- */
.question {
    margin-bottom: 3rem;
}
.question p {
    font-size: 2.2rem;
    margin-bottom: 1rem;
    color: var(--main-color);
}
.question label {
    display: block;
    margin-bottom: 1rem;
    font-size: 1.8rem;
    cursor: pointer;
    color: var(--text-color);
    transition: color 0.3s ease-in-out;
}
.question label:hover {
    color: var(--main-color);
}
.question input[type="radio"] {
    margin-right: 0.5rem;
    accent-color: var(--main-color);
    cursor: pointer;
}
.quiz form input[type="submit"] {
    font-size: 1.8rem;
    padding: 1.5rem 3rem;
    background: linear-gradient(270deg, #DF8908 10%, #ff1d15 100%);
    color: white;
    border: none;
    border-radius: 3rem;
    cursor: pointer;
    transition: 0.3s ease-in-out;
    margin-top: 3rem;
    box-shadow: 0 0 10px var(--main-color);
}
.quiz form input[type="submit"]:hover {
    transform: scale(1.05);
    box-shadow: 0 0 15px var(--main-color);
}


/* Tuloksen säilytykselle ja viesteille */
.tulos-tietaja {
    font-size: 2.2rem;
    color: #28a745;
    font-weight: 600;
    margin-top: 1rem;
    text-align: center;
}

.tulos-kertailla {
    font-size: 2.2rem;
    color: #ffc107;
    font-weight: 600;
    margin-top: 1rem;
    text-align: center;
}

.tulos-jatkaa {
    font-size: 2.2rem;
    color: #dc3545;
    font-weight: 600;
    margin-top: 1rem;
    text-align: center;
}

.quiz h3 {
    font-size: 4rem;
    color: var(--main-color);
    font-weight: 700;
    text-align: center;
    margin-top: 2rem;
    margin-bottom: 2rem;
}

/*----------- CONTACT ------------- */

.contact {
    padding: 10rem 15%;
    background-color: var(--bg-color);
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}
.contact h2 {
    font-size: 7rem;
    margin-top: 10rem;
    margin-bottom: 5rem;
}
.contact span {
    background: linear-gradient(270deg, #DF8908 10%, #ff1d15 100%);
    background-clip: text;
    color: transparent;
}
.contact-form {
    display: flex;
    flex-direction: column;
    width: 50%;
    gap: 2rem;
}
.contact-form .form-group {
    display: flex;
    flex-direction: column;
    text-align: left;
}
.contact-form label {
    font-size: 1.8rem;
    margin-bottom: 0.5rem;
    color: var(--text-color);
}
.contact-form input,
.contact-form textarea {
    padding: 1.5rem;
    border-radius: 1rem;
    border: 2px solid var(--main-color);
    background-color: var(--bg-color);
    color: var(--text-color);
    font-size: 1.6rem;
    resize: none;
}
.contact-form input:focus,
.contact-form textarea:focus {
    outline: none;
    border-color: #ff8000;
    box-shadow: 0 0 15px var(--main-color);
}
.contact-form button {
    align-self: center;
    font-size: 1.8rem;
    padding: 1rem 3rem;
    border-radius: 3rem;
    border: none;
    cursor: pointer;
    background: linear-gradient(270deg, #DF8908 10%, #ff1d15 100%);
    color: white;
    transition: 0.3s ease-in-out;
    margin-top: 2rem;
}
.contact-form button:hover {
    transform: scale(1.05);
}
/* Form message */
#form-message {
    margin-bottom: 3rem;
    padding: 2rem;
    border-radius: 1rem;
    text-align: center;
    font-size: 1.8rem;
    font-weight: 500;
    animation: fadeIn 0.5s;
}

#form-message.success {
    background: linear-gradient(135deg, #28a745 0%, #20c997 100%);
    color: white;
    box-shadow: 0 0 20px rgba(40, 167, 69, 0.5);
}

#form-message.error {
    background: linear-gradient(135deg, #dc3545 0%, #c82333 100%);
    color: white;
    box-shadow: 0 0 20px rgba(220, 53, 69, 0.5);
}

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

/*----------- FOOTER ------------- */

.footer {
    background-color: var(--second-bg-color);
    color: var(--text-color);
    text-align: center;
    padding: 4rem 15%;
    border-top: 2px solid var(--main-color);
}
.footer-container p {
    margin-bottom: 2rem;
    font-size: 1.5rem;
    font-weight: 500;
}
.footer-social a {
    display: inline-block;
    margin: 0 1.5rem;
    font-size: 3.5rem;
    color: var(--main-color);
    transition: 0.3s ease-in-out;
}
.footer-social a:hover {
    color: var(--text-color);
    transform: scale(1.3) translateY(-5px);
}

/*----------- RESPONSIVE------------- */

@media(max-width:1285px){
    #menu-icon{
        display: block;
    }

    .navbar{
        position: absolute;
        top: 100%;
        right: 0;
        width: 50%;
        padding: 1rem 3rem;
        background: rgba(0, 0, 0, 0.8);
        border-bottom-left-radius: 2rem;
        border-left: 2px solid var(--main-color);
        border-bottom: 2px solid var(--main-color);
        display: none;
    }
    .navbar a{
        display: block;
        font-size: 2rem;
        margin: 3rem 0;
        color: var(--text-color);
    }
    .navbar.active{
        display: block;
    }
     
    .header .gradient-btn{
        display: none;
    }
    
    #contact-form .gradient-btn{
        display: inline-block;
    }
    .home{
        flex-direction: column-reverse;
        margin: 5rem 0;
        gap: 5rem;
    }
    .home-content{
        align-items: center;
        text-align: center
    }
    .home-img img{
        width: 46vw;
    }
    .about{
        flex-direction: column-reverse;
        text-align: center;
    }
    .about h2{
        text-align: center;
        margin: 2rem 0;
    }
    .about img{
        width: 42vw;
    }
    .contact-form{
        flex-direction: column;
    }
    .quiz h2 {
        margin-top: 10rem;
        font-size: 5rem; 
    }

    .question p {
        font-size: 1.8rem; 
    }

    .question label {
        font-size: 1.6rem; 
    }
}

@media (max-width: 768px) {
    .header {
        padding: 2rem 6%;
    }
}

@media (max-width: 768px) {
    .navbar {
        width: min(260px, 80vw);
    }
}
@media (max-width: 768px) {
    .skills {
        display: flex;
        flex-direction: column;
        align-items: center;  
        text-align: center;   
    }
    .skills h2 {
        font-size: 6rem;
        margin: 0 0 2rem 0;
        white-space: nowrap;
    }
}
@media (max-width: 768px) {
    .contact-form {
        width: 90%;
        max-width: 400px;
    }

    .contact-form input,
    .contact-form textarea {
        width: 100%;
    }
}