/* ==================== */
/* === BASE STYLES === */
/* ==================== */
:root {
  /* رنگ‌های نئونی */
  --neon-pink: #ff00ff;
  --neon-blue: #00f0ff;
  --neon-purple: #8a2be2;
  
  /* رنگ‌های تاریک */
  --dark-bg: #0a0a0f;
  --darker-bg: #050508;
  
  /* متن‌ها */
  --text-color: #e0e0e0;
  --text-highlight: #ffffff;
  
  /* انتقال‌ها */
  --transition-fast: 0.3s ease;
  --transition-medium: 0.5s ease;
}

body {
  font-family: 'Rajdhani', sans-serif;
  background-color: var(--bg-color);
  color: var(--text-color);
  line-height: 1.6;
  margin: 0;
  padding: 0;
  overflow-x: hidden;
  transition: background-color var(--transition-medium), color var(--transition-medium);
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

/* ==================== */
/* === LOADER === */
/* ==================== */
.page-loader {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: var(--darker-bg);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 9999;
}

.loader-spinner {
  position: relative;
  width: 100px;
  height: 100px;
}

.spinner-bar {
  position: absolute;
  width: 100%;
  height: 100%;
  border-radius: 50%;
  border: 4px solid transparent;
  animation: spin 2s linear infinite;
}

.spinner-pink {
  border-top-color: var(--neon-pink);
  animation-delay: 0s;
}

.spinner-blue {
  border-top-color: var(--neon-blue);
  animation-delay: 0.3s;
}

.spinner-purple {
  border-top-color: var(--neon-purple);
  animation-delay: 0.6s;
}

.loader-text {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  color: var(--text-color);
  text-shadow: 0 0 5px var(--neon-blue);
  font-family: 'Orbitron', sans-serif;
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

/* ==================== */
/* === HEADER === */
/* ==================== */
.main-header {
  background-color: var(--header-bg);
  backdrop-filter: blur(10px);
  position: fixed;
  width: 100%;
  z-index: 1000;
  border-bottom: 1px solid rgba(0, 240, 255, 0.1);
}

.header-content {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px 0;
}

.logo {
  font-family: 'Orbitron', sans-serif;
  font-weight: 700;
  font-size: 1.5rem;
  color: var(--neon-blue);
  text-shadow: 0 0 10px var(--neon-blue);
}

.logo-text {
  animation: flicker 3s infinite alternate;
}

@keyframes flicker {
  0%, 19%, 21%, 23%, 25%, 54%, 56%, 100% {
    text-shadow: 
      0 0 5px var(--neon-blue),
      0 0 10px var(--neon-blue),
      0 0 20px var(--neon-blue);
  }
  20%, 24%, 55% {
    text-shadow: none;
  }
}

.main-nav ul {
  display: flex;
  list-style: none;
  gap: 30px;
  margin: 0;
  padding: 0;
}

.main-nav a {
  color: var(--text-color);
  text-decoration: none;
  font-weight: 500;
  font-size: 1.1rem;
  position: relative;
  transition: var(--transition-fast);
}

.main-nav a:hover {
  color: var(--neon-pink);
}

.main-nav a::after {
  content: '';
  position: absolute;
  bottom: -5px;
  left: 0;
  width: 0;
  height: 2px;
  background-color: var(--neon-blue);
  transition: width var(--transition-fast);
}

.main-nav a:hover::after {
  width: 100%;
}

/* ==================== */
/* === HERO SECTION === */
/* ==================== */
.hero-section {
  padding: 180px 0 100px;
  background: linear-gradient(135deg, var(--bg-color) 0%, var(--card-bg) 100%);
}

.hero-content {
  display: flex;
  align-items: center;
  gap: 50px;
}

.hero-text {
  flex: 1;
}

.hero-section h1 {
  font-family: 'Orbitron', sans-serif;
  font-size: 3.5rem;
  margin-bottom: 20px;
  color: var(--text-color);
  line-height: 1.2;
}

.hero-section h1 span {
  color: var(--accent-color);
  text-shadow: 0 0 10px var(--accent-color);
}

.subtitle {
  font-size: 1.3rem;
  margin-bottom: 30px;
  color: var(--text-color);
  opacity: 0.9;
}

.action-buttons {
  display: flex;
  gap: 20px;
  margin-top: 40px;
}

.btn {
  display: inline-block;
  padding: 12px 30px;
  border-radius: 30px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  text-decoration: none;
  transition: var(--transition-fast);
  position: relative;
  overflow: hidden;
  z-index: 1;
}

.btn-primary {
  background: transparent;
  color: var(--neon-blue);
  border: 2px solid var(--neon-blue);
}

.btn-primary:hover {
  color: var(--dark-bg);
  box-shadow: 0 0 10px var(--neon-blue), 0 0 20px var(--neon-blue);
}

.btn-primary::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, var(--neon-blue), transparent);
  transition: all 0.5s ease;
  z-index: -1;
}

