:root {
  --bg: #edf8ff;
  --bg-2: #dfeef8;
  --bg-3: #d4ebf3;
  --bg-4: #c7e5e8;
  --bg-deep: #bdd8d8;
  --panel: #f5fcff;
  --panel-strong: #d7edf4;
  --section: #d1ebf7;
  --text: #1d3123;
  --muted: #466f7b;
  --primary: #8bb8a9;
  --primary-dark: #5d8d9b;
  --accent: #d9f6ff;
  --accent-2: #abd9ee;
  --accent-3: #cdeef7;
  --pixel: #2d4d5f;
  --line: rgba(45, 77, 95, 0.16);
  --shadow: 0 10px 0 rgba(45, 77, 95, 0.7);
  --mountain-back-shape: polygon(0% 100%, 0% 72%, 12% 58%, 24% 76%, 36% 50%, 52% 72%, 64% 46%, 78% 80%, 88% 56%, 100% 72%, 100% 100%);
  --mountain-front-shape: polygon(0% 100%, 0% 84%, 12% 64%, 26% 82%, 40% 52%, 54% 78%, 68% 58%, 82% 84%, 100% 74%, 100% 100%);
  --mountain-back-light: 120 58% 72%;
  --mountain-back-mid: 127 34% 62%;
  --mountain-back-deep: 124 28% 46%;
  --mountain-front-light: 124 52% 70%;
  --mountain-front-mid: 126 30% 52%;
  --mountain-front-deep: 124 26% 34%;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: "VT323", monospace;
  background: linear-gradient(180deg, #edf9ff 0%, #dfeef9 18%, #d7edf1 42%, #d0e7d7 68%, #c6d8c2 100%);
  color: var(--text);
  letter-spacing: 0.04em;
  overflow-x: hidden;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  background-image:
    linear-gradient(rgba(45,77,95,0.06) 1px, transparent 1px),
    linear-gradient(90deg, rgba(45,77,95,0.06) 1px, transparent 1px);
  background-size: 18px 18px;
  pointer-events: none;
  z-index: 0;
}

body::after {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  background:
    radial-gradient(circle at 18% 24%, rgba(255,255,255,0.92) 0 10%, rgba(255,255,255,0.24) 10.5%, transparent 18%),
    radial-gradient(circle at 38% 17%, rgba(255,255,255,0.78) 0 9%, rgba(255,255,255,0.18) 9.5%, transparent 16%),
    radial-gradient(circle at 62% 27%, rgba(255,255,255,0.8) 0 9%, rgba(255,255,255,0.22) 9.5%, transparent 17%),
    radial-gradient(circle at 82% 21%, rgba(255,255,255,0.82) 0 10%, rgba(255,255,255,0.18) 10.5%, transparent 17%);
  background-repeat: repeat-x;
  background-size: 640px 220px;
  filter: blur(1.5px);
  animation: cloudDrift 30s linear infinite;
  opacity: 0.95;
}

@keyframes cloudDrift {
  0% { transform: translateX(-100px); }
  100% { transform: translateX(160px); }
}

.sky-mountains {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  height: 260px;
  z-index: 0;
  pointer-events: none;
  opacity: 0.9;
  transform: translateY(8px) scale(1.06);
}

.mountain-range {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 100%;
}

.mountain {
  position: absolute;
  bottom: 0;
  display: block;
  width: 32%;
  height: 70%;
  background: linear-gradient(180deg, rgba(162, 206, 170, 0.95), rgba(101, 153, 109, 0.98) 45%, rgba(62, 103, 72, 1) 100%);
  clip-path: polygon(0% 100%, 18% 60%, 30% 42%, 43% 58%, 57% 28%, 71% 60%, 82% 44%, 100% 100%);
  box-shadow: inset 0 18px 18px rgba(255,255,255,0.08);
}

.mountain.snow::after {
  content: "";
  position: absolute;
  left: 18%;
  top: 12%;
  width: 42%;
  height: 24%;
  background: linear-gradient(180deg, rgba(255,255,255,0.85), rgba(255,255,255,0.2));
  clip-path: polygon(0% 100%, 35% 25%, 58% 100%);
}

.mountain-far {
  opacity: 0.52;
  filter: blur(0.6px);
}

.mountain-mid {
  height: 88%;
  opacity: 0.72;
}

.mountain-near {
  height: 100%;
  opacity: 0.82;
}

.m1 { left: -4%; width: 34%; height: 62%; }
.m2 { left: 22%; width: 30%; height: 70%; }
.m3 { right: 0; width: 35%; height: 64%; }

.m4 { left: 2%; width: 32%; height: 80%; }
.m5 { left: 31%; width: 32%; height: 76%; }
.m6 { right: 12%; width: 34%; height: 84%; }

.m7 { left: 0; width: 34%; height: 92%; }
.m8 { left: 30%; width: 32%; height: 88%; }
.m9 { right: 2%; width: 34%; height: 94%; }

@keyframes mountainFloat {
  0% { transform: translateX(-6px); }
  100% { transform: translateX(12px); }
}

.mountain-range.mountain-far .mountain,
.mountain-range.mountain-mid .mountain,
.mountain-range.mountain-near .mountain {
  animation: mountainFloat 20s ease-in-out infinite alternate;
}

a {
  color: inherit;
  text-decoration: none;
}

img {
  max-width: 100%;
  display: block;
}

.container {
  width: min(1100px, calc(100% - 30px));
  margin: 0 auto;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 10;
  background: rgba(223, 242, 250, 0.9);
  border-bottom: 4px solid var(--pixel);
  box-shadow: 0 4px 0 rgba(45, 77, 95, 0.15);
}

.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 82px;
  gap: 18px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  font-family: "Press Start 2P", cursive;
  font-size: 0.8rem;
  text-transform: uppercase;
}

