.site-path {
    position: fixed;
    top: 1.65rem;
    left: 1.5rem;
    z-index: 30;
    display: flex;
    align-items: center;
    max-width: calc(100vw - 14rem);
    overflow: hidden;
    color: rgba(245, 245, 245, 0.82);
    font-size: clamp(0.95rem, 1.2vw, 1.1rem);
    font-weight: 800;
    letter-spacing: 0.04em;
    line-height: 1;
    text-overflow: ellipsis;
    text-transform: lowercase;
    white-space: nowrap;
}

.site-path a {
    flex: 0 1 auto;
    min-width: 0;
    color: inherit;
    text-decoration: none;
    transition:
        color 160ms ease,
        opacity 160ms ease,
        transform 160ms ease;
}

.site-path a:not(:first-child)::before {
    content: "/";
    color: rgba(245, 245, 245, 0.34);
    margin: 0 0.15rem;
}

.site-path a:first-child {
    color: #f23946;
}

.site-path a[aria-current] {
    color: rgba(245, 245, 245, 0.96);
}

.site-path a:hover,
.site-path a:focus-visible {
    color: #f23946;
    opacity: 1;
    outline: none;
    transform: translateY(-1px);
}

.root-page {
    min-height: 100svh;
    margin: 0;
    background:
        radial-gradient(circle at 22% 18%, rgba(242, 57, 70, 0.12), transparent 30%),
        #050505;
    color: #f5f5f5;
}

.root-page[data-os="windows"] {
    overflow: hidden;
    background:
        center / cover no-repeat url("../assets/wallpaper/Windows.jpg"),
        #071426;
}

.root-page[data-os="macos"] {
    overflow: hidden;
    background:
        radial-gradient(circle at 26% 22%, rgba(255, 255, 255, 0.28), transparent 20%),
        radial-gradient(circle at 70% 34%, rgba(255, 96, 146, 0.28), transparent 24%),
        linear-gradient(135deg, #10213f 0%, #814d8f 46%, #f0a35a 100%);
}

.root-page[data-os="linux"] {
    overflow: hidden;
    background:
        linear-gradient(rgba(255, 255, 255, 0.035) 1px, transparent 1px),
        radial-gradient(circle at 22% 18%, rgba(242, 57, 70, 0.12), transparent 30%),
        #050505;
    background-size:
        100% 4px,
        auto,
        auto;
}

.root-shell {
    min-height: 100svh;
}

.root-directory {
    display: grid;
    align-content: center;
    min-height: 100svh;
    width: min(760px, calc(100vw - 48px));
    margin: 0 auto;
}

.root-page[data-os="windows"] .root-directory,
.root-page[data-os="macos"] .root-directory,
.root-page[data-os="linux"] .root-directory {
    display: none;
}

.root-kicker {
    margin: 0 0 10px;
    color: #f23946;
    font-size: 1rem;
    font-weight: 800;
    letter-spacing: 0.12em;
}

.root-directory h1 {
    margin: 0 0 30px;
    font-size: clamp(3.5rem, 12vw, 8rem);
    line-height: 0.9;
    letter-spacing: 0;
}

.root-directory-list {
    display: grid;
    gap: 12px;
}

.root-directory-list a {
    display: flex;
    align-items: center;
    min-height: 64px;
    padding: 0 22px;
    border: 1px solid rgba(245, 245, 245, 0.14);
    border-radius: 8px;
    color: rgba(245, 245, 245, 0.78);
    background: rgba(20, 20, 20, 0.92);
    box-shadow: 0 18px 50px rgba(0, 0, 0, 0.28);
    font-size: clamp(1.25rem, 3vw, 2rem);
    font-weight: 700;
    text-decoration: none;
    transition:
        border-color 180ms ease,
        color 180ms ease,
        transform 180ms ease;
}

.root-directory-list a:hover,
.root-directory-list a:focus-visible {
    border-color: rgba(242, 57, 70, 0.58);
    color: #f5f5f5;
    outline: none;
    transform: translateX(6px);
}

.windows-desktop {
    display: none;
}

.macos-desktop {
    display: none;
}

.linux-terminal-shell {
    display: none;
}

.root-page[data-os="windows"] .windows-desktop {
    position: relative;
    display: block;
    min-height: 100svh;
    padding: 28px;
}

.windows-shortcuts {
    display: grid;
    justify-items: center;
    gap: 26px;
    width: max-content;
}

.windows-shortcut {
    display: grid;
    justify-items: center;
    gap: 8px;
    width: 92px;
    padding: 8px 6px;
    border: 1px solid transparent;
    border-radius: 6px;
    color: rgba(255, 255, 255, 0.92);
    font-size: 0.82rem;
    font-weight: 600;
    text-align: center;
    text-decoration: none;
    text-shadow: 0 1px 8px rgba(0, 0, 0, 0.46);
}

.windows-shortcut:hover,
.windows-shortcut:focus-visible {
    border-color: rgba(255, 255, 255, 0.2);
    background: rgba(255, 255, 255, 0.1);
    outline: none;
}

.windows-shortcut-icon {
    display: block;
    width: 64px;
    height: 48px;
    background: center / contain no-repeat url("../assets/icons/folder-windows.svg");
}

.windows-start-menu {
    position: fixed;
    left: 8px;
    bottom: 46px;
    z-index: 29;
    display: grid;
    grid-template-columns: minmax(230px, 1fr) 168px;
    width: min(430px, calc(100vw - 18px));
    min-height: 360px;
    padding: 8px;
    border: 1px solid rgba(255, 255, 255, 0.36);
    border-radius: 8px 8px 0 0;
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.32), rgba(255, 255, 255, 0.08) 42%, rgba(6, 45, 83, 0.72)),
        rgba(12, 57, 97, 0.86);
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.48),
        0 22px 60px rgba(0, 0, 0, 0.42);
    opacity: 0;
    pointer-events: none;
    transform: translateY(14px) scale(0.98);
    transform-origin: bottom left;
    transition:
        opacity 150ms ease,
        transform 150ms ease;
    backdrop-filter: blur(18px);
}

