* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: sans-serif;
    background: #0d0907;
    overflow-x: clip;
}

.bg-orbs {
    position: fixed;
    inset: 0;
    overflow: hidden;
    pointer-events: none;
    z-index: 0;
}
    
.orb {
    position: absolute;
    border-radius: 50%;
    filter: blur(90px);
    opacity: 0.35;
    will-change: transform;
}
    
.orb-1 { width: 420px; height: 420px; top: 5%;  left: -120px; background: #f97316; }
.orb-2 { width: 340px; height: 340px; top: 45%; right: -100px; background: #b3350d; }
.orb-3 { width: 260px; height: 260px; top: 80%; left: 30%;     background: #f97316; opacity: 0.2; }
    
.orb-inner {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    background: inherit;
    animation: float 14s ease-in-out infinite;
}
    
.orb-2 .orb-inner { animation-duration: 18s; animation-delay: -4s; }
.orb-3 .orb-inner { animation-duration: 22s; animation-delay: -9s; }
    
@keyframes float {
    0%, 100% { transform: translate(0, 0) scale(1); }
    50%      { transform: translate(40px, -50px) scale(1.12); }
}

/*Navbar*/
.navbar {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100px;
    padding: 0 40px;
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    background: transparent;
    z-index: 10;
}

.logo {
    justify-self: start;
    color: rgba(255, 255, 255, 0.915);
    text-decoration: none;
    font-weight: bold;
    white-space: nowrap;
    font-size: 1.25rem;
    margin-right: 30px;
}

.nav-links {
    justify-self: center;
    list-style: none;
    display: flex;
    align-items: center;
    gap: 30px;
}

.nav-links li {
    display: flex;
}

.nav-links a {
    position: relative;
    display: inline-block;
    white-space: nowrap;
    padding: 10px 20px;
    color: rgba(255, 255, 255, 0.915);
    text-decoration: none;
    border: 2px solid rgba(255, 255, 255, 0.915);
    overflow: hidden;
    z-index: 1;
    transition: color 0.3s ease;
    border-radius: 5px;
}

.nav-links a::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.915);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.3s ease;
    z-index: -1;
}

.nav-links a:hover {
    color: black;
}

.nav-links a:hover::before {
    transform: scaleX(1);
}

.nav-menu {
    display: contents;
}

.nav-toggle {
    display: none;
    position: relative;
    z-index: 30;
    width: 46px;
    height: 46px;
    padding: 0;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 5px;
    background: transparent;
    border: 2px solid rgba(255, 255, 255, 0.915);
    border-radius: 5px;
    cursor: pointer;
}

.nav-toggle span {
    display: block;
    width: 22px;
    height: 2px;
    background: rgba(255, 255, 255, 0.915);
    transition: transform 0.3s ease, opacity 0.3s ease;
}

/* Napista tulee ruksi, kun valikko on auki */
.nav-open .nav-toggle span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-open .nav-toggle span:nth-child(2) { opacity: 0; }
.nav-open .nav-toggle span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

.nav-backdrop {
    display: none;
}

@media (max-width: 1000px) {
    .navbar {
        display: flex;
        justify-content: space-between;
        padding: 0 20px;
    }

    .nav-toggle {
        display: flex;
        margin-left: auto;
    }

    .nav-menu {
        position: fixed;
        top: 0;
        right: 0;
        z-index: 20;
        display: flex;
        flex-direction: column;
        align-items: stretch;
        gap: 30px;
        width: min(320px, 80vw);
        height: 100vh;
        height: 100dvh;
        padding: 110px 30px 40px;
        overflow-y: auto;
        background: #120c09;
        border-left: 3px solid #f97316;
        box-shadow: -20px 0 60px rgba(0, 0, 0, 0.6);
        transform: translateX(100%);
        visibility: hidden;
        transition: transform 0.35s ease, visibility 0s linear 0.35s;
    }

    .nav-open .nav-menu {
        transform: translateX(0);
        visibility: visible;
        transition: transform 0.35s ease, visibility 0s;
    }

    .nav-links {
        flex-direction: column;
        align-items: stretch;
        gap: 16px;
    }

    .nav-links li {
        display: block;
    }

    .nav-links a {
        display: block;
        text-align: center;
    }

    /* Kielinapit valikon alaosassa */
    .lang-switch {
        justify-content: center;
        gap: 10px;
        margin: 0;
        padding-top: 26px;
        border-top: 1px solid rgba(255, 255, 255, 0.2);
    }

    /* Tumma tausta valikon takana */
    .nav-backdrop {
        display: block;
        position: fixed;
        inset: 0;
        z-index: 9;
        background: rgba(0, 0, 0, 0.6);
        opacity: 0;
        pointer-events: none;
        transition: opacity 0.35s ease;
    }

    .nav-open .nav-backdrop {
        opacity: 1;
        pointer-events: auto;
    }

    /* Sivu ei vieri valikon takana */
    body.nav-open {
        overflow: hidden;
    }
}

/* Pienillä puhelimilla logo pienemmäksi */
@media (max-width: 420px) {
    .logo {
        font-size: 1rem;
    }
}

@media (prefers-reduced-motion: reduce) {
    .nav-menu,
    .nav-backdrop,
    .nav-toggle span {
        transition: none;
    }
}

/*Language*/
.lang-switch {
    display: flex;
    gap: 30px;
    margin-left: 30px;
    justify-self: end;
}

.lang-switch button {
    font: inherit;
    font-weight: bold;
    line-height: normal;
    min-width: 60px;
    max-width: 80px;
    padding: 10px;
    color: rgba(255, 255, 255, 0.915);
    background: transparent;
    border: 2px solid rgba(255, 255, 255, 0.915);
    border-radius: 5px;
    cursor: pointer;
    transition: background 0.3s ease, color 0.3s ease;
}

.lang-switch button:hover,
.lang-switch button.active {
    background: rgba(255, 255, 255, 0.915);
    color: black;
}

/*Hero and picture*/
.hero {
    position: relative;
    height: 100vh;
    height: 100svh;
    width: 100%;
    overflow: hidden;
}

.main-picture {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
}

.hero::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(
        to bottom,
        rgba(0, 0, 0, 0.4) 0%,
        rgba(0, 0, 0, 0.3) 80%,
        #0d0907 100%
    );
}

