body {
    font-family: "Comic Neue", "IBM Plex Mono", monospace;
    background-color: #2a0a4a;
    background-image: 
        radial-gradient(white, rgba(255,255,255,.2) 2px, transparent 40px),
        radial-gradient(white, rgba(255,255,255,.15) 1px, transparent 30px),
        radial-gradient(white, rgba(255,255,255,.1) 2px, transparent 40px),
        radial-gradient(rgba(255,255,255,.4), rgba(255,255,255,.1) 2px, transparent 30px);
    background-size: 550px 550px, 350px 350px, 250px 250px, 150px 150px;
    background-position: 0 0, 40px 60px, 130px 270px, 70px 100px;
    animation: backgroundScroll 60s linear infinite;
    color: #fff;
    margin: 0;
    position: relative;
    overflow-x: hidden;
    image-rendering: pixelated;
    display: flex;
    flex-direction: column;
    height: 100vh;
    overflow-y: auto;
    min-height: 100vh;
}

body::before {
    content: "";
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(125deg, #2a0a4a 0%, #4a0a2a 100%);
    opacity: 0.7;
    z-index: -1;
}

body::after {
    content: "";
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='4' height='4' viewBox='0 0 4 4'%3E%3Cpath fill='%23ffffff' fill-opacity='0.1' d='M1 3h1v1H1V3zm2-2h1v1H3V1z'%3E%3C/path%3E%3C/svg%3E");
    opacity: 0.3;
    z-index: -1;
    pointer-events: none;
}

@keyframes backgroundScroll {
    0% {
        background-position: 0 0, 40px 60px, 130px 270px, 70px 100px;
    }
    100% {
        background-position: 550px 550px, 390px 410px, 380px 820px, 220px 650px;
    }
}

.page-wrapper {
    display: flex;
    flex-direction: column;
    padding: 14px;
    box-sizing: border-box;
    min-height: 0;
    height: 100%;
}

.container {
    max-width: 800px;
    width: 100%;
    background-color: rgba(0, 0, 0, 0.7);
    padding: 20px 20px 0px 20px;
    margin: 0 auto;
    box-sizing: border-box;
    border: 1px solid #8a2be2;
    box-shadow: 0 0 15px rgba(138, 43, 226, 0.5);
    display: flex;
    flex-direction: column;
}

@media (max-width: 1024px) {
    .page-wrapper {
        padding: 10px;
    }
    
    .container {
        padding: 10px;
        width: 100%;
    }
    
    /* Homepage mobile layout */
    #about, #recent-posts {
        width: 100%;
        margin-bottom: 20px;
    }
    
    #projects {
        width: 100%;
    }
    
    /* Biznus mobile layout */
    .biznus-page .container {
        height: 100vh;
    }
    
    .biznus-page main {
        height: auto;
        flex: 1;
    }
}

header {
    text-align: center;
    margin-bottom: 20px;
}

h1, h2, h3, h4, h5, h6 {
    font-family: "Comic Neue", "Comic Sans MS", cursive;
    color: #b387dd;
    text-shadow: 0 0 2px rgba(138, 43, 226, 1);
}

nav {
    margin-top: 10px;
}

nav a, nav a:hover, body.blog-page nav a, body.blog-page nav a:hover {
    text-decoration: none;
    margin: 0 10px;
    font-size: 18px;
}

main {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
}

main.blog-main {
    display:block;
    flex-wrap: wrap;
    justify-content: space-between;
}

#about, #recent-posts {
    width: 48%;
}

#projects, #badges {
    width: 100%;
}

.project-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 15px;
    max-width: 1200px;
    margin: 0 auto;
}

@media (min-width: 900px) {
    .project-grid {
        grid-template-columns: 1fr 1fr;
    }
}

.project-card {
    display: flex;
    align-items: flex-start;
    padding: 20px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    transition: transform 0.2s, background-color 0.2s;
    cursor: pointer;
    text-decoration: none;
    border: 1px solid rgba(255, 255, 255, 0.2);
    height: auto;
    min-height: 140px;
    position: relative;
}

