:root {
  --bg: #faf6ef;
  --bg-deep: #f1e8d8;
  --surface: #ffffff;
  --surface-solid: #ffffff;
  --surface-soft: #f4ede0;
  --text: #1b2a2f;
  --text-soft: #4b5b62;
  --muted: #7d8a91;
  --line: rgba(27, 42, 47, 0.1);
  --line-2: rgba(27, 42, 47, 0.2);
  --accent: #0f766e;
  --accent-2: #d97742;
  --accent-soft: rgba(15, 118, 110, 0.1);
  --accent-ink: #ffffff;
  --radius: 18px;
  --radius-lg: 24px;
  --container: 1200px;
  --font-display: Georgia, "Times New Roman", "Songti SC", "Noto Serif SC", serif;
  --font-body: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC",
    "Microsoft YaHei", sans-serif;
  --shadow: 0 18px 44px rgba(27, 42, 47, 0.1);
  --clip: inset(0 0 0 0);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

html,
body {
  margin: 0;
  padding: 0;
  overflow-x: hidden;
}

body {
  min-height: 100vh;
  color: var(--text);
  font-family: var(--font-body);
  line-height: 1.5;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  background:
    radial-gradient(1100px 560px at 88% -6%, rgba(15, 118, 110, 0.1), transparent 60%),
    radial-gradient(900px 520px at -8% 4%, rgba(217, 119, 66, 0.08), transparent 58%),
    linear-gradient(180deg, var(--bg) 0%, var(--bg-deep) 100%);
}

img {
  max-width: 100%;
  display: block;
}

a {
  color: inherit;
  text-decoration: none;
}

a:focus-visible,
button:focus-visible,
input:focus-visible {
  outline: 2px solid rgba(15, 118, 110, 0.55);
  outline-offset: 2px;
}

::selection {
  background: rgba(15, 118, 110, 0.22);
}

.container {
  width: min(var(--container), calc(100% - 2rem));
  margin-inline: auto;
}

/* ============ Header ============ */

.site-header {
  position: sticky;
  top: 0;
  z-index: 60;
  border-bottom: 1px solid var(--line);
  background: rgba(250, 246, 239, 0.86);
  backdrop-filter: blur(14px) saturate(140%);
  transition: background-color 180ms ease, box-shadow 180ms ease,
    border-color 180ms ease;
}

.site-header.scrolled {
  background: rgba(250, 246, 239, 0.96);
  border-bottom-color: var(--line-2);
  box-shadow: 0 10px 30px rgba(27, 42, 47, 0.08);
}

.brand-row {
  position: relative;
  min-height: 60px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.6rem;
  flex-wrap: wrap;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  line-height: 1;
}

.brand-logo {
  display: block;
  height: 32px;
  width: auto;
  border-radius: 8px;
  filter: drop-shadow(0 1px 3px rgba(27, 42, 47, 0.16));
}

.brand-name {
  font-family: var(--font-display);
  font-size: 1.38rem;
  font-weight: 700;
  letter-spacing: 0.01em;
  background: linear-gradient(92deg, #1b2a2f 0%, #0f766e 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.menu-toggle {
  display: inline-flex;
  width: 42px;
  height: 42px;
  margin-left: auto;
  padding: 0;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--line-2);
  border-radius: 12px;
  background: rgba(27, 42, 47, 0.04);
  color: var(--text);
  cursor: pointer;
  transition: background-color 180ms ease, border-color 180ms ease,
    transform 120ms ease;
}

.menu-toggle:hover {
  background: var(--accent-soft);
  border-color: rgba(15, 118, 110, 0.4);
}

.menu-toggle:active {
  transform: scale(0.94);
}

.menu-toggle-icon {
  position: relative;
  width: 18px;
  height: 2px;
  border-radius: 999px;
  background: currentColor;
}

.menu-toggle-icon::before,
.menu-toggle-icon::after {
  content: "";
  position: absolute;
  left: 0;
  width: 18px;
  height: 2px;
  border-radius: 999px;
  background: currentColor;
}

.menu-toggle-icon::before {
  top: -6px;
}

.menu-toggle-icon::after {
  top: 6px;
}

.main-nav {
  position: absolute;
  left: 0;
  right: 0;
  top: calc(100% + 10px);
  z-index: 70;
  display: none;
  flex-direction: column;
  gap: 0.15rem;
  padding: 0.6rem;
  border: 1px solid var(--line-2);
  border-radius: var(--radius);
  background: #ffffff;
  backdrop-filter: blur(16px);
  box-shadow: var(--shadow);
  max-height: min(64vh, 440px);
  overflow: auto;
}

.site-header.menu-open .main-nav {
  display: flex;
}

.main-nav a {
  display: inline-flex;
  align-items: center;
  width: 100%;
  min-height: 46px;
  padding: 0.6rem 0.8rem;
  border-radius: 12px;
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--text-soft);
  line-height: 1;
  transition: background-color 180ms ease, color 180ms ease;
}

