@import url('arrow.css');
@import url('sound.css');
@import url('fonts.css');

body {
    font-family: 'Montserrat', sans-serif;
    margin: 0;
    padding: 0;
    background-color: #f4f4f4;
    overflow-y: scroll;
    display: flex;
    flex-direction: column;
    align-items: center;
}

#background-video {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    overflow: hidden;
}



#desktop-video, #mobile-video {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Piilota mobiiliversion video oletuksena */
#mobile-video {
    display: none;
}

nav {
    position: fixed;
    top: 5%; 
    width: 100%;
    background: transparent;
    z-index: 1000;
    padding: 1rem;
    text-align: center;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.menu-icon {
    display: none; /* Hampurilaisvalikko piilotettu oletuksena */
    position: fixed;
    top: 5%; 
    left: 2%;
    transform: translateX(0); 
    cursor: pointer;
}

.menu-icon img {
    width: 31.2px; 
    height: 31.2px; 
    filter: invert(100%); 
}

nav ul {
    list-style-type: none;
    margin: 0;
    padding: 0;
    display: flex;
    justify-content: center;
}

nav ul li {
    margin: 0 1rem;
}

nav ul li a {
    color: white; 
    text-decoration: none; 
    padding: 0.5rem 1rem; 
    display: block;
    font-weight: normal; 
    transition: font-weight 0.3s ease;
}

nav ul li a:hover {
    font-weight: bold; 
    background-color: transparent; 
}

nav ul li.lang-switch {
    margin-left: 80px; 
}

.case-video,
.case-image {
    width: 100%; 
    height: auto;
    max-width: 100%;
    object-fit: cover;
    display: block;
    margin: 0 auto;
}

.case-video {
    aspect-ratio: 16 / 9;
}

.open-sans-nav {
    font-family: 'Open Sans', sans-serif;
}

.content {
    padding-top: 80px;
    width: 100%;
}

section {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem;
    box-sizing: border-box;
    color: white;
    text-align: center;
    position: relative;
}

.section-content {
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 5rem 2rem;
    box-sizing: border-box;
}

h1 {
    margin-top: -50px; /* Siirrä otsikkoa ylemmäksi tarpeen mukaan */
}

h2 {
    display: table;
    margin: 0px auto 0px auto;
    padding: 5px;
    color: #ffffff;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.7);
    max-width: 80%; 
    font-size: 9vh;
    margin: 2rem 0;
}

.about-container {
    max-width: 60%;
    margin: 0 auto;
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: center;
}

.about-image {
    position: absolute;
    top: 0;
    left: 6%; 
    transform: rotate(40deg); 
    transform-origin: top left;
    width: 30%; 
}

.about-image img {
    width: 100%;
    height: auto;
    transform: rotate(25deg);
}

.about-text {
    flex: 0.7;
    padding: 1rem;
    color: #333;
    background-color: rgba(255, 255, 255, 0.8);
    border-radius: 10px;
    font-family: 'Montserrat', sans-serif;
}

.about-text p, .about-text blockquote {
    margin: 1rem 0;
}

.about-text blockquote {
    font-style: italic;
    color: #555;
}

.quote-author {
    font-weight: bold;
    color: #333;
}

.timeline p {
    margin: 1rem 0;
    padding: 1rem;
    max-width: 600px;
    color: white;
}

.timeline p strong {
    display: block;
    font-size: 1.1rem;
}

.skills {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    color: white;
    width: 100%;
    margin-top: 2rem;
}

.skills h3 {
    flex: 1 1 100%;
    margin-top: 1rem;
}

.skills ul {
    list-style-type: none;
    padding: 0;
    flex: 1 1 calc(50% - 1rem);
    margin: 0.5rem;
}

.skills ul li {
    margin: 0.5rem 0;
}

#contact p {
    margin: 0.5rem 0;
    color: white;
}

#contact a {
    color: #ddd;
    text-decoration: none;
}

#contact a:hover {
    text-decoration: underline;
}

#floating-arrow {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    animation: float 2s infinite;
    z-index: 1000;
}

#floating-arrow img {
    width: 40px;
    height: 40px;
    opacity: 0.7;
    transition: opacity 0.3s;
}

#floating-arrow img:hover {
    opacity: 1;
}

