/* ============================================================
   Chirpy-Pelican Theme  —  style.css
   ============================================================ */

/* ── CSS Custom Properties ─────────────────────────────────── */
:root {
  --sidebar-width: 260px;
  --topbar-height: 56px;

  /* Light theme */
  --bg:          #f8f9fa;
  --surface:     #ffffff;
  --sidebar-bg:  #1e293b;
  --sidebar-fg:  #cbd5e1;
  --sidebar-link:#94a3b8;
  --sidebar-active: #ffffff;
  --sidebar-active-bg: rgba(255,255,255,.1);
  --sidebar-accent: #4f9cf9;

  --text:        #212529;
  --text-muted:  #6c757d;
  --border:      #dee2e6;
  --pinned:      #E53935;
  --link:        #4f9cf9;
  --link-hover:  #2563eb;
  --tag-bg:      #e9ecef;
  --tag-fg:      #495057;
  --code-bg:     #f1f3f5;
  --shadow:      0 2px 8px rgba(0,0,0,.08);
  --radius:      8px;
}

[data-mode="dark"] {
  --bg:          #26292c;
  --surface:     #1c1e21;
  --sidebar-bg:  #1e1e1e;
  --sidebar-fg:  #94a3b8;
  --sidebar-link:#64748b;
  --sidebar-active: #e2e8f0;
  --sidebar-active-bg: rgba(255,255,255,.08);

  --text:        #f3f4f6;
  --text-muted:  #b8bdbf;
  --border:      rgba(0, 0, 0, 0.175);
  --pinned:      #E53935;
  --link:        #60a5fa;
  --link-hover:  #93c5fd;
  --tag-bg:      #1e293b;
  --tag-fg:      #94a3b8;
  --code-bg:     #1f2937;
  --shadow:      0 2px 8px rgba(0,0,0,.3);
}

/* ── Reset & Base ──────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: 'Source Sans 3', -apple-system, BlinkMacSystemFont, sans-serif;
  font-size: 1rem;
  line-height: 1.7;
  color: var(--text);
  background: var(--bg);
  display: flex;
  min-height: 100vh;
  transition: background .25s, color .25s;
}

a { color: var(--link); text-decoration: none; }
a:hover { color: var(--link-hover); text-decoration: underline; }

img { max-width: 100%; height: auto; }

/* ── Sidebar ───────────────────────────────────────────────── */
#sidebar {
  position: fixed;
  top: 0;
  left: 0;
  width: var(--sidebar-width);
  height: 100%;
  background: var(--sidebar-bg);
  color: var(--sidebar-fg);
  overflow-y: auto;
  z-index: 100;
  transition: transform .3s ease;
  display: flex;
  flex-direction: column;
}

.sidebar-inner {
  display: flex;
  flex-direction: column;
  height: 100%;
  padding: 1.5rem 1rem;
}

/* Branding */
.site-brand {
  text-align: center;
  padding-bottom: 1.5rem;
  border-bottom: 1px solid rgba(255,255,255,.08);
  margin-bottom: 1rem;
}

.site-brand .avatar {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  border: 3px solid var(--sidebar-accent);
  margin-bottom: .75rem;
  display: block;
  margin-inline: auto;
}

.site-title {
  font-size: 1.15rem;
  font-weight: 600;
  margin: 0 0 .25rem;
  letter-spacing: .02em;
}

