:root{
  --bg:#fbfaf7;
  --text: rgba(0,0,0,.82);
  --muted: rgba(0,0,0,.50);
  --line: rgba(0,0,0,.10);
  --accent: #e45656;
}

*{ box-sizing:border-box; }
html,body{ height:100%; }

body{
  margin:0;
  /* Your Fixed Gradient Background */
  background: linear-gradient(to bottom, #fbfaf7, #faf9f3 60%, #eae9e4 100%);
  background-attachment: fixed;
  background-size: cover;
  background-repeat: no-repeat;
  min-height: 100vh;
  color: var(--text);
  font: 13px/1.5 ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial;
}

/* --- PROGRESSIVE BLUR BORDER --- */
.blurBorder {
  position: fixed;
  inset: 0; 
  width: 100%;
  height: 100vh;
  z-index: 50; 
  pointer-events: none; /* Allows clicking through the blur */
  
  /* The Blur Effect */
  backdrop-filter: blur(6px); /* Increase to 12px for stronger fog */
  -webkit-backdrop-filter: blur(6px);
  
  /* The Mask: Controls WHERE the blur is applied */
  /* Black = Blur Visible | Transparent = Blur Invisible */
  mask-image: linear-gradient(
    to bottom, 
    black 0%, 
    transparent 120px, 
    transparent calc(100% - 120px), 
    black 100%
  );
  -webkit-mask-image: linear-gradient(
    to bottom, 
    black 0%, 
    transparent 120px, 
    transparent calc(100% - 120px), 
    black 100%
  );
}

/* --- SHARED DEFAULTS --- */
a, button { 
  color: inherit; 
  text-decoration: none; 
  transition: color 0.2s ease;
  background: none;
  border: none;
  padding: 0;
  margin: 0;
  font: inherit;
  cursor: pointer;
}

a:hover, button:hover { 
  color: var(--accent); 
}

/* --- LAYOUT --- */
.topbar{
  max-width: 700px;
  margin: 0 auto;
  padding: 26px 18px 18px;
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap: 18px;
  /* Optional: Add 'position: relative; z-index: 51;' here if you want 
     the header to sit ON TOP of the blur instead of under it. */
}

.topbarLeft{ display: grid; gap: 6px; }

.topbarRight{
  text-align:right;
  display:flex;
  flex-direction:column;
  gap: 6px;
  min-width: 160px;
}

.brandRow, .inlineSocials, .categoryNav, .feedHeader, .tumblrPager {
  display: flex;
  align-items: baseline;
}

/* --- HEADER ELEMENTS --- */
.brandName { 
  font-weight: 500; 
  letter-spacing: .01em; 
  color: var(--muted); 
}

.brandRow {
  flex-wrap: wrap; 
}

.brandLabel, .statusMsg, .feedKicker, .feedSource, .email, .inlineSocials, .catLabel, .catBtn {
  color: var(--muted);
}

.inlineSocials { gap: 8px; margin-left: 8px; }
.inlineSocials .divider { opacity: 0.3; }

.statusRow { 
  margin: 2px 0 8px; 
  color: var(--muted); 
}

.statusMsg { position: relative; white-space: nowrap; }
.statusMsg::after {
  content: "▍";
  margin-left: 2px;
  color: rgba(0,0,0,.28);
  animation: caretBlink 1s steps(1) infinite;
}

@keyframes caretBlink{ 50%{ opacity: 0; } }
@media (prefers-reduced-motion: reduce){ .statusMsg::after{ animation: none; } }

.categoryNav { gap: 12px; flex-wrap: wrap; }
.catLabel { font-style: italic; opacity: 0.7; }
.catBtn.active { color: var(--accent); }

.bpmLine { color: var(--accent); letter-spacing: .01em; }

/* --- FEED & CONTENT --- */
.wrap { max-width: 700px; margin: 0 auto; padding: 0 18px 60px; }

.feed { border-top: 1px solid transparent; }
.feedKicker { padding: 12px 0 8px; }
.feedHeader { justify-content: space-between; padding: 12px 0 14px; border-top: 1px solid rgba(0,0,0,.06); }
.feedTitle { font-weight: 400; color: rgba(0,0,0,.70); }

/* --- TUMBLR POSTS --- */
.tumblrFeed { display: flex; flex-direction: column; }
.tumblrPost { padding: 16px 0; }
.tumblrPost:first-child { padding-top: 6px; }

.tumblrHead { display: flex; flex-direction: column; align-items: flex-start; gap: 6px; }
.tumblrMeta { display: inline-flex; align-items: baseline; gap: 10px; }

.tumblrShareInline, .tumblrPostDate {
  font-size: 12px;
  opacity: 0;
  color: var(--muted); 
  transition: opacity .18s ease;
}
.tumblrPost:hover .tumblrShareInline, .tumblrPost:hover .tumblrPostDate { opacity: 1; }
.tumblrShareInline { text-decoration: underline; text-underline-offset: 3px; }

.tumblrBody { color: var(--muted); margin-top: 10px; line-height: 1.6; overflow-wrap: anywhere; }
.tumblrBody h1, .tumblrBody h2, .tumblrBody h3 { font-weight: 600; font-size: 13px; margin: 0 0 10px; }
.tumblrBody p { margin: 0 0 10px; }
.tumblrBody blockquote { margin: 10px 0; padding-left: 12px; border-left: 2px solid rgba(0,0,0,.12); opacity: .9; }
.tumblrBody a { text-decoration: underline; text-underline-offset: 3px; }

/* --- GLOBAL IMAGE FIX --- */
/* Forces images to fit width and removes Tumblr indentation on PC & Mobile */
.tumblrBody figure.tmblr-full,
.tumblrBody figure.tmblr-embed {
  width: 100% !important;
  margin: 12px 0 !important;
}

.tumblrBody figure img, 
.tumblrBody img { 
  display: block; 
  width: 100%; 
  height: auto; 
  border-radius: 14px; 
  margin: 12px 0; 
  cursor: zoom-in; 
}

.tumblrPhotoGrid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; margin: 12px 0; }

