/* ===== Reset & Base ===== */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  font-size: 100%;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  line-height: 1.6;
  color: #1a1a1a;
  background: #fafafa;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  overflow-x: hidden;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

a {
  color: #2563eb;
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

ul {
  list-style: none;
}

/* ===== Header & Nav ===== */
header {
  background: #fff;
  border-bottom: 1px solid #e5e7eb;
  position: sticky;
  top: 0;
  z-index: 100;
}

header nav {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0.75rem 1rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
}

.site-name {
  font-size: 1.25rem;
  font-weight: 700;
  color: #1a1a1a;
  text-decoration: none;
}

.site-name:hover {
  color: #2563eb;
  text-decoration: none;
}

.nav-links {
  display: none;
  flex-direction: column;
  width: 100%;
  gap: 0;
  padding-top: 0.5rem;
}

.nav-links.open {
  display: flex;
}

.nav-links li a {
  display: block;
  padding: 0.5rem 0;
  color: #374151;
  font-size: 0.95rem;
}

.nav-links li a:hover {
  color: #2563eb;
}

/* Hamburger toggle — CSS-only via checkbox */
header nav {
  position: relative;
}

.nav-toggle {
  display: block;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.25rem;
  width: 2rem;
  height: 2rem;
  position: relative;
}

.nav-toggle span,
.nav-toggle span::before,
.nav-toggle span::after {
  display: block;
  width: 1.25rem;
  height: 2px;
  background: #374151;
  border-radius: 1px;
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  transition: transform 0.2s ease;
}

.nav-toggle span {
  top: 50%;
  transform: translate(-50%, -50%);
}

.nav-toggle span::before {
  content: "";
  top: -6px;
  left: 0;
  transform: none;
}

.nav-toggle span::after {
  content: "";
  top: 6px;
  left: 0;
  transform: none;
}

/* ===== Breadcrumbs ===== */
.breadcrumbs {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0.5rem 1rem;
  font-size: 0.85rem;
  color: #6b7280;
}

.breadcrumbs a {
  color: #6b7280;
}

.breadcrumbs a:hover {
  color: #2563eb;
}

/* ===== Main ===== */
main {
  max-width: 1200px;
  margin: 0 auto;
  padding: 1rem;
  width: 100%;
  flex: 1;
}

/* ===== Footer ===== */
footer {
  background: #fff;
  border-top: 1px solid #e5e7eb;
  margin-top: auto;
  padding: 1.5rem 1rem;
}

footer nav {
  max-width: 1200px;
  margin: 0 auto;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  justify-content: center;
}

.footer-links li a {
  color: #6b7280;
  font-size: 0.9rem;
}

.footer-links li a:hover {
  color: #2563eb;
}

/* ===== Hero / Front Page ===== */
.hero {
  text-align: center;
  padding: 2rem 0;
}

.hero h1 {
  font-size: 2rem;
  margin-bottom: 0.5rem;
}
.hero-banner {
  background-image: url('/assets/images/background.jpg');
  background-size: cover;
  background-position: center;
  padding: 8rem 2rem;
  color: #fff;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.6);
  text-align: center;
}

.hero-banner p {
  margin-bottom: 0.75rem;
}

.hero-banner .hero-name {
  font-size: 2em;
  font-weight: 700;
  margin: 1rem 0;
}
.site-description {
  color: #6b7280;
  font-size: 1.1rem;
  margin-bottom: 1rem;
}

.hero-content {
  margin-top: 1rem;
}

.front-nav {
  padding: 1rem 0;
}

.front-nav ul {
  display: flex;
  gap: 1.5rem;
  justify-content: center;
}

.front-nav li a {
  font-size: 1.05rem;
  font-weight: 500;
}

/* ===== Recent Updates ===== */
.recent-updates {
  padding: 1.5rem 0;
}

.recent-updates h2 {
  font-size: 1.5rem;
  margin-bottom: 1rem;
}

.recent-updates h3 {
  font-size: 1.1rem;
  margin-bottom: 0.5rem;
  color: #374151;
}

.recent-albums,
.recent-posts {
  margin-bottom: 1.5rem;
}

/* Recent album card grid */
.recent-album-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1rem;
}

.recent-album-card a {
  display: block;
  background: #fff;
  border-radius: 0.5rem;
  overflow: hidden;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
  transition: box-shadow 0.2s ease;
  text-decoration: none;
  color: inherit;
}

