/*
Theme Name: Retro Neocities
Theme URI: https://fddl.dev
Author: Tristan
Author URI: https://fddl.dev
Description: A classic Geocities/Neocities vibe theme with starfield background, tiled textures, and high-readability content frames.
Version: 1.3.2
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: retro-neocities
Tags: retro, geocities, neocities, 90s, stars, classic
*/

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

html {
    scroll-behavior: smooth;
    background: #000;
}

body {
    background: #000033 url('starfield.png') repeat;
    color: #ffffff;
    font-family: "Times New Roman", Times, serif;
    font-size: 16px;
    line-height: 1.4;
    padding: 10px !important;
    image-rendering: pixelated;
}

#page.site-wrapper {
    max-width: 900px;
    margin: 10px auto !important;
    background: #c0c0c0;
    color: #000000;
    border: 4px outset #ffffff;
    box-shadow: 10px 10px 0px rgba(0, 0, 0, 0.8);
    padding: 10px;
    position: relative;
    overflow: hidden;
}

a {
    color: #0000ee;
    text-decoration: underline;
    font-weight: bold;
}

a:visited {
    color: #551a8b;
}

a:hover {
    color: #ff0000 !important;
    background: #ffff00;
    text-decoration: blink;
}

.site-header {
    text-align: center;
    border: 3px inset #808080;
    margin-bottom: 15px;
    /* Reduced gap */
    background: #000080;
    /* Classic Navy Header */
    padding: 10px;
    color: white;
}

.site-title {
    font-size: 3rem;
    margin: 0;
    font-family: "Impact", "Arial Black", sans-serif;
    letter-spacing: 1px;
}

.site-title a {
    color: #ffff00 !important;
    /* Yellow title */
    text-shadow: 2px 2px 0px #ff0000, 4px 4px 0px #000000;
    text-decoration: none !important;
}

.site-description {
    color: #ffffff;
    font-family: "Courier New", Courier, monospace;
    font-size: 1rem;
    margin-top: 5px;
    font-style: normal;
    background: #000;
    display: inline-block;
    padding: 2px 8px;
    border: 1px solid #fff;
}

/* --- Navigation --- */
.nav-container ul {
    list-style: none;
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 5px;
    margin-top: 10px;
}

.nav-container li a {
    background: #d0d0d0;
    color: #000 !important;
    padding: 3px 10px;
    border-top: 2px solid #ffffff;
    border-left: 2px solid #ffffff;
    border-bottom: 2px solid #808080;
    border-right: 2px solid #808080;
    text-decoration: none !important;
    font-family: "Arial", sans-serif;
    font-size: 13px;
    font-weight: normal;
}

.nav-container li a:hover {
    background: #b0b0b0;
    border-top: 2px solid #808080;
    border-left: 2px solid #808080;
    border-bottom: 2px solid #ffffff;
    border-right: 2px solid #ffffff;
}

/* --- Layout --- */
.main-content {
    display: flex;
    gap: 10px;
    background: #ffffff;
    /* Content area is white */
    border: 2px inset #ffffff;
    padding: 15px;
}

@media (max-width: 800px) {
    .main-content {
        flex-direction: column;
    }
}

.content-area {
    flex: 3;
    transition: opacity 0.3s ease-in-out;
}

.content-area.loading {
    cursor: wait;
}

