/* Base Styles */
:root {
  --primary-color: #4a63e7;
  --secondary-color: #6c757d;
  --dark-color: #212529;
  --light-color: #f8f9fa;
  --success-color: #28a745;
  --danger-color: #dc3545;
  --body-color: #f9f9f9;
  --text-color: #333;
  --border-color: #e9ecef;
  --transition: all 0.3s ease;
  --box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
  --border-radius: 8px;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  font-size: 62.5%; /* 1rem = 10px */
}

body {
  font-family: "Poppins", sans-serif;
  font-size: 1.6rem;
  line-height: 1.6;
  color: var(--text-color);
  background-color: var(--body-color);
  overflow-x: hidden;
}

a {
  text-decoration: none;
  color: inherit;
  transition: var(--transition);
}

ul {
  list-style: none;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 2rem;
}

section {
  padding: 10rem 0;
  position: relative;
}

/* Preloader */
.preloader {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: var(--light-color);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 9999;
  transition: opacity 0.5s ease, visibility 0.5s ease;
}

.preloader.hide {
  opacity: 0;
  visibility: hidden;
}

.loader {
  width: 5rem;
  height: 5rem;
  border: 0.5rem solid rgba(74, 99, 231, 0.2);
  border-top: 0.5rem solid var(--primary-color);
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  0% {
    transform: rotate(0deg);
  }
  100% {
    transform: rotate(360deg);
  }
}

/* Custom Cursor */
.cursor,
.cursor-follower {
  position: fixed;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  z-index: 9999;
  pointer-events: none;
  opacity: 0;
  transform: translate(-50%, -50%);
  transition: transform 0.1s ease;
}

.cursor {
  background-color: rgba(74, 99, 231, 0.5);
  mix-blend-mode: difference;
  transition: width 0.3s ease, height 0.3s ease, opacity 0.3s ease;
}

.cursor-follower {
  background-color: rgba(255, 255, 255, 0.2);
  border: 1px solid var(--primary-color);
  transition: transform 0.3s ease, width 0.3s ease, height 0.3s ease, opacity 0.3s ease;
}

/* Header */
header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  padding: 2rem 0;
  z-index: 100;
  background-color: transparent;
  transition: var(--transition);
}

header.sticky {
  background-color: rgba(255, 255, 255, 0.95);
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
  padding: 1.5rem 0;
  backdrop-filter: blur(10px);
}

header .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.logo {
  font-size: 2.4rem;
  font-weight: 700;
  color: var(--primary-color);
}

nav ul {
  display: flex;
}

nav ul li {
  margin-left: 3rem;
}

nav ul li a {
  font-size: 1.6rem;
  font-weight: 500;
  color: var(--dark-color);
  position: relative;
  padding: 0.5rem 0;
}

nav ul li a::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 2px;
  background-color: var(--primary-color);
  transition: var(--transition);
}

nav ul li a:hover::after,
nav ul li a.active::after {
  width: 100%;
}

.hamburger {
  display: none;
  cursor: pointer;
  width: 3rem;
  height: 2rem;
  position: relative;
  z-index: 101;
}

.hamburger span {
  display: block;
  width: 100%;
  height: 2px;
  background-color: var(--dark-color);
  position: absolute;
  left: 0;
  transition: var(--transition);
}

.hamburger span:first-child {
  top: 0;
}

.hamburger span:nth-child(2) {
  top: 50%;
  transform: translateY(-50%);
}

.hamburger span:last-child {
  bottom: 0;
}

.hamburger.active span:first-child {
  top: 50%;
  transform: translateY(-50%) rotate(45deg);
}

.hamburger.active span:nth-child(2) {
  opacity: 0;
}

.hamburger.active span:last-child {
  bottom: 50%;
  transform: translateY(50%) rotate(-45deg);
}

.mobile-menu {
  position: fixed;
  top: 0;
  right: -100%;
  width: 80%;
  max-width: 40rem;
  height: 100%;
  background-color: var(--light-color);
  z-index: 99;
  padding: 10rem 3rem 3rem;
  transition: var(--transition);
  box-shadow: -5px 0 15px rgba(0, 0, 0, 0.1);
}

.mobile-menu.active {
  right: 0;
}

.mobile-menu ul li {
  margin-bottom: 2rem;
}

.mobile-menu ul li a {
  font-size: 2rem;
  font-weight: 500;
  color: var(--dark-color);
  display: block;
  padding: 1rem 0;
  border-bottom: 1px solid var(--border-color);
}

/* Hero Section */
.hero {
  height: 100vh;
  display: flex;
  align-items: center;
  background-color: var(--light-color);
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: "";
  position: absolute;
  top: -10%;
  right: -10%;
  width: 50%;
  height: 120%;
  background-color: rgba(74, 99, 231, 0.05);
  border-radius: 30% 70% 70% 30% / 30% 30% 70% 70%;
  z-index: 1;
  animation: morphing 15s ease-in-out infinite;
}

