/* ============================================================
   CHRIS MACKLER — Gallery Styles & Lightbox
   ============================================================ */

/* ============================================================
   GALLERY SECTION (used on photography.html)
   ============================================================ */
.gallery-section {
  padding: 80px 0;
  border-bottom: 1px solid var(--border);
}

.gallery-section:last-of-type {
  border-bottom: none;
}

.gallery-section-header {
  margin-bottom: 40px;
}

.gallery-section-number {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 12px;
}

.gallery-section-title {
  font-family: var(--font-display);
  font-size: clamp(40px, 5vw, 64px);
  letter-spacing: 0.03em;
  color: var(--white);
  line-height: 1;
  margin-bottom: 16px;
}

.gallery-section-desc {
  font-size: 15px;
  color: var(--text-secondary);
  max-width: 560px;
  line-height: 1.8;
}

/* --- Main Gallery Grid --- */
.gallery-grid {
  display: grid;
  gap: 3px;
}

/* Layout variants */
.gallery-grid--3col { grid-template-columns: repeat(3, 1fr); }
.gallery-grid--4col { grid-template-columns: repeat(4, 1fr); }
.gallery-grid--masonry {
  grid-template-columns: repeat(3, 1fr);
  grid-auto-rows: 240px;
}

.gallery-item {
  position: relative;
  overflow: hidden;
  background: var(--bg-tertiary);
  cursor: pointer;
}

/* Aspect ratios */
.gallery-item { aspect-ratio: 4/3; }
.gallery-item--portrait { aspect-ratio: 2/3; }
.gallery-item--landscape { aspect-ratio: 16/9; }
.gallery-item--square { aspect-ratio: 1/1; }
.gallery-item--wide { grid-column: span 2; aspect-ratio: unset; }
.gallery-item--tall { grid-row: span 2; aspect-ratio: unset; }
.gallery-item--featured {
  grid-column: span 2;
  grid-row: span 2;
  aspect-ratio: unset;
}

.gallery-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.65s var(--ease-out), filter 0.3s ease;
}

.gallery-item:hover img {
  transform: scale(1.05);
}

.gallery-item-overlay {
  position: absolute;
  inset: 0;
  background: rgba(10,10,10,0);
  transition: background 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: center;
}

.gallery-item:hover .gallery-item-overlay {
  background: rgba(10,10,10,0.55);
}

.gallery-item-zoom {
  width: 48px;
  height: 48px;
  border: 2px solid rgba(255,255,255,0.9);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transform: scale(0.8);
  transition: opacity 0.3s ease, transform 0.3s ease;
}
.gallery-item-zoom svg {
  width: 20px;
  height: 20px;
  fill: none;
  stroke: #fff;
  stroke-width: 2;
  stroke-linecap: round;
}

.gallery-item:hover .gallery-item-zoom {
  opacity: 1;
  transform: scale(1);
}

.gallery-item-caption {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 20px 20px 16px;
  background: linear-gradient(to top, rgba(10,10,10,0.85) 0%, transparent 100%);
  opacity: 0;
  transform: translateY(8px);
  transition: opacity 0.3s ease, transform 0.3s ease;
}
.gallery-item:hover .gallery-item-caption {
  opacity: 1;
  transform: translateY(0);
}
.gallery-item-caption-text {
  font-size: 13px;
  font-weight: 500;
  color: var(--text-primary);
  line-height: 1.4;
}
.gallery-item-caption-meta {
  font-size: 11px;
  color: var(--text-secondary);
  margin-top: 2px;
}

/* Placeholder styling (before real images added) */
.gallery-item--placeholder {
  background: var(--bg-tertiary);
  position: relative;
}
.gallery-item--placeholder::after {
  content: attr(data-label);
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--border);
}

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

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

.lightbox-inner {
  position: relative;
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.lightbox-image-wrap {
  max-width: 92vw;
  max-height: 88vh;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
}

.lightbox-image-wrap img {
  max-width: 92vw;
  max-height: 88vh;
  object-fit: contain;
  opacity: 0;
  transition: opacity 0.3s ease;
  box-shadow: 0 32px 80px rgba(0,0,0,0.8);
}

.lightbox-image-wrap img.loaded {
  opacity: 1;
}

.lightbox-close {
  position: absolute;
  top: 24px;
  right: 28px;
  width: 44px;
  height: 44px;
  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(255,255,255,0.15);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background 0.2s;
  z-index: 10;
}
.lightbox-close:hover { background: var(--accent); border-color: var(--accent); }
.lightbox-close svg {
  width: 16px;
  height: 16px;
  stroke: #fff;
  stroke-width: 2;
  stroke-linecap: round;
}

.lightbox-prev,
.lightbox-next {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 52px;
  height: 52px;
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background 0.2s, border-color 0.2s;
  z-index: 10;
}
.lightbox-prev { left: 28px; }
.lightbox-next { right: 28px; }
.lightbox-prev:hover,
.lightbox-next:hover {
  background: rgba(255,255,255,0.14);
  border-color: rgba(255,255,255,0.3);
}
.lightbox-prev svg,
.lightbox-next svg {
  width: 20px;
  height: 20px;
  stroke: #fff;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
  fill: none;
}

.lightbox-caption {
  position: absolute;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%);
  text-align: center;
  white-space: nowrap;
}
.lightbox-caption-text {
  font-size: 14px;
  color: var(--text-primary);
  font-weight: 500;
}
.lightbox-caption-counter {
  font-size: 11px;
  color: var(--text-secondary);
  letter-spacing: 0.15em;
  margin-top: 4px;
}

