:root {
  --primary-color: #0a0f0e;
  --secondary-color: #00ffcc;
  --accent-color: #ff6b9d;
  --tertiary-color: #6366f1;
  --text-color: #ffffff;
  --text-muted: #a1a1aa;
  --card-color: #1a2625;
  --glass-bg: rgba(26, 38, 37, 0.25);
  --glass-bg-light: rgba(255, 255, 255, 0.05);
  --shadow-color: rgba(0, 0, 0, 0.3);
  --hover-shadow: 0 0 25px #00ffcc;
  --gradient-primary: linear-gradient(
    135deg,
    #0a0f0e 0%,
    #1a2625 50%,
    #0f1918 100%
  );
  --gradient-card: linear-gradient(
    145deg,
    rgba(26, 38, 37, 0.8),
    rgba(15, 25, 24, 0.9)
  );
  --gradient-glow: linear-gradient(45deg, #00ffcc, #00b8a3, #ff6b9d);
  --gradient-video: linear-gradient(
    135deg,
    rgba(99, 102, 241, 0.1) 0%,
    rgba(0, 255, 204, 0.1) 50%,
    rgba(255, 107, 157, 0.1) 100%
  );
  --border-radius: 20px;
  --border-radius-lg: 30px;
  --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

* {
  box-sizing: border-box;
}

body {
  background: var(--gradient-primary);
  margin: 0;
  font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
    Oxygen, Ubuntu, Cantarell, sans-serif;
  font-weight: 300;
  color: var(--text-color);
  line-height: 1.6;
  overflow-x: hidden;
}

body::before {
  content: "";
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: radial-gradient(
      circle at 20% 80%,
      rgba(0, 255, 204, 0.1) 0%,
      transparent 50%
    ),
    radial-gradient(
      circle at 80% 20%,
      rgba(255, 107, 157, 0.1) 0%,
      transparent 50%
    ),
    radial-gradient(
      circle at 40% 40%,
      rgba(0, 255, 204, 0.05) 0%,
      transparent 50%
    );
  pointer-events: none;
  z-index: -1;
}

.header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px 40px;
  backdrop-filter: blur(20px);
  background: rgba(10, 15, 14, 0.9);
  border-bottom: 1px solid rgba(0, 255, 204, 0.2);
  position: sticky;
  top: 0;
  z-index: 1000;
  min-height: 80px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
  width: 100%;
  box-sizing: border-box;
}

.logo img {
  width: 140px;
  height: auto;
  margin: 0;
  transition: all 0.4s ease;
  filter: drop-shadow(0 0 20px rgba(0, 255, 204, 0.3));
  border-radius: 10px;
}

.logo img:hover {
  transform: scale(1.05);
  filter: drop-shadow(0 0 30px rgba(0, 255, 204, 0.5));
}

.navbar {
  display: flex;
  gap: 12px;
  margin-right: 0;
  flex-wrap: nowrap;
  align-items: center;
  justify-content: flex-end;
  max-width: 400px;
}

.nav-item {
  display: flex;
  justify-content: center;
  align-items: center;
  width: 85px;
  height: 36px;
  color: var(--text-color);
  text-decoration: none;
  font-size: 12px;
  font-weight: 600;
  border-radius: 20px;
  background: rgba(0, 255, 204, 0.1);
  backdrop-filter: blur(20px);
  border: 2px solid rgba(0, 255, 204, 0.3);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  overflow: hidden;
  text-transform: uppercase;
  letter-spacing: 0.3px;
  box-shadow: 0 4px 15px rgba(0, 255, 204, 0.2);
  flex-shrink: 0;
  white-space: nowrap;
  transform: translateX(0) translateY(0);
}

.nav-item::before {
  content: "";
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: var(--gradient-glow);
  transition: left 0.5s ease;
  z-index: -1;
}

.nav-item:hover::before {
  left: 0;
}

.nav-item:hover {
  transform: translateY(-3px) scale(1.05);
  box-shadow: 0 8px 25px rgba(0, 255, 204, 0.4);
  border-color: var(--secondary-color);
  background: rgba(0, 255, 204, 0.2);
  color: var(--primary-color);
}

.about_me {
  padding: 100px 40px;
  background: var(--gradient-primary);
  position: relative;
  overflow: hidden;
  min-height: 80vh;
  display: flex;
  align-items: center;
}

.about_me::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: radial-gradient(
      circle at 20% 80%,
      rgba(0, 255, 204, 0.1) 0%,
      transparent 50%
    ),
    radial-gradient(
      circle at 80% 20%,
      rgba(255, 107, 157, 0.1) 0%,
      transparent 50%
    );
  pointer-events: none;
}

