* {
    padding: 0;
    margin: 0;
    box-sizing: border-box;
}

:root {
    font-size: 10px;
    --color-bg-main: #f6f3f0;
    --color-bg-card: #f8f5f4;
    --color-text-muted: #a6a2a2;
    --color-accent: #BC7A4D;
}

body {
    background-color: var(--color-bg-main);
    font-family:system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;
    font-size: 2rem;
    width: 100%;
    max-width: 100%;
    overflow-x: hidden;
}

.container {
    display: flex;
    width: 100%;
    max-width: 1920px;
    min-height: 100vh;
    margin-inline: auto;
}

/* Left Side Bar */

.leftSideBar {
    width: clamp(15rem, 17vw, 35rem);
    height: auto;
    background-color: var(--color-bg-card);
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: clamp(0.5rem, 1vw, 5rem);
}

.leftSideBar h1 {
    font-size: clamp(1.5rem, 1.35vw, 2.5rem);
    color: black;
}

.profileHeader {
    display: flex;
    flex-direction: column;
    align-items: center;
    font-size: clamp(1rem, 1vw, 5rem);
}

.profileHeader img {
    width: 60%;
    border-radius: 50%;
    margin: 7% 0;
    border: 1px solid color-mix(in srgb, var(--color-accent) 15%, transparent);
    padding: 0.8rem;
}

hr {
    width: 90%;
    margin: 5% 0 5% 0;
    background-color: rgba(100, 100, 100, 0.5);
    height: 1px;
    border: 0;
}

.personalInfo {
    display: flex;
    flex-direction: column;
    align-items: center;
    font-size: clamp(1rem, 1vw, 2rem);
    width: 75%;
    color:  var(--color-accent);
}

.personalInfo p {
    margin: 0.7rem 0 1rem 0;
}

.personalInfo img {
    width: 1.8rem;
    height: auto;
    margin: 5% 0;
    align-self: center;
}

.personalInfo div  {
    display: flex;
    align-items: center;
}

.personalInfo div span {
    display: flex;
    margin-left: 1rem;
    align-self: center;
    color: rgb(166, 162, 162);
    font-size: clamp(0.8rem, 0.9vw, 1.5rem);
}

h4 {
    font-size: clamp(1rem, 1vw, 2rem);
    margin-left: 5%;
}

.skills {
    width: 100%;
}

.skill {
    margin: 1rem;
}

.skill__top {
    display: grid;
    grid-template-columns: 1fr 1fr;
    margin: 3% 7%;
    font-size: clamp(1rem, 0.9vw ,2rem);
}

.skill__bar {
    height: 1rem;
    background-color: rgba(0, 0, 0, 0.1);
    border-radius: 1rem;
    overflow: hidden;
    width: 80%;
    margin-left: 9%;
}

.skill__bar span {
    display: block;
    height: 100%;
    width: var(--p);
    background-color: var(--color-accent);
    border-radius: 10rem;
}

.contact {
    width: 100%;
}

.contact-item {
    margin: 2% 9%;
    display: flex;
    align-items: center;
}

.contact-item img {
    width: 1.5rem;
    height: 1.5rem;
    margin-right: 1rem;
    flex-shrink: 0;
}

.contact-item span {
    display: flex;
    align-items: center;
}

.contact-item span a {
    color: var(--color-accent);
    text-decoration: underline;
    transition: color 0.3s ease, text-decoration 0.3s ease;
    cursor: pointer;
    font-weight: 600;
    font-size: clamp(1rem, 0.8vw, 1.8rem);
}

.contact-item span a:hover {
    color: #a06a40;
    /*text-decoration: underline wavy;*/
}

a {
    color: var(--color-accent);
    text-decoration: underline;
    cursor: pointer;
    transition: color 0.3s ease, text-decoration 0.3s ease;
    font-weight: 600;
}

.hamburger {
    display: none;
    flex-direction: column;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.5rem;
    gap: 0.4rem;
    position: absolute;
    top: 1rem;
    left: 1rem;
}

.hamburger span {
    width: 2.5rem;
    height: 0.3rem;
    background-color: var(--color-accent);
    border-radius: 0.2rem;
    transition: all 0.3s ease;
    
}

.hamburger.active span:nth-child(1) {
    transform: rotate(45deg) translate(0.8rem, 0.8rem);
    z-index: 17;
}

.hamburger.active span:nth-child(2) {
    opacity: 0;
}

