/* ================================
   Design Tokens
   ================================ */
:root {
  --bg:           #f0f4f8;
  --bg-alt:       #e8eef6;
  --surface:      #ffffff;
  --primary:      #1e40af;
  --primary-h:    #1d35a2;
  --accent:       #3b82f6;
  --accent-light: #dbeafe;
  --ios-color:    #0071e3;
  --text:         #0f172a;
  --text-muted:   #475569;
  --text-light:   #94a3b8;
  --border:       #e2e8f0;
  --shadow-sm:    0 2px 8px rgba(15,23,42,0.08);
  --shadow-md:    0 8px 24px rgba(15,23,42,0.12);
  --shadow-lg:    0 20px 48px rgba(15,23,42,0.16);
  --radius:       16px;
  --radius-sm:    10px;
  --container:    1140px;
  --header-h:     64px;
}

/* ================================
   Reset / Base
   ================================ */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
  font-family: 'Noto Sans TC', 'Inter', 'Segoe UI', system-ui, sans-serif;
  color: var(--text);
  background: var(--bg);
  line-height: 1.7;
  font-size: 1rem;
}

a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }

ul { list-style: none; }

.container {
  width: min(var(--container), 100%);
  margin-inline: auto;
  padding-inline: 24px;
}

/* ================================
   Header
   ================================ */
.site-header {
  position: sticky;
  top: 0;
  height: var(--header-h);
  z-index: 100;
  background: rgba(255,255,255,0.88);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid transparent;
  transition: border-color .3s, box-shadow .3s;
}
.site-header.scrolled {
  border-bottom-color: var(--border);
  box-shadow: var(--shadow-sm);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 100%;
}

.brand {
  display: flex;
  align-items: baseline;
  gap: 8px;
  text-decoration: none;
}
.brand-zh {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--text);
}
.brand-en {
  font-size: 0.78rem;
  color: var(--text-light);
  font-family: 'Inter', sans-serif;
}

.nav { display: flex; gap: 4px; }
.nav a {
  color: var(--text-muted);
  font-weight: 500;
  font-size: 0.88rem;
  padding: 6px 12px;
  border-radius: 8px;
  transition: all .2s;
  text-decoration: none;
}
.nav a:hover {
  color: var(--primary);
  background: var(--accent-light);
  text-decoration: none;
}

.menu-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 6px;
  border-radius: 8px;
}
.menu-toggle span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--text);
  border-radius: 2px;
  transition: all .25s;
}
.menu-toggle.active span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.menu-toggle.active span:nth-child(2) { opacity: 0; }
.menu-toggle.active span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ================================
   Buttons
   ================================ */
.btn {
  display: inline-block;
  padding: 11px 22px;
  border-radius: var(--radius-sm);
  font-size: 0.92rem;
  font-weight: 600;
  cursor: pointer;
  border: none;
  transition: all .2s;
  text-decoration: none;
  line-height: 1;
}
.btn-primary {
  background: var(--primary);
  color: white;
  box-shadow: 0 4px 14px rgba(30,64,175,.3);
}
.btn-primary:hover {
  background: var(--primary-h);
  box-shadow: 0 6px 20px rgba(30,64,175,.4);
  text-decoration: none;
  transform: translateY(-1px);
  color: white;
}
.btn-outline {
  background: transparent;
  color: var(--primary);
  border: 2px solid var(--primary);
}
.btn-outline:hover {
  background: var(--accent-light);
  text-decoration: none;
}
.btn-full { width: 100%; text-align: center; }

/* ================================
   Hero
   ================================ */
