@import url('https://fonts.googleapis.com/css2?family=JetBrains+Mono:wght@400;600;700&family=Vazirmatn:wght@300;400;600;700;900&display=swap');
html {
  scroll-behavior: smooth;
  scroll-padding-top: 5rem;
}
/* ==========================================================================
   ۱. متغیرهای رنگی و تم‌ها (Dark & Light Mode)
   ========================================================================== */
:root {
  --bg-color: #0d1117;
  --bg-card: rgba(22, 27, 34, 0.65);
  --bg-card-hover: rgba(22, 27, 34, 0.9);
  --text-main: #f0f6fc;
  --text-muted: #8b949e;
  --text-gradient-start: #ffffff;
  --text-gradient-end: #8b949e;
  --accent: #58a6ff;
  --accent-glow: rgba(88, 166, 255, 0.25);
  --border-color: #30363d;
  --nav-bg: rgba(13, 17, 23, 0.75);
  --canvas-bg: #0d1117;
  --lab-inner-bg: rgba(13, 17, 23, 0.6);
  --lab-canvas-bg: #090d13;
}

[data-theme="light"] {
  --bg-color: #f6f8fa;
  --bg-card: rgba(255, 255, 255, 0.85);
  --bg-card-hover: rgba(255, 255, 255, 1);
  --text-main: #1f2328;
  --text-muted: #57606a;
  --text-gradient-start: #1f2328;
  --text-gradient-end: #57606a;
  --accent: #0969da;
  --accent-glow: rgba(9, 105, 218, 0.2);
  --border-color: #d0d7de;
  --nav-bg: rgba(255, 255, 255, 0.82);
  --canvas-bg: #f6f8fa;
  --lab-inner-bg: rgba(234, 238, 242, 0.8);
  --lab-canvas-bg: #ffffff;
}

/* ==========================================================================
   ۲. تنظیمات پایه و ریست (Base Styles)
   ========================================================================== */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  font-family: 'Vazirmatn', system-ui, -apple-system, sans-serif;
  transition: background-color 0.3s ease, color 0.3s ease, border-color 0.3s ease;
}

body {
  background-color: var(--bg-color);
  color: var(--text-main);
  overflow-x: hidden;
  min-height: 100vh;
}

/* ==========================================================================
   ۳. نوار ناوبری شناور و شیشه‌ای (Navbar)
   ========================================================================== */
.glass-nav {
  position: fixed;
  top: 1.2rem;
  left: 50%;
  transform: translateX(-50%);
  width: 90%;
  max-width: 1080px;
  background: var(--nav-bg);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border: 1px solid var(--border-color);
  border-radius: 50px;
  padding: 0.6rem 1.6rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  z-index: 100;
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.15);
}

.nav-brand {
  font-size: 1.1rem;
  font-weight: 800;
  letter-spacing: -0.5px;
  color: var(--text-main);
}

.nav-brand span {
  color: var(--accent);
  font-family: monospace;
}

.nav-links {
  display: flex;
  list-style: none;
  gap: 1.6rem;
}

.nav-links a {
  text-decoration: none;
  color: var(--text-muted);
  font-size: 0.9rem;
  font-weight: 600;
  transition: color 0.2s ease;
}

.nav-links a:hover {
  color: var(--accent);
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 0.8rem;
}

.theme-toggle-btn {
  background: transparent;
  border: 1px solid var(--border-color);
  color: var(--text-main);
  border-radius: 50%;
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 1.05rem;
  transition: all 0.2s ease;
}

.theme-toggle-btn:hover {
  background: var(--bg-card);
  border-color: var(--accent);
  transform: scale(1.05);
}

.nav-cta {
  background: rgba(88, 166, 255, 0.12);
  color: var(--accent);
  border: 1px solid var(--border-color);
  padding: 0.45rem 1.1rem;
  border-radius: 30px;
  text-decoration: none;
  font-size: 0.85rem;
  font-weight: 700;
  transition: all 0.2s ease;
}