.hamburger.active span:nth-child(3) {
    transform: rotate(-45deg) translate(0.8rem, -0.8rem);
}

.menu-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 13;
    transition: opacity 0.3s ease;
}

.menu-overlay.active {
    display: block;
}

.topBar {
    display: flex;
    width: 100%;
    background-color: var(--color-bg-card);
    padding: 1rem;
}

.topBar img{
    width: 30%;
}

.topBar .personalInfo,
.topBar .personalInfo div {
    align-items: center;
    justify-content: center;;
}

.topBar .personalInfo img {
    width: 9%;
}

a:hover {
    color: #a06a40;
}

/* Main Page */

.mainPage {
    width: 80%;
    display: flex;
    flex-direction: column;
    background-color: white;
    margin: 2% 3% 0 0;
    overflow: hidden;
}

.mainPage > h1 {
    position: absolute;
    z-index: 1;
    font-size: clamp(2rem, 2.5vw, 5rem);
    margin: clamp(2rem, 3%, 6rem) 0 clamp(2rem, 3%, 6rem) clamp(2rem, 3%, 11.5rem);
}

.mainPage__text {
    position: absolute;
    z-index: 1;
    font-size: clamp(1rem, 1.1vw, 2rem);
    margin: clamp(2rem, 8%, 15rem) 0 0 clamp(2rem, 4%, 11.5rem);
}

.mainPage__text span:first-child,
.mainPage__text span:last-child {
    color: var(--color-accent);
}

.backgroundImg {
    height: clamp(15rem, 17vw, 30rem);
    margin: 0 3% 0 0;
    overflow: hidden;
    position: relative;
    flex-shrink: 0;
}

.backgroundImg img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: top;
}

.download {
    background-color: transparent;
    color: var(--color-accent);
    border: 1px solid var(--color-accent);
    padding: clamp(0.5rem, 2%, 1rem);
    border-radius: 1rem;
    font-size: clamp(0.7rem, 1.5vw, 1.3rem);
    cursor: pointer;
    position: absolute;
    z-index: 2;
    width: clamp(0.7rem, 10%, 20rem);
    margin: clamp(0.7rem, 11%, 21rem) 0 0 clamp(0.7rem, 6%, 11.5rem);
    text-align: center;
    text-decoration: none;
}

.rest {
    display: flex;
    flex: 1;
    padding-bottom: 1%;
    gap: 1rem;
    align-items: stretch;
    overflow-y: auto;
}

.rest-content {
    flex: 1;
    display: flex;
    flex-direction: column;
}
.rest h2 {
    font-size: clamp(1rem, 1.5vw, 3rem);
    position: relative;
    margin: 1% 0 1% 1%;
}

.myWork {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
    flex: 1;
    overflow-y: auto;
    align-content: flex-start;
    width: 95%;
    padding: 1% 0 0 2%;
}

.project-card {
    background-color: var(--color-bg-card);
    border-radius: 2rem;
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 1rem;
    cursor: pointer;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    min-height: clamp(15rem, 15vw, 35rem);
    justify-content: space-between;
}

.project-card:hover {
    transform: translateY(-0.5rem);
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.2);
}

.project-card img {
    width: 100%;
    height: auto;
    object-fit: contain;
    object-position: top;
    border-radius: 1rem;
}

.project-card h3 {
    margin: 0;
    font-size: clamp(1.2rem, 1.1vw, 2rem);
}

.project-card p {
    font-size: clamp(1rem, 1.5vw, 1.3rem);
    line-height: 1.6;
}

.project-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;

}

.project-btn {
    background-color: #d1915f;
    color: white;
    padding: 1rem;
    border: none;
    border-radius: 1rem;
    font-size: clamp(1rem, 1.5vw, 1.3rem);
    cursor: pointer;
    width: 49%;
}

.project-tags span {
    font-size: clamp(0.8rem, 1vw, 1.2rem);
    display: inline-block;
    margin: 2px;
    padding: 4px 6px;
    border-radius: 10px;
    background-color: #e6e1df;
}

.project-window {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 10;
    align-items: center;
    justify-content: center;
}

.project-window__content {
    background-color: white;
    padding: 4rem;
    border-radius: 1rem;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
    position: relative;
    width: 90vw;
    max-width: 900px;
    max-height: 90vh;
    overflow-y: auto;
}

