:root {
    --primary: white;
    --primary-light: #000000;
    --secondary: black;
    --secondary-light: #ffffff;
    --background: linear-gradient(#000000, #030A17);
    --background-light: #ffffff;
    --accent: #576C96; 
    --accent-hover: #52648b;
}


* {
    margin: 0;
    box-sizing: border-box;
    scroll-padding-top: 6rem;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: system-ui;
    background: var(--background);
    background-repeat: no-repeat;
    color: var(--primary);
}

nav {
    display: flex;
    flex-direction: row;
    justify-content: center;
    align-items: center;
    position: fixed;
    width: 100%;
    background: var(--secondary);
    padding: 20px 10px;
    z-index: 1;
}

nav ul {
    display: flex;
    flex-direction: row;
    justify-content: flex-end;
    align-items: center;
    width: 60%; 
    gap: 1.5rem;
}

nav ul li {
    list-style: none;
}

nav ul li a {
    text-decoration: none;
    color: var(--primary);
    list-style: none;
    white-space: nowrap;
    font-size: 1.2rem;
}

.button-contact-nav {
    padding: 0.5rem 1.7rem 0.7rem 1.7rem;
    border-radius: 15px;
    background-color: var(--primary);
    color: var(--secondary);
    font-size: 1.3rem;
    font-weight: bold;
    text-decoration: none;
}

.button-contact-nav:hover {
    opacity: 95%;
}

main {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    margin: 0 15%;
}

.section-welcome {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100vh;
    gap: 2rem;
}

.section-welcome h1 {
    font-size: 4.5rem;
    text-align: center;
    text-wrap: balance
}

.section-welcome p {
    font-size: 1.5rem;
    text-align: center;
    opacity: 70%;
}

.buttons {
    display: flex;
    margin-top: 1rem;
    gap: 1rem;
}

.button-contact {
    padding: 0.5rem 1.7rem 0.7rem 1.7rem;
    border-radius: 15px;
    background-color: var(--primary);
    color: var(--secondary);
    font-size: 1.5rem;
    font-weight: bold;
    text-decoration: none;
}

.button-contact:hover {
    opacity: 95%;
}

.button-github {
    padding: 0.5rem 1.7rem 0.7rem 1.7rem;
    border-radius: 15px;
    background-color: var(--accent);
    color: var(--primary);
    font-size: 1.5rem;
    font-weight: bold;
    text-decoration: none;
}

.button-github:hover {
    background-color: var(--accent-hover);
}

.section-projects h1 {
    font-size: 3rem;
}

.section-projects {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.project-tiles {
    display: flex;
    flex-direction: row;
    align-items: center;
    margin-top: 3rem;
    gap: 3.5rem;
}

.project-tile {
    display: flex;
    flex-direction: column;
    border-radius: 15px
}

.project-tile img {
    display: flex;
    flex-direction: column;
    width: 100%;
    border: 3px solid rgba(255, 255, 255, 0.40);
    border-radius: 15px 15px 0 0;
}

.project-tile-text {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    padding: 1rem 1.2rem 2rem 1.2rem;
    border: 3px solid rgba(255, 255, 255, 0.40);
    border-top: none;
    border-radius: 0 0 15px 15px;
}

.project-tile-text p {
    opacity: 70%;
    line-height: 160%;
}

.project-tile .buttons {
    margin-top: 1rem;
    gap: 1rem;
}

.project-tile .buttons a {
    padding: 0.4rem 2rem 0.6rem 2rem;
    border: 3px solid rgba(255, 255, 255, 0.40);
    border-radius: 10px;
    font-size: 1.1rem;
    font-weight: bold;
    text-decoration: none;
    color: var(--primary);
    width: 45%;
    text-align: center;
}

.projects-text {
    margin-top: 3rem;
    text-align: center;
    font-size: 1.2rem;
    opacity: 70%;
}

.projects-text a{
    color: var(--primary);
    text-decoration: none;
    font-weight: bold;
}

footer {
    display: flex;
    flex-direction: column;
    margin: 15rem 15% 4rem 15%;
}

.footer-content {
    display: flex;
    flex-direction: row;
    justify-content: space-between;
    margin-top: 1rem;
}

.footer-links {
    display: flex;
    flex-direction: row;
    gap: 1rem;
    align-items: center;
}

.footer-links a {
    text-decoration: none;
    color: var(--primary);
}

@media screen and (max-width: 1300px) {
  main {
    margin: 0 10%;
  }
  .project-tiles {
    flex-direction: column;
    margin-top: 2rem;
    gap: 2rem;
  }
  footer {
    margin: 10rem 10% 4rem 10%;
  }
}

@media screen and (max-width: 700px) {
    nav ul {
    display: none;
   }
   .section-welcome {
    margin: 3rem 0;
   }
   .section-welcome h1 {
    font-size: 3rem;
   }
  .footer-content {
    flex-direction: column-reverse;
    gap: 2rem;
   }
   .footer-links {
    flex-direction: row;
    justify-content: center;
   }
}

@media (prefers-color-scheme: light) {
    body {
        background: var(--background-light);
        color: var(--primary-light);
    }
    nav {
        background: var(--secondary-light);
    }
    nav img {
        filter: brightness(0) saturate(100%) invert(0%) sepia(0%) saturate(7500%) hue-rotate(233deg) brightness(96%) contrast(104%)
    }
    nav ul li a {
        color: var(--primary-light);
    }
    .button-contact-nav {
        background: var(--primary-light);
        color: var(--secondary-light);
    }
    .button-contact-nav:hover {
        opacity: 90%;
    }
    .button-contact {
        background: var(--primary-light);
        color: var(--secondary-light);
    }
    .button-contact:hover {
        opacity: 90%;
    }
    .project-tile img {
        border: 3px solid rgba(0, 0, 0, 0.4);
    }
    .project-tile-text {
        border: 3px solid rgba(0, 0, 0, 0.4);
        border-top: none;
    }
    .project-tile .buttons a {
        color: var(--primary-light);
        border: 3px solid rgba(0, 0, 0, 0.4);
    }
    .projects-text a {
        color: var(--primary-light);
    }
    .footer-links a {
        color: var(--primary-light);
    }
    .footer-links a img{
        filter: brightness(0) saturate(100%) invert(0%) sepia(0%) saturate(7500%) hue-rotate(233deg) brightness(96%) contrast(104%);
    }
}