.hero {
  position: relative;
  overflow: hidden;
  background: linear-gradient(135deg, #1e3a8a 0%, #1e40af 45%, #2563eb 100%);
  padding: 80px 0 90px;
}

.hero-bg-pattern {
  position: absolute;
  inset: 0;
  background-image:
    radial-gradient(circle at 18% 55%, rgba(255,255,255,.05) 0%, transparent 55%),
    radial-gradient(circle at 82% 18%, rgba(255,255,255,.07) 0%, transparent 45%);
  pointer-events: none;
}

.hero-inner {
  position: relative;
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 48px;
  align-items: center;
}

.hero-badge {
  display: inline-block;
  background: rgba(255,255,255,.15);
  color: #bfdbfe;
  border: 1px solid rgba(255,255,255,.2);
  padding: 5px 14px;
  border-radius: 100px;
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: .04em;
  margin-bottom: 16px;
}

.hero-title { margin-bottom: 10px; }
.zh-name {
  display: block;
  font-size: clamp(2.4rem, 5vw, 3.4rem);
  font-weight: 700;
  color: #fff;
  line-height: 1.1;
}
.en-name {
  display: block;
  font-size: clamp(.95rem, 1.8vw, 1.2rem);
  font-weight: 400;
  color: #93c5fd;
  font-family: 'Inter', sans-serif;
  margin-top: 6px;
  letter-spacing: .02em;
}

.hero-subtitle {
  font-size: 1.05rem;
  color: #bfdbfe;
  font-weight: 500;
  margin-bottom: 14px;
}

.hero-desc {
  color: #dbeafe;
  line-height: 1.75;
  margin-bottom: 28px;
  font-size: .96rem;
}
.hero-desc strong { color: #fff; }

.hero-cta {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 28px;
}
.hero-cta .btn-primary {
  background: #fff;
  color: var(--primary);
  box-shadow: 0 4px 16px rgba(0,0,0,.2);
}
.hero-cta .btn-primary:hover { background: #eef6ff; color: var(--primary-h); }
.hero-cta .btn-outline {
  color: #fff;
  border-color: rgba(255,255,255,.5);
}
.hero-cta .btn-outline:hover { background: rgba(255,255,255,.12); }

.hero-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip {
  background: rgba(255,255,255,.12);
  color: #e0f2fe;
  border: 1px solid rgba(255,255,255,.2);
  padding: 4px 12px;
  border-radius: 100px;
  font-size: .78rem;
  font-family: 'Inter', monospace;
}
.chip-ios    { background: rgba(0,113,227,.3); border-color: rgba(0,113,227,.5); }
.chip-android{ background: rgba(61,220,132,.2); border-color: rgba(61,220,132,.4); }

/* Hero visual */
.hero-visual {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 280px;
}

.avatar-ring {
  position: relative;
  width: 180px;
  height: 180px;
}
.avatar-ring::before {
  content: '';
  position: absolute;
  inset: -8px;
  border-radius: 50%;
  border: 2px dashed rgba(255,255,255,.25);
  animation: spin 20s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

.avatar-circle {
  width: 180px;
  height: 180px;
  border-radius: 50%;
  background: rgba(255,255,255,.12);
  border: 2px solid rgba(255,255,255,.3);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2rem;
  font-weight: 700;
  color: #fff;
  font-family: 'Inter', sans-serif;
  letter-spacing: .06em;
}

.floating-card {
  position: absolute;
  background: rgba(255,255,255,.96);
  border-radius: 12px;
  padding: 11px 16px;
  display: flex;
  align-items: center;
  gap: 10px;
  box-shadow: 0 8px 24px rgba(0,0,0,.15);
}
.fc-icon { font-size: 1.4rem; }
.fc-title { font-size: .78rem; font-weight: 700; color: var(--text); }
.fc-sub   { font-size: .7rem;  color: var(--text-muted); }

.card-1 { top: 10%; right: -8%; animation: float1 4s ease-in-out infinite; }
.card-2 { bottom: 10%; left: -8%; animation: float2 4.5s ease-in-out infinite; }
@keyframes float1 { 0%,100%{transform:translateY(0)} 50%{transform:translateY(-8px)} }
@keyframes float2 { 0%,100%{transform:translateY(0)} 50%{transform:translateY(8px)} }

/* ================================
   Section Common
   ================================ */
.section     { padding: 80px 0; }
.section-alt { background: var(--bg-alt); }

.section-header { margin-bottom: 40px; }
.section-label {
  display: inline-block;
  font-size: .7rem;
  font-weight: 700;
  letter-spacing: .14em;
  color: var(--accent);
  font-family: 'Inter', monospace;
  margin-bottom: 8px;
}
.section-header h2 {
  font-size: clamp(1.6rem, 3vw, 2rem);
  font-weight: 700;
  color: var(--text);
  line-height: 1.2;
}
.section-desc {
  color: var(--text-muted);
  margin-top: 8px;
  font-size: .94rem;
}

/* ================================
   About
   ================================ */
.about-grid {
  display: grid;
  grid-template-columns: 1.5fr 1fr;
  gap: 40px;
  align-items: start;
}

.about-bio p {
  color: var(--text-muted);
  margin-bottom: 16px;
  line-height: 1.8;
}
.about-bio strong { color: var(--text); font-weight: 600; }

.bio-quote {
  border-left: 3px solid var(--accent);
  padding: 12px 20px;
  margin: 24px 0 0;
  background: var(--accent-light);
  border-radius: 0 12px 12px 0;
  color: var(--primary);
  font-style: italic;
  font-size: .94rem;
  font-weight: 500;
  line-height: 1.7;
}

.info-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  box-shadow: var(--shadow-sm);
}
.info-row {
  display: flex;
  flex-direction: column;
  gap: 3px;
  padding: 10px 0;
  border-bottom: 1px solid var(--border);
  font-size: .9rem;
}
.info-row:last-child { border-bottom: none; }
.info-label {
  font-size: .7rem;
  font-weight: 700;
  color: var(--text-light);
  letter-spacing: .06em;
  text-transform: uppercase;
}

/* ================================
   Timeline
   ================================ */
.timeline {
  position: relative;
  display: flex;
  flex-direction: column;
}
.timeline::before {
  content: '';
  position: absolute;
  left: 15px;
  top: 16px;
  bottom: 16px;
  width: 2px;
  background: linear-gradient(to bottom, var(--accent), var(--border));
}

.timeline-item {
  display: grid;
  grid-template-columns: 32px 1fr;
  gap: 20px;
  margin-bottom: 24px;
  position: relative;
}

.timeline-marker {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--surface);
  border: 3px solid var(--accent);
  margin-top: 20px;
  position: relative;
  z-index: 1;
  flex-shrink: 0;
}
.timeline-item.current .timeline-marker {
  background: var(--accent);
  box-shadow: 0 0 0 4px rgba(59,130,246,.2);
}

.timeline-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  box-shadow: var(--shadow-sm);
  opacity: 0;
  transform: translateX(20px);
  transition: opacity .5s, transform .5s;
}
.timeline-card.visible { opacity: 1; transform: translateX(0); }

.tc-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 6px;
}
.tc-title   { font-size: 1.05rem; font-weight: 700; color: var(--text); }
.tc-company { color: var(--accent); font-size: .88rem; font-weight: 500; margin-top: 2px; }
.tc-meta    { display: flex; flex-direction: column; align-items: flex-end; gap: 4px; }
.tc-date    { font-size: .8rem; color: var(--text-light); font-family: 'Inter', monospace; white-space: nowrap; }

