html {
  scroll-behavior: smooth;
  scrollbar-gutter: stable;
}
html:has(.modal:target) {
  overflow: hidden;
}

:root {
  --bg: #100e17;
  --layer: #191622;
  --border: #3b354a;
  --text: #f5f3ff;
  --muted: #c1b9d3;
  --lilac: #b397ff;
  --lime: #dafa64;
}

body {
  background: #1e1eff;
  margin: 0;
}

.head {
  background: var(--bg);
  color: var(--text);
  top: 0;
  justify-content: space-between;
  display: flex;
  align-items: center;
  padding: 0 clamp(24px, 10vw, 240px);
}

.head__div {
  display: flex;
  align-items: center;
}

.head__div img {
  max-width: 50%;
  height: auto;
}

.head__deviz {
  font-size: 13px;
}

.head__nav {
  font-family: "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  font-size: 14px;
  display: flex;
  gap: 24px;
  align-items: center;
}

.head__nav a {
  color: var(--text);
  white-space: nowrap;
  text-decoration: none;
  transition: color 0.2s ease;
}

.head__nav a:hover {
  color: var(--lime);
}

.media {
  position: relative;
  min-height: 240px;
  padding: 60px 24px 60px clamp(24px, 10vw, 240px);
  background: #190227;
  display: grid;
  align-content: center;
  justify-items: start;
  row-gap: 24px;
  overflow: hidden;
}

