/* Shared app-style chrome — a Flora-app-inspired icon rail (left) + top
   bar (top), framing a full-bleed dotted canvas. Included on every page;
   see chrome.js for the mobile rail toggle. */

html, body{height:100%;}
body{
  padding-left:104px;
  padding-top:72px;
}

/* ---------------- ICON RAIL (left, floating, expands on hover) ---------------- */
.rail{
  position:fixed;
  top:96px;
  left:20px;
  bottom:20px;
  width:64px;
  display:flex;
  flex-direction:column;
  padding:16px 10px;
  background:rgba(24,24,23,0.92);
  border:1px solid var(--line);
  border-radius:28px;
  box-shadow:0 20px 50px rgba(0,0,0,0.5);
  backdrop-filter:blur(14px);
  -webkit-backdrop-filter:blur(14px);
  overflow:hidden;
  transition:width .25s cubic-bezier(.65,0,.35,1);
  z-index:50;
}
.rail:hover{width:240px;}
.rail-mark-link{
  display:block;
  margin:0 0 22px 8px;
  flex-shrink:0;
}
.rail-mark{
  width:28px;
  height:28px;
  border-radius:50%;
  object-fit:cover;
  display:block;
}
.rail-nav{
  display:flex;
  flex-direction:column;
  gap:4px;
  flex-shrink:0;
}
.rail-link{
  width:100%;
  height:44px;
  display:flex;
  align-items:center;
  padding-left:12px;
  border-radius:14px;
  color:var(--ink-faint);
  text-decoration:none;
  white-space:nowrap;
  flex-shrink:0;
  transition:background-color .3s ease, color .15s ease;
}
.rail-link svg{width:20px;height:20px;flex-shrink:0;}
.rail-label{
  max-width:0;
  opacity:0;
  margin-left:0;
  overflow:hidden;
  font-size:13px;
  font-weight:500;
  transition:max-width .22s ease, opacity .18s ease, margin-left .22s ease;
}
.rail:hover .rail-label{max-width:160px;opacity:1;margin-left:10px;}
.rail-link:hover{color:var(--ink);background-color:rgba(255,255,255,0.08);}
.rail-link.active{
  color:var(--paper);
  background-color:var(--accent);
}
/* Literal hex here, not var(--accent)/var(--cursor-dark) — CSS custom
   properties don't reliably animate as keyframe values, so the pulse
   silently no-ops if you swap these back to var(). Keep in sync with
   --accent and --cursor-dark in each page's :root by hand. */
@keyframes railActivePulse{
  0%{background-color:#A0BAE0;}
  45%{background-color:#3A6BB3;}
  100%{background-color:#A0BAE0;}
}
.rail:hover .rail-link.active{animation:railActivePulse .5s ease;}

/* ---- project list (revealed under Contact when the rail expands) ---- */
.rail-projects{
  flex:1;
  min-height:0;
  display:flex;
  flex-direction:column;
  margin-top:10px;
  opacity:0;
  pointer-events:none;
  transition:opacity .15s ease;
}
.rail:hover .rail-projects{opacity:1;pointer-events:auto;}
.rail-project-tabs{
  display:flex;
  gap:4px;
  padding-bottom:8px;
  margin-bottom:6px;
  border-bottom:1px solid var(--line);
  flex-shrink:0;
}
.rail-tab{
  font-family:var(--mono);
  font-size:10px;
  color:var(--ink-faint);
  background:none;
  border:none;
  padding:5px 8px;
  border-radius:8px;
  cursor:pointer;
  white-space:nowrap;
  transition:color .15s ease, background .15s ease;
}
.rail-tab:hover{color:var(--ink);}
.rail-tab.active{color:var(--paper);background:var(--accent);}
.rail-project-list{
  flex:1;
  min-height:0;
  overflow-y:auto;
  display:flex;
  flex-direction:column;
  gap:2px;
  padding-right:2px;
}
.rail-project-list::-webkit-scrollbar{width:4px;}
.rail-project-list::-webkit-scrollbar-thumb{background:var(--line);border-radius:2px;}
.rail-project-link{
  display:block;
  font-size:12px;
  color:var(--ink-soft);
  text-decoration:none;
  padding:7px 8px;
  border-radius:8px;
  white-space:nowrap;
  overflow:hidden;
  text-overflow:ellipsis;
  transition:background .15s ease, color .15s ease;
}
.rail-project-link:hover{background:rgba(255,255,255,0.06);color:var(--ink);}

.rail-avatar{
  width:32px;
  height:32px;
  border-radius:50%;
  background:var(--ink);
  color:var(--paper);
  display:flex;
  align-items:center;
  justify-content:center;
  font-family:var(--mono);
  font-size:11px;
  font-weight:600;
  text-decoration:none;
  flex-shrink:0;
  margin:10px 0 0 6px;
}

/* ---------------- TOP BAR (full-bleed, flush) ---------------- */
.topbar{
  position:fixed;
  top:0;
  left:0;
  right:0;
  height:72px;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:16px;
  padding:0 28px 0 104px;
  background:var(--paper);
  border-bottom:1px solid var(--line);
  z-index:45;
}
.topbar-left{
  display:flex;
  align-items:baseline;
  gap:10px;
  min-width:0;
}
.topbar-title{
  font-family:var(--serif);
  font-size:16px;
  font-weight:600;
  white-space:nowrap;
  text-decoration:none;
  color:var(--ink);
}
.topbar-sub{
  font-size:12.5px;
  color:var(--ink-faint);
  white-space:nowrap;
  overflow:hidden;
  text-overflow:ellipsis;
}
.topbar-right{
  display:flex;
  align-items:center;
  gap:8px;
  flex-shrink:0;
}

/* ---------------- PILL BUTTONS ---------------- */
.pill{
  display:inline-flex;
  align-items:center;
  gap:6px;
  font-family:var(--sans);
  font-size:12.5px;
  font-weight:500;
  padding:8px 16px;
  border-radius:999px;
  text-decoration:none;
  white-space:nowrap;
  transition:opacity .15s ease, transform .15s ease, background .15s ease;
}
.pill:hover{transform:translateY(-1px);}
.pill-dark{
  background:rgba(255,255,255,0.06);
  color:var(--ink);
  border:1px solid var(--line);
}
.pill-dark:hover{background:rgba(255,255,255,0.1);}
.pill-accent{
  background-color:var(--accent);
  color:var(--paper);
  font-weight:600;
}
.pill-accent:hover{animation:railActivePulse .5s ease;}

/* ---------------- CANVAS (page content wrapper) ---------------- */
.canvas{
  min-height:calc(100vh - 72px);
  max-width:1200px;
  margin:0 auto;
  padding:48px 40px 100px;
}

@media (max-width:760px){
  body{padding-left:0;padding-top:56px;}
  .rail{
    top:auto;
    bottom:0;
    left:0;
    right:0;
    width:auto;
    height:56px;
    flex-direction:row;
    padding:0 12px;
    border-radius:0;
    border:none;
    border-top:1px solid var(--line);
    box-shadow:none;
    backdrop-filter:none;
    -webkit-backdrop-filter:none;
    background:var(--paper);
  }
  .rail:hover{width:auto;}
  .rail-mark-link{display:none;}
  .rail-nav{flex-direction:row;flex:1;justify-content:center;gap:4px;}
  .rail-link{width:44px;justify-content:center;padding-left:0;}
  .rail-label{display:none;}
  .rail-projects{display:none;}
  .rail-avatar{display:none;}
  .topbar{padding:0 16px;height:56px;}
  .topbar-sub{display:none;}
  .pill-dark{display:none;}
  .canvas{padding:32px 20px 90px;}
}