.content-area>* {
    animation: fadeIn 0.5s ease-out;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.sidebar {
    flex: 1;
    background: #e0e0e0;
    border: 2px inset #fff;
    padding: 10px;
    font-size: 0.85rem;
}

.widget-title {
    background: #808080;
    color: #fff;
    padding: 3px 5px;
    font-size: 0.9rem;
    margin-bottom: 8px;
    font-family: sans-serif;
    text-transform: uppercase;
}

/* --- Marquee --- */
.marquee-status {
    background: #ffff00;
    color: #000;
    border: 1px solid #000;
    padding: 2px;
    margin-bottom: 10px;
    font-family: "Courier New", monospace;
    font-weight: bold;
    font-size: 14px;
    overflow: hidden;
    white-space: nowrap;
}

.marquee-status span {
    display: inline-block;
    padding-left: 100%;
    animation: marquee-scroll 25s linear infinite;
}

@keyframes marquee-scroll {
    0% {
        transform: translateX(0);
    }

    100% {
        transform: translateX(-100%);
    }
}

h1,
h2,
h3,
.entry-title {
    margin: 10px 0 5px;
    color: #000080 !important;
    /* Force Navy */
    background: transparent !important;
    border-bottom: 1px solid #000080;
    font-family: "Arial Black", sans-serif;
    text-shadow: none !important;
    -webkit-text-fill-color: initial !important;
    /* Kill gradient text */
    background-clip: initial !important;
}

/* Specific fix for the "white on white" heading from the screenshot */
.entry-content h1,
.entry-content h2,
.entry-content span {
    color: #000000 !important;
    /* Force black if white was set */
    background-image: none !important;
    -webkit-text-fill-color: #000000 !important;
}

.entry-content p {
    margin-bottom: 10px;
    color: #333;
}

/* --- Post Thumbnails (Hidden in Main Content, visible in Sidebar) --- */
.content-area img[src*="les_paul"],
.content-area img[src*="hero"],
.content-area .featured-image,
.content-area article .wp-post-image {
    display: none !important;
}

.sidebar img,
.sidebar .wp-post-image,
.sidebar-project-gallery img,
#secondary img {
    display: block !important;
    max-width: 100%;
    height: auto !important;
    border: 3px double #000 !important;
    background: #fff !important;
    padding: 2px !important;
    margin-bottom: 5px !important;
    visibility: visible !important;
    opacity: 1 !important;
}

.sidebar-project-gallery {
    display: flex;
    flex-direction: column;
    gap: 15px;
    padding: 5px;
}

.sidebar-project-item {
    background: #c0c0c0;
    border-top: 2px solid #ffffff;
    border-left: 2px solid #ffffff;
    border-bottom: 2px solid #808080;
    border-right: 2px solid #808080;
    padding: 8px;
    box-shadow: 2px 2px 5px rgba(0, 0, 0, 0.5);
    transition: transform 0.1s;
}

.sidebar-project-item:hover {
    transform: translate(-1px, -1px);
    box-shadow: 3px 3px 6px rgba(0, 0, 0, 0.6);
}

/* --- Featured Project Grid --- */
.section-title {
    background: #000080;
    color: #fff;
    padding: 5px 10px;
    font-size: 1.2rem;
    margin-bottom: 20px;
    border: 2px outset #fff;
    font-family: "MS Sans Serif", "Arial", sans-serif;
    text-shadow: 1px 1px #000;
}

.project-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    grid-gap: 20px;
    margin-bottom: 30px;
}

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

.project-grid-item {
    background: #c0c0c0;
    border-top: 2px solid #ffffff;
    border-left: 2px solid #ffffff;
    border-bottom: 2px solid #808080;
    border-right: 2px solid #808080;
    padding: 10px;
    transition: transform 0.1s;
    box-shadow: 4px 4px 0px rgba(0, 0, 0, 0.5);
}

.project-grid-item:hover {
    transform: translate(-2px, -2px);
    box-shadow: 6px 6px 0px rgba(0, 0, 0, 0.6);
}

.project-grid-link {
    text-decoration: none !important;
    color: #000 !important;
}

.project-grid-image {
    width: 100%;
    aspect-ratio: 4 / 3;
    overflow: hidden;
    background: #000;
    border: 3px double #808080;
    display: flex;
    align-items: center;
    justify-content: center;
}

.project-grid-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    image-rendering: pixelated;
    /* Retro feel */
}

