/* ========================================
   ДИМА — ПИКСЕЛЬНЫЙ САЙТ-ВИЗИТКА
   Цвета: градиент красного и жёлтого,
   контуры: белый и чёрный
   ======================================== */

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

:root {
  --red: #e63946;
  --red-dark: #b71c1c;
  --yellow: #f9a825;
  --yellow-light: #fdd835;
  --orange: #ff6f00;
  --black: #111;
  --white: #fff;
  --pixel-border: 3px;
  --pixel-shadow: 4px 4px 0 var(--black);
  --pixel-shadow-sm: 2px 2px 0 var(--black);
  --font-pixel: 'Press Start 2P', monospace;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-pixel);
  background: var(--black);
  color: var(--white);
  overflow-x: hidden;
  image-rendering: pixelated;
}

/* ===== HEADER ===== */
.header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  background: rgba(17, 17, 17, 0.95);
  border-bottom: var(--pixel-border) solid var(--yellow);
  backdrop-filter: blur(4px);
}

.header__inner {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0.8rem 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.header__logo {
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

.header__logo .pixel-icon {
  font-size: 1.4rem;
  color: var(--yellow);
  filter: drop-shadow(0 0 6px var(--yellow));
}

.header__name {
  font-size: 1rem;
  letter-spacing: 3px;
  background: linear-gradient(90deg, var(--red), var(--yellow));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.header__nav {
  display: flex;
  gap: 1.2rem;
}

.nav-link {
  font-family: var(--font-pixel);
  font-size: 0.55rem;
  color: var(--white);
  text-decoration: none;
  padding: 0.4rem 0.7rem;
  border: 2px solid transparent;
  transition: all 0.15s;
}

.nav-link:hover {
  border-color: var(--yellow);
  background: var(--yellow);
  color: var(--black);
  box-shadow: var(--pixel-shadow-sm);
}

/* ===== HERO ===== */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 6rem 1.5rem 3rem;
  background: linear-gradient(135deg, var(--red-dark) 0%, var(--black) 40%, var(--black) 60%, var(--orange) 100%);
  overflow: hidden;
}

.hero__stars {
  position: absolute;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
}

.hero__content {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.5rem;
}

.hero__avatar {
  width: 140px;
  height: 140px;
  border: var(--pixel-border) solid var(--white);
  box-shadow: 0 0 0 var(--pixel-border) var(--black),
              0 0 20px rgba(249, 168, 37, 0.4);
  background: linear-gradient(135deg, var(--red), var(--yellow));
  display: flex;
  align-items: center;
  justify-content: center;
  animation: float 3s ease-in-out infinite;
}

@keyframes float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-10px); }
}

.pixel-art-robot {
  width: 100px;
  height: 100px;
  background-size: contain;
  background-repeat: no-repeat;
  background-position: center;
}

