html {
  scroll-behavior: smooth;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

img {
    max-width: 100%;
}

/* FONTS */
.primaryFont {
  font-family: "Changa One", sans-serif;
  font-weight: 400;
  font-style: normal;
}

h1 {
    font-size: 4rem;
}

h2 {
    font-size: 3rem;
}

h3 {
    font-size: 2.5rem;
}

h4 {
    font-size: 2rem;
}

p, li {
    font-size: 1.5rem;
}

a {
    text-decoration: none;
}

.clickable {
    cursor: pointer;
}

@media (max-width: 768px) {
    h1 {
        font-size: 2.5rem;
    }

    h2 {
        font-size: 2rem;
    }

    h3 {
        font-size: 1.5rem;
    }

    h4 {
        font-size: 1rem;
    }

    p, li {
        font-size: 1rem;
    }
}

/* GLOBAL */
.primaryBackgroundColor {
    background-color: black;
}

.primaryColor {
    color: white;
}

.secondaryColor {
    color: greenyellow;
}

.tertiaryColor {
    color: grey;
}

html, body {
    overflow-x: hidden;
    max-width: 100%;
}

/* HEADER */
header {
    height: 15vh;
    margin-left: 20px;
    margin-right: 20px;
}

/* NAV */
header nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

header nav ul {
    display: flex;
    gap: 30px;
    list-style: none;
}

/* HAMBURGER */
.hamburger {
    display: none;
    flex-direction: column;
    justify-content: space-between;
    width: 32px;
    height: 24px;
    padding: 0;
    background: none;
    border: none;
    cursor: pointer;
    z-index: 30;
}
 
.hamburger span {
    display: block;
    width: 100%;
    height: 3px;
    background-color: white;
    border-radius: 2px;
    transition: transform 0.3s ease, opacity 0.3s ease;
}


/* MAIN */
#About h2 {
    text-align: center;
    /* margin-bottom: 10px; */
}

#AboutContainer {
    height: 80vh;
    display: flex;
    justify-content: space-around;
    align-items: center;
    /* position: relative;  */
    margin-left: 20px;
    margin-right: 20px;
}

#About #Description {
    width: 40%;
    display: flex;
    flex-direction: column;
}

#About #Image {
    width: 25%;
}

#About #Image .puzzlePiece {
    display: block;
    position: absolute;
    width: 100px;
    height: 100px;
    cursor: grab;
    z-index: 15;
    filter: invert(100%);
    animation: spin 18s linear infinite;
}

@keyframes spin {
  from { transform: rotate(0deg)}
  to { transform: rotate(360deg)}
}

#About #Image .missingPiecePlacement {
    position: absolute;
    width: 100px;
    height: 100px;
    z-index: 10;
    top: 70%;  
    left: 84%;
    transform: translate(-50%, -50%);
    filter: grayscale(100%);
}

#About #Image img {
    width: 100%;
    filter: invert(100%);
}

#Projects {
    margin: 0 auto;
    width: 40%;
    height: 80vh;
}

#Projects h2 {
    text-align: center;
    margin-bottom: 20px;
}

#Projects .atom {
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
    height: 100%;
}

#Projects .orbit {
    position: absolute;
    overflow: visible;
    width: 200px;
    height: 640px; 
}

#Projects .rot0  { 
    animation: spin 72s linear infinite; 
}

#Projects .rot60  { 
    animation: spin 72s linear infinite; 
    animation-delay: -12s;
}

#Projects .rot120 { 
    animation: spin 72s linear infinite; 
    animation-delay: -24s;
}

#Projects .nucleus {
    display: block;
    width: 50px;
    height: 50px;
    background-color: yellowgreen;
    border-radius: 50%;
    position: absolute;
    z-index: 2;
}

#Projects .firstEllipse,
#Projects .secondEllipse,
#Projects .thirdEllipse {
    fill: none;
    stroke: yellowgreen;
    stroke-width: 2;
    stroke-dasharray: 100;
    stroke-dashoffset: 100;
}

#Projects .atom.in-view .firstEllipse  { animation: draw 1.2s ease 0s forwards; }
#Projects .atom.in-view .secondEllipse { animation: draw 1.2s ease 0.6s forwards; }
#Projects .atom.in-view .thirdEllipse  { animation: draw 1.2s ease 1.2s forwards; }

@keyframes draw {
    to { stroke-dashoffset: 0; }
}

#Projects .orbit-arm { 
    position: absolute; 
    left: 50%; 
    top: 50%; 
    width: 0; 
    height: 0; 
    z-index: 4; 
}

#Projects .arm0   { animation: arm 72s linear infinite; }
#Projects .arm60  { animation: arm 72s linear -12s infinite; }
#Projects .arm120 { animation: arm 72s linear -24s infinite; }

@keyframes arm {
    from { transform: rotate(0); } 
    to { transform: rotate(360deg); } 
}

#Projects .arm-end { 
    position: absolute; 
    left: 0; 
    top: 0; 
    width: 0; 
    height: 0; 
}

#Projects .arm-end.up   { transform: translateY(-250px); }
#Projects .arm-end.down { transform: translateY(250px); }

