
:root {
  --primary: #5662b0;
  --primary-dark: #4e59a4;
  --primary-light: #a29bfe;
  --dark: #121212;
  --dark-light: #1e1e1e;
  --light: #f8f9fa;
  --gray: #6c757d;
  --transition: all 0.4s cubic-bezier(0.68, -0.55, 0.27, 1.55);
}

body {
  font-family: "Inter", sans-serif;

  background-color: var(--dark-light);
  color: var(--light);
  overflow-x: hidden;
  transition: var(--transition);
  padding-top: 80px;
}

body.light-mode {
  background-color: #f5f5f5;
  color: var(--dark);
}

::selection {
  background: var(--primary);
  color: white;
}

/* Typography */
h1,
h2,
h3,
h4 {
  font-weight: 700;
  letter-spacing: -0.5px;
}

h2 {
  position: relative;
  display: inline-block;
  margin-bottom: 3rem;
} 

h2::after {
  content: "";
  position: absolute;
  bottom: -10px;
  left: 0;
  width: 50px;
  height: 4px;
  background: var(--primary);
  border-radius: 2px;
} 

h2.section-title {
  position: relative;
  display: block;
  text-align: center;
  margin-left: auto;
  margin-right: auto;
}

h2.section-title::after {
  content: "";
  position: absolute;
  bottom: -10px;
  left: 45%;
  transform: translateX(-50%);
  width: 50px;
  height: 4px;
  background: var(--primary);
  border-radius: 2px;
}

.text-mono {
  font-family: "JetBrains Mono", monospace;
}

/* Navbar */
.navbar {
  padding: 1rem 0;
  background: rgba(18, 18, 18, 0.9) !important;
  backdrop-filter: blur(10px);
  transition: var(--transition);
}

.light-mode .navbar {
  background: rgba(255, 255, 255, 0.95) !important;
  box-shadow: 0 2px 20px rgba(0, 0, 0, 0.1);
}

.light-mode .navbar-brand,
.light-mode .nav-link {
  color: var(--dark) !important;
}

.light-mode .nav-link:hover,
.light-mode .nav-link.active {
  color: var(--primary) !important;
}

.light-mode .navbar-toggler {
  color: var(--dark);
  border-color: var(--dark);
}

.nav-link {
  margin: 0 0.5rem;
  font-weight: 500;
  position: relative;
}

.nav-link::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--primary);
  transition: var(--transition);
}

.nav-link:hover::after {
  width: 100%;
}


/* Hero Section */
#hero {
  min-height: calc(100vh - 80px);
  padding-top: 60px;
  position: relative;
  overflow: hidden;
}

.hero-bg {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, var(--dark), var(--dark-light));
  z-index: -2;
}

.light-mode #hero .hero-bg {
  background: linear-gradient(135deg, #e0e0e0, #f5f5f5);
}

.hero-content {
  position: relative;
  z-index: 1;
}

.hero-title {
  font-size: 3rem;
  line-height: 1.1;
  margin-bottom: 1.5rem;
}

.typewriter-container {
  height: 60px;
  margin: 15px 0;
  overflow: hidden;
}

.typewriter {
  font-size: 32px;
  font-weight: 600;
  color: var(--primary);
  display: inline-block;
}

.typewriter-text {
  border-right: 3px solid var(--primary);
  white-space: nowrap;
  overflow: hidden;
  display: inline-block;
}

.typing {
  animation: typing 4s steps(40) 1s 1 normal both,
    blink-caret 0.75s step-end infinite;
}


@keyframes typing {
  from {
    width: 0;
  }
  to {
    width: 100%;
  }
}

@keyframes blink-caret {
  from,
  to {
    border-color: transparent;
  }
  50% {
    border-color: var(--primary);
  }
}

.hero-desc {
  max-width: 600px;
  opacity: 0.9;
  font-size: 1.1rem;
}

.btn-primary-custom {
  background: var(--primary);
  border: none;
  padding: 0.8rem 2rem;
  font-weight: 600;
  letter-spacing: 0.5px;
  transition: var(--transition);
  color: white;
}

.btn-primary-custom:hover {
  background: var(--primary-dark);
  transform: translateY(-3px);
  box-shadow: 0 10px 20px rgba(108, 99, 255, 0.3);
}

.btn-outline-light {
  transition: var(--transition);
}

