:root {
  --bg: #070b16;
  --bg-soft: rgba(13, 22, 41, 0.8);
  --panel: rgba(10, 18, 34, 0.82);
  --panel-strong: rgba(8, 14, 28, 0.94);
  --line: rgba(98, 255, 231, 0.16);
  --line-strong: rgba(98, 255, 231, 0.34);
  --text: #edf7ff;
  --muted: #8ca7bb;
  --accent: #62ffe7;
  --accent-2: #7e7bff;
  --accent-3: #2eff98;
  --danger: #ff4fd8;
  --shadow: 0 0 24px rgba(98, 255, 231, 0.14);
  --radius: 22px;
  --radius-sm: 16px;
  --container: 1160px;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-width: 320px;
  background:
    radial-gradient(circle at top left, rgba(46, 255, 152, 0.08), transparent 30%),
    radial-gradient(circle at top right, rgba(126, 123, 255, 0.16), transparent 28%),
    linear-gradient(180deg, #060913 0%, #070b16 45%, #04070f 100%);
  color: var(--text);
  font-family: "Inter", sans-serif;
}

a {
  color: inherit;
  text-decoration: none;
}

img {
  display: block;
  max-width: 100%;
}

.page-shell {
  position: relative;
  overflow: hidden;
}

.grid-overlay,
.scanlines {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
}

.grid-overlay {
  background-image:
    linear-gradient(rgba(98, 255, 231, 0.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(98, 255, 231, 0.05) 1px, transparent 1px);
  background-size: 44px 44px;
  mask-image: linear-gradient(180deg, rgba(0, 0, 0, 0.7), transparent 90%);
}

.scanlines {
  opacity: 0.14;
  background: repeating-linear-gradient(
    to bottom,
    rgba(255, 255, 255, 0.05) 0,
    rgba(255, 255, 255, 0.05) 1px,
    transparent 1px,
    transparent 4px
  );
}

.site-header,
main,
.site-footer {
  position: relative;
  z-index: 1;
}

.site-header {
  width: min(calc(100% - 32px), var(--container));
  margin: 0 auto;
  padding: 22px 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  position: sticky;
  top: 0;
  backdrop-filter: blur(18px);
  background: rgba(7, 11, 22, 0.66);
  border-bottom: 1px solid rgba(98, 255, 231, 0.08);
}

.brand,
.site-nav a,
.eyebrow,
.section-kicker,
.mini-label,
.timeline-date,
.prompt,
.terminal-answer,
.hero-facts li {
  font-family: "JetBrains Mono", monospace;
}

.brand {
  font-size: 1rem;
  font-weight: 700;
  letter-spacing: 0.22em;
  color: var(--accent);
  text-shadow: 0 0 12px rgba(98, 255, 231, 0.4);
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 18px;
}

.header-controls {
  display: flex;
  align-items: center;
  gap: 16px;
}

.site-nav a {
  color: var(--muted);
  font-size: 0.92rem;
  transition: color 0.2s ease, text-shadow 0.2s ease;
}

.site-nav a:hover,
.site-nav a:focus-visible {
  color: var(--text);
  text-shadow: 0 0 8px rgba(98, 255, 231, 0.35);
}

.menu-toggle {
  display: none;
  width: 48px;
  height: 48px;
  padding: 0;
  background: rgba(98, 255, 231, 0.08);
  border: 1px solid rgba(98, 255, 231, 0.2);
  border-radius: 14px;
  cursor: pointer;
}

.menu-toggle span {
  display: block;
  width: 18px;
  height: 2px;
  margin: 0 auto 5px;
  background: var(--text);
}

.menu-toggle span:last-child {
  margin-bottom: 0;
}

.lang-switch {
  display: inline-flex;
  align-items: center;
  padding: 4px;
  border: 1px solid rgba(98, 255, 231, 0.16);
  border-radius: 999px;
  background: rgba(98, 255, 231, 0.05);
}

.lang-button {
  min-width: 46px;
  padding: 8px 12px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--muted);
  font-family: "JetBrains Mono", monospace;
  font-size: 0.85rem;
  cursor: pointer;
  transition: color 0.2s ease, background 0.2s ease, box-shadow 0.2s ease;
}

.lang-button.is-active {
  color: #041018;
  background: linear-gradient(135deg, var(--accent), #83ffe1);
  box-shadow: 0 0 18px rgba(98, 255, 231, 0.24);
}

.lang-button:hover,
.lang-button:focus-visible {
  color: var(--text);
}

main,
.site-footer {
  width: min(calc(100% - 32px), var(--container));
  margin: 0 auto;
}

.section {
  padding: 52px 0;
}

.hero {
  min-height: calc(100vh - 92px);
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(320px, 0.85fr);
  align-items: center;
  gap: 44px;
}

.eyebrow,
.section-kicker,
.mini-label,
.timeline-date {
  color: var(--accent);
  font-size: 0.85rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.hero h1,
.section-heading h2 {
  margin: 0;
  line-height: 1.02;
}

.hero h1 {
  font-size: clamp(2.8rem, 6vw, 5.3rem);
  max-width: 10ch;
}

.hero h1 span {
  display: block;
  color: var(--muted);
  font-size: 0.48em;
  font-weight: 600;
  margin-top: 10px;
}

.hero-role {
  min-height: 34px;
  margin: 20px 0 18px;
  color: var(--accent);
  font-size: clamp(1rem, 2.2vw, 1.28rem);
  font-family: "JetBrains Mono", monospace;
}

.cursor {
  display: inline-block;
  width: 10px;
  height: 1.1em;
  vertical-align: middle;
  background: var(--accent);
  box-shadow: 0 0 12px rgba(98, 255, 231, 0.8);
  animation: blink 1s steps(1) infinite;
}

.hero-description,
.panel p,
.info-card p,
.timeline-content p,
.contacts-list strong,
.site-footer p {
  color: var(--muted);
  line-height: 1.72;
}

.hero-description {
  max-width: 64ch;
  font-size: 1.05rem;
}

.hero-actions,
.hero-facts,
.contacts-list {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0 20px;
  border-radius: 999px;
  border: 1px solid transparent;
  font-weight: 600;
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease, background 0.2s ease;
}

.button:hover,
.button:focus-visible,
.info-card:hover,
.contacts-list a:hover,
.panel:hover,
.timeline-content:hover {
  transform: translateY(-2px);
}

.button-primary {
  color: #041018;
  background: linear-gradient(135deg, var(--accent), #83ffe1);
  box-shadow: 0 0 24px rgba(98, 255, 231, 0.25);
}

.button-primary:hover,
.button-primary:focus-visible {
  box-shadow: 0 0 34px rgba(98, 255, 231, 0.4);
}

.button-secondary {
  color: var(--text);
  border-color: rgba(98, 255, 231, 0.28);
  background: rgba(98, 255, 231, 0.05);
}

.button-secondary:hover,
.button-secondary:focus-visible {
  border-color: rgba(98, 255, 231, 0.55);
  box-shadow: 0 0 26px rgba(98, 255, 231, 0.18);
}

.hero-facts {
  list-style: none;
  padding: 0;
  margin: 28px 0 0;
}

.hero-facts li {
  padding: 10px 14px;
  border: 1px solid rgba(98, 255, 231, 0.15);
  border-radius: 999px;
  background: rgba(98, 255, 231, 0.06);
  color: var(--text);
  font-size: 0.84rem;
}

.hero-card {
  display: grid;
  gap: 22px;
}

.portrait-frame,
.panel,
.info-card,
.timeline-content,
.terminal-card {
  border: 1px solid rgba(98, 255, 231, 0.12);
  background: linear-gradient(180deg, rgba(11, 19, 36, 0.92), rgba(8, 13, 24, 0.88));
  box-shadow: var(--shadow);
}

.portrait-frame {
  position: relative;
  border-radius: 28px;
  overflow: hidden;
  aspect-ratio: 4 / 5;
}

.portrait-frame::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, transparent 0%, rgba(98, 255, 231, 0.08) 100%),
    radial-gradient(circle at 50% 0%, rgba(126, 123, 255, 0.22), transparent 45%);
  pointer-events: none;
}

.portrait-frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.terminal-card,
.panel,
.info-card,
.timeline-content {
  border-radius: var(--radius);
}

.terminal-card {
  padding: 18px 20px 20px;
}

.terminal-top {
  display: flex;
  gap: 8px;
  margin-bottom: 16px;
}

.terminal-top span {
  width: 11px;
  height: 11px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.2);
}

.terminal-top span:nth-child(1) {
  background: #ff5f57;
}

.terminal-top span:nth-child(2) {
  background: #ffbd2f;
}

.terminal-top span:nth-child(3) {
  background: #28c840;
}

.terminal-body p {
  margin: 0 0 8px;
  line-height: 1.55;
}

.prompt {
  color: var(--accent-3);
}

.terminal-answer {
  color: var(--text);
  margin-left: 18px;
}

.section-heading {
  margin-bottom: 24px;
}

.section-heading h2 {
  font-size: clamp(2rem, 4vw, 3rem);
  max-width: 12ch;
}

.about-grid,
.contacts-layout {
  display: grid;
  grid-template-columns: 1.3fr 0.9fr;
  gap: 22px;
}

.panel {
  padding: 26px;
}

.stats-panel {
  display: grid;
  gap: 18px;
  align-content: start;
}

.stat-item {
  padding: 18px 0;
  border-bottom: 1px solid rgba(98, 255, 231, 0.12);
}

.stat-item:last-child {
  border-bottom: 0;
  padding-bottom: 0;
}

.stat-value {
  display: block;
  font-size: 2rem;
  font-weight: 800;
  color: var(--text);
}

.stat-label {
  color: var(--muted);
}

.card-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 20px;
}

