/* ==========================
   فونت ها
========================== */
@font-face {
  font-family: 'Vazirmatn';
  src: url('fonts/Vazirmatn-Regular.woff2') format('woff2');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Vazirmatn';
  src: url('fonts/Vazirmatn-Bold.woff2') format('woff2');
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

/* ==========================
   Reset & Base
========================== */
* {margin:0; padding:0; box-sizing:border-box;}
html {scroll-behavior:smooth;}
body {
  font-family: 'Vazirmatn', sans-serif;
  line-height:1.6;
  color:#121212;
  background:#fefefe;
  transition: all 0.4s ease;
}
body.dark {background:#121212; color:#eaeaea;}
a {text-decoration:none; color:inherit;}
img {max-width:100%; height:auto; display:block;}
h1,h2,h3,h4,h5,h6 {margin-bottom:0.5em; font-weight:700;}

/* ==========================
   Top-left Buttons
========================== */
.top-left-buttons {
  position: fixed;
  top: 15px;
  left: 15px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  z-index: 1000;
}
.top-left-buttons a,
.top-left-buttons button {
  padding: 6px 14px;
  border-radius: 8px;
  background: #1e1e1e;
  color: #eaeaea;
  font-weight: 600;
  font-size: 0.95rem;
  transition: all 0.3s ease;
  text-decoration: none;
}
.top-left-buttons a:hover,
.top-left-buttons button:hover {
  background:#F9A825;
  color:#121212;
}

/* ==========================
   Header
========================== */
header.site-width {
  max-width: 1080px;
  margin: auto;
  padding: 40px 20px 25px 20px;
  text-align: center;
  position: relative;
  border-bottom: 2px solid rgba(249,168,37,0.4);
  background: linear-gradient(90deg, #fefefe 0%, #f5f5f5 100%);
  border-radius: 12px;
  transition: all 0.4s ease;
}
body.dark header.site-width {
  background: linear-gradient(90deg, #121212 0%, #1e1e1e 100%);
}

header .avatar {
  margin: 0 auto 15px auto;
  border-radius:50%;
  overflow:hidden;
  width:160px;
  height:160px;
  border: 3px solid #F9A825;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}
header .avatar:hover {
  transform: scale(1.05);
  box-shadow: 0 4px 15px rgba(249,168,37,0.5);
}

header h1 {font-size:2.6rem; margin-bottom:5px;}
header h2 {font-size:1.2rem; font-weight:400; margin-bottom:20px; color:#555;}
body.dark header h2 {color:#ccc;}

/* ==========================
   Navigation
========================== */
header nav {
  display:flex;
  justify-content:center;
  gap:8px;
  flex-wrap: nowrap;
  overflow-x:auto;
  padding-bottom:5px;
}
header nav::-webkit-scrollbar {display:none;}
header nav .nav-btn {
  padding:6px 10px;
  border-radius:8px;
  background: #e0e0e0;
  color:#121212;
  font-size:0.85rem;
  white-space: nowrap;
  font-weight:600;
  transition: all 0.3s ease;
  text-decoration: none;
}
header nav .nav-btn:hover {
  background:#F9A825;
  color:#121212;
}
body.dark header nav .nav-btn {
  background: #1e1e1e;
  color: #eaeaea;
}
body.dark header nav .nav-btn:hover {
  background:#F9A825;
  color:#121212;
}

/* ==========================
   Sections & Cards
========================== */
section {padding:60px 20px; max-width:1080px; margin:auto;}
section h2 {
  font-size:1.6rem;
  margin-bottom:25px;
  border-bottom:2px solid #F9A825;
  display:inline-block;
  padding-bottom:4px;
}
.card {
  background:#f5f5f5;
  padding:20px 25px;
  border-radius:16px;
  margin-bottom:20px;
  box-shadow:0 8px 20px rgba(0,0,0,0.1);
  opacity:0;
  transform:translateY(30px);
  transition:all 0.6s ease;
  color:#121212;
}
.card.visible {opacity:1; transform:translateY(0);}
.card:hover {box-shadow:0 12px 28px rgba(249,168,37,0.4); transform:translateY(-2px);}
body.dark .card {
  background:#1e1e1e;
  box-shadow:0 8px 20px rgba(0,0,0,0.3);
  color:#eaeaea;
}

/* ==========================
   Social Links - Footer
========================== */
.social-links {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 25px;
  flex-wrap: wrap;
  margin-top: 40px;
}

.social-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.social-item a {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 60px;
  height: 60px;
  border-radius: 50%;
  background: #0D3B66;
  color: #fff;
  transition: all 0.3s ease;
  text-decoration: none;
  cursor: pointer;
}

.social-item a:hover {
  background: #F9A825;
  color: #121212;
}

body.dark .social-item a {
  background: #222;
  color: #eee;
}

body.dark .social-item a:hover {
  background: #F9A825;
  color: #121212;
}

.social-item a svg {
  width: 28px;
  height: 28px;
}

.rg-icon a svg {
  width: 36px;
  height: 36px;
}

.social-item span {
  margin-top: 6px;
  font-size: 0.85rem;
  font-weight: 600;
  color: inherit;
  display: block;
  text-align: center;
  white-space: nowrap;
}

/* ==========================
   Responsive
========================== */
@media (max-width:768px){
  header h1 {font-size:2rem;}
  header h2 {font-size:1rem;}
  header nav .nav-btn {font-size:0.8rem; padding:5px 8px;}
  .card {padding:15px 18px;}
  .social-links a {width:50px; height:50px;}
  .social-item span {font-size:0.8rem;}
}