/* Screen Styles (Windows 97 Theme) */
* {
    box-sizing: border-box;
}

body {
    background-color: #008080;
    /* Classic Teal */
    /* Only allow scrolling if needed, but usually desktop fits screen */
    overflow: hidden;
    height: 100vh;
}

.screen-layout {
    display: block;
    height: 100vh;
    width: 100vw;
    position: relative;
    opacity: 0;
    transition: opacity 0.15s ease-in;
}

.screen-layout.ready {
    opacity: 1;
}

/* Desktop Icons */
.desktop-icons {
    position: absolute;
    top: 10px;
    left: 10px;
    display: flex;
    flex-direction: column;
    gap: 20px;
    z-index: 1;
}

.desktop-icon {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 80px;
    cursor: pointer;
    text-align: center;
    color: white;
}

.desktop-icon img {
    width: 32px;
    height: 32px;
    margin-bottom: 5px;
}

.desktop-icon span {
    font-size: 11px;
    font-family: "MS Sans Serif", Arial, sans-serif;
    text-shadow: 1px 1px 1px black;
    /* Outline effect for readability on teal */
}

.desktop-icon:active img {
    filter: brightness(0.5);
    /* Simple click effect */
}

/* Main Window Positioning */
.main-window {
    width: 900px;
    max-width: 90%;
    position: absolute;
    top: 50px;
    left: 100px;
    z-index: 10;
    display: flex !important;
    /* Override 98.css inline-block */
    flex-direction: column !important;
    height: 600px;
    box-sizing: border-box;
}

/* Increase specificity and use !important to override 98.css default styles */
.window.main-window .window-body {
    flex: 1 1 0 !important;
    /* Grow, shrink, basis of 0 */
    display: flex !important;
    flex-direction: column !important;
    overflow: hidden !important;
    margin: 3px;
    padding: 0;
    min-height: 0 !important;
    /* Crucial for nested flex scrolling */
}

.toolbar {
    padding: 5px;
    border-bottom: 1px solid #808080;
    margin-bottom: 10px;
    display: flex;
    gap: 10px;
    align-items: center;
    flex-shrink: 0;
    /* Don't let toolbar shrink */
}

/* Taskbar Styles */
.taskbar {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 28px;
    background: #c0c0c0;
    border-top: 2px solid #fff;
    display: flex;
    align-items: center;
    padding: 2px;
    box-shadow: inset 0 1px 0 #fff;
    z-index: 9999;
    /* Ensure it stays on top */
}

.start-button {
    display: flex;
    align-items: center;
    gap: 5px;
    font-weight: bold;
    font-style: italic;
    padding: 2px 6px;
    height: 22px;
    margin-right: 5px;
}

.start-button img {
    width: 16px;
    height: 16px;
}

.taskbar-divider {
    width: 2px;
    height: 20px;
    background: #808080;
    border-right: 1px solid #fff;
    margin: 0 5px;
}

.task-button {
    display: flex;
    align-items: center;
    gap: 5px;
    width: 160px;
    height: 22px;
    padding: 2px 5px;
    background: #c0c0c0;
    box-shadow: inset -1px -1px #fff, inset 1px 1px #000, inset -2px -2px #dfdfdf, inset 2px 2px #808080;
    font-family: "MS Sans Serif", Arial, sans-serif;
    font-size: 11px;
    cursor: default;
}

