* {
    font-family: 'Plus Jakarta Sans', sans-serif;
    /*outline: 1px solid red;*/
}

:root { 

    /* fonts size */

    --font-size-base: 16px;
    --font-size-display: 64px;
    --font-size-h1: 48px;
    --font-size-h2: 28px;
    --font-size-h3: 20px;
    --font-size-h4: 16px;
    --font-size-txt-md: 16px;
    --font-size-txt-sm: 14px;
    --font-size-btn: 16px;
    --font-size-link: 12px;
    
    /* colors */

    --color-primary-700: #DE8200;
    --color-primary-500: #FFD54D;
    --color-primary-200: #ffdfb2;
    --color-primary-100: #FFF9F0;

    --color-secondary: #01100B;

    --color-neutral-0: #FFFFFF;
    --color-neutral-200: #DFDCD7;
    --color-neutral-700: #554F44;
    --color-neutral-900: #282520;

    /* size */

    --space-04: 0.25rem;
    --space-08: 0.5rem;
    --space-12: 0.75rem;
    --space-16: 1rem;
    --space-20: 1.25rem;
    --space-24: 1.5rem;
    --space-32: 2rem;
    --space-40: 2.5rem;
    --space-48: 3rem;
    --space-60: 3.75rem;
    --space-120: 8rem;

    
}

html {
  scroll-behavior: smooth;
}

/* typography */

.display {
    margin: 0;
    font-size: var(--font-size-display);
    font-weight: 600;
    line-height: 100%;
    text-align: center;
} 

h1 {
    margin: 0;
    font-size: var(--font-size-h1);
    font-weight: 600;
    line-height: 130%;
    text-align: left;
}

h2 {
    margin: 0;
    font-size: var(--font-size-h2);
    font-weight: 600;
    color: var(--color-secondary);
    text-align: left;
    line-height: 1.5;
}

h3 {
    margin: 0;
    font-size: var(--font-size-h3);
    font-weight: 600;
    color: var(--color-secondary);
    text-align: left;
    line-height: 1.5;
}

h4 {
    margin: 0;
    font-size: var(--font-size-h4);
    font-weight: 600;
    color: var(--color-secondary);
    text-align: left;
    line-height: 1.3;        
}

.text-md {
    margin: 0;
    font-size: var(--font-size-txt-md);
    font-weight: 400;
    color: var(--color-neutral-700);
    line-height: 150%;
    text-align: left;
}

.text-sm {
    margin: 0;
    font-size: var(--font-size-txt-sm);
    font-weight: 400;
    color: var(--color-neutral-700);
    line-height: 150%;
    text-align: left;
}

.button {
    margin: 0;
    font-size: var(--font-size-btn);
    font-weight: 600;
    color: var(--color-primary-700);
    line-height: 150%;
    text-align: left;
    text-decoration: none;
}

.text-link {
    margin: 0;
    font-size: var(--font-size-link);
    font-weight: 400;
    color: var(--color-secondary);
    line-height: 150%;
    text-align: left;
    text-decoration: none;
}

/* buttons */

.btn-secondary {
background-color: var(--color-primary-700);
    font-size: var(--font-size-btn);
    font-weight: 500;
    color: var(--color-primary-100);      
    
    padding: 16px;
    text-decoration: none;

    border-radius: 16px;
    border: 1px solid var(--color-neutral-900);

    box-shadow: inset 0px -2px 4px rgba(40, 37, 32, 0.7);

    display: flex;
    align-items: center;
    justify-content: center;
}

.btn-default {
    background-color: var(--color-primary-200);
    font-size: var(--font-size-btn);
    font-weight: 500;
    color: var(--color-secondary);      
    
    padding: 12px 16px;
    text-decoration: none;

    border-radius: 12px;
    border: 1px solid var(--color-secondary);

    box-shadow: inset 0px -2px 4px rgba(1, 16, 11, 0.7);

    display: flex;
    align-items: center;
    justify-content: center;

}

.btn-secondary:active {
    background-color: var(--color-primary-500);
    color: var(--color-secondary);
}

.btn-default:hover {
    background-color: var(--color-primary-700);
    color: var(--color-primary-100);
}

.btn-secondary:hover {
    background-color: var(--color-primary-200);
    color: var(--color-primary-700);
}

/* general body style */

body {
    margin: 0px;
    background-color: var(--color-primary-200);
    display: flex;
    flex-direction: column;
    align-items: center;
}

