/* Work page styles */

.work-header {
  padding-top: calc(var(--nav-height) + var(--space-lg));
  padding-bottom: var(--space-sm);
}

.work-header .filter-bar {
  margin-top: var(--space-md);
  margin-bottom: var(--space-md);
}

.work-header__title {
  font-family: var(--font-display);
  font-size: var(--text-section-title);
  line-height: var(--leading-tight);
  color: var(--text-primary);
  text-transform: uppercase;
}

/* Filter bar */
.filter-bar {
  display: flex;
  gap: 0.75rem;
  margin-bottom: var(--space-sm);
  flex-wrap: wrap;
}

.filter-pill {
  padding: 0.5rem 1.25rem;
  border-radius: 100px;
  border: 1px solid var(--border);
  background: transparent;
  color: var(--text-secondary);
  font-family: var(--font-body);
  font-size: var(--text-small);
  cursor: pointer;
  transition: all var(--duration-fast) ease;
}

.filter-pill:hover {
  border-color: var(--border-hover);
  color: var(--text-primary);
}

.filter-pill--active {
  background: var(--text-primary);
  color: var(--bg-primary);
  border-color: transparent;
}

/* Project grid */
.project-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5rem;
}

@media (min-width: 640px) {
  .project-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 1024px) {
  .project-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

/* Project card */
.project-card {
  position: relative;
  overflow: hidden;
  border-radius: var(--border-radius);
  cursor: none;
  transition: opacity var(--duration-fast) ease, transform var(--duration-fast) ease;
}

.project-card--hidden {
  opacity: 0;
  transform: scale(0.95);
  pointer-events: none;
  position: absolute;
  visibility: hidden;
}

.project-card__thumb {
  aspect-ratio: 16 / 9;
  overflow: hidden;
}

.project-card__thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.6s var(--ease-out-expo);
}

.project-card:hover .project-card__thumb img {
  transform: scale(1.05);
}

.project-card__overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(transparent 40%, rgba(0, 0, 0, 0.8));
  opacity: 0;
  transition: opacity var(--duration-fast) ease;
  display: flex;
  align-items: flex-end;
}

.project-card:hover .project-card__overlay {
  opacity: 1;
}

.project-card__meta {
  position: absolute;
  bottom: 1.5rem;
  left: 1.5rem;
}

.project-card__title {
  font-family: var(--font-display);
  font-size: var(--text-h3);
  color: var(--text-primary);
  line-height: var(--leading-snug);
  text-transform: uppercase;
}

.project-card__subtitle {
  color: var(--text-secondary);
  font-size: var(--text-small);
  font-family: var(--font-body);
}

/* Modal */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: var(--bg-overlay);
  z-index: 1000;
  display: none;
  justify-content: center;
  align-items: flex-start;
  opacity: 0;
  transition: opacity var(--duration-fast) ease;
  overflow-y: auto;
}

.modal-overlay--open {
  display: flex;
  opacity: 1;
}

.modal-content {
  width: 100%;
  max-width: 900px;
  margin: var(--space-xl) auto;
  padding: var(--space-lg) var(--space-md);
  position: relative;
  opacity: 0;
  transform: translateY(40px);
  transition: opacity 0.5s var(--ease-out-expo), transform 0.5s var(--ease-out-expo);
}

.modal-overlay--open .modal-content {
  opacity: 1;
  transform: translateY(0);
}

.modal-close,
.modal-back {
  position: fixed;
  top: 1.5rem;
  background: none;
  border: none;
  color: var(--text-primary);
  font-size: 1.25rem;
  cursor: pointer;
  z-index: 1001;
  font-family: var(--font-body);
  padding: 0.5rem;
  transition: opacity var(--duration-fast) ease;
}

.modal-close:hover,
.modal-back:hover {
  opacity: 0.7;
}

.modal-close {
  right: 1.5rem;
}

.modal-back {
  left: 1.5rem;
}

.modal-title {
  font-family: var(--font-display);
  font-size: clamp(3rem, 8vw, 6rem);
  line-height: var(--leading-tight);
  color: var(--text-primary);
  text-transform: uppercase;
  margin-bottom: var(--space-xs);
}

.modal-meta {
  color: var(--text-secondary);
  font-family: var(--font-body);
  font-size: var(--text-small);
  text-transform: capitalize;
  margin-bottom: var(--space-lg);
}

.modal-video {
  aspect-ratio: 16 / 9;
  background: var(--bg-card);
  border-radius: var(--border-radius);
  overflow: hidden;
  margin-bottom: var(--space-lg);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  font-family: var(--font-body);
  font-size: var(--text-body);
}