.btn-primary:hover::before {
  left: 100%;
}

.btn-secondary {
  background: transparent;
  color: var(--neon-pink);
  border: 2px solid var(--neon-pink);
}

.btn-secondary:hover {
  color: var(--dark-bg);
  box-shadow: 0 0 10px var(--neon-pink), 0 0 20px var(--neon-pink);
}

.btn-secondary::before {
  background: linear-gradient(90deg, transparent, var(--neon-pink), transparent);
}

.hero-image {
  flex: 1;
  display: flex;
  justify-content: center;
}

.profile-frame {
  width: 350px;
  height: 350px;
  border-radius: 50%;
  border: 5px solid var(--neon-blue);
  box-shadow: 
    0 0 20px var(--neon-blue),
    0 0 40px var(--neon-blue),
    inset 0 0 20px var(--neon-blue);
  padding: 10px;
  animation: pulse 4s infinite alternate;
}

.profile-img {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
  filter: grayscale(20%) contrast(110%);
}

@keyframes pulse {
  0% {
    box-shadow: 
      0 0 20px var(--neon-blue),
      0 0 40px var(--neon-blue),
      inset 0 0 20px var(--neon-blue);
  }
  50% {
    box-shadow: 
      0 0 30px var(--neon-blue),
      0 0 60px var(--neon-blue),
      inset 0 0 30px var(--neon-blue);
  }
  100% {
    box-shadow: 
      0 0 20px var(--neon-blue),
      0 0 40px var(--neon-blue),
      inset 0 0 20px var(--neon-blue);
  }
}

/* ==================== */
/* === SECTIONS === */
/* ==================== */
.section {
  padding: 100px 0;
  position: relative;
}

.section-title {
  font-family: 'Orbitron', sans-serif;
  font-size: 2.5rem;
  text-align: center;
  margin-bottom: 50px;
  color: var(--text-highlight);
  position: relative;
  transition: color var(--transition-fast);
}

.section-title::after {
  content: '';
  display: block;
  width: 100px;
  height: 3px;
  background: linear-gradient(90deg, var(--neon-pink), var(--neon-blue));
  margin: 15px auto 0;
  border-radius: 3px;
  transition: var(--transition-fast);
}

/* ==================== */
/* === PROJECTS === */
/* ==================== */
.projects-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 30px;
}

.project-card {
  background: var(--project-bg);
  color: var(--project-text);
  border: 1px solid var(--border-color);
  border-radius: 15px;
  padding: 30px;
  transition: var(--transition-fast);
  position: relative;
  overflow: hidden;
  backdrop-filter: blur(5px);
}

.project-card::before {
  content: '';
  position: absolute;
  top: -2px;
  left: -2px;
  right: -2px;
  bottom: -2px;
  background: linear-gradient(45deg, var(--neon-pink), var(--neon-blue));
  z-index: -1;
  opacity: 0;
  transition: opacity var(--transition-fast);
}

.project-card:hover {
  transform: translateY(-10px);
  box-shadow: 0 10px 30px rgba(0, 240, 255, 0.2);
}

.project-card:hover::before {
  opacity: 1;
}

.project-icon {
  width: 80px;
  height: 80px;
  margin: 0 auto 20px;
  position: relative;
}

.project-logo {
  width: 100%;
  height: 100%;
  object-fit: contain;
  transition: var(--transition-fast);
}

