/*!
 * koshkin.su — personal site shell
 * Aesthetic: web 1.5 / early–mid 2000s personal homepage
 */

@import url("https://fonts.googleapis.com/css2?family=Press+Start+2P&display=swap");

:root {
  --bg-page: #1a4a5c;
  --bg-tile: #0d3340;
  --paper: #e8f0f4;
  --paper-edge: #c5d8e0;
  --ink: #102030;
  --link: #0033cc;
  --link-visited: #551a8b;
  --link-hover: #cc6600;
  --nav-bg: #024f66;
  --nav-border: #012a38;
  --accent: #ff7700;
  --hr: #7a9aaa;
  --guest: #ffffcc;
  --shadow: #001820;
  /* ~25% шире прежних 820px; на узких экранах сжимается сама */
  --max: 1025px;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  font-size: 16px;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--ink);
  font-family: Verdana, Geneva, Tahoma, sans-serif;
  font-size: 14px;
  line-height: 1.55;
  background-color: var(--bg-page);
  background-image:
    radial-gradient(circle at 1px 1px, rgba(255, 255, 255, 0.06) 1px, transparent 0);
  background-size: 18px 18px;
}

a {
  color: var(--link);
  text-decoration: underline;
}

a:visited {
  color: var(--link-visited);
}

a:hover,
a:focus {
  color: var(--link-hover);
}

img {
  max-width: 100%;
  height: auto;
}

/* Outer stage — широкая на десктопе, на всю полезную ширину на мобиле */
.page {
  width: min(var(--max), calc(100% - 24px));
  max-width: 100%;
  margin: 24px auto 40px;
}

