/* Basic reset */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}
html,
body {
  height: 100%;
  max-height: 100%;
}
body {
  font-family: "Vazirmatn", system-ui, -apple-system, "Segoe UI", Roboto,
    "Helvetica Neue", Arial;
  background: #0b0b0d;
  color: #e6e6e6;
}

.hero {
  display: flex;
  align-items: center;
}
.container {
  width: 92%;
  max-width: 1200px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr 520px;
  gap: 40px;
  align-items: center;
}

/* Desktop-only: fix layout and disable page scroll */
@media (min-width: 801px) {
  html,
  body {
    height: 100vh;
    overflow: hidden;
  }
  .hero {
    position: fixed;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
  }
  .container {
    height: 100%;
    max-height: 100%;
    overflow: visible;
  }
}

.left {
  padding: 40px 20px;
}
.subtitle {
  font-size: 22px;
  text-align: center;
  margin-bottom: 18px;
  font-weight: 700;
  color: #fff;
}
.about {
  line-height: 1.95;
  color: #cfcfcf;
  font-size: 18px;
  max-width: 820px;
  margin: 0 auto 26px;
}

.skills-title {
  font-size: 20px;
  margin-top: 10px;
  margin-bottom: 12px;
  color: #fff;
}
.skills {
  display: flex;
  gap: 18px;
  list-style: none;
  padding: 0;
  margin: 0 0 28px;
}
/* .skills li{display:flex;flex-direction:column;align-items:center;justify-content:center;width:84px;height:84px;border-radius:16px;backdrop-filter: blur(6px);box-shadow: 0 6px 18px rgba(0,0,0,0.6)} */
.skills img {
  width: 56px;
  height: 56px;
  object-fit: contain;
}
.skills span {
  margin-top: 6px;
  font-weight: 700;
  color: #dcdcdc;
}

.socials {
  display: flex;
  gap: 16px;
  margin-top: 18px;
  flex-wrap: wrap;
}
.social-pair {
  display: flex;
  align-items: center;
  background: rgba(50, 50, 60, 0.4);
  backdrop-filter: blur(12px);
  border-radius: 24px;
  padding: 8px 8px 8px 8px;
  gap: 8px;
  border: 1px solid rgba(255, 255, 255, 0.05);
}
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  transition: all 0.2s ease;
}
.btn img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}
.social-pair:hover {
  transform: translateY(-3px);
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.5);
}

/* arrow button: small, left side */
.btn.arrow {
  width: 48px;
  height: 48px;
  border-radius: 16px;
  background: transparent;
  box-shadow: none;
  border: none;
}
.btn.arrow img {
  width: 32px;
  height: 32px;
  filter: invert(1);
  transform: rotate(-90deg);
}

/* icon button: larger, right side */
.btn.icon {
  width: 68px;
  height: 48px;
  border-radius: 16px;
  background: transparent;
}
.btn.icon img {
  width: 32px;
  height: 32px;
  filter: invert(1);
}
.social-label {
  color: #ffffff;
  font-weight: 700;
  font-size: 16px;
  line-height: 1;
  direction: rtl;
}

/* Mobile: force single-row grid with 3 equal columns for socials */
@media (max-width: 800px) {
  .socials {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
    margin-top: 12px;
  }
  .social-pair {
    justify-content: center;
    padding: 6px;
  }
  .btn.icon {
    width: 100%;
    height: 48px;
    border-radius: 14px;
    background: transparent;
  }
  .social-label {
    font-size: 15px;
  }
  .btn.arrow {
    width: 40px;
    height: 40px;
  }
}

.right {
  position: relative;
  padding: 20px 10px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}
.intro {
  text-align: right;
  padding: 16px 24px;
}
.hello {
  color: #fff;
  font-size: 46px;
}
.name {
  font-size: 46px;
  color: #fff;
  margin-top: 6px;
  margin-bottom: 6px;
}
.name strong {
  color: #fff;
  font-weight: 900;
}
.role {
  color: #bfc8d8;
}

.portrait-wrap {
  position: relative;
  width: 520px;
  height: 620px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.portrait-wrap .bg {
  position: absolute;
  right: 40px;
  top: 30px;
  width: 800px;
  filter: blur(26px) saturate(140%);
  opacity: 0.5;
}
.portrait {
  position: relative;
  width: 360px;
  height: auto;
  border-radius: 12px;
  box-shadow: none;
  object-fit: cover;
  border: none;
}
.portrait {
  -webkit-mask-image: linear-gradient(
    to top,
    rgba(0, 0, 0, 0),
    rgba(0, 0, 0, 1)
  );
  -webkit-mask-repeat: no-repeat;
  -webkit-mask-size: cover;
  mask-image: linear-gradient(
    to top,
    rgba(0, 0, 0, 0) 10%,
    rgba(0, 0, 0, 1) 60%
  );
  mask-repeat: no-repeat;
  mask-size: cover;
}

/* small visual polish */
.portrait-wrap::after {
  display: none;
}
.portrait {
  position: relative;
  z-index: 2;
}

/* Responsive */
@media (max-width: 1100px) {
  .container {
    grid-template-columns: 1fr 380px;
  }
  .portrait-wrap {
    width: 340px;
    height: 420px;
  }
  .portrait-wrap .bg {
    width: 300px;
    right: 30px;
    top: 20px;
  }
  .name {
    font-size: 46px;
  }
}

/* Entrance animations */
@keyframes fadeUp {
  from {
    opacity: 0;
    transform: translateY(18px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}
@keyframes popIn {
  from {
    opacity: 0;
    transform: scale(0.96);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

.intro {
  animation: fadeUp 0.7s ease both 0.12s;
}
.about {
  animation: fadeUp 0.8s ease both 0.18s;
}
.skills li {
  animation: popIn 0.6s cubic-bezier(0.2, 0.9, 0.3, 1) both 0.28s;
}
.skills li:nth-child(2) {
  animation-delay: 0.34s;
}
.skills li:nth-child(3) {
  animation-delay: 0.4s;
}
.btn {
  animation: fadeUp 0.6s ease both 0.46s;
}
.portrait-wrap {
  animation: popIn 0.9s cubic-bezier(0.2, 0.9, 0.3, 1) both 0.12s;
}

/* Subtle text/glow polish to better match reference */
.name {
  text-shadow: 0 6px 26px rgba(19, 55, 102, 0.35);
}
.subtitle {
  letter-spacing: 0.1px;
  text-align: right;
}
.about {
  opacity: 0.95;
}

/* Slightly reduce heavy blur on bg image for small screens */
@media (max-width: 900px) {
  .portrait-wrap::after {
    filter: blur(32px);
    width: 360px;
    height: 360px;
  }
  .portrait-wrap .bg {
    filter: blur(18px);
  }
}

@media (max-width: 800px) {
  .container {
    grid-template-columns: 1fr;
    gap: 18px;
  }
  .right {
    order: -1;
    align-items: center;
    text-align: center;
  }
  .intro {
    align-self: center;
  }
  .left {
    padding: 12px 10px;
  }
  .portrait-wrap {
    width: 280px;
    height: 360px;
    margin: 0 auto;
  }
  .portrait {
    width: 260px;
  }
  .skills {
    justify-content: start;
  }
  .btn {
    width: 76px;
  }
}

@media (max-width: 420px) {
  .hello {
    font-size: 30px;
  }
  .name {
    font-size: 30px;
  }
  .about {
    font-size: 16px;
  }
}
