
/*----------------*\ 
  #CUSTOM PROPERTY
\*----------------*/

.light-theme {

  /* light theme colors */

  --background-primary: hsl(0, 0%, 100%);
  --background-secondary: hsl(0, 0%, 97%);

  --action-primary: hsl(214, 32%, 91%);
  --action-secondary: hsl(210, 38%, 95%);

  --foreground-primary: hsl(218, 23%, 23%);
  --foreground-secondary: hsl(216, 15%, 52%);
  --foreground-tertiary: hsl(214, 20%, 69%);


  /* --accent: hsl(229, 76%, 66%); */

  --accent:rgb(128, 95, 197);

}
body{
   font-family: "Vazirmatn", Tahoma, "Segoe UI", sans-serif;
   
}
.dark-theme {

  /* dark theme colors */

  --background-primary: hsl(218, 23%, 23%);
  --background-secondary: hsl(220, 26%, 14%);


  --action-primary: hsl(216, 15%, 52%);
  --action-secondary: hsl(218, 23%, 23%);

  --foreground-primary: hsl(210, 38%, 95%);
  --foreground-secondary: hsl(211, 25%, 84%);
  --foreground-tertiary: hsl(214, 20%, 69%);

  /* --accent: hsl(229, 76%, 66%); */
 --accent:rgb(128, 95, 197);
}

:root {

  /* color */

  --white: hsl(0, 0%, 100%);

  /* typography */

  --fs-base: 0.85rem;
  --fs-1: 3.4rem;
  --fs-2: 1.5rem;
  --fs-3: 1.25rem;
  --fs-4: 0.875rem;
  --fs-5: 0.75rem;

  /* spacing */

  --py: 5rem;

}





/*-----------------------------------*\ 
  #RESET
\*-----------------------------------*/

*, *::before, *::after {
  margin:  0;
  padding: 0;
  box-sizing: border-box;
}

a { text-decoration: none; }

li { list-style: none; }

img, button { display: block; }

a, span { display: inline-block; }

button {
  font: inherit;
  border: none;
  background: none;
  cursor: pointer;
}

html {
  font-family: "Inter", sans-serif;
  font-size: var(--fs-base); /* base font-size (0.85rem = 13.6px) */
  line-height: 1.5;
  scroll-behavior: smooth;
  scroll-padding-top: 90px;
}

:focus { outline-offset: 4px; }


/**
 * scrollbar style
 */

::-webkit-scrollbar { width: 16px; }


::-webkit-scrollbar-thumb {
  background: var(--accent);
  border-radius: 20px;
  border: 4px solid;
}

.light-theme::-webkit-scrollbar-thumb { border-color: hsl(0, 0%, 90%); }

.dark-theme::-webkit-scrollbar-thumb { border-color: hsl(219, 27%, 20%); }

.light-theme::-webkit-scrollbar-track { background: hsl(0, 0%, 90%); }

.dark-theme::-webkit-scrollbar-track { background: hsl(219, 27%, 20%); }





/*-----------------------------------*\ 
  #BASE STYLE
\*-----------------------------------*/

.h1,
.h2,
.h3,
.h4 {
  display: block;
  color: var(--foreground-primary);
}

.h1 {
  font-size: var(--fs-1);
  font-weight: 900;
}

.h2 {
  font-size: var(--fs-2);
  font-weight: 700;
}

.h3 {
  font-size: var(--fs-3);
  font-weight: 700;
}

.h4 {
  font-size: var(--fs-4);
  font-weight: 700;
}

.text-sm { font-size: var(--fs-4); }

.text-tiny { font-size: var(--fs-5); }





/*-----------------------------------*\ 
  #REUSED STYLE
\*-----------------------------------*/

.container {
  margin-inline: auto;
  margin: auto; /* fallback for margin-inline */
  padding: 0 15px;
}

.btn {
  min-width: 10rem;
  border-radius: 100px;
}

.btn-primary {
  background: var(--accent);
  color: var(--white);
  padding: 0.6875rem 1.1875rem;
}

.btn-primary:hover {
  background: var(--foreground-secondary);
  color: var(--action-primary);
}

.btn-secondary {
  background: var(--action-secondary);
  color: var(--foreground-secondary);
  padding: 0.5rem 1rem;
  border: 3px solid var(--foreground-tertiary);
}

.btn-secondary:hover { border-color: var(--accent); }





/*-----------------------------------*\ 
  #Extra style for dark theme
\*-----------------------------------*/

.dark-theme .btn-primary:hover { color: var(--background-primary); }

.dark-theme .blog-topic {
  background: var(--action-primary);
  color: var(--foreground-secondary);
}

.dark-theme .blog-topic:hover {
  background: var(--foreground-primary);
  color: var(--action-primary);
}

.dark-theme .load-more:hover { color: var(--white); }

.dark-theme .aside .h2 { color: var(--foreground-primary); }




/*-----------------------------------*\ 
  #HEADER
\*-----------------------------------*/