.main-nav a:hover,
.main-nav a:focus-visible {
  background: var(--accent-soft);
  color: var(--accent);
}

.search-icon-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  flex: 0 0 42px;
  padding: 0;
  line-height: 0;
  border: 1px solid var(--line-2);
  border-radius: 12px;
  background: rgba(27, 42, 47, 0.04);
  transition: background-color 180ms ease, border-color 180ms ease,
    transform 180ms ease;
}

.search-icon-link svg {
  width: 18px;
  height: 18px;
  fill: var(--text-soft);
  transition: fill 180ms ease;
}

.search-icon-link:hover,
.search-icon-link.active {
  background: var(--accent-soft);
  border-color: rgba(15, 118, 110, 0.4);
  transform: translateY(-1px);
}

.search-icon-link:hover svg,
.search-icon-link.active svg {
  fill: var(--accent);
}

.brand-row > .search-icon-link.search-quick {
  margin-left: 0;
}

/* ============ Page scaffold ============ */

main {
  padding-block: 1.3rem 3rem;
}

.category-main,
.article-main,
.search-main {
  padding-top: 0.4rem;
}

.section-title {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  margin: 1.3rem 0 1.05rem;
  font-family: var(--font-display);
  font-size: clamp(1.55rem, 4.8vw, 2.1rem);
  font-weight: 700;
  letter-spacing: -0.01em;
  line-height: 1.12;
  color: var(--text);
}

.section-title::before {
  content: "";
  flex: 0 0 10px;
  width: 10px;
  height: 10px;
  border-radius: 2px;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  transform: rotate(45deg);
}

.section-title::after {
  content: "";
  flex: 1;
  height: 1px;
  background: linear-gradient(90deg, var(--line-2), transparent);
}

.search-title {
  margin: 0.2rem 0 1rem;
}

/* ============ Masthead ============ */

.masthead {
  padding: 0.9rem 0 0.7rem;
}

.masthead-kicker {
  margin: 0 0 0.4rem;
  font-size: 0.6rem;
  font-weight: 800;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--accent);
}

.masthead-title {
  margin: 0;
  font-family: var(--font-display);
  font-size: clamp(1.6rem, 6.4vw, 2.6rem);
  font-weight: 700;
  line-height: 1.06;
  letter-spacing: -0.025em;
  background: linear-gradient(120deg, #1b2a2f 0%, #0f766e 90%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.masthead-lead {
  margin: 0.5rem 0 0;
  max-width: 62ch;
  font-size: 0.9rem;
  line-height: 1.55;
  color: var(--text-soft);
}

.masthead-stats {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.5rem 1.3rem;
  margin: 0.75rem 0 0;
  padding: 0.65rem 0 0;
  list-style: none;
  border-top: 1px solid var(--line);
}

.masthead-stats li {
  display: inline-flex;
  align-items: baseline;
  gap: 0.35rem;
}

.masthead-stats b {
  font-family: var(--font-display);
  font-size: 1.05rem;
  font-weight: 700;
  line-height: 1;
  color: var(--accent);
}

.masthead-stats span {
  font-size: 0.58rem;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--accent-2);
}

/* ============ Section head (title + action) ============ */

.section-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
  margin: 1.8rem 0 0.9rem;
}

.section-head .section-title {
  margin: 0;
  flex: 1;
  min-width: 0;
}

