/* Studio sidebar: an immersive icon rail that opens into its own panel; a drawer on phones.
   Icons keep the same x in both states (centred on the 68px rail), so opening only widens the panel and fades the labels in. */
@property --hm-sidebar{syntax:"<length>";inherits:true;initial-value:0px}
body.studio-shell{--hm-sidebar:68px;--hm-panel-width:216px;--hm-ease:cubic-bezier(.2,0,0,1)}
/* Content follows the panel edge only while toggling, so switching tabs never slides the page. */
body.studio-shell.hm-nav-motion{transition:--hm-sidebar .28s var(--hm-ease)}
@media(min-width:1181px){body.studio-shell.hm-nav-expanded{--hm-sidebar:var(--hm-panel-width)}}

.studio-shell .hm-sidebar{
  --hm-hover:color-mix(in srgb,var(--fg) 8%,transparent);
  --hm-panel:color-mix(in srgb,var(--fg) 5%,var(--bg));
  width:var(--hm-panel-width);padding:14px;border:0;background:var(--hm-panel);box-shadow:none;
  overflow:hidden auto;scrollbar-width:none;
  transition:width .28s var(--hm-ease),background-color .28s var(--hm-ease),box-shadow .28s var(--hm-ease),transform .28s var(--hm-ease);
}
.studio-shell .hm-sidebar::-webkit-scrollbar{display:none}

