/* filepath: d:\repositories\portfolio-page\styles.css */
:root {
    --bg: #071229;
    --panel: #0b1930;
    --muted: #9ab6c8;
    --muted-strong: #c8e0ef;
    --accent: #3a88ff;
    --accent_selected: #1f6fff;
    --glass: rgba(58, 136, 255, 0.02);
    --glass-strong: rgba(58, 136, 255, 0.04);
}


.prompt {
    color: var(--accent);
    margin-right: 8px
}

.cmd {
    color: #e6eef3
}

.output {
    color: var(--muted);
}

* {
    box-sizing: border-box;
}

html,
body {
    height: 100%;
    margin: 0;
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, 'Roboto Mono', 'Segoe UI Mono', monospace;
    background: var(--bg);
    color: var(--muted);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

.topbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 20px;
    background: linear-gradient(90deg, rgba(255, 255, 255, 0.02), transparent);
    border-bottom: 1px solid rgba(255, 255, 255, 0.02);
    position: sticky;
    top: 0;
    z-index: 15;
}

.brand {
    color: var(--accent);
    font-weight: 700
}

.top-controls { display: flex; align-items: center; gap: 8px; }
.top-btn {
    background: transparent;
    border: none;
    color: var(--muted-strong);
    font-size: 18px;
    cursor: pointer;
    padding: 6px;
    border-radius: 6px;
}
.top-btn:hover { background: rgba(255,255,255,0.02); color: var(--accent); }

a {
    color: var(--accent);
    text-decoration: none
}

a:hover {
    color: var(--accent_selected);
    text-decoration: underline
}

.nav a {
    color: var(--muted);
    text-decoration: none;
    margin-left: 14px;
}

.nav a:hover {
    color: #fff
}

main {
    padding: 40px 32px;
    max-width: 1280px;
    margin: 0 auto;
}

.terminal-section {
    display: grid;
    grid-template-columns: 1fr 260px;
    gap: 36px;
    align-items: start;
    margin-bottom: 40px;
}

.terminal {
    background: linear-gradient(180deg, var(--panel), rgba(6, 10, 14, 0.75));
    border-radius: 14px;
    padding: 28px 24px;
    border: 1.5px solid rgba(255, 255, 255, 0.05);
    box-shadow: 0 8px 40px rgba(2, 6, 8, 0.8);
    min-width: 320px;
}

.term-title {
    color: var(--muted);
    font-size: 15px;
    padding: 10px 0 14px 0;
    border-bottom: 1px dashed rgba(255, 255, 255, 0.04);
    margin-bottom: 18px;
}

.term-body {
    padding: 0 4px;
    font-size: 17px;
    line-height: 1.7;
}

.line,
.output {
    margin-bottom: 14px;
}

.projects-list,
.education-list,
.gamejam-list {
    display: flex;
    gap: 18px;
    flex-wrap: wrap;
    margin-bottom: 24px;
}

.whoami-item,
.whatido-item,
.project-card,
.education-item,
.gamejam-item {
    background: var(--glass);
    padding: 18px 16px;
    border-radius: 10px;
    border: 1.5px solid rgba(255, 255, 255, 0.04);
    min-width: 220px;
    margin-bottom: 8px;
    box-shadow: 0 2px 8px rgba(2, 6, 8, 0.08);
}

.skills {
    margin: 12px 0 0 18px;
    padding: 0;
    font-size: 15px;
    line-height: 1.6;
}

.skills li {
    margin-bottom: 6px;
}

.content {
    margin-top: 44px;
    padding: 32px 24px;
    background: transparent;
}

.content h2 {
    color: #e7f2ff;
    margin-bottom: 18px;
}

.grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 18px;
}

.card {
    background: #08121a;
    padding: 18px;
    border-radius: 10px;
    border: 1.5px solid rgba(255, 255, 255, 0.04);
}

.btn {
    display: inline-block;
    margin-top: 14px;
    padding: 8px 16px;
    background: transparent;
    border: 1.5px solid var(--accent);
    color: var(--accent);
    text-decoration: none;
    border-radius: 8px;
    font-size: 15px;
}