.tc-badge {
  font-size: .7rem;
  font-weight: 600;
  padding: 2px 10px;
  border-radius: 100px;
  background: var(--bg);
  color: var(--text-muted);
  border: 1px solid var(--border);
}
.current-badge { background: #dcfce7; color: #166534; border-color: #86efac; }

.tc-location { font-size: .8rem; color: var(--text-light); margin-bottom: 12px; }

.tc-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 16px;
}
.tc-list li {
  font-size: .88rem;
  color: var(--text-muted);
  padding-left: 16px;
  position: relative;
  line-height: 1.65;
}
.tc-list li::before {
  content: '▸';
  position: absolute;
  left: 0;
  color: var(--accent);
}

.tc-tags { display: flex; flex-wrap: wrap; gap: 6px; }
.tag {
  background: var(--accent-light);
  color: var(--primary);
  padding: 3px 10px;
  border-radius: 100px;
  font-size: .75rem;
  font-weight: 600;
  font-family: 'Inter', monospace;
}

/* ================================
   Education
   ================================ */
.edu-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 20px;
  margin-bottom: 28px;
}

.edu-card {
  display: flex;
  gap: 16px;
  align-items: flex-start;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  box-shadow: var(--shadow-sm);
  opacity: 0;
  transform: translateY(20px);
  transition: opacity .5s, transform .5s;
}
.edu-card.visible { opacity: 1; transform: translateY(0); }

