/* figtree-regular - latin */
@font-face {
    font-display: swap; 
    font-family: 'Figtree';
    font-style: normal;
    font-weight: 400;
    src: url('../fonts/figtree-v9-latin-regular.woff2') format('woff2'); 
}

/* figtree-italic - latin */
@font-face {
    font-display: swap; 
    font-family: 'Figtree';
    font-style: italic;
    font-weight: 400;
    src: url('../fonts/figtree-v9-latin-italic.woff2') format('woff2'); 
}

/* figtree-700 - latin */
@font-face {
    font-display: swap; 
    font-family: 'Figtree';
    font-style: normal;
    font-weight: 700;
    src: url('../fonts/figtree-v9-latin-700.woff2') format('woff2'); 
}

/* figtree-900 - latin */
@font-face {
    font-display: swap; 
    font-family: 'Figtree';
    font-style: normal;
    font-weight: 900;
    src: url('../fonts/figtree-v9-latin-900.woff2') format('woff2'); 
}

* {
	box-sizing: border-box;
}

body {
	margin: 0 auto; 
    font-family: 'Figtree';
    max-width: 1000px;
    /* background-color: black; use in darkmode */
}

main {
    max-width: 1300px;
    margin: 0 auto;
}

.title {
    display: flex;
    width: 60%;
    align-items: center;
    flex-direction: column;
    /* background: #280000; maybe use in darkmode */
}

.title img {
    height: 235px;
    width: 350px;
    object-fit: contain;
    display: block;
}

picture {
    display: inline-block;
    position: relative;
    border-radius: 50%;
    /* background-color: white; use in darkmode */
}

.circle {
    position: absolute;
    top: -7%;
    left: 5%;
    width: 251px;
    height: 273px;
    border: 8px solid #f8119f;
    border-radius: 50%;
    transform: translate(-50%, -50%) scale(0);
    pointer-events: none;
    transition: transform 0.5s ease;  
    /* border: 8px solid silver; maybe use in darkmode */
}

picture:hover .circle {
    transform: skew(-36deg, 11deg);
}

.section {
    display: grid;
    grid-template-columns: 1fr;
    gap: 0.5rem;

  @media (min-width: 600px) {
    grid-template-columns: 240px 1fr;
  }
}

.section:has(.card:nth-last-child(n + 4)) {
  grid-template-columns: 1fr;

   .section-header {
    display: flex;
    gap: 1rem;
    border-bottom: 1px solid #ccc;
    padding-bottom: 0.5rem;
  }
}

.section-header {
    container-name: section-header;
    container-type: inline-size;
}

.section-header img {
    width: 250px;
    height: 250px;
    object-fit: contain;
    }

/* Using cqw unit with clamp() to achieve fluent typography*/
.section-title {
    font-size: clamp(1rem, 1rem + 2cqw, 1.75rem);
}

/* h1, h2, h3, p {
    color: white; use in darkmode
} */

h1 {
    font-size: 36px;
    font-weight: 300;
    text-transform: uppercase;
}

h2 {
    text-align: left;
    font-size: 30px;
    font-weight: 300;
}

h3 {
    font-size: 25px;
}

p {
    font-size: 16px;
    line-height: 1.3;
}

a {
    text-decoration: none;
    color: black;
    font-weight: bold;
}

a:hover {
    cursor: pointer;
}

#hero { 
    width: 100%; 
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8rem; 
    margin-top: 5rem;

} 

.nav-links li {
    list-style-type: none;
    line-height: 4.5;
    font-family: 'Figtree';
    font-size: 16px;
    transform: skew(-15deg);
    border: 1px solid black;
    box-shadow: 2px 4px 0px 1px black;
    margin-top: 2rem;
    /* border: 1px solid white;  use in darkmode*/
    /* box-shadow: 2px 4px 0px 1px white; use in darkmode */
}

.nav-links li a {
    padding: 1rem 1.5rem;
    color: black;
    font-weight: lighter;
    text-transform: uppercase;
    /* color: silver; maybe use in darkmode */
}

.nav-links li a:hover {
    text-decoration: line-through;
}

ul.nav-links {
    padding: 0;
    margin-bottom: 5rem;
}

a:visited {
    color: black;
}

.topbar {
    display: flex;
    position: relative;
    justify-content: space-between;
    align-items: center;
    top: 1rem;
}

.logo {
    width: 60px;
    height: 60px;
}

#about-me {
    text-align: left;
}

#about-me ul {
    margin-top: 3rem;
}

#about-me li {
    padding: 0.5rem;
    list-style: none;
}

#links-stack {
    display: flex;
    justify-content: space-between;
}

.section-content {
    display: flex;
    flex-wrap: wrap;
}
 
.project-container {
    container-type: inline-size;
    width: 100%;
}

.card {
    min-height: 250px;
    width: 350px;
    display: flex;
    flex-direction: column;
    padding: 1rem;
    position: relative;
    margin: 1rem;  
    transition: border 0.1s ease-in, border-radius 0.1s ease-in, box-shadow 0.1s ease-in;
    border: 2px solid lightgrey;
    border-radius: 20px;
    box-shadow: 1px 4px 10px 2px lightgrey;
}

.card img {
    max-width: 250px;
    flex: 0 0 clamp(70px, 10cqw + 70px, 150px);
    position: absolute;
}

.img-container {
    width: 250px;
    height: 250px;
    display: flex;
    align-items: center;
}

.card-content {
    height: 265px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.project-container:has(.card:nth-last-child(n+2)) {
    display: flex;
    @container (min-width: 400px) {
        .card {
            flex-direction: column;
            align-items: center;
        }
    }
}

@container (min-width: 400px) {
   .card {
     flex-direction: row;
   }
 }

 .h-container {
    height: 5rem;
}

footer {
    padding: 1rem;
    text-align: center;
}

@media (max-width: 1150px){
      .project-container:has(.card:nth-last-child(n+2)) {
        flex-direction: column;
        align-items: center;
    }
    header {
        flex-direction: column;
    }
    h1, h2 {
        text-align: center;
    }
     body {
        max-width: 900px;
    }
}

@media (max-width: 930px){
    body {
            padding: 3rem;
        }
}

@media (max-width: 600px){
    .section-header {
        text-align: center;
    }
    .topbar { 
        justify-self: center;
        flex-direction: column;
        gap: 2rem;
    }
    #hero {
        justify-content: space-between;
        margin-top: 5rem;
        margin-bottom: 2rem;
    }
    .title {
        flex-direction: column-reverse;
        align-items: center;
    }
    #links-stack {
        flex-direction: column;
        align-items: center;
    }
    #links-stack img {
        margin-top: 1rem;
    }
    .section {
        gap: 0;
    }
}

@media (max-width: 480px){
    h1 {
        font-size: 30px;
    }
    h2 {
        font-size: 22px;
    }
    h3 {
        font-size: 18px;
    }
}