.btn:hover {
    background: rgba(58, 136, 255, 0.09);
    color: var(--accent_selected);
}

.ascii pre {
    margin: 0;
    color: #7fbfff;
    font-size: 13px;
    line-height: 1.1;
    padding: 12px 0 0 0;
}

.window {
    display: flex;
    flex-direction: column;
    position: absolute;
    background: var(--panel);
    border: 2px solid var(--accent);
    border-radius: 10px;
    box-shadow: 0 8px 40px rgba(2, 6, 8, 0.8);
    z-index: 10;
    min-width: 320px;
    min-height: 200px;
    overflow: hidden;
    transition: box-shadow 0.2s, border-color 0.2s;
}

.window.focused {
    z-index: 100;
    border-color: #fff;
    box-shadow: 0 12px 48px 0 rgba(58, 136, 255, 0.25);
}

.window.minimized .window-content,
.window.minimized .window-resizer {
    display: none;
}

.window.maximized {
    top: 0 !important;
    left: 0 !important;
    width: 100vw !important;
    height: 100vh !important;
    border-radius: 0 !important;
}

.window-titlebar {
    background: linear-gradient(90deg, var(--accent), var(--panel) 80%);
    color: #fff;
    padding: 0 12px;
    height: 36px;
    display: flex;
    align-items: center;
    cursor: move;
    user-select: none;
    justify-content: space-between;
}

.window-title {
    font-weight: bold;
    font-size: 15px;
    letter-spacing: 0.5px;
}

.window-controls {
    display: flex;
    gap: 6px;
}

.window-btn {
    width: 16px;
    height: 16px;
    border-radius: 50%;
    border: none;
    margin-left: 2px;
    background: #fff3;
    cursor: pointer;
    transition: background 0.2s;
}

.window-btn:hover {
    filter: brightness(1.2);
}

.window-minimize {
    background: #f4c542;
}

.window-maximize {
    background: #43d26a;
}

.window-close {
    background: #e05c5c;
}

.window-popout {
    width: 32px;
    height: 16px;
    border-radius: 5%;
    border: none;
    cursor: pointer;
    transition: background 0.2s;
    background: #24c8db;
}

.window-popout:hover {
    background: #24c8ff;
    filter: brightness(1.2);
}

/*
.window-minimize { background: #7fcfff; }
.window-maximize { background: #3a88ff; }
.window-close { background: #1e4b8b; }
*/

.window-content {
    position: relative;
    z-index: 1;
    flex: 1 1 auto;
    overflow: auto;
    padding: 0;
    width: 100%;
    height: calc(100% - 36px);
    /* match your titlebar height */
    border: none;
    display: block;
    background: transparent;
    flex: 1 1 auto;
}

.window-content iframe {
    position: relative;
    z-index: 2;
    pointer-events: auto;
    width: 100%;
    height: 100%;
    border: none;
    display: block;
    background: transparent;
    flex: 1 1 auto;
}

.window-resizer {
    position: absolute;
    right: 0;
    bottom: 0;
    width: 18px;
    height: 18px;
    cursor: se-resize;
    background: linear-gradient(135deg, transparent 60%, var(--accent) 100%);
    z-index: 2;
}

/* Responsive: windows fill screen on mobile */
@media (max-width: 700px) {
    .window {
        left: 0 !important;
        top: 0 !important;
        width: 100vw !important;
        height: 100vh !important;
        border-radius: 0 !important;
    }
}

@media (max-width: 1100px) {
    main {
        padding: 24px 8px;
    }

    .terminal-section {
        grid-template-columns: 1fr;
        gap: 24px;
    }

    .ascii {
        order: 2;
        margin-top: 24px;
    }
}

@media (max-width: 820px) {
    .ascii {
        order: 2;
        display: block;
    }

    .brand {
        font-size: 16px;
    }

    .terminal,
    .card,
    .project-card,
    .education-item,
    .gamejam-item {
        min-width: 0;
        width: 100%;
    }

    .terminal-section {
        gap: 16px;
    }
}