.nav-cta:hover {
  background: var(--accent);
  color: #ffffff;
  box-shadow: 0 0 15px var(--accent-glow);
}

@media (max-width: 768px) {
  .nav-links { display: none; }
}

/* ==========================================================================
   ۴. بوم پس‌زمینه و بخش اول (Hero Section)
   ========================================================================== */
#math-canvas {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  z-index: 1;
  pointer-events: none;
}

.hero-container {
  position: relative;
  z-index: 2;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  padding: 6rem 7% 2rem 7%;
}

.hero-content {
  max-width: 680px;
  text-align: right;
  position: relative;
  z-index: 3;
}

.badge {
  display: inline-block;
  padding: 0.2rem 0;
  font-size: 0.95rem;
  font-weight: 600;
  letter-spacing: 0.5px;
  background: transparent;
  border: none;
  color: var(--accent);
  text-shadow: 0 0 12px var(--accent-glow);
  margin-bottom: 1.2rem;
}

.hero-title {
  font-size: 2.6rem;
  line-height: 1.3;
  font-weight: 900;
  margin-bottom: 1.2rem;
  letter-spacing: -0.5px;
  white-space: nowrap;
  background: linear-gradient(180deg, var(--text-gradient-start) 30%, var(--text-gradient-end) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  filter: drop-shadow(0 2px 8px rgba(0, 0, 0, 0.2));
}

@media (max-width: 768px) {
  .hero-title {
    font-size: 1.6rem;
    white-space: normal;
  }
}

.hero-desc {
  font-size: 1.1rem;
  line-height: 1.8;
  color: var(--text-muted);
  margin-bottom: 2rem;
}

.hero-actions {
  display: flex;
  justify-content: flex-start;
  gap: 1rem;
}

/* ==========================================================================
   ۵. دکمه‌های کلی (Buttons)
   ========================================================================== */
.btn {
  padding: 0.75rem 1.5rem;
  border-radius: 8px;
  text-decoration: none;
  font-size: 0.92rem;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  border: 1px solid transparent;
  transition: all 0.2s ease;
}

.primary-btn {
  background-color: var(--accent);
  color: #ffffff;
}

.primary-btn:hover {
  box-shadow: 0 0 15px var(--accent-glow);
  transform: translateY(-2px);
}

.secondary-btn {
  background-color: transparent;
  color: var(--text-main);
  border: 1px solid var(--border-color);
}

.secondary-btn:hover {
  border-color: var(--text-muted);
  background: rgba(255, 255, 255, 0.05);
  transform: translateY(-2px);
}

/* ==========================================================================
   ۶. ساختار بخش‌ها و کارت‌های درباره من (Sections & About)
   ========================================================================== */
.section-container {
  position: relative;
  z-index: 2;
  max-width: 1150px;
  margin: 0 auto;
  padding: 5rem 7%;
}

.section-header {
  text-align: right;
  margin-bottom: 3rem;
}

.section-tag {
  color: var(--accent);
  font-size: 0.88rem;
  font-weight: 600;
  display: inline-block;
  margin-bottom: 0.5rem;
  text-shadow: 0 0 8px var(--accent-glow);
}

.section-title {
  font-size: 2rem;
  font-weight: 800;
  color: var(--text-main);
  margin-bottom: 0.6rem;
}

.section-desc {
  color: var(--text-muted);
  font-size: 1rem;
  line-height: 1.8;
  max-width: 600px;
}

.cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.8rem;
}

.card {
  background: var(--bg-card);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid var(--border-color);
  border-radius: 14px;
  padding: 2.2rem 1.8rem;
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  text-align: right;
}

.card:hover {
  transform: translateY(-6px);
  background: var(--bg-card-hover);
  border-color: var(--accent);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.15), 0 0 15px var(--accent-glow);
}

.card-icon {
  font-size: 1.8rem;
  color: var(--accent);
  margin-bottom: 1.2rem;
}