.site-title a { color: #fff; text-decoration: none; }
.site-title a:hover { color: var(--sidebar-accent); }

.site-subtitle {
  font-size: .8rem;
  color: var(--sidebar-link);
  margin: 0;
  line-height: 1.4;
}

/* Nav */
.sidebar-nav ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

.sidebar-nav .nav-item { margin: .15rem 0; }

.sidebar-nav .nav-link {
  display: flex;
  align-items: center;
  gap: .65rem;
  padding: .5rem .75rem;
  border-radius: var(--radius);
  color: var(--sidebar-link);
  font-size: .9rem;
  font-weight: 800;
  text-decoration: none;
  transition: background .2s, color .2s;
  text-transform: uppercase;
}

.sidebar-nav .nav-link:hover,
.sidebar-nav .nav-link.active {
  background: var(--sidebar-active-bg);
  color: var(--sidebar-active);
  text-decoration: none;
}

.sidebar-nav .nav-link.active {
  color: var(--sidebar-accent);
  font-weight: 900;
}

.sidebar-nav .nav-link i { width: 1.1em; text-align: center; }

/* Social icons */
.sidebar-social {
  display: flex;
  gap: .5rem;
  justify-content: center;
  margin-top: auto;
  padding-top: 1.5rem;
  flex-wrap: wrap;
}

.social-icon {
  color: var(--sidebar-link);
  font-size: 1.1rem;
  width: 2rem;
  height: 2rem;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  transition: color .2s, background .2s;
}

.social-icon:hover {
  color: var(--sidebar-accent);
  background: rgba(255,255,255,.06);
  text-decoration: none;
}

/* Footer */
.sidebar-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 1rem;
  border-top: 1px solid rgba(255,255,255,.08);
  margin-top: 1rem;
}

.copyright {
  font-size: .72rem;
  color: var(--sidebar-link);
  margin: 0;
}

/* Dark mode toggle (sidebar) */
#mode-toggle, #mode-toggle-top {
  background: transparent;
  border: 1px solid rgba(255,255,255,.15);
  color: var(--sidebar-link);
  border-radius: 50%;
  width: 2rem;
  height: 2rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: .85rem;
  transition: color .2s, border-color .2s;
}

#mode-toggle:hover { color: var(--sidebar-accent); border-color: var(--sidebar-accent); }
#mode-toggle-top { border-color: var(--border); color: var(--text-muted); }
#mode-toggle-top:hover { color: var(--link); border-color: var(--link); }

/* ── Main wrapper ──────────────────────────────────────────── */
#main-wrapper {
  margin-left: var(--sidebar-width);
  flex: 1;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  min-width: 0;
}

/* ── Topbar ────────────────────────────────────────────────── */
#topbar {
  top: 0;
  z-index: 50;
  height: var(--topbar-height);

}

.topbar-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 100%;
  padding: 0 1.5rem;
  max-width: 1125px;
  margin: 0 auto;
  width: 100%;
}

/* Breadcrumb */
.breadcrumb { display: flex; flex-wrap: wrap; gap: .3rem; list-style: none; margin: 0; padding: 0; }
.breadcrumb li { display: flex; align-items: center; font-size: .85rem; color: var(--text-muted); }
.breadcrumb li:not(:last-child)::after { content: '›'; margin-left: .3rem; color: var(--text-muted); }
.breadcrumb a { color: var(--text-muted); }
.breadcrumb a:hover { color: var(--link); text-decoration: none; }
.breadcrumb-nav .breadcrumb li { list-style: none; }

/* ── Content area ──────────────────────────────────────────── */
#content {
  flex: 1;
  padding: 2rem 1.5rem;
  max-width: 1125px;
  margin: 0 auto;
  width: 100%;
}

/* ── Page wrapper ──────────────────────────────────────────── */
.page-wrapper { width: 100%; }

/* Two-column layout used on list pages (index, archives, categories, tags) */
.page-wrapper.with-right-sidebar {
  display: grid;
  grid-template-columns: 1fr;
  grid-template-areas: "main" "sidebar";
  gap: 1.5rem;
  align-items: start;
}
 
.page-wrapper.with-right-sidebar .main-col {
  grid-area: main;
  min-width: 0;
}
 
@media (min-width: 1200px) {
  .page-wrapper.with-right-sidebar {
    grid-template-columns: 1fr 220px;
    grid-template-areas: "main sidebar";
  }
}
 

