/* ============================================================
   Albert Dong — Personal OS
   ============================================================ */

:root {
  color-scheme: dark;

  --bg: #0a0a0a;
  --surface: #141414;
  --surface-bar: #0d0d0d;
  --surface-hover: rgba(255, 255, 255, 0.04);

  --border: rgba(255, 255, 255, 0.07);
  --border-mid: rgba(255, 255, 255, 0.13);

  --text: rgba(255, 255, 255, 0.88);
  --text-mid: rgba(255, 255, 255, 0.48);
  --text-muted: rgba(255, 255, 255, 0.26);

  --accent: rgba(255, 255, 255, 0.75);
  --accent-dim: rgba(255, 255, 255, 0.35);

  --shadow: 0 18px 44px rgba(0, 0, 0, 0.34), 0 5px 16px rgba(0, 0, 0, 0.24);
  --radius: 14px;
  --bar-h: 38px;

  --mono: "SFMono-Regular", "Cascadia Code", "Liberation Mono", Menlo, monospace;
  --sans: Inter, ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  --spring: cubic-bezier(0.16, 1, 0.3, 1);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html,
body {
  min-height: 100%;
}

body {
  margin: 0;
  overflow: hidden;
  background: var(--bg);
  color: var(--text);
  font-family: var(--sans);
}

button,
input {
  font: inherit;
}

button {
  cursor: pointer;
}

/* ── Wallpaper ── */

.wallpaper,
.screen-vignette {
  position: fixed;
  inset: 0;
  pointer-events: none;
}

.wallpaper {
  z-index: -3;
  display: none;
}

.screen-vignette {
  background:
    radial-gradient(ellipse 110% 55% at 50% 100%, rgba(0, 0, 0, 0.72), transparent),
    radial-gradient(ellipse at 50% 0%, rgba(0, 0, 0, 0.45), transparent 60%);
  z-index: -2;
}

body {
  background-image: url('./assets/wallpaper.jpg');
  background-size: cover;
  background-position: center;
  background-attachment: fixed;
}

body.is-launching {
  animation: launchBackdrop 520ms ease-out both;
}

@keyframes launchBackdrop {
  from { background-color: #000; filter: saturate(0.88) brightness(0.72); }
  to   { background-color: var(--bg); filter: saturate(1) brightness(1); }
}

/* ── Desktop ── */

.desktop {
  position: relative;
  min-height: 100vh;
  padding: 24px 28px 116px;
}

.mobile-site {
  display: none;
}

/* ── Hero Name ── */

.hero-name {
  position: fixed;
  top: 28px;
  left: 32px;
  z-index: 1;
  user-select: none;
}

body.is-launching .hero-name {
  opacity: 0;
  transform: translateY(-18px) scale(0.985);
  transition:
    opacity 620ms ease,
    transform 760ms cubic-bezier(0.16, 1, 0.3, 1);
}

body.is-launching.launch-name .hero-name {
  opacity: 1;
  transform: translateY(0) scale(1);
}

.hero-name-line {
  display: flex;
  align-items: baseline;
  gap: 14px;
  flex-wrap: nowrap;
}

.hero-name strong {
  font-size: clamp(60px, 9vw, 128px);
  font-weight: 900;
  letter-spacing: -0.03em;
  line-height: 0.9;
  text-transform: lowercase;
  white-space: nowrap;
  color: rgba(255, 255, 255, 0.96);
  will-change: filter;
  animation: nameGlow 4s ease-in-out infinite alternate;
}

@keyframes nameGlow {
  from { filter: drop-shadow(0 0 12px rgba(255, 255, 255, 0.18)); }
  to   { filter: drop-shadow(0 0 28px rgba(255, 255, 255, 0.38)); }
}

.hero-sub {
  font-size: 15px;
  font-weight: 400;
  letter-spacing: 0.04em;
  color: rgba(255, 255, 255, 0.28);
  white-space: nowrap;
}

/* ── Desktop App Icon ── */

.desktop-app {
  position: fixed;
  top: 128px;
  right: 42px;
  z-index: 2;
  display: grid;
  width: 84px;
  justify-items: center;
  gap: 2px;
  border: 0;
  border-radius: 10px;
  padding: 10px 8px 8px;
  color: rgba(255, 255, 255, 0.88);
  background: transparent;
  transition: background 180ms ease;
}

body.is-launching .desktop-app {
  opacity: 0;
  transform: translateY(-14px) scale(0.965);
  transition:
    opacity 520ms ease,
    transform 700ms cubic-bezier(0.16, 1, 0.3, 1),
    background 180ms ease;
}

body.is-launching.launch-apps .desktop-app {
  opacity: 1;
  transform: translateY(0) scale(1);
}

body.is-launching.launch-apps .desktop-app[data-desktop-app="music"] {
  transition-delay: 90ms;
}

.desktop-app:hover { background: rgba(255, 255, 255, 0.05); }

.desktop-app[data-desktop-app="music"] {
  top: 226px;
}

.desktop-app:focus-visible { outline: none; }

.desktop-app.is-selected {
  background: rgba(255, 255, 255, 0.1);
  box-shadow: 0 0 0 1.5px rgba(255, 255, 255, 0.45);
}

.desktop-app.is-selected .desktop-app-icon {
  box-shadow: none;
}

.desktop-app.is-selected .folder-img {
  filter: none;
}

.desktop-app-icon {
  display: grid;
  width: 60px;
  height: 60px;
  place-items: center;
  border-radius: 0;
  background: none;
  border: none;
  box-shadow: none;
}

.folder-img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
  pointer-events: none;
  filter: none;
}

.desktop-app-label {
  max-width: 78px;
  margin-top: -3px;
  font-size: 11.5px;
  font-weight: 700;
  letter-spacing: 0.01em;
  text-align: center;
  text-shadow:
    0 1px 2px rgba(0, 0, 0, 0.92),
    0 2px 9px rgba(0, 0, 0, 0.86);
  user-select: none;
  -webkit-user-select: none;
}

.desktop-app.is-selected .desktop-app-label {
  color: rgba(255, 255, 255, 0.92);
}

/* ── Windows ── */

.window {
  position: fixed;
  z-index: 5;
  display: none;
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: var(--radius);
  overflow: hidden;
  color: var(--text);
  background: var(--surface);
  box-shadow: var(--shadow), inset 0 1px 0 rgba(255, 255, 255, 0.22);
}

.window.is-resizing,
.window.is-dragging {
  user-select: none;
}

.window.is-open {
  display: block;
  animation: windowIn 272ms var(--spring) both;
}

.window.is-minimized {
  display: none;
}

.window.is-maximized {
  top: 18px !important;
  right: 18px !important;
  bottom: 92px !important;
  left: 18px !important;
  width: auto !important;
  height: auto !important;
  transform: none !important;
}

.window.is-maximized .resize-handle {
  display: none;
}

@keyframes windowIn {
  from {
    opacity: 0;
    transform: translateY(18px) scale(0.965);
  }
}

@keyframes windowOut {
  from { opacity: 1; transform: scale(1); }
  to   { opacity: 0; transform: scale(0.94) translateY(8px); }
}

@keyframes windowGenie {
  from {
    opacity: 1;
    border-radius: var(--radius);
    transform: translate3d(0, 0, 0) scale(1);
  }

  to {
    opacity: 0.16;
    border-radius: 18px;
    transform:
      translate3d(var(--genie-x, 0px), var(--genie-y, 78vh), 0)
      scale(var(--genie-scale-x, 0.06), var(--genie-scale-y, 0.04));
  }
}

@keyframes terminalOut {
  from { opacity: 1; transform: translateX(-50%) scale(1); }
  to   { opacity: 0; transform: translateX(-50%) scale(0.94) translateY(8px); }
}

.window.is-closing {
  display: block;
  animation: windowOut 180ms cubic-bezier(0.22, 0.68, 0.2, 1) forwards;
  pointer-events: none;
}

.window.is-minimizing {
  display: block;
  animation: windowGenie 480ms cubic-bezier(0.45, 0, 0.22, 1) forwards;
  transform-origin: var(--genie-origin-x, 50%) var(--genie-origin-y, 100%);
  backface-visibility: hidden;
  contain: layout paint;
  will-change: transform, opacity, border-radius;
  pointer-events: none;
}

.window.is-restoring {
  display: block;
  animation: windowGenie 336ms cubic-bezier(0.55, 0, 1, 0.45) reverse both;
  transform-origin: var(--genie-origin-x, 50%) var(--genie-origin-y, 100%);
  backface-visibility: hidden;
  contain: layout paint;
  will-change: transform, opacity, border-radius;
  pointer-events: none;
}

.window.is-open.is-restored {
  animation: none;
}

.terminal-window.is-closing {
  animation: windowOut 180ms cubic-bezier(0.22, 0.68, 0.2, 1) forwards;
}

/* ── Window Bar ── */

.window-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: var(--bar-h);
  padding: 0 12px;
  border-bottom: 1px solid var(--border);
  background: var(--surface-bar);
  cursor: grab;
  user-select: none;
  touch-action: none;
}

