/* Universal Styles */

* {
  font-family: "Molengo", "Gill Sans", "Gill Sans MT", Calibri, "Trebuchet MS",
    sans-serif;
  line-height: 1.5;
}

body {
  background-color: #1511f615;
  margin: 0;
}

/* Page Layout */

main {
  padding-left: 40px;
  padding-right: 40px;
}

/* Navigation */

#nav {
  display: flex;
  justify-content: flex-end;
  gap: 16px;
  padding: 24px;
  background-color: rgba(18, 53, 151, 0.73);
  position: sticky;
  top: 0;
  z-index: 100;
}

#nav a {
  font-family: inherit;
  text-decoration: none;
  font-size: 1rem;
  padding: 10px 18px;
  border-radius: 999px;
  border: none;
  background: linear-gradient(135deg, #4f8cff, #7aa7ff);
  color: white;
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.15);
}

/* Scroll Offset for Sticky Nav, otherwise the headers slide under the nav bar */

#about,
#projects,
#skills,
#contact {
  scroll-margin-top: 110px;
}

/* Header */

.header {
  position: relative;
  overflow: hidden;
  height: 400px;
  padding: 0;
  margin-bottom: 20px;
}

.header h1 {
  font-family: "Shadows Into Light Two", Georgia, "Times New Roman", Times,
    serif;
  font-size: 110px;
  text-align: center;
  position: absolute;
  color: white;
  background: none;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  margin: 0;
  line-height: 1.2;
  text-shadow: 3px 3px 10px rgba(0, 0, 0, 0.8);
}

.header img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 70%;
}

/* Grid Layout */

.main-grid {
  display: grid;
  grid-template-columns: 2fr 1fr;
  grid-template-rows: auto auto;
  width: 100%;
  gap: 40px;
}

.about {
  grid-column: 1 / -1;
  margin-top: 46px;
}

.quotes {
  grid-column: 1 / -1;
  margin-bottom: 46px;
  text-align: center;
}

.projects {
  grid-column: 1 / 2;
}

.skills {
  grid-column: 2 / 3;
}

/* Shared Card Styling */

.about,
.projects,
.skills,
.quotes {
  background: white;
  border-radius: 16px;
  padding: 32px;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.08);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.about:hover,
.projects:hover,
.skills:hover {
  transform: translateY(-4px);
  box-shadow: 0 14px 32px rgba(0, 0, 0, 0.14);
}

/* Typography */

h2 {
  font-size: 30px;
}

p {
  font-size: 20px;
}

#highlights {
  font-size: 20px;
  line-height: 1.7;
}

/* Projects */

.projects li {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  margin-bottom: 24px;
}

.projects li img {
  width: 200px;
  height: auto;
  flex-shrink: 0;
  border-radius: 8px;
  display: block;
}

.projects li a {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.projects li a:hover img {
  opacity: 0.85;
  transform: scale(1.02);
  transition: 0.2s ease;
}

.project-description {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}

/* Skills */

.skills ul {
  font-size: 18px;
  line-height: 1.7;
}

.skills ul a {
  text-decoration: none;
}

/* Quotes */

#quote-text {
  cursor: pointer;
  transition: opacity 0.2s ease, transform 0.2s ease;
}

#quote-text.fade-in {
  animation: quoteFade 0.3s ease;
}

@keyframes quoteFade {
  from {
    opacity: 0;
    transform: translateY(4px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Footer */

.footer {
  background-color: rgba(18, 53, 151, 0.73);
}

.footer h3 {
  color: white;
  margin: 0;
  padding-top: 24px;
  padding-bottom: 8px;
  text-align: center;
}

.footer p {
  color: white;
  margin: 0;
  text-align: center;
  padding-bottom: 24px;
}

/* Media Queries */

/* Hamburger Menu */

#hamburger {
  display: none;
  width: 32px;
  height: 26px;
  background: none;
  border: none;
  cursor: pointer;
  position: relative;
}

#hamburger span {
  position: absolute;
  left: 0;
  width: 100%;
  height: 4px;
  background: white;
  border-radius: 4px;
  transition: 0.3s ease;
}

#hamburger span:nth-child(1) {
  top: 0;
}
#hamburger span:nth-child(2) {
  top: 11px;
}
#hamburger span:nth-child(3) {
  top: 22px;
}