.media__video {
  position: absolute;
  top: 0;
  right: 0;
  width: 60%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  z-index: 0;
  mix-blend-mode: lighten;
  -webkit-mask-image: linear-gradient(to right, transparent, #000 25%);
  mask-image: linear-gradient(to right, transparent, #000 25%);
}

.media__hakaton,
.media__logo2,
.media__deviz2,
.media__button,
.media > a {
  position: relative;
  z-index: 1;
}

.media__hakaton {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--text);
  font-family: Consolas, monospace;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.media__deviz2 {
  max-width: 420px;
  color: var(--text);
  font-family: system-ui, sans-serif;
  font-size: 18px;
  line-height: 1.6;
}
.media__logo2 {
  width: min(320px, 90%);
  height: auto;
}

.media > a {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  padding: 14px 24px;
  background: var(--lime);
  color: var(--bg);
  font-family: system-ui, sans-serif;
  font-size: 14px;
  font-weight: 700;
  text-decoration: none;
  transition: filter 0.2s ease;
}

.media > a::before {
  content: "";
  width: 10px;
  height: 12px;
  background: currentColor;
  clip-path: polygon(0 0, 100% 50%, 0 100%);
}

.team {
  background: var(--bg);
  padding: 40px clamp(24px, 10vw, 200px);
}

.team__head {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 24px;
  margin-bottom: 40px;
}

.team__ps {
  margin: 0 0 12px;
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--lilac);
  font-family: Consolas, monospace;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.team__ps::before {
  content: "///";
  font-style: italic;
  letter-spacing: -0.1em;
}

.team__h1 {
  margin: 0;
  display: flex;
  align-items: flex-start;
  gap: 8px;
  color: var(--text);
  font-size: 48px;
  font-weight: 800;
  line-height: 1;
  white-space: nowrap;
}

.team__h2 {
  margin: 0;
  max-width: 240px;
  color: #c1b9d3;
  font-family: system-ui, sans-serif;
  font-size: 14px;
  line-height: 1.5;
}

.team__cards {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 16px;
  padding: 0 0 80px;
}
.card {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  min-width: 0;
  align-content: start;
  background: #1b1825;
  border: 1px solid var(--border);
  border-radius: 4px;
  color: inherit;
  text-decoration: none;
  overflow: hidden;
  transition:
    transform 0.2s,
    border-color 0.2s;
}

.card:hover,
.card:focus-visible {
  transform: translateY(-4px);
  border-color: var(--lilac);
  background: #241d32;
  outline: none;
}

.card__img {
  grid-column: 1 / -1;
  display: block;
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  object-position: center top;
  border-bottom: 1px solid var(--border);
}

.card__name {
  grid-column: 1;
  margin: 16px 0 0 16px;
  font-size: clamp(16px, 1.6vw, 20px);
  font-weight: 800;
  color: var(--text);
  overflow-wrap: anywhere;
}

.card__surname {
  grid-column: 1;
  margin: 2px 0 0 16px;
  font-size: 14px;
  color: var(--text);
  overflow-wrap: anywhere;
}

.card__role {
  grid-column: 1 / -1;
  margin: 14px 16px 18px;

  font-family: "Segoe UI", Arial, sans-serif;
  font-size: 14px;
  font-weight: 700;
  color: var(--lilac);
}

.modal {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 100;
  align-items: center;
  justify-content: center;
}
.modal:target {
  display: flex;
}
.modal__backdrop {
  position: absolute;
  inset: 0;
  background: #05030fcc;
}

.modal__dialog {
  position: relative;
  display: grid;
  grid-template-columns: 350px 1fr;
  grid-template-rows: minmax(0, 1fr) auto;
  width: min(800px, calc(100vw - 32px));
  height: min(560px, calc(100vh - 32px));
  overflow: hidden;
  background: var(--layer);
  border: 1px solid var(--border);
  font-family: system-ui, sans-serif;
  color: #c1b9d3;
}

.modal__img {
  grid-column: 1;
  grid-row: 1;
  display: block;
  width: 100%;
  height: 100%;
  min-height: 0;
  object-fit: cover;
  object-position: center top;
}

.modal__info {
  grid-column: 2;
  grid-row: 1;
  min-height: 0;
  overflow-y: auto;
  padding: 40px 44px 32px;
  scrollbar-width: thin;
  scrollbar-color: #000 transparent;
}

.modal__close {
  position: absolute;
  top: 10px;
  right: 10px;
  z-index: 1;
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  background: var(--layer);
  border: 1px solid var(--border);
  color: var(--text);
  font-size: 24px;
  text-decoration: none;
}
.modal__close:hover {
  border-color: var(--lilac);
}

.modal__info h2 {
  margin: 0 48px 12px 0;
  color: var(--text);
  font-size: 40px;
  font-weight: 800;
  line-height: 1.05;
}
.modal__role b {
  color: var(--lime);
  font-size: 14px;
}
.modal__role small {
  margin-left: 6px;
  color: #9a93ad;
  font:
    12px Consolas,
    monospace;
}

.modal__bio {
  margin: 20px 0 28px;
  color: var(--text);
  font-size: 16px;
  line-height: 1.55;
}
.modal__bio:empty {
  display: none;
}

.modal__info h4 {
  margin: 20px 0 8px;
  color: #9a93ad;
  font-size: 12px;
  font-weight: 700;
}

.modal__skills {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.modal__skills li {
  padding: 6px 10px;
  background: #1b1825;
  border: 1px solid var(--border);
  color: var(--text);
  font-size: 13px;
  font-weight: 700;
}

.modal__links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 16px;
}
.modal__links a {
  color: var(--lime);
  text-decoration: none;
}
.modal__links a:hover {
  text-decoration: underline;
}

.modal__nav {
  grid-column: 1 / -1;
  grid-row: 2;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 24px;
  border-top: 1px solid #3a3550;
  font-size: 14px;
}
.modal__nav a {
  color: var(--lilac);
  text-decoration: none;
}
.modal__nav a:hover {
  color: var(--lime);
}

.about {
  display: grid;
  grid-template-columns: 1fr minmax(0, 650px);
  align-items: center;
  gap: 48px;
  padding: 80px clamp(24px, 10vw, 200px);
  background: var(--layer);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

.about__ps {
  margin: 0 0 12px;
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--lilac);
  font-family: Consolas, monospace;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}
.about__ps::before {
  content: "///";
  font-style: italic;
  letter-spacing: -0.1em;
}

.about__h1 {
  margin: 0 0 32px;
  color: var(--text);
  font-size: 64px;
  font-weight: 800;
  line-height: 1;
}

.about__text p:not(.about__ps) {
  max-width: 480px;
  margin: 0 0 16px;
  color: #c1b9d3;
  font-family: system-ui, sans-serif;
  font-size: 18px;
  line-height: 1.75;
}

.about__badge {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 12px;
  min-height: 210px;
  padding: 0 40px;
  overflow: hidden;
  border: 1px solid #5b4a8a;
  background:
    radial-gradient(#ffffff12 1px, transparent 1px) 0 0 / 8px 8px,
    linear-gradient(100deg, #2a1d47, #4a3578);
}

.about__badge_label {
  position: relative;
  z-index: 1;
  color: var(--lime);
  font-family: Consolas, monospace;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.2em;
  text-transform: uppercase;
}

.about__badge_groups {
  position: relative;
  z-index: 1;
  color: var(--text);
  font-size: 52px;
  font-weight: 800;
  line-height: 1;
  white-space: nowrap;
}

.about__badge_bg {
  position: absolute;
  right: 16px;
  top: 50%;
  transform: translateY(-50%);
  color: #b397ff59;
  font-size: 220px;
  font-weight: 900;
  font-style: italic;
  line-height: 1;
  letter-spacing: -0.05em;
  user-select: none;
}

.label {
  margin: 0 0 12px;
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--lilac);
  font-family: Consolas, monospace;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}
.label::before {
  content: "///";
  font-style: italic;
  letter-spacing: -0.1em;
}

.title {
  margin: 0;
  color: var(--text);
  font-size: 48px;
  font-weight: 800;
  line-height: 1;
}

.skills {
  background: var(--bg);
  padding: 60px clamp(24px, 10vw, 200px) 24px;
}

.skills__head {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 24px;
  margin-bottom: 24px;
}

.skills__hint {
  margin: 0;
  max-width: 240px;
  color: var(--muted);
  font-family: system-ui, sans-serif;
  font-size: 14px;
  line-height: 1.5;
  text-align: right;
}

.skills__box {
  position: relative;
  display: flex;
  flex-wrap: wrap;
  align-content: flex-start;
  gap: 8px;
  min-height: 120px;
  padding: 20px calc(50% + 24px) 20px 24px;
  background: var(--layer);
  border: 1px solid var(--border);
}

.sk__radio {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.sk__chip {
  padding: 6px 12px;
  background: #1b1825;
  border: 1px solid var(--border);
  color: var(--text);
  font-family: system-ui, sans-serif;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  transition:
    border-color 0.2s,
    background 0.2s;
}
.sk__chip:hover {
  border-color: var(--lilac);
}
.sk__radio:checked + .sk__chip {
  background: var(--lime);
  border-color: var(--lime);
  color: var(--bg);
}
.sk__radio:focus-visible + .sk__chip {
  outline: 2px solid var(--lilac);
  outline-offset: 2px;
}

.sk__panel {
  display: none;
  position: absolute;
  top: 0;
  bottom: 0;
  left: 50%;
  right: 0;
  padding: 20px 24px;
  overflow-y: auto;
  border-left: 1px solid var(--border);
}
.sk__radio:checked + .sk__chip + .sk__panel {
  display: block;
}
.sk__panel h3 {
  margin: 0 0 16px;
  color: var(--text);
  font-family: system-ui, sans-serif;
  font-size: 16px;
  font-weight: 800;
}

.sk__people {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 4px 12px 4px 4px;
  background: #1b1825;
  border: 1px solid var(--border);
  border-radius: 999px;
  color: var(--text);
  font-family: system-ui, sans-serif;
  font-size: 12px;
  text-decoration: none;
  transition: border-color 0.2s;
}
.pill:hover {
  border-color: var(--lime);
}
.pill img {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  object-fit: cover;
  object-position: center top;
}

.projects {
  background: var(--bg);
  padding: 60px clamp(24px, 10vw, 200px) 100px;
}

.projects__h1 {
  margin: 0 0 40px;
  color: var(--text);
  font-size: clamp(48px, 8vw, 96px);
  font-weight: 800;
  line-height: 1;
}

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

.project {
  --accent: var(--lime);
  display: flex;
  flex-direction: column;
  min-width: 0;
  padding: 20px;
  border: 1px solid var(--border);
  background: var(--layer);
}

.project:nth-child(3n + 2) {
  --accent: #ffb27a;
}
.project:nth-child(3n) {
  --accent: var(--lilac);
}

.project__author {
  margin: 16px 0 0;
  color: var(--accent);
  font-family: Consolas, monospace;
  font-size: 11px;
  font-weight: 700;
  margin-top: 0;
}

.project__title {
  margin: 8px 0;
  color: var(--text);
  font-size: 32px;
  font-weight: 800;
  line-height: 1;
  margin: 8px 0 24px;
}

.project__link {
  margin-top: auto;
  align-self: flex-start;
  padding: 10px 14px;
  border: 1px solid var(--border);
  color: var(--text);
  font-family: Consolas, monospace;
  font-size: 11px;
  font-weight: 700;
  text-decoration: none;
  transition:
    border-color 0.2s,
    color 0.2s;
}
.project__link:hover {
  border-color: var(--lime);
  color: var(--lime);
}

.contacts {
  background: #190227;
  border-top: 1px solid var(--border);
  padding: 60px clamp(24px, 10vw, 200px) 32px;
}

.contacts__main {
  display: grid;
  grid-template-columns: 1fr minmax(0, 420px);
  gap: 48px;
  align-items: center;
}

.contacts__h1 {
  margin: 0 0 24px;
  color: var(--text);
  font-size: clamp(48px, 8vw, 96px);
  font-weight: 800;
  line-height: 1;
}
.contacts__h1 span {
  color: var(--lime);
}

.contacts__text {
  max-width: 420px;
  margin: 0 0 20px;
  color: var(--muted);
  font-family: system-ui, sans-serif;
  font-size: 14px;
  line-height: 1.6;
}

.contacts__captain {
  display: inline-block;
  padding-bottom: 4px;
  border-bottom: 1px solid var(--lime);
  color: var(--lime);
  font-family: system-ui, sans-serif;
  font-size: 16px;
  text-decoration: none;
}
.contacts__captain:hover {
  color: var(--text);
  border-color: var(--text);
}

.contacts__team h3 {
  margin: 0 0 12px;
  color: var(--text);
  font-size: 16px;
  font-weight: 800;
}

.contacts__list {
  margin: 0;
  padding: 0;
  list-style: none;
}
.contacts__list a {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 10px 0;
  border-bottom: 1px solid var(--border);
  color: var(--text);
  font-family: system-ui, sans-serif;
  font-size: 14px;
  text-decoration: none;
  transition: color 0.2s;
}
.contacts__list a:hover {
  color: var(--lime);
}
.contacts__nick {
  color: var(--muted);
  font-family: Consolas, monospace;
  font-size: 12px;
}
.contacts__nick::after {
  content: " ↗";
}

.footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 80px;
  padding-top: 24px;
  border-top: 1px solid var(--border);
}
.footer img {
  display: block;
  height: 24px;
  width: auto;
}
.footer a {
  color: var(--text);
  font-family: system-ui, sans-serif;
  font-size: 12px;
  text-decoration: none;
}
.footer a:hover {
  color: var(--lime);
}

/*quality*/

@media (max-width: 1100px) {
  .team__cards {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
  .team__head {
    flex-wrap: wrap;
  }
}

@media (max-width: 700px) {
  .team__cards {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .team__h1 {
    font-size: 36px;
    white-space: normal;
  }
}

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

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

@media (max-width: 700px) {
  .title {
    font-size: 36px;
  }
  .skills__head {
    flex-wrap: wrap;
  }
  .skills__hint {
    text-align: left;
  }
  .skills__box {
    padding: 24px;
  }
  .sk__panel {
    position: static;
    order: 1;
    flex-basis: 100%;
    margin-top: 16px;
    padding: 24px 0 0;
    border-left: 0;
    border-top: 1px solid var(--border);
  }
  .projects__list {
    grid-template-columns: minmax(0, 1fr);
  }
  .contacts__main {
    grid-template-columns: minmax(0, 1fr);
  }
}
