html {
    height: 100%;
}

body {
    margin: 0;
    padding: 0;
    overflow-x: hidden;
    background: #000 !important;
    font-family: 'Courier New', Courier, monospace;
    height: 100%;
}

#asciiCanvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
}

#content {
    position: relative;
    z-index: 1;
    display: flex;
    justify-content: center;
    min-height: 100vh;
}

.content-pane {
    background: rgba(0, 0, 0, 0.6);
    width: 70%;
    min-height: 100vh;
    padding: 40px;
    color: white;
    text-align: center;
    overflow-y: auto;
    box-sizing: border-box;
    border-left: 1px solid rgba(255, 255, 255, 0.2);
    border-right: 1px solid rgba(255, 255, 255, 0.2);
}

.content-pane h1, .content-pane h2 {
    margin: 0 0 30px 0;
}

.content-pane p {
    margin: 0 0 15px 0;
    line-height: 1.6;
}

.profile-container {
    display: flex;
    align-items: stretch;
    gap: 20px;
    max-width: 800px;
    margin: 0 auto;
}

.profile-image {
    width: 150px;
    height: 100%;
    object-fit: cover;
    border-radius: 10px;
}

.profile-text {
    flex: 1;
    text-align: left;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.ballistic-demo {
    margin-top: 40px;
    margin-bottom: 40px;
}

.ballistic-demo iframe {
    width: 75%;
    aspect-ratio: 16 / 9;
    border: none;
    display: block;
    margin: 0 auto;
}

li {
    padding: 5px;
}

a {
    text-decoration: none;
    color: white;
}

a:visited {
    color: white;
}

.icon {
    text-decoration: none;
    margin-right: 0;
    padding-right: 0;
}

/* === Project Sections Styling === */
.project-sections-container {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 2rem;
    margin-top: 1rem;
    margin-bottom: 1rem;
}

@media (max-width: 1000px) {
    .project-sections-container {
        grid-template-columns: 1fr;
    }
}

.project-section {
    max-width: 100%;
    box-sizing: border-box;
    border: 2px whitesmoke solid;
    border-radius: 12px;
    padding: 1rem;
    margin-bottom: 2rem;
    width: 100%;
    margin-inline: auto;
    background: rgba(0, 0, 0, 0.6);
    position: relative;
}

.project-logo {
    position: absolute;
    top: 10px;
    right: 10px;
    width: 80px;
    height: 40px;
    object-fit: contain;
    z-index: 10;
}

.project-logo--invert {
    filter: invert(1);
}

.project-title {
    text-align: left;
    font-size: 1.5rem;
    font-family: 'Courier New', Courier, monospace;
    font-weight: bold;
}

.project-desc {
    text-align: left;
    font-family: 'Courier New', Courier, monospace;
    font-size: 1rem;
    margin-bottom: 0.75rem;
    color: #ccc;
}

.carousel {
    display: flex;
    flex-direction: column;
    overflow: hidden;
    position: relative;
    border-radius: 8px;
    margin-bottom: 0.75rem;
    height: 440px;
    max-width: 100%;
}

.carousel-container {
    display: flex;
    flex-wrap: nowrap;
    width: 100%;
    overflow: hidden;
    height: 400px;
    transition: transform 0.5s ease;
}

.carousel img,
.carousel video {
    max-width: 100%;
    width: 100%;
    height: 100%;
    object-fit: contain;
    flex-shrink: 0;
    transition: transform 0.5s ease;
}

.carousel-dots {
    display: flex;
    justify-content: center;
    gap: 12px;
    padding: 10px 0;
    z-index: 10;
}

.carousel-dot {
    width: 8px;
    height: 8px;
    background: #888;
    border-radius: 50%;
    cursor: pointer;
    transition: background 0.3s ease;
}

.carousel-dot.active {
    background: white;
}

.carousel-dot:hover {
    background: papayawhip;
}

.tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
}

.tag {
    font-family: 'Courier New', Courier, monospace;
    background: #333b5e;
    padding: 0.3rem 0.6rem;
    border-radius: 16px;
    font-size: 1rem;
    font-weight: bold;
}

.tag:hover {
    cursor: default;
    transform: scale(1.1);
}

@media (max-width: 768px) {
    .content-pane {
        width: 95%;
        padding: 20px; /* Less padding so content has room to breathe */
    }

    /* 2. Stack the profile image and text vertically */
    .profile-container {
        flex-direction: column;
        align-items: center;
    }

    .profile-text {
        text-align: center; /* Centers the "About Me" text */
    }

    /* 3. Make the Ballistic Demo take up the full available width */
    .ballistic-demo iframe {
        width: 100%;
    }

    /* 4. Fix the weirdly sized project boxes by reducing carousel height */
    .carousel {
        height: auto;
        margin-bottom: 1rem;
    }

    .carousel-container {
        height: 250px; /* Prevents the boxes from being awkwardly tall on mobile */
    }

    /* 5. Center project titles, descriptions, and tags for a cleaner mobile UI */
    .project-title, .project-desc {
        text-align: center;
    }

    .tags {
        justify-content: center;
    }
}