@import url('https://fonts.googleapis.com/css2?family=Bitcount+Single:wght@100..900&display=swap');
:root {
    --base-clr: #e6e6ef;
    --line-clr: #e2e2e9;
    --hover-clr: #f0f0f7;
    --text-clr: #11121a;
    --accent-clr: #6246ea; 
    --secondary-text-clr: #5b5b71;
    --shadow-clr: rgba(0, 0, 0, 0.2);
}
.darkmode {
    --base-clr: #11121a;
    --line-clr: #222533;
    --hover-clr: #42434a;
    --text-clr: #e6e6ef;
    --accent-clr: #806aff; 
    --secondary-text-clr: #a1a1b8;
    --shadow-clr: rgba(0, 0, 0, 0.8);
}
*{
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}
html{
    font-family: 'Bitcount Single', monospace;
    line-height: 1.5rem;
    height: 100vh;
    overflow: hidden;
}
body{
    min-height: 100vh;
    background-color: var(--base-clr);
    color: var(--text-clr);
    display: grid;
    grid-template-columns: auto 1fr;
    overflow: hidden;
}
main{
    height: 100vh;
    overflow-y: auto;
    padding: min(30px, 7%);
    min-width: 0;
}
main p{
    color: var(--secondary-text-clr);
    margin-top: 15px;
    margin-bottom: 15px;
}
main::-webkit-scrollbar {
    width: 8px;
}
main::-webkit-scrollbar-track {
    background: var(--base-clr);
}
main::-webkit-scrollbar-thumb {
    background: var(--line-clr);
    border-radius: 10px;
}
main::-webkit-scrollbar-thumb:hover {
    background: var(--secondary-text-clr);
}
#sidebar{
    display: flex;
    flex-direction: column;
    box-sizing: border-box;
    height: 100vh;
    width: 250px;
    padding: 20px 1em;
    background-color: var(--base-clr);
    box-shadow: 2px 0 5px var(--shadow-clr);
    top: 0;
    align-self: start;
    overflow: hidden;
}
#sidebar.close{
    width: 80px;
    padding: 5px 1em;
}
#sidebar.close span {
    display: none;
}
#sidebar.close svg {
    margin-right: 0;
}
#sidebar.close a{
    justify-content: center;
    padding: 0.85em 0;
}
#sidebar.close .logo {
    display: none;
}
#sidebar.close #theme-switch {
    margin-left: auto;
    margin-right: auto;
}
#sidebar ul{
    list-style: none;
    flex-grow: 0;
}
#sidebar ul li.active a{
    color: var(--accent-clr);

    svg{
        fill: var(--accent-clr);
    }
}
#sidebar > ul > li:first-child {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    margin-bottom: 16px;
    .logo {
        font-weight: 600;
    }
}
#sidebar a, #sidebar .logo {
    display: flex;
    align-items: center;
    text-decoration: none;
    color: var(--text-clr);
    padding: 0.85em;
    border-radius: 0.5em;
    white-space: nowrap; /* Prevents text from wrapping when collapsing */
}
#sidebar svg{
    flex-shrink: 0;
    fill: var(--text-clr);
    margin-right: 10px;
}
#sidebar a span{
    flex-grow: 1;
}
#sidebar a:hover {
    background-color: var(--hover-clr);
}
#sidebar_toggle {
    margin-left: auto;
    background: none;
    border: none;
    border-radius: .5em;
    cursor: pointer;
    padding: 1em;
}
#theme-switch {
    margin-top: auto;
    margin-bottom: 20px;
    
    height: 40px;
    width: 40px;
    background: none;
    border: none;
    outline: none;
    border-radius: 50%;
    background-color: var(--line-clr);
    cursor: pointer;

    padding: 0;
    display: flex;
    justify-content: center;
    align-items: center;
}
#theme-switch svg {
    margin-right: 0;
}
#theme-switch:hover {
    background-color: var(--hover-clr);
}

#theme-switch svg:last-child {
    display: none;
}
.darkmode #theme-switch svg:first-child {
    display: none;
}
.darkmode #theme-switch svg:last-child {
    display: block;
}
.carousel-wrapper {
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
}
.container{
    display: flex;
    overflow-x: auto;
    width: 100%;
    padding: 40px 0;
    align-items: center;
    scroll-snap-type: x mandatory;
    scroll-behavior: smooth;
    scrollbar-width: none;
    gap: 20px;
}
.container::-webkit-scrollbar {
    display: none;                
}
.project_item{
    flex: 0 0 325px;
    width: 325px;
    scroll-snap-align: center;
    flex-direction: column;
    background-color: var(--line-clr);
    border-radius: 8px;
    margin: 20px;
    overflow: hidden;
    box-shadow: 0 4px 8px var(--shadow-clr);
}
.project_item.active {
    opacity: 1;
    transform: scale(1.1); /* Slightly larger to stand out */
}
.project_item:hover{
    background-color: var(--hover-clr);
    transform: scale(1.05);
    transition: transform 0.3s ease; 
}
.project_item img{
    width: 100%;
    height: 300px;
    object-fit: cover; /* cover ensures the image covers the entire container, maintains its aspect ratio, and does not exceed container dimentions */
}
.project_item .content{
    padding: 15px;
}
.project_item .content h3{
    margin-top: auto;
    margin-bottom: 5px;
}
.dots {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-top: 15px;
}

.dots a {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background-color: var(--text-clr);
    transition: background-color 0.3s ease;
}

.dots a:hover {
    background-color: var(--accent-clr);
}