/* macOS Tahoe Dock: clear Liquid Glass shelf, magnified icons, glass tooltip, minimized thumbnails. */

/* ---------- Shelf material ---------- */

body nav.dock {
  --dock-size: 58px;
  gap: 10px;
  padding: 11px 14px 8px;
  border: 0;
  border-radius: 32px;
  background: var(--lg-sheen), var(--lg-fill-clear);
  box-shadow: var(--lg-rim-strong), var(--lg-shadow);
  -webkit-backdrop-filter: blur(var(--lg-blur)) saturate(var(--lg-sat));
  backdrop-filter: blur(var(--lg-blur)) saturate(var(--lg-sat));
}
body nav.dock.lg-refracting { -webkit-backdrop-filter: none; }
body.dark-desktop nav.dock { background: var(--lg-sheen), var(--lg-fill-clear); }

nav.dock .dock-divider {
  align-self: flex-end;
  flex: none;
  width: 1px;
  height: 46px;
  margin: 0 2px 12px;
  border-radius: 1px;
  background: rgba(255, 255, 255, .5);
  box-shadow: 0 0 0 .5px rgba(0, 10, 30, .08);
}
body.dark-desktop nav.dock .dock-divider { background: rgba(255, 255, 255, .22); box-shadow: none; }

/* ---------- Items ---------- */

nav.dock .dock-item {
  height: 64px;
  transform-origin: 50% 100%;
  transition: transform .16s var(--lg-ease);
  -webkit-tap-highlight-color: transparent;
}
/* Magnification replaces the old hover lift. */
nav.dock .dock-item:hover,
nav.dock .dock-item:focus-visible,
nav.dock .dock-item:has(+ .dock-item:hover) { transform: none; }
nav.dock .dock-item:active { transform: scale(.93); }
nav.dock .dock-item:focus-visible { outline: 0; }
nav.dock .dock-item:focus-visible .dock-face,
nav.dock .dock-thumb:focus-visible .dock-thumb-face { outline: 2px solid var(--lg-accent); outline-offset: 3px; }

nav.dock .dock-face {
  position: relative;
  transform-origin: 50% 100%;
  transform: scale(var(--s, 1));
  transition: filter .12s var(--lg-ease);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .85), inset 0 0 0 .5px rgba(0, 0, 0, .1), 0 5px 12px rgba(0, 12, 40, .26);
}
/* Soft specular sheen over every tile. */
nav.dock .dock-face::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: linear-gradient(165deg, rgba(255, 255, 255, .34), rgba(255, 255, 255, 0) 46%);
  pointer-events: none;
}
nav.dock .dock-item:active .dock-face { filter: brightness(.78); }
nav.dock .dock-item .dock-label { display: none; }

/* Running indicator */
nav.dock .running-dot {
  left: 50%;
  bottom: 0;
  width: 4px;
  height: 4px;
  margin-left: -2px;
  background: rgba(14, 22, 40, .74);
  box-shadow: 0 0 0 .5px rgba(255, 255, 255, .55);
  transform: scale(.4);
  transition: opacity .2s var(--lg-ease), transform .3s var(--lg-spring);
}
nav.dock .dock-item[data-running="true"] .running-dot { opacity: 1; transform: none; }
body.dark-desktop nav.dock .running-dot { background: rgba(255, 255, 255, .9); box-shadow: 0 0 0 .5px rgba(0, 0, 0, .35); }

@media (min-width: 761px) {
  nav.dock .dock-item { width: var(--dock-size); }
  nav.dock .dock-face { width: var(--dock-size); height: var(--dock-size); border-radius: 16px; flex: none; }
}

/* ---------- Minimized windows (right of the divider) ---------- */

.dock-minimized {
  display: flex;
  align-items: flex-end;
  gap: 10px;
  height: 64px;
  padding-bottom: 6px;
}
.dock-minimized[hidden], nav.dock .dock-divider[hidden] { display: none; }

.dock-thumb {
  position: relative;
  flex: none;
  width: 48px;
  height: 48px;
  padding: 0;
  border: 0;
  background: none;
  color: var(--lg-text);
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}
.dock-thumb:focus-visible { outline: 0; }
.dock-thumb.is-new { animation: dock-thumb-in .28s .1s var(--lg-ease) both; }
@keyframes dock-thumb-in { from { opacity: 0; } }