.card-title {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--text-main);
  margin-bottom: 0.8rem;
}

.card-text {
  font-size: 0.94rem;
  color: var(--text-muted);
  line-height: 1.8;
}

/* ==========================================================================
   ۷. بخش پروژه‌ها (Projects)
   ========================================================================== */
.projects-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 2rem;
}

.project-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 14px;
  padding: 2rem;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}

.project-card:hover {
  transform: translateY(-5px);
  border-color: var(--accent);
  background: var(--bg-card-hover);
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.12);
}

.project-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 1.2rem;
}

.tech-tag {
  font-size: 0.78rem;
  padding: 0.25rem 0.65rem;
  border-radius: 20px;
  background: rgba(88, 166, 255, 0.08);
  color: var(--accent);
  border: 1px solid var(--border-color);
}

.project-title {
  font-size: 1.28rem;
  font-weight: 700;
  color: var(--text-main);
  margin-bottom: 0.8rem;
}

.project-summary {
  font-size: 0.92rem;
  color: var(--text-muted);
  line-height: 1.8;
  margin-bottom: 1.8rem;
  flex-grow: 1;
}

.project-links {
  display: flex;
  gap: 0.8rem;
  align-items: center;
}

.link-btn {
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--accent);
  text-decoration: none;
}

.link-btn:hover {
  text-decoration: underline;
}

.secondary-link {
  color: var(--text-muted);
}

/* ==========================================================================
   ۸. آزمایشگاه تعاملی ریاضی (Interactive Math Lab)
   ========================================================================== */
.math-lab-wrapper {
  margin-top: 4rem;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 18px;
  padding: 2.2rem;
  backdrop-filter: blur(12px);
}

.lab-header {
  text-align: right;
  margin-bottom: 1.8rem;
}

.lab-title {
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--text-main);
  margin-top: 0.6rem;
  margin-bottom: 0.4rem;
}

.lab-desc {
  font-size: 0.92rem;
  color: var(--text-muted);
}

.lab-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  margin-bottom: 1.8rem;
  border-bottom: 1px solid var(--border-color);
  padding-bottom: 1rem;
}

.tab-btn {
  background: transparent;
  border: 1px solid var(--border-color);
  color: var(--text-muted);
  padding: 0.55rem 1.1rem;
  border-radius: 8px;
  cursor: pointer;
  font-size: 0.86rem;
  font-weight: 600;
  transition: all 0.2s ease;
}

.tab-btn:hover {
  color: var(--text-main);
  border-color: var(--text-muted);
}

.tab-btn.active {
  background: rgba(88, 166, 255, 0.12);
  color: var(--accent);
  border-color: var(--accent);
  box-shadow: 0 0 12px var(--accent-glow);
}

.lab-workspace {
  display: flex;
  flex-direction: column;
  gap: 1.4rem;
}

.lab-controls {
  display: flex;
  flex-wrap: wrap;
  gap: 1.4rem;
  align-items: center;
  background: var(--lab-inner-bg);
  padding: 1rem 1.4rem;
  border-radius: 10px;
  border: 1px solid var(--border-color);
}

.control-group {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  font-size: 0.88rem;
  color: var(--text-main);
}

.control-group input[type="range"] {
  accent-color: var(--accent);
  cursor: pointer;
}

.control-val {
  color: var(--accent);
  font-weight: 700;
  font-family: monospace;
  min-width: 35px;
}

.canvas-wrapper {
  position: relative;
  width: 100%;
  height: 320px;
  background: var(--lab-canvas-bg);
  border-radius: 12px;
  border: 1px solid var(--border-color);
  overflow: hidden;
}

#lab-canvas {
  width: 100%;
  height: 100%;
  display: block;
}

.status-badge {
  position: absolute;
  top: 12px;
  right: 12px;
  font-size: 0.8rem;
  padding: 0.3rem 0.7rem;
  border-radius: 6px;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  color: var(--accent);
}

