/* Project cards: never stretch wider than quote cards on single-column screens */
@media (max-width: 1024px) {
    .mainunit.project-card,
    .mainunit.course-card,
    .mainunit.certificate-card {
        max-width: 350px !important;
        width: 100% !important;
        margin-left: auto;
        margin-right: auto;
    }
}
.time {
    top: 1.5rem; /* Matches the hamburger's top padding for vertical alignment on mobile */
    right: 2rem;
    z-index: 1051; /* Ensures it's above the offcanvas (Bootstrap offcanvas is z-1050) and sidebar (z-1000) */
    position: absolute;
    font-size: 13px;
}

body {
    transition: background-color 0.3s, color 0.3s;
    background-color: #ffffff;
    color: #000000;
    /* font-family: 'Courier New', Courier, monospace; */
}

.offcanvas-title {
    font-weight: bold;
    font-size: 30px;
    text-align: center; /* Centers the text horizontally */
    width: 100%; /* Ensures it spans the header for consistent centering */
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

.logo img {
    width: 100px;
    height: auto;
    margin-bottom: 20px;
}

.nav-link {
    margin: 5px !important;
    font-size: 14px !important;
    color: #333 !important;
    text-decoration: underline !important;
    white-space: nowrap !important;
    text-overflow: ellipsis !important;
    cursor: pointer !important;
    transition: color 0.3s !important;
}

.nav-link.btn {
    font-family: 'Courier New', Courier, monospace !important;
    font-size: 18px !important;
}

.titles {
    text-align: center;
    font-weight: bold;
    margin-bottom: 40px;
    font-size: 50px;
}

.main-content {
    padding: 20px;
    padding-left: 96px; /* Accounts for detached sidebar left offset */
    min-height: 100vh;
    font-family: 'Courier New', Courier, monospace;
}

footer {
    padding: 20px;
    text-align: center;
    width: 100%;
    border-top: 1px solid #e6ecf0;
}

.home {
    font-family: 'Courier', monospace;
    font-size: 17px;
    line-height: 1.6;
    color: #333;
    background-color: #ffffff;
    padding: 20px;
    border-radius: 8px;
    margin: 20px 0;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
    overflow-x: visible;
    word-wrap: break-word;
}

.projects {
    font-family: 'Courier', monospace;
    font-size: 17px;
    line-height: 1.6;
    color: #333;
    background-color: #ffffff;
    padding: 40px;
    border-radius: 8px;
    margin: 20px 0;
    margin-left: auto;
    margin-right: auto;
    overflow-x: auto;
    word-wrap: break-word;
}

.quotes {
    font-family: 'Courier', monospace;
    font-size: 15px;
    line-height: 1.6;
    color: #333;
    background-color: #ffffff;
    padding: 40px;
    border-radius: 8px;
    margin: 20px 0;
    margin-left: auto;
    margin-right: auto;
    overflow-x: auto;
    word-wrap: break-word;
}

.resume {
    font-family: 'Courier New', Courier, monospace;
    font-size: 15px;
    line-height: 1.6;
    color: #333;
    background-color: #f9f9f9;
    padding: 40px;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    margin: 60px 0;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
    overflow-x: auto;
    word-wrap: break-word;
    border: 1px solid #e6ecf0;
    position: relative; /* To position the LinkedIn button */
}

.linkedin-btn {
    position: absolute;
    top: 10px;
    right: 10px;
    background-color: #f8f9fa; /* Matches resume container background */
    border: 1px solid #0077b5; /* LinkedIn blue border */
    color: #0077b5; /* LinkedIn blue text */
    padding: 5px 10px;
    border-radius: 5px;
    text-decoration: none;
    font-size: 14px;
}

.linkedin-btn:hover {
    background-color: #0077b5;
    color: white;
}

.contact {
    font-family: 'Courier', monospace;
    font-size: 17px;
    line-height: 1.6;
    color: #333;
    background-color: #ffffff;
    padding: 40px;
    border-radius: 8px;
    margin: 20px 0;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
    overflow-x: auto;
    word-wrap: break-word;
}

@media (min-width: 769px) {
    .offcanvas {
        transform: none !important;
        visibility: visible !important;
        width: 15% !important;
        position: fixed;
        top: 0;
        bottom: 0;
        left: 0;
        z-index: 1000;
        background-color: #f8f9fa;
        border-right: 1px solid #e6ecf0;
    }
    .offcanvas .btn-close {
        display: none;
    }
}

@media (max-width: 768px) {
    .mainunit {
        width: calc(100% - 20px) !important; /* 1 per row with gap */
    }
    .offcanvas {
        --bs-offcanvas-width: 35% !important;
        position: fixed;
        z-index: 1050; /* Above content */
        transition: transform 0.3s ease-in-out;
    }
    .titles {
        font-size: 36px; /* Reduced font size for titles on mobile */
    }
}


.motherdiv {
    margin-top: 0px;
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 20px;
    /* The gap will be reduced on mobile below */
}


/* Unify card base for all types */
.mainunit,
.mainunit.project-card,
.mainunit.course-card,
.mainunit.certificate-card {
    width: 350px !important;
    min-height: 100px;
    display: flex;
    flex-direction: column;
    background-color: #f9f9f9;
    box-shadow: 0px 2px 4px rgba(0, 0, 0, 0.2);
    padding: 15px;
    border-radius: 8px;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.mainunit:hover {
    transform: translateY(-8px) scale(1.03);
    box-shadow: 0px 8px 20px rgba(0, 0, 0, 0.3);
}

.mainunit .onepointone {
    display: flex;
    justify-content: center;
    text-align: center;
    font-size: 16px; /* Consistent font size */
    margin-bottom: 10px; /* Space between title and content */
}

.mainunit .twopointtwo {
    word-wrap: break-word;
    overflow-wrap: break-word;
    margin: 0;
    padding-left: 10px;
    padding-right: 10px;
    font-size: 14px; /* Consistent content text size */
    flex-grow: 1; /* Allows content to stretch vertically */
}

.mainunit .twopointtwo p {
    margin: 0;
    padding: 0;
}

.divpic {
    margin: 15px;
    padding: 0;
    display: flex;
    justify-content: center;
}

.divpic img {
    width: 150px;
    height: 150px;
    object-fit: cover;
}


/* Responsive card widths for all card types */
@media (max-width: 768px) {
    .mainunit,
    .mainunit.project-card,
    .mainunit.course-card,
    .mainunit.certificate-card {
        width: calc(100% - 8px) !important;
        min-height: 90px;
    }
    .motherdiv {
        gap: 8px;
    }
}
@media (min-width: 769px) and (max-width: 1024px) {
    .mainunit,
    .mainunit.project-card,
    .mainunit.course-card,
    .mainunit.certificate-card {
        width: calc(50% - 16px) !important;
    }
    .motherdiv {
        gap: 16px;
    }
}
@media (min-width: 1025px) {
    .mainunit,
    .mainunit.project-card,
    .mainunit.course-card,
    .mainunit.certificate-card {
        width: calc(33.33% - 20px) !important;
    }
    .motherdiv {
        gap: 20px;
    }
}

/* Hamburger button styles */
.hamburger-btn {
    border: none;
    background: transparent;
    padding: 0;
    margin-top: 1.4rem; /* Adjusted for better alignment with the clock */
    margin-left: 2rem;
}

.hamburger-line {
    display: block;
    width: 30px;
    height: 3px;
    background-color: black;
    margin: 5px 0;
}

.quote-motherdiv {
    margin-top: 0px;
    display: flex;
    justify-content: space-evenly;
    flex-wrap: wrap;
    gap: 20px; /* Consistent gap for layout */
}

.quote-unit {
    width: 400px !important; /* Slightly narrower for a taller, rectangular look */
    min-height: 100px; /* Increased height to make rectangles longer */
    display: flex;
    flex-direction: column;
    background-color: #f9f9f9;
    box-shadow: 0px 2px 4px rgba(0, 0, 0, 0.2);
    padding: 15px; /* Increased padding for internal spacing */
    border-radius: 8px; /* Keep rounded corners for consistency */
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.quote-unit:hover {
    transform: translateY(-8px) scale(1.03);
    box-shadow: 0px 8px 20px rgba(0, 0, 0, 0.3);
}

.quote-unit .onepointone {
    display: flex;
    justify-content: center;
    text-align: center;
    font-size: 16px; /* Consistent font size */
    margin-bottom: 10px; /* Space between title and quote */
}

.quote-unit .twopointtwo {
    word-wrap: break-word;
    overflow-wrap: break-word;
    margin: 0;
    padding-left: 10px;
    padding-right: 10px;
    font-size: 14px; /* Consistent quote text size */
    flex-grow: 1; /* Allows content to stretch vertically */
}

.quote-unit .twopointtwo p {
    margin: 0;
    padding: 0;
}

/* Media query for small devices (2 per row) */
@media (max-width: 768px) {
    .quote-unit {
        width: calc(50% - 20px); /* 2 per row with gap */
        min-height: 90px; /* Slightly shorter for mobile */
    }
}

/* Media query for larger screens (3 per row) */
@media (min-width: 769px) {
    .quote-unit {
        width: calc(33.33% - 20px); /* 3 per row with gap */
    }
}

@media (max-width: 768px) {
    .resume {
        padding: 20px !important;
        margin: 20px !important;
        width: calc(100% - 40px) !important; /* Full width minus margins */
    }
}

/* Sidebar styles */
.sidebar {
    position: fixed;
    top: 50%;
    left: 28px;
    bottom: auto;
    height: auto;
    transform: translateY(-50%);
    width: 60px; /* Collapsed width, always visible */
    background-color: #f8f9fa;
    border-right: 1px solid #e6ecf0;
    border-radius: 12px;
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.08);
    overflow-x: hidden;
    transition: width 0.24s ease;
    will-change: width;
    z-index: 1050; /* Above content */
}

.sidebar:hover {
    width: 200px; /* Expand on hover */
}

.sidebar-header {
    text-align: center;
    padding: 15px 0;
    font-weight: bold;
    font-size: 20px;
}

.sidebar-title {
    white-space: nowrap;
}

.sidebar .nav-link {
    display: flex;
    align-items: center;
    color: #333 !important;
    text-decoration: none !important;
    padding: 10px;
    transition: background 0.2s;
    font-size: 16px;
}

.sidebar .nav-link:hover {
    background-color: #e6ecf0;
}

.sidebar .nav-link i {
    font-size: 20px;
    margin-right: 10px;
}

.link-text {
    display: none;
    white-space: nowrap;
}

.sidebar:hover .link-text {
    display: inline;
}

.theme-toggle-nav {
    margin-top: 8px;
    padding: 0;
    width: 100%;
    display: flex;
    justify-content: center;
}

.theme-toggle-wrap {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
}

.theme-icon-toggle {
    border: 1px solid #d1d5db;
    background-color: #f8f9fa;
    color: #f59e0b;
    width: 34px;
    height: 34px;
    border-radius: 999px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background-color 0.2s, color 0.2s, border-color 0.2s;
    transform: translateZ(0);
}

.theme-icon-toggle i {
    font-size: 16px;
}

.theme-icon-toggle:hover {
    background-color: #e6ecf0;
}

@media (min-width: 769px) {
    .sidebar:not(:hover) .theme-toggle-wrap {
        justify-content: center;
    }
}

/* Sidebar always visible with icons on mobile */
@media (max-width: 768px) {
    .sidebar {
        top: 12px;
        bottom: 12px;
        transform: none;
        height: auto;
        width: 60px; /* Always show icons */
        transition: width 0.3s ease;
        z-index: 1050; /* Above content */
    }
    .sidebar.active {
        width: 35%; /* Expand to show text when active */
    }
}
.sidebar-logo {
    display: block;
    margin: 0 5px;
    padding: 3px;

}
/* Logo states */
.collapsed-logo {
    display: block;
    max-width: 50px;
    transition: opacity 0.3s ease;
}

.expanded-logo {
    display: none;
    max-width: 190px;
    transition: opacity 0.3s ease;
}

/* Swap logos on hover */
.sidebar:hover .collapsed-logo {
    display: none;
}

.sidebar:hover .expanded-logo {
    display: block;
}
@media (max-width: 768px) {
    #view-counter {
        left: 2rem !important;
    }
    .home-btn {
        width: 26px;   /* same size as icons */
        height: 26px;
        object-fit: contain;
        cursor: pointer;
    }
    
    .main-content {
        padding-left: 10px !important;  /* small edge breathing room on mobile */
        padding-right: 10px !important;
        padding-bottom: 80px !important; /* keep space for bottom bar */
    }

    /* Keep pages close to screen edges without feeling cramped. */
    .home,
    .projects,
    .quotes,
    .contact,
    .resume,
    .projects-page,
    .leetcode-container,
    .project-section {
        margin-left: 0 !important;
        margin-right: 0 !important;
        width: 100% !important;
    }

    .projects,
    .quotes,
    .contact,
    .resume,
    .projects-page,
    .leetcode-container,
    .project-section {
        padding-left: 16px !important;
        padding-right: 16px !important;
    }

    /* Portfolio page: widen tiles and increase filter button spacing on mobile. */
    .projects {
        padding-left: 10px !important;
        padding-right: 10px !important;
    }

    .projects .project-filter-bar {
        padding: 12px 4px;
        margin-bottom: 24px;
    }

    .projects .filter-buttons {
        gap: 12px;
    }

    .projects .filter-btn {
        min-width: 31%;
        padding: 10px 14px;
        font-size: 13px;
    }

    .projects .motherdiv {
        gap: 12px;
    }

    .projects .mainunit,
    .projects .mainunit.project-card,
    .projects .mainunit.course-card,
    .projects .mainunit.certificate-card {
        width: 100% !important;
        max-width: none !important;
    }
    .sidebar {
        top: auto;
        bottom: 0;
        left: 0;
        right: 0;
        width: 100%;
        height: 60px;
        display: flex !important;
        align-items: center;
        justify-content: center;
        border-top: 1px solid #e6ecf0;
        border-right: none;
        z-index: 1050;
        overflow: hidden;
    }

    .sidebar-header {
        display: none !important;
    }

    .sidebar .nav {
        display: flex !important;
        flex-direction: row !important;
        justify-content: space-around !important;  /* more spacing between items */
        align-items: center !important;
        width: 100% !important;
        height: 100% !important;
        margin: 0 !important;
        padding: 0 !important;
    }

    .sidebar .nav-item {
        flex: 0 0 auto !important;  /* items only as wide as needed */
        display: flex !important;
        justify-content: center !important;
        align-items: center !important;
        height: 100% !important;
    }

    .sidebar .nav-item.theme-toggle-nav {
        margin-top: 0;
        margin-bottom: 8px;
        margin-left: 9px;
        height: 100%;
        width: auto;
        flex: 0 0 auto !important;
    }

    .sidebar .theme-toggle-wrap {
        height: 100%;
        width: auto;
    }

    .theme-icon-toggle {
        width: 32px;
        height: 32px;
    }

    .sidebar .nav-link {
        display: flex !important;
        flex-direction: column !important;
        justify-content: center !important;
        align-items: center !important;
        padding: 0 20px !important; /* give breathing room */
        margin: 0 !important;
        font-size: 14px !important;
        height: 100% !important;
    }

    .sidebar .nav-link i {
        font-size: 26px !important;
        margin: 0 !important;
    }

    .link-text {
        display: none !important;
    }

    .sidebar.active,
    .sidebar:hover {
        width: 100% !important;
        height: 60px !important;
    }

    .main-content {
        padding-bottom: 80px !important;
    }

}

.resume-contact a {
    margin: 0 10px;
    color: #0077b5; /* LinkedIn blue by default */
    text-decoration: none;
    font-size: 16px;
    transition: color 0.2s ease;
}

.resume-contact a i {
    margin-right: 6px;
    font-size: 18px;
}

.resume-contact a:hover {
    color: #005582; /* Darker blue on hover */
}

.resume-contact a[href*="github.com"] { color: #333; }   /* GitHub black */
.resume-contact a[href*="linkedin.com"] { color: #0077b5; }  /* LinkedIn blue */
.resume-contact a[href^="mailto:"] { color: #000000; }      /* Email red */
.resume-contact a[href^="tel:"] { color: #000000; }         /* Phone green */

.resume-project-link {
    display: block;
    position: relative;
    padding: 10px 12px;
    margin: -2px -12px;
    border-radius: 10px;
    color: inherit;
    text-decoration: none;
    transition: background-color 0.2s ease, color 0.2s ease;
}

.resume-preview-enabled {
    overflow: visible;
}

.resume-project-link:hover,
.resume-project-link:focus-visible {
    background-color: #edf4fb;
    color: #111;
}

.resume-project-link:focus-visible {
    outline: 2px solid #0077b5;
    outline-offset: 2px;
}

.resume-project-title {
    display: inline-block;
}

.resume-project-preview {
    position: absolute;
    top: 50%;
    right: -152px;
    width: 132px;
    height: 92px;
    border-radius: 10px;
    overflow: hidden;
    border: 1px solid #dbe5f1;
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.18);
    background-color: #fff;
    opacity: 0;
    transform: translateY(-50%) scale(0.96);
    transform-origin: right center;
    transition: opacity 0.18s ease, transform 0.18s ease;
    pointer-events: none;
}

.resume-project-preview img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.resume-project-link:hover .resume-project-preview,
.resume-project-link:focus-visible .resume-project-preview {
    opacity: 1;
    transform: translateY(-50%) scale(1);
}

@media (max-width: 900px) {
    .resume-project-link {
        padding-right: 12px;
    }

    .resume-project-preview {
        display: none;
    }
}

#view-counter {
    top: 1.5rem;
    right: auto;
    position: absolute;
    font-size: 13px !important;
    background: none;
    border-radius: 0;
    padding: 0;
    margin: 0;
    color: #000000 !important;
    font-family: inherit !important;
    box-shadow: none !important;
    letter-spacing: normal !important;
    display: inline !important;
    min-width: unset !important;
    justify-content: unset !important;
    height: unset;
    top: 1.5rem; /* Matches the hamburger's top padding for vertical alignment on mobile */
    left: 6rem;
}

.mobile-break {
    display: none;
}
@media (max-width: 768px) {
    .mobile-break {
        display: block;
        height: 0;
        width: 100%;
    }
}

.projects-page {
    font-family: 'Courier', monospace;
    font-size: 17px;
    line-height: 1.6;
    color: #333;
    background-color: #ffffff;
    padding: 20px;
    border-radius: 8px;
    margin: 20px 0;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
    overflow-x: auto;
    word-wrap: break-word;
}

.page-container {
    margin-top: 60px;
}

.page-container--narrow {
    max-width: 900px;
    margin-left: auto;
    margin-right: auto;
}

/* Let the home hero banner span the full content area width. */
.home.page-container--narrow {
    max-width: 100%;
}

.page-title {
    margin-bottom: 10px;
}

.resume-page-title {
    padding-top: 60px;
}

.center-text {
    text-align: center;
}

.content-container {
    max-width: 600px;
    margin: auto;
}

.section-divider {
    margin: 40px 0;
}

.profile-image {
    width: 120px;
    height: 120px;
    margin-bottom: 20px;
    border-radius: 50%;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.07);
    object-fit: cover;
}

.home-hero {
    position: relative;
    height: 230px;
    margin-bottom: 70px;
}

.home-cover-strip {
    position: relative;
    width: calc(100% + 80px);
    height: 110%;
    margin-left: -40px;
    border-radius: 0;
    background-image: url('/assets/images/PosterImage.png');
    background-size: cover;
    background-position: center;
    z-index: 0;
}

.home-hero .profile-image {
    margin: 0;
    position: absolute;
    top: 53%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 1;
}

@media (max-width: 768px) {
    .home-hero {
        height: 172px;
    }

    .home-cover-strip {
        width: calc(100% + 40px);
        margin-left: -20px;
        border-radius: 0;
    }
}

.home-title {
    font-size: 2.8rem;
    margin-bottom: 18px;
}

.home-subtitle {
    font-family: 'Courier New', Courier, monospace;
    font-size: 1.5rem;
    color: #555;
    margin-bottom: 40px;
}

.home-intro-wrap {
    margin-bottom: 42px;
}

.home-intro-panel {
    transition: opacity 0.35s ease, transform 0.35s ease;
}

.home-resume-shell {
    margin-top: 56px;
    padding-top: 60px;
}

@media (max-width: 768px) {
    .home-resume-shell {
        margin-left: -4px;
        margin-right: -4px;
        padding-top: 36px;
    }

    .home-resume-embed .resume {
        width: 100% !important;
        max-width: none !important;
        margin-left: 0 !important;
        margin-right: 0 !important;
        padding-left: 14px !important;
        padding-right: 14px !important;
    }
}

.home-resume-anchor {
    width: 100%;
    height: 1px;
}

.home-resume-embed .resume-page-title {
    display: none;
}

.home-resume-embed .resume {
    margin-top: 24px;
    width: min(100%, 1100px) !important;
    max-width: 1100px !important;
    margin-left: auto !important;
    margin-right: auto !important;
}

.home-resume-loading {
    font-family: 'Courier New', Courier, monospace;
    text-align: center;
    color: #555;
    margin-top: 16px;
}

.home.home-showing-resume .home-intro-panel {
    opacity: 0;
    transform: translateY(-14px);
    pointer-events: none;
}

.home-intro {
    font-size: 1.15rem;
    line-height: 1.9;
    color: #222;
    max-width: 1000px;
    margin: 0 auto 26px;
}

.accent-text {
    color: #0077b5;
}

.btn-row {
    margin-top: 34px;
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.home .btn-row {
    justify-content: center;
    margin-top: 0;
}

.home .home-intro {
    margin-bottom: 60px;
}

.home .btn-row .btn {
    min-width: 170px;
    padding: 0.7rem 1.1rem;
}

.btn-row--center {
    justify-content: center;
    text-align: center;
}

.contact-lead,
.contact-links {
    text-align: center;
}

.contact-lead {
    font-size: 1.1rem;
    margin-bottom: 30px;
}

.contact-links {
    font-size: 1rem;
}

.card-meta-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 8px;
}

.project-logo-image {
    max-width: 40%;
}

.hero-image {
    max-width: 100%;
    height: auto;
    border-radius: 15px;
    box-shadow: 0 4px 20px rgba(40, 167, 69, 0.3);
}

.hero-image--small {
    max-width: 8%;
}

.project-page {
    max-width: 1200px;
}

.project-section {
    margin-bottom: 40px;
    padding: 25px;
    background: white;
    border-radius: 15px;
    box-shadow: 0 2px 15px rgba(0, 0, 0, 0.1);
}

.project-actions {
    margin: 40px 0;
}

.project-bibliography {
    margin-top: 50px;
    font-size: 0.9em;
    color: #6c757d;
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
}

.feature-item {
    text-align: center;
    padding: 15px;
    border: 1px solid #e9ecef;
    border-radius: 10px;
}

.feature-item i {
    font-size: 2rem;
    color: #28a745;
    margin-bottom: 10px;
}

.tech-stack ul {
    list-style: none;
    padding: 0;
}

.tech-stack li {
    background: #e9ecef;
    margin: 10px 0;
    padding: 10px;
    border-radius: 5px;
}

.screenshots {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
}

.screenshot img {
    max-width: 100%;
    height: auto;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.team {
    background: #d4edda;
    border-left: 5px solid #28a745;
}

.leetcode-container {
    font-family: 'Courier New', Courier, monospace;
    font-size: 16px;
    line-height: 1.6;
    color: #333;
    background-color: #ffffff;
    padding: 40px;
    border-radius: 8px;
    margin: 20px auto;
    max-width: 900px;
    overflow-x: auto;
}

.leetcode-code {
    background: #f4f4f4;
    padding: 12px;
    border-radius: 6px;
    font-size: 14px;
    font-family: 'Courier New', Courier, monospace;
    overflow-x: auto;
    white-space: pre;
    border: 1px solid #e6ecf0;
    margin-top: 10px;
}

/* Styles for quote filter bar */
.quote-filter-bar {
    background-color: #ffffff; /* Matches page background */
    padding: 10px 20px;
    border-bottom: 1px solid #e6ecf0; /* Matches footer border for consistency */
    display: flex;
    align-items: center;
    margin-bottom: 20px;
}

.author-dropdown {
    width: 200px; /* Fixed width, not full-width */
    padding: 8px;
    font-family: 'Courier New', Courier, monospace;
    font-size: 14px;
    border: 1px solid #e6ecf0;
    border-radius: 5px;
    background-color: #f9f9f9; /* Matches quote-unit background */
    cursor: pointer;
    outline: none;
}

.author-dropdown:focus {
    border-color: #0077b5; /* LinkedIn blue for focus */
    box-shadow: 0 0 5px rgba(0, 119, 181, 0.3);
}

/* Styles for project filter bar */
.project-filter-bar {
    background-color: #ffffff; /* Matches page background */
    padding: 10px 20px;
    border-bottom: 1px solid #e6ecf0; /* Matches footer border for consistency */
    display: flex;
    align-items: center;
    margin-bottom: 20px;
}

.type-dropdown {
    width: 200px; /* Fixed width, not full-width */
    padding: 8px;
    font-family: 'Courier New', Courier, monospace;
    font-size: 14px;
    border: 1px solid #e6ecf0;
    border-radius: 5px;
    background-color: #f9f9f9; /* Matches mainunit background */
    cursor: pointer;
    outline: none;
}

.type-dropdown:focus {
    border-color: #0077b5; /* LinkedIn blue for focus */
    box-shadow: 0 0 5px rgba(0, 119, 181, 0.3);
}

/* New styles for filter buttons */
.filter-buttons {
    display: flex;
    justify-content: center; /* Centers the buttons */
    gap: 10px; /* Space between buttons */
    flex-wrap: wrap; /* Allows wrapping on small screens */
    width: 100%;
}

.filter-btn {
    font-family: 'Courier New', Courier, monospace;
    font-size: 14px;
    padding: 8px 16px;
    border: 1px solid #e6ecf0;
    border-radius: 5px;
    background-color: #f9f9f9;
    color: #333;
    cursor: pointer;
    transition: background-color 0.2s, box-shadow 0.2s, color 0.2s;
    outline: none;
}

.filter-btn:hover {
    background-color: #0077b5;
    color: white;
    box-shadow: 0 0 5px rgba(0, 119, 181, 0.3);
}

.filter-btn.active {
    background-color: #0077b5; /* LinkedIn blue for active state */
    color: white;
    box-shadow: 0 0 5px rgba(0, 119, 181, 0.3);
}

@media (max-width: 768px) {
    .quote-filter-bar {
        padding: 10px;
    }
    .author-dropdown {
        width: 150px; /* Smaller width for mobile */
    }
    .project-filter-bar {
        padding: 10px;
    }
    .type-dropdown {
        width: 150px; /* Smaller width for mobile */
    }
    .filter-buttons {
        justify-content: center;
        gap: 8px; /* Smaller gap on mobile */
    }
    .filter-btn {
        padding: 6px 12px; /* Smaller padding for mobile */
        font-size: 12px; /* Smaller font for mobile */
    }
}

/* ----- Portfolio variant styles ----- */

/* Make sure .mainunit remains a column by default (main layout uses this) */
.mainunit {
    display: flex;
    flex-direction: column;
    background: #f9f9f9;
    border-radius: 8px;
    padding: 12px;
    box-shadow: 0 2px 6px rgba(0,0,0,0.08);
}

/* Project (image-first) */
.mainunit.project-card .divpic { margin: 0 0 10px 0; }
.mainunit.project-card .divpic img {
    width: 100%;
    height: 160px;
    object-fit: cover;
    border-radius: 8px;
}
.mainunit.project-card .onepointone { padding: 0 6px; font-size: 18px; }
.mainunit.project-card .twopointtwo { padding: 0 6px 6px; color: #444; }

/* Course (text-first) */
.mainunit.course-card {
    padding: 16px;
    justify-content: space-between;
    min-height: 140px;
}
.mainunit.course-card .onepointone { margin-bottom: 6px; font-size: 17px; }
.mainunit.course-card .twopointtwo { color: #444; }

/* Certificate (icon + details, row layout) */
.mainunit.certificate-card {
    flex-direction: row;
    align-items: center;
    gap: 12px;
    padding: 12px;
}
.mainunit.certificate-card .divpic {
    width: 72px;
    height: 72px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
    background: #fff;
    box-shadow: 0 1px 3px rgba(0,0,0,0.06);
}
.mainunit.certificate-card .divpic img {
    max-width: 56px;
    max-height: 56px;
    object-fit: contain;
}

/* tag badge style (small pill for provider / language) */
.tag-badge {
    display: inline-block;
    background: #e9f5ff;
    color: #0d6efd;
    padding: 4px 8px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 600;
}

/* view certificate link */
.view-cert {
    display: inline-block;
    margin-top: 6px;
    font-size: 14px;
    color: #0d6efd;
    text-decoration: none;
}

/* Responsive tweaks */
@media (max-width: 768px) {
    .mainunit.certificate-card {
        flex-direction: column;
        align-items: flex-start;
    }
    .mainunit.certificate-card .divpic {
        margin-bottom: 8px;
    }
}

/* Custom styles for the three card types (integrated from provided example) */

/* Project card styles (includes base card styles + img-specific styles) */
.mainunit.project-card {
    background-color: #ffffff;
    border-radius: 8px;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    overflow: hidden;
    transition: transform 300ms ease-in-out, box-shadow 300ms ease-in-out;
}

.mainunit.project-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
}

/* Course card styles (base card only, since no image) */
.mainunit.course-card {
    background-color: #ffffff;
    border-radius: 8px;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    overflow: hidden;
    transition: transform 300ms ease-in-out, box-shadow 300ms ease-in-out;
}

.mainunit.course-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
}

/* Certificate card styles (includes flex for the inner layout) */
.mainunit.certificate-card {
    background-color: #ffffff;
    border-radius: 8px;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    overflow: hidden;
    transition: transform 300ms ease-in-out, box-shadow 300ms ease-in-out;
}

.mainunit.certificate-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
}

/* Ensure certificate content uses flex (for icon + text layout) */
.mainunit.certificate-card .certificate-content {
    padding: 0.5rem 0.5rem 0.5rem 0;
    display: flex;
    align-items: center;
    width: 100%;
    min-height: 48px;
}

.mainunit.certificate-card .certificate-content p {
    color: #444;
    font-size: 14px;
    margin: 0;
}

.mainunit.certificate-card .certificate-icon {
    margin-right: 1rem;
    width: 2.2rem;
    height: 2.2rem;
    background-color: #dbeafe;
    border-radius: 9999px;
    display: flex;
    align-items: center;
    justify-content: center;
}


/* Sidebar active icon highlight for desktop and mobile */
.sidebar .nav-link.active {
    background-color: #0077b5 !important;
    color: #fff !important;
    border-left: 5px solid #0077b5;
    border-radius: 0 8px 8px 0;
}
.sidebar .nav-link.active i {
    color: #fff !important;
}

@media (max-width: 768px) {
    .sidebar .nav-link.active {
        border-left: none;
        border-radius: 8px;
    }
}

body.dark-theme {
    background-color: #0f172a;
    color: #e2e8f0;
}

body.dark-theme .sidebar {
    background-color: #111827;
    border-color: #334155;
}

body.dark-theme .sidebar .nav-link {
    color: #e2e8f0 !important;
}

body.dark-theme .sidebar .nav-link:hover {
    background-color: #334155;
}

body.dark-theme #view-counter,
body.dark-theme .time {
    color: #cbd5e1 !important;
}

body.dark-theme .theme-icon-toggle {
    background-color: #1f2937;
    border-color: #475569;
    color: #93c5fd;
}

body.dark-theme .theme-icon-toggle:hover {
    background-color: #334155;
}

body.dark-theme .main-content,
body.dark-theme .home,
body.dark-theme .projects,
body.dark-theme .quotes,
body.dark-theme .contact,
body.dark-theme .projects-page,
body.dark-theme .leetcode-container,
body.dark-theme .project-section,
body.dark-theme .resume {
    background-color: #121723 !important;
    color: #e2e8f0 !important;
    border-color: #334155 !important;
}

body.dark-theme .mainunit,
body.dark-theme .quote-unit {
    background-color: #242b3b !important;
    color: #e2e8f0 !important;
    border-color: #334155 !important;
}

body.dark-theme .home-resume-loading {
    color: #cbd5e1;
}

body.dark-theme .mainunit .twopointtwo,
body.dark-theme .quote-unit .twopointtwo,
body.dark-theme .mainunit.certificate-card .certificate-content p,
body.dark-theme .home-subtitle,
body.dark-theme .home-intro,
body.dark-theme .contact-lead,
body.dark-theme .contact-links,
body.dark-theme .project-bibliography,
body.dark-theme .resume-contact a[href*="github.com"],
body.dark-theme .resume-contact a[href^="mailto:"],
body.dark-theme .resume-contact a[href^="tel:"] {
    color: #cbd5e1 !important;
}

body.dark-theme .leetcode-code,
body.dark-theme .quote-filter-bar,
body.dark-theme .project-filter-bar,
body.dark-theme .author-dropdown,
body.dark-theme .type-dropdown,
body.dark-theme .filter-btn,
body.dark-theme .tech-stack li,
body.dark-theme .feature-item,
body.dark-theme .tag-badge,
body.dark-theme .mainunit.certificate-card .divpic {
    background-color: #121723 !important;
    color: #e2e8f0 !important;
    border-color: #334155 !important;
}

body.dark-theme .filter-btn.active,
body.dark-theme .filter-btn:hover {
    background-color: #2563eb !important;
    color: #ffffff !important;
}

body.dark-theme a,
body.dark-theme .view-cert,
body.dark-theme .resume-contact a[href*="linkedin.com"] {
    color: #93c5fd;
}

body.dark-theme footer {
    border-top-color: #334155;
}

/* Dark mode: unify raised/bordered subpage cards */
body.dark-theme .project-section,
body.dark-theme .feature-item,
body.dark-theme .tech-stack li,
body.dark-theme .leetcode-code,
body.dark-theme .mainunit.certificate-card .divpic {
    background-color: #242b3b !important;
}