/* ---------- CSS RESET (light) ---------- */
* {
  box-sizing: border-box;
}

body {
  margin: 0;
  padding: 0;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
               Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
  line-height: 1.6;
  color: #222;
  background-color: #f7f7f7;
}

/* ---------- LAYOUT ---------- */
main {
  max-width: 900px;
  margin: 0 auto;
  padding: 2rem 1.5rem;
  background-color: rgba(255, 255, 255, 0.9);
  border-radius: 8px;
}

/* ---------- HEADINGS ---------- */
h1, h2, h3 {
  font-weight: 600;
  line-height: 1.25;
  margin-top: 0;
}

h1 {
  font-size: 2.2rem;
}

h2 {
  font-size: 1.5rem;
  margin-bottom: 0.5rem;
  text-align: center;
}

h3 {
  font-size: 1.3rem;
  margin-bottom: 0.75rem;
}

/* ---------- TEXT ---------- */
p {
  margin-bottom: 1.25rem;
  max-width: 70ch;
}

/* ---------- LINKS ---------- */
a {
  color: #2a6fdb;
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

/* ---------- LISTS ---------- */
ul {
  padding-left: 1.2rem;
}

.list li {
  margin-bottom: 0.4rem;
}

/* ---------- SECTIONS (homepage cards) ---------- */
.sections-container {
  display: flex;
  gap: 2rem;
  flex-wrap: wrap;
}

.section {
  flex: 1;
  min-width: 220px;
  background-color: #fafafa;
  padding: 1rem 1.25rem;
  border-radius: 6px;
  border: 1px solid #ddd;
}

/* ---------- N-QUEENS BOARDS ---------- */
.board-list {
  list-style: none;
  padding: 0;
  margin: 2rem 0;
}

.board-item {
  display: flex;
  justify-content: center;
  margin-bottom: 2.5rem;
}

figure {
  margin: 0;
  text-align: center;
}

figcaption {
  margin-bottom: 0.75rem;
  font-weight: 500;
  color: #444;
}

figure img {
  max-width: 90vw;
  border-radius: 4px;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.15);
}

/* ---------- FOOTER ---------- */
footer {
  margin-top: 3rem;
  font-size: 0.9rem;
  color: #555;
  text-align: center;
}

/* ---------- HR ---------- */
hr {
  border: none;
  border-top: 1px solid #ddd;
  margin: 2rem 0;
}
/* ---------- TOP NAV BAR ---------- */
.top-bar {
  background-color: #ffffff;
  border-bottom: 1px solid #ddd;
}

.nav {
  max-width: 900px;
  margin: 0 auto;
  padding: 0.75rem 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

/* Brand / name */
.nav-brand {
  font-weight: 600;
  font-size: 1.1rem;
  color: #222;
}

/* Navigation links */
.nav-links {
  list-style: none;
  display: flex;
  gap: 1.25rem;
  padding: 0;
  margin: 0;
}

.nav-links a {
  color: #333;
  font-size: 0.95rem;
}

.nav-links a:hover {
  color: #2a6fdb;
  text-decoration: none;
}

@media (max-width: 600px) {
  .nav {
    flex-direction: column;
    gap: 0.5rem;
  }

  .nav-links {
    flex-wrap: wrap;
    justify-content: center;
  }
}
#gallery {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px,1fr));
    gap: 12px;
    padding: 10px;
}

.thumb {
    position: relative;
    width: 100%;
    aspect-ratio: 1 / 1;   /* constant ratio */
    overflow: hidden;
    border-radius: 8px;
    cursor: pointer;
}

.thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.25s ease;
}

.thumb:hover img {
    transform: scale(1.08);
}

/* LIGHTBOX */

#lightbox {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.92);

    display: none;
    align-items: center;
    justify-content: center;

    z-index: 1000;
}

#lightbox img {
    max-width: 95%;
    max-height: 95%;
}
