@font-face {
  font-family: "Poppins";
  src: url("assets/fonts/Poppins-Light.ttf") format("truetype");
  font-weight: 300;
  font-style: normal;
}

@font-face {
  font-family: "Poppins";
  src: url("assets/fonts/Poppins-Regular.ttf") format("truetype");
  font-weight: 400;
  font-style: normal;
}

@font-face {
  font-family: "Poppins";
  src: url("assets/fonts/Poppins-SemiBold.ttf") format("truetype");
  font-weight: 600;
  font-style: normal;
}

@font-face {
  font-family: "Poppins";
  src: url("assets/fonts/Poppins-Bold.ttf") format("truetype");
  font-weight: 700;
  font-style: normal;
}

html,
body {
  background-color: #242729;
  font-family: Poppins, sans-serif;
  color: white;
  margin: 0;
  padding: 0;
  overflow-x: hidden;
}

.header,
.footer {
  background-color: #2c3032;
  width: 100%;
  height: 160px;
  margin: 0;
  color: white;
  font-family: Poppins, sans-serif;
  font-weight: 600;
  font-size: 2vh;
  text-align: center;
  z-index: 10;
  position: absolute;
}

.headerContent {
  display: grid;
  grid-template-columns: auto auto;
  width: 75%;
  margin: auto;
  position: relative;
  top: 50%;
  transform: translateY(-50%);
}

.header img,
.footer img {
  width: 295px;
  margin: auto;
  margin-top: 10px;
}

.headerLinks {
  display: grid;
  grid-template-columns: auto auto;
  width: 100%;
  gap: 1vh;
  margin: auto;
}

a {
  color: white;
  text-decoration: none;
  cursor: pointer;
  margin: 0;
  padding: 0;
}

.imageSection {
  width: 100%;
  height: 100vh;
  z-index: 0;
}

.imageBackdrop {
  width: 100%;
  height: 100vh;
  position: relative;
  display: flex;
  background-image: url(assets/media/endianTitleBackground.webp);
  background-size: cover;
  filter: blur(8px);
}

.sectionContent {
  position: relative;
  top: -70vh;
  z-index: 1;
  text-align: center;
}

h1,
.title {
  font-family: Poppins, sans-serif;
  font-weight: 600;
  font-size: 8vh;
  text-shadow: 6px 6px 4px black;
  color: white;
  text-align: center;
  line-height: 12vh;
  margin-bottom: 0;
}

h2 {
  font-family: Poppins, sans-serif;
  font-weight: 600;
  font-size: 5vh;
  color: #3de8b9;
  margin: 0;
}

h3 {
  font-size: 2rem;
  font-family: "Poppins", Sans-serif;
  font-weight: 600;
  color: #3de8b9;
}

p {
  font-size: 22px;
}

.subtitle {
  font-family: Poppins, sans-serif;
  font-weight: 300;
  font-size: 2vh;
  color: white;
}

.spacer {
  height: 5vh;
  margin: 0;
}

button {
  background-color: #d1d1d10d;
  color: white;
  font-family: Poppins, Sans-serif;
  font-weight: 600;
  font-size: 24px;
  border-style: solid;
  border-width: 1px 1px 1px 1px;
  border-color: #e5c53e;
  border-radius: 10px 10px 10px 10px;
  padding: 1vh 3vh 1vh 3vh;
  cursor: pointer;
  transition: 0.2s ease;
}

button:hover {
  border-color: #f27d67;
  background-color: #d1d1d11c;
}

.twoColumn {
  display: grid;
  grid-template-columns: 50% 50%;
  gap: 2vh;
  width: 50%;
  max-width: 2000px;
  margin: auto;
}

.lightSection {
  background-color: #2c3032;
}

.carousel {
  display: grid;
  grid-template-columns: 33.33% 33.33% 33.33%;
  gap: 0;
  margin: auto;
  width: 40%;
  text-align: left;
}

.tile {
  padding: 5%;
}

