/* ============================================================
   umarOS — macOS-style portfolio
   ============================================================ */

:root {
  --font: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", Inter, Roboto, Helvetica, Arial, sans-serif;
  --mono: "SF Mono", ui-monospace, Menlo, Consolas, "Liberation Mono", monospace;

  /* ── Liquid Glass tokens ── */
  --glass-blur: 44px;
  --glass-sat: saturate(2.2) brightness(1.06);
  --glass-highlight: rgba(255, 255, 255, 0.55);
  --glass-edge: rgba(255, 255, 255, 0.35);
  --glass-glow: rgba(255, 255, 255, 0.08);

  --bar-bg: rgba(250, 250, 252, 0.52);
  --panel-bg: rgba(248, 248, 250, 0.68);
  --win-bg: rgba(242, 242, 247, 0.72);
  --win-solid: #f5f5f7;
  --side-bg: rgba(246, 246, 248, 0.45);
  --card-bg: rgba(255, 255, 255, 0.55);
  --chip-bg: rgba(120, 120, 128, 0.1);
  --btn-bg: rgba(255, 255, 255, 0.7);
  --sep: rgba(0, 0, 0, 0.08);
  --txt: #1d1d1f;
  --txt-2: #3a3a3c;
  --txt-3: #6e6e73;
  --sel-bg: rgba(0, 122, 255, 0.15);
  --accent: #0a84ff;
  --dock-bg: rgba(255, 255, 255, 0.22);
}

body.dark {
  --glass-highlight: rgba(255, 255, 255, 0.12);
  --glass-edge: rgba(255, 255, 255, 0.14);
  --glass-glow: rgba(255, 255, 255, 0.04);

  --bar-bg: rgba(24, 24, 28, 0.48);
  --panel-bg: rgba(32, 32, 36, 0.72);
  --win-bg: rgba(28, 28, 32, 0.7);
  --win-solid: #1e1e22;
  --side-bg: rgba(255, 255, 255, 0.04);
  --card-bg: rgba(255, 255, 255, 0.06);
  --chip-bg: rgba(255, 255, 255, 0.09);
  --btn-bg: rgba(255, 255, 255, 0.1);
  --sep: rgba(255, 255, 255, 0.1);
  --txt: #f5f5f7;
  --txt-2: #d0d0d5;
  --txt-3: #98989f;
  --sel-bg: rgba(10, 132, 255, 0.32);
  --accent: #409cff;
  --dock-bg: rgba(20, 20, 24, 0.32);
}