header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--background-primary);
  transition: box-shadow 0.3s ease;
}

header.scrolled { box-shadow: 0 10px 28px -14px hsla(0, 0%, 0%, 0.28); }

header.scrolled .navbar { padding: 12px 0; }

header .flex-wrapper { display: none; }

.navbar {
  display:         flex;
  flex-direction:  row-reverse;
  justify-content: space-between;
  align-items:     center;
  gap: 15px;
  padding: 15px 0;
  transition: padding 0.3s ease;
}

.logo-light,
.logo-dark { display: none; }

.light-theme .logo-light,
.dark-theme .logo-dark { display: block; }

header .btn-group {
  display:     flex;
  align-items: center;
  gap: 15px;
}

.theme-btn-mobile,
.nav-menu-btn,
.nav-close-btn {
  background: var(--action-secondary);
  color: var(--foreground-tertiary);
  width:  40px;
  height: 40px;
  display:         flex;
  justify-content: center;
  align-items:     center;
  border-radius: 50%;
  font-size: 25px;
}

:is(.theme-btn-mobile,
.nav-menu-btn,
.nav-close-btn):hover {
  background: var(--accent);
  color: var(--white);
}

.theme-btn-mobile ion-icon { display: none; }

.theme-btn-mobile.light .sun,
.theme-btn-mobile.dark .moon { display: block; }

.mobile-nav {
  position: fixed;
  inset: 0;
  background: var(--background-primary);
  padding: 70px 20px;
  overflow: auto;
  overscroll-behavior: contain;
  transform: translateX(100%);
  visibility: hidden;
  transition: 0.5s cubic-bezier(1, 0, 0.30, 0.70);
  z-index: 10;
}

.mobile-nav.active {
  transform: translateX(0);
  visibility: visible;
}

.nav-close-btn {
  position: absolute;
  top:   20px;
  right: 20px;
}

.mobile-nav .wrapper {
  padding-bottom: 1.25rem;
  margin-bottom:  1.25rem;
  border-bottom: 1px solid var(--action-primary);
}

.mobile-nav .nav-title { margin-bottom: 1rem; }

.mobile-nav .nav-item { margin-bottom: 0.5rem; }

.mobile-nav .nav-link {
  font-size: var(--fs-3);
  color: var(--foreground-secondary);
}

.mobile-nav .nav-link:hover { color: var(--accent); }





/*-----------------------------------*\ 
  #HERO SECTION
\*-----------------------------------*/

*hero{
  margin-top: 10px;
}


.hero {
  background: var(--background-primary);
  padding-top:    -1rem;
  padding-bottom: var(--py);
  text-align: center;
}

.hero .h1 {
  margin-bottom: 1rem;
  line-height: 1.6;
}

.hero b {
  color: var(--accent);
  font-weight: inherit;
}

.hero .h3 {
  color: var(--foreground-secondary);
  margin-bottom: 2rem;
} 

.hero .btn-group {
  display:         flex;
  justify-content: center;
  flex-wrap:       wrap;
  gap: 15px;
  text-align: center;
}

.hero .right {
  position: relative;
  display:         flex;
  justify-content: center;
  align-items:     center;
  margin-top: 5px;
}

.hero .pattern-bg {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 100%;
  height: 200px;
  background: url(../images/pattern.png);
  background-size: contain;
  opacity: 0.2;
}

.hero .img-box {
  position: relative;
  z-index: 2;
}

.hero-img {
  width:  100%;
  height: 100%;
  object-fit: contain;
  border-radius: 0 0 280px 230px;
  transform: translate(10px, -10px);
}

.hero .shape {
  position: absolute;
  top:  50%;
  left: 50%;
  border-radius: 50%;
  transform: translate(-50%, -42%) rotate(-20deg);
}

.hero .shape-1 {
  background: var(--accent);
  width:  90%;
  height: 90%;
  z-index: -1;
}

.hero .shape-2 {
  width:  92%;
  height: 92%;
  box-shadow: inset 0 -30px 0 var(--action-primary);
  z-index: 2;
}







/*-----------------------------------*\ 
  #BLOG SECTION
\*-----------------------------------*/

.main {
  background: var(--background-secondary);
  padding: var(--py) 0;
}

.blog .h2 {
  line-height: 1.3;
  margin-bottom: 3rem;
  text-align: center;
}

.blog-card-group { margin-bottom: 3rem; }

.blog-card {
  background: var(--background-primary);
  padding: 10px;
  margin-bottom: 1rem;
  border-radius: 10px;
  box-shadow: 0 10px 10px hsla(0, 0%, 0%, 0.05);
  transition: 0.25s ease;
}

.blog-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 10px hsla(0, 0%, 0%, 0.1);
}

.blog-card-banner { display: none; }

.blog-content-wrapper { padding: 10px 5px; }