.brand-mark {
  width: 38px;
  height: 38px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 3px solid var(--pixel);
  background: linear-gradient(135deg, var(--primary), var(--accent));
  color: var(--pixel);
  box-shadow: 4px 4px 0 var(--pixel);
}

.menu {
  display: flex;
  gap: 22px;
  font-family: "Press Start 2P", cursive;
  font-size: 0.56rem;
  color: var(--pixel);
  text-transform: uppercase;
}

.nav-visit-counter {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-left: auto;
  padding: 10px 14px;
  border: 3px solid var(--pixel);
  background: linear-gradient(135deg, #dff4ff, #cfeaf5);
  box-shadow: 4px 4px 0 var(--pixel);
  color: var(--pixel);
  font-family: "Press Start 2P", cursive;
  font-size: 0.46rem;
  text-transform: uppercase;
}

.visit-label {
  opacity: 0.9;
}

.visit-count {
  min-width: 28px;
  text-align: center;
  display: inline-block;
  background: rgba(255, 255, 255, 0.28);
  padding: 4px 6px;
  border: 2px solid var(--pixel);
}

.menu a {
  position: relative;
  padding-bottom: 4px;
}

.menu a::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  width: 100%;
  height: 3px;
  background: var(--primary-dark);
  transform: scaleX(0);
  transition: transform 0.15s ease;
}

.menu a:hover::after {
  transform: scaleX(1);
}

.hero {
  padding: 70px 0 30px;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 40px;
  align-items: center;
}

.eyebrow {
  margin: 0 0 12px;
  font-family: "Press Start 2P", cursive;
  font-size: 0.56rem;
  color: var(--primary-dark);
  text-transform: uppercase;
}

.hero-copy h1 {
  margin: 0;
  font-family: "Press Start 2P", cursive;
  font-size: clamp(1.4rem, 2.2vw, 2.6rem);
  line-height: 1.5;
  text-shadow: 2px 2px 0 rgba(46, 75, 56, 0.18);
}

.hero-text {
  max-width: 620px;
  margin: 18px 0 0;
  font-size: 1.25rem;
  line-height: 1.5;
  color: var(--muted);
}

