/* Import Google Font */
@import url("https://fonts.googleapis.com/css2?family=Space+Mono&display=swap");

body {
  margin: 0;
  font-family: "Space Mono", Arial, sans-serif;
}

/* Navbar */
.navbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0 8% 0 5%;
  height: 60px;
  border-bottom: 3px solid #d9d9d9;
  background-color: #fff;
  box-sizing: border-box;
  text-transform: uppercase;
}

.navbar .items ul {
  display: flex;
  gap: 6rem;
  list-style: none;
  margin: 0;
  padding: 0;
}

.navbar .items ul li a,
.navbar .logo a {
  text-decoration: none;
  color: #000;
  line-height: 1;
  display: inline-block;
  padding: 0.5rem 0;
  font-size: 14px;
}

.navbar .items ul li a:hover {
  border-bottom: 2px solid #000;
}

/* Main content */
.main-content {
  padding: 0 8%;
}

/* Hero layout */
.intro {
  display: grid;
  grid-template-columns: 2fr 1fr; /* text 2/3, image 1/3 */
  align-items: stretch;
  /* gap: 2rem; */
  min-height: 60vh;
  padding: 2rem;
  margin-top: 3%;
}

/* Bio layout */
.bio {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  align-items: flex-start;
}

.text-wrapper {
  display: inline-block; /* shrink-wrap container */
}

/* H1 wrapper */
.h1-wrapper {
  display: inline-block;
  margin: 0;
  line-height: 1.2;
  text-transform: uppercase;
  margin-top: 3%;
}

.h1-wrapper span {
  display: block;
  font-size: 60px; /* uppercase heading size */
}

/* Paragraph matches last line width via JS */
.match-last-line {
  display: inline-block;
  width: fit-content;
  margin-top: 6rem;
  line-height: 1.5;
}

/* H4 */
h4 {
  font-size: 28px;
  text-transform: uppercase;
  margin: 0 0 0.5rem 0;
  margin-top: 4%;
}

/* Profile / image */
.profile {
  position: relative;
  display: inline-block; /* shrink-wrap to image */
  /* max-width: 350px; */
  min-width: 450px;
  margin: 0 auto;
}

.profile-img {
  width: 100%;
  max-width: 400px;
  min-width: 200px;
  height: auto;
  border-radius: 2px;
  display: block;
  object-fit: cover;
  box-shadow: 20px 20px 0 #d9d9d9; /* offset shadow like the previous pseudo-element */
}

/* Responsive tweaks */
@media (max-width: 1024px) {
  .intro {
    grid-template-columns: 2fr 1fr; /* tablet side by side */
    gap: 1.5rem;
  }
}

@media (max-width: 768px) {
  .intro {
    grid-template-columns: 1fr; /* stack text + image */
    text-align: center;
  }

  .profile {
    margin-top: 2rem;
  }

  .profile-img {
    max-width: 80%; /* scales nicely on mobile */
    min-width: 200px;
    height: auto;
  }

  .profile::before {
    transform: scale(1.03); /* slightly smaller shadow for mobile */
  }

  .text-wrapper {
    max-width: 100%;
  }
}

/* Optional: scale h1 for very small screens */
@media (max-width: 480px) {
  .h1-wrapper span {
    font-size: clamp(36px, 6vw, 60px);
  }

  h4 {
    font-size: clamp(20px, 4vw, 28px);
  }
}
