@font-face {
    font-family: "Cormorant Garamond";
    src: url("assets/CormorantGaramond-Semibold.ttf");
}

@media (prefers-reduced-motion: no-preference) {
    html {
      scroll-behavior: smooth;
    }
}

* {
    font-family: sans-serif;
    box-sizing: border-box;
    color: white; /*remove eventually*/
}

body {
    background-color: #181719;
    margin: 0;
}

a {
    text-decoration: none;
}

/*Hero Section*/
.welcome-section {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    width: 100%;
    min-height: clamp(32rem, 100vh, 64rem);
    background-color: #000;
    /* color: white; */
    background-image: linear-gradient(62deg, #3a3d40 0%, #181719 100%);
}

.welcome-section h1 {
    font-size: clamp(2.25rem, 5.05vw, 4rem);
    padding: 0;
    margin: 0;
}

.welcome-section > p {
    padding: 0;
    margin: 0;
    font-size: clamp(1.25rem, 3.03vw, 2.25rem);
    color: rgb(112, 22, 22);
}

/*Section Header*/
.section-headers {
    color: white;
    font-size: clamp(2.25rem, 5.05vw, 4rem);
}

.subsection-header {
    font-size: clamp(1.25rem, 3.03vw, 2.25rem);
    text-align: center;
}

/*Nav Bar*/
header {
    height: clamp(3rem, 5.05vw, 5rem);
    display: flex;
    /*justify-content: flex-end;*/
    justify-content: space-between;
    align-items: stretch;
    padding: 0 2rem;

    background-color: rgb(112, 22, 22);
    position: sticky;
    top: 0;
    z-index: 10;
}

.site-brand {
    display: flex;
    align-items: center;
    gap: 0.9rem;
    min-width: 0;
}

.site-logo {
    width: clamp(4rem, 3.5vw, 5rem);
    height: clamp(4rem, 3.5vw, 5rem);
    object-fit: contain;
    flex-shrink: 0;
}

.site-name {
    font-family: "Cormorant Garamond", serif;
    font-size: clamp(1.75rem, 2vw, 2.25rem);
    font-weight: 600;
    letter-spacing: 0.02em;
    white-space: nowrap;
}

nav {
    display: flex;
    justify-content: flex-end;
    /*padding: 15px;*/
}

nav ul {
    display: flex;
    margin: 0;
    padding: 0;
    list-style-type: none;
    /*
    justify-content: space-between;
    width: 95%;
    */
}

nav li {
   margin: 0;
   display: flex;
   /*width: 120px;*/
}

nav a {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: clamp(0.5rem, 1.5vw, 1.375rem) clamp(0.75rem, 3vw, 3rem);
    background-color: rgb(112, 22, 22);
    /* color: white; */
    font-size: clamp(0.875rem, 1.17vw, 1.125rem);
    text-align: center;

    transition: background-color 0.2s ease;

    height: 100%;
}

nav a:hover, nav a:focus-visible {
    background-color: #181719;
}

nav a:active {
    background-color: #3a3d40;
    
}

#menu-button {
    display: none;
    border: none;
    background: transparent;
    color: white;
    font-size: 2rem;
    cursor: pointer;
    padding: 0 0.75rem;
}

@media (max-width: 768px) {
    #menu-button {
        display: flex;
        align-items: center;
        justify-content: center;
    }

    .nav-list {
        display: none;
    }

    .nav-list.open {
        display: flex;
        flex-direction: column;

        position: absolute;
        top: 100%;
        right: 0;

        width: 180px;
        margin: 0;
        padding: 0;

        background-color: rgb(112, 22, 22);
        box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
    }

    .nav-list.open li {
        width: 100%;
        margin: 0;
    }

    .nav-list.open a {
        display: flex;
        width: 100%;
        padding: 1rem;
        text-align: center;
    }
}

@media (max-width: 650px) {
    #menu-button {
        display: block;
    }

    .nav-list {
        display: none;
    }

    .nav-list.open {
        display: flex;
        flex-direction: column;
        justify-content: flex-start;
        width: 180px;
        
        position: absolute;
        top: 100%;
        right: 0;

        margin: 0;
        padding: 0;

        background-color: rgb(112, 22, 22);
        box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
    }

    .nav-list.open li {
        width: 100%;
        margin: 0;
    }

    .nav-list.open a {
        display: block;
        width: 100%;
        padding: 1rem;
        text-align: center;
    }

    .project-tile {
        flex-direction: column;
    }

    .project-img {
        width: 100%;
        height: 5vw;
        object-fit: cover;
    }

    .project-text {
        width: 100%;
    }
}

@media (max-width: 400px) {
    .site-name {
        font-size: 1rem;
    }

    .site-logo {
        width: 2rem;
        height: 2rem;
    }

    header {
        padding: 0 1rem;
    }
}

@media (max-width: 320px) {
    .site-name {
        display: none;
    }
}

/*Body*/
.body-text {
    color: #b8b8bc;
}

/*Card*/
.cards {
    background-color: #3a3d40;
    border-radius: 8px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border: 1px solid #ddd;
}

/*About*/
.about-header {
    text-align: center;    
}

