/* the side panel: idle nav, work/about/contact sections, audio bar */

.panel {
  position: absolute;
  /* starts below the mode-toggle pill in the top-right corner —
     that floating control occupies roughly the same corner the panel
     docks into, so if the panel started at top:18px like they do, it would
     sit on top of them and swallow their clicks whenever it's open
     (including at idle, now that the panel shows there too). */
  top: 96px;
  right: 18px;
  width: min(520px, calc(100vw - 36px));
  height: calc(100% - 114px);
  background: rgba(255, 255, 255, .78);
  border: 1px solid rgba(42, 39, 64, .38);
  border-radius: 10px;
  overflow: hidden; /* clip the header/audio bar and blur to the rounded corners */
  box-shadow: -14px 18px 50px rgba(42, 39, 64, .2);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  display: flex;
  flex-direction: column;
  transition: transform .52s cubic-bezier(.2, .85, .2, 1), visibility 0s;
  transform: translateX(0);
}

.panel.panel-hidden {
  /* slide fully off (width + its right offset, which grows with the phone's safe-area inset),
     then switch visibility off once the slide ends so no edge or shadow ever peeks in */
  transform: translateX(calc(100% + 40px + env(safe-area-inset-right, 0px)));
  visibility: hidden;
  transition: transform .52s cubic-bezier(.2, .85, .2, 1), visibility 0s .52s;
  pointer-events: none;
}

/* short landscape viewports (phones on their side): dock higher, use more height */
@media (max-height: 500px) {
  .panel {
    top: 62px;
    right: max(10px, env(safe-area-inset-right));
    width: min(420px, 60vw);
    height: calc(100% - 72px);
  }

  /* the header and audio bar are chrome: squeeze them so the text gets the height */
  .panel-header { padding: 6px 12px; }
  .panel-body { padding: 12px 14px; }
  .audio-bar { padding: 6px 12px; }
  .audio-row { gap: 8px; }
  .play-btn { width: 30px; height: 30px; }
  .track-progress { margin-top: 3px; }
  .progress-meta { margin-top: 2px; white-space: nowrap; gap: 8px; }
  .vol-slider { width: 44px; }
  .work-body { margin-top: 10px; }
  .work-shot { margin-bottom: 8px; }
}

