:root {
    /* Fluent Design Variables */
    --acrylic-bg: rgba(32, 32, 32, 0.65);
    --acrylic-solid: #202020;
    --mica-bg: rgba(40, 40, 40, 0.85);
    --border-color: rgba(255, 255, 255, 0.1);
    --accent: #60CDFF;
    --accent-dark: #0078D4;
    --text-primary: #ffffff;
    --text-secondary: rgba(255, 255, 255, 0.7);
    --hover-bg: rgba(255, 255, 255, 0.08);
    --active-bg: rgba(255, 255, 255, 0.12);
    --selection-bg: rgba(96, 205, 255, 0.3);
    --selection-border: #60CDFF;
    --window-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
    
    /* Layout */
    --taskbar-height: 48px;
    --grid-size-x: 84px;
    --grid-size-y: 104px;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    width: 100vw;
    height: 100vh;
    overflow: hidden;
    font-family: 'Segoe UI Variable', 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    color: var(--text-primary);
    background: url('assets/wallpapers/wallpaper1.png') no-repeat center center;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    user-select: none;
    -webkit-user-select: none;
}

/* Wallpaper Slideshow Layers */
.wallpaper-layer {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    opacity: 0;
    transition: opacity 1s ease;
    pointer-events: none;
    z-index: 0;
}

/* Glass & Acrylic Utilities */
.glass-effect {
    background: var(--mica-bg);
    backdrop-filter: blur(25px);
    -webkit-backdrop-filter: blur(25px);
    border: 1px solid var(--border-color);
    box-shadow: var(--window-shadow);
}

.acrylic-panel {
    background: var(--acrylic-bg);
    backdrop-filter: blur(30px);
    -webkit-backdrop-filter: blur(30px);
    border: 1px solid var(--border-color);
}

/* Desktop */
#desktop {
    position: relative;
    width: 100vw;
    height: calc(100vh - var(--taskbar-height));
    outline: none;
}

#selection-box {
    position: absolute;
    border: 1px solid var(--selection-border);
    background-color: var(--selection-bg);
    z-index: 9999;
    pointer-events: none;
}

/* Desktop Icons */
.desktop-icon {
    position: absolute;
    width: 74px;
    height: 86px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    padding: 6px 2px;
    border-radius: 4px;
    border: 1px solid transparent;
    cursor: default;
    transition: background 0.1s;
}

.desktop-icon:hover {
    background: var(--hover-bg);
}

.desktop-icon.selected {
    background: var(--selection-bg);
    border-color: rgba(255, 255, 255, 0.2);
}

.desktop-icon img {
    width: 48px;
    height: 48px;
    margin-bottom: 4px;
    pointer-events: none;
    filter: drop-shadow(0 2px 4px rgba(0,0,0,0.3));
}

.desktop-icon .icon-label {
    font-size: 11px;
    text-align: center;
    line-height: 1.2;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.8);
    word-wrap: break-word;
    max-width: 100%;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Taskbar */
#taskbar {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100vw;
    height: var(--taskbar-height);
    background: var(--acrylic-bg);
    backdrop-filter: blur(25px);
    -webkit-backdrop-filter: blur(25px);
    border-top: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
    z-index: 10000;
    padding: 0 12px;
}

.taskbar-left, .taskbar-right {
    display: flex;
    align-items: center;
    height: 100%;
}

.taskbar-center {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100%;
    gap: 4px;
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
}

.taskbar-btn {
    width: 40px;
    height: 40px;
    border-radius: 4px;
    border: none;
    background: transparent;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: background 0.15s, transform 0.1s;
    cursor: default;
    position: relative;
}

.taskbar-btn img {
    width: 24px;
    height: 24px;
}

.taskbar-btn:hover {
    background: var(--hover-bg);
}

.taskbar-btn:active {
    transform: scale(0.95);
}

.taskbar-btn.active::after {
    content: '';
    position: absolute;
    bottom: 0;
    width: 16px;
    height: 3px;
    background: var(--accent);
    border-radius: 2px;
}

.taskbar-btn.focused {
    background: var(--active-bg);
}

.taskbar-btn.focused::after {
    width: 24px;
}

.weather-widget {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px 12px;
    border-radius: 4px;
    cursor: default;
}

.weather-widget:hover {
    background: var(--hover-bg);
}

.weather-info {
    display: flex;
    flex-direction: column;
    font-size: 11px;
    line-height: 1.2;
}

.system-tray {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 0 12px;
    height: 100%;
    border-radius: 4px;
}

.system-tray:hover {
    background: var(--hover-bg);
}

.tray-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 4px;
    border: none;
    border-radius: 4px;
    background: transparent;
    color: inherit;
    cursor: pointer;
}
.tray-btn:hover {
    background: var(--active-bg);
}

.datetime {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    justify-content: center;
    padding: 0 12px;
    height: 100%;
    border-radius: 4px;
    font-size: 12px;
    line-height: 1.3;
}

.datetime:hover {
    background: var(--hover-bg);
}

#show-desktop {
    width: 4px;
    height: 100%;
    border-left: 1px solid rgba(255,255,255,0.2);
    margin-left: 4px;
}
#show-desktop:hover {
    background: rgba(255,255,255,0.2);
}

/* Start Menu */
#start-menu {
    position: absolute;
    bottom: calc(var(--taskbar-height) + 12px);
    left: 50%;
    transform: translateX(-50%) translateY(20px);
    width: 560px;
    height: 600px;
    border-radius: 8px;
    padding: 24px;
    display: flex;
    flex-direction: column;
    z-index: 9999;
    opacity: 0;
    pointer-events: none;
    transition: transform 0.25s cubic-bezier(0.1, 0.9, 0.2, 1), opacity 0.2s ease;
}

#start-menu:not(.hidden) {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
    pointer-events: all;
}

.start-search {
    display: flex;
    align-items: center;
    background: rgba(0,0,0,0.4);
    border: 1px solid var(--border-color);
    border-radius: 20px;
    padding: 8px 16px;
    margin-bottom: 16px;
    border-bottom: 2px solid var(--accent);
}

.start-search input {
    background: transparent;
    border: none;
    outline: none;
    color: white;
    width: 100%;
    margin-left: 12px;
    font-family: inherit;
    font-size: 14px;
}

.start-section-title {
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 16px;
    display: flex;
    justify-content: space-between;
}

.pinned-apps {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 16px;
    margin-bottom: 16px;
    height: auto;
    max-height: 200px;
    overflow-y: auto;
}

.pinned-app {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    padding: 12px 4px;
    border-radius: 4px;
}
.pinned-app:hover {
    background: var(--hover-bg);
}
.pinned-app img {
    width: 32px;
    height: 32px;
}
.pinned-app span {
    font-size: 12px;
}

.recommended-files {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
    flex-grow: 1;
    height: auto;
    max-height: 200px;
    overflow-y: auto;
}

.rec-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 8px 12px;
    border-radius: 4px;
}
.rec-item:hover {
    background: var(--hover-bg);
}
.rec-icon {
    font-size: 24px;
}
.rec-name {
    font-size: 13px;
    font-weight: 500;
}
.rec-time {
    font-size: 11px;
    color: var(--text-secondary);
}

/* Start Menu Search */
.start-search-results {
    display: flex;
    flex-direction: column;
    gap: 12px;
    flex-grow: 1;
    overflow-y: auto;
}
.start-search-results.hidden,
.start-section-title.hidden,
.pinned-apps.hidden,
.recommended-files.hidden {
    display: none;
}

.start-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 16px;
    border-top: 1px solid var(--border-color);
    margin-top: auto;
}