.hero-content {
    position: absolute;
    inset: 0;
    z-index: 5;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    color: white;
    padding: 0 20px;
}

.hero-content h1 {
    font-size: clamp(2.2rem, 5vw + 1rem, 6rem);
    line-height: 1.1;
    margin-bottom: 20px;
    
}

.hero-content p {
    max-width: 600px;
    font-size: clamp(0.5rem, 5vw + 1rem, 1.5rem);
    line-height: 1.1;
}

/*Cards*/
.cards {
    position: relative;
    display: flex;
    flex-direction: column;
    padding: 100px 50px;
    margin: 40px;
    gap: 60px;
    text-decoration: none;
    color: black;
    background-color: #0d0907;
    overflow: hidden;
    transition: transform 0.3s ease, background 0.3s ease, color 0.3s ease;
}

.cards-title {
    font-size: 2.5rem;
    letter-spacing: 2px;
    margin-bottom: 15px;
    color: rgba(255, 255, 255, 0.915);
}

.cards-list {
    list-style: none;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 25px;
}

.card {
    max-height: 800px;
    max-width: 800px;
    padding: 40px;
    color: rgba(255, 255, 255, 0.915);
    background-color: #1a1210;
    border: 3px solid #f07015;
    border-radius: 10px;
}

.card-left  { align-self: flex-start; margin-left: 10%; }
.card-right { align-self: flex-end;   margin-right: 10%; }
.card-wide  { max-width: 700px; }

.cards-text {
    line-height: 1.6;
    margin-bottom: 20px;
    font-size: 1.5rem;
}

.cards-list li {
    padding: 5px 15px;
    border: 2px solid #f07015;
    border-radius: 20px;
    font-size: 0.9rem;
}

.card-link {
    display: inline-block;
    color: rgba(255, 255, 255, 0.915);
    font-size: 1.1rem;
    font-weight: bold;
    text-decoration: none;
    border-bottom: 2px solid rgba(255, 255, 255, 0.915);
}

.card-link:hover {
    color: #f07015;
    border-color: #f07015;
}