.tumblrSignoff { margin-top: 12px; text-align: center; color: rgba(0,0,0,.55); }
.tumblrSignoff a { color: var(--accent); text-decoration: underline; text-underline-offset: 3px; }

/* --- PAGER --- */
.tumblrPager { justify-content: space-between; gap: 12px; padding: 18px 0 4px; margin-top: 14px; border-top: 1px solid rgba(0,0,0,.08); }
.tumblrPager .spacer { flex: 1; }
.tumblrPager button { border: 1px solid rgba(0,0,0,.14); border-radius: 999px; padding: 8px 12px; opacity: .75; }
.tumblrPager button:hover { opacity: 1; }
.tumblrPager button[disabled] { opacity: 0; pointer-events: none; }

/* --- LIGHTBOX --- */
#imgLightbox { position: fixed; inset: 0; display: none; align-items: center; justify-content: center; z-index: 9999; background: rgba(0,0,0,.72); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); padding: 24px; }
#imgLightbox.open { display: flex; }
#imgLightbox .lbInner { max-width: min(1200px, 96vw); max-height: 92vh; display: grid; gap: 10px; justify-items: end; }
#imgLightbox img { max-width: min(1200px, 96vw); max-height: 88vh; border-radius: 14px; background: rgba(255,255,255,.04); }
#imgLightbox .lbClose { background: rgba(255,255,255,.14); color: rgba(255,255,255,.92); border-radius: 999px; padding: 8px 12px; }
#imgLightbox .lbClose:hover { background: rgba(255,255,255,.20); }

/* --- GOODREADS --- */
.goodreads { margin-top: 6px; }
.goodreadsWidget { margin-top: 10px; }
.goodreadsWidget .gr_grid_container { width: 100% !important; }
.goodreadsWidget .gr_grid_book_container { display: inline-block !important; width: 39px !important; height: 60px !important; margin: 0 10px 10px 0 !important; padding: 0 !important; float: none !important; }
.goodreadsWidget .gr_grid_book_container img { width: 39px !important; height: 60px !important; object-fit: cover; border-radius: 6px; display: block; }

/* --- MOBILE --- */
@media (max-width: 640px){ 
  .tumblrPhotoGrid { grid-template-columns: 1fr; } 
}

@media (max-width: 520px){ 
  .topbar { 
    padding: 18px 10px 0;
  }
  
  .wrap {
    padding-left: 10px;
    padding-right: 10px;
  }

  .topbarRight { min-width: auto; }
    
  .categoryNav { gap: 14px; margin-top: 8px; }
}