.user-profile {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 6px 12px;
    border-radius: 4px;
}
.user-profile:hover {
    background: var(--hover-bg);
}
.user-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: var(--accent);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
}

.power-btn {
    padding: 12px;
    border-radius: 4px;
}
.power-btn:hover {
    background: var(--hover-bg);
}

/* Power Menu (Restart / Shut Down) */
#power-menu {
    position: absolute;
    bottom: 64px;
    right: 24px;
    min-width: 190px;
    border-radius: 8px;
    padding: 4px;
    box-shadow: var(--window-shadow);
}
.power-menu-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 8px 16px;
    font-size: 13px;
    border-radius: 4px;
    cursor: default;
}
.power-menu-item:hover {
    background: var(--hover-bg);
}
.power-menu-item svg {
    color: var(--text-secondary);
}

/* Power Screen (Restart / Shut Down) */
#power-screen {
    position: fixed;
    inset: 0;
    z-index: 200000;
    background: #0b0d10;
    font-family: inherit;
}
#power-screen:not(.hidden) {
    display: flex;
    align-items: center;
    justify-content: center;
}
#power-screen.hidden {
    display: none;
}
.power-screen-stage {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 24px;
}
.power-dots {
    display: flex;
    gap: 8px;
}
.power-dots span {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: #fff;
    animation: powerPulse 1.2s ease-in-out infinite;
}
.power-dots span:nth-child(2) { animation-delay: .1s; }
.power-dots span:nth-child(3) { animation-delay: .2s; }
.power-dots span:nth-child(4) { animation-delay: .3s; }
.power-dots span:nth-child(5) { animation-delay: .4s; }
@keyframes powerPulse {
    0%, 100% { transform: scale(1); opacity: .35; }
    30% { transform: scale(1.35); opacity: 1; }
}
.power-screen-text {
    font-size: 15px;
    color: var(--text-secondary);
}
.power-off {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: space-between;
    padding: 48px 0;
    animation: powerFadeIn .5s ease both;
}
@keyframes powerFadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}
.power-off-title {
    font-size: 22px;
    color: var(--text-primary);
}
.power-signin {
    min-width: 180px;
    padding: 10px 24px;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    background: var(--mica-bg);
    color: var(--text-primary);
    font-family: inherit;
    font-size: 14px;
    cursor: pointer;
    transition: background .15s ease;
}
.power-signin:hover {
    background: var(--hover-bg);
}

/* Networking app rows */
.net-list {
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.net-row {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 12px 14px;
    border-radius: 6px;
    border: 1px solid var(--border-color);
    background: rgba(255, 255, 255, 0.03);
    cursor: pointer;
    transition: background .15s ease, border-color .15s ease;
}
.net-row:hover {
    background: var(--hover-bg);
    border-color: rgba(96, 205, 255, 0.35);
}
.net-icon {
    width: 40px;
    height: 40px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}
.net-icon svg {
    width: 40px;
    height: 40px;
    display: block;
}
.net-info {
    flex-grow: 1;
    min-width: 0;
}
.net-name {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-primary);
}
.net-account {
    font-size: 12px;
    color: var(--text-secondary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.net-open {
    font-size: 12px;
    color: var(--accent);
    flex-shrink: 0;
}

/* Widgets Panel */
#widgets-panel {
    position: absolute;
    right: 12px;
    bottom: calc(var(--taskbar-height) + 12px);
    width: 320px;
    max-height: min(560px, calc(100vh - var(--taskbar-height) - 40px));
    overflow-y: auto;
    border-radius: 8px;
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    z-index: 9999;
    opacity: 0;
    pointer-events: none;
    transform: translateX(24px);
    transition: transform 0.25s cubic-bezier(0.1, 0.9, 0.2, 1), opacity 0.2s ease;
}

#widgets-panel:not(.hidden) {
    opacity: 1;
    transform: translateX(0);
    pointer-events: all;
}

.widgets-title {
    font-size: 20px;
    font-weight: 600;
}

.widget-card {
    background: var(--mica-bg);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 14px;
}

.widget-card--profile {
    display: flex;
    align-items: center;
    gap: 12px;
    background: linear-gradient(135deg, rgba(37, 99, 235, 0.18), rgba(139, 92, 246, 0.12));
}

.widget-avatar {
    width: 44px;
    height: 44px;
    flex-shrink: 0;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    font-weight: 700;
    color: #fff;
    background: linear-gradient(135deg, #60c8ff, #2563eb);
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.4);
}

.widget-card-body {
    min-width: 0;
    flex: 1;
}

.widget-card-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 14px;
    font-weight: 600;
}

.widget-card-sub {
    margin-top: 6px;
    font-size: 12px;
    color: var(--text-secondary);
}

.widget-card-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.widget-chip {
    display: inline-flex;
    align-items: center;
    font-size: 11px;
    font-weight: 600;
    padding: 3px 10px;
    border-radius: 999px;
    color: var(--accent);
    background: color-mix(in srgb, var(--accent) 12%, transparent);
    border: 1px solid color-mix(in srgb, var(--accent) 30%, transparent);
}

.widget-project-tag {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.widget-link {
    display: inline-block;
    margin-top: 8px;
    padding: 0;
    border: 0;
    background: none;
    font: inherit;
    font-size: 12px;
    font-weight: 600;
    color: var(--accent);
    cursor: pointer;
}

.widget-link:hover {
    text-decoration: underline;
}

/* Context Menu */
#context-menu {
    position: absolute;
    width: 250px;
    border-radius: 8px;
    padding: 4px;
    z-index: 10001;
    box-shadow: var(--window-shadow);
    background: var(--acrylic-bg);
    -webkit-backdrop-filter: blur(30px);
    backdrop-filter: blur(30px);
}
#context-menu.hidden {
    display: none;
}
.menu-item {
    padding: 8px 16px;
    font-size: 13px;
    border-radius: 4px;
    display: flex;
    align-items: center;
    gap: 12px;
}
.menu-item:hover {
    background: var(--hover-bg);
}
.menu-divider {
    height: 1px;
    background: var(--border-color);
    margin: 4px 12px;
}
.menu-item .menu-caret {
    margin-left: auto;
    font-size: 14px;
    opacity: 0.7;
}
.menu-item.has-submenu {
    position: relative;
}
.menu-submenu {
    display: none;
    position: absolute;
    left: 100%;
    top: -5px;
    min-width: 190px;
    padding: 4px;
    border-radius: 8px;
    box-shadow: var(--window-shadow);
    background: var(--acrylic-bg);
    -webkit-backdrop-filter: blur(30px);
    backdrop-filter: blur(30px);
}
.menu-item.has-submenu:hover .menu-submenu,
.menu-item.has-submenu:focus-within .menu-submenu {
    display: block;
}

/* Inline rename */
.inline-rename {
    width: 108px;
    margin-top: 6px;
    padding: 2px 4px;
    font-size: 11px;
    text-align: center;
    border: 1px solid var(--accent);
    outline: none;
    background: var(--acrylic-solid);
    color: var(--text-primary);
    border-radius: 3px;
}

/* Desktop toast */
#desktop-toast {
    position: fixed;
    left: 50%;
    bottom: 64px;
    transform: translateX(-50%) translateY(12px);
    padding: 10px 18px;
    font-size: 13px;
    border-radius: 8px;
    box-shadow: var(--window-shadow);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s, transform 0.2s;
    z-index: 10010;
}
#desktop-toast.is-visible {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