.edu-icon { font-size: 1.9rem; flex-shrink: 0; }
.edu-card h3 { font-size: 1rem; font-weight: 700; margin-bottom: 4px; }
.edu-card p  { color: var(--text-muted); font-size: .88rem; margin-bottom: 4px; }
.edu-date    { font-size: .76rem; color: var(--text-light); font-family: 'Inter', monospace; }

.thesis-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-left: 4px solid var(--accent);
  border-radius: var(--radius);
  padding: 22px 26px;
  box-shadow: var(--shadow-sm);
  opacity: 0;
  transform: translateY(20px);
  transition: opacity .5s, transform .5s;
}
.thesis-card.visible { opacity: 1; transform: translateY(0); }
.thesis-title { font-size: .72rem; font-weight: 700; color: var(--text-light); text-transform: uppercase; letter-spacing: .1em; margin-bottom: 8px; }
.thesis-name  { font-size: 1rem; font-weight: 600; color: var(--text); margin-bottom: 8px; font-style: italic; }
.thesis-desc  { font-size: .85rem; color: var(--text-muted); line-height: 1.7; }

/* ================================
   Skills
   ================================ */
.skills-layout {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 28px;
}

.skill-group {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  box-shadow: var(--shadow-sm);
  opacity: 0;
  transform: translateY(20px);
  transition: opacity .5s, transform .5s;
}
.skill-group.visible { opacity: 1; transform: translateY(0); }

.sg-title {
  font-size: .78rem;
  font-weight: 700;
  letter-spacing: .08em;
  color: var(--text-light);
  text-transform: uppercase;
  margin-bottom: 16px;
}
.sg-desc { font-size: .86rem; color: var(--text-muted); }

.skill-item { margin-bottom: 14px; }
.skill-name {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: .9rem;
  font-weight: 600;
  margin-bottom: 6px;
}
.skill-level { font-size: .74rem; font-weight: 400; color: var(--text-light); }

.skill-bar {
  height: 6px;
  background: var(--bg);
  border-radius: 100px;
  overflow: hidden;
}
.skill-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--primary), var(--accent));
  border-radius: 100px;
}

.tag-cloud { display: flex; flex-wrap: wrap; gap: 8px; }
.tag-big {
  background: var(--bg);
  color: var(--text-muted);
  border: 1px solid var(--border);
  padding: 5px 12px;
  border-radius: 100px;
  font-size: .8rem;
  font-weight: 500;
}
.tag-ios     { background: #eff6ff; color: var(--ios-color); border-color: #bfdbfe; }
.tag-android { background: #f0fdf4; color: #16a34a; border-color: #86efac; }

/* Language dots */
.lang-item {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 12px;
  font-size: .88rem;
}
.lang-name  { width: 40px; font-weight: 600; flex-shrink: 0; }
.lang-dots  { display: flex; gap: 4px; }
.dot        { width: 10px; height: 10px; border-radius: 50%; background: var(--border); }
.dot.filled { background: var(--accent); }
.lang-note  { font-size: .76rem; color: var(--text-light); }

/* ================================
   Projects
   ================================ */
.projects-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 20px;
  margin-bottom: 20px;
}

.project-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  box-shadow: var(--shadow-sm);
  transition: transform .2s, box-shadow .2s, opacity .5s;
  opacity: 0;
  transform: translateY(20px);
}
.project-card.visible { opacity: 1; transform: translateY(0); }
.project-card:hover   { transform: translateY(-4px); box-shadow: var(--shadow-md); }
.project-card.featured {
  border-color: var(--accent);
  box-shadow: 0 0 0 1px var(--accent), var(--shadow-sm);
}

.pc-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 12px;
}
.pc-icon   { font-size: 2rem; }
.pc-badges { display: flex; flex-wrap: wrap; gap: 4px; justify-content: flex-end; }