.project-card:hover {
    transform: translateY(-2px);
    background: rgba(255, 255, 255, 0.15);
}

.project-card-image {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 100px;
    margin-right: 20px;
}

.project-card img {
    width: 100px;
    height: 100px;
    object-fit: cover;
    border-radius: 8px;
    flex-shrink: 0;
}

.project-card-content {
    flex: 1;
    min-width: 0;
    margin-left: 120px;
}

.project-card h3 {
    margin: 0 0 8px 0;
    font-size: 24px;
    display: flex;
    align-items: center;
    gap: 10px;
    overflow-wrap: break-word;
}

.project-card p {
    margin: 0;
    opacity: 0.8;
    overflow-wrap: break-word;
}

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

a {
    color: #00ff00;
}

.project-card {
    color: #fff;
}

.project-card a {
    color: inherit;
}

.badge-container {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 10px;
}

.badge-container img {
    max-width: 88px;
    max-height: 31px;
}

footer {
    margin-top: auto;
    position: relative;
    width: 100%;
    text-align: center;
    padding-top: 4px;
    font-size: 14px;
}

#catscape-container {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 80%;
    height: 80%;
    background-color: #c0c0c0;
    border: 2px outset #fff;
    display: flex;
    flex-direction: column;
    box-shadow: 5px 5px 10px rgba(0, 0, 0, 0.5);
    z-index: 9999;
}

#catscape-container.hidden {
    display: none;
}

#catscape-titlebar {
    background-color: #000080;
    color: #fff;
    padding: 5px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

#catscape-titlebar span {
    flex: 1;
    text-align: left;
}

#catscape-open-main {
    background-color: #0000ff;
    border: none;
    color: white;
    padding: 5px 10px;
    text-align: center;
    text-decoration: none;
    display: inline-block;
    font-size: 14px;
    margin: 0 10px;
    cursor: pointer;
    border-radius: 3px;
    flex: 0 1 auto;
}

#catscape-open-main:hover {
    background-color: #45a049;
}

#catscape-close {
    background: none;
    border: none;
    color: white;
    font-size: 20px;
    cursor: pointer;
    padding: 0 10px;
    flex: 0 1 auto;
}

#catscape-addressbar {
    background-color: #fff;
    padding: 5px;
}

#catscape-url {
    width: 100%;
    border: 1px inset #808080;
}

#catscape-frame {
    flex-grow: 1;
    border: none;
}

#catscape-statusbar {
    background-color: #c0c0c0;
    padding: 5px;
    display: flex;
    justify-content: space-between;
}

article {
    width: 100%;
    overflow-x: hidden;
}

.centered-content {
    display: flex;
    justify-content: center;
    width: 100%;
}

pre[class*="language-"] {
    width: 80%;
    max-width: 800px;
    margin: 1em 0;
}

.centered-content pre[class*="language-"] {
    scrollbar-width: thin;
    scrollbar-color: #808080 #c0c0c0;
}

.centered-content pre[class*="language-"]::-webkit-scrollbar {
    width: 12px;
    height: 12px;
}

.centered-content pre[class*="language-"]::-webkit-scrollbar-track {
    background: #c0c0c0;
    border: 1px solid #808080;
}

.centered-content pre[class*="language-"]::-webkit-scrollbar-thumb {
    background-color: #808080;
    border: 1px outset #ffffff;
}

.centered-content pre[class*="language-"]::-webkit-scrollbar-corner {
    background-color: #c0c0c0;
}

