/* Caitlin Bombassei Portfolio — ivory / charcoal / olive */
@import url("https://fonts.googleapis.com/css2?family=Syne:wght@500;600;700;800&family=DM+Sans:ital,opsz,wght@0,9..40,400;0,9..40,500;0,9..40,600;1,9..40,400&display=swap");

:root {
  --bg: #f7f3e8;
  --bg-elevated: #fffef8;
  --bg-muted: #ebe6d8;
  --bg-button: #dce3c8;
  --text: #2c2c2a;
  --text-muted: #5c5c56;
  --text-soft: #4a4a45;
  --border: #d5d0c2;
  --accent: #a8b88a;
  --accent-strong: #8f9f6e;
  --on-accent: #2c2c2a;
  --font-display: "Syne", sans-serif;
  --font-body: "DM Sans", sans-serif;
  --space-xs: 0.5rem;
  --space-sm: 1rem;
  --space-md: 1.5rem;
  --space-lg: 2.5rem;
  --space-xl: 4rem;
  --space-2xl: 6rem;
  --max: 1400px;
  --nav-h: 4.25rem;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

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

html {
  scroll-behavior: smooth;
}

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 1rem;
  line-height: 1.55;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}

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

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

button {
  font: inherit;
  color: inherit;
  background: none;
  border: none;
  cursor: pointer;
}

ul {
  list-style: none;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  border: 0;
}

/* ——— Atmosphere ——— */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  background:
    radial-gradient(ellipse 70% 45% at 8% 0%, rgba(168, 184, 138, 0.18), transparent 55%),
    radial-gradient(ellipse 55% 40% at 95% 15%, rgba(232, 228, 210, 0.5), transparent 50%),
    linear-gradient(180deg, #faf7ef 0%, var(--bg) 45%, #f0eadc 100%);
}

.site-wrap {
  position: relative;
  z-index: 1;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.container {
  width: min(100% - 2.5rem, var(--max));
  margin-inline: auto;
}

/* ——— Nav ——— */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  height: var(--nav-h);
  display: flex;
  align-items: center;
  border-bottom: 1px solid transparent;
  background: rgba(247, 243, 232, 0.88);
  backdrop-filter: blur(12px);
  transition: border-color 0.3s var(--ease);
}

.site-header.is-scrolled {
  border-bottom-color: var(--border);
}

.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-md);
  width: 100%;
}

.brand {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(1.05rem, 2vw, 1.25rem);
  letter-spacing: -0.02em;
  white-space: nowrap;
}

.nav-toggle {
  display: none;
  width: 2.5rem;
  height: 2.5rem;
  place-items: center;
  border: 1px solid var(--border);
}

.nav-toggle span {
  display: block;
  width: 1.1rem;
  height: 1px;
  background: var(--text);
  position: relative;
}

.nav-toggle span::before,
.nav-toggle span::after {
  content: "";
  position: absolute;
  left: 0;
  width: 100%;
  height: 1px;
  background: var(--text);
}

.nav-toggle span::before {
  top: -5px;
}

.nav-toggle span::after {
  top: 5px;
}

.site-nav {
  display: flex;
  align-items: center;
  gap: clamp(1rem, 2.5vw, 2rem);
}

.site-nav a {
  font-size: 0.875rem;
  color: var(--text-soft);
  transition: color 0.2s;
}

.site-nav a:hover,
.site-nav a[aria-current="page"] {
  color: var(--text);
}

/* ——— Buttons / links ——— */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.65rem 1.1rem;
  font-size: 0.8125rem;
  font-weight: 500;
  background: var(--text);
  color: var(--bg);
  transition: opacity 0.2s, transform 0.2s var(--ease), background 0.2s;
}

.btn:hover {
  opacity: 0.88;
}

.btn-ghost {
  background: transparent;
  color: var(--text);
  border: 1px solid var(--border);
}

.btn-ghost:hover {
  border-color: var(--accent-strong);
  background: rgba(168, 184, 138, 0.2);
  opacity: 1;
}

.btn-muted {
  width: 100%;
  justify-content: flex-start;
  background: var(--bg-button);
  color: var(--text);
  padding: 0.7rem 1rem;
  font-size: 0.8125rem;
  font-weight: 400;
}

.btn-muted:hover {
  background: var(--accent);
  opacity: 1;
}

/* ——— Motion ——— */
.reveal {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 0.7s var(--ease), transform 0.7s var(--ease);
}

.reveal.is-visible {
  opacity: 1;
  transform: none;
}