.modal-desc {
  font-family: var(--font-accent);
  font-style: italic;
  font-size: var(--text-body-large);
  color: var(--text-secondary);
  max-width: 700px;
  line-height: var(--leading-relaxed);
  margin-bottom: var(--space-lg);
}



/* Placeholder cards (no thumbnail yet) */
.project-card__thumb--placeholder {
  aspect-ratio: 16 / 9;
  background: linear-gradient(135deg, #1a1a1a 0%, #2a2a2a 100%);
  display: flex;
  align-items: center;
  justify-content: center;
}

.project-card__placeholder-title {
  font-family: var(--font-display);
  font-size: var(--text-small);
  color: rgba(255,255,255,0.2);
  text-transform: uppercase;
  letter-spacing: var(--tracking-wide);
  text-align: center;
  padding: var(--space-sm);
}

/* Modal gallery - 2 column, large */
.modal-gallery {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1rem;
  margin-top: var(--space-md);
}

.modal-gallery img {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  border-radius: var(--border-radius);
  display: block;
}

@media (max-width: 640px) {
  .modal-gallery {
    grid-template-columns: 1fr;
  }
}

/* ===== WORK PAGE SIDEBAR LAYOUT ===== */
.work-layout { display: flex; min-height: 100vh; }
.work-sidebar { width: var(--sidebar-width); flex-shrink: 0; position: sticky; top: 0; height: 100vh; overflow-y: auto; border-right: 1px solid var(--border-light); background: var(--bg-light); }
.work-sidebar__inner { padding: calc(var(--nav-height) + var(--space-lg)) var(--space-md) var(--space-lg); display: flex; flex-direction: column; gap: var(--space-md); }
.work-sidebar__name { font-family: var(--font-display); font-size: clamp(1.4rem,2vw,1.8rem); line-height: 1.1; color: var(--text-dark); }
.work-sidebar__role { font-family: var(--font-body); font-size: var(--text-small); color: var(--text-dark-secondary); }
.work-sidebar__bio { font-family: var(--font-body); font-size: var(--text-small); color: var(--text-dark-secondary); line-height: var(--leading-normal); }
.work-sidebar__nav { display: flex; flex-direction: column; gap: 0.4rem; }
.work-sidebar__nav a { font-family: var(--font-body); font-size: var(--text-small); color: var(--text-dark-secondary); text-decoration: none; transition: color var(--duration-fast); }
.work-sidebar__nav a:hover, .work-sidebar__nav a.active { color: var(--text-dark); font-weight: 600; }
.work-sidebar__filters { display: flex; flex-direction: column; gap: 0.4rem; margin-top: var(--space-sm); }
.work-sidebar__filters .filter-pill { border-color: rgba(0,0,0,0.15); color: var(--text-dark-secondary); text-align: left; padding: 0.4rem 0.75rem; font-size: var(--text-tiny); }
.work-sidebar__filters .filter-pill--active { background: var(--text-dark); color: white; border-color: transparent; }
.work-sidebar__copy { font-size: var(--text-tiny); color: rgba(0,0,0,0.3); margin-top: auto; }
.work-grid-area { flex: 1; padding: calc(var(--nav-height) + var(--space-lg)) var(--space-lg) var(--space-xl); background: var(--bg-light); }
.page--light .project-grid { grid-template-columns: repeat(2, 1fr); }
@media (min-width: 1200px) { .page--light .project-grid { grid-template-columns: repeat(3, 1fr); } }
.page--light .filter-pill { border-color: rgba(0,0,0,0.15); color: var(--text-dark-secondary); }
.page--light .filter-pill--active { background: var(--text-dark); color: white; border-color: transparent; }
@media (max-width: 767px) {
  .work-layout { flex-direction: column; }
  .work-sidebar { width: 100%; height: auto; position: static; border-right: none; border-bottom: 1px solid var(--border-light); }
  .work-sidebar__inner { padding: calc(var(--nav-height) + var(--space-md)) var(--space-md) var(--space-md); }
  .work-sidebar__filters { flex-direction: row; flex-wrap: wrap; }
  .work-grid-area { padding: var(--space-md); }
}

/* Modal gallery — 2 col large */
.modal-gallery { display: grid; grid-template-columns: repeat(2,1fr); gap: 0.75rem; margin-top: var(--space-md); }
.modal-gallery img { width: 100%; aspect-ratio: 3/2; object-fit: cover; border-radius: var(--border-radius); display: block; }
@media (max-width: 640px) { .modal-gallery { grid-template-columns: 1fr; } }

/* ===== VIDEOS GRID (mirrors stills layout exactly) ===== */
.videos-grid {
  margin-left: var(--sidebar-width);
  padding: var(--space-md);
  padding-top: calc(var(--nav-height) + var(--space-md));
  min-height: 100vh;
}

.videos-grid__inner {
  columns: 2;
  column-gap: 12px;
}

.video-card {
  break-inside: avoid;
  margin: 0 0 12px;
  overflow: hidden;
  cursor: pointer;
  animation: fadeInUp 0.6s var(--ease-out-expo) both;
}

.video-card:nth-child(2) { animation-delay: 0.05s; }
.video-card:nth-child(3) { animation-delay: 0.1s; }
.video-card:nth-child(4) { animation-delay: 0.15s; }
.video-card:nth-child(5) { animation-delay: 0.2s; }
.video-card:nth-child(6) { animation-delay: 0.25s; }
.video-card:nth-child(n+7) { animation-delay: 0.3s; }

.video-card__thumb {
  position: relative;
  overflow: hidden;
  border-radius: 2px;
  aspect-ratio: 16 / 9;
}

.video-card__thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.6s var(--ease-out-expo);
}