.icon-glow {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border-radius: 50%;
  background: radial-gradient(circle, var(--neon-blue) 0%, transparent 70%);
  opacity: 0;
  transition: opacity var(--transition-fast);
}

.project-card:hover .icon-glow {
  opacity: 0.3;
}

.project-card h3 {
  font-size: 1.5rem;
  margin-bottom: 15px;
  color: inherit;
}

.project-card p {
  margin-bottom: 20px;
  opacity: 0.8;
}

.project-link {
  color: var(--project-text);
  text-decoration: none;
  border-bottom: 1px solid rgba(255, 255, 255, 0.3);
  transition: var(--transition-fast);
}

.project-link:hover {
  color: var(--neon-pink);
  border-bottom-color: var(--neon-pink);
}

/* ==================== */
/* === EXPERIENCE === */
/* ==================== */
.experience-section {
  background: var(--experience-bg);
  transition: var(--transition-medium);
}

.timeline {
  position: relative;
  max-width: 800px;
  margin: 0 auto;
  padding: 40px 0;
}

.timeline::before {
  content: '';
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 2px;
  height: 100%;
  background: linear-gradient(to bottom, var(--neon-pink), var(--neon-blue));
}

.timeline-item {
  position: relative;
  width: calc(50% - 40px);
  margin-bottom: 40px;
  background: var(--card-bg);
  border-radius: 10px;
  padding: 20px;
  transition: var(--transition-fast);
}

.timeline-item:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.2);
}

.timeline-item:nth-child(odd) {
  margin-right: auto;
}

.timeline-item:nth-child(even) {
  margin-left: auto;
}

.timeline-date {
  position: absolute;
  top: 20px;
  width: 120px;
  padding: 5px 10px;
  background-color: var(--accent-color);
  color: var(--bg-color);
  font-weight: 700;
  text-align: center;
  border-radius: 20px;
  box-shadow: 0 0 10px var(--accent-color);
  z-index: 1;
}

.timeline-item:nth-child(odd) .timeline-date {
  right: -150px;
}

.timeline-item:nth-child(even) .timeline-date {
  left: -150px;
}

.experience-content h3 {
  font-size: 1.3rem;
  margin-bottom: 10px;
  color: var(--accent-color);
}

.experience-details h4 {
  margin-bottom: 10px;
}

.experience-details p {
  margin-bottom: 15px;
  line-height: 1.6;
}

.experience-link {
  color: var(--accent-color);
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  transition: var(--transition-fast);
}

.experience-link:hover {
  color: var(--neon-pink);
  text-decoration: underline;
}

.experience-link::after {
  content: '→';
  margin-left: 5px;
  transition: var(--transition-fast);
}

.experience-link:hover::after {
  transform: translateX(3px);
}

/* ==================== */
/* === CONTACT === */
/* ==================== */
.contact-content {
  display: flex;
  gap: 50px;
  max-width: 1000px;
  margin: 0 auto;
}

.contact-info {
  flex: 1;
}

.contact-item {
  display: flex;
  align-items: center;
  gap: 15px;
  margin-bottom: 25px;
  font-size: 1.1rem;
}

.contact-item i {
  color: var(--accent-color);
  font-size: 1.3rem;
}

.contact-form {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 20px;
  padding: 30px;
  border-radius: 10px;
  background: var(--card-bg);
  transition: var(--transition-fast);
}

.form-group {
  margin-bottom: 20px;
}

.contact-form input,
.contact-form select,
.contact-form textarea {
  width: 100%;
  padding: 12px 15px;
  border: 1px solid var(--border-color);
  border-radius: 5px;
  background: var(--input-bg);
  color: var(--text-color);
  font-family: inherit;
  font-size: 1rem;
  transition: var(--transition-fast);
}

.contact-form input:focus,
.contact-form select:focus,
.contact-form textarea:focus {
  outline: none;
  border-color: var(--accent-color);
  box-shadow: 0 0 10px rgba(0, 240, 255, 0.3);
}

