:root {
  --primary-color: #00ff41;
  --secondary-color: #0066cc;
  --accent-color: #ff6b35;
  --bg-dark: #0a0a0a;
  --bg-darker: #000000;
  --text-primary: #ffffff;
  --text-secondary: #b0b0b0;
  --text-accent: #00ff41;
  --border-color: #333333;
  --glow-color: #00ff4180;
}

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

body {
  font-family: "Vazirmatn", "Fira Code", monospace;
  background: var(--bg-darker);
  color: var(--text-primary);
  overflow-x: hidden;
  line-height: 1.8;
  direction: rtl;
}

/* پس‌زمینه ماتریکس */
.matrix-bg {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: -2;
}

#matrix-canvas {
  width: 100%;
  height: 100%;
  opacity: 0.3;
}

/* عناصر کد شناور */
.floating-code {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: -1;
  pointer-events: none;
}

.code-snippet {
  position: absolute;
  font-family: "Fira Code", monospace;
  font-size: 12px;
  color: var(--primary-color);
  opacity: 0.4;
  white-space: nowrap;
  animation: float-code 20s linear infinite;
}

@keyframes float-code {
  0% {
    transform: translateY(100vh) translateX(-50px);
    opacity: 0;
  }
  10% {
    opacity: 0.4;
  }
  90% {
    opacity: 0.4;
  }
  100% {
    transform: translateY(-100px) translateX(50px);
    opacity: 0;
  }
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
  position: relative;
  z-index: 1;
}

/* استایل‌های هدر */
.header {
  text-align: center;
  padding: 60px 0;
  position: relative;
}

.glitch-text {
  font-family: "Vazirmatn", monospace;
  font-size: clamp(2.5rem, 8vw, 6rem);
  font-weight: 900;
  text-transform: uppercase;
  position: relative;
  color: var(--text-primary);
  text-shadow: 0 0 20px var(--glow-color);
  animation: glitch 2s infinite;
}

.glitch-text::before,
.glitch-text::after {
  content: attr(data-text);
  position: absolute;
  top: 0;
  right: 0;
  width: 100%;
  height: 100%;
}

.glitch-text::before {
  animation: glitch-1 0.5s infinite;
  color: var(--accent-color);
  z-index: -1;
}

.glitch-text::after {
  animation: glitch-2 0.5s infinite;
  color: var(--secondary-color);
  z-index: -2;
}

@keyframes glitch {
  0%,
  100% {
    transform: translate(0);
  }
  20% {
    transform: translate(-2px, 2px);
  }
  40% {
    transform: translate(-2px, -2px);
  }
  60% {
    transform: translate(2px, 2px);
  }
  80% {
    transform: translate(2px, -2px);
  }
}

@keyframes glitch-1 {
  0%,
  100% {
    transform: translate(0);
  }
  10% {
    transform: translate(-2px, -2px);
  }
  20% {
    transform: translate(2px, 2px);
  }
  30% {
    transform: translate(-2px, 2px);
  }
  40% {
    transform: translate(2px, -2px);
  }
}

@keyframes glitch-2 {
  0%,
  100% {
    transform: translate(0);
  }
  10% {
    transform: translate(2px, 2px);
  }
  20% {
    transform: translate(-2px, -2px);
  }
  30% {
    transform: translate(2px, -2px);
  }
  40% {
    transform: translate(-2px, 2px);
  }
}

.subtitle {
  font-size: 1.5rem;
  color: var(--text-accent);
  margin-top: 20px;
  font-weight: 400;
}

.typing-text {
  border-left: 2px solid var(--primary-color);
  padding-left: 5px;
}

.cursor {
  animation: blink 1s infinite;
  color: var(--primary-color);
}

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

/* بخش پروفایل */
.profile-section {
  margin-bottom: 80px;
}

.profile-container {
  display: grid;
  grid-template-columns: 1fr 2fr;
  gap: 60px;
  align-items: center;
}

.profile-image-wrapper {
  text-align: center;
}

.profile-image {
  position: relative;
  display: inline-block;
  width: 230px;
  height: 350px;
  border-radius: 10px;
  overflow: hidden;
  border: 2px solid var(--primary-color);
  box-shadow: 0 0 30px var(--glow-color);
}

.profile-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: brightness(0.9) hue-rotate(125deg) contrast(1.2) grayscale(0.4) ;
}

.image-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(45deg, transparent 30%, var(--glow-color) 50%, transparent 70%);
  opacity: 0;
  transition: opacity 0.3s ease;
}

/*.profile-image:hover .image-overlay {*/
/*  opacity: 1;*/
/*}*/

.scan-line {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: var(--primary-color);
  animation: scan 3s linear infinite;
}

@keyframes scan {
  0% {
    transform: translateY(0);
    opacity: 1;
  }
  100% {
    transform: translateY(248px);
    opacity: 0;
  }
}

.profile-status {
  margin-top: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
}

.status-dot {
  width: 10px;
  height: 10px;
  background: var(--primary-color);
  border-radius: 50%;
  animation: pulse 2s infinite;
}

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

.status-text {
  color: var(--text-accent);
  font-size: 0.9rem;
  font-weight: 500;
}

/* پنجره ترمینال */
.terminal-window {
  background: var(--bg-dark);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
}

.terminal-header {
  background: #1a1a1a;
  padding: 12px 20px;
  display: flex;
  align-items: center;
  gap: 15px;
  border-bottom: 1px solid var(--border-color);
}

.terminal-controls {
  display: flex;
  gap: 8px;
}

