/* Enhanced Global Styles */
:root {
  --primary-color: #6200ea;
  --secondary-color: #03dac6;
  --accent-color: #ff0266;
  --text-color: #333;
  --background-color: #f8f9fa;
  --card-color: #fff;
  --border-color: #e1e8ed;
  --success-color: #00c853;
  --gradient-start: #6200ea;
  --gradient-end: #03dac6;
  --primary-color-rgb: 98, 0, 234;
  --secondary-color-rgb: 3, 218, 198;
  --accent-color-rgb: 255, 2, 102;
}

.dark-theme {
  --primary-color: #bb86fc;
  --secondary-color: #03dac6;
  --accent-color: #cf6679;
  --text-color: #f5f5f5;
  --background-color: #121212;
  --card-color: #1e1e1e;
  --border-color: #333;
  --success-color: #00c853;
  --gradient-start: #bb86fc;
  --gradient-end: #03dac6;
  --primary-color-rgb: 187, 134, 252;
  --secondary-color-rgb: 3, 218, 198;
  --accent-color-rgb: 207, 102, 121;
}

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

body {
  font-family: 'Poppins', 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  color: var(--text-color);
  background-color: var(--background-color);
  line-height: 1.6;
  transition: background-color 0.3s ease, color 0.3s ease;
  overflow-x: hidden;
}

a {
  color: var(--primary-color);
  text-decoration: none;
  transition: all 0.3s ease;
  position: relative;
}

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

a::after {
  content: '';
  position: absolute;
  width: 100%;
  transform: scaleX(0);
  height: 2px;
  bottom: -2px;
  left: 0;
  background: linear-gradient(90deg, var(--primary-color), var(--secondary-color));
  transform-origin: bottom right;
  transition: transform 0.3s ease-out;
}

a:hover::after {
  transform: scaleX(1);
  transform-origin: bottom left;
}

/* Particles Background */
#particles-js {
  position: fixed;
  width: 100%;
  height: 100%;
  top: 0;
  left: 0;
  z-index: -1;
  opacity: 0.6;
}

/* Theme Toggle */
.theme-toggle {
  position: fixed;
  top: 20px;
  right: 20px;
  background: linear-gradient(135deg, var(--gradient-start), var(--gradient-end));
  border-radius: 50%;
  width: 50px;
  height: 50px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: 0 4px 20px rgba(var(--primary-color-rgb), 0.3);
  z-index: 100;
  transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275), box-shadow 0.3s ease;
}

.theme-toggle:hover {
  transform: scale(1.1) rotate(15deg);
  box-shadow: 0 6px 25px rgba(var(--primary-color-rgb), 0.5);
}

.theme-toggle i {
  font-size: 24px;
  color: white;
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.2));
}

/* Header Styles */
header {
  max-width: 1000px;
  margin: 0 auto;
  padding: 20px;
  position: relative;
}

.profile-banner {
  position: relative;
  height: 250px;
  border-radius: 20px;
  overflow: hidden;
  margin-bottom: 70px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
  transform-style: preserve-3d;
  transition: transform 0.5s ease;
}

.profile-banner:hover {
  transform: perspective(1000px) rotateX(5deg);
}

.banner-image {
  width: 100%;
  height: 100%;
  background-image: url('../images/profile_banner.jpg');
  background-size: cover;
  background-position: center;
  filter: brightness(0.9);
  transition: transform 0.5s ease;
}

.profile-banner:hover .banner-image {
  transform: scale(1.05);
}

.profile-banner::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, rgba(var(--primary-color-rgb), 0.3), rgba(var(--secondary-color-rgb), 0.3));
  z-index: 1;
  opacity: 0;
  transition: opacity 0.5s ease;
}

.profile-banner:hover::before {
  opacity: 1;
}