/* ==========================================================================
   ۹. مقالات و انتشارات پژوهشی (Publications)
   ========================================================================== */
.pub-filters {
  display: flex;
  gap: 0.6rem;
  margin-bottom: 2rem;
  flex-wrap: wrap;
}

.filter-btn {
  background: transparent;
  border: 1px solid var(--border-color);
  color: var(--text-muted);
  padding: 0.4rem 1rem;
  border-radius: 20px;
  font-size: 0.85rem;
  cursor: pointer;
  transition: all 0.2s ease;
}

.filter-btn.active, .filter-btn:hover {
  color: var(--accent);
  border-color: var(--accent);
  background: rgba(88, 166, 255, 0.08);
}

.publications-list {
  display: flex;
  flex-direction: column;
  gap: 1.2rem;
}

.pub-item {
  display: flex;
  gap: 1.8rem;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  padding: 1.5rem 1.8rem;
  backdrop-filter: blur(8px);
  transition: all 0.25s ease;
  text-align: right;
}

.pub-item:hover {
  border-color: var(--accent);
  transform: translateX(-4px);
  background: var(--bg-card-hover);
}

.pub-year {
  font-family: monospace;
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--accent);
  min-width: 55px;
  padding-top: 0.2rem;
}

.pub-content {
  flex-grow: 1;
}

.pub-badges {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 0.5rem;
}

.pub-badge {
  font-size: 0.72rem;
  padding: 0.15rem 0.5rem;
  border-radius: 4px;
  background: rgba(125, 133, 144, 0.12);
  color: var(--text-muted);
}

.pub-badge.accent {
  background: rgba(88, 166, 255, 0.1);
  color: var(--accent);
}

.pub-heading {
  font-size: 1.12rem;
  font-weight: 700;
  color: var(--text-main);
  margin-bottom: 0.4rem;
  line-height: 1.5;
}

.pub-authors {
  font-size: 0.88rem;
  color: var(--text-muted);
  margin-bottom: 0.2rem;
}

.pub-journal {
  font-size: 0.82rem;
  color: var(--text-muted);
  font-style: italic;
  margin-bottom: 0.9rem;
}

.pub-actions {
  display: flex;
  gap: 1rem;
}

.pub-link {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--accent);
  text-decoration: none;
}

.pub-link:hover {
  text-decoration: underline;
}

.pub-link.secondary {
  color: var(--text-muted);
}

/* ==========================================================================
   ۱۰. سوابق تدریس و دوره‌ها (Teaching)
   ========================================================================== */
.teaching-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 1.8rem;
}

.teaching-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 14px;
  padding: 2rem 1.8rem;
  backdrop-filter: blur(8px);
  transition: all 0.3s ease;
  text-align: right;
  position: relative;
}

.teaching-card:hover {
  border-color: var(--accent);
  transform: translateY(-5px);
  background: var(--bg-card-hover);
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.12);
}

.teaching-badge {
  display: inline-block;
  font-size: 0.75rem;
  padding: 0.2rem 0.6rem;
  border-radius: 4px;
  background: rgba(125, 133, 144, 0.12);
  color: var(--text-muted);
  margin-bottom: 1rem;
}

.accent-badge {
  background: rgba(88, 166, 255, 0.12);
  color: var(--accent);
}

.teaching-title {
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--text-main);
  margin-bottom: 0.4rem;
}

.teaching-role {
  font-size: 0.85rem;
  color: var(--accent);
  margin-bottom: 0.9rem;
}

.teaching-desc {
  font-size: 0.9rem;
  color: var(--text-muted);
  line-height: 1.8;
  margin-bottom: 1.4rem;
}

.teaching-topics {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
}

.teaching-topics span {
  font-size: 0.75rem;
  font-family: monospace;
  background: var(--lab-inner-bg);
  border: 1px solid var(--border-color);
  padding: 0.15rem 0.5rem;
  border-radius: 4px;
  color: var(--text-muted);
}

