/* VARIABLES & RESET */
:root {
    --bg-color: #FDF6E3; /* Solarized-ish light beige */
    --window-bg: #EEE8D5; /* Darker beige for contrast */
    --text-color: #657B83;
    --header-color: #586E75;
    --border-color: #4A403A;
    --accent-color: #CB4B16; /* Orange */
    --selection-color: #93A1A1;
    --font-main: 'VT323', monospace;
    --font-ui: 'Inconsolata', monospace;
}

.dark-mode {
    --bg-color: #1a1a1a;  /* Dark background (almost black/brown) */
    --window-bg: #2d2d2d; /* Slightly lighter window background */
    --text-color: #f0f0f0; /* Light text */
    --header-color: #cccccc;
    --border-color: #888888; /* Dimmed border */
    --accent-color: #ff6b6b; /* Brighter accent for contrast */
    --selection-color: #444444;
}

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

body, html {
    width: 100%;
    height: 100%;
    overflow: hidden;
    font-family: var(--font-main);
    background-color: var(--bg-color);
    color: var(--text-color);
    cursor: url('https://cdn.prod.website-files.com/66d1f3b407293a385b142c82/67e54843197a54bf4c65ba53_arrow.png'), auto;
}

/* BOOT SCREEN */
#boot-screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background-color: #000;
    color: #CB4B16; /* Retro amber text */
    z-index: 9999;
    padding: 2rem;
    font-family: 'Inconsolata', monospace;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
}

.boot-content {
    max-width: 800px;
}

#boot-text {
    white-space: pre-wrap;
    font-size: 1.2rem;
    line-height: 1.5;
}

.boot-logo {
    margin-top: 2rem;
    text-align: center;
}

.boot-logo pre {
    font-size: 0.8rem;
    line-height: 1;
    color: #FDF6E3;
}

.hide {
    display: none !important;
}

/* UI ELEMENTS */
.retro-btn {
    background: var(--bg-color);
    border: 2px solid var(--border-color);
    color: var(--border-color);
    padding: 10px 20px;
    font-family: var(--font-ui);
    font-weight: bold;
    text-transform: uppercase;
    cursor: pointer;
    box-shadow: 4px 4px 0px var(--border-color);
    transition: all 0.1s;
    margin-top: 20px;
}

.retro-btn:active {
    box-shadow: 2px 2px 0px var(--border-color);
    transform: translate(2px, 2px);
}

.retro-btn.full-width {
    width: 100%;
}

/* DESKTOP */
#desktop {
    width: 100%;
    height: 100%;
    position: relative;
    background-image:
        radial-gradient(var(--selection-color) 1px, transparent 1px);
    background-size: 20px 20px;
}

/* TOP BAR */
.top-bar {
    height: 30px;
    background: var(--window-bg);
    border-bottom: 2px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 10px;
    font-family: var(--font-ui);
    user-select: none;
}

.top-bar-left {
    display: flex;
    gap: 15px;
    align-items: center;
}

.logo-text {
    font-weight: bold;
    margin-right: 10px;
}

.top-bar nav a {
    text-decoration: none;
    color: var(--text-color);
    padding: 0 5px;
}

.top-bar nav a:hover {
    background-color: var(--border-color);
    color: var(--bg-color);
}

/* ICONS */
.desktop-icons {
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 20px;
    align-items: flex-start;
    width: 120px; /* Constrain width to ensure column */
    height: 100%; /* Full height to allow stacking */
}

.icon {
    display: flex;
    flex-direction: column;
    align-items: center;
    cursor: pointer;
    text-align: center;
}

.icon-img-wrapper {
    width: 64px;
    height: 64px;
    margin-bottom: 5px;
}

.icon-img-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    filter: sepia(0.5); /* Retro feel */
}

.icon-label {
    background: var(--window-bg);
    padding: 2px 4px;
    border: 1px dotted var(--border-color);
    font-size: 1rem;
    border-radius: 4px;
}

