/* ===== Reset & Base ===== */
*, *::before, *::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

:root {
  --purple-900: #1e1c30;
  --purple-800: #2b2744;
  --purple-700: #353353;
  --purple-600: #4c4772;
  --purple-500: #6b62a6;
  --purple-400: #8a7bd6;
  --lavender-300: #dcd4f0;
  --lavender-200: #ebe6f7;
  --lavender-100: #f7f3ff;
  --ink: #131313;
  --cream: #fbf8ff;
}

body {
  font-family: 'Poppins', sans-serif;
  color: var(--ink);
  background: var(--cream);
  line-height: 1.6;
  overflow-x: hidden;
}

a {
  text-decoration: none;
  color: inherit;
}

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

/* ===== Sidebar Navigation ===== */
.sidebar {
  position: fixed;
  top: 0;
  left: 0;
  width: 240px;
  height: 100vh;
  background: linear-gradient(180deg, #2b2744 0%, #353353 55%, #2a2542 100%);
  z-index: 1000;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 40px 20px;
  transition: transform 0.3s ease;
  box-shadow: 12px 0 30px rgba(18, 15, 32, 0.2);
}

.sidebar::before {
  content: '';
  position: absolute;
  inset: -40px -40px auto -40px;
  height: 220px;
  background: radial-gradient(circle at 40% 40%, rgba(138, 123, 214, 0.35), transparent 70%);
  opacity: 0.9;
  pointer-events: none;
  z-index: 0;
}

.sidebar > * {
  position: relative;
  z-index: 1;
}

.sidebar .logo {
  font-size: 1.3rem;
  font-weight: 700;
  color: #fff;
  margin-bottom: 50px;
  margin-top: 10px;
  text-align: center;
  letter-spacing: 0.5px;
}

.nav-links {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 8px;
  width: 100%;
}

.nav-links a {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 0.92rem;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.6);
  padding: 10px 20px;
  border-radius: 8px;
  transition: all 0.3s;
}

.nav-links a i {
  width: 18px;
  text-align: center;
  font-size: 0.85rem;
}

.nav-links a:hover,
.nav-links a.active {
  color: #fff;
  background: rgba(255, 255, 255, 0.12);
}

.sidebar-footer {
  margin-top: auto;
  display: flex;
  gap: 12px;
}

.sidebar-footer a {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.18), rgba(255, 255, 255, 0.05));
  color: rgba(255, 255, 255, 0.7);
  font-size: 0.95rem;
  transition: all 0.3s;
}

.sidebar-footer a:hover {
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.28), rgba(255, 255, 255, 0.1));
  color: #fff;
  transform: translateY(-2px);
}

/* Mobile menu toggle */
.menu-toggle {
  display: none;
  position: fixed;
  top: 18px;
  left: 18px;
  z-index: 1100;
  width: 44px;
  height: 44px;
  border-radius: 10px;
  background: linear-gradient(135deg, #2b2744, #3b3561);
  border: none;
  cursor: pointer;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.15);
  transition: left 0.3s ease;
}

.menu-toggle.open {
  left: 196px;
}

.menu-toggle span {
  display: block;
  width: 20px;
  height: 2px;
  background: #fff;
  border-radius: 2px;
  transition: all 0.3s;
  position: absolute;
  left: 12px;
}

.menu-toggle span:nth-child(1) {
  top: 14px;
}

.menu-toggle span:nth-child(2) {
  top: 21px;
}

.menu-toggle span:nth-child(3) {
  top: 28px;
}

.menu-toggle.open span:nth-child(1) {
  top: 21px;
  transform: rotate(45deg);
}

.menu-toggle.open span:nth-child(2) {
  opacity: 0;
}

.menu-toggle.open span:nth-child(3) {
  top: 21px;
  transform: rotate(-45deg);
}

/* Overlay for mobile */
.sidebar-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  z-index: 999;
  opacity: 0;
  transition: opacity 0.3s;
}

.sidebar-overlay.visible {
  opacity: 1;
}

/* Main content offset for sidebar */
.main-content {
  margin-left: 240px;
}

