* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  font-size: 18px;
  scroll-behavior: smooth;
}

body {
  font-family: "Jetbrains Mono", Roboto, sans-serif;
  background-color: #191a1a;
  color: #e0e0e0;
  line-height: 1.6;
  min-height: 100vh;
}

h1,
h2,
h3,
h4 {
  line-height: 1.3;
  margin-bottom: 1.5rem;
}

h1 {
  font-size: 2rem;
}

h2 {
  font-size: 1.5rem;
}

h3 {
  font-size: 1.25rem;
}

a {
  color: #14b8a6;
  text-decoration: none;
  transition: color 0.2s ease;
}
a:hover {
  color: rgb(48, 232.5, 212.25);
}

p {
  margin-bottom: 1.5rem;
}
p a {
  text-decoration: underline;
  text-decoration-color: #e0e0e0;
}
p a:hover {
  text-decoration-color: #14b8a6;
}

code {
  font-family: "Jetbrains Mono", monospace;
  background-color: #323434;
  padding: 0.2em 0.4em;
  border-radius: 4px;
  font-size: 0.9em;
}

pre {
  background-color: rgb(37.5, 39, 39);
  padding: 1.5rem;
  border-radius: 8px;
  overflow-x: auto;
  margin-bottom: 1.5rem;
}
pre code {
  background: none;
  padding: 0;
}

.navbar {
  padding: 1.5rem;
}
.navbar-links {
  list-style: none;
  display: flex;
  gap: 1.5rem;
  max-width: 800px;
  margin: 0 auto;
}
.navbar-links a {
  color: #e0e0e0;
}
.navbar-links a:hover {
  color: #14b8a6;
}

main {
  max-width: 800px;
  margin: 0 auto;
  padding: 3rem 1.5rem;
}

.divider {
  margin-top: 3%;
  margin-bottom: 3%;
  height: 2px;
  background: #374151;
  border: none;
}

main.home .about {
  margin-bottom: 2.25rem;
}
main.home .about h1 {
  color: #14b8a6;
}
main.home .about h2 {
  margin-top: 5px;
  margin-bottom: 5px;
}
main.home .about h2 a {
  text-decoration: underline;
  text-decoration-color: #374151;
}
main.home .about h2 a:hover {
  text-decoration-color: #e0e0e0;
}
main.home .about p {
  margin-top: 10px;
}
main.home .blog-preview {
  margin-bottom: 2.25rem;
}
main.home .blog-preview h2 {
  margin-top: 30px;
}
main.home .blog-preview h3 {
  margin-top: 20px;
  text-decoration: underline;
  text-decoration-color: #14b8a6;
}
main.home .links {
  margin-bottom: 15px;
}
main.home .links h2 {
  margin-top: 30px;
}
main.home .links h3 {
  margin-top: 20px;
  text-decoration: underline;
  text-decoration-color: #14b8a6;
}
main.home .links ul {
  list-style: none;
  display: flex;
  gap: 1.5rem;
}

main.blog-index h1 {
  margin-bottom: 3rem;
}
main.blog-index .intro {
  margin-top: 5px;
  margin-bottom: 35px;
}

.post-list {
  list-style: none;
  width: 100%;
  padding: 0;
}

.post-item {
  display: flex;
  align-items: center;
  padding: 0.225rem 0;
  font-weight: bold;
  gap: 10px;
}
.post-item:last-child {
  border-bottom: none;
}
.post-item a {
  flex: 1 1 auto;
  overflow: hidden;
  text-decoration: none;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.post-item time {
  flex: 0 0 auto;
  color: #6b7280;
  font-size: 0.9rem;
  font-family: "Jetbrains Mono", monospace;
  font-weight: normal;
  white-space: nowrap;
}

.blog-post article h1 {
  color: #e0e0e0;
  text-align: left;
}
.blog-post article h2 {
  padding-left: 0px;
  margin-top: -25px;
  text-align: right;
}
.blog-post article h3 {
  margin-bottom: 20px;
  text-align: left;
}
.blog-post article p {
  text-align: justify;
  padding-bottom: 2px;
}
.blog-post article h1:first-child {
  margin-top: 0;
  color: #14b8a6;
}
.blog-post article img {
  max-width: 100%;
  height: auto;
  border-radius: 8px;
}
.blog-post article ul,
.blog-post article ol {
  margin-bottom: 1.5rem;
  padding-left: 2.25rem;
}
.blog-post article blockquote {
  border-left: 3px solid #14b8a6;
  padding-left: 1.5rem;
  margin: 1.5rem 0;
  color: #6b7280;
  font-style: italic;
}
.blog-post .post-footer {
  margin-top: 3rem;
  padding-top: 1.5rem;
}

.gallery-index {
  max-width: 800px;
}
.gallery-index .gallery-intro {
  color: #6b7280;
  margin-bottom: 3rem;
}

.category-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1.5rem;
}

.category-card {
  display: block;
  background: rgb(37.5, 39, 39);
  border-radius: 8px;
  overflow: hidden;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.category-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3);
}
.category-card .category-preview {
  height: 180px;
  background-size: cover;
  background-position: center;
}
.category-card .category-info {
  padding: 1.5rem;
}
.category-card .category-info h2 {
  font-size: 1.25rem;
  margin-bottom: 0.5rem;
  color: #e0e0e0;
}
.category-card .category-info .photo-count {
  color: #6b7280;
  font-size: 0.9rem;
}

.gallery-category {
  max-width: 800px;
}
.gallery-category .category-header {
  margin-bottom: 3rem;
}
.gallery-category .category-header h1 {
  color: #14b8a6;
  margin-bottom: 0.5rem;
}
.gallery-category .category-header p {
  color: #6b7280;
  margin-bottom: 1.5rem;
}
.gallery-category .category-footer {
  margin-top: 3rem;
  padding-top: 1.5rem;
}

