/**
 * 許健泰個人介紹頁 — 科技學術視覺樣式
 * name: hsuchientai-styles
 * summary: 深藍藍圖格線與青銅學術色調，營造科技學術感
 * purpose: 獨立個人介紹頁視覺系統（不依賴主站卡片式 UI）
 * source: hsuchientai/styles.css
 * weight: 0
 * direction: neutral
 * used_for: hsuchientai_personal_page
 * logic: CSS 變數定義色票與字型，動畫僅用於層次與進場
 * ai_note: 不參與 AI 訓練；僅前端呈現。本地 fonts/rajdhani 損壞故改用 Google Fonts。
 */

:root {
  /* name: --ink / summary: 頁面底色深藍 / purpose: 學術科技氛圍 / weight: 0 */
  --ink: #07111f;
  --slate: #0d1a2e;
  --panel: rgba(14, 28, 48, 0.72);
  --line: rgba(88, 168, 186, 0.22);
  --text: #e6eef7;
  --muted: #9bb0c6;
  --teal: #3db8c5;
  --teal-dim: rgba(61, 184, 197, 0.15);
  --brass: #c9a84c;
  --brass-dim: rgba(201, 168, 76, 0.18);
  --ok: #5ec8a5;
  --font-display: "Noto Serif TC", "Source Han Serif TC", "Songti TC", serif;
  --font-latin: "Syne", "Noto Sans TC", sans-serif;
  --font-body: "Noto Sans TC", "Microsoft JhengHei", sans-serif;
  --max: 1120px;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--text);
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.65;
  background:
    radial-gradient(900px 480px at 85% 8%, rgba(61, 184, 197, 0.12), transparent 55%),
    radial-gradient(700px 400px at 8% 70%, rgba(201, 168, 76, 0.08), transparent 50%),
    linear-gradient(180deg, #06101c 0%, var(--ink) 40%, #050d18 100%);
  overflow-x: hidden;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  background-image:
    linear-gradient(var(--line) 1px, transparent 1px),
    linear-gradient(90deg, var(--line) 1px, transparent 1px);
  background-size: 48px 48px;
  mask-image: radial-gradient(ellipse 70% 60% at 50% 30%, black 20%, transparent 75%);
  opacity: 0.55;
  animation: grid-drift 28s linear infinite;
}

@keyframes grid-drift {
  0% { background-position: 0 0, 0 0; }
  100% { background-position: 0 48px, 48px 0; }
}

img {
  max-width: 100%;
  display: block;
}

a {
  color: var(--teal);
  text-decoration: none;
}
a:hover {
  color: #7ad4de;
}
a:focus-visible {
  outline: 2px solid var(--teal);
  outline-offset: 3px;
}

.skip-link {
  position: absolute;
  left: -9999px;
}
.skip-link:focus {
  left: 16px;
  top: 12px;
  z-index: 100;
  background: #000;
  color: #fff;
  padding: 8px 12px;
}

.site-wrap {
  position: relative;
  z-index: 1;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 40;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 14px clamp(16px, 4vw, 40px);
  background: rgba(7, 17, 31, 0.82);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid rgba(61, 184, 197, 0.18);
}

.topbar-brand {
  font-family: var(--font-latin);
  font-weight: 700;
  letter-spacing: 0.12em;
  font-size: 0.78rem;
  color: var(--text);
  text-transform: uppercase;
}

.topbar-brand span {
  color: var(--teal);
}

.topbar nav {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 14px;
  font-size: 0.92rem;
}

.topbar nav a {
  color: var(--muted);
  letter-spacing: 0.04em;
}
.topbar nav a:hover {
  color: var(--text);
}

/* ===== Hero：一體構圖，品牌名為主視覺訊號 ===== */
.hero {
  position: relative;
  min-height: 100vh;
  min-height: 100dvh;
  display: grid;
  align-items: end;
  overflow: hidden;
}

.hero-media {
  position: absolute;
  inset: 0;
  z-index: 0;
}

.hero-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 22%;
  transform: scale(1.04);
  animation: hero- ken 18s ease-in-out infinite alternate;
}

@keyframes hero-ken {
  from { transform: scale(1.04) translateY(0); }
  to { transform: scale(1.1) translateY(-1.5%); }
}

.hero-media::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(100deg, rgba(7, 17, 31, 0.92) 0%, rgba(7, 17, 31, 0.55) 42%, rgba(7, 17, 31, 0.28) 68%, rgba(7, 17, 31, 0.72) 100%),
    linear-gradient(0deg, rgba(7, 17, 31, 0.95) 0%, transparent 42%);
}

.hero-content {
  position: relative;
  z-index: 2;
  width: min(var(--max), 92%);
  margin: 0 auto;
  padding: 0 0 clamp(48px, 10vh, 96px);
  animation: rise-in 1.1s cubic-bezier(0.22, 1, 0.36, 1) both;
}

@keyframes rise-in {
  from { opacity: 0; transform: translateY(28px); }
  to { opacity: 1; transform: translateY(0); }
}

.hero-latin {
  font-family: var(--font-latin);
  font-weight: 700;
  letter-spacing: 0.28em;
  font-size: clamp(0.7rem, 1.4vw, 0.85rem);
  color: var(--teal);
  text-transform: uppercase;
  margin: 0 0 12px;
}