body.blog-page {
    background-color: #001a33;
    background-image: 
        linear-gradient(45deg, #002b54 25%, transparent 25%, transparent 75%, #002b54 75%, #002b54),
        linear-gradient(-45deg, #003366 25%, transparent 25%, transparent 75%, #003366 75%, #003366),
        radial-gradient(circle at 50% 50%, #004080 10%, transparent 20%),
        radial-gradient(circle at 25% 75%, #004d99 5%, transparent 10%),
        radial-gradient(circle at 75% 25%, #0059b3 15%, transparent 20%);
    background-size: 100px 100px, 120px 120px, 300px 300px, 200px 200px, 250px 250px;
    background-position: 0 0, 50px 50px, 0 0, 100px 100px, 50px 50px;
    animation: none;
    padding: 20px;
}

body.blog-page::before {
    content: "";
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(125deg, rgba(0, 26, 51, 0.7) 0%, rgba(0, 51, 102, 0.7) 100%);
    z-index: -1;
}

body.blog-page .container {
    background-color: rgba(0, 0, 0, 0.8);
    border: 1px solid #0077be;
    box-shadow: 0 0 10px rgba(0, 119, 190, 0.5);
}

body.blog-page h1, 
body.blog-page h2, 
body.blog-page h3, 
body.blog-page h4, 
body.blog-page h5, 
body.blog-page h6 {
    color: #0077be;
    text-shadow: 0 0 2px rgba(0, 119, 190, 0.5);
}

body.blog-page a {
    color: #00a8e8;
    text-decoration: none;
}

body.blog-page a:hover {
    text-decoration: underline;
    text-shadow: 0 0 2px rgba(0, 168, 232, 0.5);
}

#mouse-follower {
    position: fixed;
    pointer-events: none;
    z-index: 9998;
    width: 40px;
    height: 40px;
    background-image: url('/images/snorp-sprite.png');
    background-size: contain;
    background-repeat: no-repeat;
    transition: transform 0.1s ease-out;
}

.rainbow-hr {
    height: 4px;
    border: none;
    background: linear-gradient(to right, red, orange, yellow, green, blue, indigo, violet);
}

#dvd-logo {
    position: fixed;
    padding: 10px 20px;
    font-family: Arial, sans-serif;
    font-weight: bold;
    font-size: 24px;
    color: #ffffff;
    background-color: #000000;
    user-select: none;
    z-index: -1;
    border-radius: 50%;
    width: 60px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.toggle-buttons {
    margin-top: 10px;
    text-align: center;
}

.toggle-button {
    font-family: "Comic Neue", "Comic Sans MS", cursive;
    background-color: #c0c0c0;
    border: 2px outset #ffffff;
    padding: 2px;
    margin: 0 5px;
    cursor: pointer;
    color: #000000;
    font-weight: bold;
    box-shadow: 2px 2px 5px rgba(0, 0, 0, 0.5);
}

.toggle-button:active {
    border-style: inset;
}

.toggle-button:hover {
    background-color: #d3d3d3;
}

.badge-scroll-container {
    margin-top: 12px;
    text-align: center;
}

/*
.badge-scroll-container {
    width: 80px;
    height: 15px;
    overflow: hidden;
    position: relative;
    margin: 0 auto;
}

.badge-scroll {
    display: flex;
    position: absolute;
    left: 0;
    animation: scroll-badges 48s linear infinite;
}
*/
.badge-scroll img {
    width: 80px;
    height: 15px;
    flex-shrink: 0;
    object-fit: cover;
    margin: auto 0;
}

@keyframes scroll-badges {
    0% {
        transform: translateX(0);
    }
    100% {
        transform: translateX(calc(-80px * 12));
    }
}

.badge-scroll::after {
    content: "";
    display: block;
    width: 80px;
}

.badge-scroll-container::before,
.badge-scroll-container::after {
    content: "";
    position: absolute;
    top: 0;
    width: 20px;
    height: 100%;
    z-index: 2;
}

.badge-scroll-container::before {
    left: 0;
    background: linear-gradient(to right, #2a0a4a, transparent);
}

.badge-scroll-container::after {
    right: 0;
    background: linear-gradient(to left, #2a0a4a, transparent);
}

#hit-counter {
    font-family: "Comic Neue", "Comic Sans MS", cursive;
    text-align: center;
    color: cyan;
}

#hit-counter span {
    display: block;
    margin-bottom: 5px;
}

#hit-counter .counter {
    font-family: "IBM Plex Mono", monospace;
    display: inline-block;
    background-color: #000;
    padding: 5px;
    border: 2px solid cyan;
}

#hit-counter .digit {
    display: inline-block;
    background-color: #000;
    padding: 2px;
    margin-bottom: 2px;
    border: 1px solid cyan;
    font-size: 8px;
}

@keyframes datboi-ride {
    0% {
        transform: translate(0, 0) scaleX(1);
    }
    45% {
        transform: translate(-700px, 0) scaleX(1);
    }
    50% {
        transform: translate(-700px, 0) scaleX(-1);
    }
    95% {
        transform: translate(0, 0) scaleX(-1);
    }
    100% {
        transform: translate(0, 0) scaleX(1);
    }
}

@media (min-width: 1440px) {
    /*#howard {
        position: fixed;
        top: -60px;
        left: 240px;
        scale: 50%;
    }*/
    #howard {
        scale: 45%;
        position: absolute;
        top: -80px;
        right: 50%;
        transform: translate(50px, 0px);
    }
    #jupiter {
        position: absolute;
        top: 40px;
        left: 50%;
        transform: translate(-380px, 0px);
        width: 96px;
        height: auto;
    }
    #datboi {
        position: absolute;
        bottom: 10px;
        right: 0%;
        width: 60px;
        height: auto;
        animation: datboi-ride 10s linear infinite;
    }
    #sasha {
        position: absolute;
        top: 16px;
        left: 50%;
        width: 144px;
        transform: translate(268px, 0px);
        height: auto;
    }
}