/*Footer*/
.footer {
    position: relative;
    z-index: 1;
    padding: 25px 40px 40px;
    background: #111;
    color: rgba(255, 255, 255, 0.915);
}

.footer-text {
    text-align: center;
    font-size: 1.0rem;
    opacity: 0.7;
    padding-bottom: 20px;
    margin-bottom: 30px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
}

.footer-main {
    display: flex;
    justify-content: center;
    align-items: center;
    flex-direction: column;
    gap: 25px;
}

.footer-social {
    display: flex;
    list-style: none;
    align-items: center;
    flex-direction: row;
    gap: 18px;
}

.footer-links {
    display: flex;
    list-style: none;
    flex-direction: row;
    text-align: center;
    gap: 12px;
}

.footer-social a svg {
    display: block;
    transition: transform 0.3s ease;
    cursor: pointer;
    fill: white;
}

.footer-social a:hover svg {
    transform: translateY(-4px) scale(1.15);
    fill: #f07015;
}

.footer a {
    color: inherit;
    text-decoration: none;
    transition: color 0.3s ease;
}

.footer a:hover {
    color: #f07015;
    text-decoration: underline;
}

@media (max-width: 600px) {
    .footer-main {
        flex-direction: column;
    }

    .footer-social {
        text-align: left;
    }
}

.page-hero {
    display: grid;
    grid-template-columns: 7fr 5fr;
    gap: 80px;
    align-items: start;
    margin-bottom: 140px;
}
 
.page-hero h1 {
    font-size: clamp(2.4rem, 6vw, 4.5rem);
    line-height: 1.05;
    margin-bottom: 24px;
    color: rgba(255, 255, 255, 0.915);
}
 
.page-hero p {
    line-height: 1.8;
    max-width: 52ch;
    opacity: 0.85;
}

.reveal {
    opacity: 0;
    transform: translateY(60px);
    transition: opacity 0.8s ease, transform 0.8s ease;
}
 
.reveal.from-right { transform: translateX(80px); }
.reveal.from-left  { transform: translateX(-80px); }
 
.reveal.visible {
    opacity: 1;
    transform: none;
}



/*About me*/
.about-page {
    position: relative;
    z-index: 1;
    color: rgba(255, 255, 255, 0.915);
    padding: 170px 8% 100px;
}
 
.section-title {
    font-size: clamp(1.6rem, 3.5vw, 2.4rem);
    line-height: 1.15;
    margin-bottom: 40px;
}
 
/* ---------- Tarina ---------- */
.story {
    margin-bottom: 140px;
}
 
.story h2 {
    margin-top: 40px;
}
 
.story-text p {
    line-height: 1.8;
    margin-bottom: 24px;
    opacity: 0.85;
    max-width: 62ch;
}
 
.story-text p:first-child {
    font-size: 1.25rem;
    opacity: 1;
}
 
.facts {
    margin-bottom: 140px;
}
 
.fact-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 40px 30px;
}
 
.fact-grid .fact-wrap:nth-child(even) {
    margin-top: 40px;
}
 
.fact-wrap {
    transition: transform 0.35s ease;
}
 
.fact-wrap:hover {
    transform: translateY(-8px) scale(1.03);
}
 
.fact {
    height: 100%;
    padding: 28px;
    background: #1a1210;
    border: 3px solid #f07015;
    border-radius: 8px;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5);
    transition: box-shadow 0.4s ease;
}
 
.fact-wrap:hover .fact {
    box-shadow: 0 30px 80px rgba(249, 115, 22, 0.25);
}
 
.fact-label {
    display: block;
    margin-bottom: 10px;
    font-size: 0.8rem;
    letter-spacing: 2px;
    text-transform: uppercase;
    color: #f07015;
}
 
.fact-value {
    font-size: 1.3rem;
    line-height: 1.3;
}

.timeline-layout {
    display: grid;
    grid-template-columns: 7fr 5fr;
    gap: 80px;
    align-items: start;
    margin-bottom: 140px;
}

.timeline-layout .timeline-section,
.timeline-layout .interests {
    margin-bottom: 0;
}

.timeline-layout .timeline {
    max-width: none;
}

.timeline-right {
    display: flex;
    flex-direction: column;
    gap: 70px;
    margin-top: 60px;
}

.timeline-right .cta {
    max-width: none;
    margin-left: 0;
}
 