.blog-topic {
  background: var(--action-secondary);
  color: var(--foreground-secondary);
  font-weight: 600;
  padding: 0.25rem 1rem;
  border-radius: 5px;
  margin-bottom: 1rem;
}

.blog-topic:hover {
  background: var(--foreground-secondary);
  color: var(--action-secondary);
}

.blog-card .h3 {
  line-height: 1.4;
  margin-bottom: 1rem;
} 

.blog-card .h3:hover {
  text-decoration: underline;
  text-decoration-thickness: 2px;
}

.blog-text,
.profile-wrapper { display: none; }

.blog .wrapper {
  display:         flex;
  justify-content: space-between;
  align-items:     center;
  flex-wrap:       wrap;
  gap: 15px;
}

.blog .h4 { color: var(--foreground-secondary); }

.blog .h4:hover { color: var(--accent); }

.blog .text-sm {
  display:     flex;
  align-items: center;
  gap: 5px;
  color: var(--foreground-tertiary);
}

.blog .separator {
  background: var(--foreground-tertiary);
  margin-inline: 3px;
  margin: 0 3px; /* fallback for margin-inline */
  width:  3px;
  height: 3px;
  border-radius: 3px;
}

.blog ion-icon { --ionicon-stroke-width: 50px; }

.load-more {
  margin-inline: auto;
  margin: auto; /* fallback for margin-inline */
  background: var(--foreground-secondary);
  color: var(--background-secondary);
  padding: 0.6875rem 1.1875rem;
}

.load-more:hover { background: var(--accent); }





/*-----------------------------------*\ 
  #ASIDE
\*-----------------------------------*/

.aside { display: none; }





/*-----------------------------------*\ 
  #FOOTER
\*-----------------------------------*/

footer { background: var(--background-primary); }

footer .container {
  padding: var(--py) 15px;
  display: grid;
  grid-template-columns: 1fr;
  gap: 30px;
}

footer .wrapper { text-align: center; }

.footer-logo { margin-bottom: 10px; }

.footer-text {
  color: var(--foreground-secondary);
  max-width: 300px;
  margin-inline: auto;
  margin: auto; /* fallback for margin-inline */
}

.footer-title {
  color: var(--foreground-primary);
  font-weight: 700;
  margin-bottom: 0.4rem;
}

.footer-link { color: var(--foreground-secondary); }

.footer-link:hover { color: var(--accent); }

.copyright {
  color: var(--foreground-secondary);
  font-size: var(--fs-4);
  text-align: center;
  padding: 1rem;
  border-top: 1px solid var(--action-primary);
}

.copyright a {
  color: var(--accent);
  font-weight: 500;
}

.copyright a:hover { text-decoration: underline; }





/*-----------------------------------*\ 
  #MEDIA QUERIES
\*-----------------------------------*/

/**
 * responsive for larger than 550px screen
 */

@media (min-width: 550px) {

  :root {

    /**
     * typography 
     */

    --fs-base: 0.90rem;

  }


  /**
   * BLOG 
   */

  .blog-card {
    display: grid;
    grid-template-columns: 3fr 4fr;
    gap: 20px;
  }

  .blog-card-banner {
    display: block;
    overflow: hidden;
    border-radius: 5px;
  }

  .blog-banner-img {
    width:  100%;
    height: 100%;
    object-fit: cover;
  }

}





/**
 * responsive for larger than 650px screen
 */

@media (min-width: 650px) {

  :root {

    /**
     * typography 
     */

    --fs-1: 2.25rem;

  }



  /**
   * REUSED STYLE 
   */

  .container { padding: 0 30px; }



  /**
   * HEADER 
   */

  .navbar { padding: 30px 0; }



  /**
   * BLOG 
   */

  .blog .h2 {
    position: relative;
    text-align: left;
    padding-left: 2rem;
  }

  .blog .h2::before {
    content: '';
    position: absolute;
    top:  0;
    left: 0;
    background: var(--action-primary);
    width:  5px;
    height: 100%;
    border-radius: 5px;
  }

  .blog-text,
  .profile-wrapper { display: block; }

  .blog-text {
    color: var(--foreground-secondary);
    font-size: var(--fs-4);
    display: -webkit-box;
    line-clamp: 3;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    margin-bottom: 1rem;
  }

  .blog .wrapper-flex {
    display:         flex;
    justify-content: start;
    align-items:     center;
    gap: 10px;
  }

  .profile-wrapper {
    width:  56px;
    height: 56px;
    background: var(--action-primary);
    padding: 3px;
    border-radius: 50%;
  }

  .profile-wrapper img { border-radius: 50%; }

  .blog .wrapper {
    flex-direction: column;
    align-items: start;
    gap: 0;
  }



  /**
   * FOOTER 
   */

  footer .container {
    padding: var(--py) 30px;
    grid-template-columns: 2fr 1fr 1fr;
  }

  footer .wrapper { text-align: left; }

  .footer-text { margin: 0; }

}





/**
 * responsive for larger than 768px screen
 */

