:root {
  --page-bg: url('../assets/images/blog/blog-bg.png');
  --header-bg: url('../assets/images/blog/bg-bar.png');
  --header-height: 140px;
  --gap-small: 0.75rem;
  --gap-medium: 1.5rem;
  --gap-large: 2rem;
}

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

html {
  touch-action: manipulation;
}

body {
  font-family: 'Segoe UI', Roboto, Arial, sans-serif;
  background: var(--page-bg);
  background-size: cover;
  background-position: center;
  color: #333;
  line-height: 1.6;
}

body::after {
  content: '';
  position: fixed;
  background-size: cover;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-image: url('../assets/images/blog/grain.jpg');
  opacity: 0.05;
  pointer-events: none;
  z-index: 9999;
  mix-blend-mode: multiply;
}

.top-bar {
  position: sticky;
  top: 0;
  width: 100%;
  height: var(--header-height);
  background: var(--header-bg);
  background-size: cover;
  background-position: center;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0 var(--gap-large);
  gap: var(--gap-medium);
  z-index: 100;
}

.thumbnail-strip {
  display: flex;
  gap: var(--gap-small);
  align-items: center;
  overflow: hidden;
  scrollbar-width: thin;
}

.thumb-container {
  position: relative;
  width: 240px;
  height: 110px;
  flex-shrink: 0;
  overflow: hidden;
  border-radius: 4px;
}

.thumb-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border: 2px solid rgba(255, 255, 255, 0.3);
  border-radius: 4px;
  transition: filter 0.25s ease, border-color 0.25s ease;
  cursor: pointer;
  filter: grayscale(100%) brightness(1);
}

.thumb-container:hover .thumb-img {
  border-color: rgba(255, 255, 255, 0.6);
  filter: grayscale(100%) brightness(0.50);
}

.thumb-container::after {
  content: attr(data-title);
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 0.85rem;
  font-weight: 600;
  text-align: center;
  padding: 0.5rem;
  box-sizing: border-box;
  line-height: 1.2;
  white-space: normal;
  overflow-wrap: anywhere;
  word-break: break-word;
  opacity: 0;
  transition: opacity 0.2s;
  pointer-events: none;
}

.thumb-container:hover::after {
  opacity: 1;
}

.title-block {
  color: #fff;
  text-align: right;
  flex-shrink: 0;
}

.header-title {
  font-size: 1.75rem;
  font-weight: 700;
  margin-bottom: 0.25rem;
  letter-spacing: 0.02em;
}

.header-subtitle {
  font-size: 0.875rem;
  opacity: 0.85;
  font-weight: 300;
  letter-spacing: 0.05em;
}

.content-area {
  padding: var(--gap-large) var(--gap-large) var(--gap-large) var(--gap-medium);
  min-height: calc(100vh - var(--header-height));
}

.feature-card {
  max-width: 480px;
  padding-left: 40px;
  padding-top: 25px;
  transition: transform 0.2s, border-color 0.2s;
  filter: grayscale(100%);
}
.feature-card:hover {
  transform: scale(1.03);
}

.feature-image {
  width: 100%;
  height: 260px;
  display: block;
  object-fit: cover;
}

.feature-title {
  font-size: 1.5rem;
  font-weight: 600;
  margin: 1rem 0 0.5rem;
  text-align: left;
  letter-spacing: 0.10em;
  font-family: "Arial", "Segoe UI", Roboto, Arial, sans-serif;
  color: transparent;
  background-image: url('../assets/images/blog/grain-text.png');
  background-clip: text;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.feature-subtitle {
  font-size: 0.95rem;
  margin: 0;
  line-height: 1.5;
  text-align: left;
  font-family: "Arial Narrow", "Segoe UI", Roboto, Arial, sans-serif;
  color: transparent;
  background-image: url('../assets/images/blog/grain-text.png');
  background-clip: text;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.nav-btn {
  position: fixed;
  bottom: var(--gap-large);
  right: var(--gap-large);
  font-size: 1.2rem;
  font-weight: 600;
  color: #626262;
  letter-spacing: 0.10em;
  font-family: "Arial", "Segoe UI", Roboto, Arial, sans-serif;
  transition: color 0.2s;
  cursor: pointer;
}

.nav-btn-left {
  left: var(--gap-large);
  right: auto;
}

@media (max-width: 768px) {
  :root {
    --header-height: 160px;
  }

  .top-bar {
    flex-direction: column;
    height: auto;
    min-height: var(--header-height);
    padding: var(--gap-medium);
    align-items: stretch;
  }

  .thumbnail-strip {
    justify-content: flex-start;
    order: 2;
    margin-top: var(--gap-small);
  }

  .title-block {
    text-align: left;
    order: 1;
  }

  .header-title {
    font-size: 1.5rem;
  }

  .feature-card {
    max-width: 80%;
  }
}

@media (max-width: 480px) {
  .thumb-container {
    width: 120px;
    height: 80px;
  }

  .header-title {
    font-size: 1.25rem;
  }

  .header-subtitle {
    font-size: 0.75rem;
  }
}