/* Loading spinner */
.lightbox-spinner {
  position: absolute;
  width: 36px;
  height: 36px;
  border: 2px solid rgba(255,255,255,0.1);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
}
@keyframes spin {
  to { transform: rotate(360deg); }
}

/* ============================================================
   MARKETING PAGE STYLES
   ============================================================ */
.campaign-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2px;
  margin-bottom: 2px;
}

.campaign-card {
  position: relative;
  background: var(--bg-tertiary);
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.campaign-card--featured {
  grid-column: span 2;
  flex-direction: row;
  align-items: stretch;
}

.campaign-card-image {
  position: relative;
  overflow: hidden;
  flex-shrink: 0;
}
.campaign-card--featured .campaign-card-image {
  width: 55%;
  min-height: 420px;
}
.campaign-card:not(.campaign-card--featured) .campaign-card-image {
  aspect-ratio: 16/9;
}

.campaign-card-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.6s var(--ease-out);
}
.campaign-card:hover .campaign-card-image img {
  transform: scale(1.04);
}

.campaign-card-content {
  padding: 36px 40px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  flex: 1;
}

.campaign-tag {
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 14px;
}

.campaign-title {
  font-family: var(--font-display);
  font-size: clamp(28px, 3vw, 40px);
  letter-spacing: 0.03em;
  color: var(--white);
  line-height: 1.1;
  margin-bottom: 14px;
}

.campaign-desc {
  font-size: 14px;
  color: var(--text-secondary);
  line-height: 1.8;
  margin-bottom: 24px;
}

.campaign-metrics {
  display: flex;
  gap: 32px;
  flex-wrap: wrap;
}

.metric {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.metric-value {
  font-family: var(--font-display);
  font-size: 28px;
  letter-spacing: 0.04em;
  color: var(--white);
}
.metric-label {
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-secondary);
}

/* Skills grid */
.skills-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
}

.skill-item {
  padding: 40px 36px;
  background: var(--bg-tertiary);
  transition: background 0.25s;
}
.skill-item:hover { background: #242424; }

.skill-icon {
  width: 36px;
  height: 36px;
  background: rgba(230,57,70,0.12);
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 20px;
}
.skill-icon svg {
  width: 18px;
  height: 18px;
  stroke: var(--accent);
  fill: none;
  stroke-width: 2;
  stroke-linecap: round;
}

.skill-name {
  font-family: var(--font-display);
  font-size: 22px;
  letter-spacing: 0.04em;
  color: var(--white);
  margin-bottom: 10px;
}

.skill-desc {
  font-size: 13px;
  color: var(--text-secondary);
  line-height: 1.7;
}

/* Testimonial cards */
.testimonial-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

.testimonial-card {
  padding: 36px 32px;
  background: var(--bg-tertiary);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  position: relative;
}

.testimonial-card::before {
  content: '"';
  position: absolute;
  top: 20px;
  left: 28px;
  font-family: var(--font-display);
  font-size: 64px;
  line-height: 1;
  color: var(--accent);
  opacity: 0.4;
}

.testimonial-text {
  font-size: 14px;
  line-height: 1.8;
  color: var(--text-secondary);
  margin-bottom: 24px;
  padding-top: 28px;
}

.testimonial-author {
  display: flex;
  align-items: center;
  gap: 14px;
}

.testimonial-avatar {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--bg-secondary);
  overflow: hidden;
  flex-shrink: 0;
}

.testimonial-name {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-primary);
}

.testimonial-role {
  font-size: 12px;
  color: var(--text-secondary);
  margin-top: 2px;
}

/* ============================================================
   ABOUT PAGE
   ============================================================ */
.about-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 80px;
  padding: 80px 0;
  align-items: start;
}

.about-portrait {
  position: sticky;
  top: calc(var(--nav-height) + 32px);
}

.about-portrait-img {
  width: 100%;
  aspect-ratio: 3/4;
  object-fit: cover;
  object-position: center top;
}

.about-portrait-caption {
  margin-top: 16px;
  font-size: 12px;
  color: var(--text-secondary);
  letter-spacing: 0.08em;
  text-align: center;
}

.about-bio h2 {
  font-family: var(--font-display);
  font-size: clamp(32px, 4vw, 52px);
  letter-spacing: 0.03em;
  color: var(--white);
  line-height: 1.1;
  margin-bottom: 28px;
}

.about-bio p {
  font-size: 16px;
  line-height: 1.9;
  color: var(--text-secondary);
  margin-bottom: 20px;
}

.about-bio p strong {
  color: var(--text-primary);
  font-weight: 600;
}

