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

html {
  scroll-behavior: smooth;
}

body {
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: #e5e7eb;
  line-height: 1.6;
  position: relative;
  min-height: 100vh;
  overflow-x: hidden;
}

/* --------- Gradient Background + Glows --------- */
.bg-gradient {
  position: fixed;
  inset: 0;
  background: radial-gradient(circle at top left, #4f46e5 0, transparent 55%),
              radial-gradient(circle at bottom right, #ec4899 0, transparent 55%),
              linear-gradient(135deg, #020617, #020617 40%, #111827 100%);
  z-index: -3;
}
.avatar-img {
  width: 160px;
  height: 160px;
  border-radius: 999px;
  object-fit: cover;
  border: 3px solid rgba(255, 255, 255, 0.4);
  box-shadow: 0 10px 35px rgba(0, 0, 0, 0.4);
  display: block;
  margin: 0 auto 0.9rem;
}

.bg-glow {
  position: fixed;
  width: 260px;
  height: 260px;
  border-radius: 999px;
  filter: blur(80px);
  opacity: 0.6;
  z-index: -2;
}

.bg-glow-1 {
  top: 10%;
  right: 5%;
  background: #6366f1;
}

.bg-glow-2 {
  bottom: 5%;
  left: 8%;
  background: #ec4899;
}

/* Containers & Sections */
.container {
  width: 90%;
  max-width: 1100px;
  margin: 0 auto;
}

.section {
  padding: 80px 0;
}

.section-alt {
  position: relative;
}

.section-alt::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(15, 23, 42, 0.3), rgba(30, 64, 175, 0.3));
  opacity: 0.4;
  z-index: -1;
}

.section-title {
  font-size: 2rem;
  margin-bottom: 10px;
  text-align: center;
  color: #f9fafb;
}

.section-subtitle {
  text-align: center;
  margin-bottom: 40px;
  color: #9ca3af;
}

/* --------- Glassmorphism Card --------- */
.glass-card {
  background: rgba(15, 23, 42, 0.5);
  border-radius: 1.1rem;
  border: 1px solid rgba(148, 163, 184, 0.35);
  box-shadow:
    0 18px 40px rgba(15, 23, 42, 0.65),
    0 0 0 1px rgba(148, 163, 184, 0.1);
  backdrop-filter: blur(18px);
}

/* --------- Header / Navbar --------- */
.header {
  position: sticky;
  top: 0;
  z-index: 50;
  backdrop-filter: blur(16px);
  background: linear-gradient(to bottom, rgba(15, 23, 42, 0.95), rgba(15, 23, 42, 0.6));
  border-bottom: 1px solid rgba(148, 163, 184, 0.3);
}

.nav-container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
}

.logo {
  font-weight: 700;
  font-size: 1.25rem;
  color: #f9fafb;
}

.logo span {
  color: #a855f7;
}

.nav {
  display: flex;
  gap: 1.5rem;
}

.nav-link {
  text-decoration: none;
  color: #cbd5f5;
  font-size: 0.95rem;
  position: relative;
  padding-bottom: 2px;
}

.nav-link::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -4px;
  width: 0;
  height: 2px;
  background: linear-gradient(90deg, #6366f1, #ec4899);
  transition: width 0.2s ease;
}

.nav-link:hover::after,
.nav-link.active::after {
  width: 100%;
}

.menu-toggle {
  display: none;
  background: none;
  border: none;
  font-size: 1.6rem;
  color: #e5e7eb;
}

/* --------- Hero Section --------- */
.hero {
  min-height: calc(100vh - 64px);
  display: flex;
  align-items: center;
}

.hero-container {
  display: grid;
  grid-template-columns: 2fr 1.2fr;
  gap: 3rem;
  align-items: center;
}

.hero-tag {
  text-transform: uppercase;
  letter-spacing: 0.2em;
  font-size: 0.75rem;
  color: #9ca3af;
  margin-bottom: 0.6rem;
}