* { margin: 0; padding: 0; box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { height: 100%; overflow: hidden; }
body {
  font-family: var(--font);
  color: var(--txt);
  background: #000;
  -webkit-font-smoothing: antialiased;
  user-select: none;
}
/* macOS uses the arrow cursor for chrome/buttons — only true links get the hand */
button { font-family: inherit; color: inherit; background: none; border: none; cursor: default; }
img { max-width: 100%; }
.muted { color: var(--txt-3); }
.accent { color: var(--accent); }
.hidden { display: none !important; }
::selection { background: rgba(10, 132, 255, 0.32); }
body, #menubar, #dock, .widget { transition: background-color 0.25s ease, color 0.25s ease; }
.win { transition: background-color 0.25s ease; }

::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-thumb { background: rgba(127, 127, 127, 0.4); border-radius: 4px; }
::-webkit-scrollbar-track { background: transparent; }

/* ---------------- wallpapers ---------------- */

.wp-1 {
  background:
    url("../Wallpaper/macos-tahoe-26-3840x2160-22671.png") center / cover no-repeat,
    linear-gradient(165deg, #1a3a6e, #2a6ab8 55%, #4aa0e8);
}
.wp-2 {
  background:
    url("../Wallpaper/macos-tahoe-26-5120x2880-22674.jpg") center / cover no-repeat,
    linear-gradient(170deg, #2a1848, #6a2888 55%, #a048c8);
}
.wp-3 {
  background:
    url("../Wallpaper/macos-tahoe-26-5120x2880-22675.jpg") center / cover no-repeat,
    linear-gradient(165deg, #0a3050, #1a6090 55%, #3aa0d0);
}
.wp-4 {
  background:
    url("../assets/images/wallpaper-sonoma.jpg") center / cover no-repeat,
    linear-gradient(165deg, #4a5fd0 0%, #7a77dd 30%, #e8746a 52%, #2e6d35 68%, #9dc93f 100%);
}
.wp-5 {
  background:
    radial-gradient(100% 80% at 80% 10%, rgba(80, 220, 170, 0.35), transparent 55%),
    radial-gradient(110% 90% at 15% 90%, rgba(20, 120, 110, 0.55), transparent 62%),
    linear-gradient(160deg, #04150f, #0b3a2e 50%, #14584a);
}

/* ---------------- boot screen ---------------- */

#boot {
  position: fixed; inset: 0; z-index: 2000;
  background: #000; color: #fff;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 60px;
  transition: opacity 0.6s ease;
}
#boot.done { opacity: 0; pointer-events: none; }
.boot-logo {
  font-size: 96px; font-weight: 600; letter-spacing: -3px;
  text-shadow: 0 0 46px rgba(255, 255, 255, 0.38);
}
.boot-bar { width: 190px; height: 4px; background: rgba(255, 255, 255, 0.22); border-radius: 3px; overflow: hidden; }
#boot-fill { display: block; width: 4%; height: 100%; background: #fff; border-radius: 3px; transition: width 0.7s ease; }

/* ---------------- login screen ---------------- */

#login {
  position: fixed; inset: 0; z-index: 1500;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  cursor: pointer; overflow: hidden;
  transition: opacity 0.6s ease, transform 0.6s ease;
}
#login::before { content: ""; position: absolute; inset: -20px; backdrop-filter: blur(28px) brightness(0.92); }
#login.unlocking { opacity: 0; transform: scale(1.06); }
.login-inner { position: relative; text-align: center; color: #fff; text-shadow: 0 2px 14px rgba(0, 0, 0, 0.4); }
#login-time { font-size: 88px; font-weight: 200; letter-spacing: -2px; line-height: 1; }
#login-date { font-size: 17px; font-weight: 500; margin-top: 8px; opacity: 0.9; }
#login-avatar {
  width: 112px; height: 112px; border-radius: 50%; object-fit: cover;
  margin: 52px auto 14px; display: block;
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.4), 0 0 0 3px rgba(255, 255, 255, 0.35);
}
#login-name { font-size: 20px; font-weight: 600; }
.login-hint { margin-top: 26px; font-size: 13px; opacity: 0.85; }
.login-hint kbd {
  background: rgba(255, 255, 255, 0.22); border-radius: 5px; padding: 2px 7px;
  font-family: var(--font); font-size: 12px;
}

/* ---------------- desktop ---------------- */

#desktop { position: fixed; inset: 0; overflow: hidden; }
#windows { position: absolute; inset: 0; }

#sleep {
  position: fixed; inset: 0; z-index: 1900; background: #000;
  opacity: 0; pointer-events: none; transition: opacity 0.55s ease;
}
#sleep.on { opacity: 1; pointer-events: auto; cursor: pointer; }
#dimmer { position: fixed; inset: 0; z-index: 1800; background: #000; opacity: 0; pointer-events: none; transition: opacity 0.2s; }

/* ---------------- menu bar ---------------- */

#menubar {
  position: fixed; top: 0; left: 0; right: 0; height: 30px; z-index: 1000;
  display: flex; align-items: center; gap: 2px; padding: 0 12px;
  background: var(--bar-bg);
  backdrop-filter: blur(var(--glass-blur)) var(--glass-sat);
  -webkit-backdrop-filter: blur(var(--glass-blur)) var(--glass-sat);
  font-size: 13px; color: var(--txt);
  box-shadow:
    0 0.5px 0 var(--sep),
    inset 0 0.5px 0 var(--glass-highlight);
}
.mb-item { padding: 3px 10px; border-radius: 5px; font-size: 13px; line-height: 1; }
.mb-item:hover { background: rgba(127, 127, 127, 0.18); }
.mb-apple { font-size: 15px; padding: 2px 10px 4px; }
.mb-apple svg { width: 15px; height: 15px; vertical-align: -2.5px; fill: currentColor; }
#menu-appname { font-weight: 700; }
.mb-right { margin-left: auto; display: flex; align-items: center; gap: 4px; }
.mb-right .mb-item { display: flex; align-items: center; gap: 6px; }
#clock { font-variant-numeric: tabular-nums; white-space: pre; }

.bat { display: inline-flex; align-items: center; gap: 2px; }
.bat-body {
  width: 22px; height: 11px; border: 1px solid currentColor; opacity: 0.9;
  border-radius: 3px; padding: 1px; display: inline-flex;
}
#battery-fill { background: currentColor; border-radius: 1.5px; height: 100%; width: 16px; }
.bat-tip { width: 2px; height: 5px; background: currentColor; border-radius: 0 1.5px 1.5px 0; opacity: 0.6; }

.menu-panel {
  position: fixed; z-index: 1100; min-width: 220px;
  background: var(--panel-bg);
  backdrop-filter: blur(var(--glass-blur)) var(--glass-sat);
  -webkit-backdrop-filter: blur(var(--glass-blur)) var(--glass-sat);
  border: 0.5px solid var(--glass-edge); border-radius: 12px; padding: 5px;
  box-shadow:
    0 16px 48px rgba(0, 0, 0, 0.28),
    0 0 0 0.5px rgba(0, 0, 0, 0.12),
    inset 0 0.5px 0 var(--glass-highlight);
  animation: panel-in 0.14s ease;
}
@keyframes panel-in { from { opacity: 0; transform: translateY(-4px); } }
.mp-item {
  display: flex; justify-content: space-between; align-items: center; gap: 26px;
  width: 100%; text-align: left;
  padding: 5px 10px; border-radius: 5px; font-size: 13px;
}
.mp-item:hover { background: var(--accent); color: #fff; }
.mp-key { color: var(--txt-3); font-size: 12.5px; letter-spacing: 0.06em; }
.mp-item:hover .mp-key { color: rgba(255, 255, 255, 0.75); }
.mp-sep { height: 1px; background: var(--sep); margin: 4px 9px; }

/* ---------------- control center ---------------- */

#cc-panel {
  position: fixed; top: 36px; right: 10px; z-index: 1100; width: 310px;
  background: var(--panel-bg);
  backdrop-filter: blur(var(--glass-blur)) var(--glass-sat);
  -webkit-backdrop-filter: blur(var(--glass-blur)) var(--glass-sat);
  border: 0.5px solid var(--glass-edge); border-radius: 18px; padding: 14px;
  box-shadow:
    0 18px 52px rgba(0, 0, 0, 0.3),
    0 0 0 0.5px rgba(0, 0, 0, 0.1),
    inset 0 0.5px 0 var(--glass-highlight);
  display: none; flex-direction: column; gap: 12px;
}
#cc-panel.open { display: flex; animation: panel-in 0.16s ease; }
.cc-row { display: flex; align-items: center; gap: 10px; }
.cc-card { background: var(--card-bg); border: 0.5px solid var(--sep); border-radius: 12px; padding: 10px 12px; }
.cc-toggle { display: flex; align-items: center; gap: 10px; width: 100%; text-align: left; font-size: 13px; }
.cc-knob {
  width: 38px; height: 23px; border-radius: 12px; background: rgba(127, 127, 127, 0.4);
  position: relative; flex: none; transition: background 0.2s;
}
.cc-knob::after {
  content: ""; position: absolute; top: 2px; left: 2px; width: 19px; height: 19px;
  border-radius: 50%; background: #fff; transition: left 0.2s;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
}
.cc-toggle.on .cc-knob { background: #34c759; }
.cc-toggle.on .cc-knob::after { left: 17px; }
.cc-label { font-size: 12px; font-weight: 600; color: var(--txt-3); margin-bottom: 6px; }
.cc-slider {
  -webkit-appearance: none; appearance: none;
  width: 100%; height: 22px; background: transparent; cursor: default;
}
.cc-slider::-webkit-slider-runnable-track {
  height: 8px; border-radius: 4px;
  background: linear-gradient(to right, #fff var(--fill, 100%), rgba(120, 120, 128, 0.32) var(--fill, 100%));
  box-shadow: inset 0 0 0 0.5px rgba(0, 0, 0, 0.06);
}
.cc-slider::-webkit-slider-thumb {
  -webkit-appearance: none; width: 20px; height: 20px; margin-top: -6px;
  border-radius: 50%; background: #fff;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.35), inset 0 0 0 0.5px rgba(0, 0, 0, 0.08);
}
.cc-slider::-moz-range-track { height: 8px; border-radius: 4px; background: rgba(120, 120, 128, 0.32); }
.cc-slider::-moz-range-progress { height: 8px; border-radius: 4px; background: #fff; }
.cc-slider::-moz-range-thumb {
  width: 20px; height: 20px; border: none; border-radius: 50%; background: #fff;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.35);
}
.cc-walls { display: flex; gap: 8px; }
.wall-thumb {
  width: 50px; height: 32px; border-radius: 8px; border: 2px solid transparent;
  cursor: pointer; flex: none;
}
.wall-thumb.on { border-color: var(--accent); box-shadow: 0 0 0 1.5px var(--win-solid) inset; }
.cc-me { display: flex; align-items: center; gap: 10px; }
.cc-me img { width: 36px; height: 36px; border-radius: 50%; object-fit: cover; }
.cc-me b { font-size: 13px; display: block; }
.cc-me span { font-size: 11.5px; color: var(--txt-3); }

/* ---------------- desktop widgets ---------------- */

#widgets {
  position: absolute; top: 44px; left: 14px; z-index: 4;
  display: flex; flex-direction: column; gap: 14px;
}
.widget {
  background: var(--panel-bg);
  backdrop-filter: blur(var(--glass-blur)) var(--glass-sat);
  -webkit-backdrop-filter: blur(var(--glass-blur)) var(--glass-sat);
  border: 0.5px solid var(--glass-edge); border-radius: 22px;
  box-shadow:
    0 12px 38px rgba(0, 0, 0, 0.25),
    0 0 0 0.5px rgba(0, 0, 0, 0.08),
    inset 0 0.5px 0 var(--glass-highlight);
  color: var(--txt);
}

/* Clock widget */
.w-clock {
  width: 160px; height: 160px;
  display: flex; flex-direction: column; align-items: center;
  padding: 11px 10px 8px;
}
.wclk-face {
  position: relative; flex: none; width: 100px; height: 100px; border-radius: 50%;
  background: var(--win-solid);
  box-shadow: inset 0 0 0 1px var(--sep), 0 2px 8px rgba(0, 0, 0, 0.18);
}
.wclk-tick {
  position: absolute; left: 50%; top: 3px; width: 1.5px; height: 6px; margin-left: -0.75px;
  background: var(--txt-3); border-radius: 1px;
  transform-origin: 50% 47px;
}
.wclk-tick.big { width: 2.5px; height: 8px; margin-left: -1.25px; background: var(--txt-2); }
.wclk-hand {
  position: absolute; left: 50%; bottom: 50%;
  transform-origin: 50% 100%; border-radius: 3px; background: var(--txt);
}
.wclk-h { width: 4px; height: 25px; margin-left: -2px; }
.wclk-m { width: 3px; height: 37px; margin-left: -1.5px; }
.wclk-s { width: 1.5px; height: 43px; margin-left: -0.75px; background: #ff3b30; }
.wclk-cap {
  position: absolute; left: 50%; top: 50%; width: 7px; height: 7px;
  margin: -3.5px 0 0 -3.5px; border-radius: 50%;
  background: #ff3b30; box-shadow: 0 0 0 1.5px var(--win-solid);
}
.w-clock .w-label { margin-top: 8px; text-align: center; line-height: 1.3; }
.w-clock .w-label b { display: block; font-size: 12px; }
.w-clock .w-label span { font-size: 11px; color: var(--txt-3); font-variant-numeric: tabular-nums; }

/* Work streak / activity widget */
.w-grind {
  width: 322px; padding: 13px 15px 12px;
  text-align: left; overflow: hidden;
  transition: transform 0.16s ease, box-shadow 0.16s ease;
}
.w-grind:hover { transform: translateY(-2px); box-shadow: 0 14px 40px rgba(0, 0, 0, 0.32); }
.wg-head { display: flex; align-items: center; gap: 9px; margin-bottom: 10px; }
.wg-fire { font-size: 22px; }
.wg-head b { display: block; font-size: 13px; }
.wg-head .wg-days { display: block; font-size: 11.5px; color: var(--txt-3); margin-top: 1px; }
.wg-badge {
  margin-left: auto; font-size: 9px; font-weight: 700; letter-spacing: 0.05em;
  color: #fff; background: linear-gradient(135deg, #34c759, #248a3d);
  padding: 3.5px 9px; border-radius: 20px; text-transform: uppercase;
  white-space: nowrap; flex: none;
}
.wg-head .wg-days { white-space: nowrap; }
.wg-grid {
  display: grid; grid-template-rows: repeat(7, 10px); grid-auto-flow: column;
  grid-auto-columns: 10px; gap: 3.5px; justify-content: center;
}
.wg-cell { border-radius: 2.5px; background: var(--hm-0); }
.wg-cell.l1 { background: var(--hm-1); }
.wg-cell.l2 { background: var(--hm-2); }
.wg-cell.l3 { background: var(--hm-3); }
.wg-cell.l4 { background: var(--hm-4); }
.wg-foot {
  margin-top: 10px; font-size: 11px; color: var(--txt-3);
  display: flex; justify-content: space-between; gap: 6px; flex-wrap: wrap;
}
:root {
  --hm-0: rgba(120, 120, 128, 0.16);
  --hm-1: #9be9a8; --hm-2: #40c463; --hm-3: #30a14e; --hm-4: #216e39;
}
body.dark {
  --hm-0: rgba(255, 255, 255, 0.09);
  --hm-1: #0e4429; --hm-2: #006d32; --hm-3: #26a641; --hm-4: #39d353;
}

/* ---------------- desktop icons ---------------- */

#desk-icons {
  position: absolute; top: 44px; right: 12px; z-index: 5;
  display: flex; flex-direction: column; gap: 16px;
}
.desk-icon { width: 90px; display: flex; flex-direction: column; align-items: center; gap: 5px; }
.di-img { width: 58px; height: 58px; filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.35)); }
.di-img svg { width: 100%; height: 100%; }
.di-label {
  font-size: 12px; font-weight: 500; color: #fff; text-align: center;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.85);
  padding: 1px 7px; border-radius: 4px; line-height: 1.35;
}
.desk-icon.sel .di-label { background: var(--accent); text-shadow: none; }
.desk-icon.sel .di-img { filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.35)) brightness(0.82); }