.close-btn {
    position: absolute;
    top: 1.5rem;
    right: 1.5rem;
    background: none;
    border: none;
    font-size: 2.5rem;
    cursor: pointer;
    color: #999;
    padding: 0;
    width: 3rem;
    height: 3rem;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: color 0.3s ease;
    z-index: 12;
}

.close-btn:hover {
    color: var(--color-accent);
}

.project-window h2 {
    margin: 0 0 1.5rem 0;
    font-size: clamp(1.5rem, 3vw, 3rem);
    padding-right: 2rem;
}

.project-window img {
    width: 100%;
    height: auto;
    border-radius: 0.8rem;
    margin-bottom: 1.5rem;
    max-height: 60vh;
    object-fit: contain;
}

.project-window__tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.8rem;
    margin-bottom: 1.5rem;
}

.window-tag {
    display: inline-block;
    background-color: var(--color-accent);
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 2rem;
    font-size: clamp(0.9rem, 1vw, 1.3rem);
    font-weight: 600;
}

.project-window p {
    font-size: clamp(1rem, 1.2vw, 1.5rem);
    line-height: 1.8;
    margin-bottom: 1.5rem;
    color: #333;
}

.project-links {
    display: flex;
    gap: 1rem;
}

.project-link {
    flex: 1;
    padding: 1rem;
    background-color: var(--color-accent);
    color: white;
    text-decoration: none;
    border-radius: 0.8rem;
    text-align: center;
    font-size: clamp(1rem, 1.2vw, 1.6rem);
    font-weight: bold;
    cursor: pointer;
    transition: opacity 0.3s ease;
    border: none;
}

.project-link:hover {
    opacity: 0.85;
}

.project-window.active {
    display: flex;
}

.active {
    display: flex;
}

.about-section {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    gap: 2rem;
    padding: 2rem;
    width: 96%;
    margin: 0.5% 2% 1% 2%;
    background-color: var(--color-bg-card);
    border-radius: 1rem;
}

.about-item {
    flex: 1;
    display: flex;
    gap: 1rem;
    align-items: flex-start;
}

.flex2 {
    flex: 2;
}

.about-icon {
    font-size: 3rem;
    flex-shrink: 0;
}

.about-content h3 {
    font-size: clamp(1.2rem, 1.5vw, 1.8rem);
    margin: 0 0 0.5rem 0;
    color: var(--color-accent);
}

.about-content p {
    font-size: clamp(0.9rem, 1.2vw, 1.3rem);
    line-height: 1.6;
    color: #666;
    margin: 0;
}

.about-me {
    display: flex;
    width: 95%;
    height: 5rem;
    color: black;
}

@media (min-width:1921px) {
    .topBar {
        display: none;
    }
}

@media (max-width:1920px) {
    .topBar {
        display: none;
    }
}

@media (max-width:1400px) {
    .myWork {
        grid-template-columns: repeat(2, 1fr);
    }
    .mainPage {
        margin: 0
    }
    .topBar {
        display: none;
    }
}

@media (max-width: 1100px) {
    .leftSideBar {
        display: none;
        position: fixed;
        top: 0;
        left: -300px;
        width: 300px;
        height: 100vh;
        background-color: var(--color-bg-card);
        z-index: 14;
        flex-direction: column;
        overflow-y: auto;
        transition: left 0.3s ease;
    }
    
    .leftSideBar.active {
        display: flex;
        left: 0;
        width: clamp(15rem, 70vw, 35rem);
    }

    h4 {
        font-size: clamp(1rem, 1.5vw, 2rem);
    }

    .skill span {
        font-size: clamp(0.8rem, 1.2vw, 1.5rem);
    }

    .contact-item span a {
        font-size: clamp(0.8rem, 1.4vw, 1.5rem);
    }
    
    .hamburger {
        display: flex;
        position: absolute;
    }

    .container {
        flex-direction: column;
    }

    .topBar {
        display: flex;
        position: relative;
    }

    .mainPage {
        width: 100%;
        margin: 0;
    }

    .backgroundImg {
        margin: 0 0 0 0;
        height: clamp(15rem, 28vw, 30rem);
    }

    .myWork {
        width: 97%;
        padding-left: 2%;
        padding-right: 2%;
    }

    .about-section {
        width: 97%;
        margin: 0.5% 2% 1% 0;
    }

    .topBar .profileHeader {
        position: absolute;
        margin: 0 0 0 9%;
        z-index: 2;
    }

    .profileHeader img {
        width: clamp(10rem, 16vw, 20rem);
        height: clamp(10rem, 16vw, 20rem);
        object-fit: cover;
        border-radius: 50%;
        margin: 0;
    }

    .topBar .personalInfo {
        position: absolute;
        width: 20%;
        margin: 16% 0 0 7%;
    }

    .personalInfo {
        font-size: clamp(0.8rem, 1.4vw, 2rem);
    }
    
    .personalInfo div span {
        font-size: clamp(0.7rem, 1.2vw, 1.5rem);
    }

    .personalInfo h1 {
        font-size: clamp(1.5rem, 2.5vw, 3rem);
        color: black;
    }

    .topBar .personalInfo div {
        margin: -5% 0 0 0;
    }

    .topBar {
        position: absolute;
        z-index: 2;
        background: transparent;
        flex-direction: column;
    }

    .mainPage h1 {
        position: absolute;
        margin: 8% 0 0 40%;
    }

    .mainPage__text {
        position: absolute;
        margin: 12% 0 0 41%;
    }

    .download {
        position: absolute;
        margin: 15% 0 0 41%;
        width: clamp(0.7rem, 12%, 30rem);
    }
    
    .rest h2 {
        font-size: clamp(1rem, 2vw, 3rem);
    }

    .project-card h3 {
        font-size: clamp(1.2rem, 1.6vw, 3rem);
    }
}