.profile-image {
  position: absolute;
  bottom: -60px;
  left: 30px;
  width: 120px;
  height: 120px;
  z-index: 2;
  transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.profile-banner:hover .profile-image {
  transform: scale(1.1) translateY(-10px);
}

.profile-pic {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  border: 5px solid var(--card-color);
  background-image: url('https://api.dicebear.com/6.x/micah/svg?seed=peakji');
  background-size: cover;
  background-position: center;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

.verified-badge {
  position: absolute;
  bottom: 0;
  right: 0;
  background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
  color: white;
  border-radius: 50%;
  width: 30px;
  height: 30px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 3px solid var(--card-color);
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0% {
    box-shadow: 0 0 0 0 rgba(var(--primary-color-rgb), 0.7);
  }
  70% {
    box-shadow: 0 0 0 10px rgba(var(--primary-color-rgb), 0);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(var(--primary-color-rgb), 0);
  }
}

.profile-info {
  padding-left: 160px;
  position: relative;
}

.profile-info h1 {
  font-size: 32px;
  margin-bottom: 5px;
  background: linear-gradient(90deg, var(--primary-color), var(--secondary-color));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  display: inline-block;
}

.username {
  color: var(--secondary-color);
  margin-bottom: 10px;
  font-size: 18px;
  font-weight: 500;
}

.bio {
  margin-bottom: 15px;
  font-size: 16px;
  line-height: 1.6;
  max-width: 600px;
}

.join-date {
  color: var(--secondary-color);
  font-size: 14px;
  margin-bottom: 20px;
  display: flex;
  align-items: center;
}

.join-date i {
  margin-right: 8px;
  color: var(--accent-color);
}

.stats {
  display: flex;
  gap: 30px;
  margin-top: 20px;
}

.stat {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 15px 20px;
  background-color: var(--card-color);
  border-radius: 15px;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.stat:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
}

.count {
  font-weight: bold;
  font-size: 24px;
  color: var(--primary-color);
}

.label {
  color: var(--secondary-color);
  font-size: 14px;
  font-weight: 500;
}

/* Navigation */
nav {
  max-width: 1000px;
  margin: 30px auto;
  border-radius: 50px;
  overflow: hidden;
  background-color: var(--card-color);
  box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
}

nav ul {
  display: flex;
  list-style: none;
}

nav li {
  flex: 1;
  text-align: center;
}

nav a {
  display: block;
  padding: 18px 0;
  color: var(--text-color);
  font-weight: 600;
  position: relative;
  transition: all 0.3s ease;
  z-index: 1;
}

nav a::after {
  display: none;
}

nav a::before {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 0;
  background: linear-gradient(135deg, var(--gradient-start), var(--gradient-end));
  z-index: -1;
  transition: height 0.3s ease;
}

nav a:hover {
  color: white;
}

nav a:hover::before {
  height: 100%;
}

nav li.active a {
  color: white;
}

nav li.active a::before {
  height: 100%;
}

/* Main Content */
main {
  max-width: 1000px;
  margin: 0 auto;
  padding: 20px;
}

section {
  display: none;
  animation: fadeIn 0.8s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

section.active-section {
  display: block;
}

.section-content {
  background-color: var(--card-color);
  border-radius: 20px;
  padding: 40px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.05);
  margin-bottom: 40px;
  position: relative;
  overflow: hidden;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.section-content:hover {
  transform: translateY(-5px);
  box-shadow: 0 15px 40px rgba(0, 0, 0, 0.1);
}

.section-content::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 5px;
  background: linear-gradient(90deg, var(--primary-color), var(--secondary-color));
}

h2 {
  margin-bottom: 25px;
  color: var(--primary-color);
  font-size: 28px;
  position: relative;
  display: inline-block;
}

h2::after {
  content: '';
  position: absolute;
  bottom: -5px;
  left: 0;
  width: 50px;
  height: 3px;
  background: linear-gradient(90deg, var(--primary-color), var(--secondary-color));
  transition: width 0.3s ease;
}

.section-content:hover h2::after {
  width: 100%;
}

h3 {
  margin: 30px 0 20px;
  color: var(--secondary-color);
  font-size: 22px;
}

/* Latest Post */
.latest-post {
  border-left: 5px solid var(--primary-color);
  padding-left: 20px;
  margin: 30px 0;
  position: relative;
  background-color: rgba(var(--primary-color-rgb), 0.05);
  border-radius: 0 10px 10px 0;
  padding: 20px 25px;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.latest-post:hover {
  transform: translateX(5px);
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.post-content {
  font-weight: bold;
  margin-bottom: 10px;
  font-size: 18px;
  color: var(--primary-color);
}

.post-detail {
  color: var(--secondary-color);
  font-size: 15px;
  line-height: 1.6;
}

/* Interactive Element */
.game-container {
  margin-top: 30px;
  border-radius: 15px;
  overflow: hidden;
  background-color: rgba(var(--primary-color-rgb), 0.05);
  box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.game-container:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
}

.game-board {
  height: 300px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  position: relative;
  overflow: hidden;
  background: linear-gradient(135deg, rgba(var(--primary-color-rgb), 0.1), rgba(var(--secondary-color-rgb), 0.1));
}

.game-message {
  font-weight: bold;
  color: var(--primary-color);
  text-align: center;
  padding: 15px 25px;
  border-radius: 50px;
  background-color: rgba(255, 255, 255, 0.9);
  z-index: 2;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.game-board:hover .game-message {
  transform: scale(1.05);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15);
}

/* New Interactive Elements */
.interactive-elements {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
  margin-top: 30px;
}

.interactive-card {
  background-color: var(--card-color);
  border-radius: 15px;
  padding: 25px;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  position: relative;
  overflow: hidden;
  min-height: 200px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  cursor: pointer;
}

.interactive-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
}

.interactive-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 5px;
  background: linear-gradient(90deg, var(--primary-color), var(--secondary-color));
}

.interactive-card h4 {
  margin-bottom: 15px;
  color: var(--primary-color);
  font-size: 18px;
  text-align: center;
}

.interactive-card p {
  color: var(--secondary-color);
  font-size: 14px;
  text-align: center;
  margin-bottom: 20px;
}

.interactive-card .icon {
  font-size: 40px;
  margin-bottom: 15px;
  color: var(--accent-color);
  transition: transform 0.3s ease, color 0.3s ease;
}

.interactive-card:hover .icon {
  transform: scale(1.2);
  color: var(--primary-color);
}

/* Skills */
.skill-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 10px;
}

.skill-tag {
  background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
  color: white;
  padding: 8px 16px;
  border-radius: 50px;
  font-size: 14px;
  font-weight: 500;
  box-shadow: 0 3px 10px rgba(0, 0, 0, 0.1);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.skill-tag:hover {
  transform: translateY(-3px) scale(1.05);
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.15);
}

/* Timeline */
.timeline {
  position: relative;
  max-width: 1200px;
  margin: 40px auto;
}

.timeline::after {
  content: '';
  position: absolute;
  width: 6px;
  background: linear-gradient(to bottom, var(--primary-color), var(--secondary-color));
  top: 0;
  bottom: 0;
  left: 50%;
  margin-left: -3px;
  border-radius: 10px;
}

.timeline-container {
  padding: 10px 40px;
  position: relative;
  background-color: inherit;
  width: 50%;
}

.timeline-container::after {
  content: '';
  position: absolute;
  width: 25px;
  height: 25px;
  right: -13px;
  background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
  border: 4px solid var(--card-color);
  top: 15px;
  border-radius: 50%;
  z-index: 1;
  box-shadow: 0 3px 10px rgba(0, 0, 0, 0.2);
}

.left {
  left: 0;
}

.right {
  left: 50%;
}

.right::after {
  left: -13px;
}

.timeline-content {
  padding: 20px 30px;
  background-color: var(--card-color);
  position: relative;
  border-radius: 15px;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.timeline-content:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
}

.timeline-date {
  color: var(--accent-color);
  font-weight: bold;
  margin-bottom: 10px;
  font-size: 16px;
}

.timeline-title {
  color: var(--primary-color);
  margin-bottom: 10px;
  font-size: 18px;
}

.timeline-text {
  line-height: 1.6;
}

/* Project Card */
.project-card {
  border: none;
  border-radius: 20px;
  padding: 30px;
  margin-bottom: 30px;
  transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275), box-shadow 0.3s ease;
  background-color: var(--card-color);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.05);
  position: relative;
  overflow: hidden;
}