.pixel-tag {
  display: inline-block;
  margin-top: 18px;
  padding: 10px 14px;
  border: 3px solid var(--pixel);
  background: var(--panel-strong);
  box-shadow: 4px 4px 0 var(--pixel);
  font-family: "Press Start 2P", cursive;
  font-size: 0.5rem;
  text-transform: uppercase;
  color: var(--pixel);
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 18px;
  margin-top: 28px;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 52px;
  padding: 0 22px;
  border: 3px solid var(--pixel);
  box-shadow: 4px 4px 0 var(--pixel);
  font-family: "Press Start 2P", cursive;
  font-size: 0.5rem;
  text-transform: uppercase;
  transition: transform 0.15s ease;
}

.button:hover {
  transform: translate(-2px, -2px);
  box-shadow: 6px 6px 0 var(--pixel);
}

.button.primary {
  background: linear-gradient(135deg, var(--primary), var(--accent-2));
  color: var(--pixel);
}

.button.secondary {
  background: #f3f8eb;
  color: var(--pixel);
}

.hero-card {
  position: relative;
  background: rgba(255, 255, 255, 0.5);
  border: 4px solid var(--pixel);
  box-shadow: 8px 8px 0 var(--pixel);
  padding: 18px;
}

.hero-card::before {
  content: "";
  position: absolute;
  inset: 12px;
  border: 2px solid rgba(46, 75, 56, 0.35);
  pointer-events: none;
}

.mini-gallery {
  overflow: hidden;
  background: var(--section);
  border: 3px solid var(--pixel);
}

.mini-gallery img {
  width: 100%;
  height: 480px;
  object-fit: cover;
  image-rendering: pixelated;
}

.mini-info {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 16px 18px 18px;
  background: #edf6dc;
  border-top: 3px solid var(--pixel);
  font-family: "Press Start 2P", cursive;
  font-size: 0.48rem;
  text-transform: uppercase;
}

.mini-info strong {
  font-size: 0.55rem;
}

.mini-info span {
  color: var(--muted);
}

.upload-section,
.gallery-section {
  padding: 18px 0 24px;
}

.section-heading {
  margin-bottom: 24px;
}

.section-heading h2 {
  margin: 0;
  font-family: "Press Start 2P", cursive;
  font-size: clamp(1rem, 2vw, 1.7rem);
  text-transform: uppercase;
  line-height: 1.6;
}

.upload-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 22px;
}

.upload-box {
  background: rgba(245, 255, 232, 0.8);
  border: 4px solid var(--pixel);
  box-shadow: 6px 6px 0 var(--pixel);
  border-radius: 0;
  padding: 22px 20px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 16px;
}

.upload-box h3 {
  margin: 0;
  font-family: "Press Start 2P", cursive;
  font-size: 0.72rem;
  text-transform: uppercase;
  line-height: 1.5;
}

.upload-box input[type="file"] {
  display: none;
}

.upload-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 12px 18px;
  background: linear-gradient(135deg, #dfeecf, #a4d2a6);
  border: 3px solid var(--pixel);
  color: var(--pixel);
  box-shadow: 4px 4px 0 var(--pixel);
  font-family: "Press Start 2P", cursive;
  font-size: 0.46rem;
  text-transform: uppercase;
  cursor: pointer;
  transition: transform 0.15s ease;
}

.upload-button:hover {
  transform: translate(-2px, -2px);
}

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 24px;
}

.photo-card {
  display: flex;
  flex-direction: column;
  background: rgba(255, 255, 255, 0.82);
  border: 4px solid var(--pixel);
  box-shadow: 6px 6px 0 var(--pixel);
  overflow: hidden;
}

.photo-card img {
  width: 100%;
  height: 270px;
  object-fit: cover;
  image-rendering: pixelated;
}