.task-button.active {
    background: #e0e0e0;
    /* Checked/Pressed look */
    box-shadow: inset -1px -1px #fff, inset 1px 1px #000, inset -2px -2px #dfdfdf, inset 2px 2px #808080;
    background: repeating-conic-gradient(#c0c0c0 0% 25%, #ffffff 0% 50%) 50% / 2px 2px;
    /* Dithered pattern check */
    background: #c0c0c0;
    /* Fallback */
    box-shadow: inset 1px 1px #000, inset -1px -1px #fff, inset 2px 2px #808080, inset -2px -2px #dfdfdf;
    /* Pressed in */
    font-weight: bold;
}

.task-button img {
    width: 16px;
    height: 16px;
}

.taskbar-time {
    margin-left: auto;
    background: inset;
    border: 1px solid #808080;
    border-bottom-color: #fff;
    border-right-color: #fff;
    padding: 2px 10px;
    margin-right: 2px;
    font-size: 11px;
    font-family: "MS Sans Serif", Arial, sans-serif;
}

/* Retro styling for the CV content on screen */
.cv-content {
    background-color: #ffffff;
    border: inset 2px;
    padding: 20px;
    flex: 1 1 0 !important;
    /* Fill remaining height */
    overflow-y: auto !important;
    color: black;
    font-family: 'Arial', sans-serif;
    width: 100%;
    box-sizing: border-box;
    min-height: 0 !important;
    /* Crucial for flex child scrolling */
}

.cv-content h1 {
    font-family: "MS Sans Serif", Arial, sans-serif;
    font-size: 24px;
    margin-bottom: 15px;
    color: #000;
}

.cv-content h2,
.section-heading {
    background: #000080;
    /* Navy blue header background like old headings */
    color: white;
    padding: 2px 5px;
    font-family: "MS Sans Serif", Arial, sans-serif;
    font-size: 14px;
    margin-top: 20px;
    margin-bottom: 10px;
    font-weight: bold;
    text-transform: uppercase;
}

.cv-content a {
    color: blue;
    text-decoration: underline;
}

/* My Computer / Folder Window */
.folder-window {
    width: 550px;
    max-width: 90%;
    height: 350px;
    position: absolute;
    top: 100px;
    left: 200px;
    z-index: 10;
    flex-direction: column !important;
    box-sizing: border-box;
}

.window.folder-window .window-body {
    flex: 1 1 0 !important;
    display: flex !important;
    flex-direction: column !important;
    overflow: hidden !important;
    margin: 3px;
    padding: 0;
    min-height: 0 !important;
}

.folder-content {
    background: white;
    border: inset 2px;
    padding: 20px;
    display: flex;
    flex-wrap: wrap;
    gap: 25px;
    flex: 1 1 0;
    overflow-y: auto;
    align-content: flex-start;
}

.folder-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100px;
    cursor: pointer;
    text-align: center;
    padding: 5px;
}

.folder-item img {
    width: 32px;
    height: 32px;
    margin-bottom: 4px;
}

.folder-item span {
    font-size: 11px;
    font-family: "MS Sans Serif", Arial, sans-serif;
    word-break: break-word;
}

.folder-item:hover {
    background: #000080;
    color: white;
}

.folder-item:active img {
    filter: brightness(0.5);
}

/* Mail Window */
.mail-window {
    width: 500px;
    max-width: 90%;
    height: 400px;
    position: absolute;
    top: 80px;
    left: 300px;
    z-index: 10;
    flex-direction: column !important;
    box-sizing: border-box;
}

.window.mail-window .window-body {
    flex: 1 1 0 !important;
    display: flex !important;
    flex-direction: column !important;
    overflow: hidden !important;
    margin: 3px;
    padding: 0;
    min-height: 0 !important;
}

.mail-form {
    display: flex;
    flex-direction: column;
    flex: 1 1 0;
    min-height: 0;
    padding: 5px;
    gap: 4px;
}

.mail-field {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 2px 0;
    border-bottom: 1px solid #c0c0c0;
}

.mail-field label {
    font-family: "MS Sans Serif", Arial, sans-serif;
    font-size: 12px;
    font-weight: bold;
    width: 55px;
    flex-shrink: 0;
}

.mail-field input {
    flex: 1;
    border: 1px solid #808080;
    padding: 2px 4px;
    font-family: "MS Sans Serif", Arial, sans-serif;
    font-size: 12px;
}

.mail-body-field {
    flex: 1 1 0;
    display: flex;
    min-height: 0;
}

.mail-body-field textarea {
    flex: 1;
    border: inset 2px;
    padding: 5px;
    font-family: "MS Sans Serif", Arial, sans-serif;
    font-size: 12px;
    resize: none;
}