.window-bar:active {
  cursor: grabbing;
}

.window-title {
  color: var(--text-mid);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.bar-spacer {
  flex: 1;
}

.window-download {
  display: grid;
  place-items: center;
  width: 22px;
  height: 22px;
  flex: 0 0 auto;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 6px;
  color: rgba(255, 255, 255, 0.72);
  background: rgba(255, 255, 255, 0.06);
  text-decoration: none;
  transition: background 140ms ease, border-color 140ms ease, color 140ms ease, transform 140ms ease;
}

.window-download svg {
  width: 15px;
  height: 15px;
}

.window-download:hover {
  color: #fff;
  border-color: rgba(255, 255, 255, 0.22);
  background: rgba(255, 255, 255, 0.11);
}

.window-download:active {
  transform: translateY(1px);
}

.window-download:focus-visible {
  outline: 2px solid rgba(255, 255, 255, 0.5);
  outline-offset: 2px;
}

/* ── Window Controls ── */

.win-controls {
  display: flex;
  align-items: center;
  gap: 5px;
  flex-shrink: 0;
}

.wc {
  display: grid;
  place-items: center;
  width: 14.3px;
  height: 14.3px;
  padding: 0;
  border: 1px solid rgba(0, 0, 0, 0.24);
  border-radius: 999px;
  color: rgba(44, 44, 44, 0.72);
  transition: background 140ms ease, border-color 140ms ease, color 140ms ease, box-shadow 140ms ease;
}

.wc-close {
  background: #ff5f57;
  border-color: #e0443e;
}

.wc-min {
  background: #ffbd2e;
  border-color: #dea123;
  color: rgba(96, 67, 10, 0.72);
}

.wc-max {
  background: #28c840;
  border-color: #1faf32;
  color: rgba(10, 72, 23, 0.72);
}

.wc svg {
  width: 7.7px;
  height: 7.7px;
  opacity: 0;
  pointer-events: none;
}

.wc:focus-visible {
  outline: 2px solid rgba(255, 255, 255, 0.5);
  outline-offset: 2px;
}

.wc-close:hover {
  background: #ff6961;
  border-color: #ef4d45;
  box-shadow: 0 0 10px rgba(255, 95, 87, 0.35);
}

.wc-min:hover {
  background: #ffc640;
  border-color: #e7aa27;
  box-shadow: 0 0 10px rgba(255, 189, 46, 0.32);
}

.wc-max:hover {
  background: #34d451;
  border-color: #24b73a;
  box-shadow: 0 0 10px rgba(40, 200, 64, 0.3);
}

.wc:hover svg,
.win-controls:hover .wc svg {
  opacity: 0.72;
}

/* ── Resize Handles ── */

.resize-handle {
  position: absolute;
  z-index: 4;
  background: transparent;
}

.resize-handle.n,
.resize-handle.s {
  left: 10px;
  right: 10px;
  height: 8px;
  cursor: ns-resize;
}

.resize-handle.n {
  top: -4px;
}

.resize-handle.s {
  bottom: -4px;
}

.resize-handle.e,
.resize-handle.w {
  top: 10px;
  bottom: 10px;
  width: 8px;
  cursor: ew-resize;
}

.resize-handle.e {
  right: -4px;
}

.resize-handle.w {
  left: -4px;
}

.resize-handle.ne,
.resize-handle.nw,
.resize-handle.se,
.resize-handle.sw {
  width: 14px;
  height: 14px;
}

.resize-handle.ne {
  top: -5px;
  right: -5px;
  cursor: nesw-resize;
}

.resize-handle.nw {
  top: -5px;
  left: -5px;
  cursor: nwse-resize;
}

.resize-handle.se {
  right: -5px;
  bottom: -5px;
  cursor: nwse-resize;
}

.resize-handle.sw {
  bottom: -5px;
  left: -5px;
  cursor: nesw-resize;
}

/* ── Terminal Window ── */

.terminal-window {
  top: 174px;
  left: 32px;
  width: min(684px, calc(100vw - 56px));
  height: min(387px, calc(100vh - 220px));
  min-height: 300px;
  background: #171717;
  border-color: rgba(255, 255, 255, 0.14);
  box-shadow:
    var(--shadow),
    inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

.terminal-window.is-open {
  animation: terminalIn 304ms var(--spring) both;
}

.terminal-window.is-open.is-restored {
  animation: none;
}

@keyframes terminalIn {
  from {
    opacity: 0;
    transform: translateY(18px) scale(0.97);
  }
}

@keyframes launchTerminalIn {
  from {
    opacity: 0;
    transform: translateY(-10px) scale(0.985);
  }

  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

body.is-launching .terminal-window.is-open {
  animation: launchTerminalIn 600ms cubic-bezier(0.25, 0, 0.3, 1) both;
}

.terminal-shell {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 184px;
  height: calc(100% - var(--bar-h));
  min-height: 0;
}

.terminal-main {
  display: flex;
  min-width: 0;
  min-height: 0;
  flex-direction: column;
  padding: 16px 18px;
}

.terminal-output {
  flex: 1;
  min-height: 0;
  overflow: auto;
  overscroll-behavior: contain;
  padding-right: 8px;
  color: rgba(255, 255, 255, 0.78);
  font-family: var(--mono);
  font-size: 13px;
  line-height: 1.6;
}

.terminal-output::-webkit-scrollbar {
  width: 6px;
}

.terminal-output::-webkit-scrollbar-thumb {
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.14);
}

.line {
  margin: 0 0 8px;
  white-space: pre-wrap;
}

.line.command {
  color: rgba(255, 255, 255, 0.88);
}

.line.system {
  color: rgba(255, 255, 255, 0.38);
}

.boot-cmd {
  color: #93c5fd;
  font-weight: 700;
}

.boot-desc {
  color: rgba(255, 255, 255, 0.3);
}

.boot-cmd-btn {
  display: inline;
  border: 0;
  padding: 0;
  background: transparent;
  color: #bfdbfe;
  font-family: var(--mono);
  font-size: inherit;
  font-weight: 700;
  cursor: pointer;
  text-decoration: underline;
  text-decoration-color: rgba(147, 197, 253, 0.38);
  text-underline-offset: 2px;
  transition: color 120ms ease, text-decoration-color 120ms ease;
}

.boot-cmd-btn:hover {
  color: #ffffff;
  text-decoration-color: rgba(147, 197, 253, 0.8);
}

.line.error {
  color: #fca5a5;
}

.terminal-input-row {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  gap: 10px;
  margin-top: 8px;
  color: rgba(255, 255, 255, 0.6);
  font-family: var(--mono);
}

.terminal-input-row label {
  font-size: 14px;
  font-weight: 700;
}

.input-wrap {
  position: relative;
  display: flex;
  align-items: center;
  min-width: 0;
}

.terminal-input-row input {
  flex: 1;
  min-width: 0;
  border: 0;
  outline: 0;
  color: rgba(255, 255, 255, 0.9);
  background: transparent;
  caret-color: transparent;
  font-family: var(--mono);
  font-size: 14px;
}

.block-cursor {
  position: absolute;
  top: 50%;
  left: var(--cur, 0px);
  transform: translateY(-50%);
  width: 0.58em;
  height: 1.15em;
  background: rgba(255, 255, 255, 0.7);
  border-radius: 1px;
  pointer-events: none;
  display: none;
}

.input-wrap:focus-within .block-cursor {
  display: block;
  animation: blockBlink 1.1s step-end infinite;
}

@keyframes blockBlink {
  0%, 100% { opacity: 1; }
  50% { opacity: 0; }
}

.command-panel {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 12px;
  border-left: 1px solid rgba(255, 255, 255, 0.07);
  background: rgba(18, 18, 18, 0.72);
}

.panel-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: var(--text-mid);
  font-size: 10.5px;
  font-weight: 800;
  letter-spacing: 0.09em;
  text-transform: uppercase;
}

.panel-heading button,
.command-grid button {
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: rgba(255, 255, 255, 0.55);
  background: rgba(255, 255, 255, 0.04);
  transition: background 140ms ease, color 140ms ease;
}

.panel-heading button {
  width: 26px;
  height: 26px;
  border-radius: 999px;
  padding: 0;
  font-weight: 900;
}

.command-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
}

