@charset "UTF-8";

/* ============================================

/* ---- Variables ---- */
:root {
  --bg: #111111;
  --bg-input: #2a2a2a;
  --bg-input-focus: #333333;
  --text: #ffffff;
  --text-dim: rgba(255, 255, 255, 0.55);
  --text-footer: rgba(255, 255, 255, 0.28);
  --nav-height: 80px;
  --grid-gap: 5px;
  --font: 'Josefin Sans', sans-serif;
  --body-font: 'League Spartan', sans-serif;
  --transition: 0.35s ease;

  /* Description text variables */
  --desc-size: 17px;
  --desc-weight: 450;
  --desc-spacing: 0.04em;
  --desc-line-height: 1.5;
  --desc-color: rgba(255, 255, 255, 0.63);
  --desc-max-width: 900px;
  --img-shadow: 0 0px 30px rgba(0, 0, 0, 0.85);
}

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

html {
  scroll-behavior: smooth;
  scrollbar-gutter: stable;
  /* Prevents layout jump when scrollbar appears/disappears */
}

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-weight: 400;
  text-transform: uppercase;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

a {
  color: inherit;
  text-decoration: none;
}

p {
  font-family: var(--body-font);
}

img {
  display: block;
  max-width: 100%;
}

/* ============================================
   LAYOUT CONTAINER
   ============================================ */

.container {
  max-width: none;
  margin: 0 auto;
  padding: 0 100px;
  width: 100%;
}

/* ============================================
   NAVIGATION
   ============================================ */

.site-nav {
  position: absolute;
  top: 0px;
  left: 0;
  right: 0;
  height: auto;
  background: var(--bg);
  display: flex;
  align-items: center;
  z-index: 100;
}

.site-nav .container {
  display: flex;
  align-items: center;
  position: relative;
  padding-top: 60px;
  padding-bottom: 60px;
}

.nav-links {
  display: flex;
  gap: 20px;
  list-style: none;
}

.nav-links a {
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.1em;
  color: var(--text-dim);
  transition: color var(--transition);
  line-height: 1;
}

.nav-links a:hover,
.nav-links a.active {
  color: var(--text);
}

.nav-brand {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  font-family: 'Afacad Flux', sans-serif;
  font-size: 40px;
  font-weight: 430;
  letter-spacing: 0.18em;
  white-space: nowrap;
  transition: opacity var(--transition);
}

.nav-brand:hover {
  opacity: 0.8;
}

/* ============================================
   MAIN CONTENT AREA
   ============================================ */

main {
  padding-top: 150px;
  padding-bottom: 80px;
}

/* ============================================
   HOMEPAGE — PHOTO GRID
   ============================================ */

.photo-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--grid-gap);
}

.grid-item {
  position: relative;
  overflow: hidden;
  display: block;
  background: #1a1a1a;
  cursor: pointer;
  aspect-ratio: 3 / 2;
  /* Ensures all boxes are the same size/ratio */
}

.grid-item img {
  width: 100%;
  height: 100%;
  aspect-ratio: 3 / 2;
  /* Force image element to reserve 3:2 space */
  display: block;
  object-fit: cover;
  /* Fills the box while preserving aspect ratio */
  transition: filter 0.4s ease, transform 0.6s ease;
  will-change: transform, filter;
}

.grid-item {
  transition: opacity 0.4s ease, transform 0.4s ease;
}

.photo-grid.filtering .grid-item {
  opacity: 0;
  transform: scale(0.98);
}

.grid-item:hover img {
  filter: brightness(0.3);
  transform: scale(1.02);
}

/* Hover overlay */
.grid-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.4s ease;
  pointer-events: none;
  gap: 8px;
}

.grid-item:hover .grid-overlay {
  opacity: 1;
}

.grid-overlay .overlay-title {
  font-size: 16px;
  font-weight: 700;
  letter-spacing: 0.2em;
  text-align: center;
  padding: 0 20px;
}

.grid-overlay .overlay-year {
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.15em;
  color: var(--text-dim);
}

/* Placeholder tile (no image yet) */
.grid-item--placeholder {
  background: #181818;
}

.grid-item--placeholder .grid-overlay {
  opacity: 0.15;
}

.grid-item.hidden {
  display: none;
}

/* ============================================
   FILTER BAR
   ============================================ */

.filter-bar {
  display: flex;
  justify-content: flex-end;
  gap: 25px;
  margin-bottom: 25px;
  padding-right: 2px;
}

.filter-btn {
  background: none;
  border: none;
  color: var(--text-dim);
  font-family: var(--font);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  cursor: pointer;
  padding: 5px 0;
  transition: color 0.3s ease, border-color 0.3s ease;
  border-bottom: 1px solid transparent;
}

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