.mail-toolbar {
    padding: 4px 0;
    display: flex;
    gap: 5px;
    flex-shrink: 0;
}

.mail-toolbar button {
    font-family: "MS Sans Serif", Arial, sans-serif;
    font-size: 12px;
    font-weight: bold;
    padding: 3px 20px;
}

/* Print Styles - EXACT COPY of Original + Reset for Window wrappers */
@media print {

    /* Hide UI elements */
    .title-bar,
    .toolbar,
    .status-bar,
    .screen-only,
    .folder-window,
    .mail-window {
        display: none !important;
    }

    /* Remove browser default headers/footers */
    @page {
        margin: 0.5cm;
        size: auto;
    }

    body {
        background-color: white !important;
        margin: 0 !important;
        padding: 0 !important;
        /* Reduce base font size slightly to fit one page */
        font-size: 13px !important;
        width: 100%;
    }

    .screen-layout {
        display: block !important;
        padding: 0 !important;
    }

    .main-window {
        width: 100% !important;
        box-shadow: none !important;
        margin: 0 !important;
    }

    /* Undo 98.css window styles */
    .window {
        box-shadow: none !important;
        border: none !important;
        background: transparent !important;
    }

    .window-body {
        margin: 0 !important;
    }

    .cv-content {
        border: none !important;
        background: transparent !important;
        height: auto !important;
        overflow: visible !important;
        padding: 0 !important;
        margin: 0 auto !important;
        width: 100% !important;
    }

    /* ORIGINAL CV STYLES RESTORED & OPTIMIZED FOR ONE PAGE */

    /* Reset and basic styling */
    * {
        margin: 0;
        padding: 0;
        box-sizing: border-box;
        font-family: Arial, sans-serif;
    }

    body {
        color: #333;
        line-height: 1.4;
        /* Slightly tighter line height */
    }

    /* Header and basic info */
    header {
        text-align: center;
        margin-bottom: 10px;
        /* Reduced margin */
    }

    h1 {
        font-size: 20px;
        /* Reduced from 24px */
        margin-bottom: 5px;
        font-family: Arial, sans-serif;
        color: #333;
    }

    .contact-info {
        font-size: 12px;
        margin-bottom: 5px;
    }

    /* Section dividers */
    .section-divider {
        border-top: 1px solid #000;
        margin: 8px 0;
        /* Reduced from 15px */
    }

    /* Section headings */
    .section-heading {
        font-size: 14px;
        /* Reduced from 16px */
        font-weight: bold;
        text-transform: uppercase;
        margin-bottom: 5px;
        /* Reset retro styles */
        background: transparent;
        color: #333;
        padding: 0;
        font-family: Arial, sans-serif;
    }

    /* Profile section */
    .profile {
        margin-bottom: 10px;
        /* Reduced from 20px */
    }

    /* Two-column layouts */
    .two-column {
        display: flex;
        justify-content: space-between;
    }

    .column-left {
        width: 25%;
        /* Adjusted column width */
    }

    .column-right {
        width: 73%;
    }

    /* Education section */
    .education {
        margin-bottom: 10px;
    }

    /* Languages section */
    .languages {
        margin-bottom: 10px;
    }

    .language-item {
        display: flex;
        justify-content: space-between;
        margin-bottom: 2px;
    }

    /* Experience section */
    .experience {
        margin-bottom: 10px;
    }

    .job {
        margin-bottom: 8px;
        /* Reduced from 15px */
    }

    .job-company {
        font-weight: bold;
    }

    .job-title {
        font-style: italic;
    }

    .job-period {
        font-size: 12px;
    }

    .job-details {
        margin-top: 3px;
        /* Reduced from 10px */
    }

    .job-details ul {
        padding-left: 15px;
    }

    /* Links with simple underlines - BLACK COLOR FIX */
    a {
        color: #000 !important;
        /* Force black color */
        text-decoration: none;
        /* No underline for cleaner print, or keep underline if desired */
    }

    a[href]:after {
        content: none !important;
    }

    /* Profiles section */
    .profiles {
        margin-bottom: 10px;
    }

    .profile-item {
        display: grid;
        grid-template-columns: 80px 140px 1fr;
        margin-bottom: 2px;
        gap: 5px;
    }

    .profile-platform {
        font-weight: normal;
    }

    .profile-handle {
        font-weight: normal;
    }

    /* Certifications section */
    .certifications {
        margin-bottom: 10px;
    }

    .cert-list {
        list-style-type: disc;
        padding-left: 15px;
    }

    .cert-list li {
        margin-bottom: 2px;
    }

    .cert-list .sublist {
        list-style-type: circle;
        padding-left: 15px;
        margin-top: 1px;
    }

    .cert-list .subitem {
        margin-left: 5px;
        display: block;
        position: relative;
        padding-left: 10px;
        font-size: 0.95em;
        /* Slightly smaller subtext */
    }

    .cert-list .subitem:before {
        content: "○";
        position: absolute;
        left: 0;
        font-size: 8px;
        top: 3px;
    }

    /* Events section */
    .events {
        margin-bottom: 10px;
    }

    .events-list {
        list-style-type: disc;
        padding-left: 15px;
    }

    .events-list li {
        margin-bottom: 2px;
    }

    .events-list .sublist {
        list-style-type: circle;
        padding-left: 15px;
        margin-top: 1px;
    }

    .events-list .subitem {
        margin-left: 5px;
        display: block;
        position: relative;
        padding-left: 10px;
    }

    .events-list .subitem:before {
        content: "○";
        position: absolute;
        left: 0;
        font-size: 8px;
        top: 3px;
    }
}

