:root {
  --primary-color: #6366f1;
  --secondary-color: #10b981;
  --text-primary: #1f2937;
  --text-secondary: #6b7280;
  --bg-primary: rgba(255, 255, 255, 0.8);
  --bg-secondary: rgba(255, 255, 255, 0.6);
  --bg-tertiary: rgba(255, 255, 255, 0.4);
  --bg-blur: rgba(255, 255, 255, 0.25);
  --border-color: rgba(255, 255, 255, 0.18);
  --shadow: 0 8px 32px 0 rgba(31, 38, 135, 0.15);
  --transition: all 0.1s ease;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: "Inter", Tahoma, Geneva, Verdana, Segoe UI, sans-serif;
}
::selection {
  color: black;
  background-color: yellow;
}

html {
  scroll-behavior: smooth;
  overflow-x: hidden;
  width: 100%;
}

body {
  background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
  color: var(--text-primary);
  transition: var(--transition);
  overflow-x: hidden;
  width: 100%;
  position: relative;
}
/* Floating chat */
.floating-chat {
  position: fixed;
  bottom: 2vw;
  right: 2vw;
  width: 12vw;
  height: 12vw;
  max-width: 65px;
  max-height: 65px;
  min-width: 45px;
  min-height: 45px;
  background: var(--primary-color);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: 0 0.6vw 2vw rgba(0, 0, 0, 0.25);
  z-index: 9999;
  transition: all 0.2s;
}
.floating-chat:hover {
  background-color: #7073f1;
  transform: scale(1.1);
}
.floating-chat:active {
  transform: scale(1);
}

.chat-icon {
  width: 45%;
  height: 45%;
}

.dot-wrapper {
  position: absolute;
  top: 8%;
  right: 8%;
  width: 22%;
  height: 22%;
}

.dot-ping {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  background: rgba(248, 113, 113, 0.75);
  border-radius: 9999px;
  animation: dotPing 1s cubic-bezier(0, 0, 0.2, 1) infinite;
}

.dot-solid {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  background: rgb(239, 68, 68);
  border-radius: 9999px;
}

@keyframes dotPing {
  0% {
    transform: scale(1);
    opacity: 1;
  }
  75% {
    transform: scale(2.2);
    opacity: 0;
  }
  100% {
    opacity: 0;
  }
}
/* Chat Box*/
.cb {
  position: fixed;
  bottom: 90px;
  right: 4vw;
  width: 90vw;
  max-width: 330px;
  border-radius: 12px;
  background: white;
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.25);
  overflow: hidden;
  z-index: 99999;
  font-family: sans-serif;
}
/* Hide */
.hidden {
  display: none;
}

/* Header */
.cb-header {
  background: var(--primary-color);
  padding: 3vw;
  padding-bottom: 3vw;
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: white;
}

.cb-title {
  font-size: 4vw;
  font-weight: 600;
}

.cb-status {
  font-size: 3vw;
  opacity: 0.9;
}

.cb-close {
  background: transparent;
  border: none;
  font-size: 6vw;
  color: white;
  cursor: pointer;
}

/* Desktop optimization */
@media (min-width: 480px) {
  .cb-header {
    padding: 14px;
  }
  .cb-title {
    font-size: 16px;
  }
  .cb-status {
    font-size: 12px;
  }
  .cb-close {
    font-size: 22px;
  }
}
/* Popup Styles */
.popup-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10000;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
}

.popup-overlay.active {
  opacity: 1;
  visibility: visible;
}

.popup-content {
  background: var(--bg-primary);
  border-radius: 20px;
  padding: 40px;
  max-width: 500px;
  width: 90%;
  text-align: center;
  box-shadow: var(--shadow);
  border: 1px solid var(--border-color);
  backdrop-filter: blur(15px);
  transform: translateY(50px);
  transition: transform 0.3s ease;
  position: relative;
}

.popup-overlay.active .popup-content {
  transform: translateY(0);
}

.popup-icon {
  font-size: 4rem;
  color: var(--secondary-color);
  margin-bottom: 20px;
}

.popup-content h3 {
  font-size: 1.8rem;
  margin-bottom: 15px;
  color: var(--text-primary);
}

.popup-content p {
  color: var(--text-secondary);
  margin-bottom: 25px;
  line-height: 1.6;
}

