:root {
  --bg: #05070f;
  --bg-soft: #0b1220;
  --surface: #101a2e;
  --surface-alt: #0d1628;
  --text: #e8ecf8;
  --muted: #9ca8c9;
  --primary: #1ca3ff;
  --primary-strong: #0078d4;
  --border: rgba(156, 168, 201, 0.25);
  --shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
  --radius: 18px;
  --container: 1120px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scrollbar-color: var(--primary) rgba(16, 26, 46, 0.9);
  scrollbar-width: thin;
}

body::-webkit-scrollbar {
  width: 14px;
}

body::-webkit-scrollbar-track {
  background:
    linear-gradient(180deg, rgba(9, 15, 28, 0.98), rgba(16, 26, 46, 0.92));
  border-left: 1px solid rgba(28, 163, 255, 0.12);
}

body::-webkit-scrollbar-thumb {
  background:
    linear-gradient(180deg, rgba(28, 163, 255, 0.95), rgba(0, 120, 212, 0.95));
  border: 3px solid rgba(9, 15, 28, 0.9);
  border-radius: 999px;
  box-shadow:
    0 0 0 1px rgba(124, 201, 255, 0.18),
    0 0 16px rgba(28, 163, 255, 0.22);
}

body::-webkit-scrollbar-thumb:hover {
  background:
    linear-gradient(180deg, #57bbff, #1695f2);
}

body::-webkit-scrollbar-corner {
  background: rgba(9, 15, 28, 0.98);
}

body {
  margin: 0;
  font-family: "Poppins", "Segoe UI", sans-serif;
  color: var(--text);
  background:
    radial-gradient(circle at 15% 20%, rgba(28, 163, 255, 0.16) 0%, rgba(28, 163, 255, 0) 28%),
    radial-gradient(circle at 85% 78%, rgba(0, 120, 212, 0.2) 0%, rgba(0, 120, 212, 0) 35%),
    var(--bg);
  line-height: 1.6;
}

img {
  max-width: 100%;
  display: block;
}

a {
  color: inherit;
  text-decoration: none;
}

.container {
  width: min(var(--container), 92%);
  margin: 0 auto;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  backdrop-filter: blur(12px);
  background: rgba(5, 7, 15, 0.8);
  border-bottom: 1px solid rgba(156, 168, 201, 0.18);
}

.nav-wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 74px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  letter-spacing: 0.2px;
}

.brand img {
  width: 28px;
  height: 28px;
}

.menu-toggle {
  display: none;
  border: 1px solid var(--border);
  background: transparent;
  color: var(--text);
  border-radius: 10px;
  width: 42px;
  height: 42px;
  padding: 0;
  cursor: pointer;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.hamburger,
.hamburger::before,
.hamburger::after {
  display: block;
  width: 18px;
  height: 2px;
  border-radius: 999px;
  background: var(--text);
  transition: transform 180ms ease;
}

.hamburger {
  position: relative;
  margin: 0 auto;
}

.hamburger::before,
.hamburger::after {
  content: "";
  position: absolute;
  left: 0;
}

.hamburger::before {
  top: -6px;
}

.hamburger::after {
  top: 6px;
}

.nav-menu {
  display: flex;
  align-items: center;
  gap: 22px;
}

.nav-menu a {
  color: var(--muted);
  font-weight: 500;
  transition: color 180ms ease;
}

.nav-menu a:hover,
.nav-menu a:focus-visible {
  color: var(--text);
}

.hero {
  padding: 92px 0 70px;
}

.hero-grid {
  display: grid;
  gap: 26px;
  align-items: center;
  grid-template-columns: 1.2fr 0.8fr;
}

.kicker {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin: 0 0 14px;
  font-size: 0.88rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--primary);
  font-weight: 700;
}

.kicker::before {
  content: "";
  width: 22px;
  height: 2px;
  background: linear-gradient(90deg, var(--primary), transparent);
}

h1 {
  margin: 0;
  font-size: clamp(2rem, 6vw, 3.7rem);
  line-height: 1.1;
}

.hero strong {
  color: var(--primary);
}

.lead {
  margin: 18px 0 28px;
  max-width: 62ch;
  color: var(--muted);
  font-size: 1.1rem;
}

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0 22px;
  border-radius: 12px;
  border: 1px solid transparent;
  font-weight: 600;
  transition: transform 160ms ease, border-color 160ms ease, background-color 160ms ease;
}

.btn:hover {
  transform: translateY(-1px);
}

.btn-primary {
  background: linear-gradient(135deg, var(--primary), var(--primary-strong));
  color: #001324;
}

.btn-secondary {
  border-color: var(--border);
  color: var(--text);
  background: rgba(16, 26, 46, 0.7);
}

.stats {
  margin-top: 26px;
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  color: var(--muted);
}

.stats b {
  color: var(--text);
  margin-right: 6px;
}

.hero-card {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  background: linear-gradient(170deg, rgba(28, 163, 255, 0.16), rgba(13, 22, 40, 0.88));
  box-shadow: var(--shadow);
}

.hero-card h2 {
  font-size: 1.2rem;
  margin: 0 0 8px;
}

.hero-card p {
  color: #d1dbf2;
  margin: 0;
}

.section {
  padding: 65px 0;
}

.section-title {
  margin: 0 0 8px;
  font-size: clamp(1.6rem, 4vw, 2.3rem);
}

.section-subtitle {
  margin: 0 0 28px;
  color: var(--muted);
  max-width: 70ch;
}

.about-grid {
  display: grid;
  gap: 20px;
  grid-template-columns: 1.1fr 0.9fr;
}

.card {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 22px;
  background: linear-gradient(175deg, rgba(16, 26, 46, 0.92), rgba(13, 22, 40, 0.9));
}

