/* ====== Global Styles ====== */
body, html {
    height: 100%;
    margin: 0;
    font-family: 'Chicago', 'Charcoal', 'Geneva', sans-serif;
    background-image: url('static/background.png');
    background-size: cover;
    background-position: center;
    overflow: hidden;
    cursor: none; 
}

/* Disable text selection while dragging icons/modals */
body.dragging-disable-select, body.dragging-disable-select * {
    -webkit-user-select: none !important;
    -moz-user-select: none !important;
    -ms-user-select: none !important;
    user-select: none !important;
}

/* ====== Custom Cursor ====== */
#cursor {
    position: absolute;
    width: 45px;
    height: 45px;
    background-image: url('static/cursor.png');
    background-size: contain;
    background-repeat: no-repeat;
    pointer-events: none;
    z-index: 300;
}

/* ====== Desktop Icons Layout ====== */
.icons-container {
    position: absolute;
    top: 20px;
    left: 25px;
    bottom: 50px; /* stop above taskbar */
    width: 75px;
}

.icon-container {
    position: absolute;
    width: min(75px, 9vh);
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
}

/* Icon Styling */
.icon {
    width: min(75px, 9vh);
    height: min(75px, 9vh);
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
    cursor: none;
}

.icon-label {
    font-style: italic;
    margin-top: 5px;
    font-family: 'Chicago', 'Charcoal', 'Geneva', sans-serif;
    font-size: min(14px, 1.8vh);
    color: #000000cc;
    text-align: center;
    background-color: rgba(219, 219, 219, 0.897);
    display: block;     
    width: 100%;      
    line-height: 1.1;    
    padding: 2px 4px;     
}

/* Individual Icon Images */
#icon1 { background-image: url('static/settings.png'); }
#icon2 { background-image: url('static/icon2.png'); }
#icon3 { background-image: url('static/icon3.png'); }
#icon5 { background-image: url('static/contactme.png'); }
#icon6 { background-image: url('static/github.png'); }
#icon7 { background-image: url('static/linkedin.png'); }
#icon8 { background-image: url('static/games.png'); }
#icon9 { background-image: url('static/trash.png'); }

/* Icon Positioning — percentage-based so icons scale with viewport */
#icon1-container { top: 0%; }
#icon2-container { top: 14.3%; }
#icon3-container { top: 28.6%; }
#icon5-container { top: 42.9%; }
#icon6-container { top: 57.1%; }
#icon7-container { top: 71.4%; }
#icon8-container { top: 85.7%; }
#icon9-container { position: fixed; right: 30px; bottom: 50px; top: auto; left: auto; }

/* ====== Modal Windows ====== */
/* Base Modal Styles */
.modal {
    display: none;
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background-color: lightgrey;
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.3), 0 4px 8px rgba(0, 0, 0, 0.2);
    z-index: 200;
    overflow: auto;
    /* Classic OS-style borders */
    border-top: 4px solid rgb(168, 168, 168);
    border-left: 4px solid rgb(168, 168, 168);
    border-right: 4px solid black;
    border-bottom: 4px solid black;
}

/* Individual Modal Dimensions */
#modal1 {
    width: 500px;
    height: auto; 
    min-height: 250px; 
    display: block;
    position: fixed;
    top: 60%;
    left: 35%;
    transform: translate(-50%, -45%);
}

#modal2 { width: 480px; height: 660px; }

#modal3 {
    width: 720px;
    height: 750px;
    display: block;
    position: fixed;
    top: 5%;
    left: 40%;
}

#modal3 { overflow: hidden; }
.projects-scroll {
    padding: 50px 0 0;
    height: 100%;
    overflow-y: auto;
    box-sizing: border-box;
    background-color: rgb(21, 21, 130);
}

#modal5 {
    width: 550px;
    height: 150px;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    align-items: center;
    padding: 40px 20px 20px;
}

#modal8 { width: 366px; height: 550px; }

