* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Courier New', Courier, monospace;
}

body {
    background: linear-gradient(135deg, #242731, #2C2E33);
    color: #E0E0E0;
    transition: background 0.3s ease, color 0.3s ease;
}

/* NAVIGATION BAR */
.navbar {
    background-color: #3E424B;
    padding: 1em;
    text-align: center;
    box-shadow: 0 2px 5px rgba(0,0,0,0.4);
    position: sticky;
    top: 0;
    z-index: 10;
}

.navbar ul {
    list-style: none;
    display: flex;
    justify-content: center;
    gap: 2em;
}

.navbar a {
    text-decoration: none;
    color: #E0E0E0;
    font-weight: bold;
    transition: color 0.3s, transform 0.3s;
}

.navbar a:hover {
    color: #8678C2;
    transform: scale(1.1);
}

.navbar a.active {
    border-bottom: 2px solid #8678C2;
}

/* PAGE SECTIONS */
main {
    padding: 2em;
    min-height: 80vh;
}

.page {
    display: none;
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.5s ease, transform 0.5s ease;
}

.page.active {
    display: block;
    opacity: 1;
    transform: translateY(0);
}

/* HOME PAGE */
.home-content {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 2em;
    flex-wrap: wrap;
    animation: fadeIn 0.8s ease forwards;
}

/* HOME PAGE IMAGE */
.image-placeholder {
    width: 200px;
    height: 200px;
    background-color: #34373D;
    border-radius: 20px;
    overflow: hidden; /* Ensures image stays inside bounds */
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.3s, box-shadow 0.3s;
}

.image-placeholder img.home-image {
    width: 100%;
    height: 100%;
    object-fit: cover; /* Keeps correct proportions while filling box */
    border-radius: 20px;
    transition: transform 0.3s, box-shadow 0.3s;
}

.image-placeholder:hover img.home-image {
    transform: scale(1.05);
    box-shadow: 0 0 15px rgba(134, 120, 194, 0.6);
}

/* ABOUT PAGE */
#about {
    text-align: center;
    animation: fadeIn 0.8s ease forwards;
}

#about h2 {
    margin-bottom: 1em;
    color: #ffffff;
}

.about-text {
    max-width: 700px;
    margin: 0 auto 2em auto;
    font-size: 1.1em;
    line-height: 1.6;
    color: #D5D5D5;
}

.about-images {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 2em;
    flex-wrap: wrap;
}

.about-images .image-placeholder.small {
    width: 250px;
    height: 250px;
    background-color: #3A3D44;
    border-radius: 15px;
    opacity: 0;
    animation: slideUp 0.8s ease forwards;
}



.about-images .image-placeholder.small:hover {
    transform: scale(1.05);
    box-shadow: 0 0 15px rgba(134, 120, 194, 0.6);
}

/* PROJECTS PAGE */
#projects {
    text-align: center;
    animation: fadeIn 0.8s ease forwards;
}

.projects-grid {
    display: flex;
    gap: 2em;
    justify-content: center;
    flex-wrap: wrap;
    margin-top: 2em;
}

.project-card {
    text-align: center;
    background: #34373D;
    border-radius: 15px;
    padding: 1em;
    width: 200px;
    opacity: 0;
    transform: translateY(40px);
    animation: slideUp 0.8s ease forwards;
    transition: transform 0.3s, box-shadow 0.3s;
}

.project-card:hover {
    transform: scale(1.05);
    box-shadow: 0 0 15px rgba(134, 120, 194, 0.6);
}

/* RESTORED PROJECT IMAGE PLACEHOLDERS */
.project-card .image-placeholder {
    width: 100%;
    height: 150px;
    background-color: #34373D;
    border-radius: 15px;
    margin-bottom: 0.8em;
    transition: transform 0.3s, box-shadow 0.3s;
}

.project-card .image-placeholder:hover {
    transform: scale(1.05);
    box-shadow: 0 0 15px rgba(134, 120, 194, 0.6);
}

/* PROJECT DETAILS IMPROVEMENTS */
.project-card h3 {
    color: #C8BBFF;
    margin-top: 0.5em;
    font-size: 1.3em;
}

.project-card p {
    font-size: 0.95em;
    line-height: 1.5;
    color: #D5D5D5;
    margin-top: 0.5em;
}

