body {
  margin: 0;
  padding: 0;
  font-family: 'Trebuchet MS', sans-serif;
  background: #fff;
  color: #333;
  display: grid;
  grid-template-columns: auto 700px auto;
  justify-content: center;
  align-items: start;
  min-height: 100vh;
  box-sizing: border-box;
}

.sidebar {
  width: 220px;
  padding: 1.5rem;
  background-color: #f9f9f9;
  margin-top: 2rem;
  height: 50vh;
  box-shadow: 0 2px 6px rgb(0 0 0 / 0.05);
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  grid-column: 1;
}

.nav {
  display: flex;
  flex-direction: column;
  width: 100%;
}

.nav-link {
  color: #004f57;
  text-decoration: none;
  font-weight: 600;
  font-size: 1rem;
  padding: 0.5rem 0;
  border-left: 4px solid transparent;
  transition: border-color 0.3s;
  padding-left: 0.5rem;
}

.nav-link:hover {
  border-left-color: #76b5af;
}

.nav-link.active {
  border-left-color: #004f57;
  font-weight: 700;
}

.main-content {
  grid-column: 2;
  padding: 2rem 0.25rem 2rem 3rem; /* top right bottom left */
  max-width: 700px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  box-sizing: border-box;
}

.site-title {
  font-family: 'Lato', sans-serif;
  font-weight: 700;
  font-size: 3rem;
  margin: 0 0 0.3rem;
  color: #004f57;
  text-align: left;
}

.site-subtitle {
  font-size: 1.2rem;
  margin-top: 0;
  margin-bottom: 1rem;
  color: #555;
  text-align: left;
}

.divider {
  border: none;
  border-bottom: 2px solid #004f57;
  margin-bottom: 1.5rem;
}

.section-title {
  font-size: 1.5rem;
  margin-bottom: 1.5rem;
  color: #333;
  text-align: left;
}

.project {
  display: flex;
  gap: 1.5rem;
  margin-bottom: 2.5rem;
  align-items: flex-start;
}

.project img {
  width: 79%;
  max-width: 395px;
  height: auto;
  flex-shrink: 0;
  border-radius: 0 !important;
}

.project-text {
  flex: 1;
}

.project-text h4 {
  margin: 0 0 0.3rem;
  font-size: 1.25rem;
  font-weight: bold;
}

.project-text h5 {
  margin: 0 0 0.5rem;
  font-size: 1rem;
  color: #777;
}

.project-text p {
  font-size: 0.95rem;
  color: #333;
  margin: 0;
}

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

.project-text h4 a:hover {
  text-decoration: underline;
}

.about-bio p {
  font-size: 1.1rem;
  line-height: 1.6;
  color: #333;
  max-width: 600px;
  margin: 2rem 0;
}

.about-section {
  width: 100%;
  max-width: 700px;
  margin-top: 2rem;
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

.about-content {
  display: flex;
  gap: 2rem;
  align-items: center;
}

.about-image {
  width: 180px;
  height: auto;
  flex-shrink: 0;
  object-fit: cover;
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.about-text {
  flex: 1;
  font-size: 1.1rem;
  line-height: 1.6;
  color: #333;
  font-family: 'Trebuchet MS', sans-serif;
}

.contact-card {
  background-color: #f9f9f9;
  padding: 1.5rem;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.05);
  font-size: 1.05rem;
  color: #004f57;
  max-width: 700px;
}

.contact-card h3 {
  margin-top: 0;
  margin-bottom: 1rem;
}

.contact-card a {
  color: #004f57;
  text-decoration: none;
}

.contact-card a:hover {
  text-decoration: underline;
}

/* Project thumbnail hover */
.project a {
  display: inline-block;
  width: 79%;
  max-width: 395px;
  transition: transform 0.3s ease, opacity 0.3s ease;
}

.project a:hover {
  transform: scale(1.02);
  opacity: 0.85;
  cursor: pointer;
}

.project a img {
  width: 100%;
  height: auto;
  display: block;
}

/* Thumbnail video play icon */
.thumbnail-wrapper {
  position: relative;
  display: inline-block;
}

.thumbnail-wrapper img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 0;
}

.play-button {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 48px;
  height: 48px;
  background: rgba(0, 0, 0, 0.5);
  clip-path: polygon(30% 20%, 30% 80%, 75% 50%);
  cursor: pointer;
  transition: background 0.3s;
}

.thumbnail-wrapper:hover .play-button {
  background: rgba(0, 0, 0, 0.7);
}

/* ========== CAROUSEL ========== */

.carousel {
  position: relative;
  width: 395px;
  max-width: 100%;
  overflow: visible;
  flex-shrink: 0;
  border-radius: 0;
}

.carousel-images {
  position: relative;
  width: 100%;
  height: auto;
}

.carousel-image {
  display: none;
  width: 100%;
  height: auto;
  user-select: none;
  transition: transform 0.3s ease;
  z-index: 1;
}

/* Active image */
.carousel-image.active {
  display: block;
}

/* ENLARGE ON HOVER FOR NIGHTWATCHMAN CAROUSEL */
.nightwatchman-carousel .carousel-image.active:hover {
  transform: scale(2);
  z-index: 10;
  cursor: zoom-in;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.25);
}

/* Carousel controls */
.carousel-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(0, 0, 0, 0.3);
  border: none;
  color: white;
  font-size: 2rem;
  width: 40px;
  height: 40px;
  cursor: pointer;
  padding: 0;
  line-height: 1;
  border-radius: 0;
  transition: background 0.3s ease;
  z-index: 20;
}

.carousel-btn:hover {
  background: rgba(0, 0, 0, 0.6);
}

.carousel-btn.prev {
  left: 8px;
}

.carousel-btn.next {
  right: 8px;
}
.nightwatchman-gallery {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 10px;
  margin-bottom: 20px;
}

.nightwatchman-gallery img {
  width: 100%;
  height: auto;
  border-radius: 4px;
  transition: transform 0.3s ease;
  object-fit: cover;
}

.nightwatchman-gallery img:hover {
  transform: scale(1.05);
  cursor: pointer;
}
.nightwatchman-gallery {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 10px;
  margin-bottom: 20px;
}

.nightwatchman-gallery img {
  width: 100%;
  height: auto;
  border-radius: 4px;
  transition: transform 0.3s ease;
  object-fit: cover;
  cursor: pointer;
}

.nightwatchman-gallery img:hover {
  transform: scale(1.05);
}

.lightbox {
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(0,0,0,0.85);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 9999;
  flex-direction: row;
}

.lightbox.hidden {
  display: none;
}

.lightbox-img {
  max-width: 90vw;
  max-height: 90vh;
  border-radius: 6px;
  box-shadow: 0 0 20px rgba(0,0,0,0.7);
}

.lightbox-close,
.lightbox-prev,
.lightbox-next {
  background: transparent;
  border: none;
  color: white;
  font-size: 2.5rem;
  cursor: pointer;
  user-select: none;
  padding: 0 10px;
  transition: color 0.3s ease;
}

.lightbox-close:hover,
.lightbox-prev:hover,
.lightbox-next:hover {
  color: #ddd;
}

.lightbox-close {
  position: fixed;
  top: 20px;
  right: 30px;
  font-weight: bold;
  font-size: 3rem;
  z-index: 10000;
}

.lightbox-prev,
.lightbox-next {
  align-self: center;
}
