* {
  box-sizing: border-box;
}

body {
  font-family: Arial, Helvetica, sans-serif;
}

/* HEADER STYLING */
.site-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 24px 32px;
  background: #111;
  color: #fff;
  box-shadow: 0 2px 8px rgba(0,0,0,0.3);
}

.site-title {
  font-size: 1.8rem;
  text-decoration: none;
  color: #fff;
  transition: color 0.3s ease, text-shadow 0.3s ease;
}

.site-title:hover {
  color: #099483;
  text-shadow: 0 2px 6px rgba(255, 255, 255, 0.3);
}

.site-nav a {
  margin-left: 24px;
  font-size: 1rem;
  text-decoration: none;
  color: #ccc;
  transition: color 0.3s ease, text-shadow 0.3s ease;
}

.site-nav a:hover {
  color: #099483;
  text-shadow: 0 2px 4px rgba(255, 255, 255, 0.3);
}

/* INTRO TEXT */
.page-intro {
  max-width: 800px;
  margin: 48px auto 24px;
  padding: 0 32px;
  text-align: center;
}

.page-intro h1 {
  margin-bottom: 16px;
  font-size: 2rem;
}

.page-intro p {
  font-size: 1.1rem;
  color: #333;
}

.page-intro a {
  color: #000;
  font-weight: bold;
  text-decoration: none;
}

.page-intro a:hover {
  color: #099483;
  text-shadow: 0 2px 4px rgba(255, 255, 255, 0.3);
  text-decoration: none;
}

/* ABOUT PAGE TEXT */
.about-content {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 24px;
  max-width: 1000px;
  margin: 48px auto;
  padding: 0 32px;
}

.about-content img {
  width: 280px;
  height: 280px;
  object-fit: cover;
  border-radius: 12px;
  box-shadow: 0 4px 8px rgba(0,0,0,0.2);
}

.about-text {
  flex: 1;
  min-width: 280px;
}

.about-text p {
  margin-bottom: 16px;
  font-size: 1.1rem;
  color: #333;
}

.resume-box {
  max-width: 700px;
  margin: 50px auto;
  padding: 40px 30px;
  background: white;
  border: 2px solid black;
  box-shadow: 0 6px 20px rgba(0,0,0,0.15);
  border-radius: 4px;
}

.resume-box h2 {
  font-size: 2rem;
  margin-bottom: 20px;
  text-align: center;
}

.resume-box h3 {
  margin-top: 20px;
  font-size: 1.3rem;
}

.resume-box h4 {
	font-size: 1rem;
	line-height: 1.5;
	margin-bottom: 12px;
	text-align: center;
}

.resume-box p {
  font-size: 1rem;
  line-height: 1.5;
  margin-bottom: 12px;
}

article {
  float: left;
  padding: 20px;
  width: 70%;
  background-color: #e0effa;
}

/* Clear floats after the columns */
section::after {
  content: "";
  display: table;
  clear: both;
}

/* Style the footer */
footer {
  background-color: #9ccaff;
  padding: 10px;
  text-align: center;
  color: white;
}

/* PHOTO GRID BUTTONS */
.grid-container {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(288px, 1fr));
  gap: 16px;
  max-width: 1200px;
  margin: 32px auto;
  padding: 0 16px;
}

.grid-item {
  display: flex;
  align-items: flex-end;
  background-size: cover;
  background-position: center;
  color: white;
  text-decoration: none;
  position: relative;
  border-radius: 8px;
  overflow: hidden;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  
  /* Keep it square */
  aspect-ratio: 1 / 1;
  min-height: 288px;
}

.grid-item:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 16px rgba(0,0,0,0.3);
}

.overlay {
  background: rgba(0, 0, 0, 0.5);
  padding: 16px;
  width: 100%;
}

.overlay h2 {
  margin: 0 0 8px;
  font-size: 1.25rem;
}

.overlay p {
  margin: 0;
  font-size: 0.9rem;
}

/* BOAT PAGE */
.boat-details {
  display: flex;
  flex-wrap: wrap;
  gap: 24px;
  max-width: 1000px;
  margin: 48px auto;
  padding: 0 32px;
  align-items: center;
}

.boat-details img {
  width: 100%;
  max-width: 384px;
  border-radius: 12px;
  box-shadow: 0 4px 8px rgba(0,0,0,0.2);
  object-fit: cover;
}

.boat-text {
  flex: 1;
  min-width: 280px;
}

.boat-text p {
  margin-bottom: 16px;
  font-size: 1.1rem;
  color: #333;
}

.boat-gallery {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 16px;
  max-width: 1000px;
  margin: 48px auto;
  padding: 0 32px;
}

.boat-gallery img {
  width: 100%;
  max-width: 288px; /* Approx 3 inches */
  height: auto;
  border-radius: 8px;
  box-shadow: 0 3px 6px rgba(0,0,0,0.15);
}

.boat-gallery {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 16px;
  max-width: 1000px;
  margin: 48px auto;
  padding: 0 32px;
  justify-items: center; /* Center images in their cells */
}

/* SCALING */

/* Force exactly 4 per row max on big screens */
@media (min-width: 1200px) {
  .grid-container {
    grid-template-columns: repeat(4, 1fr);
  }

/* Responsive layout - makes the two columns/boxes stack on top of each other instead of next to each other, on small screens */
@media (max-width: 600px) {
  nav, article {
    width: 100%;
    height: auto;
  }
  
  .site-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
  }

  .site-nav a {
    margin-left: 0;
    margin-right: 16px;
  }
  
  .about-content {
    flex-direction: column;
    text-align: center;
  }

  .about-text {
    text-align: left;
  }
  
  .boat-details {
    flex-direction: column;
    text-align: center;
  }

  .boat-text {
    text-align: left;
  }

  .boat-gallery {
    grid-template-columns: 1fr;
  }
}