/* ===== DESIGN TOKENS ===== */
:root {
  /* Color Palette */
  --primary: #6c63ff;
  --primary-dark: #5a52d5;
  --primary-light: #8b85ff;
  --accent: #00d4aa;
  --accent-dark: #00b894;

  --bg-dark: #0f0f1a;
  --bg-card: #1a1a2e;
  --bg-card-hover: #222240;
  --bg-hero: linear-gradient(135deg, #0f0f1a 0%, #1a1a2e 50%, #16213e 100%);

  --text-primary: #e8e8f0;
  --text-secondary: #a0a0b8;
  --text-muted: #6c6c80;
  --text-heading: #ffffff;

  --border-color: rgba(108, 99, 255, 0.15);
  --border-glow: rgba(108, 99, 255, 0.4);

  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.3);
  --shadow-md: 0 4px 20px rgba(0, 0, 0, 0.4);
  --shadow-lg: 0 8px 40px rgba(0, 0, 0, 0.5);
  --shadow-glow: 0 0 30px rgba(108, 99, 255, 0.15);

  /* Typography */
  --font-main: 'Inter', sans-serif;
  --font-heading: 'Outfit', sans-serif;
  --font-mono: 'JetBrains Mono', monospace;

  /* Spacing */
  --section-gap: 5rem;

  /* Transitions */
  --transition-fast: 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-smooth: 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-bounce: 0.5s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

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

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

body {
  font-family: var(--font-main);
  background: var(--bg-dark);
  color: var(--text-primary);
  line-height: 1.7;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

a {
  color: var(--primary-light);
  text-decoration: none;
  transition: color var(--transition-fast);
}

a:hover {
  color: var(--accent);
}

ul {
  list-style: none;
}

/* ===== ANIMATED BACKGROUND ===== */
.bg-particles {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  pointer-events: none;
  overflow: hidden;
}

.bg-particles .orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(80px);
  opacity: 0.12;
  animation: float 20s ease-in-out infinite;
}

.bg-particles .orb:nth-child(1) {
  width: 500px;
  height: 500px;
  background: var(--primary);
  top: -10%;
  right: -10%;
  animation-delay: 0s;
}

.bg-particles .orb:nth-child(2) {
  width: 400px;
  height: 400px;
  background: var(--accent);
  bottom: -5%;
  left: -5%;
  animation-delay: -7s;
}

.bg-particles .orb:nth-child(3) {
  width: 300px;
  height: 300px;
  background: #ff6b6b;
  top: 50%;
  left: 50%;
  animation-delay: -14s;
}

@keyframes float {
  0%, 100% { transform: translate(0, 0) scale(1); }
  25% { transform: translate(50px, -50px) scale(1.1); }
  50% { transform: translate(-30px, 30px) scale(0.95); }
  75% { transform: translate(20px, 60px) scale(1.05); }
}

/* ===== NAVIGATION ===== */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 1000;
  padding: 1rem 2rem;
  transition: all var(--transition-smooth);
  backdrop-filter: blur(0px);
}

.navbar.scrolled {
  background: rgba(15, 15, 26, 0.85);
  backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border-color);
  padding: 0.6rem 2rem;
}

.navbar .nav-inner {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.navbar .logo {
  font-family: var(--font-heading);
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--text-heading);
  letter-spacing: -0.5px;
}

.navbar .logo span {
  color: var(--primary-light);
}

.nav-links {
  display: flex;
  gap: 2rem;
}

.nav-links a {
  color: var(--text-secondary);
  font-size: 0.9rem;
  font-weight: 500;
  position: relative;
  padding: 0.3rem 0;
}

.nav-links a::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--primary-light);
  transition: width var(--transition-smooth);
}

.nav-links a:hover {
  color: var(--text-heading);
}

.nav-links a:hover::after {
  width: 100%;
}

.nav-hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
  padding: 5px;
  background: none;
  border: none;
}

.nav-hamburger span {
  display: block;
  width: 25px;
  height: 2px;
  background: var(--text-primary);
  transition: all var(--transition-fast);
  border-radius: 2px;
}

/* ===== HERO SECTION ===== */
.hero {
  position: relative;
  z-index: 1;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 8rem 2rem 4rem;
}

.hero-content {
  max-width: 1200px;
  width: 100%;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
  align-items: center;
}

.hero-text {
  animation: fadeInUp 0.8s ease-out;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: rgba(108, 99, 255, 0.1);
  border: 1px solid var(--border-color);
  border-radius: 50px;
  padding: 0.4rem 1rem;
  font-size: 0.85rem;
  color: var(--primary-light);
  margin-bottom: 1.5rem;
}