.command-grid button {
  min-height: 28px;
  border-radius: 7px;
  font-family: var(--mono);
  font-size: 10.5px;
  font-weight: 700;
}

.command-grid button:hover,
.panel-heading button:hover {
  background: rgba(255, 255, 255, 0.1);
  color: rgba(255, 255, 255, 0.88);
}

/* ── Card Windows ── */

.card-window {
  top: 178px;
  right: 54px;
  width: min(440px, calc(100vw - 48px));
}

.card-window.is-open {
  display: flex;
  min-height: 220px;
  flex-direction: column;
}

.about-window {
  top: 150px;
  right: 58px;
  width: min(560px, calc(100vw - 48px));
  min-height: 350px;
  border-color: rgba(255, 255, 255, 0.1);
  box-shadow:
    var(--shadow),
    inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

.contact-window {
  top: 256px;
  right: 92px;
  width: min(360px, calc(100vw - 48px));
  border-color: rgba(255, 255, 255, 0.1);
  box-shadow:
    var(--shadow),
    inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

.resume-window {
  top: 214px;
  right: 122px;
  width: min(470px, calc(100vw - 48px));
  border-color: rgba(255, 255, 255, 0.1);
  box-shadow:
    var(--shadow),
    inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

.repertoire-window {
  top: 112px;
  right: 84px;
  width: min(660px, calc(100vw - 48px));
  height: min(560px, calc(100vh - 154px));
  min-height: 420px;
  border-color: rgba(255, 255, 255, 0.12);
  background: #1c1c1c;
  color: var(--text);
  box-shadow:
    var(--shadow),
    inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

/* ── Dark window themes (each app a distinct grayscale shade) ── */

.about-window {
  background: #1a1a1a;
  color: var(--text);
}

.about-window .window-bar {
  background: #111111;
}

.contact-window {
  background: #181818;
  color: var(--text);
}

.contact-window .window-bar {
  background: #0f0f0f;
}

.resume-window {
  background: #1e1e1e;
  color: var(--text);
}

.resume-window .window-bar {
  background: #131313;
}

.repertoire-window .window-bar {
  background: #121212;
}

/* ── Window content ── */

.window-content {
  flex: 1;
  min-height: 0;
  overflow: auto;
  overscroll-behavior: contain;
  padding: 24px;
  overflow-wrap: anywhere;
}

.window-content::-webkit-scrollbar {
  width: 6px;
}

.window-content::-webkit-scrollbar-thumb {
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.14);
}

.window-content .kicker {
  margin: 0 0 10px;
  color: var(--text-muted);
  font-size: 11.5px;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.window-content h2 {
  margin: 0 0 14px;
  color: var(--text);
  font-size: 22px;
  font-weight: 800;
  line-height: 1.2;
  letter-spacing: -0.015em;
}

.window-content p {
  margin: 0;
  color: var(--text-mid);
  font-size: 14.5px;
  line-height: 1.65;
}

.window-content .about-intro {
  margin-bottom: 0;
}

.window-content .about-section-title {
  margin-top: 36px;
}

.repertoire-content {
  padding: 30px 34px;
  background: #181818;
  font-family: var(--mono);
}

.repertoire-content section + section {
  margin-top: 28px;
}

.repertoire-content h3 {
  margin: 0 0 12px;
  color: var(--text);
  font-size: 24px;
  font-weight: 900;
  line-height: 1.1;
}

.repertoire-content ul {
  display: grid;
  gap: 9px;
  margin: 0;
  padding-left: 22px;
}

.repertoire-content li {
  color: var(--text-mid);
  font-size: 15px;
  line-height: 1.45;
}

/* ── Folder / Projects Window ── */

.folder-window {
  top: 136px;
  right: 74px;
  width: min(650px, calc(100vw - 48px));
  border-color: rgba(255, 255, 255, 0.2);
  box-shadow:
    var(--shadow),
    inset 0 1.5px 0 rgba(190, 190, 190, 0.32),
    inset 0 1px 0 rgba(255, 255, 255, 0.18);
}

.music-window {
  top: 156px;
  right: 118px;
  width: min(560px, calc(100vw - 48px));
}

.folder-window.is-open {
  display: flex;
  min-height: 330px;
  flex-direction: column;
}

.folder-nav {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 10px;
  border-bottom: 1px solid var(--border);
  background: rgba(8, 8, 8, 0.7);
  flex-shrink: 0;
}

.folder-back {
  display: grid;
  place-items: center;
  width: 24px;
  height: 24px;
  border: 1px solid var(--border-mid);
  border-radius: 7px;
  background: var(--surface-hover);
  color: var(--text-mid);
  transition: background 140ms ease, color 140ms ease, border-color 140ms ease;
  flex-shrink: 0;
}

.folder-back[hidden] {
  display: none;
}

.folder-back svg {
  width: 9px;
  height: 9px;
  pointer-events: none;
}

.folder-back:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.3);
  color: rgba(255, 255, 255, 0.88);
}

.folder-breadcrumb {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.04em;
  color: var(--text-mid);
  text-transform: uppercase;
}

.folder-canvas {
  flex: 1;
  min-height: 0;
  overflow: auto;
  background: #101010;
}

.folder-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, 88px);
  column-gap: 10px;
  row-gap: 8px;
  justify-content: start;
  padding: 14px;
  user-select: none;
  -webkit-user-select: none;
}