.contact-form select {
  appearance: none;
  background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%23fff'%3e%3cpath d='M7 10l5 5 5-5z'/%3e%3c/svg%3e");
  background-repeat: no-repeat;
  background-position: right 15px center;
  background-size: 15px;
}

.light-theme .contact-form select {
  background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%23000'%3e%3cpath d='M7 10l5 5 5-5z'/%3e%3c/svg%3e");
}

/* ==================== */
/* === FOOTER === */
/* ==================== */
.main-footer {
  background-color: var(--footer-bg);
  padding: 30px 0;
  text-align: center;
  border-top: 1px solid rgba(0, 240, 255, 0.1);
}

.main-footer p {
  margin-bottom: 15px;
}

.footer-links {
  display: flex;
  justify-content: center;
  gap: 30px;
}

.footer-links a {
  color: var(--text-color);
  text-decoration: none;
  transition: var(--transition-fast);
}

.footer-links a:hover {
  color: var(--accent-color);
}

/* ==================== */
/* === ANIMATIONS === */
/* ==================== */
@keyframes float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-20px); }
}

.floating {
  animation: float 6s ease-in-out infinite;
}

/* ==================== */
/* === RESPONSIVE === */
/* ==================== */
@media (max-width: 992px) {
  .hero-content {
    flex-direction: column;
    text-align: center;
  }
  
  .action-buttons {
    justify-content: center;
  }
  
  .contact-content {
    flex-direction: column;
  }
}

@media (max-width: 768px) {
  .hero-section h1 {
    font-size: 2.5rem;
  }
  
  .subtitle {
    font-size: 1.1rem;
  }
  
  .profile-frame {
    width: 250px;
    height: 250px;
  }
  
  .section-title {
    font-size: 2rem;
  }
  
  .timeline::before {
    left: 30px;
  }
  
  .timeline-item {
    width: calc(100% - 80px);
    margin-left: 80px;
  }
  
  .timeline-item:nth-child(odd), 
  .timeline-item:nth-child(even) {
    margin-right: 0;
    margin-left: 80px;
  }
  
  .timeline-item:nth-child(odd) .timeline-date,
  .timeline-item:nth-child(even) .timeline-date {
    left: -150px;
    right: auto;
  }
}

@media (max-width: 576px) {
  .projects-grid {
    grid-template-columns: 1fr;
  }
  
  .main-nav ul {
    gap: 15px;
  }
  
  .footer-links {
    flex-direction: column;
    gap: 10px;
  }
  
  .section {
    padding: 60px 0;
  }
}