.hero-badge .dot {
  width: 8px;
  height: 8px;
  background: var(--accent);
  border-radius: 50%;
  animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.5; transform: scale(0.8); }
}

.hero h1 {
  font-family: var(--font-heading);
  font-size: 3.5rem;
  font-weight: 800;
  line-height: 1.1;
  color: var(--text-heading);
  margin-bottom: 0.5rem;
  letter-spacing: -1.5px;
}

.hero h1 .gradient-text {
  background: linear-gradient(135deg, var(--primary-light), var(--accent));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero .subtitle {
  font-family: var(--font-heading);
  font-size: 1.3rem;
  color: var(--text-secondary);
  font-weight: 400;
  margin-bottom: 1.5rem;
  letter-spacing: 2px;
  text-transform: uppercase;
}

.hero .description {
  font-size: 1.05rem;
  color: var(--text-secondary);
  max-width: 500px;
  margin-bottom: 2rem;
}

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

.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.8rem 1.8rem;
  border-radius: 12px;
  font-size: 0.95rem;
  font-weight: 600;
  border: none;
  cursor: pointer;
  transition: all var(--transition-smooth);
  font-family: var(--font-main);
}

.btn-primary {
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  color: white;
  box-shadow: 0 4px 15px rgba(108, 99, 255, 0.3);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 25px rgba(108, 99, 255, 0.45);
  color: white;
}

.btn-outline {
  background: transparent;
  color: var(--text-primary);
  border: 1px solid var(--border-color);
}

.btn-outline:hover {
  border-color: var(--primary-light);
  background: rgba(108, 99, 255, 0.08);
  transform: translateY(-2px);
  color: var(--text-heading);
}

/* Hero Image */
.hero-image {
  display: flex;
  justify-content: center;
  animation: fadeInUp 0.8s ease-out 0.2s both;
}

.hero-image-wrapper {
  position: relative;
  width: 340px;
  height: 340px;
}

.hero-image-wrapper::before {
  content: '';
  position: absolute;
  inset: -4px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--primary), var(--accent), var(--primary));
  background-size: 300% 300%;
  animation: gradientRotate 4s ease infinite;
  z-index: 0;
}

@keyframes gradientRotate {
  0% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

.hero-image-wrapper img {
  position: relative;
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
  z-index: 1;
  border: 4px solid var(--bg-dark);
}

/* Floating cards around the profile */
.float-card {
  position: absolute;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  padding: 0.6rem 1rem;
  font-size: 0.8rem;
  color: var(--text-primary);
  z-index: 2;
  box-shadow: var(--shadow-md);
  white-space: nowrap;
  animation: floatCard 6s ease-in-out infinite;
}

.float-card-1 {
  top: 10%;
  right: -30px;
  animation-delay: 0s;
}

.float-card-2 {
  bottom: 15%;
  left: -40px;
  animation-delay: -2s;
}

.float-card-3 {
  bottom: 0;
  right: -20px;
  animation-delay: -4s;
}

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

/* ===== SECTIONS ===== */
.section {
  position: relative;
  z-index: 1;
  padding: var(--section-gap) 2rem;
}

.section-inner {
  max-width: 1100px;
  margin: 0 auto;
}

.section-header {
  margin-bottom: 3rem;
}

.section-label {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: var(--primary-light);
  text-transform: uppercase;
  letter-spacing: 3px;
  margin-bottom: 0.5rem;
}

.section-title {
  font-family: var(--font-heading);
  font-size: 2.2rem;
  font-weight: 700;
  color: var(--text-heading);
  letter-spacing: -0.5px;
}

.section-divider {
  width: 60px;
  height: 3px;
  background: linear-gradient(90deg, var(--primary), var(--accent));
  border-radius: 2px;
  margin-top: 0.8rem;
}

/* ===== ABOUT / PROFILE ===== */
.about-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
}

.about-text p {
  margin-bottom: 1rem;
  color: var(--text-secondary);
  font-size: 1.05rem;
}

.about-details {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.2rem;
}

.detail-item {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 14px;
  padding: 1.2rem;
  transition: all var(--transition-smooth);
}

.detail-item:hover {
  border-color: var(--border-glow);
  box-shadow: var(--shadow-glow);
  transform: translateY(-2px);
}

.detail-item .detail-icon {
  font-size: 1.5rem;
  margin-bottom: 0.5rem;
}

.detail-item .detail-label {
  font-size: 0.75rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 0.2rem;
}

.detail-item .detail-value {
  font-size: 0.95rem;
  color: var(--text-heading);
  font-weight: 500;
}

.detail-item .detail-value a {
  color: var(--text-heading);
}

.detail-item .detail-value a:hover {
  color: var(--primary-light);
}