/* Top banner — brand-first, web 1.5 */
.site-banner {
  background: linear-gradient(180deg, #036a85, #024f66 55%, #013848);
  border: 3px solid #000;
  border-bottom: none;
  box-shadow: 4px 4px 0 var(--shadow);
  text-align: center;
  padding: 14px 12px 10px;
}

.site-banner .logo-img {
  display: inline-block;
  height: 48px;
  width: auto;
  border: 2px solid #000;
  background: #fff;
  image-rendering: auto;
}

.site-banner .site-title {
  margin: 12px 0 10px;
  font-family: "Press Start 2P", monospace;
  font-size: clamp(11px, 2.2vw, 14px);
  font-weight: normal;
  line-height: 1.6;
  color: #fff;
  text-shadow: 2px 2px 0 #000;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.site-banner .site-tagline {
  margin: 0;
  font-family: "Press Start 2P", monospace;
  font-size: clamp(7px, 1.5vw, 9px);
  line-height: 1.7;
  color: #ffcc88;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  text-shadow: 1px 1px 0 #000;
}

/* Nav bar under banner */
.site-nav {
  background: var(--nav-bg);
  border: 3px solid #000;
  border-top: 2px solid #3a7a90;
  box-shadow: 4px 4px 0 var(--shadow);
  margin-bottom: 0;
}

.site-nav ul {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0;
  list-style: none;
  margin: 0;
  padding: 0;
}

.site-nav a {
  display: block;
  padding: 8px 12px;
  color: #fff !important;
  text-decoration: none;
  font-size: 12px;
  font-weight: bold;
  border-right: 1px solid #013848;
  border-left: 1px solid #3a7a90;
}

.site-nav a:hover,
.site-nav a:focus,
.site-nav .active > a {
  background: var(--accent);
  color: #000 !important;
}

.site-nav .has-children {
  position: relative;
}

.site-nav .submenu {
  display: none;
  position: absolute;
  left: 0;
  top: 100%;
  min-width: 160px;
  background: #013848;
  border: 2px solid #000;
  z-index: 20;
  list-style: none;
  margin: 0;
  padding: 0;
}

.site-nav .has-children:hover > .submenu,
.site-nav .has-children:focus-within > .submenu {
  display: block;
}

.site-nav .submenu a {
  border: none;
  border-bottom: 1px solid #024f66;
  text-align: left;
  font-weight: normal;
}

/* Content paper */
.site-main {
  background: var(--paper);
  border: 3px solid #000;
  border-top: none;
  box-shadow: 4px 4px 0 var(--shadow);
  padding: 22px 20px 28px;
  min-height: 280px;
}

.site-main h1 {
  margin: 0 0 14px;
  font-size: 22px;
  font-family: Georgia, "Times New Roman", serif;
  color: #024f66;
  border-bottom: 2px dashed var(--hr);
  padding-bottom: 8px;
}

.site-main h2 {
  font-size: 17px;
  margin: 1.2em 0 0.5em;
  color: #024f66;
}

/* Home / about card */
.about-block {
  text-align: center;
}

.about-block .portrait {
  margin: 0 auto 14px;
  border: 4px double #000;
  background: #fff;
  padding: 3px;
  width: min(420px, 100%);
}

.about-block .headline {
  font-family: Georgia, "Times New Roman", serif;
  font-size: 26px;
  margin: 0 0 6px;
  color: #024f66;
}

.about-block .role {
  margin: 0 0 12px;
  font-size: 15px;
  font-weight: bold;
}

.about-block .email {
  margin: 0 0 8px;
  font-size: 14px;
}

.hits {
  margin: 14px 0 0;
  font-size: 13px;
  font-family: Verdana, Geneva, Tahoma, sans-serif;
}

.hits .counter {
  display: inline-block;
  margin-left: 4px;
  background: #000;
  color: #0f0;
  padding: 2px 8px;
  border: 2px inset #444;
  font-family: "Press Start 2P", monospace;
  font-size: 10px;
  line-height: 1.6;
  font-variant-numeric: tabular-nums;
  vertical-align: middle;
}

.about-text {
  margin-top: 22px;
  text-align: left;
  font-size: 13px;
  line-height: 1.6;
}

.about-text p {
  margin: 0 0 0.9em;
}

.about-text p:last-child {
  margin-bottom: 0;
}

.guestbook-box {
  margin-top: 18px;
  background: var(--guest);
  border: 2px inset #999;
  padding: 12px 14px;
  font-size: 13px;
  text-align: left;
  line-height: 1.55;
}

.guestbook-box .label {
  font-weight: bold;
  color: #333;
}

/* Article list (for category pages) */
.article-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.article-list li {
  padding: 10px 0;
  border-bottom: 1px dotted var(--hr);
}

.article-list li:last-child {
  border-bottom: none;
}

.article-list a {
  font-weight: bold;
  font-size: 14px;
}

.article-list .meta {
  display: block;
  font-size: 11px;
  color: #556;
  margin-top: 2px;
}

.article-body {
  font-size: 14px;
  text-align: left;
}

.article-body img {
  margin: 12px auto;
  border: 1px solid #000;
}

.article-body blockquote {
  margin: 1em 0;
  padding: 0.5em 1em;
  border-left: 4px solid var(--accent);
  background: #f3f8fa;
}

.article-page h1 {
  text-align: left;
}

.article-page .meta {
  font-size: 12px;
  color: #556;
  margin: -6px 0 16px;
}

.article-page .back {
  margin-top: 24px;
  padding-top: 12px;
  border-top: 1px dotted var(--hr);
  font-size: 13px;
}

/* Cinema / media tables — web 1.5 */
.cinema-section {
  margin: 1.4em 0 0.6em;
  font-size: 16px;
  color: #024f66;
  border-bottom: 2px dashed var(--hr);
  padding-bottom: 4px;
}

.media-table-wrap {
  width: 100%;
  overflow-x: auto;
  margin: 0 0 1.4em;
  border: 2px solid #000;
  background: #fff;
  box-shadow: 3px 3px 0 var(--shadow);
}

.media-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12px;
  font-family: Verdana, Geneva, Tahoma, sans-serif;
}

.media-table th,
.media-table td {
  border: 1px solid #000;
  padding: 6px 8px;
  vertical-align: middle;
}

.media-table thead th {
  background: #024f66;
  color: #fff;
  font-size: 11px;
  text-align: center;
  white-space: nowrap;
}

.media-table tbody tr:nth-child(even) {
  background: #f3f8fa;
}

.media-table tbody tr:hover {
  background: #ffffcc;
}

.media-table .col-rate {
  width: 4.2rem;
  text-align: center;
}

.media-table .col-title {
  text-align: left;
  font-weight: bold;
  min-width: 10rem;
}

.media-table .col-year,
.media-table .col-genre,
.media-table .col-views,
.media-table .col-when,
.media-table .col-playable,
.media-table .col-appearance,
.media-table .col-status {
  text-align: center;
  white-space: nowrap;
}

.media-table .col-genre,
.media-table .col-role,
.media-table .col-country,
.media-table .col-region,
.media-table .col-place,
.media-table .col-address,
.media-table .col-type,
.media-table .col-mod {
  white-space: normal;
}

