@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&family=Outfit:wght@400;500;600;700;800&display=swap');

/* --- CUSTOM VARIABLES --- */
:root {
  --bg-dark: #090d16;
  --bg-card: #0f172a;
  --primary-text: #f8fafc;
  --secondary-text: #94a3b8;
  --orange-accent: #ff7300;
  --orange-accent-glow: rgba(255, 115, 0, 0.15);
  --cyan-accent: #06b6d4;
  --cyan-accent-glow: rgba(6, 182, 212, 0.15);
  --border-color: rgba(255, 255, 255, 0.08);
  --border-hover: rgba(255, 255, 255, 0.2);
  
  --font-heading: 'Outfit', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --font-body: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

/* --- RESET & BODY --- */
html {
  overflow-x: hidden;
  overflow-y: auto;
  max-width: 100%;
  /* Hide scrollbar track entirely while keeping scroll functionality */
  scrollbar-width: none; /* Firefox */
  -ms-overflow-style: none; /* IE and Edge */
}

html::-webkit-scrollbar {
  display: none; /* Chrome, Safari, and Opera */
}

body {
  overflow: visible;
  max-width: 100%;
}

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

body {
  background-color: var(--bg-dark);
  color: var(--primary-text);
  font-family: var(--font-body);
  min-height: 100vh;
  display: flex;
  justify-content: center;
  align-items: center;
  position: relative;
  padding: 2rem 1rem;
}

/* --- GLOWING BACKGROUND ELEMENTS --- */
.glow-bg {
  position: absolute;
  border-radius: 50%;
  filter: blur(100px);
  z-index: 0;
  opacity: 0.45;
  pointer-events: none;
}

.glow-1 {
  width: 400px;
  height: 400px;
  background: radial-gradient(circle, var(--orange-accent-glow) 0%, transparent 70%);
  top: -100px;
  left: -100px;
}

.glow-2 {
  width: 500px;
  height: 500px;
  background: radial-gradient(circle, var(--cyan-accent-glow) 0%, transparent 75%);
  bottom: -150px;
  right: -100px;
}

/* --- CONTAINER & LAYOUT --- */
.container {
  width: 100%;
  max-width: 900px;
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3.5rem;
}

/* --- PROFILE HEADER --- */
.profile-header {
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.8rem;
}

.avatar-wrapper {
  position: relative;
  width: 110px;
  height: 110px;
  margin-bottom: 0.5rem;
}

.avatar-img {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
  border: 3px solid rgba(255, 255, 255, 0.1);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5);
  position: relative;
  z-index: 2;
}

.avatar-ring {
  position: absolute;
  top: -4px;
  left: -4px;
  right: -4px;
  bottom: -4px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--orange-accent), var(--cyan-accent));
  z-index: 1;
  opacity: 0.6;
  animation: rotateRing 8s linear infinite;
}

@keyframes rotateRing {
  100% {
    transform: rotate(360deg);
  }
}

.name {
  font-family: var(--font-heading);
  font-size: 2.5rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  background: linear-gradient(135deg, #ffffff 60%, #cbd5e1 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.title {
  font-family: var(--font-heading);
  font-size: 1.15rem;
  font-weight: 500;
  color: var(--secondary-text);
  letter-spacing: 0.01em;
  max-width: 600px;
}

/* Availability Badge */
.availability-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  padding: 0.4rem 1rem;
  border-radius: 100px;
  font-size: 0.8rem;
  font-weight: 500;
  color: #cbd5e1;
  margin-top: 0.5rem;
}

.pulse-dot {
  width: 8px;
  height: 8px;
  background-color: #10b981;
  border-radius: 50%;
  position: relative;
  display: inline-block;
}

.pulse-dot::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border-radius: 50%;
  background-color: #10b981;
  animation: pulse 1.8s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

@keyframes pulse {
  0% {
    transform: scale(1);
    opacity: 0.8;
  }
  100% {
    transform: scale(2.8);
    opacity: 0;
  }
}

/* --- LANGUAGE SELECTOR GRID --- */
.selector-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.8rem;
  width: 100%;
}

@media (max-width: 680px) {
  .selector-grid {
    grid-template-columns: 1fr;
    max-width: 420px;
  }
}

.selector-card {
  position: relative;
  background-color: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 16px;
  text-decoration: none;
  color: inherit;
  overflow: hidden;
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
}

