@font-face {
  font-family: 'Raleway';
  src: url('./fonts/Raleway-Regular.ttf') format('truetype');
  font-weight: normal;
  font-style: normal;
}

@font-face {
  font-family: 'Bitter';
  src: url('./fonts/Bitter-Regular.ttf') format('truetype');
  font-weight: normal, medium, bold;
  font-style: normal;
}


@media (prefers-color-scheme: light) {
  body { color: #000000; background: #f9f9f9; }
}
@media (prefers-color-scheme: dark) {
  body { color: #f9f9f9; background: #000000; }
  img[src*=svg] { filter: invert(90%) grayscale(30%); }
}

* { margin: 0; padding: 0; }
a { text-decoration: none; color: #bb2222; }
a:hover { color: #dd1144; }
body {
  font-family: Bitter, sans-serif;
  -webkit-font-smoothing: antialiased;
}

#gallery { margin: 8px; }

header { margin: 4em auto 0 auto; text-align: center; font-family: 'Raleway'; }
header img.avatar { width: 64px; border-radius: 50%; }
header .title { font-size: 1.6em; font-weight: bold; line-height: 1.6em; }
header .sub-title { font-size: 1.0em; font-weight: bold; line-height: 1.6em; }
header .description { line-height: 1.6em; }
header nav { margin: 1em 0; }
header nav a { margin: 0 0.6em; }

.section { margin-top: 3em; }
.section-header-wrapper { max-width: 800px; margin-left: 4em; }
.section-title { font-family: 'Raleway'; font-size: 1.6em; font-weight: medium; line-height: 1.6em; }
.section-description { line-height: 1.4em; }
.section-images { margin-top: 2em; }

/* This is requried for Grid */
.section-image img { width: 100%; }

footer { margin: 4em auto 4em; text-align: center; line-height: 1.6em; }
footer p { font-size: 0.9em; }
footer .foto_footer { font-size: 0.8em; }

/* Masonry Grid Styles */
.masonry-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr); /* Changed to 3 equal columns */
  gap: 10px; /* Adjust gap between items */
  align-items: start; /* Align items to the start of the track */
  margin: 8px auto 2em auto; /* Added more bottom margin */
}

/* Responsive adjustments for mobile screens */
@media (max-width: 767px) { /* Adjust breakpoint as needed for mobile */
  .masonry-grid {
    grid-template-columns: 1fr; /* Single column for mobile */
  }
}

/* Responsive adjustments for large screens */
@media (min-width: 1200px) { /* Adjust breakpoint as needed */
  .masonry-grid {
    max-width: 80%;
    /* margin: 8px auto; is already set, so it will center */
  }
}


.masonry-item {
  break-inside: avoid; /* Prevents items from breaking across columns */
  margin-bottom: 10px; /* Space below each item */
  aspect-ratio: 1 / 1; /* Make the container square */
  overflow: hidden; /* Clip the image to the container */
  position: relative; /* Optional: if you ever need to position content absolutely within it */
}

.masonry-item img {
  width: 100%;
  height: 100%; /* Make image fill the container height */
  object-fit: cover; /* Cover the container, crop excess, maintain aspect ratio */
  display: block; /* Remove extra space below image */
  border-radius: 4px; /* Optional: adds rounded corners to images */
}

.load-more-trigger {
  text-align: center;
  padding: 20px;
}

#loading {
  font-family: 'Raleway', sans-serif;
  color: #555;
}

/* Ensure footer is cleared if using floats, though grid should handle this */
footer {
  clear: both; /* Just in case, though grid is less prone to float issues */
  /* ... existing footer styles ... */
}

/* Styling for Year Headings */
.year-heading {
  font-family: 'Raleway', sans-serif;
  font-size: 2em;
  font-weight: bold;
  text-align: center;
  margin-top: 1em;
  margin-bottom: 0.5em;
  color: #333;
}

@media (prefers-color-scheme: dark) {
  .year-heading {
    color: #f0f0f0;
  }
  body { color: #f9f9f9; background: #000000; }
  img[src*=svg] { filter: invert(90%) grayscale(30%); }
}

#posts h1 {
  text-align: center;
  margin-top: 1em;
}

.about-content-container {
  margin: 8px auto 2em auto; /* Center and provide vertical margin */
}

/* Responsive adjustments for large screens */
@media (min-width: 1200px) { 
  .about-content-container {
    max-width: 80%;
  }
}

.about-heading {  
  margin-top: 0.5em;
  margin-bottom: 0.5em;
}

.about-paragraph {  
  margin-top: 0.5em;
  margin-bottom: 0.5em;
  padding-left: 1em;
}

.row-container {
  display: flex;
  flex-wrap: wrap; /* Allows items to wrap to the next line on smaller screens */
  gap: 20px; /* Adjust gap between columns */
  margin-top: 1em;
}

.col-1 {
  flex: 2; /* Takes up 2/3 of the space */
  min-width: 300px; /* Minimum width before wrapping */
}

.col-2 {
  flex: 1; /* Takes up 1/3 of the space */
  min-width: 200px; /* Minimum width before wrapping */
}

.col-2 img {
  width: 100%;
  height: auto;
  border-radius: 4px;
}

/* Responsive adjustments for two columns */
@media (max-width: 767px) { /* Adjust breakpoint as needed */
  .row-container {
    flex-direction: column;
  }
  .col-1,
  .col-2 {
    flex-basis: 100%; /* Each column takes full width on smaller screens */
  }
}

#scrollToTopBtn {
  position: fixed;
  bottom: 20px;
  right: 20px;
  z-index: 1000;
  padding: 10px 15px;
  font-size: 20px;
  background-color: #555;
  color: white;
  border: none;
  border-radius: 5px;
  cursor: pointer;
  text-decoration: none;
  opacity: 0.7;
  transition: opacity 0.3s ease;
}

#scrollToTopBtn:hover {
  opacity: 1;
}