@keyframes morphing {
  0% {
    border-radius: 30% 70% 70% 30% / 30% 30% 70% 70%;
  }
  25% {
    border-radius: 58% 42% 75% 25% / 76% 46% 54% 24%;
  }
  50% {
    border-radius: 50% 50% 33% 67% / 55% 27% 73% 45%;
  }
  75% {
    border-radius: 33% 67% 58% 42% / 63% 68% 32% 37%;
  }
  100% {
    border-radius: 30% 70% 70% 30% / 30% 30% 70% 70%;
  }
}

.hero .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: relative;
  z-index: 2;
}

.hero-content {
  flex: 1;
  max-width: 60rem;
}

.hero-content h1 {
  font-size: 5rem;
  font-weight: 700;
  line-height: 1.2;
  margin-bottom: 1.5rem;
  color: var(--dark-color);
}

.hero-content h2 {
  font-size: 3rem;
  font-weight: 600;
  margin-bottom: 2rem;
  color: var(--secondary-color);
}

.hero-content p {
  font-size: 1.8rem;
  margin-bottom: 3rem;
  color: var(--secondary-color);
}

.highlight {
  color: var(--primary-color);
  position: relative;
  display: inline-block;
}

.highlight::after {
  content: "";
  position: absolute;
  bottom: 5px;
  left: 0;
  width: 100%;
  height: 8px;
  background-color: rgba(74, 99, 231, 0.2);
  z-index: -1;
}

.hero-buttons {
  display: flex;
  gap: 2rem;
}

.btn {
  display: inline-block;
  padding: 1.2rem 3rem;
  border-radius: 5rem;
  font-size: 1.6rem;
  font-weight: 500;
  text-align: center;
  cursor: pointer;
  transition: var(--transition);
  position: relative;
  overflow: hidden;
  z-index: 1;
}

.btn::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 0;
  height: 100%;
  background-color: rgba(255, 255, 255, 0.2);
  transition: var(--transition);
  z-index: -1;
}

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

.btn.primary {
  background-color: var(--primary-color);
  color: white;
  box-shadow: 0 5px 15px rgba(74, 99, 231, 0.4);
}

.btn.primary:hover {
  box-shadow: 0 7px 20px rgba(74, 99, 231, 0.6);
  transform: translateY(-3px);
}

.btn.secondary {
  background-color: transparent;
  color: var(--primary-color);
  border: 2px solid var(--primary-color);
}

.btn.secondary:hover {
  background-color: var(--primary-color);
  color: white;
  transform: translateY(-3px);
}

.hero-image {
  flex: 1;
  max-width: 40rem;
  position: relative;
}

.hero-image img {
  width: 100%;
  border-radius: 1rem;
  box-shadow: var(--box-shadow);
  position: relative;
  z-index: 2;
}

.hero-image .shape {
  position: absolute;
  width: 100%;
  height: 100%;
  background-color: var(--primary-color);
  border-radius: 1rem;
  top: 2rem;
  left: 2rem;
  z-index: 1;
}

.scroll-indicator {
  position: absolute;
  bottom: 5rem;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  z-index: 2;
}

.mouse {
  width: 3rem;
  height: 5rem;
  border: 2px solid var(--dark-color);
  border-radius: 2rem;
  display: flex;
  justify-content: center;
  padding-top: 0.5rem;
  margin-bottom: 1rem;
}

.wheel {
  width: 0.5rem;
  height: 1rem;
  background-color: var(--dark-color);
  border-radius: 0.5rem;
  animation: scroll 1.5s infinite;
}

@keyframes scroll {
  0% {
    transform: translateY(0);
    opacity: 1;
  }
  100% {
    transform: translateY(1.5rem);
    opacity: 0;
  }
}

.arrow {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
}

.arrow span {
  display: block;
  width: 1rem;
  height: 1rem;
  border-bottom: 2px solid var(--dark-color);
  border-right: 2px solid var(--dark-color);
  transform: rotate(45deg);
  animation: arrow 1.5s infinite;
}

.arrow span:nth-child(2) {
  animation-delay: 0.2s;
}

.arrow span:nth-child(3) {
  animation-delay: 0.4s;
}

@keyframes arrow {
  0% {
    opacity: 0;
  }
  50% {
    opacity: 1;
  }
  100% {
    opacity: 0;
  }
}

/* Section Header */
.section-header {
  text-align: center;
  margin-bottom: 6rem;
}

.section-header h2 {
  font-size: 3.6rem;
  font-weight: 700;
  color: var(--dark-color);
  margin-bottom: 1.5rem;
  position: relative;
  display: inline-block;
}

