/* Homepage */
.social-icons .icon-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.25rem;
  height: 1.25rem;
}

.social-icons .icon-link:not(:last-child) {
  margin-right: 0.5rem;
}

.social-icons .icon-link i {
  display: inline-block;
  width: 1rem;
  height: 1rem;
  line-height: 1;
}

.home-active {
  font-weight: bold !important;
}

.sticky-sidebar {
  position: sticky;
  top: 3rem;
  z-index: 1000;
}

.avatar {
  width: 128px;
  height: 128px;
  object-fit: cover;
  flex-shrink: 0;
}

.post-content img {
  display: none !important;
}

video {
  max-width: 100% !important;
  height: auto !important;
}

.single-post-content video {
  max-width: 100% !important;
  height: auto !important;
}

.single-post-content img {
  width: 100% !important;
  height: 100% !important;
  margin-bottom: 0.5rem;
}

.mb-2.d-flex.flex-wrap>h4:not(:last-child) {
  margin-right: 0.5rem;
}

.mb-2.d-flex.flex-wrap>h1:not(:last-child) {
  margin-right: 0.5rem;
}

@media (min-width: 1200px) {
  .post-list {
    max-width: 75%;
    margin-left: auto;
    margin-right: auto;
  }
}

.btn-xs {
  padding: 0.05rem 0.35rem !important;
}

/* custom SVG icon handling */
.icon-svg {
  width: 1.35em; 
  height: 1.35em;
  fill: currentColor;
  vertical-align: middle; 
  position: relative;
  top: -0.1em; 
}

.post-meta-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.post-meta-container .u-url {
  margin-right: auto; /* Pushes the first item to the left */
}

/* links */
.no-under {
  text-decoration: none;
  text-decoration-line: none !important;
  text-underline-offset: unset;
}

.no-under:hover {
  text-decoration: none;
  text-decoration-line: none !important;
  text-underline-offset: unset;
}

/* search */
.search-result:hover {
  text-decoration-line: underline;
  text-decoration-style: solid;
  text-underline-offset: 0.2rem;
}

a {
  text-decoration-line: underline;
  text-decoration-style: solid !important;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.2rem !important;
}

a:hover {
  filter: brightness(0.75);
}


/* timeline */
@mixin tablet-and-up {
  @media screen and (min-width: 769px) {
    @content;
  }
}

@mixin mobile-and-up {
  @media screen and (min-width: 601px) {
    @content;
  }
}

@mixin tablet-and-down {
  @media screen and (max-width: 768px) {
    @content;
  }
}

@mixin mobile-only {
  @media screen and (max-width: 600px) {
    @content;
  }
}

.sessions {
  border-radius: 12px;
  position: relative;
}

li.timeline-line {
  padding-bottom: 1.5rem;
  border-left: 1px solid #24465a;
  position: relative;
  padding-left: 20px;
  margin-left: 10px;

  &:last-child {
    border: 0px;
    padding-bottom: 0;
  }

  &:before {
    content: '';
    width: 15px;
    height: 15px;
    background: white;
    border: 1px solid #24465a;
    box-shadow: 3px 3px 0px #24465a;
    box-shadow: 3px 3px 0px #24465a;
    border-radius: 50%;
    position: absolute;
    left: -10px;
    top: 0px;
  }
}

.time {
  font-weight: 500;

  @include mobile-and-up {
    font-size: .9rem;
  }

  @include mobile-only {
    margin-bottom: .3rem;
    font-size: 0.85rem;
  }

}

p.timeline-text {
  line-height: 1.5;
  margin-top: 0.4rem;

  @include mobile-only {
    font-size: .9rem;
  }
}

blockquote {
  margin-bottom: 1rem;
  font-size: 1.25rem;
  border-left: 3px solid;
}

blockquote p {
  margin-left: 0.5rem;
}

/* lightbox */
#lightbox {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.7);
  z-index: 9999;
}

.lightbox-container {
  display: flex;
  justify-content: space-evenly;
  align-items: center;
  height: 100%;
  width: 100%;
}

.lightbox-container img {
  max-width: 90%;
  max-height: 90%;
}

.lightbox-container img:hover {
  cursor: pointer;
}

.grid-item {
  width: 48%;
  margin-bottom: 10px;
}

/* permalink page */
@media (min-width: 1200px) {
  .perma {
    max-width: 75%;
    margin-left: auto;
    margin-right: auto;
  }

  .microblog_conversation {
    max-width: 75%;
    margin-left: auto;
    margin-right: auto;
  }
}