/* Properties dialog */
.props-dialog {
    position: fixed;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10009;
    background: rgba(0, 0, 0, 0.35);
}
.props-dialog[hidden] {
    display: none;
}
.props-dialog__box {
    width: 340px;
    border-radius: 8px;
    box-shadow: var(--window-shadow);
    overflow: hidden;
    background: var(--acrylic-solid);
    border: 1px solid var(--border-color);
}
.props-dialog__head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 16px;
    font-size: 14px;
    font-weight: 600;
}
.props-dialog__icon {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 16px 14px;
}
.props-dialog__icon img {
    width: 34px;
    height: 34px;
}
.props-dialog__icon span {
    font-size: 13px;
    font-weight: 500;
    word-break: break-word;
}
.props-dialog__grid {
    margin: 0 16px 14px;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    overflow: hidden;
}
.props-dialog__row {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    padding: 7px 12px;
    font-size: 12px;
}
.props-dialog__row span {
    opacity: 0.7;
}
.props-dialog__row strong {
    font-weight: 500;
    text-align: right;
    word-break: break-word;
}
.props-dialog__foot {
    display: flex;
    justify-content: flex-end;
    padding: 0 16px 16px;
}
.props-dialog__ok {
    padding: 6px 18px;
    font-size: 13px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    color: #fff;
    background: var(--accent);
}
.props-dialog__ok:hover {
    filter: brightness(1.1);
}

/* Snap layouts */
#snap-preview {
    position: fixed;
    border: 2px solid var(--accent);
    background: rgba(96, 205, 255, 0.18);
    border-radius: 6px;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.15s;
    z-index: 30000;
}
#snap-preview.is-visible {
    opacity: 1;
}

#snap-layout {
    position: fixed;
    width: 220px;
    padding: 10px;
    border-radius: 8px;
    box-shadow: var(--window-shadow);
    background: var(--acrylic-bg);
    -webkit-backdrop-filter: blur(30px);
    backdrop-filter: blur(30px);
    z-index: 30010;
}
#snap-layout.hidden {
    display: none;
}
.snap-grid {
    display: flex;
    gap: 8px;
    margin-bottom: 10px;
}
.snap-col {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.snap-zone {
    border: 1px solid var(--border-color);
    border-radius: 4px;
    height: 40px;
    cursor: pointer;
    transition: background 0.12s, border-color 0.12s;
}
.snap-zone:hover,
.snap-zone:focus-visible {
    background: rgba(96, 205, 255, 0.25);
    border-color: var(--accent);
    outline: none;
}
.snap-layout-actions {
    display: flex;
    gap: 8px;
}
.snap-layout-actions button {
    flex: 1;
    padding: 6px 0;
    font-size: 12px;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    cursor: pointer;
    background: transparent;
    color: var(--text-primary);
}
.snap-layout-actions button:hover {
    background: var(--hover-bg);
}

@media (prefers-reduced-motion: reduce) {
    #snap-preview {
        transition: none;
    }
}

/* Windows */
.window {
    position: absolute;
    width: 800px;
    height: 500px;
    border-radius: 8px;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    transform: scale(0.95);
    opacity: 0;
    animation: windowOpen 0.2s cubic-bezier(0.1, 0.9, 0.2, 1) forwards;
}

@keyframes windowOpen {
    to { transform: scale(1); opacity: 1; }
}

.window.closing {
    animation: windowClose 0.15s ease-in forwards;
}

@keyframes windowClose {
    to { transform: scale(0.95); opacity: 0; }
}

.window.maximized {
    top: 0 !important;
    left: 0 !important;
    width: 100vw !important;
    height: calc(100vh - var(--taskbar-height)) !important;
    border-radius: 0;
}

.title-bar {
    height: 40px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    user-select: none;
    -webkit-app-region: drag;
}

.title-info {
    display: flex;
    align-items: center;
    gap: 8px;
    padding-left: 12px;
    font-size: 12px;
    pointer-events: none;
}

.title-icon {
    width: 16px;
    height: 16px;
}

.title-controls {
    display: flex;
    height: 100%;
    align-items: center;
}

.ctrl-btn {
    width: 46px;
    height: 34px;
    border: none;
    background: transparent;
    color: var(--text-primary);
    display: flex;
    justify-content: center;
    align-items: center;
}

.ctrl-btn svg {
    width: 10px;
    height: 10px;
}

.ctrl-btn:hover {
    background: var(--hover-bg);
}

.ctrl-btn.close:hover {
    background: #E81123;
    color: white;
}

.window-content {
    flex-grow: 1;
    background: var(--acrylic-solid);
    position: relative;
    overflow: hidden;
}

/* File Explorer specific */
.explorer-layout {
    display: flex;
    flex-direction: column;
    height: 100%;
}

.explorer-toolbar {
    height: 48px;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    padding: 0 16px;
    gap: 16px;
    background: rgba(0,0,0,0.2);
}

.explorer-body {
    display: flex;
    flex-grow: 1;
    overflow: hidden;
}

.explorer-nav {
    width: 200px;
    border-right: 1px solid var(--border-color);
    padding: 12px;
    background: rgba(0,0,0,0.1);
}

.nav-item {
    padding: 6px 12px;
    font-size: 13px;
    border-radius: 4px;
    display: flex;
    align-items: center;
    gap: 8px;
}
.nav-item:hover {
    background: var(--hover-bg);
}

.explorer-main {
    flex-grow: 1;
    padding: 16px;
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
    align-content: flex-start;
    overflow-y: auto;
}