.filter-btn.active {
  color: var(--text);
  border-bottom-color: var(--text);
}

.filter-btn.active[data-filter="spring"] {
  color: hsl(140, 25%, 75%);
  border-bottom-color: hsl(140, 25%, 75%);
}

.filter-btn.active[data-filter="summer"] {
  color: hsl(50, 30%, 80%);
  border-bottom-color: hsl(50, 30%, 80%);
}

.filter-btn.active[data-filter="autumn"] {
  color: hsl(25, 35%, 75%);
  border-bottom-color: hsl(25, 35%, 75%);
}

.filter-btn.active[data-filter="winter"] {
  color: hsl(200, 30%, 80%);
  border-bottom-color: hsl(200, 30%, 80%);
}

/* ============================================
   PROJECT PAGES
   ============================================ */

.project-header {
  max-width: var(--desc-max-width);
  margin: 0 auto;
  padding: 32px 24px 48px;
  text-align: center;
}

.project-header h1 {
  font-size: 21px;
  font-weight: 700;
  letter-spacing: 0.15em;
  margin-bottom: 28px;
}

.project-header p {
  font-family: var(--body-font);
  font-size: var(--desc-size);
  font-weight: var(--desc-weight);
  letter-spacing: var(--desc-spacing);
  line-height: var(--desc-line-height);
  color: var(--desc-color);
}

