/* styles.css — вставь в отдельный файл или между <style>…</style> */
:root{
  --bg: #101010;
  --card-bg: rgba(255,255,255,0.03);
  --accent: #7c5cff;
  --muted: #bdbdbd; /* rgba(255,255,255,0.7); */
  --glass: rgba(255,255,255,0.04);
  --radius: 12px;
  --gap: 18px;
  --text: #17e305;
  --max-width: 1200px;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial;
  -webkit-font-smoothing:antialiased;
  -moz-osx-font-smoothing:grayscale;
}

@font-face {
    font-family: font;
src:url(font/lcdtygra.ttf);
   }

*{box-sizing:border-box}
html,body{height:100%}
body{
	font-family: font, monospace;
  margin:0;
  background: linear-gradient(180deg,var(--bg) 0%, #121212 100%);
  color:var(--text);
  display:flex;
  flex-direction:column;
  align-items:center;
  padding:36px 20px;
  font-weight: 600;
  gap:28px;
  background-attachment: fixed;
}

/* Header */
.site-header{
  width:100%;
  max-width:var(--max-width);
  text-align:center;
  margin-bottom:6px;
}
.site-header h1{
  margin:0;
  font-size:clamp(20px,4vw,34px);
  letter-spacing:-0.02em;
}
.subtitle{
  margin:6px 0 0;
  color:var(--muted);
  font-size:0.95rem;
}

/* Gallery grid */
.gallery{
  width:100%;
  max-width:var(--max-width);
  display:grid;
  grid-template-columns: repeat(auto-fill, minmax(700px, 1fr));
  gap:var(--gap);
  align-items:stretch;
  padding:6px;
}

/* Card (figure) */
.card{
  position:relative;
  overflow:hidden;
  border-radius:var(--radius);
  background:var(--card-bg);
  box-shadow: 0 6px 18px rgba(2,6,23,0.6), inset 0 1px 0 rgba(255,255,255,0.02);
  transform:translateZ(0);
  transition:transform .32s cubic-bezier(.2,.9,.3,1), box-shadow .32s;
  cursor:zoom-in;
  min-height:150px;
  display:flex;
}

/* Image fits and stays centered */
.card img{
  width:100%;
  height:100%;
  object-fit:cover;
  display:block;
  transition:transform .6s cubic-bezier(.2,.9,.3,1);
}

/* Caption overlay */
.card figcaption{
  position:absolute;
  left:0;
  right:0;
  bottom:0;
  padding:16px;
  background: linear-gradient(180deg, rgba(5,8,15,0) 0%, rgba(3,6,12,0.55) 55%, rgba(2,4,8,0.8) 100%);
  color:var(--text);
  transform:translateY(0);
  transition: transform .28s ease, opacity .28s ease;
  pointer-events:none;
}

/* Title and small text */
.card figcaption h2{
  margin:0 0 6px;
  font-size:1.05rem;
  font-weight:600;
}
.card figcaption p{
  margin:0;
  font-size:0.85rem;
  color:var(--muted);
}

/* Hover / focus effects */
.card:hover, .card:focus-within{
  transform: translateY(-8px) scale(1.01);
  box-shadow: 0 18px 40px rgba(7,10,30,0.7);
}
.card:hover img, .card:focus-within img{
  transform: scale(1.08) rotate(.3deg);
}

/* Optional: show more of caption on hover */
.card figcaption{
  transform: translateY(0);
}
.card:hover figcaption, .card:focus-within figcaption{
  transform: translateY(0);
  opacity:1;
}

/* Accessibility: make card focusable */
.card{outline:none}
.card:focus-visible{box-shadow:0 0 0 3px rgba(124,92,255,0.22), 0 12px 28px rgba(1,8,20,0.6)}

/* Footer */
.site-footer{
  width:100%;
  max-width:var(--max-width);
  text-align:center;
  color:var(--muted);
  font-size:0.9rem;
  padding:12px 0 40px;
}

/* Responsive tweaks */
@media (max-width:520px){
  :root{--gap:12px}
  .gallery{grid-template-columns: repeat(2, 1fr)}
  .site-header h1{font-size:20px}
}

@media (max-width:360px){
  .gallery{grid-template-columns: 1fr}
  .card{min-height:180px}
}


/* === FULLSCREEN (LIGHTBOX) === */
#lightbox {
  position: fixed;
  inset: 0;
  background: linear-gradient(180deg,var(--bg) 0%,  #121212 100%);
  display: none;
  justify-content: center;
  align-items: center;
  z-index: 9999;
}
#lightbox img {
  max-width: 99%;
  max-height: 99%;
  border-radius: var(--radius);
  box-shadow: 0 0 25px rgba(0,0,0,.7);
  animation: fadeIn .3s ease;
}
#lightbox.show {
  display: flex;
}
#lightbox::after {
  content: "ﾒ";
  position: fixed;
  top: 20px;
  right: 30px;
  color: red;
  font-size: 42px;
  font-weight: 300;
  cursor: pointer;
}
@keyframes fadeIn {from{opacity:0;transform:scale(.97)}to{opacity:1;transform:scale(1)}}