.project-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 5px;
  height: 100%;
  background: linear-gradient(to bottom, var(--primary-color), var(--secondary-color));
}

.project-card:hover {
  transform: translateY(-10px) scale(1.02);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
}

.project-card h3 {
  font-size: 24px;
  margin-bottom: 15px;
  color: var(--primary-color);
}

.project-card p {
  margin-bottom: 20px;
  line-height: 1.7;
}

.project-details {
  margin: 20px 0;
  padding: 20px;
  background-color: rgba(var(--primary-color-rgb), 0.05);
  border-radius: 10px;
}

.project-details p {
  margin-bottom: 10px;
  font-weight: 500;
  color: var(--secondary-color);
}

.project-details ul {
  margin-left: 25px;
  margin-top: 10px;
}

.project-details li {
  margin-bottom: 8px;
  position: relative;
}

.project-details li::before {
  content: '✓';
  color: var(--success-color);
  position: absolute;
  left: -20px;
  font-weight: bold;
}

.project-link {
  display: inline-block;
  background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
  color: white;
  padding: 12px 25px;
  border-radius: 50px;
  margin-top: 15px;
  font-weight: 600;
  box-shadow: 0 5px 15px rgba(var(--primary-color-rgb), 0.3);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.project-link:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 20px rgba(var(--primary-color-rgb), 0.5);
  color: white;
  text-decoration: none;
}

