/* ШРИФТЫ — локальные файлы, без внешних запросов */

@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-display: swap;
  font-weight: 100 900;
  src: url('../fonts/inter-cyrillic.woff2') format('woff2');
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}

@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-display: swap;
  font-weight: 100 900;
  src: url('../fonts/inter-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
  font-family: 'JetBrains Mono';
  font-style: normal;
  font-display: swap;
  font-weight: 100 800;
  src: url('../fonts/jetbrains-mono-cyrillic.woff2') format('woff2');
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}

@font-face {
  font-family: 'JetBrains Mono';
  font-style: normal;
  font-display: swap;
  font-weight: 100 800;
  src: url('../fonts/jetbrains-mono-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

:root {
  --ink: #34452D;
  --paper: #F9FCEF;
  --pink: #F2C7D6;
  --blue: #B9D9E9;
  --lime: #C4E6A5;
  --yellow: #F0D78C;
  --purple: #D5C8ED;
  --line: #58734A;
  --green: #91C96B;
  --muted: #718568;
  --font-body: 'Inter', 'Segoe UI', system-ui, -apple-system, 'Helvetica Neue', Arial, sans-serif;
  --font-mono: 'JetBrains Mono', 'Cascadia Mono', 'Segoe UI Mono', Consolas, ui-monospace, monospace;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  color: var(--ink);
  font-family: var(--font-body);
  background-color: #EAF2DF;
  background-image:
    radial-gradient(#C3D5B2 1px, transparent 1px),
    radial-gradient(#fff 1px, transparent 1px);
  background-size: 19px 19px, 37px 37px;
  background-position: 0 0, 8px 11px;
}

a { color: #578B3F; }
a:hover { color: #82B85A; }

.page {
  max-width: 1280px;
  margin: 22px auto;
  padding: 0 18px;
}

/* БАННЕР */

.masthead {
  position: relative;
  min-height: 190px;
  border: 3px solid var(--line);
  background:
    linear-gradient(90deg, rgba(25,45,20,.65), rgba(25,45,20,.05)),
    url('../img/banner.jpg') center 50% / cover no-repeat;
  box-shadow: 7px 7px 0 var(--line);
  padding: 25px 28px;
  display: flex;
  align-items: center;
  color: white;
}

.masthead h1 {
  font: 800 clamp(34px, 7vw, 74px)/1.08 var(--font-body);
  letter-spacing: .12em;
  margin: 24px 0 12px;
  text-shadow: 4px 4px #34452D;
}

.masthead p {
  font: 12px var(--font-mono);
  background: var(--paper);
  color: var(--ink);
  display: inline-block;
  padding: 7px 10px;
  border: 2px solid var(--line);
}

.language-button {
  position: absolute;
  right: 22px;
  bottom: 18px;
  background: var(--paper);
  color: var(--ink);
  border: 2px solid var(--line);
  box-shadow: 3px 3px 0 var(--line);
  padding: 9px 14px;
  font: 11px var(--font-mono);
  cursor: pointer;
  transition: .15s;
}

.language-button:hover {
  background: var(--lime);
  transform: translate(-2px, -2px);
  box-shadow: 5px 5px 0 var(--line);
}

/* ОСНОВНАЯ СЕТКА */

.layout {
  display: grid;
  grid-template-columns: 190px minmax(0, 1fr) 245px;
  gap: 14px;
  margin-top: 18px;
  align-items: start;
}

.left,
.main,
.right {
  min-width: 0;
}

.panel {
  border: 3px solid var(--line);
  background: var(--paper);
  box-shadow: 4px 4px 0 var(--line);
  padding: 12px;
  margin-bottom: 14px;
}

.panel h2 {
  font: 800 15px/1.45 var(--font-body);
  letter-spacing: .05em;
  margin: -1px -1px 12px;
  padding: 10px;
  background: var(--yellow);
  border: 2px solid var(--line);
}

.panel h3,
.color-card h2 {
  font: 800 15px/1.5 var(--font-body);
  letter-spacing: .05em;
  margin: 0 0 12px;
}

/* МЕНЮ */

.navlinks {
  display: grid;
  gap: 7px;
}

.navlinks a {
  text-decoration: none;
  text-align: center;
  padding: 9px 5px;
  background: white;
  border: 2px solid var(--line);
  box-shadow: inset 2px 2px white, inset -2px -2px #d7e3cc;
  font: 11px var(--font-mono);
  transition: .15s;
}

.navlinks a:hover {
  background: var(--pink);
  transform: translate(-2px, -2px);
  box-shadow: 3px 3px 0 var(--line);
}

.navlinks a.active {
  background: var(--yellow);
  transform: translate(-2px, -2px);
  box-shadow: 3px 3px 0 var(--line);
}

.mini {
  font: 10px var(--font-mono);
  line-height: 1.65;
}

/* ПРИВЕТСТВИЕ */

.hero-note {
  display: grid;
  grid-template-columns: 90px minmax(0, 1fr);
  gap: 13px;
  align-items: center;
}

.hero-note img {
  width: 90px;
  height: 100px;
  object-fit: cover;
  border: 3px solid white;
  outline: 2px solid var(--line);
  transform: rotate(-3deg);
}

/* БЕГУЩАЯ СТРОКА */

.marquee {
  overflow: hidden;
  white-space: nowrap;
  background: var(--lime);
  border: 2px solid var(--line);
  padding: 7px;
  font: 10px var(--font-mono);
  margin-bottom: 14px;
}

.marquee span {
  display: inline-block;
  animation: scroll 20s linear infinite;
}

@keyframes scroll {
  to { transform: translateX(-50%); }
}

/* КОЛОНКИ */

.columns {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.color-card {
  border: 2px solid var(--line);
  padding: 12px;
  margin-bottom: 12px;
  box-shadow: 3px 3px 0 var(--line);
}

.color-card p {
  font-size: 13px;
  line-height: 1.55;
}

.pink { background: #F9DFE6; }
.blue { background: #DDF1F1; }
.lime { background: #E5F3D5; }
.purple { background: #E9E2F5; }
.yellow { background: #FFF3CE; }

/* ПРОЕКТЫ */

.project {
  display: flex;
  gap: 10px;
  align-items: center;
  padding: 8px 0;
  border-top: 1px dashed #829779;
}

.project img {
  width: 58px;
  height: 52px;
  object-fit: cover;
  border: 2px solid var(--line);
}

.project strong { font-size: 13px; }

.project small {
  display: block;
  font: 10px var(--font-mono);
  margin-top: 4px;
}

.project a {
  color: var(--ink);
  text-decoration: none;
}

.project a:hover {
  color: #578B3F;
  text-decoration: underline;
}

/* ССЫЛКИ */

.badges {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.badge88 {
  width: 88px;
  height: 31px;
  display: block;
  flex-shrink: 0;
  border: 0;
  background: none;
  text-decoration: none;
  transition: transform .15s, filter .15s;
}

.badge88 img {
  display: block;
  width: 88px;
  height: 31px;
}

.badge88:hover {
  transform: translateY(-2px);
  filter: drop-shadow(2px 3px 0 rgba(52, 69, 45, .85));
}

/* МУЗЫКАЛЬНЫЙ ПЛЕЕР */

.nowplaying {
  background: #293526;
  color: white;
  padding: 10px;
  border: 3px ridge #B5C5A8;
}

.track {
  display: flex;
  gap: 9px;
  align-items: center;
}

.cover {
  width: 58px;
  height: 58px;
  object-fit: cover;
  border: 2px solid white;
  background: #E5F3D5;
  flex-shrink: 0;
}

.trackname {
  min-width: 0;
  font: 10px var(--font-mono);
  line-height: 1.6;
  overflow-wrap: anywhere;
}

.controls {
  display: flex;
  align-items: center;
  gap: 7px;
  margin-top: 10px;
}

.controls button {
  min-width: 29px;
  border: 1px solid white;
  background: white;
  color: #293526;
  padding: 5px 8px;
  font-weight: bold;
  cursor: pointer;
}

.controls button:hover { background: var(--lime); }

.controls button:disabled {
  opacity: .5;
  cursor: default;
}

.progress-wrap {
  margin-top: 11px;
}

.progress {
  display: block;
  width: 100%;
  height: 5px;
  margin: 0;
  padding: 0;
  appearance: none;
  background: #63745B;
  border: 0;
  border-radius: 5px;
  cursor: pointer;
  accent-color: var(--green);
}

.progress::-webkit-slider-thumb {
  appearance: none;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #B8F39E;
}

.progress::-moz-range-thumb {
  width: 10px;
  height: 10px;
  border: 0;
  border-radius: 50%;
  background: #B8F39E;
}

.time-row {
  display: flex;
  justify-content: space-between;
  margin-top: 5px;
  color: #C6D4BE;
  font: 9px var(--font-mono);
}

.volume-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 9px;
}

.volume-row span {
  flex-shrink: 0;
  color: #C6D4BE;
  font: 9px var(--font-mono);
}

.volume {
  width: 100%;
  height: 4px;
  margin: 0;
  accent-color: var(--green);
  cursor: pointer;
}

.player-status {
  margin-top: 9px;
  color: #B8F39E;
  font: 9px var(--font-mono);
  line-height: 1.5;
}

/* ПОДВАЛ */

footer {
  text-align: center;
  margin: 20px 0 35px;
  font: 10px var(--font-mono);
  background: var(--paper);
  border: 2px solid var(--line);
  padding: 14px;
  box-shadow: 4px 4px 0 var(--line);
}

hr {
  border: none;
  border-top: 1px dashed #829779;
  margin: 10px 0;
}

button { font-family: var(--font-mono), monospace; }

/* АДАПТИВНОСТЬ */

@media(max-width: 1100px) {
  .layout {
    grid-template-columns: 160px minmax(0, 1fr);
  }

  .right {
    grid-column: 1 / -1;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 12px;
    align-items: start;
  }

  .right .panel { margin: 0; }
}

@media(max-width: 780px) {
  .columns {
    grid-template-columns: minmax(0, 1fr);
  }
}

@media(max-width: 600px) {
  .page {
    padding: 0 10px;
    margin: 10px auto;
  }

  .masthead {
    min-height: 150px;
    padding: 16px 16px 18px;
  }

  .masthead h1 {
    font-size: 32px;
    line-height: 1.15;
    margin-top: 34px;
    letter-spacing: .08em;
  }

  .masthead p {
    font-size: 10px;
    padding: 6px 8px;
    max-width: 100%;
  }

  .language-button {
    top: 12px;
    right: 12px;
    bottom: auto;
    padding: 7px 10px;
  }

  /* Мобильная колонка: меню → контент → плеер */
  .layout {
    display: flex;
    flex-direction: column;
    gap: 0;
    align-items: stretch;
  }

  .left,
  .right {
    display: contents;
  }

  .main { order: 2; }

  .left > .panel { order: 1; }
  .right > .panel { order: 3; }

  .left > .panel,
  .right > .panel {
    margin-bottom: 14px;
  }

  .navlinks {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .navlinks a {
    padding: 10px 4px;
  }

  .hero-note {
    grid-template-columns: 70px minmax(0, 1fr);
  }

  .hero-note img {
    width: 68px;
    height: 78px;
  }
}

/* СТРАНИЦА 404 */

.error-main {
  max-width: 640px;
  margin: 18px auto 0;
}

.error-code {
  margin: 0 0 12px;
  font: 800 56px/1 var(--font-body);
  color: #578B3F;
}

.back-link {
  margin: 14px 0 0;
  font: 10px var(--font-mono);
}

.back-link a {
  display: inline-block;
  padding: 8px 12px;
  background: var(--paper);
  color: var(--ink);
  border: 2px solid var(--line);
  box-shadow: 3px 3px 0 var(--line);
  text-decoration: none;
  transition: .15s;
}

.back-link a:hover {
  background: var(--lime);
  transform: translate(-2px, -2px);
  box-shadow: 5px 5px 0 var(--line);
}

.error-main {
  max-width: 640px;
  margin: 18px auto 0;
}

.error-code {
  margin: 0 0 12px;
  font: 800 56px/1 var(--font-body);
  color: #578B3F;
}

.back-link {
  margin: 14px 0 0;
  font: 10px var(--font-mono);
}

.back-link a {
  display: inline-block;
  padding: 8px 12px;
  background: var(--paper);
  color: var(--ink);
  border: 2px solid var(--line);
  box-shadow: 3px 3px 0 var(--line);
  text-decoration: none;
  transition: .15s;
}

.back-link a:hover {
  background: var(--lime);
  transform: translate(-2px, -2px);
  box-shadow: 5px 5px 0 var(--line);
}