/* 1. Import font */
@font-face {
    font-family: 'Bitstream Vera Sans Mono';
    src: url('../../fonts/VeraMono-regular.ttf') format('truetype');
    font-weight: 400;
    font-style: normal;
}

@font-face {
    font-family: 'Bitstream Vera Sans Mono';
    src: url('../../fonts/VeraMono-Bold.ttf') format('truetype');
    font-weight: 700;
    font-style: normal;
}

/* ==========================================================================
 * 1. Global Reset & Base Styles
 * ========================================================================== */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    background-image: linear-gradient(rgba(0, 0, 0, 0.5), rgba(0, 0, 0, 0.5)), url('../../Pictures/ProjectBg.jpg');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    background-attachment: fixed;

    font-family: 'Bitstream Vera Sans Mono', monospace;
    line-height: 1.6;
    background-color: #f4f7f6;
    color: #333333;

    display: flex;
    flex-direction: column;
    align-items: center;
    min-height: 100vh;
    padding: 40px 20px;
}

/* ==========================================================================
 * 2. Header & Navigation
 * ========================================================================== */
header {
    background-color: rgba(255, 255, 255, 0.8);
    padding: 16px 20px;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    display: inline-block;
    width: 100%;
    max-width: 650px; /* Mobile base width */
    margin-bottom: 24px;
    text-align: center;
    position: relative;
}

header h1 {
    font-size: 2.2rem;
    color: #1a202c;
    margin-bottom: 12px;
}

.lang-btn {
    /* Desktop default: absolute, top-left of the header */
    position: absolute;
    top: 10px;
    left: 10px;
    display: inline-block;
    background-color: #007bff;
    color: #ffffff;
    padding: 6px 12px;
    border-radius: 4px;
    text-decoration: none;
    font-size: 14px;
    font-weight: bold;
}

nav {
    font-size: 1rem;
    font-weight: normal;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 12px 20px;
}

nav a {
    color: #4a5568;
    text-decoration: none;
    font-weight: 600;
    padding: 6px 16px;
    border-radius: 6px;
    transition: all 0.2s ease-in-out;
}

nav a:hover {
    background-color: #e2e8f0;
    color: #2b6cb0;
}

/* ==========================================================================
 * 3. Projects Main Section
 * ========================================================================== */
.projects-main {
    width: 100%;
    max-width: 650px; /* Mobile base width */
    background-color: rgba(255, 255, 255, 0.7);
    padding: 32px;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    margin-bottom: 24px;
}

.projects-main h2 {
    font-size: 1.5rem;
    color: #2d3748;
    margin-bottom: 12px;
    border-bottom: 2px solid #edf2f7;
    padding-bottom: 8px;
}

.projects-intro {
    color: #4a5568;
    font-size: 1.05rem;
    margin-bottom: 20px;
}

/* ==========================================================================
 * 4. Project Cards Base (Mobile First: Photo top, Text bottom)
 * ========================================================================== */
.project-list {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.project-card {
    background-color: rgba(255, 255, 255, 0.55);
    border-radius: 10px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    padding: 20px;
    display: flex;
    flex-direction: column; /* Ensure image is always on top for mobile */
    gap: 16px;
    position: relative;
}
/* for the BSNL card where the whole card is a link to other website*/
/* Make the invisible link cover the whole card */
.card-stretched-link {
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
    z-index: 1;
}

/* Custom Link Style */
.link-display {
    color: #007bff;                  /* Standard primary link blue */
    text-decoration: underline;      /* Keeps the text underlined */
    cursor: pointer;                 /* Ensures pointer cursor on hover */
    transition: all 0.25s ease-in-out;/* Smooth animation for the glow */
}


.project-photo {
    width: 100%;
    height: auto;
    display: block;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.12);
    object-fit: cover;
}

.project-title {
    font-size: 1.25rem;
    color: #2d3748;
    margin-bottom: 8px;
}

.project-desc {
    color: #4a5568;
    font-size: 1rem;
}

/* ==========================================================================
 * 5. Mobile-only fixes (max-width: 699px)
 * ========================================================================== */
@media (max-width: 699px) {
    header {
        padding-top: 16px;
    }

    .lang-btn {
        position: static;
        display: inline-block;
        margin: 0 0 10px 0;
    }

    nav a {
        padding: 6px 12px;
    }
}

/* ==========================================================================
 * 6. Desktop Layout: ~95% screen width, larger images, centered vertically
 * ========================================================================== */
@media (min-width: 700px) {
    header,
    footer {
        width: 95%;
        max-width: 1400px;
    }

    .projects-main {
        width: 95%;
        max-width: 1400px;
    }

    .project-card {
        align-items: center; /* Vertically centers image and text relative to each other */
        gap: 32px;
    }

    /* Alternating row layout on desktop */
    .project-card:nth-child(odd) {
        flex-direction: row-reverse; /* Text left, Photo right */
    }

    .project-card:nth-child(even) {
        flex-direction: row; /* Photo left, Text right */
    }

    .project-photo {
        width: 40%; /* Substantially larger picture taking up 40% of the card width */
        max-width: 450px;
        flex-shrink: 0;
    }

    .project-text {
        flex: 1;
    }
}

/* ==========================================================================
 * 7. Footer
 * ========================================================================== */
footer {
    width: 100%;
    max-width: 650px; /* Mobile base width */
    margin-top: 24px;
    padding: 16px;
    background-color: rgba(255, 255, 255, 0.8);
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    text-align: center;
}

footer p {
    color: #4a5568;
    font-size: 0.9rem;
}