.page-heading {
  font-size: 1.6rem;
  font-weight: 700;
  margin: 0 0 1.5rem;
  color: var(--text);
  display: flex;
  align-items: center;
  gap: .5rem;
}

.page-heading i { color: var(--link); }

.page-subheading {
  color: var(--text-muted);
  font-size: .9rem;
  margin: -.75rem 0 1.5rem;
}

/* ── Recently Updated widget ───────────────────────────────── */
.recently-updated-panel {
  grid-area: sidebar;
  background: var(--bg);
  padding: 1rem 1.25rem;
  font-size: .85rem;
  /* hidden on small screens, shown at 1200px via grid */
  display: none;
}
 
@media (min-width: 1200px) {
  .recently-updated-panel {
    display: block;
    position: sticky;
    top: calc(var(--topbar-height) + 1rem);
    max-height: calc(100vh - var(--topbar-height) - 2rem);
    overflow-y: auto;
  }
}
 
.widget-title {
  font-size: .85rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .05em;
  color: var(--text-muted);
  margin: 0 0 .85rem;
  display: flex;
  align-items: center;
  gap: .4rem;
}
 
.recently-updated-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0;
  
}
 
.recently-updated-list li {
  padding: .5rem 0;
}
 
.recently-updated-list li:last-child { border-bottom: none; }
 
.recently-updated-list a {
  color: var(--text-muted);
  text-decoration: none;
  line-height: 1.4;
  display: block;
  padding-left: .5rem;
  border-left: 2px solid transparent;
  transition: color .15s, border-color .15s;
}
 
.recently-updated-list a:hover {
  color: var(--link);
  border-left-color: var(--link);
  text-decoration: none;
}

/* ── Post preview cards ────────────────────────────────────── */
#post-list { display: flex; flex-direction: column; gap: 0; }

.post-preview {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  margin-bottom: 1.25rem;
  transition: box-shadow .2s, border-color .2s;
  position: relative;
  cursor: hand;
  display: flex;
}

.post-preview-body{
  padding: 1.5rem;
}

.preview-img {
  aspect-ratio: 55 / 20;
  width: 100%;
  height: 100%;
  overflow: hidden;
}
.preview-img img{
  height: 100%;
  -o-object-fit: cover;
  object-fit: cover;
}

.post-preview:hover {
  box-shadow: var(--shadow);
  border-color: var(--link);
}

.post-pinned {
  border-color: var(--pinned);
}

/* makes the entire post preview card clickable */
.post-preview h2 a::after {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 1; 
}

.post-meta {
  display: flex;
  flex-wrap: wrap;
  gap: .75rem;
  font-size: .8rem;
  color: var(--text-muted);
  align-items: center;
}

.post-meta i { margin-right: .25rem; }
.post-meta a { color: var(--text-muted); }
.post-meta a:hover { color: var(--link); text-decoration: none; }

.post-title {
  font-size: 1.25rem;
  font-weight: 700;
  margin: 0 0 .5rem;
  line-height: 1.3;
}

.post-title a { color: var(--text); text-decoration: none; }
.post-title a:hover { color: var(--link); }

.post-summary {
  color: var(--text-muted);
  font-size: .9rem;
  margin: 0 0 .75rem;
  line-height: 1.6;
}

.post-preview-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: .5rem;
  margin-top: .75rem;
}

.read-more {
  font-size: .85rem;
  font-weight: 600;
  color: var(--link);
  display: flex;
  align-items: center;
  gap: .3rem;
}

.read-more:hover { text-decoration: none; color: var(--link-hover); }

/* Tags */
.post-tags, .post-tags-header, .post-tags-footer {
  display: flex;
  flex-wrap: wrap;
  gap: .35rem;
}

.tag {
  display: inline-block;
  padding: .15rem .55rem;
  border-radius: 20px;
  background: var(--tag-bg);
  color: var(--tag-fg);
  font-size: .75rem;
  font-weight: 500;
  text-decoration: none;
  transition: background .2s, color .2s;
}