.icon:hover .icon-label {
    background: var(--border-color);
    color: var(--bg-color);
}

/* WINDOWS */
.retro-window {
    position: absolute;
    background: var(--bg-color);
    border: 2px solid var(--border-color);
    box-shadow: 6px 6px 0px rgba(0,0,0,0.2);
    min-width: 300px;
    display: flex;
    flex-direction: column;
    z-index: 10;
}

.retro-window.closed {
    display: none;
    pointer-events: none;
}

.window-header {
    background: var(--border-color);
    color: var(--bg-color);
    height: 28px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 5px;
    cursor: grab;
}

.window-header:active {
    cursor: grabbing;
}

.window-title {
    font-family: var(--font-ui);
    font-weight: bold;
    padding-left: 5px;
}

.close-btn {
    background: var(--bg-color);
    border: 1px solid #000;
    width: 20px;
    height: 20px;
    line-height: 18px;
    text-align: center;
    cursor: pointer;
    font-family: sans-serif;
    font-size: 12px;
}

.window-header-toolbar {
    background: var(--window-bg);
    border-bottom: 1px solid var(--border-color);
    padding: 5px;
    font-size: 0.9rem;
}

.window-content {
    padding: 10px;
    overflow-y: auto;
    max-height: 500px;
}

.content-inner {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 15px;
}

/* Grid View for Explorer */
.grid-view {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(80px, 1fr));
    gap: 15px;
}

.file-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    cursor: pointer;
}

.file-item img {
    width: 48px;
    height: 48px;
    margin-bottom: 5px;
    filter: sepia(0.4);
}

.file-item span {
    font-size: 0.9rem;
    word-break: break-all;
}

/* PDF Viewer */
.pdf-frame {
    width: 100%;
    height: 400px;
    border: 2px solid var(--border-color);
}

/* Projects View */
.project-item {
    border: 2px solid var(--border-color);
    padding: 15px;
    margin-bottom: 15px;
    background: var(--window-bg);
    cursor: pointer;
    transition: transform 0.1s, box-shadow 0.1s;
}

.project-item:hover {
    box-shadow: 4px 4px 0px rgba(0,0,0,0.1);
    transform: translate(-1px, -1px);
}

.project-item.highlight {
    border: 2px solid #CB4B16; /* Orange border */
    background: #FFF8E1; /* Slightly brighter background/yellow tint */
}

.project-item h3 {
    margin-bottom: 5px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 1.2rem;
}

.project-item p {
    font-size: 1rem;
    margin-bottom: 8px;
    line-height: 1.5;
}

/* Project Links */
.project-link-wrapper {
    margin-top: 10px;
    text-align: right;
}

.project-link {
    display: inline-block;
    background: #CB4B16;
    color: #FDF6E3;
    padding: 6px 12px;
    text-decoration: none;
    font-family: var(--font-ui);
    font-weight: bold;
    border: 1px solid #4A403A;
    box-shadow: 2px 2px 0px rgba(0,0,0,0.3);
    transition: all 0.1s;
}

.project-link:hover {
    background: #D35400;
    transform: translate(1px, 1px);
    box-shadow: 1px 1px 0px rgba(0,0,0,0.3);
}

.tech-stack {
    font-size: 0.9rem;
    color: #888;
    font-style: italic;
    font-family: var(--font-ui);
}

.badge {
    background: #CB4B16;
    color: #FDF6E3;
    font-size: 0.7rem;
    padding: 2px 6px;
    border-radius: 2px;
    text-transform: uppercase;
    font-weight: bold;
}

/* RESPONSIVE */
@media (max-width: 600px) {
    .retro-window {
        min-width: 90%;
        left: 5% !important;
        top: 10% !important;
    }

    .desktop-icons {
        grid-template-columns: repeat(auto-fill, 80px);
        gap: 10px;
    }

    .icon-label {
        font-size: 0.8rem;
    }
}
