:root {
  --bg: #f6f9ff;
  --surface: #ffffff;
  --surface-blue: #eef5ff;
  --ink: #0f172a;
  --muted: #5b6b82;
  --line: #d8e4f5;
  --accent: #2563eb;
  --accent-dark: #1d4ed8;
  --accent-soft: #dbeafe;
  --accent-bright: #38bdf8;
  --code-bg: #0b1220;
  --shadow: 0 22px 58px rgba(37, 99, 235, 0.14);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background:
    radial-gradient(circle at 15% 8%, rgba(56, 189, 248, 0.18), transparent 26rem),
    linear-gradient(180deg, #f6f9ff 0%, #ffffff 44%, #f3f7ff 100%);
  color: var(--ink);
  cursor: none;
  font-family: "Inter", Arial, sans-serif;
  line-height: 1.6;
}

a,
button {
  cursor: none;
}

a {
  color: inherit;
  text-decoration: none;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  border-bottom: 1px solid rgba(216, 228, 245, 0.9);
  background: rgba(246, 249, 255, 0.86);
  backdrop-filter: blur(16px);
}

.nav {
  width: min(1120px, calc(100% - 32px));
  min-height: 72px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.brand {
  color: var(--accent-dark);
  font-size: 1.25rem;
  font-weight: 800;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 28px;
  color: var(--muted);
  font-weight: 600;
}

.nav-links a:hover {
  color: var(--accent);
}

.menu-button {
  display: none;
  width: 44px;
  height: 44px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
}

.menu-button span {
  display: block;
  width: 18px;
  height: 2px;
  margin: 4px auto;
  background: var(--ink);
}

.hero,
.section {
  width: min(1120px, calc(100% - 32px));
  margin: 0 auto;
}

.hero {
  min-height: calc(100vh - 72px);
  display: grid;
  grid-template-columns: 1.04fr 0.96fr;
  align-items: center;
  gap: 48px;
  padding: 72px 0;
}

.hero-content {
  position: relative;
}

.hero-content::before {
  content: "</>";
  position: absolute;
  top: -48px;
  right: 8%;
  color: rgba(37, 99, 235, 0.08);
  font-size: clamp(4rem, 10vw, 8rem);
  font-weight: 800;
  line-height: 1;
  pointer-events: none;
}

.eyebrow {
  margin: 0 0 12px;
  color: var(--accent);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1 {
  max-width: 780px;
  margin-bottom: 20px;
  font-size: clamp(2.4rem, 7vw, 5.35rem);
  line-height: 0.98;
  letter-spacing: 0;
}

h1::selection,
h2::selection,
p::selection,
a::selection,
span::selection,
code::selection {
  background: var(--accent);
  color: #ffffff;
}

h2 {
  margin-bottom: 18px;
  font-size: clamp(2rem, 4vw, 3.3rem);
  line-height: 1.05;
  letter-spacing: 0;
}

h3 {
  margin-bottom: 10px;
  font-size: 1.1rem;
}

.hero-text {
  max-width: 620px;
  color: var(--muted);
  font-size: 1.08rem;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 30px;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0 22px;
  border-radius: 8px;
  font-weight: 800;
  transition: transform 180ms ease, box-shadow 180ms ease, border-color 180ms ease, background 180ms ease;
}

.button.primary {
  background: linear-gradient(135deg, var(--accent), #0ea5e9);
  color: #ffffff;
  box-shadow: 0 14px 30px rgba(37, 99, 235, 0.28);
}

.button.primary:hover {
  background: linear-gradient(135deg, var(--accent-dark), #0284c7);
  transform: translateY(-2px);
}

.button.secondary {
  border: 1px solid var(--line);
  background: var(--surface);
}

.button.secondary:hover {
  border-color: rgba(37, 99, 235, 0.32);
  box-shadow: 0 12px 28px rgba(37, 99, 235, 0.12);
  transform: translateY(-2px);
}

.hero-panel {
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(96, 165, 250, 0.28);
  border-radius: 8px;
  background: var(--code-bg);
  box-shadow: var(--shadow);
}

.hero-panel::after {
  content: "";
  position: absolute;
  inset: auto -20% -45% 10%;
  height: 190px;
  background: radial-gradient(circle, rgba(56, 189, 248, 0.32), transparent 68%);
  pointer-events: none;
}

.window-dots {
  display: flex;
  gap: 8px;
  padding: 16px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.window-dots span {
  width: 10px;
  height: 10px;
  border-radius: 999px;
  background: #fb7185;
}

.window-dots span:nth-child(2) {
  background: #facc15;
}

.window-dots span:nth-child(3) {
  background: #34d399;
}

pre {
  min-height: 320px;
  margin: 0;
  padding: 28px;
  color: #dbeafe;
  font: 600 0.98rem/1.8 Consolas, "Courier New", monospace;
  white-space: pre-wrap;
}

.section {
  padding: 86px 0;
}

.section-muted {
  width: 100%;
  max-width: none;
  padding-right: max(16px, calc((100% - 1120px) / 2));
  padding-left: max(16px, calc((100% - 1120px) / 2));
  background:
    linear-gradient(135deg, rgba(219, 234, 254, 0.78), rgba(239, 246, 255, 0.96));
}

.section-heading {
  max-width: 680px;
  margin-bottom: 34px;
}

.about-grid {
  display: grid;
  grid-template-columns: 1fr 1.15fr;
  gap: 34px;
  align-items: start;
}

.about-grid > p {
  color: var(--muted);
  font-size: 1.08rem;
}

.stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
}

.stats div,
.project-card,
.timeline div,
.contact-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: var(--shadow);
}

.stats div,
.project-card,
.timeline div {
  transition: transform 180ms ease, border-color 180ms ease, box-shadow 180ms ease;
}

.stats div:hover,
.project-card:hover,
.timeline div:hover {
  border-color: rgba(37, 99, 235, 0.34);
  box-shadow: 0 22px 54px rgba(37, 99, 235, 0.16);
  transform: translateY(-5px);
}

.stats div {
  padding: 22px;
}

.stats strong {
  display: block;
  font-size: 2rem;
  line-height: 1;
}

.stats span {
  display: block;
  margin-top: 10px;
  color: var(--muted);
  font-size: 0.92rem;
}

.skill-list {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.skill-list span {
  display: inline-flex;
  min-height: 42px;
  align-items: center;
  border: 1px solid rgba(37, 99, 235, 0.24);
  border-radius: 8px;
  background: var(--surface);
  padding: 0 16px;
  color: var(--accent-dark);
  font-weight: 800;
}

.project-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
}

.project-card {
  padding: 24px;
}

.project-card p {
  color: var(--muted);
}

.project-card a {
  color: var(--accent);
  font-weight: 800;
}

.project-icon {
  display: inline-flex;
  width: 44px;
  height: 44px;
  align-items: center;
  justify-content: center;
  margin-bottom: 24px;
  border-radius: 8px;
  background: linear-gradient(135deg, var(--accent-soft), #e0f2fe);
  color: var(--accent-dark);
  font-weight: 800;
}

.timeline {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
}

.timeline div {
  padding: 24px;
}

.timeline span {
  display: block;
  margin-bottom: 20px;
  color: var(--accent);
  font-weight: 800;
}

.timeline p {
  color: var(--muted);
}

.contact {
  display: grid;
  grid-template-columns: 1fr 0.75fr;
  gap: 34px;
  align-items: center;
}

.contact p {
  max-width: 560px;
  color: var(--muted);
}

.contact-card {
  display: grid;
  gap: 12px;
  padding: 24px;
}

.contact-card a {
  display: block;
  overflow-wrap: anywhere;
  color: var(--accent-dark);
  font-weight: 800;
}

.cursor-dot,
.cursor-ring {
  position: fixed;
  top: 0;
  left: 0;
  z-index: 9999;
  opacity: 0;
  pointer-events: none;
  transform: translate(-50%, -50%);
}

.cursor-dot {
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: var(--accent);
}

.cursor-ring {
  width: 34px;
  height: 34px;
  border: 2px solid rgba(37, 99, 235, 0.42);
  border-radius: 999px;
  transition: width 160ms ease, height 160ms ease, border-color 160ms ease, background 160ms ease, opacity 160ms ease;
}

.cursor-dot.is-visible,
.cursor-ring.is-visible {
  opacity: 1;
}

.cursor-ring.is-active {
  width: 52px;
  height: 52px;
  border-color: rgba(14, 165, 233, 0.58);
  background: rgba(37, 99, 235, 0.08);
}

#telegramButton.telegram-float {
  position: fixed;
  right: calc(30px + env(safe-area-inset-right));
  bottom: calc(30px + env(safe-area-inset-bottom));
  z-index: 10000;
  display: inline-flex;
  width: 58px;
  height: 58px;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(125, 211, 252, 0.55);
  border-radius: 999px;
  background: linear-gradient(135deg, #2aabee, #1d4ed8);
  color: #ffffff;
  box-shadow: 0 18px 42px rgba(37, 99, 235, 0.32);
  font-weight: 800;
  line-height: 1;
  text-decoration: none;
  transition: transform 180ms ease, box-shadow 180ms ease;
}

#telegramButton.telegram-float:hover {
  box-shadow: 0 22px 54px rgba(37, 99, 235, 0.42);
  transform: translateY(-4px);
}

#telegramButton.telegram-float svg {
  width: 28px;
  height: 28px;
  display: block;
  fill: currentColor;
}

.footer {
  border-top: 1px solid var(--line);
  padding: 24px 16px;
  color: var(--muted);
  text-align: center;
}

.footer p {
  margin: 0;
}

@media (max-width: 820px) {
  body,
  a,
  button {
    cursor: auto;
  }

  .cursor-dot,
  .cursor-ring {
    display: none;
  }

  #telegramButton.telegram-float {
    right: calc(18px + env(safe-area-inset-right));
    bottom: calc(24px + env(safe-area-inset-bottom));
    width: 54px;
    height: 54px;
  }

  .menu-button {
    display: block;
  }

  .nav {
    position: relative;
  }

  .nav-links {
    position: absolute;
    top: 64px;
    right: 0;
    left: 0;
    display: none;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--surface);
    box-shadow: var(--shadow);
  }

  .nav-links.is-open {
    display: flex;
  }

  .nav-links a {
    padding: 14px 16px;
  }

  .hero {
    min-height: auto;
    grid-template-columns: 1fr;
    padding: 48px 0 96px;
  }

  .hero-panel {
    order: -1;
  }

  pre {
    min-height: 230px;
    padding: 22px;
    font-size: 0.82rem;
  }

  .about-grid,
  .contact {
    grid-template-columns: 1fr;
  }

  .stats,
  .project-grid,
  .timeline {
    grid-template-columns: 1fr;
  }

  .section {
    padding-top: 64px;
    padding-bottom: 64px;
  }
}

@media (max-width: 480px) {
  .hero,
  .section,
  .nav {
    width: min(100% - 24px, 1120px);
  }

  .hero-actions,
  .button {
    width: 100%;
  }

  h1 {
    font-size: 2.65rem;
  }

  .stats div,
  .project-card,
  .timeline div,
  .contact-card {
    padding: 20px;
  }
}
