* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  min-height: 100%;
}

body {
  min-height: 100vh;
  font-family: Consolas, "Courier New", monospace;
  color: #f2f2f2;
  background:
    radial-gradient(circle at top, rgba(27, 255, 116, 0.14), transparent 32%),
    radial-gradient(circle at right, rgba(26, 255, 117, 0.08), transparent 30%),
    linear-gradient(135deg, #020403 0%, #050a08 45%, #000000 100%);
  overflow-x: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px;
}

/* Фоновая сетка */
.background-code {
  position: fixed;
  inset: 0;
  z-index: -2;
  opacity: 0.14;
  background-image:
    linear-gradient(rgba(31, 255, 119, 0.12) 1px, transparent 1px),
    linear-gradient(90deg, rgba(31, 255, 119, 0.08) 1px, transparent 1px);
  background-size: 70px 70px;
}

/* Тёмная дымка поверх */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  background:
    linear-gradient(90deg, rgba(0, 0, 0, 0.15), rgba(0, 0, 0, 0.8)),
    repeating-linear-gradient(
      0deg,
      rgba(31, 255, 119, 0.02) 0px,
      rgba(31, 255, 119, 0.02) 1px,
      transparent 1px,
      transparent 4px
    );
  pointer-events: none;
}

.site-shell {
  width: min(1400px, 100%);
  min-height: 780px;
  border: 1px solid rgba(31, 255, 119, 0.35);
  border-radius: 22px;
  background:
    linear-gradient(135deg, rgba(3, 10, 8, 0.88), rgba(0, 0, 0, 0.78)),
    radial-gradient(circle at right, rgba(31, 255, 119, 0.08), transparent 35%);
  box-shadow:
    0 0 45px rgba(31, 255, 119, 0.1),
    inset 0 0 45px rgba(31, 255, 119, 0.04);
  overflow: hidden;
  backdrop-filter: blur(12px);
}

.top-bar {
  height: 82px;
  border-bottom: 1px solid rgba(31, 255, 119, 0.18);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 36px;
}

.logo {
  display: flex;
  align-items: center;
  gap: 16px;
  color: #28ff75;
  letter-spacing: 0.5px;
}

.terminal-symbol {
  font-size: 28px;
  text-shadow: 0 0 16px rgba(31, 255, 119, 0.8);
}

.server-status {
  display: flex;
  align-items: center;
  gap: 12px;
  color: #b8b8b8;
}

.server-status strong {
  color: #28ff75;
  font-weight: 700;
}

.status-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: #28ff75;
  box-shadow: 0 0 16px rgba(31, 255, 119, 0.9);
}

.hero {
  text-align: center;
  padding: 70px 40px 40px;
}

.terminal-line {
  color: #28ff75;
  font-size: 22px;
  margin-bottom: 26px;
  text-shadow: 0 0 14px rgba(31, 255, 119, 0.55);
}

h1 {
  font-size: clamp(42px, 6vw, 76px);
  line-height: 1.1;
  margin-bottom: 34px;
  letter-spacing: 2px;
  text-shadow: 0 0 18px rgba(255, 255, 255, 0.18);
}

h1 span {
  color: #28ff75;
  text-shadow: 0 0 22px rgba(31, 255, 119, 0.45);
}

.main-text {
  font-size: clamp(18px, 2vw, 25px);
  line-height: 1.7;
  color: #e0e0e0;
  max-width: 850px;
  margin: 0 auto;
}

.main-text strong,
.sub-text strong {
  color: #28ff75;
  font-weight: 500;
}

.divider {
  width: 34px;
  height: 1px;
  background: rgba(255, 255, 255, 0.25);
  margin: 28px auto;
}

.sub-text {
  color: #d8d8d8;
  font-size: clamp(17px, 1.6vw, 22px);
}

.small-terminal {
  color: #28ff75;
  font-size: 28px;
  margin-top: 24px;
  margin-bottom: 46px;
  text-shadow: 0 0 18px rgba(31, 255, 119, 0.8);
}

.cards {
  display: grid;
  grid-template-columns: repeat(4, minmax(160px, 230px));
  justify-content: center;
  gap: 32px;
}

.card {
  height: 175px;
  border: 1px solid rgba(31, 255, 119, 0.75);
  border-radius: 16px;
  background:
    linear-gradient(145deg, rgba(7, 20, 15, 0.75), rgba(0, 0, 0, 0.5));
  color: #f4f4f4;
  font-family: inherit;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 22px;
  transition:
    transform 0.25s ease,
    box-shadow 0.25s ease,
    background 0.25s ease;
}

.card i {
  font-size: 40px;
  color: #28ff75;
  text-shadow: 0 0 16px rgba(31, 255, 119, 0.45);
}

.card span {
  font-size: 22px;
}

.card:hover {
  transform: translateY(-8px);
  background:
    linear-gradient(145deg, rgba(12, 45, 28, 0.85), rgba(0, 0, 0, 0.55));
  box-shadow:
    0 0 24px rgba(31, 255, 119, 0.22),
    inset 0 0 20px rgba(31, 255, 119, 0.06);
}

.contacts {
  padding: 18px 40px 46px;
}

.contacts-title {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 24px;
  color: #777;
  text-transform: uppercase;
  letter-spacing: 2px;
  margin-bottom: 26px;
}

.contacts-title span {
  height: 1px;
  width: min(420px, 30%);
  background: rgba(255, 255, 255, 0.11);
}

.contact-buttons {
  display: flex;
  justify-content: center;
  gap: 34px;
}

