/* ============================================
   Logan / Photography
   Editorial Grid / Commercial Portfolio
   ============================================ */

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

:root {
  --bg: #0a0a0a;
  --text: #d6cbb4;
  --text-dim: #968975;
  --text-faint: #4a4237;
  --white: #ede7db;
  --accent: #E20612;
  --rule: #2a2520;
  --serif-display: 'Cormorant Garamond', 'Georgia', serif;
  --serif-body: 'Source Serif 4', 'Georgia', serif;
  --mono: 'IBM Plex Mono', 'Courier New', monospace;
  --gutter: clamp(1.25rem, 4vw, 3rem);
  --grid-gap: clamp(0.5rem, 1.2vw, 0.875rem);
}

html {
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--mono);
  font-weight: 400;
  font-size: 0.8125rem;
  line-height: 1.6;
  letter-spacing: 0.02em;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

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

a {
  color: var(--text);
  text-decoration: none;
  transition: color 0.3s ease;
}

a:hover {
  color: var(--white);
}

::selection {
  background: var(--accent);
  color: var(--white);
}


/* =====================
   HEADER
   ===================== */
.site-header {
  display: flex;
  align-items: baseline;
  padding: 2rem var(--gutter);
  border-bottom: 1px solid var(--rule);
  gap: 1rem;
}

.header-name {
  font-family: var(--serif-display);
  font-size: 1.35rem;
  font-weight: 400;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--white);
  white-space: nowrap;
}

.header-location {
  font-family: var(--mono);
  font-size: 0.6875rem;
  font-weight: 400;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-faint);
  margin-right: auto;
  white-space: nowrap;
}

.header-nav {
  display: flex;
  gap: 2rem;
}

.header-nav a {
  font-family: var(--mono);
  font-size: 0.75rem;
  font-weight: 400;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-dim);
  position: relative;
}

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

.header-nav a.nav-active {
  color: var(--white);
}

.header-nav a.nav-active::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 100%;
  height: 2px;
  background: var(--accent);
}

.header-nav .nav-instagram {
  color: var(--text-faint);
  margin-left: 0.5rem;
}

.header-nav .nav-instagram:hover {
  color: var(--text);
}


/* =====================
   GALLERY GRID
   ===================== */
.gallery-page {
  flex: 1;
  padding: var(--gutter);
}

.grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  grid-auto-flow: dense;
  gap: var(--grid-gap);
  max-width: 1500px;
  margin: 0 auto;
}

.grid-item {
  overflow: hidden;
  cursor: pointer;
  position: relative;
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.grid-item.visible {
  opacity: 1;
  transform: translateY(0);
}

.grid-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.6s ease, filter 0.5s ease;
  filter: brightness(0.88) contrast(1.02);
}

.grid-item:hover img {
  transform: scale(1.03);
  filter: brightness(1) contrast(1);
}

.grid-wide {
  grid-column: span 2;
}


/* =====================
   INNER PAGES
   ===================== */
.inner-page {
  flex: 1;
  padding: var(--gutter);
  display: flex;
  align-items: flex-start;
}

.inner-content {
  max-width: 560px;
  margin: 5rem auto;
  padding: 0 1rem;
}

.page-title {
  font-family: var(--serif-display);
  font-size: 1.5rem;
  font-weight: 400;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--text-dim);
  margin-bottom: 3rem;
}


/* --- About --- */
.about-portrait {
  margin-bottom: 2.5rem;
}

.about-portrait img {
  width: 100%;
  max-width: 360px;
  filter: brightness(0.92) contrast(1.02);
}

.about-body p {
  font-family: var(--serif-body);
  font-size: 1.0625rem;
  font-weight: 400;
  line-height: 1.8;
  color: var(--text);
  margin-bottom: 1.5rem;
}

.about-body p:last-of-type {
  margin-bottom: 0;
}

.about-detail {
  font-family: var(--mono);
  font-size: 0.75rem;
  font-weight: 400;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-dim);
  margin-top: 3rem;
  padding-top: 2rem;
  border-top: 1px solid var(--rule);
}


/* --- Contact --- */
.contact-intro {
  font-family: var(--serif-body);
  font-size: 1.0625rem;
  font-weight: 400;
  line-height: 1.7;
  color: var(--text);
  margin-bottom: 2.5rem;
}

.contact-callout {
  margin-bottom: 3rem;
}

.contact-callout p {
  font-family: var(--serif-body);
  font-size: 1.0625rem;
  font-weight: 400;
  line-height: 1.8;
  color: var(--text);
  margin-bottom: 1.25rem;
}

.contact-callout p:first-child {
  font-family: var(--serif-display);
  font-size: 1.5rem;
  font-weight: 400;
  line-height: 1.5;
  color: var(--white);
  letter-spacing: 0.01em;
}

.contact-callout p:last-child {
  margin-bottom: 0;
}

