/* ==================== Global ==================== */
:root {
  --primary: #0ea5e9;
  --secondary: #7e22ce;
  --dark: #0f172a;
  --darker: #020617;
  --light: #e2e8f0;
  --muted: #94a3b8;
}
* { margin: 0; padding: 0; box-sizing: border-box; }
body {
  font-family: "Inter", sans-serif;
  background-color: var(--dark);
  color: var(--light);
  scroll-behavior: smooth;
}
.container { width: 90%; max-width: 1200px; margin: auto; }
.gradient-text {
  background: linear-gradient(90deg, var(--primary), var(--secondary));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.divider {
  width: 80px; height: 3px;
  margin: 10px auto 40px;
  background: linear-gradient(90deg, var(--primary), var(--secondary));
  border-radius: 2px;
}
.btn {
  display: inline-block; padding: 12px 28px;
  border-radius: 30px; font-weight: 600;
  text-decoration: none; transition: all 0.3s ease; cursor: pointer;
}
.btn-primary { background: linear-gradient(90deg, var(--primary), var(--secondary)); color: #fff; }
.btn-primary:hover { box-shadow: 0 0 20px rgba(14,165,233,0.3); transform: translateY(-2px); }
.btn-outline { border: 2px solid var(--primary); color: var(--primary); }
.btn-outline:hover { background: var(--primary); color: #fff; }

/* ==================== Mouse Tracker ==================== */
#cursor-dot {
  position: fixed;
  width: 10px; height: 10px;
  background: var(--primary);
  border-radius: 50%;
  pointer-events: none;
  z-index: 999999;
  top: 0; left: 0;
  transform: translate(-50%, -50%);
  box-shadow: 0 0 12px var(--primary), 0 0 24px rgba(14,165,233,0.5);
  transition: transform 0.1s ease, width 0.2s ease, height 0.2s ease, background 0.2s ease;
}
#cursor-ring {
  position: fixed;
  width: 38px; height: 38px;
  border: 2px solid rgba(14,165,233,0.55);
  border-radius: 50%;
  pointer-events: none;
  z-index: 999998;
  top: 0; left: 0;
  transform: translate(-50%, -50%);
  transition: width 0.25s ease, height 0.25s ease, border-color 0.25s ease, background 0.25s ease;
}
#cursor-ring.hovering {
  width: 58px; height: 58px;
  border-color: rgba(126,34,206,0.7);
  background: rgba(14,165,233,0.06);
}
#cursor-dot.clicking { transform: translate(-50%,-50%) scale(0.45); }
/* On mobile, hide custom tracker */
@media (hover: none) {
  #cursor-dot, #cursor-ring { display: none; }
}

