/* --- Basic Reset & Body Styles --- */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: 'Source Sans Pro', sans-serif;
    line-height: 1.6;
    background-image: url('seattle-background-8bit.png');
    background-size: cover;
    background-position: center center;
    background-repeat: no-repeat;
    background-attachment: fixed;
    color: #f0f0f0;
    padding-top: 80px;
}

.container {
    max-width: 960px;
    margin: auto;
    overflow: visible;
    padding: 0 20px;
}

/* --- Header & Navigation --- */
header {
    background: #333;
    color: #fff;
    padding: 10px 0;
    margin-bottom: 30px;
}

.header-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 20px;
    flex-wrap: wrap;
}

.back-to-game-btn,
.nav-btn {
    display: inline-block;
    font-family: 'Press Start 2P', cursive;
    font-size: 0.7rem;
    background-color: #f0f0f0;
    color: #333;
    padding: 10px 15px;
    text-decoration: none;
    border: 3px solid #333;
    box-shadow: 4px 4px 0 #000;
    transition: all 0.1s ease;
}

.back-to-game-btn:hover,
.nav-btn:hover {
    background-color: #ddd;
}

.back-to-game-btn:active,
.nav-btn:active {
    box-shadow: 2px 2px 0px #000;
    transform: translate(2px, 2px);
}

.header-buttons {
    display: flex;
    gap: 15px;
}

.header-title {
    text-align: left;
}

header h1 {
    font-family: 'Press Start 2P', cursive;
    margin-bottom: 0;
    font-size: 1.8rem;
    line-height: 1.2;
}

header p,
header .header-title p {
    font-size: 0.9rem;
    color: #ccc;
    margin-top: 2px;
    line-height: 1.3;
}

.header-social-links {
    display: flex;
    align-items: center;
    gap: 15px;
}

.header-icon {
    height: 70px;
    width: auto;
    display: block;
}

.header-social-links a {
    color: #fff;
    font-size: 3.6rem;
    text-decoration: none;
    transition: color 0.3s ease;
    display: inline-flex;
    align-items: center;
}

.header-social-links a:hover {
    color: #ccc;
}

nav {
    background: #444;
    position: fixed;
    top: 0;
    width: 100%;
    z-index: 1000;
    padding: 10px 0;
}

nav ul {
    list-style: none;
    text-align: center;
}

nav ul li {
    display: inline;
    margin: 0 15px;
}

nav ul li a {
    color: #fff;
    text-decoration: none;
    font-weight: bold;
    transition: color 0.3s ease;
}

nav ul li a:hover {
    color: #964B00;
}

/* --- Section Styling --- */
section {
    padding: 40px 0;
    margin-bottom: 30px;
    background: rgba(255, 255, 255, 0.95);
    color: #333;
    border-radius: 5px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

section h2 {
    font-family: 'Press Start 2P', cursive;
    text-align: center;
    margin-bottom: 30px;
    font-size: 1.5rem;
    color: #333;
}

.section-body-padded {
    padding-left: 40px;
    padding-right: 40px;
}

section p {
    margin-bottom: 1em;
}

section a {
    color: #0066cc;
}

section a:hover {
    color: #004c99;
}

/* --- Content Typographies --- */
.text-content h2 {
    font-family: 'Press Start 2P', cursive;
    font-size: 1.2rem;
    margin-top: 30px;
    margin-bottom: 15px;
    color: #333;
    text-align: left;
}

.text-content h2:first-child {
    margin-top: 0;
}

.text-content p {
    margin-bottom: 1.5em;
    font-size: 1.1rem;
}

.text-content ul {
    margin-bottom: 1.5em;
    padding-left: 20px;
    font-size: 1.1rem;
}

.text-content li {
    margin-bottom: 0.5em;
}

/* --- Specific Section Layouts --- */
#about .about-content {
    display: flex;
    align-items: flex-start;
    gap: 30px;
}

#about .text-content {
    flex: 2;
}

#about .image-content {
    flex: 1;
    text-align: center;
}

#about .image-content img {
    max-width: 100%;
    height: auto;
    border-radius: 5px;
}

#about h3 {
    font-size: 1rem;
    font-weight: normal;
    margin: 10px 0;
    font-style: italic;
    color: #555;
}

