/* ============================================================
   ALISON E MOFFETT
   ============================================================ */

:root {
  --burgundy: #5D1A22;
  --burgundy-light: #A05B63;
  --bg: #ffffff;

  /* Page spacing scales with viewport but caps on big screens */
  --page-padding-x: clamp(24px, 5vw, 80px);
  --page-padding-top: clamp(28px, 4vw, 56px);
  --content-max: 1200px;
}

* {
  box-sizing: border-box;
}

html, body {
  margin: 0;
  padding: 0;
}

body {
  background: var(--bg);
  color: var(--burgundy);
  font-family: "Outfit", system-ui, -apple-system, Segoe UI, sans-serif;
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  line-height: 1.5;
}

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

a:hover {
  text-decoration: underline;
  text-underline-offset: 3px;
}

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

/* ============================================================
   HEADER
   ============================================================ */

.site-header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  padding: var(--page-padding-top) var(--page-padding-x) 0;
  max-width: var(--content-max);
  margin: 0 auto;
  gap: 24px;
  flex-wrap: wrap;
}

.site-title {
  font-size: clamp(28px, 4.2vw, 52px);
  font-weight: 400;
  letter-spacing: 0.02em;
  margin: 0;
  line-height: 1;
}

.site-title a:hover {
  text-decoration: none;
}

.site-nav {
  display: flex;
  gap: clamp(16px, 2vw, 32px);
  font-size: clamp(14px, 1.1vw, 18px);
}

/* Nav links default to the lighter burgundy.
   The link to the current page (.active) stays full burgundy.
   Hovering an inactive link lifts it to full burgundy. */
.site-nav a {
  color: var(--burgundy-light);
  transition: color 0.2s ease;
}

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

.site-nav a.active {
  color: var(--burgundy);
}

.site-nav a.active:hover {
  text-decoration: none;
  cursor: default;
}

/* ============================================================
   GALLERY (portfolio / index)
   ============================================================ */

.gallery-wrap {
  max-width: var(--content-max);
  margin: 0 auto;
  padding: clamp(40px, 5vw, 72px) var(--page-padding-x) clamp(60px, 8vw, 120px);
}

/* CSS-columns masonry: images flow into columns top-to-bottom,
   each keeps its natural aspect ratio. Modern, no JS needed for layout. */
.gallery {
  column-count: 3;
  column-gap: clamp(20px, 2.5vw, 40px);
}

.gallery-item {
  margin: 0 0 clamp(20px, 2.5vw, 40px);
  break-inside: avoid;
  /* avoid pre-render flash before JS adds items */
  opacity: 0;
  animation: fadeIn 0.5s ease forwards;
}

.gallery-item img {
  width: 100%;
  height: auto;
}

@keyframes fadeIn {
  to { opacity: 1; }
}

/* Empty state while JS is probing */
.gallery-loading {
  text-align: center;
  padding: 40px 0;
  opacity: 0.5;
  font-size: 14px;
}

/* ============================================================
   INFO PAGE
   ============================================================ */

.info-wrap {
  max-width: var(--content-max);
  margin: 0 auto;
  padding: clamp(40px, 5vw, 72px) var(--page-padding-x) clamp(40px, 5vw, 80px);
}

.info-intro {
  font-size: clamp(16px, 1.4vw, 20px);
  line-height: 1.6;
  margin: 0 0 clamp(28px, 3vw, 44px);
  max-width: 640px;
}

.info-intro p {
  margin: 0 0 1em;
}

.info-intro p:last-child {
  margin-bottom: 0;
}

.info-photos {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(20px, 2.5vw, 40px);
  max-width: 720px;
}

.info-photos img {
  width: 100%;
  height: auto;
}

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

/* Tablet: 2-column gallery */
@media (max-width: 900px) {
  .gallery {
    column-count: 2;
  }
}

/* Mobile: single column, wrap nav under title */
@media (max-width: 560px) {
  .gallery {
    column-count: 1;
  }
  .site-header {
    align-items: flex-start;
  }
  .info-photos {
    grid-template-columns: 1fr;
  }
}
