/* Link Visited Color Fix - Keep all links blue matching site link color */
a:visited,
header nav a:visited,
footer a:visited,
#theme-toggle:visited,
#pet-toggle:visited {
  color: var(--link, #56c8ff);
}


/* Footer Blue Link Color */
.footer-blue-link,
.footer-blue-link:visited {
  color: var(--link, #56c8ff) !important;
  text-decoration: none;
}

.footer-blue-link:hover {
  text-decoration: underline;
}

.footer-day-text {
  transition: color 0.3s ease;
  border-bottom: none !important;
}

/* Layout & Container Adjustments */
@media screen and (max-width: 900px) {
  body {
    width: 100%;
    max-width: 100%;
    padding-left: 16px;
    padding-right: 16px;
    padding-top: 12px;
    margin: 0 auto;
    overflow-x: hidden;
    box-sizing: border-box;
  }
}

/* Header & Navigation Centering */
header nav {
  text-align: center;
}

@media screen and (max-width: 768px) {
  header {
    padding-bottom: 12px;
    margin-bottom: 20px;
  }

  header .name {
    font-size: 1.1rem;
  }

  header nav {
    margin-top: 12px;
    font-size: 0.98rem;
    line-height: 2.2;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    text-align: center;
  }

  header nav a {
    display: inline-block;
    padding: 2px 4px;
  }

  header nav span {
    margin: 0 4px;
    display: inline-block;
  }
}

/* GitHub Profile & Touch-Scrollable Heatmap */
.github-heatmap {
  max-width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  padding-bottom: 10px;
  overscroll-behavior-x: contain;
  scrollbar-width: thin;
  scrollbar-color: var(--dim) transparent;
  justify-content: center;
}

/* Custom Scrollbar for Heatmap */
.github-heatmap::-webkit-scrollbar {
  height: 6px;
}

.github-heatmap::-webkit-scrollbar-track {
  background: rgba(255, 255, 255, 0.05);
  border-radius: 3px;
}

.github-heatmap::-webkit-scrollbar-thumb {
  background: var(--dim);
  border-radius: 3px;
}

.heatmap-wrapper {
  flex-shrink: 0;
}

.day-labels {
  flex-shrink: 0;
}

/* Buggies Section Centering */
#page-buggies .label {
  text-align: center;
}

.github-header {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 12px;
}

.github-stats {
  justify-content: center;
}

@media screen and (max-width: 540px) {
  .github-card {
    margin-top: 16px;
  }
}

/* NOW Section Label Centering & Player Layout */
#page-now .label {
  text-align: center;
}

.now-spotify-embed {
  margin: 18px 0 22px;
  max-width: 460px;
  width: 100%;
}

.now-spotify-embed iframe {
  width: 100%;
  height: 352px;
  border-radius: 12px;
  display: block;
}

@media screen and (max-width: 520px) {
  .now-spotify-embed {
    max-width: 100%;
    margin: 14px auto 16px;
  }

  .now-spotify-embed iframe {
    height: 152px;
  }

  .now-line {
    flex-direction: column;
    gap: 2px;
    padding: 8px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  }

  .now-key {
    min-width: auto;
    font-weight: 600;
  }
}

/* Writing / Essays Centering & Responsiveness */
#page-writes .label {
  text-align: center;
}

#page-writes summary {
  text-align: center;
}

#page-writes .entry-content {
  text-align: justify;
  text-justify: inter-word;
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
}

.writes-avatar {
  max-width: 100%;
  width: auto;
  height: auto;
  min-height: 80px;
  object-fit: cover;
  margin: 8px auto 24px;
}

@media screen and (max-width: 520px) {
  .entry {
    padding: 10px 0;
  }

  .entry-title {
    font-size: 0.95rem;
    line-height: 1.4;
  }

  .entry-content {
    font-size: 0.9rem;
    line-height: 1.65;
  }
}

/* Notes Section Centering & Mobile Table */
#page-notes .label {
  text-align: center;
}

.notes-table {
  margin: 0 auto;
}

.notes-table th,
.notes-table td {
  text-align: center;
}

@media screen and (max-width: 600px) {
  #page-notes {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }

  .notes-table {
    width: 100%;
    min-width: 480px;
  }
}

/* Pins Section Layout & Label Centering */
#page-pins .label {
  text-align: center;
}

