/* General Styles */
body {
    margin: 0;
    font-family: Arial, sans-serif;
    background-color: #121212;
    color: #d3d3d3;
    scroll-behavior: smooth;
    line-height: 1.6;
}

/* Header */
header {
    display: flex;
    justify-content: space-between;
    flex-direction: column;
    align-items: center;
    padding: 1rem 5%;
    background-color: #1e1e1e;
    position: sticky;
    text-align: center;
    top: 0;
    z-index: 1000;
}


header h1 {
    margin: 0;
    z-index: 1; /* Ensures text stays above background */
}

header h2 {
    margin: 0;
    z-index: 1; /* Ensures text stays above background */
}

header h3 {
    margin: 0;
    z-index: 1; /* Ensures text stays above background */
}

.ascii-art {
    font-family: monospace;
    font-size: 12px; /* Adjust as needed */
    white-space: pre;
    text-align: center;
    color: #c49ec4; /* Adjust color if needed */
    overflow-x: auto; /* Prevents text overflow issues */
    padding: 0px;
    margin: 0px;
}

nav a {
    color: #c49ec4;
    margin: 5px 5px;
    text-decoration: none;
    transition : color 0.3s;
    z-index: 1; /* stay above image */
}

nav a:hover {
    color: #e6b3e6;
}

/* Sidebar on the left */
.sidebar {
    width: 20%;
    max-width: 250px;
    background-color: #0a0a0a;
    padding: 10px;
    box-shadow: 2px 0 5px rgba(0, 0, 0, 0.1);
    display: flex;
    flex-direction: column;
    align-items: center;
    position: fixed;
    height: 100%;
    left: 0;
    transition: transform 0.3s ease;
}

/* Sidebar links */
.sidebar a {
    text-decoration: none;
    color: #c49ec4;
    padding: 0px 0;
    display: block;
    text-align: center;
    }

/* Main content margin matches sidebar width */
main {
    margin-left: 250px;
    transition: margin-left 0.3s ease;
}

/* Collapsed Sidebar */
.sidebar.collapsed {
    transform: translateX(-100%);
}

/* Adjust Main Margin When Sidebar Collapses */
main.collapsed {
    margin-left: 20px;
}

/* Profile picture in sidebar */
.profile-picture {
    width: 80%;
    aspect-ratio: 1 / 1; /* Ensures height equals width */
    border-radius: 50%;
    object-fit: cover;
    margin-bottom: 20px;
}

.container {
    display: grid;
  }

/* Sidebar links */
.sidebar-nav {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

/* Make links block elements */
.sidebar-nav a {
    display: flex;
    align-items: center;
    gap: 3px;
    text-decoration: none;
    color: inherit;
    font-size: 16px;
    padding: 5px;
    border-radius: 5px;
    line-height: 50%;
    transition: background 0.3s;
}

/* On hover, give a subtle background change */
.sidebar-nav a:hover {
    background: rgba(0, 0, 0, 0.1);
}

/* Default: Show both icon and text */
.sidebar-nav .icon {
    font-size: 24px;
}
.sidebar-nav .text {
    display: inline;
}

/* Social icons container */
.social-icons {
    display: flex;
    justify-content: center;
    gap: 10px; /* Space between icons */
    margin: 0px 0;
    font-size: 30px;
}

.social-icons a {
    padding: 0; /* Remove padding from icons */
}


/* Sections */
section {
    padding: 2rem 10%;
    margin: 0 auto;
}

h1, h2 {
    color: #c49ec4;
}

/* Icons */
.icons a {
    color: #d3d3d3;
    margin-left: 10px;
    transition: color 0.3s;
}

.icons a:hover {
    color: #e6b3e6;
}

/* General section styling */
#projects {
    padding: 2rem 10%;
    margin: auto;
}

#home h2 {
    padding: 0px;
}

#blog-list-container {
    overflow-x: scroll !important; /* Ensure it stays */
    white-space: nowrap;
    padding: 5px 0;
    min-height: 120px; /* Adjust height if needed */

}

/* Keeps scrollbar always visible */
#blog-list-container::-webkit-scrollbar {
    height: 8px;
    display: block !important;
    
}


#blog-list-container::-webkit-scrollbar-track {
    background: #000000; /* Track color */
    border-radius: 5px;
}

#blog-list-container::-webkit-scrollbar-thumb {
    background: #9279ba; /* Thumb color */
    border-radius: 5px;
}

#blog-list-container::-webkit-scrollbar-thumb:hover {
    background: #555; /* Darker on hover */
}

#blog-list {
    display: flex;
    gap: 15px; /* Space between items */
    padding: 0;
    list-style: none;
    align-items: center; 
}

.blog-item {
    flex: 0 0 auto; /* Prevent shrinking */
    width: 300px; /* Set a consistent width for each item */
    border: 1px solid #ddd;
    border-radius: 8px;
    overflow: hidden;
    padding: 10px;
}