.microblog_conversation {
  position: relative;
  display: flex;
  flex-direction: column;
  min-width: 0;
  word-wrap: break-word;
  background-color: #fff;
  background-clip: border-box;
  border: 1px solid rgba(0, 0, 0, 0.125);
  border-radius: 0.25rem;
  padding: 1.25rem;
  margin-bottom: 3rem;
}

@media (prefers-color-scheme: dark) {
  .microblog_conversation {
    background-color: rgb(50, 53, 66);
  }
}

.microblog_conversation>*:not(:first-child) {
  margin-top: 1rem;
  border-top: 1px solid rgba(0, 0, 0, 0.1);
  padding-top: 1rem;
}

.microblog_user {
  display: flex;
  align-items: center;
}

.microblog_avatar {
  border-radius: 50%;
  margin-right: 0.5rem;
}

.microblog_text {
  padding-top: 0.5rem;
  padding-bottom: 0.5rem;
}

.microblog_text p {
  margin-bottom: 0 !important;
}

.microblog_reply_textarea textarea {
  width: 100%;
}

.microblog_reply_button {
  margin-bottom: 0 !important;
}

.microblog_reply_button input {
  display: inline-block;
  font-weight: 400;
  color: #fff;
  background-color: #3b3b3b;
  border-color: #3b3b3b;
  text-align: center;
  vertical-align: middle;
  user-select: none;
  border: 1px solid transparent;
  padding: 0.375rem 0.75rem;
  font-size: 1rem;
  line-height: 1.5;
  border-radius: 0;
  transition: color 0.15s ease-in-out, background-color 0.15s ease-in-out, border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out;
}

.microblog_reply_button input:hover {
  color: #fff;
  background-color: #282828;
  border-color: #222222;
}

.carousel-item {
  height: 10rem;
  background-color: grey;
}

.album-info {
  display: flex;
  align-items: center;
}

.album-art {
  max-width: 100px;
  height: auto;
  /* margin-right: 10px; */
}

.book-art {
  max-width: 100px;
  min-width: 100px;
  height: 100px;
  object-fit: cover;
  object-position: top;
}

.spinner-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  display: flex;
  justify-content: center;
  align-items: center;
  background-color: rgba(255, 255, 255, 0.8);
  z-index: 1;
}

@media (prefers-color-scheme: dark) {
  .spinner-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    background-color: rgba(50, 53, 66, 0.8);
    z-index: 1;
  }
}

.spinner {
  width: 40px;
  height: 40px;
  border: 4px solid rgba(0, 0, 0, 0.1);
  border-radius: 50%;
  border-top-color: grey;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  0% {
    transform: rotate(0deg);
  }

  100% {
    transform: rotate(360deg);
  }
}

.card-img {
  height: 9rem;
  object-fit: cover;
}

.card-img-overlay {
  display: flex;
  justify-content: center;
  background-color: rgba(255, 255, 255, 0.6);
}

@media (prefers-color-scheme: dark) {
  .card-img-overlay {
    display: flex;
    background-color: rgba(50, 53, 66, 0.7);
  }
}

.card-img-album-info {
  align-self: center;
}

.archive_categories .d-flex.flex-wrap, .archive_years .d-flex.flex-wrap {
  row-gap: 0.75rem; 
  column-gap: 0.75rem;
}

.single-categories .d-flex.flex-wrap {
  row-gap: 0.25rem; 
  column-gap: 0.25rem;
}

/* bookshelf plugin helpers */
ul.bookshelf.bookshelf--variant-grid {
  display: flex !important;
  flex-wrap: wrap !important;
  gap: 1rem !important;
  justify-content: stretch !important;
  width: 100% !important;
  padding: 0 !important;
  margin: 0 !important;
  list-style: none !important;
}

ul.bookshelf.bookshelf--variant-grid > li {
  flex: 1 1 8rem !important;
  max-width: 12rem !important;
  min-width: 5rem !important;
  box-sizing: border-box !important;
  margin: 0 !important;
}

.bookshelf--variant-grid .bookshelf__item {
  flex: 1 1 8rem !important; 
  max-width: 12rem !important; 
  min-width: 5rem !important;  
  box-sizing: border-box !important;
  margin: 0 !important;
}

.bookshelf--variant-grid .bookshelf__cover {
  width: 100% !important;
  aspect-ratio: 4/6 !important;
  object-fit: cover !important;
}