@media (max-width: 850px) {
    .myWork {
        grid-template-columns: repeat(1, 1fr);
    }

    .about-section {
        grid-template-columns: 1fr;
    }

    .profileHeader img {
        width: clamp(8rem, 25vw, 20rem);
        height: clamp(8rem, 25vw, 20rem);
    }

    .hamburger span {
        width: 3rem;
        height: 0.5rem;
    }

    .topBar .profileHeader {
        margin: 0 0 0 10%;
    }

    .topBar .personalInfo{
        margin: 25% 0 0 6%;
        width: 30%;
        flex: 0 0 auto;
        text-align: flex-start;
    }

    .topBar .personalInfo div {
        margin: 0;
    }

    .personalInfo div span {
        font-size: clamp(0.8rem, 2vw, 2rem);
    }

    .topBar .personalInfo div span {
        font-size: clamp(0.8rem, 1.8vw, 2rem);
    }
    

    .personalInfo h1 {
        font-size: clamp(1.5rem, 3.8vw, 4rem);
        width: 100%;
        margin: 0 0 0 25%;
    }

    .topBar .personalInfo h1 {
        
        margin: 0 0 0 10%;
    }

    .contact-item span a {
        font-size: clamp(0.8rem, 2.2vw, 2rem);
    }

    .skill span {
        font-size: clamp(0.8rem, 2vw, 3rem);
    }
    
    h4 {
        font-size: clamp(1rem, 2.5vw, 3rem);
    }

    .personalInfo p {
        font-size: clamp(1rem, 2.8vw, 3rem);
        margin: 2% 0 0 0;
    }

    .backgroundImg {
        height: clamp(15rem, 45vw, 38rem);
    }

    .mainPage h1 {
        margin: 9% 0 0 45%;
        font-size: clamp(2rem, 4.8vw, 5rem);
    }

    .mainPage__text {
        margin: 16% 0 0 47%;
        font-size: clamp(1rem, 2.5vw, 3rem);
    }

    .download {
        margin: 22% 0 0 47%;
        width: clamp(0.7rem, 15%, 30rem);
    }

    .rest h2 {
        font-size: clamp(1rem, 3vw, 4rem);
    }

    .project-card h3 {
        font-size: clamp(1.2rem, 2.4vw, 4rem);
    }

    .project-tags span {
        font-size: clamp(0.8rem, 1.5vw, 2rem);
    }

    .project-card p {
        font-size: clamp(1rem, 2vw, 2rem);
    }

    .window-tag {
        font-size: clamp(0.9rem, 1.8vw, 2rem);
    }

    #projectFullDesc {
        font-size: clamp(1rem, 2vw, 2.5rem);
    }

    .project-link {
        font-size: clamp(1rem, 2vw, 2.5rem);
    }
}