/* ==========================================================================
   ۱۱. فرم تماس و فوتر (Contact & Footer)
   ========================================================================== */
.contact-box {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 20px;
  padding: 3.5rem 2.5rem;
  text-align: center;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

.contact-desc {
  margin: 0 auto 2.5rem auto;
  max-width: 620px;
}

.contact-form {
  max-width: 620px;
  margin: 0 auto 2.5rem auto;
  text-align: right;
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.2rem;
}

@media (max-width: 600px) {
  .form-row { grid-template-columns: 1fr; }
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
  margin-bottom: 1.2rem;
}

.form-group label {
  font-size: 0.86rem;
  font-weight: 600;
  color: var(--text-main);
}

.form-group input,
.form-group textarea {
  background: var(--lab-inner-bg);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  padding: 0.75rem 1rem;
  color: var(--text-main);
  font-size: 0.9rem;
  font-family: inherit;
  outline: none;
  transition: all 0.2s ease;
}

.form-group input:focus,
.form-group textarea:focus {
  border-color: var(--accent);
  box-shadow: 0 0 12px var(--accent-glow);
}

.submit-btn {
  width: 100%;
  margin-top: 0.5rem;
}

.form-feedback {
  margin-top: 1rem;
  font-size: 0.9rem;
  text-align: center;
}

.social-pills {
  display: flex;
  justify-content: center;
  gap: 1.2rem;
  flex-wrap: wrap;
  padding-top: 1.5rem;
  border-top: 1px solid var(--border-color);
}

.social-pills a {
  color: var(--text-muted);
  text-decoration: none;
  font-size: 0.85rem;
  font-weight: 600;
  transition: color 0.2s ease;
}

.social-pills a:hover {
  color: var(--accent);
}

.site-footer {
  position: relative;
  z-index: 2;
  border-top: 1px solid var(--border-color);
  padding: 2.2rem 1rem;
  text-align: center;
  font-size: 0.88rem;
  color: var(--text-muted);
}

/* افکت ویژه کارت کیهانی */
.cosmos-card {
  background: radial-gradient(circle at top right, rgba(88, 166, 255, 0.12), var(--bg-card));
  border: 1px solid rgba(88, 166, 255, 0.35);
}

.cosmos-card:hover {
  border-color: var(--accent);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.2), 0 0 18px var(--accent-glow);
}

/* پنجره مدال شیشه‌ای */
.cosmos-modal-overlay {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(0, 0, 0, 0.65);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  z-index: 200;
  justify-content: center;
  align-items: center;
  padding: 1.5rem;
}

.cosmos-modal-content {
  background: var(--bg-card-hover);
  border: 1px solid var(--border-color);
  border-radius: 20px;
  max-width: 650px;
  width: 100%;
  padding: 2.4rem;
  position: relative;
  text-align: right;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.4);
}

.modal-close-btn {
  position: absolute;
  top: 1.2rem;
  left: 1.4rem;
  background: transparent;
  border: none;
  font-size: 1.8rem;
  color: var(--text-muted);
  cursor: pointer;
  transition: color 0.2s ease;
}

.modal-close-btn:hover {
  color: var(--accent);
}

.modal-title {
  font-size: 1.35rem;
  font-weight: 800;
  color: var(--text-main);
  margin-top: 0.5rem;
  margin-bottom: 0.8rem;
}

.modal-intro {
  font-size: 0.94rem;
  color: var(--text-muted);
  line-height: 1.8;
  margin-bottom: 1.8rem;
}

.cosmos-features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
  gap: 1rem;
  margin-bottom: 1.8rem;
}

.cosmos-feature-box {
  background: var(--lab-inner-bg);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  padding: 1.2rem 1rem;
  text-align: center;
}

.feature-num {
  font-family: monospace;
  font-size: 1.1rem;
  font-weight: 800;
  color: var(--accent);
  display: block;
  margin-bottom: 0.4rem;
}

.cosmos-feature-box h4 {
  font-size: 0.9rem;
  color: var(--text-main);
  margin-bottom: 0.4rem;
}