/* ===== Hero Section ===== */
.hero {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 80px 20px 60px;
  background:
    radial-gradient(circle at 15% 20%, rgba(138, 123, 214, 0.18), transparent 55%),
    radial-gradient(circle at 85% 30%, rgba(76, 71, 114, 0.18), transparent 50%),
    linear-gradient(135deg, #f9f5ff 0%, #ece6fb 60%, #f5f7fa 100%);
  position: relative;
}

.hero::before,
.hero::after {
  content: '';
  position: absolute;
  width: 220px;
  height: 220px;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 35%, rgba(138, 123, 214, 0.3), rgba(138, 123, 214, 0));
  opacity: 0.65;
  pointer-events: none;
  animation: floaty 12s ease-in-out infinite;
  z-index: 0;
}

.hero::before {
  top: 8%;
  left: 6%;
}

.hero::after {
  bottom: 10%;
  right: 8%;
  width: 260px;
  height: 260px;
  animation-delay: -4s;
}

.hero > * {
  position: relative;
  z-index: 1;
}

.hero-avatar {
  width: 160px;
  height: 160px;
  border-radius: 50%;
  overflow: hidden;
  margin-bottom: 30px;
  box-shadow: 0 8px 30px rgba(53, 51, 83, 0.2);
  animation: fadeInDown 1s ease;
  border: 4px solid #fff;
}

.hero-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero h1 {
  font-size: 3rem;
  font-weight: 700;
  color: var(--ink);
  margin-bottom: 15px;
  animation: fadeInUp 1s ease 0.2s both;
}

.hero .subtitle {
  font-size: 1.15rem;
  font-weight: 300;
  color: #555;
  max-width: 600px;
  margin-bottom: 30px;
  animation: fadeInUp 1s ease 0.4s both;
  min-height: 1.8em;
}

.role-wrapper {
  display: inline;
}

.role-text {
  font-weight: 600;
  color: var(--purple-700);
}

.role-cursor {
  display: inline-block;
  color: var(--purple-700);
  font-weight: 300;
  animation: blink 0.7s step-end infinite;
  margin-left: 1px;
}

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

.social-links {
  display: flex;
  gap: 15px;
  margin-bottom: 40px;
  animation: fadeInUp 1s ease 0.6s both;
}

.social-links a {
  width: 45px;
  height: 45px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #2b2744, #6b62a6);
  color: #fff;
  font-size: 1.1rem;
  transition: all 0.3s;
}

.social-links a:hover {
  background: linear-gradient(135deg, #1e1c30, #4c4772);
  transform: translateY(-3px);
  box-shadow: 0 5px 15px rgba(53, 51, 83, 0.4);
}

.scroll-down {
  animation: fadeInUp 1s ease 0.8s both;
  cursor: pointer;
  color: var(--purple-700);
  font-size: 0.9rem;
  font-weight: 500;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}

.scroll-down i {
  animation: bounce 2s infinite;
}

/* ===== Sections ===== */
section {
  padding: 80px 20px;
  position: relative;
}

section:not(:last-of-type) {
  border-bottom: 1px solid rgba(107, 98, 166, 0.2);
}

.container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 20px;
}

.section-title {
  text-align: center;
  font-size: 2.2rem;
  font-weight: 700;
  color: var(--ink);
  margin-bottom: 50px;
  position: relative;
}

