body {
  background-color: #c4c4c4;
  color:#494949;
  font-family:Arial, Helvetica, sans-serif;
  height:97vh;
  display: flex;
  justify-content: center; /* horizontal center */
  align-items: center;     /* vertical center */
}

aside {
  position: fixed;
  top: 50%;
  left: 0;
  transform: translateY(-50%);
  height: auto; /* height based on content */
  padding: 20px;
  box-sizing: border-box;
  width:150px;
}

main {
  width:350px;
}

h1 {
  margin:0;
  position:sticky;
}

p {
  margin:0;
}

a {
  color: #494949;
  text-decoration: none;
  display: inline-block;
  margin: 0;
  position: relative; /* needed for absolute positioning of ::before */
  overflow: hidden; /* hides background overflow */
  transition: color 0.2s ease-in-out;
  z-index: 1;
}

/* Base sliding background setup */
a::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  height: 100%;
  width: 0;
  z-index: -1; /* sit behind text */
  transition: width 0.3s ease-in-out;
}

/* Hover states */
.home::before {
  background-color: #f1a2a2;
}
.blog::before {
  background-color: #f1d7a2;
}
.gallery::before {
  background-color: #7dcd8a;
}
.links::before {
  background-color: #a2c0f1;
}
.etc::before {
  background-color: #ce9fd0;
}

a:hover::before {
  width: 100%;
}

a:hover {
  color: white;
}

.content {
  display: none;
}
.content:target {
  display: block;
}
/* Show home section if nothing is targeted */
body:not(:has(:target)) #home {
  display: block;
}

#blog {
  max-height: 100vh;       /* limit total height of blog section */
  overflow-y: auto;        /* scroll the whole blog container */
  padding-right: 10px;
  position: relative;      /* for sticky positioning context */
}

h1 {
  position: sticky;
  top: 0;
  background-color:#c4c4c4;
  z-index: 10;
}

h2 {
  margin:0;
}

.date {
  opacity:0.5;
  font-size:15px;
}

hr {
  border: none;          /* remove default border */
  height: 1px;           /* thin line */
  background-color: rgb(173, 173, 173); /* gray color */
  margin-top: 10px;         /* some vertical spacing */
}

#blog p {
  text-align:justify;
}


/* other post styles remain the same */

#gallery-container {
  display: flex;
  flex-direction: column;
  gap: 2em; /* space between date groups */
}

.date-group {
  /* Optional styling for each date group */
}

.date-group h3 {
  margin-bottom: 0.5em;
  font-weight: bold;
  font-size: 1.2em;
  color: #858585;
  text-transform:lowercase;
}

/* Grid inside each date group */
.date-group .image-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 10px;
}

.gallery-item {
  width: 150px;
  aspect-ratio: 1 / 1;
  overflow: hidden;
  cursor: pointer;
  position: relative;
  user-select: none;
}

.gallery-item::after {
  content: "";
  position: absolute;
  bottom: 5px;
  right: 5px;
  width: 50px;
  height: 50px;
  background: url('images/wm2.png') no-repeat center;
  background-size: contain;
  opacity: 0.4; /* semi-transparent watermark */
  pointer-events: none;
  user-select: none;
  z-index: 2;
}

#overlay-watermark {
  position: absolute;
  bottom: 15px;
  right: 15px;
  width: 80px; /* bigger than thumbnail */
  height: 80px;
  background: url('images/wm2.png') no-repeat center;
  background-size: contain;
  opacity: 0.3; /* subtle */
  pointer-events: none;
  user-select: none;
  z-index: 10;
}



.gallery-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  pointer-events: none;
  -webkit-user-drag: none;
}

/* Overlay styles (same as before) */
#overlay {
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background-color: rgba(0, 0, 0, 0.8);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 9999;
}

#overlay-img {
  max-width: 90%;
  max-height: 90%;
  box-shadow: 0 0 20px black;
  cursor: zoom-out;
}
#overlay-content {
  position: relative; /* you already have this, good */
}

#overlay-img-wrapper {
  position: relative;
  display: inline-block;
}

#overlay-img {
  display: block;
  max-width: 90vw;
  max-height: 90vh;
  box-shadow: 0 0 20px black;
  cursor: zoom-out;
  position: relative;
  z-index: 1;
}

#overlay-watermark {
  position: absolute;
  bottom: 10px;
  right: 10px;
  width: 80px;
  height: 80px;
  background: url('images/wm2.png') no-repeat center;
  background-size: contain;
  opacity: 0.3;
  pointer-events: none;
  user-select: none;
  z-index: 10;
}


/* Disable right-click on images */
.gallery-item img {
  -webkit-touch-callout: none;
  -webkit-user-select: none;
  -khtml-user-select: none;
  -moz-user-select: none;
  -ms-user-select: none;
  user-select: none;
}

/* Overlay content wrapper so caption can be below the image */
#overlay-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.8em;
  max-width: 90%;
  max-height: 90%;
}

#overlay-caption {
  color: white;
  font-size: 1em;
  max-width: 90vw;
  text-align: center;
  user-select: none;
}

/* Trigger warning overlay on thumbnails */
.gallery-item.trigger-warning::after {
  content: "Trigger Warning";
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  background-color: rgba(0, 0, 0, 0.6);
  color: #ffdddd;
  font-weight: bold;
  font-size: 0.8em;
  padding: 2px 5px;
  text-align: center;
  user-select: none;
  pointer-events: none;
}

/* Dark overlay behind the label */
.gallery-item.trigger-warning::before {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.3);
  pointer-events: none;
  border-radius: 4px;
}

.accounts {
  display:flex;
  color: #494949 !important;
  width:100%;
  justify-content:space-around;
}

.tooltip {
  position: relative;
  display: inline-block;
  cursor: pointer; /* makes it clear it's interactive */
}

.tooltip .tooltiptext {
  visibility: hidden;
  width: 120px;
  background-color: #333;
  color: #fff;
  text-align: center;
  border-radius: 6px;
  padding: 5px 8px;

  /* Position the tooltip */
  position: absolute;
  z-index: 10;
  bottom: 125%; /* show above */
  left: 50%;
  transform: translateX(-50%);

  opacity: 0;
  transition: opacity 0.2s ease-in-out;
  pointer-events: none;
  white-space: nowrap;
}

.tooltip:hover .tooltiptext {
  visibility: visible;
  opacity: 1;
}