* {
    box-sizing: border-box;
}

body {
    margin: 0;
    min-height: 100vh;
    overflow: hidden;
    font-family: Arial, Helvetica, sans-serif;
    background: url("./desktop.png.jpg") center / cover no-repeat;
    color: #222;
}


/* =========================
   TOP BAR
   ========================= */

.topbar {
    position: absolute;
    top: 0;
    left: 0;

    width: 100%;
    height: 48px;

    display: flex;
    align-items: center;
    justify-content: space-between;

    padding: 0 12px;

    background: #202020;
    border-bottom: 2px solid #111;

    color: white;

    z-index: 1000;
}

.osbutton {
    padding: 6px 10px;

    border: 1px solid #555;
    background: #303030;

    color: white;

    font-size: 16px;
    font-weight: bold;

    cursor: pointer;
}

.osbutton:hover {
    background: #414141;
}

.topbar-right {
    display: flex;
    align-items: center;
    gap: 12px;
}

.clock {
    font-size: 13px;
}

#dateElement {
    color: #ddd;
}

#timeElement {
    color: white;
    font-weight: bold;
}

.shutdown-btn {
    width: 30px;
    height: 28px;

    border: 1px solid #666;
    background: #303030;

    color: white;

    cursor: pointer;
    font-size: 16px;
}

.shutdown-btn:hover {
    background: #4a4a4a;
}


/* =========================
   DESKTOP APPS
   ========================= */

#desktopApps {
    position: absolute;

    top: 70px;
    left: 18px;

    display: flex;
    flex-direction: column;
    gap: 12px;

    z-index: 1;
}

.appicon {
    width: 90px;
    padding: 7px;

    text-align: center;

    color: white;

    cursor: pointer;

    border: 1px solid transparent;
}

.appicon:hover {
    background: rgba(0, 0, 0, 0.45);
    border: 1px solid white;
}

.appicon.selected {
    background: rgba(0, 0, 0, 0.55);
    border: 1px solid white;
}

.app-emoji {
    width: 52px;
    height: 52px;

    margin: 0 auto 5px;

    display: flex;
    align-items: center;
    justify-content: center;

    background: #eeeeee;
    border: 2px solid #444;

    font-size: 27px;
}

.appicon p {
    margin: 0;

    font-size: 13px;

    text-shadow: 1px 1px 2px #000;
}


/* =========================
   WINDOWS
   ========================= */

.window {
    position: absolute;

    display: none;
    flex-direction: column;

    min-width: 320px;

    background: #eeeeee;

    border: 2px solid #202020;

    box-shadow: 5px 5px 0 rgba(0, 0, 0, 0.45);

    color: #222;

    overflow: hidden;
}

.windowheader {
    height: 34px;

    display: flex;
    align-items: center;

    padding: 0 6px;

    background: #303030;

    border-bottom: 2px solid #111;

    color: white;

    cursor: move;

    user-select: none;
}

.windowheader .headertext {
    margin: 0;

    flex: 1;

    text-align: center;

    font-size: 14px;
    font-weight: bold;
}

.window-controls {
    width: 70px;
}

.header-spacer {
    width: 70px;
}

.closebutton {
    width: 24px;
    height: 22px;

    padding: 0;

    border: 1px solid #777;

    background: #444;

    color: white;

    font-size: 17px;
    line-height: 18px;

    cursor: pointer;
}

.closebutton:hover {
    background: #b52b2b;
}


/* =========================
   WELCOME
   ========================= */

.welcome-window {
    top: 130px;
    left: calc(50% - 260px);

    width: 520px;
}

.windowcontent {
    padding: 22px;

    background: #f3f3f3;
}

.windowcontent h1 {
    margin-top: 0;
    margin-bottom: 8px;

    font-size: 25px;
}

.windowcontent h2 {
    margin-top: 0;

    font-size: 16px;
    font-weight: normal;

    color: #555;
}

.windowcontent p {
    line-height: 1.5;
}

.small-text {
    margin-top: 22px;

    color: #777;

    font-size: 12px;
}


/* =========================
   NOTES
   ========================= */

.notes-window {
    top: 100px;
    left: 120px;

    width: 650px;
    height: 430px;
}

.notes-app {
    display: flex;

    height: 396px;

    background: white;
}

.notes-sidebar {
    width: 170px;

    padding: 8px;

    overflow-y: auto;

    background: #dedede;
    border-right: 2px solid #aaa;
}

.note-item {
    margin-bottom: 6px;
    padding: 9px;

    border: 1px solid #aaa;

    background: #f4f4f4;

    cursor: pointer;
}

.note-item:hover {
    background: #e8e8e8;
}

.note-item.active {
    background: #cfcfcf;
    border-color: #555;
}

.note-title {
    margin: 0 0 4px;

    font-size: 14px;
    font-weight: bold;
}

.note-date {
    margin: 0;

    color: #777;

    font-size: 11px;
}

.notes-content {
    flex: 1;

    padding: 20px;

    overflow-y: auto;

    background: #fff;
}

.notes-content h1 {
    margin-top: 0;

    font-size: 24px;
}

.notes-content h2 {
    font-size: 18px;
}

.notes-content p,
.notes-content li {
    line-height: 1.5;
}

.notes-content blockquote {
    margin-left: 0;
    padding: 10px 14px;

    border-left: 4px solid #555;

    background: #eeeeee;

    color: #444;
}


/* =========================
   PROJECTS
   ========================= */

.projects-window {
    top: 90px;
    left: 190px;

    width: 720px;
    max-height: 540px;
}

.projects-content {
    padding: 18px;

    overflow-y: auto;

    background: #f5f5f5;
}

