/* =========================
   RESET + BASE
========================= */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html,
body {
  height: 100%;
}

/* <!!> Color system */
:root {
  --bg: #2b221b;
  --text: #ffffff;
  --thumb-bg: #3a2f27;

  --hover: #b9f27c;     /* keep this for the green border hover */
  --nav-link: #b9f27c;  /* green text for nav */
  --nav-hover: #ffffff; /* white hover for nav */
}

strong {
  color: var(--nav-link); /* your green */
  font-weight: normal;    /* optional: keeps it clean, not shouty */
}


body {
  font-family: Helvetica, sans-serif;
  font-size: 14px;
  line-height: 1.4;
  background: var(--bg);
  color: var(--text);

  /* <!!> Desktop: page doesn't scroll; columns do */
  overflow: hidden;
}

/* =========================
   LINKS (GLOBAL + NAV OVERRIDES)
========================= */
a {
  color: inherit;
  text-decoration: none;
}

a:hover {
  color: var(--hover);
  text-decoration: none;
}

/* <!!> Left nav link colors override global link hover */
.nav a {
  color: var(--nav-link);
}

.nav a:hover {
  color: var(--nav-hover);
}

/* =========================
   LAYOUT (DESKTOP)
========================= */
.layout {
  height: 100vh;
  display: grid;
  grid-template-columns: 180px 1fr 180px;
  gap: 24px;
  padding: 24px;
}

.nav,
.main,
.sidebar {
  height: calc(100vh - 48px);
}

/* =========================
   NAV
========================= */
.nav {
  overflow: hidden;
}

.site-title {
  font-size: 14px;
  font-weight: normal;
  margin-bottom: 16px;
}

.nav-links {
  list-style: none;
  margin-bottom: 12px;
}

.nav-links li {
  margin-bottom: 8px;
}

.nav-quote {
  margin-top: 12px;
  opacity: 0.95;
  max-width: 22ch;
}

/* <!!> Photo under Contact */
.nav-photo {
  width: 100px; /* your preferred size */
  height: auto;
  display: block;
}

/* =========================
   CENTER COLUMN
========================= */
.main {
  overflow-y: auto;
}

/* =========================
   FEATURED GRID (CENTER)
========================= */
.project-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 24px;
}

/* =========================
   THUMBNAILS (SHARED)
========================= */
.project-thumb {
  background: var(--thumb-bg);
  cursor: pointer;
  position: relative;
  overflow: hidden;
  display: block;
  aspect-ratio: 1 / 1;
}

.project-thumb.hero {
  grid-column: span 2;
  aspect-ratio: 5 / 3;
}

.project-thumb.small {
  aspect-ratio: 10 / 7;
  flex: 0 0 auto;
  font-size: 10px;
}

.project-thumb img,
.project-thumb video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  pointer-events: none;
  position: relative;
  z-index: 1;
}

/* <!!> Hover border overlay */
.project-thumb::after {
  content: "";
  position: absolute;
  inset: 0;
  border: 3px solid transparent;
  pointer-events: none;
  z-index: 2;
}

.project-thumb:hover::after,
.project-thumb.is-active::after {
  border-color: var(--hover);
}


.about-photo {
  width: 100px;
  height: auto;
  display: block;
  margin: 12px 0 0;
}


/* =========================
   RIGHT SIDEBAR (DESKTOP)
========================= */
.sidebar {
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

/* =========================
   PROJECT DETAIL (CENTER)
========================= */
.project-detail {
  max-width: 900px;
  margin: 0 auto;
  padding-bottom: 60px;
}

#project-detail:empty {
  display: none;
}

.project-hero {
  width: 100%;
  height: auto;
  display: block;
  margin-bottom: 24px;
}

.project-meta {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
  margin-bottom: 24px;
  opacity: 0.95;
}

.project-meta p {
  margin-bottom: 8px;
}

.project-gallery {
  display: grid;
  grid-template-columns: 1fr; /* mobile default */
  gap: 24px;
  margin-top: 24px;
}