.folder-grid.is-empty {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 160px;
}

.folder-empty {
  margin: 0;
  text-align: center;
  color: var(--text-muted);
  font-size: 13px;
  line-height: 1.7;
}

.folder-status {
  flex-shrink: 0;
  min-height: 28px;
  border-top: 1px solid var(--border);
  padding: 5px 14px;
  color: var(--text-muted);
  font-size: 11.5px;
  letter-spacing: 0.03em;
}

/* ── Project Items ── */

.project-item {
  display: grid;
  grid-template-rows: 58px minmax(30px, auto);
  justify-items: center;
  align-items: start;
  gap: 2px;
  min-height: 108px;
  border-radius: 10px;
  padding: 10px 6px 8px;
  cursor: default;
  user-select: none;
  -webkit-user-select: none;
  transition: background 160ms ease, box-shadow 160ms ease;
}

.project-item:hover {
  background: rgba(255, 255, 255, 0.05);
}

.project-item.is-selected {
  background: rgba(255, 255, 255, 0.1);
  box-shadow: 0 0 0 1.5px rgba(255, 255, 255, 0.45);
}

.project-item.is-selected .project-thumb {
  box-shadow:
    0 0 0 2px rgba(255, 255, 255, 0.58),
    0 0 0 3px rgba(0, 0, 0, 0.62),
    0 6px 20px rgba(0, 0, 0, 0.38),
    inset 0 1px 0 rgba(255, 255, 255, 0.12);
}