/* ==================== */
/* === THEME SPECIFIC === */
/* ==================== */
.light-theme {
  --bg-color: #f8f9fa;
  --text-color: #212529;
  --text-highlight: #3a86ff;
  --accent-color: #3a86ff;
  --card-bg: #ffffff;
  --header-bg: rgba(248, 249, 250, 0.9);
  --footer-bg: #e9ecef;
  --project-bg: linear-gradient(135deg, #3a86ff, #8338ec);
  --project-text: #ffffff;
  --experience-bg: linear-gradient(to bottom, #f5f7fa, #e4e8eb);
  --border-color: rgba(0, 0, 0, 0.1);
  --input-bg: #ffffff;
}

.dark-theme {
  --bg-color: #121212;
  --text-color: #e0e0e0;
  --text-highlight: #ffffff;
  --accent-color: #00f0ff;
  --card-bg: rgba(30, 30, 36, 0.9);
  --header-bg: rgba(18, 18, 18, 0.9);
  --footer-bg: #0a0a0f;
  --project-bg: linear-gradient(135deg, #0a0a0f, #1a1a2e);
  --project-text: #ffffff;
  --experience-bg: linear-gradient(to bottom, #121212, #1a1a2e);
  --border-color: rgba(255, 255, 255, 0.1);
  --input-bg: rgba(30, 30, 36, 0.7);
}

.light-theme .project-logo {
  filter: none;
}

.dark-theme .project-logo {
  filter: none !important;
}

.neon-icon {
  margin-right: 10px;
  color: var(--neon-blue);
  font-size: 1.3rem;
}

.social-links {
  display: flex;
  gap: 20px;
  margin-top: 30px;
}

.neon-social {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 50px;
  height: 50px;
  border-radius: 50%;
  background-color: rgba(0, 240, 255, 0.1);
  color: var(--neon-blue);
  font-size: 1.5rem;
  transition: all 0.3s ease;
}

.neon-social:hover {
  background-color: var(--neon-blue);
  color: var(--dark-bg);
  box-shadow: 0 0 15px var(--neon-blue);
  transform: translateY(-5px);
}

.neon-form {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.neon-input, .neon-select {
  width: 100%;
  padding: 15px 20px;
  background-color: rgba(15, 15, 20, 0.7);
  border: 1px solid rgba(0, 240, 255, 0.2);
  border-radius: 5px;
  color: var(--text-color);
  font-family: inherit;
  font-size: 1rem;
  transition: all 0.3s ease;
}

.neon-input:focus, .neon-select:focus {
  outline: none;
  border-color: var(--neon-blue);
  box-shadow: 0 0 10px rgba(0, 240, 255, 0.3);
}

.neon-select {
  appearance: none;
  background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%2300f0ff'%3e%3cpath d='M7 10l5 5 5-5z'/%3e%3c/svg%3e");
  background-repeat: no-repeat;
  background-position: right 15px center;
  background-size: 15px;
}

.neon-buttons {
  display: flex;
  gap: 20px;
  margin-top: 40px;
}

.neon-button {
  display: inline-block;
  padding: 12px 30px;
  background: transparent;
  color: var(--neon-blue);
  border: 2px solid var(--neon-blue);
  border-radius: 30px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  text-decoration: none;
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
  z-index: 1;
}

.neon-button:hover {
  color: var(--dark-bg);
  box-shadow: 0 0 10px var(--neon-blue), 0 0 20px var(--neon-blue);
}

.neon-button::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, var(--neon-blue), transparent);
  transition: all 0.5s ease;
  z-index: -1;
}

.neon-button:hover::before {
  left: 100%;
}

.neon-button.secondary {
  color: var(--neon-pink);
  border-color: var(--neon-pink);
}

.neon-button.secondary:hover {
  color: var(--dark-bg);
  box-shadow: 0 0 10px var(--neon-pink), 0 0 20px var(--neon-pink);
}

.neon-button.secondary::before {
  background: linear-gradient(90deg, transparent, var(--neon-pink), transparent);
}

.hero-image {
  flex: 1;
  display: flex;
  justify-content: center;
}

.neon-frame {
  width: 350px;
  height: 350px;
  border-radius: 50%;
  border: 5px solid var(--neon-blue);
  box-shadow: 
    0 0 20px var(--neon-blue),
    0 0 40px var(--neon-blue),
    inset 0 0 20px var(--neon-blue);
  padding: 10px;
  animation: pulse 4s infinite alternate;
}

.neon-img {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
  filter: grayscale(20%) contrast(110%);
}

.dropdown {
  display: inline-block;
  position: relative; /* Ensures the content is positioned relative to the button */
}

.dropdown a {
  display: block;
  color: white;
  text-decoration: none;
  padding: 12px 20px;
  background-color: var(--primary-color);
  border-radius: 8px;
  text-align: center;
  transition: background-color 0.3s ease;
}

.dropdown a:hover {
  background-color: var(--primary-dark);
}

.dropdown .content {
  display: none;
  position: absolute;
  /* background-color: white; */
  box-shadow: 2px 2px 20px rgba(0, 0, 0, 0.1);
  width: 100%;
  top: 100%;
  left: 0;
  border-radius: 8px;
  z-index: 100;
}

.dropdown .content a {
  color: black;
  background-color: white;
  padding: 12px 20px;
  display: block;
  text-decoration: none;
  transition: background-color 0.2s ease;
  border-bottom: 1px solid #ddd;
  min-width: 300px;
}

.dropdown .content a:hover {
  background-color: #f4f4f4;
}

/* Show content on hover */
.dropdown:hover .content {
  display: block;
}

/* Mobile Styles */
@media (max-width: 768px) {
  .dropdown a {
    padding: 14px 25px;
  }
  
  .dropdown .content {
    position: relative;
    width: auto;
    top: 0;
  }
}