/* Base Styles */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: "Courier New", monospace;
    background-color: var(--bg-primary);
    background-image: url('../oldschool-gifs/backgrounds/light/retro-tropical.gif');
    background-attachment: fixed;
    background-repeat: no-repeat;
    background-size: 100% 100%;
    background-position: center;
    image-rendering: pixelated;
    color: var(--text-primary);
    line-height: 1.6;
    transition: background-color 0.3s ease, color 0.3s ease;
    overflow-y: scroll;
}

/* Hide scrollbar while maintaining scroll functionality */
::-webkit-scrollbar {
    display: none;
}

html {
    -ms-overflow-style: none;  /* Internet Explorer 10+ */
    scrollbar-width: none;  /* Firefox */
}

.markdown-content{
    line-height: 1.6;
}

.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 20px;
    display: grid;
    grid-template-columns: 1fr 3fr 1fr;
    gap: 20px;
    grid-template-areas:
        "marquee marquee marquee"
        "header header header"
        "leftbar main rightbar";
}

.marquee-container {
    grid-area: marquee;
}

header {
    grid-area: header;
}

main {
    grid-area: main;
}


/* Base typography */
h1 {
    font-size: 2.5em;
    text-transform: lowercase;
    margin-bottom: 10px;
    letter-spacing: 2px;
}

h2 {
    font-size: 1.8em;
    margin-bottom: 20px;
    text-transform: lowercase;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 10px;
    transition: border-color 0.3s ease, color 0.3s ease;
}

/* Section Header with Icons */
.section-header {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
    margin-bottom: 20px;
}

.section-header h2 {
    margin-bottom: 0;
    border-bottom: none;
    padding-bottom: 0;
    text-align: center;
}

.header-icon {
    width: 40px;
    height: 40px;
    image-rendering: pixelated;
}

.header-icon-left {
    animation: icon-spin-left 3s linear infinite, icon-bounce 2s ease-in-out infinite;
}

.header-icon-right {
    animation: icon-spin-right 3s linear infinite, icon-bounce 2s ease-in-out infinite;
    animation-delay: 0s, 1s;
}

@keyframes icon-spin-left {
    0% { transform: rotate(0deg) scale(1); }
    50% { transform: rotate(180deg) scale(1.2); }
    100% { transform: rotate(360deg) scale(1); }
}

@keyframes icon-spin-right {
    0% { transform: rotate(360deg) scale(1); }
    50% { transform: rotate(180deg) scale(1.2); }
    100% { transform: rotate(0deg) scale(1); }
}

@keyframes icon-bounce {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-10px); }
}

p {
    margin-bottom: 15px;
    font-size: 1.1em;
}

/* Base section styling */
section {
    margin-bottom: 40px;
    padding: 30px;
    border: 2px solid var(--border-color);
    background-color: var(--bg-secondary);
    transition: border-color 0.3s ease, background-color 0.3s ease;
}

section.contact{
    margin-bottom: 40px;
    padding: 30px;
    border: 0 solid transparent;
    background-color: transparent;
    transition: border-color 0.3s ease, background-color 0.3s ease;
}

section.gallery{
    margin-bottom: 40px;
    padding: 30px;
    transition: border-color 0.3s ease, background-color 0.3s ease;
}

/* Base header styling */
header {
    text-align: center;
    margin-bottom: 40px;
    padding: 30px 100px;
    border: 2px solid var(--border-color);
    background-color: var(--bg-secondary);
    transition: border-color 0.3s ease, background-color 0.3s ease;
    position: relative;
    overflow: visible;
}

/* Header character images */
.header-character {
    position: absolute;
    width: 90px;
    height: auto;
    image-rendering: pixelated;
    animation: bounce-character 2s ease-in-out infinite;
}

.header-top {
    top: 80px;
}

.header-bottom {
    bottom: 15px;
}

.header-left {
    left: 15px;
}

.header-right {
    right: 15px;
}

@keyframes bounce-character {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-10px); }
}


/* Retro text base class */
.retro-text {
    text-shadow: 1px 1px 0px rgba(0,0,0,0.3);
    letter-spacing: 1px;
    text-align: center;
    font-family: 'supermario', sans-serif;
}

/* Retro link base class */
.retro-link {
    color: var(--link-blue);
    text-decoration: underline;
}

.retro-link:hover {
    color: var(--link-red);
}

/* Project list base styling */
.project-list {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.project {
    padding: 20px;
    border: 1px solid var(--border-color);
    background-color: var(--project-bg);
    transition: border-color 0.3s ease, background-color 0.3s ease;
}

.project h3 {
    font-size: 1.3em;
    margin-bottom: 10px;
    text-transform: lowercase;
    transition: color 0.3s ease;
}

.project a {
    color: var(--text-primary);
    text-decoration: none;
    font-weight: bold;
    display: inline-block;
    margin-top: 10px;
    transition: color 0.3s ease;
}

.project a:hover {
    text-decoration: underline;
}

/* Responsive base styles */
@media (max-width: 1200px) {
    .container {
        grid-template-columns: 1fr;
        grid-template-areas:
            "marquee"
            "header"
            "leftbar"
            "main"
            "rightbar";
    }

    .leftbar,
    .rightbar {
        flex-direction: row;
        overflow-x: auto;
    }

    .sidebar-panel {
        min-width: 200px;
    }
}

@media (max-width: 600px) {
    .container {
        padding: 10px;
    }

    section {
        padding: 20px;
    }

    header {
        padding: 20px 15px;
    }

    .leftbar,
    .rightbar {
        flex-direction: column;
    }

    .sidebar-panel {
        min-width: auto;
    }
}

a:visited {
    color: #666;
}