/* tablet/desktop: 2 columns */
@media (min-width: 600px) {
  .project-gallery {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* first gallery item spans full width */
.project-gallery .gallery-item.full {
  grid-column: 1 / -1;
}

.project-gallery img,
.project-gallery video {
  width: 100%;
  height: auto;
  display: block;
}


/* =========================
   LIGHTBOX
========================= */
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 9999;

  display: none;
  align-items: center;
  justify-content: center;

  padding: 24px;
  background: rgba(0, 0, 0, 0.85);
}

.lightbox.is-open {
  display: flex;
}

.lightbox-img {
  max-width: min(1100px, 92vw);
  max-height: 90vh;
  width: auto;
  height: auto;
  display: block;
}

.lightbox-close {
  position: absolute;
  top: 16px;
  right: 16px;

  background: none;
  border: none;
  color: #fff;

  font: inherit;
  font-size: 28px;
  line-height: 1;
  cursor: pointer;
  padding: 6px 10px;
}

.lightbox-close:hover {
  color: var(--hover);
}

/* Award line inside project description */
.project-award {
  color: var(--hover);
  font-style: italic;
  text-decoration: none;
}


.project-award:hover {
  text-decoration: underline;
}


/* =========================
   LIGHTBOX
========================= */
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 9999;

  display: none;
  align-items: center;
  justify-content: center;

  padding: 24px;
  background: rgba(0, 0, 0, 0.85);
}

.lightbox.is-open {
  display: flex;
}

.lightbox-img {
  max-width: min(1100px, 92vw);
  max-height: 90vh;
  width: auto;
  height: auto;
  display: block;
}

.lightbox-close {
  position: absolute;
  top: 16px;
  right: 16px;

  background: none;
  border: none;
  color: #fff;

  font: inherit;
  font-size: 28px;
  line-height: 1;
  cursor: pointer;
  padding: 6px 10px;
}

.lightbox-close:hover {
  color: var(--hover);
}

.project-gallery img {
  cursor: zoom-in;
}



/* =========================
   MOBILE PAGER
========================= */
/* <!!> Hidden by default; appears when JS adds .is-visible (and in mobile rules below) */
.mobile-pager {
  display: none;
  gap: 16px;                 /* space between Prev / Next */
  padding: 12px 0 24px;
  margin-top: 24px;

  justify-content: flex-start; /* LEFT aligned */
  align-items: center;
}


.mobile-pager.is-visible {
  display: flex;
}

/* <!!> Button version (your HTML currently uses <button>) */
.pager-btn {
  background: none;
  border: none;
  padding: 0;

  font: inherit;
  color: var(--text);
  cursor: pointer;

  display: inline-flex;
  align-items: center;
  gap: 6px;
}


.pager-btn:hover {
  color: var(--hover);
}


.pager-btn:disabled {
  opacity: 0.35;
  cursor: default;
  pointer-events: none;
}

.pager-btn:active {
  opacity: 0.6;
}


/* <!!> Link version (only applies if you ever switch pager to <a> tags) */
.mobile-pager a {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;

  padding: 14px 16px;
  border: 1px solid rgba(255, 255, 255, 0.35);
  border-radius: 6px;

  color: var(--text);
  text-decoration: none;
  font: inherit;
}

.mobile-pager a:hover {
  border-color: var(--hover);
  color: var(--hover);
}

/* <!!> Never show pager on desktop */
@media (min-width: 769px) {
  .mobile-pager {
    display: none !important;
  }
}

/* =========================
   MOBILE
========================= */
@media (max-width: 768px) {
  body {
    overflow: auto;
  }

  .nav,
  .main,
  .sidebar {
    height: auto;
    overflow: visible;
  }

  .layout {
    grid-template-columns: 1fr;
    height: auto;
  }

  /* NAV: 2 columns */
  .nav {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
    margin-bottom: 24px;
  }

  .site-title {
    grid-column: span 2;
    margin-bottom: 8px;
  }

  /* Hide featured grid on mobile */
  .project-grid {
    display: none;
  }

  /* Mobile feed uses sidebar list */
  .sidebar {
    display: grid;
    grid-template-columns: 1fr;
    gap: 24px;
  }

  .project-thumb.small {
    aspect-ratio: 5 / 4;
    font-size: 12px;
  }

  /* <!!> Show sidebar only on HOME */
  body.is-project .sidebar {
    display: none;
  }
  body.is-home .sidebar {
    display: grid;
  }

  /* <!!> Mobile pager exists only on project pages (and only when .is-visible) */
  body.is-project .mobile-pager.is-visible {
    display: flex;
  }
  body.is-project .mobile-pager:not(.is-visible) {
    display: none;
  }

  /* <!!> Extra spacing/behavior you had for mobile project pages */
  body.is-project .mobile-pager {
  justify-content: flex-start;
  gap: 16px;
  margin-top: 40px;
}

  .project-meta {
    grid-template-columns: 1fr;
  }
}