.windows-start-menu.is-open {
    opacity: 1;
    pointer-events: auto;
    transform: translateY(0) scale(1);
}

.windows-start-menu-left {
    display: grid;
    grid-template-rows: auto auto 1fr auto;
    gap: 4px;
    padding: 8px;
    border-radius: 5px;
    background: rgba(245, 245, 245, 0.96);
}

.windows-start-menu-left a {
    display: flex;
    align-items: center;
    gap: 10px;
    min-height: 42px;
    padding: 0 10px;
    border: 1px solid transparent;
    border-radius: 4px;
    color: #1d1d1d;
    font-size: 0.88rem;
    font-weight: 600;
    text-decoration: none;
}

.windows-start-menu-left a:hover,
.windows-start-menu-left a:focus-visible {
    border-color: rgba(52, 136, 219, 0.62);
    background: linear-gradient(180deg, #e8f3ff, #c8e4ff);
    outline: none;
}

.windows-start-menu-icon {
    display: block;
    width: 30px;
    height: 23px;
    background: center / contain no-repeat url("../assets/icons/folder-windows.svg");
}

.windows-start-search {
    align-self: end;
    min-height: 30px;
    padding: 7px 10px;
    border: 1px solid #8e9baa;
    border-radius: 3px;
    color: #6a7178;
    background: linear-gradient(180deg, #fff, #e7edf3);
    font-size: 0.78rem;
}

.windows-start-menu-right {
    display: grid;
    align-content: start;
    gap: 3px;
    padding: 56px 8px 8px;
}

.windows-start-menu-right strong,
.windows-start-menu-right a,
.windows-start-menu-right span {
    display: block;
    padding: 8px 10px;
    border-radius: 4px;
    color: rgba(255, 255, 255, 0.94);
    font-size: 0.86rem;
    font-weight: 700;
    text-decoration: none;
    text-shadow: 0 1px 5px rgba(0, 0, 0, 0.52);
}

.windows-start-menu-right strong {
    margin-bottom: 8px;
    font-size: 1rem;
}

.windows-start-menu-right a:hover,
.windows-start-menu-right a:focus-visible {
    background: rgba(255, 255, 255, 0.12);
    outline: none;
}

.windows-taskbar {
    position: fixed;
    right: 0;
    bottom: 0;
    left: 0;
    z-index: 30;
    display: grid;
    grid-template-columns: auto 1fr auto;
    align-items: center;
    gap: 10px;
    height: 46px;
    padding: 0 9px;
    border-top: 1px solid rgba(255, 255, 255, 0.42);
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.32), rgba(255, 255, 255, 0.1) 44%, rgba(0, 44, 82, 0.58) 45%, rgba(0, 23, 43, 0.74)),
        rgba(8, 42, 74, 0.72);
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.36),
        0 -12px 38px rgba(0, 0, 0, 0.28);
    backdrop-filter: blur(18px);
}