.section-more {
  flex: 0 0 auto;
  font-size: 0.7rem;
  font-weight: 800;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--accent);
  border-bottom: 1px solid rgba(15, 118, 110, 0.35);
  padding-bottom: 2px;
  transition: color 180ms ease, border-color 180ms ease;
}

.section-more:hover {
  color: var(--accent-2);
  border-color: var(--accent-2);
}

.section-more.is-static {
  color: var(--muted);
  border-color: transparent;
  cursor: default;
}

/* ============ Hero (full-bleed cinematic) ============ */

.hero-break {
  margin-top: 0.2rem;
}

.top-feature {
  display: block;
  width: 100%;
}

.hero-media {
  position: relative;
  display: block;
  width: 100%;
  aspect-ratio: 16 / 12;
  overflow: hidden;
  background: var(--bg-deep);
  isolation: isolate;
}

.hero-media::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  background: linear-gradient(
    to top,
    rgba(6, 9, 13, 0.97) 0%,
    rgba(6, 9, 13, 0.62) 34%,
    rgba(6, 9, 13, 0.1) 68%,
    rgba(6, 9, 13, 0) 100%
  );
  pointer-events: none;
}

.hero-slides {
  position: absolute;
  inset: 0;
}

.hero-slide {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0;
  transform: scale(1.015);
  pointer-events: none;
  transition: opacity 460ms ease, transform 460ms ease;
}

.hero-slide.is-active {
  opacity: 1;
  z-index: 1;
}

.hero-media:hover .hero-slide.is-active {
  transform: scale(1.05);
}

.hero-tag {
  position: absolute;
  left: 12px;
  top: 12px;
  z-index: 3;
  padding: 0.3rem 0.65rem;
  border-radius: 999px;
  font-size: 0.6rem;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent-ink);
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  box-shadow: 0 8px 24px rgba(15, 118, 110, 0.28);
}

.hero-arrow {
  position: absolute;
  z-index: 3;
  right: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border: 1px solid rgba(255, 255, 255, 0.38);
  border-radius: 999px;
  background: rgba(10, 14, 20, 0.5);
  backdrop-filter: blur(8px);
  color: transparent;
  font-size: 0;
  line-height: 0;
  cursor: pointer;
  transition: background-color 180ms ease, transform 180ms ease,
    border-color 180ms ease;
}

.hero-arrow::before {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -52%);
  color: #fff;
  font-size: 18px;
  line-height: 1;
}

.hero-arrow-left::before {
  content: "\2039";
}

.hero-arrow-right::before {
  content: "\203A";
}

.hero-arrow-left {
  top: calc(50% - 40px);
}

.hero-arrow-right {
  top: calc(50% + 6px);
}

.hero-media:hover .hero-arrow {
  background: rgba(10, 14, 20, 0.68);
  border-color: rgba(255, 255, 255, 0.5);
}

.hero-arrow:hover {
  transform: scale(1.08);
}

.hero-overlay {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 2;
  display: grid;
  gap: 0.35rem;
  padding: 0.9rem 1rem 2rem;
  color: #fff;
}

.hero-overlay strong {
  font-family: var(--font-display);
  font-size: clamp(1.3rem, 5.2vw, 1.7rem);
  font-weight: 700;
  line-height: 1.12;
  letter-spacing: -0.02em;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.hero-overlay small {
  display: none;
  font-size: 0.88rem;
  line-height: 1.5;
  color: rgba(255, 255, 255, 0.78);
}

.hero-overlay em {
  font-style: normal;
  font-size: 0.64rem;
  font-weight: 800;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--accent-2);
}

.hero-dots {
  position: absolute;
  z-index: 3;
  left: 1rem;
  bottom: 0.85rem;
  display: flex;
  gap: 6px;
}

.hero-dots i {
  width: 12px;
  height: 3px;
  border-radius: 2px;
  background: rgba(255, 255, 255, 0.35);
  cursor: pointer;
  transition: width 240ms ease, background-color 240ms ease;
}

.hero-dots i.active {
  width: 32px;
  background: var(--accent-2);
}

/* ============ Panels ============ */