@media (min-width: 768px) {

  /**
   * REUSED STYLE 
   */

  .container { max-width: 800px; }

}





/**
 * responsive for larger than 1024px screen
 */

@media (min-width: 1024px) {

  :root {

    /**
     * typography 
     */

    --fs-base: 1rem;
    --fs-1: 3rem;

  }



  /**
   * REUSED STYLE 
   */

  .container { max-width: 1150px; }



  /**
   * HEADER 
   */

  header .btn-group { display: none; }

  header .flex-wrapper { display: contents; }

  .navbar {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    direction: ltr;
  }

  .navbar > a { grid-column: 3; grid-row: 1; justify-self: end; }
  .desktop-nav { grid-column: 2; grid-row: 1; }
  .theme-btn-desktop { grid-column: 1; grid-row: 1; justify-self: start; }

  .desktop-nav {
    display:     flex;
    align-items: center;
    gap: 30px;
  }

  .desktop-nav .nav-link {
    color: var(--foreground-secondary);
    font-weight: 700;
  }

  .desktop-nav .nav-link:hover { color: var(--accent); }

  .theme-btn-desktop {
    position: relative;
    background: var(--background-secondary);
    color: var(--white);
    width:  52px;
    height: 26px;
    display:         flex;
    justify-content: center;
    align-items:     center;
    gap: 10px;
    border-radius: 100px;
  }

  .theme-btn-desktop.light {
    background: linear-gradient(45deg, hsl(7, 100%, 71%), hsl(46, 100%, 65%));
  }

  .theme-btn-desktop.dark {
    background: linear-gradient(45deg, hsl(225, 100%, 60%), hsl(296, 80%, 40%));
  }

  .theme-btn-desktop::before {
    content: '';
    position: absolute;
    background: var(--white);
    width:  21px;
    height: 21px;
    border-radius: 30px;
    top: 50%;
    left: 3px;
    transform: translateY(-50%);
    box-shadow: 0 2px 10px -2px hsla(0, 0%, 0%, 0.05);
    z-index: 2;
  }

  .theme-btn-desktop.dark::before { left: calc(100% - 24px); }



  /**
   * HERO 
   */

  .hero { text-align: left; }

  .hero .container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    align-items: center;
    gap: 50px;
  }

  .hero .btn-group {
    justify-content: start;
    gap: 30px;
  }

  .hero .right {
    position: relative;
    display:         flex;
    justify-content: center;
    align-items:     center;
  }

  .hero .pattern-bg {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 100%;
    height: 200px;
    background: url(../images/pattern.png);
    background-size: contain;
    opacity: 0.2;
  }

  .hero .img-box {
    position: relative;
    z-index: 2;
  }

  .hero-img {
    width:  100%;
    height: 100%;
    object-fit: contain;
    border-radius: 0 0 280px 230px;
    transform: translate(10px, -10px);
  }

  .hero .shape {
    position: absolute;
    top:  50%;
    left: 50%;
    border-radius: 50%;
    transform: translate(-50%, -42%) rotate(-20deg);
  }

  .hero .shape-1 {
    background: var(--accent);
    width:  90%;
    height: 90%;
    z-index: -1;
  }

  .hero .shape-2 {
    width:  92%;
    height: 92%;
    box-shadow: inset 0 -30px 0 var(--action-primary);
    z-index: 2;
  }



  /**
   * MAIN 
   */

  .main .container {
    display: grid;
    grid-template-columns: 5fr 2fr;
    gap: 60px;
  }



  /**
   * ASIDE 
   */

  .aside {
    display: block;
    align-self: stretch;
  }

  .aside .h2 {
    color: var(--foreground-secondary);
    margin-bottom: 3rem;
    text-align: center;
    line-height: 1.3;
  }

  .aside .wrapper {
    background: var(--background-primary);
    border-radius: 10px;
    padding: 40px;
    box-shadow: 0 5px 5px hsla(0, 0%, 0%, 0.05);
  }

  .topics { margin-bottom: 3rem; }

  .topic-btn {
    display:     flex;
    align-items: stretch;
    background: var(--background-primary);
    border-radius: 10px;
    box-shadow: 0 5px 5px hsla(0, 0%, 0%, 0.05);
    overflow: hidden;
  }

  .topic-btn:not(:last-child) { margin-bottom: 1rem; }

  .topic-btn .icon-box {
    font-size: 22px;
    width: 70px;
    display:         flex;
    justify-content: center;
    align-items:     center;
    background: var(--action-primary);
    color: var(--foreground-secondary);
  }

  .topic-btn:hover .icon-box {
    background: var(--accent);
    color: var(--white);
  }

  .topic-btn ion-icon { --ionicon-stroke-width: 40px; }

  .topic-btn p {
    padding: 15px;
    color: var(--foreground-secondary);
    font-weight: 700;
  }

  .tags { margin-bottom: 3rem; }

  .tags .wrapper {
    display:   flex;
    flex-wrap: wrap;
    gap: 0.2rem;
  }

  .tags .hashtag {
    background: var(--action-primary);
    color: var(--foreground-secondary);
    padding: 5px 10px;
    font-size: var(--fs-5);
    font-weight: 700;
    border-radius: 5px;
  }

  .tags .hashtag:hover {
    background: var(--foreground-secondary);
    color: var(--action-primary);
  }

  .contact { margin-bottom: 3rem; }

  .contact p {
    color: var(--foreground-secondary);
    margin-bottom: 1rem;
  }

  .social-link {
    display:         flex;
    justify-content: center;
    align-items:     center;
    gap: 10px;
  }

  .social-link .icon-box {
    width:  45px;
    height: 45px;
    background: var(--action-secondary);
    border-radius: 50%;
    display:         flex;
    justify-content: center;
    align-items:     center;
    font-size: 22px;
  }

  .social-link .discord { color: hsl(235, 86%, 65%); }

  .social-link .twitter { color: hsl(203, 89%, 53%); }

  .social-link .facebook { color: hsl(220, 46%, 48%); }
  
  .social-link .icon-box:hover {
    background: var(--accent);
    color: var(--white);
  }

  .newsletter {
    position: sticky;
    top: 7rem;
    margin-bottom: 98px;
  }

  .newsletter p {
    color: var(--foreground-secondary);
    margin-bottom: 1rem;
  }

  .newsletter input {
    border: none;
    background: var(--action-primary);
    display: block;
    width: 100%;
    padding: 0.5rem 1rem;
    font: inherit;
    color: var(--foreground-secondary);
    border-radius: 5px;
    margin-bottom: 1rem;
  }

  .newsletter input::placeholder { color: inherit; }

  .newsletter input:focus {
    outline: 2px solid;
    outline-offset: 0;
  }

  .newsletter .btn-primary {
    margin-inline: auto;
    margin: auto; /* fallback for margin-inline */
  }



  /**
   * FOOTER 
   */

  .footer-title { font-size: 1.125rem; }

  .footer-link { margin-bottom: 0.3rem; }

}

