.bookshelf--variant-list .bookshelf__item {
  align-items: center;
}

.bookshelf--variant-list .bookshelf__meta {
  margin-left: 0.5rem;
}

.card {
  container-type: inline-size;
}

.post-image {
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  max-height: 66.67cqw;
}

.post-image > img {
  width: auto !important;
  height: auto !important;
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
}

.post-image--portrait {
  aspect-ratio: 3 / 2;
  max-height: none;
  background-color: var(--ef-bg-elev);
  vertical-align: middle;
}

p > span.post-image--portrait:only-child {
  display: flex;
}

p:has(> span.post-image--portrait:only-child) {
  margin: 0;
}

/* ---- Everforest theme ---- */
:root { color-scheme: light dark; }

body, h1, h2, h3, h4, h5, h6, p, li, a, blockquote, .card, .card-title, .card-body {
  font-family: "Vollkorn", Georgia, "Times New Roman", serif !important;
}

.single-post-content h2, .single-post-content h3, .single-post-content h4, .single-post-content h5, .single-post-content h6,
.post-content h2, .post-content h3, .post-content h4, .post-content h5, .post-content h6 {
  margin-top: 2em;
}

code, pre, kbd, samp {
  font-family: "IBM Plex Mono", ui-monospace, SFMono-Regular, Menlo, monospace !important;
}

:root {
  --ef-bg: #FDF6E3;
  --ef-bg-card: #FFFBEF;
  --ef-bg-elev: #F4F0D9;
  --ef-fg: #1B2418;
  --ef-fg-dim: #5C6A50;
  --ef-border: #BDC3AF;
  --ef-link: #586800;
  --ef-aqua: #35A77C;
  --ef-red: #F85552;
}

@media (prefers-color-scheme: dark) {
  :root {
    --ef-bg: #2D353B;
    --ef-bg-card: #343F44;
    --ef-bg-elev: #3D484D;
    --ef-fg: #F8F2DF;
    --ef-fg-dim: #CDC2A8;
    --ef-border: #475258;
    --ef-link: #A7C080;
    --ef-aqua: #83C092;
    --ef-red: #E67E80;
  }
}

body {
  background-color: var(--ef-bg) !important;
  color: var(--ef-fg) !important;
}

a {
  color: var(--ef-link) !important;
}

nav a,
.card-title a {
  color: var(--ef-fg) !important;
}

.card.perma {
  margin-bottom: 4rem;
}


@media (prefers-color-scheme: dark) {
  img.light-bg {
    background-color: #FDF6E3;
    padding: 0.5rem;
    border-radius: 4px;
  }
}

.card {
  background-color: var(--ef-bg-card) !important;
  border-color: var(--ef-border) !important;
  color: var(--ef-fg) !important;
}

.text-muted {
  color: var(--ef-fg-dim) !important;
}

.microblog_conversation {
  background-color: var(--ef-bg-card) !important;
  border-color: var(--ef-border) !important;
  color: var(--ef-fg) !important;
}

@media (prefers-color-scheme: dark) {
  .microblog_conversation {
    background-color: var(--ef-bg-card) !important;
  }
}

code, pre, kbd, samp {
  background-color: var(--ef-bg-elev) !important;
  color: var(--ef-fg) !important;
  border-radius: 3px;
  padding: 0.05em 0.3em;
}

pre {
  padding: 0.75rem 1rem;
}

pre code {
  padding: 0;
  background: transparent !important;
}

blockquote {
  border-left: 3px solid var(--ef-aqua);
  padding-left: 1rem;
  color: var(--ef-fg-dim);
}

hr {
  border-top: 1px solid var(--ef-border);
}

.btn-primary,
.btn-primary:focus {
  color: var(--ef-bg-card) !important;
  background-color: var(--ef-link) !important;
  border-color: var(--ef-link) !important;
}

.btn-primary:hover {
  color: var(--ef-bg-card) !important;
  background-color: #3F4A00 !important;
  border-color: #3F4A00 !important;
  filter: none;
}

@media (prefers-color-scheme: dark) {
  .btn-primary,
  .btn-primary:focus {
    color: var(--ef-bg) !important;
    background-color: var(--ef-link) !important;
    border-color: var(--ef-link) !important;
  }
  .btn-primary:hover {
    color: var(--ef-bg) !important;
    background-color: #B5CD96 !important;
    border-color: #B5CD96 !important;
  }
}