section, footer {
    display: flex;
    justify-content: center;
    margin: 16px;
    gap: 2rem;
}

img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 8px;
    align-items: center;
}

.vertical-text-layout {
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 0.5rem;
}

/* Menu and top navigation */

header {
    display: flex;
    flex-direction: row;
    justify-content: center;
    align-items: center;
    width: 100%;
    margin: 0;
    position: fixed;
    top: 0;
    z-index: 100;
}

.header-container {
    display: flex;
    width: 100%;
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
    max-width: 1440px;
    margin: 0px 24px 0px 24px;
}

header a {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: var(--space-08);
    background-color: var(--color-primary-200);
    padding: 4px;
    border-radius: 8px;
}

header a img {
    width: 24px;
    height: 24px;
}

header .topbar {
    display: flex;
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
    margin: 0rem 1rem;
    gap: var(--space-08);
}

header .topbar a {
    background-color: var(--color-primary-200);
    padding: 8px;
    border-radius: 4px;
}

#hero {
    flex-direction: column;
    justify-content: center;
    height: 70vh;
    padding-top: 48px;
}

#hero .animated-character {
    position: relative;
    width: 600px;
    height: 400px;
    align-self: center;
}

#hero .animated-character .hero-comp {
    position: absolute;
}

/* Hero-comp animation */

.animated-character :nth-child(2) {
    animation: floating 3s ease-in-out infinite;
}

@keyframes floating {
    0% {top: 0px;}
    50% {top: -25px;}
    100% {top: 0px;}

}

.animated-character :nth-child(3) {
    animation: shadowing 3s ease-in-out infinite;
}

@keyframes shadowing {
    0% 
        {transform: scaleX(1);
        transform-origin: center;}
    50% 
        {transform: scaleX(0.85);
        transform-origin: center;}
    100% 
        {transform: scaleX(1);
        transform-origin: center;}
}

/* End Hero-comp animation */

#hero .hero-content {
    display: flex;
    flex-direction: column;
    gap: var(--space-60);
}

#hero .hero-content .cta {
    display: flex;
    gap: 1rem;
    justify-content: center;
}

#hero .hero-content .cta a {
    text-decoration: none;
    color: var(--color-neutral-700);
    font-size: var(--font-size-link);
}

#introduction {
    flex-direction: row-reverse;
    max-width: 1040px;
}

#introduction .vertical-text-layout {
    align-items: flex-start;
    gap: var(--space-32);
}

#introduction img {
    width: 45%;
}

.elipse,
.curve {
    width: 100%;
}

.elipse {
  background-color: var(--color-primary-200);
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  margin: 0;
}

.curve svg {
  position: relative;
  display: block;
  width: 100%;
  height: 150px; /* Regola questa altezza per accentuare la curva */
}

/* Il colore della forma SVG deve corrispondere alla sezione SUCCESSIVA */
.curve .shape-fill {
  fill: #050a09; 
}



#projects, 
#other-works .otherWorks-group,
#skills,
#bio,
footer {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
    margin: 0;
    padding: 120px 0px;
    gap: var(--space-60);
    
}

#projects,
footer {
    background-color: var(--color-secondary);
    color: var(--color-primary-200);
}

#projects .projects-group,
#skills,
#bio,
footer .footer-group {
    display: flex;
    flex-direction: column;
    margin: 0px 16px;
    max-width: 1040px;
}

#projects .vertical-text-layout,
#other-works .vertical-text-layout {
    align-items: center;
}

#projects .card-work .container-work {
    display: flex;
    gap: 16px;
    flex-wrap: wrap-reverse;
    color: var(--color-primary-200);
}

#projects .card-work .container-work .description-work {
    width: 48%;
}

#projects .card-work .container-work .description-work h2,
#projects .card-work .container-work .description-work .text-md {
    color: var(--color-primary-200);
}

#projects .card-work .container-work img {
    width: 50%;
    border-radius: 8px;
    object-fit: cover;
    aspect-ratio: 4/3;
}

#projects .card-work .container-work .description-work .info-work {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.card-work .container-work .description-work .info-work .keyWords-container {
    display: flex;
    gap: var(--space-08);
}

