/* Fills the whole screen with grey */
body {
  background-color: #262626;
  color: #e0e0e0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  line-height: 1.6;
  margin: 0;
  padding: 0;
}

/* Removes underlines from all links*/
a {
  text-decoration: none;
}

/* Centers the text within the original 700px width */
.container {
  max-width: 700px;
  margin: 0 auto;
  padding: 2rem 1rem;
}

/* Character Lore & Main Paragraph Text */
p {
  color: #cccccc;
  margin-bottom: 1.25rem;
}

/* Field Labels (Height, Age, etc.) */
strong {
  color: #f5f5f5;
}

/* Character Quote (Targets italicized paragraphs) */
p[style*="text-align: center"] em,
p[style*="text-align: right"] {
  font-family: "Georgia", "Garamond", "Times New Roman", serif;
  color: #d1d1d1;
}

p[style*="text-align: center"] em {
  font-style: italic;
  font-size: 0.9rem; /* Reduced from 1.1rem */
  letter-spacing: 0.02em;
}

/* Quote Attribution */
p[style*="text-align: right"] {
  font-size: 0.8rem; /* Reduced from 0.95rem */
  color: #a0a0a0;
  margin-top: -0.5rem;
}

/* Accent Headers */
h3 {
  color: #ffffff;
  letter-spacing: 0.05em;
  font-size: 1.2rem;
  margin-top: 1.5rem;
}

/* Image Responsiveness & Dark Mode Blend */
img {
  max-width: 100%;
  height: auto;
}

/* Decorative Dividers invert to work on dark backgrounds */
img[src*="classic-ornate-border-element"] {
  filter: invert(1) brightness(0.8);
}

/* Blame ts if it breaks */

/* Container for each image + caption unit */
.gallery figure {
  margin: 0;
  display: flex;
  flex-direction: column;
  align-items: center; /* Centers the image and caption relative to each other */
  width: 150px;        /* Matches image width so text wraps cleanly underneath */
}

/* Caption text styling */
.gallery figcaption {
  margin-top: 8px;
  font-size: 0.85rem;
  color: #cccccc;
  text-align: center; /* Centers the text inside the caption block */
}

/* Center head section text */
h1, h3, h4 {
  text-align: center;
}

/* DeviantArt link color styling */
h4 a {
  color: #aaf0d1;
}

.main-ref {
    border-radius: 12px;
    border: 2px solid #7A7A7A; 
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.15); 
    max-width: 100%;
    height: auto; 
    display: inline-block;
}

/* Container for the entire gallery */
.character-gallery {
    display: flex;
    flex-wrap: wrap;       /* Allows images to wrap to the next line on small screens */
    gap: 16px;             /* Space between gallery items */
    justify-content: center; /* Centers the row of images */
    margin-top: 30px;
}

/* Individual item box (image + caption) */
.gallery-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin: 0;             /* Resets default <figure> margins */
}

/* Sets a uniform height for all gallery images */
.gallery-item img {
    height: 180px;         /* Change this value to adjust the uniform height */
    width: auto;           /* Automatically adjusts width to maintain image proportions */
    object-fit: cover;
    border-radius: 8px;    /* Optional: slightly rounded corners */
}

/* Styling for the captions */
.gallery-item figcaption {
    margin-top: 8px;
    font-size: 14px;
    text-align: center;
    max-width: 180px;      /* Matches the caption width roughly to the image */
}


/* Flexbox container to center items, space them out, and allow wrapping */
.gallery {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 16px; /* Adjust gap to increase/decrease space between images */
  max-width: 900px;
  margin: 20px auto;
}
.full-width {
    width: 100%;
    display: block;
    height: auto;
}

/* Image sizing and styling */
.gallery img {
  width: 150px; /* Reduced display size for smaller headshots */
  height: 150px;
  object-fit: cover; /* Keeps image proportions clean within the square size */
  border-radius: 8px; /* Optional subtle rounded corners */
}