/* 寶島動漫櫥窗 */
:root {
  --bg: #0c0e14;
  --bg-elevated: #12151f;
  --card: #161a26;
  --text: #eceef4;
  --muted: #8e94a8;
  --accent: #6e9eff;
  --accent-dim: #4a6db8;
  --border: #252a38;
  --glow: rgba(110, 158, 255, 0.12);
  --radius: 10px;
  --font: "Noto Sans TC", "Microsoft JhengHei", "PingFang TC", system-ui, sans-serif;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font);
  background: var(--bg);
  background-image:
    radial-gradient(ellipse 100% 60% at 50% -20%, var(--glow), transparent 55%),
    linear-gradient(180deg, #0e1119 0%, var(--bg) 32%);
  color: var(--text);
  line-height: 1.65;
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  padding: 0;
}

a {
  color: var(--accent);
  text-decoration: none;
  transition: color 0.15s ease, opacity 0.15s ease;
}
a:hover {
  color: #9bb8ff;
  text-decoration: none;
}

.content {
  flex: 1;
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 1.25rem 3rem;
  width: 100%;
}

/* header */
.site-header {
  position: relative;
  z-index: 10;
  border-bottom: 1px solid var(--border);
  background: linear-gradient(180deg, rgba(15, 18, 28, 0.97) 0%, rgba(12, 14, 20, 0.92) 100%);
  backdrop-filter: blur(8px);
  padding: 1rem 0 0.75rem;
  margin-bottom: 0;
}

.site-header__inner {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 1.25rem;
}

.site-header h1 {
  margin: 0;
  font-size: clamp(1.15rem, 2.5vw, 1.4rem);
  font-weight: 600;
  letter-spacing: 0.02em;
}
.site-header h1 a {
  color: var(--text);
}
.site-header h1 a:hover {
  color: var(--accent);
}

.muted {
  color: var(--muted);
  font-size: 0.88rem;
}

nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem 0.65rem;
  align-items: center;
  margin-top: 0.75rem;
  padding-top: 0.65rem;
  border-top: 1px solid var(--border);
}
nav a {
  font-size: 0.82rem;
  padding: 0.2rem 0;
  color: #b4bad0;
}
nav a:hover {
  color: var(--accent);
}

.crumbs {
  margin: 0.5rem 0 0;
  font-size: 0.8rem;
}

/* home hero */
.home-hero {
  position: relative;
  min-height: min(38vh, 360px);
  display: flex;
  align-items: flex-end;
  margin: 0 0 2.25rem;
  border-radius: 0 0 var(--radius) var(--radius);
  overflow: hidden;
  background: var(--card) center/cover no-repeat;
  background-image: linear-gradient(135deg, #1a1f2e 0%, #0f1219 100%);
}

.home-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(
    180deg,
    rgba(8, 10, 16, 0.35) 0%,
    rgba(8, 10, 16, 0.75) 100%
  );
  z-index: 0;
}

.home-hero__inner {
  position: relative;
  z-index: 1;
  padding: 2.5rem 1.5rem 2rem;
  max-width: 1100px;
  margin: 0 auto;
  width: 100%;
}
.home-hero h2 {
  margin: 0 0 0.5rem;
  font-size: clamp(1.5rem, 3.2vw, 1.9rem);
  font-weight: 700;
  letter-spacing: 0.04em;
  text-shadow: 0 2px 20px rgba(0, 0, 0, 0.5);
}
.home-hero p.lead {
  margin: 0;
  max-width: 40rem;
  color: #c4c9d6;
  font-size: 0.98rem;
  line-height: 1.7;
}

/* category grid */
.cat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 1rem;
  margin: 0 0 2.5rem;
  list-style: none;
  padding: 0;
}

.cat-grid li {
  margin: 0;
  padding: 0;
  background: none;
  border: none;
}
.cat-card {
  display: block;
  position: relative;
  height: 140px;
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--border);
  background: var(--card) center/cover no-repeat;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.35);
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s;
}
.cat-card::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(10, 12, 20, 0.15) 0%, rgba(10, 12, 20, 0.88) 100%);
  z-index: 0;
  transition: opacity 0.2s;
}
.cat-card:hover {
  transform: translateY(-3px);
  border-color: var(--accent-dim);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.45);
}
.cat-card__text {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 1;
  padding: 0.9rem 1rem;
  color: #fff;
  font-size: 0.95rem;
  font-weight: 600;
  letter-spacing: 0.02em;
}
.cat-card__sub {
  display: block;
  margin-top: 0.2rem;
  font-size: 0.75rem;
  font-weight: 400;
  color: rgba(255, 255, 255, 0.8);
  line-height: 1.35;
}

/* lists & articles */
h2 {
  font-size: 1.1rem;
  font-weight: 600;
  margin: 0 0 0.9rem;
  color: #dfe3ed;
  letter-spacing: 0.03em;
}
article h1 {
  font-size: 1.45rem;
  font-weight: 600;
  margin: 0 0 0.5rem;
  line-height: 1.35;
  letter-spacing: 0.02em;
}
article p {
  margin: 0.85rem 0;
}

ul.list {
  list-style: none;
  padding: 0;
  margin: 0;
}
ul.list li {
  background: var(--card);
  border: 1px solid var(--border);
  margin-bottom: 0.5rem;
  padding: 0.85rem 1rem;
  border-radius: var(--radius);
  transition: background 0.15s, border-color 0.15s;
}
ul.list li:hover {
  background: #1a1f2c;
  border-color: #323848;
}
ul.list a {
  display: block;
  color: #e2e5ee;
}
ul.list a:hover {
  color: #fff;
}

.pager {
  margin-top: 1.75rem;
}
.pager a {
  margin-right: 0.75rem;
  font-size: 0.92rem;
}

/* post cover (article) */
.post-cover,
.cat-banner,
.tag-banner {
  margin: 0 0 1.25rem;
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--border);
  background: var(--bg-elevated);
}
.post-cover img,
.cat-banner img,
.tag-banner img {
  display: block;
  width: 100%;
  max-height: 300px;
  object-fit: cover;
}

.post-cover + h1 {
  margin-top: 0.75rem;
}

.cat-banner,
.tag-banner {
  max-height: 200px;
}
.cat-banner img,
.tag-banner img {
  max-height: 200px;
}

/* footer */
footer {
  margin-top: auto;
  border-top: 1px solid var(--border);
  padding: 1.25rem 1.5rem 2rem;
  color: var(--muted);
  font-size: 0.8rem;
  line-height: 1.5;
  text-align: center;
  background: rgba(0, 0, 0, 0.2);
}

article ul:not(.list) {
  padding-left: 1.25rem;
  margin: 0.5rem 0 1rem;
}
code {
  font-family: ui-monospace, "Cascadia Code", Consolas, monospace;
  background: #252a38;
  padding: 0.12em 0.4em;
  border-radius: 4px;
  font-size: 0.86em;
}

/* section spacing in home */
section.home-hero {
  max-width: 1100px;
  margin-left: auto;
  margin-right: auto;
}

section.home-hero {
  width: 100%;
}

@media (min-width: 900px) {
  .content > article .home-hero,
  .home-hero {
    border-radius: var(--radius);
    margin-top: 1.25rem;
  }
  .content {
    padding-top: 0.5rem;
  }
}

@media (max-width: 600px) {
  nav a {
    font-size: 0.78rem;
  }
  .cat-grid {
    grid-template-columns: 1fr;
  }
  .cat-card {
    height: 120px;
  }
}