.explorer-item {
    width: 148px;
    padding: 12px;
    border-radius: 8px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    text-align: center;
    cursor: default;
}
.explorer-item:hover {
    background: var(--hover-bg);
}
.explorer-item-ico {
    width: 48px;
    height: 48px;
    border-radius: 10px;
    background: var(--g, linear-gradient(135deg,#60a5fa,#818cf8));
    display: flex;
    align-items: center;
    justify-content: center;
}
.explorer-item-name {
    font-size: 13px;
    line-height: 1.3;
    color: var(--text-primary);
}
.explorer-item-sub {
    font-size: 11px;
    color: var(--text-secondary);
}

/* Rich Projects experience (cards + detail page) */
.explorer-main--projects {
    display: flex;
    flex-direction: column;
    flex-wrap: nowrap;
    gap: 12px;
}

.explorer-item--project {
    width: 100%;
    flex-direction: row;
    align-items: center;
    gap: 16px;
    text-align: left;
    padding: 14px 16px;
    border: 1px solid var(--border-color);
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.04);
    transition: background 0.15s ease, transform 0.15s ease, border-color 0.15s ease;
    cursor: pointer;
}
.explorer-item--project:hover {
    background: var(--hover-bg);
    border-color: rgba(255, 255, 255, 0.22);
    transform: translateY(-1px);
}

.pj-card-thumb {
    width: 56px;
    height: 56px;
    border-radius: 12px;
    flex-shrink: 0;
    background: linear-gradient(135deg, var(--pj-a, #60a5fa), var(--pj-b, #818cf8));
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.3);
}

.pj-card-body {
    flex-grow: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.pj-card-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.pj-mini-chip {
    font-size: 10px;
    line-height: 1;
    padding: 4px 8px;
    border-radius: 999px;
    color: var(--text-primary);
    background: rgba(255, 255, 255, 0.12);
    border: 1px solid rgba(255, 255, 255, 0.14);
}

.pj-card-open {
    font-size: 12px;
    color: var(--accent);
    flex-shrink: 0;
    opacity: 0;
    transform: translateX(4px);
    transition: opacity 0.15s ease, transform 0.15s ease;
}
.explorer-item--project:hover .pj-card-open {
    opacity: 1;
    transform: translateX(0);
}

/* Project detail page */
.pj-page {
    display: flex;
    flex-direction: column;
    height: 100%;
    overflow-y: auto;
    background: rgba(0, 0, 0, 0.15);
}

.pj-hero {
    position: relative;
    padding: 28px 32px;
    color: #fff;
    background: linear-gradient(135deg, var(--pj-a, #60a5fa), var(--pj-b, #818cf8));
    overflow: hidden;
}
.pj-hero::after {
    content: "";
    position: absolute;
    top: -60%;
    right: -10%;
    width: 55%;
    height: 220%;
    background: radial-gradient(closest-side, rgba(255, 255, 255, 0.18), transparent);
    pointer-events: none;
}
.pj-hero__inner {
    position: relative;
    display: flex;
    flex-direction: column;
    gap: 10px;
}
.pj-eyebrow {
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    opacity: 0.85;
}
.pj-title {
    margin: 0;
    font-size: 26px;
    font-weight: 600;
    line-height: 1.2;
    text-shadow: 0 2px 12px rgba(0, 0, 0, 0.25);
}
.pj-tag {
    margin: 0;
    max-width: 640px;
    font-size: 14px;
    line-height: 1.5;
    opacity: 0.92;
}
.pj-actions {
    display: flex;
    gap: 10px;
    margin-top: 6px;
}
.pj-btn {
    font-family: inherit;
    font-size: 13px;
    font-weight: 600;
    padding: 8px 18px;
    border-radius: 8px;
    border: none;
    cursor: pointer;
    color: #111;
    background: #fff;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.25);
    transition: transform 0.12s ease, box-shadow 0.12s ease;
}
.pj-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.3);
}

.pj-body {
    padding: 24px 32px 32px;
    display: flex;
    flex-direction: column;
    gap: 24px;
}
.pj-sec h3 {
    margin: 0 0 10px;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--text-secondary);
}
.pj-sec p {
    margin: 0;
    font-size: 14px;
    line-height: 1.65;
    color: var(--text-primary);
}
.pj-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}
.pj-chip {
    font-size: 12px;
    padding: 6px 12px;
    border-radius: 999px;
    background: var(--hover-bg);
    border: 1px solid var(--border-color);
    color: var(--text-primary);
}
.pj-points {
    margin: 0;
    padding-left: 20px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.pj-points li {
    font-size: 14px;
    line-height: 1.5;
    color: var(--text-primary);
}
.pj-points li::marker {
    color: var(--accent);
}

@media (prefers-reduced-motion: reduce) {
    .explorer-item--project,
    .pj-card-open,
    .pj-btn {
        transition: none;
    }
    .explorer-item--project:hover {
        transform: none;
    }
    .explorer-item--project:hover .pj-card-open {
        opacity: 1;
        transform: none;
    }
}

/* PDF Viewer Specific */
.pdf-toolbar {
    height: 40px;
    background: #323639;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 16px;
    color: white;
}
.pdf-btn {
    background: #0078D4;
    color: white;
    border: none;
    padding: 6px 12px;
    border-radius: 4px;
    cursor: pointer;
}
.pdf-content {
    flex-grow: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #525659;
}

.pdf-paper {
    width: min(560px, 100%);
    max-height: 100%;
    background: #fff;
    color: #1f1f23;
    border-radius: 2px;
    padding: 36px 40px;
    box-shadow: 0 4px 24px rgba(0,0,0,0.35);
    overflow-y: auto;
    text-align: left;
}
.pdf-name {
    margin: 0;
    font-size: 26px;
}
.pdf-headline {
    margin: 6px 0 0;
    font-size: 13px;
    color: #555;
}
.pdf-paper-section h3 {
    margin: 18px 0 8px;
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: #333;
}
.pdf-paper-section p {
    margin: 0;
    font-size: 13px;
    line-height: 1.5;
}
.pdf-paper-section ul {
    margin: 0;
    padding-left: 18px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.pdf-resume-item {
    font-size: 13px;
    line-height: 1.4;
}
.pdf-resume-item strong {
    display: block;
}
.pdf-resume-item span {
    color: #555;
    font-size: 12px;
}

/* Resize Handles */
.resize-handle { position: absolute; }
.resize-handle.n { top: -3px; left: 0; width: 100%; height: 6px; cursor: n-resize; }
.resize-handle.s { bottom: -3px; left: 0; width: 100%; height: 6px; cursor: s-resize; }
.resize-handle.e { top: 0; right: -3px; width: 6px; height: 100%; cursor: e-resize; }
.resize-handle.w { top: 0; left: -3px; width: 6px; height: 100%; cursor: w-resize; }
.resize-handle.nw { top: -3px; left: -3px; width: 10px; height: 10px; cursor: nw-resize; }
.resize-handle.ne { top: -3px; right: -3px; width: 10px; height: 10px; cursor: ne-resize; }
.resize-handle.sw { bottom: -3px; left: -3px; width: 10px; height: 10px; cursor: sw-resize; }
.resize-handle.se { bottom: -3px; right: -3px; width: 10px; height: 10px; cursor: se-resize; }

/* ============================================================
   KEYBOARD SHORTCUTS UI (Alt+Tab switcher + Run dialog)
   ============================================================ */
.alt-tab-overlay {
    position: fixed;
    left: 50%;
    bottom: calc(var(--taskbar-height) + 16px);
    transform: translateX(-50%);
    display: flex;
    gap: 10px;
    padding: 14px;
    border-radius: 12px;
    background: var(--acrylic-bg);
    -webkit-backdrop-filter: blur(30px);
    backdrop-filter: blur(30px);
    border: 1px solid var(--border-color);
    box-shadow: 0 16px 48px rgba(0, 0, 0, 0.5);
    z-index: 30000;
    animation: altTabIn 0.18s cubic-bezier(0.1, 0.9, 0.2, 1);
}
@keyframes altTabIn {
    from { opacity: 0; transform: translateX(-50%) translateY(12px) scale(0.96); }
    to   { opacity: 1; transform: translateX(-50%) translateY(0) scale(1); }
}
.alt-tab-card {
    width: 120px;
    border-radius: 8px;
    padding: 8px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    border: 1px solid transparent;
    cursor: pointer;
    flex: 0 0 auto;
}
.alt-tab-card:hover { background: var(--hover-bg); }
.alt-tab-card.is-active { background: var(--active-bg); border-color: var(--accent); }
.alt-tab-thumb {
    width: 96px;
    height: 64px;
    border-radius: 6px;
    background: var(--mica-bg);
    border: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}
.alt-tab-thumb img { width: 32px; height: 32px; }
.alt-tab-title {
    font-size: 12px;
    max-width: 100%;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.run-dialog {
    position: fixed;
    inset: 0;
    z-index: 30000;
    display: flex;
    align-items: flex-start;
    justify-content: center;
    padding-top: 12vh;
    background: rgba(0, 0, 0, 0.35);
}
.run-dialog[hidden] { display: none; }
.run-dialog__box {
    width: min(480px, 92vw);
    border-radius: 8px;
    background: var(--mica-bg);
    -webkit-backdrop-filter: blur(25px);
    backdrop-filter: blur(25px);
    border: 1px solid var(--border-color);
    box-shadow: var(--window-shadow);
    overflow: hidden;
    animation: runDialogIn 0.18s cubic-bezier(0.1, 0.9, 0.2, 1);
}
@keyframes runDialogIn {
    from { opacity: 0; transform: translateY(-10px) scale(0.98); }
    to   { opacity: 1; transform: translateY(0) scale(1); }
}
.run-dialog__head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 12px 10px 16px;
    font-size: 14px;
    border-bottom: 1px solid var(--border-color);
}
.run-dialog__head .ctrl-btn { width: 32px; height: 28px; }
.run-dialog__body { padding: 16px; }
.run-dialog__row { display: flex; align-items: center; gap: 12px; }
.run-dialog__row label { font-size: 13px; color: var(--text-secondary); flex: 0 0 auto; }
.run-dialog__row input {
    flex: 1;
    min-width: 0;
    background: rgba(0, 0, 0, 0.4);
    border: 1px solid var(--border-color);
    border-radius: 4px;
    color: var(--text-primary);
    font-family: inherit;
    font-size: 13px;
    padding: 8px 12px;
    outline: none;
    user-select: text;
    -webkit-user-select: text;
}
.run-dialog__row input:focus { border-color: var(--accent); }
.run-dialog__foot {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    padding: 12px 16px;
    border-top: 1px solid var(--border-color);
}
.run-dialog__foot button {
    min-width: 84px;
    padding: 6px 16px;
    border-radius: 4px;
    border: 1px solid var(--border-color);
    background: var(--hover-bg);
    color: var(--text-primary);
    font-family: inherit;
    font-size: 13px;
    cursor: pointer;
}
.run-dialog__foot button:hover { background: var(--active-bg); }
.run-dialog__ok { background: var(--accent-dark) !important; border-color: transparent !important; }

@media (prefers-reduced-motion: reduce) {
    .alt-tab-overlay,
    .run-dialog__box {
        animation-duration: 0.01ms !important;
    }
}

/* ============================================================
   WELCOME OVERLAY (new section)
   Premium glassmorphism welcome screen shown once per session.
   Sits above every layer (desktop taskbar z:10000, context menu
   z:10001, Android sim layers z<=90) and reuses the existing
   Fluent design tokens (--mica-bg, --accent, --border-color,
   --text-primary, --text-secondary, Segoe UI typeface) so it
   feels like a native part of the portfolio.
   ============================================================ */
#welcome-overlay {
    position: fixed;
    inset: 0;
    z-index: 100000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
    background: rgba(12, 14, 20, 0.5);
    -webkit-backdrop-filter: blur(16px);
    backdrop-filter: blur(16px);
    opacity: 0;
    transition: opacity 0.6s ease;
}

#welcome-overlay.is-visible { opacity: 1; }

#welcome-overlay.is-leaving { opacity: 0; }

.welcome-card {
    position: relative;
    width: 100%;
    max-width: min(560px, 92vw);
    text-align: center;
    padding: clamp(30px, 6vw, 56px) clamp(24px, 7vw, 72px);
    border-radius: 28px;
    background: linear-gradient(150deg, rgba(255, 255, 255, 0.12), rgba(255, 255, 255, 0.03)), var(--mica-bg);
    border: 1px solid var(--border-color);
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.12),
        0 24px 64px rgba(0, 0, 0, 0.5),
        0 0 80px rgba(96, 205, 255, 0.22);
    transform: scale(0.9);
    transition: transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
    overflow: hidden;
}

#welcome-overlay.is-visible .welcome-card { transform: scale(1); }

.welcome-badge {
    position: relative;
    width: clamp(56px, 12vw, 76px);
    height: clamp(56px, 12vw, 76px);
    margin: 0 auto 18px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: clamp(26px, 6vw, 34px);
    font-weight: 700;
    color: #fff;
    background: linear-gradient(135deg, #60c8ff, #2563eb);
    box-shadow:
        0 0 0 4px rgba(96, 205, 255, 0.18),
        0 12px 30px rgba(37, 99, 235, 0.5),
        0 0 44px rgba(96, 205, 255, 0.35);
}

.welcome-card__glow {
    position: absolute;
    top: -40%;
    left: 50%;
    width: 75%;
    height: 60%;
    transform: translateX(-50%);
    background: radial-gradient(closest-side, rgba(96, 205, 255, 0.45), transparent);
    filter: blur(20px);
    pointer-events: none;
}

.welcome-title {
    position: relative;
    margin: 0;
    font-family: inherit;
    font-size: clamp(20px, 5vw, 34px);
    font-weight: 600;
    line-height: 1.25;
    color: var(--text-primary);
    text-shadow: 0 0 28px rgba(96, 205, 255, 0.5);
}

.welcome-role {
    position: relative;
    margin: 10px 0 0;
    font-size: clamp(11px, 2.8vw, 13px);
    font-weight: 600;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--accent);
}

.welcome-subtitle {
    position: relative;
    margin: 10px 0 0;
    font-size: clamp(12px, 3vw, 15px);
    font-weight: 400;
    letter-spacing: 0.05em;
    color: var(--text-secondary);
}

/* Disable page scrolling while the welcome overlay is visible */
.welcome-lock,
.welcome-lock body {
    overflow: hidden !important;
}

/* Mobile-first sizing tweak */
@media (max-width: 767px) {
    .welcome-card {
        padding: 32px 26px;
        border-radius: 22px;
    }
}

@media (prefers-reduced-motion: reduce) {
    #welcome-overlay,
    .welcome-card {
        transition-duration: 0.01ms !important;
    }
}

/* Quick Settings (system tray) */
#quick-settings {
    position: fixed;
    right: 8px;
    bottom: 56px;
    width: 360px;
    max-height: calc(100vh - 72px);
    overflow-y: auto;
    padding: 14px;
    border-radius: 12px;
    box-shadow: var(--window-shadow);
    background: var(--acrylic-bg);
    -webkit-backdrop-filter: blur(30px);
    backdrop-filter: blur(30px);
    z-index: 30020;
}
#quick-settings.hidden {
    display: none;
}
.qs-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    margin-bottom: 12px;
}
.qs-network {
    display: flex;
    flex-direction: column;
    font-size: 12px;
    line-height: 1.35;
}
.qs-network span:last-child {
    color: var(--text-secondary);
    font-size: 11px;
}
.qs-edit {
    padding: 5px 10px;
    font-size: 11px;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    background: transparent;
    color: var(--text-primary);
    cursor: pointer;
    white-space: nowrap;
}
.qs-edit:hover {
    background: var(--hover-bg);
}
.qs-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
    margin-bottom: 12px;
}
.qs-tile {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 6px;
    padding: 12px;
    border: none;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.06);
    color: var(--text-primary);
    text-align: left;
    cursor: pointer;
    transition: background 0.12s;
}
.qs-tile:hover {
    background: rgba(255, 255, 255, 0.12);
}
.qs-tile.is-on {
    background: rgba(0, 120, 212, 0.55);
}
.qs-tile.is-on:hover {
    background: rgba(0, 120, 212, 0.68);
}
.qs-tile.is-disabled {
    opacity: 0.45;
    cursor: default;
}
.qs-tile-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.08);
    color: #fff;
}
.qs-tile-label {
    font-size: 12px;
    line-height: 1.2;
}
.qs-tile-state {
    font-size: 11px;
    color: var(--text-secondary);
}
.qs-tile.is-on .qs-tile-state {
    color: rgba(255, 255, 255, 0.85);
}
.qs-slider {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 6px 2px;
}
.qs-slider-icon {
    display: flex;
    color: var(--text-primary);
    flex: 0 0 auto;
}
.qs-slider input[type="range"] {
    flex: 1;
    -webkit-appearance: none;
    appearance: none;
    height: 4px;
    border-radius: 2px;
    background: rgba(255, 255, 255, 0.22);
    outline: none;
}
.qs-slider input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background: #fff;
    cursor: pointer;
    border: none;
}
.qs-slider-val {
    font-size: 12px;
    min-width: 34px;
    text-align: right;
    color: var(--text-primary);
}
.qs-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    margin-top: 10px;
    padding-top: 10px;
    border-top: 1px solid var(--border-color);
    font-size: 12px;
}

