/* Unified Card Component System */
/* Modern, editorial design with variable grid rhythm */

/* ============================================================================
   THEME TOGGLE OVERRIDES
   These must come AFTER all other files that declare :root variables inside
   @media (prefers-color-scheme: dark) so the manual toggle wins the cascade.
   ============================================================================ */

[data-theme="dark"] {
  --color-paper: #000000;
  --color-ink: #FAFAF9;
  --color-ink-light: #A8A29E;
  --color-ink-lighter: #78716C;
  --color-accent: #5EEAD4;
  --color-accent-light: rgba(94, 234, 212, 0.1);
  --color-accent-dark: #99F6E4;
  --color-border: rgba(250, 250, 249, 0.06);
  --color-shadow-sm: rgba(0, 0, 0, 0.2);
  --color-shadow-md: rgba(0, 0, 0, 0.3);
  --color-shadow-lg: rgba(0, 0, 0, 0.4);
}

[data-theme="light"] {
  --color-paper: #FFFEF9;
  --color-ink: #1C1917;
  --color-ink-light: #78716C;
  --color-ink-lighter: #A8A29E;
  --color-accent: #0F766E;
  --color-accent-light: #CCFBF1;
  --color-accent-dark: #134E4A;
  --color-border: rgba(28, 25, 23, 0.06);
  --color-shadow-sm: rgba(28, 25, 23, 0.04);
  --color-shadow-md: rgba(28, 25, 23, 0.08);
  --color-shadow-lg: rgba(28, 25, 23, 0.12);
}

/* ============================================================================
   HERO SECTION
   ============================================================================ */

.hero {
  max-width: var(--size-gallery, 80rem);
  margin: 0 auto;
  padding: clamp(4rem, 8vw, 8rem) var(--space-lg, 2rem) clamp(3rem, 6vw, 6rem);
}

.hero-inner {
  max-width: 48rem;
}

