/* ==============================
   Brandon Shaw Woodworking
   style.css
   ============================== */

:root {
  --wood-dark:    #2c1a0e;
  --wood-mid:     #5c3d1e;
  --wood-light:   #a0714a;
  --wood-warm:    #d4a96a;
  --cream:        #f9f4ee;
  --off-white:    #f0e8da;
  --text-dark:    #1a1008;
  --text-mid:     #4a3520;
  --text-light:   #7a5c3a;
  --accent:       #c0722a;
  --gap:          1.5rem;
}

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

html { scroll-behavior: smooth; }

body {
  font-family: 'Georgia', serif;
  background: var(--cream);
  color: var(--text-dark);
  line-height: 1.6;
}

/* --- NAV --- */
nav {
  background: var(--wood-dark);
  padding: 0 2rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: sticky;
  top: 0;
  z-index: 100;
  height: 60px;
  box-shadow: 0 2px 8px rgba(0,0,0,.4);
}

nav .brand {
  color: var(--wood-warm);
  font-size: 1.2rem;
  font-weight: bold;
  letter-spacing: .05em;
  text-decoration: none;
}

nav ul {
  list-style: none;
  display: flex;
  gap: 2rem;
}

nav ul a {
  color: var(--off-white);
  text-decoration: none;
  font-family: 'Arial', sans-serif;
  font-size: .9rem;
  letter-spacing: .08em;
  text-transform: uppercase;
  transition: color .2s;
}

nav ul a:hover { color: var(--wood-warm); }

/* --- HERO --- */
.hero {
  background: var(--wood-dark);
  color: var(--off-white);
  text-align: center;
  padding: 5rem 2rem 4rem;
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(92,61,30,.8) 0%, rgba(44,26,14,.95) 100%);
}

.hero > * { position: relative; }

.hero h1 {
  font-size: clamp(2rem, 5vw, 3.5rem);
  color: var(--wood-warm);
  margin-bottom: .5rem;
  letter-spacing: .04em;
}

.hero p {
  font-size: 1.1rem;
  color: var(--off-white);
  opacity: .85;
  max-width: 500px;
  margin: 0 auto;
}

/* --- SECTION HEADERS --- */
.section-header {
  text-align: center;
  padding: 3rem 1rem 1.5rem;
}

.section-header h2 {
  font-size: 1.8rem;
  color: var(--wood-mid);
  position: relative;
  display: inline-block;
}

.section-header h2::after {
  content: '';
  display: block;
  width: 50%;
  height: 3px;
  background: var(--wood-warm);
  margin: .4rem auto 0;
  border-radius: 2px;
}

/* --- PROJECT GRID --- */
.project-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: var(--gap);
  padding: 1rem 2rem 3rem;
  max-width: 1200px;
  margin: 0 auto;
}

.project-card {
  background: white;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 2px 12px rgba(44,26,14,.12);
  text-decoration: none;
  color: inherit;
  transition: transform .2s, box-shadow .2s;
  display: block;
}

.project-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 24px rgba(44,26,14,.2);
}

.project-card .thumb {
  width: 100%;
  aspect-ratio: 4/3;
  object-fit: cover;
  display: block;
  background: var(--off-white);
}

.project-card .thumb-placeholder {
  width: 100%;
  aspect-ratio: 4/3;
  background: linear-gradient(135deg, var(--wood-mid), var(--wood-light));
  display: flex;
  align-items: center;
  justify-content: center;
  color: rgba(255,255,255,.5);
  font-size: 3rem;
}

.project-card .card-info {
  padding: 1rem 1.2rem 1.2rem;
}

.project-card .card-info h3 {
  font-size: 1.1rem;
  color: var(--wood-dark);
  margin-bottom: .3rem;
}

.project-card .card-info p {
  font-family: 'Arial', sans-serif;
  font-size: .85rem;
  color: var(--text-light);
  line-height: 1.4;
}

/* --- PROJECT DETAIL PAGE --- */
.project-detail {
  max-width: 960px;
  margin: 0 auto;
  padding: 2rem;
}

.project-detail .back-link {
  display: inline-flex;
  align-items: center;
  gap: .4rem;
  color: var(--wood-mid);
  text-decoration: none;
  font-family: 'Arial', sans-serif;
  font-size: .9rem;
  margin-bottom: 1.5rem;
}

.project-detail .back-link:hover { color: var(--accent); }

.project-detail h1 {
  font-size: 2rem;
  color: var(--wood-dark);
  margin-bottom: .5rem;
}

.project-detail .project-desc {
  color: var(--text-mid);
  font-size: 1.05rem;
  margin-bottom: 2rem;
  max-width: 640px;
}

/* Photo grid on project pages */
.photo-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 1rem;
}

.photo-grid figure {
  margin: 0;
  background: white;
  border-radius: 6px;
  overflow: hidden;
  box-shadow: 0 2px 8px rgba(44,26,14,.1);
  cursor: pointer;
}

.photo-grid figure img {
  width: 100%;
  aspect-ratio: 4/3;
  object-fit: cover;
  display: block;
  transition: opacity .2s;
}

.photo-grid figure:hover img { opacity: .9; }

.photo-grid figcaption {
  padding: .5rem .8rem;
  font-family: 'Arial', sans-serif;
  font-size: .8rem;
  color: var(--text-light);
}

/* --- LIGHTBOX --- */
#lightbox {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.92);
  z-index: 999;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 1rem;
}

#lightbox.open { display: flex; }

#lightbox img {
  max-width: 90vw;
  max-height: 80vh;
  object-fit: contain;
  border-radius: 4px;
}

#lightbox .lb-caption {
  color: rgba(255,255,255,.75);
  font-family: 'Arial', sans-serif;
  font-size: .9rem;
  text-align: center;
}

#lightbox .lb-close {
  position: absolute;
  top: 1.2rem;
  right: 1.5rem;
  color: white;
  font-size: 2rem;
  cursor: pointer;
  background: none;
  border: none;
  line-height: 1;
}

/* --- FOOTER --- */
footer {
  background: var(--wood-dark);
  color: var(--off-white);
  text-align: center;
  padding: 1.5rem;
  font-family: 'Arial', sans-serif;
  font-size: .85rem;
  opacity: .8;
}

/* --- RESPONSIVE --- */
@media (max-width: 600px) {
  nav { padding: 0 1rem; }
  nav ul { gap: 1rem; }
  .project-grid { padding: 1rem; }
  .hero { padding: 3rem 1rem; }
}