@media (max-width: 420px) {
    .ascii {
        display: none;
    }

    .brand {
        font-size: 12px;
    }

    .terminal,
    .card,
    .project-card,
    .education-item,
    .gamejam-item {
        padding: 10px 4px;
    }

    .content {
        padding: 12px 2px;
    }
}

@media (max-width: 200px) {
    .ascii {
        display: none;
    }

    .brand {
        font-size: 12px;
    }

    .topbar {
        padding: 10px 14px;
    }

    .terminal-section {
        padding: 0%;
    }

    .project-card,
    .education-item,
    .gamejam-item {
        min-width: 140px;
        padding: 0%;
        align-items: center;
        justify-content: center;
    }
}

.desktop {
    position: fixed;
    inset: 0;
    z-index: 0;
    background: var(--bg);
    overflow: hidden;
    display: grid;
    grid-template-columns: repeat(auto-fill, 90px);
    grid-auto-rows: 90px;
    gap: 24px 12px;
    align-content: start;
    padding: 70px 32px 80px 32px;
    /*
    padding: 32px 32px 80px 32px;
*/
    pointer-events: none;
    justify-content: flex-start;
}

/* Rows-mode: allow per-row variable heights and honor .row-break elements.
   Enable by setting `data-rows-mode="true"` on `#desktop` or the system will auto-enable
   if a `.row-break` or `.shortcut.start-line` exists. */
.desktop.rows-mode {
    grid-auto-rows: minmax(0, auto);
}

.shortcut {
    width: 72px;
    height: auto;
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    gap: 6px;
    /* automatic spacing between icon and title */
    padding: 8px 6px;
    vertical-align: top;
    margin: 0 12px 12px 0;
    cursor: pointer;
    user-select: none;
    pointer-events: auto;
    background: rgba(255, 255, 255, 0.01);
    border-radius: 8px;
    transition: background 0.15s;
    text-align: center;
    min-height: 76px;
}

.shortcut:hover {
    background: rgba(58, 136, 255, 0.08);
}
.shortcut.encrypted {
    opacity: 0.7;
    filter: grayscale(60%);
}
.folder-item.encrypted {
    opacity: 0.75;
    filter: grayscale(60%);
}

.shortcut .icon {
    font-size: 28px;
    width: 48px;
    height: 48px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
}

/* Text preset used inside the icon area for encrypted shortcuts */
.shortcut.encrypted .icon .icon-text,
.folder-item.encrypted .icon .icon-text {
    font-size: 0.6em;
    line-height: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2.2em;
    height: 2.2em;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* Support PNG/SVG icons placed inside the .icon container */
.shortcut .icon img,
.folder-panel .shortcut .icon img,
.folder-item .icon img {
    width: 100%;
    height: 100%;
    display: block;
    object-fit: contain;
}

/* If the .icon element is an <img> itself (e.g. <img class="icon" src="...") */
.shortcut>img.icon,
.folder-panel .shortcut>img.icon,
.folder-item>img.icon {
    width: 48px;
    height: 48px;
    display: block;
    object-fit: contain;
}

.shortcut span {
    color: #fff;
    font-size: 13px;
    text-align: center;
    text-shadow: 0 1px 2px #000a;
    word-break: break-word;
    line-height: 1.2;
    display: block;
    max-width: 100%;
}

/* Folder support: a popup panel of shortcuts anchored to the folder */
.shortcut.folder {
    position: relative;
}

.folder-panel {
    position: absolute;
    top: 0;
    left: calc(100% + 8px);
    display: none;
    grid-auto-rows: auto;
    grid-template-columns: repeat(auto-fill, minmax(72px, 1fr));
    gap: 8px;
    padding: 10px;
    background: rgba(6, 10, 14, 0.95);
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.04);
    box-shadow: 0 8px 40px rgba(2, 6, 8, 0.8);
    z-index: 60;
    pointer-events: auto;
}