.close-widget {
    position: absolute;
    top: 5px;
    right: 10px;
    font-size: 18px;
    font-weight: bold;
    cursor: pointer;
    color: white;
}

@keyframes float {
    0%, 100% {
        transform: translate(-50%, 0);
    }
    50% {
        transform: translate(-50%, -10px);
    }
}

@keyframes randomMove {
    0% {
        transform: translate(0, 0);
    }
    12.5% {
        transform: translate(-2px, -2px);
    }
    25% {
        transform: 2px, -2px;
    }
    37.5% {
        transform: translate(-2px, 2px);
    }
    50% {
        transform: translate(2px, 2px);
    }
    62.5% {
        transform: translate(-2px, -2px);
    }
    75% {
        transform: translate(2px, -2px);
    }
    87.5% {
        transform: translate(-2px, 2px);
    }
    100% {
        transform: translate(2px, 2px);
    }
}

#sizzle-video {
    width: 70vw;
    height: auto;
}

footer {
    color: white;
    text-align: center;
    padding: 1rem 0;
    position: relative;
    bottom: 0;
    width: 100%;
    height: 20vh;
    box-sizing: border-box;
}

.footer-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1rem;
}

.footer-content p {
    margin: 0;
    padding: 0;
    font-size: 1rem;
}

.connect-widget {
    position: fixed;
    right: 20px;
    bottom: 20px;
    background-color: #00008B;
    color: white;
    padding: 20px;
    border-radius: 10px;
    box-shadow: 0px 4px 10px rgba(0, 0, 0, 0.5);
    text-align: center;
    z-index: 1000;
    width: 200px;
    animation: widget-float 5s infinite;
}

.widget-images {
    display: flex;
    justify-content: center;
    margin-bottom: 10px;
}

.widget-image {
    width: 40px;
    height: 40px;
    margin: 0 5px;
    border-radius: 50%;
    object-fit: cover;
}

.connect-widget h3 {
    font-size: 16px;
    margin-bottom: 10px;
}

.connect-button {
    display: inline-block;
    padding: 10px 20px;
    background-color: white;
    color: #00008B;
    text-decoration: none;
    border-radius: 5px;
    font-weight: bold;
    transition: background-color 0.3s, color 0.3s;
}

.connect-button:hover {
    background-color: #00008B;
    color: white;
}

#overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.2); /* Tumma overlay, opacity 20% */
    z-index: 2;
}

@keyframes widget-float {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-10px);
    }
}

@media (max-width: 1024px) {
    .project {
        width: 45%;
    }

    .project h3 {
        font-size: 1.2rem;
    }
}

@media (max-width: 768px) {
    .menu-icon {
        display: block; /* Näytetään hampurilaisvalikko vain mobiilinäkymässä */
        top: 5%; 
        left: 2%;
    }

    #desktop-video {
        display: none;
    }
    #mobile-video {
        display: block;
    }
    
    nav ul {
        display: none;
        flex-direction: column;
        width: 100%;
        position: absolute;
        top: 60px;
        left: 0;
        background-color: rgba(0, 0, 0, 0.9);
    }
    
    nav ul.show {
        display: flex;
    }

    nav ul li {
        margin: 0;
        text-align: center; 
    }

    nav ul li.lang-switch {
        margin-left: 0; 
    }

    nav ul li a {
        padding: 1rem;
        border-bottom: 1px solid #555;
        color: white;
        display: block;
    }

    .about-container {
        flex-direction: column;
        width: 70%;
    }

    .about-image {
        position: relative;
        left: 10;
        transform: rotate(0deg);
        width: 100%;
        margin-bottom: 2rem;
    }

    .about-image img {
        transform: rotate(0deg);
        
    }

    .about-text {
        width: 100%; 
        margin: 0 auto; 
    }

    .projects {
        flex-direction: column;
    }

    .project {
        width: 100%;
        margin: 1rem 0;
        transform: none;
    }

    .project img {
        width: 100%;
    }

    .connect-widget {
        position: fixed;
        right: 20px;
        top: 20px; 
        bottom: auto; 
        width: 140px; 
        height: auto; 
        transform: translateX(0); 
    }

   
    #music-toggle {
        display: none;
    }

    h1, h2 {
        max-width: 80%; 
        font-size: 4.7vh; 
    }


    #overlay {
        display: block; /* Näytä tumma kerros mobiiliversiossa */
    }
}