.windows-start,
.windows-taskbar-apps a,
.windows-clock {
    min-height: 34px;
    border: 1px solid rgba(255, 255, 255, 0.14);
    border-radius: 4px;
    color: rgba(255, 255, 255, 0.9);
    background: rgba(255, 255, 255, 0.08);
    font-family: inherit;
    font-size: 0.82rem;
    font-weight: 700;
}

.windows-start {
    position: relative;
    width: 54px;
    min-height: 54px;
    margin-top: -11px;
    padding: 0;
    border-radius: 50%;
    border-color: rgba(255, 255, 255, 0.42);
    background:
        radial-gradient(circle at 35% 24%, rgba(255, 255, 255, 0.9), transparent 18%),
        radial-gradient(circle at 50% 56%, #61d85a, #1e8a25 58%, #0d4c18);
    box-shadow:
        inset 0 0 0 2px rgba(255, 255, 255, 0.22),
        0 0 0 1px rgba(0, 0, 0, 0.22),
        0 8px 20px rgba(0, 0, 0, 0.42);
    cursor: pointer;
}

.windows-start::before {
    content: "";
    position: absolute;
    inset: 15px;
    background:
        linear-gradient(90deg, #f04545 0 47%, transparent 47% 53%, #43a6ff 53%),
        linear-gradient(0deg, #ffcc35 0 47%, transparent 47% 53%, #52c447 53%);
    background-blend-mode: normal;
    border-radius: 2px;
    box-shadow: 0 0 12px rgba(255, 255, 255, 0.36);
    transform: skewY(-4deg);
}

.windows-taskbar-apps {
    display: flex;
    align-items: center;
    gap: 8px;
    min-width: 0;
}

.windows-taskbar-apps a {
    display: inline-flex;
    align-items: center;
    padding: 0 14px;
    border-radius: 5px;
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.22), rgba(255, 255, 255, 0.06)),
        rgba(255, 255, 255, 0.08);
    text-decoration: none;
}

.windows-start:hover,
.windows-start:focus-visible,
.windows-taskbar-apps a:hover,
.windows-taskbar-apps a:focus-visible {
    border-color: rgba(255, 255, 255, 0.32);
    background: rgba(255, 255, 255, 0.14);
    outline: none;
}

.windows-clock {
    display: grid;
    place-items: center;
    gap: 1px;
    min-width: 88px;
    padding: 0 12px;
    border-color: transparent;
    background: transparent;
    color: rgba(255, 255, 255, 0.88);
    font-size: 0.76rem;
    line-height: 1.05;
    text-align: center;
    text-shadow: 0 1px 4px rgba(0, 0, 0, 0.62);
}

.root-page[data-os="macos"] .macos-desktop {
    position: relative;
    display: block;
    min-height: 100svh;
    padding: 58px 32px 112px;
}

.macos-menu-bar {
    position: fixed;
    top: 0;
    right: 0;
    left: 0;
    z-index: 32;
    display: flex;
    align-items: center;
    gap: 18px;
    height: 28px;
    padding: 0 16px;
    color: rgba(255, 255, 255, 0.92);
    background: rgba(255, 255, 255, 0.18);
    box-shadow: inset 0 -1px 0 rgba(255, 255, 255, 0.2);
    font-size: 0.82rem;
    backdrop-filter: blur(18px);
}

.macos-menu-bar strong {
    font-weight: 800;
}

.macos-menu-bar time {
    margin-left: auto;
}

.macos-wifi {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin-left: auto;
}

.macos-wifi + time {
    margin-left: 0;
}

.macos-wifi-icon {
    position: relative;
    width: 18px;
    height: 13px;
    overflow: hidden;
}

.macos-wifi-icon::before,
.macos-wifi-icon::after {
    content: "";
    position: absolute;
    right: 50%;
    bottom: -9px;
    border: 2px solid currentColor;
    border-color: currentColor transparent transparent currentColor;
    border-radius: 999px 0 0 0;
    transform: translateX(50%) rotate(45deg);
}

.macos-wifi-icon::before {
    width: 24px;
    height: 24px;
    opacity: 0.48;
}

.macos-wifi-icon::after {
    width: 14px;
    height: 14px;
    opacity: 0.86;
}

.macos-wifi-icon {
    color: rgba(255, 255, 255, 0.9);
}

.macos-folders {
    display: grid;
    justify-items: center;
    gap: 28px;
    width: max-content;
    margin-left: auto;
}

.macos-folder {
    display: grid;
    justify-items: center;
    gap: 8px;
    width: 104px;
    padding: 8px;
    border-radius: 8px;
    color: rgba(255, 255, 255, 0.94);
    font-size: 0.82rem;
    font-weight: 600;
    text-align: center;
    text-decoration: none;
    text-shadow: 0 1px 8px rgba(0, 0, 0, 0.42);
}

.macos-folder:hover,
.macos-folder:focus-visible {
    background: rgba(255, 255, 255, 0.14);
    outline: none;
}

.macos-folder-icon {
    display: block;
    width: 72px;
    height: 54px;
    background: center / contain no-repeat url("../assets/icons/folder-macos.svg");
}

.macos-dock {
    position: fixed;
    right: 50%;
    bottom: 18px;
    z-index: 32;
    display: flex;
    align-items: end;
    gap: 12px;
    min-height: 70px;
    padding: 10px 14px;
    border: 1px solid rgba(255, 255, 255, 0.24);
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.22);
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.34),
        0 20px 48px rgba(0, 0, 0, 0.28);
    transform: translateX(50%);
    backdrop-filter: blur(20px);
}

