
/*hero sektion*/
img, svg {
    max-width: 100%;
    height: auto;
}

#hero{
    width: 100%;
    height: 100vh;
    min-height: 500px;
    position: relative;

    display: flex;
    flex-direction: column;

    transition: height 0.5s ease-in-out;
}

#hero svg{
    overflow: visible;
}

.logo-svg{
    padding-top: 6rem;
    padding-left: clamp(1rem, 5vw, 5rem);
    width: clamp(320px, 60vw, 850px);
}
.logo-svg img{
    width: 100%;
    height: auto;
}

.intro{
    padding-left: clamp(1rem, 5vw, 5rem);
    padding-top: 3rem;
    width: fit-content;
    max-width: 500px;
}
.intro p{
    font-size: 1.5rem;
    font-weight: 400;
    color: var(--color-text-primary);
    margin-top: 1rem;
}

.explore{
    display: flex;
    margin-top: 8rem;
    justify-content: center;
    gap: 0.5rem;
    z-index: 2;
}
.explore h3{
    font-size: 1.5rem;
    font-family: "fraunces", serif;
    font-weight: 600;
    color: var(--color-text-secondary);
}
.explore svg{
    stroke: var(--color-text-secondary);
    width: 1.5rem;
    height: auto;
}

.hero-right{
    position: absolute;
    bottom: -10px;
    right: clamp(10rem, 14vw, 260px);
    display: flex;
    flex-direction: row;
    align-items: flex-end;
    width: auto;
    height: auto;
}
.hero-right img{
    width: 85%;
    max-width: 450px;
    height: auto;
    margin: 2rem auto 0;
    z-index: 5;

    transform:scaleX(-1);
}

.plant-illustration{
    position: absolute;
    bottom: -15px;
    right: clamp(0.5rem, 2vw, 10px);
    width: clamp(220px, 35vw, 500px);
    height: auto;
    margin-left: 2rem;
    z-index: 1;
    transform-origin: bottom center;
}

.tt-leaf {
  transform-box: fill-box;
  transform-origin: bottom center;
  transition: transform 0.25s ease-out;
  will-change: transform;
}


/*--------------projects sektion---------------*/
.projects{
    margin-bottom: 5rem;
}

.project{
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1.5rem;
    flex: 0 1 430px;
}

.projects-section{
    width: min(1100px, 90%);
    margin: 1rem auto 3rem auto;
    padding-inline: 5rem;
    min-height: 180px;
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
    overflow: visible;
    text-align: center;
}


.projects-section h2{
    color: var(--color-text-primary);
    z-index: 10;
    max-width: fit-content;
    margin: 0;
}

.project-deco{
    position: absolute;
    inset: 0;
    pointer-events: none;
    z-index: 1;
}

/* Selve grene */
.gren{
    position: absolute;
    top: -35px;
    height: auto;
    transform-origin: top center;
    filter: drop-shadow(0 6px 10px rgba(0,0,0,0.10));
    z-index: 1;
}


.gren--left{
    left: clamp(-60px, -6vw, -20px);
    width: clamp(120px, 16vw, 220px);
    animation: sway-left 6s ease-in-out infinite;
}

.gren--mid{
    left: 50%;
    transform: translateX(-50%);
    width: clamp(100px, 12vw, 170px);
    animation: sway-mid 7.5s ease-in-out infinite;

}

.gren--right{
    right: clamp(-90px, -7vw, -25px);
    width: clamp(180px, 22vw, 300px);
    animation: sway-right 6.5s ease-in-out infinite;
}

@keyframes sway-left{
  0%, 100% { transform: rotate(-1.5deg); }
  50%      { transform: rotate(1.5deg); }
}

@keyframes sway-mid{
  0%, 100% { transform: translateX(-50%) rotate(-1.5deg); }
  50%      { transform: translateX(-50%) rotate(1.5deg); }
}

@keyframes sway-right{
  0%, 100% { transform: rotate(1.5deg); }
  50%      { transform: rotate(-1.5deg); }
}