/*-----------------------------------*\ 
  #SKILLS
\*-----------------------------------*/

.skills {
  background: var(--background-secondary);
  padding: var(--py) 0;
}

.skills .h2 {
  text-align: center;
  line-height: 1.3;
  margin-bottom: 3rem;
}

.skills-grid {
  display:         flex;
  flex-wrap:       wrap;
  justify-content: center;
  gap: 15px;
}

.skill-card {
  position: relative;
  width: 100px;
  display:         flex;
  flex-direction:  column;
  justify-content: center;
  align-items:     center;
  gap: 10px;
  cursor: pointer;
}

.skill-icon-box {
  width:  100px;
  height: 92px;
  display:         flex;
  flex-direction:  column;
  justify-content: center;
  align-items:     center;
  gap: 8px;
  background: hsla(229, 76%, 66%, 0.06);
 border: 2px solid hsla(229, 76%, 66%, 0.10);
  border-radius: 16px;
  transition: 0.3s ease;
}

.skill-icon {
  width:  36px;
  height: 36px;
  object-fit: contain;
  transition: 0.3s ease;
}

.skill-percent {
  color: var(--foreground-primary);
  font-size: var(--fs-5);
  font-weight: 900;
  transition: 0.3s ease;
}

.skill-name {
  color: var(--foreground-secondary);
  font-size: var(--fs-5);
  font-weight: 700;
  text-align: center;
}

/* hover: box fills/brightens and percent goes purple - name stays put */
.skill-card:hover .skill-icon-box {
  background: hsla(229, 76%, 66%, 0.16);
  border-color: var(--accent);
  box-shadow: 0 0 25px hsla(229, 76%, 66%, 0.35);
}

.skill-card:hover .skill-icon {
  transform: scale(1.08);
}

.skill-card:hover .skill-percent { color: var(--accent); }





/*-----------------------------------*\
  #ABOUT
\*-----------------------------------*/

.about {
  background: var(--background-primary);
  padding: var(--py) 0;
  direction: rtl;
  border-bottom: 1px solid var(--action-primary);
  scroll-margin-top: 20px;
}

.about .container {
  display: grid;
  grid-template-columns: 1fr;
  align-items: center;
  gap: 2.5rem;
}

.about-label {
  color: var(--accent);
  font-size: var(--fs-5);
  font-weight: 700;
  margin-bottom: 0.75rem;
}

.about-title {
  color: var(--foreground-primary);
  font-size: clamp(1.9rem, 4.2vw, 3.4rem);
line-height: 1.55;
  margin-bottom: 1.25rem;
  font-weight: 800;
}

.about-accent { color: var(--accent); }

.about-text {
  max-width: 540px;
  color: var(--foreground-secondary);
  font-size: var(--fs-4);
  line-height: 2.2;
  margin-bottom: 1.75rem;
}

