:root {
  --primary-glow: rgba(159, 173, 183, 0.4);
  --accent-glow: rgba(196, 168, 150, 0.4);
}

body {
  min-height: 100vh;
  margin: 0;
  background: var(--bg-dark);
  display: flex;
  flex-direction: column;
  overflow-x: hidden;
}

main {
  min-height: 100%;
  display: flex;
  flex-direction: column;
  margin-buttom: 10rem; /* leaves space for fixed footer */
  max-width: 1200px;
}

.ambient-glow {
  position: absolute;
  width: 40vw;
  height: 40vw;
  border-radius: 50%;
  filter: blur(100px);
  z-index: -1;
  opacity: 0.5;
}

.glow-blue {
  top: -10%;
  left: -10%;
  background: radial-gradient(circle, var(--primary-glow), transparent 70%);
}

.glow-purple {
  bottom: -10%;
  right: -10%;
  background: radial-gradient(circle, var(--accent-glow), transparent 70%);
}

.vitrine {
  flex-grow: 1;
  width: calc(100% - 2rem);
  max-width: 760px;
  margin: 1rem auto 2rem auto;
  border-radius: 24px;
  padding: 2rem 1rem;
  display: flex;
  flex-direction: column;
  gap: 2rem;
  background-image: linear-gradient(var(--glass-bg), var(--glass-bg)), url('../images/back.avif');
  background-size: cover;
  background-position: center;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid var(--glass-border);
  box-shadow:
    0 20px 40px -10px rgba(0, 0, 0, 0.5),
    inset 0 1px 1px rgba(255, 255, 255, 0.1);
}

.profile {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  align-items: center;
  text-align: center;
}

figure.profile-figure {
  text-align: center;
  margin: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.avatar-container {
  position: relative;
  display: inline-block;
  border-radius: 2rem;
  text-decoration: none;
  transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

#profilePNG {
  width: 6.5rem;
  border-radius: 2rem;
  display: block;
  position: relative;
  z-index: 2;
  background: var(--glass-bg);
}

.avatar-ring {
  position: absolute;
  inset: -4px;
  border-radius: 2.2rem;
  background: linear-gradient(45deg, var(--primary), var(--accent));
  z-index: 1;
  opacity: 0;
  transition: opacity 0.4s ease;
  filter: blur(8px);
}

.avatar-container:hover {
  transform: translateY(-8px) scale(1.02);
}

.avatar-container:hover .avatar-ring {
  opacity: 0.8;
}

.hint {
  border-radius: 2rem;
  font-size: 0.65rem;
  color: var(--text-muted);
  margin-top: 1rem;
  text-transform: uppercase;
  letter-spacing: 2px;
  animation: pulseText 2s infinite;
  background: rgba(10, 27, 35, 0.09);
  backdrop-filter: blur(18px);
  padding: 0.19rem;
  text-wrap: wrap;
}

.glass-panel {
  width: 100%;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 1.5rem;
  padding: 1.5rem 1.5rem;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  transition:
    transform 0.3s ease,
    box-shadow 0.3s ease,
    backdrop-filter 0.3s ease,
    border-color 0.3s ease;
}

.glass-panel:hover {
  transform: translateY(-5px);
  box-shadow: 0 18px 45px rgba(159, 173, 183, 0.12);
  border-color: rgba(255, 255, 255, 0.16);
  backdrop-filter: blur(26px);
  -webkit-backdrop-filter: blur(26px);
  background: rgba(255, 255, 255, 0.06);
}

#myName {
  font-size: 1.4rem;
  font-family: 'JetBrains Mono', monospace;
  color: var(--primary);
  margin: 0 0 0.5rem 0;
}

#myInfo {
  margin: 0;
  color: var(--text-muted);
  line-height: 1.6;
  font-size: 0.95rem;
}

.hero-title {
  margin: 0 0 0.4rem;
  font-size: 1.8rem;
  color: var(--text-on-dark);
  font-family: 'JetBrains Mono', monospace;
}

.hero-role {
  margin: 0 0 1rem;
  color: var(--primary);
  font-weight: 600;
  font-family:
    'Inter',
    system-ui,
    -apple-system,
    BlinkMacSystemFont,
    'Segoe UI',
    sans-serif;
}

.hero-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 1rem;
  color: var(--text-muted);
  font-size: 0.85rem;
}

.hero-meta span {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 999px;
  padding: 0.45rem 0.9rem;
}

.skills-title {
  margin: 0 0 1.5rem;
  font-size: 1.1rem;
  color: var(--text-on-dark);
  font-weight: 700;
  font-family: 'JetBrains Mono', monospace;
}

.skills {
  width: 100%;
}

.skills-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
}

.skill-card {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 1.2rem;
  padding: 1.5rem 1rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.8rem;
  backdrop-filter: blur(10px);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  cursor: default;
}

.skill-card i[class^='devicon-'] {
  font-size: 2.5rem;
  line-height: 1;
  display: block;
  margin-bottom: 0.5rem;
  filter: drop-shadow(0 0 8px rgba(159, 173, 183, 0.3));
  transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.skill-name {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-on-dark);
  text-align: center;
}

.skill-card:hover {
  background: rgba(159, 173, 183, 0.1);
  transform: translateY(-8px);
  box-shadow: 0 12px 25px rgba(159, 173, 183, 0.15);
  border-color: var(--primary);
}

.skill-card:hover i[class^='devicon-'] {
  transform: scale(1.2);
}

.links {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 1.5rem;
  width: 100%;
}

.premium-btn {
  position: relative;
  background: linear-gradient(135deg, var(--accent), #6b48ff);
  border-radius: 1.2rem;
  padding: 0.8rem 2rem;
  text-decoration: none;
  color: #fff;
  font-family: 'Vazirmatn-bold', sans-serif;
  font-size: 0.9rem;
  overflow: hidden;
  transition: all 0.3s ease;
  box-shadow: 0 10px 20px rgba(196, 168, 150, 0.2);
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.premium-btn span {
  position: relative;
  z-index: 2;
}

.btn-shine {
  position: absolute;
  top: 0;
  left: -100%;
  width: 50%;
  height: 100%;
  background: linear-gradient(to right, transparent, rgba(255, 255, 255, 0.3), transparent);
  transform: skewX(-25deg);
  z-index: 1;
  transition: 0.5s;
}

.premium-btn:hover {
  transform: translateY(-5px);
  box-shadow: 0 15px 30px rgba(196, 168, 150, 0.4);
}

.premium-btn:hover .btn-shine {
  left: 200%;
  transition: 0.7s ease-in-out;
}

.fade-in-up {
  animation: fadeInUp 0.8s cubic-bezier(0.2, 0.8, 0.2, 1) forwards;
  opacity: 0;
  transform: translateY(30px);
}

.delay-1 {
  animation-delay: 0.2s;
}

@keyframes pulseText {
  0%,
  100% {
    opacity: 0.5;
  }
  50% {
    opacity: 1;
  }
}

@media (min-width: 769px) {
  .vitrine {
    width: calc(100% - 4rem);
    max-width: 960px;
    margin: auto auto 3rem auto;
    border-radius: 32px;
    padding: 3rem;
    gap: 3rem;
  }

  .profile {
    flex-direction: row;
    text-align: left;
    gap: 2.5rem;
    align-items: center;
  }

  #profilePNG {
    width: 8rem;
  }

  .glass-panel {
    padding: 1.5rem 2rem;
  }

  .skills-grid {
    grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
    gap: 1.5rem;
  }
}
