/* Reset */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

/* Base */
body {
  font-family: 'Inter', sans-serif;
  background: #0f172a;
  color: #f1f5f9;
  display: flex;
  justify-content: center;
  align-items: flex-start;
  min-height: 100vh;
  padding: 1rem;
  direction: ltr;
}

/* Header */
.top-bar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  background: #1e293b;
  padding: 0.5rem 0;
  display: flex;
  justify-content: center;
  box-shadow: 0 2px 10px rgba(0,0,0,0.5);
  z-index: 100;
}

.lang-switch {
  display: flex;
  gap: 0.7rem;
  justify-content: center;
  direction: ltr !important;
}

.lang-btn {
  background: #38bdf8;
  border: none;
  color: #0f172a;
  font-weight: 700;
  padding: 0.4rem 0.85rem;
  border-radius: 8px;
  cursor: pointer;
  font-size: 0.95rem;
  letter-spacing: 0.03em;
  transition: all 0.3s ease;
  position: relative;
  min-width: 48px;
}

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

.lang-btn.active {
  background: #0ea5e9;
  color: #ffffff;
  font-weight: 800;
  box-shadow: 0 0 10px #0ea5e9;
}

/* Main Card */
.card {
  background: #1e293b;
  padding: 3rem 2rem 2.5rem;
  border-radius: 20px;
  box-shadow: 0 15px 40px rgba(0, 0, 0, 0.7);
  text-align: center;
  max-width: 480px;
  width: 100%;
  margin-top: 4.5rem;
  animation: fadeIn 1s ease-in-out;
  position: relative;
  direction: ltr;
}

/* Farsi language override */
html[lang="fa"] .card {
  direction: rtl;
  font-family: 'Vazirmatn', sans-serif;
}

/* Profile Image */
.profile-img {
  width: 150px;
  height: 150px;
  border-radius: 50%;
  object-fit: cover;
  border: 4px solid #38bdf8;
  box-shadow: 0 0 15px rgba(56, 189, 248, 0.4);
  margin-bottom: 1rem;
  display: block;
  margin-left: auto;
  margin-right: auto;
}

/* Name */
.logo {
  font-size: 2rem;
  font-weight: 800;
  color: #fff;
  margin-bottom: 0.3rem;
}

/* Subtitle */
.subtitle {
  font-size: 1.1rem;
  color: #ccc;
  margin-bottom: 0.7rem;
  font-weight: 500;
}

/* Bio */
.bio {
  font-size: 0.95rem;
  color: #ccc;
  margin-bottom: 2rem;
  line-height: 1.6;
  font-weight: 500;
}

/* Social Icons */
.socials {
  display: flex;
  justify-content: center;
  gap: 1.5rem;
  margin-top: 1.5rem;
}

.socials a {
  color: #38bdf8;
  font-size: 1.6rem;
  transition: color 0.3s ease;
  outline-offset: 2px;
}

.socials a:hover,
.socials a:focus {
  color: #0ea5e9;
  transform: scale(1.2);
}

/* Email */
.email-contact {
  margin-top: 1.5rem;
  font-size: 0.95rem;
  color: #ccc;
  text-align: center;
  font-weight: 500;
  letter-spacing: 0.02em;
}

.email-contact a {
  color: #38bdf8;
  text-decoration: none;
  transition: color 0.3s ease;
}

.email-contact a:hover,
.email-contact a:focus {
  color: #0ea5e9;
  text-decoration: underline;
}

/* Loader Spinner */
.loader {
  border: 4px solid #334155;
  border-top: 4px solid #38bdf8;
  border-radius: 50%;
  width: 40px;
  height: 40px;
  margin: 1rem auto 2rem;
  animation: spin 1.2s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* Fade-in animation */
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}

/* Responsive */
@media (max-width: 480px) {
  .card {
    padding: 2.5rem 1.5rem 2rem;
  }
  .logo {
    font-size: 1.7rem;
  }
  .subtitle {
    font-size: 1rem;
  }
  .bio {
    font-size: 0.9rem;
  }
  .socials a {
    font-size: 1.3rem;
  }
}
