* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: "Vazirmatn", sans-serif;
}

:root {
  --bg-primary: #0a0a14;
  --text-primary: #ffffff;
  --text-secondary: #c0c0e0;
  --accent: #4cc9f0;
  --accent-2: #f72585;
  --card-bg: rgba(20, 20, 40, 0.7);
  --border: rgba(255, 255, 255, 0.1);
}

.light-theme {
  --bg-primary: #ffffff;
  --text-primary: #0f172a;
  --text-secondary: #334155;
  --accent: #3b82f6;
  --accent-2: #ec4899;
  --card-bg: #ffffff;
  --border: #e2e8f0;
}

body {
  background: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.8;
  overflow-x: hidden;
  position: relative;
  min-height: 100vh;
}

#canvas-bg {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: -2;
}

.gradient-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: -1;
  pointer-events: none;
  background:
    radial-gradient(
      circle at 20% 30%,
      rgba(76, 201, 240, 0.15),
      transparent 40%
    ),
    radial-gradient(
      circle at 80% 70%,
      rgba(247, 37, 133, 0.12),
      transparent 45%
    );
}

header {
  position: fixed;
  top: 0;
  width: 100%;
  padding: 24px 5%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  z-index: 1000;
  backdrop-filter: blur(16px);
  background: rgba(10, 10, 20, 0.8);
  border-bottom: 1px solid var(--border);
  transition: all 0.4s ease;
}

.light-theme header {
  background: rgba(255, 255, 255, 0.92);
}

.theme-toggle {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: var(--accent);
  color: #000;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  border: none;
  font-size: 24px;
  box-shadow: 0 0 25px rgba(76, 201, 240, 0.6);
  transition: all 0.4s cubic-bezier(0.68, -0.55, 0.27, 1.55);
}

.theme-toggle:hover {
  transform: scale(1.18) rotate(20deg);
  box-shadow: 0 0 35px rgba(76, 201, 240, 0.9);
}

.light-theme .theme-toggle:hover {
  box-shadow: 0 0 35px rgba(59, 130, 246, 0.85);
}

nav ul {
  display: flex;
  gap: 36px;
  list-style: none;
}

nav a {
  color: var(--text-primary);
  text-decoration: none;
  font-weight: 700;
  font-size: 20px;
  padding: 12px 18px;
  border-radius: 12px;
  position: relative;
  overflow: hidden;
  z-index: 1;
  transition: color 0.3s;
}

nav a::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, var(--accent), var(--accent-2));
  z-index: -1;
  opacity: 0;
  transform: scaleX(0);
  transform-origin: right;
  transition: transform 0.5s, opacity 0.5s;
  border-radius: 12px;
}

nav a:hover::before {
  transform: scaleX(1);
  transform-origin: left;
  opacity: 0.25;
}

nav a:hover {
  color: var(--accent);
}

section {
  min-height: 100vh;
  padding: 140px 5% 100px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  opacity: 0;
  transform: translateY(50px);
  transition: opacity 0.8s, transform 0.8s;
}

section.visible {
  opacity: 1;
  transform: translateY(0);
}

.home {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 70px;
  max-width: 1200px;
  margin: 0 auto;
}

.profile-container {
  position: relative;
  display: flex;
  justify-content: center;
}

.profile-pic {
  width: 260px;
  height: 260px;
  border-radius: 50%;
  object-fit: cover;
  border: 6px solid transparent;
  background: linear-gradient(
    45deg,
    var(--accent),
    var(--accent-2),
    #a663cc
  );
  padding: 4px;
  position: relative;
  box-shadow: 0 15px 40px rgba(0, 0, 0, 0.5);
  transition: transform 0.6s
    cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.profile-pic img {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
  background: var(--bg-primary);
}

.profile-pic::after {
  content: '';
  position: absolute;
  top: 10px;
  left: 10px;
  right: 10px;
  bottom: 10px;
  border-radius: 50%;
  box-shadow: inset 0 0 25px rgba(0, 0, 0, 0.7);
  pointer-events: none;
}

.profile-pic::before {
  content: '';
  position: absolute;
  top: -20px;
  left: -20px;
  right: -20px;
  bottom: -20px;
  background: linear-gradient(45deg, var(--accent), var(--accent-2));
  border-radius: 50%;
  z-index: -1;
  animation: rotateGlow 10s linear infinite;
  opacity: 0.6;
}

@keyframes rotateGlow {
  0% {
    transform: rotate(0deg);
  }
  100% {
    transform: rotate(360deg);
  }
}

.profile-pic:hover {
  transform: scale(1.08) rotate(3deg);
}

.home-text {
  max-width: 580px;
  text-align: right;
}

.home-text h1 {
  font-size: 64px;
  margin-bottom: 20px;
  background: linear-gradient(
    90deg,
    var(--accent),
    var(--accent-2),
    #a663cc
  );
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  font-weight: 900;
  line-height: 1.1;
}

.home-text p {
  font-size: 24px;
  color: var(--text-secondary);
  margin-bottom: 35px;
  font-weight: 400;
}

.social-links {
  display: flex;
  gap: 26px;
  margin-top: 35px;
  flex-wrap: wrap;
}

.social-link {
  width: 68px;
  height: 68px;
  border-radius: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--card-bg);
  color: var(--text-primary);
  font-size: 28px;
  text-decoration: none;
  transition: all 0.45s cubic-bezier(0.68, -0.55, 0.27, 1.55);
  border: 1px solid var(--border);
  position: relative;
  overflow: hidden;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.25);
}