#Projects .upright { 
    position: absolute; 
    left: 0; 
    top: 0; 
    width: 0; 
    height: 0; 
}

#Projects .spinrev0   { animation: spinrev 72s linear infinite; }
#Projects .spinrev60  { animation: spinrev 72s linear -12s infinite; }
#Projects .spinrev120 { animation: spinrev 72s linear -24s infinite; }

@keyframes spinrev { 
    from { transform: rotate(0); } 
    to { transform: rotate(-360deg); } 
}

#Projects .label-pop {
    width: 150px;
    font-size: 1.2rem;
    height: auto;
    display: flex;
    justify-content: center;
    align-items: start;
    flex-direction: column;
    border: 2px solid yellowgreen;
    left: 0; 
    top: 0; 
    white-space: nowrap;
    opacity: 0; 
    transform: translate(-50%, -50%) scale(0);
}
#Projects .atom.in-view .t1 { animation: pop .45s cubic-bezier(.34,1.56,.64,1) 0.3s forwards; }
#Projects .atom.in-view .t2 { animation: pop .45s cubic-bezier(.34,1.56,.64,1) 0s forwards; }
#Projects .atom.in-view .t3 { animation: pop .45s cubic-bezier(.34,1.56,.64,1) 0.9s forwards; }
#Projects .atom.in-view .t4 { animation: pop .45s cubic-bezier(.34,1.56,.64,1) 0.6s forwards; }
#Projects .atom.in-view .t5 { animation: pop .45s cubic-bezier(.34,1.56,.64,1) 1.5s forwards; }
#Projects .atom.in-view .t6 { animation: pop .45s cubic-bezier(.34,1.56,.64,1) 1.2s forwards; }

@keyframes pop {
    from { opacity: 0; transform: translate(-50%, -50%) scale(0); }
    to   { opacity: 1; transform: translate(-50%, -50%) scale(1); }
}

#Projects .atom:hover .orbit,
#Projects .atom:hover .orbit-arm,
#Projects .atom:hover .upright { 
    animation-play-state: paused; 
}

#Projects .label-hidden {
    width: 0;
    height: 25px;
    text-align: center;
    background-color: grey;
    border: 2px solid yellowgreen;
    white-space: nowrap;
    display: none;
}

#Projects .label-visible {
    width: 100%;
    height: 25px;
    text-align: center;
    background-color: black;
    border: 2px solid yellowgreen;
    white-space: nowrap;
}

#Projects .mainContainer{
    display: flex;
    justify-content: center;
}

#Projects .mainContainer .clickProjectHint{
    display: flex;
    flex-direction: column;
    align-items: center;
    position: absolute;
}

/* HARD SKILLS */
#HardSkills {
    height: 20vh;
    /* transform: rotate(-3deg); */
}

#HardSkills h2 {
    text-align: center;
    margin-bottom: 20px;
}

#HardSkills .marquee {
    display: flex; 
    overflow: hidden;
    top: 30%;
    opacity: 1; 
    height: 50px;
}

#HardSkills .track {
    display: flex; 
    background-color: black;
    list-style-type: none; 
    justify-content: flex-start; 
    flex-direction: row; 
    gap: 32px; 
    opacity: 1; 
    align-items: center; 
    width: max-content;
    will-change: transform;
    margin: 0;
    padding: 0;
}

#HardSkills .track li { 
    white-space: nowrap; 
}

#HardSkills .track:hover {
  animation-play-state: paused;
}

#HardSkills .text {
    flex-grow: 0; 
    flex-shrink: 0; 
    position: relative; 
    height: fit-content; 
    width: fit-content; 
    transform: none;
}

/* SOFT SKILLS */
#KeyStrengths {
    height: 100vh;
    margin-top: 50px;
    display: flex;
    flex-direction: column;
}

#KeyStrengths h2 {
    text-align: center;
    margin-bottom: 20px;
}

#KeyStrengths h3 {
    text-align: center;
    font-size: 1.5rem;
    margin-top: 10px;
    margin-bottom: 10px;
}

#KeyStrengths .cardsContainer {
    display: flex;
    justify-content: center;
    align-items: center;
    height: 50vh;
    gap: 30px;
    perspective: 1300px; 
    perspective-origin: 50% 30%;
}

#KeyStrengths .cardSocle {
    width: 200px;
    height: 260px;
    background-color: black;
    border: 2px solid greenyellow;
    border-radius: 10px;
        position: relative;

}

#KeyStrengths .card {
    padding: 20px;
    display: flex;
    flex-direction: column;
    flex-wrap: wrap;
    width: 200px;
    height: 260px;
    background-color: black;
    border: 2px solid greenyellow;
    text-align: center;
    justify-content: space-between;
    align-items: center;
    cursor: grab;
    border-radius: 10px;
    position: absolute;
}

#KeyStrengths .card.notMoved {
    transform-style: preserve-3d;
    animation: breath 4s ease-in-out infinite,
             drift 7s ease-in-out infinite;
}

@keyframes breath {               
  0%, 100% { translate: 0 0;     scale: 1;     }
  50%      { translate: 0 -26px; scale: 1.035; }   
}