.info-card {
  padding: 24px;
  transition: transform 0.22s ease, border-color 0.22s ease, box-shadow 0.22s ease, background 0.22s ease;
}

.info-card:hover,
.info-card:focus-within {
  border-color: rgba(98, 255, 231, 0.34);
  box-shadow: 0 0 34px rgba(98, 255, 231, 0.17);
  background: linear-gradient(180deg, rgba(13, 23, 44, 0.96), rgba(8, 13, 24, 0.9));
}

.info-card h3,
.timeline-content h3 {
  margin: 0 0 10px;
}

.info-card a {
  display: inline-block;
  margin-top: 10px;
  color: var(--accent);
  font-weight: 600;
}

.timeline {
  display: grid;
  gap: 18px;
}

.timeline-item {
  display: grid;
  grid-template-columns: 180px 1fr;
  gap: 18px;
  align-items: start;
}

.timeline-content {
  padding: 24px;
  transition: transform 0.22s ease, border-color 0.22s ease;
}

.timeline-content:hover {
  border-color: rgba(98, 255, 231, 0.3);
}

.timeline-meta {
  margin: 0 0 12px;
  color: var(--accent);
  font-weight: 600;
}

.contacts-list {
  margin-top: 18px;
  flex-direction: column;
}

.contacts-list a {
  padding: 16px 18px;
  border: 1px solid rgba(98, 255, 231, 0.12);
  border-radius: var(--radius-sm);
  background: rgba(98, 255, 231, 0.04);
  transition: transform 0.22s ease, border-color 0.22s ease, box-shadow 0.22s ease;
}

