/* portfolio/portfolio.css */

/* 1. DEFINE THE CUSTOM FONT */
@font-face {
    font-family: 'ByteSized';
    src: url('./pui/pfonts/BytesizedRegular.ttf') format('truetype');
    font-weight: normal;
    font-style: normal;
}

/* 2. BASE CONTAINER SETTINGS */
#portfolio-container {
    position: fixed;
    top: 0; left: 0;
    width: 100vw; height: 100vh;
    background-color: #008080;
    display: flex;
    flex-direction: column;
    z-index: 9999;
    overflow: hidden;
    font-family: 'Tahoma', 'Segoe UI', sans-serif;
}

/* 3. APPLY PIXEL FONT ONLY TO UI ELEMENTS */
.window-header, .task-tab, #start-btn, .menu-item, #system-clock, .win-btn, .user-name, .icon-shortcut span {
    font-family: 'ByteSized', sans-serif !important;
    image-rendering: pixelated;
    text-rendering: optimizeSpeed;
    -webkit-font-smoothing: none;
}

/* 4. PORTFOLIO CONTENT FONT */
.window-content {
    padding: 10px;
    background: white;
    margin: 0;
    border: 2px inset #ffffff;
    flex: 1;
    color: #000;
    font-family: 'Tahoma', sans-serif !important;
    overflow-y: auto;
}

/* 5. DESKTOP ELEMENTS */
#desktop-wallpaper {
    position: absolute;
    top: 0; left: 0;
    width: 100%; height: 100%;
    z-index: -1;
    background-color: #008080;
}

#workspace {
    flex: 1;
    position: relative;
    overflow: hidden;
    padding: 20px;
    z-index: 10;
}

/* RESPONSIVE WINDOWS */
.window {
    position: absolute;
    background: #c0c0c0;
    display: flex;
    flex-direction: column;
    border: 10px solid;
    border-image-slice: 1;
    border-image-source: linear-gradient(45deg, #00ffff, #c34fff, #6089fe, #ff227b);
    box-shadow: 6px 6px 15px rgba(0, 0, 0, 0.4);
}

#window-home {
    width: 90vw;
    height: 80vh;
    max-width: 1000px;
    max-height: 700px;
    min-width: 300px;
    min-height: 250px;
    top: 30px;
    left: 5vw;
}

#window-projects {
    width: 80vw;
    height: 60vh;
    max-width: 800px;
    max-height: 500px;
    top: 100px;
    left: 15vw;
}

/* WINDOW HEADER */
.window-header {
    background-image: url('./pui/gradmap1.webp');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    color: white;
    padding: 12px;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
    min-height: 60px;
    cursor: grab;
    user-select: none;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.8);
}

.window-title { font-size: 18px; white-space: nowrap; }
.window-controls { display: flex; gap: 4px; }

.win-btn {
    width: 22px; height: 20px;
    font-size: 12px; font-weight: bold;
    background: #c0c0c0;
    border: 1px solid;
    border-color: #fff #808080 #808080 #fff;
    display: flex; align-items: center; justify-content: center;
    cursor: pointer;
}

/* START MENU */
#start-menu {
    position: absolute;
    bottom: 42px;
    left: 2px;
    width: 400px;
    height: 550px;
    display: flex;
    flex-direction: column;
    background: #c0c0c0;
    border: 2px solid;
    border-color: #fff #808080 #808080 #fff;
    z-index: 99999 !important;
    box-shadow: 2px 2px 10px rgba(0,0,0,0.5);
    padding: 3px;
}

.start-user-bar {
    height: 60px;
    background: linear-gradient(to bottom, #1048a9, #1c68e3, #1048a9);
    display: flex;
    align-items: center;
    padding: 0 10px;
    margin-bottom: 2px;
    border: 1px solid #0a3580;
}

.user-pfp {
    width: 44px;
    height: 44px;
    background: white;
    border: 2px solid #fff;
    border-radius: 4px;
    box-shadow: 1px 1px 3px rgba(0,0,0,0.5);
    overflow: hidden;
    margin-right: 12px;
    background-size: cover;
    background-position: center;
    /* User icon via CSS pathing */
    background-image: url('./pui/user-icon.webp');
}

.user-name {
    color: white;
    font-size: 18px;
    text-shadow: 1px 1px 2px #000;
}

.start-content-wrapper {
    display: flex;
    flex: 1;
    overflow: hidden;
}

.start-menu-left {
    flex: 1.5;
    background: white;
    border: 1px solid #808080;
    margin-right: 2px;
    display: flex;
    flex-direction: column;
    overflow-y: auto;
}

.start-menu-right {
    flex: 1;
    background: #d0d0d0;
    padding: 10px 5px;
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.menu-item {
    padding: 6px 10px;
    font-size: 14px;
    color: black;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
}

.menu-item:hover {
    background: linear-gradient(to bottom, #bee2f9, #8ec8f1);
    outline: 1px solid #70a0c0;
}

.start-footer {
    margin-top: auto;
    padding-top: 5px;
    border-top: 1px solid #808080;
    display: flex;
    justify-content: flex-end;
}

#menu-shutdown {
    background: #cc3333;
    color: white !important;
    border: 1px solid #800000;
    padding: 4px 8px;
}

.hidden { display: none !important; }

/* TASKBAR */
#taskbar {
    height: 40px;
    background-image: url('./pui/gradmap.webp');
    background-size: 100% 100%;
    border-top: 2px solid #dfdfdf;
    display: flex; align-items: center;
    padding: 0 5px; gap: 5px;
    z-index: 10001;
    position: relative;
}

.task-running-area {
    display: flex;
    gap: 5px;
    flex: 1;
}

.task-tab {
    height: 30px;
    min-width: 100px;
    max-width: 160px;
    background: #c0c0c0;
    border: 1px solid;
    border-color: #fff #808080 #808080 #fff;
    padding: 0 10px;
    cursor: pointer;
    display: flex;
    align-items: center;
    font-size: 12px;
}

.task-tab.active {
    background: #e0e0e0;
    border-color: #808080 #fff #fff #808080;
    font-weight: bold;
}

/* [BLOCK: DESKTOP ICONS STYLES] */
.desktop-icons {
    position: absolute;
    top: 0;
    left: 0;
    padding: 20px;
    display: grid;
    grid-template-columns: repeat(auto-fill, 80px);
    grid-template-rows: repeat(auto-fill, 90px);
    gap: 20px;
    z-index: 5;
    pointer-events: none;
}

.icon-shortcut {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    cursor: pointer;
    pointer-events: auto;
    padding: 5px;
    border: 1px solid transparent;
}

/* NEW: CSS handled icon images */
.icon-img {
    width: 48px;
    height: 48px;
    margin-bottom: 4px;
    image-rendering: pixelated;
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
}

.icon-folder { background-image: url('./pui/pimgfolder.webp'); }
.icon-web    { background-image: url('./pui/pimgweb.webp'); }
.icon-file   { background-image: url('./pui/pimgfile.webp'); }
.icon-program { background-image: url('./pui/pimgprogram.webp'); }

.icon-shortcut span {
    color: white;
    font-size: 12px;
    text-shadow: 1px 1px 2px #000;
    padding: 2px 4px;
    word-break: break-word;
}

.icon-shortcut:hover {
    background-color: rgba(255, 255, 255, 0.2);
    border: 1px dotted rgba(255, 255, 255, 0.5);
}

.icon-shortcut:active {
    background-color: rgba(0, 0, 128, 0.5);
}