.blog-link {
    display: flex;
    flex-direction: column;
    text-decoration: none;
    color: inherit;
}

.blog-image {
    width: 100%;
    height: 150px;
    object-fit: cover;
    border-radius: 5px;
}


.blog-details {
    display: flex;
    flex-direction: column;
    justify-content: flex-start; /* Aligns text to the top */
}


.blog-details h3 {
    margin: 0 0 5px 0;
    font-size: 18px;
    font-weight: bold;
}

.blog-details p {
    margin: 0;
    font-size: 14px;
    color: #555;
}



/*Blog links on homepage */
#blog-list a {
    display: flex; 
    align-items: top; 
    gap: 15px; 
    text-decoration: none;
    color: #e6b3e6;
    list-style-type: none;
    color: inherit;
}
/*Blog List on homepage */
#blog-list li {
    list-style-type: none;
    padding: 5px;
    margin-bottom: 30px;
}

/*Blog List on homepage */
#blog-list h3 {
    margin-bottom: 0px;
    padding: 0px;
}

/*Blog Item on homepage */
#blog-content h3 {
    margin-bottom: 0px;
    padding: 0px;
}

/*Blog Item on homepage */
#blog-content p {
    margin-bottom: 0px;
    padding: 0px;
}

/* Project item container */
.project-item {
    display: flex;
    align-items: center;
    gap: 20px; /* Space between text and image */
    margin-bottom: 20px;
}

/* Project image */
.project-item img {
    width: 150px;
    height: auto;
    border-radius: 10px;
}

.project-item a {
    text-decoration: none;
    color: #e6b3e6;
    list-style-type: none;
}


/* Menu toggle button styling */
.sidebar #menu-toggle {
    display: block;          /* Ensure it takes full width if needed */
    margin: 10px 0 0 0;      /* Adds space above and aligns left */
    padding: 5px 10px;
    background-color: #c49ec4;
    color: #121212;
    border: none;
    font-size: 16px;
    cursor: pointer;
    z-index: 1100;
    border-radius: 2px;
    position: absolute;
    right: 3px; /* Adjust this to align as needed */
    top: 9px;
    transform: translateY(-50%);
    transition: right 0.3s ease;
}

#menu-toggle:hover {
    background-color: #e6b3e6;
}

/* Menu toggle button styling */
.sidebar.collapsed #menu-toggle {
    right: -38px; /* Adjust this to align as needed */
    top: 9px;
    transition: right 0.3s ease;
}

/* Responsive */
@media (max-width: 1024px) {
    .menu-button {
        display: block;
    }   
    
    .sidebar {
        width: 100%;
        height: 100%;
        z-index: 999;
    }

    /* Profile picture in sidebar */
    .profile-picture {
        width: 60%;
        aspect-ratio: 1 / 1; /* Ensures height equals width */
        border-radius: 50%;
        object-fit: cover;
        margin-bottom: 0px;
    }

    /* Main content margin matches sidebar width */
    main {
        margin-left: 310px;
        transition: margin-left 0.3s ease;
    }

    /* Adjust Main Margin When Sidebar Collapses */
    main.collapsed {
        margin-left: 30px;
    }

    .main-content {
        margin-left: 0;
    }

    header {
        flex-direction: column;
        padding: 1rem 2%;
    }

    section {
        padding: 2rem 5%;
    }

    .project-item {
        flex-direction: column;
        gap: 10px;
    }

    .project-item img {
        width: 100%; /* Full width for mobile */
        max-width: 300px;
    }

    .ascii-art {
        font-family: monospace;
        font-size: 4px; /* Adjust as needed */
        white-space: pre;
        text-align: center;
        color: #c49ec4; /* Adjust color if needed */
        overflow-x: auto; /* Prevents text overflow issues */
        padding: 0px;
        margin: 0px;
    }
}
/* For landscape */

@media (max-width: 1024px) and (orientation: landscape) {
    .profile-picture {
        margin-left: -20px;
        margin-top: -20px;
    }
    
    .sidebar-nav {
        display: grid;
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
        text-align: center;
    }

    .sidebar-nav a {
        flex-direction: column;
        justify-content: center;
        padding: 5px;
        gap: 10px; /* Space between icons */
        margin: 0px 0;
    }

    .sidebar-nav .text {
        display: none; /* Hide text labels */
    }

    .sidebar-nav .icon {
        font-size: 32px; /* Make icons larger */
    }

    .sidebar {
        width: 10%;
        max-width: 250px;
        padding: 20px;
        transition: transform 0.3s ease;
    }

    /* Main content margin matches sidebar width */
    main {
        margin-left: 120px;
        transition: margin-left 0.3s ease;
    }

    h2 {
        line-height: 60%;
    }
    
    h3 {
        line-height: 110%;
    }
  }