
:root {
    --primary-color: #357594;
    --primary-hover-color: #69bee9;
    --secondary-color: #5e9fba;
    --accent1-color: #8ed1fc;
    --accent2-color: #0693e3;

    --heading-font: "Poppins", serif;
    --paragraph-font: 'Oswald', sans-serif;

    --heading-text-color: #b4c5ce;

    --nav-background-color: #1f485d;
    --nav-link-color: White;
    --nav-hover-link-color: #f5cf89;
    --nav-hover-background-color: var(--accent1-color);

    --course-completed-background: #7ad48f;

    --background-color: rgb(252, 246, 246);
    --section-background: White;
    --max-width: 960px
}

.profile-picture {
    width: 10%;
    height: auto;
    box-shadow: 10px 10px 15px rgba(0, 0, 0, 0.3);
    border-radius: 8px;
}

header figure {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 20px;
}

header figure h1 {
    padding: 10px;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
}

body {
    font-family: var(--heading-font);
    font-weight: 400;
    margin: 0 auto;
}


h1 {
    font-weight: 100;
}

header {
    background: var(--secondary-color);
    border: 1px solid rgb(0 0 0 / 0.1);
    margin: 0 auto;
    text-align: center;
    max-width: var(--max-width);
    color: var(--heading-text-color);
}

header,
main,
footer {
    margin: 0 auto;
}

nav {
    background-color: var(--nav-background-color);
    max-width: var(--max-width);
    margin: 0 auto;
}

nav a {
    display: block;
    color: var(--nav-link-color);
    text-decoration: none;
    padding: 1rem;
    text-align: center;
    font-size: 1.4rem;
}

nav ul {
    list-style-type: none;
}

nav li {
    display: inline;
}

nav .active {
    color: var(--nav-hover-link-color);
}

nav a:link
{
    color: var(--nav-link-color);
}

nav a:hover {
    color: var(--nav-hover-link-color);
    background-color: var(--nav-hover-background-color);
}

main {
    max-width: var(--max-width);
    background-color: var(--background-color);
}

.info{
    display: grid;
    grid-template-columns: 2fr 1fr;
}

.card {
    border: solid 1px black;
    border-top: none;
    border-radius: 5px;
    box-shadow: 10px 10px 15px rgba(0, 0, 0, 0.3);
}

section{
    background-color: var(--section-background);
  margin: 15px 10px 10px 10px; 
  max-width: var(--max-width);
}

section h2 {
    text-align: center;
    background: var(--secondary-color);
    color: var( --nav-link-color);
}

.body-card p {
    text-align: justify;
    padding: 10px;
}

.work{
    padding-left: 50px;
}

figcaption{
    margin-bottom: 10px;
}

/*Buttons*/
button {
    all: unset; 
    display: inline-block;
    text-align: center;
    cursor: pointer;
  }

  .button {
    background-color: var(--primary-color); 
    color: white;            
    padding: 10px 30px;       
    border-radius: 5px;       
    font-size: 0.9em;        
    transition: background-color 0.3s ease, transform 0.2s ease; 
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1); 
  }

  .button:hover {
    background-color: var(--accent1-color); 
    color: var(--nav-hover-link-color);
  }
  .button:active {
    transform: scale(0.95); 
  }

  #button-head-courses-filter {
    display: flex;
    gap: 10px;
    justify-content: center;
    margin: 10px;
  }

  .body-courses-buttons{
    margin-top: 20px;
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
  }

  .courses{
    margin: 10px;
  }

  .completed {
    background-color: var(--course-completed-background);
    color: black;
  }
  .completed::after {
    content: " ✔️";
  }

  .counter {
    margin-top: 10px;
    margin-bottom: 20px;
    display: flex;
    justify-content: center;
  }


  /*Modal*/
dialog{
    border: 1px solid rgb(0 0 0 /0.1);
    border-radius: .25rem;
    padding: 1rem;
    background-color: #fff;
    box-shadow: 0 0 3rem #777;
    width: 90%;
    max-width: 600px;
    animation: pulse 0.9s ease-in-out 2;
}

dialog::backdrop{
    background-color: rgb(0 0 0 /0.5);
}

dialog button{
    position: absolute;
    top: 23px;
    right: 23px;
    padding:  -5rem 1rem;
    border: 1px solid rgb(0 0 0 /0.1);
}

@keyframes pulse {
    0% { transform: scale(1); opacity: 1; }
    50% { transform: scale(1.1); opacity: 0.8; }
    100% { transform: scale(1); opacity: 1; }
  }


/*Footer*/
footer {
    padding: 20px;
    margin-top: 20px;
    display: flex;
    flex-direction: column;
    flex-wrap: wrap;
    align-content: center;
    align-items: center;
    background-color: var(--secondary-color);
    color: white;
    max-width: var(--max-width);
}

.city figure{
    display: flex;
    flex-direction: column;
    align-items: center;
}

.city figure img{
    width: 90%;
    margin: 10px;
}

figcaption {
    text-align: center;
    font-size: 10px;
}

#lastModified {
    color: yellow;
    font-size: 10px;
}


/* Larger Views ******************************/
@media (min-width: 640px) {
    nav ul {
        display: flex;
    }

    nav ul li {
        flex: 1 1 100%;
    }   
}
@media (max-width: 640px){
    header figure{
        display: flex;
        flex-direction: column;
    }
    
    main, .info, footer {
        display: flex;
        flex-direction: column;
    }

    #button-head-courses-filter{
        display: flex;
        flex-direction: column;
        align-items: center;
    }

    section{
        min-height: 300px;
    }
}