.studio-shell .hm-sidebar-head{position:relative;display:flex;align-items:center;flex:0 0 40px;height:40px;margin:0 0 18px}
.studio-shell .hm-brand{display:flex;align-items:center;gap:3px;width:100%;height:40px;margin:0;padding:0 0 0 7px;border-radius:20px;overflow:hidden;color:var(--fg);font-size:0}
body.studio-shell:has(#pane-home:not([hidden])) .hm-brand{color:var(--acc)}
.studio-shell .hm-brand-mark{display:block;flex:0 0 26px;width:26px;height:26px;transition:opacity .16s}
.studio-shell .hm-brand-word{display:block;flex:0 0 106px;width:106px;height:26px;transition:opacity .2s ease .1s}
/* In the rail the toggle sits right over the logo (right:0 of a 40px head); it slides to the panel's right edge as it opens. */
.studio-shell .hm-sidebar-toggle{
  position:absolute;z-index:1;top:0;right:0;display:grid;place-items:center;width:40px;height:40px;padding:0;
  border:0;border-radius:50%;background:transparent;color:var(--dim);
  transition:opacity .16s,background-color .15s,color .15s;
}
.studio-shell .hm-sidebar-toggle:hover{background:var(--hm-hover);color:var(--fg)}
.studio-shell .hm-sidebar .hm-sidebar-toggle .ui-icon{width:20px;height:20px;flex-basis:20px}
.studio-shell .hm-sidebar-toggle .hm-icon-open{display:none}

.studio-shell .hm-sidebar>.hm-nav{gap:4px;margin:0}
.studio-shell .hm-nav a,.studio-shell .hm-sidebar-bottom>a,.studio-shell .hm-sidebar-bottom>button{
  position:relative;display:flex;align-items:center;gap:12px;width:100%;height:40px;min-height:0;margin:0;padding:0 10px;
  border:1px solid transparent;border-radius:20px;background:transparent;box-shadow:none;
  color:var(--dim)!important;font-size:13px!important;font-weight:450;line-height:1.3;white-space:nowrap;text-align:left;overflow:hidden;
  transition:background-color .15s,color .15s,border-color .28s var(--hm-ease),border-radius .28s var(--hm-ease),box-shadow .28s var(--hm-ease),height .28s var(--hm-ease),margin .28s var(--hm-ease);
}
.studio-shell .hm-nav a:hover,.studio-shell .hm-sidebar-bottom>a:hover,.studio-shell .hm-sidebar-bottom>button:hover{background:var(--hm-hover);color:var(--fg)!important}
.studio-shell .hm-nav a[aria-current="page"],.studio-shell .hm-sidebar-bottom>a[aria-current="page"]{background:color-mix(in srgb,var(--acc) 15%,transparent);color:var(--acc)!important;font-weight:600}
.studio-shell .hm-sidebar .ui-icon{width:18px;height:18px;flex:0 0 18px}
.studio-shell .hm-nav-text{display:block;flex:1;min-width:0;overflow:hidden;transition:opacity .2s ease .1s}

/* Group label in the panel; a short rule in the rail. Same height both ways so nothing below moves. */
.studio-shell .hm-nav-divider{display:none}
.studio-shell .hm-nav-label{
  position:relative;display:flex;align-items:flex-end;height:34px;margin:0;padding:0 11px 7px;
  color:var(--dim);font-size:11px;font-weight:550;white-space:nowrap;transition:color .2s ease .1s;
}
.studio-shell .hm-nav-label::before{content:"";position:absolute;left:10px;top:50%;width:20px;height:1px;background:var(--line);opacity:0;transition:opacity .16s}

.studio-shell .hm-sidebar-bottom{display:flex;flex-direction:column;gap:4px;margin-top:auto;padding-top:20px}
.studio-shell .hm-sidebar-bottom>.hm-resume{height:52px;border-color:var(--line);border-radius:14px;background:var(--surf);box-shadow:0 1px 3px #00000010}
.studio-shell .hm-sidebar-bottom>.hm-resume:hover{border-color:var(--acc);background:var(--surf)}
.studio-shell .hm-resume>.hm-nav-text{color:var(--fg);font-size:12px;font-weight:550}
.studio-shell .hm-resume small{display:block;margin-top:2px;color:var(--dim);font-size:11px;font-weight:400}
.studio-shell .hm-sidebar .hm-resume-arrow{display:block;width:15px;height:15px;flex:0 0 15px;color:var(--dim);transition:opacity .2s ease .1s}

@media(min-width:601px){
  body.studio-shell:not(.hm-nav-expanded) .hm-sidebar{width:68px;background:var(--bg)}
  body.studio-shell:not(.hm-nav-expanded) .hm-sidebar-toggle{opacity:0}
  body.studio-shell:not(.hm-nav-expanded) .hm-sidebar-toggle .hm-icon-open{display:block}
  body.studio-shell:not(.hm-nav-expanded) .hm-sidebar-toggle .hm-icon-close{display:none}
  body.studio-shell:not(.hm-nav-expanded) .hm-sidebar-head:hover .hm-sidebar-toggle,
  body.studio-shell:not(.hm-nav-expanded) .hm-sidebar-toggle:focus-visible{opacity:1}
  body.studio-shell:not(.hm-nav-expanded) .hm-sidebar-head:hover .hm-brand-mark,
  body.studio-shell:not(.hm-nav-expanded) .hm-sidebar-head:has(.hm-sidebar-toggle:focus-visible) .hm-brand-mark{opacity:0}
  body.studio-shell:not(.hm-nav-expanded) .hm-brand-word,
  body.studio-shell:not(.hm-nav-expanded) .hm-nav-text,
  body.studio-shell:not(.hm-nav-expanded) .hm-sidebar .hm-resume-arrow{opacity:0;transition:opacity .08s}
  body.studio-shell:not(.hm-nav-expanded) .hm-nav-label{color:transparent;transition:color .08s}
  body.studio-shell:not(.hm-nav-expanded) .hm-nav-label::before{opacity:1}
  body.studio-shell:not(.hm-nav-expanded) .hm-sidebar-bottom>.hm-resume{height:40px;margin-block:6px;border-color:transparent;border-radius:20px;background:transparent;box-shadow:none}
  body.studio-shell:not(.hm-nav-expanded) .hm-sidebar-bottom>.hm-resume:hover{background:var(--hm-hover)}
}
/* Narrower screens: the open panel floats over the page instead of pushing it. */
@media(min-width:601px) and (max-width:1180px){
  body.studio-shell.hm-nav-expanded .hm-sidebar{box-shadow:0 16px 48px #00000033}
}
@media(max-width:600px){
  body.studio-shell{--hm-sidebar:0px}
  .studio-shell .hm-sidebar{width:min(272px,86vw);padding-top:18px;transform:translateX(-100%)}
  body.studio-shell.hm-menu-open .hm-sidebar{transform:none;box-shadow:0 16px 48px #00000038}
  .studio-shell .hm-sidebar-toggle{display:none}
}

/* Hover labels for the rail (js/home.js positions it next to the item). */
.hm-tip{
  position:fixed;z-index:70;left:0;top:0;max-width:240px;padding:6px 10px;border-radius:8px;
  background:var(--fg);color:var(--bg);font-size:12px;font-weight:500;line-height:1.4;white-space:nowrap;
  box-shadow:0 6px 20px #00000030;pointer-events:none;opacity:0;transform:translate(-4px,-50%);
  transition:opacity .12s,transform .12s var(--hm-ease,ease);
}
.hm-tip.is-visible{opacity:1;transform:translate(0,-50%)}

@media(prefers-reduced-motion:reduce){
  body.studio-shell.hm-nav-motion{transition:none}
  .studio-shell .hm-sidebar,.studio-shell .hm-sidebar *,.studio-shell .hm-sidebar ::before,.hm-tip{transition:none!important}
}