.timeline-section {
    margin-bottom: 140px;
}
 
.timeline {
    position: relative;
    max-width: 760px;
    padding-left: 50px;
}
 
/* Viiva piirtyy ylhäältä alas, kun osio tulee näkyviin */
.timeline::before {
    content: "";
    position: absolute;
    top: 6px;
    bottom: 6px;
    left: 8px;
    width: 3px;
    background: linear-gradient(to bottom, #f07015, rgba(249, 115, 22, 0.1));
    transform: scaleY(0);
    transform-origin: top;
    transition: transform 1.6s ease;
}
 
.timeline.visible::before {
    transform: scaleY(1);
}
 
.timeline-item {
    position: relative;
    margin-bottom: 50px;
}
 
.timeline-item:last-child {
    margin-bottom: 0;
}
 
.timeline-item::before {
    content: "";
    position: absolute;
    left: -50px;
    top: 6px;
    width: 19px;
    height: 19px;
    background: #0d0907;
    border: 3px solid #f07015;
    border-radius: 50%;
    transition: background 0.3s ease, box-shadow 0.3s ease;
}
 
.timeline-item:hover::before {
    background: #f07015;
    box-shadow: 0 0 0 8px rgba(249, 115, 22, 0.2);
}
 
.timeline-year {
    display: block;
    margin-bottom: 8px;
    font-size: 0.85rem;
    letter-spacing: 2px;
    text-transform: uppercase;
    color: #f07015;
}
 
.timeline-item h3 {
    margin-bottom: 8px;
    font-size: 1.4rem;
}
 
.timeline-item p {
    line-height: 1.7;
    opacity: 0.8;
}
 
/* ---------- Kiinnostuksen kohteet ---------- */
.interests {
    margin-bottom: 140px;
}
 
.chips {
    list-style: none;
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    max-width: 800px;
}
 
.chips li {
    padding: 8px 20px;
    border: 2px solid #f07015;
    border-radius: 30px;
    opacity: 0;
    transform: translateY(12px);
    transition: opacity 0.5s ease, transform 0.5s ease, background 0.3s ease, color 0.3s ease;
}
 
.chips.visible li {
    opacity: 1;
    transform: none;
}
 
.cta {
    max-width: 780px;
    margin-left: auto;
    padding: 50px 40px;
    background: #1a1210;
    border: 3px solid #f07015;
    border-radius: 8px;
}
 
.cta h2 {
    margin-bottom: 14px;
    font-size: clamp(1.6rem, 3.5vw, 2.4rem);
}
 
.cta p {
    margin-bottom: 28px;
    line-height: 1.7;
    opacity: 0.85;
}
 
/* ---------- Mobiili ---------- */
@media (max-width: 900px) {
    .about-page { padding: 140px 20px 70px; }
 
    .about-hero,
    .story {
        grid-template-columns: 1fr;
        gap: 30px;
    }
 
    .about-hero,
    .story,
    .facts,
    .timeline-section,

    .timeline-layout {
    grid-template-columns: 1fr;
    gap: 90px;
    margin-bottom: 90px;
    }

    .timeline-right {
        margin-top: 0;
        gap: 60px;
    }

    .interests { margin-bottom: 90px; }
 
    .story .section-title { position: static; }
    .fact-grid .fact-wrap:nth-child(even) { margin-top: 0; }
    .cta { padding: 30px 22px; }
}

/*Skills*/
.skills-page {
    position: relative;
    z-index: 1;
    color: rgba(255, 255, 255, 0.915);
    padding: 170px 8% 100px;
}
 
.section-label {
    margin-bottom: 15px;
    text-transform: uppercase;
    letter-spacing: 3px;
    font-size: 0.85rem;
    color: #f07015;
}
 
.section-title {
    font-size: clamp(1.6rem, 3.5vw, 2.4rem);
    line-height: 1.15;
    margin-bottom: 40px;
}
 
.reveal.from-right { transform: translateX(80px); }
.reveal.from-left  { transform: translateX(-80px); }
 
.reveal.visible {
    opacity: 1;
    transform: none;
}
 
/* ---------- Ohjelmointikielet ---------- */
.languages {
    margin-bottom: 140px;
}
 
.skill-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 40px 30px;
}
 