.panel {
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: linear-gradient(180deg, #ffffff, #fdfaf5);
  box-shadow: var(--shadow);
  transition: border-color 250ms ease;
}

.panel:hover {
  border-color: var(--line-2);
}

/* ============ Briefs (numbered editorial rows) ============ */

.briefs {
  margin-top: 0.4rem;
}

.latest-list {
  display: flex;
  flex-direction: column;
  border-top: 1px solid var(--line);
}

.latest-item {
  position: relative;
  display: grid;
  grid-template-columns: auto 76px minmax(0, 1fr);
  align-items: center;
  column-gap: 0.9rem;
  padding: 1rem 0.1rem;
  border-bottom: 1px solid var(--line);
  transition: padding-left 220ms ease;
}

.latest-item:hover {
  padding-left: 0.5rem;
}

.latest-item::after {
  content: "→";
  position: absolute;
  right: 0.1rem;
  top: 50%;
  transform: translateY(-50%) translateX(-6px);
  font-size: 1.1rem;
  color: var(--accent);
  opacity: 0;
  transition: opacity 200ms ease, transform 200ms ease;
}

.latest-item:hover::after {
  opacity: 1;
  transform: translateY(-50%) translateX(0);
}

.brief-no {
  font-family: var(--font-display);
  font-size: 1.6rem;
  font-weight: 700;
  line-height: 1;
  font-variant-numeric: tabular-nums;
  color: rgba(27, 42, 47, 0.22);
  transition: color 200ms ease;
}

.latest-item:hover .brief-no {
  color: var(--accent);
}

.latest-item img {
  width: 76px;
  height: 76px;
  border-radius: 999px;
  object-fit: cover;
  background: var(--bg-deep);
  transition: transform 400ms ease;
}

.latest-item:hover img {
  transform: scale(1.06) rotate(-3deg);
}

.brief-body {
  display: grid;
  gap: 0.24rem;
  min-width: 0;
}

.latest-item .post-tag {
  font-size: 0.62rem;
  font-weight: 800;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--accent);
}

.latest-item strong {
  font-family: var(--font-display);
  font-size: 1.06rem;
  font-weight: 700;
  line-height: 1.28;
  letter-spacing: -0.005em;
  color: var(--text);
}

.latest-item .meta {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
}

/* ============ Mini rail (snap scroll) ============ */

.rail {
  margin-top: 0.4rem;
}

.mini-feature-strip {
  margin-top: 1.6rem;
  margin-bottom: 1.2rem;
}

.mini-cards {
  counter-reset: mc;
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: min(76%, 320px);
  gap: 0.9rem;
  padding: 0.25rem 0.15rem 0.9rem;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: thin;
  scrollbar-color: rgba(15, 118, 110, 0.35) transparent;
}

.mini-cards::-webkit-scrollbar {
  height: 6px;
}

.mini-cards::-webkit-scrollbar-track {
  background: transparent;
}

.mini-cards::-webkit-scrollbar-thumb {
  border-radius: 999px;
  background: rgba(15, 118, 110, 0.3);
}

.mini-card {
  position: relative;
  display: block;
  aspect-ratio: 3 / 4;
  scroll-snap-align: start;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--bg-deep);
  transition: transform 280ms ease, box-shadow 280ms ease,
    border-color 280ms ease;
}

.mini-card::before {
  counter-increment: mc;
  content: counter(mc, decimal-leading-zero);
  position: absolute;
  top: 0.55rem;
  right: 0.7rem;
  z-index: 2;
  font-family: var(--font-display);
  font-size: 1.6rem;
  font-weight: 700;
  color: rgba(255, 255, 255, 0.55);
  text-shadow: 0 2px 12px rgba(0, 0, 0, 0.7);
}

.mini-card::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to top,
    rgba(6, 9, 13, 0.95) 0%,
    rgba(6, 9, 13, 0.42) 46%,
    rgba(6, 9, 13, 0) 100%
  );
  pointer-events: none;
}

.mini-card:hover {
  transform: translateY(-5px);
  border-color: rgba(15, 118, 110, 0.4);
  box-shadow: 0 22px 44px rgba(27, 42, 47, 0.2);
}

.mini-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 520ms ease;
}

.mini-card:hover img {
  transform: scale(1.07);
}