.popup-close {
  position: absolute;
  top: 20px;
  right: 20px;
  background: none;
  border: none;
  font-size: 1.5rem;
  color: var(--text-secondary);
  cursor: pointer;
  transition: var(--transition);
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.popup-close:hover {
  color: var(--text-primary);
  background: var(--bg-secondary);
}

.popup-btn {
  margin-top: 10px;
}
/* Body */
.cb-body {
  background: #e5ddd5;
  padding: 4vw;
  min-height: 40vw;
}

.cb-msg {
  background: white;
  padding: 4vw;
  border-radius: 12px;
  border-top-left-radius: 0;
  max-width: 80%;
  font-size: 4vw;
  color: #333;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.1);
}

@media (min-width: 480px) {
  .cb-body {
    padding: 20px;
    min-height: 170px;
  }
  .cb-msg {
    padding: 14px;
    font-size: 14px;
  }
}

/* Footer */
.cb-footer {
  display: flex;
  align-items: center;
  gap: 3vw;
  padding: 4vw;
  background: white;
}

.cb-footer input {
  background-color: #f3f4f6;
  flex: 1;
  padding: 3.5vw;
  border-radius: 30px;
  outline: none;
  border: none;
  font-size: 4vw;
}
.cb-footer input:focus {
  border: 2px solid var(--primary-color);
}
@media (min-width: 480px) {
  .cb-footer {
    gap: 10px;
    padding: 14px;
  }
  .cb-footer input {
    padding: 12px;
    font-size: 14px;
  }
}

/* Send Button */
.cb-send {
  background: var(--primary-color);
  width: 12vw;
  height: 12vw;
  max-width: 44px;
  max-height: 44px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: 0.2s;
}

.cb-send svg {
  width: 6vw;
  height: 6vw;
  max-width: 22px;
  max-height: 22px;
}

/* Disabled */
.cb-send.disabled {
  opacity: 0.5;
  cursor: not-allowed;
  pointer-events: none;
}

.cb-send:not(.disabled):hover {
  transform: scale(1.07);
}
.cb-info {
  display: flex;
  align-items: center;
  gap: 10px;
}

.cb-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: white;
  padding: 4px;
  object-fit: cover;
}

.cb-text-group {
  display: flex;
  flex-direction: column;
  line-height: 1.2;
}

.cb-title {
  font-size: 16px;
  font-weight: 700;
  color: white;
}

.cb-status {
  font-size: 13px;
  color: rgba(255, 255, 255, 0.9);
  margin-top: 2px;
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
  width: 100%;
}

.navbar {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  padding: 20px 0;
  z-index: 1000;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  background: var(--bg-blur);
  border-bottom: 1px solid var(--border-color);
  box-shadow: var(--shadow);
  transition: var(--transition);
}

.nav-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.logo {
  max-width: 140px;
}

.logo img {
  user-select: none;
  -webkit-user-drag: none;
  width: 100%;
  height: auto;
}

.nav-links {
  display: flex;
  list-style: none;
}

.nav-links li {
  margin-left: 30px;
}

.nav-links a {
  color: var(--text-primary);
  text-decoration: none;
  font-weight: 500;
  transition: var(--transition);
  position: relative;
}

.nav-links a:hover {
  color: var(--primary-color);
}

.nav-links a::after {
  content: "";
  position: absolute;
  bottom: -5px;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--primary-color);
  transition: var(--transition);
}

.nav-links a:hover::after {
  width: 100%;
}

.mobile-menu {
  display: none;
  font-size: 1.5rem;
  color: var(--text-primary);
  cursor: pointer;
}

/* Hero Section */
.hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  padding-top: 80px;
  position: relative;
  overflow: hidden;
  width: 100%;
}

.hero-content {
  max-width: 650px;
  z-index: 1;
  width: 100%;
  margin-inline: auto;
}

.hero h1 {
  font-size: 3.5rem;
  font-weight: 700;
  margin-bottom: 20px;
  line-height: 1.2;
  word-wrap: break-word;
}

.hero h1 span {
  color: var(--primary-color);
}

.hero p {
  font-size: 1.2rem;
  color: var(--text-secondary);
  margin-bottom: 30px;
  line-height: 1.6;
}

.btn-container {
  display: flex;
  flex-wrap: wrap;
  gap: 15px;
}

.btn {
  display: inline-block;
  padding: 12px 30px;
  background: var(--primary-color);
  color: white;
  border-radius: 30px;
  text-decoration: none;
  font-weight: 500;
  transition: var(--transition);
  border: none;
  cursor: pointer;
  box-shadow: 0 4px 15px rgba(99, 102, 241, 0.3);
}

.btn:hover {
  transform: translateY(-3px);
  box-shadow: 0 6px 20px rgba(99, 102, 241, 0.4);
}