.about-link {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--accent);
  font-size: var(--fs-4);
  font-weight: 700;
  transition: gap 0.3s ease, color 0.3s ease;
}

.about-link ion-icon {
  font-size: 18px;
  transition: transform 0.3s ease;
}

.about-link:hover { gap: 16px; color: var(--foreground-primary); }

.about-link:hover ion-icon { transform: translateX(-4px); }
.about-media {
  position: relative;
  aspect-ratio: 1 / 1.25;
  height: auto;
  align-self: center;
  max-width: 360px;
  width: 100%;
  margin-inline: auto;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  overflow: hidden;
  /* arch: round dome on top, softly rounded square at the bottom */
  border-radius: 50% 50% 40px 40px / 40% 40% 40px 40px;
  border: none;
  background:
    radial-gradient(circle at 50% 78%, hsla(229, 76%, 66%, 0.18), transparent 60%),
    linear-gradient(180deg, hsla(229, 76%, 66%, 0.10), hsla(229, 76%, 66%, 0.04));
  transition: transform 0.5s ease, box-shadow 0.5s ease;
}

.about-img {
  width: 100%;
  height: auto;
  aspect-ratio: 1 / 1;
  object-fit: contain;
  object-position: center bottom;
  transform-origin: center bottom;
  transition: transform 0.5s ease;
}

/* while src is empty, hide the broken-image icon */
.about-img[src=""] { visibility: hidden; }

.about-media:hover {
  transform: translateY(-6px);
  box-shadow: 0 24px 50px -22px hsla(229, 76%, 66%, 0.45);
}

.about-media:hover .about-img { transform: scale(1.03); }

@media (min-width: 768px) {
  .about .container {
    grid-template-columns: 1.15fr 0.85fr;
    gap: 3rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  .about-media, .about-img, .about-link, .about-link ion-icon { transition: none; }
}



/*-----------------------------------*\
  #SERVICES
\*-----------------------------------*/

.services {
  background: var(--background-primary);
  padding: var(--py) 0;
  direction: rtl;
}

.services .h2 {
  text-align: center;
  line-height: 1.3;
  margin-bottom: 3rem;
}

.services-accent { color: var(--accent); }

.services-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.25rem;
}

.service-card {
  position: relative;
  display: flex;
  flex-direction: column;
  min-height: 100px;
  padding: 28px;
  border-radius: 36px;
  background: var(--background-secondary);
  border: 1.5px solid transparent;
  transition: transform 0.4s ease, border-color 0.4s ease,
              box-shadow 0.4s ease, background 0.4s ease;
}

.service-num {
  position: absolute;
  top: 26px;
  inset-inline-end: 28px;
  color: var(--foreground-tertiary);
  font-family: "Inter", sans-serif;
  font-size: var(--fs-5);
  font-weight: 800;
  transition: color 0.3s ease;
}

.service-icon {
  width: 84px;
  aspect-ratio: 1 / 1;
  border-radius: 26px;
  overflow: hidden;
  background: hsla(229, 76%, 66%, 0.14);
  transition: transform 0.4s ease;
}

.service-icon img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* while src is empty, hide the broken-image icon */
.service-icon img[src=""] { visibility: hidden; }

.service-body { margin-top: auto; padding-top: 1.5rem; }

.service-title {
  color: var(--foreground-primary);
  font-size: var(--fs-3);
  font-weight: 800;
  line-height: 1.5;
  margin-bottom: 0.6rem;
}

.service-desc {
  color: var(--foreground-secondary);
  font-size: var(--fs-4);
  line-height: 2;
}

.service-arrow {
  margin-top: 1.5rem;
  font-size: 22px;
  color: var(--accent);
  transition: transform 0.3s ease;
}

/* gentle hover: soft lift, faint accent outline, icon + arrow nudge */
.service-card:hover,
.service-card:focus-visible {
  transform: translateY(-8px);
  border-color: hsla(229, 76%, 66%, 0.35);
  background: hsla(229, 76%, 66%, 0.06);
  box-shadow: 0 22px 44px -26px hsla(229, 76%, 66%, 0.5);
}

.service-card:hover .service-icon { transform: scale(1.06); }
.service-card:hover .service-num { color: var(--accent); }
.service-card:hover .service-arrow { transform: translateX(-6px); }

@media (min-width: 650px) {
  .services-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (min-width: 1024px) {
  .services-grid { grid-template-columns: repeat(4, 1fr); }
  .service-card { min-height: 200px; }
}

@media (prefers-reduced-motion: reduce) {
  .service-card, .service-icon, .service-arrow, .service-num { transition: none; }
}



/*-----------------------------------*\
  #PORTFOLIO
\*-----------------------------------*/

.portfolio {
  background: var(--background-secondary);
  padding: var(--py) 0;
  direction: rtl;
}

.portfolio .h2 {
  text-align: center;
  line-height: 1.3;
  margin-bottom: 3rem;
}

.portfolio-accent { color: var(--accent); }

.work-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5rem;
}