/* Epäsymmetria: joka toinen kortti on laskettu alemmas */
.skill-grid .skill-card:nth-child(even) {
    margin-top: 50px;
}
 
.skill-card {
    position: relative;
    display: flex;
    flex-direction: column;
    gap: 14px;
    padding: 30px;
    background: #1a1210;
    border: 3px solid #f07015;
    border-radius: 8px;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5);
}
 
/* Hover: pieni nousu ja suurennus. Reveal on kääreessä, joten ei ristiriitaa */
.skill-wrap {
    transition: transform 0.35s ease;
}
 
.skill-wrap:hover {
    transform: translateY(-8px) scale(1.03);
}
 
.skill-wrap:hover .skill-card {
    box-shadow: 0 30px 80px rgba(249, 115, 22, 0.25);
}
 
.skill-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
}
 
.skill-badge {
    display: grid;
    place-items: center;
    width: 56px;
    height: 56px;
    font-weight: bold;
    font-size: 1.1rem;
    color: #0d0907;
    background: #f07015;
    border-radius: 12px;
}
 
.skill-percent {
    font-size: 2rem;
    font-weight: bold;
    color: #f07015;
}
 
.skill-name {
    font-size: 1.5rem;
}
 
.skill-note {
    line-height: 1.6;
    opacity: 0.8;
    font-size: 0.95rem;
}
 
.skill-track {
    height: 8px;
    background: rgba(255, 255, 255, 0.12);
    border-radius: 20px;
    overflow: hidden;
}
 
.skill-fill {
    width: 0;
    height: 100%;
    background: linear-gradient(90deg, #b3350d, #f07015);
    border-radius: 20px;
    transition: width 1.4s cubic-bezier(0.22, 1, 0.36, 1);
}
 
.skill-level {
    font-size: 0.8rem;
    letter-spacing: 2px;
    text-transform: uppercase;
    opacity: 0.6;
}

.about-skills {
    margin-bottom: 140px;
}

.about-skills h2 {
    margin-top: 40px;
}
 
.about-text p {
    line-height: 1.8;
    margin-bottom: 24px;
    opacity: 0.85;
    max-width: 62ch;
}
 
.about-text p:first-child {
    font-size: 1.25rem;
    opacity: 1;
}
 
.groups {
    display: grid;
    grid-template-columns: repeat(12, 1fr);
    gap: 30px;
}
 
.group {
    padding: 30px;
    background: #1a1210;
    border: 3px solid #f07015;
    border-radius: 8px;
    transition: box-shadow 0.4s ease;
}
 
.group:hover {
    box-shadow: 0 25px 60px rgba(249, 115, 22, 0.2);
}
 
.group:nth-child(1) { grid-column: 1 / 7; }
.group:nth-child(2) { grid-column: 7 / 13; }
.group:nth-child(3) { grid-column: 1 / 7; }
.group:nth-child(4) { grid-column: 7 / 13; }
 
.group h3 {
    margin-bottom: 20px;
    font-size: 1.3rem;
    letter-spacing: 1px;
}
 
.group.visible .chips li {
    opacity: 1;
    transform: none;
}
 
.group-learning h3::before {
    content: "";
    display: inline-block;
    width: 10px;
    height: 10px;
    margin-right: 12px;
    background: #f07015;
    border-radius: 50%;
    animation: pulse-dot 1.8s ease-in-out infinite;
}
 
@keyframes pulse-dot {
    0%, 100% { box-shadow: 0 0 0 0 rgba(249, 115, 22, 0.6); }
    50%      { box-shadow: 0 0 0 10px rgba(249, 115, 22, 0); }
}
 
/* ---------- Mobiili ---------- */
@media (max-width: 900px) {
    .skills-page { padding: 140px 20px 70px; }
    .skills-header { margin-bottom: 70px; }
    .languages,
    .about-skills { margin-bottom: 90px; }
 
    .skill-grid .skill-card:nth-child(even) { margin-top: 0; }
 
    .about-skills {
        grid-template-columns: 1fr;
        gap: 10px;
    }
 
    .about-skills .section-title { position: static; }
 
    .groups {
        display: flex;
        flex-direction: column;
    }
 
    .group:nth-child(n) { margin-top: 0; }
}

/*Projects*/
.projects-page {
    position: relative;
    z-index: 1;
    color: rgba(255, 255, 255, 0.915);
    padding: 170px 8% 100px;
}

.project-list {
    display: flex;
    flex-direction: column;
    gap: 110px;
}
 
.project {
    max-width: 980px;
    width: 100%;
    opacity: 0;
    transform: translateY(70px);
    transition: opacity 0.9s ease, transform 0.9s ease;
}
    
.project.visible {
    opacity: 1;
    transform: none;
}
    
/* Epäsymmetria: parittomat vasemmalle, parilliset oikealle */
.project:nth-child(odd)  { align-self: flex-start; }
.project:nth-child(even) { align-self: flex-end; }

.project-card {
    position: relative;
    display: grid;
    grid-template-columns: 1fr 1fr;
    overflow: hidden;
    background: #1a1210;
    border: 3px solid #f07015;
    border-radius: 8px;
    transition: transform 0.35s ease, box-shadow 0.4s ease;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5);
}
    