.btn-outline {
  background: transparent;
  border: 2px solid var(--primary-color);
  color: var(--primary-color);
  margin-left: 0;
}

.btn-outline:hover {
  background: var(--primary-color);
  color: white;
}

.hero-bg {
  position: absolute;
  top: 10%;
  right: 5%;
  width: 500px;
  height: 500px;
  border-radius: 50%;
  background: linear-gradient(
    135deg,
    var(--primary-color),
    var(--secondary-color)
  );
  opacity: 0.1;
  filter: blur(80px);
  z-index: 0;
}

/* About Section */
.section {
  padding: 100px 0;
  width: 100%;
  overflow: hidden;
}

.section-title {
  text-align: center;
  margin-bottom: 60px;
}

.section-title h2 {
  font-size: 2.5rem;
  font-weight: 700;
  margin-bottom: 15px;
  color: var(--text-primary);
}

.section-title p {
  color: var(--text-secondary);
  max-width: 600px;
  margin: 0 auto;
  padding: 0 20px;
}

.about-content {
  display: flex;
  align-items: center;
  gap: 50px;
  width: 100%;
}

.about-img {
  flex: 1;
  border-radius: 20px;
  overflow: hidden;
  box-shadow: var(--shadow);
  max-width: 100%;
}

.about-img img {
  width: 100%;
  height: auto;
  display: block;
  transition: var(--transition);
  user-select: none;
  -webkit-user-drag: none;
}

.about-img:hover img {
  transform: scale(1.05);
}

.about-text {
  flex: 1;
  width: 100%;
}

.about-text h3 {
  font-size: 1.8rem;
  margin-bottom: 20px;
  color: var(--text-primary);
}

.about-text p {
  color: var(--text-secondary);
  margin-bottom: 20px;
  line-height: 1.6;
}

.skills {
  display: flex;
  flex-wrap: wrap;
  gap: 15px;
  margin-top: 30px;
}

.skill {
  padding: 8px 20px;
  background: var(--bg-secondary);
  border-radius: 30px;
  font-size: 0.9rem;
  backdrop-filter: blur(10px);
  border: 1px solid var(--border-color);
  transition: var(--transition);
}

.skill:hover {
  background: var(--primary-color);
  color: white;
  transform: translateY(-3px);
  user-select: none;
}

.projects-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
  gap: 30px;
  width: 100%;
}

.project-card {
  background: var(--bg-primary);
  border-radius: 20px;
  overflow: hidden;
  box-shadow: var(--shadow);
  backdrop-filter: blur(10px);
  border: 1px solid var(--border-color);
  transition: var(--transition);
  width: 100%;
}

.project-card:hover {
  transform: translateY(-10px);
  box-shadow: 0 15px 30px rgba(0, 0, 0, 0.1);
}

.project-img {
  height: 220px;
  overflow: hidden;
  width: 100%;
}

.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: 25px;
}

.project-info h3 {
  font-size: 1.4rem;
  margin-bottom: 10px;
  color: var(--text-primary);
}

.project-info p {
  color: var(--text-secondary);
  margin-bottom: 20px;
  line-height: 1.5;
}

.project-tech {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 20px;
  user-select: none;
}

.project-tech span {
  padding: 5px 12px;
  background: var(--bg-tertiary);
  border-radius: 20px;
  font-size: 0.8rem;
  color: var(--text-secondary);
}

.project-links {
  display: flex;
  gap: 15px;
  flex-wrap: wrap;
}

#globe-p1,
#github-p1 {
  margin-left: 20px;
}

.project-links a {
  color: var(--text-primary);
  font-size: 1.2rem;
  transition: var(--transition);
  text-decoration: none;
}

.project-links a:hover {
  color: var(--primary-color);
}

/* Contact Section */
.btn {
  background: #6366f1;
  color: white;
  padding: 10px 20px;
  border: none;
  border-radius: 6px;
  font-size: 16px;
  cursor: pointer;
  transition: 0.2s;
}

.btn:disabled {
  background: gray;
  cursor: not-allowed;
}

.btn:not(:disabled):hover {
  opacity: 0.9;
}

.contact-content {
  display: flex;
  gap: 50px;
  width: 100%;
}

.contact-info {
  flex: 1;
  width: 100%;
}

.contact-item {
  display: flex;
  align-items: center;
  margin-bottom: 25px;
  word-wrap: break-word;
}

.contact-icon {
  width: 50px;
  height: 50px;
  min-width: 50px;
  border-radius: 50%;
  background: var(--bg-secondary);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-right: 15px;
  color: var(--primary-color);
  font-size: 1.2rem;
}

