:root {
    --bg-color: #fdf6d6;
    --primary-color: #6e5943;
    --secondary-color: #c59393;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    transition-duration: 200ms;
    /* border: black 1px solid; */

}

body {
    font-family: 'Inter', serif;
    background: var(--bg-color);
    color: var(--primary-color);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    gap: clamp(30px, 5vw, 50px);
    padding: clamp(12px, 2vw, 20px);
}

.lighterText {
    color: var(--secondary-color);
}

header,
main,
footer {
    max-width: 850px;
    margin: 0 auto;
    width: 100%;

}

p {
    font-size: 1.05em;
}

header {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 14px;
}

nav {
    color: var(--secondary-color);
    display: flex;
    align-items: center;
    gap: 32px;
}

nav a {
    cursor: pointer;
    text-decoration: none;
}

nav a:hover {
    opacity: 0.5;
}

nav a, .linkItem, .outreach {
    min-height: 44px; /* Min touch target size */
    display: flex;
    align-items: center;
}

main,
section,
.nameContainer {
    display: flex;
    flex-direction: column;
}

main {
    gap: clamp(40px, 8vw, 64px);
    padding-top: clamp(40px, 10vw, 80px);
}

section {
    display: flex;
    flex-direction: column;
    /* border: yellowgreen 1px solid; */

}

.topBox {
    flex-direction: column;
    max-height: max-content;
}

.nameContainer {
    font-family: "Zilla Slab", serif;
    font-size: clamp(24pt, 8vw, 35pt);
    text-shadow: 5px 5px pink;
    /* font-weight: 500; */
    font-style: italic;
    gap: 8px;


}

.underHeadline {
    font-family: "Zilla Slab", serif;
    font-size: clamp(18pt, 6vw, 30pt);
    font-style: italic;
}

/* .statsContainer {
    gap: 24px;
} */

.circle-1 {
    color: #fff;
    background: #fc2;
    padding: 5%;
    width: clamp(200px, 40vw, 400px);
    height: clamp(180px, 36vw, 360px);
    /* width: 400px;
    height: 360px; */
    margin: 0 -15px;
    mix-blend-mode: multiply;
    border-radius: 30% 20% 60% 40%;
    translate: 0% -75%;
    transform: skew(10deg, 5deg) rotate(-200deg);
    opacity: 70%;
    /* border: purple 1px solid; */
}


.Container {
    display: flex;
    align-items: center;
    gap: clamp(20px, 4vw, 30px);
    width: 100%;
    margin-top: -200px;

}

.imgContainer {
    /* border: purple 1px solid; */
    border-radius: 50%;
    max-width: clamp(120px, 25vw, 200px);
    max-height: clamp(120px, 25vw, 200px);
    overflow: hidden;
}

.imgContainer img {
    width: 100%;
    aspect-ratio: 1/1;
    object-fit: cover;
    transform: rotate(-15deg) scale(1.2);
    /* border-radius: 0%; */
}


.aboutMe {
    display: flex;
    align-items: stretch;
    line-height: 1.5em;
    text-align: right;

}


.projectContainer {
    display: grid;
    /* flex-direction: column; */
    gap: clamp(32px, 6vw, 56px);
    position: relative;
    z-index: 1;
}

.headerText {
    margin-top: 40px;
}

.projectItem {
    display: flex;
    align-items: stretch;
    gap: clamp(16px, 3vw, 32px);
}

.projectItem div:first-child {
    display: flex;
    flex-direction: column;
    gap: 14px;
    flex: 1;
}

.projectItem>div:last-child {
    aspect-ratio: 16/9;
    max-width: 30%;
    overflow: hidden;
    border-radius: 8px;
}

.projectItem>div:last-child img {
    width: 100%;
    height: 100%;
    object-fit: scale-down;
}

.linkContainer {
    display: flex;
    align-items: center;
    gap: 24px;

}

.linkItem {
    display: flex;
    flex-direction: row !important;
    align-items: center;
    gap: 14px !important;
    color: var(--primary-color);
    text-decoration: none;
    cursor: pointer;
}

.linkItem:hover {
    opacity: 0.5;
}

.linkItem p {
    font-size: 0.9em;
}


.outreach {
    /* border: purple 1px solid; */
    display: flex;
    align-items: center;
    gap: 14px;
    cursor: pointer;
    width: fit-content;
    margin: 0 auto;
    padding-top: 25%;
    text-decoration: none;
    position: relative;
    z-index: 1;
}

.outreach:hover {
    opacity: 0.5;
}

.circle-2 {
    position: absolute;
    z-index: -1;
    color: #fff;
    background: #fc2;
    padding: 5%;
    width: 380px;
    height: 360px;
    margin: 0 -15px;
    mix-blend-mode: multiply;
    border-radius: 70% 30%;
    translate: 50% -20%;
    transform: skew(5deg, 10deg) rotate(180deg);
    margin-top: -200px;
    opacity: 70%;
    /* border: purple 1px solid; */
}



/* Mobile-specific improvements */
@media only screen and (max-width: 640px) {
    .body {
        gap: 30px;
        padding: 12px;
    }

    /* Fix header navigation */
    header {
        justify-content: center;
        gap: 20px;
    }
    
    nav {
        gap: 24px;
    }
    
    /* Adjust typography for mobile */
    .nameContainer {
        font-size: 28pt;
        text-align: center;
    }

    .underHeadline {
        font-size: 20pt;
        text-align: center;
    }

    /* Fix container layout */
    .Container {
        flex-direction: column;
        text-align: center;
        margin-top: -100px;
        gap: 20px;
    }

    .aboutMe {
        text-align: center;
        line-height: 1.6em;
    }

    /* Stack project items vertically */
    .projectItem {
        flex-direction: column;
        gap: 16px;
    }   

    .projectItem > div:last-child {
        max-width: 100%;
        order: -1; /* Show image above text */
    }

    .imgContainer {
        max-width: 180px;
        max-height: 180px;
    }

    /* Adjust decor circles */
    .circle-1 {
        width: 250px;
        height: 220px;
        translate: -20% -70%;
    }

    .circle-2 {
        width: 250px;
        height: 220px;
        translate: 90%;
    }

    /* Fix outreach section */
    .outreach {
        padding-top: 15%;
    }
}

/* Small tablets, large phones */
@media only screen and (min-width:480px) {
    .nameContainer {
        font-size: 40pt;
    }

    .underHeadline {
        font-size: 32pt;
    }
}

/* Tablets */
@media only screen and (min-width: 768px) {
    body {
        padding: 20px;
    }

    .Container {
        margin-top: -150px;
    }

    .projectItem {
        gap: 32px;
    }

    .projectItem > div:last-child {
        max-width: 35%;
    }
}

/* Small laptops */
@media only screen and (min-width: 1024px) {
    main {
        gap: 64px;
        padding-top: 80px;
    }

    .projectContainer {
        gap: 56px;
    }

}

/* Large screens */
@media only screen and (min-width: 1200px) {
    header, main, footer {
        max-width: 1000px;
    }
}