.hero-title {
  font-size: 2.8rem;
  margin-bottom: 0.4rem;
  background: linear-gradient(90deg, #a855f7, #6366f1, #22c55e);
  background-clip: text;
  -webkit-background-clip: text;
  color: transparent;
}

.hero-subtitle {
  font-size: 1.1rem;
  color: #e5e7eb;
  margin-bottom: 1rem;
}

.hero-desc {
  color: #9ca3af;
  margin-bottom: 1.6rem;
}

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

/* Buttons */
.btn {
  border-radius: 999px;
  padding: 0.65rem 1.5rem;
  border: 1px solid transparent;
  font-size: 0.95rem;
  cursor: pointer;
  text-decoration: none;
  display: inline-block;
  text-align: center;
  transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease, border-color 0.15s;
}

.primary-btn {
  background: linear-gradient(135deg, #6366f1, #ec4899);
  color: white;
  box-shadow: 0 15px 30px rgba(59, 130, 246, 0.55);
}

.primary-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 18px 40px rgba(59, 130, 246, 0.7);
}

.secondary-btn {
  border-color: rgba(129, 140, 248, 0.8);
  color: #e5e7eb;
  background: rgba(15, 23, 42, 0.6);
}

.secondary-btn:hover {
  background: rgba(30, 64, 175, 0.65);
}

.full-width {
  width: 100%;
}

/* Hero Image / Avatar */
.hero-image {
  display: flex;
  justify-content: center;
  align-items: center;
}

.avatar-card {
  padding: 1.8rem 1.6rem 1.4rem;
  text-align: center;
}

.avatar-circle {
  width: 160px;
  height: 160px;
  border-radius: 999px;
  margin: 0 auto 0.9rem;
  background: conic-gradient(from 180deg, #6366f1, #ec4899, #22c55e, #6366f1);
  padding: 3px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.avatar-circle span {
  width: 100%;
  height: 100%;
  border-radius: 999px;
  background: radial-gradient(circle at 20% 20%, #1f2937, #020617);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #e5e7eb;
  font-weight: 700;
  font-size: 2.4rem;
}

.avatar-caption {
  font-size: 0.9rem;
  color: #9ca3af;
}

/* floating animation */
.floating {
  animation: floating 4.5s ease-in-out infinite;
}

@keyframes floating {
  0%, 100% {
    transform: translateY(0px);
  }
  50% {
    transform: translateY(-10px);
  }
}

/* --------- Skills --------- */
.skills-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1.5rem;
}

.card {
  padding: 1.4rem 1.6rem;
}

.card h3 {
  margin-bottom: 1rem;
  color: #e5e7eb;
}

.tag-list {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.tag {
  font-size: 0.8rem;
  padding: 0.3rem 0.7rem;
  border-radius: 999px;
  background: rgba(79, 70, 229, 0.18);
  color: #e0e7ff;
  border: 1px solid rgba(129, 140, 248, 0.4);
}

/* --------- Projects --------- */
.projects-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1.5rem;
}

.project-card p {
  margin-bottom: 0.5rem;
  color: #cbd5f5;
}

.project-tech {
  font-size: 0.85rem;
  color: #9ca3af;
  margin-bottom: 0.75rem;
}

.project-links a {
  font-size: 0.9rem;
  text-decoration: none;
  color: #a5b4fc;
}

.project-links a:hover {
  text-decoration: underline;
}

/* --------- Timeline / Achievements --------- */
.timeline {
  position: relative;
  margin-top: 1rem;
}

.timeline-item {
  position: relative;
  margin-bottom: 1.2rem;
  padding-left: 2.2rem;
}

.timeline-dot {
  position: absolute;
  left: 0.4rem;
  top: 1.1rem;
  width: 10px;
  height: 10px;
  border-radius: 999px;
  background: radial-gradient(circle, #f97316, #ec4899);
  box-shadow: 0 0 12px rgba(249, 115, 22, 0.9);
}

.timeline-content h3 {
  margin-bottom: 0.3rem;
  color: #e5e7eb;
}

.timeline-content p {
  font-size: 0.9rem;
  color: #cbd5f5;
}

.timeline-tag {
  display: inline-block;
  margin-top: 0.4rem;
  font-size: 0.75rem;
  color: #a5b4fc;
}

/* --------- Contact --------- */
.contact-grid {
  display: grid;
  grid-template-columns: 1.1fr 1.4fr;
  gap: 2rem;
  align-items: flex-start;
}

.contact-form {
  box-shadow:
    0 20px 45px rgba(15, 23, 42, 0.8),
    0 0 0 1px rgba(148, 163, 184, 0.15);
}

.form-group {
  margin-bottom: 0.9rem;
}

.form-group label {
  display: block;
  font-size: 0.9rem;
  margin-bottom: 0.25rem;
  color: #e5e7eb;
}

.form-group input,
.form-group textarea {
  width: 100%;
  padding: 0.5rem 0.65rem;
  border-radius: 0.5rem;
  border: 1px solid rgba(148, 163, 184, 0.7);
  font-size: 0.9rem;
  outline: none;
  background: rgba(15, 23, 42, 0.7);
  color: #e5e7eb;
}

.form-group input:focus,
.form-group textarea:focus {
  border-color: #a855f7;
}

.form-status {
  font-size: 0.85rem;
  margin-top: 0.4rem;
  color: #a5b4fc;
}

/* --------- Footer --------- */
.footer {
  background: rgba(15, 23, 42, 0.95);
  color: #9ca3af;
  padding: 1rem 0;
  border-top: 1px solid rgba(75, 85, 99, 0.7);
}

.footer-container {
  text-align: center;
  font-size: 0.85rem;
}

/* --------- Animations / Reveal --------- */
.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.55s ease, transform 0.55s ease;
}

.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

/* --------- Responsive --------- */
@media (max-width: 900px) {
  .hero-container {
    grid-template-columns: 1fr;
    text-align: left;
  }

  .hero-image {
    order: -1;
    margin-bottom: 1.5rem;
  }

  .skills-grid,
  .projects-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .contact-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 700px) {
  .nav {
    position: absolute;
    top: 64px;
    right: 0;
    background: rgba(15, 23, 42, 0.97);
    flex-direction: column;
    align-items: flex-start;
    padding: 0.75rem 1rem 1rem;
    gap: 0.75rem;
    border-bottom-left-radius: 0.75rem;
    box-shadow: 0 14px 45px rgba(15, 23, 42, 0.9);
    display: none;
  }

  .nav.open {
    display: flex;
  }

  .menu-toggle {
    display: block;
  }

  .skills-grid,
  .projects-grid {
    grid-template-columns: 1fr;
  }

  .hero-title {
    font-size: 2.2rem;
  }
}