/* Media player card inside Quick Settings */
.qs-media {
    margin-top: 4px;
    padding: 12px;
    border: 1px solid var(--border-color);
    border-radius: 10px;
    background: var(--mica-bg);
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.qs-media__head {
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 0;
}
.qs-media__art {
    flex: 0 0 auto;
    width: 40px;
    height: 40px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    background: var(--g, var(--accent));
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.25);
}
.qs-media__info {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 2px;
}
.qs-media__info strong {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-primary);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.qs-media__info span {
    font-size: 11px;
    color: var(--text-secondary);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.qs-media__clear {
    flex: 0 0 auto;
    width: 26px;
    height: 26px;
    border: none;
    border-radius: 50%;
    background: transparent;
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}
.qs-media__clear:hover {
    background: var(--hover-bg);
    color: var(--text-primary);
}
.qs-media__track {
    position: relative;
    height: 4px;
    border-radius: 2px;
    background: rgba(255, 255, 255, 0.2);
    cursor: pointer;
    touch-action: none;
}
.qs-media__fill {
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 0;
    border-radius: 2px;
    background: var(--accent);
}
.qs-media__knob {
    position: absolute;
    right: -6px;
    top: 50%;
    transform: translateY(-50%);
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: #fff;
    opacity: 0;
    transition: opacity 0.15s;
}
.qs-media__track:hover .qs-media__knob,
.qs-media.is-playing .qs-media__knob {
    opacity: 1;
}
.qs-media__foot {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
}
.qs-media__time {
    font-size: 11px;
    color: var(--text-secondary);
    font-variant-numeric: tabular-nums;
}
.qs-media__controls {
    display: flex;
    align-items: center;
    gap: 4px;
}
.qs-media__btn {
    width: 30px;
    height: 30px;
    border: none;
    border-radius: 50%;
    background: transparent;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}
.qs-media__btn:hover {
    background: var(--hover-bg);
}
.qs-media__btn--play {
    width: 34px;
    height: 34px;
    background: rgba(255, 255, 255, 0.14);
}
.qs-media__btn--play:hover {
    background: rgba(255, 255, 255, 0.22);
}

/* Calendar & Notifications flyout */
#calendar-flyout {
    position: fixed;
    right: 8px;
    bottom: 56px;
    width: 340px;
    border-radius: 12px;
    box-shadow: var(--window-shadow);
    background: var(--acrylic-bg);
    -webkit-backdrop-filter: blur(30px);
    backdrop-filter: blur(30px);
    overflow: hidden;
    z-index: 30020;
}
#calendar-flyout.hidden {
    display: none;
}
.cal-head {
    padding: 18px 18px 10px;
    display: flex;
    flex-direction: column;
    gap: 2px;
}
.cal-clock {
    font-size: 34px;
    font-weight: 600;
    line-height: 1.1;
}
.cal-date {
    font-size: 12px;
    color: var(--text-secondary);
}
.cal-section {
    padding: 6px 18px 14px;
}
.cal-section-title {
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 12px;
    font-weight: 600;
    margin-bottom: 8px;
}
.cal-clear {
    border: none;
    background: transparent;
    color: var(--accent);
    font-size: 11px;
    cursor: pointer;
    padding: 2px;
}
.cal-clear:hover {
    text-decoration: underline;
}
.cal-notifs {
    display: flex;
    flex-direction: column;
    gap: 6px;
}
.cal-notif-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 10px;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.05);
}
.cal-notif-ico {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    flex: 0 0 auto;
    background: var(--c, var(--accent));
}
.cal-notif-body {
    display: flex;
    flex-direction: column;
    gap: 2px;
}
.cal-notif-title {
    font-size: 12px;
}
.cal-notif-time {
    font-size: 11px;
    color: var(--text-secondary);
}
.cal-empty {
    font-size: 12px;
    color: var(--text-secondary);
    padding: 10px 2px;
}
.cal-calendar {
    border-top: 1px solid var(--border-color);
    padding-top: 12px;
}
.cal-nav {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 10px;
}
.cal-month {
    font-size: 13px;
    font-weight: 600;
}
.cal-nav-btn {
    border: none;
    background: transparent;
    color: var(--text-primary);
    font-size: 18px;
    line-height: 1;
    padding: 4px 10px;
    border-radius: 6px;
    cursor: pointer;
}
.cal-nav-btn:hover {
    background: var(--hover-bg);
}
.cal-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 2px;
}
.cal-weekday {
    text-align: center;
    font-size: 11px;
    color: var(--text-secondary);
    padding: 4px 0;
}
.cal-day {
    border: none;
    background: transparent;
    color: var(--text-primary);
    font-size: 12px;
    padding: 6px 0;
    border-radius: 6px;
    cursor: pointer;
}
.cal-day:hover {
    background: var(--hover-bg);
}
.cal-day.today {
    background: var(--accent);
    color: #06212E;
    font-weight: 600;
}
.cal-empty-cell {
    padding: 6px 0;
}

