@import url('https://fonts.googleapis.com/css2?family=Noto+Sans+TC:wght@300;400;500;700&family=Noto+Serif+TC:wght@400;500;600;700&display=swap');

/* ============================================================
   CSS 变量
   ============================================================ */
:root {
  --mint: #b4fde1;
  --blue: #add8e6;
  --ink: #172620;
  --ink-80: rgba(23,38,32,0.8);
  --ink-40: rgba(23,38,32,0.4);
  --ink-10: rgba(23,38,32,0.1);
  --mint-deep: #7eecbe;
  --blue-deep: #7bbdd4;
  --surface: #1e322a;
  --surface-2: #243d30;
  --surface-3: #2a4838;
  --text-main: #e8faf3;
  --text-sub: #a8d4be;
  --text-muted: #6b9e85;
  --border-mint: 3px solid var(--mint);
  --border-blue: 3px solid var(--blue);
  --radius-lg: 24px;
  --radius-md: 16px;
  --radius-sm: 10px;
  --shadow-clay: 4px 4px 12px rgba(0,0,0,0.45), inset -2px -2px 8px rgba(0,0,0,0.25);
  --shadow-clay-sm: 3px 3px 8px rgba(0,0,0,0.35), inset -1px -1px 5px rgba(0,0,0,0.2);
  --shadow-mint: 0 0 0 2px var(--mint), 4px 4px 12px rgba(0,0,0,0.4);
  --font-serif: 'Noto Serif TC', 'Georgia', serif;
  --font-sans: 'Noto Sans TC', 'PingFang TC', 'Microsoft JhengHei', sans-serif;
  --nav-h: 110px;
}

/* ============================================================
   全局重置
   ============================================================ */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html {
  scroll-behavior: smooth;
  font-size: 17px;
  background: var(--ink);
  color: var(--text-main);
  scroll-padding-top: calc(var(--nav-h) + 16px);
}

body {
  font-family: var(--font-serif);
  line-height: 1.75;
  background: var(--ink);
  overflow-x: hidden;
}

.sr-only {
  position: absolute;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0,0,0,0);
  white-space: nowrap; border: 0;
}

img { max-width: 100%; height: auto; display: block; }
a { color: var(--mint); text-decoration: none; transition: color 0.2s; }
a:hover { color: var(--mint-deep); }
ul { list-style: none; }

/* ============================================================
   页面整体包裹
   ============================================================ */
.page-wrapper {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

/* ============================================================
   导航（aside > nav > ul > li > a，两行，顶部吸顶）
   ============================================================ */
.site-aside-nav {
  position: sticky;
  top: 0;
  z-index: 100;
  background: linear-gradient(135deg, var(--surface) 0%, var(--surface-2) 100%);
  border-bottom: var(--border-mint);
  box-shadow: var(--shadow-clay);
}

.brand-row {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 12px 32px 8px;
  border-bottom: 2px solid var(--ink-10);
  flex-wrap: wrap;
}

.brand-logo-link {
  display: flex;
  align-items: center;
}

.brand-logo {
  height: 40px;
  width: auto;
  border-radius: var(--radius-sm);
}

.brand-text {
  font-family: var(--font-serif);
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--mint);
  text-shadow: 0 2px 8px rgba(180,253,225,0.3);
  letter-spacing: 0.05em;
  min-height: 44px;
  display: flex;
  align-items: center;
  padding: 0 8px;
}