@keyframes drift {              
  0%, 100% { rotate: 1  1 0 5deg; }
  33%      { rotate: -1 1 0 6deg; }
  66%      { rotate: 1 -1 0 5deg; }
}

#KeyStrengths .card i{
    font-size: 50px;
}

#KeyStrengths .cardInfo {
    height: 40vh;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 40px;
}

#KeyStrengths .cardPlacement {
    width: 200px;
    height: 260px;
}

#KeyStrengths .cardDescription {
    width: 50%;
}

#KeyStrengths .mainContainer{
    display: flex;
    justify-content: center;
}

#KeyStrengths .mainContainer .clickCardHint{
    display: flex;
    flex-direction: column;
    align-items: center;
    position: absolute;
}

/* CONTACT */
#Contact {
    height: 30vh;
    margin-top: 50px;
    margin-left: 20px;
    margin-right: 20px;
    text-align: center;
}

#Contact h2 {
    margin-bottom: 20px;
}

footer {
    height: 10vh;
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-left: 20px;
    margin-right: 20px;
}

footer div {
    width: 33%;
}

footer .copyright {
    text-align: start;
}

footer .backToTop {
    text-align: center;
}

footer .contact {
    text-align: end;
}

/* RESPONSIVE */
@media (max-width: 768px) {
    header {
        height: auto;
        padding: 15px 0;
        margin-left: 5px;
        margin-right: 5px;
    }
 
    header nav {
        position: relative;
    }
 
    .hamburger {
        display: flex;
    }
 
    header nav ul {
        position: absolute;
        top: 100%;
        right: 0;
        left: 0;
        flex-direction: column;
        align-items: center;
        gap: 20px;
        background-color: black;
        padding: 0;
        border-top: 0 solid greenyellow;
        max-height: 0;
        overflow: hidden;
        opacity: 0;
        pointer-events: none;
        transition: max-height 0.3s ease, opacity 0.3s ease, padding 0.3s ease;
        z-index: 20;
    }
 
    header nav.nav-open ul {
        max-height: 320px;
        padding: 20px 0;
        border-top-width: 2px;
        opacity: 1;
        pointer-events: auto;
    }
 
    header nav.nav-open .hamburger span:nth-child(1) {
        transform: translateY(10px) rotate(45deg);
    }
 
    header nav.nav-open .hamburger span:nth-child(2) {
        opacity: 0;
    }
 
    header nav.nav-open .hamburger span:nth-child(3) {
        transform: translateY(-10px) rotate(-45deg);
    }
    

    #AboutContainer {
        flex-direction: column;
        height: auto;
        gap: 40px;
        padding: 40px 0;
        margin-left: 5px;
        margin-right: 5px;
    }

    #About #Description {
        text-align: center;
    }

    #About #Description,
    #About #Image {
        width: 90%;
    }

    #About #Image .puzzlePiece,
    #About #Image .missingPiecePlacement {
        display: none;
    }

    #About #Image {
        filter: invert(100%);
    }

    #HardSkills {
        height: auto;
        padding: 20px 0;
    }

    #Projects {
        width: 90%;
        height: 60vh;
        
    }

    #KeyStrengths {
        height: auto;
        margin-top: 30px;
        padding-bottom: 40px;
        
    }

    #KeyStrengths .cardsContainer {
        height: auto;
        flex-wrap: wrap;
        gap: 20px;
        padding: 0 20px;
        margin-top: 40px;
    }

    #KeyStrengths .cardInfo {
        height: 30vh;
        flex-shrink: 0;
    }

    #KeyStrengths .card,
    #KeyStrengths .cardSocle,
    #KeyStrengths .cardPlacement {
        width: 18vw;
        height: 24vw;
    }

    #KeyStrengths .card {
        top: -1vw;
        left: -1vw;
    }

    #KeyStrengths .card i {
        font-size: 5vw;
    }

    #KeyStrengths .card h3 {
        display: none;
    }

    #KeyStrengths .cardInfo {
        flex-direction: column;
        justify-content: flex-start;
        text-align: center;
    }

    #KeyStrengths .cardPlacement {
        width: 75px;
        height: 100px;
    }

    #KeyStrengths .cardDescription {
        width: 90%;
    }

    @keyframes breath {               
        0%, 100% { translate: 0 0;     scale: 1;     }
        50%      { translate: 0 -12px; scale: 1.035; }   
    }

    #Contact {
        height: auto;
        padding: 30px 0;
    }

    footer {
        flex-direction: column;
        height: auto;
        gap: 12px;
        padding: 20px 0;
        margin-left: 5px;
        margin-right: 5px;
    }

    #Contact {
        margin-left: 5px;
        margin-right: 5px;
    }

    footer div,
    footer .copyright,
    footer .backToTop,
    footer .contact {
        width: 100%;
        text-align: center;
    }

    #Projects .atom {
        transform: scale(0.9);
        transform-origin: center;
    }
}

@media (max-width: 576px) {
    #Projects .atom {
        transform: scale(0.55);
        transform-origin: center;
    }
}