/* Games modal */
#modal9 { width: 520px; height: 230px; }
.games-modal { padding: 60px 20px 20px; }
.games-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; justify-items: center; }
.game-item { width: 110px; text-align: center; }
.game-item.disabled { opacity: 0.6; filter: grayscale(60%); pointer-events: none; }
.game-icon { width: 80px; height: 80px; background-size: contain; background-repeat: no-repeat; margin: 0 auto; }
.game-icon.minesweeper { background-image: url('static/minesweeper.png'); }
.game-icon.pinball { background-image: url('static/pinball.png'); }
.game-icon.solitaire { background-image: url('static/solitaire.png'); }
.game-label { margin-top: 6px; font-size: 13px; font-style: italic; background: rgba(219,219,219,0.9); padding: 2px 4px; }
#game-minesweeper .game-label { margin-top: -40px; }
#game-pinball .game-icon { width: 110px; height: 110px; }
#game-solitaire .game-icon { width: 110px; height: 110px; }

/* Pinball and trash modal */
#modal10 { width: 650px; height: 550px; }
.trash-content { padding: 60px 20px 20px; display: flex; flex-direction: column; height: calc(100% - 0px); box-sizing: border-box; }
#modal11 { width: 480px; height: 360px; }
.trash-hint { font-size: 13px; font-style: italic; background: rgba(219,219,219,0.9); padding: 6px 8px; border-top: 4px solid rgb(168,168,168); border-left: 4px solid rgb(168,168,168); border-right: 4px solid black; border-bottom: 4px solid black; text-align: center; margin: 0 auto; display: block; }
.trash-items { margin-top: 12px; flex: 1; min-height: 0; border-top: 4px solid rgb(168,168,168); border-left: 4px solid rgb(168,168,168); border-right: 4px solid black; border-bottom: 4px solid black; padding: 8px; display: flex; flex-wrap: wrap; gap: 8px; align-content: flex-start; background:#e5e5e5; overflow: auto; }
.trash-items .icon-container { position: static !important; cursor: none; }
.icon-container.trashed { opacity: 1; filter: none; }
.trash-items .icon-label { background: #ececec; }
.icon-container.drag-preview { z-index: 260 !important; pointer-events: none; }
.pinball-wrap { padding: 60px 8px 8px; height: calc(100% - 60px); }
.pinball-frame { width: 100%; height: 100%; border: none; background: #000; }

/* Solitaire modal */
#modal12 { width: 720px; height: 600px; }
.solitaire-wrap { padding: 60px 8px 8px; height: calc(100% - 60px); }
.solitaire-frame { width: 100%; height: 100%; border: none; background: #0a7a24; }

/* Modal Components */
.modal-close {
    position: absolute;
    top: 10px;
    right: 10px;
    cursor: none;
    font-size: 25px;
    color: #333;
    background: solid lightgrey;
    border-top: 4px solid rgb(168, 168, 168);
    border-left: 4px solid rgb(168, 168, 168);
    border-right: 4px solid black;
    border-bottom: 4px solid black;
    width: 35px;
    height: 35px;
    text-align: center;
    line-height: 20px;
    z-index: 201;
}

.modal-blue-line {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 40px;
    background-color: rgb(21, 21, 130);
    border: 4px solid lightgrey;
    z-index: 200;
    color: #d9d9d9; 
    font-size: 1.2em;
    text-align: left;
    padding-left: 15px;
    font-family: 'Chicago', 'Charcoal', 'Geneva', sans-serif;
    font-style: italic;
    padding-top: 8px;
    line-height: 30px;
}

/* ====== Bottom Taskbar ====== */
.taskbar {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    height: 25px; /* thick gray line */
    background: #bdbdbd; /* gray */
    border-top: 4px solid rgb(168,168,168);
    border-left: 0;
    border-right: 0;
    border-bottom: 0;
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 4px 8px;
    z-index: 210; /* above icons, below cursor */
}

.taskbar-start-btn {
    cursor: none;
    font-family: 'Chicago', 'Charcoal', 'Geneva', sans-serif;
    font-style: italic;
    color: #fff;
    background: rgb(21, 21, 130);
    border-top: 4px solid rgb(168,168,168);
    border-left: 4px solid rgb(168,168,168);
    border-right: 4px solid black;
    border-bottom: 4px solid black;
    padding: 6px 24px;
    line-height: 1;
    position: relative;
    top: -3px; 
    margin-left: 10px; 
}

.taskbar-start-btn.active {
    /* pressed look: invert borders */
    border-top: 4px solid black;
    border-left: 4px solid black;
    border-right: 4px solid rgb(168,168,168);
    border-bottom: 4px solid rgb(168,168,168);
    background: #1b1b80;
}

/* Taskbar window tabs */
.taskbar-tabs {
    display: flex;
    gap: 4px;
    overflow: hidden;
    flex: 1;
    min-width: 0;
}

.taskbar-tab {
    cursor: none;
    font-family: 'Chicago', 'Charcoal', 'Geneva', sans-serif;
    font-style: italic;
    font-size: 12px;
    color: #000;
    background: #c0c0c0;
    border-top: 4px solid rgb(168,168,168);
    border-left: 4px solid rgb(168,168,168);
    border-right: 4px solid black;
    border-bottom: 4px solid black;
    padding: 4px 12px;
    line-height: 1;
    position: relative;
    top: -3px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 160px;
    min-width: 80px;
}

.taskbar-tab.active {
    border-top: 4px solid black;
    border-left: 4px solid black;
    border-right: 4px solid rgb(168,168,168);
    border-bottom: 4px solid rgb(168,168,168);
    background: #a8a8a8;
}

.taskbar-spacer { flex: 0; }

.taskbar-clock {
    font-family: 'Chicago', 'Charcoal', 'Geneva', sans-serif;
    font-style: italic;
    color: #1b1b1b;
    background: #dcdcdc;
    border-top: 4px solid rgb(168,168,168);
    border-left: 4px solid rgb(168,168,168);
    border-right: 4px solid black;
    border-bottom: 4px solid black;
    padding: 4px 10px;
    line-height: 1;
    margin-right: 10px;
    position: relative;
    top: -3px; /* align with Start button */
}

/* ====== Start Menu ====== */
.start-menu {
    position: fixed;
    left: 8px; /* near Start button */
    bottom: 48px; /* above the taskbar height + padding */
    width: 220px;
    background: #dcdcdc;
    border-top: 4px solid rgb(168,168,168);
    border-left: 4px solid rgb(168,168,168);
    border-right: 4px solid black;
    border-bottom: 4px solid black;
    box-shadow: 0 8px 16px rgba(0,0,0,0.25);
    z-index: 220;
    display: none;
}

.start-menu.open { display: block; }

.start-menu-list {
    list-style: none;
    margin: 0;
    padding: 6px;
}

.start-menu-item {
    width: 100%;
    text-align: left;
    font-family: 'Chicago', 'Charcoal', 'Geneva', sans-serif;
    font-style: italic;
    color: #000;
    background: #e9e9e9;
    border-top: 3px solid rgb(168,168,168);
    border-left: 3px solid rgb(168,168,168);
    border-right: 3px solid black;
    border-bottom: 3px solid black;
    padding: 6px 10px;
    margin: 4px 0;
    cursor: none;
}

.start-menu-item:hover {
    background: #cfcfcf;
}

.start-sep { height: 1px; background: #b0b0b0; margin: 6px 0; }

/* ====== Contact Content Styles ====== */
.contact-content {
    margin-top: 30px;
    text-align: center;
    font-family: 'Chicago', 'Charcoal', 'Geneva', sans-serif;
    border: none;
}

.contact-content h3 {
    font-family: 'Chicago', 'Charcoal', 'Geneva', sans-serif !important; 
    font-size: 16px;
    margin-bottom: 10px;
}

.contact-content p {
    font-family: 'Chicago', 'Charcoal', 'Geneva', sans-serif !important; 
    font-size: 16px;
    font-style: italic;
    margin-bottom: 30px;
}

.contact-button {
    padding: 12px;
    background-color: rgb(21, 21, 130);
    color: white;
    font-family: 'Chicago', 'Charcoal', 'Geneva', sans-serif !important; 
    font-size: 16px;
    font-style: italic;
    border-top: 4px solid rgb(168, 168, 168);
    border-left: 4px solid rgb(168, 168, 168);
    border-right: 4px solid black;
    border-bottom: 4px solid black;
    cursor: none;
    text-decoration: none;
}

/* ====== Project Cards ====== */
.project-card {
    background-color: lightgrey;
    border: 1px solid #ccc;
    padding: 20px;
    margin-bottom: 15px;
    text-align: center;
    box-shadow: 0px 4px 8px rgba(0, 0, 0, 0.1);
}
.project-card:last-child {
    margin-bottom: 0;
}

.project-card h4 {
    margin-bottom: 10px;
}

.project-card button {
    background-color: rgb(21, 21, 130);
    color: white;
    font-family: 'Chicago', 'Charcoal', 'Geneva', sans-serif !important;
    font-size: 12px;
    padding: 10px 10px;
    cursor: none;
    background: solid lightgrey;
    border-top: 4px solid rgb(151, 151, 151);
    border-left: 4px solid rgb(151, 151, 151);
    border-right: 4px solid black;
    border-bottom: 4px solid black;
    font-style: italic;
}

/* Project card images area */
.project-images {
    margin: 10px 0 12px;
    display: flex;
    gap: 8px;
    justify-content: center;
    flex-wrap: wrap;
}
.project-images img,
.project-images video {
    max-width: 100%;
    height: auto;
    border-top: 4px solid rgb(151, 151, 151);
    border-left: 4px solid rgb(151, 151, 151);
    border-right: 4px solid black;
    border-bottom: 4px solid black;
    background: #dcdcdc;
}

/* ====== Utility Classes ====== */
.download-button {
    position: absolute;
    top: 73px;
    left: 20px; 
    color: rgb(21, 21, 130);
    background: none;
    padding: 5px;
    cursor: none;
    z-index: 203;
}

.about-me-content {
    padding: 30px 30px !important; 
    font-family: 'Chicago', 'Charcoal', 'Geneva', sans-serif;
    text-align: center;
    margin: auto; 
    max-width: 600px; 
    font-style: italic;
}

.about-me-content h3 {
    padding-top: 80px !important; 
    margin-top: 0 !important;
}

.image-container {
    text-align: center; 
    margin-bottom: 30px; 
}

.big-image {
    width: 100% !important; 
    max-width: 350px !important; 
    height: auto !important;
    margin-top: 55px !important; 
}

#modal1 .image-container { margin-bottom: 0px; }
#modal1 h3.no-italic { margin: 0px 0 20px !important; padding-top: 80px !important; }
#modal1 .about-me-content p { margin-top: 0px !important; }
#modal1 .about-me-content { padding-top: 9px !important; padding-bottom: 25px !important; }
#modal1 .about-me-content p + p { margin-top: 20px !important; }

.no-italic {
    font-style: normal; 
}

/* Minesweeper Modal Styles */
.minesweeper { padding: 60px 16px 16px 16px; }
.ms-topbar { display:flex; justify-content:space-between; align-items:center; background:#c0c0c0; padding:6px; border-top: 4px solid rgb(168,168,168); border-left: 4px solid rgb(168,168,168); border-right: 4px solid black; border-bottom: 4px solid black; }
.ms-display { font-family: 'Courier New', monospace; background:#000; color:#ff2d2d; padding:4px 8px; min-width:48px; text-align:right; }
.ms-btn { cursor:none; font-size:18px; border-top: 4px solid rgb(168,168,168); border-left: 4px solid rgb(168,168,168); border-right: 4px solid black; border-bottom: 4px solid black; background:#dcdcdc; padding:2px 8px; }
.ms-grid { margin-top:10px; display:grid; grid-template-columns: repeat(9, 1fr); gap:2px; background:#9e9e9e; padding:2px; border-top: 4px solid rgb(168,168,168); border-left: 4px solid rgb(168,168,168); border-right: 4px solid black; border-bottom: 4px solid black; }
.ms-cell { width:34px; height:34px; display:flex; align-items:center; justify-content:center; font-family: 'Chicago','Charcoal','Geneva',sans-serif; font-weight: bold; background:#c0c0c0; border-top: 4px solid rgb(168,168,168); border-left: 4px solid rgb(168,168,168); border-right: 4px solid black; border-bottom: 4px solid black; user-select:none; }
.ms-cell.open { background:#e1e1e1; border:1px solid #888; }
.ms-cell.flag::after { content:'🚩'; }
.ms-cell.mine::after { content:'💣'; }

/* Social modals */
#modal6 { width: 740px; height: 516px; overflow: hidden; }
#modal7 { width: 740px; height: 516px; overflow: hidden; }

/* Retro Browser Styles */
.browser-wrap {
    padding-top: 60px;
    height: 100%;
    display: flex;
    flex-direction: column;
    box-sizing: border-box;
}
.browser-toolbar {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    background-color: lightgrey;
    border-bottom: 4px solid black;
    box-sizing: border-box;
}
.browser-btn {
    cursor: none;
    font-family: 'Chicago', 'Charcoal', 'Geneva', sans-serif;
    font-size: 14px;
    font-weight: bold;
    color: black;
    background: #dcdcdc;
    border-top: 4px solid rgb(168,168,168);
    border-left: 4px solid rgb(168,168,168);
    border-right: 4px solid black;
    border-bottom: 4px solid black;
    padding: 2px 10px;
    line-height: 1.2;
}
.browser-btn:active {
    border-top: 4px solid black;
    border-left: 4px solid black;
    border-right: 4px solid rgb(168,168,168);
    border-bottom: 4px solid rgb(168,168,168);
    background: #a8a8a8;
}
.browser-address {
    flex: 1;
    height: 28px;
    box-sizing: border-box;
    background: #fff;
    border-top: 3px solid black;
    border-left: 3px solid black;
    border-right: 3px solid rgb(168,168,168);
    border-bottom: 3px solid rgb(168,168,168);
    cursor: none;
    font-family: 'Chicago', 'Charcoal', 'Geneva', sans-serif;
    font-size: 12px;
    padding: 4px 8px;
    color: #333;
}
.browser-frame {
    flex: 1;
    width: 100%;
    border: none;
    background: #fff;
}

.social-modal {
    height: 100%;
    box-sizing: border-box;
    padding: 60px 28px 28px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 14px;
    text-align: center;
}
.browser-wrap .social-modal {
    height: auto;
    flex: 1;
    padding: 4px 16px 6px;
    gap: 8px;
}
.social-image { width: auto; max-width: 100%; max-height: calc(100% - 90px); height: auto; display: block; margin: 0 auto; border-top: 4px solid rgb(168, 168, 168); border-left: 4px solid rgb(168, 168, 168); border-right: 4px solid black; border-bottom: 4px solid black; background:#dcdcdc; object-fit: contain; }
.video-overlay-container {
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
    width: auto;
    max-width: 100%;
    height: auto;
}
.social-video {
    width: auto;
    max-width: 100%;
    max-height: 400px;
    height: auto;
    display: block;
    margin: 0 auto;
    border-top: 4px solid rgb(168, 168, 168);
    border-left: 4px solid rgb(168, 168, 168);
    border-right: 4px solid black;
    border-bottom: 4px solid black;
    background: #dcdcdc;
    object-fit: contain;
    filter: brightness(0.85) grayscale(20%);
}
.video-overlay-container .modal-action-btn {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 10;
    white-space: nowrap;
}
.modal-action-btn { background-color: rgb(21, 21, 130); color: white; font-family: 'Chicago', 'Charcoal', 'Geneva', sans-serif !important; font-size: 12px; padding: 10px 10px; cursor: none; background: solid lightgrey; border-top: 4px solid rgb(151, 151, 151); border-left: 4px solid rgb(151, 151, 151); border-right: 4px solid black; border-bottom: 4px solid black; font-style: italic; }

/* ====== Terminal Modal ====== */
#modal13 {
    width: 520px;
    height: 300px;
    display: block;
    position: fixed;
    top: 60px;
    right: 100px;
    left: auto;
    transform: none;
}

.terminal-body {
    background: lightgrey;
    padding: 50px 16px 16px;
    height: calc(100% - 0px);
    box-sizing: border-box;
    overflow: hidden;
    font-family: 'Chicago', 'Charcoal', 'Geneva', sans-serif;
    font-size: 13px;
    font-style: italic;
    color: #000;
    line-height: 1.4;
    white-space: pre-wrap;
    word-wrap: break-word;
}

.terminal-body pre {
    margin: 0;
    font: inherit;
    color: inherit;
    display: inline;
}

.terminal-cursor {
    display: inline-block;
    width: 8px;
    height: 15px;
    background: #000;
    vertical-align: text-bottom;
    animation: blink-cursor 0.7s step-end infinite;
}

@keyframes blink-cursor {
    0%, 100% { opacity: 1; }
    50% { opacity: 0; }
}

/* ====== Clippy Assistant ====== */
.clippy,
.clippy * {
    cursor: none !important;
}

.clippy {
    z-index: 235;
    filter: drop-shadow(0 5px 2px rgba(0, 0, 0, 0.2));
}


.portfolio-clippy-panel {
    position: fixed;
    width: min(360px, calc(100vw - 24px));
    background: #dcdcdc;
    border-top: 4px solid rgb(168,168,168);
    border-left: 4px solid rgb(168,168,168);
    border-right: 4px solid black;
    border-bottom: 4px solid black;
    box-shadow: 0 8px 16px rgba(0,0,0,0.25);
    z-index: 236;
    display: none;
    font-family: 'Chicago', 'Charcoal', 'Geneva', sans-serif;
    font-style: italic;
    color: #000;
    cursor: none;
}

.portfolio-clippy-panel.is-open {
    display: block;
}

.portfolio-clippy-panel::after {
    content: '';
    position: absolute;
    right: -14px;
    top: 40px;
    width: 24px;
    height: 24px;
    background: #dcdcdc;
    border-top: 4px solid rgb(168, 168, 168);
    border-right: 4px solid black;
    border-left: none;
    border-bottom: none;
    transform: rotate(45deg);
}

.portfolio-clippy-titlebar {
    min-height: 26px;
    background-color: rgb(21, 21, 130);
    border: 4px solid lightgrey;
    color: #d9d9d9;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 3px 6px 3px 12px;
    font-size: 14px;
}

#portfolio-clippy-close {
    cursor: none;
    width: 24px;
    height: 24px;
    line-height: 14px;
    background: lightgrey;
    color: #111;
    border-top: 3px solid rgb(168,168,168);
    border-left: 3px solid rgb(168,168,168);
    border-right: 3px solid black;
    border-bottom: 3px solid black;
    font-size: 18px;
    padding: 0;
}

.portfolio-clippy-log {
    position: relative;
    z-index: 1;
    min-height: 54px;
    max-height: 130px;
    overflow-y: auto;
    padding: 10px 12px 6px;
    font-size: 13px;
    line-height: 1.35;
}

.portfolio-clippy-log p {
    margin: 0;
}

.portfolio-clippy-actions {
    position: relative;
    z-index: 1;
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 6px;
    padding: 0 10px 8px;
}

.portfolio-clippy-actions button,
.portfolio-clippy-form button {
    cursor: none;
    background: #ececec;
    color: #111;
    border-top: 3px solid rgb(168,168,168);
    border-left: 3px solid rgb(168,168,168);
    border-right: 3px solid black;
    border-bottom: 3px solid black;
    font-family: 'Chicago', 'Charcoal', 'Geneva', sans-serif;
    font-style: italic;
    font-size: 12px;
    min-height: 30px;
    padding: 4px 6px;
}

.portfolio-clippy-actions button:active,
.portfolio-clippy-form button:active,
#portfolio-clippy-close:active {
    border-top-color: black;
    border-left-color: black;
    border-right-color: rgb(168,168,168);
    border-bottom-color: rgb(168,168,168);
}

.portfolio-clippy-form {
    position: relative;
    z-index: 1;
    display: flex;
    gap: 6px;
    padding: 0 10px 10px;
}

#portfolio-clippy-input {
    flex: 1;
    min-width: 0;
    height: 28px;
    box-sizing: border-box;
    background: #fff;
    border-top: 3px solid black;
    border-left: 3px solid black;
    border-right: 3px solid rgb(168,168,168);
    border-bottom: 3px solid rgb(168,168,168);
    cursor: none;
    font-family: 'Chicago', 'Charcoal', 'Geneva', sans-serif;
    font-size: 12px;
    padding: 4px 6px;
}

.clippy-balloon {
    z-index: 236 !important;
}


/* ====== Boot Screen ====== */
#boot-screen {
    position: fixed;
    inset: 0;
    background: #000;
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: opacity 0.6s ease;
}
#boot-screen.boot-fade-out { opacity: 0; pointer-events: none; }
.boot-content { text-align: center; font-family: 'Chicago', 'Charcoal', 'Geneva', sans-serif; }
.boot-logo { display: flex; align-items: center; gap: 18px; justify-content: center; margin-bottom: 44px; }
.boot-flag { display: grid; grid-template-columns: 1fr 1fr; gap: 3px; width: 58px; height: 58px; }
.boot-flag-q1 { background: #e74c3c; }
.boot-flag-q2 { background: #2ecc71; }
.boot-flag-q3 { background: #3498db; }
.boot-flag-q4 { background: #f1c40f; }
.boot-title { color: #fff; font-size: 38px; font-style: italic; letter-spacing: 2px; }
.boot-title em { color: #4fc3f7; font-style: normal; }
.boot-bar-track {
    width: 320px;
    height: 22px;
    background: #1a1a1a;
    border: 2px solid #555;
    margin: 0 auto 16px;
    overflow: hidden;
}
.boot-bar-fill {
    height: 100%;
    width: 0%;
    background: repeating-linear-gradient(
        90deg,
        rgb(21, 21, 130) 0px,
        rgb(21, 21, 130) 18px,
        transparent 18px,
        transparent 22px
    );
    transition: width 0.3s linear;
}
.boot-status-text { color: #aaa; font-size: 13px; font-style: italic; }

/* ====== Minimize Button ====== */
.modal-minimize {
    position: absolute;
    top: 10px;
    right: 55px;
    cursor: none;
    font-size: 18px;
    font-weight: bold;
    color: #333;
    background: lightgrey;
    border-top: 4px solid rgb(168, 168, 168);
    border-left: 4px solid rgb(168, 168, 168);
    border-right: 4px solid black;
    border-bottom: 4px solid black;
    width: 35px;
    height: 35px;
    text-align: center;
    line-height: 22px;
    z-index: 201;
    padding: 0;
}

/* ====== Resize Handle ====== */
.resize-handle {
    position: absolute;
    bottom: 0;
    right: 0;
    width: 16px;
    height: 16px;
    cursor: nwse-resize !important;
    z-index: 202;
    background: linear-gradient(
        135deg,
        transparent 0%, transparent 40%,
        #888 40%, #888 50%,
        transparent 50%, transparent 65%,
        #888 65%, #888 75%,
        transparent 75%, transparent 85%,
        #888 85%, #888 95%,
        transparent 95%
    );
}

/* ====== Icon Selected State ====== */
.icon-selected .icon-label {
    background-color: rgb(21, 21, 130) !important;
    color: #fff !important;
}
.icon-selected .icon {
    filter: brightness(0.7) sepia(1) hue-rotate(190deg) saturate(3);
}


/* ====== Wallpaper Picker ====== */
.wallpaper-section { margin-top: 18px; padding-top: 14px; border-top: 2px solid #bbb; }
.wallpaper-label { font-size: 13px; font-style: italic; margin-bottom: 10px !important; color: #444; }
.wallpaper-options { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; }
.wallpaper-thumb {
    cursor: none;
    text-align: center;
    font-size: 11px;
    font-style: italic;
    color: #333;
}
.wallpaper-preview {
    width: 68px;
    height: 46px;
    background-size: cover;
    background-position: center;
    border-top: 3px solid rgb(168,168,168);
    border-left: 3px solid rgb(168,168,168);
    border-right: 3px solid black;
    border-bottom: 3px solid black;
    margin-bottom: 4px;
}
.wallpaper-selected .wallpaper-preview {
    border-color: rgb(21,21,130) !important;
    outline: 2px solid rgb(21,21,130);
}
.taskbar-tab.minimized {
    opacity: 0.6;
    font-style: italic;
}

/* ====== Mobile Layout (≤768px) ====== */
@media (max-width: 768px) {
    /* Restore native cursor / touch indicator */
    body, html { cursor: auto; }
    * { cursor: auto !important; }
    #cursor { display: none !important; }

    /* Icon dock: horizontal scrollable row pinned above taskbar */
    .icons-container {
        position: fixed !important;
        left: 0 !important;
        right: 0 !important;
        bottom: 38px !important;
        top: auto !important;
        width: 100% !important;
        display: flex !important;
        flex-direction: row !important;
        flex-wrap: nowrap !important;
        overflow-x: auto !important;
        -webkit-overflow-scrolling: touch;
        align-items: flex-end !important;
        padding: 6px 8px 4px !important;
        gap: 8px !important;
        z-index: 150 !important;
        box-sizing: border-box !important;
        background: rgba(200, 200, 200, 0.55);
    }

    .icon-container {
        position: static !important;
        left: auto !important;
        top: auto !important;
        flex-shrink: 0 !important;
        width: 55px !important;
    }

    /* Trash lives in the dock row, not fixed corner */
    #icon9-container {
        position: static !important;
        right: auto !important;
        bottom: auto !important;
    }

    .icon {
        width: 50px !important;
        height: 50px !important;
    }

    .icon-label {
        font-size: 10px !important;
    }

    /* Prevent double-tap zoom on icons */
    .icon-container { touch-action: manipulation; }

    /* All modals: full-width, positioned from top, no transform */
    .modal {
        position: fixed !important;
        left: 8px !important;
        right: 8px !important;
        top: 8px !important;
        width: calc(100vw - 16px) !important;
        max-width: calc(100vw - 16px) !important;
        transform: none !important;
        box-sizing: border-box !important;
    }

    /* Settings */
    #modal1 {
        top: 18% !important;
        height: auto !important;
    }

    /* Resume */
    #modal2 {
        height: calc(100vh - 130px) !important;
        overflow-y: auto !important;
    }

    /* Projects */
    #modal3 {
        height: calc(100vh - 130px) !important;
    }

    /* Contact */
    #modal5 {
        height: auto !important;
        padding: 50px 16px 24px !important;
        top: 22% !important;
    }

    /* GitHub / LinkedIn */
    #modal6, #modal7 {
        height: calc(100vh - 130px) !important;
    }

    /* Minesweeper */
    #modal8 { height: auto !important; }

    /* Games folder */
    #modal9 { height: auto !important; }

    /* Pinball */
    #modal10 { height: calc(100vh - 130px) !important; }

    /* Trash */
    #modal11 { height: calc(100vh - 130px) !important; }

    /* Solitaire */
    #modal12 { height: calc(100vh - 130px) !important; }

    /* Terminal: compact strip at top */
    #modal13 {
        top: 8px !important;
        left: 8px !important;
        right: 8px !important;
        height: 170px !important;
        transform: none !important;
    }


    /* Project card buttons: full-width stacked */
    .project-card button {
        display: block !important;
        width: 100% !important;
        margin-top: 8px !important;
        box-sizing: border-box !important;
    }

    /* Taskbar: tighter on small screens */
    .taskbar-start-btn {
        padding: 6px 10px !important;
        flex-shrink: 0 !important;
    }

    .taskbar-tabs {
        overflow-x: auto !important;
        overflow-y: hidden !important;
    }

    .taskbar-tab {
        max-width: 80px !important;
        min-width: 50px !important;
        font-size: 10px !important;
        padding: 4px 6px !important;
    }

    .taskbar-clock {
        flex-shrink: 0 !important;
        font-size: 10px !important;
        padding: 4px 6px !important;
        margin-right: 4px !important;
    }

    /* Browser address bar: clip long URLs */
    .browser-address {
        font-size: 10px !important;
        overflow: hidden !important;
        text-overflow: ellipsis !important;
    }

    /* Clippy panel */
    .portfolio-clippy-panel {
        width: calc(100vw - 24px);
    }
    .portfolio-clippy-actions {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
    .portfolio-clippy-panel::after {
        display: none;
    }
}

@media (max-width: 520px) {
    .portfolio-clippy-panel {
        width: calc(100vw - 24px);
    }

    .portfolio-clippy-actions {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .portfolio-clippy-panel::after {
        display: none;
    }
}