/* ---------------- windows ---------------- */

.win {
  position: absolute; display: flex; flex-direction: column;
  border-radius: 12px; overflow: hidden;
  background: var(--win-bg);
  backdrop-filter: blur(var(--glass-blur)) var(--glass-sat);
  -webkit-backdrop-filter: blur(var(--glass-blur)) var(--glass-sat);
  box-shadow:
    0 0 0 0.5px rgba(0, 0, 0, 0.2),
    0 24px 72px rgba(0, 0, 0, 0.35),
    0 8px 24px rgba(0, 0, 0, 0.12);
  opacity: 0.985;
}
.win.focused {
  box-shadow:
    0 0 0 0.5px rgba(0, 0, 0, 0.25),
    0 12px 22px rgba(0, 0, 0, 0.15),
    0 42px 110px rgba(0, 0, 0, 0.5);
  opacity: 1;
}
.win::after {
  content: ""; position: absolute; inset: 0; border-radius: inherit;
  pointer-events: none; z-index: 12;
  box-shadow:
    inset 0 0.5px 0 var(--glass-highlight),
    inset 0 0 0 0.5px var(--glass-glow);
}
.win.opening { animation: win-in 0.32s cubic-bezier(0.2, 0.8, 0.3, 1.05); }
@keyframes win-in { from { transform: scale(0.9) translateY(14px); opacity: 0; } }
.win.closing { animation: win-out 0.22s ease forwards; }
@keyframes win-out { to { transform: scale(0.92) translateY(8px); opacity: 0; } }
.win.minimized { display: none; }