.contact-form {
  margin-bottom: 3rem;
}

.form-group {
  margin-bottom: 1.5rem;
}

.form-group label {
  display: block;
  font-family: var(--mono);
  font-size: 0.6875rem;
  font-weight: 400;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-dim);
  margin-bottom: 0.5rem;
}

.form-group input,
.form-group textarea {
  width: 100%;
  background: transparent;
  border: 1px solid var(--rule);
  border-radius: 0;
  color: var(--white);
  font-family: var(--serif-body);
  font-size: 1rem;
  font-weight: 400;
  padding: 0.75rem 1rem;
  outline: none;
  transition: border-color 0.3s ease;
  -webkit-appearance: none;
}

.form-group input:focus,
.form-group textarea:focus {
  border-color: var(--accent);
}

.form-group textarea {
  resize: vertical;
  min-height: 140px;
}

.form-submit {
  font-family: var(--mono);
  font-size: 0.75rem;
  font-weight: 400;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  background: transparent;
  color: var(--text);
  border: 1px solid var(--rule);
  padding: 0.85rem 2.5rem;
  cursor: pointer;
  transition: all 0.3s ease;
}

.form-submit:hover {
  color: var(--white);
  border-color: var(--accent);
  background: rgba(226, 6, 18, 0.08);
}

.form-submit:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.form-status {
  font-family: var(--mono);
  font-size: 0.75rem;
  letter-spacing: 0.06em;
  margin-top: 1rem;
  min-height: 1.5em;
}

.form-status.form-success {
  color: var(--text);
}

.form-status.form-error {
  color: var(--accent);
}

.contact-direct {
  font-family: var(--mono);
  font-size: 0.8125rem;
  font-weight: 400;
  color: var(--text-dim);
  padding-top: 2rem;
  border-top: 1px solid var(--rule);
}

.email-link {
  color: var(--text);
  border-bottom: 1px solid var(--text-faint);
  padding-bottom: 2px;
  transition: color 0.3s ease, border-color 0.3s ease;
}

.email-link:hover {
  color: var(--white);
  border-color: var(--accent);
}


/* =====================
   FOOTER
   ===================== */
.site-footer {
  padding: 2rem var(--gutter);
  border-top: 1px solid var(--rule);
  text-align: center;
}

.site-footer span {
  font-family: var(--mono);
  font-size: 0.6875rem;
  font-weight: 400;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-faint);
}


/* =====================
   LIGHTBOX
   ===================== */
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 1000;
  background: rgba(5, 5, 5, 0.97);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

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

.lb-img-wrap {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
  padding: 3rem;
}

.lb-img-wrap img {
  max-width: 100%;
  max-height: 90vh;
  object-fit: contain;
}

.lb-close {
  position: absolute;
  top: 1.25rem;
  right: 1.5rem;
  background: none;
  border: none;
  color: var(--text-dim);
  font-family: var(--serif-display);
  font-size: 2rem;
  font-weight: 300;
  cursor: pointer;
  z-index: 10;
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: color 0.3s ease;
}

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

.lb-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  color: var(--text-dim);
  font-family: var(--mono);
  font-size: 1.25rem;
  cursor: pointer;
  padding: 1rem;
  z-index: 10;
  transition: color 0.3s ease;
}

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

.lb-prev { left: 0.75rem; }
.lb-next { right: 0.75rem; }

.lb-counter {
  position: absolute;
  bottom: 1.5rem;
  left: 50%;
  transform: translateX(-50%);
  font-family: var(--mono);
  font-size: 0.6875rem;
  font-weight: 400;
  letter-spacing: 0.15em;
  color: var(--text-faint);
}


/* =====================
   RESPONSIVE
   ===================== */
@media (max-width: 1024px) {
  .grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .grid-wide {
    grid-column: span 2;
  }
}

@media (max-width: 640px) {
  .site-header {
    flex-wrap: wrap;
    padding: 1.25rem var(--gutter);
    gap: 0.5rem;
  }

  .header-location {
    display: none;
  }

  .header-name {
    font-size: 1.125rem;
    margin-right: auto;
  }

  .header-nav {
    gap: 1.5rem;
  }

  .header-nav a {
    font-size: 0.6875rem;
  }

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

  .grid-wide {
    grid-column: span 1;
  }

  .inner-content {
    margin: 3rem auto;
  }

  .page-title {
    font-size: 1.25rem;
    margin-bottom: 2rem;
  }

  .about-body p,
  .contact-intro {
    font-size: 1rem;
  }

  .lb-img-wrap {
    padding: 1.5rem;
  }

  .lb-prev { left: 0.25rem; }
  .lb-next { right: 0.25rem; }
}

@media (min-width: 1600px) {
  .grid {
    max-width: 1700px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .grid-item {
    opacity: 1;
    transform: none;
    transition: none;
  }

  .grid-item img {
    transition: none;
  }
}
