/* ==========================================================
   UNIVERSAL SITE STYLES - Josh Walker Portfolio
   RESTORED ORIGINAL RESPONSIVE VERSION
   ========================================================== */

/* === General Body and Page Styles === */
body {
  background: #101828;
  color: #e8eef6;
  font-family: Arial, Helvetica, sans-serif;
  margin: 0;
  text-align: center;
}

main {
  min-height: 80vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 14px;
  padding: 10px;
}

a {
  color: #b9d2ff;
  text-decoration: none;
}
a:hover {
  text-decoration: underline;
}

/* === Footer === */
footer {
  background: none;
  border: none;
  padding: 10px 0;
  color: #e8eef6;
  font-size: 14px;
}

/* === Content Boxes & Images === */
.big {
  max-width: 90%;
  border-radius: 8px;
  height: auto;
}
.pfp {
  width: 220px;
  height: 220px;
  object-fit: cover;
  border-radius: 50%;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.5);
}
.content-box {
  width: 90%;
  max-width: 1100px;
  line-height: 1.6;
  margin: 20px auto;
  text-align: left;
  background: #0d1424;
  border: 1px solid #2a3247;
  border-radius: 8px;
  padding: 30px;
  box-shadow: 0 0 10px rgba(0, 0, 0, 0.6);
}

/* ==========================================================
   NAVIGATION MENU
   ========================================================== */
.navbar {
  background: #0d1424;
  border-bottom: 1px solid #2a3247;
  padding: 0 12px;
}
.navbar .wrap {
  max-width: 1100px;
  margin: 0 auto;
}

/* Burger Button */
.menu-toggle {
  display: none;
  font-size: 28px;
  cursor: pointer;
  color: #e8eef6;
  padding: 10px 14px;
  text-align: center;
}

/* Desktop Menu Layout */
.navbar .menu {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  justify-content: center;
}
.navbar .menu > li { position: relative; }
.navbar a {
  display: block;
  padding: 14px 18px;
  color: #e8eef6;
  white-space: nowrap;
}
.navbar a:hover,
.navbar a:focus {
  background: #101828;
}

/* Dropdowns */
.navbar .submenu {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  background: #151c2e;
  border: 1px solid #2a3247;
  min-width: 220px;
  z-index: 1000;
  padding: 0;
  margin: 0;
  list-style: none;
}
.navbar .submenu li { border-bottom: 1px solid #2a3247; }
.navbar .submenu li:last-child { border-bottom: none; }
.navbar .has-children:hover > .submenu { display: block; }

/* ==========================================================
   MOBILE MENU (Centered Burger)
   ========================================================== */
@media (max-width: 768px) {
  /* Show burger icon */
  .menu-toggle {
    display: block;
    margin: 10px auto; /* centers the icon */
  }

  /* Hide menu until toggled */
  .navbar .menu {
    display: none;
    flex-direction: column;
    align-items: center;
    width: 100%;
    background: #0d1424;
    border-top: 1px solid #2a3247;
  }

  /* Show menu when active */
  .navbar .menu.active {
    display: flex;
  }

  /* Full width tap targets */
  .navbar .menu > li {
    width: 100%;
  }
  .navbar a {
    padding: 12px 16px;
    text-align: center;
  }

  /* Nested submenus */
  .navbar .submenu {
    position: static;
    border: none;
    background: #151c2e;
    width: 100%;
  }
  .navbar .submenu li a {
    padding-left: 25px;
    text-align: left;
  }
}

/* ==========================================================
   FORM STYLES
   ========================================================== */
.form-wrap {
  max-width: 720px;
  margin: 2rem auto;
  background: #0d1424;
  border: 1px solid #2a3247;
  border-radius: 8px;
  padding: 1.5rem 2rem;
  color: #e8eef6;
  text-align: left;
}
.form-wrap h1 {
  margin: 0 0 0.25rem 0;
  text-align: center;
}
.form-wrap p {
  margin-top: 0.25rem;
  color: #b8c1d8;
  text-align: center;
}
.form-wrap label {
  display: block;
  margin: 1rem 0 0.25rem 0;
  font-weight: 600;
}
.form-wrap input,
.form-wrap textarea,
.form-wrap select,
.form-wrap button {
  display: block;
  width: 100%;
  box-sizing: border-box;
  padding: 0.6rem 0.75rem;
  border: 1px solid #2a3247;
  border-radius: 6px;
  background: #101828;
  color: #e8eef6;
  font-size: 1rem;
}
.form-wrap button {
  cursor: pointer;
  margin-top: 1.5rem;
  text-align: center;
  background-color: #8A2BE2;
  font-weight: bold;
  border: none;
  min-height: 44px;
}
.form-wrap .grid2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}
@media (max-width: 640px) {
  .form-wrap .grid2 { grid-template-columns: 1fr; }
}

/* ==========================================================
   TABLE STYLES (Assignment 6)
   ========================================================== */
#output {
  display: block;
  width: 100%;
  margin: 0 auto;
  text-align: center;
  padding: 20px 0;
  color: #e8eef6;
}
#output table {
  width: 100%;
  border-collapse: collapse;
  background: #0d1424;
  border: 1px solid #2a3247;
  border-radius: 8px;
  box-shadow: 0 0 10px rgba(0, 0, 0, 0.6);
  overflow-x: auto;
  display: block;
}
#output th,
#output td {
  text-align: center;
  border: 1px solid #2a3247;
  padding: 10px 14px;
  font-size: 14px;
}
#output th {
  background-color: #2a3247;
  color: #e8eef6;
  font-weight: bold;
}
#output tr:hover {
  background-color: #18223a;
}

/* ==========================================================
   HEADINGS
   ========================================================== */
h1 {
  color: #ffffff;
  text-align: center;
  font-size: 2rem;
  margin: 1rem 0;
}
h2, h3 {
  color: #8A2BE2;
  text-align: center;
  text-shadow: 0 0 8px rgba(138, 43, 226, 0.4);
}

/* ==========================================================
   GENERAL RESPONSIVE FIXES
   ========================================================== */
@media (max-width: 600px) {
  body { font-size: 16px; }
  .pfp { width: 150px; height: 150px; }
  .content-box { padding: 16px; }
  footer { font-size: 12px; }
}
canvas, img, iframe, table {
  max-width: 100%;
  height: auto;
}
