/* =========================================================
   Page Title & Section Titles
   ========================================================= */

/* Main page title
   Centered with decorative underline animation */
/* page-title removed - replaced by unified-page-title */

.section-title {
    font-size: 32px;
    font-weight: 600;
    margin-top: 40px;
    margin-bottom: 20px;
    color: var(--white-color);
    display: flex;
    align-items: center;
    gap: 15px;
    scroll-margin-top: 180px;
    /* Offset for sticky navbar + section nav */
}

.featured-title {
    color: var(--white-color);
}

.section-divider {
    border: 0;
    height: 1px;
    background: rgba(255, 255, 255, 0.1);
    margin: 30px 0;
}

/* =========================================================
   Grid Layouts
   ========================================================= */

.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 30px;
}

/* Featured grid
   Slightly larger minimum width for emphasis */
.featured-grid {
    grid-template-columns: repeat(auto-fill, minmax(380px, 1fr));
}

/* =========================================================
   Card Styling
   ========================================================= */

.project-card {
    background-color: var(--secondary-color);
    border-radius: 15px;
    overflow: hidden;
    transition: background-color 0.3s ease, border-color 0.3s ease;
    display: flex;
    flex-direction: column;
    border: 1px solid rgba(255, 255, 255, 0.05);
    position: relative;
}

/* Featured card variant with elevated shadow */
.featured-card {
    border: 1px solid rgba(255, 255, 255, 0.2);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
}

.project-card:hover {
    border-color: rgba(255, 255, 255, 0.3);
    background-color: #2a2a2a;
}

.featured-card:hover {
    border-color: rgba(255, 255, 255, 0.5);
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.3);
}

/* =========================================================
   Image Section
   ========================================================= */

.project-image-container {
    width: 100%;
    aspect-ratio: 16/11;
    overflow: hidden;
    position: relative;
    background-color: #000;
}

/* Project image
   Grayscale by default, full color on hover */
.project-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: filter 0.6s ease;
    filter: grayscale(100%) brightness(0.9);
}

.project-card:hover .project-image {
    filter: grayscale(0%) brightness(1);
}

/* Live status badge */
.live-badge {
    position: absolute;
    top: 15px;
    left: 15px;
    background-color: rgba(0, 0, 0, 0.8);
    color: var(--white-color);
    border: 1px solid rgba(255, 255, 255, 0.5);
    padding: 6px 12px;
    border-radius: 6px;
    font-weight: 700;
    font-size: 0.75rem;
    z-index: 10;
    letter-spacing: 1px;
    backdrop-filter: blur(4px);
}


/* =========================================================
   Content Section
   ========================================================= */

.project-content {
    padding: 25px;
    flex: 1;
    display: flex;
    flex-direction: column;
}

/* Domain/Direction badge */
.project-domain-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 12px;
    background: rgba(255, 255, 255, 0.05);
    padding: 6px 12px;
    border-radius: 8px;
    align-self: flex-start;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.domain-icon {
    font-size: 0.9rem;
    color: var(--white-color);
    opacity: 0.9;
}

.domain-text {
    color: var(--secondary-white-color);
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}


.project-title {
    font-size: 1.5rem;
    margin-bottom: 12px;
    color: var(--white-color);
    line-height: 1.3;
}

.project-description {
    font-size: 1.05rem;
    color: var(--secondary-white-color);
    margin-bottom: 25px;
    line-height: 1.6;
    flex-grow: 1;
    opacity: 0.9;
}

/* =========================================================
   Tech Stack Section
   ========================================================= */