/* ==================== Navigation ==================== */
#navbar {
  position: fixed; top: 0; width: 100%;
  background-color: rgba(2,6,23,0.85);
  backdrop-filter: blur(8px);
  z-index: 1000;
  box-shadow: 0 2px 10px rgba(0,0,0,0.3);
}
.nav-container { display: flex; justify-content: space-between; align-items: center; padding: 16px 0; }
.logo { font-size: 1.9rem; font-weight: 800; letter-spacing: 1px; text-decoration: none; }
.nav-links { display: flex; list-style: none; gap: 30px; }
.nav-link {
  position: relative; display: inline-block;
  font-weight: 500; padding: 0.5rem 1rem;
  border-radius: 8px; transition: all 0.25s ease;
  color: #f9fafb; text-decoration: none; z-index: 1;
}
.nav-link::before {
  content: ""; position: absolute; inset: 0;
  border-radius: 8px;
  background: linear-gradient(45deg,#60a5fa,#34d399);
  opacity: 0; transform: scale(0.9);
  transition: all 0.3s ease; z-index: -1;
}
.nav-link:hover::before { opacity: 0.25; transform: scale(1.05); }
.nav-link:hover { color: #a5f3fc; text-shadow: 0 0 12px rgba(59,130,246,0.8); transform: scale(1.12); }
.nav-link.active { color: #34d399; transform: scale(1.08); }
.menu-toggle { display: none; background: none; border: none; color: var(--light); font-size: 1.6rem; cursor: pointer; }
@media (max-width: 768px) {
  .nav-links { position: absolute; top: 70px; left: 0; width: 100%; background: var(--darker); flex-direction: column; align-items: center; display: none; padding: 10px 0; }
  .nav-links.show { display: flex; }
  .menu-toggle { display: block; }
}

/* ==================== Hero ==================== */
.hero { min-height: 100vh; display: flex; align-items: center; padding-top: 100px; }
.hero-container { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; width: 100%; padding: 0 40px; }
.hero-image { flex: 1 1 350px; text-align: center; margin-right: 40px; }
.image-wrapper { position: relative; width: 350px; height: 350px; border-radius: 50%; display: inline-flex; justify-content: center; align-items: center; }
.glow-layer { position: absolute; inset: 0; border-radius: 50%; filter: blur(40px); z-index: 0; opacity: 0.3; animation: glowPulse 4s infinite alternate ease-in-out; }
.layer1 { background: radial-gradient(circle,rgba(59,130,246,0.4),transparent 70%); }
.layer2 { background: radial-gradient(circle,rgba(16,185,129,0.3),transparent 70%); animation-delay: 1s; }
.layer3 { background: radial-gradient(circle,rgba(147,51,234,0.25),transparent 70%); animation-delay: 2s; }
@keyframes glowPulse { 0% { transform:scale(1); opacity:0.3; } 100% { transform:scale(1.1); opacity:0.5; } }
.border-ring { width: 350px; height: 350px; border-radius: 50%; border: 3px solid #3b82f6; overflow: hidden; z-index: 2; position: relative; }
.border-ring img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 18%; border-radius: 50%; transition: transform 0.5s ease; }
.border-ring:hover img { transform: scale(1.08); }
.hero-text { flex: 1 1 500px; text-align: left; margin-left: 40px; }
.hero-text h1 { font-size: 4.8rem; font-weight: 700; margin-top: -20px; }
.hero-text h2 { font-size: 3rem; margin-top: 10px; }
.hero-text p { color: #94a3b8; margin-top: 15px; margin-bottom: 20px; line-height: 1.6; max-width: 520px; font-size: 1.2rem; }
.hero-buttons { display: flex; gap: 15px; margin-top: 10px; }
@media (max-width: 900px) {
  .hero-container { flex-direction: column; padding: 0; text-align: center; }
  .hero-image { margin-right: 0; }
  .hero-text { margin: 30px 0 0 0; text-align: center; }
  .image-wrapper, .border-ring { width: 260px; height: 260px; }
  .hero-text h1 { font-size: 3.2rem; }
  .hero-text h2 { font-size: 2rem; }
  .hero-buttons { justify-content: center; }
}

/* ==================== About ==================== */
.about-section { padding: 100px 0; background-color: var(--darker); }
.section-title { text-align: center; font-size: 2.5rem; margin-top: -50px; }
.about-content { display: flex; flex-wrap: wrap; align-items: center; gap: 40px; }
.about-image img { width: 280px; height: 280px; border-radius: 15px; object-fit: cover; object-position: center top; border: 1.5px solid #1e293b; transition: all 0.3s ease; }
.about-image:hover img { transform: translateY(-6px); border-color: var(--primary); box-shadow: 0 0 20px rgba(14,165,233,0.25); }
.about-text { flex: 1; }
.about-text h3 { font-size: 1.8rem; margin-bottom: 15px; }
.about-text > p { color: var(--muted); line-height: 1.6; margin-bottom: 25px; text-align: justify; }
.info-box {
  margin-top: 1.2rem; margin-bottom: 1rem;
  display: flex; align-items: flex-start;
  padding: 0.8rem 1rem; gap: 12px;
  border: 1.5px solid #1e293b; border-radius: 10px;
  background-color: #0f172a;
  transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
}
.info-box:hover { transform: translateY(-4px); box-shadow: 0 6px 15px rgba(0,0,0,0.3); border-color: #007bff; }
.info-box > i { font-size: 1.5rem; color: #007bff; margin-top: 4px; }
.education-h4 { font-size: 1.1rem; font-weight: 600; margin-bottom: 4px; }
.education-p { font-size: 0.9rem; color: var(--muted); }
.about-buttons { display: flex; gap: 15px; margin-top: 20px; flex-wrap: wrap; }

/* ==================== Experience Timeline ==================== */
.experience { margin-top: 80px; }
.experience > h3 { font-size: 1.8rem; margin-bottom: 10px; }
.timeline { position: relative; margin-top: 40px; padding-left: 30px; }
.timeline::before { content: ""; position: absolute; top: 0; left: 7px; width: 2px; height: 100%; background: #334155; }
.timeline-item { position: relative; margin-bottom: 40px; }
.timeline-dot {
  position: absolute; left: -25px; top: 24px;
  width: 14px; height: 14px; border-radius: 50%;
  background: linear-gradient(135deg, var(--primary), var(--secondary)); z-index: 2;
}
.timeline-content {
  background-color: #0f172a; border: 1.5px solid #1e293b;
  border-radius: 10px; padding: 1rem 1.2rem;
  transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
}
.timeline-content:hover { transform: translateY(-4px); box-shadow: 0 6px 18px rgba(0,0,0,0.3); border-color: #007bff; }
.timeline-header { margin-bottom: 8px; }
.company-name { font-size: 1.15rem; font-weight: 700; color: #ffffff; margin-bottom: 4px; }
.role-duration { font-size: 0.88rem; color: #60a5fa; }
.timeline-content > p { font-size: 0.95rem; color: #b0b0b0; line-height: 1.6; margin-top: 8px; }

/* ==================== Skills ==================== */
.skills-section { background-color: var(--dark); padding: 80px 0; text-align: center; }
.section-title-myskills { font-size: 2.5rem; }
.skills-flex-wrapper { display: flex; justify-content: center; margin-top: 30px; flex-wrap: wrap; }
.skills-container { display: grid; grid-template-columns: repeat(2,1fr); gap: 30px; max-width: 780px; width: 100%; }
.skill-card {
  background: #0f172a; border: 1.5px solid #1e293b;
  border-radius: 12px; padding: 20px;
  transition: all 0.3s ease; text-align: left;
}
.skill-card:hover { transform: translateY(-6px); border-color: var(--primary); box-shadow: 0 0 20px rgba(14,165,233,0.2); }
.skill-card h3 { font-size: 1.2rem; margin-bottom: 14px; color: var(--primary); }
.skill-card p { color: #b0b0b0; line-height: 1.8; font-size: 0.95rem; }
@media (max-width: 700px) {
  .skills-container { grid-template-columns: 1fr; }
  .skill-card { width: 100%; }
}

/* ==================== Projects ==================== */
.projects-section { padding: 80px 0; background: var(--darker); text-align: center; }
.projects-grid { display: grid; grid-template-columns: repeat(auto-fit,minmax(300px,1fr)); gap: 30px; margin-top: 40px; }
.project-card {
  background: #0f172a; border: 1.5px solid #1e293b;
  border-radius: 12px; padding: 26px; text-align: left;
  transition: all 0.3s ease;
  display: flex; flex-direction: column; justify-content: space-between; gap: 12px;
}
.project-card:hover { transform: translateY(-6px); border-color: var(--primary); box-shadow: 0 0 20px rgba(14,165,233,0.2); }
.project-card h3 { color: var(--primary); font-size: 1.15rem; margin-bottom: 2px; }
.project-tech { font-size: 0.78rem; color: #60a5fa; font-weight: 600; letter-spacing: 0.4px; margin-bottom: 4px; }
.project-card > p { color: var(--muted); line-height: 1.6; font-size: 0.93rem; flex: 1; }
.project-card .btn { align-self: flex-start; padding: 9px 22px; font-size: 0.88rem; }

/* ==================== Contact ==================== */
.contact-section { padding: 100px 0; background: #0f1123; color: #fff; }
.contact-subtitle { text-align: center; margin-top: 10px; opacity: 0.7; margin-bottom: 50px; }
.contact-wrapper { display: flex; flex-wrap: wrap; gap: 50px; justify-content: center; position: relative; }
.contact-left { flex: 1 1 340px; }
.contact-left h3 { font-size: 1.7rem; margin-bottom: 25px; }
.contact-left h4 { margin: 20px 0 10px; }
/* reuse info-box in contact with slight override */
.contact-section .info-box { background: #0c1627; border: 1px solid #1e293b; border-radius: 12px; padding: 16px 18px; margin-bottom: 14px; align-items: center; }
.contact-section .info-box .icon i { font-size: 1.3rem; color: #60a5fa; }
.contact-section .info-box h4 { font-size: 1rem; margin-bottom: 3px; }
.contact-section .info-box p { font-size: 0.9rem; color: #9ca3af; }
.social-buttons { display: flex; gap: 12px; margin: 14px 0; flex-wrap: wrap; }
.social-btn { padding: 9px 16px; border-radius: 8px; background: #0f172a; border: 1px solid #1e293b; color: #60a5fa; text-decoration: none; transition: 0.3s; font-size: 0.9rem; }
.social-btn:hover { background: rgba(96,165,250,0.1); }
.resume-btn { margin-top: 18px; display: inline-flex; align-items: center; gap: 8px; background: linear-gradient(90deg,#4f8aff,#a855f7); color: #fff; padding: 12px 22px; border-radius: 10px; cursor: pointer; text-decoration: none; font-size: 0.95rem; border: none; transition: opacity 0.3s; }
.resume-btn:hover { opacity: 0.88; }
.contact-right { flex: 1 1 440px; background: #0c1627; border: 1px solid #1e293b; border-radius: 12px; padding: 30px; transition: all 0.3s ease; }
.contact-right:hover { transform: translateY(-4px); border-color: #4f8aff; box-shadow: 0 0 20px rgba(79,138,255,0.2); }
.contact-right h3 { margin-bottom: 22px; }
.contact-form { display: flex; flex-direction: column; gap: 16px; }
.form-row { display: flex; gap: 16px; }
.form-row input { flex: 1; }
.contact-form input, .contact-form textarea { background: transparent; border: 1px solid #334155; padding: 12px 14px; border-radius: 8px; color: #fff; transition: all 0.25s ease; width: 100%; font-family: inherit; font-size: 0.95rem; }
.contact-form input:focus, .contact-form textarea:focus { border-color: #4f8aff; box-shadow: 0 0 10px rgba(79,138,255,0.3); outline: none; }
.send-btn { margin-top: 6px; background: linear-gradient(90deg,#4f8aff,#a855f7); padding: 13px; border: none; border-radius: 10px; color: #fff; cursor: pointer; font-size: 1rem; transition: opacity 0.3s; display: flex; justify-content: center; align-items: center; gap: 8px; }
.send-btn:hover { opacity: 0.9; }
.btn-loader { display: none; width: 18px; height: 18px; border: 3px solid #fff; border-top-color: transparent; border-radius: 50%; animation: spin 0.7s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.loading .btn-text { display: none; }
.loading .btn-loader { display: inline-block; }
.input-error { border-color: #ef4444 !important; box-shadow: 0 0 8px rgba(239,68,68,0.3); }
#successPopup { display: none; position: fixed; top: 40%; left: 50%; transform: translate(-50%,-50%); min-width: 340px; max-width: 96vw; background: #fff; border-radius: 12px; box-shadow: 0 5px 24px rgba(0,0,0,.3); z-index: 99999; padding: 32px 28px 24px; text-align: center; }
.successPopup-msg { font-size: 1.15rem; color: #1b1b1b; margin-bottom: 24px; line-height: 1.5; }
#closePopup { padding: 10px 32px; border: none; background: #3D5AFE; color: #fff; border-radius: 6px; font-size: 1rem; cursor: pointer; transition: background 0.2s; }
#closePopup:hover { background: #303f9f; }

/* ==================== Footer ==================== */
.footer { background: var(--darker); padding: 36px 0; text-align: center; border-top: 1px solid #1e293b; color: var(--muted); font-size: 0.9rem; }

/* ==================== Back to Top ==================== */
.back-to-top { position: fixed; bottom: 30px; right: 30px; width: 48px; height: 48px; background: var(--primary); border: none; border-radius: 50%; color: #fff; font-size: 1.3rem; display: none; align-items: center; justify-content: center; cursor: pointer; transition: all 0.3s ease; z-index: 500; box-shadow: 0 0 14px rgba(14,165,233,0.4); }
.back-to-top:hover { transform: translateY(-4px); }

/* ==================== Mobile ==================== */
@media (max-width: 576px) {
  .container { width: 92%; }
  .nav-container { padding: 10px 0; }
  .logo { font-size: 1.4rem; }
  .hero-container { padding: 0 12px; }
  .image-wrapper, .border-ring { width: 200px; height: 200px; }
  .hero-text h1 { font-size: 2.4rem; }
  .hero-text h2 { font-size: 1.5rem; }
  .hero-text p { font-size: 0.95rem; max-width: 100%; }
  .hero-buttons { flex-direction: column; }
  .hero-buttons .btn { width: 100%; text-align: center; }
  .about-content { flex-direction: column; }
  .about-image img { width: 100%; height: auto; }
  .skills-container { grid-template-columns: 1fr; }
  .projects-grid { grid-template-columns: 1fr; }
  .form-row { flex-direction: column; }
  .contact-wrapper { flex-direction: column; gap: 24px; }
  .back-to-top { right: 16px; bottom: 16px; }
}
@media (max-width: 360px) {
  .hero-text h1 { font-size: 2rem; }
  .hero-text h2 { font-size: 1.25rem; }
  .image-wrapper, .border-ring { width: 170px; height: 170px; }
}