.card p {
  margin: 0;
  color: #d4dcf1;
}

.projects-grid {
  display: grid;
  gap: 18px;
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.projects-grid > .project-card:last-child {
  grid-column: 2;
}

.project-card {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--surface-alt);
  transition: transform 180ms ease, border-color 180ms ease;
}

.project-card:hover {
  transform: translateY(-4px);
  border-color: rgba(28, 163, 255, 0.5);
}

.project-cover {
  height: 140px;
  overflow: hidden;
  background: #d7d9de;
  display: grid;
  place-items: center;
}

.project-cover img {
  width: auto;
  height: auto;
  max-width: 100%;
  max-height: 100%;
  display: block;
}

.project-body {
  padding: 18px;
}

.project-body h3 {
  margin: 0 0 10px;
  font-size: 1.08rem;
}

.project-body p {
  margin: 0;
  color: var(--muted);
}

.project-link {
  display: inline-flex;
  margin-top: 12px;
  font-weight: 600;
  color: var(--primary);
}

.project-link:hover,
.project-link:focus-visible {
  color: #7cc9ff;
}

.skill-list {
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.skill-item {
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 12px 14px;
  background: rgba(16, 26, 46, 0.75);
  color: #dce3f7;
  font-weight: 500;
}

.tech-carousel {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 22px;
  background: linear-gradient(175deg, rgba(16, 26, 46, 0.95), rgba(13, 22, 40, 0.95));
}

.swiper {
  width: 100%;
  padding-bottom: 34px;
}

.swiper-slide {
  min-height: 130px;
  display: grid;
  place-items: center;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: rgba(28, 163, 255, 0.08);
  color: #dfe7f9;
  font-size: 1.1rem;
  font-weight: 600;
}

.tech-item {
  display: grid;
  justify-items: center;
  gap: 10px;
  text-align: center;
}

.tech-item i {
  font-size: 2.2rem;
  line-height: 1;
}

.tech-item span {
  font-size: 0.98rem;
  letter-spacing: 0.01em;
}

.swiper-pagination-bullet {
  background: var(--muted);
  opacity: 0.6;
}

.swiper-pagination-bullet-active {
  background: var(--primary);
  opacity: 1;
}

.site-footer {
  border-top: 1px solid rgba(156, 168, 201, 0.18);
  margin-top: 30px;
  padding: 28px 0;
  color: var(--muted);
}

.contact-wrap {
  display: grid;
  gap: 20px;
  grid-template-columns: 1fr;
}

.contact-title {
  margin-bottom: 10px;
}

.contact-text {
  margin: 0;
  max-width: 62ch;
}

.contact-links {
  display: grid;
  gap: 14px;
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.contact-link {
  display: grid;
  gap: 6px;
  align-content: start;
  min-height: 110px;
  padding: 18px;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: rgba(16, 26, 46, 0.75);
  transition: border-color 180ms ease, transform 180ms ease;
}

.contact-link:hover,
.contact-link:focus-visible {
  transform: translateY(-2px);
  border-color: rgba(28, 163, 255, 0.45);
}

.contact-link i {
  font-size: 1.6rem;
  line-height: 1;
}

.contact-link span {
  color: var(--muted);
  font-size: 0.95rem;
}

.contact-link strong {
  color: var(--text);
  font-size: 1rem;
}

.contact-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 4px;
}

.contact-mailto,
.copy-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 40px;
  padding: 0 14px;
  border-radius: 10px;
  font-weight: 600;
}

.contact-mailto {
  background: rgba(28, 163, 255, 0.12);
  color: var(--primary);
}

.copy-button {
  position: relative;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.04);
  color: var(--text);
  cursor: pointer;
  overflow: hidden;
  transition: transform 180ms ease, border-color 180ms ease, background-color 180ms ease;
}

.copy-button:hover,
.copy-button:focus-visible {
  transform: translateY(-1px);
  border-color: rgba(28, 163, 255, 0.45);
}

.copy-button::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(120deg, transparent 20%, rgba(124, 201, 255, 0.28) 50%, transparent 80%);
  transform: translateX(-130%);
  opacity: 0;
}

.copy-button.copied {
  background: rgba(39, 196, 120, 0.12);
  border-color: rgba(39, 196, 120, 0.45);
  color: #b9f6d3;
}

.copy-button.copied::after {
  animation: copyFlash 850ms ease;
}

@keyframes copyFlash {
  0% {
    transform: translateX(-130%);
    opacity: 0;
  }

  25% {
    opacity: 1;
  }

  100% {
    transform: translateX(130%);
    opacity: 0;
  }
}

@media (max-width: 980px) {
  .hero-grid,
  .about-grid,
  .projects-grid {
    grid-template-columns: 1fr;
  }

  .projects-grid {
    gap: 14px;
  }

  .projects-grid > .project-card:last-child {
    grid-column: auto;
  }

  .contact-links {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 760px) {
  .menu-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-left: auto;
  }

  .nav-menu {
    position: absolute;
    top: 74px;
    left: 0;
    right: 0;
    width: min(var(--container), 100%);
    margin: 0 auto;
    flex-direction: column;
    align-items: flex-start;
    padding: 16px;
    border-radius: 0 0 14px 14px;
    border: 1px solid rgba(156, 168, 201, 0.2);
    border-top: 0;
    background: rgba(5, 7, 15, 0.98);
    transform: scaleY(0);
    transform-origin: top;
    opacity: 0;
    pointer-events: none;
    transition: transform 180ms ease, opacity 180ms ease;
  }

  .nav-menu.open {
    transform: scaleY(1);
    opacity: 1;
    pointer-events: auto;
  }

  .skill-list {
    grid-template-columns: 1fr;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}