.myth-table-label {
  margin: 0.2em 0 0.45em;
  font-size: 12px;
  font-weight: bold;
  color: #024f66;
}

.media-table .col-genre {
  max-width: 9rem;
}

.media-table .col-creature {
  text-align: left;
  min-width: 8rem;
  vertical-align: middle;
}

.media-table .col-empty {
  text-align: center;
  color: #668;
  font-style: italic;
  padding: 12px 8px;
}

.rate-led {
  display: inline-block;
  min-width: 2rem;
  padding: 3px 7px;
  background: #000 !important;
  border: 2px inset #666;
  font-family: "Press Start 2P", "Courier New", Courier, monospace;
  font-size: 12px;
  font-weight: bold;
  line-height: 1.4;
  text-align: center;
  letter-spacing: 0.05em;
}

/* Pixel "LED" label for creature names (same vibe as rating digits) */
.creature-led {
  display: inline-block;
  max-width: 100%;
  padding: 4px 8px;
  background: #000 !important;
  color: #33ff33 !important;
  border: 2px inset #666;
  font-family: "Press Start 2P", "Courier New", Courier, monospace;
  font-size: 9px;
  font-weight: bold;
  line-height: 1.55;
  letter-spacing: 0.04em;
  text-shadow: 0 0 5px #0f0;
  word-break: break-word;
}

/* Myth category colors — section titles + creature LED */
.myth-section.myth-cat-rusalki {
  color: #0288a8;
  border-bottom-color: #3ad0e8;
}
.myth-section.myth-cat-kentavry {
  color: #a06a00;
  border-bottom-color: #e0a800;
}
.myth-section.myth-cat-lamii {
  color: #a82840;
  border-bottom-color: #e86078;
}
.myth-section.myth-cat-arakhna {
  color: #2e7a28;
  border-bottom-color: #58c050;
}
.myth-section.myth-cat-garpii {
  color: #c45a10;
  border-bottom-color: #f08830;
}

.creature-led.myth-cat-rusalki {
  color: #3ad0e8 !important;
  text-shadow: 0 0 5px #0af;
}
.creature-led.myth-cat-kentavry {
  color: #ffcc33 !important;
  text-shadow: 0 0 5px #ca0;
}
.creature-led.myth-cat-lamii {
  color: #ff6b8a !important;
  text-shadow: 0 0 5px #f36;
}
.creature-led.myth-cat-arakhna {
  color: #66ee55 !important;
  text-shadow: 0 0 5px #0c0;
}
.creature-led.myth-cat-garpii {
  color: #ff9944 !important;
  text-shadow: 0 0 5px #f60;
}

/* Yandex Maps constructor — full width, mobile-friendly */
.yandex-map-wrap {
  width: 100%;
  max-width: 100%;
  height: 420px;
  margin: 0 0 0.6em;
  border: 2px solid #000;
  background: #fff;
  box-shadow: 3px 3px 0 var(--shadow);
  overflow: hidden;
}

.yandex-map-wrap iframe,
.yandex-map-wrap > ymaps,
.yandex-map-wrap > div {
  width: 100% !important;
  max-width: 100% !important;
  height: 100% !important;
}

.map-link {
  margin: 0 0 1.4em;
  font-size: 12px;
  text-align: right;
}

@media (max-width: 720px) {
  .yandex-map-wrap {
    height: 280px;
  }
}

/* Photo albums — web 1.5 */
.photo-album-intro {
  margin: 0 0 1.2em;
  font-size: 13px;
  color: #345;
}

.photo-empty {
  text-align: center;
  color: #668;
  font-style: italic;
  padding: 1.5em 0;
}

.photo-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.1em 1em;
  margin: 0 0 1.4em;
}

.photo-card {
  margin: 0;
  background: #fff;
  border: 2px solid #000;
  box-shadow: 3px 3px 0 var(--shadow);
  padding: 8px 8px 10px;
}

.photo-link {
  display: block;
  border: 2px inset #7a9aaa;
  background: #012a38;
  line-height: 0;
  overflow: hidden;
}

.photo-link img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 4 / 3;
  object-fit: cover;
}

.photo-link:hover img,
.photo-link:focus img {
  opacity: 0.92;
}

.photo-caption {
  display: flex;
  flex-direction: column;
  gap: 2px;
  margin-top: 8px;
  padding: 0 2px;
  font-size: 11px;
  line-height: 1.4;
  color: #234;
}