/* Resizers */
.resizer-r {
    width: 5px;
    height: 100%;
    position: absolute;
    right: 0;
    top: 0;
    cursor: e-resize;
    z-index: 100;
}

.resizer-l {
    width: 5px;
    height: 100%;
    position: absolute;
    left: 0;
    top: 0;
    cursor: w-resize;
    z-index: 100;
}

.resizer-b {
    width: 100%;
    height: 5px;
    position: absolute;
    bottom: 0;
    left: 0;
    cursor: s-resize;
    z-index: 100;
}

.resizer-br {
    width: 10px;
    height: 10px;
    position: absolute;
    bottom: 0;
    right: 0;
    cursor: se-resize;
    z-index: 101;
}

/* Clippy Popup */
.clippy-popup {
    position: fixed;
    bottom: 50px;
    right: 30px;
    display: flex;
    align-items: flex-end;
    gap: 10px;
    z-index: 10000;
    opacity: 0;
    pointer-events: none;
    transform: translateY(20px);
    transition: opacity 0.3s ease, transform 0.3s ease;
}

.clippy-popup.show {
    opacity: 1;
    pointer-events: auto;
    transform: translateY(0);
}

.clippy-popup.fade-out {
    opacity: 0;
    transform: translateY(20px);
}



.clippy-bubble {
    background: #ffffcc;
    border: 2px solid #000;
    border-radius: 10px;
    padding: 12px 15px;
    max-width: 220px;
    font-family: "MS Sans Serif", Arial, sans-serif;
    font-size: 12px;
    box-shadow: 3px 3px 0 rgba(0, 0, 0, 0.3);
    position: relative;
}

.clippy-bubble::before {
    content: "";
    position: absolute;
    left: -10px;
    bottom: 20px;
    border: 8px solid transparent;
    border-right-color: #000;
}

.clippy-bubble::after {
    content: "";
    position: absolute;
    left: -6px;
    bottom: 22px;
    border: 6px solid transparent;
    border-right-color: #ffffcc;
}

/* Print Styles */
/* Clippy Sprite */
.clippy-img {
    width: 124px;
    height: 93px;
    background: url('https://raw.githubusercontent.com/smore-inc/clippy.js/master/agents/Clippy/map.png') no-repeat;
    background-position: -124px -93px;
    /* Frame roughly in the middle/idle */
    background-size: auto;
    flex-shrink: 0;
}