.macos-dock button {
    position: relative;
    display: grid;
    place-items: center;
    width: 52px;
    height: 52px;
    border: 0;
    border-radius: 13px;
    color: #fff;
    cursor: pointer;
    font-size: 1.35rem;
    font-weight: 800;
    transition:
        transform 160ms ease,
        filter 160ms ease;
}

.macos-dock-finder {
    background:
        linear-gradient(90deg, transparent 49%, rgba(0, 0, 0, 0.18) 49% 51%, transparent 51%),
        linear-gradient(135deg, #7fd3ff 0 50%, #1a76df 50%);
    box-shadow:
        inset 0 0 0 1px rgba(255, 255, 255, 0.42),
        0 10px 24px rgba(0, 0, 0, 0.22);
}

.macos-dock-finder::before,
.macos-dock-finder::after {
    content: "";
    position: absolute;
    background: #111;
}

.macos-dock-finder::before {
    top: 17px;
    left: 14px;
    width: 5px;
    height: 5px;
    border-radius: 50%;
    box-shadow: 19px 0 0 #111;
}

.macos-dock-finder::after {
    left: 16px;
    bottom: 14px;
    width: 20px;
    height: 8px;
    border: 2px solid #111;
    border-top: 0;
    border-radius: 0 0 16px 16px;
    background: transparent;
}

.macos-dock-trash {
    background:
        linear-gradient(90deg, rgba(255, 255, 255, 0.16) 1px, transparent 1px),
        linear-gradient(180deg, rgba(255, 255, 255, 0.76), rgba(255, 255, 255, 0.22));
    background-size:
        9px 100%,
        auto;
    box-shadow:
        inset 0 0 0 1px rgba(255, 255, 255, 0.52),
        inset 0 -10px 20px rgba(0, 0, 0, 0.12),
        0 10px 24px rgba(0, 0, 0, 0.22);
}

.macos-dock-trash::before {
    content: "";
    position: absolute;
    top: -5px;
    left: 10px;
    width: 32px;
    height: 8px;
    border-radius: 4px;
    background: rgba(245, 245, 245, 0.78);
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.48);
}