.card-glass {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: radial-gradient(circle at top left, rgba(255, 255, 255, 0.03) 0%, transparent 60%);
  z-index: 1;
}

.card-content {
  position: relative;
  z-index: 2;
  padding: 2.2rem 2rem;
  display: flex;
  flex-direction: column;
  gap: 1.2rem;
  height: 100%;
}

/* Icon / Header in Card */
.lang-icon {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.flag {
  font-size: 2.2rem;
}

.lang-code {
  font-family: var(--font-heading);
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--secondary-text);
  border: 1px solid var(--border-color);
  padding: 0.15rem 0.5rem;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.02);
  letter-spacing: 0.05em;
}

.lang-title {
  font-family: var(--font-heading);
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--primary-text);
  letter-spacing: -0.01em;
}

.lang-desc {
  font-size: 0.9rem;
  line-height: 1.5;
  color: var(--secondary-text);
  min-height: 4.5rem; /* Enforce height uniformity */
}

/* Tags */
.tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.tag {
  font-size: 0.75rem;
  font-weight: 600;
  padding: 0.2rem 0.6rem;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.03);
  color: #cbd5e1;
  border: 1px solid rgba(255, 255, 255, 0.05);
}

/* Action Button Inside Card */
.action-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-family: var(--font-heading);
  font-size: 0.95rem;
  font-weight: 700;
  margin-top: 0.5rem;
  color: #ffffff;
  transition: gap 0.2s ease, color 0.2s ease;
}

.action-btn svg {
  transition: transform 0.2s ease;
}

/* Card Specific Accent/Hover States */
.card-en:hover {
  border-color: var(--orange-accent);
  box-shadow: 0 12px 40px rgba(255, 115, 0, 0.12), 0 0 0 1px var(--orange-accent);
  transform: translateY(-5px);
}

.card-en:hover .action-btn {
  color: var(--orange-accent);
}

.card-en:hover .action-btn svg {
  transform: translateX(4px);
}

.card-fr:hover {
  border-color: var(--cyan-accent);
  box-shadow: 0 12px 40px rgba(6, 182, 212, 0.12), 0 0 0 1px var(--cyan-accent);
  transform: translateY(-5px);
}

.card-fr:hover .action-btn {
  color: var(--cyan-accent);
}

.card-fr:hover .action-btn svg {
  transform: translateX(4px);
}

/* Sliding Light Hover Effect */
.selector-card::after {
  content: '';
  position: absolute;
  top: 0;
  left: -50%;
  width: 25%;
  height: 100%;
  background: linear-gradient(to right, rgba(255,255,255,0) 0%, rgba(255,255,255,0.06) 50%, rgba(255,255,255,0) 100%);
  transform: skewX(-25deg);
  transition: 0.75s;
  z-index: 1;
}

.selector-card:hover::after {
  left: 125%;
}

/* --- FOOTER --- */
.footer {
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.2rem;
  margin-top: 1.5rem;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
  padding-top: 2rem;
  width: 100%;
}

.social-links {
  display: flex;
  justify-content: center;
  gap: 1.5rem;
}

.social-item {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  text-decoration: none;
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--secondary-text);
  transition: color 0.2s ease, transform 0.2s ease;
}

.social-item svg {
  width: 18px;
  height: 18px;
}

.social-item:hover {
  color: var(--primary-text);
  transform: translateY(-1px);
}

.copyright {
  font-size: 0.8rem;
  color: #475569;
}

/* --- MOBILE RESPONSIVE ADAPTATIONS --- */
@media screen and (max-width: 480px) {
  .name {
    font-size: 2rem;
  }
  
  .title {
    font-size: 1rem;
    padding: 0 0.5rem;
  }
  
  .container {
    gap: 2.2rem;
  }
  
  .selector-grid {
    gap: 1.2rem;
  }
  
  .card-content {
    padding: 1.6rem 1.4rem;
  }
  
  .lang-title {
    font-size: 1.3rem;
  }
  
  .lang-desc {
    font-size: 0.85rem;
    min-height: auto;
  }
  
  /* Prevent glowing background elements from leaking and causing horizontal scroll */
  .glow-1 {
    width: 250px;
    height: 250px;
    top: -50px;
    left: -50px;
  }
  
  .glow-2 {
    width: 300px;
    height: 300px;
    bottom: -100px;
    right: -50px;
  }
}