.card-work .container-work .description-work .info-work .key-words {
    font-size: var(--font-size-link);
    border: 1px solid var(--color-primary-200);
    border-radius: 8px;
    padding: 8px 16px;
    box-shadow: inset 0px -2px 4px rgba(255, 223, 178, 0.3);
}

#projects .card-work .container-work .description-work .buttons {
    margin-top: 100px;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

#projects .card-work hr {
    margin-top: 60px;
    border: 1px solid var(--color-neutral-900);
    }

#projects .link {
    display: flex;
    justify-content: flex-end;
}

#other-works {
    align-items: center;
}

#other-works .grid-container {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
    width: 100%;
    max-width: 1330px;

}

#other-works .grid-container .grid-item {
    height: 300px;
    border-radius: 8px;
    opacity: 0.85;
}

#skills {
    align-items: center;
}

#skills .vertical-text-layout {
    align-items: center;
}

#skills .vertical-text-layout h1,
#skills .vertical-text-layout p
#skills .cards-container .skills-card {
    align-items: center;
    text-align: center;
    max-width: 800px;
}

#skills .cards-container {
    display: flex;
    flex-direction: row;
    gap: var(--space-24);
}

#skills .cards-container .skills-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: var(--space-24);
    width: 33.33%;
}

#skills .cards-container .skills-card img {
    width: 100%;
    height: auto;
}

#skills .cards-container .skills-card .text-md {
    text-align: center;
}

#bio {
    display: flex;
    flex-direction: row;
    align-items: flex-start;
    gap: var(--space-32);
    max-width: 800px;
    margin: auto;
}

#bio .bio-group {
    display: flex;
    gap: 24px;
}

#bio .gif-container {
    flex: 2;
    display: flex;
}

#bio .vertical-text-layout {
    flex: 5;
    gap: var(--space-32)
}

#bio .vertical-text-layout .text-container {
    display: flex;
    flex-direction: column;
    gap: var(--space-24);
}

#bio .vertical-text-layout .buttons,
footer .buttons {
    display: flex;
    flex-wrap: wrap;
}

#contact {
    margin: 0;
    padding: 10vw 6vw;
    gap: 30px;
    display: flex;
    flex-direction: row;
}

#contact .animated-gif {
    display: flex;
    justify-content: center;
}

#contact .animated-gif img {
    border-radius: 8px;
    max-width: 200px;
}

#contact .animated-gif img {
    border-radius: 8px;
}

.wave-container {
    width: 100%;
    line-height: 0; /* Rimuove piccoli spazi bianchi sotto l'SVG */
    background-color: var(--color-primary-200); /* Sopra l'onda c'è il colore chiaro */
}

.wave-container svg {
    position: relative;
    display: block;
    width: 100%;
    height: 100px; /* Regola l'altezza dell'onda a piacimento */
}

footer .footer-group {
    width: 100%;
    gap: var(--space-60);
}

footer .footer-group .footer-cta {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

footer .links {
    display: flex;
    flex-direction: row;
    justify-content: space-between;
}

footer .links .web-links,
footer .links .contacts-links {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

footer .links .web-links a,
footer .links .contacts-links a {
    color: var(--color-primary-200);
    text-decoration: none;
}



/* Responsive */

@media only screen and (max-width: 768px) {

    .display {
        font-size: 48px;
    }

    h1 {
        font-size: 32px;
    }

    h2 {
        font-size: 24px;
    }
    
    section {
        margin: 0px 16px;
    }

    header .header-container {
        margin: 0px 16px;
    }
    
    #hero,
    #introduction,
    #projects,
    #other-works,
    #skills,
    #bio,
    footer {
        margin: 0px 16px;
    }

    #hero {
        height: 100vh;
    }
    
    #hero .animated-character {
        width: 100%;
        height: auto;
        aspect-ratio: 3 / 2;

    }

    #introduction {
        flex-direction: column-reverse;
    }

    
    #introduction img,
    #projects .card-work .container-work .description-work, 
    #projects .card-work .container-work img {
        width: 100%;
    }

    .curve svg {
        height: 50px;
    }

    #other-works .grid-container {
        gap: 0.5rem;
    }
    
    #other-works .grid-container .grid-item {
        height: 150px;
    }

    #skills .cards-container,
    #bio .bio-group {
        flex-direction: column;
        margin: 0px 16px;
    }

    #skills .cards-container .skills-card {
        flex-direction: column;
        width: 100%;
    }

    footer .footer-group {
        width: auto;
    }

    

}