.contact-text {
  flex: 1;
  overflow-wrap: break-word;
  word-wrap: break-word;
}

.contact-text h4 {
  font-size: 1.1rem;
  margin-bottom: 5px;
}

.contact-text p,
.contact-text a {
  color: var(--text-secondary);
  word-break: break-word;
}

.contact-form {
  flex: 1;
  background: var(--bg-primary);
  padding: 30px;
  border-radius: 20px;
  box-shadow: var(--shadow);
  backdrop-filter: blur(10px);
  border: 1px solid var(--border-color);
  width: 100%;
}

.form-group {
  margin-bottom: 20px;
}

.form-group label {
  display: block;
  margin-bottom: 8px;
  color: var(--text-primary);
  font-weight: 500;
}

.form-control {
  width: 100%;
  max-width: 100%;
  padding: 12px 15px;
  border-radius: 10px;
  border: 1px solid var(--border-color);
  background: var(--bg-secondary);
  color: var(--text-primary);
  transition: var(--transition);
  font-size: 16px; /* Prevents zoom on iOS */
}

.form-control:focus {
  outline: none;
  border-color: var(--primary-color);
  box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.2);
}

textarea.form-control {
  min-height: 150px;
  resize: vertical;
}

/* Footer */
.footer {
  background: var(--bg-primary);
  padding: 30px 0;
  text-align: center;
  border-top: 1px solid var(--border-color);
  backdrop-filter: blur(10px);
  width: 100%;
}

.social-links {
  display: flex;
  justify-content: center;
  gap: 20px;
  margin-bottom: 20px;
  flex-wrap: wrap;
}

.social-links a {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--bg-secondary);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-primary);
  text-decoration: none;
  transition: var(--transition);
}

.social-links a:hover {
  background: var(--primary-color);
  color: white;
  transform: translateY(-3px);
}

.copyright {
  color: var(--text-secondary);
  font-size: 0.9rem;
}

@media (max-width: 1200px) {
  .container {
    padding: 0 30px;
  }
}

@media (max-width: 992px) {
  .about-content,
  .contact-content {
    flex-direction: column;
  }

  .hero h1 {
    font-size: 3rem;
  }

  .hero-bg {
    right: -20%;
    width: 400px;
    height: 400px;
  }
}

@media (max-width: 768px) {
  .nav-links {
    position: fixed;
    top: 70px;
    left: -100%;
    width: 100%;
    height: calc(100vh - 70px);
    background: var(--bg-primary);
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    padding-top: 50px;
    transition: var(--transition);
    backdrop-filter: blur(10px);
  }

  .nav-links.active {
    left: 0;
  }

  .nav-links li {
    margin: 15px 0;
  }

  .mobile-menu {
    display: block;
  }

  .hero {
    padding-top: 100px;
  }

  .hero h1 {
    font-size: 2.5rem;
  }

  .projects-grid {
    grid-template-columns: 1fr;
  }

  .hero-bg {
    right: -30%;
    width: 300px;
    height: 300px;
  }

  .section {
    padding: 60px 0;
  }

  #globe-p1,
  #github-p1 {
    margin-left: 0;
  }

  .contact-form {
    padding: 20px;
  }
}

@media (max-width: 576px) {
  .container {
    padding: 0 15px;
  }

  .hero h1 {
    font-size: 2rem;
  }

  .hero p {
    font-size: 1rem;
  }

  .section-title h2 {
    font-size: 2rem;
  }

  .btn-container {
    flex-direction: column;
    width: 100%;
  }

  .btn {
    width: 100%;
    text-align: center;
  }

  .btn-outline {
    margin-left: 0;
    width: 100%;
  }

  .hero-bg {
    right: -40%;
    width: 250px;
    height: 250px;
  }

  .about-text h3 {
    font-size: 1.5rem;
  }

  .projects-grid {
    grid-template-columns: 1fr;
    gap: 20px;
  }

  .project-img {
    height: 180px;
  }
}

@media (max-width: 375px) {
  .container {
    padding: 0 12px;
  }

  .hero h1 {
    font-size: 1.8rem;
  }

  .hero p {
    font-size: 0.95rem;
  }

  .project-info {
    padding: 15px;
  }

  .section-title h2 {
    font-size: 1.8rem;
  }

  .btn {
    padding: 10px 20px;
    font-size: 0.9rem;
  }

  .hero-bg {
    right: -50%;
    width: 200px;
    height: 200px;
  }
}