.dock-thumb-face {
  position: relative;
  display: grid;
  place-items: center;
  width: 100%;
  height: 100%;
  overflow: hidden;
  border-radius: 14px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, .4), rgba(255, 255, 255, 0) 55%),
    linear-gradient(150deg, var(--thumb-a, #e8f0ff), var(--thumb-b, #cfdcf5));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .9), inset 0 0 0 .5px rgba(0, 0, 0, .1), 0 4px 10px rgba(0, 12, 40, .24);
  transition: transform .3s var(--lg-spring), filter .12s var(--lg-ease);
}
.dock-thumb-face svg {
  width: 22px;
  height: 22px;
  margin-top: 6px;
  fill: none;
  stroke: rgba(16, 28, 56, .78);
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.dock-thumb-bar { position: absolute; top: 5px; left: 6px; display: flex; gap: 2.5px; }
.dock-thumb-bar i { width: 3.5px; height: 3.5px; border-radius: 50%; background: rgba(16, 28, 56, .3); }
.dock-thumb-bar i:first-child { background: #ff5f57; }
.dock-thumb-bar i:nth-child(2) { background: #febc2e; }
.dock-thumb-bar i:nth-child(3) { background: #28c840; }
.dock-thumb:hover .dock-thumb-face { transform: translateY(-4px) scale(1.08); }
.dock-thumb:active .dock-thumb-face { transform: scale(.93); filter: brightness(.8); }

.dock-thumb[data-win="certificates"] { --thumb-a: #fff3df; --thumb-b: #ffd9a3; }
.dock-thumb[data-win="projects"] { --thumb-a: #ece6ff; --thumb-b: #c9bcf7; }
.dock-thumb[data-win="about"] { --thumb-a: #e1f4ff; --thumb-b: #b3dcf5; }
.dock-thumb[data-win="help"] { --thumb-a: #fff8d6; --thumb-b: #f6e08c; }
.dock-thumb[data-win="game"] { --thumb-a: #dff6e8; --thumb-b: #9fdcb8; }

body.dark-desktop .dock-thumb-face {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, .16), rgba(255, 255, 255, 0) 55%),
    linear-gradient(150deg, rgba(70, 78, 98, .96), rgba(38, 44, 60, .96));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .28), inset 0 0 0 .5px rgba(255, 255, 255, .12), 0 4px 10px rgba(0, 0, 0, .4);
}
body.dark-desktop .dock-thumb-face svg { stroke: rgba(240, 244, 255, .88); }

/* ---------- Tooltip ---------- */

.dock-tooltip {
  position: fixed;
  left: 0;
  top: 0;
  z-index: 4100;
  transform: translate3d(var(--x, 0), var(--y, 0), 0);
  pointer-events: none;
}
.dock-tooltip-bubble {
  position: absolute;
  left: 0;
  top: 0;
  padding: 6px 12px 7px;
  border-radius: 999px;
  font: 500 13px/1.2 var(--lg-font);
  letter-spacing: -.005em;
  white-space: nowrap;
  color: var(--lg-text);
  opacity: 0;
  transform: translate(-50%, -100%) scale(.88);
  transform-origin: 50% 100%;
  transition: opacity .14s var(--lg-ease), transform .22s var(--lg-spring);
}
.dock-tooltip.is-visible .dock-tooltip-bubble { opacity: 1; transform: translate(-50%, -100%); }

/* ---------- Mobile: compact, no magnification, no hover tooltip ---------- */

@media (max-width: 760px) {
  body nav.dock { border-radius: 24px; }
  nav.dock .dock-item:active .dock-face { filter: brightness(.8); }
  .dock-tooltip { display: none; }
  .minimized-tray { display: none; }
  nav.dock .dock-divider-min { display: none; }
  .dock-minimized {
    position: absolute;
    left: 50%;
    bottom: calc(100% + 10px);
    transform: translateX(-50%);
    flex-wrap: wrap;
    justify-content: center;
    gap: 8px;
    width: max-content;
    max-width: 100%;
    height: auto;
    padding: 7px;
    border-radius: 22px;
    background: var(--lg-sheen), var(--lg-fill-thick);
    box-shadow: var(--lg-rim), var(--lg-shadow-sm);
  }
  .dock-thumb { width: 42px; height: 42px; }
  .dock-thumb-face { border-radius: 12px; }
}

@media (prefers-reduced-transparency: reduce) {
  body nav.dock { -webkit-backdrop-filter: none; backdrop-filter: none; background: var(--lg-fill-thick); }
  .dock-tooltip-bubble { -webkit-backdrop-filter: none; backdrop-filter: none; background: var(--lg-fill-thick); }
}
body.motion-reduced .dock-tooltip-bubble { transform: translate(-50%, -100%); }
body.motion-reduced .dock-thumb:hover .dock-thumb-face { transform: none; }
/* An empty absolutely-positioned strip inside the dock distorts Chromium's backdrop blur. */
@media (max-width: 760px) {
  .dock-minimized:not(:has(*)) { display: none; }
}

/* Behance: the mark is its own blue tile, so let it fill the face. */
nav.dock .dock-behance { background: #1769ff; overflow: hidden; }
nav.dock .dock-behance img { width: 100%; height: 100%; }
