:root {
  --card-w: 980px;
  --gap: 16px;
  --radius: 16px;
  --shadow: 0 10px 24px rgba(0,0,0,.08);
  --brand: #111;
  --muted: #666;
  --bg: #f6f7fb;
}

html, body { height: 100% }
body {
  margin: 0;
  background: var(--bg);
  color: #111;
  -webkit-font-smoothing: antialiased;
}

/* 頁首 */
.site-header {
  position: fixed; /* 一開始就固定 */
  top: 0;
  left: 0;
  width: 100%;
  z-index: 1000;
  background: #fff;
  box-shadow: 0 1px 0 rgba(0,0,0,.06);
}

/* 預留空間避免內容被覆蓋 */
body {
  padding-top: 70px; /* 視導覽列高度可調整 */
}

/* 內層容器 */
.site-header .inner {
  max-width: var(--card-w);
  margin: 0 auto;
  padding: 12px 16px;
  display: flex;
  align-items: center;
  gap: 12px;
}


/* 只讓最外層主選單橫排，不把 flex 傳給子層 ul */
.site-header nav > ul{
  display: flex;
  gap: 32px;
  align-items: center;
}

/* 子清單（第二層 ul）回到 block 直向排列，不要繼承 flex */
.site-header nav ul ul{
  display: block !important;
  gap: 0 !important;
}

.brand{
  width: 240px; height: 64px; margin: 0;
  background: url("./img/logo.png") no-repeat left center / contain;
  color: transparent;
}
.brand__text{ position: absolute; left: -10000px; }
body{ padding-top: var(--header-h); } /* 預留固定導覽列的高度 */

/* Logo 圖片 */
.brand img {
  height: 40px;
  width: auto;
}

/* 隱藏文字但保留可讀性（SEO / 輔助工具） */
.brand span {
  position: absolute;
  left: -9999px;
}

/* 導覽列按鈕 */
.nav {
  margin-left: auto;
  display: flex;
  gap: 12px;
}
.nav a {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  border-radius: 999px;
  text-decoration: none;
  color: #111;
  background: #f2f2f2;
  font-weight: 700;
}
.nav a.is-active {
  background: #111;
  color: #fff;
}

/* 內容容器 */
.wrap { max-width: var(--card-w); margin: 18px auto; padding: 0 16px 24px }

/* 頭像 + 基本資料卡 */
.hero {
  background: #fff;
  border-radius: var(--radius);
  padding: 20px;
  box-shadow: var(--shadow);
  display: grid;
  grid-template-columns: 120px 1fr;
  gap: 16px;
  align-items: center;
}
.avatar {
  width: 120px;
  height: 120px;
  border-radius: 50%;
  object-fit: cover;
  background: #eee;
  display: block;
  border: 1px solid #ddd;
}
.person { display: flex; flex-direction: column; gap: 6px }
.person .name { font-size: 24px; font-weight: 900; line-height: 1.1 }
.person .title { color: var(--muted); font-weight: 700 }
.tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 6px;
}
.tag {
  padding: 6px 10px;
  border-radius: 999px;
  background: #f3f4f6;
  font-size: 13px;
  font-weight: 700;
  color: #333;
  border: 1px solid #eee;
}

/* 快速動作 */
.actions {
  margin-top: 14px;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  text-decoration: none;
  padding: 10px 14px;
  border-radius: 10px;
  background: #111;
  color: #fff;
  font-weight: 800;
  box-shadow: var(--shadow);
}
.btn.secondary { background: #fff; color: #111; border: 1px solid #ddd }
.btn i { font-size: 16px }

/* 區塊卡片 */
.card {
  margin-top: 16px;
  background: #fff;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
}
.card .hd {
  padding: 14px 16px;
  font-weight: 900;
  border-bottom: 1px solid #f0f0f0;
  display: flex;
  align-items: center;
  gap: 10px;
}
.card .bd { padding: 16px }
.list { display: grid; gap: 10px }
.kv {
  display: grid;
  grid-template-columns: 112px 1fr;
  gap: 10px;
  align-items: center;
}
.kv .k { color: var(--muted); font-weight: 800 }
.kv .v a { color: #0d6efd; text-decoration: none; word-break: break-all }

/* 小圖示列（社群） */
.social {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 2px;
}
.social a {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 10px;
  border-radius: 999px;
  border: 1px solid #eaeaef;
  text-decoration: none;
  color: #111;
  font-weight: 700;
  background: #fff;
}
/* 子清單容器（桌機）：維持水平文字 + 直向一列列 */
@media (min-width: 769px){
  .site-nav .dropdown{
    display: block !important;
    writing-mode: horizontal-tb !important;
    text-orientation: mixed !important;
    top: 100% !important;       /* 緊貼按鈕下緣，避免 hover 有縫隙 */
    margin-top: 0 !important;
  }
  .site-nav .dropdown > li{ display:block !important; width:100% !important; }
  .site-nav .dropdown a{
    display:block !important;
    writing-mode: horizontal-tb !important;
    text-orientation: mixed !important;
    white-space: nowrap !important;
    text-align: left;
    padding: 10px 14px;
  }

  /* 顯示條件：滑入或 .open（JS 會加）都顯示 */
  .site-nav .has-sub:hover > .dropdown,
  .site-nav .has-sub.open  > .dropdown{
    opacity: 1 !important;
    visibility: visible !important;
    pointer-events: auto !important;
    transform: translateY(0) !important;
  }

  /* Hover 緩衝橋，避免游標下移時瞬間收起 */
  .site-nav .dropdown::before{
    content:""; position:absolute; left:0; right:0; top:-10px; height:10px;
  }
}

/* 確保桌機下 .site-nav 可點、不被其它樣式關掉事件 */
@media (min-width: 769px){
  .site-nav{ pointer-events: auto !important; }
}

/* RWD */
@media (max-width: 560px) {
  .hero { grid-template-columns: 80px 1fr }
  .avatar { width: 80px; height: 80px }
  .person .name { font-size: 20px }
}