.hero-name {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(2.8rem, 8vw, 5.2rem);
  line-height: 1.05;
  letter-spacing: 0.08em;
  margin: 0 0 10px;
  color: #f3f7fc;
  text-shadow: 0 8px 40px rgba(0, 0, 0, 0.45);
}

.hero-title {
  font-family: var(--font-display);
  font-size: clamp(1.05rem, 2.4vw, 1.35rem);
  font-weight: 600;
  color: var(--brass);
  margin: 0 0 16px;
  letter-spacing: 0.06em;
}

.hero-lead {
  max-width: 34rem;
  margin: 0 0 28px;
  color: var(--muted);
  font-size: 1.05rem;
}

.hero-cta {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 22px;
  border-radius: 2px;
  border: 1px solid transparent;
  font-family: var(--font-body);
  font-weight: 600;
  letter-spacing: 0.06em;
  cursor: pointer;
  transition: background 0.25s, border-color 0.25s, color 0.25s, transform 0.25s;
}

.btn-primary {
  background: linear-gradient(135deg, #2a9eab, #3db8c5);
  color: #041018;
}
.btn-primary:hover {
  color: #041018;
  transform: translateY(-2px);
}

.btn-ghost {
  background: transparent;
  border-color: rgba(61, 184, 197, 0.45);
  color: var(--text);
}
.btn-ghost:hover {
  background: var(--teal-dim);
  color: var(--text);
}

.scan-line {
  position: absolute;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--teal), transparent);
  opacity: 0.35;
  animation: scan 6.5s ease-in-out infinite;
  z-index: 3;
  pointer-events: none;
}

@keyframes scan {
  0% { top: 18%; opacity: 0; }
  15% { opacity: 0.4; }
  50% { top: 72%; opacity: 0.25; }
  85% { opacity: 0.35; }
  100% { top: 18%; opacity: 0; }
}

main {
  width: min(var(--max), 92%);
  margin: 0 auto;
  padding: 56px 0 80px;
}

.section {
  padding: 48px 0;
  border-bottom: 1px solid rgba(61, 184, 197, 0.12);
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}

.section.is-visible {
  opacity: 1;
  transform: none;
}

.section-label {
  font-family: var(--font-latin);
  font-size: 0.72rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--teal);
  margin: 0 0 8px;
}

.section h2 {
  font-family: var(--font-display);
  font-size: clamp(1.55rem, 3vw, 2rem);
  font-weight: 700;
  letter-spacing: 0.06em;
  margin: 0 0 12px;
  color: #f0f5fb;
}

.section-lead {
  margin: 0 0 28px;
  color: var(--muted);
  max-width: 40rem;
}

.timeline {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 14px;
}

.timeline li {
  position: relative;
  padding: 14px 16px 14px 28px;
  border-left: 2px solid rgba(61, 184, 197, 0.35);
  background: linear-gradient(90deg, var(--teal-dim), transparent 70%);
}

.timeline li::before {
  content: "";
  position: absolute;
  left: -5px;
  top: 22px;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--teal);
  box-shadow: 0 0 0 3px rgba(61, 184, 197, 0.2);
}

.timeline .role {
  display: block;
  font-weight: 600;
  color: var(--text);
}

.timeline .org {
  color: var(--muted);
  font-size: 0.95rem;
}

.chip-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.chip {
  padding: 8px 14px;
  border: 1px solid rgba(201, 168, 76, 0.35);
  background: var(--brass-dim);
  color: #e8d7a4;
  font-size: 0.92rem;
  letter-spacing: 0.02em;
}

.pub-list,
.service-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 16px;
}

.pub-list li,
.service-list li {
  padding: 18px 0;
  border-top: 1px solid rgba(155, 176, 198, 0.18);
}

.pub-list li:last-child,
.service-list li:last-child {
  border-bottom: 1px solid rgba(155, 176, 198, 0.18);
}

.pub-meta {
  font-family: var(--font-latin);
  font-size: 0.72rem;
  letter-spacing: 0.14em;
  color: var(--brass);
  margin-bottom: 6px;
}

.pub-title {
  font-family: var(--font-display);
  font-size: 1.05rem;
  line-height: 1.5;
  margin: 0 0 8px;
  color: var(--text);
}

.pub-cite {
  color: var(--muted);
  font-size: 0.92rem;
  margin: 0 0 8px;
}

.pub-links {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  font-size: 0.9rem;
}

.contact-block {
  display: grid;
  gap: 10px;
  padding: 24px 0 0;
}

.contact-block a {
  font-size: 1.05rem;
}

.site-footer {
  border-top: 1px solid rgba(61, 184, 197, 0.15);
  padding: 28px clamp(16px, 4vw, 40px) 40px;
  color: var(--muted);
  font-size: 0.9rem;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 12px;
}

.site-footer a {
  color: var(--muted);
}
.site-footer a:hover {
  color: var(--teal);
}

@media (max-width: 720px) {
  .topbar {
    flex-direction: column;
    align-items: flex-start;
  }
  .hero-name {
    letter-spacing: 0.04em;
  }
  .hero-content {
    padding-bottom: 40px;
  }
}