.project-thumb {
  display: grid;
  place-items: center;
  width: 58px;
  height: 58px;
  border-radius: 14px;
  font-size: 24px;
  box-shadow:
    0 6px 20px rgba(0, 0, 0, 0.38),
    inset 0 1px 0 rgba(255, 255, 255, 0.12);
  overflow: hidden;
}

.folder-thumb {
  background: none;
  box-shadow: none;
  padding: 0;
}

.project-item.is-selected .folder-thumb {
  box-shadow: none;
}

.project-item.is-selected .repertoire-thumb {
  box-shadow: none;
}

.project-item.is-selected .folder-thumb .folder-img {
  filter: none;
}

.folder-thumb .folder-img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
  pointer-events: none;
  filter: none;
}

.music-window .folder-thumb .folder-img {
  transform: translateY(8px);
}

.music-window .folder-thumb,
.music-window .repertoire-thumb {
  border-radius: 0;
  overflow: visible;
}

.project-item[data-folder-id],
.project-item[data-music-action],
.project-item[data-file-app],
.project-item[data-video-id] {
  cursor: pointer;
}

.repertoire-thumb {
  background: none;
  box-shadow: none;
  padding: 0;
}

.document-thumb {
  background: none;
  box-shadow: none;
  padding: 0;
}

.repertoire-thumb img,
.document-thumb img {
  width: 110%;
  height: 110%;
  display: block;
  object-fit: cover;
  pointer-events: none;
}

.project-item.is-selected .document-thumb {
  box-shadow: none;
}

/* ── PDF Window ── */

