/* =================================================================
   1. Font Definitions (Local Fonts)
   ================================================================= */
   @font-face {
    font-family: 'Vazirmatn';
    src: url('fonts/Vazirmatn-Regular.woff2') format('woff2');
    font-weight: 400; /* Normal */
    font-style: normal;
    font-display: swap; /* Important for performance */
  }
  
  @font-face {
    font-family: 'Vazirmatn';
    src: url('fonts/Vazirmatn-Bold.woff2') format('woff2');
    font-weight: 700; /* Bold */
    font-style: normal;
    font-display: swap;
  }
  
  
  /* =================================================================
     2. Global Variables & Styles
     ================================================================= */
  :root {
      --text-color: #1c1e21;
      --primary-color: #0056b3;
      --secondary-color: #4b5563;
      --card-bg-color: rgba(255, 255, 255, 0.75);
      --card-border-color: rgba(255, 255, 255, 0.4);
      --shadow-color: rgba(0, 0, 0, 0.1);
      /* Gradient colors for light mode */
      --gradient-1: #e0c3fc;
      --gradient-2: #8ec5fc;
      --gradient-3: #f0f2f5;
  }
  
  [data-theme="dark"] {
      --text-color: #c9d1d9;
      --primary-color: #58a6ff;
      --secondary-color: #8b949e;
      --card-bg-color: rgba(22, 27, 34, 0.75);
      --card-border-color: rgba(255, 255, 255, 0.1);
      --shadow-color: rgba(0, 0, 0, 0.4);
      /* Gradient colors for dark mode */
      --gradient-1: #09203f;
      --gradient-2: #537895;
      --gradient-3: #121212;
  }
  
  @keyframes animated-gradient {
      0% { background-position: 0% 50%; }
      50% { background-position: 100% 50%; }
      100% { background-position: 0% 50%; }
  }
  
  * {
      margin: 0;
      padding: 0;
      box-sizing: border-box;
  }
  
  body {
      font-family: 'Vazirmatn', sans-serif;
      color: var(--text-color);
      line-height: 1.8;
      text-align: center;
      padding: 20px;
      background: linear-gradient(-45deg, var(--gradient-1), var(--gradient-2), var(--gradient-3));
      background-size: 400% 400%;
      animation: animated-gradient 15s ease infinite;
      transition: background 0.5s;
  }
  
  /* =================================================================
     3. Layout and Component Styles
     ================================================================= */
  header, main {
      position: relative;
      z-index: 2;
      max-width: 700px;
      margin: 0 auto;
  }
  
  section {
      background: var(--card-bg-color);
      backdrop-filter: blur(12px);
      -webkit-backdrop-filter: blur(12px);
      border: 1px solid var(--card-border-color);
      margin: 25px 0;
      padding: 30px;
      border-radius: 16px;
      box-shadow: 0 8px 32px 0 var(--shadow-color);
      transition: transform 0.3s ease, box-shadow 0.3s ease;
  }
  
  h1 {
      font-size: 3rem;
      font-weight: 700;
      color: var(--text-color);
      margin-bottom: 5px;
      letter-spacing: -1px;
  }
  
  h2 {
      font-size: 1.4rem;
      font-weight: 400;
      color: var(--secondary-color);
      min-height: 45px;
  }
  
  h3 {
      font-size: 1.6rem;
      font-weight: 700;
      margin-bottom: 20px;
      color: var(--primary-color);
      position: relative;
      display: inline-block;
      padding-bottom: 10px;
  }
  
  h3::after {
      content: '';
      position: absolute;
      width: 60%;
      height: 3px;
      background: var(--primary-color);
      bottom: 0;
      right: 50%;
      transform: translateX(50%);
      transition: width 0.3s ease;
  }
  
  section:hover h3::after {
      width: 100%;
  }
  
  header {
      margin-top: 40px;
      margin-bottom: 50px;
  }
  
  .avatar {
      width: 160px;
      height: 160px;
      border-radius: 50%;
      border: 4px solid var(--card-bg-color);
      box-shadow: 0 0 25px var(--shadow-color), 0 0 0 6px var(--primary-color);
      margin-bottom: 25px;
      transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275), box-shadow 0.4s ease;
  }
  
  .avatar:hover {
      transform: scale(1.08) rotate(8deg);
      box-shadow: 0 0 35px var(--shadow-color), 0 0 0 8px var(--primary-color);
  }
  
  .skills ul {
      list-style-type: none;
      padding: 0;
      display: flex;
      flex-wrap: wrap;
      justify-content: center;
      gap: 12px;
  }
  
  .skills li {
      background: var(--bg-color);
      padding: 10px 20px;
      border-radius: 20px;
      font-size: 1rem;
      font-weight: 500;
      transition: transform 0.2s ease, background-color 0.2s ease;
      border: 1px solid transparent;
  }
  
  .skills li:hover {
      transform: translateY(-4px);
      background-color: var(--primary-color);
      color: #fff;
      border-color: var(--primary-color);
  }
  
  .social-icons {
      display: flex;
      justify-content: center;
      gap: 25px;
  }
  
  .social-icons a {
      color: var(--secondary-color);
      font-size: 2.2rem;
      transition: color 0.3s ease, transform 0.3s ease;
  }
  
  .social-icons a:hover {
      color: var(--primary-color);
      transform: scale(1.2) rotate(-10deg);
  }
  
  .theme-switch-wrapper {
      position: fixed;
      top: 15px;
      right: 15px;
      z-index: 1000;
  }
  
  .theme-switch {
      position: relative;
      display: inline-block;
      width: 60px;
      height: 34px;
  }
  
  .theme-switch input {
      opacity: 0;
      width: 0;
      height: 0;
  }
  
  .slider {
      position: absolute;
      cursor: pointer;
      top: 0;
      left: 0;
      right: 0;
      bottom: 0;
      background-color: #ccc;
      transition: .4s;
      border-radius: 34px;
  }
  
  .slider:before {
      position: absolute;
      content: "";
      height: 26px;
      width: 26px;
      left: 4px;
      bottom: 4px;
      background-color: white;
      transition: .4s;
      border-radius: 50%;
  }
  
  input:checked+.slider {
      background-color: var(--primary-color);
  }
  
  input:checked+.slider:before {
      transform: translateX(26px);
  }

.link-post {
    text-decoration: none;
    color: var(--text-color);
    font-size: 20px;
}