body {
  font-family: Arial, sans-serif;
  background: #f7f7f7;
  margin: 0;
  text-align: center;
}

.container {
  max-width: 900px;
  margin: 0 auto;
  min-height: 100vh;
  background: #fff;
  display: flex;
  flex-direction: column;
  padding: 20px;
}

/* Shared header */
.site-header {
  display: grid;
  grid-template-columns: 1fr;
  gap: 6px;
  margin-bottom: 8px;
}

.brand {
  font-size: 1.6rem;
  font-weight: 800;
  letter-spacing: 0.2px;
}

.brand a {
  color: #111;
  text-decoration: none;
}

nav {
  margin-top: 4px;
}

nav a {
  margin: 0 10px;
  text-decoration: none;
  color: #0077cc;
  font-weight: 600;
}

nav a:hover { text-decoration: underline; }

/* Subhead row: same height everywhere */
.subhead {
  font-size: 1.05rem;
  color: #555;
  min-height: 1.6em;           /* guarantees consistent height */
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 6px 0 20px;
}

/* On pages without a tagline, keep the space but hide text */
.subhead.placeholder {
  visibility: hidden;          /* reserves the exact same space */
}

/* Page content */
main { flex: 1; text-align: left; }

/* Buttons (used on Resume page) */
.button {
  display: inline-block;
  padding: 10px 16px;
  border-radius: 6px;
  text-decoration: none;
  background: #0077cc;
  color: #fff;
  font-weight: 600;
}
.button:hover { background: #005fa3; }

footer { margin-top: 24px; color: #666; }

/* About Page*/
.about{
  display: grid;
  gap: 18px;
  margin: 18px 0 28px;
}

.about p{
  line-height: 1.65;
  margin: 0;
}

/* Optional: project cards, etc. */
section { margin: 30px 0; }

.projects ul, main ul { list-style: none; padding: 0; }
.projects li, main ul li {
  margin: 15px;
  padding: 15px;
  padding-top: 5px;
  padding-bottom: 5px;
  background: #f0f0f0;
  border-radius: 8px;
}

/* Project page layout */
.project-hero {
  margin: 10px 0 22px;
}
.project-title {
  font-size: 2rem;
  margin: 0 0 10px;
}
.project-meta {
  color: #666;
  font-size: 0.95rem;
  margin-bottom: 8px;
}

.project-content {
  display: grid;
  gap: 18px;
  margin: 18px 0 28px;
}
.project-content p {
  line-height: 1.65;
  margin: 0;
}

/* Responsive image grid */
.media-grid {
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(3, 1fr);
}
@media (max-width: 900px) {
  .media-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 520px) {
  .media-grid { grid-template-columns: 1fr; }
}

.media-grid figure {
  margin: 0;
  background: #f5f5f5;
  border-radius: 10px;
  overflow: hidden;
  border: 1px solid #eee;
}
/* .media-grid img {
  width: 100%;
  height: 220px;
  object-fit: cover;
  display: block;
} */
.media-grid .thumb {
  width: 100%;
  aspect-ratio: 1 / 1;   /* square tiles */
  background: #f5f5f5;
}
.media-grid .thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;     /* fills the square nicely */
  display: block;
}
.media-grid figcaption {
  font-size: 0.9rem;
  color: #555;
  padding: 10px 12px;
  background: #fff;
}

/* Optional: wide hero image */
.hero-image {
  width: 100%;
  border-radius: 12px;
  border: 1px solid #eee;
  margin: 10px 0 20px;
}

/* Lightbox overlay */
.lightbox {
  position: fixed;
  inset: 0;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: rgba(0,0,0,0.85);
  z-index: 1000;
}
.lightbox.open { display: flex; }

.lightbox__content {
  position: relative;
  max-width: 95vw;
  max-height: 95vh;
}

.lightbox__img {
  display: block;
  max-width: 95vw;
  max-height: 80vh;
  width: auto;
  height: auto;
  object-fit: contain;
  background: #111;
  border-radius: 10px;
}

.lightbox__caption {
  color: #eee;
  text-align: center;
  margin-top: 10px;
  max-width: 85vw;
}

.lightbox__close,
.lightbox__prev,
.lightbox__next {
  position: absolute;
  border: none;
  cursor: pointer;
  color: #fff;
  background: rgba(0,0,0,0.6);
  padding: 10px 12px;
  border-radius: 10px;
  font-size: 20px;
  line-height: 1;
}

.lightbox__close { top: 10px; right: 10px; }
.lightbox__prev  { top: 50%; left: -12px;  transform: translateY(-50%); }
.lightbox__next  { top: 50%; right: -12px; transform: translateY(-50%); }

@media (max-width: 700px) {
  .lightbox__prev, .lightbox__next { left: 10px; right: 10px; }
}