.tech-stack-section {
    margin-top: auto;
    padding-top: 15px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.tech-section-label {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: rgba(255, 255, 255, 0.4);
    margin-bottom: 10px;
    display: block;
}

.project-tech-stack {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 20px;
}

.tech-badge {
    font-size: 0.85rem;
    color: var(--secondary-white-color);
    border: 1px solid rgba(255, 255, 255, 0.15);
    padding: 4px 10px;
    border-radius: 6px;
    background-color: transparent;
    transition: all 0.3s ease;
}

.project-card:hover .tech-badge {
    border-color: rgba(255, 255, 255, 0.3);
    background-color: rgba(255, 255, 255, 0.05);
}

/* Links - Handled by Global Standard Buttons */
.project-links {
    display: flex;
    gap: 15px;
}

/* =========================================================
   Responsive Adjustments
   ========================================================= */

@media (max-width: 768px) {

    .projects-grid,
    .featured-grid {
        grid-template-columns: 1fr;
        padding: 0 10px;
    }

    .page-title {
        font-size: var(--mobile-font-h1);
        margin-bottom: 30px;
    }

    .section-title {
        font-size: 24px;
        margin-top: 40px;
        margin-left: 10px;
        margin-right: 10px;
    }

    .project-title {
        font-size: 1.3rem;
    }

    .project-description {
        font-size: var(--mobile-font-p);
    }
}

/* =========================================================
   Layout Structure
   ========================================================= */

/* =========================================================
   Horizontal Navigation (Static)
   ========================================================= */

.section-nav {
    position: relative;
    /* Scrolls normally with page */
    z-index: 100;
    margin: 0 auto 40px auto;
    width: 100%;
    /* frosted glass effect */
    background: rgba(31, 32, 32, 0.85);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    padding: 15px 0;
}

/* Ensure full width background but contained content */
.section-nav::before {
    content: "";
    /* This approach might be tricky with centered container, 
                    let's just rely on the bar itself being full width if placed outside container
                    OR if inside main-container, we can use negative margins.
                    The current python structure puts it inside 'main-container' (max-width 1200px approx).
                    If we want the BAR to stretch full screen, we need negative margins.
                 */
}

/* To make the background stretch full screen while keeping content aligned, 
   we can use the negative margin hack if it's inside a container */
.section-nav {
    width: 100vw;
    margin-left: calc(-50vw + 50%);
    margin-right: calc(-50vw + 50%);
}

.nav-list {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 8px;
    /* Reduced from 30px to fit on one line */
    padding: 0 10px;
    margin: 0 auto;
    max-width: 1200px;
    list-style: none;
}

.nav-item-link {
    color: var(--secondary-white-color);
    font-family: "Roboto", sans-serif;
    font-size: 0.9rem;
    font-weight: 500;
    position: relative;
    padding: 8px 12px;
    /* Reduced horizontal padding */
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 6px;
    /* Matches Global .std-button */
    transition: all 0.2s ease;
    opacity: 1;
    white-space: nowrap;
    text-decoration: none;
    letter-spacing: 0.5px;
}

/* Hover/Active State - Matches .std-button-secondary:hover */
.nav-item-link:hover {
    color: var(--white-color);
    border-color: var(--white-color);
    background-color: rgba(255, 255, 255, 0.05);
    transform: none;
}

/* Removed complex animations (::after sliding underline) */

/* =========================================================
   Layout Adjustments
   ========================================================= */

.projects-main-content {
    /* No special grid needed anymore */
    width: 100%;
}

/* =========================================================
   Responsive Adjustments (Mobile)
   ========================================================= */

@media (max-width: 900px) {
    .section-nav {
        /* No top needed since it is static */
        padding: 12px 0;
    }

    .nav-list {
        justify-content: flex-start;
        flex-wrap: nowrap;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        gap: 15px;
        padding: 0 20px;

        /* Hide Scrollbar */
        scrollbar-width: none;
        -ms-overflow-style: none;
    }

    .nav-list::-webkit-scrollbar {
        display: none;
    }

    /* .nav-item-link styling is now global/unified, no specific mobile overrides needed 
       unless for touch target sizing, but base padding 8px 18px is good. */

    .nav-item-link:hover {
        /* Ensure hover doesn't get weird on touch, keeping it simple */
        background: rgba(255, 255, 255, 0.15);
        border-color: rgba(255, 255, 255, 0.3);
    }
}