/* Timeline */
.timeline {
  margin-top: 56px;
  border-top: 1px solid var(--border);
  padding-top: 48px;
}

.timeline-title {
  font-family: var(--font-display);
  font-size: 28px;
  letter-spacing: 0.04em;
  color: var(--white);
  margin-bottom: 36px;
}

.timeline-item {
  display: grid;
  grid-template-columns: 80px 1fr;
  gap: 0 24px;
  margin-bottom: 32px;
  align-items: start;
}

.timeline-year {
  font-family: var(--font-display);
  font-size: 18px;
  letter-spacing: 0.04em;
  color: var(--accent);
  padding-top: 2px;
}

.timeline-content {}

.timeline-role {
  font-size: 15px;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 4px;
}

.timeline-org {
  font-size: 13px;
  color: var(--text-secondary);
  letter-spacing: 0.06em;
}

/* Fun facts */
.fun-facts-list {
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.fun-fact-item {
  display: flex;
  align-items: center;
  gap: 16px;
}
.fun-fact-icon {
  font-size: 22px;
  flex-shrink: 0;
  width: 36px;
  text-align: center;
}
.fun-fact-text {
  font-size: 15px;
  color: var(--text-secondary);
  line-height: 1.5;
  margin: 0;
}

/* Tools list */
.tools-section {
  margin-top: 48px;
  border-top: 1px solid var(--border);
  padding-top: 48px;
}

.tools-title {
  font-family: var(--font-display);
  font-size: 28px;
  letter-spacing: 0.04em;
  color: var(--white);
  margin-bottom: 28px;
}

.tools-list {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.tool-tag {
  display: inline-block;
  padding: 8px 16px;
  background: var(--bg-tertiary);
  border: 1px solid var(--border);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.1em;
  color: var(--text-secondary);
  transition: color 0.2s, border-color 0.2s;
}
.tool-tag:hover {
  color: var(--text-primary);
  border-color: var(--text-secondary);
}

/* ============================================================
   CONTACT PAGE
   ============================================================ */
.contact-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 80px;
  padding: 80px 0;
  align-items: start;
}

.contact-info {}

.contact-hello {
  font-family: var(--font-display);
  font-size: clamp(64px, 9vw, 120px);
  letter-spacing: 0.02em;
  color: var(--white);
  line-height: 1;
  margin-bottom: 8px;
}

.contact-hello span { color: var(--accent); }

.contact-tagline {
  font-size: 16px;
  color: var(--text-secondary);
  line-height: 1.8;
  max-width: 380px;
  margin-bottom: 48px;
}

.contact-links {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.contact-link-item {
  display: flex;
  align-items: center;
  gap: 16px;
}

.contact-link-label {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--text-secondary);
  width: 100px;
}

.contact-link-value a {
  font-size: 15px;
  font-weight: 500;
  color: var(--text-primary);
  transition: color 0.2s;
}
.contact-link-value a:hover { color: var(--accent); }

/* Contact form */
.contact-form {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.form-label {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--text-secondary);
}

.form-input,
.form-textarea {
  background: var(--bg-tertiary);
  border: 1px solid var(--border);
  color: var(--text-primary);
  font-family: var(--font-body);
  font-size: 15px;
  padding: 14px 18px;
  transition: border-color 0.2s;
  outline: none;
  width: 100%;
  border-radius: 0;
  -webkit-appearance: none;
}

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

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

.form-submit {
  margin-top: 8px;
}

/* ============================================================
   RESPONSIVE — Inner Pages
   ============================================================ */
@media (max-width: 1024px) {
  .about-layout { gap: 48px; }
  .campaign-card--featured { flex-direction: column; }
  .campaign-card--featured .campaign-card-image { width: 100%; min-height: 280px; }
}

@media (max-width: 768px) {
  .about-layout { grid-template-columns: 1fr; gap: 40px; }
  .about-portrait { position: static; }
  .about-portrait-img { max-height: 60vw; }
  .contact-layout { grid-template-columns: 1fr; gap: 48px; }
  .campaign-grid { grid-template-columns: 1fr; }
  .campaign-card--featured { grid-column: auto; }
  .skills-grid { grid-template-columns: 1fr 1fr; }
  .testimonial-grid { grid-template-columns: 1fr; }
  .gallery-grid--3col,
  .gallery-grid--4col,
  .gallery-grid--masonry { grid-template-columns: 1fr 1fr; }
  .gallery-item--featured,
  .gallery-item--wide { grid-column: auto; aspect-ratio: 4/3; }
  .gallery-item--tall { grid-row: auto; }
  .gallery-item--placeholder::after { display: none; }
}

@media (max-width: 480px) {
  .skills-grid { grid-template-columns: 1fr; }
  .gallery-grid--3col,
  .gallery-grid--4col,
  .gallery-grid--masonry { grid-template-columns: 1fr; }
  .lightbox-prev,
  .lightbox-next { width: 40px; height: 40px; }
  .lightbox-prev { left: 12px; }
  .lightbox-next { right: 12px; }
}