.project-grid-title {
    margin-top: 10px;
    font-size: 14px;
    text-align: center;
    background: #ffff00;
    color: #000;
    padding: 2px;
    border: 1px solid #000;
    text-transform: uppercase;
}

.placeholder-image {
    color: #fff;
    font-family: "MS Serif", serif;
    font-size: 12px;
    background: #404040;
}

/* Standard Images */
img {
    border: 2px solid #000;
    padding: 2px;
    background: #fff;
    max-width: 100%;
    height: auto;
}

/* --- Retro Elements --- */
hr {
    border: 0;
    height: 4px;
    background: #808080;
    border-bottom: 1px solid #fff;
    margin: 10px 0;
}

.footer {
    margin-top: 20px;
    text-align: center;
    border-top: 2px inset #fff;
    background: #c0c0c0;
    padding: 10px;
    font-size: 0.75rem;
    font-family: "Courier New", monospace;
    color: #000;
}

.retro-badges {
    margin-top: 10px;
    display: flex;
    justify-content: center;
    gap: 5px;
}

.badge {
    padding: 1px 5px;
    font-size: 9px;
    border: 1px solid #000;
}

.badge-purple {
    color: #fff;
    background: #800080;
}

.badge-pink {
    color: #fff;
    background: #ff00ff;
}

.badge-blue {
    color: #fff;
    background: #0000ff;
}

.badge-lime {
    color: #000;
    background: #00ff00;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 16px;
    background-color: #c0c0c0;
}

::-webkit-scrollbar-thumb {
    background-color: #dfdfdf;
    border: 2px outset #ffffff;
}

/* Yellow Highlight */
::selection {
    background: #ffff00;
    color: #000;
}

::-moz-selection {
    background: #ffff00;
    color: #000;
}

/* --- Retro Lightbox (Win95 Style) --- */
.lightbox-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
}

.lightbox-window {
    background: #c0c0c0;
    border: 3px outset #fff;
    box-shadow: 10px 10px 0px rgba(0, 0, 0, 0.8);
    max-width: 90%;
    max-height: 90%;
    display: flex;
    flex-direction: column;
}

.lightbox-title-bar {
    background: #000080;
    color: #fff;
    padding: 3px 6px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-family: sans-serif;
    font-size: 13px;
    font-weight: bold;
}

.lightbox-close {
    background: #c0c0c0;
    border-top: 2px solid #fff;
    border-left: 2px solid #fff;
    border-bottom: 2px solid #808080;
    border-right: 2px solid #808080;
    font-family: sans-serif;
    font-weight: bold;
    padding: 0 5px;
    line-height: 1.2;
    cursor: pointer;
}

.lightbox-content {
    padding: 10px;
    background: #000;
    overflow: auto;
    display: flex;
    justify-content: center;
    align-items: center;
}

.lightbox-content img {
    max-width: 100%;
    height: auto;
    border: 2px inset #fff;
    image-rendering: pixelated;
}

/* --- Gutenberg / Block Support --- */
#page .wp-block-button__link,
#page .wp-element-button,
#page .entry-content a.wp-block-button__link {
    background: #111111 !important;
    /* Near black */
    color: #ffffff !important;
    /* Pure White */
    border: 3px outset #ffffff !important;
    padding: 10px 25px !important;
    text-decoration: none !important;
    border-radius: 50px !important;
    /* True Bubble */
    font-family: "Arial Black", sans-serif;
    font-size: 14px;
    text-shadow: 1px 1px #000;
    display: inline-block;
}

#page .wp-block-button__link:visited,
#page .wp-element-button:visited,
#page .entry-content a.wp-block-button__link:visited {
    color: #ffffff !important;
}

#page .wp-block-button__link:hover,
#page .wp-element-button:hover,
#page .entry-content a.wp-block-button__link:hover {
    background: #444444 !important;
    border: 3px inset #ffffff !important;
    color: #ffff00 !important;
    /* Yellow text on hover */
    text-decoration: none !important;
    background-image: none !important;
}