@media (max-width: 600px) {
    .container {
        width: 100%;
        max-width: 100%;
        min-height: 100dvh;
        flex-direction: column;
        overflow-x: hidden;
    }

    .backgroundImg {
        height: clamp(15rem, 40vw, 30rem);
    }

    .profileHeader img {
        width: clamp(8rem, 30vw, 30rem);
        height: clamp(8rem, 30vw, 30rem);
    }

    .topBar .personalInfo {
        margin: 30% 0 0 5%;
        width: 40%;
        font-size: clamp(1rem, 2vw, 4rem);
    }

    .mainPage h1 {
        margin: 10% 0 0 10%;
        font-size: clamp(2rem, 5vw, 5rem);
    }

    .mainPage__text {
        margin: 18% 0 0 12%;
        font-size: clamp(1rem, 2.5vw, 3rem);
    }

    .download {
        margin: 24% 0 0 12%;
        width: clamp(0.7rem, 20%, 40rem);
        font-size: clamp(1rem, 2vw, 3rem);
    }

    .topBar .personalInfo{
        margin: 8% 0 0 40%;
    }

    .personalInfo div span {
        font-size: clamp(0.9rem, 1.6vw, 2.5rem);
    }

    .emptySpaceOnTop {
        height: clamp(15rem, 35vw, 30rem);
    }

    .topBar .personalInfo p {

        margin: 2% 0 0 30%;
    }

    .personalInfo p {
        font-size: clamp(1rem, 3vw, 4rem);
    }

    .topBar .personalInfo div {
        margin: 2% 0 0 25%;
    }

    .personalInfo div span {
        font-size: clamp(0.8rem, 2.5vw, 2.5rem);
    }

    .topBar .personalInfo h1 {
        margin: 0 0 0 35%;
    }

    .personalInfo h1 {
        font-size: clamp(1.5rem, 5vw, 4rem);
        margin: 0 0 0 20%;
        width: 100%;
    }

    .skills h4,
    .contact h4 {
        font-size: clamp(1rem, 3vw, 3rem);
    }

    .skill__top span {
        font-size: clamp(0.8rem, 2.5vw, 3rem);
    }

    .contact-item span a {
        font-size: clamp(0.8rem, 3vw, 3rem);
    }

    .rest h2 {
        font-size: clamp(1rem, 4vw, 4rem);
    }

    .project-window h2 {
        font-size: clamp(1.5rem, 4vw, 5rem);
    }

    .project-card h3 {
        font-size: clamp(1.2rem, 3.7vw, 4rem);
    }

    .project-tags span {
        font-size: clamp(0.8rem, 2.5vw, 3rem);
    }

    .project-card p {
        font-size: clamp(1rem, 3vw, 4rem);
    }

    .window-tag {
        font-size: clamp(0.9rem, 3vw, 4rem);
    }

    #projectFullDesc {
        font-size: clamp(1rem, 3vw, 4rem);
    }

    .project-link {
        font-size: clamp(1rem, 3vw, 4rem);
    }

    .project-btn {
        font-size: clamp(1rem, 3vw, 4rem);
    }

    
}

@media (max-width: 420px) {
    .container {
        width: 170%;
    }

    .backgroundImg {
        height: clamp(15rem, 45vw, 30rem);
    }

    .profileHeader img {
        width: clamp(8rem, 30vw, 40rem);
        height: clamp(8rem, 30vw, 40rem);
        margin: 10% 0 0 0;
    }

    .personalInfo h1 {
        font-size: clamp(1.5rem, 5vw, 5rem);
        margin: 0 0 0 25%;
    }

    .topBar .personalInfo h1 {
        margin: 5% 0 0 35%;
    }

    .mainPage h1 {
        margin: 15% 0 0 10%;
        width: 70%;
        font-size: clamp(2rem, 5vw, 6rem);
    }

    .mainPage__text {
        margin: 25% 0 0 12%;
        width: 70%;
        font-size: clamp(1rem, 3vw, 4rem);
    }

    .download {
        margin: 32% 0 0 12%;
        width: clamp(0.7rem, 20%, 40rem);
    }
    
    .rest-content h2 {
        font-size: clamp(1rem, 4vw, 5rem);
    }

    .rest h2 {
        margin: 1rem 1rem;
        font-size: clamp(1rem, 5vw, 5rem);  
    }

    .project-card h3 {
        font-size: clamp(1.2rem, 4vw, 5rem);
    }

    .project-card p {
        font-size: clamp(1rem, 3vw, 4rem);
    }

    .window-tag {
        font-size: clamp(0.9rem, 3vw, 4rem);
    }
    
    #projectFullDesc {
        font-size: clamp(1rem, 3vw, 4rem);
    }

    .project-link {
        font-size: clamp(1rem, 3vw, 4rem);
    }   

}