.hero-greeting {
  font-family: var(--font-mono, 'JetBrains Mono', monospace);
  font-size: clamp(0.85rem, 0.8rem + 0.25vw, 1rem);
  color: var(--color-accent, #0F766E);
  letter-spacing: 0.05em;
  text-transform: uppercase;
  margin: 0 0 var(--space-sm, 0.75rem) 0;
  font-weight: 500;
}

.hero-name {
  font-family: var(--font-serif, 'Source Serif 4', serif);
  font-size: clamp(2.5rem, 2rem + 3vw, 4.5rem);
  font-weight: 700;
  line-height: 1.05;
  letter-spacing: -0.03em;
  margin: 0 0 var(--space-lg, 1.5rem) 0;
  color: var(--color-ink, #1C1917);
}

.hero-tagline {
  font-size: clamp(1.05rem, 1rem + 0.3vw, 1.25rem);
  line-height: 1.6;
  color: var(--color-ink-light, #78716C);
  max-width: 40ch;
  margin: 0 0 var(--space-xl, 2.5rem) 0;
}

.hero-cta {
  display: flex;
  gap: var(--space-md, 1rem);
  flex-wrap: wrap;
}

.hero-btn {
  display: inline-flex;
  align-items: center;
  padding: 0.7rem 1.5rem;
  border-radius: var(--radius-full, 9999px);
  font-family: var(--font-sans, 'Inter', sans-serif);
  font-size: 0.9rem;
  font-weight: 500;
  text-decoration: none;
  transition: all 0.25s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  letter-spacing: 0.01em;
}

.hero-btn-primary {
  background: var(--color-ink, #1C1917);
  color: var(--color-paper, #FFFEF9);
}

.hero-btn-primary:hover {
  background: var(--color-accent, #0F766E);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(15, 118, 110, 0.3);
}

.hero-btn-secondary {
  background: transparent;
  color: var(--color-ink, #1C1917);
  border: 1.5px solid var(--color-border, rgba(28, 25, 23, 0.15));
}

.hero-btn-secondary:hover {
  border-color: var(--color-accent, #0F766E);
  color: var(--color-accent, #0F766E);
  transform: translateY(-1px);
}

@media (max-width: 640px) {
  .hero {
    padding-left: var(--space-md, 1.5rem);
    padding-right: var(--space-md, 1.5rem);
  }

  .hero-cta {
    flex-direction: column;
  }

  .hero-btn {
    text-align: center;
    justify-content: center;
  }
}

/* ============================================================================
   ABOUT SECTION
   ============================================================================ */

.about-section {
  max-width: var(--size-gallery, 80rem);
  margin: 0 auto;
  padding: clamp(3rem, 6vw, 6rem) var(--space-lg, 2rem);
  border-top: 1px solid var(--color-border, rgba(28, 25, 23, 0.06));
}

.about-inner {
  max-width: 48rem;
}

.about-content {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: clamp(2rem, 4vw, 4rem);
  align-items: start;
}

.about-text p {
  font-size: clamp(1rem, 0.95rem + 0.25vw, 1.1rem);
  line-height: 1.7;
  color: var(--color-ink-light, #78716C);
  margin: 0 0 var(--space-md, 1rem) 0;
  max-width: 52ch;
}

.about-text p:last-child {
  margin-bottom: 0;
}

.about-links {
  display: flex;
  flex-direction: column;
  gap: var(--space-sm, 0.75rem);
}

.about-link {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--color-ink-light, #78716C);
  text-decoration: none;
  transition: color 0.2s ease;
  white-space: nowrap;
}

.about-link svg {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
}

.about-link:hover {
  color: var(--color-accent, #0F766E);
}

@media (max-width: 768px) {
  .about-section {
    padding-left: var(--space-md, 1.5rem);
    padding-right: var(--space-md, 1.5rem);
  }

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

  .about-links {
    flex-direction: row;
    flex-wrap: wrap;
  }
}

/* ============================================================================
   SECTION HEADERS
   ============================================================================ */

.section-header {
  max-width: var(--size-gallery, 80rem);
  margin: 0 auto;
  padding: 0 var(--space-lg, 2rem);
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  scroll-margin-top: 5rem;
}

.section-title {
  font-family: var(--font-serif, 'Source Serif 4', serif);
  font-size: clamp(1.5rem, 1.25rem + 1vw, 2rem);
  font-weight: 600;
  letter-spacing: -0.02em;
  margin: 0;
  color: var(--color-ink, #1C1917);
}

@media (max-width: 768px) {
  .section-header {
    padding: 0 var(--space-md, 1.5rem);
  }
}

/* ============================================================================
   UNIFIED CONTENT GRID
   ============================================================================ */

.unified-content-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: var(--space-lg, 1.5rem);
  max-width: var(--size-gallery, 80rem);
  margin: var(--space-lg, 1.5rem) auto var(--space-2xl, 4rem);
  padding: 0 var(--space-lg, 2rem);
}

/* Featured first card spans 2 columns on wider screens */
.unified-content-grid > .content-card:first-child {
  grid-column: 1 / -1;
}

@media (min-width: 769px) {
  .unified-content-grid > .content-card:first-child {
    grid-column: 1 / span 2;
  }

  /* Featured photo card gets taller image */
  .unified-content-grid > .photo-card:first-child .card-image {
    height: 340px;
  }

  /* Featured post card gets larger text */
  .unified-content-grid > .post-card:first-child .card-title {
    font-size: clamp(1.4rem, 1.2rem + 0.6vw, 1.8rem);
  }

  .unified-content-grid > .post-card:first-child .card-description {
    -webkit-line-clamp: 3;
    max-width: 60ch;
  }
}

/* Responsive grid adjustments */
@media (max-width: 1024px) {
  .unified-content-grid {
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  }
}

@media (max-width: 768px) {
  .unified-content-grid {
    grid-template-columns: 1fr;
    gap: var(--space-md, 1.5rem);
    padding: 0 var(--space-md, 1.5rem);
    margin: var(--space-md, 1rem) auto var(--space-xl, 3rem);
  }

  .unified-content-grid > .content-card:first-child {
    grid-column: 1;
  }
}

/* ============================================================================
   BASE CARD STYLES
   ============================================================================ */

.content-card {
  background: var(--color-paper, #fefefe);
  border-radius: var(--radius-lg, 0.75rem);
  /* Layered shadows for natural depth */
  box-shadow:
    0 1px 2px rgba(0, 0, 0, 0.04),
    0 2px 4px rgba(0, 0, 0, 0.04),
    0 4px 12px rgba(0, 0, 0, 0.06);
  transition:
    transform 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94),
    box-shadow 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  display: flex;
  flex-direction: column;
  opacity: 0;
  transform: translateY(16px);
  animation: fadeInUp 0.5s ease forwards;
  container-type: inline-size;
}

.content-card:hover {
  transform: translateY(-4px);
  box-shadow:
    0 2px 4px rgba(0, 0, 0, 0.04),
    0 4px 8px rgba(0, 0, 0, 0.06),
    0 12px 32px rgba(0, 0, 0, 0.1);
}

/* Dark mode support */
@media (prefers-color-scheme: dark) {
  .content-card {
    box-shadow:
      0 1px 2px rgba(0, 0, 0, 0.2),
      0 2px 4px rgba(0, 0, 0, 0.15),
      0 4px 12px rgba(0, 0, 0, 0.2);
  }

  .content-card:hover {
    box-shadow:
      0 2px 4px rgba(0, 0, 0, 0.2),
      0 4px 8px rgba(0, 0, 0, 0.2),
      0 12px 32px rgba(0, 0, 0, 0.3);
  }
}

/* Theme-specific dark mode overrides */
[data-theme="dark"] .content-card {
  box-shadow:
    0 1px 2px rgba(0, 0, 0, 0.2),
    0 2px 4px rgba(0, 0, 0, 0.15),
    0 4px 12px rgba(0, 0, 0, 0.2);
}

[data-theme="dark"] .content-card:hover {
  box-shadow:
    0 2px 4px rgba(0, 0, 0, 0.2),
    0 4px 8px rgba(0, 0, 0, 0.2),
    0 12px 32px rgba(0, 0, 0, 0.3);
}

/* ============================================================================
   CARD LINK STYLES
   ============================================================================ */

.card-link {
  text-decoration: none;
  color: inherit;
  display: block;
}

.post-card .card-link {
  display: flex;
  flex-direction: column;
}

/* ============================================================================
   CONTENT TYPE BADGE
   ============================================================================ */

.content-type-badge {
  font-family: var(--font-sans, 'Inter', sans-serif);
  font-size: 0.6rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  padding: 0.15rem 0.5rem;
  border-radius: 1rem;
  display: inline-block;
  vertical-align: middle;
}

/* Post badge */
.post-card .content-type-badge {
  background: var(--color-accent-light, rgba(37, 99, 235, 0.1));
  color: var(--color-accent, #2563eb);
  margin-bottom: 0.5rem;
  font-size: 0.6rem;
  font-weight: 600;
  letter-spacing: 0.08em;
}


/* ============================================================================
   POST CARD SPECIFIC STYLES
   ============================================================================ */

.post-card .card-body {
  padding: 1rem;
  display: flex;
  flex-direction: column;
}

@media (max-width: 768px) {
  .post-card .card-body {
    padding: 1rem;
  }
}

.post-card .card-title {
  font-family: var(--font-serif, 'Source Serif 4', serif);
  font-size: clamp(1.1rem, 1.05rem + 0.4vw, 1.3rem);
  font-weight: 600;
  margin: 0 0 0.4rem 0;
  color: var(--color-ink, #1a1a1a);
  line-height: 1.25;
  letter-spacing: -0.01em;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.post-card .card-description {
  color: var(--color-ink-light, #666666);
  font-size: 0.9rem;
  line-height: 1.6;
  margin-bottom: 1rem;
  opacity: 0.9;
  max-width: 45ch;
  /* Truncate long descriptions to maintain consistent card heights */
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  text-overflow: ellipsis;
}

.post-card .card-meta {
  font-family: var(--font-mono, 'JetBrains Mono', monospace);
  font-size: 0.75rem;
  color: var(--color-ink-light, #666666);
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  flex-wrap: wrap;
  letter-spacing: 0.01em;
  /* Tabular numbers for dates */
  font-variant-numeric: tabular-nums;
  font-feature-settings: "tnum" 1;
}

/* Link post indicator */
.post-card.is-link-post .content-type-badge {
  background: rgba(168, 85, 247, 0.1);
  color: #a855f7;
}

.post-card.is-link-post .card-title::after {
  content: ' ↗';
  opacity: 0.5;
  font-size: 0.9em;
}

/* ============================================================================
   PHOTO CARD SPECIFIC STYLES
   ============================================================================ */

.photo-card {
  display: flex;
  flex-direction: column;
}

.photo-card .card-link {
  display: flex;
  flex-direction: column;
}

.photo-card .card-image {
  width: 100%;
  height: 260px;
  overflow: hidden;
  background: var(--color-ink-lighter, #e5e5e5);
  border-radius: var(--radius-lg, 0.75rem) var(--radius-lg, 0.75rem) 0 0;
  flex-shrink: 0;
}

.photo-card .card-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 60%;
  transition: transform 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.photo-card:hover .card-image img {
  transform: scale(1.03);
}

.photo-card .card-body {
  padding: 1rem;
  display: flex;
  flex-direction: column;
}

@media (max-width: 768px) {
  .photo-card .card-body {
    padding: 0.75rem;
  }
}

.photo-card .card-title {
  font-family: var(--font-serif, 'Source Serif 4', serif);
  font-size: clamp(1.1rem, 1.05rem + 0.25vw, 1.3rem);
  font-weight: 600;
  margin: 0 0 0.5rem 0;
  color: var(--color-ink, #1a1a1a);
  line-height: 1.3;
  letter-spacing: -0.01em;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.photo-card .card-meta {
  font-family: var(--font-mono, 'JetBrains Mono', monospace);
  font-size: 0.75rem;
  color: var(--color-ink-light, #666666);
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  flex-wrap: wrap;
  letter-spacing: 0.01em;
  /* Tabular numbers for dates */
  font-variant-numeric: tabular-nums;
  font-feature-settings: "tnum" 1;
}

/* Photo badge */
.photo-card .content-type-badge {
  background: var(--color-accent-light, rgba(15, 118, 110, 0.1));
  color: var(--color-accent, #0F766E);
  margin-bottom: 0.5rem;
  font-size: 0.6rem;
  font-weight: 600;
  letter-spacing: 0.08em;
}

/* ============================================================================
   VIDEO CARD SPECIFIC STYLES
   ============================================================================ */

.video-card {
  display: flex;
  flex-direction: column;
}

.video-card .card-link {
  display: flex;
  flex-direction: column;
}

.video-card .card-image {
  position: relative;
  width: 100%;
  height: 260px;
  overflow: hidden;
  background: var(--color-ink-lighter, #e5e5e5);
  border-radius: var(--radius-lg, 0.75rem) var(--radius-lg, 0.75rem) 0 0;
  flex-shrink: 0;
}

.video-card .card-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 70%;
  transition: transform 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

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

/* Video duration badge */
.video-card .video-duration {
  position: absolute;
  bottom: 0.5rem;
  right: 0.5rem;
  background: rgba(0, 0, 0, 0.85);
  color: white;
  padding: 0.25rem 0.5rem;
  border-radius: 0.25rem;
  font-family: var(--font-mono, 'JetBrains Mono', monospace);
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.025em;
  backdrop-filter: blur(4px);
}

/* Video card body (matches photo card style) */
.video-card .card-body {
  padding: 1rem;
  display: flex;
  flex-direction: column;
}

@media (max-width: 768px) {
  .video-card .card-body {
    padding: 0.75rem;
  }
}

.video-card .card-title {
  font-family: var(--font-serif, 'Source Serif 4', serif);
  font-size: clamp(1.1rem, 1.05rem + 0.25vw, 1.3rem);
  font-weight: 600;
  margin: 0 0 0.5rem 0;
  color: var(--color-ink, #1a1a1a);
  line-height: 1.3;
  letter-spacing: -0.01em;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.video-card .card-meta {
  font-family: var(--font-mono, 'JetBrains Mono', monospace);
  font-size: 0.75rem;
  color: var(--color-ink-light, #666666);
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  flex-wrap: wrap;
  letter-spacing: 0.01em;
  /* Tabular numbers for dates */
  font-variant-numeric: tabular-nums;
  font-feature-settings: "tnum" 1;
}

/* Video badge - matches photo badge styling */
.video-card .content-type-badge {
  background: var(--color-accent-light, rgba(15, 118, 110, 0.1));
  color: var(--color-accent, #0F766E);
  margin-bottom: 0.5rem;
  font-size: 0.6rem;
  font-weight: 600;
  letter-spacing: 0.08em;
}

/* ============================================================================
   ANIMATIONS
   ============================================================================ */

@keyframes fadeInUp {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Staggered animation delays — subtle, fast */
.content-card:nth-child(3n + 1) { animation-delay: 0.05s; }
.content-card:nth-child(3n + 2) { animation-delay: 0.1s; }
.content-card:nth-child(3n + 3) { animation-delay: 0.15s; }

/* Cap stagger for items further down */
.content-card:nth-child(n + 7) { animation-delay: 0.2s; }

/* Reduce motion for accessibility */
@media (prefers-reduced-motion: reduce) {
  .content-card {
    animation: none;
    opacity: 1;
    transform: none;
    transition: box-shadow 0.2s ease, transform 0.2s ease;
  }

  .content-card:hover {
    transform: translateY(-2px);
  }

  .photo-card:hover .card-image img,
  .video-card:hover .card-image img {
    transform: none;
  }
}

/* ============================================================================
   VIEW TRANSITIONS API (progressive enhancement)
   ============================================================================ */

@view-transition {
  navigation: auto;
}

::view-transition-old(root),
::view-transition-new(root) {
  animation-duration: 0.25s;
}

/* ============================================================================
   TAG CHIPS (within card meta)
   ============================================================================ */

.card-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 0.5rem;
  width: 100%;
}

.card-tag {
  display: inline-block;
  padding: 0.25rem 0.75rem;
  background: var(--color-accent-light, rgba(15, 118, 110, 0.1));
  color: var(--color-accent, #0F766E);
  border-radius: 1rem;
  font-size: 0.7rem;
  font-weight: 500;
  text-decoration: none;
  transition: all 0.2s ease;
  letter-spacing: 0.02em;
  text-transform: lowercase;
}

.card-tag:hover {
  background: var(--color-accent, #0F766E);
  color: var(--color-paper, #FFFEF9);
}

/* ============================================================================
   VIEW TOGGLE
   ============================================================================ */

.section-actions {
  display: flex;
  align-items: center;
  gap: var(--space-sm, 0.75rem);
}

.view-toggle-btn {
  background: var(--color-paper, #fefefe);
  border: 1px solid var(--color-border, rgba(0, 0, 0, 0.1));
  border-radius: var(--radius-md, 0.5rem);
  padding: 0.4rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--color-ink-light, #666666);
  transition: all 0.2s ease;
}

.view-toggle-btn:hover {
  color: var(--color-ink, #1a1a1a);
  border-color: var(--color-ink-light, #666666);
}

.view-toggle-btn svg {
  width: 20px;
  height: 20px;
}

[data-theme="dark"] .view-toggle-btn {
  background: var(--color-paper, #1a1a1a);
  border-color: rgba(255, 255, 255, 0.15);
  color: var(--color-ink-light, #999);
}

[data-theme="dark"] .view-toggle-btn:hover {
  color: var(--color-ink, #e5e5e5);
  border-color: rgba(255, 255, 255, 0.3);
}

/* ============================================================================
   LIST VIEW STYLES — text-only compact rows
   ============================================================================ */

.unified-content-grid.list-view {
  grid-template-columns: 1fr;
  gap: 0;
}

/* Base card reset for list view */
.unified-content-grid.list-view .content-card {
  animation: none;
  opacity: 1;
  transform: none;
  border-radius: 0;
  box-shadow: none;
  border-bottom: 1px solid var(--color-border, rgba(0, 0, 0, 0.06));
  grid-column: 1 !important; /* Override featured card spanning */
}

.unified-content-grid.list-view .content-card:hover {
  transform: none;
  box-shadow: none;
  background: var(--color-accent-light, rgba(15, 118, 110, 0.04));
}

/* Thumbnail: hidden by default in grid view */
.card-thumb {
  display: none;
}

/* Hide full images, album stacks, video duration in list view */
.unified-content-grid.list-view .card-image,
.unified-content-grid.list-view .album-stack,
.unified-content-grid.list-view .album-count,
.unified-content-grid.list-view .video-duration {
  display: none;
}

/* Photo cards: show small thumbnail in list view */
.unified-content-grid.list-view .photo-card .card-link {
  flex-direction: row;
  align-items: center;
}

.unified-content-grid.list-view .photo-card .card-thumb {
  display: block;
  width: 48px;
  height: 48px;
  min-width: 48px;
  object-fit: cover;
  border-radius: var(--radius-sm, 0.25rem);
  margin: 0.5rem 0 0.5rem 0.75rem;
  background: var(--color-ink-lighter, #e5e5e5);
}

/* Hide descriptions and badges */
.unified-content-grid.list-view .card-description,
.unified-content-grid.list-view .content-type-badge {
  display: none;
}

/* Card body: compact padding, allow text truncation */
.unified-content-grid.list-view .card-body {
  padding: 0.6rem 0.75rem;
  min-width: 0;
  flex: 1;
}

/* Colored left border by content type */
.unified-content-grid.list-view .post-card {
  border-left: 3px solid #2563eb;
}

.unified-content-grid.list-view .post-card.is-link-post {
  border-left-color: #a855f7;
}

.unified-content-grid.list-view .photo-card {
  border-left: 3px solid var(--color-accent, #0F766E);
}

.unified-content-grid.list-view .video-card {
  border-left: 3px solid var(--color-accent, #0F766E);
}

.unified-content-grid.list-view .album-card {
  border-left: 3px solid #a855f7;
}

/* Title: single line, smaller */
.unified-content-grid.list-view .card-title {
  -webkit-line-clamp: 1;
  margin-bottom: 0.15rem;
  font-size: 0.95rem;
}

/* Meta: tighter, smaller dates */
.unified-content-grid.list-view .card-meta {
  gap: 0.5rem;
  font-size: 0.65rem;
}

/* Tags inline */
.unified-content-grid.list-view .card-tags {
  display: inline-flex;
  margin-top: 0;
  gap: 0.3rem;
}

.unified-content-grid.list-view .card-tag {
  font-size: 0.6rem;
  padding: 0.1rem 0.45rem;
}

/* Dark mode */
[data-theme="dark"] .unified-content-grid.list-view .content-card {
  border-bottom-color: rgba(255, 255, 255, 0.08);
}

[data-theme="dark"] .unified-content-grid.list-view .content-card:hover {
  background: rgba(255, 255, 255, 0.03);
}

/* ============================================
   Footer Styles
   ============================================ */
.site-footer {
  text-align: center;
  padding: 3rem 2rem 2.5rem;
  color: var(--color-ink-lighter, #A8A29E);
  font-size: 0.8rem;
  border-top: 1px solid var(--color-border, rgba(0, 0, 0, 0.06));
  margin-top: 2rem;
}

.site-footer p {
  margin: 0;
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
}

.site-footer a {
  color: var(--color-accent, #0F766E);
  text-decoration: none;
  transition: all 0.2s ease;
}

.site-footer a:hover {
  text-decoration: underline;
}

/* Tags in video overlay (for future use) */
.video-card .card-tag {
  background: rgba(255, 255, 255, 0.2);
  color: white;
  backdrop-filter: blur(10px);
}

.video-card .card-tag:hover {
  background: rgba(255, 255, 255, 0.3);
}

/* ============================================================================
   ALBUM CARD SPECIFIC STYLES
   ============================================================================ */

.album-card {
  display: flex;
  flex-direction: column;
}

.album-card .card-link {
  display: flex;
  flex-direction: column;
}

/* Album stack container */
.album-stack {
  position: relative;
  height: 200px;
  overflow: visible;
  margin: 10px 10px 0;
  border-radius: var(--radius-md, 0.5rem) var(--radius-md, 0.5rem) 0 0;
}

/* Stacked photos with rotation effect */
.stack-photo {
  position: absolute;
  width: calc(100% - 20px);
  height: calc(100% - 20px);
  border-radius: var(--radius-sm, 0.25rem);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
  overflow: hidden;
  background: var(--color-ink-lighter, #e5e5e5);
  transition: transform 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.stack-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 70%;
}

/* Stack positioning - front photo on top */
.stack-photo-0 {
  z-index: 4;
  top: 10px;
  left: 10px;
  transform: rotate(0deg);
}

.stack-photo-1 {
  z-index: 3;
  top: 5px;
  left: 15px;
  transform: rotate(3deg);
}

.stack-photo-2 {
  z-index: 2;
  top: 0;
  left: 5px;
  transform: rotate(-2deg);
}

.stack-photo-3 {
  z-index: 1;
  top: 8px;
  left: 0;
  transform: rotate(5deg);
}

/* Hover: fan out the stack */
.album-card:hover .stack-photo-1 {
  transform: rotate(6deg) translateX(8px);
}

.album-card:hover .stack-photo-2 {
  transform: rotate(-5deg) translateX(-8px);
}

.album-card:hover .stack-photo-3 {
  transform: rotate(8deg) translateX(12px);
}

/* Photo count badge */
.album-count {
  position: absolute;
  bottom: 0.75rem;
  right: 0.75rem;
  background: rgba(0, 0, 0, 0.75);
  color: white;
  padding: 0.25rem 0.75rem;
  border-radius: 1rem;
  font-family: var(--font-mono, 'JetBrains Mono', monospace);
  font-size: 0.75rem;
  font-weight: 500;
  z-index: 10;
  backdrop-filter: blur(4px);
}

/* Album card body */
.album-card .card-body {
  padding: 1rem;
  display: flex;
  flex-direction: column;
}

@media (max-width: 768px) {
  .album-card .card-body {
    padding: 0.75rem;
  }
}

.album-card .card-title {
  font-family: var(--font-serif, 'Source Serif 4', serif);
  font-size: clamp(1.1rem, 1.05rem + 0.25vw, 1.3rem);
  font-weight: 600;
  margin: 0 0 0.4rem 0;
  color: var(--color-ink, #1a1a1a);
  line-height: 1.3;
  letter-spacing: -0.01em;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.album-card .card-description {
  color: var(--color-ink-light, #666666);
  font-size: 0.9rem;
  line-height: 1.5;
  margin-bottom: 0.75rem;
  opacity: 0.9;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.album-card .card-meta {
  font-family: var(--font-mono, 'JetBrains Mono', monospace);
  font-size: 0.75rem;
  color: var(--color-ink-light, #666666);
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  flex-wrap: wrap;
  letter-spacing: 0.01em;
  font-variant-numeric: tabular-nums;
  font-feature-settings: "tnum" 1;
}

/* Album badge */
.album-card .content-type-badge {
  background: rgba(168, 85, 247, 0.1);
  color: #a855f7;
  margin-bottom: 0.5rem;
  font-size: 0.6rem;
  font-weight: 600;
  letter-spacing: 0.08em;
}

/* Reduce motion for accessibility */
@media (prefers-reduced-motion: reduce) {
  .stack-photo {
    transition: none;
  }

  .album-card:hover .stack-photo-1,
  .album-card:hover .stack-photo-2,
  .album-card:hover .stack-photo-3 {
    transform: none;
  }

  .stack-photo-1 { transform: rotate(3deg); }
  .stack-photo-2 { transform: rotate(-2deg); }
  .stack-photo-3 { transform: rotate(5deg); }
}

/* ============================================================================
   DARK MODE — Hero & About
   ============================================================================ */

[data-theme="dark"] .hero-name {
  color: var(--color-ink, #FAFAF9);
}

[data-theme="dark"] .hero-btn-primary {
  background: var(--color-paper, #FAFAF9);
  color: var(--color-ink, #000);
}

[data-theme="dark"] .hero-btn-primary:hover {
  background: var(--color-accent, #5EEAD4);
  color: #000;
}

[data-theme="dark"] .hero-btn-secondary {
  color: var(--color-ink, #FAFAF9);
  border-color: rgba(255, 255, 255, 0.15);
}

[data-theme="dark"] .hero-btn-secondary:hover {
  border-color: var(--color-accent, #5EEAD4);
  color: var(--color-accent, #5EEAD4);
}

@media (prefers-color-scheme: dark) {
  .hero-name {
    color: var(--color-ink, #FAFAF9);
  }

  .hero-btn-primary {
    background: var(--color-paper, #FAFAF9);
    color: #000;
  }

  .hero-btn-primary:hover {
    background: var(--color-accent, #5EEAD4);
    color: #000;
  }

  .hero-btn-secondary {
    color: var(--color-ink, #FAFAF9);
    border-color: rgba(255, 255, 255, 0.15);
  }

  .hero-btn-secondary:hover {
    border-color: var(--color-accent, #5EEAD4);
    color: var(--color-accent, #5EEAD4);
  }
}

/* ============================================================================
   MASONRY GRID LAYOUT (for album pages and photo-heavy tag pages)
   ============================================================================ */

.masonry-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1rem;
  max-width: var(--size-gallery, 80rem);
  margin: var(--space-xl, 3rem) auto;
  padding: 0 var(--space-lg, 2rem);
}

.masonry-grid .masonry-item {
  break-inside: avoid;
}

.masonry-grid .masonry-item .card-image {
  height: auto;
  aspect-ratio: var(--aspect-ratio, 1.5);
}

/* True CSS columns masonry for varied heights */
.masonry-grid.true-masonry {
  display: block;
  column-count: 3;
  column-gap: 1rem;
}

.masonry-grid.true-masonry .masonry-item {
  display: inline-block;
  width: 100%;
  margin-bottom: 1rem;
}

@media (max-width: 1024px) {
  .masonry-grid.true-masonry {
    column-count: 2;
  }
}

@media (max-width: 640px) {
  .masonry-grid.true-masonry {
    column-count: 1;
  }

  .masonry-grid {
    grid-template-columns: 1fr;
    padding: 0 var(--space-md, 1.5rem);
  }
}