#taskbar-clock {
    cursor: pointer;
    -webkit-user-select: none;
    user-select: none;
}

/* Windows Lock Screen */
#lock-screen {
    position: fixed;
    inset: 0;
    z-index: 40000;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: rgba(8, 10, 14, 0.35);
    -webkit-backdrop-filter: blur(26px);
    backdrop-filter: blur(26px);
    color: var(--text-primary);
    animation: lockIn 0.35s cubic-bezier(0.1, 0.9, 0.2, 1);
}
#lock-screen.hidden {
    display: none;
}
#lock-screen.leaving {
    opacity: 0;
    transition: opacity 0.24s ease;
}
@keyframes lockIn {
    from { opacity: 0; }
    to { opacity: 1; }
}
#lock-screen.shake {
    animation: lockShake 0.4s;
}
@keyframes lockShake {
    0%, 100% { transform: translateX(0); }
    20% { transform: translateX(-10px); }
    40% { transform: translateX(10px); }
    60% { transform: translateX(-6px); }
    80% { transform: translateX(6px); }
}
.lock-clock {
    position: absolute;
    top: 12%;
    text-align: center;
}
.lock-time {
    font-size: 84px;
    font-weight: 600;
    line-height: 1.05;
    text-shadow: 0 2px 24px rgba(0, 0, 0, 0.5);
}
.lock-date {
    font-size: 18px;
    margin-top: 6px;
    opacity: 0.9;
}
.lock-auth {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 14px;
    transform: translateY(20%);
}
.lock-avatar {
    width: 68px;
    height: 68px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 30px;
    font-weight: 600;
    color: #06212E;
    background: linear-gradient(150deg, #7BE0FF, #2C7DE0);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.35);
}
.lock-name {
    font-size: 16px;
    font-weight: 500;
}
.lock-pin-row {
    display: flex;
    gap: 12px;
    min-height: 14px;
}
.lock-dot {
    width: 13px;
    height: 13px;
    border-radius: 50%;
    background: transparent;
    border: 1.5px solid rgba(255, 255, 255, 0.55);
}
.lock-dot.filled {
    background: #fff;
    border-color: #fff;
}
.lock-keypad {
    display: grid;
    grid-template-columns: repeat(3, 64px);
    gap: 10px;
    margin-top: 4px;
}
.lock-key {
    height: 60px;
    border: none;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.08);
    color: var(--text-primary);
    font-size: 22px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.12s;
}
.lock-key:hover {
    background: rgba(255, 255, 255, 0.18);
}
.lock-key:active {
    background: rgba(255, 255, 255, 0.28);
}
.lock-key:focus-visible {
    outline: 2px solid var(--accent);
}
.lock-key--blank {
    pointer-events: none;
}
.lock-hint {
    font-size: 12px;
    color: var(--text-secondary);
    min-height: 16px;
}
.lock-hint.error {
    color: #FF99A1;
}
.lock-power {
    position: absolute;
    bottom: 24px;
    right: 24px;
    width: 42px;
    height: 42px;
    border: none;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.08);
    color: var(--text-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}
