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

html {
  font-size: 14pt;
  height: 100%;
}

body {
  background-color: rgb(16, 31, 37);
  color: #f5f5dc;
  font-family: "Red Hat Display", sans-serif;
  font-weight: 400;
  font-style: normal;
  line-height: 1.6;
  min-height: 100%;
  display: flex;
  flex-direction: column;
}

.container {
  margin: 0 auto;
  max-width: 1400px;
  padding: 0 2rem;
  flex: 1;
}

picture {
  display: block;
}

nav a {
  color: #f5f5dc;
  text-decoration: none;
  font-weight: 500;
  transition: color 0.3s ease;
}

nav a:hover {
  color: #909090;
}

a {
  color: #228da8;
}

a:visited {
  color: #b5a4cb;
}

#hero {
  background: linear-gradient(90deg, #101010, #606060);
  padding: 4.5rem 2rem 1.5rem 2rem;
  text-align: center;
  color: #74bbf1;
  text-shadow: rgba(0, 0, 0, 0.4) 0px 0px 3px;
  position: relative;
}

h1 {
  color: #2773ad;
}

.navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem 2rem;
  background-color: rgba(0, 0, 0, 0.2);
  backdrop-filter: blur(5px);
  z-index: 1000;
}

.nav-left {
  display: flex;
  gap: 2rem;
}

.navbar a {
  color: #f5f5dc;
  text-decoration: none;
  font-weight: 500;
  font-size: 1rem;
  transition: color 0.3s ease;
}

.navbar a:hover {
  color: #74bbf1;
}

.hero-content h1 {
  font-size: 1.8rem;
  font-weight: 700;
  line-height: 1.2;
}

.tagline {
  font-size: 1rem;
  opacity: 0.9;
  font-weight: 300;
}

h2 {
  font-size: 2.5rem;
  margin-bottom: 2rem;
  text-align: center;
  color: #c3cfec;
}

h3 {
  font-size: 1.3rem;
  margin-bottom: 0.5rem;
  color: #f5f5dc;
}

p {
  font-size: 1.1rem;
  margin-bottom: 1.5rem;
}

/* Homepage category grid */
.category-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2rem;
  margin-top: 3rem;
}

.category-card {
  display: block;
  color: inherit;
  text-decoration: none;
  border-radius: 10px;
  overflow: hidden;
  border: 1px solid rgba(98, 169, 255, 0.3);
  background-color: rgba(1, 20, 29, 0.5);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.category-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 5px 15px rgba(0, 100, 150, 0.2);
}

.category-card img {
  width: 100%;
  height: auto;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  display: block;
}

.category-card h2 {
  font-size: 1.4rem;
  margin: 1rem;
  text-align: left;
  text-transform: capitalize;
  color: #f5f5dc;
}

/* Per-category photo grid */
.back-link {
  display: inline-block;
  margin-top: 2rem;
  color: #74bbf1;
  text-decoration: none;
}

.back-link:hover {
  color: #228da8;
}

.album-description {
  max-width: 700px;
  margin-top: 2rem;
  text-align: justify;
}

.album-description p:last-child {
  margin-bottom: 0;
}

.photo-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
  margin-top: 2rem;
}

.photo-thumb-card {
  display: block;
  color: inherit;
  text-decoration: none;
}

.photo-thumb-card img {
  width: 100%;
  height: auto;
  aspect-ratio: 1;
  object-fit: cover;
  border-radius: 10px;
  transition: transform 0.3s ease;
}

.photo-thumb-card:hover img {
  transform: scale(1.03);
}

.photo-thumb-card h3 {
  margin-top: 0.5rem;
  font-size: 1rem;
  font-weight: 500;
  color: #c3cfec;
}

/* Photo detail page */
.photo-detail .photo-figure {
  display: table;
  max-width: 100%;
  margin: 2rem auto 1.5rem auto;
}

.photo-detail .photo-full {
  display: block;
  max-width: min(100%, 800px);
  max-height: 800px;
  width: auto;
  height: auto;
  margin: 0;
  border-radius: 5px;
  box-shadow: 0 0 30px rgba(0, 0, 0, 0.5);
  cursor: pointer;
}

.photo-detail .photo-meta {
  display: table-caption;
  caption-side: bottom;
  text-align: right;
  font-size: 0.8rem;
  color: #7d8a99;
  padding-top: 0.35rem;
}

.photo-detail .caption {
  max-width: 700px;
  margin: 0 auto 2rem auto;
  text-align: justify;
}

.exif-table {
  max-width: 500px;
  margin: 0 auto 2rem auto;
  width: 100%;
  border-collapse: collapse;
}

.exif-table th,
.exif-table td {
  padding: 0.35rem 0.75rem;
  text-align: left;
  border-bottom: 1px solid rgba(98, 169, 255, 0.15);
  font-size: 0.8rem;
}

.exif-table th {
  color: #7d8a99;
  font-weight: 500;
  width: 40%;
}

.exif-table td {
  color: #9a998c;
}

.photo-nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  max-width: 700px;
  margin: 2rem auto;
  gap: 1rem;
}

.photo-nav a {
  color: #74bbf1;
  text-decoration: none;
}

.photo-nav a:hover {
  color: #228da8;
}

.photo-nav .photo-nav-center {
  flex: 1;
  text-align: center;
}

footer {
  background-color: #1a1a1a;
  padding: 0.2rem 1rem;
  width: 100%;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  text-align: right;
}

footer div {
  opacity: 0.7;
  margin: 0;
  font-size: 0.7rem;
  width: 100%;
}

footer a {
  color: #74bbf1;
}

@media (max-width: 768px) {
  .hero-content h1 {
    font-size: 1.5rem;
  }

  .tagline {
    font-size: 0.9rem;
  }

  .navbar {
    padding: 0.75rem 1rem;
  }

  .nav-left {
    gap: 1rem;
    font-size: 0.9rem;
  }

  .container {
    max-width: 600px;
    padding: 0 1rem;
  }

  #hero {
    padding: 4rem 1rem 1rem 1rem;
  }

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

@media (max-width: 480px) {
  .hero-content h1 {
    font-size: 1.3rem;
  }

  .container {
    max-width: 400px;
    padding: 0 1rem;
  }

  .navbar {
    padding: 0.5rem 0.75rem;
  }

  .navbar a {
    font-size: 0.85rem;
  }
}
