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

:root {
  --bg: #0e0e0e;
  --surface: #191919;
  --modal-bg: #1c1c1c;
  --border: #2a2a2a;
  --border-hover: #3d3d3d;
  --text-primary: #f0f0f0;
  --text-secondary: #888;
  --text-tertiary: #555;
}

html, body {
  height: 100%;
}

body {
  background: var(--bg);
  color: var(--text-primary);
  font-family: 'DM Sans', sans-serif;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  padding: 2rem 1rem;
}

.lang-switch {
  position: fixed;
  top: 1.25rem;
  right: 1.25rem;
  background: transparent;
  border: 0.5px solid var(--border);
  color: var(--text-secondary);
  font-family: 'DM Sans', sans-serif;
  font-size: 12px;
  letter-spacing: 0.06em;
  padding: 5px 12px;
  border-radius: 20px;
  cursor: pointer;
  transition: border-color 0.2s, color 0.2s;
  z-index: 10;
}

.lang-switch:hover {
  border-color: var(--border-hover);
  color: var(--text-primary);
}

.page {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 100%;
  max-width: 360px;
  padding: 1rem 0 3rem;
}

.avatar {
  width: 88px;
  height: 88px;
  border-radius: 50%;
  object-fit: cover;
  border: 0.5px solid var(--border);
  margin-bottom: 1.25rem;
  display: block;
}

.name {
  font-size: 20px;
  font-weight: 500;
  letter-spacing: 0.01em;
  color: var(--text-primary);
  margin-bottom: 0.35rem;
}

.tagline {
  font-size: 14px;
  color: var(--text-secondary);
  margin-bottom: 0.2rem;
}

.age {
  font-size: 12px;
  color: var(--text-tertiary);
  margin-bottom: 1.5rem;
}

.description {
  font-size: 13px;
  color: var(--text-tertiary);
  line-height: 1.7;
  text-align: center;
  margin-bottom: 1.75rem;
  padding: 0 0.25rem;
}

.divider {
  width: 24px;
  height: 0.5px;
  background: var(--border);
  margin-bottom: 2rem;
}

/* Grid layout */

.grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px;
  width: 100%;
}

.card {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 1.25rem 0.75rem;
  border: 0.5px solid var(--border);
  border-radius: 12px;
  background: var(--surface);
  text-decoration: none;
  color: var(--text-primary);
  cursor: pointer;
  font-family: 'DM Sans', sans-serif;
  transition: border-color 0.2s, background 0.2s;
  text-align: center;
}

.card:hover {
  border-color: var(--border-hover);
  background: #202020;
}

.card-icon {
  width: 22px;
  height: 22px;
  color: var(--text-secondary);
}

.card-label {
  font-size: 12px;
  font-weight: 500;
  color: var(--text-primary);
  letter-spacing: 0.01em;
}

/* Modal */

.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.7);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 100;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s;
  padding: 1.5rem;
}

.modal-overlay.open {
  opacity: 1;
  pointer-events: all;
}

.modal {
  background: var(--modal-bg);
  border: 0.5px solid var(--border-hover);
  border-radius: 16px;
  width: 100%;
  max-width: 360px;
  padding: 1.25rem;
  transform: scale(0.96);
  transition: transform 0.2s;
}

.modal-overlay.open .modal {
  transform: scale(1);
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1.25rem;
}

.modal-title {
  font-size: 13px;
  font-weight: 500;
  color: var(--text-secondary);
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.modal-close {
  background: transparent;
  border: none;
  color: var(--text-tertiary);
  cursor: pointer;
  padding: 2px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: color 0.15s;
}

.modal-close:hover {
  color: var(--text-primary);
}

.modal-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
}

.app-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 1.25rem 0.75rem;
  border: 0.5px solid var(--border);
  border-radius: 12px;
  background: var(--surface);
  text-decoration: none;
  color: var(--text-primary);
  transition: border-color 0.2s, background 0.2s;
  text-align: center;
}

.app-card:hover {
  border-color: var(--border-hover);
  background: #202020;
}

.app-icon {
  width: 28px;
  height: 28px;
  color: var(--text-secondary);
}

.app-name {
  font-size: 12px;
  font-weight: 500;
  color: var(--text-primary);
  line-height: 1.3;
}

.app-url {
  font-size: 10px;
  color: var(--text-tertiary);
}

@media (max-width: 480px) {
  .page {
    max-width: 100%;
  }
}