/* ===== SKILLS ===== */
.skills-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 1.5rem;
}

.skill-category {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 16px;
  padding: 1.8rem;
  transition: all var(--transition-smooth);
}

.skill-category:hover {
  border-color: var(--border-glow);
  box-shadow: var(--shadow-glow);
  transform: translateY(-3px);
}

.skill-category-header {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  margin-bottom: 1.2rem;
}

.skill-category-icon {
  width: 42px;
  height: 42px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.3rem;
}

.skill-category-title {
  font-family: var(--font-heading);
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--text-heading);
}

.skill-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.skill-tag {
  background: rgba(108, 99, 255, 0.08);
  border: 1px solid rgba(108, 99, 255, 0.15);
  color: var(--text-primary);
  padding: 0.35rem 0.85rem;
  border-radius: 8px;
  font-size: 0.85rem;
  transition: all var(--transition-fast);
}

.skill-tag:hover {
  background: rgba(108, 99, 255, 0.15);
  border-color: var(--primary-light);
  color: var(--text-heading);
  transform: translateY(-1px);
}

/* Skill icon bg colors */
.icon-backend { background: rgba(108, 99, 255, 0.15); }
.icon-frontend { background: rgba(0, 212, 170, 0.15); }
.icon-cloud { background: rgba(255, 107, 107, 0.15); }
.icon-database { background: rgba(255, 193, 7, 0.15); }
.icon-mobile { background: rgba(156, 39, 176, 0.15); }
.icon-tools { background: rgba(0, 188, 212, 0.15); }

/* ===== EXPERIENCE TIMELINE ===== */
.timeline {
  position: relative;
  padding-left: 3rem;
}

.timeline::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 2px;
  background: linear-gradient(180deg, var(--primary), var(--accent), transparent);
}

.timeline-item {
  position: relative;
  margin-bottom: 3rem;
  padding-bottom: 1rem;
}

.timeline-item:last-child {
  margin-bottom: 0;
}

.timeline-dot {
  position: absolute;
  left: -3rem;
  top: 0.4rem;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: var(--primary);
  border: 3px solid var(--bg-dark);
  box-shadow: 0 0 0 3px rgba(108, 99, 255, 0.3);
  transform: translateX(-6px);
}

.timeline-item:first-child .timeline-dot {
  background: var(--accent);
  box-shadow: 0 0 0 3px rgba(0, 212, 170, 0.3);
}

.timeline-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 16px;
  padding: 1.8rem;
  transition: all var(--transition-smooth);
}

.timeline-card:hover {
  border-color: var(--border-glow);
  box-shadow: var(--shadow-glow);
  transform: translateX(5px);
}

.timeline-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 0.8rem;
}

.timeline-role {
  font-family: var(--font-heading);
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--text-heading);
}

.timeline-meta {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 0.2rem;
}

.timeline-date {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: var(--primary-light);
  background: rgba(108, 99, 255, 0.1);
  padding: 0.2rem 0.7rem;
  border-radius: 6px;
}

.timeline-duration {
  font-size: 0.75rem;
  color: var(--text-muted);
}

.timeline-company {
  font-size: 1rem;
  color: var(--accent);
  font-weight: 500;
  margin-bottom: 1rem;
}

.timeline-tasks {
  list-style: none;
  padding: 0;
}

.timeline-tasks li {
  position: relative;
  padding-left: 1.3rem;
  margin-bottom: 0.6rem;
  font-size: 0.93rem;
  color: var(--text-secondary);
  line-height: 1.6;
}

.timeline-tasks li::before {
  content: '▹';
  position: absolute;
  left: 0;
  color: var(--primary-light);
  font-size: 1rem;
}

/* ===== EDUCATION ===== */
.education-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 16px;
  padding: 2rem;
  max-width: 600px;
  transition: all var(--transition-smooth);
}

.education-card:hover {
  border-color: var(--border-glow);
  box-shadow: var(--shadow-glow);
}

.education-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  margin-bottom: 0.5rem;
}

.education-degree {
  font-family: var(--font-heading);
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--text-heading);
}

.education-year {
  font-family: var(--font-mono);
  font-size: 0.85rem;
  color: var(--primary-light);
  background: rgba(108, 99, 255, 0.1);
  padding: 0.2rem 0.7rem;
  border-radius: 6px;
}

.education-school {
  color: var(--accent);
  font-weight: 500;
  margin-bottom: 0.3rem;
}

.education-subtitle {
  color: var(--text-muted);
  font-size: 0.9rem;
  margin-bottom: 1rem;
}

.education-topics {
  list-style: none;
  padding: 0;
}