.video-card:hover .video-card__thumb img {
  transform: scale(1.03);
}

/* Play button overlay */
.video-card__play {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0);
  transition: background 0.3s var(--ease-out-expo);
}

.video-card__play svg {
  width: 48px;
  height: 48px;
  color: white;
  opacity: 0;
  transform: scale(0.8);
  transition: opacity 0.3s var(--ease-out-expo), transform 0.3s var(--ease-out-expo);
  filter: drop-shadow(0 2px 8px rgba(0,0,0,0.5));
}

.video-card:hover .video-card__play {
  background: rgba(0, 0, 0, 0.35);
}

.video-card:hover .video-card__play svg {
  opacity: 1;
  transform: scale(1);
}

/* No thumbnail fallback */
.video-card__no-thumb {
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, #1a1a1a, #2a2a2a);
  display: flex;
  align-items: center;
  justify-content: center;
}

.video-card__no-thumb span {
  font-family: var(--font-body);
  font-size: var(--text-small);
  color: rgba(255,255,255,0.2);
  text-transform: uppercase;
  letter-spacing: var(--tracking-wide);
}

/* Card info below thumbnail */
.video-card__info {
  padding: 8px 2px 4px;
}

.video-card__title {
  font-family: var(--font-body);
  font-size: var(--text-small);
  font-weight: 600;
  color: var(--text-dark);
}

.video-card__sub {
  font-family: var(--font-body);
  font-size: var(--text-tiny);
  color: var(--text-dark-secondary);
  margin-top: 2px;
}

/* Filter pills — dark style for light page */
.work-filters .filter-pill {
  border: 1px solid rgba(0,0,0,0.15);
  color: var(--text-dark-secondary);
  background: transparent;
  text-align: left;
  padding: 0.35rem 0.75rem;
  font-size: var(--text-tiny);
  border-radius: 100px;
  cursor: pointer;
  transition: all var(--duration-fast);
}

.work-filters .filter-pill--active,
.work-filters .filter-pill:hover {
  background: var(--text-dark);
  color: white;
  border-color: transparent;
}

/* Mobile */
@media (max-width: 767px) {
  .videos-grid {
    margin-left: 0;
    padding-top: var(--space-md);
  }
  .videos-grid__inner {
    columns: 1;
  }
}
@media (min-width: 1200px) {
  .videos-grid__inner {
    columns: 3;
  }
}

/* ===== VIDEOS GRID — mirrors stills layout exactly ===== */
.videos-grid {
  margin-left: var(--sidebar-width);
  padding: var(--space-md);
  padding-top: calc(var(--nav-height) + var(--space-md));
  min-height: 100vh;
}

.videos-grid__inner {
  columns: 2;
  column-gap: 12px;
}