.recent-album-card a:hover {
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  text-decoration: none;
}

.recent-album-card img {
  width: 100%;
  aspect-ratio: 3 / 2;
  object-fit: cover;
}

.recent-album-card .album-name {
  display: block;
  font-size: 0.9rem;
  font-weight: 500;
  padding: 0.5rem 0.75rem 0.15rem;
  color: #1a1a1a;
}

.recent-album-card .album-date {
  display: block;
  font-size: 0.8rem;
  color: #6b7280;
  padding: 0 0.75rem 0.5rem;
}

.recent-posts ul {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.recent-post a {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  padding: 0.5rem 0;
  border-bottom: 1px solid #f3f4f6;
}

.recent-post .post-title {
  font-weight: 500;
}

.recent-post time {
  color: #6b7280;
  font-size: 0.9rem;
}

/* ===== Gallery ===== */
.gallery {
  padding: 1rem 0;
}

.album-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5rem;
}

.album-card a {
  display: block;
  background: #fff;
  border-radius: 0.5rem;
  overflow: hidden;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
  transition: box-shadow 0.2s ease;
  text-decoration: none;
  color: inherit;
}

.album-card a:hover {
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  text-decoration: none;
}

.album-card img {
  width: 100%;
  aspect-ratio: 3 / 2;
  object-fit: cover;
}

.album-card h2 {
  font-size: 1rem;
  padding: 0.75rem 0.75rem 0.25rem;
  color: #1a1a1a;
}

.album-card p {
  font-size: 0.85rem;
  color: #6b7280;
  padding: 0 0.75rem 0.75rem;
}

/* ===== Album Page ===== */
.album {
  padding: 1rem 0;
}

.album h1 {
  font-size: 1.75rem;
  margin-bottom: 0.25rem;
}

.album-date {
  color: #6b7280;
  margin-bottom: 1rem;
}

.photo-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.5rem;
}

.photo-item a {
  display: block;
}

.photo-item img {
  width: 100%;
  aspect-ratio: 3 / 2;
  object-fit: cover;
  border-radius: 0.25rem;
  cursor: pointer;
}

/* ===== EXIF Data ===== */
.exif-data {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  padding: 0.5rem 0;
  font-size: 0.8rem;
  color: #6b7280;
}

.exif-data span {
  background: #f3f4f6;
  padding: 0.15rem 0.5rem;
  border-radius: 0.25rem;
}

/* ===== Brain Drippings ===== */
.brain-drippings {
  padding: 1rem 0;
}