.contacts-list a:hover,
.contacts-list a:focus-visible {
  border-color: rgba(98, 255, 231, 0.32);
  box-shadow: 0 0 26px rgba(98, 255, 231, 0.14);
}

.contacts-list span {
  display: block;
  margin-bottom: 6px;
  color: var(--accent);
  font-family: "JetBrains Mono", monospace;
  font-size: 0.85rem;
}

.contact-aside ul {
  margin: 18px 0 0;
  padding-left: 18px;
  color: var(--muted);
  line-height: 1.9;
}

.site-footer {
  padding: 18px 0 34px;
}

.site-footer p {
  margin: 0;
  padding-top: 24px;
  border-top: 1px solid rgba(98, 255, 231, 0.12);
  text-align: center;
}

.reveal {
  opacity: 0;
  transform: translateY(26px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}

.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

@keyframes blink {
  50% {
    opacity: 0;
  }
}

@media (max-width: 1080px) {
  .hero,
  .about-grid,
  .contacts-layout,
  .timeline-item {
    grid-template-columns: 1fr;
  }

  .card-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .timeline-date {
    margin-bottom: -4px;
  }
}

@media (max-width: 820px) {
  .site-header {
    padding: 16px 0;
  }

  .menu-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
  }

  .header-controls {
    margin-left: auto;
  }

  .site-nav {
    position: absolute;
    top: calc(100% + 10px);
    right: 0;
    left: 0;
    display: none;
    flex-direction: column;
    align-items: flex-start;
    padding: 18px;
    background: rgba(6, 10, 20, 0.96);
    border: 1px solid rgba(98, 255, 231, 0.14);
    border-radius: 18px;
  }

  .lang-switch {
    order: -1;
  }

  .site-nav.is-open {
    display: flex;
  }

  .hero {
    min-height: auto;
    padding-top: 24px;
  }

  .card-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 560px) {
  .site-header,
  main,
  .site-footer {
    width: min(calc(100% - 20px), var(--container));
  }

  .section {
    padding: 38px 0;
  }

  .header-controls {
    gap: 10px;
  }

  .panel,
  .info-card,
  .timeline-content,
  .terminal-card {
    padding: 20px;
  }

  .hero h1 {
    max-width: none;
  }

  .hero-actions {
    flex-direction: column;
  }

  .button {
    width: 100%;
  }
}

.site-footer .card-body {
  padding: 8px 0 30px;
}

.ks-footer-badges {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
  width: 100%;
  max-width: 460px;
  margin: 0 auto;
}

.ks-footer-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 132px;
  height: 132px;
  padding: 6px;
  border-radius: 24px;
  border: 1px solid rgba(98, 255, 231, 0.16);
  background: linear-gradient(180deg, rgba(11, 19, 36, 0.92), rgba(8, 13, 24, 0.88));
  box-shadow: var(--shadow);
  transition: transform 0.22s ease, border-color 0.22s ease, box-shadow 0.22s ease;
}

.ks-footer-badge:hover,
.ks-footer-badge:focus-visible {
  transform: translateY(-3px);
  border-color: rgba(98, 255, 231, 0.34);
  box-shadow: 0 0 34px rgba(98, 255, 231, 0.17);
}

.ks-footer-badge__img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 18px;
}

.ks-footer__legal {
  margin-top: 18px;
  padding-top: 18px;
  border-top: 1px solid rgba(98, 255, 231, 0.12);
}

.ks-mono {
  font-family: "JetBrains Mono", monospace;
}

.ks-mono--dim {
  color: var(--muted);
}

@media (max-width: 560px) {
  .ks-footer-badges {
    grid-template-columns: 1fr;
    max-width: 180px;
  }
}