.mini-overlay {
  position: absolute;
  left: 0.75rem;
  right: 0.75rem;
  bottom: 0.75rem;
  z-index: 2;
  display: grid;
  gap: 0.32rem;
}

.mini-tag {
  display: inline-flex;
  width: fit-content;
  padding: 0.2rem 0.55rem;
  border-radius: 999px;
  font-size: 0.62rem;
  font-weight: 800;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--accent-ink);
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
}

.mini-overlay strong {
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
  color: #fff;
  font-family: var(--font-display);
  font-size: 0.98rem;
  font-weight: 700;
  line-height: 1.26;
  letter-spacing: -0.005em;
}

/* ============ Cards (cinematic overlay) ============ */

.cards {
  display: grid;
  gap: 0.9rem;
}

.cards-2,
.cards-3,
.cards-4 {
  grid-template-columns: 1fr;
}

/* Bento mosaic: lead tile spans 2x2, others fill the gaps */

.bento {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  grid-auto-rows: minmax(150px, 44vw);
}

.bento .post-card {
  aspect-ratio: auto;
  height: 100%;
}

.bento .bento-lead {
  grid-column: span 2;
  grid-row: span 2;
}

.bento .bento-lead .post-content {
  padding: 4rem 1.15rem 1.15rem;
}

.bento .bento-lead .post-content h3 {
  font-size: 1.34rem;
  -webkit-line-clamp: 3;
}

.post-card {
  position: relative;
  display: block;
  aspect-ratio: 1 / 1.05;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--bg-deep);
  transition: transform 250ms ease, box-shadow 250ms ease,
    border-color 250ms ease;
}

.post-card.is-card-link {
  cursor: pointer;
}

.post-card.is-card-link:focus-visible {
  outline: 2px solid rgba(15, 118, 110, 0.6);
  outline-offset: 2px;
}

.post-card:hover {
  transform: translateY(-4px);
  border-color: rgba(15, 118, 110, 0.38);
  box-shadow: 0 24px 46px rgba(27, 42, 47, 0.22);
}

.post-card .media-wrap {
  position: absolute;
  inset: 0;
  aspect-ratio: auto;
  border-radius: 0;
  background: var(--bg-deep);
}

.post-card .media-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scale(1.005);
  transition: transform 520ms ease, filter 320ms ease, opacity 280ms ease;
}

.post-card:hover .media-wrap img,
.category-banner:hover img {
  transform: scale(1.06);
}

.post-card .post-content {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 2;
  display: grid;
  gap: 0.34rem;
  padding: 3.4rem 1rem 1rem;
  background: linear-gradient(
    to top,
    rgba(6, 9, 13, 0.97) 22%,
    rgba(6, 9, 13, 0.7) 58%,
    rgba(6, 9, 13, 0)
  );
}

.post-tag {
  color: var(--accent);
  font-size: 0.66rem;
  font-weight: 800;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

/* Tags inside image-overlay cards become bright chips for contrast */
.post-card .post-tag {
  width: fit-content;
  padding: 0.16rem 0.5rem;
  border-radius: 999px;
  font-size: 0.6rem;
  color: #fff;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  box-shadow: 0 6px 16px rgba(15, 118, 110, 0.3);
}

.post-content h3 {
  margin: 0;
  font-family: var(--font-display);
  font-size: 1.14rem;
  font-weight: 700;
  line-height: 1.28;
  letter-spacing: -0.005em;
  color: #fff;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.post-content p {
  margin: 0;
  color: rgba(255, 255, 255, 0.72);
  font-size: 0.86rem;
  line-height: 1.5;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.meta {
  color: var(--muted);
  font-size: 0.8rem;
}

.post-content .meta {
  margin-top: 0.1rem;
  color: rgba(255, 255, 255, 0.55);
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

/* ============ Category ============ */

.category-hero {
  margin-bottom: 1rem;
}

.category-banner-row {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.9rem;
}

.category-banner-row > .category-banner {
  min-width: 0;
}

.category-banner-row .category-banner {
  height: auto;
  min-height: 0;
}

.category-banner {
  position: relative;
  display: block;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--bg-deep);
  transition: transform 280ms ease, box-shadow 280ms ease,
    border-color 280ms ease;
}

.category-banner:hover {
  transform: translateY(-4px);
  border-color: rgba(15, 118, 110, 0.4);
  box-shadow: 0 26px 50px rgba(27, 42, 47, 0.22);
}

.category-banner::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to top,
    rgba(6, 9, 13, 0.96) 0%,
    rgba(6, 9, 13, 0.44) 44%,
    rgba(6, 9, 13, 0) 100%
  );
}