@keyframes fadeUp {
  from {
    opacity: 0;
    transform: translateY(16px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

.stagger > * {
  opacity: 0;
  animation: fadeUp 0.65s var(--ease) forwards;
}

.stagger > *:nth-child(1) { animation-delay: 0.05s; }
.stagger > *:nth-child(2) { animation-delay: 0.1s; }
.stagger > *:nth-child(3) { animation-delay: 0.15s; }
.stagger > *:nth-child(4) { animation-delay: 0.2s; }
.stagger > *:nth-child(5) { animation-delay: 0.25s; }
.stagger > *:nth-child(6) { animation-delay: 0.3s; }
.stagger > *:nth-child(7) { animation-delay: 0.35s; }
.stagger > *:nth-child(8) { animation-delay: 0.4s; }

/* ——— Home ——— */
.hero {
  min-height: calc(100vh - var(--nav-h));
  display: grid;
  align-items: end;
  padding: var(--space-xl) 0 var(--space-2xl);
  position: relative;
  overflow: hidden;
}

.hero-bg {
  position: absolute;
  inset: 0;
  z-index: -1;
}

.hero-bg img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.7;
  filter: contrast(1.02) saturate(0.9);
}

.hero-bg::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(
    180deg,
    rgba(44, 44, 42, 0.25) 0%,
    rgba(44, 44, 42, 0.45) 40%,
    rgba(44, 44, 42, 0.78) 100%
  );
}

.hero-brand {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(3rem, 12vw, 7.5rem);
  line-height: 0.92;
  letter-spacing: -0.04em;
  margin-bottom: var(--space-md);
  color: #f7f3e8;
}

.hero-lead {
  max-width: 28rem;
  color: rgba(247, 243, 232, 0.85);
  font-size: clamp(1rem, 2vw, 1.15rem);
  margin-bottom: var(--space-lg);
}

.hero-cta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.hero-cta .btn {
  background: var(--accent);
  color: var(--on-accent);
}

.hero-cta .btn:hover {
  background: var(--accent-strong);
  opacity: 1;
}

.hero-cta .btn-ghost {
  background: transparent;
  color: #f7f3e8;
  border-color: rgba(247, 243, 232, 0.45);
}

.hero-cta .btn-ghost:hover {
  background: rgba(247, 243, 232, 0.12);
  border-color: var(--accent);
}

.section-home-links {
  padding: var(--space-2xl) 0;
  border-top: 1px solid var(--border);
}

.home-sections {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1px;
  background: var(--border);
}

.home-section-card {
  background: var(--bg);
  padding: var(--space-lg);
  min-height: 11rem;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  transition: background 0.35s var(--ease);
}

.home-section-card:hover {
  background: var(--bg-elevated);
}

.home-section-card:hover h2 {
  color: var(--accent-strong);
}

.home-section-card h2 {
  font-family: var(--font-display);
  font-size: clamp(1.5rem, 3vw, 2rem);
  font-weight: 700;
  letter-spacing: -0.02em;
}

.home-section-card p {
  color: var(--text-muted);
  font-size: 0.9rem;
  max-width: 22rem;
  margin-top: var(--space-sm);
}

.home-section-card .arrow {
  margin-top: var(--space-md);
  font-size: 0.8rem;
  color: var(--text-soft);
}

/* ——— Page headers ——— */
.page-header {
  padding: var(--space-xl) 0 var(--space-lg);
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: var(--space-md);
}

.page-header h1,
.page-intro {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(1.6rem, 3.5vw, 2.35rem);
  line-height: 1.15;
  letter-spacing: -0.025em;
  max-width: 36rem;
}

.page-header .page-action {
  flex-shrink: 0;
  margin-top: 0.35rem;
}

.section-label {
  font-size: 0.75rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent-strong);
  margin-bottom: var(--space-sm);
}

.section-block {
  padding: var(--space-xl) 0;
  border-top: 1px solid var(--border);
}

.section-block h2 {
  font-family: var(--font-display);
  font-size: clamp(1.4rem, 2.5vw, 1.85rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  margin-bottom: var(--space-sm);
}

.section-block > .lede {
  color: var(--text-muted);
  max-width: 36rem;
  margin-bottom: var(--space-lg);
}

/* ——— Journalism grid ——— */
.articles-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.25rem 1.25rem;
  padding-bottom: var(--space-2xl);
}

.article-pair {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 1.25rem;
  align-items: start;
  min-width: 0;
  container-type: inline-size;
}

.article-text {
  display: flex;
  flex-direction: column;
  min-height: calc((100cqw - 1.25rem) * 3 / 8);
  padding-bottom: 0.25rem;
}

.article-date {
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-bottom: 0.65rem;
}

.article-title {
  font-family: var(--font-display);
  font-size: clamp(1rem, 1.4vw, 1.2rem);
  font-weight: 700;
  line-height: 1.25;
  letter-spacing: -0.015em;
  margin-bottom: 0.65rem;
}