#project-container{
    display: flex;
    gap: 2rem;
    justify-content: center;
    flex-wrap: wrap;
}

.video-wrapper{
    position: relative;
    display: inline-block;
    padding: 18px; /* afstand mellem video og blob */
    z-index: 3;
}

.video-wrapper::before{
    content: "";
    position: absolute;
    inset: 0;
    background: var(--color-surface);
    z-index: 1;

    border-radius: 
      100% 100% 5% 5% / 
      5% 5% 90% 60%;

    transform: rotate(-2deg);
}

.video-wrapper video{
    position: relative;
    z-index: 1;

    width: 100%;
    max-width: 500px;
    height: auto;
    display: block;
}

.project-summary h3{
    font-size: 1.4rem;
}

/*skills--------------------------------------------------------*/

.skills-wrapper{
    width: 100%;
    margin: auto;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.skills-wrapper h2{
    text-align: center;
    margin-top: 1rem;
}

.skills{
    width: 100%;
    padding: 4rem 2rem;
    display: flex;
    flex-direction: row;
    gap: 8rem;
    align-items: center;
    justify-content: center;
}

.skills-list{
    display: flex;
    gap: 2rem;
    flex-wrap: wrap;
    justify-content: center;
    flex-direction: column;
}

.skills-list h3{
    font-size: 1.5rem;
    color: var(--color-text-primary);
    font-family: "fraunces", serif;
}

.skills-icons{
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 0.5rem;
}
.skills-icons img{
    width: 70px;
    height: auto;
    aspect-ratio: 1/1;
    object-fit: contain;
}

.skill{
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: .4rem;
}

.bar{
  width: 70px;
  height: 10px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.15); /* lys “track” */
  border: #3F6A45 solid 2px;
  overflow: hidden;
}

.bar span{
  display: block;
  height: 100%;
  width: var(--level, 70%);

  /* start: tom */
  transform: scaleX(0);
  transform-origin: left;
  border-radius: 999px;

  /* farve */
  background: #3F6A45;

  /* animation */
  transition: transform 900ms cubic-bezier(.16,1,.3,1);
}

/* Når sektionen er aktiv: fyld op */
.skills-wrapper.is-visible .bar span{
  transform: scaleX(1);
}
.skills-wrapper.is-visible .skill:nth-child(1) .bar span { transition-delay: 0ms; }
.skills-wrapper.is-visible .skill:nth-child(2) .bar span { transition-delay: 90ms; }
.skills-wrapper.is-visible .skill:nth-child(3) .bar span { transition-delay: 180ms; }
.skills-wrapper.is-visible .skill:nth-child(4) .bar span { transition-delay: 270ms; }



/*contact sektion-----------------------------------------------------*/

.contact{
    width: 100%;
    padding: 4rem 2rem;
    display: flex;
    flex-direction: row;
    align-items: center;
    background-color: var(--color-accent);
    border-radius: 50px 50px 0 0;
}

.contact-illustration{
    width: 100%;
    max-width: 400px;
    height: auto;
    margin: 0 auto;
}

.contact-illustration img{
    width: 100%;
    height: auto;
}

.contact-content{
    width: 100%;
    max-width: 500px;
    margin: auto;
    display: flex;
    flex-direction: column;
    gap: 1rem;
    color: var(--color-text-on-green);
}

.contact-content h2{
    color: var(--color-text-on-green);
}
.contact-content p{
    padding-top: 2rem;
    font-size: 1.4rem;
    line-height: 1.6;
}

.contact-content .typewriter{
    border-right: 2px solid var(--color-text-on-green);
}