.brand-tagline {
  font-size: 0.82rem;
  color: var(--text-sub);
  font-family: var(--font-sans);
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.nav-search {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-left: auto;
}

.search-input {
  background: var(--surface-3);
  border: var(--border-blue);
  border-radius: var(--radius-md);
  color: var(--text-main);
  font-family: var(--font-sans);
  font-size: 0.9rem;
  padding: 8px 14px;
  width: 180px;
  outline: none;
  box-shadow: var(--shadow-clay-sm);
  transition: border-color 0.2s, box-shadow 0.2s;
}

.search-input:focus {
  border-color: var(--mint);
  box-shadow: var(--shadow-mint);
}

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

.search-btn {
  background: linear-gradient(135deg, var(--mint) 0%, var(--blue) 100%);
  border: none;
  border-radius: var(--radius-sm);
  cursor: pointer;
  font-size: 1rem;
  padding: 8px 12px;
  min-height: 40px;
  min-width: 40px;
  box-shadow: var(--shadow-clay-sm);
  transition: transform 0.2s ease-out, box-shadow 0.2s;
  display: flex;
  align-items: center;
  justify-content: center;
}

.search-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(0,0,0,0.4);
}

.search-btn:active {
  transform: translateY(1px);
  box-shadow: var(--shadow-clay-sm);
}

.site-aside-nav nav {
  padding: 0 32px;
}

.site-aside-nav nav ul {
  display: flex;
  align-items: center;
  gap: 4px;
  overflow-x: auto;
  scrollbar-width: none;
}

.site-aside-nav nav ul::-webkit-scrollbar { display: none; }

.site-aside-nav nav ul li a {
  display: flex;
  align-items: center;
  padding: 10px 16px;
  min-height: 44px;
  font-family: var(--font-sans);
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text-sub);
  border-radius: var(--radius-sm);
  white-space: nowrap;
  border: 2px solid transparent;
  transition: all 0.2s ease-out;
}

.site-aside-nav nav ul li a:hover {
  color: var(--mint);
  background: var(--surface-3);
  border-color: var(--mint);
  box-shadow: var(--shadow-clay-sm);
  transform: translateY(-1px);
}

/* ============================================================
   主体
   ============================================================ */
.site-main {
  flex: 1;
}

/* ============================================================
   Hero Section
   ============================================================ */
.hero-section {
  min-height: 45vh;
  display: grid;
  grid-template-columns: 1fr 280px;
  gap: 24px;
  padding: 48px 32px 40px;
  background: linear-gradient(160deg, var(--surface-2) 0%, var(--ink) 60%);
  position: relative;
  overflow: hidden;
}

.hero-section::before {
  content: '';
  position: absolute;
  top: -80px; right: -80px;
  width: 320px; height: 320px;
  background: radial-gradient(circle, rgba(180,253,225,0.12) 0%, transparent 70%);
  border-radius: 50%;
  pointer-events: none;
}

.hero-figure {
  display: grid;
  grid-template-rows: auto 1fr;
  gap: 24px;
  align-content: center;
}

.hero-text-block {
  display: flex;
  flex-direction: column;
  gap: 16px;
  align-items: flex-start;
}