.project-link::after {
  display: none;
}

/* Footer */
footer {
  max-width: 1000px;
  margin: 50px auto 0;
  padding: 40px 20px;
  text-align: center;
  position: relative;
}

footer::before {
  content: '';
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 200px;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--primary-color), transparent);
}

.social-links {
  margin-bottom: 25px;
}

.social-links a {
  display: inline-block;
  margin: 0 15px;
  font-size: 28px;
  color: var(--primary-color);
  transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275), color 0.3s ease;
  position: relative;
}

.social-links a::after {
  display: none;
}

.social-links a::before {
  content: '';
  position: absolute;
  width: 100%;
  height: 100%;
  background-color: rgba(var(--primary-color-rgb), 0.1);
  border-radius: 50%;
  top: 0;
  left: 0;
  transform: scale(0);
  transition: transform 0.3s ease;
  z-index: -1;
}

.social-links a:hover {
  transform: scale(1.2) rotate(5deg);
  color: var(--accent-color);
}

.social-links a:hover::before {
  transform: scale(1.5);
}

footer p {
  font-size: 14px;
  color: var(--secondary-color);
  max-width: 600px;
  margin: 0 auto;
}

/* Animations */
@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

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

/* Typing Animation */
.typing-animation {
  display: inline-block;
  position: relative;
}

.typing-animation::after {
  content: '|';
  position: absolute;
  right: -8px;
  animation: blink 1s infinite;
}

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

/* 3D Card Effect */
.card-3d {
  transform-style: preserve-3d;
  transition: transform 0.5s ease;
}

.card-3d:hover {
  transform: perspective(1000px) rotateX(5deg) rotateY(5deg);
}

/* Responsive Design */
@media (max-width: 992px) {
  .profile-info {
    padding-left: 0;
    margin-top: 70px;
  }
  
  .stats {
    justify-content: space-around;
    flex-wrap: wrap;
  }
  
  .section-content {
    padding: 30px;
  }
  
  .interactive-elements {
    grid-template-columns: 1fr;
  }
  
  .timeline::after {
    left: 31px;
  }
  
  .timeline-container {
    width: 100%;
    padding-left: 70px;
    padding-right: 25px;
  }
  
  .timeline-container::after {
    left: 15px;
  }
  
  .right {
    left: 0%;
  }
}

@media (max-width: 768px) {
  .profile-banner {
    height: 200px;
  }
  
  .profile-image {
    width: 100px;
    height: 100px;
    bottom: -50px;
  }
  
  nav a {
    padding: 15px 0;
  }
  
  .section-content {
    padding: 25px;
  }
  
  .profile-info h1 {
    font-size: 28px;
  }
}

@media (max-width: 480px) {
  .profile-banner {
    height: 150px;
    margin-bottom: 60px;
  }
  
  .profile-image {
    width: 80px;
    height: 80px;
    bottom: -40px;
  }
  
  nav a {
    padding: 12px 0;
    font-size: 14px;
  }
  
  .section-content {
    padding: 20px;
  }
  
  h2 {
    font-size: 24px;
  }
  
  h3 {
    font-size: 20px;
  }
  
  .profile-info h1 {
    font-size: 24px;
  }
  
  .username {
    font-size: 16px;
  }
  
  .count {
    font-size: 20px;
  }
  
  .social-links a {
    font-size: 24px;
    margin: 0 10px;
  }
}