.pdf-window {
  top: 96px;
  right: 82px;
  width: min(600px, calc(100vw - 48px));
  height: min(800px, calc(100vh - 122px));
  min-height: 440px;
  background: #111;
  border-color: rgba(255, 255, 255, 0.14);
  box-shadow: var(--shadow), inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

.pdf-window.is-open {
  display: flex;
  flex-direction: column;
}

.pdf-content {
  flex: 1;
  min-height: 0;
  overflow: hidden;
  background: #0a0a0a;
}

.pdf-content iframe {
  width: 100%;
  height: 100%;
  border: 0;
  display: block;
  background: #0a0a0a;
}

.project-thumb[data-tag="web"] {
  background: linear-gradient(135deg, #38bdf8, #2563eb);
}

.project-thumb[data-tag="ai"] {
  background: linear-gradient(135deg, #a78bfa, #ec4899);
}

.project-thumb[data-tag="tools"] {
  background: linear-gradient(135deg, #34d399, #0f766e);
}

.project-thumb[data-tag="research"] {
  background: linear-gradient(135deg, #fbbf24, #f97316);
}

.youtube-thumb {
  background: #ffffff;
  width: 50px;
  height: 50px;
  align-self: start;
  margin-top: 8px;
  border-radius: 14px;
}

.youtube-thumb svg {
  width: 37px;
  height: 26px;
  display: block;
}


.music-menu {
  display: grid;
  gap: 8px;
  margin: 0 14px 14px;
  border: 1px solid var(--border-mid);
  border-radius: 10px;
  padding: 12px;
  background: rgba(255, 255, 255, 0.04);
}

.music-menu[hidden] {
  display: none;
}

.music-menu p {
  margin: 0;
  color: var(--text);
  font-size: 13px;
  font-weight: 800;
}

.music-menu a {
  display: flex;
  align-items: center;
  min-height: 42px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 10px;
  padding: 0 12px;
  color: var(--text);
  background: rgba(255, 255, 255, 0.03);
  font-weight: 700;
  font-size: 13.5px;
  text-decoration: none;
  overflow-wrap: anywhere;
  transition: background 150ms ease, border-color 150ms ease, color 150ms ease;
}

.music-menu a:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.28);
  color: rgba(255, 255, 255, 0.92);
}

.project-name {
  display: block;
  font-size: 11.5px;
  font-weight: 600;
  color: var(--text-mid);
  text-align: center;
  max-width: 100px;
  min-height: 30px;
  margin-top: -3px;
  line-height: 1.3;
  overflow-wrap: anywhere;
  user-select: none;
  -webkit-user-select: none;
}

.music-window .project-name {
  margin-top: 5px;
}

/* ── Player Window ── */

.player-window {
  top: 130px;
  left: 50%;
  width: min(680px, calc(100vw - 48px));
  transform: translateX(-50%);
  background: #111;
  border-color: rgba(255, 255, 255, 0.14);
  box-shadow: var(--shadow), inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

.player-window.is-open {
  display: flex;
  flex-direction: column;
}

.player-content {
  display: flex;
  flex-direction: column;
  flex: 1;
  min-height: 0;
}

.player-embed {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  background: #000;
  flex-shrink: 0;
}

.player-embed iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
  display: block;
}

.player-info {
  padding: 14px 18px;
  border-top: 1px solid var(--border);
  background: #111;
  flex-shrink: 0;
}

.player-video-title {
  display: block;
  font-size: 13.5px;
  font-weight: 600;
  letter-spacing: -0.01em;
  color: var(--text);
  line-height: 1.4;
}

/* ── Video folder thumbnails ── */

.project-item[data-video-id] {
  grid-template-rows: 43px minmax(30px, auto);
}

.video-thumb {
  width: 76px;
  height: 43px;
  background-color: #000;
  background-size: cover;
  background-position: center;
  padding: 0;
  overflow: hidden;
  border-radius: 8px;
}

/* ── Contact ── */

.contact-list {
  display: grid;
  gap: 8px;
}

.contact-list a,
.contact-row {
  display: flex;
  align-items: center;
  min-height: 44px;
  border: 1px solid var(--border-mid);
  border-radius: 10px;
  padding: 0 14px;
  color: var(--text);
  background: var(--surface-hover);
  font-weight: 700;
  font-size: 14px;
  text-decoration: none;
  overflow-wrap: anywhere;
  transition: background 150ms ease, border-color 150ms ease;
}

.contact-row {
  position: relative;
  padding: 0;
}

.contact-row a {
  flex: 1;
  min-width: 0;
  min-height: 42px;
  border: 0;
  background: transparent;
  padding-right: 48px;
}

.contact-list a:hover,
.contact-row:hover,
.contact-row:focus-within {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.28);
}

.contact-copy {
  position: absolute;
  right: 9px;
  top: 50%;
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 7px;
  color: rgba(255, 255, 255, 0.72);
  background: rgba(255, 255, 255, 0.06);
  opacity: 0;
  pointer-events: none;
  transform: translateY(-50%) scale(0.96);
  transition: opacity 140ms ease, transform 140ms ease, background 140ms ease, border-color 140ms ease, color 140ms ease;
}

.contact-copy svg {
  width: 16px;
  height: 16px;
}

.contact-row:hover .contact-copy,
.contact-row:focus-within .contact-copy {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(-50%) scale(1);
}

.contact-copy:hover {
  color: #fff;
  border-color: rgba(255, 255, 255, 0.22);
  background: rgba(255, 255, 255, 0.12);
}

.contact-copy.is-copied {
  color: #28c840;
}

.contact-window .contact-list a,
.contact-window .contact-row {
  border-color: rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.03);
  color: var(--text);
}

.contact-window .contact-row a {
  border: 0;
  background: transparent;
}

.contact-row a:hover,
.contact-window .contact-row a:hover {
  border-color: transparent;
  background: transparent;
}

.contact-window .contact-list a:hover,
.contact-window .contact-row:hover,
.contact-window .contact-row:focus-within {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.28);
  color: rgba(255, 255, 255, 0.92);
}

/* ── Resume ── */

.resume-content h2 {
  font-size: 20px;
}

.resume-list {
  display: grid;
  margin-top: 16px;
}

.resume-list p {
  display: grid;
  grid-template-columns: minmax(56px, 72px) minmax(0, 1fr);
  gap: 12px;
  margin: 0;
  padding: 12px 0;
  border-top: 1px solid var(--border);
}

.resume-list strong {
  color: var(--text-muted);
  font-size: 11.5px;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding-top: 2px;
}

.resume-list span {
  color: var(--text);
  font-size: 13.5px;
  line-height: 1.55;
  min-width: 0;
  overflow-wrap: anywhere;
}

.resume-window .resume-list p {
  border-top-color: rgba(255, 255, 255, 0.07);
}

