@font-face {
  font-family: 'FlexiVGA';
  src: url('Flexi_IBM_VGA_False.ttf');
}

*, *::before, *::after {
  box-sizing: border-box;
}

html, body {
  margin: 0;
  padding: 0;
  height: 100%;
  background-color: #555;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
}

canvas {
  display: block;
  position: fixed;
  top: 0;
  left: 0;
  z-index: 1;
  pointer-events: none;
}

/* ── Nav ── */
nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  background: white;
  border-bottom: 1px solid black;
  border-radius: 0;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 20px;
  height: 48px;
}

.logo {
  font-family: 'FlexiVGA', monospace;
  font-size: 1.2rem;
  color: black;
  cursor: pointer;
  user-select: none;
}

.nav-links {
  display: flex;
  gap: 24px;
}

.nav-links button {
  background: none;
  border: none;
  font-family: sans-serif;
  font-size: 1rem;
  color: black;
  cursor: pointer;
  padding: 0;
}

.nav-links button:hover {
  text-decoration: underline;
}

/* ── Sections ── */
section {
  display: none;
  position: fixed;
  top: 48px;
  bottom: 40px;
  left: 0;
  right: 0;
  z-index: 10;
  overflow-y: auto;
  align-items: center;
  justify-content: center;
  flex-direction: column;
}

section.active {
  display: flex;
}

/* ── Home ── */
.home-content {
  display: inline-flex;
  flex-direction: column;
  align-items: stretch;
}

.home-label {
  background: white;
  border: 1px solid black;
  border-bottom: none;
  padding: 8px 12px;
  font-family: sans-serif;
  font-weight: bold;
  font-size: 1rem;
  color: black;
  text-align: left;
}

#email-form {
  display: flex;
}

#email-form input[type="email"] {
  padding: 8px 12px;
  border: 1px solid black;
  border-right: none;
  border-radius: 0;
  font-size: 1rem;
  font-family: sans-serif;
  outline: none;
  flex: 1;
  min-width: 180px;
}

#email-form button {
  padding: 8px 16px;
  background: white;
  border: 1px solid black;
  border-radius: 0;
  cursor: pointer;
  font-family: sans-serif;
  font-size: 1rem;
  color: black;
  white-space: nowrap;
  -webkit-appearance: none;
}

#email-form button:hover {
  background: black;
  color: white;
}

#form-msg {
  margin-top: 8px;
  font-family: sans-serif;
  font-size: 0.9rem;
  color: white;
  text-shadow: 0 1px 4px rgba(0,0,0,0.6);
  min-height: 1.2em;
}

/* ── About ── */
#about {
  padding: 20px 20px 20px 60px;
  align-items: flex-start;
  justify-content: center;
}

.about-content {
  max-width: 480px;
  background: white;
  border: 1px solid black;
  color: black;
  padding: 24px;
  font-family: sans-serif;
  font-size: 1rem;
  line-height: 1.5;
}

.about-content .otu-word {
  font-family: 'FlexiVGA', monospace;
  font-weight: bold;
}

.about-content p {
  margin: 0 0 16px;
}

.about-content p:last-child {
  margin-bottom: 0;
}

@media (max-width: 600px) {
  #about {
    padding: 20px;
    align-items: center;
  }
}

/* ── Otus grid ── */
#otus {
  padding: 20px;
  align-items: stretch;
  justify-content: flex-start;
  overflow-x: hidden;
}

.photo-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 1px;
  background: black;
  border: 1px solid black;
  width: 100%;
}

.photo-grid .cell {
  display: flex;
  flex-direction: column;
  background: #ccc;
}

.cell-title {
  background: white;
  border-bottom: 1px solid black;
  padding: 4px 8px;
  font-family: sans-serif;
  font-size: 0.75rem;
  color: black;
  white-space: nowrap;
}

.cell-image {
  flex: 1;
  aspect-ratio: 1;
  background: #ccc;
  overflow: hidden;
}

.cell-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* ── Footer ── */
footer {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 100;
  height: 40px;
  background: white;
  border-top: 1px solid black;
  border-radius: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: sans-serif;
  font-size: 0.85rem;
  color: black;
}