.badge {
  font-size: .68rem;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 100px;
  letter-spacing: .02em;
}
.badge-ios      { background: #eff6ff; color: var(--ios-color); }
.badge-android  { background: #f0fdf4; color: #16a34a; }
.badge-self     { background: #faf5ff; color: #7c3aed; }
.badge-company  { background: var(--accent-light); color: var(--primary); }
.badge-freelance{ background: #fff7ed; color: #c2410c; }

.project-card h3 { font-size: 1rem; font-weight: 700; margin-bottom: 8px; }
.project-card p  { font-size: .86rem; color: var(--text-muted); line-height: 1.65; margin-bottom: 16px; }

.pc-links { display: flex; gap: 8px; flex-wrap: wrap; }
.pc-link {
  font-size: .78rem;
  font-weight: 600;
  color: var(--primary);
  border: 1px solid var(--border);
  padding: 5px 12px;
  border-radius: 8px;
  background: var(--bg);
  text-decoration: none;
  transition: all .2s;
}
.pc-link:hover {
  background: var(--accent-light);
  border-color: var(--accent);
  text-decoration: none;
}

.projects-note {
  font-size: .84rem;
  color: var(--text-light);
  font-style: italic;
  text-align: center;
}

/* ================================
   Contact
   ================================ */
.contact-layout {
  display: grid;
  grid-template-columns: 1fr 1.5fr;
  gap: 40px;
  align-items: start;
}

.contact-info { display: flex; flex-direction: column; gap: 24px; }

.ci-item { display: flex; gap: 14px; align-items: flex-start; }
.ci-icon  { font-size: 1.4rem; flex-shrink: 0; }
.ci-label {
  font-size: .7rem;
  font-weight: 700;
  color: var(--text-light);
  text-transform: uppercase;
  letter-spacing: .08em;
  margin-bottom: 3px;
}
.ci-value { font-size: .94rem; font-weight: 500; color: var(--text); }
.ci-note  { font-size: .76rem; color: var(--text-light); margin-top: 2px; }

.contact-form-wrap {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 32px;
  box-shadow: var(--shadow-sm);
}

.contact-form { display: flex; flex-direction: column; gap: 16px; }
.form-group   { display: flex; flex-direction: column; gap: 5px; }
.form-group label { font-size: .84rem; font-weight: 600; color: var(--text-muted); }

.form-group input,
.form-group textarea {
  padding: 10px 14px;
  border: 1px solid var(--border);
  border-radius: 8px;
  font-size: .92rem;
  font-family: inherit;
  color: var(--text);
  background: var(--bg);
  outline: none;
  transition: border-color .2s, box-shadow .2s;
}
.form-group input:focus,
.form-group textarea:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(59,130,246,.15);
}

/* ================================
   Footer
   ================================ */
.site-footer {
  background: var(--text);
  padding: 32px 0;
  color: #94a3b8;
}
.footer-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 16px;
}
.footer-name  { font-size: 1rem; font-weight: 700; color: #fff; margin-bottom: 2px; }
.footer-title { font-size: .8rem; color: #64748b; }
.footer-right { text-align: right; font-size: .84rem; }
.footer-right a { color: #60a5fa; }
.footer-right a:hover { color: #93c5fd; }
.footer-stats { margin-top: 6px; font-size: .78rem; color: #64748b; }
.footer-stats span { color: #93c5fd; font-weight: 600; }
.footer-legal { margin-top: 6px; font-size: .8rem; }

/* ================================
   Legal pages (privacy / terms)
   ================================ */
.legal-hero {
  background: var(--bg-alt);
  border-bottom: 1px solid var(--border);
  padding: 56px 0 40px;
}
.legal-hero h1 {
  font-size: clamp(1.8rem, 4vw, 2.4rem);
  font-weight: 700;
  line-height: 1.25;
}
.legal-sub {
  color: var(--text-muted);
  font-size: .95rem;
  margin-top: 6px;
}
.updated-at {
  margin-top: 14px;
  font-size: .82rem;
  color: var(--text-light);
  font-family: 'Inter', monospace;
}
.lang-switch { display: flex; gap: 10px; margin-top: 18px; }
.lang-switch a {
  padding: 6px 16px;
  border-radius: 999px;
  background: var(--surface);
  border: 1px solid var(--border);
  font-size: .84rem;
  font-weight: 500;
  color: var(--text-muted);
  box-shadow: var(--shadow-sm);
}
.lang-switch a:hover { color: var(--primary); border-color: var(--accent); text-decoration: none; }

.legal-body { padding: 56px 0; scroll-margin-top: var(--header-h); }
.legal-container { width: min(820px, 100%); }

.legal-body h2 {
  font-size: 1.22rem;
  font-weight: 700;
  color: var(--text);
  margin: 36px 0 12px;
  padding-bottom: 8px;
  border-bottom: 2px solid var(--accent-light);
}
.legal-body h2:first-child { margin-top: 0; }
.legal-body h3 { font-size: 1.05rem; font-weight: 600; color: var(--text); }
.legal-body p  { color: var(--text-muted); margin-bottom: 12px; line-height: 1.85; }
.legal-body strong { color: var(--text); font-weight: 600; }

.legal-list { margin: 0 0 14px; padding-left: 0; }
.legal-list li {
  position: relative;
  padding-left: 20px;
  margin-bottom: 10px;
  color: var(--text-muted);
  line-height: 1.85;
}
.legal-list li::before {
  content: "";
  position: absolute;
  left: 4px;
  top: .78em;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent);
}

.table-wrap { overflow-x: auto; margin-bottom: 16px; }
.legal-table {
  width: 100%;
  min-width: 560px;
  border-collapse: collapse;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  overflow: hidden;
  font-size: .88rem;
}
.legal-table th,
.legal-table td {
  padding: 12px 14px;
  text-align: left;
  vertical-align: top;
  border-bottom: 1px solid var(--border);
}
.legal-table th { background: var(--bg-alt); color: var(--text); font-weight: 600; }
.legal-table td { color: var(--text-muted); }
.legal-table tr:last-child td { border-bottom: none; }
.legal-table .muted { color: var(--text-light); font-size: .8rem; }

.legal-divider {
  border: none;
  border-top: 1px solid var(--border);
  margin: 48px 0 36px;
}

.app-block {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  box-shadow: var(--shadow-sm);
  margin-bottom: 20px;
}
.app-block-head {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 14px;
}
.app-block-head h3 { margin: 0; }

/* ================================
   Responsive
   ================================ */
@media (max-width: 900px) {
  .hero-inner {
    grid-template-columns: 1fr;
    text-align: center;
  }
  .hero-chips, .hero-cta { justify-content: center; }
  .hero-visual { min-height: 180px; }
  .card-1, .card-2 { display: none; }

  .about-grid   { grid-template-columns: 1fr; }
  .contact-layout { grid-template-columns: 1fr; }

  .footer-inner { flex-direction: column; text-align: center; }
  .footer-right { text-align: center; }
}

@media (max-width: 700px) {
  .nav {
    position: absolute;
    top: var(--header-h);
    left: 0;
    right: 0;
    background: rgba(255,255,255,.98);
    border-bottom: 1px solid var(--border);
    flex-direction: column;
    padding: 12px 24px;
    gap: 2px;
    box-shadow: var(--shadow-md);
    transform: translateY(-8px);
    opacity: 0;
    pointer-events: none;
    transition: all .25s;
  }
  .nav.open { transform: translateY(0); opacity: 1; pointer-events: auto; }
  .nav a    { padding: 10px 12px; border-radius: 8px; }
  .menu-toggle { display: flex; }

  .timeline::before { left: 11px; }
  .timeline-item    { grid-template-columns: 24px 1fr; }
  .timeline-marker  { width: 14px; height: 14px; }

  .hero    { padding: 56px 0 64px; }
  .section { padding: 56px 0; }
}

/* 法務頁沒有漢堡選單,導覽列在手機上必須維持可見(不套用上方的收合行為) */
@media (max-width: 700px) {
  .nav.legal-nav {
    position: static;
    flex-direction: row;
    background: none;
    border: none;
    box-shadow: none;
    padding: 0;
    gap: 2px;
    transform: none;
    opacity: 1;
    pointer-events: auto;
  }
  .nav.legal-nav a { padding: 8px 10px; font-size: .82rem; }

  .legal-hero { padding: 40px 0 32px; }
  .legal-body { padding: 40px 0; }
  .app-block  { padding: 20px; }
}