.lock-power:hover {
    background: rgba(255, 255, 255, 0.18);
}
.lock-powermenu {
    position: absolute;
    bottom: 76px;
    right: 24px;
    min-width: 170px;
    padding: 4px;
    border-radius: 8px;
    box-shadow: var(--window-shadow);
    background: var(--acrylic-bg);
    -webkit-backdrop-filter: blur(30px);
    backdrop-filter: blur(30px);
}
.lock-powermenu.hidden {
    display: none;
}
.lock-powermenu .power-menu-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 14px;
    font-size: 13px;
    border-radius: 4px;
    cursor: pointer;
}
.lock-powermenu .power-menu-item:hover {
    background: var(--hover-bg);
}

/* ============================================================
   T-007 Built-in apps: Notepad, Calculator, Task Manager
   ============================================================ */

/* --- Notepad --- */
.app-notepad {
    display: flex;
    flex-direction: column;
    height: 100%;
    font-family: 'Consolas', 'Cascadia Mono', monospace;
}
.ntp-menu {
    display: flex;
    gap: 2px;
    padding: 6px 10px;
    border-bottom: 1px solid var(--border-color);
    background: rgba(0, 0, 0, 0.2);
}
.ntp-menu-item {
    padding: 4px 10px;
    font-size: 12px;
    font-family: inherit;
    color: var(--text-primary);
    border-radius: 4px;
    cursor: pointer;
    user-select: none;
}
.ntp-menu-item:hover {
    background: var(--hover-bg);
}
.ntp-menu-item.is-on {
    color: var(--accent);
    background: var(--selection-bg);
}
.ntp-area {
    flex-grow: 1;
    resize: none;
    border: none;
    outline: none;
    padding: 12px 14px;
    background: var(--acrylic-solid);
    color: var(--text-primary);
    font-size: 13px;
    line-height: 1.5;
    font-family: inherit;
    white-space: pre;
}
.ntp-area.is-wrap {
    white-space: pre-wrap;
    overflow-wrap: break-word;
}
.ntp-area::placeholder {
    color: var(--text-secondary);
}
.ntp-status {
    padding: 4px 14px;
    border-top: 1px solid var(--border-color);
    font-size: 11px;
    font-family: inherit;
    color: var(--text-secondary);
    background: rgba(0, 0, 0, 0.2);
}

/* --- Calculator --- */
.app-calc {
    display: flex;
    flex-direction: column;
    height: 100%;
    padding: 12px;
    gap: 12px;
    background: var(--acrylic-solid);
}
.calc-display {
    flex: 0 0 auto;
    min-height: 64px;
    padding: 0 12px;
    display: flex;
    align-items: flex-end;
    justify-content: flex-end;
    font-size: 40px;
    font-weight: 300;
    color: var(--text-primary);
    overflow: hidden;
    white-space: nowrap;
}
.calc-grid {
    display: flex;
    flex-direction: column;
    flex-grow: 1;
    gap: 6px;
}
.calc-row {
    display: flex;
    gap: 6px;
    flex: 1;
}
.calc-btn {
    flex: 1;
    border: none;
    border-radius: 6px;
    background: rgba(255, 255, 255, 0.08);
    color: var(--text-primary);
    font-size: 15px;
    cursor: pointer;
    transition: background 0.1s;
}
.calc-btn:hover {
    background: rgba(255, 255, 255, 0.16);
}
.calc-btn:active {
    background: rgba(255, 255, 255, 0.24);
}
.calc-btn.mem {
    font-size: 12px;
    color: var(--text-secondary);
}
.calc-btn.op {
    background: rgba(255, 255, 255, 0.14);
    font-size: 20px;
}
.calc-btn.eq {
    background: var(--accent-dark);
    color: #fff;
    font-size: 20px;
}
.calc-btn.eq:hover {
    background: #1E86E8;
}

/* --- Task Manager --- */
.app-taskmgr {
    display: flex;
    flex-direction: column;
    height: 100%;
    background: var(--acrylic-solid);
}
.tm-tabs {
    display: flex;
    gap: 4px;
    padding: 8px 10px 0;
    border-bottom: 1px solid var(--border-color);
    background: rgba(0, 0, 0, 0.2);
}
.tm-tab {
    padding: 7px 14px;
    border: none;
    background: transparent;
    color: var(--text-secondary);
    font-size: 13px;
    border-radius: 6px 6px 0 0;
    cursor: pointer;
}
.tm-tab.is-active {
    color: var(--accent);
    background: rgba(96, 205, 255, 0.1);
    box-shadow: inset 0 -2px 0 var(--accent);
}
.tm-pane {
    flex-grow: 1;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}
