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

body {
  font-family: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen,
    Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;
  line-height: 1.6;
  color: #222;
  background: #f9f9f9;
}

a {
  color: #2e6fdd;
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

/* Layout */
.container {
  width: 90%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 1rem 0;
}

/* Navigation */
header {
  background: #fff;
  border-bottom: 1px solid #ddd;
  position: sticky;
  top: 0;
  z-index: 100;
}

.nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.75rem 0;
}

/* Brand container holds logo and text side‑by‑side */
.nav-brand {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

/* Logo inside the brand: fixed height and keep aspect ratio */
.nav-brand .logo {
  height: 40px;
  width: auto;
}

/* Brand text styling */
.nav-brand span {
  font-size: 1.4rem;
  font-weight: bold;
  color: #2e6fdd;
}

.nav-menu {
  display: flex;
  gap: 1rem;
}

.nav-menu a {
  font-size: 0.9rem;
  padding: 0.5rem 0.75rem;
  border-radius: 6px;
  transition: background 0.2s ease;
}

.nav-menu a:hover {
  background: #f0f4fc;
}

/* Hero section */
.hero {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 4rem 1rem;
  text-align: center;
  background: linear-gradient(135deg, #eaf2ff 0%, #fdfbff 100%);
  border-bottom: 1px solid #e0e7ff;
}

.hero h1 {
  font-size: 2.2rem;
  margin-bottom: 1rem;
}

.hero p {
  font-size: 1rem;
  max-width: 700px;
  margin-bottom: 2rem;
  color: #555;
}

.hero .cta {
  display: inline-block;
  padding: 0.7rem 1.5rem;
  background: #2e6fdd;
  color: #fff;
  border-radius: 6px;
  font-weight: 600;
  transition: background 0.2s ease;
}

.hero .cta:hover {
  background: #214c9d;
}

/* Cards grid */
.cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 1.5rem;
  margin-top: 2rem;
}

.card {
  background: #fff;
  border-radius: 8px;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.05);
  overflow: hidden;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  display: flex;
  flex-direction: column;
}

.card:hover {
  transform: translateY(-4px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.card img {
  width: 100%;
  height: 150px;
  object-fit: cover;
}

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

.card-body h3 {
  font-size: 1.2rem;
  margin-bottom: 0.5rem;
  color: #2e6fdd;
}

.card-body p {
  font-size: 0.9rem;
  flex-grow: 1;
  color: #555;
}

.card-body .read-more {
  margin-top: 1rem;
  align-self: flex-start;
  color: #2e6fdd;
  font-weight: 600;
}

/* Scroll reveal */
.reveal {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

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

/* Page layout */
.page-header {
  background: #f0f4fc;
  padding: 2rem 1rem;
  border-bottom: 1px solid #e0e7ff;
  text-align: center;
}

.page-header h1 {
  font-size: 2rem;
  color: #2e6fdd;
  margin-bottom: 0.5rem;
}

.content {
  padding: 2rem 0;
}

.content h2 {
  margin-top: 1.5rem;
  color: #2e6fdd;
  font-size: 1.4rem;
}

/* Article header image */
.header-image {
  width: 100%;
  height: auto;
  border-radius: 8px;
  margin-bottom: 1.5rem;
}

.content ul {
  list-style: disc inside;
  margin-top: 0.5rem;
  margin-left: 1rem;
}

.content li {
  margin-bottom: 0.4rem;
}

.footer {
  background: #fff;
  border-top: 1px solid #ddd;
  text-align: center;
  padding: 1rem;
  font-size: 0.8rem;
  color: #666;
  margin-top: 2rem;
}

/* Responsive */
@media (max-width: 600px) {
  .hero h1 {
    font-size: 1.8rem;
  }
  .hero p {
    font-size: 0.9rem;
  }
  .nav-menu {
    flex-wrap: wrap;
    gap: 0.5rem;
  }
}

/* Header banner
   A decorative intro section that appears below the sticky navigation on every
   page. It uses a dark cinematic background image and centers the site name
   alongside a large logo. The banner scales responsively and reflows on
   smaller screens. */
.header-banner {
  position: relative;
  /* Use the new decorative header background generated for v8 */
  /* Custom banner background with film strips and flares */
  background-image: url('../img/header-banner.jpg');
  background-size: cover;
  background-position: center;
  color: #fff;
  padding: 4rem 1rem;
  display: flex;
  /* Layout the logo and title horizontally for a banner feel */
  flex-direction: row;
  align-items: center;
  justify-content: center;
  gap: 2rem;
}

/* Large 3D logo inside the banner */
.header-banner .banner-logo {
  /* Increase logo size and remove bottom margin for horizontal layout */
  width: 200px;
  height: auto;
  max-width: 100%;
  margin-bottom: 0;
}

/* Site title inside the banner */
.header-banner h1 {
  font-size: 2.8rem;
  font-weight: 700;
  margin: 0;
  line-height: 1.2;
}

@media (max-width: 768px) {
  .header-banner {
    padding: 2.5rem 1rem;
  }
  .header-banner .banner-logo {
    width: 140px;
  }
  .header-banner h1 {
    font-size: 1.8rem;
  }
}

/* Responsive YouTube embeds for Latest Works page */
.youtube-embed {
  position: relative;
  padding-bottom: 56.25%; /* 16:9 aspect ratio */
  height: 0;
  overflow: hidden;
  max-width: 100%;
}

.youtube-embed iframe {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
}