:root {
  --space-1: 6px;
  --space-2: 10px;
  --space-3: 16px;
  --space-4: 24px;
  --space-5: 32px;
}

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

.container {
  width: 100%;
  display: flex;
  justify-content: center;
  min-height: 100vh;
  align-items: center;
}

body {
  font-family: Arial, sans-serif;
  background: #0f172a;
  color: #f1f5f9;
  min-height: 100vh;
  margin: 0;
}

article {
  background: rgba(255, 255, 255, 0.05);
  border-radius: 16px;
  width: 90%;
  max-width: 420px;
  backdrop-filter: blur(10px);
  display: flex;
  flex-direction: column;
  padding: var(--space-4);
  gap: var(--space-3);
}

header h2 {
  text-align: left;
  font-size: 26px;
  grid-column: span 2;
  letter-spacing: 0.3px;
  font-weight: 700;
}

figure {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 8px;
}

[data-testid="test-user-bio"] {
  text-align: left;
  line-height: 1.5;
}

[data-testid="test-user-time"] {
  text-align: center;
  font-size: 14px;
  opacity: 0.8;
}

nav {
  display: flex;
  justify-content: center;
  gap: 12px;
  flex-wrap: wrap;
}

nav a {
  text-decoration: none;
  color: #38bdf8;
  font-size: 14px;
}

nav a:focus {
  outline: 2px solid #38bdf8;
  outline-offset: 3px;
}

nav a:hover {
  opacity: 0.7;
}

section {
  margin-top: 8px;
  padding-top: var(--space-3);
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  grid-column: span 2;
}

section h3 {
  margin-bottom: 6px;
  font-size: 14px;
  text-transform: uppercase;
  letter-spacing: 1px;
  opacity: 0.8;
}

ul {
  padding-left: 0;
  list-style: none;
  line-height: 1.6;
}

ul li {
  padding: 4px 0;
  opacity: 0.9;
}

img {
  width: 120px;
  height: 120px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid #38bdf8;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

@media (min-width: 768px) {
  article {
    max-width: 750px;
    width: 95%;
    display: grid;
    grid-template-columns: 200px 1fr;
    gap: 20px;
  }

  header {
    grid-column: span 2;
    text-align: left;
    font-size: 22px;
  }

  figure {
    align-items: flex-start;
  }

  [data-testid="test-user-bio"],
  [data-testid="test-user-time"],
  nav {
    text-align: left;
    justify-content: flex-start;
    line-height: 1.5;
  }
}

article {
  padding: 24px;
  border-radius: 16px;
  width: 90%;
  max-width: 420px;

  border: 1px solid rgba(255, 255, 255, 0.08);

  background: linear-gradient(
  135deg,
  rgba(255, 255, 255, 0.08),
  rgba(255, 255, 255, 0.02)
  );

  position: relative;

  display: flex;
  flex-direction: column;
  gap: 16px;

  opacity: 0;
  animation: fadeIn 0.6s ease forwards;

  transition: box-shadow 0.3s ease;
  transform-style: preserve-3d;
  will-change: transform;
}

nav {
  display: flex;
  justify-content: space-between; 
  align-items: center;
  width: 100%;
  margin-top: 12px;
}

nav a {
  flex: 1; 
  text-align: center;

  text-decoration: none;
  color: #38bdf8;
  font-size: 14px;

  padding: 8px 0;
  border-radius: 6px;
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

article:hover {
  box-shadow: 0 20px 60px rgba(56, 189, 248, 0.25);
}

h2 {
  font-weight: 600;
}

h3 {
  color: #38bdf8;
  font-size: 16px;
}

p {
  font-size: 15px;
}

img, p, h2, h3, li {
  backface-visibility: hidden;
}

#bio-toggle {
  background: transparent;
  border: 1px solid rgba(56, 189, 248, 0.5);
  color: #38bdf8;
  padding: 6px 10px;
  border-radius: 8px;
  cursor: pointer;
  font-size: 13px;
  width: fit-content;
  align-self: flex-start;
  transition: all 0.2s ease;
}

#bio-toggle:hover {
  background: rgba(56, 189, 248, 0.1);
}

#bio {
  transition: all 0.3s ease;
}

body.light {
  background: #f1f5f9;
  color: #0f172a;
}

body.light article {
  background: linear-gradient(
    135deg,
    rgba(0, 0, 0, 0.05),
    rgba(0, 0, 0, 0.02)
  );
  border: 1px solid rgba(0, 0, 0, 0.1);
}

body.light nav a {
  color: #0ea5e9;
}

body.light h3 {
  color: #0ea5e9;
}

body.light #bio-toggle {
  border: 1px solid rgba(0, 0, 0, 0.3);
  color: #0f172a;
}

#theme-toggle {
  width: 36px;
  height: 36px;

  display: flex;
  align-items: center;
  justify-content: center;

  border-radius: 10px; 
  border: 1px solid rgba(56, 189, 248, 0.4);

  background: rgba(255, 255, 255, 0.05);

  cursor: pointer;
  transition: all 0.2s ease;

  position: absolute;
  top: 12px;
  right: 12px;
}

#theme-toggle:hover {
  background: rgba(56, 189, 248, 0.1);
  transform: scale(1.05);
}

body, article, nav a, h3, p {
  transition: all 0.3s ease;
}

.role-badge {
  font-size: 12px;
  color: #38bdf8;
  background: rgba(56, 189, 248, 0.1);
  padding: 4px 10px;
  border-radius: 999px;
  width: fit-content;
}

* {
  transition: background 0.3s ease, color 0.3s ease, box-shadow 0.3s ease;
}

#readable-time {
  font-size: 13px;
  opacity: 0.7;
}

[data-testid="test-user-time"],
#readable-time {
  font-size: 12px;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  color: #38bdf8;
}

.time-label {
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: rgba(148, 163, 184, 0.8);
  margin-top: 8px;
  margin-bottom: 4px;
}

body.light [data-testid="test-user-time"],
body.light #readable-time {
  color: #0f172a;
}