.tag:hover { background: var(--link); color: #fff; text-decoration: none; }

/* ── Article page ──────────────────────────────────────────── */
.post-page {
  display: grid;
  grid-template-columns: 1fr;
  grid-template-areas: "article" "toc";
  gap: 1.5rem;
  align-items: start;
}

.post-article {
  grid-area: article;
  padding: 2rem 2.5rem;
  min-width: 0; /* prevent grid blowout */
}

.post-header { margin-bottom: 1.5rem; padding-bottom: 1.25rem; border-bottom: 1px solid var(--border); }

.post-header .post-title {
  font-size: 1.9rem;
  font-weight: 800;
  line-height: 1.2;
  margin: 0 0 .75rem;
}

.post-reading-time { font-size: .8rem; }

.post-tags-header { margin-top: .75rem; }

/* ── Table of Contents ─────────────────────────────────────── */
.toc-panel {
  grid-area: toc;
  background: var(--bg);
  padding: 1rem 1.25rem;
  font-size: .85rem;
  /* hidden on small screens; shown via grid on large */
  display: none;
}

.toc-title {
  font-size: .85rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .05em;
  color: var(--text-muted);
  margin: 0 0 .75rem;
  display: flex;
  align-items: center;
  gap: .4rem;
}

#toc-content ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

#toc-content li { margin: .25rem 0; }

#toc-content a {
  color: var(--text-muted);
  text-decoration: none;
  line-height: 1.4;
  display: block;
  padding: .1rem 0;
  border-left: 2px solid transparent;
  padding-left: .5rem;
  transition: color .15s, border-color .15s;
}

#toc-content a:hover,
#toc-content a.active {
  color: var(--link);
  border-left-color: var(--link);
}

#toc-content .toc-h3 { padding-left: 1.25rem; }
#toc-content .toc-h4 { padding-left: 2rem; }

/* ── Post content typography ───────────────────────────────── */
.post-content {
  color: var(--text);
  line-height: 1.8;
}

.post-content h2,
.post-content h3,
.post-content h4 {
  font-weight: 700;
  margin: 1.75em 0 .75em;
  scroll-margin-top: calc(var(--topbar-height) + 1rem);
}

.post-content h2 { font-size: 1.5rem; border-bottom: 1px solid var(--border); padding-bottom: .3em; }
.post-content h3 { font-size: 1.2rem; }
.post-content h4 { font-size: 1rem; }

.post-content p { margin: 0 0 1.1em; }

.post-content ul, .post-content ol {
  margin: 0 0 1em 1.5em;
  padding: 0;
}

.post-content li { margin: .3em 0; }

.post-content code {
  font-family: 'Source Code Pro', monospace;
  font-size: .875em;
  background: var(--code-bg);
  padding: .15em .4em;
  border-radius: 4px;
  color: var(--text);
}

