/* =====================
   GLOBAL RESET
===================== */
*,
*::before,
*::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html, body {
  width: 100%;
  overflow-x: hidden;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  padding-left: env(safe-area-inset-left);
  padding-right: env(safe-area-inset-right);
  background-color: #1d1d1d;
  color: #f5f5f5;
}

/* NAVBAR */
.navbar {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  padding: clamp(24px, 3vw, 24px)32px;  
  border-bottom: 1px solid #ddd;
}

.nav-left {
  text-decoration: none;
  color: #e8e8e8;
  font-size: 14px;
}

.nav-title {
  font-size: clamp(18px, 3vw, 22px);
  font-weight: 600;
  letter-spacing: 1px;
}

.nav-icons {
  text-align: right;
}

.nav-icons a {
  margin-left: 16px;
  text-decoration: none;
  color: #dddddd;
  font-size: 14px;
}

/* LinkedIn Icon Size */
.linkedin-icon {
  width: 18px;
  height: 18px;
}

/* Harvard Icon Size */
.harvard-icon {
  width: 18px;
  height: 18px;
}

/* GRID */
.projects {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(360px, 1fr)); /* old 1fr 1fr 1fr; */
  gap: 32px;
  padding: clamp(24px, 5vw, 48px);
  max-width: 1500px;
  margin: 0 auto;
}

.project-link {
  text-decoration: none;
  color: inherit;
}

/* CARD */
.project-card {
  background: rgb(86, 86, 86);
  border-radius: 10px;
  overflow: hidden;
  transition: transform 0.2s ease;
}

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

.project-card img {
  width: 100%;
  height: 280px;
  object-fit: cover;
}

.project-card h3 {
  font-size: 16px;
  font-weight: 500;
  padding: 12px 16px 4px;
}

.status {
  font-size: 13px;
  color: #dcdcdc;
  padding: 0 16px 16px;
}

/* =====================
   PROJECT PAGE LAYOUT
===================== */
.project-page {
  max-width: 1100px;
  margin: 0 auto;
  padding: clamp(24px, 5vw, 64px); /*48px 64px;*/
}

/* Adds spacing between text sections */
.project-section {
  margin-top: 24px;
  margin-bottom: 24px;
  line-height: 1.6;
}

/* Optional: makes sure <p> text has space */
.project-text {
  margin-bottom: 24px;
}

/* Text layout */
.text-row {
  display: flex;
  flex-direction: column;
  gap: 20px;
  margin-bottom: 48px;
}

.image-row {
  display: flex;
  gap: 32px; /* 2rem; */
  justify-content: center;
  flex-wrap: wrap;
}

.image-item {
  text-align: center;
  width: min(465px, 100%);  /* SAME width for every image */
}

.project-image {
  width: 100%;
  height: 300px;
  object-fit: cover;   /* fills the box, crops edges */
  border-radius: 10px;
  display: block;
}

.image-description {
  margin-top: 0.5rem;
  font-size: 0.9rem;
  color: #c7c7c7;
  text-align: center
}

/* Large images */
.image-item2 {
  width: min(965px, 100%); /* SAME width for every image */
  text-align: center
}

.project-image2 {
  width: 100%;
  height: 600px;
  object-fit: cover;   /* fills the box, crops edges */
  border-radius: 10px;
}

/* Small images */
.image-item3 {
  /* text-align: center; */
  width: min(298px, 100%); /* SAME width for every image */
}

.project-image3 {
  width: 100%;
  height: 220px;
  object-fit: cover;   /* fills the box, crops edges */
  border-radius: 10px;
}

/* Super Small images */
.image-item4 {
  /* text-align: center; */
  width: min(216px, 100%); /* SAME width for every image */
}

.project-image4 {
  width: 100%;
  height: 165px;
  object-fit: cover;   /* fills the box, crops edges */
  border-radius: 10px;
}

/* For Lists */
.project-bullets {
  margin-top: 1rem;
  padding-left: 1.5rem;
}

.project-bullets li {
  margin-bottom: 0.5rem;
  line-height: 1.4;
}

img,
video {
  max-width: 100%;
  height: auto;
}

/* =====================
   MOBILE
===================== */
@media (max-width: 768px) {
  .navbar {
    padding: 16px;
  }

  .nav-icons {
    text-align: center;
    justify-self: end;
  }

  .project-card img {
    height: 200px;
  }

  .project-image {
    height: 240px;
  }
}

@media (max-width: 420px) {
  /* NAVBAR FIX */
  .navbar {
    padding-inline: 16px;
    display: flex;
    align-items: center;
    justify-content: space-between;
  }

  /* CONTENT */
  .projects,
  .project-page {
    padding-inline: 16px;
    grid-template-columns: 1fr;
  }

  /* Prevent text wrapping */
  .navbar * {
    white-space: nowrap;
  }
}