.social-link::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 200%;
  height: 100%;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(255, 255, 255, 0.3),
    transparent
  );
  transition: left 0.7s;
}

.social-link:hover {
  transform: translateY(-12px) scale(1.18);
  z-index: 20;
  box-shadow:
    0 15px 30px rgba(0, 0, 0, 0.4),
    0 0 0 4px rgba(76, 201, 240, 0.3);
  background: linear-gradient(
    135deg,
    var(--accent),
    var(--accent-2)
  );
  color: white;
}

.social-link:hover::before {
  left: 100%;
}

.rubika-logo,
.eitaa-logo {
  width: 32px;
  height: 32px;
  filter: brightness(0) invert(1);
}

.light-theme .rubika-logo,
.light-theme .eitaa-logo {
  filter: brightness(0) invert(0);
}

.content-box {
  max-width: 920px;
  margin: 0 auto;
  background: var(--card-bg);
  padding: 70px;
  border-radius: 30px;
  box-shadow:
    0 20px 60px rgba(0, 0, 0, 0.35),
    inset 0 0 0 1px var(--border);
  backdrop-filter: blur(14px);
  border: 1px solid var(--border);
  position: relative;
}

.light-theme .content-box {
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.08);
}

h2 {
  font-size: 52px;
  margin-bottom: 40px;
  text-align: center;
  background: linear-gradient(
    90deg,
    var(--accent),
    var(--accent-2),
    #3a0ca3
  );
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  font-weight: 900;
  line-height: 1.2;
}

p {
  font-size: 24px;
  color: var(--text-secondary);
  margin-bottom: 25px;
  line-height: 1.7;
}

strong {
  color: var(--text-primary);
  font-weight: 700;
}

.experience-item {
  margin-bottom: 45px;
  padding: 20px 0;
}

.skill-title {
  display: flex;
  justify-content: space-between;
  margin-bottom: 14px;
  font-weight: 800;
  font-size: 24px;
  color: var(--text-primary);
}

.skill-bar {
  height: 18px;
  background: rgba(255, 255, 255, 0.12);
  border-radius: 14px;
  overflow: hidden;
}

.light-theme .skill-bar {
  background: #e2e8f0;
}

.skill-level {
  height: 100%;
  background: linear-gradient(90deg, var(--accent), var(--accent-2));
  border-radius: 14px;
  transition: width 1.5s cubic-bezier(0.22, 0.61, 0.36, 1);
}

.contact-info {
  display: flex;
  flex-direction: column;
  gap: 40px;
}

.contact-item {
  display: flex;
  align-items: flex-start;
  gap: 24px;
  font-size: 25px;
  color: var(--text-secondary);
  transition: all 0.4s ease;
  padding: 10px 0;
}

.contact-item:hover {
  color: var(--accent);
  transform: translateX(12px);
}

.contact-item i {
  font-size: 30px;
  color: var(--accent);
  min-width: 40px;
  text-align: center;
  margin-top: 4px;
}

footer {
  text-align: center;
  padding: 40px;
  color: var(--text-secondary);
  font-size: 18px;
  border-top: 1px solid var(--border);
  margin-top: 30px;
}

@media (max-width: 900px) {
  .home {
    gap: 40px;
  }

  .profile-pic {
    width: 220px;
    height: 220px;
  }

  .home-text h1 {
    font-size: 52px;
  }

  .home-text p {
    font-size: 22px;
  }

  nav ul {
    gap: 20px;
  }

  nav a {
    font-size: 18px;
    padding: 10px 14px;
  }

  .content-box {
    padding: 50px 30px;
  }

  h2 {
    font-size: 42px;
  }

  p,
  .contact-item,
  .skill-title {
    font-size: 22px;
  }

  .social-link {
    width: 60px;
    height: 60px;
    font-size: 24px;
  }
}

@media (max-width: 600px) {
  .home {
    text-align: center;
  }

  .home-text {
    text-align: center;
    margin: 0 auto;
  }

  .home-text h1 {
    font-size: 42px;
  }

  nav ul {
    flex-wrap: wrap;
    justify-content: center;
  }
}