.article-excerpt {
  font-size: 0.875rem;
  color: var(--text-muted);
  line-height: 1.5;
  flex: 1;
  margin-bottom: var(--space-md);
}

.article-text .btn-muted {
  margin-top: auto;
}

.article-image {
  display: block;
  position: relative;
  overflow: hidden;
  width: 100%;
  aspect-ratio: 4 / 3;
  background: var(--bg-muted);
}

.article-image img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  max-width: none;
  object-fit: cover;
  transition: transform 0.7s var(--ease);
}

.article-image:hover img {
  transform: scale(1.04);
}

/* ——— Photography ——— */
.photo-categories {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  background: var(--border);
  margin-bottom: var(--space-xl);
}

.photo-category {
  position: relative;
  aspect-ratio: 4 / 3;
  width: 100%;
  overflow: hidden;
  background: var(--bg-elevated);
}

.photo-category img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.55;
  transition: opacity 0.4s, transform 0.7s var(--ease);
}

.photo-category:hover img {
  opacity: 0.75;
  transform: scale(1.05);
}

.photo-category span {
  position: absolute;
  inset: auto 0 0 0;
  padding: var(--space-md);
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.25rem;
  letter-spacing: -0.02em;
  color: #f7f3e8;
  background: linear-gradient(transparent, rgba(44, 44, 42, 0.85));
}

.photo-gallery {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.75rem;
  padding-bottom: var(--space-2xl);
}

.photo-gallery .empty-note {
  grid-column: 1 / -1;
  color: var(--text-muted);
  font-size: 0.9375rem;
}

.photo-item {
  position: relative;
  overflow: hidden;
  aspect-ratio: 1;
  background: var(--bg-muted);
  cursor: pointer;
}

.photo-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.6s var(--ease);
}

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

.photo-item figcaption {
  position: absolute;
  inset: auto 0 0 0;
  padding: 0.75rem;
  font-size: 0.75rem;
  background: linear-gradient(transparent, rgba(0, 0, 0, 0.75));
  opacity: 0;
  transition: opacity 0.3s;
}

.photo-item:hover figcaption {
  opacity: 1;
}

.category-word {
  font-family: var(--font-display) !important;
  font-size: clamp(2.75rem, 10vw, 5.5rem) !important;
  font-weight: 800 !important;
  letter-spacing: -0.04em !important;
  line-height: 0.95 !important;
  max-width: none !important;
}

.back-link {
  display: inline-block;
  font-size: 0.8125rem;
  color: var(--text-muted);
  margin-bottom: var(--space-md);
  transition: color 0.2s;
}

.back-link:hover {
  color: var(--text);
}

/* ——— Videography ——— */
.video-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--space-lg);
  padding-bottom: var(--space-2xl);
}

.video-card {
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
}

.video-frame {
  position: relative;
  aspect-ratio: 16 / 9;
  background: var(--bg-muted);
  overflow: hidden;
}

.video-frame iframe,
.video-frame img {
  width: 100%;
  height: 100%;
  border: 0;
  object-fit: cover;
}

.video-card h3 {
  font-family: var(--font-display);
  font-size: 1.15rem;
  font-weight: 700;
  letter-spacing: -0.015em;
}

.video-card p {
  color: var(--text-muted);
  font-size: 0.875rem;
}

/* ——— Marketing ——— */
.case-grid {
  display: grid;
  grid-template-columns: 1fr 1.1fr;
  gap: var(--space-lg);
  margin-bottom: var(--space-xl);
  align-items: start;
}

.case-grid:nth-child(even) {
  grid-template-columns: 1.1fr 1fr;
}

.case-grid:nth-child(even) .case-media {
  order: -1;
}

.case-copy h3 {
  font-family: var(--font-display);
  font-size: clamp(1.25rem, 2vw, 1.6rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  margin-bottom: 0.35rem;
}

.case-copy .subtitle {
  color: var(--text-soft);
  font-size: 0.9rem;
  margin-bottom: var(--space-sm);
}

.case-copy p {
  color: var(--text-muted);
  font-size: 0.925rem;
  margin-bottom: var(--space-sm);
}

.case-stats {
  display: inline-block;
  margin-top: var(--space-sm);
  padding: 0.45rem 0.75rem;
  background: var(--accent);
  color: var(--on-accent);
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 0.9rem;
  letter-spacing: -0.01em;
}

.case-media {
  overflow: hidden;
  background: var(--bg-muted);
  aspect-ratio: 4 / 3;
}

.case-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.case-embed {
  margin-top: var(--space-md);
  aspect-ratio: 16 / 9;
  background: var(--bg-muted);
}

.case-embed iframe {
  width: 100%;
  height: 100%;
  border: 0;
}

.marist-list,
.cpw-list {
  display: flex;
  flex-direction: column;
  gap: var(--space-xl);
}

/* Selected work feed */
.feed-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0.5rem;
  padding-bottom: var(--space-2xl);
}