.photo-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 1.5rem;
}

.photo-item {
  margin: 0;
  position: relative;
}
.photo-item .photo-link {
  display: block;
  cursor: zoom-in;
  user-select: none;
  -webkit-user-select: none;
  -moz-user-select: none;
  -ms-user-select: none;
}
.photo-item img {
  width: 100%;
  height: 200px;
  object-fit: cover;
  border-radius: 8px;
  transition: opacity 0.2s ease;
  user-select: none;
  -webkit-user-select: none;
  -moz-user-select: none;
  -ms-user-select: none;
  -webkit-user-drag: none;
  -khtml-user-drag: none;
  -moz-user-drag: none;
  -o-user-drag: none;
  pointer-events: none;
}
.photo-item img:hover {
  opacity: 0.85;
}
.photo-item .photo-caption {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 0.75rem;
  background: linear-gradient(transparent, rgba(0, 0, 0, 0.8));
  color: white;
  font-size: 0.85rem;
  border-radius: 0 0 8px 8px;
  pointer-events: none;
}

.lightbox {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 1000;
  display: none;
}
.lightbox.active {
  display: flex;
  align-items: center;
  justify-content: center;
}
.lightbox-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.95);
  cursor: pointer;
}
.lightbox-content {
  position: relative;
  max-width: 90vw;
  max-height: 90vh;
  z-index: 1;
}
.lightbox-figure {
  margin: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
}
.lightbox-img {
  max-width: 90vw;
  max-height: 80vh;
  object-fit: contain;
  border-radius: 4px;
  user-select: none;
  -webkit-user-select: none;
  -moz-user-select: none;
  -ms-user-select: none;
  -webkit-user-drag: none;
  -khtml-user-drag: none;
  -moz-user-drag: none;
  -o-user-drag: none;
  pointer-events: none;
}
.lightbox-caption {
  margin-top: 1.5rem;
  text-align: center;
  color: #e0e0e0;
  max-width: 600px;
}
.lightbox-caption .caption-text {
  font-size: 1.1rem;
  margin-bottom: 0.5rem;
}
.lightbox-caption .caption-metadata {
  font-size: 0.85rem;
  color: #6b7280;
  font-family: "Jetbrains Mono", monospace;
}
.lightbox-close {
  position: absolute;
  top: -40px;
  right: 0;
  background: none;
  border: none;
  color: #e0e0e0;
  font-size: 2rem;
  cursor: pointer;
  padding: 0.5rem;
  line-height: 1;
  transition: color 0.2s ease;
}
.lightbox-close:hover {
  color: #14b8a6;
}
.lightbox-prev, .lightbox-next {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(0, 0, 0, 0.5);
  border: none;
  color: #e0e0e0;
  font-size: 2.5rem;
  cursor: pointer;
  padding: 1rem 0.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s ease, color 0.2s ease;
  border-radius: 4px;
}
.lightbox-prev:hover, .lightbox-next:hover {
  background: rgba(0, 0, 0, 0.8);
  color: #14b8a6;
}
.lightbox-prev {
  left: -60px;
}
.lightbox-next {
  right: -60px;
}
.lightbox-counter {
  position: absolute;
  bottom: -30px;
  left: 50%;
  transform: translateX(-50%);
  color: #6b7280;
  font-size: 0.9rem;
  font-family: "Jetbrains Mono", monospace;
}

main.error-page {
  text-align: center;
  padding-top: 6rem;
}
main.error-page h1 {
  font-size: 4rem;
  color: #14b8a6;
}

@media only screen and (max-width: 2000px) {
  main {
    max-width: 50%;
    min-width: 700px;
  }
}
@media only screen and (max-width: 1500px) {
  body {
    font-size: 16px;
  }
  h2 {
    font-size: 23px;
  }
  h3 {
    font-size: 30px;
  }
  main.home .about h1 {
    font-size: 56px;
  }
  main.home .about h2 {
    font-size: 21px;
  }
  main.home .about p {
    text-align: justify;
  }
  .blog-post pre {
    font-size: 14px;
  }
}
@media only screen and (max-width: 1000px) {
  .post-item {
    flex-direction: column;
    align-items: flex-start;
    gap: 5px;
  }
  main {
    max-width: 75%;
    min-width: 500px;
  }
}
@media only screen and (max-width: 800px) {
  .navbar-links {
    gap: 15px;
    min-width: 80%;
    flex-wrap: wrap;
  }
  main {
    padding-top: 0;
    max-width: 90%;
    min-width: 90%;
  }
  main h1 {
    padding-top: 65px;
  }
  main.home .about {
    padding-top: 20px;
    margin-bottom: 30px;
  }
  main.home .about h1 {
    font-size: 40px;
  }
  main.home .about h2 {
    font-size: 19px;
  }
  .blog-post h3 {
    margin-top: 0px;
  }
  .blog-post pre {
    width: 80%;
  }
  .lightbox-prev, .lightbox-next {
    position: fixed;
    top: auto;
    bottom: 20px;
    transform: none;
    padding: 0.75rem 1.5rem;
  }
  .lightbox-prev {
    left: 20px;
  }
  .lightbox-next {
    right: 20px;
  }
  .lightbox-counter {
    bottom: 70px;
  }
  .lightbox-close {
    position: fixed;
    top: 10px;
    right: 10px;
  }
}
@media only screen and (max-width: 600px) {
  html {
    font-size: 14px;
  }
  body {
    font-size: 14px;
  }
}