/* ── Dock ── */

.dock {
  position: fixed;
  bottom: 18px;
  left: 50%;
  z-index: 30;
  display: flex;
  align-items: flex-end;
  gap: 8px;
  max-width: calc(100vw - 26px);
  padding: 10px 14px 12px;
  border: 1px solid rgba(255, 255, 255, 0.09);
  border-radius: 22px;
  background: rgba(10, 10, 10, 0.68);
  box-shadow:
    0 20px 64px rgba(0, 0, 0, 0.44),
    inset 0 1px 0 rgba(255, 255, 255, 0.06);
  transform: translateX(-50%);
  backdrop-filter: blur(44px) saturate(160%);
  -webkit-backdrop-filter: blur(44px) saturate(160%);
}

.dock-item {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 64px;
  border: 0;
  padding: 0;
  color: var(--text);
  background: transparent;
}

.dock-item:focus-visible {
  outline: none;
}

.dock-icon {
  position: relative;
  display: grid;
  width: 54px;
  height: 54px;
  place-items: center;
  border: none;
  border-radius: 15px;
  box-shadow: none;
  overflow: hidden;
  transition: filter 180ms ease, box-shadow 180ms ease;
}

.dock-item:hover .dock-icon,
.dock-item:focus-visible .dock-icon {
  filter: brightness(1.12);
}

.dock-icon svg {
  width: 44px;
  height: 44px;
  pointer-events: none;
  position: relative;
  z-index: 1;
}

.terminal-icon svg {
  width: 100%;
  height: 100%;
}

.dock-label {
  position: absolute;
  bottom: calc(100% + 14px);
  left: 50%;
  display: none;
  border-radius: 7px;
  padding: 5px 10px;
  color: var(--text);
  background: rgba(10, 10, 10, 0.96);
  border: 1px solid var(--border-mid);
  font-size: 12px;
  font-weight: 700;
  transform: translateX(-50%);
  white-space: nowrap;
  box-shadow: 0 4px 18px rgba(0, 0, 0, 0.35);
  pointer-events: none;
}

.dock-item:hover .dock-label,
.dock-item:focus-visible .dock-label {
  display: block;
}

.dock-item.active::after {
  content: "";
  position: absolute;
  bottom: -8px;
  left: 50%;
  width: 4px;
  height: 4px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.7);
  transform: translateX(-50%);
  box-shadow: 0 0 6px rgba(255, 255, 255, 0.45);
}

/* Dock icon backgrounds */

.terminal-icon {
  background: linear-gradient(145deg, #111827, #020617);
  color: rgba(248, 248, 248, 0.92);
}

.about-icon {
  background: linear-gradient(145deg, #7dd3fc, #2563eb 58%, #1e3a8a);
  color: rgba(255, 255, 255, 0.92);
}

.contact-icon {
  background: #111;
  color: rgba(255, 255, 255, 0.92);
}

.resume-icon {
  background: linear-gradient(145deg, #fda4af, #f97316 52%, #be123c);
  color: rgba(255, 255, 255, 0.92);
}

/* ── Media Window ── */

.media-window {
  top: 104px;
  right: 60px;
  width: min(864px, calc(100vw - 48px));
  height: min(520px, calc(100vh - 146px));
  border-color: rgba(255, 255, 255, 0.18);
  box-shadow:
    var(--shadow),
    inset 0 1.5px 0 rgba(190, 190, 190, 0.28),
    inset 0 1px 0 rgba(255, 255, 255, 0.15);
}

.media-window.is-open,
.media-window.is-minimizing,
.media-window.is-restoring {
  display: flex;
  min-height: 480px;
  flex-direction: column;
}

.media-shell {
  display: grid;
  grid-template-columns: 158px 1fr;
  flex: 1;
  min-height: 0;
}

.media-sidebar {
  border-right: 1px solid var(--border);
  background: #0e0e0e;
  padding: 10px 7px;
  overflow-y: auto;
  flex-shrink: 0;
}

.media-sidebar-section {
  margin-bottom: 6px;
}

.media-sidebar-heading {
  padding: 4px 9px 7px;
  color: var(--text-muted);
  font-size: 10.5px;
  font-weight: 800;
  letter-spacing: 0.09em;
  text-transform: uppercase;
}

.media-nav-item {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  min-height: 31px;
  border: 0;
  border-radius: 8px;
  padding: 0 9px;
  color: var(--text-mid);
  background: transparent;
  font-size: 13px;
  font-weight: 500;
  text-align: left;
  transition: background 140ms ease, color 140ms ease;
}

.media-nav-item:hover {
  background: rgba(255, 255, 255, 0.06);
  color: var(--text);
}

.media-nav-item.is-active {
  background: rgba(255, 255, 255, 0.1);
  color: var(--text);
  font-weight: 600;
}

.media-nav-item svg {
  width: 15px;
  height: 15px;
  flex-shrink: 0;
  opacity: 0.65;
}

.media-nav-item.is-active svg {
  opacity: 1;
}

.media-content {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  background: #0d0d0d;
  padding: 14px;
}

.media-content::-webkit-scrollbar {
  width: 6px;
}

.media-content::-webkit-scrollbar-thumb {
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.14);
}

/* Photo grid */

.photo-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, 100px);
  gap: 3px;
  justify-content: start;
}

.photo-item {
  width: 100px;
  height: 100px;
  border-radius: 4px;
  position: relative;
  cursor: pointer;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.07);
  transition: opacity 150ms ease, transform 150ms ease;
}