.hero-badges {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.badge {
  display: inline-flex;
  align-items: center;
  padding: 4px 14px;
  border-radius: 999px;
  font-size: 0.78rem;
  font-family: var(--font-sans);
  font-weight: 700;
  letter-spacing: 0.06em;
  box-shadow: var(--shadow-clay-sm);
}

.badge-mint {
  background: linear-gradient(135deg, var(--mint) 0%, var(--mint-deep) 100%);
  color: var(--ink);
  border: 2px solid var(--mint-deep);
}

.badge-blue {
  background: linear-gradient(135deg, var(--blue) 0%, var(--blue-deep) 100%);
  color: var(--ink);
  border: 2px solid var(--blue-deep);
}

.hero-h1 {
  font-family: var(--font-serif);
  font-size: clamp(1.8rem, 4vw, 3rem);
  font-weight: 700;
  color: var(--text-main);
  line-height: 1.3;
  letter-spacing: 0.02em;
  text-shadow: 0 2px 16px rgba(180,253,225,0.15);
}

.hero-sub {
  font-size: 1rem;
  color: var(--text-sub);
  max-width: 540px;
  line-height: 1.7;
  font-family: var(--font-sans);
}

.hero-cta {
  display: inline-flex;
  align-items: center;
  padding: 12px 28px;
  min-height: 48px;
  background: linear-gradient(135deg, var(--mint) 0%, var(--blue) 100%);
  color: var(--ink);
  font-family: var(--font-sans);
  font-weight: 700;
  font-size: 0.95rem;
  border-radius: var(--radius-md);
  border: 3px solid var(--mint-deep);
  box-shadow: var(--shadow-clay);
  transition: transform 0.2s cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow 0.2s;
}

.hero-cta:hover {
  color: var(--ink);
  transform: translateY(-3px) scale(1.03);
  box-shadow: 0 8px 24px rgba(0,0,0,0.5), inset -2px -2px 8px rgba(0,0,0,0.2);
}

.hero-img-wrap {
  display: flex;
  align-items: center;
  justify-content: center;
}

.hero-img-wrap .hero-img {
  border-radius: var(--radius-lg);
  border: var(--border-mint);
  box-shadow: var(--shadow-clay);
  max-height: 260px;
  width: 100%;
  object-fit: cover;
}

.hero-img-placeholder {
  min-height: 160px;
  width: 100%;
  background: linear-gradient(135deg, var(--surface-3) 0%, var(--surface-2) 100%);
  border-radius: var(--radius-lg);
  border: var(--border-mint);
  box-shadow: var(--shadow-clay);
}

/* Hero aside */
.hero-aside {
  display: flex;
  flex-direction: column;
  gap: 16px;
  align-items: flex-start;
}

/* ============================================================
   通用 Aside 卡片
   ============================================================ */
.aside-card {
  background: linear-gradient(135deg, var(--surface-2) 0%, var(--surface-3) 100%);
  border: var(--border-blue);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-clay);
  padding: 20px;
  width: 100%;
}

.aside-card-title {
  font-family: var(--font-serif);
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--blue);
  letter-spacing: 0.08em;
  margin-bottom: 12px;
  padding-bottom: 8px;
  border-bottom: 2px solid var(--ink-10);
}

.aside-nav-list li {
  margin-bottom: 4px;
}

.aside-nav-list li a {
  display: flex;
  align-items: center;
  padding: 8px 10px;
  min-height: 40px;
  font-family: var(--font-sans);
  font-size: 0.87rem;
  color: var(--text-sub);
  border-radius: var(--radius-sm);
  border: 2px solid transparent;
  transition: all 0.2s ease-out;
}

.aside-nav-list li a::before {
  content: '◆';
  font-size: 0.55rem;
  color: var(--mint);
  margin-right: 8px;
  flex-shrink: 0;
}

.aside-nav-list li a:hover {
  color: var(--mint);
  background: var(--surface-3);
  border-color: var(--mint);
  transform: translateX(3px);
}

/* ============================================================
   正文容器（main > article > figure/aside 交错）
   ============================================================ */
.content-section {
  display: grid;
  grid-template-columns: 1fr 260px;
  grid-template-rows: auto 1fr;
  gap: 24px;
  padding: 48px 32px 56px;
  position: relative;
}

.content-deco-figure {
  grid-column: 1 / -1;
  display: flex;
  gap: 12px;
  height: 0;
  overflow: visible;
  pointer-events: none;
}

.deco-bubble {
  display: block;
  border-radius: 50%;
  opacity: 0.12;
}

.deco-bubble-1 {
  width: 180px;
  height: 180px;
  background: radial-gradient(circle, var(--mint) 0%, transparent 70%);
  transform: translate(-40px, -60px);
}

.deco-bubble-2 {
  width: 120px;
  height: 120px;
  background: radial-gradient(circle, var(--blue) 0%, transparent 70%);
  transform: translate(60px, -30px);
}

.content-body {
  grid-column: 1;
  grid-row: 2;
  min-width: 0;
}

.content-aside {
  grid-column: 2;
  grid-row: 2;
  position: sticky;
  top: calc(var(--nav-h) + 16px);
  align-self: start;
}

/* ============================================================
   page.content 内部样式（S3 生成的 7 个 article）
   ============================================================ */