.photo-caption-title {
  font-weight: bold;
  font-size: 12px;
  color: #024f66;
}

.photo-caption-date {
  color: #456;
}

.photo-caption-credit {
  color: #567;
  font-size: 10px;
}

.photo-caption-credit a {
  font-size: inherit;
}

@media (max-width: 720px) {
  .photo-grid {
    grid-template-columns: 1fr;
    gap: 1em;
  }
}

/* LED bands: 10–8 green, 7–6 yellow, 5–4 orange, 3–1 red */
.rate-led.rate-hi {
  color: #33ff33 !important;
  text-shadow: 0 0 5px #0f0;
}

.rate-led.rate-mid {
  color: #ffe54c !important;
  text-shadow: 0 0 5px #ca0;
}

.rate-led.rate-low {
  color: #ff9f1a !important;
  text-shadow: 0 0 5px #c60;
}

.rate-led.rate-bad {
  color: #ff3b3b !important;
  text-shadow: 0 0 5px #f00;
}

@media (max-width: 720px) {
  .media-table-wrap {
    overflow: visible;
    border: none;
    box-shadow: none;
    background: transparent;
  }

  .media-table,
  .media-table thead,
  .media-table tbody,
  .media-table tr,
  .media-table th,
  .media-table td {
    display: block;
    width: 100%;
  }

  .media-table thead {
    display: none;
  }

  .media-table tr {
    margin: 0 0 10px;
    border: 2px solid #000;
    background: #fff;
    box-shadow: 3px 3px 0 var(--shadow);
    padding: 8px 10px;
  }

  .media-table tbody tr:nth-child(even) {
    background: #fff;
  }

  .media-table td {
    border: none;
    border-bottom: 1px dotted #9bb;
    padding: 4px 0;
    text-align: left !important;
    white-space: normal;
  }

  .media-table td:last-child {
    border-bottom: none;
  }

  .media-table td::before {
    content: attr(data-label);
    display: inline-block;
    min-width: 6.5rem;
    font-weight: bold;
    color: #024f66;
    font-size: 11px;
  }

  .media-table .col-title {
    font-size: 14px;
    padding-bottom: 8px;
    margin-bottom: 4px;
    border-bottom: 2px dashed var(--hr);
  }

  .media-table .col-title::before {
    display: none;
  }

  .media-table .col-creature {
    padding-bottom: 8px;
    margin-bottom: 4px;
    border-bottom: 2px dashed var(--hr);
  }

  .media-table .col-creature::before {
    display: none;
  }

  .media-table.myth-table .col-title {
    font-size: 13px;
    font-weight: bold;
    border-bottom: 1px dotted #9bb;
    padding-bottom: 4px;
    margin-bottom: 0;
  }

  .media-table.myth-table .col-title::before {
    display: inline-block;
  }

  .media-table .col-genre {
    max-width: none;
  }

  .rate-led {
    font-size: 11px;
  }

  .creature-led {
    font-size: 8px;
  }
}

/* Footer */
.site-footer {
  margin-top: 0;
  background: #012a38;
  border: 3px solid #000;
  border-top: none;
  box-shadow: 4px 4px 0 var(--shadow);
  color: #cde;
  text-align: center;
  padding: 12px;
  font-size: 11px;
}

.site-footer a {
  color: #ffcc88;
}

/* Mobile nav toggle — simple */
.nav-toggle {
  display: none;
  width: 100%;
  background: var(--accent);
  color: #000;
  border: none;
  border-bottom: 2px solid #000;
  font-weight: bold;
  font-family: Verdana, sans-serif;
  font-size: 13px;
  padding: 10px;
  cursor: pointer;
}

@media (max-width: 640px) {
  .page {
    width: calc(100% - 12px);
    max-width: none;
    margin: 10px auto 24px;
  }

  .site-main {
    padding: 16px 14px 22px;
  }

  .nav-toggle {
    display: block;
  }

  .site-nav ul {
    display: none;
    flex-direction: column;
  }

  .site-nav.is-open ul {
    display: flex;
  }

  .site-nav a {
    border: none;
    border-bottom: 1px solid #013848;
  }

  .site-nav .submenu {
    position: static;
    display: block;
    border: none;
    border-left: 3px solid var(--accent);
  }

  .site-nav .has-children:hover > .submenu {
    display: block;
  }

  .about-block .headline {
    font-size: 20px;
  }
}
