:root {
  --bg-primary: #0a0a0a;
  --bg-secondary: #1a1a1a;
  --text-primary: #f5f5f5;
  --text-secondary: #a0a0a0;
  --accent: #00e5ff;
  --accent-dim: rgba(0, 229, 255, 0.1);
  --border: rgba(255, 255, 255, 0.1);
  --shadow: rgba(0, 0, 0, 0.5);
}

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

body {
  font-family: "Work Sans", sans-serif;
  background: var(--bg-primary);
  color: var(--text-primary);
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  overflow-x: hidden;
  position: relative;
}

body::before {
  content: "";
  position: fixed;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background:
    radial-gradient(
      circle at 20% 50%,
      rgba(0, 229, 255, 0.03) 0%,
      transparent 50%
    ),
    radial-gradient(
      circle at 80% 80%,
      rgba(0, 229, 255, 0.02) 0%,
      transparent 50%
    );
  animation: float 20s ease-in-out infinite;
  pointer-events: none;
}

@keyframes float {
  0%,
  100% {
    transform: translate(0, 0);
  }
  50% {
    transform: translate(-30px, -30px);
  }
}

.container {
  max-width: 480px;
  width: 100%;
  max-height: calc(100vh); /* Fit in viewport */
  position: relative;
  z-index: 1;
  animation: fadeIn 0.8s ease-out;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.lang-toggle {
  position: absolute;
  top: 0;
  right: -60px;
  display: flex;
  flex-direction: column;
  margin: 10px 10px 0 0;
  z-index: 2;
}

.lang-btn:not(.active) {
  opacity: 0;
  height: 0;
  overflow: hidden;
  transition: all 0.3s ease;
}

.lang-toggle:hover .lang-btn:not(.active) {
  opacity: 1;
  height: 48px;
}

.lang-btn {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  margin: 0;
  padding: 0;
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  cursor: pointer;
  font-size: 24px;
  transition: all 0.3s ease;
}

.lang-btn > .fi {
  display: block;
  width: 100%;
  height: 100%;
  border-radius: 50%;
}

.lang-btn.active {
  background: var(--accent);
  color: var(--bg-primary);
}

.card {
  background: var(--bg-secondary);
  border-radius: 24px;
  padding: 32px 40px;
  border: 1px solid var(--border);
  box-shadow: 0 20px 60px var(--shadow);
  position: relative;
  overflow: hidden;  /* Add this */
}

.card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--accent) 0%, transparent 100%);
  border-radius: 24px 24px 0 0;  /* This was the simple fix! */
}

.profile-section {
  display: flex;
  align-items: center;
  gap: 24px;
  margin-bottom: 24px;
  animation: slideIn 0.6s ease-out 0.2s both;
}

@keyframes slideIn {
  from {
    opacity: 0;
    transform: translateX(-20px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

.avatar {
  width: 100px;
  height: 100px;
  border-radius: 50%;
  object-fit: cover;
  border: 3px solid var(--accent);
  box-shadow: 0 8px 24px rgba(0, 229, 255, 0.3);
}

.profile-info h1 {
  font-family: "Instrument Serif", serif;
  font-size: 32px;
  font-weight: 400;
  margin-bottom: 6px;
  letter-spacing: -0.02em;
}

.profile-info .title {
  color: var(--text-secondary);
  font-size: 15px;
  font-weight: 400;
}

.bio {
  color: var(--text-secondary);
  line-height: 1.7;
  margin-bottom: 24px;
  font-size: 15px;
  animation: slideIn 0.6s ease-out 0.4s both;
}

.contact-grid {
  display: grid;
  gap: 10px;
  margin-bottom: 24px;
  animation: slideIn 0.6s ease-out 0.6s both;
  position: relative;
  overflow-y: auto;
  max-height: calc(100vh - 500px);
}

.contact-btn {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 20px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border);
  border-radius: 12px;
  color: var(--text-primary);
  text-decoration: none;
  font-size: 15px;
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}

.contact-btn::before {
  content: "";
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(
    90deg,
    transparent,
    var(--accent-dim),
    transparent
  );
  transition: left 0.5s ease;
}

.contact-btn:hover::before {
  left: 100%;
}

.contact-btn:hover {
  border-color: var(--accent);
  background: var(--accent-dim);
  transform: translateY(-2px);
}

.contact-btn svg {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
}

.contact-btn .label {
  font-size: 12px;
  color: var(--text-secondary);
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.contact-btn .value {
  margin-top: 2px;
}

.cta-section {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  animation: slideIn 0.6s ease-out 0.8s both;
}

.cta-btn {
  padding: 16px 24px;
  border-radius: 12px;
  font-size: 15px;
  font-weight: 500;
  text-align: center;
  text-decoration: none;
  transition: all 0.3s ease;
  cursor: pointer;
  border: none;
  font-family: "Work Sans", sans-serif;
}

.cta-primary {
  background: var(--accent);
  color: var(--bg-primary);
  box-shadow: 0 4px 16px rgba(0, 229, 255, 0.3);
}

.cta-primary:hover {
  box-shadow: 0 6px 24px rgba(0, 229, 255, 0.5);
  transform: translateY(-2px);
}

.cta-secondary {
  background: rgba(255, 255, 255, 0.05);
  color: var(--text-primary);
  border: 1px solid var(--border);
}

.cta-secondary:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: var(--accent);
  transform: translateY(-2px);
}

.footer {
  text-align: center;
  margin-top: 24px;
  color: var(--text-secondary);
  font-size: 13px;
  opacity: 0.7;
}

@media (max-width: 768px) {
  .lang-toggle {
    right: 0;
  }
}

@media (max-width: 480px) {
  .card {
    padding: 24px 20px;
  }

  .profile-section {
    gap: 16px;
    margin-bottom: 20px;
    flex-direction: column;
    text-align: center;
  }

  .avatar {
    width: 70px;
    height: 70px;
  }

  .bio {
    font-size: 14px;
    margin-bottom: 20px;
  }

  .contact-grid {
    gap: 8px;
    margin-bottom: 20px;
  }

  .contact-btn {
    padding: 12px 16px;
  }

  .contact-btn .label {
    font-size: 11px;
  }

  .contact-btn .value {
    font-size: 14px;
  }

  .profile-info h1 {
    font-size: 28px;
  }

  .cta-section {
    grid-template-columns: 1fr;
  }
}

.hidden {
  display: none;
}
