/* Save file as: style.css
   Usage: put index.html and style.css in same folder and open index.html
*/

/* --- Variables / Palette (dark theme) --- */
:root{
  --bg: #070707;            /* page background */
  --panel: #0f0f10;         /* panels / cards */
  --muted: #bdbdbd;         /* text muted */
  --text: #efefef;          /* main text */
  --accent: #40a7ff;        /* hover / accent */
  --border: rgba(255,255,255,0.06);
  --border-hover: rgba(255,255,255,0.18);
}

/* Reset / box-sizing */
*{ box-sizing: border-box; }
html,body{ height:100%; }
body{
  margin:0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  background: var(--bg);
  color: var(--text);
  -webkit-font-smoothing:antialiased;
  -moz-osx-font-smoothing:grayscale;
  display:flex;
  justify-content:center; /* center the container */
}

/* Centered container with fixed max width */
.container{
  width:100%;
  max-width:1280px; /* requested max width */
  padding:20px;
  margin: 0 12px;
}

/* Header */
.site-header{
  text-align:center;
  margin-bottom:12px;
}
.site-title{
  margin:0;
  font-size:28px;
  letter-spacing:0.5px;
  color:var(--text);
}
.site-nav{
  margin-top:8px;
  display:flex;
  gap:12px;
  justify-content:center;
  flex-wrap:wrap;
}
.site-nav a{
  color:var(--muted);
  text-decoration:none;
  font-weight:600;
  font-size:14px;
  padding:6px 8px;
  border-radius:4px;
}
.site-nav a:hover{
  color:var(--text);
  background: rgba(255,255,255,0.02);
}

/* Top links / categories */
.top-links{
  display:flex;
  gap:12px;
  justify-content:center;
  flex-wrap:wrap;
  margin:16px 0;
}
.top-links a{
  color:var(--accent);
  text-decoration:none;
  padding:6px 10px;
  background: rgba(255,255,255,0.01);
  border-radius:6px;
  font-weight:600;
}
.top-links a:hover{
  text-decoration:underline;
}

/* Section title */
.section-title{
  text-align:center;
  margin: 6px 0 10px;
  font-size:20px;
  color:var(--text);
}

/* GALLERY GRID
   - fixed thumbnail size on desktop: 120px x 160px
   - exact gap = 4px
   - centered grid inside container
*/
.gallery{
  display:grid;
  grid-template-columns: repeat(auto-fill, 120px); /* fixed column width */
  gap: 4px; /* exact spacing requested */
  justify-content: center; /* center the grid when there's extra space */
  padding: 4px 0 18px;
}

/* Each clickable item uses a border that becomes lighter on hover */
.gallery-item{
  display:block;
  width:120px;        /* fixed thumbnail box (desktop) */
  height:160px;
  background:var(--panel);
  border-radius:4px;
  overflow:hidden;
  border: 2px solid var(--border);
  transition: border-color .18s ease, transform .12s ease, box-shadow .12s ease;
  text-decoration:none;
  -webkit-tap-highlight-color: transparent;
}
.gallery-item:hover{
  border-color: var(--border-hover);
  transform: translateY(-4px);
  box-shadow: 0 10px 30px rgba(0,0,0,0.6);
}

/* Images fill the thumbnail box and keep aspect ratio */
.gallery-item img{
  width:100%;
  height:100%;
  object-fit:cover;
  display:block;
}

/* LINKS COLUMNS (two columns under the gallery) */
.links-columns{
  display:grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px 28px;
  max-width: 900px;
  margin: 18px auto 8px;
  padding-top: 6px;
}
.links-columns ul{
  list-style:none;
  padding:0;
  margin:0;
}
.links-columns li + li{ margin-top:8px; }
.links-columns a{
  color:var(--muted);
  text-decoration:none;
  font-weight:500;
}
.links-columns a:hover{ color:var(--text); text-decoration:underline; }

/* Footer */
.site-footer{
  margin-top:20px;
  text-align:center;
  color: #888;
  font-size:13px;
  padding:10px 0 30px;
}

/* ------------------------
   RESPONSIVE: Mobile / Tablet
   - mobile: exactly 2 columns in gallery
   - thumbnails scale to available column width, preserve 3:4 (use aspect-ratio where supported)
   - gap stays 4px
   ------------------------ */
@media (max-width: 768px) {
  .container{ padding:12px; }

  .site-title{ font-size:20px; }

  /* exactly 2 columns per row on mobile */
  .gallery{
    grid-template-columns: repeat(2, 1fr); /* two equal columns */
    gap: 4px;
  }

  /* make item fill the column width and keep 3:4 ratio */
  .gallery-item{
    width:100%;
    height:auto;
  }
  .gallery-item img{
    width:100%;
    height:auto;
    aspect-ratio: 3 / 4; /* keeps height proportional to width */
    display:block;
  }

  /* Links columns -> single column on narrow screens */
  .links-columns{
    grid-template-columns: 1fr;
    gap:10px;
    padding-top:12px;
  }

  .site-nav{ gap:8px; }
  .top-links{ gap:8px; }
}