.category-banner img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.category-banner-overlay {
  position: absolute;
  left: 1rem;
  right: 1rem;
  bottom: 1rem;
  z-index: 2;
  display: grid;
  gap: 0.4rem;
  color: #fff;
}

.category-banner-overlay strong {
  display: block;
  font-family: var(--font-display);
  font-size: 1.45rem;
  font-weight: 700;
  line-height: 1.14;
  letter-spacing: -0.01em;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.category-banner-overlay em {
  font-style: normal;
  color: rgba(255, 255, 255, 0.78);
  font-size: 0.88rem;
  line-height: 1.45;
}

.category-image-overlay {
  top: 0.75rem;
  left: 0.75rem;
  right: auto;
  bottom: auto;
  z-index: 2;
}

/* ============ Article ============ */

.article-shell {
  overflow: clip;
}

.article-page {
  background: transparent;
}

.article-content-wrap {
  width: 100%;
  margin: 0 auto;
  padding: 1.25rem 1.1rem 1.7rem;
}

.article-breadcrumbs {
  display: flex;
  gap: 0.45rem;
  align-items: center;
  margin: 0 0 0.9rem;
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.article-breadcrumbs a:hover {
  color: var(--accent);
}

.article-title-main {
  margin: 0.35rem 0 0.6rem;
  font-family: var(--font-display);
  font-size: clamp(1.65rem, 5.6vw, 2.15rem);
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: -0.015em;
  color: var(--text);
}

.article-meta-line {
  margin: 0;
  color: var(--muted);
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.article-summary-main {
  margin: 1rem 0 1.1rem;
  padding-left: 0.9rem;
  border-left: 3px solid var(--accent);
  font-family: var(--font-display);
  font-size: 1.08rem;
  line-height: 1.6;
  font-style: italic;
  color: var(--text-soft);
}

.article-feature-image {
  margin: 0 0 1.2rem;
  overflow: hidden;
  border-radius: var(--radius);
  background: var(--bg-deep);
}

.article-feature-image img {
  width: 100%;
  height: auto;
  display: block;
}

.article-body-main {
  display: grid;
  gap: 0.8rem;
  counter-reset: sec;
}

.article-body-main h2 {
  display: flex;
  align-items: baseline;
  gap: 0.65rem;
  margin: 1rem 0 0.15rem;
  font-family: var(--font-display);
  font-size: 1.32rem;
  font-weight: 700;
  line-height: 1.3;
  color: var(--text);
}

.article-body-main h2::before {
  counter-increment: sec;
  content: counter(sec, decimal-leading-zero);
  flex: 0 0 auto;
  font-family: var(--font-body);
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.1em;
  color: var(--accent);
  transform: translateY(-2px);
}

.article-body-main h2::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--line);
  transform: translateY(-4px);
}

.article-body-main > p:first-of-type::first-letter {
  float: left;
  font-family: var(--font-display);
  font-size: 3.3em;
  line-height: 0.82;
  font-weight: 700;
  padding: 0.06em 0.14em 0 0;
  background: linear-gradient(180deg, var(--accent), var(--accent-2));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.article-body-main p {
  margin: 0;
  font-size: 1rem;
  line-height: 1.8;
  color: var(--text-soft);
}

.article-related-title {
  margin-top: 1.6rem;
}

/* ============ Search ============ */

.search-panel {
  padding: 1.15rem 1.05rem 1.3rem;
  margin-bottom: 1.1rem;
}

.search-input-wrap input {
  width: 100%;
  height: 56px;
  padding: 0 0.1rem;
  border: 0;
  border-bottom: 2px solid var(--line-2);
  border-radius: 0;
  background: transparent;
  color: var(--text);
  font-size: 1.05rem;
  outline: none;
  transition: border-color 200ms ease, box-shadow 200ms ease;
}

.search-input-wrap input::placeholder {
  color: var(--muted);
}

.search-input-wrap input:focus {
  border-bottom-color: var(--accent);
  box-shadow: 0 14px 30px -22px rgba(15, 118, 110, 0.75);
}

.search-count {
  margin: 0.75rem 0 0;
  color: var(--muted);
  font-size: 0.82rem;
  letter-spacing: 0.04em;
}

.search-empty {
  padding: 1.25rem;
  border: 1px dashed var(--line-2);
  border-radius: var(--radius);
  background: var(--surface-soft);
  color: var(--text-soft);
  font-size: 0.94rem;
}

/* ============ Footer ============ */

.site-footer {
  position: relative;
  margin-top: 2.2rem;
  padding: 2.6rem 0 1.6rem;
  border-top: 1px solid var(--line);
  background: linear-gradient(180deg, rgba(15, 118, 110, 0.05), transparent);
}

.site-footer::before {
  content: "";
  position: absolute;
  top: -1px;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg, var(--accent), var(--accent-2), transparent 88%);
}

.footer-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.7rem;
}