.project-card:hover {
    transform: translateY(-8px) scale(1.03);
    box-shadow: 0 30px 80px rgba(249, 115, 22, 0.25);
}
    
/* Parillisissa projekteissa kuva on oikealla */
.project:nth-child(even) .project-media { order: 2; }
    
.project-media {
    position: relative;
    min-height: 320px;
    overflow: hidden;
    background:
        radial-gradient(circle at 30% 30%, #f07015 0%, transparent 55%),
        linear-gradient(135deg, #3a1608, #0d0907);
}
    
.project-media img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.8s ease;
}
    
.project-card:hover .project-media img {
    transform: scale(1.06);
}
    
.project-number {
    position: absolute;
    left: 24px;
    bottom: 10px;
    font-size: 6rem;
    font-weight: bold;
    line-height: 1;
    color: rgba(255, 255, 255, 0.18);
}
    
.project-body {
    display: flex;
    flex-direction: column;
    gap: 16px;
    padding: 40px;
}
    
.project-year {
    font-size: 0.85rem;
    letter-spacing: 2px;
    text-transform: uppercase;
    color: #f07015;
}
    
.project-title {
    font-size: 1.9rem;
    line-height: 1.15;
}
    
.project-desc {
    line-height: 1.7;
    opacity: 0.85;
}
    
.project-tags {
    list-style: none;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}
    
.project-tags li {
    padding: 4px 14px;
    border: 2px solid #f07015;
    border-radius: 20px;
    font-size: 0.85rem;
    opacity: 0;
    transform: translateY(12px);
    transition: opacity 0.5s ease, transform 0.5s ease;
}
    
.project.visible .project-tags li {
    opacity: 1;
    transform: none;
}
    
.project-links {
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
    margin-top: auto;
    padding-top: 10px;
}

/* Placeholder-kortti tulevia projekteja varten */
.project-soon {
    align-self: center;
    max-width: 980px;
    width: 100%;
    padding: 50px 30px;
    text-align: center;
    border: 3px dashed rgba(249, 115, 22, 0.5);
    border-radius: 8px;
    color: rgba(255, 255, 255, 0.6);
    animation: pulse 3s ease-in-out infinite;
}
    
@keyframes pulse {
    0%, 100% { border-color: rgba(249, 115, 22, 0.25); }
    50%      { border-color: rgba(249, 115, 22, 0.7); }
}
    
/* ---------- Mobiili ---------- */
@media (max-width: 800px) {
    .projects-page { padding: 140px 20px 70px; }
    .project-list { gap: 60px; }
    .project-card { grid-template-columns: 1fr; }
    .project:nth-child(even) .project-media { order: 0; }
    .project-media { min-height: 220px; }
    .project-body { padding: 25px; }
    .project:nth-child(odd),
    .project:nth-child(even) { align-self: stretch; }
}

/*Contact*/
.contact-page {
    position: relative;
    z-index: 1;
    min-height: 100vh;
    display: grid;
    grid-template-columns: 5fr 7fr;
    gap: 60px;
    padding: 170px 8% 100px;
    color: rgba(255, 255, 255, 0.915);
}

.contact-page .page-hero {
    display: block;
    margin-bottom: 0;
}
 
/* Lomake on tarkoituksella laskettu hieman alemmas, jotta asettelu ei ole suora */
.contact-form {
    margin-top: 60px;
    padding: 40px;
    background: #1a1210;
    border: 3px solid #f07015;
    border-radius: 5px;
}
 
.field {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 24px;
}
 
.field label {
    font-weight: bold;
}
 
.field input,
.field textarea {
    width: 100%;
    padding: 14px 16px;
    font: inherit;
    color: inherit;
    background: #0d0907;
    border: 2px solid rgba(255, 255, 255, 0.25);
    border-radius: 5px;
    transition: border-color 0.3s ease;
}
 
.field textarea {
    min-height: 180px;
    resize: vertical;
    line-height: 1.6;
}
 
.field input:focus,
.field textarea:focus {
    outline: none;
    border-color: #f07015;
}
 
.field input:focus-visible,
.field textarea:focus-visible {
    outline: 2px solid #f07015;
    outline-offset: 2px;
}
 
.field .invalid {
    border-color: #ff5a4d;
}
 
.word-count {
    font-size: 0.9rem;
    opacity: 0.7;
}
 
.word-count.ok {
    color: #f07015;
    opacity: 1;
}
 
.submit-btn {
    position: relative;
    isolation: isolate;
    overflow: hidden;
    color: #f07015;
    background: transparent;
    border: 2px solid #f07015;
    transition: color 0.3s ease, color 0.3s ease, opacity 0.3s ease;
    padding: 14px 32px;
    font: inherit;
    font-weight: bold;
    border-radius: 5px;
    z-index: 1;
    cursor: pointer;
}

.submit-btn::before {
    content: "";
    position: absolute;
    inset: 0;
    background: #f07015;
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.3s ease;
    z-index: -1;
}
 
.submit-btn:hover:not(:disabled) {
    background: transparent;
    color: black;
}

.submit-btn:hover:not(:disabled)::before {
    transform: scaleX(1);
}

.submit-btn:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}
 