.btn-outline-light:hover {
  transform: translateY(-3px);
}

  .floating {
  animation: floating 3s ease-in-out infinite;
  }

  @keyframes floating {
  0% {
      transform: translate(0, 0) rotate(2deg);
  }
  50% {
      transform: translate(10px, -20px) rotate(1deg);
  }
  100% {
      transform: translate(0, 0) rotate(1deg);
  }
  }


  #hero .col-lg-6.d-none.d-lg-block {
  padding-left: 50px; 
  display: flex;
  justify-content: flex-end;
  }

/* About Section */
#about {
  padding: 6rem 0;
  background: var(--dark);
}

.light-mode #about {
  background: white;
}

.profile-img {
  width: 100%;
  max-width: 400px;
  border-radius: 10px;
  box-shadow: 0 20px 30px rgba(0, 0, 0, 0.3);
  transition: var(--transition);
  border: 3px solid var(--primary);
  animation: float 3s ease-in-out infinite;
}

@keyframes float {
  0% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-20px);
  }
  100% {
    transform: translateY(0);
  }
}

.profile-img:hover {
  transform: scale(1.02);
}

.about-text {
  padding-left: 2rem;
}

.personal-info {
  margin-top: 2rem;
}

.info-item {
  margin-bottom: 1rem;
  display: flex;
  align-items: center;
}

.info-item i {
  width: 30px;
  color: var(--primary);
  font-size: 1.1rem;
}

/* Skills Section */
.skills {
  padding: 100px 0;
  background: var(--dark-light);
}

.light-mode .skills {
  background: #f0f0f0;
}

.skills-container {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 30px;
  margin-top: 50px;
}

.skill-category {
  background: rgba(108, 99, 255, 0.1);
  padding: 30px;
  border-radius: 10px;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
  transition: var(--transition);
  border: 1px solid rgba(108, 99, 255, 0.2);
}

.light-mode .skill-category {
  background: rgba(255, 255, 255, 0.9);
  border: 1px solid rgba(0, 0, 0, 0.1);
}

.skill-category:hover {
  transform: translateY(-10px);
  box-shadow: 0 15px 30px rgba(108, 99, 255, 0.2);
}

.skill-category h3 {
  font-size: 24px;
  margin-bottom: 20px;
  color: var(--primary);
  display: flex;
  align-items: center;
}

.skill-category h3 i {
  margin-right: 10px;
}

.skill-list {
  list-style: none;
  padding-left: 0;
}

.skill-list li {
  margin-bottom: 10px;
  position: relative;
  padding-left: 25px;
}

.skill-list li::before {
  content: "▹";
  position: absolute;
  left: 0;
  color: var(--primary);
}

/* Projects Section */
.projects {
  padding: 100px 0;
  background: var(--dark);
}

.light-mode .projects {
  background: #f5f5f5;
}

.projects-container {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 30px;
  margin-top: 50px;
}

.project-card {
  background: rgba(108, 99, 255, 0.1);
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
  transition: var(--transition);
  border: 1px solid rgba(108, 99, 255, 0.2);
}

.light-mode .project-card {
  background: rgba(255, 255, 255, 0.9);
  border: 1px solid rgba(0, 0, 0, 0.1);
}

.project-card:hover {
  transform: translateY(-10px);
  box-shadow: 0 15px 30px rgba(108, 99, 255, 0.2);
}

.project-img {
  height: 200px;
  overflow: hidden;
}

.project-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: var(--transition);
}

.project-card:hover .project-img img {
  transform: scale(1.1);
}

.project-info {
  padding: 20px;
}

.project-info h3 {
  font-size: 22px;
  margin-bottom: 10px;
  color: var(--primary);
}

.project-info p {
  margin-bottom: 15px;
}

/* Fade-out gradient container */
.fade-container {
  max-height: 72px; /* height shown before expansion */
  overflow: hidden;
  position: relative;
  transition: max-height 0.4s ease;
}