.tileImg {
  width: 100%;
  aspect-ratio: 1;
  background-size: cover;
  background-position: 50% 50%;
  border: solid 2px black;
  border-radius: 2vh;
  cursor: pointer;
  transition: 0.2s ease;
}

.tileImg:hover {
    filter: brightness(110%);
}

.tileTitle {
    font-weight: 600;
    color: #3de8b9;
    margin-bottom: 0;
}

.tileDescription {
    margin: 0;
    margin-top: 0.5vh;
    font-size: 1.5vh;
}

.footer {
  font-size: 1.5vh;
}

/* Moved out of inline styles in index.html (identical values) so the
   responsive rules below can override them. */
button.buttonSmall {
  border-color: #3de8b9;
  font-weight: 400;
  font-size: 1.5vh;
  padding: 1vh 2vh 1vh 2vh;
  border-radius: 1.5vh;
}

.columnIcon {
  width: 22vh;
  margin: auto;
}

/* ------------------------------------------------------------------
   Responsive styles (desktop layout above is unchanged)
   ------------------------------------------------------------------ */

/* Tablets and small laptop windows */
@media (max-width: 1024px) {
  .twoColumn {
    width: 80%;
  }

  .carousel {
    width: 70%;
  }
}

/* Phones and small tablets */
@media (max-width: 768px) {
  /* Header and footer: stack logo and links instead of side by side */
  .header {
    height: auto;
    padding: 16px 0;
    font-size: 16px;
  }

  .footer {
    position: relative;
    height: auto;
    padding: 28px 0;
    font-size: 16px;
  }

  .headerContent {
    grid-template-columns: 1fr;
    gap: 8px;
    width: 90%;
    top: 0;
    transform: none;
  }

  .header img,
  .footer img {
    width: min(220px, 70vw);
    margin-top: 0;
  }

  .headerLinks {
    grid-template-columns: repeat(3, auto);
    justify-content: center;
    gap: 8px 20px;
  }

  /* Larger tap targets for nav links */
  .headerLinks a {
    padding: 8px 4px;
  }

  .footer p {
    font-size: 15px;
    margin: 0;
  }

  .footer p a {
    overflow-wrap: anywhere;
  }

  /* Hero: let content set its own position rather than using vh offsets */
  .imageSection {
    position: relative;
    height: auto;
    min-height: 100vh;
    min-height: 100svh;
    display: flex;
    align-items: center;
    justify-content: center;
    box-sizing: border-box;
    padding: 170px 20px 60px;
    overflow: hidden;
  }

  .imageBackdrop {
    position: absolute;
    top: 0;
    left: 0;
    height: 100%;
  }

  .sectionContent {
    top: 0;
    width: 100%;
  }

  h1,
  .title {
    font-size: clamp(2rem, 9vw, 4rem);
    line-height: 1.25;
    text-shadow: 3px 3px 3px black;
  }

  h2 {
    font-size: clamp(1.75rem, 7vw, 2.5rem);
  }

  p {
    font-size: 17px;
  }

  .subtitle {
    font-size: 16px;
  }

  button {
    font-size: 20px;
    padding: 10px 24px;
    border-radius: 10px;
  }

  button.buttonSmall {
    font-size: 16px;
    padding: 8px 18px;
    border-radius: 10px;
  }

  .spacer {
    height: 32px;
  }

  /* About section: single column */
  .twoColumn {
    grid-template-columns: 1fr;
    gap: 24px;
    width: 88%;
  }

  .columnIcon {
    width: 140px;
  }

  /* Projects: horizontal swipe carousel */
  .lightSection h2,
  .lightSection > .subtitle {
    padding: 0 20px;
  }

  .carousel {
    display: flex;
    gap: 0;
    width: 100%;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
    padding: 0 7.5%;
    box-sizing: border-box;
    scroll-padding: 0 7.5%;
  }

  .tile {
    flex: 0 0 70%;
    max-width: 320px;
    padding: 12px;
    box-sizing: border-box;
    scroll-snap-align: center;
  }

  .tileImg {
    border-radius: 16px;
  }
}