.photo-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 12px 14px 12px 16px;
  font-family: "Press Start 2P", cursive;
  font-size: 0.46rem;
  color: var(--pixel);
  background: #edf6dc;
  text-transform: uppercase;
}

.photo-meta > span {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.like-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-width: 72px;
  min-height: 30px;
  padding: 6px 10px;
  border: 0;
  border-left: 3px solid var(--pixel);
  background: linear-gradient(135deg, #dfeecf, #bfe0b8);
  color: var(--pixel);
  font-family: "Press Start 2P", cursive;
  font-size: 0.46rem;
  text-transform: uppercase;
  cursor: pointer;
  transition: transform 0.15s ease, background 0.15s ease;
  margin-left: auto;
}

.like-button:hover:not(:disabled) {
  transform: translateY(-1px);
}

.like-button:disabled,
.like-button.liked {
  background: linear-gradient(135deg, #cbe7c0, #9ac589);
  cursor: default;
}

.heart {
  font-size: 0.9rem;
  line-height: 1;
}

.like-count {
  font-size: 0.48rem;
}

.page-shell {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  gap: 28px;
  width: min(1240px, calc(100% - 30px));
  margin: 0 auto;
  align-items: start;
  padding: 24px 0 12px;
}

.content-area,
.comment-sidebar,
.topbar,
.footer {
  position: relative;
  z-index: 2;
}

.content-area {
  min-width: 0;
}

.comment-sidebar {
  position: sticky;
  top: 100px;
}

.sidebar-panel {
  background: rgba(245, 255, 232, 0.9);
  border: 4px solid var(--pixel);
  box-shadow: 6px 6px 0 var(--pixel);
  padding: 18px;
}

.sidebar-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 16px;
}

.sidebar-header h3 {
  margin: 0;
  font-family: "Press Start 2P", cursive;
  font-size: 0.7rem;
  text-transform: uppercase;
  color: var(--pixel);
}

.sidebar-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 6px 8px;
  background: var(--primary);
  border: 2px solid var(--pixel);
  font-family: "Press Start 2P", cursive;
  font-size: 0.42rem;
  color: var(--pixel);
}

.comment-form {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.comment-form label {
  display: flex;
  flex-direction: column;
  gap: 8px;
  color: var(--pixel);
  font-family: "Press Start 2P", cursive;
  font-size: 0.46rem;
  text-transform: uppercase;
}

.comment-form input,
.comment-form textarea {
  width: 100%;
  border: 3px solid var(--pixel);
  background: #fffdf7;
  padding: 10px 12px;
  font: inherit;
  color: var(--pixel);
  resize: vertical;
}

.comment-form textarea {
  min-height: 96px;
}

.comment-button {
  width: 100%;
  margin-top: 4px;
  cursor: pointer;
}

.comments-list {
  margin-top: 18px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.comment-item {
  background: #edf6dc;
  border: 3px solid var(--pixel);
  padding: 10px 12px;
  box-shadow: 3px 3px 0 var(--pixel);
}

.comment-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 8px;
}

.comment-author {
  font-family: "Press Start 2P", cursive;
  font-size: 0.42rem;
  color: var(--pixel);
  text-transform: uppercase;
}

.comment-time {
  font-size: 0.42rem;
  color: var(--muted);
}

.comment-text {
  margin: 0;
  font-size: 1.05rem;
  line-height: 1.4;
  color: var(--text);
}

.footer {
  padding: 26px 0 42px;
}

.footer-inner {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  color: var(--pixel);
  border-top: 4px solid var(--pixel);
  padding-top: 18px;
  font-family: "Press Start 2P", cursive;
  font-size: 0.48rem;
  text-transform: uppercase;
}

@media (max-width: 980px) {
  .page-shell {
    grid-template-columns: 1fr;
  }

  .comment-sidebar {
    position: static;
  }
}

@media (max-width: 860px) {
  .hero-grid,
  .upload-grid {
    grid-template-columns: 1fr;
  }

  .menu {
    display: none;
  }

  .footer-inner {
    flex-direction: column;
  }
}