.about_content {
  max-width: 1400px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 80px;
  position: relative;
  z-index: 1;
}

.about_text_section {
  flex: 1;
  padding-right: 40px;
}

.about_text_section h1 {
  margin-bottom: 40px;
  font-size: 48px;
  background: var(--gradient-glow);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  text-align: left;
}

.about_text {
  font-size: 18px;
  line-height: 1.8;
  margin-bottom: 25px;
  color: var(--text-color);
  text-align: left;
}

.about_text:last-child {
  margin-bottom: 0;
}

.about_video_section {
  flex: 0 0 300px;
  position: relative;
}

.about_video {
  width: 100%;
  height: 500px;
  object-fit: cover;
  border-radius: var(--border-radius-lg);
  box-shadow: 0 25px 50px rgba(0, 0, 0, 0.4), 0 0 0 1px rgba(0, 255, 204, 0.2);
  transition: var(--transition);
  border: 3px solid rgba(0, 255, 204, 0.3);
}

.about_video:hover {
  transform: scale(1.02);
  box-shadow: 0 30px 60px rgba(0, 0, 0, 0.5), 0 0 30px rgba(0, 255, 204, 0.4);
  border-color: var(--secondary-color);
}

.project_link {
  color: var(--secondary-color);
  text-decoration: none;
  font-weight: 600;
  transition: var(--transition);
  position: relative;
}

.project_link::after {
  content: "";
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--gradient-glow);
  transition: width 0.3s ease;
}

.project_link:hover::after {
  width: 100%;
}

.project_link:hover {
  color: #00b8a3;
  text-shadow: 0 0 10px rgba(0, 255, 204, 0.5);
}

h1,
h2,
h3 {
  font-weight: 700;
  margin: 30px 0;
  background: var(--gradient-glow);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

h1,
h2 {
  font-size: 48px;
  text-align: center;
  padding: 20px 0;
  line-height: 1.2;
  position: relative;
}

h1::after,
h2::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 100px;
  height: 3px;
  background: var(--gradient-glow);
  border-radius: 2px;
}

h3 {
  font-size: 28px;
  text-align: center;
}

.text {
  font-size: 20px;
  line-height: 1.8;
  max-width: 800px;
  min-height: 300px;
  padding: 40px;
  background: var(--glass-bg);
  backdrop-filter: blur(20px);
  border-radius: 20px;
  border: 1px solid rgba(0, 255, 204, 0.1);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.2);
}

.my_img {
  width: 100%;
  max-width: 400px;
  margin-top: 100px;
  height: auto;
  border-radius: 20px;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3), 0 0 0 1px rgba(0, 255, 204, 0.2);
  transition: all 0.4s ease;
  position: relative;
}

.my_img::before {
  content: "";
  position: absolute;
  top: -2px;
  left: -2px;
  right: -2px;
  bottom: -2px;
  background: var(--gradient-glow);
  border-radius: 22px;
  z-index: -1;
  opacity: 0;
  transition: opacity 0.4s ease;
}

.my_img:hover::before {
  opacity: 1;
}

.my_img:hover {
  transform: scale(1.03) rotateZ(1deg);
  box-shadow: 0 30px 60px rgba(0, 0, 0, 0.4), 0 0 50px rgba(0, 255, 204, 0.3);
}

.my_stack {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 30px;
  padding: 60px 40px;
  margin: 60px 0;
  background: var(--glass-bg);
  backdrop-filter: blur(20px);
  border-radius: 30px;
  margin: 60px 40px;
  border: 1px solid rgba(0, 255, 204, 0.1);
}

.stack_link {
  display: inline-block;
  text-decoration: none;
  transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.stack_link:hover {
  transform: translateY(-15px) rotateZ(10deg) scale(1.1);
}

.stack_item {
  width: 100px;
  height: 100px;
  object-fit: contain;
  transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
  filter: drop-shadow(0 8px 16px rgba(0, 0, 0, 0.3));
  cursor: pointer;
  padding: 15px;
  background: var(--gradient-card);
  border-radius: 20px;
  border: 1px solid rgba(0, 255, 204, 0.1);
  backdrop-filter: blur(10px);
  display: block;
}

.stack_link:hover .stack_item {
  filter: drop-shadow(0 20px 40px rgba(0, 255, 204, 0.4));
  box-shadow: 0 0 30px rgba(0, 255, 204, 0.5);
}

.cards_container {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
  gap: 40px;
  padding: 60px 40px;
  margin: 60px 0;
}

.card {
  width: 100%;
  height: 300px;
  perspective: 1000px;
  border-radius: 20px;
}

.card-inner {
  width: 100%;
  height: 100%;
  position: relative;
  transition: transform 0.8s cubic-bezier(0.4, 0, 0.2, 1);
  transform-style: preserve-3d;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3), 0 0 0 1px rgba(0, 255, 204, 0.1);
  border-radius: 20px;
}