.post-list {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.post-entry a {
  display: block;
  padding: 1rem 0;
  border-bottom: 1px solid #e5e7eb;
  text-decoration: none;
  color: inherit;
}

.post-entry a:hover {
  background: #f9fafb;
  text-decoration: none;
}

.post-entry h2 {
  font-size: 1.1rem;
  margin-bottom: 0.25rem;
  color: #1a1a1a;
}

.post-entry time {
  font-size: 0.85rem;
  color: #6b7280;
}

/* ===== Single Post ===== */
.post {
  padding: 1rem 0;
}

.post h1 {
  font-size: 1.75rem;
  margin-bottom: 0.25rem;
}

.post > time {
  display: block;
  color: #6b7280;
  margin-bottom: 1.5rem;
}

.post-body {
  line-height: 1.8;
}

.post-body h2 {
  font-size: 1.4rem;
  margin: 1.5rem 0 0.75rem;
}

.post-body h3 {
  font-size: 1.2rem;
  margin: 1.25rem 0 0.5rem;
}

.post-body p {
  margin-bottom: 1rem;
}

.post-body img {
  border-radius: 0.25rem;
  margin: 1rem 0;
}

.post-body blockquote {
  border-left: 3px solid #d1d5db;
  padding-left: 1rem;
  color: #4b5563;
  margin: 1rem 0;
}

.post-body code {
  background: #f3f4f6;
  padding: 0.15rem 0.35rem;
  border-radius: 0.2rem;
  font-size: 0.9em;
}

.post-body pre {
  background: #1f2937;
  color: #f9fafb;
  padding: 1rem;
  border-radius: 0.5rem;
  overflow-x: auto;
  margin: 1rem 0;
}

.post-body pre code {
  background: none;
  padding: 0;
  color: inherit;
}

/* ===== Error Page ===== */
.error-page {
  text-align: center;
  padding: 3rem 1rem;
}

.error-page h1 {
  font-size: 2rem;
  margin-bottom: 1rem;
}

.error-page p {
  margin-bottom: 0.75rem;
  color: #6b7280;
}

.error-page a {
  font-weight: 500;
}

/* ===== No Content ===== */
.no-content {
  text-align: center;
  color: #9ca3af;
  padding: 3rem 1rem;
  font-size: 1.1rem;
}

/* ===== Slideshow Overlay (basic styles, JS handles behavior) ===== */
.slideshow-overlay {
  position: fixed;
  inset: 0;
  z-index: 1000;
  background: rgba(0, 0, 0, 0.95);
  display: flex;
  align-items: center;
  justify-content: center;
}

.slideshow-overlay img {
  max-width: 100%;
  max-height: 100vh;
  object-fit: contain;
}

.slideshow-overlay:fullscreen img {
  max-width: 90vw;
  max-height: 90vh;
  width: 90vw;
  height: 90vh;
  object-fit: contain;
}

.slideshow-overlay:-webkit-full-screen img {
  max-width: 90vw;
  max-height: 90vh;
  width: 90vw;
  height: 90vh;
  object-fit: contain;
}

.slideshow-overlay .slideshow-counter {
  position: absolute;
  bottom: 1rem;
  left: 50%;
  transform: translateX(-50%);
  color: #fff;
  font-size: 0.9rem;
}

.slideshow-overlay .slideshow-filename {
  position: absolute;
  bottom: 1rem;
  left: 1rem;
  color: #fff;
  font-size: 0.9rem;
}

.slideshow-overlay .slideshow-close {
  position: absolute;
  top: 1rem;
  right: 1rem;
  color: #fff;
  background: none;
  border: none;
  font-size: 1.5rem;
  cursor: pointer;
  padding: 0.5rem;
  line-height: 1;
}

.slideshow-overlay .slideshow-prev,
.slideshow-overlay .slideshow-next {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  color: #fff;
  background: rgba(0, 0, 0, 0.4);
  border: none;
  font-size: 1.5rem;
  cursor: pointer;
  padding: 0.75rem;
  border-radius: 50%;
  line-height: 1;
}

.slideshow-overlay .slideshow-prev {
  left: 1rem;
}

.slideshow-overlay .slideshow-next {
  right: 1rem;
}

.slideshow-overlay .slideshow-auto {
  position: absolute;
  bottom: 1rem;
  right: 1rem;
  color: #fff;
  background: rgba(0, 0, 0, 0.5);
  border: 1px solid rgba(255, 255, 255, 0.3);
  font-size: 0.85rem;
  cursor: pointer;
  padding: 0.4rem 0.75rem;
  border-radius: 0.25rem;
  line-height: 1;
}

.slideshow-overlay .slideshow-fullscreen {
  position: absolute;
  bottom: 1rem;
  right: 6.5rem;
  color: #fff;
  background: rgba(0, 0, 0, 0.5);
  border: 1px solid rgba(255, 255, 255, 0.3);
  font-size: 0.85rem;
  cursor: pointer;
  padding: 0.4rem 0.75rem;
  border-radius: 0.25rem;
  line-height: 1;
}

/* ===== Desktop Breakpoint (768px+) ===== */
@media (min-width: 768px) {
  /* Show nav links inline, hide hamburger */
  .nav-toggle {
    display: none;
  }

  .nav-links {
    display: flex;
    flex-direction: row;
    width: auto;
    gap: 1.5rem;
    padding-top: 0;
  }

  /* Gallery grid: multi-column */
  .album-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  /* Photo grid: multi-column */
  .photo-grid {
    grid-template-columns: repeat(3, 1fr);
  }

  /* Recent updates side by side */
  .recent-albums,
  .recent-posts {
    margin-bottom: 2rem;
  }

  .recent-album-grid {
    grid-template-columns: repeat(3, 1fr);
  }

  /* Hero sizing */
  .hero h1 {
    font-size: 2.5rem;
  }
}

/* ===== Large screens (1024px+) ===== */
@media (min-width: 1024px) {
  .album-grid {
    grid-template-columns: repeat(3, 1fr);
  }

  .photo-grid {
    grid-template-columns: repeat(4, 1fr);
  }
}

/* ===== Extra-large screens (1440px+) ===== */
@media (min-width: 1440px) {
  .album-grid {
    grid-template-columns: repeat(4, 1fr);
  }

  .photo-grid {
    grid-template-columns: repeat(5, 1fr);
  }
}
