body{
    background-color: #dddddd;
    font-family: "Baloo 2", sans-serif;
    color: #2c2c2c;
    margin: 0;
    padding: 0;
    min-height: 100vh;
}
div.panel{
    background-color: #ffffff;
    border-radius: 25px;
    font-size: clamp(1rem, 2.2vw, 1.3rem);
}

#main {
    grid-area: main;
    transition: all 0.25s ease-out;
    height: 0vh;
    overflow: hidden;
    opacity: 0;
}

#content{
    width: 100%;
    height: 100%;
    overflow-y: auto;
    overflow-x: hidden;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    -ms-overflow-style: none;
}

#content::-webkit-scrollbar {
    display: none;
}

#side {grid-area: side;}
#grid-container{
    display: grid;
    grid-template-areas: 
        'header header header'
        'main main main'
        'main main main';
    gap: 5px;
    width: min(90vw, 1100px);
    margin: auto;
    padding: 12px 0 24px;
    box-sizing: border-box;
}

#header {
    transition: all 0.25s ease-out;
    grid-area: header;
    display: grid;
}
#grid-container.focus #header{
    height: 20vh;
    grid-template-areas: 'logo' 'nav';
}
#grid-container.focus #logo{
    margin: auto;
    height: inherit;
    display: inline-flex;
    position: relative;
    justify-content: center;
}

#logo {
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    display: flex;
    align-items: center;
    justify-content: flex-start;
}

#logo h1 {
    width: auto;
    opacity: 1;
    margin: 0;
    white-space: nowrap;
    display: block;
}

#logo.logo-enter h1 {
    opacity: 0;
    transform: translateX(24px);
    animation: logoFadeIn 0.8s ease-out 0.35s forwards;
}
#grid-container.focus #nav{
    text-align: center;
}
#grid-container.focus #logo h1{
    font-size: clamp(3.5rem, 8vw, 5.5rem);
    line-height: 1;
    margin: auto;
}
#grid-container.defocus #header{
    height: 10vh;
    grid-template-areas: 'logo nav';
}
#grid-container.defocus #header #logo{
    height: inherit;
    display: flex;
}
#grid-container.defocus #header #nav{
    margin-top: auto;
    text-align: right;
    
}
#grid-container.defocus #header #logo h1{
    font-size: 5vh;
    margin-top: auto;
    margin-bottom: auto;
}

h1{
    margin-bottom: 0;
}

@keyframes logoFadeIn{
    from {
        opacity: 0;
        transform: translateX(24px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}
.anim_reload{
    animation-name: reload;
    animation-duration: 0.25s;
    animation-fill-mode: forwards;
}
.anim_reloadFinish{
    animation-name: reloadFinish;
    animation-duration: 0.25s;
    animation-fill-mode: forwards;
}
@keyframes reloadText{
    0%{
        color: rgb(15, 15, 15);
    }
    100%{
        color: #252530;
    }

}
@keyframes reloadFinish{
    0%{
        height: 0vh;
    }
    100%{
        height: 85vh;
    }
}

@keyframes logoShrink{
    0%{
        width: 100%;
    }
    100%{
        width: 50%;
    }

}

@keyframes reload{
    0%{
        height: 85vh;
    }
    100%{
        height: 0vh;

    }
}

#main{
    color: #2c2c2c
}
#grid-container.focus #main{
    height: 0vh;
    opacity: 0;
}
#grid-container.defocus #main{
    height: 85vh;
    opacity: 1;
}
#nav button{
    cursor: pointer;
    font-weight: 500;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.35rem;
    transition: all 0.25s ease-out;
    text-decoration: none;
    background-color: #ffffff;
    color:#2c2c2c; 
    border: 1px #e3d7e9 solid;
    font-size: clamp(0.95rem, 2vw, 1.1rem);
    border-radius: 25px;
    padding: 8px 12px;
    margin: 0.35rem 0.5rem;
}
#nav button:hover{
    background-color: #a1a1a1;
    color:#2c2c2c; 
    border: 1px #e3d7e9 solid;
    padding: 6px;
}
#nav button:active{
    background-color: #252530;
    color:#e3d7e9; 
    border: 1px #e3d7e9 solid;
    padding: 4px;
}
#nav button img{
    height: 1.1rem;
    width: auto;
}