.card:hover .card-inner {
  transform: rotateY(180deg);
}

.card-front,
.card-back {
  width: 100%;
  height: 100%;
  position: absolute;
  backface-visibility: hidden;
  border-radius: 20px;
  overflow: hidden;
}

.card-front {
  background: var(--gradient-card);
}

.card-back {
  background: var(--gradient-card);
  backdrop-filter: blur(20px);
  transform: rotateY(180deg);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  border: 1px solid rgba(0, 255, 204, 0.3);
  position: relative;
}

.card-back::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: var(--gradient-glow);
  opacity: 0.1;
  z-index: -1;
}

.cover {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease;
}

.white-link {
  display: inline-block;
  padding: 16px 32px;
  background: var(--gradient-glow);
  color: white;
  text-decoration: none;
  border-radius: 50px;
  font-weight: 600;
  font-size: 16px;
  text-transform: uppercase;
  letter-spacing: 1px;
  transition: all 0.3s ease;
  box-shadow: 0 10px 30px rgba(0, 255, 204, 0.3);
  position: relative;
  overflow: hidden;
}

.white-link::before {
  content: "";
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(
    45deg,
    transparent,
    rgba(255, 255, 255, 0.3),
    transparent
  );
  transition: left 0.5s ease;
}

.white-link:hover::before {
  left: 100%;
}

.white-link:hover {
  transform: scale(1.05) translateY(-2px);
  box-shadow: 0 15px 40px rgba(0, 255, 204, 0.5);
}

.video_form_wrapper {
  position: relative;
  overflow: hidden;
  padding: 80px 40px;
  background: var(--gradient-primary);
  margin-top: 80px;
}

.contacts {
  display: flex;
  justify-content: center;
  gap: 80px;
  flex-wrap: wrap;
}

#cv_container,
#contacts_form {
  width: 500px;
  height: 600px;
  border-radius: 20px;
  overflow: hidden;
  background: var(--glass-bg);
  backdrop-filter: blur(20px);
  border: 1px solid rgba(0, 255, 204, 0.2);
  box-shadow: 0 30px 60px rgba(0, 0, 0, 0.3), 0 0 0 1px rgba(0, 255, 204, 0.1);
  transition: all 0.4s ease;
  position: relative;
}

#cv_container::before,
#contacts_form::before {
  content: "";
  position: absolute;
  top: -2px;
  left: -2px;
  right: -2px;
  bottom: -2px;
  background: var(--gradient-glow);
  border-radius: 22px;
  z-index: -1;
  opacity: 0;
  transition: opacity 0.4s ease;
}

#cv_container:hover::before,
#contacts_form:hover::before {
  opacity: 0.3;
}

#cv_container:hover,
#contacts_form:hover {
  transform: translateY(-10px);
  box-shadow: 0 40px 80px rgba(0, 0, 0, 0.4), 0 0 50px rgba(0, 255, 204, 0.3);
}

.cv {
  width: 100%;
  height: 100%;
  border: none;
  border-radius: 20px;
}

.container_contact {
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-around;
  padding: 40px;
  box-sizing: border-box;
}

.contact {
  width: 100%;
  margin-bottom: 20px;
}

.contact label {
  display: block;
  margin-bottom: 15px;
  font-weight: 500;
  font-size: 18px;
  color: var(--secondary-color);
}

.email,
.textmessage {
  width: 100%;
  padding: 16px 20px;
  border-radius: 12px;
  border: 1px solid rgba(0, 255, 204, 0.2);
  background: rgba(255, 255, 255, 0.05);
  backdrop-filter: blur(10px);
  color: var(--text-color);
  font-size: 16px;
  transition: all 0.3s ease;
  box-sizing: border-box;
}

.email:focus,
.textmessage:focus {
  outline: none;
  border-color: var(--secondary-color);
  box-shadow: 0 0 20px rgba(0, 255, 204, 0.3),
    inset 0 0 20px rgba(0, 255, 204, 0.1);
  background: rgba(255, 255, 255, 0.1);
}