.pins-gallery {
  column-count: 3;
  column-gap: 20px;
}

.pins-item {
  break-inside: avoid;
  margin-bottom: 20px;
}

/* Reading Section - 3 Columns Grid & Centering */
#page-reads.active {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px 20px;
}

#page-reads.active .label {
  grid-column: 1 / -1;
  margin-bottom: 12px;
  width: 100%;
  text-align: center;
}

.book-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 8px 0;
}

@media screen and (max-width: 700px) {
  #page-reads.active {
    grid-template-columns: repeat(2, 1fr);
    gap: 12px 16px;
  }
}

@media screen and (max-width: 480px) {
  #page-reads.active {
    grid-template-columns: repeat(2, 1fr);
    gap: 10px 12px;
  }

  .book-cover {
    width: 60px;
    height: 60px;
  }

  .book-title {
    font-size: 0.85rem;
  }

  .book-author,
  .book-status {
    font-size: 0.75rem;
  }
}

/* Commonplace & Quotes Grid (4 Columns & Unlimited Rows) */
#page-quotes .label {
  text-align: center;
  margin-bottom: 20px;
}

.quote-gallery {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  justify-items: center;
  align-items: center;
}

.quote-block {
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 0;
  border-bottom: none;
  width: 100%;
}

.quote-block img {
  width: 100% !important;
  max-width: 180px !important;
  height: auto !important;
  max-height: 140px !important;
  object-fit: cover !important;
  border-radius: 4px;
  margin-bottom: 0 !important;
  cursor: zoom-in;
  transition:
    transform 0.2s ease,
    opacity 0.2s ease;
}

.quote-block img:hover {
  transform: scale(1.03);
  opacity: 0.95;
}

/* Quote Image Zoom Overlay / Lightbox */
.quote-modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(0, 0, 0, 0.88);
  backdrop-filter: blur(6px);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 9999;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease;
  cursor: pointer;
}

.quote-modal-overlay.active {
  opacity: 1;
  pointer-events: auto;
}

.quote-modal-img {
  max-width: 90vw;
  max-height: 85vh;
  object-fit: contain;
  border-radius: 8px;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.6);
  transform: scale(0.9);
  transition: transform 0.25s ease;
}

.quote-modal-overlay.active .quote-modal-img {
  transform: scale(1);
}

@media screen and (max-width: 700px) {
  .quote-gallery {
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
  }
}

/* Blog Section Justified Alignment & Narrow Centered Layout */
#page-blog {
  text-align: justify;
}

#page-blog .label {
  text-align: center;
}

#page-blog > a {
  display: block;
  text-align: center;
}

.blog-text {
  max-width: 540px;
  margin: 0 auto;
  text-align: justify;
  text-justify: inter-word;
}

.blog-avatar {
  margin: 8px auto 24px;
}

/* About / ME Section Justified Alignment */
#page-ME {
  text-align: justify;
}

#page-ME .label {
  text-align: center;
}

.ME-text {
  max-width: 860px;
  margin: 0 auto;
  text-align: justify;
  text-justify: inter-word;
}

#page-ME p:last-child {
  text-align: center;
}

.ME-avatar {
  margin: 8px auto 16px;
}

/* Connect Page Centering */
#page-connect {
  text-align: center;
}

#page-connect .label {
  text-align: center;
}

.connect-links {
  text-align: center;
  line-height: 2.2;
  word-wrap: break-word;
}

/* About & ME Avatar & Text Responsiveness */
@media screen and (max-width: 480px) {
  .ME-avatar,
  .blog-avatar {
    width: 88px;
    height: 88px;
  }

  .blog-text {
    font-size: 0.9rem;
    line-height: 1.6;
    word-break: break-word;
  }
}

/* Footer Layout & Bottom Padding */
footer {
  padding-bottom: 18px;
}

@media screen and (max-width: 768px) {
  footer {
    font-size: 0.98rem;
    flex-direction: column;
    gap: 8px;
    align-items: center;
    text-align: center;
  }

  footer span {
    text-align: center;
  }
}

/* Subscription Box Responsiveness */
@media screen and (max-width: 520px) {
  .subscribe-section {
    margin: 20px auto 0;
  }

  .subscribe-input {
    width: 100%;
    text-align: center;
  }

  .subscribe-btn {
    width: auto;
    text-align: center;
  }
}