.macos-dock-trash::after {
    content: "";
    position: absolute;
    top: 7px;
    right: 10px;
    bottom: 7px;
    left: 10px;
    border: 1px solid rgba(255, 255, 255, 0.42);
    border-radius: 4px 4px 9px 9px;
}

.macos-dock button:hover,
.macos-dock button:focus-visible {
    filter: brightness(1.12);
    outline: none;
    transform: translateY(-8px) scale(1.08);
}

.root-page[data-os="linux"] .linux-terminal-shell {
    display: block;
    min-height: 100svh;
    padding: 72px 24px 32px;
}

.linux-terminal {
    display: grid;
    align-content: start;
    min-height: calc(100svh - 104px);
    background: transparent;
}

.linux-terminal-screen {
    overflow-y: auto;
    padding: 0 0 10px;
    color: rgba(245, 245, 245, 0.82);
    font-family: ui-monospace, SFMono-Regular, Consolas, "Liberation Mono", monospace;
    font-size: clamp(0.9rem, 1.5vw, 1rem);
    line-height: 1.55;
}

.linux-terminal-screen p {
    margin: 0 0 6px;
}

.linux-terminal-screen kbd {
    padding: 0;
    border: 0;
    color: #f23946;
    background: transparent;
    font: inherit;
}

.linux-terminal-command {
    color: #f5f5f5;
}

.linux-terminal-error {
    color: #ff7a83;
}

.linux-terminal-form {
    display: grid;
    grid-template-columns: auto 1fr;
    align-items: center;
    gap: 8px;
    padding: 10px 0 0;
    color: #f23946;
    font-family: ui-monospace, SFMono-Regular, Consolas, "Liberation Mono", monospace;
    font-size: clamp(0.9rem, 1.5vw, 1rem);
}

.linux-terminal-form label {
    white-space: nowrap;
}

.linux-terminal-form input {
    width: 100%;
    min-width: 0;
    border: 0;
    color: #f5f5f5;
    background: transparent;
    caret-color: #f23946;
    font: inherit;
    outline: none;
}

.os-switcher {
    position: fixed;
    top: 1.5rem;
    right: 1.5rem;
    z-index: 35;
    display: flex;
    flex-direction: row-reverse;
    align-items: center;
    gap: 8px;
}

.os-switcher button {
    min-height: 36px;
    padding: 0 14px;
    border: 1px solid rgba(245, 245, 245, 0.14);
    border-radius: 6px;
    color: rgba(245, 245, 245, 0.82);
    background: rgba(12, 12, 12, 0.78);
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.28);
    cursor: pointer;
    font-family: inherit;
    font-size: 0.78rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: none;
    transition:
        border-color 180ms ease,
        color 180ms ease,
        transform 180ms ease,
        opacity 180ms ease;
}

.os-switcher button:hover,
.os-switcher button:focus-visible {
    border-color: rgba(242, 57, 70, 0.58);
    color: #f5f5f5;
    outline: none;
}

.os-switcher-toggle {
    color: #f5f5f5;
}

.os-switcher-options {
    display: flex;
    flex-direction: row-reverse;
    gap: 8px;
    opacity: 0;
    pointer-events: none;
    transform: translateX(18px);
    transition:
        opacity 180ms ease,
        transform 180ms ease;
}

.os-switcher.is-open .os-switcher-options {
    opacity: 1;
    pointer-events: auto;
    transform: translateX(0);
}

.os-switcher-options button {
    transform: translateX(12px) scale(0.96);
}

.os-switcher.is-open .os-switcher-options button {
    transform: translateX(0) scale(1);
}
