:root {
  --bg-dark: #0f1b0f;
  --bg-deep: #0a120a;
  --grass: #39b54a;
  --grass-dark: #287b35;
  --lime: #a2e635;
  --panel: rgba(255, 255, 255, 0.07);
  --panel-strong: rgba(255, 255, 255, 0.1);
  --text: #f4fff4;
  --muted: #bfd3bf;
  --border: rgba(0, 0, 0, 0.45);
  --shadow: 0 8px 0 rgba(0, 0, 0, 0.28);
  --shadow-big: 0 12px 0 rgba(0, 0, 0, 0.3);
  --radius: 14px;
  --pixel: "Press Start 2P", cursive;
  --body: "Inter", Arial, sans-serif;
}

* {
  box-sizing: border-box;
  min-width: 0;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--text);
  font-family: var(--body);
  overflow-x: hidden;
  background:
    linear-gradient(rgba(0, 0, 0, 0.18), rgba(0, 0, 0, 0.18)),
    repeating-linear-gradient(0deg, rgba(255, 255, 255, 0.03) 0 18px, transparent 18px 36px),
    repeating-linear-gradient(90deg, rgba(255, 255, 255, 0.03) 0 18px, transparent 18px 36px),
    linear-gradient(180deg, var(--bg-dark), var(--bg-deep));
}

img {
  max-width: 100%;
  display: block;
  height: auto;
}

a {
  color: inherit;
  text-decoration: none;
}

p, h1, h2, h3, li {
  overflow-wrap: break-word;
}

.container {
  width: min(1120px, calc(100% - 32px));
  margin: 0 auto;
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: 10px;
  background: white;
  color: black;
  padding: 10px 14px;
  border-radius: 8px;
  z-index: 1000;
}

.skip-link:focus {
  left: 10px;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: rgba(10, 18, 10, 0.94);
  backdrop-filter: blur(10px);
  border-bottom: 3px solid var(--border);
}

.nav-wrap {
  min-height: 82px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 12px 0;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  flex: 1;
  min-width: 0;
}

.brand-logo {
  width: 58px;
  height: 58px;
  flex-shrink: 0;
  object-fit: cover;
  border-radius: 12px;
  border: 3px solid var(--border);
  box-shadow: var(--shadow);
  background: #111;
}

.brand-text-group {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
}

.brand-title {
  font-family: var(--pixel);
  font-size: 0.78rem;
  line-height: 1.4;
}

.brand-subtitle {
  color: var(--lime);
  font-size: 0.88rem;
  font-weight: 700;
}

.desktop-nav {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.desktop-nav a,
.mobile-nav a {
  border: 2px solid transparent;
  padding: 10px 12px;
  border-radius: 10px;
  font-weight: 700;
  color: var(--muted);
}

.desktop-nav a:hover,
.mobile-nav a:hover {
  background: var(--panel);
  border-color: var(--border);
  color: var(--text);
}

.menu-toggle {
  display: none;
  border: 3px solid var(--border);
  background: linear-gradient(180deg, var(--grass), var(--grass-dark));
  color: #081008;
  padding: 10px 12px;
  border-radius: 10px;
  box-shadow: var(--shadow);
  font-size: 1.1rem;
  cursor: pointer;
  flex-shrink: 0;
}

/* MOBILE NAV DEFAULT */
.mobile-nav {
  display: none;
  width: 100%;
  padding: 10px 16px 16px;
  background: rgba(10, 18, 10, 0.98);
  border-top: 3px solid rgba(0, 0, 0, 0.25);
}

/* FORCE OPEN STATE */
.mobile-nav.open {
  display: flex !important;
  flex-direction: column;
  gap: 8px;
}

.mobile-nav a {
  display: block;
}

/* HERO */
.hero {
  padding: 56px 0 36px;
}

.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(280px, 0.95fr);
  gap: 24px;
  align-items: start;
}

.hero-badge,
.section-tag,
.project-label {
  display: inline-block;
  font-family: var(--pixel);
  font-size: 0.62rem;
  line-height: 1.6;
  color: #0b100b;
  background: linear-gradient(180deg, var(--lime), #78c21f);
  padding: 8px 10px;
  border: 3px solid var(--border);
  border-radius: 10px;
  box-shadow: var(--shadow);
  max-width: 100%;
}

.hero-copy h1,
.section-heading h2,
.profile-panel h2,
.card h3 {
  font-family: var(--pixel);
}

.hero-copy h1 {
  font-size: clamp(1.8rem, 4vw, 3rem);
  line-height: 1.25;
  margin: 18px 0 16px;
}

.highlight {
  color: var(--lime);
}

.hero-text {
  font-size: 1.08rem;
  line-height: 1.8;
  color: var(--muted);
  max-width: 720px;
}

.hero-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin: 24px 0 24px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 50px;
  padding: 12px 18px;
  border-radius: 12px;
  border: 3px solid var(--border);
  box-shadow: var(--shadow);
  font-weight: 800;
  text-align: center;
}

.btn-primary {
  background: linear-gradient(180deg, var(--grass), var(--grass-dark));
  color: #081008;
}

.btn-secondary {
  background: var(--panel-strong);
  color: var(--text);
}

.hero-stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.stat-card,
.card,
.profile-panel,
.skill-box {
  background: var(--panel);
  border: 3px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-big);
}

.stat-card {
  padding: 16px;
  text-align: center;
}

.stat-number {
  display: block;
  font-size: 1.3rem;
  font-weight: 800;
  margin-bottom: 6px;
}

.stat-label {
  color: var(--muted);
  font-weight: 600;
}