.shortcut.folder.open .folder-panel {
    display: grid;
}

.folder-panel .shortcut {
    width: 72px;
    height: auto;
    margin: 0;
    padding: 6px 4px;
    background: transparent;
}

.folder-panel .shortcut .icon {
    font-size: 1.9em;
}

/* Hide desktop entries that are assigned to folders (they live inside the folder UI) */
.shortcut[data-parent] {
    display: none;
}

/* Folder window item styling (used by script-created folder windows) */
.folder-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    gap: 6px;
    padding: 8px 6px;
    background: rgba(255, 255, 255, 0.01);
    border-radius: 8px;
    cursor: pointer;
    min-height: 72px;
}

.folder-item .icon {
    font-size: 1.9em;
}

.folder-item .label {
    color: #fff;
    font-size: 13px;
    text-align: center;
    line-height: 1.1;
    max-width: 88px;
    overflow: hidden;
}

.folder-item:hover {
    background: rgba(58, 136, 255, 0.06);
}

.taskbar {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    height: 44px;
    background: linear-gradient(90deg, #0b1220 80%, #3a88ff22);
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 0 12px;
    z-index: 1000;
    border-top: 1.5px solid #2226;
}

.taskbar-btn {
    background: none;
    border: none;
    color: #fff;
    margin: 0 4px;
    padding: 0 12px;
    height: 32px;
    border-radius: 6px;
    display: flex;
    align-items: center;
    gap: 6px;
    cursor: pointer;
    font-size: 15px;
    transition: background 0.15s;
}

.taskbar-btn.active,
.taskbar-btn:hover {
    background: #3a88ff33;
    color: var(--accent);
}

/* Desktop grid row-break and start-line support
   Usage:
     - Insert <div class="row-break"></div> between shortcuts to force following items onto a new row.
     - To add visible vertical spacing, give it an inline height: <div class="row-break" style="height:24px"></div>
     - Or add `start-line` to a shortcut to attempt a new-line start: <div class="shortcut start-line">...</div>
*/
.desktop .row-break {
    grid-column: 1 / -1;
    height: 0;
    /* default: create a break with no visible gap; set inline style to add spacing */
    pointer-events: none;
}

.shortcut.start-line {
    grid-column-start: 1;
}

/* Desktop-row support: allow explicit row groups that are pre-spaced.
   - Author rows as <div class="desktop-row">...shortcuts...</div>
   - On large screens `.desktop.rows-mode` displays rows as horizontal flex lines.
   - On small screens rows are collapsed into the original grid by using `display: contents`.
*/
.desktop.rows-mode {
    /* switch out of grid layout so rows can act as horizontal containers */
    display: block;
}

.desktop.rows-mode .desktop-row {
    display: flex;
    gap: 24px 12px;
    /* vertical-gap horizontal-gap (keeps original spacing) */
    align-items: flex-start;
    justify-content: flex-start;
    flex-wrap: nowrap;
    padding: 6px 0;
    /* small vertical padding between rows */
    pointer-events: none;
    /* preserve desktop-level pointer handling; shortcuts override to auto */
}

.desktop.rows-mode .desktop-row .shortcut {
    pointer-events: auto;
    /* enable pointer events for shortcuts inside rows */
    margin: 0;
    /* manage spacing via row gap */
}

/* Responsive: collapse desktop-row containers into the main grid on small screens so
   shortcuts combine/wrap naturally into the same responsive layout as before. */
@media (max-width: 820px) {
    .desktop.rows-mode {
        display: grid;
        grid-template-columns: repeat(auto-fill, 90px);
        grid-auto-rows: 90px;
        gap: 24px 12px;
        align-content: start;
    }

    .desktop.rows-mode .desktop-row {
        display: contents;
        /* make shortcuts behave like direct children of the desktop grid */
        padding: 0;
    }
}

/* Protected content - hidden until unlocked via password */
.protected {
    display: none !important;
}
body.protected-unlocked .protected {
    display: block !important;
}