:root {
      --menubar-h: 28px;
      /* Fluid dock sizing: scales smoothly with viewport/zoom instead of
         snapping at fixed breakpoints, so the dock never overflows and
         never has to "jump" sideways. */
      --dock-icon: clamp(34px, 3.2vw, 66px);
      --dock-gap: clamp(8px, 2.3vw, 34px);
      --dock-pad-y: clamp(6px, 0.9vw, 13px);
      --dock-pad-x: clamp(8px, 1.9vw, 28px);
      --text-main: rgba(255, 255, 255, 0.95);
      --text-muted: rgba(255, 255, 255, 0.7);
      --glass-bg: rgba(255, 255, 255, 0.08);
      --glass-bg-light: rgba(255, 255, 255, 0.12);
      --glass-border: rgba(255, 255, 255, 0.2);
      --glass-border-light: rgba(255, 255, 255, 0.35);
      --hover: rgba(255, 255, 255, 0.12);
    }
    
    body.light-theme {
      --text-main: rgba(0, 0, 0, 0.9);
      --text-muted: rgba(0, 0, 0, 0.65);
      --glass-bg: rgba(255, 255, 255, 0.6);
      --glass-bg-light: rgba(255, 255, 255, 0.75);
      --glass-border: rgba(0, 0, 0, 0.15);
      --glass-border-light: rgba(0, 0, 0, 0.3);
      --hover: rgba(0, 0, 0, 0.08);
    }

    * {
      box-sizing: border-box;
    }

    .mobile-page-nav {
      display: none;
    }

    html,
    body {
      margin: 0;
      padding: 0;
      width: 100%;
      height: 100%;
      font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Helvetica Neue", Arial, sans-serif;
      overflow: hidden;
      -webkit-font-smoothing: antialiased;
      color: var(--text-main);
    }

    .desktop {
      position: relative;
      width: 100vw;
      height: 100vh;
      height: calc(var(--app-height, 100vh));
      overflow: hidden;
      background: #06070d;
    }

    .wallpaper {
      position: absolute;
      inset: 0;
      width: 100%;
      height: 100%;
      display: block;
    }

    /* ============ MENU BAR — true glass ============ */
    .menubar {
      position: fixed;
      top: 0;
      left: 0;
      right: 0;
      height: var(--menubar-h);
      display: flex;
      align-items: center;
      justify-content: space-between;
      padding: 0 14px;
      background: var(--glass-bg);
      backdrop-filter: blur(40px) saturate(180%);
      -webkit-backdrop-filter: blur(40px) saturate(180%);
      border-bottom: 1px solid rgba(255, 255, 255, 0.14);
      box-shadow: 0 1px 24px rgba(0, 0, 0, 0.18);
      z-index: 1000;
      font-size: 13px;
      user-select: none;
    }

    .menubar-left,
    .menubar-right {
      display: flex;
      align-items: center;
      height: 100%;
    }

    .menubar-left {
      /* Never let the menu items push the bar (and therefore the whole
         page) wider than the viewport — let this side scroll instead,
         keeping the status icons/clock on the right always reachable. */
      flex: 1 1 auto;
      min-width: 0;
      overflow-x: auto;
      overflow-y: hidden;
      scrollbar-width: none;
      -ms-overflow-style: none;
      -webkit-overflow-scrolling: touch;
    }

    .menubar-left::-webkit-scrollbar {
      display: none;
    }

    .menubar-right {
      flex-shrink: 0;
    }

    .menu-root {
      position: relative;
      height: 100%;
      display: flex;
      align-items: center;
    }

    .menu-item {
      color: var(--text-main);
      padding: 0 9px;
      height: 100%;
      display: flex;
      align-items: center;
      border-radius: 4px;
      white-space: nowrap;
      cursor: default;
    }

    .menu-item:hover {
      background: var(--hover);
    }

    .menu-item.active {
      background: rgba(255, 255, 255, 0.18);
    }

    .menu-item.bold {
      font-weight: 700;
    }

    .apple-logo {
      padding: 0 10px 0 4px;
    }

    .apple-logo svg {
      width: 14px;
      height: 16px;
      display: block;
    }

    /* ---- Dropdown menus — true glass ---- */
    .menu-dropdown {
      position: absolute;
      top: 100%;
      left: 0;
      margin-top: 6px;
      min-width: 230px;
      max-width: 300px;
      background: var(--glass-bg-light);
      backdrop-filter: blur(60px) saturate(200%);
      -webkit-backdrop-filter: blur(60px) saturate(200%);
      border-radius: 12px;
      padding: 5px 0;
      border: 1px solid var(--glass-border);
      border-top-color: var(--glass-border-light);
      border-left-color: var(--glass-border);
      box-shadow: 0 24px 64px rgba(0, 0, 0, 0.5), 0 1px 0 rgba(255, 255, 255, 0.06) inset;
      opacity: 0;
      transform: translateY(-4px) scale(0.98);
      transform-origin: top left;
      pointer-events: none;
      transition: opacity 0.12s ease, transform 0.12s ease;
      z-index: 1100;
      font-size: 13.5px;
    }

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

    .menu-dropdown .mi {
      display: flex;
      align-items: center;
      justify-content: space-between;
      gap: 20px;
      padding: 4.5px 14px;
      color: var(--text-main);
      cursor: default;
      white-space: nowrap;
    }

    .menu-dropdown .mi:hover {
      background: #0a84ff;
      color: var(--text-main);
    }

    .menu-dropdown .mi .kbd {
      color: var(--text-muted);
      font-size: 12px;
      letter-spacing: 0.5px;
    }

    .menu-dropdown .mi:hover .kbd {
      color: var(--text-main);
    }

    .menu-dropdown .mi.disabled {
      color: var(--text-muted);
      pointer-events: none;
    }

    .menu-dropdown .sep {
      height: 1px;
      background: var(--glass-bg-light);
      margin: 4px 0;
    }

    .menubar-right .status-icon {
      display: flex;
      align-items: center;
      justify-content: center;
      height: 100%;
      padding: 0 7px;
      gap: 4px;
      border-radius: 4px;
      cursor: default;
      color: var(--text-main);
    }

    .menubar-right .status-icon:hover {
      background: var(--hover);
    }

    .status-icon svg {
      display: block;
    }

    .batt-pct {
      font-size: 12.5px;
      color: var(--text-main);
      margin-right: 1px;
    }

    .menu-clock {
      color: var(--text-main);
      padding: 0 8px 0 6px;
      font-size: 13px;
      white-space: nowrap;
      border-radius: 4px;
    }

    .menu-clock:hover {
      background: var(--hover);
    }

    /* ============ DOCK ============ */
    .dock-wrap {
      position: fixed;
      left: 0;
      right: 0;
      bottom: 8px;
      display: flex;
      justify-content: center;
      z-index: 900;
      pointer-events: none;
    }

    .dock {
      pointer-events: auto;
      display: flex;
      align-items: flex-end;
      gap: var(--dock-gap);
      padding: var(--dock-pad-y) var(--dock-pad-x);
      background: var(--glass-bg);
      flex-shrink: 0;
      max-width: 100%;
      border-radius: 22px;
      backdrop-filter: blur(48px) saturate(200%);
      -webkit-backdrop-filter: blur(48px) saturate(200%);
      border: 1px solid var(--glass-border);
      border-top-color: var(--glass-border-light);
      border-left-color: var(--glass-border);
      box-shadow: 0 20px 60px rgba(0, 0, 0, 0.45), 0 1px 0 rgba(255, 255, 255, 0.08) inset;
    }

    .dock-icon {
      position: relative;
      width: var(--dock-icon);
      height: var(--dock-icon);
      display: flex;
      align-items: flex-end;
      justify-content: center;
      transition: transform 0.13s cubic-bezier(.2, .9, .3, 1.3);
      transform-origin: bottom center;
      cursor: pointer;
    }

    .icon-tile {
      width: 100%;
      height: 100%;
      border-radius: 22%;
      display: flex;
      align-items: center;
      justify-content: center;
      overflow: hidden;
      position: relative;
      flex-shrink: 0;
      box-shadow: 0 4px 10px rgba(0, 0, 0, 0.45), inset 0 0 0 0.5px rgba(255, 255, 255, 0.18);
    }

    .icon-tile svg {
      width: 66%;
      height: 66%;
      display: block;
    }

    .dock-tooltip {
      position: absolute;
      bottom: 100%;
      left: 50%;
      transform: translateX(-50%);
      margin-bottom: 10px;
      background: var(--glass-bg-light);
      backdrop-filter: blur(20px) saturate(180%);
      -webkit-backdrop-filter: blur(20px) saturate(180%);
      border: 1px solid var(--glass-border);
      border-top-color: var(--glass-border-light);
      color: var(--text-main);
      font-size: 12.5px;
      padding: 4px 12px;
      border-radius: 8px;
      white-space: nowrap;
      opacity: 0;
      pointer-events: none;
      transition: opacity 0.15s;
      box-shadow: 0 8px 24px rgba(0, 0, 0, 0.35);
    }

    .dock-icon:hover .dock-tooltip {
      opacity: 1;
    }

    .dock-dot {
      position: absolute;
      bottom: -8px;
      left: 50%;
      transform: translateX(-50%);
      width: 4px;
      height: 4px;
      border-radius: 50%;
      background: rgba(255, 255, 255, 0.65);
    }

    @keyframes dockBounce {
      0% {
        transform: translateY(0) scale(var(--s, 1));
      }

      28% {
        transform: translateY(-26px) scale(var(--s, 1));
      }

      48% {
        transform: translateY(0) scale(var(--s, 1));
      }

      63% {
        transform: translateY(-10px) scale(var(--s, 1));
      }

      78% {
        transform: translateY(0) scale(var(--s, 1));
      }
    }

    .bouncing {
      animation: dockBounce 0.55s ease;
    }

    /* icon tile backgrounds */
    .bg-finder {
      background: linear-gradient(160deg, #7cd6f7 0%, #1f8ff0 55%, #0a4fc2 100%);
    }

    .bg-music {
      background: linear-gradient(160deg, #ff7aa2 0%, #fc2f63 55%, #d4123f 100%);
    }

    .bg-appstore {
      background: linear-gradient(160deg, #7cd6f7 0%, #1f6ff0 55%, #0a3fc0 100%);
    }

    .bg-vscode {
      background: linear-gradient(160deg, #2c3a66 0%, #161b36 55%, #090b18 100%);
    }

    /* ============ OVERLAYS ============ */
    .overlay {
      position: fixed;
      inset: 0;
      z-index: 1500;
      display: flex;
      align-items: center;
      justify-content: center;
      opacity: 0;
      pointer-events: none;
      transition: opacity 0.22s ease;
    }

    .overlay.show {
      opacity: 1;
      pointer-events: auto;
    }

    .overlay-dim {
      position: absolute;
      inset: 0;
      background: rgba(0, 0, 0, 0.55);
      backdrop-filter: blur(6px);
      -webkit-backdrop-filter: blur(6px);
    }

    /* Spotlight — true glass */
    .spotlight-bar {
      position: relative;
      z-index: 2;
      width: min(560px, 80vw);
      margin-top: 12vh;
      background: var(--glass-bg-light);
      backdrop-filter: blur(60px) saturate(200%);
      -webkit-backdrop-filter: blur(60px) saturate(200%);
      border-radius: 16px;
      border: 1px solid var(--glass-border);
      border-top-color: var(--glass-border-light);
      border-left-color: var(--glass-border);
      box-shadow: 0 32px 80px rgba(0, 0, 0, 0.55), 0 1px 0 rgba(255, 255, 255, 0.1) inset;
      display: flex;
      align-items: center;
      gap: 10px;
      padding: 14px 16px;
    }

    .spotlight-bar svg {
      width: 20px;
      height: 20px;
      flex-shrink: 0;
      color: var(--text-muted);
    }

    .spotlight-bar input {
      border: none;
      outline: none;
      background: transparent;
      font-size: 21px;
      width: 100%;
      color: var(--text-main);
      font-family: inherit;
    }

    .spotlight-bar input::placeholder {
      color: var(--text-muted);
    }

    /* Control Centre — true glass */
    .cc-panel {
      position: fixed;
      top: 36px;
      right: 10px;
      z-index: 1500;
      width: 250px;
      padding: 14px;
      background: var(--glass-bg);
      backdrop-filter: blur(60px) saturate(200%);
      -webkit-backdrop-filter: blur(60px) saturate(200%);
      border-radius: 18px;
      border: 1px solid var(--glass-border);
      border-top-color: var(--glass-border-light);
      border-left-color: var(--glass-border);
      box-shadow: 0 28px 70px rgba(0, 0, 0, 0.5), 0 1px 0 rgba(255, 255, 255, 0.1) inset;
      display: grid;
      grid-template-columns: 1fr 1fr;
      gap: 10px;
      opacity: 0;
      transform: translateY(-8px) scale(0.97);
      pointer-events: none;
      transition: opacity 0.16s ease, transform 0.16s ease;
    }

    .cc-panel.show {
      opacity: 1;
      transform: translateY(0) scale(1);
      pointer-events: auto;
    }

    .cc-tile {
      background: var(--glass-bg);
      backdrop-filter: blur(20px);
      -webkit-backdrop-filter: blur(20px);
      border: 1px solid var(--glass-border);
      border-top-color: rgba(255, 255, 255, 0.26);
      border-radius: 14px;
      padding: 10px;
      display: flex;
      flex-direction: column;
      gap: 14px;
      font-size: 11.5px;
      color: var(--text-main);
      font-weight: 600;
      grid-column: span 1;
      box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2), inset 0 1px 0 rgba(255, 255, 255, 0.08);
    }

    .cc-tile.wide {
      grid-column: span 2;
      flex-direction: row;
      align-items: center;
      justify-content: space-between;
    }

    .cc-row {
      display: flex;
      align-items: center;
      gap: 8px;
    }

    .cc-icon {
      width: 26px;
      height: 26px;
      border-radius: 7px;
      flex-shrink: 0;
      display: flex;
      align-items: center;
      justify-content: center;
      background: var(--glass-bg-light);
      color: var(--text-main);
      transition: background 0.15s;
    }

    .cc-icon.on {
      background: #0a84ff;
    }

    .cc-icon svg {
      width: 14px;
      height: 14px;
    }

    .cc-slider {
      height: 6px;
      border-radius: 3px;
      background: linear-gradient(90deg, rgba(255, 255, 255, 0.85) 0%, rgba(255, 255, 255, 0.85) 60%, rgba(255, 255, 255, 0.16) 60%, rgba(255, 255, 255, 0.16) 100%);
      margin-top: auto;
    }

    @media (max-width: 700px) {
      .menu-item {
        padding: 0 6px;
        font-size: 12px;
      }

      .menu-clock {
        font-size: 12px;
      }
    }

    /* ============ WALLPAPER PICKER — true glass ============ */
    .wp-picker {
      position: fixed;
      bottom: 100px;
      left: 50%;
      transform: translateX(-50%);
      z-index: 1200;
      background: var(--glass-bg);
      backdrop-filter: blur(60px) saturate(200%);
      -webkit-backdrop-filter: blur(60px) saturate(200%);
      border-radius: 20px;
      border: 1px solid var(--glass-border);
      border-top-color: var(--glass-border-light);
      border-left-color: var(--glass-border);
      box-shadow: 0 32px 80px rgba(0, 0, 0, 0.5), 0 1px 0 rgba(255, 255, 255, 0.1) inset;
      padding: 16px 20px 14px;
      opacity: 0;
      pointer-events: none;
      transition: opacity 0.2s ease, transform 0.2s ease;
      transform: translateX(-50%) translateY(10px) scale(0.97);
      min-width: 340px;
    }

    .wp-picker.show {
      opacity: 1;
      pointer-events: auto;
      transform: translateX(-50%) translateY(0) scale(1);
    }

    .wp-picker-title {
      font-size: 11px;
      font-weight: 700;
      letter-spacing: 0.6px;
      color: var(--text-muted);
      text-transform: uppercase;
      margin-bottom: 12px;
    }

    .wp-grid {
      display: grid;
      grid-template-columns: repeat(5, 1fr);
      gap: 8px;
      margin-bottom: 12px;
    }

    .wp-thumb {
      width: 100%;
      aspect-ratio: 16/10;
      border-radius: 8px;
      cursor: pointer;
      overflow: hidden;
      position: relative;
      border: 1.5px solid transparent;
      transition: transform 0.15s, border-color 0.15s, box-shadow 0.15s;
      flex-shrink: 0;
    }

    .wp-thumb:hover {
      transform: scale(1.07);
      box-shadow: 0 8px 20px rgba(0, 0, 0, 0.5);
    }

    .wp-thumb.active {
      border-color: var(--text-main);
      box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.3);
    }

    .wp-thumb svg,
    .wp-thumb canvas {
      width: 100%;
      height: 100%;
      display: block;
    }

    .wp-divider {
      height: 0.5px;
      background: rgba(255, 255, 255, 0.1);
      margin: 10px 0;
    }

    .wp-upload-row {
      display: flex;
      gap: 8px;
      align-items: center;
    }

    .wp-upload-btn {
      flex: 1;
      display: flex;
      align-items: center;
      justify-content: center;
      gap: 6px;
      padding: 7px 0;
      background: var(--glass-bg-light);
      border: 1px solid var(--glass-border);
      border-top-color: var(--glass-border-light);
      border-radius: 10px;
      color: var(--text-main);
      font-size: 12px;
      cursor: pointer;
      backdrop-filter: blur(20px);
      transition: background 0.15s, border-color 0.15s;
    }

    .wp-upload-btn:hover {
      background: rgba(255, 255, 255, 0.18);
      border-color: var(--text-muted);
    }

    .wp-upload-btn input {
      display: none;
    }

    .wp-close-btn {
      padding: 7px 16px;
      background: var(--glass-bg);
      border: 1px solid var(--glass-border);
      border-top-color: var(--glass-border-light);
      border-radius: 10px;
      color: var(--text-muted);
      font-size: 12px;
      cursor: pointer;
      backdrop-filter: blur(20px);
      transition: background 0.15s;
    }

    .wp-close-btn:hover {
      background: rgba(255, 255, 255, 0.15);
    }

    /* ============ LOCK SCREEN — macOS Sonoma style ============ */
    @import url('https://fonts.googleapis.com/css2?family=Inter:wght@100;200;300;400;500;600&display=swap');
    @import url('https://fonts.googleapis.com/css2?family=PT+Serif:wght@400;700&display=swap');

    .lockscreen {
      position: fixed;
      inset: 0;
      z-index: 9000;
      display: flex;
      flex-direction: column;
      align-items: center;
      overflow: hidden;
      font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
      -webkit-font-smoothing: antialiased;
      transition: transform 0.75s cubic-bezier(0.76, 0, 0.24, 1), opacity 0.75s ease;
      cursor: default;
      user-select: none;
    }

    .lockscreen.unlocking {
      transform: translateY(-100vh);
      opacity: 0.2;
    }

    .lockscreen.gone {
      display: none;
    }

    /* ============ DESKTOP & ICONS ============ */
    .desktop-wrapper {
      flex: 1;
      position: relative;
      overflow: hidden;
      display: flex;
      flex-direction: column;
    }

    .desktop {
      flex: 1;
      position: relative;
      background: url('assets/images/6fba6553c9606fe12ebdc15512e1c6da.jpg') center/cover no-repeat;
      overflow: hidden;
      transition: filter 0.3s;
    }

    .desktop-icon {
      position: absolute;
      display: flex;
      flex-direction: column;
      align-items: center;
      width: 140px;
      cursor: pointer;
      text-align: center;
      padding: 6px;
      border-radius: 8px;
      transition: background 0.2s;
    }

    .desktop-icon:hover {
      background: rgba(255, 255, 255, 0.1);
    }

    .desktop-icon img {
      width: 130px;
      height: 130px;
      border-radius: 16px;
      box-shadow: 0 4px 12px rgba(0,0,0,0.6);
      margin-bottom: 8px;
      object-fit: cover;
    }

    .desktop-icon span {
      color: #fff;
      font-size: 14px;
      text-shadow: 0 1px 4px rgba(0,0,0,0.9);
      font-weight: 500;
      line-height: 1.2;
    }

    /* Wallpaper — same as desktop */
    .ls-bg {
      position: absolute;
      inset: 0;
      z-index: 1;
      background: url('../images/6fba6553c9606fe12ebdc15512e1c6da.jpg') center/cover no-repeat;
    }

    .ls-bg::after {
      content: '';
      position: absolute;
      inset: 0;
      z-index: 2;
      background: rgba(0, 0, 0, 0.25);
      backdrop-filter: blur(30px) saturate(160%);
      -webkit-backdrop-filter: blur(30px) saturate(160%);
    }

    /* Status Bar */
    .ls-status-bar {
      position: absolute;
      top: 0;
      left: 0;
      right: 0;
      height: 28px;
      z-index: 10;
      display: flex;
      justify-content: space-between;
      align-items: center;
      padding: 0 24px;
      color: var(--text-main);
      font-size: 13px;
      font-weight: 500;
      letter-spacing: 0.3px;
    }

    .ls-notch {
      position: absolute;
      left: 50%;
      top: 0;
      transform: translateX(-50%);
      width: 160px;
      height: 28px;
      background: #000;
      border-bottom-left-radius: 12px;
      border-bottom-right-radius: 12px;
    }

    .ls-status-right {
      display: flex;
      align-items: center;
      gap: 8px;
      margin-left: auto;
    }

    .ls-status-right svg {
      fill: currentColor;
      height: 12px;
    }

    /* ---- top: day + date ---- */
    .ls-top {
      position: relative;
      z-index: 3;
      display: flex;
      flex-direction: column;
      align-items: center;
      margin-top: 70px;
    }

    .ls-day {
      font-size: 20px;
      font-weight: 600;
      color: var(--text-main);
      font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
      letter-spacing: 0.5px;
    }

    /* ---- Huge macOS clock ---- */
    .ls-clock-wrap {
      position: relative;
      z-index: 3;
      display: flex;
      align-items: flex-start;
      gap: 0;
      margin-top: 10px;
      mix-blend-mode: difference;
    }

    .ls-clock {
      font-size: clamp(140px, 25vw, 260px);
      font-weight: 400;
      font-family: 'Oswald', system-ui;
      color: var(--text-main);
      letter-spacing: 2px;
      line-height: 0.95;
      font-variant-numeric: tabular-nums;
      transform: scaleY(1.35);
      transform-origin: top center;
      margin-bottom: 80px;
    }

    /* ---- User Accounts ---- */
    .ls-users {
      position: absolute;
      bottom: 12vh;
      left: 50%;
      transform: translateX(-50%);
      z-index: 3;
      display: flex;
      flex-direction: column;
      gap: 12px;
      align-items: flex-start;
    }

    .ls-user-item {
      display: flex;
      align-items: center;
      gap: 14px;
      cursor: pointer;
      padding: 6px 20px 6px 6px;
      border-radius: 30px;
      transition: background 0.2s, transform 0.1s;
      background: rgba(255, 255, 255, 0);
    }

    .ls-user-item:hover {
      background: rgba(255, 255, 255, 0.15);
      backdrop-filter: blur(10px);
      -webkit-backdrop-filter: blur(10px);
    }

    .ls-user-item:active {
      transform: scale(0.98);
    }

    .ls-avatar-wrap {
      position: relative;
      width: 44px;
      height: 44px;
    }

    .ls-avatar {
      width: 100%;
      height: 100%;
      border-radius: 50%;
      display: flex;
      align-items: center;
      justify-content: center;
      font-size: 24px;
      box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
    }

    .ls-user-check {
      position: absolute;
      bottom: -2px;
      right: -2px;
      width: 14px;
      height: 14px;
    }

    .ls-username {
      font-size: 15px;
      font-weight: 600;
      color: var(--text-main);
      text-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
    }

    /* Desktop wrapper */
    .desktop-wrapper {
      position: fixed;
      inset: 0;
      z-index: 1;
    }

    /* ============ MAC WINDOW ============ */
    .mac-window {
      position: absolute;
      top: 50%;
      left: 50%;
      transform: translate(-50%, -50%);
      width: 80vw;
      height: 75vh;
      background: var(--glass-bg);
      backdrop-filter: blur(20px) saturate(180%);
      -webkit-backdrop-filter: blur(20px) saturate(180%);
      border: 1px solid var(--glass-border);
      border-radius: 12px;
      box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
      display: flex;
      flex-direction: column;
      z-index: 1000;
      overflow: hidden;
    }

    .mac-window.solid-mode {
      background: #000;
      backdrop-filter: none;
      -webkit-backdrop-filter: none;
    }

    .mac-window.maximized {
      top: 28px !important;
      left: 0 !important;
      width: 100vw !important;
      height: calc(100vh - 28px) !important;
      transform: none !important;
      border-radius: 0;
    }

    .window-titlebar {
      height: 38px;
      display: flex;
      align-items: center;
      justify-content: center;
      position: relative;
      border-bottom: 1px solid rgba(255, 255, 255, 0.1);
      user-select: none;
      cursor: default;
    }

    .window-controls {
      position: absolute;
      left: 16px;
      top: 0;
      bottom: 0;
      display: flex;
      align-items: center;
      gap: 8px;
    }

    .win-btn {
      width: 12px;
      height: 12px;
      border-radius: 50%;
      cursor: pointer;
    }

    .win-btn.close {
      background: #ff5f56;
    }

    .win-btn.minimize {
      background: #ffbd2e;
    }

    .win-btn.maximize {
      background: #27c93f;
    }

    .window-title {
      color: var(--text-main);
      font-size: 13px;
      font-weight: 600;
    }

    .window-content {
      flex: 1;
      background: #fff;
    }

    .window-content iframe {
      width: 100%;
      height: 100%;
      border: none;
      display: block;
    }

    /* ============ PROFILE WIDGET ============ */
    .profile-widget-container {
      position: absolute;
      top: 50px;
      left: 24px;
      display: flex;
      flex-direction: column;
      align-items: flex-start;
      gap: 24px;
      z-index: 100;
    }

    .widget-row {
      display: flex;
      flex-direction: row;
      gap: 24px;
    }

    .profile-widget,
    .music-widget {
      width: 260px;
      height: 260px;
      border-radius: 24px;
      overflow: hidden;
      background: var(--glass-bg);
      backdrop-filter: blur(40px) saturate(200%);
      -webkit-backdrop-filter: blur(40px) saturate(200%);
      border: 1px solid var(--glass-border);
      border-top-color: var(--glass-border-light);
      border-left-color: var(--glass-border);
      box-shadow: 0 16px 40px rgba(0, 0, 0, 0.4), 0 1px 0 rgba(255, 255, 255, 0.1) inset;
    }

    .game-widget {
      width: 130px;
      height: 130px;
      border-radius: 24px;
      overflow: hidden;
      background: var(--glass-bg);
      backdrop-filter: blur(40px) saturate(200%);
      -webkit-backdrop-filter: blur(40px) saturate(200%);
      border: 1px solid var(--glass-border);
      border-top-color: var(--glass-border-light);
      border-left-color: var(--glass-border);
      box-shadow: 0 16px 40px rgba(0, 0, 0, 0.4), 0 1px 0 rgba(255, 255, 255, 0.1) inset;
      cursor: pointer;
      transition: transform 0.2s;
    }

    .game-widget:hover {
      transform: scale(1.03);
    }

    .profile-widget img,
    .music-widget img,
    .game-widget img {
      width: 100%;
      height: 100%;
      object-fit: cover;
      display: block;
    }

    /* ============ ABOUT WIDGET ============ */
    .about-widget {
      width: 544px;
      height: 260px;
      box-sizing: border-box;
      padding: 24px 28px;
      border-radius: 24px;
      background: var(--glass-bg);
      backdrop-filter: blur(40px) saturate(200%);
      -webkit-backdrop-filter: blur(40px) saturate(200%);
      border: 1px solid var(--glass-border);
      border-top-color: var(--glass-border-light);
      border-left-color: var(--glass-border);
      box-shadow: 0 16px 40px rgba(0, 0, 0, 0.4), inset 0 1px 0 rgba(255, 255, 255, 0.1);
      color: var(--text-main);
      font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", Roboto, sans-serif;
      z-index: 100;
      display: flex;
      flex-direction: column;
      justify-content: center;
    }

    .about-widget h2 {
      margin: 0 0 12px 0;
      font-size: 22px;
      font-weight: 600;
      letter-spacing: -0.3px;
    }

    .about-widget p {
      margin: 0 0 12px 0;
      font-size: 15px;
      line-height: 1.5;
      color: var(--text-main);
    }

    .about-widget p:last-child {
      margin-bottom: 0;
    }

    /* ============ MUSIC PLAYER WIDGET ============ */
    .music-player-widget {
      width: 544px;
      height: 180px;
      box-sizing: border-box;
      padding: 24px 30px;
      border-radius: 24px;
      background: rgba(255, 255, 255, 0.1);
      backdrop-filter: blur(40px) saturate(200%);
      -webkit-backdrop-filter: blur(40px) saturate(200%);
      border: 1px solid var(--glass-border);
      border-top-color: var(--glass-border-light);
      border-left-color: var(--glass-border);
      box-shadow: 0 16px 40px rgba(0, 0, 0, 0.4), inset 0 1px 0 rgba(255, 255, 255, 0.1);
      display: flex;
      align-items: center;
      gap: 40px;
    }

    .music-vinyl-container {
      position: relative;
      width: 120px;
      height: 120px;
      flex-shrink: 0;
    }

    .vinyl-record {
      width: 100%;
      height: 100%;
      border-radius: 50%;
      background: #111;
      border: 3px solid #222;
      box-shadow: 0 4px 15px rgba(0,0,0,0.6), inset 0 0 15px rgba(255,255,255,0.15);
      display: flex;
      align-items: center;
      justify-content: center;
      position: relative;
      animation: spin 6s linear infinite;
      animation-play-state: paused;
    }

    .music-player-widget.playing .vinyl-record {
      animation-play-state: running;
    }

    .vinyl-record::before,
    .vinyl-record::after {
      content: '';
      position: absolute;
      border-radius: 50%;
      border: 1px solid rgba(255,255,255,0.08);
    }
    .vinyl-record::before { width: 80%; height: 80%; }
    .vinyl-record::after { width: 60%; height: 60%; }

    @keyframes spin {
      from { transform: rotate(0deg); }
      to { transform: rotate(360deg); }
    }

    .vinyl-label {
      width: 75%;
      height: 75%;
      border-radius: 50%;
      background-image: url('../images/seedhe-maut.jpg');
      background-size: cover;
      background-position: center;
      position: relative;
      z-index: 2;
      box-shadow: 0 0 5px rgba(0,0,0,0.5);
    }

    .vinyl-hole {
      width: 8px;
      height: 8px;
      border-radius: 50%;
      background: #1a1a1a;
      position: absolute;
      top: 50%;
      left: 50%;
      transform: translate(-50%, -50%);
      z-index: 3;
      border: 1px solid var(--glass-border);
    }

    .tonearm {
      position: absolute;
      right: -25px;
      top: 5px;
      width: 40px;
      height: 100px;
      transform-origin: 15px 15px;
      transform: rotate(5deg);
      z-index: 4;
      transition: transform 0.5s ease-in-out;
    }

    .music-player-widget.playing .tonearm {
      transform: rotate(28deg);
    }

    .tonearm-pivot {
      width: 26px;
      height: 26px;
      border-radius: 50%;
      background: linear-gradient(135deg, #444, #222);
      border: 2px solid #555;
      position: absolute;
      top: 0;
      left: 0;
      box-shadow: 0 4px 6px rgba(0,0,0,0.5);
      z-index: 2;
    }
    
    .tonearm-pivot::after {
      content: '';
      position: absolute;
      top: 50%;
      left: 50%;
      transform: translate(-50%, -50%);
      width: 10px;
      height: 10px;
      border-radius: 50%;
      background: #111;
    }

    .tonearm-arm {
      width: 5px;
      height: 75px;
      background: linear-gradient(90deg, #ccc, #fff, #ccc);
      position: absolute;
      top: 15px;
      left: 10px;
      border-radius: 2px;
      box-shadow: 2px 2px 4px rgba(0,0,0,0.4);
    }

    .tonearm-head {
      width: 14px;
      height: 24px;
      background: #222;
      position: absolute;
      bottom: 5px;
      left: 6px;
      border-radius: 3px;
      transform: rotate(-25deg);
      box-shadow: 2px 2px 4px rgba(0,0,0,0.4);
      border-top: 1px solid #555;
    }

    .music-info {
      flex-grow: 1;
      display: flex;
      flex-direction: column;
      justify-content: center;
      align-items: center;
    }

    .music-title {
      font-size: 20px;
      font-weight: 700;
      color: var(--text-main);
      margin-bottom: 6px;
      letter-spacing: 0.5px;
    }

    .music-artist {
      font-size: 14px;
      font-weight: 500;
      color: var(--text-muted);
      margin-bottom: 20px;
      text-align: center;
    }

    .music-controls {
      display: flex;
      align-items: center;
      gap: 24px;
    }

    .control-icon {
      width: 24px;
      height: 24px;
      fill: currentColor;
      cursor: pointer;
      transition: transform 0.15s, opacity 0.2s;
      opacity: 0.8;
      filter: drop-shadow(0 2px 4px rgba(0,0,0,0.3));
    }

    .control-icon:hover {
      transform: scale(1.15);
      opacity: 1;
    }

    .play-icon {
      width: 36px;
      height: 36px;
    }

    /* ============ SERVICES WIDGET ============ */
    .services-widget {
      width: 260px;
      height: 260px;
      box-sizing: border-box;
      padding: 20px;
      border-radius: 24px;
      background: var(--glass-bg);
      backdrop-filter: blur(40px) saturate(200%);
      -webkit-backdrop-filter: blur(40px) saturate(200%);
      border: 1px solid var(--glass-border);
      border-top-color: var(--glass-border-light);
      border-left-color: var(--glass-border);
      box-shadow: 0 16px 40px rgba(0, 0, 0, 0.4), inset 0 1px 0 rgba(255, 255, 255, 0.1);
      color: var(--text-main);
      font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", Roboto, sans-serif;
      z-index: 100;
      display: flex;
      flex-direction: column;
    }

    .services-widget h2 {
      margin: 0 0 12px 0;
      font-size: 18px;
      font-weight: 600;
      letter-spacing: -0.3px;
    }

    .service-item {
      display: flex;
      align-items: flex-start;
      margin-bottom: 12px;
      gap: 12px;
    }

    .service-item:last-child {
      margin-bottom: 0;
    }

    .service-icon {
      width: 28px;
      height: 28px;
      flex-shrink: 0;
      background: rgba(255, 255, 255, 0.15);
      border-radius: 8px;
      display: flex;
      align-items: center;
      justify-content: center;
    }

    .service-icon svg {
      width: 16px;
      height: 16px;
      fill: none;
      stroke: currentColor;
      stroke-width: 2;
      stroke-linecap: round;
      stroke-linejoin: round;
    }

    .service-text {
      flex: 1;
      display: flex;
      flex-direction: column;
    }

    .service-text h4 {
      margin: 0 0 2px 0;
      font-size: 13px;
      font-weight: 600;
      color: var(--text-main);
    }

    .service-text p {
      margin: 0;
      font-size: 11px;
      line-height: 1.35;
      color: var(--text-muted);
    }

    /* ============ DESKTOP BOTTOM BAR ============ */
    .desktop-bottom-bar {
      display: grid;
      grid-template-columns: 1fr auto 1fr;
      align-items: flex-end;
      gap: clamp(8px, 2vw, 20px);
      position: absolute;
      bottom: 20px;
      width: 100%;
      padding: 0 clamp(10px, 2vw, 20px);
      box-sizing: border-box;
      z-index: 1000;
      pointer-events: none;
    }

    .links-left, .links-right, .dock-wrap {
      pointer-events: auto;
    }

    .links-left, .links-right {
      display: flex;
      gap: clamp(6px, 1vw, 12px);
      flex-wrap: nowrap; /* Never break to a new line */
      /* Allow this grid/flex item to shrink below its content's natural
         min-content size. Without this, the browser refuses to shrink the
         track, the row overflows its column, and the dock gets shoved
         off-center ("icons sliding to the side") as the viewport narrows
         or the page is zoomed in. */
      min-width: 0;
      overflow: hidden;
    }

    .links-left {
      justify-self: start;
    }

    .links-right {
      justify-self: end;
      justify-content: flex-end;
    }

    .dock-wrap {
      justify-self: center;
      position: static !important;
      transform: none !important;
      bottom: auto !important;
      left: auto !important;
      min-width: 0;
    }

    /* ============ PAGES ============ */
    .page-content {
      position: absolute;
      top: 50px;
      left: 24px;
      right: 24px;
      bottom: 110px;
      background: var(--glass-bg);
      backdrop-filter: blur(40px) saturate(200%);
      -webkit-backdrop-filter: blur(40px) saturate(200%);
      border-radius: 24px;
      border: 1px solid var(--glass-border);
      border-top-color: var(--glass-border-light);
      border-left-color: var(--glass-border);
      box-shadow: 0 16px 40px rgba(0, 0, 0, 0.4), inset 0 1px 0 rgba(255, 255, 255, 0.1);
      padding: 40px;
      color: var(--text-main);
      display: none;
      overflow-y: auto;
      z-index: 50;
      scrollbar-width: none;
      -ms-overflow-style: none;
    }
    .page-content::-webkit-scrollbar {
      display: none;
    }

    .page-content.active {
      display: block;
      animation: fadeIn 0.3s ease;
    }

    @keyframes fadeIn {
      from { opacity: 0; transform: translateY(10px); }
      to { opacity: 1; transform: translateY(0); }
    }

    .link-box {
      width: clamp(116px, 9vw, 150px);
      height: clamp(58px, 5.6vw, 74px);
      box-sizing: border-box;
      border-radius: 18px;
      background: var(--glass-bg);
      backdrop-filter: blur(40px) saturate(200%);
      -webkit-backdrop-filter: blur(40px) saturate(200%);
      border: 1px solid var(--glass-border);
      border-top-color: var(--glass-border-light);
      border-left-color: var(--glass-border);
      box-shadow: 0 16px 40px rgba(0, 0, 0, 0.4), inset 0 1px 0 rgba(255, 255, 255, 0.1);
      display: flex;
      flex-direction: row;
      align-items: center;
      justify-content: flex-start;
      padding: 0 clamp(12px, 1.4vw, 20px);
      gap: clamp(8px, 1vw, 12px);
      flex-shrink: 0;
      color: var(--text-main);
      text-decoration: none;
      font-size: clamp(12px, 0.9vw, 15px);
      font-weight: 600;
      font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", Roboto, sans-serif;
      transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1), width 0.2s ease, height 0.2s ease;
      white-space: nowrap;
    }

    .link-box:hover {
      background: rgba(255, 255, 255, 0.15);
      transform: translateY(-4px);
      box-shadow: 0 20px 50px rgba(0,0,0,0.5), inset 0 1px 0 rgba(255, 255, 255, 0.2);
    }

    .link-box svg {
      width: clamp(18px, 1.6vw, 24px);
      height: clamp(18px, 1.6vw, 24px);
      flex-shrink: 0;
      fill: none;
      stroke: currentColor;
      stroke-width: 2;
      stroke-linecap: round;
      stroke-linejoin: round;
    }

    /* Once horizontal space gets tight (narrower window, or the page
       zoomed in), drop the text label and shrink each link to a centered
       icon-only square. This keeps the dock and these icons anchored in
       their fixed position (left group / dock / right group) instead of
       overflowing their column and getting shoved off-center. The dock
       itself shrinks fluidly via the --dock-* variables above, so the two
       scale down together and stay in sync. */
    @media (max-width: 1450px) {
      .link-box {
        width: clamp(40px, 4.6vw, 64px);
        height: clamp(40px, 4.6vw, 64px);
        padding: 0;
        gap: 0;
        justify-content: center;
      }
      .link-text {
        display: none;
      }
    }

    .ls-name {
      font-size: 60px;
      font-weight: 400;
      font-family: 'Coiny', system-ui;
      font-style: normal;
      color: var(--text-muted);
      mix-blend-mode: color-dodge;
      letter-spacing: 3px;
      line-height: 1;
      text-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
      margin-top: 230px;
      z-index: 3;
      transform: scaleY(1.25);
      text-align: center;
    }

    /* iOS-style flashlight/camera row — desktop hidden, shown on mobile below */
    .ls-quick-actions {
      display: none;
    }

    /* ============ LIGHT THEME ============ */
    /* Light theme is now powered dynamically by CSS variables in :root */

    /* ============ MOBILE RESPONSIVENESS ============ */
    @media (max-width: 768px) {
      /* Lockscreen */
      .ls-status-bar {
        display: none !important;
      }
      .ls-name {
        font-size: 40px;
        margin-top: 150px;
        text-align: center;
      }
      .ls-clock {
        font-size: 80px;
      }
      .ls-date {
        font-size: 20px;
      }

      .ls-quick-actions {
        display: flex;
        position: absolute;
        left: 0;
        right: 0;
        bottom: max(36px, env(safe-area-inset-bottom));
        padding: 0 32px;
        justify-content: space-between;
        align-items: center;
        z-index: 5;
      }

      .ls-quick-btn {
        width: 52px;
        height: 52px;
        border-radius: 50%;
        border: none;
        display: flex;
        align-items: center;
        justify-content: center;
        background: rgba(255, 255, 255, 0.16);
        backdrop-filter: blur(20px) saturate(180%);
        -webkit-backdrop-filter: blur(20px) saturate(180%);
        color: #fff;
        cursor: pointer;
        -webkit-tap-highlight-color: transparent;
      }

      .ls-quick-btn:active {
        background: rgba(255, 255, 255, 0.3);
      }

      /* iOS Grid layout */
      .hide-on-mobile { display: none !important; }
      .hide-on-desktop { display: flex !important; }

      .profile-widget-container {
        display: grid !important;
        grid-template-columns: repeat(4, 1fr);
        grid-auto-rows: min-content;
        gap: 16px;
        top: 0;
        left: 15px;
        right: 15px;
        width: auto;
        /* Mobile scrollable area — extends full height so content can
           scroll all the way under the (translucent) menubar/dock instead
           of being hard-clipped by a box edge sitting mid-screen. The
           visual "margin" at rest is created with padding instead. */
        bottom: 0;
        overflow-y: auto;
        overflow-x: hidden;
        padding-top: 65px;
        padding-bottom: 110px;
        align-content: start;
      }
      
      .widget-row {
        display: contents; /* Flattens children into the main grid */
      }

      .profile-widget {
        grid-column: span 2;
        aspect-ratio: 1 / 1;
        height: auto !important;
        width: 100% !important;
        min-height: unset !important;
      }
      .profile-widget img {
        height: 100%;
        width: 100%;
        object-fit: cover;
      }

      .mobile-apps-grid {
        grid-column: span 2;
        aspect-ratio: 1 / 1;
        display: grid !important;
        grid-template-columns: repeat(2, 1fr);
        grid-template-rows: repeat(2, 1fr);
        gap: 10px;
      }

      .mobile-app-icon {
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        gap: 4px;
        cursor: pointer;
        min-height: 0;
        overflow: hidden;
      }

      .mobile-app-squircle {
        flex: 1 1 auto;
        width: auto;
        max-width: 100%;
        min-height: 0;
        aspect-ratio: 1 / 1;
        border-radius: 22.5%;
        display: flex;
        align-items: center;
        justify-content: center;
        box-shadow: 0 4px 10px rgba(0,0,0,0.3);
        overflow: hidden;
      }

      .mobile-app-squircle--glass {
        background: var(--glass-bg);
        backdrop-filter: blur(20px) saturate(180%);
        -webkit-backdrop-filter: blur(20px) saturate(180%);
        border: 1px solid var(--glass-border);
        border-top-color: var(--glass-border-light);
        color: var(--text-main);
        box-shadow: 0 4px 10px rgba(0,0,0,0.3), inset 0 1px 0 rgba(255,255,255,0.12);
      }

      .mobile-app-icon span {
        font-size: 11px;
        color: #fff;
        text-shadow: 0 1px 3px rgba(0,0,0,0.8);
        font-weight: 500;
        white-space: nowrap;
        flex-shrink: 0;
      }

      .services-widget {
        grid-column: span 4;
        width: 100% !important;
        height: auto !important;
        min-height: unset !important;
      }

      .about-widget,
      .music-player-widget {
        grid-column: span 2;
        aspect-ratio: 1 / 1;
        width: 100% !important;
        height: auto !important;
        min-height: unset !important;
        padding: 16px !important;
      }

      .about-widget {
        align-items: center;
        text-align: center;
        cursor: pointer;
      }

      .about-widget h2 {
        font-size: 17px;
        margin-bottom: 6px;
      }

      .about-widget p {
        display: none;
      }

      .about-widget::after {
        content: 'Tap to read more';
        font-size: 12px;
        color: var(--text-muted);
      }

      .music-player-widget {
        flex-direction: column;
        justify-content: center;
        gap: 4px;
        text-align: center;
      }

      .music-player-widget .music-vinyl-container {
        width: 90px;
        height: 90px;
        transform: scale(0.78);
        margin-bottom: -8px;
      }

      .music-player-widget .music-info {
        width: 100%;
        align-items: center;
      }

      .music-player-widget .music-title,
      .music-player-widget .music-artist {
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
        max-width: 100%;
      }

      .music-player-widget .music-controls {
        justify-content: center;
        margin-top: 6px;
      }

      /* Dock */
      .dock-wrap {
        bottom: 10px;
        width: 100vw;
        left: 0;
        transform: none;
        margin: 0;
        display: flex;
        justify-content: center;
      }
      
      .dock {
        --dock-icon: 46px; 
        padding: 12px 14px;
        gap: 16px;
        max-width: 90vw;
        overflow-x: auto;
        justify-content: center; /* Since only 4 apps are left, center them */
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
        border-radius: 30px;
      }

      .dock::-webkit-scrollbar {
        display: none;
      }

      .dock-icon {
        flex-shrink: 0;
      }

      /* Desktop Window Manager */
      .mac-window {
        width: 100vw !important;
        height: 100vh !important;
        height: calc(var(--app-height, 100vh)) !important;
        top: 0 !important;
        left: 0 !important;
        transform: none !important; 
        border-radius: 0 !important;
        /* Add some padding for notch / safe area if needed */
        padding-top: env(safe-area-inset-top);
      }
      
      .mac-window.maximized {
        width: 100vw !important;
        height: 100vh !important;
        height: calc(var(--app-height, 100vh)) !important;
        top: 0 !important;
        left: 0 !important;
        border-radius: 0 !important;
      }

      /* Single source of truth for how tall the capsule nav row actually
         is (menubar + its own top/bottom padding + button height), so
         .page-content's padding-top below can never drift out of sync
         with it and overlap the buttons, regardless of safe-area inset. */
      :root {
        --mp-nav-h: 58px;
      }

      /* Pages Fullscreen */
      .page-content {
        top: 0 !important;
        left: 0 !important;
        right: 0 !important;
        bottom: 0 !important;
        border-radius: 0 !important;
        padding-top: calc(env(safe-area-inset-top, 0px) + var(--menubar-h) + var(--mp-nav-h) + 14px) !important;
        padding-bottom: calc(100px + env(safe-area-inset-bottom, 0px)) !important;
        padding-left: max(16px, env(safe-area-inset-left)) !important;
        padding-right: max(16px, env(safe-area-inset-right)) !important;
        z-index: 200 !important;
      }

      /* The resume/about/projects/skills/contact page cards use a large
         inline padding (30px) sized for desktop. On small screens that,
         stacked on top of the .page-content padding above, eats most of
         the usable width. Shrink it down for any content card. */
      .page-content div[style*="padding: 30px"] {
        padding: 16px !important;
      }

      /* Page heading top margin/gap was tuned for desktop too — trim it
         slightly on mobile to reclaim vertical space. */
      .page-content > h2[style*="margin-bottom: 30px"] {
        margin-bottom: 18px !important;
      }
      .page-content > div[style*="margin-bottom: 30px"] {
        margin-bottom: 18px !important;
      }

      /* In-modal navigation: lets you jump between sections or back home
         without relying on the tiny top menubar. Each item is its own
         glass capsule (matching the dock/link-box glass language used
         elsewhere), sitting directly on the wallpaper/blur rather than
         a solid bar — only the row's edge-fade gives it structure. */
      .mobile-page-nav {
        position: fixed;
        top: calc(env(safe-area-inset-top, 0px) + var(--menubar-h));
        left: 0;
        right: 0;
        height: var(--mp-nav-h);
        z-index: 210;
        display: none;
        align-items: center;
        gap: 8px;
        padding: 0 14px;
        overflow-x: auto;
        overflow-y: hidden;
        -webkit-overflow-scrolling: touch;
        background: transparent;
        scrollbar-width: none;
        -webkit-mask-image: linear-gradient(to right, transparent 0, #000 14px, #000 calc(100% - 14px), transparent 100%);
        mask-image: linear-gradient(to right, transparent 0, #000 14px, #000 calc(100% - 14px), transparent 100%);
        transform: translateY(0);
        transition: transform 0.28s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.28s ease;
      }

      /* Scroll-aware: JS toggles this class on the nav while the active
         .page-content is scrolled, so the capsule row tucks away while
         reading and reappears the instant the user scrolls back up. */
      .mobile-page-nav.mp-nav-hidden {
        transform: translateY(-130%);
        opacity: 0;
      }

      .mobile-page-nav::-webkit-scrollbar {
        display: none;
      }

      body.page-active .mobile-page-nav {
        display: flex;
      }

      .mp-nav-btn {
        flex-shrink: 0;
        padding: 8px 16px;
        border-radius: 980px;
        border: 1px solid var(--glass-border);
        border-top-color: var(--glass-border-light);
        background: var(--glass-bg);
        backdrop-filter: blur(20px) saturate(180%);
        -webkit-backdrop-filter: blur(20px) saturate(180%);
        color: var(--text-main);
        font-size: 13px;
        font-weight: 590;
        letter-spacing: -0.1px;
        font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", Roboto, sans-serif;
        white-space: nowrap;
        -webkit-tap-highlight-color: transparent;
        box-shadow: 0 4px 14px rgba(0, 0, 0, 0.25), inset 0 1px 0 rgba(255, 255, 255, 0.08);
        transition: background 0.18s ease, color 0.18s ease, transform 0.12s ease, border-color 0.18s ease;
      }

      .mp-nav-btn:active {
        transform: scale(0.96);
      }

      .mp-nav-btn.active {
        background: rgba(10, 132, 255, 0.55);
        border-color: rgba(10, 132, 255, 0.8);
        color: #fff;
      }

      /* var(--text-main)/var(--glass-bg) already flip correctly for
         light theme, and the blue active fill reads well on both, so
         no extra light-theme override is needed here. */

      /* The home-view (profile photo, app grid, widgets) is forced
         visible above with `display: grid !important`, which silently
         overrides the inline `display:none` the showPage() JS sets when
         navigating to a page like Resume — so the page would render
         underneath it. showPage() toggles this `page-active` class on
         <body>; the extra class here gives this rule higher specificity
         so it actually wins over the rule above. */
      body.page-active .profile-widget-container {
        display: none !important;
      }

      /* Hide Desktop Links on Mobile */
      .links-left, .links-right {
        display: none !important;
      }
    }

    /* ============ VISIBILITY UTILITIES ============ */
    @media (min-width: 769px) {
      .hide-on-desktop {
        display: none !important;
      }
    }

    @media (max-width: 768px) {
      .hide-on-mobile {
        display: none !important;
      }
      /* hide-on-desktop doesn't need a force display here, 
         as .mobile-apps-grid provides its own display: grid */
    }