.footer-grid h4 {
  margin: 0 0 0.65rem;
  font-family: var(--font-body);
  font-size: 0.7rem;
  font-weight: 800;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--muted);
}

.footer-brand {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}

.footer-logo {
  width: 28px;
  height: 28px;
  display: block;
  border-radius: 7px;
}

.footer-brand span {
  font-family: var(--font-display);
  font-size: 1.55rem;
  font-weight: 700;
  background: linear-gradient(92deg, #1b2a2f 0%, #0f766e 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.footer-grid p,
.footer-grid li {
  margin: 0;
  color: var(--muted);
  font-size: 0.92rem;
  line-height: 1.65;
}

.footer-grid ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0.45rem;
}

.footer-grid a {
  color: var(--text-soft);
  transition: color 180ms ease;
}

.footer-grid a:hover {
  color: var(--accent);
}

.copyright {
  width: min(var(--container), calc(100% - 2rem));
  margin: 1.8rem auto 0;
  padding-top: 1.2rem;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 0.8rem;
  letter-spacing: 0.04em;
  text-align: center;
}

/* ============ Motion ============ */

@media (prefers-reduced-motion: no-preference) {
  .reveal-on-scroll {
    opacity: 0;
    transform: translateY(18px);
    transition: opacity 500ms ease, transform 500ms ease;
  }

  .reveal-on-scroll.in-view {
    opacity: 1;
    transform: translateY(0);
  }

  img.img-ready {
    animation: imageFadeIn 400ms ease;
  }
}

@keyframes imageFadeIn {
  from {
    opacity: 0.6;
    filter: saturate(0.9);
  }
  to {
    opacity: 1;
    filter: saturate(1);
  }
}

/* ============ Breakpoints (mobile-first) ============ */

@media (min-width: 640px) {
  .container {
    width: min(var(--container), calc(100% - 3rem));
  }

  .hero-media {
    aspect-ratio: 16 / 10;
  }

  .hero-overlay {
    gap: 0.45rem;
    padding: 1.3rem 1.35rem 2.4rem;
  }

  .hero-overlay strong {
    font-size: clamp(1.7rem, 4vw, 2.2rem);
  }

  .hero-overlay small {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
  }

  .hero-overlay em {
    font-size: 0.68rem;
  }

  .hero-arrow {
    width: 40px;
    height: 40px;
    right: 14px;
  }

  .hero-arrow::before {
    font-size: 21px;
  }

  .hero-arrow-left {
    top: calc(50% - 46px);
  }

  .hero-arrow-right {
    top: calc(50% + 8px);
  }

  .hero-tag {
    left: 16px;
    top: 16px;
    padding: 0.34rem 0.75rem;
    font-size: 0.66rem;
  }

  .hero-dots {
    left: 1.35rem;
    bottom: 1.1rem;
    gap: 7px;
  }

  .latest-item img {
    width: 84px;
    height: 84px;
  }

  .bento {
    grid-auto-rows: minmax(170px, 32vw);
  }

  .cards-2,
  .cards-3,
  .cards-4 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .post-card {
    aspect-ratio: 4 / 5;
  }

  .category-banner {
    aspect-ratio: 16 / 9;
  }

  .article-content-wrap {
    width: min(760px, 100%);
    padding: 1.6rem 0 2rem;
  }
}

@media (min-width: 861px) {
  body {
    background-attachment: fixed;
  }

  .container {
    width: min(var(--container), calc(100% - 4rem));
  }

  .brand-row {
    min-height: 74px;
    flex-wrap: nowrap;
  }

  .brand-logo {
    height: 36px;
  }

  .menu-toggle {
    display: none;
  }

  .main-nav {
    position: static;
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 0.15rem;
    padding: 0;
    border: 0;
    background: none;
    box-shadow: none;
    max-height: none;
    overflow: visible;
  }

  .main-nav a {
    position: relative;
    width: auto;
    min-height: 0;
    padding: 0.5rem 0.8rem;
    border-radius: 999px;
    font-size: 0.76rem;
    font-weight: 800;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    color: var(--text-soft);
  }

  .main-nav a::after {
    content: "";
    position: absolute;
    left: 0.8rem;
    right: 0.8rem;
    bottom: 0.1rem;
    height: 2px;
    border-radius: 2px;
    background: var(--accent);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 220ms ease;
  }

  .main-nav a:hover,
  .main-nav a:focus-visible {
    background: transparent;
    color: var(--text);
  }

  .main-nav a:hover::after,
  .main-nav a:focus-visible::after {
    transform: scaleX(1);
  }

  .search-icon-link {
    width: 38px;
    height: 38px;
    flex: 0 0 38px;
    border-radius: 999px;
    border-color: transparent;
    background: transparent;
  }

  main {
    padding-block: 1.8rem 3.4rem;
  }

  .hero-break {
    margin-top: 0.3rem;
  }

  .hero-media {
    aspect-ratio: 21 / 10;
  }

  .hero-overlay {
    gap: 0.5rem;
    padding: 1.6rem 2rem 2.6rem;
  }

  .hero-overlay strong {
    -webkit-line-clamp: 2;
    font-size: clamp(1.9rem, 2.6vw, 2.7rem);
  }

  .hero-overlay small {
    -webkit-line-clamp: unset;
    max-width: 62ch;
  }

  .hero-arrow-left {
    top: calc(50% - 48px);
  }

  .hero-arrow-right {
    top: calc(50% + 8px);
  }

  .hero-dots {
    left: 2rem;
    bottom: 1.2rem;
  }

  .latest-list {
    display: grid;
    grid-template-columns: 1fr 1fr;
    column-gap: 1.2rem;
    padding-bottom: 0.5rem;
  }

  .latest-item:nth-last-child(-n + 2) {
    border-bottom: 0;
  }

  .latest-item strong {
    font-size: 1.08rem;
  }

  .mini-cards {
    grid-auto-flow: row;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    grid-auto-columns: auto;
    overflow-x: visible;
    padding: 0.25rem 0;
  }

  .cards-3 {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .cards-4 {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  .bento {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    grid-auto-rows: minmax(180px, 15vw);
  }

  .bento .bento-lead {
    grid-column: span 2;
    grid-row: span 2;
  }

  .post-card {
    aspect-ratio: 4 / 5.1;
  }

  .post-card.featured {
    grid-column: span 2;
  }

  .category-banner-row {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1rem;
  }

  .category-banner {
    aspect-ratio: 16 / 11;
  }

  .category-banner-overlay strong {
    font-size: 1.75rem;
  }

  .article-content-wrap {
    width: min(780px, 100%);
    padding: 2rem 0 2.4rem;
  }

  .footer-grid {
    grid-template-columns: 1.6fr 1fr 1fr;
    gap: 2rem;
  }
}

@media (min-width: 1200px) {
  .container {
    width: min(var(--container), calc(100% - 6rem));
  }

  .hero-media {
    aspect-ratio: 21 / 9;
  }

  .post-card {
    aspect-ratio: 3 / 3.9;
  }

  .bento {
    grid-auto-rows: minmax(200px, 13vw);
  }
}