.cosmos-feature-box p {
  font-size: 0.78rem;
  color: var(--text-muted);
  line-height: 1.6;
}

.modal-footer-note {
  font-size: 0.82rem;
  color: var(--text-muted);
  border-top: 1px solid var(--border-color);
  padding-top: 1rem;
  text-align: center;
}


/* تایپوگرافی کدهای علمی و برچسب‌های تخصصی */
.skill-chip, .stat-num, .pub-year, .feature-num {
  font-family: 'JetBrains Mono', monospace;
}

/* هاله تمرکز اعتبار و انرژی شهرت (Li Sector Glow) */
.fengshui-glow {
  border-color: rgba(88, 166, 255, 0.4);
  background: radial-gradient(circle at top left, rgba(88, 166, 255, 0.12), var(--bg-card));
  box-shadow: 0 0 25px rgba(88, 166, 255, 0.08);
}

/* کارت دعوت به همکاری و فانوس هدایت نگاه اساتید */
.academic-beacon {
  position: relative;
  background: linear-gradient(145deg, var(--bg-card), rgba(88, 166, 255, 0.05));
  border: 1px solid rgba(88, 166, 255, 0.3);
}

.beacon-pulse {
  position: absolute;
  top: 1.5rem;
  left: 1.5rem;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 0 rgba(88, 166, 255, 0.7);
  animation: pulse-ring 2.4s infinite cubic-bezier(0.45, 0, 0.2, 1);
}

@keyframes pulse-ring {
  0% {
    transform: scale(0.95);
    box-shadow: 0 0 0 0 rgba(88, 166, 255, 0.7);
  }
  70% {
    transform: scale(1);
    box-shadow: 0 0 0 10px rgba(88, 166, 255, 0);
  }
  100% {
    transform: scale(0.95);
    box-shadow: 0 0 0 0 rgba(88, 166, 255, 0);
  }
}

.beacon-text {
  font-size: 0.9rem;
  color: var(--text-muted);
  line-height: 1.8;
  margin-bottom: 1rem;
}
/* متمایزسازی اختصاصی جمله محبوب مانیفست */
.signature-quote {
  font-size: 1.28rem;
  font-weight: 800;
  line-height: 1.9;
  color: var(--text-main);
  padding: 1.2rem 1.4rem;
  margin-bottom: 1.2rem;
  border-right: 4px solid var(--accent);
  background: linear-gradient(270deg, rgba(88, 166, 255, 0.12), transparent);
  border-radius: 0 12px 12px 0;
  text-shadow: 0 0 18px var(--accent-glow);
  letter-spacing: -0.2px;
}

.about-narrative-short {
  font-size: 0.95rem;
  line-height: 1.85;
  color: var(--text-muted);
}

.about-narrative-short strong {
  color: var(--text-main);
  font-weight: 600;
}

/* ==========================================================================
   طراحی پرتره محوشونده در عمق فضا (Cosmic Vignette Portrait)
   ========================================================================== */
.hero-content {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 3.5rem;
  max-width: 1050px;
  margin: 0 auto;
  padding: 4rem 1.5rem;
  position: relative;
  z-index: 2;
}

.hero-avatar-wrapper {
  position: relative;
  width: 260px;
  height: 260px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* هاله نوری ملایم پشت تصویر */
.avatar-glow-ring {
  position: absolute;
  width: 100%;
  height: 100%;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(88, 166, 255, 0.28) 0%, rgba(138, 180, 248, 0.08) 55%, transparent 75%);
  filter: blur(16px);
  animation: pulse-avatar 4s ease-in-out infinite alternate;
  pointer-events: none;
}

@keyframes pulse-avatar {
  0% { transform: scale(0.92); opacity: 0.6; }
  100% { transform: scale(1.08); opacity: 0.95; }
}