.textmessage {
  height: 120px;
  resize: vertical;
}

.btn {
  background: var(--gradient-glow);
  color: white;
  border: none;
  padding: 16px 40px;
  font-size: 18px;
  font-weight: 600;
  cursor: pointer;
  border-radius: 50px;
  font-family: inherit;
  text-transform: uppercase;
  letter-spacing: 1px;
  transition: all 0.3s ease;
  box-shadow: 0 10px 30px rgba(0, 255, 204, 0.3);
  position: relative;
  overflow: hidden;
}

.btn::before {
  content: "";
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(
    45deg,
    transparent,
    rgba(255, 255, 255, 0.3),
    transparent
  );
  transition: left 0.5s ease;
}

.btn:hover::before {
  left: 100%;
}

.btn:hover {
  transform: scale(1.05) translateY(-2px);
  box-shadow: 0 15px 40px rgba(0, 255, 204, 0.5);
}

/* Animation keyframes */
@keyframes float {
  0%,
  100% {
    transform: translateY(0px);
  }
  50% {
    transform: translateY(-10px);
  }
}

@keyframes glow {
  0%,
  100% {
    box-shadow: 0 0 20px rgba(0, 255, 204, 0.3);
  }
  50% {
    box-shadow: 0 0 40px rgba(0, 255, 204, 0.6);
  }
}

.stack_item:nth-child(odd) {
  animation: float 3s ease-in-out infinite;
}

.stack_item:nth-child(even) {
  animation: float 3s ease-in-out infinite reverse;
}

/* Video Section Styles */
.video_section {
  padding: 80px 40px;
  background: var(--gradient-video);
  position: relative;
  overflow: hidden;
}

.video_section::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: radial-gradient(
      circle at 30% 20%,
      rgba(99, 102, 241, 0.1) 0%,
      transparent 50%
    ),
    radial-gradient(
      circle at 70% 80%,
      rgba(0, 255, 204, 0.1) 0%,
      transparent 50%
    );
  pointer-events: none;
}

.video_container {
  max-width: 1200px;
  margin: 0 auto;
  text-align: center;
  position: relative;
  z-index: 1;
}

.video_container h2 {
  margin-bottom: 40px;
  font-size: 42px;
  background: var(--gradient-glow);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.video_wrapper {
  position: relative;
  max-width: 800px;
  margin: 0 auto 30px;
  border-radius: var(--border-radius-lg);
  overflow: hidden;
  box-shadow: 0 25px 50px rgba(0, 0, 0, 0.4), 0 0 0 1px rgba(0, 255, 204, 0.2);
  background: var(--gradient-card);
  backdrop-filter: blur(20px);
}

.main_video {
  width: 100%;
  height: 450px;
  object-fit: cover;
  display: block;
  transition: var(--transition);
}

.video_overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.3);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 1;
  transition: var(--transition);
  backdrop-filter: blur(2px);
}

.video_wrapper:hover .video_overlay {
  opacity: 0.8;
}

.play_button {
  background: var(--gradient-glow);
  border: none;
  border-radius: 50%;
  width: 100px;
  height: 100px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: var(--transition);
  box-shadow: 0 15px 35px rgba(0, 255, 204, 0.3);
  color: white;
}

.play_button:hover {
  transform: scale(1.1);
  box-shadow: 0 20px 45px rgba(0, 255, 204, 0.5);
}

.play_button svg {
  margin-left: 4px; /* Slight offset for visual balance */
}

.video_description {
  font-size: 18px;
  color: var(--text-muted);
  max-width: 600px;
  margin: 0 auto;
  line-height: 1.6;
}

/* Hide overlay when video is playing */
.video_wrapper.playing .video_overlay {
  opacity: 0;
  pointer-events: none;
}

/* Skills Radar Chart Section */
.skills_chart_section {
  padding: 80px 40px;
  background: var(--gradient-primary);
  position: relative;
  overflow: hidden;
}

.skills_chart_section::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: radial-gradient(
      circle at 30% 20%,
      rgba(255, 159, 67, 0.1) 0%,
      transparent 50%
    ),
    radial-gradient(
      circle at 70% 80%,
      rgba(0, 255, 204, 0.1) 0%,
      transparent 50%
    );
  pointer-events: none;
}

.chart_container {
  max-width: 1200px;
  margin: 0 auto;
  text-align: center;
  position: relative;
  z-index: 1;
}

