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

body {
    font-family: 'Montserrat', sans-serif;
    background-color: #E6E6E6;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-rendering: optimizeLegibility;
    overflow-x: hidden;
    /* Prevents horizontal scrollbar */
}

/* ==================== HAMBURGER MENU ==================== */
.hamburger-menu {
    display: none;
    position: fixed;
    top: 20px;
    left: 20px;
    z-index: 1001;
    background: none;
    border: none;
    cursor: pointer;
    flex-direction: column;
    gap: 6px;
    padding: 5px;
}

.hamburger-menu span {
    width: 28px;
    height: 3px;
    background-color: #1A1A1B;
    border-radius: 3px;
    transition: all 0.3s ease;
}

.hamburger-menu.active span:nth-child(1) {
    transform: rotate(45deg) translate(10px, 10px);
}

.hamburger-menu.active span:nth-child(2) {
    opacity: 0;
}

.hamburger-menu.active span:nth-child(3) {
    transform: rotate(-45deg) translate(7px, -7px);
}

.page-container {
    /* We removed 'display: flex' because we are using fixed positioning now */
    min-height: 100vh;
    position: relative;
}

.sidebar {
    width: 280px;
    height: 100vh;
    /* Full screen height */

    /* FIX: Lock sidebar to the left so it never scrolls */
    position: fixed;
    top: 0;
    left: 0;

    display: flex;
    flex-direction: column;
    z-index: 50;
}

.sidebar-top {
    height: 35vh;
    background-color: #333333;
    display: flex;
    align-items: center;
    justify-content: center;
}

.profile-circle {
    width: 160px;
    height: 160px;
    border-radius: 50%;
    overflow: hidden;
    border: 8px solid #fff;
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.3);
}

.profile-circle img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.sidebar-bottom {
    height: 65vh;
    background-color: #F2B824;
    display: flex;
    align-items: center;
    justify-content: center;
}

.nav-links {
    display: flex;
    flex-direction: column;
    text-align: center;
    gap: 35px;
}

.nav-links a {
    font-family: 'Oswald', sans-serif;
    font-size: 1.1rem;
    font-weight: 700;
    text-transform: uppercase;
    text-decoration: none;
    color: #1A1A1B;
    letter-spacing: 2px;
    transition: 0.3s;
}

.nav-links a:hover,
.nav-links a.active {
    color: #fff;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.2);
}

.right-nav {
    position: fixed;
    right: 0;
    top: 0;
    height: 100vh;
    width: 80px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    border-left: 1px solid rgba(0, 0, 0, 0.1);
    background-color: transparent;
    /* Important: Allow clicks to pass through empty areas if needed, 
       but here we keep it solid for hover effects */
}

.nav-line {
    width: 1px;
    height: 80px;
    background-color: #1A1A1B;
    margin: 20px 0;
    opacity: 0.3;
}

.nav-icons {
    display: flex;
    flex-direction: column;
    gap: 30px;
}

.nav-item {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: 1.5px solid #F2B824;
    background-color: transparent;
    transition: all 0.3s cubic-bezier(0.68, -0.55, 0.27, 1.55);
}

.nav-item img {
    width: 18px;
    height: 18px;
    opacity: 1;
    filter: brightness(0);
    transition: 0.3s;
}

.nav-item:hover,
.nav-item.active:hover {
    background-color: #F2B824;
    transform: scale(1.2);
    box-shadow: 0 0 15px rgba(242, 184, 36, 0.5);
}

.nav-item.active {
    background-color: #F2B824;
    box-shadow: none;
}

.nav-item::before {
    content: attr(data-tooltip);
    position: absolute;
    right: 55px;
    top: 50%;
    transform: translateY(-50%) translateX(10px);
    background-color: #1A1A1B;
    color: #F2B824;
    padding: 6px 12px;
    font-size: 12px;
    font-family: 'Oswald', sans-serif;
    font-weight: 700;
    letter-spacing: 1px;
    border-radius: 4px;
    white-space: nowrap;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    pointer-events: none;
}

.nav-item::after {
    content: '';
    position: absolute;
    right: 47px;
    top: 50%;
    transform: translateY(-50%) translateX(10px);
    border-width: 6px;
    border-style: solid;
    border-color: transparent transparent transparent #1A1A1B;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.nav-item:hover::before,
.nav-item:hover::after {
    opacity: 1;
    visibility: visible;
    transform: translateY(-50%) translateX(0);
}

.main-content {
    /* FIX: Push content to the right because sidebar is now fixed */
    margin-left: 280px;
    /* Also ensure we leave room for the right navbar */
    margin-right: 80px;

    width: calc(100% - 360px);
    /* 100% minus sidebar(280) and right nav(80) */

    padding: 60px 50px;
    /* Internal padding */
    background-color: #E6E6E6;
    min-height: 100vh;
}

.section-header {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 30px;
}

.dash {
    width: 40px;
    height: 3px;
    background-color: #333;
}

.section-header h1 {
    font-family: 'Oswald', sans-serif;
    font-size: 3.5rem;
    text-transform: uppercase;
    color: #333;
    font-weight: 700;
    margin: 0;
}


.portfolio-filter {
    display: flex;
    gap: 30px;
    margin-bottom: 40px;
    flex-wrap: wrap;
}

.filter-item {
    font-family: 'Oswald', sans-serif;
    font-size: 0.9rem;
    font-weight: 600;
    color: #666;
    cursor: pointer;
    text-transform: uppercase;
    letter-spacing: 1px;
    transition: 0.3s;
    position: relative;
    padding-bottom: 5px;
}

.filter-item:hover,
.filter-item.active {
    color: #F2B824;
}

.filter-item.active::after {
    content: '';
    position: absolute;
    width: 6px;
    height: 6px;
    background-color: #F2B824;
    border-radius: 50%;
    bottom: -5px;
    left: 50%;
    transform: translateX(-50%);
}

.projects-grid {
    display: grid;
    /* Smart wrapping: using auto-fill to prevent single items from stretching too wide */
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 30px;
    width: 100%;
    padding-bottom: 50px;
}

.project-card {
    width: 100%;
    background-color: #fff;
    padding: 15px;
    border-radius: 12px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
    transition: 0.3s ease;
    animation: fadeIn 0.5s ease;
    display: flex;
    flex-direction: column;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.project-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.1);
}

