/* ---- Variables ---- */
:root {
  --bg: #0a0a0a;
  --surface: #131313;
  --text: #f0f0f0;
  --muted: #666;
  --accent: #c6ff4e;       /* neon lime — zine/underground */
  --gap: 3px;
  --header-h: 58px;
  --ease: 0.28s ease;
  --pixel: 'Press Start 2P', monospace;
}

/* ---- Reset ---- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, sans-serif;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; height: auto; }
button { background: none; border: none; cursor: pointer; color: inherit; font-family: inherit; line-height: 1; }

/* ---- Header ---- */
#header {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  height: var(--header-h);
  background: rgba(10, 10, 10, 0.88);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.07);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 100%;
  padding: 0 28px;
  max-width: 1440px;
  margin: 0 auto;
}

.logo {
  font-family: var(--pixel);
  font-size: 0.75rem;
  letter-spacing: 0.04em;
  color: var(--text);
  transition: color var(--ease);
  white-space: nowrap;
  line-height: 1;
}
.logo:hover { color: var(--accent); }

#nav-albums {
  display: flex;
  gap: 28px;
  align-items: center;
}

.nav-album-btn {
  font-family: var(--pixel);
  font-size: 0.5rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
  transition: color var(--ease);
  padding: 4px 0;
  position: relative;
  line-height: 1;
}
.nav-album-btn::after {
  content: '';
  position: absolute;
  bottom: -1px; left: 0;
  width: 0;
  height: 1px;
  background: var(--accent);
  transition: width var(--ease);
}
.nav-album-btn:hover { color: var(--text); }
.nav-album-btn:hover::after { width: 100%; }
.nav-album-btn.active { color: var(--accent); }
.nav-album-btn.active::after { width: 100%; }

.header-right {
  display: flex;
  align-items: center;
  gap: 20px;
}

.lang-btn {
  font-family: var(--pixel);
  font-size: 0.5rem;
  letter-spacing: 0.06em;
  color: var(--muted);
  border: 1px solid rgba(255, 255, 255, 0.14);
  padding: 6px 10px;
  border-radius: 1px;
  transition: color var(--ease), border-color var(--ease);
  line-height: 1;
}
.lang-btn:hover { color: var(--accent); border-color: var(--accent); }

.social-link {
  color: var(--muted);
  transition: color var(--ease);
  display: flex;
  align-items: center;
  justify-content: center;
}
.social-link:hover { color: var(--accent); }

/* ---- Hero ---- */
#hero {
  position: relative;
  height: 100vh;
  min-height: 520px;
  background-image: url('https://picsum.photos/seed/hleb_hero/1920/1080');
  background-size: cover;
  background-position: center;
  display: flex;
  align-items: flex-end;
  padding: 0 40px 72px;
}
#hero::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to top,
    rgba(10, 10, 10, 0.92) 0%,
    rgba(10, 10, 10, 0.28) 50%,
    rgba(10, 10, 10, 0.1) 100%
  );
  pointer-events: none;
}

.hero-text {
  position: relative;
  z-index: 1;
}

.hero-name {
  font-family: var(--pixel);
  font-size: clamp(1.1rem, 3vw, 2.4rem);
  letter-spacing: 0.06em;
  line-height: 1.7;
  color: var(--text);
}

.hero-tagline {
  font-family: var(--pixel);
  font-size: 0.55rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--accent);
  margin-top: 18px;
  line-height: 1;
}

/* ---- Albums section ---- */
#albums-section {
  padding: 64px 28px 88px;
  max-width: 1440px;
  margin: 0 auto;
}

#albums-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: var(--gap);
}

.album-card {
  position: relative;
  aspect-ratio: 3 / 2;
  overflow: hidden;
  cursor: pointer;
  background: var(--surface);
}

.album-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.65s ease;
}
.album-card:hover img { transform: scale(1.05); }

.album-card-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(10, 10, 10, 0.78) 0%, transparent 55%);
  transition: background var(--ease);
}
.album-card:hover .album-card-overlay {
  background: linear-gradient(to top, rgba(10, 10, 10, 0.9) 0%, rgba(10, 10, 10, 0.2) 100%);
}

.album-card-label {
  position: absolute;
  bottom: 22px;
  left: 22px;
  z-index: 1;
}
.album-card-title {
  font-family: var(--pixel);
  font-size: 0.85rem;
  letter-spacing: 0.04em;
  color: var(--text);
  line-height: 1.6;
}
.album-card-count {
  font-family: var(--pixel);
  font-size: 0.44rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent);
  margin-top: 8px;
  line-height: 1;
}