.profile-panel {
  padding: 20px;
}

.profile-avatar {
  width: min(150px, 100%);
  aspect-ratio: 1 / 1;
  object-fit: cover;
  border-radius: 18px;
  margin: 0 auto 18px;
  border: 4px solid var(--border);
  box-shadow: var(--shadow-big);
  background: #111;
}

.profile-panel h2 {
  font-size: 1rem;
  margin: 0 0 18px;
  text-align: center;
}

.info-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 10px;
}

.info-list li {
  background: rgba(0, 0, 0, 0.18);
  border: 2px solid var(--border);
  border-radius: 10px;
  padding: 12px;
  color: var(--muted);
  line-height: 1.6;
}

.section {
  padding: 52px 0;
}

.section-alt {
  background: rgba(0, 0, 0, 0.16);
  border-top: 3px solid var(--border);
  border-bottom: 3px solid var(--border);
}

.section-heading {
  margin-bottom: 24px;
}

.section-heading h2 {
  margin: 16px 0 0;
  font-size: 1.35rem;
}

.card-grid {
  display: grid;
  gap: 16px;
}

.card-grid.three {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.card {
  padding: 18px;
}

.card h3 {
  font-size: 0.88rem;
  line-height: 1.6;
  margin: 0 0 12px;
}

.card p {
  color: var(--muted);
  line-height: 1.8;
  margin: 0;
}

.block-card,
.project-card {
  position: relative;
  overflow: hidden;
}

.block-card::before,
.project-card::before,
.gallery-note::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    repeating-linear-gradient(90deg, rgba(255, 255, 255, 0.02) 0 14px, transparent 14px 28px),
    repeating-linear-gradient(0deg, rgba(255, 255, 255, 0.02) 0 14px, transparent 14px 28px);
  pointer-events: none;
}

.project-label {
  margin-bottom: 14px;
}

.skills-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.skill-box {
  padding: 18px;
}

.skill-top {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 12px;
  font-weight: 700;
}

.skill-bar {
  height: 16px;
  background: rgba(0, 0, 0, 0.22);
  border: 2px solid var(--border);
  border-radius: 999px;
  overflow: hidden;
}

.skill-bar span {
  display: block;
  height: 100%;
  background: linear-gradient(90deg, var(--grass), var(--lime));
  border-radius: 999px;
}

.gallery-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
  gap: 18px;
}

.gallery-main {
  padding: 14px;
}

.gallery-main img {
  width: 100%;
  border-radius: 18px;
  border: 3px solid var(--border);
  background: #111;
}

.gallery-side {
  display: grid;
  gap: 16px;
}

.gallery-note h3 {
  margin-bottom: 10px;
}

.contact-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr);
  gap: 18px;
}

.contact-form {
  display: grid;
  gap: 10px;
}

.contact-form label {
  font-weight: 700;
  color: var(--muted);
}

.contact-form input,
.contact-form textarea {
  width: 100%;
  max-width: 100%;
  border: 3px solid var(--border);
  border-radius: 12px;
  background: rgba(0, 0, 0, 0.2);
  color: var(--text);
  font: inherit;
  padding: 12px 14px;
  resize: vertical;
}

.safe-note {
  margin-top: 16px;
  color: var(--muted);
  line-height: 1.8;
}

.site-footer {
  border-top: 3px solid var(--border);
  background: rgba(0, 0, 0, 0.22);
  padding: 18px 0;
}

.footer-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
  color: var(--muted);
}

@media (max-width: 980px) {
  .desktop-nav {
    display: none;
  }

  .menu-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
  }

  .hero-grid,
  .gallery-grid,
  .contact-layout,
  .card-grid.three,
  .skills-grid {
    grid-template-columns: 1fr;
  }

  .brand-title {
    font-size: 0.68rem;
  }
}

@media (min-width: 981px) {
  .mobile-nav {
    display: none !important;
  }
}

@media (max-width: 768px) {
  .container {
    width: min(1120px, calc(100% - 24px));
  }

  .nav-wrap {
    min-height: 74px;
    gap: 10px;
  }

  .brand-logo {
    width: 50px;
    height: 50px;
  }

  .brand-subtitle {
    font-size: 0.8rem;
  }

  .hero {
    padding: 32px 0 24px;
  }

  .hero-copy h1 {
    font-size: 1.6rem;
  }

  .hero-text {
    font-size: 1rem;
    line-height: 1.7;
  }

  .hero-buttons {
    flex-direction: column;
  }

  .btn {
    width: 100%;
  }

  .hero-stats {
    grid-template-columns: 1fr;
  }

  .section {
    padding: 36px 0;
  }

  .section-heading h2 {
    font-size: 1.05rem;
  }

  .profile-avatar {
    width: 120px;
  }

  .footer-row {
    flex-direction: column;
    align-items: flex-start;
  }
}

@media (max-width: 480px) {
  .brand-title {
    font-size: 0.56rem;
    line-height: 1.5;
  }

  .brand-subtitle {
    font-size: 0.72rem;
  }

  .hero-badge,
  .section-tag,
  .project-label {
    font-size: 0.5rem;
    padding: 7px 8px;
  }

  .hero-copy h1 {
    font-size: 1.35rem;
  }

  .card,
  .profile-panel,
  .skill-box,
  .stat-card {
    padding: 14px;
  }

  .card h3 {
    font-size: 0.75rem;
  }

  .profile-panel h2 {
    font-size: 0.82rem;
  }

  .section-heading h2 {
    font-size: 0.9rem;
  }
}