/* folder-style tab on the right edge that opens the site map at idle */
.folder-tab {
  position: absolute;
  right: 0;
  top: 50%;
  transform: translateY(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding: 14px 9px 14px 11px;
  background: #f7d979;
  border: 2px solid var(--ink);
  border-right: 0;
  border-radius: 12px 0 0 12px;
  box-shadow: -3px 3px 0 rgba(42, 39, 64, .2);
  cursor: pointer;
  transition: transform .2s ease, padding .2s ease;
}

.folder-tab:hover {
  padding-right: 15px;
}

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

.folder-tab-icon {
  width: 16px;
  height: 12px;
  background: var(--ink);
  border-radius: 2px 2px 1px 1px;
  position: relative;
}

.folder-tab-icon::before {
  content: '';
  position: absolute;
  left: 0;
  top: -3px;
  width: 7px;
  height: 4px;
  background: var(--ink);
  border-radius: 2px 2px 0 0;
}

.folder-tab-label {
  writing-mode: vertical-rl;
  font: 400 12px Silkscreen, monospace;
  color: var(--ink);
}

.panel-header {
  padding: 14px 20px;
  border-bottom: 1px dashed rgba(42, 39, 64, .25);
  display: flex;
  align-items: center;
  gap: 10px;
}

.panel-kicker {
  font: 400 12px Silkscreen, monospace;
  color: var(--accent);
}

.panel-body {
  flex: 1;
  overflow-y: auto;
  padding: 20px;
}

.section-eyebrow {
  font: 400 12px Silkscreen, monospace;
  color: var(--muted-2);
}

.section-title {
  font: 400 24px/1.3 Silkscreen, monospace;
  color: var(--ink);
  margin-top: 8px;
}

/* idle nav */

.np-vinyl {
  width: 34px;
  height: 34px;
  flex: none;
  border-radius: 50%;
  background: radial-gradient(circle, var(--accent-pink) 0 22%, #1d1b2b 24% 100%);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .12);
}

.np-vinyl.spinning { animation: spin 3s linear infinite; }

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

.np-toggle {
  width: 32px;
  height: 32px;
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: none;
  border: 1px solid var(--ink);
  border-radius: 50%;
  background: #fff;
  font: 13px Verdana, sans-serif;
  color: var(--ink);
  cursor: pointer;
}

.idle-title {
  font: 400 20px/1.4 Silkscreen, monospace;
  color: var(--ink);
}

.idle-desc {
  margin: 12px 0 20px;
  font: 14.5px/1.8 Verdana, sans-serif;
  color: var(--muted);
}

.nav-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 13px 14px;
  background: #fff;
  border: 1px solid var(--ink);
  border-radius: 6px;
  font: 14px Verdana, sans-serif;
  color: var(--ink);
  cursor: pointer;
  text-align: left;
}

.nav-icon {
  width: 42px;
  height: 42px;
  flex: none;
  display: grid;
  place-items: center;
  border-radius: 10px;
  background: var(--paper);
  border: 1px solid rgba(42, 39, 64, .2);
  transition: transform .18s ease;
}
.nav-icon svg { width: 30px; height: 30px; }
.nav-item:hover .nav-icon { transform: rotate(-6deg) scale(1.08); }
.nav-item:hover { box-shadow: 3px 3px 0 var(--ink); transform: translate(-1px, -1px); }
.nav-item { transition: box-shadow .15s ease, transform .15s ease; }

.nav-tag {
  margin-left: auto;
  font: 16px VT323, monospace;
  color: var(--muted-2);
}

.nav-text { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.nav-text small { font: 13px/1.45 Verdana, sans-serif; color: var(--muted); }

.egg-card {
  margin-top: 18px;
  padding: 14px;
  border: 1px dashed var(--ink);
  border-radius: 6px;
  background: rgba(247, 217, 121, .28);
}
.egg-head { display: flex; align-items: baseline; justify-content: space-between; }
.egg-title { font: 400 15px Silkscreen, monospace; color: var(--ink); }
.egg-count { font: 20px VT323, monospace; color: var(--ink); }
.egg-desc { margin: 8px 0 12px; font: 13.5px/1.6 Verdana, sans-serif; color: var(--muted); }
.egg-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.egg-list li { display: flex; align-items: center; gap: 8px; font: 13.5px Verdana, sans-serif; color: var(--ink); }
.egg-dot { width: 12px; height: 12px; flex: none; border: 1px solid var(--ink); border-radius: 50%; background: #fff; }
.egg-name { font-weight: bold; }
.egg-hint { margin-left: auto; font: 13px Verdana, sans-serif; color: var(--muted-2); text-align: right; }
.egg-list li.found .egg-dot { background: var(--accent-pink); }
.egg-list li.found .egg-hint { display: none; }
.egg-done .egg-desc::after { content: ' you found them all.'; color: var(--ink); font-weight: bold; }

.idle-quick {
  margin-top: 14px;
  padding: 0;
  border: 0;
  background: none;
  font: 17px VT323, monospace;
  color: var(--muted);
  text-decoration: underline;
  cursor: pointer;
}

/* work */

.work-stack {
  font: 16px VT323, monospace;
  color: var(--muted);
  margin-top: 6px;
}

.work-body {
  margin-top: 18px;
  font: 15px/1.8 Verdana, sans-serif;
  color: var(--ink-soft);
}

.work-note {
  margin-top: 14px;
  border-left: 3px solid var(--accent-pink);
  padding-left: 12px;
  font: 14.5px/1.7 Verdana, sans-serif;
  color: var(--ink-soft);
}

.work-note-teal {
  margin-top: 10px;
  border-left-color: var(--accent-teal);
}

.work-shot {
  display: block;
  width: 100%;
  margin: 0 0 14px;
  border: 1px solid rgba(42, 39, 64, .3);
  border-radius: 6px;
  box-shadow: 4px 4px 0 rgba(42, 39, 64, .14);
}

.work-private {
  align-self: center;
  font: 13px Verdana, sans-serif;
  color: var(--muted);
}

.work-links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 20px;
}

.link-btn-dark {
  background: var(--ink);
  color: #fff;
  border-radius: 5px;
  font: 400 12px Silkscreen, monospace;
  padding: 9px 13px;
}

.link-btn-outline {
  background: #fff;
  color: var(--ink);
  border: 1px solid var(--ink);
  border-radius: 5px;
  font: 400 12px Silkscreen, monospace;
  padding: 9px 13px;
}

.disc-nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 9px;
  margin-top: 22px;
  border-top: 1px dashed rgba(42, 39, 64, .25);
  padding-top: 14px;
}

.disc-nav-btn {
  padding: 8px 12px;
  background: #fff;
  border: 1px solid var(--ink);
  border-radius: 5px;
  font: 400 12px Silkscreen, monospace;
  color: var(--ink);
  cursor: pointer;
}

.disc-count {
  font: 16px VT323, monospace;
  color: var(--muted-2);
}

/* about */

.about-text {
  margin: 12px 0 0;
  font: 15px/1.8 Verdana, sans-serif;
  color: var(--ink-soft);
}

.about-text:first-of-type {
  margin-top: 16px;
}

.tag-row {
  margin-top: 18px;
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.tag-pill {
  padding: 4px 9px;
  background: #f7f6f3;
  border: 1px solid var(--ink);
  border-radius: 999px;
  font: 13px Verdana, sans-serif;
  color: var(--ink);
}

.linkedin-link {
  display: inline-block;
  margin-top: 20px;
  font: 13px Verdana, sans-serif;
  color: var(--accent);
}

/* contact */

.contact-desc {
  margin: 16px 0 18px;
  font: 15px/1.8 Verdana, sans-serif;
  color: var(--ink-soft);
}

.contact-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.contact-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 13px;
  background: #fff;
  border: 1px solid var(--ink);
  border-radius: 6px;
  font: 13px Verdana, sans-serif;
  color: var(--ink);
}

.contact-value {
  margin-left: auto;
  font: 16px VT323, monospace;
  color: var(--muted);
}

/* audio bar */

.audio-bar {
  border-top: 1px solid rgba(42, 39, 64, .24);
  background: rgba(247, 246, 243, .72);
  padding: 13px 20px;
}

.audio-row {
  display: flex;
  align-items: center;
  gap: 12px;
}

.play-btn {
  width: 38px;
  height: 38px;
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: none;
  border: 1px solid var(--ink);
  border-radius: 50%;
  background: #fff;
  font: 13px Verdana, sans-serif;
  color: var(--ink);
  cursor: pointer;
}

.volume {
  display: flex;
  align-items: center;
  gap: 6px;
  flex: none;
}

.vol-btn {
  border: 0;
  background: none;
  font-size: 14px;
  cursor: pointer;
  padding: 0;
}

.vol-slider {
  width: 64px;
  accent-color: var(--accent-pink);
  cursor: pointer;
}

.track-info {
  flex: 1;
  min-width: 0;
}

.track-name {
  font: 13px Verdana, sans-serif;
  color: var(--ink);
}

.track-progress {
  height: 4px;
  background: #ddd9d2;
  margin-top: 6px;
}

.progress-fill {
  width: 0;
  height: 100%;
  background: var(--accent-pink);
}

.progress-meta {
  display: flex;
  justify-content: space-between;
  margin-top: 4px;
  font: 16px VT323, monospace;
  color: var(--muted-2);
}

.progress-meta a {
  color: inherit;
}

/* drawn play/pause icons (same shape on every platform) */
.np-toggle svg,
.play-btn svg {
  width: 14px;
  height: 14px;
  fill: currentColor;
  display: block;
}