/* تصویر پرتره با محوشدگی تدریجی لبه‌ها در پس‌زمینه */
.hero-avatar-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 50%;
  /* ماسک شعاعی برای حل کردن حاشیه‌ها در تاریکی فضا */
  -webkit-mask-image: radial-gradient(circle at center, black 48%, rgba(0, 0, 0, 0.6) 65%, transparent 78%);
  mask-image: radial-gradient(circle at center, black 48%, rgba(0, 0, 0, 0.6) 65%, transparent 78%);
  transition: transform 0.4s ease, filter 0.4s ease;
  filter: contrast(104%) brightness(98%);
}

.hero-avatar-wrapper:hover .hero-avatar-img {
  transform: scale(1.03);
  filter: contrast(108%) brightness(102%);
}

/* چیدمان متنی در کنار تصویر */
.hero-text-block {
  text-align: right;
  flex: 1;
}

/* واکنش‌گرایی در نمایش موبایل و تبلت */
@media (max-width: 820px) {
  .hero-content {
    flex-direction: column;
    text-align: center;
    gap: 2rem;
  }
  .hero-text-block {
    text-align: center;
  }
  .hero-actions {
    justify-content: center;
  }
  .hero-avatar-wrapper {
    width: 210px;
    height: 210px;
  }
}

/* ==========================================================================
   بخش چندرسانه‌ای (ویدیو و پادکست صوتی شیشه‌ای)
   ========================================================================== */
.media-grid {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 2rem;
  margin-top: 2rem;
}

.media-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 16px;
  padding: 1.8rem;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  transition: all 0.3s ease;
  display: flex;
  flex-direction: column;
}

.media-card:hover {
  border-color: var(--accent);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}

.media-badge {
  display: inline-block;
  align-self: flex-start;
  font-size: 0.75rem;
  padding: 0.25rem 0.65rem;
  border-radius: 4px;
  background: rgba(88, 166, 255, 0.12);
  color: var(--accent);
  margin-bottom: 0.8rem;
  font-family: 'JetBrains Mono', monospace;
}

.media-card-title {
  font-size: 1.12rem;
  font-weight: 700;
  color: var(--text-main);
  margin-bottom: 1.2rem;
  line-height: 1.6;
}

.media-card-desc {
  font-size: 0.9rem;
  color: var(--text-muted);
  line-height: 1.8;
  margin-top: 1rem;
}

/* کادر ویدیوی واکنش‌گرا و متناسب با هر رزولوشن */
.video-wrapper {
  position: relative;
  width: 100%;
  padding-bottom: 56.25%; /* نسبت استاندارد 16:9 */
  height: 0;
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid var(--border-color);
  background: #000;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.35);
}

.video-wrapper iframe {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
}

/* پنل پخش صوتی */
.audio-box {
  background: var(--lab-inner-bg);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  padding: 1.4rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  margin-bottom: 1.2rem;
}

.audio-disc-wrapper {
  margin-bottom: 1rem;
}

.audio-disc {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  background: radial-gradient(circle, #21262d 30%, var(--accent) 31%, #161b22 60%, var(--accent) 100%);
  border: 2px solid var(--accent);
  box-shadow: 0 0 15px var(--accent-glow);
  transition: transform 0.3s ease;
}

/* انیمیشن چرخش دیسک هنگام پخش صوت */
.audio-playing {
  animation: spin-disc 4s linear infinite;
}

@keyframes spin-disc {
  100% { transform: rotate(360deg); }
}

.audio-info {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
}

.track-title {
  font-size: 0.92rem;
  font-weight: 700;
  color: var(--text-main);
}

.track-author {
  font-size: 0.82rem;
  color: var(--accent);
}

/* تنظیم ظاهر تگ audio */
audio {
  filter: invert(0.85) hue-rotate(180deg);
  border-radius: 8px;
}

[data-theme="light"] audio {
  filter: none;
}

/* ریسپانسیو در نمایش گوشی و تبلت */
@media (max-width: 860px) {
  .media-grid {
    grid-template-columns: 1fr;
  }
}