.tm-table {
    flex-grow: 1;
    overflow-y: auto;
    padding: 6px 10px;
    display: flex;
    flex-direction: column;
}
.tm-head,
.tm-row {
    display: grid;
    grid-template-columns: 1.6fr 0.8fr 0.7fr 0.9fr;
    align-items: center;
    gap: 10px;
    padding: 8px 12px;
    font-size: 13px;
}
.tm-head {
    color: var(--text-secondary);
    font-size: 12px;
    border-bottom: 1px solid var(--border-color);
    position: sticky;
    top: 0;
    background: var(--acrylic-solid);
}
.tm-row {
    border-radius: 6px;
    cursor: pointer;
    color: var(--text-primary);
}
.tm-row:hover {
    background: var(--hover-bg);
}
.tm-row.is-selected {
    background: var(--selection-bg);
}
.tm-name {
    display: flex;
    align-items: center;
    gap: 8px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.tm-name img {
    flex: 0 0 auto;
}
.tm-status {
    color: var(--text-secondary);
}
.tm-cpu,
.tm-mem {
    font-variant-numeric: tabular-nums;
}
.tm-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 16px;
    border-top: 1px solid var(--border-color);
    background: rgba(0, 0, 0, 0.2);
}
.tm-endtask {
    padding: 6px 14px;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    background: rgba(255, 255, 255, 0.08);
    color: var(--text-primary);
    font-size: 12px;
    cursor: pointer;
}
.tm-endtask:hover:not(:disabled) {
    background: var(--hover-bg);
}
.tm-endtask:disabled {
    opacity: 0.4;
    cursor: default;
}
.tm-perf {
    flex-grow: 1;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px;
    padding: 16px;
    overflow-y: auto;
}
.tm-card {
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 14px;
    background: rgba(0, 0, 0, 0.15);
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.tm-card-title {
    font-size: 13px;
    color: var(--text-secondary);
}
.tm-card-num {
    font-size: 30px;
    font-weight: 300;
}
.tm-spark {
    width: 100%;
    height: 56px;
    border-radius: 4px;
    background: rgba(0, 0, 0, 0.2);
}

/* --- Settings app (T-008) --- */
.app-settings {
    display: flex;
    flex-direction: column;
    height: 100%;
    background: var(--acrylic-solid);
}
.set-layout {
    display: flex;
    flex-grow: 1;
    overflow: hidden;
}
.set-nav {
    width: 220px;
    flex: 0 0 auto;
    display: flex;
    flex-direction: column;
    gap: 2px;
    padding: 12px 10px;
    border-right: 1px solid var(--border-color);
    background: rgba(0, 0, 0, 0.2);
    overflow-y: auto;
}
.set-nav-item {
    text-align: left;
    padding: 9px 12px;
    border: none;
    border-radius: 6px;
    background: transparent;
    color: var(--text-primary);
    font-size: 13px;
    cursor: pointer;
    white-space: nowrap;
}
.set-nav-item:hover {
    background: var(--hover-bg);
}
.set-nav-item.is-active {
    background: var(--selection-bg);
    color: var(--accent);
}
.set-body {
    flex-grow: 1;
    overflow-y: auto;
    padding: 20px 24px 32px;
}
.set-section {
    margin-bottom: 22px;
}
.set-section-title {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 10px;
    padding-bottom: 8px;
    border-bottom: 1px solid var(--border-color);
}
.set-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 10px 4px;
    border-bottom: 1px solid var(--border-color);
}
.set-row-text {
    display: flex;
    flex-direction: column;
    gap: 2px;
}
.set-row-label {
    font-size: 13px;
    color: var(--text-primary);
}
.set-row-sub {
    font-size: 12px;
    color: var(--text-secondary);
}
.set-switch {
    position: relative;
    width: 40px;
    height: 20px;
    flex: 0 0 auto;
    border: none;
    border-radius: 20px;
    background: rgba(255, 255, 255, 0.18);
    cursor: pointer;
    transition: background 0.15s;
}
.set-switch::after {
    content: '';
    position: absolute;
    top: 3px;
    left: 3px;
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background: #fff;
    transition: left 0.15s;
}
.set-switch.is-on {
    background: var(--accent-dark);
}
.set-switch.is-on::after {
    left: 23px;
}
.set-slider-wrap {
    display: flex;
    align-items: center;
    gap: 10px;
    flex: 0 0 auto;
}
.set-slider-wrap input[type='range'] {
    width: 160px;
    accent-color: var(--accent-dark);
}
.set-slider-wrap span {
    min-width: 34px;
    font-size: 12px;
    color: var(--text-secondary);
    text-align: right;
    font-variant-numeric: tabular-nums;
}
.set-walls {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 8px;
}
.set-wall {
    height: 56px;
    border: 2px solid transparent;
    border-radius: 6px;
    background-size: cover;
    background-position: center;
    cursor: pointer;
    transition: border-color 0.12s;
}
.set-wall:hover {
    border-color: var(--text-secondary);
}
.set-accents {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}
.set-accent {
    width: 28px;
    height: 28px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    cursor: pointer;
    transition: transform 0.12s;
}
.set-accent:hover {
    transform: scale(1.15);
}
.set-apps {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 10px;
}
.set-app-card {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    background: rgba(0, 0, 0, 0.15);
    cursor: pointer;
}
.set-app-card:hover {
    background: var(--hover-bg);
}
.set-app-name {
    font-size: 13px;
    color: var(--text-primary);
}
.set-about-card {
    padding: 16px;
    border-radius: 8px;
    background: rgba(0, 0, 0, 0.2);
    margin-bottom: 12px;
}
.set-about-name {
    font-size: 20px;
    font-weight: 600;
    margin-bottom: 4px;
}
.set-button {
    margin-top: 12px;
    padding: 8px 18px;
    border: none;
    border-radius: 6px;
    background: var(--accent-dark);
    color: #fff;
    font-size: 13px;
    cursor: pointer;
}
.set-button:hover {
    background: #1E86E8;
}

/* --- About Me app --- */
.app-about {
    height: 100%;
    display: flex;
    flex-direction: column;
    background: var(--acrylic-solid);
}
.about-page {
    display: flex;
    flex-grow: 1;
    overflow: hidden;
}
.about-rail {
    flex: 0 0 300px;
    padding: 24px 20px;
    border-right: 1px solid var(--border-color);
    background: rgba(0, 0, 0, 0.22);
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 6px;
    overflow-y: auto;
}
.about-avatar {
    width: 88px;
    height: 88px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 38px;
    font-weight: 700;
    color: #fff;
    background: linear-gradient(135deg, #60c8ff, #2563eb);
    box-shadow: 0 8px 20px rgba(37, 99, 235, 0.4);
    margin-bottom: 6px;
}
.about-name {
    font-size: 22px;
    font-weight: 600;
    margin: 0;
}
.about-headline {
    font-size: 13px;
    font-weight: 600;
    color: var(--accent);
    margin: 0;
}
.about-tagline {
    font-size: 12px;
    color: var(--text-secondary);
    margin: 0 0 6px;
    line-height: 1.5;
}
.about-contacts {
    display: flex;
    flex-direction: column;
    gap: 2px;
    width: 100%;
    margin-top: 8px;
}
.about-contact {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 10px;
    padding: 7px 10px;
    border-radius: 6px;
    font-size: 12px;
    color: var(--text-primary);
    text-decoration: none;
}
.about-contact:hover {
    background: var(--hover-bg);
}
.about-contact__label {
    flex: 0 0 auto;
    color: var(--text-secondary);
}
.about-contact__value {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    text-align: right;
    color: var(--text-primary);
}
.about-cta {
    margin-top: auto;
    width: 100%;
    padding-top: 12px;
}
.about-btn {
    display: block;
    width: 100%;
    text-align: center;
    padding: 9px 16px;
    border-radius: 6px;
    background: var(--accent-dark);
    color: #fff;
    font-size: 13px;
    font-weight: 600;
    text-decoration: none;
    transition: background 0.15s;
}
.about-btn:hover {
    background: #1E86E8;
}
.about-main {
    flex: 1;
    overflow-y: auto;
    padding: 22px 26px 32px;
    display: flex;
    flex-direction: column;
    gap: 18px;
}
.about-sec h3 {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.06em;
    margin: 0 0 10px;
}
.about-bio {
    margin: 0;
    font-size: 13px;
    line-height: 1.7;
    color: var(--text-primary);
}
.about-skills {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
}
.about-skill {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 10px;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    background: var(--mica-bg);
    position: relative;
    overflow: hidden;
}
.about-skill::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 3px;
    background: var(--sk-g, var(--accent));
}
.about-skill__name {
    font-size: 12px;
    font-weight: 600;
    color: var(--text-primary);
}
.about-skill__cat {
    font-size: 11px;
    color: var(--text-secondary);
    margin-left: auto;
}
.about-skill__rate {
    font-size: 11px;
    font-weight: 600;
    color: var(--accent);
    font-variant-numeric: tabular-nums;
}
.about-sec--split {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
}
.about-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 10px;
}
.about-list-item {
    display: flex;
    flex-direction: column;
    gap: 1px;
    font-size: 12px;
    color: var(--text-primary);
    padding-left: 12px;
    border-left: 2px solid color-mix(in srgb, var(--accent) 40%, transparent);
}
.about-list-item span {
    color: var(--text-secondary);
}

@media (max-width: 760px) {
    .about-page {
        flex-direction: column;
        overflow-y: auto;
    }
    .about-rail {
        flex: 0 0 auto;
        width: auto;
        border-right: none;
        border-bottom: 1px solid var(--border-color);
        align-items: center;
        text-align: center;
    }
    .about-contacts,
    .about-cta {
        width: 100%;
    }
    .about-sec--split {
        grid-template-columns: 1fr;
    }
    .about-skills {
        grid-template-columns: 1fr;
    }
}

@media (prefers-reduced-motion: reduce) {
    #lock-screen,
    #lock-screen.shake {
        animation: none;
    }
}