.control {
  width: 12px;
  height: 12px;
  border-radius: 50%;
}

.control.close {
  background: #ff5f56;
}
.control.minimize {
  background: #ffbd2e;
}
.control.maximize {
  background: #27ca3f;
}

.terminal-title {
  color: var(--text-secondary);
  font-size: 0.9rem;
}

.terminal-content {
  padding: 20px;
  font-family: "Fira Code", monospace;
}

.terminal-line {
  margin-bottom: 15px;
}

.prompt {
  color: var(--primary-color);
  font-weight: 600;
}

.command {
  color: var(--text-primary);
  margin-right: 10px;
}

.bio-content {
  margin-top: 20px;
}

.bio-text {
  margin-bottom: 20px;
  color: var(--text-secondary);
  line-height: 1.8;
  text-align: justify;
}

.highlight {
  color: var(--primary-color);
  font-weight: 600;
}

.accent {
  color: var(--accent-color);
  font-weight: 600;
}

/* عناوین بخش‌ها */
.section-title {
  font-family: "Vazirmatn", monospace;
  font-size: 2rem;
  color: var(--text-primary);
  margin-bottom: 40px;
  display: flex;
  align-items: center;
  gap: 15px;
}

.title-icon {
  color: var(--primary-color);
  font-size: 1.5rem;
}

/* بخش مهارت‌ها */
.skills-section {
  margin-bottom: 80px;
}

.skills-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 30px;
}

.skill-card {
  background: linear-gradient(145deg, #1a1a1a, #0f0f0f);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  padding: 30px;
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}

.skill-card::before {
  content: "";
  position: absolute;
  top: 0;
  right: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, var(--glow-color), transparent);
  transition: right 0.5s ease;
}

.skill-card:hover::before {
  right: 100%;
}

.skill-card:hover {
  transform: translateY(-5px);
  border-color: var(--primary-color);
  box-shadow: 0 15px 40px rgba(0, 255, 65, 0.2);
}

.skill-card {
  display: flex;
  align-items: center;
  gap: 20px;
}

.skill-icon {
  font-size: 2.5rem;
  color: var(--primary-color);
  width: 60px;
  text-align: center;
}

.skill-info {
  flex: 1;
}

.skill-info h3 {
  color: var(--text-primary);
  font-size: 1.2rem;
  margin-bottom: 10px;
  font-family: "Vazirmatn", monospace;
}

.skill-bar {
  background: var(--bg-dark);
  height: 8px;
  border-radius: 4px;
  overflow: hidden;
  position: relative;
}

.skill-progress {
  height: 100%;
  /*background: linear-gradient(90deg, var(--primary-color), var(--accent-color));*/
  background: linear-gradient(90deg, var(--primary-color), #00c0a0);
  border-radius: 4px;
  width: 0;
  transition: width 2s ease;
  position: relative;
}

.skill-progress::after {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  bottom: 0;
  width: 20px;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3));
  animation: shimmer 2s infinite;
}

@keyframes shimmer {
  0% {
    transform: translateX(-20px);
  }
  100% {
    transform: translateX(20px);
  }
}

/* بخش ارتباط */
.contact-section {
  margin-bottom: 80px;
}

.contact-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 30px;
}

.contact-card {
  background: linear-gradient(145deg, #1a1a1a, #0f0f0f);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  padding: 30px;
  text-decoration: none;
  color: var(--text-primary);
  display: flex;
  align-items: center;
  gap: 20px;
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}

.contact-card::before {
  content: "";
  position: absolute;
  top: 0;
  right: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, var(--glow-color), transparent);
  transition: right 0.5s ease;
}

.contact-card:hover::before {
  right: 100%;
}

.contact-card:hover {
  transform: translateY(-5px);
  border-color: var(--primary-color);
  box-shadow: 0 15px 40px rgba(0, 255, 65, 0.2);
}

.contact-icon {
  font-size: 2rem;
  color: var(--primary-color);
  width: 60px;
  text-align: center;
}

.contact-info {
  flex: 1;
}

.contact-info h3 {
  font-family: "Vazirmatn", monospace;
  font-size: 1.1rem;
  margin-bottom: 5px;
  color: var(--text-primary);
}

.contact-info p {
  color: var(--text-secondary);
  font-size: 0.9rem;
}

.contact-arrow {
  font-size: 1.2rem;
  color: var(--primary-color);
  transition: transform 0.3s ease;
}

.contact-card:hover .contact-arrow {
  transform: translateX(-5px);
}

/* فوتر */
.footer {
  text-align: center;
  padding: 40px 0;
  border-top: 1px solid var(--border-color);
  margin-top: 80px;
}

.footer-content p {
  color: var(--text-secondary);
  margin-bottom: 10px;
}

.footer-binary {
  font-family: "Fira Code", monospace;
  color: var(--primary-color);
  font-size: 0.8rem;
  opacity: 0.7;
}

/* طراحی ریسپانسیو */
@media (max-width: 768px) {
  .profile-container {
    grid-template-columns: 1fr;
    gap: 40px;
    text-align: center;
  }

  .profile-image {
      width: 190px;
      height: 300px;
  }

  .glitch-text {
    font-size: 3rem;
  }

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

  .skill-card,
  .contact-card {
    padding: 20px;
  }

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

@media (max-width: 480px) {
  .container {
    padding: 0 15px;
  }

  .header {
    padding: 40px 0;
  }

  .glitch-text {
    font-size: 2.5rem;
  }

  .subtitle {
    font-size: 1.2rem;
  }
}