.download-link {
    display: inline-block;
    margin-top: 0.5em;
    text-decoration: none;
    color: #A89BD4;
    font-weight: bold;
    transition: color 0.3s;
}

.download-link:hover {
    color: #C8BBFF;
}

/* CONTACT PAGE */
#contact {
    animation: fadeIn 0.8s ease forwards;
    text-align: center;
}

.button-group {
    display: flex;
    gap: 1em;
    justify-content: center;
    margin-top: 1.5em;
}

.contact-btn {
    background-color: #1a1a1a;
    border: none;
    border-radius: 10px;
    padding: 0.8em 1.5em;
    font-size: 1em;
    cursor: pointer;
    color: #EAEAEA;
    text-align: center;
    transition: background 0.3s, transform 0.3s, box-shadow 0.3s;
}

.contact-btn:hover {
    background-color: #333333;
    transform: scale(1.05);
    box-shadow: 0 0 10px rgba(26, 26, 26, 0.6);
}

/* LOADING SCREEN */
#loading-screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: #1a1a1a;
    color: #EAEAEA;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    font-family: 'Courier New', Courier, monospace;
    text-align: center;
}

#loading-screen .spinner {
    border: 5px solid #333333;
    border-top: 5px solid #8678C2;
    border-radius: 50%;
    width: 60px;
    height: 60px;
    animation: spin 1s linear infinite;
    margin-bottom: 1em;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

#loading-screen.fade-out {
    opacity: 0;
    transition: opacity 0.5s ease;
    pointer-events: none;
}

/* UNIVERSAL ANIMATIONS */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes slideUp {
    from { opacity: 0; transform: translateY(40px); }
    to { opacity: 1; transform: translateY(0); }
}

/* === FULLSCREEN IMAGE POPUP === */
#image-popup {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(20, 20, 20, 0.9);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

#image-popup.active {
    opacity: 1;
    pointer-events: all;
}

#image-popup img {
    max-width: 90%;
    max-height: 85%;
    border-radius: 15px;
    box-shadow: 0 0 30px rgba(134, 120, 194, 0.6);
    transform: scale(0.8);
    transition: transform 0.3s ease;
}

#image-popup.active img {
    transform: scale(1);
}

/* Close hint (click anywhere to close) */
#image-popup::after {
    content: "Click anywhere to close";
    position: absolute;
    bottom: 25px;
    color: #C8BBFF;
    font-size: 0.9em;
    font-family: 'Courier New', Courier, monospace;
    opacity: 0.8;
}

/* === HORIZONTAL PROJECT LAYOUT === */
.projects-grid {
    display: flex;
    flex-direction: column;
    gap: 3em;
    align-items: center;
    margin-top: 2em;
}

.project-card.horizontal {
    display: flex;
    align-items: center;
    justify-content: center;
    background: #34373D;
    border-radius: 15px;
    padding: 1.5em;
    width: 80%;
    max-width: 900px;
    gap: 2em;
    text-align: left;
    opacity: 0;
    transform: translateY(40px);
    animation: slideUp 0.8s ease forwards;
    transition: transform 0.3s, box-shadow 0.3s;
}

.project-card.horizontal.reverse {
    flex-direction: row-reverse; /* Flip layout for DIO’s World */
}

.project-card.horizontal:hover {
    transform: scale(1.02);
    box-shadow: 0 0 15px rgba(134, 120, 194, 0.6);
}

.project-card.horizontal .image-placeholder {
    flex: 0 0 300px;
    height: 200px;
    border-radius: 15px;
    overflow: hidden;
}

.project-card.horizontal .project-info {
    flex: 1;
}

.project-card.horizontal h3 {
    color: #C8BBFF;
    font-size: 1.5em;
    margin-bottom: 0.5em;
}

.project-card.horizontal p {
    color: #D5D5D5;
    font-size: 1em;
    line-height: 1.6;
}

/* Responsive adjustment for smaller screens */
@media (max-width: 768px) {
    .project-card.horizontal,
    .project-card.horizontal.reverse {
        flex-direction: column;
        text-align: center;
    }

    .project-card.horizontal .image-placeholder {
        width: 100%;
        height: 200px;
    }

    .project-card.horizontal .project-info {
        text-align: center;
    }
}