::-webkit-scrollbar {
    width: 10px;
  }
  ::-webkit-scrollbar-track {
    border-radius: 5px;
  }
  ::-webkit-scrollbar-thumb {
    background: #17171E; 
    border-radius: 25px;
  }
  ::-webkit-scrollbar-thumb:hover {
    background: #22222c; 
  }

p{
    font-size: clamp(1rem, 1.8vw, 1.1rem);
    margin-left: 30px;
    margin-right: 30px;
    margin-top: 0;
    margin-bottom: 25px;
}
h2.portfolio{
    font-size: clamp(1.6rem, 4vw, 2.2rem);
    color:#2c2c2c; 
    text-align: center;
    margin-top: 0;
    margin-bottom: 0;
}
h3.portfolio{
    font-size: clamp(1.2rem, 3vw, 1.6rem);
    color:#2c2c2c; 
    text-align: center;
    margin-top: 0;
    margin-bottom: 0;
}

ul{
    font-size: clamp(1rem, 1.8vw, 1.1rem);
    margin: 0px;
}

#main hr{
    width: 40%;
    margin-left: auto;
    margin-right: auto;
    margin-top: 0px;
    margin-bottom: 15px;
    border-color:#e3d7e9; 
}



a{
    color:#34343f;
    text-decoration: underline;
}

a:hover{
    color: #22222c;
}

a:visited{
    color:#34343f;
}

.portfolio-grid {
    margin: 10px;
    display: grid;
    gap: 18px;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
}

.project-card {
    display: flex;
    flex-direction: column;
    border-radius: 16px;
    box-shadow: 0 18px 40px rgba(0, 0, 0, 0.08);
    background-color: #ffffff;
    overflow: visible;
}

.image-wrap {
    position: relative;
    overflow: hidden;
    border-radius: 16px;
    min-height: 180px;
}

.image-wrap img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.35s ease;
}

.image-wrap:hover img {
    transform: scale(1.06);
}

.image-wrap .project-overlay {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 1.2rem;
    background: rgba(0, 0, 0, 0.45);
    color: #ffffff;
    opacity: 0;
    transition: opacity 0.22s ease;
}

.image-wrap:hover .project-overlay {
    opacity: 1;
}

@media (max-width: 600px) {
    .image-wrap .project-overlay {
        opacity: 1;
        background: linear-gradient(180deg, rgba(0, 0, 0, 0.08) 0%, rgba(0, 0, 0, 0.72) 100%);
    }

    .project-overlay .project-title {
        font-size: 1rem;
    }

    .project-overlay .project-category {
        font-size: 0.8rem;
    }
}

.project-overlay .project-title {
    display: block;
    font-size: clamp(1rem, 2vw, 1.2rem);
    font-weight: 700;
    letter-spacing: 0.02em;
}

.project-overlay .project-category {
    display: block;
    margin-top: 6px;
    font-size: 0.85rem;
    font-weight: 600;
    opacity: 0.95;
    color: rgba(255,255,255,0.9);
}
@media (max-width: 900px) {
    #grid-container {
        width: min(95vw, 100%);
        padding: 10px 0 20px;
    }

    #grid-container.defocus #header {
        height: auto;
        grid-template-areas: 'logo' 'nav';
        text-align: center;
    }

    #grid-container.defocus #header #nav {
        margin-top: 0;
        text-align: center;
    }

    #grid-container.focus #header {
        height: auto;
    }

    #nav {
        display: flex;
        flex-wrap: wrap;
        justify-content: center;
    }
}

@media (max-width: 600px) {
    body {
        padding: 0;
    }

    #grid-container {
        width: 100%;
        gap: 8px;
        padding: 8px 0 16px;
    }

    #header {
        width: 100%;
    }

    #logo {
        width: 100%;
        display: flex;
        justify-content: center;
        align-items: center;
        padding: 0.25rem 0.5rem 0;
    }

    #logo h1 {
        font-size: clamp(1.35rem, 6vw, 2rem);
        width: 100%;
        text-align: center;
        margin: 0;
        opacity: 1;
        animation: none;
    }

    #logo.logo-enter h1 {
        width: 100%;
        font-size: clamp(1.35rem, 6vw, 2rem);
    }

    #nav button {
        width: calc(100% - 1rem);
        justify-content: center;
    }

    p,
    ul {
        margin-left: 1rem;
        margin-right: 1rem;
    }

    .portfolio-grid {
        grid-template-columns: 1fr;
    }
}