/* Image stack on project pages */
.project-images {
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 20px 80px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.project-images figure {
  margin: 0;
  width: 100%;
}

.project-images figure img {
  width: auto;
  max-width: 100%;
  max-height: 85vh;
  display: block;
  margin: 0 auto;
  box-shadow: var(--img-shadow);
  object-fit: contain;
}

/* Placeholder for project images (before real images are added) */
.img-placeholder {
  width: 100%;
  aspect-ratio: 3 / 2;
  background: #1a1a1a;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  color: #3a3a3a;
  font-size: 11px;
  letter-spacing: 0.18em;
  gap: 12px;
  border: 1px dashed #2a2a2a;
}

.img-placeholder svg {
  width: 28px;
  height: 28px;
  opacity: 0.4;
}

/* ============================================
   CONTACT PAGE
   ============================================ */

.contact-wrapper {
  max-width: 500px;
  margin: 0 auto;
  padding: 64px 30px 80px;
}

.contact-wrapper h1 {
  font-size: 22px;
  font-weight: 700;
  letter-spacing: 0.28em;
  text-align: center;
  margin-bottom: 52px;
}

.contact-form {
  display: flex;
  flex-direction: column;
  gap: 22px;
}

.form-group label {
  display: block;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.14em;
  margin-bottom: 9px;
  color: var(--text-dim);
}

.form-group input,
.form-group textarea {
  width: 100%;
  background: var(--bg-input);
  border: none;
  border-bottom: 1px solid transparent;
  color: var(--text);
  font-family: var(--font);
  font-size: 12.5px;
  font-weight: 300;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 14px 16px;
  outline: none;
  transition: background var(--transition), border-color var(--transition);
  appearance: none;
  -webkit-appearance: none;
  border-radius: 0;
}

.form-group textarea {
  height: 150px;
  resize: none;
  display: block;
}

.form-group input::placeholder,
.form-group textarea::placeholder {
  color: #4a4a4a;
  text-transform: uppercase;
  font-family: var(--font);
  letter-spacing: 0.08em;
}

.form-group input:focus,
.form-group textarea:focus {
  background: var(--bg-input-focus);
  border-bottom-color: rgba(255, 255, 255, 0.2);
}

.btn-submit {
  align-self: flex-start;
  background: var(--text);
  color: #000;
  border: none;
  font-family: var(--font);
  font-size: 11.5px;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  padding: 13px 32px;
  border-radius: 50px;
  cursor: pointer;
  margin-top: 8px;
  transition: background 0.25s, color 0.25s;
}

.btn-submit:hover {
  background: #cccccc;
}

/* Netlify honeypot */
.hidden-field {
  display: none;
}

/* ============================================
   FOOTER
   ============================================ */

footer {
  text-align: center;
  padding: 28px 20px;
  font-size: 9.5px;
  font-weight: 400;
  letter-spacing: 0.2em;
  color: var(--text-footer);
  border-top: 1px solid rgba(255, 255, 255, 0.06);
}

/* ============================================
   BACK TO TOP BUTTON
   ============================================ */

.back-to-top {
  position: fixed;
  bottom: 80px;
  right: 24px;
  width: 42px;
  height: 42px;
  background: rgba(255, 255, 255, 0.12);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s, background 0.2s;
  z-index: 200;
  border: none;
}

.back-to-top.visible {
  opacity: 1;
  pointer-events: auto;
}

.back-to-top:hover {
  background: rgba(255, 255, 255, 0.22);
}

.back-to-top svg {
  width: 15px;
  height: 15px;
  fill: none;
  stroke: #fff;
  stroke-width: 2.2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* ============================================
   LIGHTBOX
   ============================================ */

.lightbox {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.95);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
  padding: 40px;
}

.lightbox.active {
  opacity: 1;
  pointer-events: auto;
}

.lightbox-content {
  max-width: 100%;
  max-height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;
}

.lightbox-content img {
  max-width: 100%;
  max-height: calc(100vh - 120px);
  object-fit: contain;
  box-shadow: 0 0 50px rgba(0, 0, 0, 0.5);
  cursor: zoom-out;
}

.lightbox-caption {
  font-size: 14px;
  font-weight: 450;
  letter-spacing: 0.1em;
  color: var(--text);
  text-transform: uppercase;
  text-align: center;
}

.lightbox-close {
  position: absolute;
  top: 30px;
  right: 30px;
  background: none;
  border: none;
  color: #fff;
  font-size: 35px;
  cursor: pointer;
  line-height: 1;
  opacity: 0.6;
  transition: opacity 0.2s;
}

.lightbox-close:hover {
  opacity: 1;
}

@media (max-width: 680px) {
  .lightbox {
    padding: 20px;
  }

  .lightbox-close {
    top: 20px;
    right: 20px;
  }
}

/* ============================================
   RESPONSIVE
   ============================================ */

/* ---- Tablet / Large Mobile (≤ 1024px) ---- */
@media (max-width: 1024px) {
  .container {
    padding: 0 48px;
  }

  .site-nav .container {
    padding-top: 40px;
    padding-bottom: 40px;
  }

  main {
    padding-top: 120px;
  }
}

/* ---- Small Tablet (≤ 768px) ---- */
@media (max-width: 768px) {
  .container {
    padding: 0 24px;
  }

  .site-nav .container {
    padding-top: 28px;
    padding-bottom: 28px;
  }

  main {
    padding-top: 100px;
  }

  .nav-brand {
    font-size: 28px;
    letter-spacing: 0.2em;
  }

  .filter-bar {
    gap: 16px;
    flex-wrap: wrap;
    justify-content: center;
    margin-bottom: 20px;
  }

  /* Project pages */
  .project-header {
    padding: 20px 16px 36px;
  }

  .project-header h1 {
    font-size: 17px;
  }

  .project-images {
    padding: 0 16px 60px;
  }

  /* Contact */
  .contact-wrapper {
    padding: 48px 20px 60px;
  }
}

/* ---- Mobile (≤ 600px) ---- */
@media (max-width: 600px) {
  .photo-grid {
    grid-template-columns: 1fr;
  }

  /* Switch nav to stacked column layout so brand doesn't overlap links */
  .site-nav .container {
    flex-direction: column;
    align-items: center;
    gap: 14px;
    padding-top: 22px;
    padding-bottom: 22px;
  }

  /* Brand is no longer absolutely positioned — it flows naturally */
  .nav-brand {
    position: static;
    transform: none;
    font-size: 26px;
    letter-spacing: 0.22em;
    order: -1; /* brand first, then links */
  }

  .nav-links {
    gap: 24px;
  }

  .nav-links a {
    font-size: 11px;
    letter-spacing: 0.12em;
  }

  main {
    padding-top: 110px;
  }

  .container {
    padding: 0 16px;
  }

  .filter-bar {
    gap: 14px;
    margin-bottom: 18px;
    padding-right: 0;
  }

  .filter-btn {
    font-size: 10px;
    letter-spacing: 0.12em;
  }

  /* Project pages */
  .project-header {
    padding: 16px 12px 28px;
  }

  .project-header h1 {
    font-size: 14px;
    letter-spacing: 0.12em;
    margin-bottom: 18px;
  }

  .project-header p {
    font-size: 15px;
  }

  .project-images {
    padding: 0 10px 50px;
    gap: 4px;
  }

  /* Contact */
  .contact-wrapper {
    padding: 36px 16px 50px;
  }

  .contact-wrapper h1 {
    font-size: 18px;
    margin-bottom: 36px;
  }

  /* Lightbox */
  .lightbox {
    padding: 20px;
  }

  .lightbox-close {
    top: 20px;
    right: 20px;
  }
}

/* ---- Very Small Phones (≤ 380px) ---- */
@media (max-width: 380px) {
  .nav-brand {
    font-size: 22px;
    letter-spacing: 0.18em;
  }

  .nav-links {
    gap: 18px;
  }

  .container {
    padding: 0 12px;
  }

  .filter-bar {
    gap: 10px;
  }

  .filter-btn {
    font-size: 9.5px;
  }
}