.content-body article {
  margin-bottom: 56px;
  padding: 36px 40px;
  background: linear-gradient(135deg, var(--surface) 0%, var(--surface-2) 100%);
  border-radius: var(--radius-lg);
  border: var(--border-mint);
  box-shadow: var(--shadow-clay);
  scroll-margin-top: calc(var(--nav-h) + 16px);
  position: relative;
  overflow: hidden;
  opacity: 0;
  transform: translateY(32px);
  transition: opacity 0.55s ease-out, transform 0.55s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.content-body article.is-visible {
  opacity: 1;
  transform: translateY(0);
}

.content-body article::before {
  content: '';
  position: absolute;
  top: 0; left: 0;
  width: 6px; height: 100%;
  background: linear-gradient(180deg, var(--mint) 0%, var(--blue) 100%);
  border-radius: var(--radius-lg) 0 0 var(--radius-lg);
}

.content-body h2 {
  font-family: var(--font-serif);
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--text-main);
  margin-bottom: 20px;
  padding-bottom: 12px;
  border-bottom: 2px solid var(--ink-10);
  letter-spacing: 0.03em;
  line-height: 1.4;
}

.content-body h2 > span {
  display: inline;
  background: linear-gradient(90deg, var(--mint), var(--blue));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.content-body h3 {
  font-family: var(--font-serif);
  font-size: 1.15rem;
  font-weight: 600;
  color: var(--mint);
  margin: 24px 0 12px;
  letter-spacing: 0.02em;
}

.content-body h3 > span {
  display: inline;
}

.content-body p {
  color: var(--text-sub);
  font-size: 1rem;
  line-height: 1.85;
  margin-bottom: 16px;
  font-family: var(--font-sans);
}

.content-body ul,
.content-body ol {
  padding-left: 24px;
  margin-bottom: 16px;
}

.content-body ul { list-style: disc; }
.content-body ol { list-style: decimal; }

.content-body li {
  color: var(--text-sub);
  font-family: var(--font-sans);
  font-size: 0.97rem;
  line-height: 1.75;
  margin-bottom: 6px;
}

.content-body strong {
  color: var(--text-main);
  font-weight: 700;
}

.content-body a {
  color: var(--mint);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.content-body a:hover {
  color: var(--mint-deep);
}

.content-body blockquote {
  border-left: 4px solid var(--mint);
  padding: 12px 20px;
  margin: 20px 0;
  background: var(--surface-3);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  color: var(--text-sub);
  font-style: italic;
}

.content-body table {
  width: 100%;
  border-collapse: collapse;
  margin: 20px 0;
  font-family: var(--font-sans);
  font-size: 0.92rem;
}

.content-body th {
  background: var(--surface-3);
  color: var(--mint);
  padding: 10px 16px;
  text-align: left;
  border-bottom: 2px solid var(--mint);
  font-weight: 700;
}

.content-body td {
  padding: 10px 16px;
  border-bottom: 1px solid var(--ink-10);
  color: var(--text-sub);
}

.content-body tr:nth-child(even) td {
  background: var(--surface-3);
}

/* ============================================================
   页脚（footer > article×n）
   ============================================================ */
.site-footer {
  background: linear-gradient(160deg, var(--surface-2) 0%, var(--ink) 100%);
  border-top: var(--border-mint);
  box-shadow: 0 -4px 24px rgba(0,0,0,0.4);
}

.footer-brand-section {
  padding: 48px 32px 32px;
  text-align: center;
  border-bottom: 2px solid var(--ink-10);
}

.footer-super-brand {
  font-family: var(--font-serif);
  font-size: clamp(2.4rem, 6vw, 4.5rem);
  font-weight: 700;
  letter-spacing: 0.06em;
  line-height: 1.1;
  background: linear-gradient(135deg, var(--mint) 0%, var(--blue) 50%, var(--mint-deep) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  text-shadow: none;
  margin-bottom: 12px;
}

.footer-brand-desc {
  font-family: var(--font-sans);
  font-size: 0.95rem;
  color: var(--text-sub);
  max-width: 500px;
  margin: 0 auto;
  line-height: 1.6;
}

.footer-links-section {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 32px;
  padding: 36px 32px;
  border-bottom: 2px solid var(--ink-10);
}

.footer-col-title {
  font-family: var(--font-serif);
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--mint);
  letter-spacing: 0.1em;
  margin-bottom: 14px;
  padding-bottom: 8px;
  border-bottom: 2px solid var(--ink-10);
}

.footer-col ul li {
  margin-bottom: 6px;
}

.footer-col ul li a {
  font-family: var(--font-sans);
  font-size: 0.88rem;
  color: var(--text-muted);
  display: inline-flex;
  align-items: center;
  min-height: 40px;
  padding: 4px 0;
  transition: color 0.2s;
}

.footer-col ul li a:hover {
  color: var(--mint);
}

.footer-contact-item {
  display: block;
  font-family: var(--font-sans);
  font-size: 0.88rem;
  color: var(--text-muted);
  margin-bottom: 8px;
  line-height: 1.6;
}

.footer-about-text {
  font-family: var(--font-sans);
  font-size: 0.87rem;
  color: var(--text-muted);
  line-height: 1.7;
}

.footer-bottom-section {
  padding: 20px 32px;
  text-align: center;
}

.footer-copyright {
  font-family: var(--font-sans);
  font-size: 0.82rem;
  color: var(--text-muted);
  line-height: 1.6;
}

/* ============================================================
   Scroll Reveal 动效
   ============================================================ */
.reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.5s ease-out, transform 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

@media (prefers-reduced-motion: reduce) {
  .reveal,
  .content-body article {
    opacity: 1 !important;
    transform: none !important;
    transition: none !important;
  }
  html {
    scroll-behavior: auto;
  }
  .hero-cta,
  .search-btn,
  .site-aside-nav nav ul li a,
  .aside-nav-list li a {
    transition: none;
  }
}

/* ============================================================
   响应式
   ============================================================ */
@media (max-width: 900px) {
  .hero-section {
    grid-template-columns: 1fr;
    padding: 32px 20px;
    min-height: auto;
  }

  .hero-aside { display: none; }

  .content-section {
    grid-template-columns: 1fr;
    padding: 32px 20px 40px;
  }

  .content-aside { display: none; }

  .content-deco-figure { display: none; }

  .footer-links-section {
    grid-template-columns: 1fr;
    gap: 24px;
    padding: 28px 20px;
  }
}

@media (max-width: 640px) {
  :root { --nav-h: 130px; }

  .brand-row {
    padding: 10px 16px 8px;
    gap: 10px;
  }

  .brand-tagline { display: none; }

  .search-input { width: 130px; }

  .site-aside-nav nav {
    padding: 0 12px;
  }

  .site-aside-nav nav ul li a {
    padding: 8px 10px;
    font-size: 0.82rem;
  }

  .hero-section {
    padding: 24px 16px 28px;
  }

  .hero-h1 {
    font-size: 1.55rem;
  }

  .content-body article {
    padding: 24px 20px;
    margin-bottom: 28px;
  }

  .content-body h2 {
    font-size: 1.2rem;
  }

  .footer-brand-section {
    padding: 32px 16px 24px;
  }

  .footer-super-brand {
    font-size: 2rem;
  }

  .footer-links-section {
    padding: 24px 16px;
  }

  .footer-bottom-section {
    padding: 16px;
  }
}

/* ============================================================
   自动轮播 —— Hero 徽章浮动动画
   ============================================================ */
@keyframes badge-float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-5px); }
}

.badge-mint {
  animation: badge-float 3s ease-in-out infinite;
}

.badge-blue {
  animation: badge-float 3s ease-in-out 1.5s infinite;
}

@media (prefers-reduced-motion: reduce) {
  .badge-mint, .badge-blue {
    animation: none;
  }
}

button[aria-expanded]{min-width:44px;min-height:44px}