.chart_container h2 {
  margin-bottom: 40px;
  font-size: 42px;
  background: var(--gradient-glow);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.radar_chart_wrapper {
  display: flex;
  justify-content: center;
  align-items: center;
  margin: 40px 0;
  padding: 40px;
  background: var(--glass-bg);
  backdrop-filter: blur(20px);
  border-radius: var(--border-radius-lg);
  border: 1px solid rgba(0, 255, 204, 0.2);
  box-shadow: 0 25px 50px rgba(0, 0, 0, 0.3);
  height: 500px;
}

#radar-chart-root {
  max-width: 100%;
  max-height: 100%;
}

.chart_description {
  font-size: 18px;
  color: var(--text-muted);
  max-width: 600px;
  margin: 0 auto;
  line-height: 1.6;
}

/* Responsive Design */
@media (max-width: 1200px) {
  .navbar {
    gap: 15px;
  }

  .nav-item {
    width: 140px;
    height: 38px;
    font-size: 14px;
  }

  .about_me {
    padding: 40px 60px;
    gap: 60px;
  }

  h1,
  h2 {
    font-size: 40px;
  }
}

@media (max-width: 992px) {
  .header {
    flex-direction: column;
    padding: 20px;
    min-height: auto;
  }

  .logo img {
    margin: 10px 0;
    width: 120px;
  }

  .navbar {
    margin: 15px 0;
    justify-content: center;
    gap: 10px;
    flex-wrap: wrap;
  }

  .nav-item {
    width: 90px;
    height: 35px;
    font-size: 11px;
    letter-spacing: 0.3px;
  }

  .about_content {
    flex-direction: column;
    gap: 40px;
    text-align: center;
  }

  .about_text_section {
    padding-right: 0;
  }

  .about_text_section h1 {
    font-size: 36px;
    text-align: center;
  }

  .about_video_section {
    flex: none;
    width: 100%;
    max-width: 300px;
    margin: 0 auto;
  }

  .about_video {
    height: 400px;
  }

  .about_text {
    font-size: 16px;
    text-align: center;
  }

  .cards_container {
    grid-template-columns: 1fr;
    padding: 40px 20px;
  }

  .contacts {
    gap: 40px;
  }
}

@media (max-width: 768px) {
  .logo img {
    width: 120px;
    margin: 12px 0;
  }

  .navbar {
    margin: 20px 0;
  }

  .nav-item {
    width: 120px;
    height: 35px;
    font-size: 12px;
  }

  h1,
  h2 {
    font-size: 32px;
  }

  .text {
    font-size: 18px;
    padding: 30px;
  }

  .stack_item {
    width: 80px;
    height: 80px;
  }

  #cv_container,
  #contacts_form {
    width: 400px;
    height: 550px;
  }

  .about_me {
    padding: 40px 20px;
  }

  .about_content {
    gap: 30px;
  }

  .about_text_section h1 {
    font-size: 28px;
    margin-bottom: 20px;
  }

  .about_video_section {
    max-width: 250px;
  }

  .about_video {
    height: 350px;
  }

  .about_text {
    font-size: 14px;
    margin-bottom: 15px;
  }
}

@media (max-width: 576px) {
  .header {
    padding: 15px;
  }

  .logo img {
    width: 100px;
    margin: 10px 0;
  }

  .navbar {
    gap: 8px;
    margin: 10px 0;
    flex-wrap: wrap;
    justify-content: center;
  }

  .nav-item {
    width: 80px;
    height: 30px;
    font-size: 9px;
    letter-spacing: 0.2px;
  }

  .my_img {
    max-width: 300px;
    margin-top: 0;
  }

  h1,
  h2 {
    font-size: 28px;
  }

  .stack_item {
    width: 70px;
    height: 70px;
  }

  #cv_container,
  #contacts_form {
    width: 350px;
    height: 500px;
  }

  .container_contact {
    padding: 30px;
  }

  /* Video section responsive */
  .video_section {
    padding: 40px 20px;
  }

  .video_container h2 {
    font-size: 32px;
  }

  .main_video {
    height: 300px;
  }

  .video_description {
    font-size: 16px;
  }

  /* Skills chart responsive */
  .skills_chart_section {
    padding: 40px 20px;
  }

  .chart_container h2 {
    font-size: 32px;
  }

  .radar_chart_wrapper {
    padding: 20px;
  }

  .chart_description {
    font-size: 16px;
  }
}