.underline {
  width: 8rem;
  height: 0.4rem;
  background-color: var(--primary-color);
  margin: 0 auto;
  position: relative;
}

.underline::before,
.underline::after {
  content: "";
  position: absolute;
  width: 1rem;
  height: 1rem;
  background-color: var(--primary-color);
  top: 50%;
  transform: translateY(-50%) rotate(45deg);
}

.underline::before {
  left: -0.5rem;
}

.underline::after {
  right: -0.5rem;
}

/* About Section */
.about-content {
  display: flex;
  align-items: center;
  gap: 5rem;
}

.about-image {
  flex: 1;
  position: relative;
}

.about-image img {
  width: 100%;
  border-radius: var(--border-radius);
  box-shadow: var(--box-shadow);
}

.experience-badge {
  position: absolute;
  bottom: -2rem;
  right: -2rem;
  width: 12rem;
  height: 12rem;
  background-color: var(--primary-color);
  border-radius: 50%;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  color: white;
  box-shadow: var(--box-shadow);
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0% {
    box-shadow: 0 0 0 0 rgba(74, 99, 231, 0.7);
  }
  70% {
    box-shadow: 0 0 0 10px rgba(74, 99, 231, 0);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(74, 99, 231, 0);
  }
}

.experience-badge .number {
  font-size: 3rem;
  font-weight: 700;
  line-height: 1;
}

.experience-badge .text {
  font-size: 1.4rem;
  text-align: center;
}

.about-text {
  flex: 1;
}

.about-text h3 {
  font-size: 2.4rem;
  font-weight: 600;
  margin-bottom: 2rem;
  color: var(--dark-color);
}

.about-text p {
  margin-bottom: 3rem;
}

.personal-info {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 2rem;
  margin-bottom: 3rem;
}

.info-item {
  display: flex;
  align-items: center;
}

.info-item .label {
  font-weight: 600;
  margin-right: 1rem;
  color: var(--dark-color);
}

.info-item .value {
  color: var(--secondary-color);
}

.info-item .value.available {
  color: var(--success-color);
}

.skills h3 {
  font-size: 2.2rem;
  margin-bottom: 2rem;
}

.skill-item {
  margin-bottom: 2rem;
}

.skill-info {
  display: flex;
  justify-content: space-between;
  margin-bottom: 0.8rem;
}

.skill-name {
  font-weight: 500;
}

.skill-percentage {
  font-weight: 600;
  color: var(--primary-color);
}

.skill-bar {
  width: 100%;
  height: 0.8rem;
  background-color: var(--border-color);
  border-radius: 1rem;
  overflow: hidden;
}

.skill-progress {
  height: 100%;
  background-color: var(--primary-color);
  border-radius: 1rem;
  width: 0;
  transition: width 1.5s ease;
}

/* Experience & Education Sections */
.timeline {
  position: relative;
  max-width: 80rem;
  margin: 0 auto;
}

.timeline::before {
  content: "";
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 2px;
  height: 100%;
  background-color: var(--border-color);
}

.timeline-item {
  position: relative;
  margin-bottom: 6rem;
}

.timeline-item:last-child {
  margin-bottom: 0;
}

.timeline-dot {
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 2rem;
  height: 2rem;
  background-color: var(--primary-color);
  border-radius: 50%;
  z-index: 1;
}

.timeline-date {
  position: absolute;
  top: 0;
  left: calc(50% + 3rem);
  background-color: var(--primary-color);
  color: white;
  padding: 0.8rem 1.5rem;
  border-radius: 2rem;
  font-weight: 500;
  box-shadow: var(--box-shadow);
}

.timeline-content {
  position: relative;
  width: calc(50% - 5rem);
  padding: 2.5rem;
  background-color: white;
  border-radius: var(--border-radius);
  box-shadow: var(--box-shadow);
  margin-left: auto;
  margin-right: 5rem;
}

.timeline-item:nth-child(even) .timeline-content {
  margin-left: 5rem;
  margin-right: auto;
}

.timeline-item:nth-child(even) .timeline-date {
  left: auto;
  right: calc(50% + 3rem);
}

.timeline-content h3 {
  font-size: 2rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
  color: var(--dark-color);
}

.timeline-content h4 {
  font-size: 1.6rem;
  font-weight: 500;
  color: var(--primary-color);
  margin-bottom: 1.5rem;
}

.timeline-content p {
  margin-bottom: 1.5rem;
}

.tags {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
}

.tags li {
  background-color: rgba(74, 99, 231, 0.1);
  color: var(--primary-color);
  padding: 0.5rem 1.5rem;
  border-radius: 2rem;
  font-size: 1.4rem;
}

/* Contact Section */
.contact-content {
  display: flex;
  justify-content: center;
  max-width: 60rem;
  margin: 0 auto;
}