.about-desc {
    font-size: clamp(1rem, 2.02vw, 1.375rem);
    padding: clamp(1.5rem, 5vh, 4rem) clamp(1rem, 10vw, 8rem);
}

/*Language Panel*/
/*
.languages i {
    font-size: 4.5rem;
    line-height: 1;
    margin-bottom: 6px;
}

.languages p {
    display: flex;
    justify-content: center;
}
*/
.technologies {
    width: min(90%, 60rem);
    margin: 0 auto;
    padding: 1.5rem;

    background-color: #3a3d40;
    border-radius: 8px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);

    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.tech-category {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
    padding: 1rem 1.5rem;

    background-color: #181719;
    border-radius: 6px;
}

.tech-category h3 {
    margin: 0 0 1rem 0;
    font-size: 1.25rem;
    text-transform: uppercase;
}

.languages {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    gap: 2rem;
    width: 100%;
}

.lang-tile {
    display: flex;
    flex-direction: column;
    align-items: center;

    justify-content: center;
    min-width: 80px;
    gap: 0.35rem;
}

.lang-tile i {
    font-size: 3rem;
}

.lang-tile p {
    margin: 0;
    font-size: 0.95rem;
    color: #b8b8bc;
}

/*Resume*/
.resume-link {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0.5rem;
    font-size: clamp(1rem, 2.02vw, 1.375rem);
}

.resume-preview {
    display: inline-block;
    padding: 5px;
}

/*Project*/
.projects-header {
    width: 100%;
    margin-bottom: 20px;
}

.projects {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    justify-content: center;

    padding: 20px;
    text-align: center;
}

.projects-list {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.project-tile {
    display: flex;
    align-items: center;
    /*align-items: stretch;*/
    overflow: hidden;
    width: 100%;
}

.project-text {
    /*
    padding: 15px;
    flex-grow: 1;
    */

    display: flex;
    flex-direction: column;
    gap: 1rem;
    padding: 1.5rem;
    flex-grow: 1;
}

.project-text p {
    font-size: clamp(1rem, 2.02vw,1.375rem);
    line-height: 1.5;
    margin: 0;
}

.project-name {
    font-size: clamp(1.375rem, 3.54vw, 2.5rem);
    margin: 0;
}

.project-hover-text {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    background-color: rgb(112, 22, 22);
    /* color: white; */
    font-size: 2em;
    font-weight: bold;
    text-align: center;
    padding: 16px 32px;
    opacity: 0;
    transition: opacity 0.5s ease, transform 0.5s ease;
    transform: translateY(100%);  
}

.project-image {
    position: relative;
    z-index: 1;

    padding: 1rem;
    flex-shrink: 0;
}

/*Hover fade effect*/
.project-image:hover .project-img {
    opacity: 0.3;
}

.project-image:hover .project-hover-text {
    opacity: 1;
    transform: translateY(0);
}

.project-img {
    display: block;
    width: 200px;
    height: 200px;
    object-fit: contain;
    transition: opacity .5s ease;
}

/*Contact Section*/
.contact {
    display: flex;
    justify-content: center;
    align-items: center;
    flex-direction: column;
    text-align: center;
}

.contact-desc {
    display: flex;
    justify-content: center;
}

.contact-container {
    padding: 20px;
    max-width: 60rem;
    width: 70%;
}

form {
    width: 100%;
    max-width: clamp(22rem, 36vw, 40rem);
    margin: 0 auto;
    padding-bottom: 2em;
} 

fieldset {
    border: none;
    padding: 2rem 0;
    border-bottom: 3px solid #3b3b4f;
    display: block;
}

fieldset:last-of-type {
    border-bottom: none;
}

label {
    display: block;
    margin: 0.5rem 0;
}

input, textarea {
    background-color: #3a3d40;
    border: 1px solid #3a3d40;
    color: #ffffff;

    width: 100%;
    padding: 0.8rem;
}

input,
textarea,
select {
    margin: 10px 0 0 0;
    width: 100%;
    min-height: 2em;
    font-size: clamp(0.875rem, 2vw, 1.25rem);
}

textarea {
    resize: vertical;
    height: clamp(10rem, 19.5vw, 20rem);
}

.inline {
    width: unset;
    margin: 0 0.5em 0 0;
    vertical-align: middle;
}

input[type="submit"] {
    display: block;
    width: 60%;
    margin: 1em auto;
    background-color: rgb(112, 22, 22);
    border-color: white;
    height: clamp(2.5rem, 3.9vw, 4rem);
    font-size: clamp(1rem, 2.02vw, 1.375rem);
    min-width: clamp(13.75rem, 11.7vw, 20rem);
}

/*Footer Bar*/
footer {
    background-color: #3a3d40;
    height: clamp(3rem, 5.05vw, 5rem);
}

.social-icons {
    display: flex;
    align-items: center;  
    width: 100%;
    justify-content: space-evenly;
    height: clamp(3rem, 5.05vw, 5rem);
}

/*
.social-icons a:active {
    color: white;
}

.social-icons a:hover {
    color: white;
}

.social-icons a:visited {
    color: white;
}

.social-icons a:link {
    color: white;
}
*/