/* the card itself never moves or changes on hover */
.work-card {
  position: relative;
  display: block;
  aspect-ratio: 2.05 / 1;
  overflow: hidden;
  border-radius: 5px;
  background:
    linear-gradient(145deg, hsla(229, 76%, 66%, 0.10), transparent 60%),
    var(--background-primary);
  border: 1.5px solid hsla(229, 76%, 66%, 0.12);
}

.work-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top center;
}

/* while src is empty, hide the broken-image icon */
.work-img[src=""] { visibility: hidden; }

/* the purple layer: slowly and softly slides up on hover */
.work-overlay {
  position: absolute;
  inset-inline: 14px;
  bottom: 14px;
  display: flex;
  align-items: center;
  gap: 18px;
  padding: 20px 24px;
  border-radius: 22px;
  color: var(--white);
  background: linear-gradient(135deg, hsla(236, 72%, 50%, 0.94), hsla(258, 68%, 46%, 0.94));
  transform: translateY(calc(100% + 28px));
  opacity: 0;
  transition: transform 0.9s cubic-bezier(0.25, 0.8, 0.25, 1),
              opacity 0.8s ease;
}

.work-text { flex: 1; min-width: 0; }

.work-title {
  color: var(--white);
  font-size: var(--fs-2);
  font-weight: 800;
  line-height: 1.5;
  margin-bottom: 0.4rem;
}

.work-desc {
  color: hsla(0, 0%, 100%, 0.9);
  font-size: var(--fs-4);
  line-height: 1.9;
}

.work-arrow {
  flex-shrink: 0;
  width: 34px;
  height: 34px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.work-card:hover .work-overlay,
.work-card:focus-visible .work-overlay {
  transform: translateY(0);
  opacity: 1;
}

@media (min-width: 768px) {
  .work-grid { grid-template-columns: repeat(2, 1fr); }
}

/* touch screens can't hover: keep a compact info layer visible */
@media (hover: none) {
  .work-overlay {
    transform: none;
    opacity: 1;
    padding: 14px 18px;
  }
  .work-title { font-size: var(--fs-3); margin-bottom: 0.2rem; }
  .work-desc {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
  }
  .work-arrow { width: 26px; height: 26px; }
}

@media (prefers-reduced-motion: reduce) {
  .work-overlay { transition: none; }
}















/*-----------------------------------*\
  #BLOG POST (صفحه‌ی مقاله)
  این کدها را آخر style.css اصلی سایت بگذارید.
\*-----------------------------------*/

.post { direction: rtl; }

/* ---------- بالای صفحه: مثل بخش «درباره من» ---------- */
.post-hero {
  background: var(--background-primary);
  padding: var(--py) 0 3rem;
  border-bottom: 1px solid var(--action-primary);
}

.post-hero .container {
  display: grid;
  grid-template-columns: 1fr;
  align-items: center;
  gap: 2.5rem;
}

/* مسیر صفحه */
.post-crumbs {
  display: flex;
  align-items: center;
  gap: .6rem;
  margin-bottom: .9rem;
  font-size: var(--fs-5);
  font-weight: 700;
}

.post-crumbs a { color: var(--accent); transition: color .2s ease; }
.post-crumbs a:hover { color: var(--foreground-primary); }

.post-crumb-sep {
  width: 6px;
  height: 6px;
  border-left: 1.6px solid var(--foreground-tertiary);
  border-bottom: 1.6px solid var(--foreground-tertiary);
  transform: rotate(45deg);
}

/* تیتر درشت (h1): ترکیب مشکی و بنفش مثل بقیه‌ی تیترها */
.post-title {
  margin-bottom: 1.25rem;
  color: var(--foreground-primary);
  font-size: clamp(1.9rem, 4.2vw, 3.4rem);
  font-weight: 800;
  line-height: 1.55;
}

.post-accent { color: var(--accent); }

/* توضیح زیر تیتر */
.post-lead {
  max-width: 540px;
  margin-bottom: 1.75rem;
  color: var(--foreground-secondary);
  font-size: var(--fs-4);
  line-height: 2.2;
}

/* نویسنده، تاریخ، زمان مطالعه */
.post-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: .9rem 1.5rem;
}

.post-author {
  display: flex;
  align-items: center;
  gap: .7rem;
}

.post-author img {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  object-fit: cover;
  background: var(--action-secondary);
}

.post-meta-item {
  display: inline-flex;
  align-items: center;
  gap: .4rem;
  color: var(--foreground-secondary);
  font-size: var(--fs-4);
}

.post-meta-item svg { flex: none; width: 1.15em; height: 1.15em; color: var(--accent); }

