/* Shared image styling
 *
 * Purpose:
 * - Keep image presentation consistent across themes
 * - Uses CSS custom properties so images adapt to the active theme
 * - Standardized 1.5rem vertical spacing for all non-card image containers
 */

/* Project images */
.project-image {
  max-width: 1100px;
  margin: 1.5rem auto;
  padding: 0 1rem;
}

.project-image img {
  width: 100%;
  height: auto;
  border-radius: 8px;
  border: none;
  box-shadow: none;
}

/* Card thumbnails */
.card img {
  display: block;
  width: 100%;
  height: auto;
  max-height: 180px;
  object-fit: cover;
  border: 1px solid var(--border-color);
  border-radius: 2px;
  box-shadow: 0 0 8px var(--shadow-color);
}

/* About page images */
.about-visual img {
  display: block;
  width: 100%;
  max-width: 280px;
  height: auto;
  border: 1px solid var(--border-color);
  border-radius: 3px;
  box-shadow: 0 0 10px var(--shadow-color);
}

@media (max-width: 820px) {
  .about-visual img {
    max-width: 100%;
  }
}

/* Profile photo */
.profile-photo {
  width: 140px;
  height: 140px;
  border-radius: 999px;
  object-fit: cover;
  border: 1px solid var(--border-bright, var(--border-color));
  box-shadow: 0 0 12px var(--glow-color);
  flex-shrink: 0;
}

@media (max-width: 640px) {
  .profile-photo {
    width: 120px;
    height: 120px;
  }
}

/* Home hero grid */
.hero-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  margin: 1.5rem 0;
  width: 100%;
}

.hero-grid .hero-shot {
  max-width: 100%;
  margin: 0;
  width: 100%;
}

.hero-grid .hero-shot--secondary {
  max-width: 100%;
  opacity: 0.9;
}

@media (max-width: 768px) {
  .hero-grid {
    grid-template-columns: 1fr;
  }
}

/* Home hero image */
.hero-shot img {
  display: block;
  width: 100%;
  max-width: 100%;
  height: auto;
  aspect-ratio: 1;
  object-fit: cover;
  border: 1px solid var(--border-color);
  border-radius: 2px;
  box-shadow: 0 0 10px var(--shadow-color);
}

.hero-shot--secondary img {
  box-shadow: 0 0 18px var(--glow-color);
}

/* ========== IMAGE GALLERIES ========== */

.image-gallery {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
  margin: 1.5rem 0;
  max-width: 1100px;
}

@media (max-width: 768px) {
  .image-gallery {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }
}

.image-gallery figure {
  margin: 0;
  background: var(--bg-secondary, rgba(0, 255, 102, 0.03));
  border: 1px solid var(--border-color);
  border-radius: 4px;
  padding: 0.5rem;
  transition: all 0.3s ease;
}

.image-gallery figure:hover {
  border-color: var(--border-bright, var(--border-color));
  box-shadow: 0 0 12px var(--shadow-color);
}

.image-gallery img {
  width: 100%;
  height: auto;
  display: block;
  border-radius: 2px;
}

.image-gallery figcaption {
  opacity: 0.8;
  font-size: 0.9em;
  margin-top: 0.5rem;
  padding: 0 0.25rem;
  text-align: center;
}

/* ========== CONTENT IMAGES ========== */

.content-image {
  margin: 1.5rem auto;
  max-width: 900px;
  background: var(--bg-secondary, rgba(0, 255, 102, 0.03));
  border: 1px solid var(--border-color);
  border-radius: 4px;
  padding: 0.5rem;
  transition: all 0.3s ease;
}

.content-image:hover {
  border-color: var(--border-bright, var(--border-color));
  box-shadow: 0 0 12px var(--shadow-color);
}

.content-image img {
  width: 100%;
  height: auto;
  display: block;
  border-radius: 2px;
}

.content-image figcaption {
  opacity: 0.8;
  font-size: 0.9em;
  margin-top: 0.5rem;
  padding: 0 0.25rem;
  text-align: center;
}

/* Wide content images for diagrams and schematics */
.content-image--wide {
  max-width: 1100px;
}

/* Compact content images for smaller screenshots */
.content-image--compact {
  max-width: 600px;
}

/* Small square icons and decorative images (native ~256px assets) */
.content-image--small {
  max-width: 256px;
}