/* Filter pills — above the grid */
.work-filters {
  margin-top: var(--space-md);
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.work-filters .filter-pill {
  border-color: rgba(0,0,0,0.15);
  color: var(--text-dark-secondary);
  text-align: left;
  padding: 0.4rem 0.75rem;
  font-size: var(--text-tiny);
  border-radius: 100px;
  background: transparent;
  cursor: pointer;
  transition: all var(--duration-fast);
  border: 1px solid rgba(0,0,0,0.15);
}

.work-filters .filter-pill--active,
.work-filters .filter-pill:hover {
  background: var(--text-dark);
  color: white;
  border-color: transparent;
}

/* Each video card — like a stills item */
.video-card {
  break-inside: avoid;
  margin: 0 0 12px;
  overflow: hidden;
  cursor: pointer;
  position: relative;
  animation: fadeInUp 0.6s var(--ease-out-expo) both;
}

.video-card:nth-child(2) { animation-delay: 0.05s; }
.video-card:nth-child(3) { animation-delay: 0.1s; }
.video-card:nth-child(4) { animation-delay: 0.15s; }
.video-card:nth-child(5) { animation-delay: 0.2s; }
.video-card:nth-child(6) { animation-delay: 0.25s; }
.video-card:nth-child(n+7) { animation-delay: 0.3s; }

.video-card__thumb {
  position: relative;
  overflow: hidden;
  border-radius: 2px;
}

.video-card__thumb img {
  width: 100%;
  height: auto;
  display: block;
  transition: transform 0.6s var(--ease-out-expo);
}

.video-card:hover .video-card__thumb img {
  transform: scale(1.03);
}

/* Play button overlay */
.video-card__play {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity var(--duration-fast);
  background: rgba(0,0,0,0.3);
}

.video-card:hover .video-card__play {
  opacity: 1;
}

.video-card__play svg {
  width: 48px;
  height: 48px;
  color: white;
  filter: drop-shadow(0 2px 8px rgba(0,0,0,0.5));
}

/* Title below thumb — minimal, like a caption */
.video-card__info {
  padding: 6px 2px 4px;
}

.video-card__title {
  font-family: var(--font-body);
  font-size: var(--text-small);
  color: var(--text-dark);
  font-weight: 500;
}

.video-card__sub {
  font-family: var(--font-body);
  font-size: var(--text-tiny);
  color: var(--text-dark-secondary);
  margin-top: 2px;
}

/* Mobile */
@media (max-width: 767px) {
  .videos-grid {
    margin-left: 0;
    padding-top: var(--space-md);
  }
  .videos-grid__inner {
    columns: 1;
  }
}

@media (min-width: 1200px) {
  .videos-grid__inner {
    columns: 3;
  }
}

/* ===== WORK SPLIT LAYOUT (list + preview) ===== */
.work-split {
  margin-left: var(--sidebar-width);
  display: grid;
  grid-template-columns: 1fr 1fr;
  min-height: calc(100vh - var(--nav-height));
}

.work-list {
  padding: calc(var(--nav-height) + var(--space-lg)) var(--space-lg) var(--space-xl);
  border-right: 1px solid var(--border-light);
  background: var(--bg-light);
}

.work-list__item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--space-md) 0;
  border-bottom: 1px solid var(--border-light);
  cursor: pointer;
  transition: all var(--duration-fast) ease;
}

.work-list__item:first-child {
  border-top: 1px solid var(--border-light);
}

.work-list__item:hover {
  padding-left: 0.5rem;
}

.work-list__item:hover .work-list__title {
  color: var(--text-dark);
}

.work-list__info {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
}

.work-list__title {
  font-family: 'Cormorant Garamond', 'Georgia', serif;
  font-size: clamp(1.2rem, 2vw, 1.6rem);
  font-weight: 400;
  color: var(--text-dark);
  line-height: 1.2;
  transition: color var(--duration-fast);
  letter-spacing: 0.01em;
}

.work-list__sub {
  font-family: var(--font-body);
  font-size: var(--text-tiny);
  color: var(--text-dark-secondary);
  text-transform: uppercase;
  letter-spacing: var(--tracking-wide);
}

.work-list__arrow {
  font-family: var(--font-body);
  font-size: 1.1rem;
  color: var(--text-dark-secondary);
  opacity: 0;
  transform: translateX(-6px);
  transition: opacity var(--duration-fast), transform var(--duration-fast);
  flex-shrink: 0;
}

.work-list__item:hover .work-list__arrow {
  opacity: 1;
  transform: translateX(0);
}

/* Right: sticky preview */
.work-preview {
  position: sticky;
  top: var(--nav-height);
  height: calc(100vh - var(--nav-height));
  overflow: hidden;
  background: #111;
}

.work-preview img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center center;
  display: block;
  transition: opacity 0.2s ease;
}

/* Mobile: stack vertically */
@media (max-width: 900px) {
  .work-split {
    margin-left: 0;
    grid-template-columns: 1fr;
    padding-top: var(--nav-height);
  }
  .work-preview {
    display: none;
  }
  .work-list {
    padding-top: var(--space-lg);
  }
}

/* Override old modal gallery — taller, bigger */
.modal-gallery {
  display: grid !important;
  grid-template-columns: repeat(2, 1fr) !important;
  gap: 1.25rem !important;
  margin-top: var(--space-lg) !important;
}

.modal-gallery img {
  width: 100% !important;
  aspect-ratio: 16 / 9 !important;
  object-fit: cover !important;
  border-radius: var(--border-radius) !important;
  display: block !important;
}

@media (max-width: 640px) {
  .modal-gallery {
    grid-template-columns: 1fr !important;
  }
}