.photo-item:hover {
  opacity: 0.78;
  transform: scale(0.96);
}

.photo-fav {
  position: absolute;
  bottom: 5px;
  right: 6px;
  color: #fff;
  font-size: 11px;
  line-height: 1;
  text-shadow: 0 1px 4px rgba(0, 0, 0, 0.6);
}

/* Lightbox */

.media-lb {
  position: absolute;
  top: var(--bar-h);
  left: 0;
  right: 0;
  bottom: 0;
  display: flex;
  flex-direction: column;
  background: #050505;
  z-index: 20;
}

.media-lb[hidden] {
  display: none;
}

.media-lb-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 9px 12px;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  flex-shrink: 0;
}

.media-lb-close {
  display: grid;
  place-items: center;
  width: 26px;
  height: 26px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  color: rgba(255, 255, 255, 0.7);
  transition: background 140ms ease, color 140ms ease;
}

.media-lb-close svg {
  width: 9px;
  height: 9px;
}

.media-lb-close:hover {
  background: rgba(255, 255, 255, 0.16);
  color: #fff;
}

.media-lb-fav {
  color: #ff375f;
  font-size: 15px;
  line-height: 1;
}

.media-empty {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 100%;
  min-height: 180px;
  color: var(--text-muted);
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.04em;
}

.media-lb-img {
  flex: 1;
  background: #111;
  background-size: cover;
  background-position: center;
}

/* Album grid */

.album-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(128px, 1fr));
  gap: 16px;
}

.album-item {
  cursor: pointer;
  transition: transform 150ms ease;
}

.album-item:hover {
  transform: translateY(-2px);
}

.album-cover {
  aspect-ratio: 1;
  border-radius: 10px;
  margin-bottom: 7px;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.45);
}

.album-label {
  display: block;
  font-size: 12.5px;
  font-weight: 600;
  color: var(--text);
}

.album-count {
  display: block;
  font-size: 11px;
  color: var(--text-muted);
  margin-top: 2px;
}

/* Album back header */

.media-content-header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 14px;
}

.media-back-btn {
  display: flex;
  align-items: center;
  gap: 4px;
  border: 0;
  border-radius: 7px;
  padding: 4px 9px;
  background: rgba(255, 255, 255, 0.06);
  color: var(--text-mid);
  font-size: 12px;
  font-weight: 600;
  transition: background 140ms ease, color 140ms ease;
}

.media-back-btn:hover {
  background: rgba(255, 255, 255, 0.1);
  color: var(--text);
}

.media-back-btn svg {
  width: 9px;
  height: 9px;
}

.media-content-title {
  font-size: 14px;
  font-weight: 700;
  color: var(--text);
}

/* Dock — media icon */

.about-icon-img,
.contact-icon-img,
.resume-icon-img,
.media-icon-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 15px;
  display: block;
}

/* ── Mobile ── */

@media (max-width: 820px) {
  :root {
    color-scheme: light;
  }

  body {
    min-height: 100%;
    overflow: auto;
    background: #fff;
    color: #080808;
    background-image: none;
    font-family: var(--sans);
    animation: none;
  }

  body.is-launching {
    animation: none;
  }

  .wallpaper,
  .screen-vignette,
  .desktop,
  .dock {
    display: none;
  }

  .mobile-site {
    display: block;
    min-height: 100svh;
    width: 100%;
    max-width: 390px;
    padding: 26px 24px 32px;
    overflow-x: hidden;
  }

  .mobile-site h1 {
    margin: 0 0 74px;
    color: #050505;
    font-size: 38px;
    font-weight: 500;
    line-height: 1.08;
    letter-spacing: 0;
  }

  .mobile-about h2 {
    margin: 0 0 18px;
    color: #050505;
    font-size: 26px;
    font-weight: 700;
    line-height: 1.18;
    letter-spacing: 0;
  }

  .mobile-about h2:not(:first-child) {
    margin-top: 42px;
  }

  .mobile-about p {
    margin: 0;
    max-width: 62ch;
    color: #080808;
    font-size: 21px;
    font-weight: 400;
    line-height: 1.58;
    letter-spacing: 0;
    overflow-wrap: break-word;
  }

  .mobile-links {
    display: flex;
    flex-wrap: wrap;
    gap: 22px;
    margin-top: 82px;
    padding-bottom: 20px;
  }

  .mobile-links a {
    color: #065cff;
    font-size: 21px;
    line-height: 1.2;
    text-decoration: none;
  }

  .mobile-links a:hover,
  .mobile-links a:focus-visible {
    text-decoration: underline;
  }

  .mobile-note {
    margin: 34px 0 0;
    max-width: 34ch;
    color: #666;
    font-size: 16px;
    line-height: 1.45;
    letter-spacing: 0;
  }
}

@media (max-width: 520px) {
  .mobile-site {
    max-width: 100%;
    padding: 22px 20px 30px;
  }

  .mobile-site h1 {
    margin-bottom: 58px;
    font-size: 36px;
  }

  .mobile-about h2 {
    font-size: 24px;
  }

  .mobile-about p {
    font-size: 19px;
    line-height: 1.55;
  }

  .mobile-links {
    gap: 18px;
    margin-top: 68px;
  }

  .mobile-links a {
    font-size: 19px;
  }

  .mobile-note {
    margin-top: 30px;
    font-size: 15px;
  }
}