.form-status {
    margin-top: 20px;
    min-height: 1.5em;
    font-weight: bold;
}
 
.form-status.success { color: #6fd98b; }
.form-status.error   { color: #ff5a4d; }
 
/* Piilotettu roskapostin esto, ihmiset eivät näe tätä */
.hp-field {
    position: absolute;
    left: -9999px;
    width: 1px;
    height: 1px;
    opacity: 0;
}
 
@media (max-width: 900px) {
    .contact {
        grid-template-columns: 1fr;
        padding: 140px 20px 70px;
        gap: 30px;
    }
    .contact-form {
        margin-top: 0;
        padding: 25px;
    }
}

.reveal.from-left  { transform: translateX(-100px); }
.reveal.from-right { transform: translateX(100px); }

.reveal.visible {
    opacity: 1;
    transform: none;
}


.reveal .cards-list li {
    opacity: 0;
    transform: translateY(15px);
    transition: opacity 0.5s ease, transform 0.5s ease;
}

.reveal.visible .cards-list li {
    opacity: 1;
    transform: none;
}

.reveal.visible .cards-list li:nth-child(1) { transition-delay: 0.4s; }
.reveal.visible .cards-list li:nth-child(2) { transition-delay: 0.5s; }
.reveal.visible .cards-list li:nth-child(3) { transition-delay: 0.6s; }
.reveal.visible .cards-list li:nth-child(4) { transition-delay: 0.7s; }
.reveal.visible .cards-list li:nth-child(5) { transition-delay: 0.8s; }

@media (prefers-reduced-motion: reduce) {
    
    .orb-inner,
    .group-learning h3::before,
    .project-soon {
        animation: none;
    }

    .reveal,
    .chips li,
    .project,
    .project-tags li,
    .reveal .cards-list li {
        opacity: 1;
        transform: none;
        transition: none;
    }

    .timeline::before {
        transform: none;
        transition: none;
    }
    
    .skill-fill {
        transition: none;
    }

    .fact-wrap:hover,
    .portrait-wrap.visible:hover,
    .skill-wrap:hover,
    .project-card:hover {
        transform: none;
    }
}

@media (max-width: 800px) {
    .cards { padding: 60px 20px; }
    .card-left, .card-right { align-self: stretch; margin: 0; }
}