.post-content pre {
  background: var(--code-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1rem 1.25rem;
  overflow-x: auto;
  margin: 0 0 1.25em;
  font-size: .875rem;
}

.post-content pre code {
  background: transparent;
  padding: 0;
  font-size: inherit;
}

.post-content blockquote {
  border-left: 4px solid var(--link);
  margin: 1em 0;
  padding: .75rem 1.25rem;
  background: var(--bg);
  border-radius: 0 var(--radius) var(--radius) 0;
  color: var(--text-muted);
}

.post-content table {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: 1.25em;
  font-size: .9rem;
}

.post-content th,
.post-content td {
  border: 1px solid var(--border);
  padding: .5rem .75rem;
  text-align: left;
}

.post-content th {
  background: var(--bg);
  font-weight: 600;
}

.post-content tr:nth-child(even) td { background: var(--bg); }

.post-content img {
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

/* ── Post footer ───────────────────────────────────────────── */
.post-footer {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-top: 2rem;
  padding-top: 1.25rem;
  border-top: 1px solid var(--border);
}

.post-share {
  display: flex;
  align-items: center;
  gap: .5rem;
  font-size: .85rem;
  color: var(--text-muted);
}

.post-share a {
  color: var(--text-muted);
  font-size: 1.1rem;
  transition: color .2s;
}

.post-share a:hover { color: var(--link); text-decoration: none; }

/* Prev / Next nav */
.post-nav {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  margin-top: 2rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--border);
}

.post-nav-item {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: .75rem 1rem;
  display: flex;
  flex-direction: column;
  gap: .25rem;
}

.post-nav-next { text-align: right; }

.nav-label {
  font-size: .75rem;
  text-transform: uppercase;
  letter-spacing: .05em;
  color: var(--text-muted);
  font-weight: 600;
}

.post-nav a {
  font-size: .9rem;
  font-weight: 600;
  color: var(--text);
  text-decoration: none;
}

.post-nav a:hover { color: var(--link); }

/* ── Archives ──────────────────────────────────────────────── */
.archive-year { margin-bottom: 2rem; }
.year-label {
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--text-muted);
  border-bottom: 1px solid var(--border);
  padding-bottom: .4rem;
  margin-bottom: 1rem;
}

.archive-list { list-style: none; margin: 0; padding: 0; }

.archive-item {
  display: flex;
  align-items: baseline;
  gap: .75rem;
  padding: .4rem 0;
  border-bottom: 1px dashed var(--border);
  font-size: .9rem;
}

.archive-item time {
  color: var(--text-muted);
  font-size: .8rem;
  min-width: 4.5rem;
  font-variant-numeric: tabular-nums;
}

.archive-item a { color: var(--text); font-weight: 500; }
.archive-item a:hover { color: var(--link); text-decoration: none; }

.archive-category {
  margin-left: auto;
  font-size: .75rem;
  color: var(--text-muted);
  background: var(--tag-bg);
  padding: .1rem .4rem;
  border-radius: 4px;
}

/* ── Categories list ───────────────────────────────────────── */
.categories-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: .5rem; }

.category-item a {
  display: flex;
  align-items: center;
  gap: .5rem;
  padding: .6rem .9rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--text);
  text-decoration: none;
  font-weight: 500;
  transition: border-color .2s, color .2s;
}

.category-item a:hover { border-color: var(--link); color: var(--link); }

.count {
  margin-left: auto;
  background: var(--tag-bg);
  color: var(--text-muted);
  font-size: .75rem;
  padding: .15rem .5rem;
  border-radius: 20px;
}

/* ── Tag cloud ─────────────────────────────────────────────── */
.tag-cloud {
  display: flex;
  flex-wrap: wrap;
  gap: .5rem;
  line-height: 1;
}

.tag-cloud-item[data-count="1"] { font-size: .8rem; }
.tag-cloud-item[data-count="2"] { font-size: .9rem; }
.tag-cloud-item[data-count="3"],
.tag-cloud-item[data-count="4"] { font-size: 1rem; }
.tag-cloud-item[data-count="5"],
.tag-cloud-item[data-count="6"] { font-size: 1.1rem; }

/* ── Pagination ────────────────────────────────────────────── */
.pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: .75rem;
  margin-top: 2rem;
}

.page-btn {
  display: flex;
  align-items: center;
  gap: .3rem;
  padding: .4rem .9rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--text);
  font-size: .85rem;
  font-weight: 500;
  text-decoration: none;
  transition: border-color .2s, color .2s;
}

.page-btn:hover { border-color: var(--link); color: var(--link); text-decoration: none; }
.page-count { font-size: .85rem; color: var(--text-muted); }

/* ── Footer ────────────────────────────────────────────────── */
#footer {
  text-align: center;
  padding: 1.5rem;
  font-size: .8rem;
  color: var(--text-muted);
  border-top: 1px solid var(--border);
}

