/* page background and general font setup */
body {
  background-color: #f4f6f7;
  font-family: Arial, Helvetica, sans-serif;
  margin: 0;
  padding: 40px 0;
  color: #333;
  overflow-x: hidden; /* Requirement 8: prevent horizontal scrollbar */
}

/* centered card container */
.main-container {
  width: 80%;
  max-width: 650px;
  background-color: #f0f6f6;
  margin: 0 auto;
  padding: 40px 30px;
  text-align: center;
  box-sizing: border-box;
}

/* heading */
h1 {
  font-size: 20px;
  font-weight: normal;
  letter-spacing: 1px;
  margin-bottom: 15px;
}

/* links & horizontal lines */
.nav-menu {
  border-top: 1px solid #888;
  border-bottom: 1px solid #888;
  padding: 8px 0;
  margin: 0 auto 30px auto;
  width: 80%; /* Requirement 9: rulelines will adjust via media query */
  text-align: center; /* Requirement 6: make sure navigation is centered */
}

.nav-menu a {
  color: #a63f73;
  text-decoration: none;
  margin: 0 10px;
  font-size: 12px;
}

/* side by side layout using inline block */
.card-section {
  text-align: center;
  margin-bottom: 30px;
}

.box {
  display: inline-block;
  vertical-align: top;
  width: 45%; /* Requirement 3: converted dimensions to percentages */
  max-width: 150px;
  height: 150px;
  margin: 0 6%;
  box-sizing: border-box;
}

/* left box */
.box-left {
  background-color: #ffffff;
  border: 4px solid #8cc63f;
  box-shadow: 3px 3px 6px rgba(0, 0, 0, 0.2);
  text-align: left;
  padding: 15px;
}

.box-left .name {
  font-size: 12px;
  font-weight: bold;
  margin: 0 0 5px 0;
}

.box-left .email-link {
  font-size: 12px;
  color: #ff8c00;
  text-decoration: none;
}

/* right box */
.box-right {
  background-color: #a63f73;
  border: 4px solid #00aeef;
}

/* footer */
.description {
  font-size: 11px;
  color: #333;
  line-height: 1.5;
  max-width: 420px;
  margin: 0 auto;
}


/* ==========================================
   MEDIA QUERIES FOR MOBILE RESPONSIVENESS
   ========================================== */

/* Media Query 1: Stack the two boxes into a single column */
@media screen and (max-width: 600px) {
  .box {
    display: block;          /* Requirement 1: go single column */
    width: 80%;              /* Requirement 3: percentage width */
    max-width: 250px;
    margin: 15px auto;       /* Requirement 5: center all content */
  }
}

/* Media Query 2: Stack the navigation buttons vertically and adjust containers */
@media screen and (max-width: 480px) {
  .main-container {
    width: 100%;             /* Requirement 7: outer blue container fills 100% on small screens */
    padding: 20px 10px;
  }

  .nav-menu {
    width: 100%;             /* Requirement 9: rulelines 100% width on smaller screens */
  }

  .nav-menu a {
    display: block;          /* Requirement 2: navigation goes single column */
    margin: 12px auto;       /* Requirement 4: spaced out vertically to click individually */
    text-align: center;      /* Requirement 6: centered */
  }
}