.titlebar {
  height: 40px; flex: none; position: relative;
  display: flex; align-items: center;
  cursor: default; touch-action: none;
  box-shadow: 0 0.5px 0 var(--sep);
}
.win-title {
  position: absolute; left: 0; right: 0; text-align: center;
  font-size: 13px; font-weight: 600; color: var(--txt-2);
  pointer-events: none;
}
.win:not(.focused) .win-title { color: var(--txt-3); }
.lights { display: flex; gap: 8px; padding-left: 13px; position: relative; z-index: 2; }
.light {
  width: 12.5px; height: 12.5px; border-radius: 50%; padding: 0;
  display: grid; place-items: center;
}
.light span {
  font-size: 8.5px; line-height: 1; color: rgba(0, 0, 0, 0.55);
  opacity: 0; transition: opacity 0.12s; font-weight: 700;
}
.lights:hover .light span { opacity: 1; }
.light.red { background: #ff5f57; box-shadow: inset 0 0 0 0.5px #e0443e; }
.light.yellow { background: #febc2e; box-shadow: inset 0 0 0 0.5px #d89e24; }
.light.green { background: #28c840; box-shadow: inset 0 0 0 0.5px #1eaa32; }
.win:not(.focused) .light { background: rgba(127, 127, 127, 0.35); box-shadow: none; }
.win:not(.focused) .titlebar:hover .light.red { background: #ff5f57; }
.win:not(.focused) .titlebar:hover .light.yellow { background: #febc2e; }
.win:not(.focused) .titlebar:hover .light.green { background: #28c840; }

.win-body { flex: 1; min-height: 0; display: flex; flex-direction: column; overflow: hidden; user-select: text; }
.win-body > * { flex: 1; min-height: 0; }

.rs { position: absolute; z-index: 3; }
.rs-n { top: -3px; left: 10px; right: 10px; height: 7px; cursor: ns-resize; }
.rs-s { bottom: -3px; left: 10px; right: 10px; height: 7px; cursor: ns-resize; }
.rs-e { right: -3px; top: 10px; bottom: 10px; width: 7px; cursor: ew-resize; }
.rs-w { left: -3px; top: 10px; bottom: 10px; width: 7px; cursor: ew-resize; }
.rs-ne { top: -4px; right: -4px; width: 13px; height: 13px; cursor: nesw-resize; }
.rs-sw { bottom: -4px; left: -4px; width: 13px; height: 13px; cursor: nesw-resize; }
.rs-nw { top: -4px; left: -4px; width: 13px; height: 13px; cursor: nwse-resize; }
.rs-se { bottom: -4px; right: -4px; width: 13px; height: 13px; cursor: nwse-resize; }

/* ---------------- dock ---------------- */

#dock-wrap {
  position: fixed; bottom: 10px; left: 50%; transform: translateX(-50%);
  z-index: 950; max-width: 96vw;
}
#dock {
  background: var(--dock-bg);
  backdrop-filter: blur(var(--glass-blur)) var(--glass-sat);
  -webkit-backdrop-filter: blur(var(--glass-blur)) var(--glass-sat);
  border: 0.5px solid var(--glass-edge);
  border-radius: 22px; padding: 6px 8px 8px;
  box-shadow:
    0 16px 48px rgba(0, 0, 0, 0.32),
    0 0 0 0.5px rgba(0, 0, 0, 0.08),
    inset 0 0.5px 0 var(--glass-highlight),
    inset 0 0 12px var(--glass-glow);
}
#dock-items { display: flex; align-items: flex-end; gap: 6px; }
.dock-item {
  width: 52px; height: 52px; position: relative; flex: none;
  display: flex; align-items: flex-end;
  transform-origin: center bottom;
  will-change: width, height;
  transition: width 0.18s cubic-bezier(0.2, 0.8, 0.3, 1), height 0.18s cubic-bezier(0.2, 0.8, 0.3, 1);
}
.dock-ico { width: 100%; height: 100%; display: block; }
.dock-ico svg { width: 100%; height: 100%; display: block; filter: drop-shadow(0 3px 6px rgba(0, 0, 0, 0.3)); }
.dock-sep {
  width: 1px; align-self: stretch; margin: 6px 5px;
  background: rgba(127, 127, 127, 0.3);
}
.dock-dot {
  position: absolute; bottom: -6px; left: 50%; transform: translateX(-50%);
  width: 4px; height: 4px; border-radius: 50%;
  background: var(--txt); opacity: 0; transition: opacity 0.2s;
}
.dock-item.running .dock-dot { opacity: 0.75; }
.dock-tip {
  position: absolute; bottom: calc(100% + 14px); left: 50%; transform: translateX(-50%);
  background: var(--panel-bg); color: var(--txt);
  border: 0.5px solid var(--glass-edge);
  backdrop-filter: blur(20px) saturate(1.8);
  -webkit-backdrop-filter: blur(20px) saturate(1.8);
  font-size: 12.5px; padding: 4px 11px; border-radius: 7px; white-space: nowrap;
  opacity: 0; pointer-events: none; transition: opacity 0.15s;
  box-shadow:
    0 6px 20px rgba(0, 0, 0, 0.22),
    inset 0 0.5px 0 var(--glass-highlight);
}
.dock-tip::after {
  content: ""; position: absolute; top: 100%; left: 50%; transform: translateX(-50%);
  border: 5px solid transparent; border-top-color: var(--panel-bg);
}
.dock-item:hover .dock-tip { opacity: 1; }
.dock-item:active .dock-ico svg { filter: drop-shadow(0 3px 6px rgba(0, 0, 0, 0.3)) brightness(0.72); }
.dock-item.bounce { animation: dock-bounce 0.68s cubic-bezier(0.3, 0.05, 0.3, 1); }
@keyframes dock-bounce {
  0%, 100% { transform: translateY(0); }
  38% { transform: translateY(-26px); }
  70% { transform: translateY(0); }
  85% { transform: translateY(-9px); }
}

/* ---------------- notifications ---------------- */

#notifs {
  position: fixed; top: 40px; right: 12px; z-index: 1200;
  display: flex; flex-direction: column; gap: 10px; width: 330px; max-width: calc(100vw - 24px);
}
.notif {
  display: flex; gap: 11px; align-items: flex-start;
  background: var(--panel-bg);
  backdrop-filter: blur(var(--glass-blur)) var(--glass-sat);
  -webkit-backdrop-filter: blur(var(--glass-blur)) var(--glass-sat);
  border: 0.5px solid var(--glass-edge); border-radius: 16px; padding: 11px 13px;
  box-shadow:
    0 14px 42px rgba(0, 0, 0, 0.28),
    0 0 0 0.5px rgba(0, 0, 0, 0.08),
    inset 0 0.5px 0 var(--glass-highlight);
  transform: translateX(115%); transition: transform 0.4s cubic-bezier(0.2, 0.8, 0.3, 1);
  cursor: pointer;
}
.notif.in { transform: none; }
.notif-ico { width: 34px; height: 34px; flex: none; }
.notif-ico svg { width: 100%; height: 100%; }
.notif b { font-size: 13px; display: block; margin-bottom: 2px; }
.notif p { font-size: 12.5px; color: var(--txt-2); line-height: 1.4; }

/* ---------------- spotlight ---------------- */

#spotlight {
  position: fixed; inset: 0; z-index: 1300;
  background: rgba(0, 0, 0, 0.18);
  display: flex; align-items: flex-start; justify-content: center;
}
.sp-panel {
  margin-top: 16vh; width: min(640px, 92vw);
  background: var(--panel-bg);
  backdrop-filter: blur(var(--glass-blur)) var(--glass-sat);
  -webkit-backdrop-filter: blur(var(--glass-blur)) var(--glass-sat);
  border: 0.5px solid var(--glass-edge); border-radius: 18px;
  box-shadow:
    0 28px 90px rgba(0, 0, 0, 0.38),
    0 0 0 0.5px rgba(0, 0, 0, 0.1),
    inset 0 0.5px 0 var(--glass-highlight);
  overflow: hidden; animation: sp-in 0.18s cubic-bezier(0.2, 0.8, 0.3, 1);
}
@keyframes sp-in { from { transform: scale(0.96); opacity: 0; } }
.sp-bar { display: flex; align-items: center; gap: 12px; padding: 13px 17px; }
.sp-glass { font-size: 19px; opacity: 0.6; }
#sp-input {
  flex: 1; border: none; outline: none; background: none;
  font-family: var(--font); font-size: 22px; font-weight: 300; color: var(--txt);
}
#sp-input::placeholder { color: var(--txt-3); }
#sp-results { border-top: 1px solid var(--sep); max-height: 46vh; overflow: auto; padding: 6px; }
.sp-row {
  display: flex; align-items: center; gap: 12px; width: 100%; text-align: left;
  padding: 8px 11px; border-radius: 9px; font-size: 13px;
}
.sp-row.sel, .sp-row:hover { background: var(--accent); color: #fff; }
.sp-row.sel span, .sp-row:hover span { color: rgba(255, 255, 255, 0.8); }
.sp-row b { display: block; font-size: 13.5px; }
.sp-row div span { display: block; font-size: 11.5px; color: var(--txt-3); margin-top: 1px; }
.sp-ico { width: 30px; height: 30px; flex: none; display: grid; place-items: center; }
.sp-ico svg { width: 100%; height: 100%; }
.sp-emoji { font-size: 22px; }
.sp-none { padding: 18px; text-align: center; color: var(--txt-3); font-size: 13.5px; }

/* ============================================================
   Apps
   ============================================================ */

.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip {
  font-size: 11px; font-weight: 600; padding: 3.5px 9px; border-radius: 20px;
  background: var(--chip-bg); color: var(--txt-2);
}
.bullets { padding-left: 18px; font-size: 13px; line-height: 1.55; color: var(--txt-2); }
.bullets li { margin: 6px 0; }
.mac-btn {
  padding: 6px 14px; border-radius: 7px; font-size: 13px;
  background: var(--btn-bg); border: 0.5px solid var(--sep); color: var(--txt);
  text-decoration: none; display: inline-block;
  box-shadow: 0 0.5px 1.5px rgba(0, 0, 0, 0.12), inset 0 0.5px 0 rgba(255, 255, 255, 0.25);
}
.mac-btn:hover { filter: brightness(1.04); }
.mac-btn:active { filter: brightness(0.93); }
.mac-btn.primary {
  background: linear-gradient(180deg, #4693f8, #0a68d8);
  border-color: transparent; color: #fff;
  box-shadow: 0 1px 3px rgba(10, 104, 216, 0.45), inset 0 0.5px 0 rgba(255, 255, 255, 0.3);
}
.mac-btn.primary:active { filter: brightness(0.88); }
.segmented { display: flex; background: var(--chip-bg); border-radius: 8px; padding: 2px; }
.segmented button { padding: 4px 13px; font-size: 12.5px; border-radius: 6px; color: var(--txt-2); }
.segmented button.active {
  background: var(--win-solid); color: var(--txt); font-weight: 600;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.18);
}

/* ---------- Finder ---------- */

.finder { display: flex !important; }
.finder-side {
  width: 205px; flex: none; padding: 10px 8px; overflow: auto;
  background: var(--side-bg); border-right: 1px solid var(--sep);
}
.fs-label { font-size: 11px; font-weight: 700; color: var(--txt-3); margin: 12px 9px 4px; }
.fs-label:first-child { margin-top: 4px; }
.fs-item {
  display: flex; align-items: center; gap: 8px; width: 100%; text-align: left;
  padding: 5.5px 9px; border-radius: 7px; font-size: 13px; color: var(--txt);
}
.fs-item:hover { background: rgba(127, 127, 127, 0.14); }
.fs-item.active { background: var(--sel-bg); }
.finder-main { flex: 1; display: flex; flex-direction: column; min-width: 0; }
.finder-path {
  flex: none; padding: 8px 16px; font-size: 12px; color: var(--txt-3);
  border-bottom: 1px solid var(--sep);
}
.finder-here { color: var(--txt-2); }
.finder-list {
  flex: 1; overflow: auto; padding: 15px;
  display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 14px; align-content: start;
}
.proj-card {
  background: var(--card-bg); border: 0.5px solid var(--sep);
  border-radius: 13px; padding: 16px;
}
.proj-card header { display: flex; gap: 12px; align-items: flex-start; margin-bottom: 10px; }
.proj-ico { font-size: 27px; line-height: 1.2; }
.proj-card h3 { font-size: 14.5px; line-height: 1.35; }
.proj-kind {
  font-size: 10.5px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.06em;
  color: var(--accent);
}
.proj-card .chips { margin-bottom: 4px; }

/* ---------- Notes ---------- */

.notes { display: flex !important; }
.notes-side {
  width: 225px; flex: none; overflow: auto; padding: 8px;
  background: var(--side-bg); border-right: 1px solid var(--sep);
}
.notes-side-title { font-size: 11px; font-weight: 700; color: var(--txt-3); margin: 6px 10px 8px; }
.note-item {
  display: block; width: 100%; text-align: left;
  padding: 9px 11px; border-radius: 8px; margin-bottom: 2px;
}
.note-item b { display: block; font-size: 13px; }
.note-item span { display: block; font-size: 11.5px; color: var(--txt-3); margin-top: 2px; }
.note-item:hover { background: rgba(127, 127, 127, 0.12); }
.note-item.active { background: var(--sel-bg); }
.notes-body { flex: 1; overflow: auto; min-width: 0; }
.note-content { max-width: 660px; margin: 0 auto; padding: 28px 30px 40px; font-size: 14px; line-height: 1.62; }
.note-content h1 { font-size: 25px; margin-bottom: 2px; }
.note-content h2 { font-size: 16.5px; margin: 24px 0 10px; }
.note-content p { margin: 9px 0; color: var(--txt-2); }
.note-hero { display: flex; gap: 18px; align-items: center; margin-bottom: 8px; }
.note-avatar { width: 86px; height: 86px; border-radius: 50%; object-fit: cover; flex: none; box-shadow: 0 4px 16px rgba(0, 0, 0, 0.22); }
.comp-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.comp {
  display: flex; gap: 11px; padding: 13px; border-radius: 11px;
  background: var(--card-bg); border: 0.5px solid var(--sep);
}
.comp > span { font-size: 22px; line-height: 1.3; }
.comp b { font-size: 13px; }
.comp p { font-size: 12px; margin: 3px 0 0; }
.xp-head { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; }
.xp-head h2 { margin: 4px 0 2px; }
.xp-date { font-size: 12px; color: var(--txt-3); white-space: nowrap; }
.note-hr { border: none; border-top: 1px solid var(--sep); margin: 24px 0; }
.edu-card {
  display: flex; gap: 15px; align-items: center;
  background: var(--card-bg); border: 0.5px solid var(--sep);
  border-radius: 13px; padding: 17px;
}
.edu-ico { font-size: 35px; }
.edu-card h2 { margin: 0 0 3px !important; }
.cert-list { display: flex; flex-direction: column; gap: 8px; }
.cert-row {
  display: flex; align-items: center; gap: 13px; padding: 11px 13px;
  background: var(--card-bg); border: 0.5px solid var(--sep); border-radius: 11px;
  color: inherit; text-decoration: none;
}
a.cert-row:hover { background: var(--sel-bg); }
.cert-ico { font-size: 22px; flex: none; }
.cert-row b { font-size: 13px; }
.cert-row p { margin: 1px 0 0 !important; font-size: 12px; }
.cert-out { margin-left: auto; color: var(--accent); font-size: 15px; }

/* ---------- Terminal ---------- */

.win[data-app="terminal"] { background: rgba(18, 20, 26, 0.92); }
.win[data-app="terminal"] .titlebar { box-shadow: 0 0.5px 0 rgba(255, 255, 255, 0.12); }
.win[data-app="terminal"] .win-title { color: #b9bdc7; }
.term {
  overflow: auto; padding: 10px 13px;
  font-family: var(--mono); font-size: 12.5px; line-height: 1.55; color: #e8e9ee;
  cursor: text;
}
.term-block { white-space: pre-wrap; word-break: break-word; margin-bottom: 9px; }
.term-echo { margin-bottom: 3px; }
.term-line { display: flex; align-items: center; gap: 8px; }
.term-prompt { color: #7ee081; font-weight: 600; white-space: nowrap; }
.term-in {
  flex: 1; background: none; border: none; outline: none;
  color: inherit; font: inherit; caret-color: #e8e9ee; min-width: 60px;
}
.term a { color: #6cb6ff; }
.tg { color: #7ee081; } .tc { color: #6cb6ff; } .ty { color: #ffd866; }
.td { color: #8b919c; } .tr { color: #ff6b66; }

/* ---------- Safari ---------- */

.safari { display: flex !important; flex-direction: column; }
.sf-toolbar {
  flex: none; display: flex; align-items: center; gap: 12px;
  padding: 8px 14px; border-bottom: 1px solid var(--sep);
}
.sf-nav { display: flex; gap: 14px; color: var(--txt-3); font-size: 17px; }
.sf-url {
  flex: 1; max-width: 460px; margin: 0 auto; text-align: center;
  background: var(--chip-bg); border-radius: 8px; padding: 5px 14px;
  font-size: 12.5px; color: var(--txt-2);
}
.sf-page { flex: 1; overflow: auto; padding: 26px 30px 40px; }
.sf-greet { font-size: 26px; margin-bottom: 18px; }
.sf-hero {
  display: flex; gap: 22px; align-items: center;
  background: var(--card-bg); border: 0.5px solid var(--sep);
  border-radius: 17px; padding: 22px;
}
.sf-hero img { width: 98px; height: 98px; border-radius: 50%; object-fit: cover; flex: none; box-shadow: 0 6px 20px rgba(0, 0, 0, 0.22); }
.sf-hero h2 { font-size: 21px; }
.sf-hero p { font-size: 13.5px; margin-top: 3px; color: var(--txt-2); }
.sf-cta { margin-top: 13px; display: flex; gap: 10px; }
.sf-label { margin: 26px 0 11px; font-size: 13px; font-weight: 700; color: var(--txt-3); }
.sf-favs { display: grid; grid-template-columns: repeat(auto-fill, minmax(98px, 1fr)); gap: 12px; }
.sf-fav {
  display: flex; flex-direction: column; align-items: center; gap: 8px;
  padding: 14px 6px 12px; border-radius: 14px; font-size: 12px;
  background: var(--card-bg); border: 0.5px solid var(--sep);
  color: var(--txt); text-decoration: none;
}
.sf-fav:hover { background: var(--sel-bg); }
.sf-fav-ico {
  width: 52px; height: 52px; font-size: 27px;
  display: grid; place-items: center;
  background: var(--chip-bg); border-radius: 14px;
}
.sf-privacy {
  background: var(--card-bg); border: 0.5px solid var(--sep);
  border-radius: 13px; padding: 15px; font-size: 13px; color: var(--txt-2); line-height: 1.5;
}

/* ---------- Photos / Dashboards ---------- */

.photos { display: flex !important; flex-direction: column; position: relative; }
.ph-toolbar {
  flex: none; display: flex; justify-content: space-between; align-items: center;
  padding: 8px 14px; border-bottom: 1px solid var(--sep);
}
.ph-count { font-size: 12px; }
.ph-grid {
  flex: 1; overflow: auto; padding: 15px;
  display: grid; grid-template-columns: repeat(auto-fill, minmax(235px, 1fr));
  gap: 14px; align-content: start;
}
.ph-item {
  margin: 0; cursor: default; overflow: hidden;
  background: var(--card-bg); border: 0.5px solid var(--sep); border-radius: 12px;
  transition: transform 0.16s ease, box-shadow 0.16s ease;
}
.ph-item:hover { transform: translateY(-2px); box-shadow: 0 10px 28px rgba(0, 0, 0, 0.18); }
.ph-item img { width: 100%; aspect-ratio: 16 / 10; object-fit: cover; display: block; background: rgba(127, 127, 127, 0.1); }
.ph-item figcaption { padding: 9px 12px 11px; }
.ph-item b { display: block; font-size: 12.5px; line-height: 1.35; }
.ph-item span { font-size: 11px; color: var(--txt-3); }
.ph-look {
  position: absolute; inset: 0; z-index: 6;
  background: var(--win-solid);
  display: flex; flex-direction: column; padding: 16px;
}
.ph-look[hidden] { display: none; }
.ph-look img {
  flex: 1; min-height: 0; width: 100%; object-fit: contain;
  border-radius: 10px; background: rgba(127, 127, 127, 0.08);
}
.ph-close {
  position: absolute; top: 12px; right: 14px; z-index: 2;
  width: 28px; height: 28px; border-radius: 50%;
  background: var(--chip-bg); font-size: 13px;
}
.ph-meta { flex: none; display: flex; gap: 16px; justify-content: space-between; align-items: center; padding-top: 13px; }
.ph-meta h3 { font-size: 15px; margin-bottom: 3px; }
.ph-meta p { font-size: 12.5px; line-height: 1.45; margin-bottom: 7px; }
.ph-meta .mac-btn { white-space: nowrap; }

/* ---------- Mail ---------- */

.mail { display: flex !important; flex-direction: column; }
.mail-head { flex: none; padding: 11px 17px; font-size: 13px; border-bottom: 1px solid var(--sep); }
.mail-form { flex: 1; display: flex; flex-direction: column; padding: 4px 17px 15px; overflow: auto; }
.mail-form label {
  flex: none; display: flex; align-items: center; gap: 9px;
  font-size: 13px; color: var(--txt-3);
  border-bottom: 1px solid var(--sep); padding: 9px 0;
}
.mail-form input {
  flex: 1; border: none; background: none; outline: none;
  color: var(--txt); font-family: var(--font); font-size: 13px;
}
.mail-form textarea {
  flex: 1; min-height: 130px; border: none; background: none; outline: none; resize: none;
  padding: 13px 0; color: var(--txt); font-family: var(--font); font-size: 13.5px; line-height: 1.6;
}
.mail-foot { flex: none; display: flex; justify-content: space-between; align-items: center; gap: 10px; padding-top: 8px; }
.mail-alt { font-size: 12px; }
.mail-status { flex: none; font-size: 12.5px; padding-top: 8px; min-height: 18px; }
.mail-status.ok { color: #28a745; }
.mail-status.err { color: #e0443e; }

/* ---------- Settings ---------- */

.settings { overflow: auto; padding: 16px 18px; display: flex !important; flex-direction: column; gap: 14px; }
.settings section {
  flex: none; background: var(--card-bg); border: 0.5px solid var(--sep);
  border-radius: 13px; padding: 14px 16px;
}
.settings h3 { font-size: 13px; margin-bottom: 11px; }
.set-row { display: flex; gap: 10px; flex-wrap: wrap; }
.appearance-opt {
  display: flex; flex-direction: column; align-items: center; gap: 7px;
  font-size: 12px; padding: 8px 10px; border-radius: 11px; border: 2px solid transparent;
}
.appearance-opt.on { border-color: var(--accent); }
.ap-thumb { width: 76px; height: 48px; border-radius: 8px; border: 0.5px solid var(--sep); }
.ap-thumb.light { background: linear-gradient(160deg, #fdfdfe, #dde3ec); }
.ap-thumb.dark { background: linear-gradient(160deg, #3a3f4b, #14161c); }
.wall-row .wall-thumb { width: 64px; height: 40px; }
.set-about { display: flex; align-items: center; gap: 12px; }
.set-about img { width: 44px; height: 44px; border-radius: 50%; object-fit: cover; }
.set-about b { font-size: 13.5px; }
.set-about p { font-size: 12px; margin-top: 2px; }
.set-about .mac-btn { margin-left: auto; }
.shortcuts p { margin: 6px 0; font-size: 12.5px; }
kbd {
  background: var(--chip-bg); border: 0.5px solid var(--sep); border-radius: 4px;
  padding: 1px 6px; font-size: 11px; font-family: var(--mono);
}

/* ---------- Preview (Resume PDF) ---------- */

.preview { display: flex !important; flex-direction: column; }
.pv-toolbar {
  flex: none; display: flex; justify-content: space-between; align-items: center; gap: 10px;
  padding: 8px 14px; border-bottom: 1px solid var(--sep);
}
.pv-name { font-size: 13px; font-weight: 600; }
.pv-body { flex: 1; min-height: 0; position: relative; background: rgba(127, 127, 127, 0.14); }
.pv-body iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: none; }
.pv-loading {
  position: absolute; inset: 0; display: flex; flex-direction: column;
  align-items: center; justify-content: center; gap: 9px;
  font-size: 13.5px; text-align: center; padding: 20px;
}
.pv-loading.done { display: none; }
.pv-loading a { color: var(--accent); }
.pv-spin {
  width: 22px; height: 22px; border-radius: 50%;
  border: 2.5px solid var(--sep); border-top-color: var(--accent);
  animation: pv-rot 0.8s linear infinite;
}
@keyframes pv-rot { to { transform: rotate(1turn); } }

/* ---------- About This Mac ---------- */

.aboutmac {
  overflow: auto; text-align: center; padding: 24px 20px;
  display: flex !important; flex-direction: column; align-items: center;
}
.aboutmac img {
  width: 90px; height: 90px; border-radius: 50%; object-fit: cover;
  box-shadow: 0 6px 22px rgba(0, 0, 0, 0.25), 0 0 0 3px rgba(127, 127, 127, 0.18);
  margin-bottom: 13px;
}
.aboutmac h2 { font-size: 20px; }
.aboutmac > .muted { font-size: 12.5px; margin-top: 2px; }
.am-specs { width: 100%; margin: 17px 0; display: flex; flex-direction: column; gap: 8px; font-size: 12.5px; }
.am-specs div { display: flex; justify-content: space-between; gap: 12px; }
.am-specs span { color: var(--txt-3); white-space: nowrap; }
.am-specs b { text-align: right; font-weight: 600; }

/* ============================================================
   Responsive — small screens behave like full-screen apps
   ============================================================ */

@media (max-width: 760px) {
  #menubar { padding: 0 8px; }
  .mb-hidemobile { display: none; }
  #login-time { font-size: 62px; }

  /* The desktop scrolls on phones so widgets + icons stay reachable on any
     viewport (incl. landscape); windows go fixed so they don't scroll away. */
  #desktop { overflow-y: auto; overflow-x: hidden; }
  #desk-icons { padding-bottom: 120px; }
  .win { position: fixed; }

  #widgets {
    flex-direction: column; align-items: flex-start; gap: 10px;
    top: 40px; left: 8px; right: 8px;
  }
  .w-clock { flex: none; }
  .w-grind { flex: none; width: min(322px, 100%); }

  #desk-icons {
    flex-direction: row; flex-wrap: wrap; gap: 6px;
    top: 448px; left: 8px; right: 8px; justify-content: flex-start;
  }
  .desk-icon { width: 78px; }
  .di-img { width: 48px; height: 48px; }

  .win {
    left: 0 !important; top: 30px !important;
    width: 100vw !important; height: calc(100vh - 30px - 86px) !important;
    border-radius: 0 0 14px 14px;
  }
  .rs { display: none; }

  #dock-wrap { bottom: 8px; width: 96vw; }
  #dock { overflow-x: auto; }
  .dock-tip { display: none; }

  .finder-side { width: 150px; }
  .fs-item { font-size: 12px; padding: 6px 7px; }
  .notes-side { width: 145px; }
  .note-item span { display: none; }
  .note-content { padding: 20px 16px 34px; }
  .comp-grid { grid-template-columns: 1fr; }
  .sf-hero { flex-direction: column; text-align: center; }
  .sf-cta { justify-content: center; }
  .sf-page { padding: 18px 16px 30px; }
  .ph-grid { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); }
  .ph-meta { flex-direction: column; align-items: flex-start; }
  .finder-list { grid-template-columns: 1fr; padding: 10px; }
  .xp-head { flex-direction: column; gap: 2px; }
  #cc-panel { right: 6px; width: min(310px, calc(100vw - 12px)); }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; }
}