/* The fade gradient */
.fade-overlay {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 40px;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

/* Hide fade once expanded */
.fade-container.expanded {
  max-height: 1000px; 
}

.fade-container.expanded .fade-overlay {
  opacity: 0;
}

/* Read More button styling */
.read-more-btn {
  display: inline-block;
  margin-top: 8px;
  color: var(--primary);
  font-weight: 500;
  cursor: pointer;
  text-decoration: none;
}

.read-more-btn:hover {
  transform: translateY(-2px);
}

.project-tech {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 15px;
}

.tech-tag {
  background: var(--primary);
  color: white;
  padding: 5px 10px;
  border-radius: 20px;
  font-size: 12px;
}

.project-links a {
  color: var(--primary);
  margin-right: 15px;
  text-decoration: none;
  font-weight: 600;
  transition: var(--transition);
}

.project-links a:hover {
  color: var(--primary-dark);
  text-decoration: underline;
}

/* Contact Section */
.contact-link {
  color: var(--primary-light);
  text-decoration: none;
  transition: var(--transition);
  display: inline-block;
  position: relative;
}

.contact-link:hover {
  color: var(--primary);
  transform: translateY(-2px);
}

.contact-link::after {
  content: "";
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--primary);
  transition: var(--transition);
}

.contact-link:hover::after {
  width: 100%;
}
.contact {
  padding: 100px 0;
  background: var(--dark-light);
}

.light-mode .contact {
  background: #f0f0f0;
}

.contact-container {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 50px;
  margin-top: 50px;
}

.contact-info {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.contact-item {
  display: flex;
  align-items: center;
  gap: 15px;
}

.contact-icon {
  width: 50px;
  height: 50px;
  background: var(--primary);
  color: white;
  border-radius: 50%;
  display: flex;
  justify-content: center;
  align-items: center;
  font-size: 20px;
}

.contact-form {
  background: rgba(108, 99, 255, 0.1);
  padding: 30px;
  border-radius: 10px;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
  border: 1px solid rgba(108, 99, 255, 0.2);
}

.light-mode .contact-form {
  background: rgba(255, 255, 255, 0.9);
  border: 1px solid rgba(0, 0, 0, 0.1);
}

.form-group {
  margin-bottom: 20px;
}

.form-group label {
  display: block;
  margin-bottom: 5px;
  font-weight: 500;
}

.form-control {
  width: 100%;
  padding: 12px;
  border: 1px solid rgba(108, 99, 255, 0.3);
  border-radius: 5px;
  font-size: 16px;
  transition: var(--transition);
  background: rgba(255, 255, 255, 0.05);
  color: var(--light);
}

.light-mode .form-control {
  background: white;
  color: var(--dark);
  border: 1px solid #ddd;
}

.form-control:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 2px rgba(108, 99, 255, 0.2);
}

textarea.form-control {
  resize: vertical;
  min-height: 150px;
}

.btn {
  background: var(--primary);
  color: white;
  border: none;
  padding: 10px 20px;
  border-radius: 5px;
  font-weight: 600;
  transition: var(--transition);
}

.btn:hover {
  background: var(--primary-dark);
  color: white;
  transform: translateY(-3px);
}

/* Footer */
footer {
  background: var(--dark);
  padding: 2rem 0;
  text-align: center;
}

.light-mode footer {
  background: #f5f5f5;
}

/* Theme Toggle */
.theme-toggle {
  position: fixed;
  bottom: 30px;
  right: 30px;
  width: 50px;
  height: 50px;
  background: var(--primary);
  color: white;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: 0 5px 20px rgba(108, 99, 255, 0.3);
  z-index: 100;
  transition: var(--transition);
}

.theme-toggle:hover {
  transform: scale(1.1);
}

/* Scroll to Top */
.scroll-top {
  position: fixed;
  bottom: 90px;
  right: 30px;
  width: 50px;
  height: 50px;
  background: var(--primary);
  color: white;
  border-radius: 50%;
  display: none;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: 0 5px 20px rgba(108, 99, 255, 0.3);
  z-index: 100;
  transition: var(--transition);
}

.scroll-top:hover {
  transform: scale(1.1);
}

/* Responsive */
@media (max-width: 992px) {
  .hero-title {
    font-size: 3rem;
  }
  .typewriter {
    font-size: 24px;
  }
}

@media (max-width: 768px) {
  .hero-title {
    font-size: 2.5rem;
  }
  .about-text {
    padding-left: 0;
    margin-top: 2rem;
  }
  .typewriter {
    font-size: 20px;
  }
  .typewriter-container {
    height: 50px;
  }
  .whatsapp-link {
    margin-left: 0;
    margin-top: 0.5rem;
    justify-content: center;
  }
}