@media (max-width: 1439px) {
    #howard,
    #jupiter,
    #datboi,
    #sasha {
        display: none;
    }
}

.icon {
    width: 1em;
    height: 1em;
    vertical-align: -0.125em;
    fill: currentColor;
    font-size: 18px;
}

.biznus-tabs {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
    margin-left: auto;
    margin-right: auto;
}

.biznus-tab {
    padding: 10px 20px;
    color: inherit;
    background: rgba(138, 43, 226, 0.2);
    border: 1px solid #8a2be2;
    cursor: pointer;
    font-family: "Comic Neue";
    transition: all 0.3s ease;
    z-index: 10;
}

.biznus-tab.active {
    background: rgba(138, 43, 226, 0.4);
}

.biznus-tab:hover {
    background: rgba(138, 43, 226, 0.3);
}

.biznus-content {
    display: none;
    width: 100%;
    margin-bottom: 20px;
    flex: 1;
    min-height: 0;
}

.biznus-content.active {
    display: flex;
    flex-direction: column;
}

.biznus-frame {
    width: 100%;
    flex: 1;
    min-height: 500px;
    border: 1px solid #8a2be2;
    background: rgba(0, 0, 0, 0.3);
    display: block;
}

.biznus-page .container {
    min-height: 0;
    max-height: 100vh;
    overflow: hidden;
}

.biznus-page main {
    flex: 1;
    min-height: 0;
    flex-wrap: nowrap;
    display: flex;
    flex-direction: column;
    padding: 20px 0;
    overflow-y: auto;
}

.instructions {
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid #8a2be2;
    padding: 15px;
    margin-bottom: 20px;
    position: relative;
    z-index: 1;
}

.instructions h3 {
    margin-top: 0;
}

@media (max-width: 768px) {
    .biznus-tabs {
        flex-wrap: wrap;
        justify-content: center;
    }
    
    .biznus-tab {
        flex: 1 1 calc(50% - 10px);
        min-width: 120px;
        text-align: center;
    }

    .biznus-frame {
        height: 60vh;
    }

    .instructions {
        font-size: 14px;
    }

    .instructions ul {
        padding-left: 20px;
    }
}

@media (max-width: 480px) {
    .biznus-tab {
        flex: 1 1 100%;
    }

    .biznus-frame {
        height: 50vh;
    }
}