.education-topics li {
  position: relative;
  padding-left: 1.3rem;
  margin-bottom: 0.4rem;
  font-size: 0.93rem;
  color: var(--text-secondary);
}

.education-topics li::before {
  content: '▹';
  position: absolute;
  left: 0;
  color: var(--primary-light);
}

/* ===== LANGUAGES ===== */
.languages-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1.5rem;
  max-width: 700px;
}

.language-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 14px;
  padding: 1.5rem;
  text-align: center;
  transition: all var(--transition-smooth);
}

.language-card:hover {
  border-color: var(--border-glow);
  box-shadow: var(--shadow-glow);
  transform: translateY(-3px);
}

.language-name {
  font-family: var(--font-heading);
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--text-heading);
  margin-bottom: 0.8rem;
}

.language-dots {
  display: flex;
  justify-content: center;
  gap: 0.4rem;
  margin-bottom: 0.5rem;
}

.language-dots .dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: rgba(108, 99, 255, 0.15);
  border: 1px solid rgba(108, 99, 255, 0.25);
  transition: all var(--transition-fast);
}

.language-dots .dot.filled {
  background: var(--primary-light);
  border-color: var(--primary-light);
  box-shadow: 0 0 8px rgba(108, 99, 255, 0.4);
}

.language-level {
  font-size: 0.8rem;
  color: var(--text-muted);
}

/* ===== CONTACT / FOOTER ===== */
.contact-section {
  text-align: center;
}

.contact-section .section-header {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.contact-text {
  font-size: 1.1rem;
  color: var(--text-secondary);
  max-width: 500px;
  margin: 0 auto 2.5rem;
}

.contact-links {
  display: flex;
  justify-content: center;
  gap: 1.5rem;
  flex-wrap: wrap;
}

.contact-card {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 14px;
  padding: 1rem 1.5rem;
  transition: all var(--transition-smooth);
  color: var(--text-primary);
}

.contact-card:hover {
  border-color: var(--border-glow);
  box-shadow: var(--shadow-glow);
  transform: translateY(-3px);
  color: var(--text-heading);
}

.contact-card-icon {
  font-size: 1.4rem;
}

.contact-card-label {
  font-size: 0.75rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 1px;
}

.contact-card-value {
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--text-heading);
}

/* Footer */
.footer {
  position: relative;
  z-index: 1;
  text-align: center;
  padding: 2rem;
  border-top: 1px solid var(--border-color);
  color: var(--text-muted);
  font-size: 0.85rem;
}

.footer span {
  color: var(--primary-light);
}

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

.animate-on-scroll {
  opacity: 0;
  transform: translateY(30px);
  transition: all 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.animate-on-scroll.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ===== RESPONSIVE ===== */
@media (max-width: 900px) {
  .hero-content {
    grid-template-columns: 1fr;
    text-align: center;
    gap: 3rem;
  }

  .hero-text {
    order: 2;
  }

  .hero-image {
    order: 1;
  }

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

  .hero .description {
    margin: 0 auto 2rem;
  }

  .hero-actions {
    justify-content: center;
  }

  .hero-image-wrapper {
    width: 260px;
    height: 260px;
  }

  .float-card {
    display: none;
  }

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

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

  .timeline {
    padding-left: 2rem;
  }

  .timeline-header {
    flex-direction: column;
    align-items: flex-start;
  }

  .timeline-meta {
    align-items: flex-start;
  }
}

@media (max-width: 600px) {
  .nav-links {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    background: rgba(15, 15, 26, 0.97);
    backdrop-filter: blur(20px);
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 2rem;
    z-index: 999;
  }

  .nav-links.open {
    display: flex;
  }

  .nav-links a {
    font-size: 1.2rem;
  }

  .nav-hamburger {
    display: flex;
    z-index: 1001;
  }

  .nav-hamburger.open span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
  }

  .nav-hamburger.open span:nth-child(2) {
    opacity: 0;
  }

  .nav-hamburger.open span:nth-child(3) {
    transform: rotate(-45deg) translate(5px, -5px);
  }

  .hero {
    padding: 6rem 1.2rem 3rem;
  }

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

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

  .section {
    padding: 3rem 1.2rem;
  }

  .about-details {
    grid-template-columns: 1fr;
  }

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

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

  .contact-links {
    flex-direction: column;
    align-items: center;
  }

  .timeline-card {
    padding: 1.3rem;
  }
}

/* ===== SCROLLBAR ===== */
::-webkit-scrollbar {
  width: 8px;
}

::-webkit-scrollbar-track {
  background: var(--bg-dark);
}

::-webkit-scrollbar-thumb {
  background: var(--bg-card-hover);
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: var(--primary);
}