.feed-item {
  position: relative;
  aspect-ratio: 1;
  overflow: hidden;
  background: var(--bg-muted);
  cursor: pointer;
}

.feed-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.55s var(--ease), filter 0.35s;
}

.feed-item:hover img {
  transform: scale(1.06);
  filter: brightness(0.7);
}

.feed-item .feed-meta {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 0.85rem;
  opacity: 0;
  transition: opacity 0.3s;
  background: linear-gradient(transparent 30%, rgba(44, 44, 42, 0.85));
  color: #f7f3e8;
}

.feed-item:hover .feed-meta {
  opacity: 1;
}

.feed-type {
  font-size: 0.65rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 0.25rem;
}

.feed-meta strong {
  font-size: 0.85rem;
  font-weight: 500;
  color: #f7f3e8;
}

/* ——— Article detail ——— */
.article-detail {
  max-width: 42rem;
  padding: var(--space-xl) 0 var(--space-2xl);
}

.article-detail .article-date {
  margin-bottom: var(--space-sm);
}

.article-detail h1 {
  font-family: var(--font-display);
  font-size: clamp(2rem, 5vw, 3rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.1;
  margin-bottom: var(--space-lg);
}

.article-detail-image {
  margin: 0 calc(50% - 50vw) var(--space-lg);
  width: 100vw;
  max-height: 60vh;
  overflow: hidden;
}

.article-detail-image img {
  width: 100%;
  height: 60vh;
  object-fit: cover;
}

.article-detail .body {
  color: var(--text-soft);
  font-size: 1.05rem;
  line-height: 1.7;
}

/* ——— Lightbox ——— */
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 200;
  background: rgba(0, 0, 0, 0.92);
  display: none;
  align-items: center;
  justify-content: center;
  padding: var(--space-lg);
}

.lightbox.is-open {
  display: flex;
}

.lightbox-inner {
  max-width: min(90vw, 960px);
  max-height: 90vh;
  position: relative;
}

.lightbox-inner img {
  max-height: 75vh;
  width: auto;
  margin: 0 auto;
}

.lightbox-inner iframe {
  width: min(90vw, 800px);
  aspect-ratio: 16 / 9;
  border: 0;
}

.lightbox-caption {
  margin-top: var(--space-sm);
  text-align: center;
  color: var(--text-soft);
  font-size: 0.9rem;
}

.lightbox-close {
  position: absolute;
  top: 1rem;
  right: 1rem;
  width: 2.5rem;
  height: 2.5rem;
  border: 1px solid var(--border);
  background: var(--bg);
  font-size: 1.25rem;
  line-height: 1;
  z-index: 1;
}

/* ——— Footer ——— */
.site-footer {
  margin-top: auto;
  padding: var(--space-lg) 0;
  border-top: 1px solid var(--border);
}

.site-footer .container {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: var(--space-sm);
  font-size: 0.8125rem;
  color: var(--text-muted);
}

.site-footer a:hover {
  color: var(--text);
}

/* ——— Responsive ——— */
@media (max-width: 1100px) {
  .articles-grid {
    grid-template-columns: 1fr;
  }

  .feed-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (max-width: 768px) {
  .nav-toggle {
    display: grid;
  }

  .site-nav {
    position: fixed;
    inset: var(--nav-h) 0 auto 0;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    background: rgba(247, 243, 232, 0.98);
    border-bottom: 1px solid var(--border);
    padding: var(--space-sm);
    display: none;
  }

  .site-nav.is-open {
    display: flex;
  }

  .site-nav a {
    padding: 0.85rem 1rem;
    border-bottom: 1px solid var(--border);
  }

  .hero-brand {
    font-size: clamp(2.5rem, 14vw, 4rem);
  }

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

  .articles-grid {
    grid-template-columns: 1fr;
    gap: 2rem;
  }

  .article-pair {
    grid-template-columns: 1fr;
    gap: 0.85rem;
  }

  .article-text {
    min-height: 0;
  }

  .article-image {
    order: -1;
  }

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

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

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

  .case-grid,
  .case-grid:nth-child(even) {
    grid-template-columns: 1fr;
  }

  .case-grid:nth-child(even) .case-media {
    order: 0;
  }

  .feed-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .page-header {
    flex-direction: column;
  }
}

@media (max-width: 480px) {
  .container {
    width: min(100% - 1.5rem, var(--max));
  }

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