@import url('https://fonts.googleapis.com/css2?family=Rajdhani:wght@500;600&display=swap');

/* Body and Basic Styles */
body {
    background-color: #121212;
    color: #ffffff;
    font-family: 'Rajdhani', sans-serif;
    margin: 0;
    padding: 0;
    overflow-x: hidden; /* Prevent horizontal overflow */
    display: flex;
    flex-direction: column;
    align-items: center; /* Center everything horizontally */
    min-height: 100vh; /* Ensure body takes full viewport height */
}

/* Header */
header {
    text-align: center;
    padding: 15px 10px; /* Reduced padding for mobile */
    background: #1e1e1e;
    color: crimson;
    width: 100%; /* Full width */
    box-sizing: border-box; /* Include padding in width */
}

/* Main Content */
main {
    width: 100%;
    max-width: 1025px; /* Limit maximum width for desktop */
    padding: 20px;
    box-sizing: border-box; /* Include padding in width */
}

/* Sections */
section {
    margin: 20px 0;
    padding: 15px; /* Reduced padding for mobile */
    background: #1a1a1a;
    border-radius: 10px;
    box-sizing: border-box; /* Ensure padding is included in width */
    text-align: center; /* Center text within sections */
}

/* Headings and Paragraphs in Sections */
section h2,
section p,
section ul,
section li {
    text-align: center; /* Center all text and lists */
    margin: 10px auto; /* Add some spacing */
}

/* Lists in Sections */
section ul {
    list-style-position: inside; /* Center bullet points */
    padding-left: 0; /* Remove default padding */
}

/* Links */
a {
    color: #00ffcc;
    text-decoration: none;
}

a:hover {
    color: #009980;
}

/* Gallery Styles */
.gallery {
    display: flex;
    overflow: hidden;
    width: 100%;
    margin: auto;
    position: relative;
    flex-wrap: wrap; /* Ensure wrapping of images */
    justify-content: center; /* Center gallery items */
    gap: 10px; /* Add gap between gallery items */
    box-sizing: border-box; /* Ensure padding is included in width */
}

.gallery figure {
    position: relative;
    margin: 0;
    width: 100%;
    display: none; /* Hide all figures by default */
}

.gallery figure.active {
    display: block; /* Show the active figure */
}

.gallery img {
    width: 100%;
    border-radius: 10px; /* Add rounded corners to images */
    height: auto; /* Ensure images maintain aspect ratio */
}

.gallery figcaption {
    position: absolute;
    bottom: 10px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0, 0, 0, 0.7);
    color: #fff;
    padding: 5px 10px;
    border-radius: 5px;
    font-size: 14px;
    text-align: center;
}

/* Buttons Styles */
.gallery-buttons, .project-buttons {
    display: flex;
    justify-content: center;
    margin-top: 10px;
    gap: 10px; /* Add gap between buttons */
    flex-wrap: wrap; /* Allow buttons to wrap on smaller screens */
}

.gallery-buttons button, .project-buttons button {
    background: #00ffcc;
    border: none;
    padding: 10px 20px; /* Adjusted padding for better mobile fit */
    cursor: pointer;
    font-size: 16px;
    border-radius: 5px;
    color: #121212;
    font-weight: bold;
    transition: background 0.3s ease; /* Smooth hover transition */
    flex: 1 1 auto; /* Allow buttons to grow and shrink */
}

.gallery-buttons button:hover, .project-buttons button:hover {
    background: #009980;
}
/* ASCII Art Container */
.ascii-container {
    display: flex;
    justify-content: center; /* Center the ASCII container */
    align-items: center;
    text-align: center; /* Center text inside the container */
    width: 100%; /* Ensures container takes full width */
    padding: 0; /* Remove padding to avoid misalignment */
    margin: 0; /* Remove margin to avoid misalignment */
    box-sizing: border-box; /* Ensure padding is included in width */
    padding-right: 150px;
}

/* ASCII Art */
.ascii-art {
    font-size: 1rem;
    font-family: monospace;
    line-height: 1.2;
    white-space: pre;
    background: linear-gradient(to bottom, #ff0000, #cc0000, #990000, #660000, #330000);
    text-shadow: 2px 2px 4px #330000;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    display: block; /* Change to block for better centering */
    text-align: center; /* Center ASCII art */
    margin: 0 auto; /* Center the block horizontally */
    padding: 0; /* Remove any padding */
    width: fit-content; /* Ensure the ASCII art only takes up the space it needs */
}

/* Mobile responsiveness */
@media screen and (max-width: 480px) {
    /* Adjust header padding for mobile */
    header {
        padding: 10px;
    }

    /* Adjust main padding for mobile */
    main {
        padding: 10px;
    }

    /* Adjust section and gallery width for mobile */
    section, .gallery {
        padding: 10px; /* Reduced padding for mobile */
    }

    /* Adjust button layout for mobile */
    .gallery-buttons, .project-buttons {
        flex-direction: column;
        align-items: stretch; /* Full-width buttons */
    }

    .gallery-buttons button, .project-buttons button {
        width: 100%; /* Full-width buttons on mobile */
        margin: 5px 0; /* Adjust margin for stacked buttons */
    }

    /* Adjust ASCII art container for mobile */
    .ascii-container {
        padding: 0 5px; /* Further reduced padding for mobile */
        padding-right: 50px;
    }

    /* Adjust ASCII art font size for mobile */
    .ascii-art {
        font-size: 0.3rem; /* Smaller font size for mobile */
        white-space: pre-wrap; /* Allow ASCII art to wrap on mobile */
    }
}