@media (max-width: 920px){
  .logo-svg{ width: clamp(320px, 75vw, 650px); }
  .hero-right{ right: clamp(1rem, 5vw, 80px); }

    .projects-section{
        min-height: 160px;
        padding-inline: 3rem;
    }

    .gren--left{
        left: -30px;
        width: 120px;
    }

    .gren--mid{
        width: 90px;
        top: -25px;
    }

    .gren--right{
        right: -70px;
        width: 180px;
    }


    .projects{
        width: 90%;
    }
    .project p{
        font-size: 1.3rem;
    }
    .skills-wrapper{
        width: 100%;
    }

    .skills{
        gap: 2rem;
    }
   .skills-icons img{
        width: 60px;
    }

    .bar{
        width: 60px;
    }
}


@media screen and (max-width: 600px) {
    
    #hero{
        height: 100svh;
        width: 90%;
        margin: auto;
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: flex-start;
        position: relative;
    }

    .hero-left {
        width: 100%;
        padding: 0;
        display: flex;
        flex-direction: column;
        align-items: center; /* vigtig */
    }

    .logo-svg{
        width: 100%;
        padding: 6rem 1rem 1rem 1rem;
        display: flex;
        justify-content: center;
    }
    .logo-svg img{
        width: auto;
    }

    .intro{
        padding: 1.5rem 0;
        width: 100%;
        max-width: 400px;
        margin: 0 auto;
        display: flex;
        flex-direction: column;
        align-items: center;
        text-align: center;
    }

    .intro h2{
        font-size: 1.5rem;
    }

    .intro p{
        font-size: 1.1rem;
    }

    .explore{
        margin-top: 1.8rem;
    }
    .explore h3{
        font-size: 1.2rem;
    }
    #hero .explore svg {
        width: 1.5rem;
        height: auto;
    }

    .plant-illustration {
        width: 200px;
        height: auto;
        position: absolute;
        bottom: -1px;
        left: 55%;      
        transform: translateX(-50%);
        margin: 0;
    }

    #hero svg {
        width: 100%; 
        height: auto;
    }

    .hero-right{
        left: 10%;
        width: 200px;
    }


    /*--------------------projekter--------------------*/
    .projects{
        padding: 2rem 1rem;
        width: 90%;
        margin: auto;
    }
    .projects-section{
        min-height: 120px;
        padding-inline: 1rem;
    }
    .projects-section h2{
        margin: 0 auto;
        text-align: center;
        max-width: 100%;
        font-size: 1.3rem;
    }
    .gren{
        width: 150px;
        top: -60px;
        animation-duration: 8s;
    }
    .gren--mid{
        display: none; 
    }
    .gren--left{
        width: 120px;
    }
    
    .project-list{
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    .project-summary h3{
    font-size: 1.1rem;
}

    .line2 {
        position: absolute;         
        left: 0;
        width: 100%; 
    }

    /*--------------------skills--------------------*/
    .skills-wrapper{
        flex-direction: column;
        gap: 2rem;
        width: 90%;
        margin: auto;
    }
    .skills-wrapper h2{
        margin: 0;
    }
    .skills{
        flex-direction: column;
        gap: 2rem;
        width: 100%;
        align-items: flex-start;
        padding: 1rem 1rem;
    }
    .skills-icons{
        gap: 1rem;
    }
    .skills-icons img{
        width: 50px;
    }

    .bar{
        width: 50px;
    }

    /*--------------------contact--------------------*/
    .contact{
        flex-direction: column;
        gap: 2rem;
        padding: 2rem 1rem;
        justify-content: center;
        align-items: center;
        width: 100%;
    }
    .contact-illustration{
        display: none;
    }
    .contact-content{
        width: 100%;
        max-width: 400px;
        align-items: center;
    }
    .contact-content h2{
        font-size: 1.5rem;
    }
    .contact-content p{
        font-size: 1.1rem;
        text-align: left;
    }
}

/*----------------------reduced motion-------------------*/

@media (prefers-reduced-motion: reduce){
  html:focus-within{
    scroll-behavior: auto;
  }

  *, *::before, *::after{
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }

  /* Hvis du vil have bars fyldt uden animation */
  .bar span{
    transform: scaleX(1) !important;
  }
}
