/* Global Styles */
body {
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  /* background: linear-gradient(135deg, #1e3c72, #2a5298); */
  background-color: #222;
  padding: 20px;
}

/* Reset spacing and use border-box for consistent sizing */
* {
  padding: 0;
  margin: 0;
  box-sizing: border-box;
}

/* hearder */
header[data-testid="test-header"] {
  background-color: #111111;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  /* width: 100%; */
  z-index: 100;
  box-shadow: 0 3px 5px #3333335b;
}

nav[data-testid="test-navbar"] {
  display: flex;
  justify-content: space-between;
  align-items: center;
  height: 56px;
  margin: 0 auto;
  width: 90%;
  color: #eee;
}

ul[data-testid="test-nav-links"] {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 17px;
}

ul[data-testid="test-nav-links"] a {
  color: #eee;
  border: none;
  outline: none;
  text-decoration: none;
  font-size: 1.03em;
  transition: .4s ease;
}

ul li .active {
  color: #5d88d2;
}

ul[data-testid="test-nav-links"] a:hover {
  color: #5d88d2;
}

li {
  list-style: none;
}

img[data-testid="test-logo"] {
  width: 80px;
  height: 33px;
  border-radius: 15px;
}

/* Profile Card Container */
article[data-testid="test-profile-card"] {
  background-color: #f9f9f9;
  max-width: 650px;
  border-radius: 16px;
  /* Rounded corners */
  padding: 30px;
  margin: 6rem auto 0;
  box-shadow: 0px 8px 20px rgba(0, 0, 0, 0.2);
}

/* Layout: Profile Section Grid */
.Profile-grid-display {
  display: grid;
  grid-template-columns: 170px 1fr;
  /* Avatar on left, details on right */
}

/* Profile Picture (Avatar) Styling */
figure {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  padding-right: 1.8rem;
  margin-right: 1.6rem;
  border-right: 2px solid hsl(0, 0%, 90%);
}

figure img {
  width: 120px;
  height: 120px;
  border-radius: 50%;
  object-fit: cover;
  border: 4px solid #2a5298;
  padding: 4px;
}

/* Timestamp below avatar */
span[data-testid="test-user-time"] {
  background-color: hsl(0, 0%, 94%);
  width: 97%;
  font-size: 0.8rem;
  text-align: center;
  font-style: oblique;
  letter-spacing: .05em;
  color: hsl(0, 0%, 47%);
  padding: 7px 0;
  border: 1px solid hsl(0, 0%, 80%);
  border-radius: 8px;
}

/* Header (Name & Role) */
main h2 {
  font-size: 2.3rem;
  font-weight: 700;
  color: #222;
}

main [data-testid="test-user-role"] {
  margin: 0;
  padding: 8px 0 7px;
  color: hsla(0, 0%, 40%);
}

/* Bio Section */
p[data-testid="test-user-bio"] {
  font-size: 1rem;
  color: #444;
  line-height: 1.4;
  /* Improve readability */
  /* padding: 15px 0; (disabled for cleaner layout) */
}

/* Social Links */
section nav[data-testid="test-user-social-links"] {
  display: flex;
  gap: 15px;
  margin: 20px 0;
}

section nav a {
  text-decoration: none;
  color: #2a5298;
  font-size: .8em;
  font-weight: 600;
  text-align: center;
  padding: 5px 7px;
  border: 1px solid hsl(0, 0%, 80%);
  border-radius: 8px;
  transition: .2s ease-in-out;
}

/* Hover/focus state for links */
section nav a:hover,
section nav a:focus {
  background-color: hsl(0, 0%, 90%);
  color: #1e3c72;
  border: 1px solid hsl(219, 58%, 38%);
}

/* Hobbies & Dislikes Section */
.Hobbies,
.Dislikes {
  background: #fff;
  border-radius: 10px;
  padding: 12px 15px;
  margin-top: 1.5rem;
  width: 100%;
  box-shadow: 0 0 5px hsl(0, 0%, 95%);
}

section h3 {
  font-size: 1.1rem;
  margin-bottom: 8px;
  color: #333;
}

/* Grid layout for list items */
.Hobbies ul,
.Dislikes ul {
  display: grid;
  gap: 8px;
  grid-template-columns: repeat(4, 1fr);
  list-style-type: none;
  color: #555;
}

.Hobbies li,
.Dislikes li {
  width: 100%;
  margin-bottom: 4px;
  background-color: hsl(0, 0%, 94%);
  border-radius: .9rem;
  padding: 10px 18px;
  border: 1px solid hsl(0, 0%, 86%);
}

/* Responsive Design (Tablets) */
@media screen and (max-width: 716px) {
  article[data-testid="test-profile-card"] {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
  }

  .Profile-grid-display {
    grid-template-columns: 1fr;
    justify-content: center;
    align-items: center;
  }

  figure {
    border: none;
    padding: 0;
    margin: 0;
  }

  span[data-testid="test-user-time"] {
    width: 37%;
  }

  main h2 {
    margin-top: 13px;
  }

  section nav[data-testid="test-user-social-links"] {
    justify-content: center;
  }

  .Hobbies ul,
  .Dislikes ul {
    grid-template-columns: repeat(3, 1fr);
  }

  .Hobbies,
  .Dislikes {
    text-align: left;
  }
}

/* Responsive Design (Mobile) */
@media screen and (max-width: 500px) {
  body {
    padding: 20px;
  }
}


@media screen and (max-width: 498px) {
  body {
    background-color: #f9f9f9;
    padding: 0;
  }

  img[data-testid="test-logo"] {
    width: 70px;
    height: 26px;
  }

  ul[data-testid="test-nav-links"] {
    gap: 10px;
  }
  
  ul[data-testid="test-nav-links"] a {
    font-size: .9em;
  }

  article[data-testid="test-profile-card"] {
    padding: 40px 10px;
    border-radius: 0;
  }

  figure img {
    width: 100px;
    height: 100px;
  }

  span[data-testid="test-user-time"] {
    width: 50%;
  }

  main h2 {
    font-size: 1.4rem;
  }

  .Hobbies,
  .Dislikes {
    text-align: inherit;
    /* Reset text alignment */
  }

  .Hobbies ul,
  .Dislikes ul {
    grid-template-columns: repeat(2, 1fr);
  }
}