/* تصویر سمت چپ: همان شکل کمانی بخش «درباره من» */
.post-media {
  position: relative;
  width: 100%;
  max-width: 440px;
  aspect-ratio: 1 / 1.1;
  margin-inline: auto;
  overflow: hidden;
  border-radius: 50% 50% 40px 40px / 40% 40% 40px 40px;
  background:
    radial-gradient(circle at 50% 78%, hsla(229, 76%, 66%, 0.18), transparent 60%),
    linear-gradient(180deg, hsla(229, 76%, 66%, 0.10), hsla(229, 76%, 66%, 0.04));
  transition: transform .4s ease, box-shadow .4s ease;
}

.post-img {
  width: 100%;
  height: auto;
  aspect-ratio: 1 / 1;
  object-fit: contain;
  object-position: center bottom;
  transform-origin: center bottom;
  transition: transform 0.5s ease;
}

/* تا وقتی src خالی است، آیکون عکس شکسته دیده نشود */
.post-img[src=""] { visibility: hidden; }

.post-media:hover {
  transform: translateY(-6px);
  box-shadow: 0 24px 50px -22px hsla(229, 76%, 66%, 0.45);
}

.post-media:hover .post-img { transform: scale(1.04); }

@media (min-width: 768px) {
  .post-hero .container {
    grid-template-columns: 1.15fr .85fr;
    gap: 3rem;
  }
}

/* ---------- متن مقاله ---------- */
.post-body {
  background: var(--background-primary);
  padding: 3rem 0 var(--py);
}

.post-container {
  max-width: 760px;
  margin-inline: auto;
}

.post-h2 {
  margin: 2.6rem 0 1rem;
  padding-inline-start: .8rem;
  border-inline-start: 4px solid var(--accent);
  color: var(--foreground-primary);
  font-size: var(--fs-2);
  font-weight: 800;
  line-height: 1.6;
}

.post-h2:first-child { margin-top: 0; }

.post-h3 {
  margin: 1.6rem 0 .6rem;
  color: var(--foreground-primary);
  font-size: var(--fs-3);
  font-weight: 700;
}

.post-p {
  margin-bottom: 1rem;
  color: var(--foreground-secondary);
  font-size: 1.05rem;
  line-height: 2.2;
}

.post-list { margin: 0 0 1.2rem; padding: 0; }

.post-list li {
  position: relative;
  padding-inline-start: 1.5rem;
  margin-bottom: .55rem;
  color: var(--foreground-secondary);
  font-size: 1.05rem;
  line-height: 2;
}

.post-list li::before {
  content: "";
  position: absolute;
  inset-inline-start: 0;
  top: .85em;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent);
}

/* ---------- جدول مقایسه ---------- */
.post-table-wrap {
  margin: 1rem 0 1.5rem;
  overflow-x: auto;
  border: 1px solid var(--action-primary);
  border-radius: 16px;
}

.post-table {
  width: 100%;
  min-width: 520px;
  border-collapse: collapse;
  font-size: .95rem;
  text-align: right;
}

.post-table th,
.post-table td {
  padding: .9rem 1.1rem;
  border-bottom: 1px solid var(--action-primary);
}

.post-table thead th {
  background: var(--background-secondary);
  color: var(--foreground-primary);
  font-weight: 800;
}

.post-table td { color: var(--foreground-secondary); }
.post-table tbody td:first-child { color: var(--foreground-primary); font-weight: 700; }
.post-table tbody tr:last-child td { border-bottom: 0; }
.post-table tbody tr:hover td { background: var(--background-secondary); }

/* ---------- دعوت به تماس ---------- */
.post-cta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1.2rem;
  margin-top: 2.5rem;
  padding: 1.6rem 1.8rem;
  border: 1px solid var(--action-primary);
  border-radius: 20px;
  background: var(--background-secondary);
}

.post-cta-title {
  margin-bottom: .3rem;
  color: var(--foreground-primary);
  font-size: var(--fs-3);
  font-weight: 800;
}

.post-cta-text {
  color: var(--foreground-secondary);
  font-size: var(--fs-4);
}

.post-cta-btn {
  display: inline-flex;
  align-items: center;
  gap: .6rem;
  padding: .7rem 1.4rem;
  border-radius: 999px;
  background: var(--accent);
  color: #fff;
  font-weight: 700;
  transition: gap .3s ease, filter .2s ease;
}

.post-cta-btn svg { flex: none; width: 1.1em; height: 1.1em; }

.post-cta-btn:hover { gap: 1rem; filter: brightness(1.08); }

.post-back {
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  margin-top: 2rem;
  color: var(--accent);
  font-weight: 700;
}

.post-back svg { flex: none; width: 1.1em; height: 1.1em; transition: transform .3s ease; }
.post-back:hover svg { transform: translateX(4px); }

@media (max-width: 575.98px) {
  .post-cta { padding: 1.3rem 1.2rem; }
  .post-cta-btn { width: 100%; justify-content: center; }
}

@media (prefers-reduced-motion: reduce) {
  .post-media, .post-img, .post-cta-btn, .post-back svg { transition: none; }
}
