* {
  box-sizing: border-box;
}

/* Whole page */
body {
  margin: 0;
  padding: 20px;
  font-family: Arial, Helvetica, sans-serif;
  background-color: white;
  background-image: linear-gradient(180deg, #ffffff, #f5f5f5);
  color: black;
}

/* Page titles */
.title,
.page-title {
  text-align: center;
  font-size: 42px;
  letter-spacing: 4px;
  margin-bottom: 10px;
}

hr {
  width: 85%;
  border: 2px solid black;
  margin-bottom: 35px;
}

/* Navigation */
nav {
  width: 85%;
  margin: 0 auto 35px auto;
}

nav ul {
  list-style-type: none;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
  padding: 0;
  margin: 0;
  row
}

/* Main layout */
.preview-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 40px;
  width: 90%;
  margin: 40px auto;
}

/* Main page boxes */
.preview-card,
.content-box,
.document-box {
  width: 90%;
  max-width: 1300px;
  margin: 0 auto;
  border: 5px solid black;
  background-color: white;
  text-align: center;
  padding: 25px;
}

/* Hover transform for rubric */
.preview-card {
  transition: transform 0.2s ease;
}

.preview-card:hover {
  transform: translateY(-4px);
}

/* Section headers */
.preview-card h2,
.content-box h2,
.document-box h2,
h2 {
  background-color: darkred;
  color: white;
  padding: 14px;
  margin: 0 0 25px 0;
  font-size: 34px;
  letter-spacing: 3px;
}

/* Application materials row */
.materials-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 25px;
  align-items: start;
}

/* Inner cards */
.material-box,
.cert-card,
.project-card,
.career-section {
  border: 3px solid black;
  padding: 20px;
  background-color: #f7f7f7;
  margin-bottom: 30px;
}

.material-box h3,
.cert-card h3,
.project-card h3,
.career-section h3 {
  background-color: black;
  color: white;
  padding: 12px;
  margin: 0 0 18px 0;
  text-align: center;
  font-size: 22px;
}

/* Certificate page grid */
.cert-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 40px;
}

/* Certificate cards */
.cert-card {
  max-width: 1000px;
  margin: 0 auto 35px auto;
}

/* Certificate image previews */
.cert-preview {
  width: 100%;
  max-width: 850px;
  height: auto;
  object-fit: contain;
  display: block;
  margin: 0 auto 20px auto;
  border: 3px solid black;
  background-color: white;
  padding: 0;
}

/* Regular preview images */
.preview-img {
  width: 100%;
  max-width: 700px;
  height: auto;
  object-fit: contain;
  object-position: center;
  border: 2px solid black;
  background-color: white;
  padding: 0;
  display: block;
  margin: 0 auto 15px auto;
}

/* Larger document previews */
.document-box .preview-img {
  width: 90%;
  max-height: 950px;
  height: auto;
}

/* About page image */
.about-img {
  width: 70%;
  max-height: 700px;
  object-fit: contain;
  border: 2px solid black;
  background-color: white;
  padding: 10px;
  margin-bottom: 20px;
}

/* Job shadow preview */
.summary-preview {
  border: 3px solid black;
  background-color: white;
  padding: 20px;
  margin: 25px auto 0 auto;
  width: 90%;
  text-align: center;
}

.summary-preview h3 {
  background-color: darkred;
  color: white;
  padding: 12px;
  margin: 0 0 15px 0;
  text-align: center;
}

.job-shadow-img {
  width: 100%;
  max-width: 900px;
  height: auto;
  object-fit: contain;
  display: block;
  margin: 0 auto;
  border: 2px solid black;
  background-color: white;
}

/* Text */
p,
li {
  font-size: 19px;
  line-height: 1.6;
}

.content-box p {
  text-align: left;
  width: 85%;
  margin: 15px auto;
}

.cert-card p {
  text-align: center;
  width: 90%;
  margin: 15px auto;
  font-size: 18px;
}

.project-card,
.career-section {
  text-align: left;
}

/* Links and buttons */
a,
button {
  display: inline-block;
  margin-top: 15px;
  padding: 12px 20px;
  background-color: black;
  color: white;
  text-decoration: none;
  border-radius: 4px;
  border: none;
  cursor: pointer;
  font-size: 17px;
}

a:link {
  color: white;
}

a:visited {
  color: lightgray;
}

a:hover,
button:hover {
  background-color: darkred;
}

a:active,
button:active {
  background-color: #660000;
}

/* Button rows */
.button-row {
  margin-top: 25px;
}

/* Table styling */
.reference-table {
  width: 90%;
  margin: 20px auto;
  border-collapse: collapse;
}

.reference-table th,
.reference-table td {
  border: 2px solid black;
  padding: 12px;
  font-size: 17px;
}

.reference-table th {
  background-color: darkred;
  color: white;
}

/* Form styling */
form {
  border: 3px solid black;
  background-color: #f7f7f7;
  padding: 20px;
  text-align: left;
  width: 85%;
  margin: 20px auto;
}

label {
  display: block;
  font-weight: bold;
  margin-top: 15px;
  font-size: 18px;
}

input,
textarea,
select {
  width: 100%;
  padding: 10px;
  margin-top: 5px;
  border: 2px solid black;
  font-size: 16px;
}

textarea {
  height: 120px;
}

/* Footer */
.site-footer {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  align-items: center;
  gap: 20px;

  margin-top: 40px;
  padding: 20px;
  border-top: 3px solid black;
  font-weight: bold;
}

.footer-left {
  text-align: left;
}

.footer-center {
  text-align: center;
}

.footer-right {
  text-align: right;
}

.site-footer a {
  margin-top: 0;
}

/* Mobile layout */
@media (max-width: 900px) {
  .preview-grid,
  .materials-row,
  .cert-grid {
    grid-template-columns: 1fr;
  }

  .title,
  .page-title {
    font-size: 30px;
  }

  .preview-card,
  .content-box,
  .document-box {
    width: 95%;
    padding: 18px;
  }

  .preview-img {
    max-width: 100%;
    height: auto;
  }

  .cert-preview {
    max-width: 100%;
    height: auto;
  }

  .about-img {
    width: 95%;
  }

  .summary-preview {
    width: 95%;
    padding: 12px;
  }

  .job-shadow-img {
    max-width: 100%;
  }

  form {
    width: 95%;
  }

  p,
  li {
    font-size: 17px;
  }

  nav ul {
    flex-direction: column;
    align-items: center;
  }

  .site-footer {
    grid-template-columns: 1fr;
    text-align: center;
  }

  .footer-left,
  .footer-center,
  .footer-right {
    text-align: center;
  }
}

.media-preview {
  width: 100%;
  max-width: 500px;
  height: auto;
  display: block;
  margin: 20px auto;
  border: 3px solid black;
  background-color: white;
}