body {
  font-family: "vazir";
  margin-top: 100px;
}
.background-video {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: -1;
}
.overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.4); /* مشکی با شفافیت ۴۰ درصد */
  z-index: -1;
}
header {
  display: flex;
  justify-content: center;
}

.header {
  background-color: rgba(255, 255, 255, 0.178);
  backdrop-filter: blur(20px);
  border-radius: 10px;
  display: flex;
  position: fixed;
  top: 5px;
  z-index: 1000;
  min-width: 310px;
  flex-wrap: wrap;
  animation: 2s forwards;
}

.logo {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 10px;
}
.header ul {
  display: flex;
  list-style: none;
}
.header li {
  text-decoration: none;
}
.header a {
  text-decoration: none;
  color: #1f2b50;
  padding: 15px;
  transition: 0.5s;
}
header a:hover {
  color: gainsboro;
}
.hero-section {
  display: flex;
  justify-content: space-between;
  margin: 0 20px;
  position: relative;
}

.profile {
  width: 350px;
  height: 350px;
  border-radius: 38% 62% 49% 51% / 60% 58% 42% 40%;
  background-color: #333333;
  animation: profile 7s infinite;
  justify-content: center;
  align-items: center;
}

.right-section {
  text-align: center;
  font-family: Georgia, "Times New Roman", Times, serif;
}
h2 > span {
  position: relative;
  display: inline-block;
  color: red;
  vertical-align: bottom;
  overflow: hidden;
  height: 1.25em;
}
h2 > span > span {
  display: block;
  animation: anim 5s infinite ease;
}
.right-section h1 {
  font-size: 65px;
  font-family: "vazir";
}
#resume-file {
  background-color: darkgray;
  width: 200px;
  padding: 10px;
  border-radius: 10px;
  border: none;
  transition: 0.4s;
  cursor: pointer;
  font-family: "vazir";
}
.animate__rubberBand {
  animation: 4s infinite;
}
#resume-file:hover {
  scale: 1.1;
  box-shadow: 2px 4px 33px 4px rgba(255, 255, 255, 0.53);
  -webkit-box-shadow: 2px 4px 33px 4px rgba(255, 255, 255, 0.53);
  -moz-box-shadow: 2px 4px 33px 4px rgba(255, 255, 255, 0.53);
}
#resume-file img {
  position: absolute;
  padding-right: 5px;
}
.scroll {
  position: absolute;
  bottom: -30px;
  right: 45%;
  animation: profile 3s infinite;
}
.about-me-section {
  margin-top: 15%;
  position: relative;
  display: flex;
  justify-content: center;
}
.about-me-box h3 {
  position: absolute;
  top: -10px;
}
.inner-box {
  --r: 20px; /* the radius */
  --s: 30px; /* size of inner curve */
  --x: 40px; /* horizontal offset (no percentage) */
  --y: -10px; /* vertical offset (no percentage) */
  width: 600px;
  aspect-ratio: 1;
  background: #3fb8af;
  border-radius: var(--r);
  --_m: /calc(2 * var(--r)) calc(2 * var(--r)) radial-gradient(#000 70%, #0000
        72%);
  --_g: conic-gradient(at calc(100% - var(--r)) var(--r), #0000 25%, #000 0);
  --_d: (var(--s) + var(--r));
  mask: calc(100% - var(--_d) - var(--x)) 0 var(--_m),
    100% calc(var(--_d) + var(--y)) var(--_m),
    radial-gradient(var(--s) at 100% 0, #0000 99%, #000 calc(100% + 1px))
      calc(-1 * var(--r) - var(--x)) calc(var(--r) + var(--y)),
    var(--_g) calc(-1 * var(--_d) - var(--x)) 0,
    var(--_g) 0 calc(var(--_d) + var(--y));
  mask-repeat: no-repeat;
  height: 150px;
  background-color: gray;
  text-indent: 85px;
  padding: 10px;
}

.portofilo {
  /* height: 800px; */
  position: relative;
  margin: 0 -8px;
  padding-right: 2px;
}
.container {
  display: flex;
  justify-content: space-between;
  flex-direction: row;
  align-items: start;
  margin-right: 20px;
  margin-left: 20px;
  animation: html 2s forwards;
}
.background-video-P {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 200px;
  object-fit: cover;
  z-index: -1;
}
.html {
  background-color: rgba(128, 128, 128, 0.297);
  backdrop-filter: blur(10px);
  width: 100px;
  /* height: 100px; */
  border-radius: 10px;
  padding: 5px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  font-family: "Franklin Gothic Medium", "Arial Narrow", Arial, sans-serif;
}
.offline-page,
.loading {
  background-color: black;
  position: fixed;
  z-index: 10002;
  top: 0;
  bottom: 0;
  right: 0;
  left: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  font-family: "Courier New", Courier, monospace;
  color: white;
}
.offline-page {
  display: none;
}

.loading {
  display: block;
}

@media (max-width: 689px) {
  .hero-section {
    flex-direction: column;
    align-items: center;
  }
  .right-section h1 {
    font-size: 40px;
    margin-top: -40px;
    white-space: nowrap;
  }
  .profile {
    width: 250px;
    height: 250px;
  }
  .profile img {
    width: 250px;
  }
  #resume-file {
    margin-bottom: 10px;
  }
  .about-me-section {
    margin-top: 5%;
  }
  .inner-box {
    width: 400px;
    font-size: 13px;
  }
}
@media (max-width: 429px) {
  .header {
    display: flex;
    justify-content: center;
  }
  .header ul {
    padding: 0;
    margin-top: 0;
  }
  .inner-box {
    width: 300px;
    font-size: 12px;
  }
  .right-section h1 {
    margin-top: -40px;
  }
  .container {
    align-items: center;
    flex-direction: column;
    gap: 20px;
  }
  .html {
    width: 150px;
    font-size: large;
  }
  .html img {
    width: 140px;
  }
  .background-video-P {
    height: 125vh;
  }
}
@media (max-width: 394px) {
  .right-section h1 {
    margin-top: 0;
  }
}
@media (max-width: 320px) {
  .header ul {
    display: none;
  }
  .header {
    display: flex;
    justify-content: center;
  }
  .right-section h1 {
    font-size: 30px;
    /* margin-top: -50px; */
  }
  .scroll {
    right: 44%;
  }
  .about-me-section {
    margin-top: 20%;
  }
  .inner-box {
    width: 250px;
    height: 250px;
    font-size: 15px;
  }
}

@keyframes profile {
  0% {
    transform: translate(0, 10px);
  }
  25% {
    transform: translate(0, -5px);
  }
  50% {
    transform: translate(0, 10px);
    scale: 102%;
  }
  75% {
    transform: translate(0, -5px);
  }
  100% {
    transform: translate(0, 10px);
  }
}
@keyframes top {
  0% {
    transform: translate(0, 10px);
  }
  25% {
    transform: translate(0, -5px);
  }
  40% {
    transform: translate(0, 10px);
  }
  75% {
    transform: translate(0, -5px);
  }
  100% {
    transform: translate(0, 10px);
  }
}
#top-btn {
  bottom: 20px;
  right: 20px;
  position: fixed;
  rotate: 180deg;
  background-color: gray;
  border: none;
  padding: 10px;
  border-radius: 60px;
  animation: top 2.5s infinite;
  transition: 0.2s;
  z-index: 10000;
}
#top-btn:hover {
  scale: 1.1;
  box-shadow: 2px 4px 33px 4px rgba(255, 255, 255, 0.53);
  -webkit-box-shadow: 2px 4px 33px 4px rgba(255, 255, 255, 0.53);
  -moz-box-shadow: 2px 4px 33px 4px rgba(255, 255, 255, 0.53);
  animation: none;
}

@keyframes anim {
  0% {
    transform: translateY(0%);
  }
  25% {
    transform: translateY(-100%);
  }
  50% {
    transform: translateY(-200%);
  }
  75% {
    transform: translateY(-300%);
  }
  100% {
    transform: translateY(-400%);
  }
}
/* HTML: <div class="loader"></div> */
.loader {
  width: fit-content;
  font-weight: bold;
  font-family: monospace;
  font-size: 30px;
  background: linear-gradient(90deg, #000 50%, #0000 0) right/200% 100%;
  animation: l21 2s infinite linear;
}
.loader::before {
  content: "...Loading";
  color: #0000;
  padding: 0 5px;
  background: inherit;
  background-image: linear-gradient(90deg, #fff 50%, #000 0);
  -webkit-background-clip: text;
  background-clip: text;
}

@keyframes l21 {
  100% {
    background-position: left;
  }
}