.section-title::after {
  content: '';
  display: block;
  width: 60px;
  height: 3px;
  background: linear-gradient(90deg, #2b2744, #6b62a6);
  margin: 12px auto 0;
  border-radius: 2px;
}

.section-title::before {
  content: '';
  position: absolute;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  top: -12px;
  left: 50%;
  transform: translateX(-50%) rotate(12deg);
  background: linear-gradient(135deg, #6b62a6, #8a7bd6);
  box-shadow: 0 6px 16px rgba(53, 51, 83, 0.25);
}

/* ===== About ===== */
.about {
  background:
    radial-gradient(circle at 90% 20%, rgba(138, 123, 214, 0.12), transparent 45%),
    linear-gradient(180deg, #ffffff 0%, #f7f3ff 100%);
}

.about-content {
  display: flex;
  align-items: center;
  gap: 60px;
}

.about-image {
  flex-shrink: 0;
  width: 220px;
  height: 220px;
  border-radius: 50%;
  overflow: hidden;
  box-shadow: 0 12px 30px rgba(53, 51, 83, 0.18);
  border: 4px solid #e3ddf5;
}

.about-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.about-text h3 {
  font-size: 1.4rem;
  font-weight: 600;
  margin-bottom: 15px;
  color: var(--purple-700);
}

.about-text p {
  font-size: 1rem;
  color: #555;
  line-height: 1.8;
}

/* ===== Skills ===== */
.skills {
  background:
    radial-gradient(circle at 10% 15%, rgba(107, 98, 166, 0.12), transparent 40%),
    linear-gradient(180deg, #f8f6ff 0%, #f1eef9 100%);
}

.skills-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 30px;
}

.skill-item {
  position: relative;
  background:
    linear-gradient(180deg, #ffffff 0%, #f8f4ff 100%) padding-box,
    linear-gradient(135deg, rgba(107, 98, 166, 0.5), rgba(53, 51, 83, 0.3)) border-box;
  border: 1px solid transparent;
  padding: 25px 30px;
  border-radius: 10px;
  box-shadow: 0 2px 15px rgba(0, 0, 0, 0.05);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.skill-item:hover {
  transform: translateY(-4px) rotate(-0.2deg);
  box-shadow: 0 10px 25px rgba(53, 51, 83, 0.12);
}

.skill-header {
  display: flex;
  justify-content: space-between;
  margin-bottom: 10px;
}

.skill-name {
  font-size: 0.95rem;
  font-weight: 500;
  color: #333;
}

.skill-percent {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--purple-700);
}

.skill-bar {
  width: 100%;
  height: 8px;
  background: linear-gradient(90deg, #eee8f9, #f4f0ff);
  border-radius: 10px;
  overflow: hidden;
}

.skill-bar-fill {
  height: 100%;
  border-radius: 10px;
  background: linear-gradient(90deg, #2b2744, #6b62a6, #8a7bd6);
  box-shadow: 0 0 12px rgba(107, 98, 166, 0.45);
  width: 0;
  transition: width 1.5s ease;
}

/* ===== Passions ===== */
.passions {
  background:
    radial-gradient(circle at 85% 70%, rgba(107, 98, 166, 0.12), transparent 45%),
    linear-gradient(180deg, #ffffff 0%, #f7f3ff 100%);
}

.passions-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 30px;
}

.passion-card {
  text-align: center;
  padding: 40px 25px;
  border-radius: 12px;
  background:
    linear-gradient(180deg, #ffffff 0%, #f8f4ff 100%) padding-box,
    linear-gradient(135deg, rgba(107, 98, 166, 0.45), rgba(53, 51, 83, 0.2)) border-box;
  border: 1px solid transparent;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.06);
  transition: all 0.3s ease;
}

.passion-card:hover {
  transform: translateY(-8px) rotate(0.3deg);
  box-shadow: 0 12px 35px rgba(53, 51, 83, 0.15);
}

.passion-icon {
  width: 70px;
  height: 70px;
  margin: 0 auto 20px;
  filter: drop-shadow(0 10px 16px rgba(53, 51, 83, 0.18));
  transform: rotate(-2deg);
  transition: transform 0.3s ease;
}

.passion-icon img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.passion-card:hover .passion-icon {
  transform: rotate(3deg) scale(1.05);
}

.passion-card h3 {
  font-size: 1.1rem;
  font-weight: 600;
  margin-bottom: 12px;
  color: var(--purple-700);
}

.passion-card p {
  font-size: 0.88rem;
  color: #666;
  line-height: 1.7;
}

/* ===== Experience ===== */
.experience {
  background:
    radial-gradient(circle at 12% 75%, rgba(138, 123, 214, 0.12), transparent 45%),
    linear-gradient(180deg, #f7f4ff 0%, #efeaf8 100%);
}

.timeline {
  position: relative;
  max-width: 800px;
  margin: 0 auto;
}

.timeline::before {
  content: '';
  position: absolute;
  left: 50%;
  top: 0;
  bottom: 0;
  width: 3px;
  background: linear-gradient(180deg, #dcd4f0, #bfb3e8);
  transform: translateX(-50%);
}

.timeline-item {
  position: relative;
  width: 50%;
  padding: 20px 40px;
  opacity: 0;
  transform: translateY(30px);
  transition: all 0.6s ease;
}

.timeline-item.visible {
  opacity: 1;
  transform: translateY(0);
}

.timeline-item:nth-child(odd) {
  left: 0;
  text-align: right;
}

.timeline-item:nth-child(even) {
  left: 50%;
  text-align: left;
}

.timeline-item::before {
  content: '';
  position: absolute;
  top: 30px;
  width: 16px;
  height: 16px;
  background: linear-gradient(135deg, #2b2744, #6b62a6);
  border: 3px solid #fff;
  border-radius: 50%;
  box-shadow: 0 2px 8px rgba(53, 51, 83, 0.3);
  z-index: 1;
}

.timeline-item:nth-child(odd)::before {
  right: -8px;
}

.timeline-item:nth-child(even)::before {
  left: -8px;
}

.timeline-content {
  background:
    linear-gradient(180deg, #ffffff 0%, #f8f4ff 100%) padding-box,
    linear-gradient(135deg, rgba(107, 98, 166, 0.35), rgba(53, 51, 83, 0.2)) border-box;
  border: 1px solid transparent;
  padding: 25px;
  border-radius: 10px;
  box-shadow: 0 2px 15px rgba(0, 0, 0, 0.06);
  transition: all 0.3s;
}

.timeline-content:hover {
  box-shadow: 0 10px 25px rgba(53, 51, 83, 0.14);
}

.timeline-date {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--purple-700);
  margin-bottom: 5px;
}

.timeline-title {
  font-size: 1.05rem;
  font-weight: 600;
  color: #131313;
  margin-bottom: 5px;
}

.timeline-subtitle {
  font-size: 0.9rem;
  color: #666;
}

/* ===== Footer ===== */
.footer {
  text-align: center;
  padding: 30px 20px;
  background: linear-gradient(135deg, #161424, #0f0e18);
  color: #aaa;
  font-size: 0.85rem;
}

.footer a {
  color: #dcd4f0;
}

/* ===== Animations ===== */
@keyframes fadeInDown {
  from {
    opacity: 0;
    transform: translateY(-30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

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

@keyframes bounce {
  0%, 20%, 50%, 80%, 100% {
    transform: translateY(0);
  }
  40% {
    transform: translateY(-10px);
  }
  60% {
    transform: translateY(-5px);
  }
}

@keyframes floaty {
  0% {
    transform: translate(0, 0) rotate(0deg);
  }
  50% {
    transform: translate(18px, -14px) rotate(8deg);
  }
  100% {
    transform: translate(0, 0) rotate(0deg);
  }
}

/* Scroll-triggered animations */
.fade-in {
  opacity: 0;
  transform: translateY(30px);
  transition: all 0.8s ease;
}

.fade-in.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ===== Responsive ===== */
@media (max-width: 1024px) {
  .passions-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 768px) {
  /* Sidebar becomes an overlay */
  .sidebar {
    transform: translateX(-100%);
  }

  .sidebar.open {
    transform: translateX(0);
  }

  .sidebar-overlay.visible {
    display: block;
    opacity: 1;
  }

  .menu-toggle {
    display: flex;
  }

  .main-content {
    margin-left: 0;
  }

  .hero {
    padding: 80px 20px 60px;
  }

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

  .hero .subtitle {
    font-size: 1rem;
  }

  .about-content {
    flex-direction: column;
    text-align: center;
  }

  .about-image {
    width: 180px;
    height: 180px;
  }

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

  .passions-grid {
    grid-template-columns: 1fr;
    max-width: 400px;
    margin: 0 auto;
  }

  .timeline::before {
    left: 20px;
  }

  .timeline-item {
    width: 100%;
    left: 0 !important;
    text-align: left !important;
    padding-left: 50px;
    padding-right: 20px;
  }

  .timeline-item::before {
    left: 12px !important;
    right: auto !important;
  }
}

@media (max-width: 480px) {
  .hero h1 {
    font-size: 1.8rem;
  }

  .hero-avatar {
    width: 120px;
    height: 120px;
  }

  .section-title {
    font-size: 1.8rem;
  }
}
