﻿@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;600;700&display=swap');

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

:root {
  --salmon: #fa8072;
  --bg: #ffffff;
  --text: #1a1a1a;
  --card-bg: #ffffff;
  --border: #e5e5e5;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0a0a0a;
    --text: #e5e5e5;
    --card-bg: #000000;
    --border: #2a2a2a;
  }
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  min-height: 100vh;
}

/* Top navigation bar */
header {
  background-color: var(--bg); /* Back to system background */
  border-bottom: 1px solid var(--salmon); /* The "Fine Line" separator */
  padding: 1.5rem 2rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

header h1 {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--text); /* Follows system text color */
}

nav {
  display: flex;
  gap: 2rem;
}

nav a {
  color: var(--salmon); /* Home and About are now Salmon */
  text-decoration: none;
  font-weight: 600;
  transition: opacity 0.2s;
}

nav a:hover {
  opacity: 0.7;
}

/* Main content area */
main {
  padding: 2rem;
  max-width: 1400px;
  margin: 0 auto;
}

/* Card grid for homepage */
.post-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
  margin-top: 2rem;
}

@media (max-width: 768px) {
  .post-grid {
    grid-template-columns: 1fr;
  }
  header { padding: 1rem; }
  main { padding: 1rem; }
}

/* Post Cards */
/* Post Cards Grid Logic */
.post-card {
  position: relative;
  aspect-ratio: 4 / 3;
  border-radius: 12px;
  overflow: hidden;
  background: #000; /* Deep black background for the "darker" effect */
  border: 1px solid var(--border);
  text-decoration: none;
  display: block;
  transition: transform 0.3s ease;
}

/* 1. Zoom and Darken Effect on Image */
.post-card-bg {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  opacity: 0.7; /* Make it darker by default */
  transition: transform 0.5s ease, opacity 0.5s ease;
}

/* 2. Hover Effects (Desktop) */
@media (min-width: 769px) {
  /* Title hidden by default on desktop */
  .post-card-title {
    opacity: 0;
    transition: opacity 0.3s ease, transform 0.3s ease;
    transform: translateY(10px); /* Slight lift effect */
  }

  .post-card:hover .post-card-bg {
    transform: scale(1.1); /* Tiny zoom effect */
    opacity: 1; /* Brighten on hover */
  }

  .post-card:hover .post-card-title {
    opacity: 1;
    transform: translateY(0);
  }
}

.post-card-title {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem;
  /* Darker gradient at bottom to ensure text is readable */
  background: linear-gradient(transparent, rgba(0, 0, 0, 0.7));
  color: white;
  font-size: 1.5rem;
  font-weight: 600;
  text-align: center;
  z-index: 2;
}

/* 3. Mobile Specific Layout */
@media (max-width: 768px) {
  .post-card-bg {
    opacity: 0.9; /* Keep it mostly bright on mobile */
  }

  .post-card-title {
    opacity: 1; /* Always visible on mobile */
    align-items: flex-end; /* Move to the bottom */
    padding-bottom: 1.5rem;
    font-size: 1.2rem;
    background: linear-gradient(transparent 40%, rgba(0, 0, 0, 0.8));
  }
  
  .post-grid {
    grid-template-columns: 1fr;
    gap: 1rem;
  }
}

/* Article page styles */
article {
  max-width: 700px;
  margin: 0 auto;
}

article h1 {
  font-size: 2.5rem;
  margin-bottom: 0.5rem;
  font-weight: 700;
}

time {
  display: block;
  color: #666;
  font-size: 0.9rem;
  margin-bottom: 2rem;
}

article img {
  max-width: 100%;
  height: auto;
  border-radius: 8px;
  margin: 2rem 0;
}

article a {
  color: var(--salmon);
  text-decoration: none;
}

article a:hover {
  text-decoration: underline;
}

/* Next/Back Pagination */
.post-pagination {
  display: flex;
  justify-content: space-between;
  max-width: 700px;
  margin: 3rem auto 0;
  padding-top: 2rem;
  border-top: 1px solid var(--border);
}

.pagination-link {
  color: var(--salmon);
  text-decoration: none;
  font-weight: 600;
  padding: 0.4rem 0.75rem;
  font-size: 0.7rem
  border: 1px solid var(--salmon);
  border-radius: 6px;
  transition: all 0.2s;
}

.pagination-link:hover {
  background-color: var(--salmon);
  color: white !important;
}

/* Responsive YouTube Embed */
.video-container {
  position: relative;
  padding-bottom: 56.25%; /* 16:9 Aspect Ratio */
  height: 0;
  overflow: hidden;
  margin: 2rem 0;
  border-radius: 12px;
}

.video-container iframe {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
}
.site-title {
  color: var(--text);
  text-decoration: none;
  transition: opacity 0.2s;
}

.site-title:hover {
  opacity: 0.8;
}

.tweet-container {
  display: flex;
  justify-content: center;
  margin: 2rem 0;
}

/* Rich Preview Cards (Iframely Style) */
.rich-card {
  display: flex;
  margin: 2rem 0;
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: 12px;
  overflow: hidden;
  max-width: 100%;
}

.rich-card-image {
  width: 150px;
  min-width: 150px;
}

.rich-card-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  margin: 0 !important; /* Overrides article img margins */
  border-radius: 0 !important;
}

.rich-card-content {
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  justify-content: center;
  flex-grow: 1;
}

.rich-card-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 0.5rem;
}

.rich-card-title {
  margin: 0;
  font-size: 1.2rem;
  font-weight: 700;
}

.rich-card-rating {
  color: #f5c518;
  font-weight: 800;
  font-size: 1.1rem;
}

.rich-card-meta {
  font-size: 0.9rem;
  color: #888;
  margin-bottom: 1rem;
}

.rich-card-link {
  color: var(--salmon) !important;
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 600;
}

/* Specific Logo/Score styles */
.imdb-logo {
  background: #f5c518;
  color: #000;
  padding: 2px 4px;
  border-radius: 4px;
  font-weight: 900;
  font-size: 0.7rem;
  margin-right: 5px;
}

.meta-score-box {
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 4px;
  font-weight: 800;
  font-size: 1rem;
}

/* Responsive */
@media (max-width: 500px) {
  .rich-card { flex-direction: column; }
  .rich-card-image { width: 100%; height: 200px; }
}

.spotify-container {
  margin: 2rem 0;
}