/* ---- Album view ---- */
#view-album {
  padding-top: calc(var(--header-h) + 40px);
  min-height: 100vh;
}

.album-view-header {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  padding: 0 28px 36px;
  max-width: 1440px;
  margin: 0 auto;
}

.back-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: var(--pixel);
  font-size: 0.5rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
  transition: color var(--ease);
  justify-self: start;
  line-height: 1;
}
.back-btn:hover { color: var(--accent); }

.album-view-title {
  font-family: var(--pixel);
  font-size: 0.9rem;
  letter-spacing: 0.06em;
  text-align: center;
  color: var(--text);
  line-height: 1.6;
}

.album-view-spacer { justify-self: end; }

/* ---- Masonry ---- */
.masonry {
  columns: 3;
  column-gap: var(--gap);
  padding: 0 var(--gap) var(--gap);
}

.masonry-item {
  break-inside: avoid;
  margin-bottom: var(--gap);
  position: relative;
  cursor: zoom-in;
  overflow: hidden;
  background: var(--surface);
}

.masonry-item img {
  width: 100%;
  display: block;
  transition: transform 0.5s ease;
}
.masonry-item::after {
  content: '';
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0);
  transition: background var(--ease);
  pointer-events: none;
}
.masonry-item:hover img { transform: scale(1.04); }
.masonry-item:hover::after { background: rgba(0, 0, 0, 0.22); }

/* ---- Lightbox ---- */
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: center;
}
.lightbox.hidden { display: none; }

.lb-overlay {
  position: absolute;
  inset: 0;
  background: rgba(4, 4, 4, 0.97);
  cursor: zoom-out;
}

.lb-img-wrap {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;
}

#lb-img {
  max-width: 90vw;
  max-height: 90vh;
  object-fit: contain;
  display: block;
  user-select: none;
  pointer-events: none;
}

.lb-close {
  position: absolute;
  top: 16px; right: 18px;
  z-index: 2;
  color: rgba(255, 255, 255, 0.35);
  padding: 10px;
  transition: color var(--ease);
}
.lb-close:hover { color: var(--accent); }

.lb-prev,
.lb-next {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 2;
  color: rgba(255, 255, 255, 0.32);
  padding: 18px 20px;
  transition: color var(--ease);
}
.lb-prev { left: 4px; }
.lb-next { right: 4px; }
.lb-prev:hover,
.lb-next:hover { color: var(--accent); }

.lb-counter {
  position: absolute;
  bottom: 16px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 2;
  font-family: var(--pixel);
  font-size: 0.55rem;
  letter-spacing: 0.08em;
  color: var(--muted);
  line-height: 1;
}

/* ---- Footer ---- */
#footer {
  border-top: 1px solid rgba(255, 255, 255, 0.07);
  padding: 26px 28px;
  margin-top: 40px;
}

.footer-inner {
  max-width: 1440px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.footer-name {
  font-family: var(--pixel);
  font-size: 0.55rem;
  letter-spacing: 0.04em;
  color: rgba(255, 255, 255, 0.22);
  line-height: 1;
}

.footer-social {
  display: flex;
  gap: 22px;
}

.footer-year {
  font-family: var(--pixel);
  font-size: 0.48rem;
  color: rgba(255, 255, 255, 0.18);
  letter-spacing: 0.04em;
  line-height: 1;
}

/* ---- View visibility ---- */
.hidden { display: none !important; }

/* ---- Responsive ---- */
@media (max-width: 860px) {
  #nav-albums { display: none; }
  .header-inner { padding: 0 18px; }
  .header-right { gap: 14px; }
  #hero { padding: 0 24px 56px; }
  #albums-section { padding: 48px 18px 72px; }
  .album-view-header { padding: 0 18px 28px; }
  #footer { padding: 22px 18px; }
  .masonry { columns: 2; }
}

@media (max-width: 580px) {
  #albums-grid { grid-template-columns: 1fr 1fr; }
  .album-card-title { font-size: 0.48rem; }
  .masonry { columns: 2; }
  .lb-prev { left: 0; padding: 14px 12px; }
  .lb-next { right: 0; padding: 14px 12px; }
  .footer-inner { flex-direction: column; gap: 16px; text-align: center; }
}

@media (max-width: 420px) {
  #albums-grid { grid-template-columns: 1fr; }
  .masonry { columns: 1; }
}