.contact-link {
  width: 62px;
  height: 62px;
  border: 1px solid rgba(31, 255, 119, 0.8);
  border-radius: 50%;
  color: #ffffff;
  text-decoration: none;
  display: grid;
  place-items: center;
  font-size: 27px;
  background: rgba(0, 0, 0, 0.35);
  transition:
    transform 0.25s ease,
    box-shadow 0.25s ease,
    color 0.25s ease;
}

.contact-link:hover {
  transform: translateY(-6px) scale(1.05);
  color: #28ff75;
  box-shadow: 0 0 20px rgba(31, 255, 119, 0.32);
}

/* Модальные окна */
.modal {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.74);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 10;
  padding: 20px;
}

.modal.active {
  display: flex;
}

.modal-window {
  width: min(560px, 100%);
  max-height: min(82vh, 820px);
  overflow-y: auto;
  border: 1px solid rgba(31, 255, 119, 0.75);
  border-radius: 18px;
  background:
    linear-gradient(145deg, rgba(7, 20, 15, 0.97), rgba(0, 0, 0, 0.94));
  box-shadow:
    0 0 35px rgba(31, 255, 119, 0.22),
    inset 0 0 24px rgba(31, 255, 119, 0.05);
  padding: 34px;
  position: relative;
}

.about-window {
  width: min(920px, 100%);
  min-height: 520px;
  background:
    linear-gradient(
      90deg,
      rgba(0, 0, 0, 0.94) 0%,
      rgba(0, 0, 0, 0.78) 42%,
      rgba(0, 0, 0, 0.28) 100%
    ),
    url("/images/about-bg.jpg");
  background-size:auto, 105% auto;
  background-position:center, 55% center;
  overflow: hidden;
}

.about-window h2,
.about-window p {
  max-width: 430px;
  position: relative;
  z-index: 1;
}

.about-window h2 {
  text-shadow: 0 0 18px rgba(31, 255, 119, 0.45);
}

.about-window p {
  color: #f0f0f0;
}

.modal-wide {
  width: min(920px, 100%);
}

.modal-window h2 {
  color: #28ff75;
  font-size: 32px;
  margin-bottom: 18px;
}

.modal-window h3 {
  color: #ffffff;
  font-size: 19px;
  margin-bottom: 10px;
}

.modal-window p {
  color: #e0e0e0;
  font-size: 17px;
  line-height: 1.7;
}

.modal-lead {
  margin-bottom: 24px;
}

.modal-close {
  position: absolute;
  top: 16px;
  right: 18px;
  border: none;
  background: transparent;
  color: #28ff75;
  font-size: 32px;
  cursor: pointer;
  line-height: 1;
}

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

.info-card,
.note-item,
.project-item {
  border: 1px solid rgba(31, 255, 119, 0.22);
  border-radius: 14px;
  background: rgba(0, 0, 0, 0.28);
  padding: 18px;
}

.info-card p,
.note-item p,
.project-item p {
  font-size: 15px;
  color: #d7d7d7;
}

.terminal-box {
  margin-top: 24px;
  padding: 18px;
  border-radius: 14px;
  background: rgba(0, 0, 0, 0.5);
  border: 1px solid rgba(31, 255, 119, 0.2);
}

.terminal-box p {
  font-size: 15px;
  color: #dcdcdc;
}

.terminal-box span {
  color: #28ff75;
}

.projects-list {
  display: grid;
  gap: 18px;
}

.project-item h3 {
  color: #28ff75;
}

.tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 14px;
}

.tags span {
  font-size: 13px;
  color: #28ff75;
  border: 1px solid rgba(31, 255, 119, 0.35);
  border-radius: 999px;
  padding: 5px 10px;
  background: rgba(31, 255, 119, 0.06);
}

.ai-note {
  margin-top: 22px;
  padding-top: 18px;
  border-top: 1px solid rgba(31, 255, 119, 0.18);
  color: #bdbdbd;
}

/* Адаптация под планшеты */
@media (max-width: 1000px) {
  body {
    padding: 24px;
  }

  .site-shell {
    min-height: auto;
  }

  .cards {
    grid-template-columns: repeat(2, minmax(180px, 240px));
  }
}

/* Адаптация под телефон */
@media (max-width: 620px) {
  body {
    padding: 14px;
    align-items: flex-start;
  }

  .top-bar {
    height: auto;
    padding: 22px;
    flex-direction: column;
    gap: 14px;
  }

  .hero {
    padding: 48px 22px 34px;
  }

  h1 {
    letter-spacing: 0;
  }

  .main-text br {
    display: none;
  }

  .cards {
    grid-template-columns: 1fr;
    gap: 18px;
  }

  .card {
    height: 140px;
  }

  .contacts {
    padding: 12px 20px 36px;
  }

  .contact-buttons {
    gap: 18px;
    flex-wrap: wrap;
  }

  .contact-link {
    width: 56px;
    height: 56px;
  }

  .modal-window {
    padding: 28px 22px;
  }

  .info-grid,
  .notes-list {
    grid-template-columns: 1fr;
  }

  .about-window {
    width: 100%;
    min-height: 620px;
    padding: 30px 22px;
    background:
      linear-gradient(
        180deg,
        rgba(0, 0, 0, 0.92) 0%,
        rgba(0, 0, 0, 0.78) 38%,
        rgba(0, 0, 0, 0.35) 100%
      ),
      url("/images/about-mobile-bg.jpg");
    background-size: cover;
    background-position: 95% center;
  }

  .about-window h2,
  .about-window p {
    max-width: 100%;
  }

  .about-window h2 {
    font-size: 30px;
  }

  .about-window p {
    font-size: 17px;
    line-height: 1.6;
  }
}