/* ── Mobile sidebar overlay ────────────────────────────────── */
#sidebar-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.5);
  z-index: 90;
}

/* Mobile sidebar trigger */
#sidebar-trigger {
  display: none;
  position: fixed;
  top: .75rem;
  left: .75rem;
  z-index: 200;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  width: 2.4rem;
  height: 2.4rem;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 1rem;
  color: var(--text);
  box-shadow: var(--shadow);
}

/* ── Responsive ────────────────────────────────────────────── */
@media (max-width: 768px) {
  body{
    padding-top:env(safe-area-inset-top);
  }
  #sidebar {
    transform: translateX(-100%);
  }

  #sidebar.open {
    transform: translateX(0);
  }

  #sidebar-overlay.visible { display: block; }

  #sidebar-trigger { display: flex; }

  #main-wrapper { margin-left: 0;  }

  #topbar .topbar-inner { padding: .5rem 3.5rem 0 4.0rem; }

  #content { padding: 1.25rem 1rem; }

  .post-article { padding: 1.25rem; }

  .post-header .post-title { font-size: 1.4rem; }
  .post-preview {flex-direction: column;}

  .post-nav { grid-template-columns: 1fr; }
  .post-nav-next { text-align: left; }

  .preview-img{ max-height: 100px; aspect-ratio: unset;}
  .preview-img img{border-radius: var(--radius) var(--radius) 0 0;}

  .toc-panel { display: none; } /* hide ToC on mobile to keep it clean */
}

@media (min-width: 768px) {
  .col-md{flex:1 0 0}
  .row-cols-md-2>*{flex:0 0 auto;width:50%}
  .col-md-auto{flex:0 0 auto;width:auto}
  .col-md-1{flex:0 0 auto;width:8.33333333%}
  .col-md-2{flex:0 0 auto;width:16.66666667%}
  .col-md-3{flex:0 0 auto;width:25%}
  .col-md-4{flex:0 0 auto;width:33.33333333%}
  .col-md-5{flex:0 0 auto;width:41.66666667%}
  .col-md-6{flex:0 0 auto;width:50%}
  .col-md-7{flex:0 0 auto;width:58.33333333%}
  .col-md-8{flex:0 0 auto;width:66.66666667%}
  .col-md-9{flex:0 0 auto;width:75%}
  .col-md-10{flex:0 0 auto;width:83.33333333%}
  .col-md-11{flex:0 0 auto;width:91.66666667%}
  .col-md-12{flex:0 0 auto;width:100%}
  .flex-md-row-reverse {
      flex-direction: row-reverse !important;
  }
  .post-page {
    grid-template-columns: 1fr 220px;
    grid-template-areas: "article toc";
  }
  .preview-img-wrapper{
    text-align: right;
  }
  .preview-img img {
      border-radius: 0 var(--radius) var(--radius) 0;
  }

  .toc-panel {
    display: block;
    position: sticky;
    top: calc(var(--topbar-height) + 1rem);
    max-height: calc(100vh - var(--topbar-height) - 2rem);
    overflow-y: auto;
  }
}

/* ── Syntax highlight overrides ────────────────────────────── */
[data-mode="dark"] #hl-light { display: none; }
[data-mode="dark"] #hl-dark  { display: block; }

/* ── Scroll-to-top button ──────────────────────────────────── */
#back-to-top {
  position: fixed;
  bottom: 2rem;
  right: 1.5rem;
  width: 2.4rem;
  height: 2.4rem;
  border-radius: 50%;
  background: var(--link);
  color: #fff;
  border: none;
  cursor: pointer;
  display: none;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  box-shadow: 0 4px 12px rgba(0,0,0,.2);
  z-index: 60;
  transition: opacity .2s;
}

#back-to-top.visible { display: flex; }
#back-to-top:hover { opacity: .85; }