/* Small phones */

@media (max-width: 360px) {
  main {
    padding-left: 16px;
    padding-right: 16px;
  }

  #nav {
    justify-content: center;
    flex-wrap: wrap;
    gap: 10px;
  }

  .header {
    height: 260px;
  }

  .header h1 {
    font-size: 48px;
  }

  .main-grid {
    grid-template-columns: 1fr;
    gap: 24px;
  }

  .projects,
  .skills {
    grid-column: 1 / -1;
  }

  .projects li {
    flex-direction: column;
  }

  .projects li img {
    width: 100%;
  }
}

/* Medium phones */

@media (min-width: 361px) and (max-width: 480px) {
  main {
    padding-left: 20px;
    padding-right: 20px;
  }

  .header {
    height: 300px;
  }

  .header h1 {
    font-size: 58px;
  }

  .main-grid {
    grid-template-columns: 1fr;
    gap: 28px;
  }

  .projects,
  .skills {
    grid-column: 1 / -1;
  }

  .projects li {
    flex-direction: column;
  }

  .projects li img {
    width: 100%;
  }

  #nav {
    justify-content: center;
    flex-wrap: wrap;
    gap: 10px;
  }
}

/* Large phones */

@media (min-width: 481px) and (max-width: 600px) {
  main {
    padding-left: 28px;
    padding-right: 28px;
  }

  .header h1 {
    font-size: 68px;
  }

  .main-grid {
    grid-template-columns: 1fr;
    gap: 32px;
  }

  .projects,
  .skills {
    grid-column: 1 / -1;
  }

  .projects li {
    flex-direction: column;
  }

  .projects li img {
    width: 100%;
  }

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

/* Tablets */

@media (min-width: 601px) and (max-width: 1024px) {
  main {
    padding-left: 32px;
    padding-right: 32px;
  }

  .header h1 {
    font-size: 86px;
  }

  .main-grid {
    grid-template-columns: 1fr;
    gap: 36px;
  }

  .projects,
  .skills {
    grid-column: 1 / -1;
  }
}

/* Quote interaction for mobile screens */

@media (max-width: 600px) {
  #quote-text::after {
    content: " Tap for another";
    font-size: 0.85rem;
    opacity: 0.6;
    margin-left: 6px;
  }
}

/* Update to Make Things More Legible On Mobile Screens */

@media (max-width: 600px) {
  #hamburger {
    display: flex;
    height: 100%;
    position: absolute;
    left: 10px;
    top: 10px;
    align-items: center;
  }

  #nav {
    position: relative;
    flex-direction: column;
    gap: 15px;
    align-items: center;
  }

  #nav a {
    display: none;
    width: 100%;
    text-align: center;
    font-size: 1rem;
    padding: 10px;
    margin-top: 6px;
    padding-left: 0;
    padding-right: 0;
  }

  #nav.open a {
    display: block;
  }

  h2 {
    font-size: 26px;
  }

  p {
    font-size: 22px;
    line-height: 1.6;
  }

  #highlights,
  .skills ul {
    font-size: 20px;
    line-height: 1.7;
  }

  .about,
  .projects,
  .skills,
  .quotes {
    padding: 24px;
  }

  .project-description p {
    font-size: 20px;
    line-height: 1.6;
  }
}

/* Page-Specific Styles */

.cookie-recipe ol {
  list-style-type: decimal;
  list-style-position: outside;
  padding-left: 1.25rem;
}

.cookie-recipe li {
  display: list-item
  gap: 16px;
}

.cookie-recipe li::marker {
  font-weight: bold;
}