.card-image {
    width: 100%;
    height: 220px;
    background-color: #333;
    border-radius: 8px;
    overflow: hidden;
    position: relative;
    flex-shrink: 0;
}

.card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: 0.5s ease;
}

.project-card:hover .card-image img {
    transform: scale(1.1);
}

.overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(26, 26, 27, 0.85);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 15px;
    opacity: 0;
    transition: 0.3s ease;
}

.project-card:hover .overlay {
    opacity: 1;
}

.view-btn {
    padding: 10px 25px;
    background-color: #F2B824;
    color: #1A1A1B;
    text-decoration: none;
    font-family: 'Oswald', sans-serif;
    font-weight: 700;
    text-transform: uppercase;
    font-size: 0.85rem;
    border-radius: 30px;
    letter-spacing: 1px;
    transition: 0.2s;
}

.view-btn:hover {
    background-color: #fff;
    transform: scale(1.05);
}

.card-info {
    padding-top: 15px;
}

.card-info .category {
    font-family: 'Oswald', sans-serif;
    font-size: 0.75rem;
    color: #F2B824;
    text-transform: uppercase;
    letter-spacing: 1px;
    display: block;
    margin-bottom: 5px;
}

.card-info h3 {
    font-family: 'Montserrat', sans-serif;
    font-size: 1.15rem;
    font-weight: 700;
    color: #1A1A1B;
    margin: 0;
}

@media (max-width: 900px) {

    /* On mobile, un-fix the sidebar so we can scroll normally */
    .sidebar {
        position: relative;
        height: auto;
        width: 100%;
    }

    .sidebar-top {
        height: 250px;
    }

    .sidebar-bottom {
        flex-grow: 1;
        padding: 30px 0;
    }

    /* Reset main content margins */
    .main-content {
        margin-left: 0;
        margin-right: 0;
        width: 100%;
        padding-right: 80px;
        /* Keep room for nav bar */
    }

    .page-container {
        flex-direction: column;
    }
}

/* ==================== MOBILE RESPONSIVENESS ==================== */

/* Tablets (768px and below) */
@media (max-width: 768px) {
    .hamburger-menu {
        display: flex !important;
        flex-direction: column;
    }

    .sidebar {
        width: 100%;
        position: fixed;
        left: 0;
        top: 0;
        height: 100vh;
        transform: translateX(-100%);
        transition: transform 0.3s ease;
        z-index: 999;
    }

    .sidebar.mobile-open {
        transform: translateX(0);
    }

    .profile-circle {
        width: 120px;
        height: 120px;
    }

    .nav-links {
        gap: 20px;
    }

    .nav-links a {
        font-size: 0.95rem;
        letter-spacing: 1px;
    }

    .main-content {
        padding: 40px 20px;
        padding-top: 70px;
        margin-left: 0;
        margin-right: 0;
        width: 100%;
    }

    .section-header h1 {
        font-size: 2.5rem;
    }

    .right-nav {
        display: none;
    }

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

    .project-card {
        min-height: 200px;
    }
}

/* Mobile phones (480px and below) */
@media (max-width: 480px) {
    body {
        overflow-x: hidden;
    }

    .sidebar-top {
        height: 320px;
    }

    .sidebar-bottom {
        padding: 20px 0;
    }

    .profile-circle {
        width: 150px;
        height: 150px;
        border: 6px solid #fff;
    }

    .nav-links {
        gap: 15px;
    }

    .nav-links a {
        font-size: 1.3rem;
        padding: 8px 5px;
        letter-spacing: 0.5px;
    }

    .main-content {
        padding: 30px 15px;
        padding-top: 70px;
    }

    .section-header {
        gap: 10px;
        margin-bottom: 20px;
    }

    .section-header h1 {
        font-size: 1.8rem;
    }

    .dash {
        width: 30px;
        height: 2px;
    }

    .portfolio-filter {
        flex-wrap: wrap;
        gap: 10px;
    }

    .filter-item {
        font-size: 0.85rem;
        padding: 6px 12px;
    }

    .projects-grid {
        grid-template-columns: 1fr;
        gap: 15px;
    }

    .project-card {
        min-height: 180px;
    }
}