.hero-image {
    width: auto;
    max-width: 100%;
    max-height: 300px;
    display: block;
    margin: 0 auto 30px auto;
    border: 4px solid #333;
    box-shadow: 5px 5px 0 #000;
}

/* --- Carousel Styles --- */
#portfolio-carousel {
    position: relative;
    max-width: 750px;
    margin: 20px auto;
    overflow: hidden;
    background: #f9f9f9;
    border: 2px solid #ddd;
    border-radius: 5px;
}

.carousel-slide {
    display: none;
    box-sizing: border-box;
    text-decoration: none;
    color: inherit;
    padding: 40px;
    transition: background 0.3s;
}

.carousel-slide.active {
    display: block;
    animation: fadeIn 0.5s ease-in-out;
}

.carousel-slide:hover {
    background: #efefef;
}

.carousel-slide img {
    width: auto;
    max-width: 100%;
    max-height: 250px;
    display: block;
    margin: 0 auto 20px auto;
    border: 4px solid #333;
    box-shadow: 5px 5px 0 #000;
}

.slide-caption {
    text-align: center;
}

.slide-caption h3 {
    font-family: 'Press Start 2P', cursive;
    font-size: 1.1rem;
    margin-bottom: 10px;
}

.prev-slide,
.next-slide {
    cursor: pointer;
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: auto;
    padding: 16px;
    color: white;
    font-weight: bold;
    font-size: 24px;
    background-color: rgba(0, 0, 0, 0.5);
    border: none;
    user-select: none;
    z-index: 10;
}

.next-slide {
    right: 0;
    border-radius: 3px 0 0 3px;
}

.prev-slide {
    left: 0;
    border-radius: 0 3px 3px 0;
}

.prev-slide:hover,
.next-slide:hover {
    background-color: rgba(0, 0, 0, 0.8);
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

#tutorial .section-body-padded {
    display: flex;
    align-items: flex-start;
    gap: 30px;
    padding-left: 0;
    padding-right: 0;
}

#tutorial .character-image-container {
    flex-shrink: 0;
    padding-left: 40px;
}

#tutorial .character-image-container img {
    max-width: 200px;
    height: auto;
    display: block;
}

#tutorial .text-content {
    flex: 1;
    padding-right: 40px;
}

/* --- Footer --- */
footer {
    text-align: center;
    margin-top: 40px;
    padding: 20px;
    background: #333;
    color: #fff;
    font-size: 0.9em;
}

/* --- Responsive Design --- */
@media (max-width: 768px) {
    body {
        padding-top: 0;
    }

    nav {
        position: static;
    }

    nav ul li {
        display: block;
        margin: 10px 0;
    }

    #about .about-content {
        flex-direction: column;
    }

    header h1 {
        font-size: 1.5rem;
    }

    section h2 {
        font-size: 1.3rem;
    }

    .section-body-padded:not(#tutorial .section-body-padded) {
        padding-left: 20px;
        padding-right: 20px;
    }

    #tutorial .section-body-padded {
        flex-direction: column;
        align-items: center;
        gap: 20px;
        padding-left: 20px;
        padding-right: 20px;
    }

    #tutorial .character-image-container {
        padding-left: 0;
        margin-bottom: 20px;
    }

    #tutorial .text-content {
        padding-right: 0;
        padding-left: 20px;
        padding-right: 20px;
    }

    .header-container {
        gap: 15px;
        flex-direction: column;
        text-align: center;
    }

    .header-icon {
        height: 50px;
    }

    .header-social-links a {
        font-size: 2.5rem;
    }
}

@media (max-width: 600px) {
    .header-social-links {
        justify-content: center;
    }
}

@media (max-width: 480px) {
    .section-body-padded:not(#tutorial .section-body-padded) {
        padding-left: 10px;
        padding-right: 10px;
    }

    #tutorial .text-content {
        padding-left: 10px;
        padding-right: 10px;
    }

    header h1 {
        font-size: 1.3rem;
    }

    .header-icon {
        height: 40px;
    }

    .header-social-links a {
        font-size: 2rem;
    }

    section h2 {
        font-size: 1.1rem;
    }
}