.hero__title {
  font-size: 1.6rem;
  letter-spacing: 4px;
  line-height: 1.6;
  text-shadow: var(--pixel-shadow);
  background: linear-gradient(90deg, var(--yellow-light), var(--red));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero__subtitle {
  font-size: 0.6rem;
  letter-spacing: 2px;
  color: var(--white);
  text-shadow: var(--pixel-shadow-sm);
  line-height: 2;
}

.hero__location {
  font-size: 0.65rem;
  color: var(--yellow);
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.hero__location .pixel-icon {
  font-style: normal;
  font-size: 1rem;
}

.btn {
  font-family: var(--font-pixel);
  font-size: 0.65rem;
  text-decoration: none;
  padding: 0.8rem 1.8rem;
  border: var(--pixel-border) solid var(--white);
  cursor: pointer;
  transition: all 0.15s;
  letter-spacing: 1px;
}

.btn--primary {
  background: linear-gradient(90deg, var(--red), var(--yellow));
  color: var(--black);
  box-shadow: var(--pixel-shadow);
}

.btn--primary:hover {
  transform: translate(-2px, -2px);
  box-shadow: 6px 6px 0 var(--white);
  border-color: var(--white);
}

.scroll-indicator {
  position: absolute;
  bottom: 2rem;
  z-index: 2;
  animation: bounce 1.5s ease-in-out infinite;
}

.scroll-arrow {
  color: var(--yellow);
  font-size: 1.2rem;
}

@keyframes bounce {
  0%, 100% { transform: translateY(0); opacity: 1; }
  50% { transform: translateY(8px); opacity: 0.5; }
}

/* ===== SECTIONS ===== */
.section {
  padding: 5rem 1.5rem;
  background: var(--black);
}

.section--alt {
  background: linear-gradient(180deg, #1a0a0a 0%, #0d0d0d 100%);
}

.section__inner {
  max-width: 1100px;
  margin: 0 auto;
}

.section__inner--narrow {
  max-width: 700px;
}

.section__title {
  font-size: 1rem;
  letter-spacing: 3px;
  text-align: center;
  margin-bottom: 3rem;
  color: var(--yellow);
  text-shadow: 0 0 10px rgba(249, 168, 37, 0.4);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.7rem;
}

.section__title .pixel-icon {
  font-size: 1.4rem;
  font-style: normal;
}

/* ===== ABOUT GRID ===== */
.about-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.5rem;
}

.about-card {
  background: linear-gradient(180deg, #1e1e1e 0%, #141414 100%);
  border: var(--pixel-border) solid var(--white);
  padding: 2rem 1.5rem;
  text-align: center;
  box-shadow: var(--pixel-shadow);
  transition: transform 0.15s, box-shadow 0.15s;
}

.about-card:hover {
  transform: translate(-3px, -3px);
  box-shadow: 7px 7px 0 var(--yellow);
  border-color: var(--yellow);
}

.about-card__icon {
  font-size: 2.5rem;
  margin-bottom: 1rem;
  font-style: normal;
}

.about-card__title {
  font-size: 0.7rem;
  letter-spacing: 2px;
  margin-bottom: 1rem;
  color: var(--yellow);
}

.about-card__text {
  font-size: 0.5rem;
  line-height: 2.2;
  color: #ccc;
}

/* ===== SKILL BARS ===== */
.skills-grid {
  display: flex;
  flex-direction: column;
  gap: 1.4rem;
}

.skill-bar {
  display: grid;
  grid-template-columns: 180px 1fr 50px;
  align-items: center;
  gap: 1rem;
}

.skill-bar__label {
  font-size: 0.55rem;
  letter-spacing: 1px;
  color: var(--white);
}

.skill-bar__track {
  height: 20px;
  background: #222;
  border: 2px solid var(--white);
  position: relative;
  overflow: hidden;
}

.skill-bar__fill {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, var(--red), var(--yellow));
  transition: width 1.5s ease-out;
  position: relative;
}

.skill-bar__fill::after {
  content: '';
  position: absolute;
  inset: 0;
  background: repeating-linear-gradient(
    90deg,
    transparent 0px,
    transparent 8px,
    rgba(0,0,0,0.3) 8px,
    rgba(0,0,0,0.3) 10px
  );
}

.skill-bar__percent {
  font-size: 0.55rem;
  color: var(--yellow);
  text-align: right;
}

/* ===== SERVICES ===== */
.services-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.5rem;
}

.service-card {
  background: #1a1a1a;
  border: var(--pixel-border) solid var(--white);
  padding: 2rem 1.5rem;
  box-shadow: var(--pixel-shadow);
  position: relative;
  transition: transform 0.15s, box-shadow 0.15s;
}

.service-card:hover {
  transform: translate(-3px, -3px);
  box-shadow: 7px 7px 0 var(--yellow);
  border-color: var(--yellow);
}

.service-card--featured {
  border-color: var(--yellow);
  background: linear-gradient(180deg, #2a1a00 0%, #1a1a1a 100%);
}

.service-card__badge {
  position: absolute;
  top: -1px;
  right: -1px;
  font-size: 0.4rem;
  letter-spacing: 1px;
  padding: 0.35rem 0.7rem;
  background: var(--red);
  color: var(--white);
  border: 2px solid var(--white);
}

.service-card__header {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  margin-bottom: 1.2rem;
}

.service-card__icon {
  font-size: 1.8rem;
  font-style: normal;
}

.service-card__title {
  font-size: 0.65rem;
  letter-spacing: 2px;
  color: var(--yellow);
}

.service-card__list {
  list-style: none;
  margin-bottom: 1.5rem;
}

.service-card__list li {
  font-size: 0.48rem;
  line-height: 2.6;
  color: #bbb;
}

.service-card__list li::first-letter {
  color: var(--yellow);
}

.service-card__price {
  font-size: 0.7rem;
  color: var(--yellow);
  border-top: 2px dashed #444;
  padding-top: 1rem;
  letter-spacing: 1px;
}

/* ===== CONTACT ===== */
.contact-box {
  background: linear-gradient(135deg, #1e0808 0%, #0d0d0d 50%, #1a1400 100%);
  border: var(--pixel-border) solid var(--white);
  padding: 3rem 2rem;
  text-align: center;
  box-shadow: var(--pixel-shadow);
}

.contact-box__text {
  font-size: 0.6rem;
  line-height: 2.4;
  margin-bottom: 2rem;
  color: #ccc;
}

.contact-box__methods {
  display: flex;
  justify-content: center;
  gap: 2rem;
  margin-bottom: 2rem;
  flex-wrap: wrap;
}

.contact-method {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  padding: 1.2rem 1.8rem;
  border: 2px solid #333;
  background: #1a1a1a;
  transition: border-color 0.15s, box-shadow 0.15s;
}

.contact-method:hover {
  border-color: var(--yellow);
  box-shadow: 0 0 12px rgba(249, 168, 37, 0.3);
}

.contact-method__icon {
  font-size: 1.6rem;
  font-style: normal;
}

.contact-method__label {
  font-size: 0.5rem;
  color: #888;
  letter-spacing: 1px;
}

.contact-method__link {
  font-family: var(--font-pixel);
  font-size: 0.5rem;
  color: var(--yellow);
  text-decoration: none;
}

.contact-method__link:hover {
  text-decoration: underline;
}

.contact-box__city {
  font-size: 0.55rem;
  color: var(--yellow);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
}

/* ===== FOOTER ===== */
.footer {
  background: var(--black);
  border-top: var(--pixel-border) solid var(--red);
  padding: 1.5rem;
  text-align: center;
}

.footer__inner {
  max-width: 1100px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  flex-wrap: wrap;
}

.footer__copy {
  font-size: 0.45rem;
  color: #666;
  letter-spacing: 1px;
}

.footer__pixel-hearts {
  font-size: 0.7rem;
}

/* ===== STAR PARTICLES ===== */
.star {
  position: absolute;
  width: 4px;
  height: 4px;
  background: var(--yellow);
  animation: twinkle 2s ease-in-out infinite alternate;
}

@keyframes twinkle {
  0% { opacity: 0.2; transform: scale(1); }
  100% { opacity: 1; transform: scale(1.5); }
}

/* ===== RESPONSIVE ===== */
@media (max-width: 768px) {
  .hero__title {
    font-size: 1rem;
  }

  .hero__subtitle {
    font-size: 0.45rem;
  }

  .header__nav {
    gap: 0.5rem;
  }

  .nav-link {
    font-size: 0.45rem;
    padding: 0.3rem 0.5rem;
  }

  .skill-bar {
    grid-template-columns: 1fr;
    gap: 0.3rem;
  }

  .skill-bar__track {
    height: 14px;
  }

  .skill-bar__percent {
    text-align: left;
  }

  .about-grid,
  .services-grid {
    grid-template-columns: 1fr;
  }

  .contact-box__methods {
    flex-direction: column;
    align-items: center;
  }
}

@media (max-width: 480px) {
  .hero__title {
    font-size: 0.8rem;
  }

  .hero__avatar {
    width: 100px;
    height: 100px;
  }

  .section__title {
    font-size: 0.75rem;
  }

  .header__name {
    font-size: 0.8rem;
  }
}