.projects-top {
    display: flex;
    justify-content: space-between;

    gap: 20px;

    margin-bottom: 16px;
}

.eyebrow {
    margin: 0 0 5px;

    font-size: 11px;
    font-weight: bold;

    color: #666;
}

.projects-top h1 {
    margin: 0 0 5px;

    font-size: 25px;
}

.projects-description {
    margin: 0;

    color: #555;

    line-height: 1.4;
}

.project-count {
    height: fit-content;

    padding: 7px 10px;

    border: 1px solid #999;

    background: white;

    white-space: nowrap;

    font-size: 13px;
}

.project-grid {
    display: grid;

    grid-template-columns: repeat(2, minmax(0, 1fr));

    gap: 12px;
}

.project-card {
    padding: 13px;

    border: 1px solid #999;

    background: white;
}

.project-card h2 {
    margin: 8px 0;

    font-size: 18px;
}

.project-card p {
    margin: 0 0 12px;

    color: #555;

    font-size: 13px;
    line-height: 1.4;
}

.project-status {
    display: inline-block;

    padding: 3px 6px;

    border: 1px solid #888;

    background: #eeeeee;

    font-size: 11px;
}

.project-tech {
    display: flex;
    flex-wrap: wrap;

    gap: 5px;

    margin-bottom: 12px;
}

.tech-tag {
    padding: 3px 6px;

    border: 1px solid #aaa;

    background: #f1f1f1;

    font-size: 11px;
}

.project-link {
    color: #174f9e;

    font-size: 13px;
}

.project-link:hover {
    color: #0b2f64;
}


/* =========================
   CALCULATOR
   ========================= */

.calculator-window {
    top: 120px;
    left: 320px;

    width: 300px;
}

.calculator-app {
    padding: 12px;

    background: #d7d7d7;
}

.calc-display {
    height: 58px;

    display: flex;
    align-items: center;
    justify-content: flex-end;

    margin-bottom: 10px;
    padding: 8px;

    border: 2px solid #555;

    background: white;

    font-family: "Courier New", monospace;
    font-size: 26px;

    overflow: hidden;
}

.calc-buttons {
    display: grid;

    grid-template-columns: repeat(4, 1fr);

    gap: 5px;
}

.calc-btn {
    height: 48px;

    border: 1px solid #777;

    background: #f5f5f5;

    font-size: 17px;

    cursor: pointer;
}

.calc-btn:hover {
    background: #e2e2e2;
}

.calc-btn:active {
    background: #cccccc;
}

.op-btn {
    background: #dddddd;
}

.equals-btn {
    background: #cfcfcf;

    font-weight: bold;
}

.zero-btn {
    grid-column: span 2;
}


/* =========================
   WEATHER
   ========================= */

.weather-window {
    top: 140px;
    left: 410px;

    width: 430px;
}

.weather-app {
    padding: 18px;

    background: #f4f4f4;
}

.weather-input label {
    display: block;

    margin-bottom: 6px;

    font-weight: bold;

    font-size: 13px;
}

.city-row {
    display: flex;
    gap: 7px;
}

.city-row input {
    flex: 1;

    min-width: 0;

    padding: 9px;

    border: 1px solid #777;

    background: white;

    font-family: Arial, Helvetica, sans-serif;
}

.city-row button {
    padding: 8px 12px;

    border: 1px solid #555;

    background: #333;

    color: white;

    cursor: pointer;
}

.city-row button:hover {
    background: #4b4b4b;
}

.weather-result {
    min-height: 130px;

    margin-top: 14px;
    padding: 14px;

    border: 1px solid #999;

    background: white;
}

.weather-city {
    font-size: 18px;
    font-weight: bold;
}

.weather-temp {
    margin: 8px 0;

    font-size: 34px;
    font-weight: bold;
}

.weather-condition {
    margin-bottom: 10px;

    color: #444;
}

.weather-details {
    color: #666;

    font-size: 12px;
}

.weather-error {
    color: #a00000;
}

.weather-loading {
    color: #555;
}

.weather-note {
    margin-top: 10px;

    color: #777;

    font-size: 11px;
}


/* =========================
   ABOUT
   ========================= */

.about-window {
    top: 150px;
    left: 330px;

    width: 460px;
}

.about-content {
    padding: 24px;

    text-align: center;

    background: #f5f5f5;
}

.about-emoji {
    width: 70px;
    height: 70px;

    display: flex;
    align-items: center;
    justify-content: center;

    margin: 0 auto 12px;

    border: 2px solid #555;

    background: white;

    font-size: 36px;
}

.about-content h1 {
    margin: 0 0 4px;
}

.about-version {
    margin-top: 0;

    color: #777;

    font-size: 12px;
}

.about-content > p:not(.about-version):not(.about-footer) {
    line-height: 1.5;
}

.about-features {
    display: grid;

    grid-template-columns: repeat(2, 1fr);

    gap: 7px;

    margin-top: 18px;
}

.about-feature {
    padding: 9px;

    border: 1px solid #aaa;

    background: white;

    font-size: 13px;
}

.about-footer {
    margin-top: 20px;

    color: #666;

    font-size: 12px;
}


/* =========================
   SMALL SCREENS
   ========================= */

@media (max-width: 800px) {

    #desktopApps {
        top: 60px;
        left: 8px;

        flex-direction: row;
        flex-wrap: wrap;

        width: 300px;
    }

    .window {
        left: 5% !important;

        width: 90% !important;

        max-width: none;
    }

    .project-grid {
        grid-template-columns: 1fr;
    }

    .notes-window {
        height: 420px;
    }

    .notes-app {
        height: 386px;
    }

    .topbar-right .clock:first-child {
        display: none;
    }
}