.contact-info {
  width: 100%;
}

.contact-item {
  display: flex;
  align-items: flex-start;
  margin-bottom: 3rem;
}

.contact-item .icon {
  width: 5rem;
  height: 5rem;
  background-color: rgba(74, 99, 231, 0.1);
  border-radius: 50%;
  display: flex;
  justify-content: center;
  align-items: center;
  margin-right: 2rem;
  color: var(--primary-color);
  font-size: 2rem;
  transition: var(--transition);
}

.contact-item:hover .icon {
  background-color: var(--primary-color);
  color: white;
  transform: translateY(-5px);
}

.contact-item .text h3 {
  font-size: 2rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
  color: var(--dark-color);
}

.contact-item .text p a {
  color: var(--secondary-color);
}

.contact-item .text p a:hover {
  color: var(--primary-color);
}

.social-links {
  display: flex;
  gap: 1.5rem;
  margin-top: 3rem;
}

.social-icon {
  width: 4.5rem;
  height: 4.5rem;
  background-color: white;
  border-radius: 50%;
  display: flex;
  justify-content: center;
  align-items: center;
  color: var(--primary-color);
  font-size: 1.8rem;
  box-shadow: var(--box-shadow);
  transition: var(--transition);
}

.social-icon:hover {
  background-color: var(--primary-color);
  color: white;
  transform: translateY(-5px);
}

/* Footer */
footer {
  background-color: var(--dark-color);
  color: white;
  padding: 3rem 0;
}

.footer-content {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.back-to-top {
  width: 4rem;
  height: 4rem;
  background-color: var(--primary-color);
  border-radius: 50%;
  display: flex;
  justify-content: center;
  align-items: center;
  transition: var(--transition);
}

.back-to-top:hover {
  background-color: white;
  color: var(--primary-color);
  transform: translateY(-5px);
}

/* Animation Classes */
.animate-text {
  opacity: 0;
  transform: translateY(30px);
  animation: fadeInUp 0.8s forwards;
}

.delay-1 {
  animation-delay: 0.2s;
}

.delay-2 {
  animation-delay: 0.4s;
}

.delay-3 {
  animation-delay: 0.6s;
}

.animate-image {
  opacity: 0;
  transform: translateX(30px);
  animation: fadeInRight 0.8s 0.8s forwards;
}

@keyframes fadeInUp {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes fadeInRight {
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

.reveal-left,
.reveal-right,
.reveal-bottom {
  opacity: 0;
  transition: all 1s ease;
}

.reveal-left {
  transform: translateX(-50px);
}

.reveal-right {
  transform: translateX(50px);
}

.reveal-bottom {
  transform: translateY(50px);
}

.reveal-left.active,
.reveal-right.active,
.reveal-bottom.active {
  opacity: 1;
  transform: translate(0);
}

/* Responsive Styles */
@media (max-width: 1024px) {
  html {
    font-size: 60%;
  }

  .hero-content h1 {
    font-size: 4.5rem;
  }

  .hero-content h2 {
    font-size: 2.8rem;
  }

  .about-content,
  .contact-content {
    gap: 3rem;
  }
}

@media (max-width: 768px) {
  html {
    font-size: 55%;
  }

  section {
    padding: 8rem 0;
  }

  nav ul {
    display: none;
  }

  .hamburger {
    display: block;
  }

  .hero .container {
    flex-direction: column;
    text-align: center;
  }

  .hero-content {
    margin-bottom: 5rem;
  }

  .hero-buttons {
    justify-content: center;
  }

  .about-content,
  .contact-content {
    flex-direction: column;
  }

  .about-image {
    margin-bottom: 3rem;
  }

  .personal-info {
    grid-template-columns: 1fr;
  }

  .timeline::before {
    left: 2rem;
  }

  .timeline-dot {
    left: 2rem;
  }

  .timeline-date {
    left: 5rem;
    top: -3rem;
  }

  .timeline-content {
    width: calc(100% - 7rem);
    margin-left: 7rem;
    margin-right: 0;
  }

  .timeline-item:nth-child(even) .timeline-content {
    margin-left: 7rem;
    margin-right: 0;
  }

  .timeline-item:nth-child(even) .timeline-date {
    left: 5rem;
    right: auto;
  }
}

@media (max-width: 576px) {
  html {
    font-size: 50%;
  }

  .hero-content h1 {
    font-size: 4rem;
  }

  .hero-content h2 {
    font-size: 2.5rem;
  }

  .section-header h2 {
    font-size: 3.2rem;
  }

  .hero-buttons {
    flex-direction: column;
    gap: 1.5rem;
  }

  .btn {
    width: 100%;
  }

  .footer-content {
    flex-direction: column;
    gap: 2rem;
  }
}
