:root {
  --bg: #FAFAF8;
  --bg-card: #FFFFFF;
  --bg-section: #F3F2EE;
  --text-primary: #1A1A1A;
  --text-secondary: #5A5A5A;
  --text-muted: #8A8A8A;
  --brand-navy: #1B2D4F;
  --brand-navy-light: #2A4470;
  --accent-ai: #2563EB;
  --accent-circular: #059669;
  --accent-faith: #B45309;
  --accent-startup: #DC2626;
  --accent-life: #7C3AED;
  --border: #E8E6E1;
  --border-light: #F0EDE8;
  --shadow-sm: 0 1px 3px rgba(0,0,0,0.04);
  --shadow-md: 0 4px 16px rgba(0,0,0,0.06);
  --shadow-lg: 0 8px 32px rgba(0,0,0,0.08);
  --radius: 12px;
  --radius-lg: 20px;
  --font-display: 'Playfair Display', Georgia, serif;
  --font-body: 'DM Sans', 'Noto Sans TC', sans-serif;
  --font-cjk: 'Noto Sans TC', sans-serif;
  --max-width: 1200px;
  --nav-height: 72px;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; font-size: 16px; }

body {
  font-family: var(--font-body);
  background: var(--bg);
  color: var(--text-primary);
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  position: relative;
  min-height: 100vh;
}

/* ===== AMBIENT WARM GLOW ===== */
body::before {
  content: '';
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  pointer-events: none;
  z-index: 9999;
  border: 2px solid transparent;
  border-image: linear-gradient(
    var(--glow-angle, 45deg),
    transparent 0%,
    rgba(210, 140, 60, 0.12) 25%,
    rgba(230, 160, 50, 0.18) 50%,
    rgba(210, 140, 60, 0.12) 75%,
    transparent 100%
  ) 1;
  animation: ambientGlow 8s ease-in-out infinite;
}

@property --glow-angle {
  syntax: '<angle>';
  inherits: false;
  initial-value: 0deg;
}

@keyframes ambientGlow {
  0% { --glow-angle: 0deg; opacity: 0.6; }
  25% { --glow-angle: 90deg; opacity: 1; }
  50% { --glow-angle: 180deg; opacity: 0.6; }
  75% { --glow-angle: 270deg; opacity: 1; }
  100% { --glow-angle: 360deg; opacity: 0.6; }
}

/* Outer ambient corner glow */
body::after {
  content: '';
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  pointer-events: none;
  z-index: 9998;
  background:
    radial-gradient(ellipse at top left, rgba(220, 150, 50, 0.06) 0%, transparent 40%),
    radial-gradient(ellipse at top right, rgba(200, 120, 40, 0.04) 0%, transparent 40%),
    radial-gradient(ellipse at bottom left, rgba(200, 130, 50, 0.04) 0%, transparent 40%),
    radial-gradient(ellipse at bottom right, rgba(220, 150, 50, 0.06) 0%, transparent 40%);
  animation: ambientCorners 12s ease-in-out infinite alternate;
}

@keyframes ambientCorners {
  0% { opacity: 0.5; }
  50% { opacity: 1; }
  100% { opacity: 0.5; }
}

/* ===== READING PROGRESS BAR ===== */
.reading-progress {
  position: fixed;
  top: 0; left: 0;
  width: 0%;
  height: 3px;
  background: linear-gradient(90deg, var(--brand-navy), var(--accent-ai));
  z-index: 10000;
  transition: width 0.1s linear;
  opacity: 0;
  pointer-events: none;
}
.reading-progress.visible {
  opacity: 1;
}

/* ===== SMART HEADER ===== */
#main-nav {
  position: fixed; top: 0; left: 0; right: 0;
  height: var(--nav-height);
  background: rgba(250,250,248,0.92);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border-light);
  z-index: 100;
  display: flex; align-items: center; justify-content: center;
  transition: transform 0.3s cubic-bezier(0.23,1,0.32,1), background 0.3s;
}
#main-nav.nav-hidden {
  transform: translateY(-100%);
}
#main-nav.nav-scrolled {
  background: rgba(250,250,248,0.97);
  box-shadow: 0 1px 8px rgba(0,0,0,0.06);
}

.nav-inner {
  width: 100%; max-width: var(--max-width);
  padding: 0 40px;
  display: flex; align-items: center; justify-content: space-between;
}
.nav-logo {
  font-family: var(--font-display);
  font-size: 1.55rem; font-weight: 700;
  color: var(--brand-navy);
  text-decoration: none; letter-spacing: -0.02em;
}
.nav-links { display: flex; gap: 32px; align-items: center; }
.nav-links a {
  font-size: 0.9rem; font-weight: 500;
  color: var(--text-secondary);
  text-decoration: none; transition: color 0.2s;
  letter-spacing: 0.01em;
}
.nav-links a:hover { color: var(--brand-navy); }
.nav-links a.active { color: var(--brand-navy); }

/* Nav Dropdown */
.nav-dropdown { position: relative; }
.nav-dropdown-trigger { cursor: pointer; }
.nav-dropdown-trigger::after { content: ' ▾'; font-size: 0.65em; opacity: 0.5; }
.nav-dropdown-menu {
  position: absolute; top: calc(100% + 8px); left: 50%; transform: translateX(-50%);
  background: #fff; border: 1px solid #e2e8f0; border-radius: 8px;
  box-shadow: 0 4px 16px rgba(0,0,0,0.08); padding: 6px 0;
  min-width: 130px; opacity: 0; visibility: hidden;
  transition: opacity 0.15s, visibility 0.15s;
  z-index: 1000;
}
.nav-dropdown:hover .nav-dropdown-menu,
.nav-dropdown:focus-within .nav-dropdown-menu { opacity: 1; visibility: visible; }
.nav-dropdown-menu a {
  display: block; padding: 8px 16px; font-size: 0.82rem; color: #475569;
  text-decoration: none; white-space: nowrap; transition: background 0.12s;
}
.nav-dropdown-menu a:hover { background: #f1f5f9; color: var(--brand-navy); }

/* Mobile: dropdown items inline */
@media (max-width: 768px) {
  .nav-dropdown { display: contents; }
  .nav-dropdown-trigger::after { display: none; }
  .nav-dropdown-menu {
    display: contents;
    position: static; opacity: 1; visibility: visible;
    background: none; border: none; box-shadow: none; padding: 0;
  }
  /* P1: Fix dropdown link color on dark nav background */
  .nav-dropdown-menu a {
    display: block; padding: 12px 0; font-size: 0.78rem;
    color: rgba(255,255,255,0.85); background: none;
    border-bottom: 1px solid rgba(255,255,255,0.1);
    width: 100%;
  }
}
.lang-switcher{display:flex;gap:4px;margin-left:16px;border-left:1px solid var(--border);padding-left:16px}
.mobile-lang-switcher{display:none}
.lang-btn{font-size:.72rem;font-weight:500;padding:4px 8px;border-radius:4px;border:1px solid transparent;background:none;color:var(--text-muted);cursor:pointer;transition:all .2s;text-decoration:none}
.lang-btn:hover{color:var(--text-primary)}
.lang-btn.active{color:var(--brand-navy);border-color:var(--border);background:rgba(27,45,79,.04)}
.project-strategic{font-size:.85rem;color:var(--text-secondary);line-height:1.8;padding:16px;background:var(--bg-section);border-radius:8px;margin:16px 0;border-left:2px solid var(--border)}
.project-strategic strong{font-size:.72rem;font-weight:600;letter-spacing:.08em;text-transform:uppercase;color:var(--text-muted);display:block;margin-bottom:6px}
.nav-cta {
  background: transparent !important;
  color: var(--text-primary) !important; padding: 8px 20px;
  border-radius: 8px; font-size: 0.85rem !important;
  border: 1px solid var(--border, #d1d5db) !important;
  transition: all 0.2s !important;
}
.nav-cta:hover { background: var(--bg-hover, #f3f4f6) !important; border-color: var(--text-secondary, #6b7280) !important; }

.nav-hamburger {
  display: none; background: none; border: none;
  cursor: pointer; padding: 8px;
}
.nav-hamburger span {
  display: block; width: 20px; height: 2px;
  background: var(--brand-navy); margin: 5px 0;
  transition: all 0.3s;
}

/* ===== GLOBAL TICKER ===== */
.global-ticker {
  position: fixed;
  top: var(--nav-height);
  left: 0; right: 0;
  z-index: 99;
  transition: transform 0.3s cubic-bezier(0.23,1,0.32,1);
}
.global-ticker.ticker-hidden {
  transform: translateY(calc(-1 * var(--nav-height) - 48px));
}

/* ===== SECTIONS ===== */
.page-section { display: none; }
.page-section.active { display: block; }
main { padding-top: calc(var(--nav-height) + 48px); }

/* ===== HERO ===== */
.hero {
  min-height: calc(100vh - var(--nav-height));
  display: flex; align-items: center; justify-content: center;
  padding: 80px 40px;
  position: relative; overflow: hidden;
}
.hero::before {
  content: ''; position: absolute; top: -200px; right: -200px;
  width: 600px; height: 600px;
  background: radial-gradient(circle, rgba(37,99,235,0.04) 0%, transparent 70%);
  pointer-events: none;
}
.hero::after {
  content: ''; position: absolute; bottom: -150px; left: -150px;
  width: 500px; height: 500px;
  background: radial-gradient(circle, rgba(5,150,105,0.03) 0%, transparent 70%);
  pointer-events: none;
}
.hero-inner {
  max-width: var(--max-width); width: 100%;
  display: grid; grid-template-columns: 1fr 1fr; gap: 80px;
  align-items: center; position: relative; z-index: 1;
}
.hero-text h1 {
  font-family: var(--font-display);
  font-size: 3.5rem; line-height: 1.15;
  font-weight: 700; color: var(--brand-navy);
  letter-spacing: -0.03em; margin-bottom: 24px;
}
.hero-text h1 em { font-style: italic; color: var(--accent-ai); }
.hero-tagline {
  font-family: var(--font-cjk);
  font-size: 1.15rem; color: var(--text-secondary);
  line-height: 1.8; margin-bottom: 36px;
  max-width: 480px;
}
.hero-pillars { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 40px; }
.pillar-tag {
  display: flex; align-items: center; gap: 6px;
  padding: 8px 16px; border-radius: 100px;
  font-size: 0.82rem; font-weight: 500;
  font-family: var(--font-cjk);
  background: var(--bg-card);
  border: 1px solid var(--border);
  transition: all 0.2s;
}
.pillar-tag:hover { transform: translateY(-1px); box-shadow: var(--shadow-sm); }
.pillar-dot { width: 8px; height: 8px; border-radius: 50%; flex-shrink: 0; }
.hero-actions { display: flex; gap: 16px; }
.btn-primary {
  background: var(--brand-navy); color: #fff;
  padding: 14px 32px; border-radius: 10px;
  font-size: 0.95rem; font-weight: 500;
  text-decoration: none; transition: all 0.2s;
  font-family: var(--font-cjk);
}
.btn-primary:hover { background: var(--brand-navy-light); transform: translateY(-1px); box-shadow: var(--shadow-md); }
.btn-secondary {
  background: transparent; color: var(--brand-navy);
  padding: 14px 32px; border-radius: 10px;
  font-size: 0.95rem; font-weight: 500;
  text-decoration: none; border: 1.5px solid var(--border);
  transition: all 0.2s; font-family: var(--font-cjk);
}
.btn-secondary:hover { border-color: var(--brand-navy); background: rgba(27,45,79,0.03); }

.hero-visual { display: flex; justify-content: center; align-items: center; }
.hero-card-stack { position: relative; width: 400px; height: 440px; }
.hero-card {
  position: absolute; width: 320px;
  background: var(--bg-card); border-radius: var(--radius-lg);
  padding: 28px; box-shadow: var(--shadow-lg);
  border: 1px solid var(--border-light);
  transition: transform 0.4s cubic-bezier(0.23,1,0.32,1);
}
.hero-card:nth-child(1) { top: 0; left: 0; transform: rotate(-3deg); z-index: 3; }
.hero-card:nth-child(2) { top: 40px; left: 60px; transform: rotate(2deg); z-index: 2; }
.hero-card:nth-child(3) { top: 80px; left: 20px; transform: rotate(-1deg); z-index: 1; }
.hero-card-stack:hover .hero-card:nth-child(1) { transform: rotate(-3deg) translateY(-8px); }
.hero-card-stack:hover .hero-card:nth-child(2) { transform: rotate(2deg) translateX(8px); }
.hero-card-label {
  font-size: 0.72rem; font-weight: 600; text-transform: uppercase;
  letter-spacing: 0.08em; margin-bottom: 10px;
  display: flex; align-items: center; gap: 6px;
}
.hero-card p { font-size: 0.88rem; color: var(--text-secondary); line-height: 1.65; font-family: var(--font-cjk); }
.hero-card-meta { margin-top: 14px; font-size: 0.75rem; color: var(--text-muted); }

/* ===== Hero 右側 ===== */
.hero-right {
  display: flex;
  flex-direction: column;
  gap: 32px;
  align-items: center;
}

.hero-portrait {
  width: 100%;
  max-width: 360px;
  aspect-ratio: 1 / 1;
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-lg);
}

.portrait-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 20%;
}

.hero-featured-card {
  display: block;
  width: 100%;
  max-width: 360px;
  padding: 24px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  text-decoration: none;
  color: inherit;
  transition: box-shadow 0.2s, transform 0.2s;
}

.hero-featured-card:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}

.featured-label {
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--text-muted);
  font-weight: 600;
}

.hero-featured-card .featured-pillar {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.78rem;
  font-weight: 500;
  margin-top: 8px;
}

.hero-featured-card h3 {
  font-family: var(--font-cjk);
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--brand-navy);
  margin: 10px 0 8px;
  line-height: 1.4;
}

.hero-featured-card p {
  font-size: 0.85rem;
  color: var(--text-secondary);
  line-height: 1.5;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* ===== MANIFESTO ===== */
.manifesto { background: var(--brand-navy); color: #fff; position: relative; overflow: hidden; }
.manifesto::before {
  content: '';
  position: absolute; top: 0; left: 0; right: 0; bottom: 0;
  background: 
    radial-gradient(ellipse at 20% 50%, rgba(37,99,235,0.15) 0%, transparent 50%),
    radial-gradient(ellipse at 80% 50%, rgba(180,83,9,0.1) 0%, transparent 50%);
  pointer-events: none;
}
.manifesto-inner { max-width: 800px; margin: 0 auto; padding: 100px 40px; text-align: center; position: relative; z-index: 1; }
.manifesto-kicker { font-size: 0.72rem; font-weight: 600; letter-spacing: 0.15em; text-transform: uppercase; color: rgba(255,255,255,0.4); margin-bottom: 32px; }
.manifesto-quote { font-family: var(--font-display); font-size: 2rem; font-weight: 400; font-style: italic; line-height: 1.5; color: #fff; margin-bottom: 28px; letter-spacing: -0.01em; }
.manifesto-quote em { font-style: normal; color: var(--accent-ai); }
.manifesto-body { font-family: var(--font-cjk); font-size: 1rem; color: rgba(255,255,255,0.65); line-height: 1.9; max-width: 640px; margin: 0 auto 32px; }
.manifesto-cta { display: inline-block; font-size: 0.85rem; color: rgba(255,255,255,0.5); text-decoration: none; border-bottom: 1px solid rgba(255,255,255,0.2); padding-bottom: 2px; transition: all 0.2s; }
.manifesto-cta:hover { color: #fff; border-color: rgba(255,255,255,0.6); }

/* ===== FEATURED CONTENT ===== */
.section-container { max-width: var(--max-width); margin: 0 auto; padding: 60px 40px; }
.section-header { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 48px; }
.section-title { font-family: var(--font-display); font-size: 2rem; font-weight: 700; color: var(--brand-navy); letter-spacing: -0.02em; }
.section-link { font-size: 0.88rem; color: var(--text-muted); text-decoration: none; font-weight: 500; transition: color 0.2s; }
.section-link:hover { color: var(--brand-navy); }

.content-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.content-card { background: var(--bg-card); border-radius: var(--radius); border: 1px solid var(--border-light); padding: 32px; transition: all 0.3s; cursor: pointer; text-decoration: none; color: inherit; display: block; }
.content-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); border-color: transparent; }
.content-card-category { font-size: 0.72rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.08em; margin-bottom: 14px; display: flex; align-items: center; gap: 6px; }
.content-card h3 { font-family: var(--font-cjk); font-size: 1.1rem; font-weight: 700; line-height: 1.5; margin-bottom: 12px; color: var(--text-primary); }
.content-card p, .card-excerpt { font-size: 0.88rem; color: var(--text-secondary); line-height: 1.7; margin-bottom: 16px; text-align: justify; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.content-card-footer { display: flex; justify-content: space-between; align-items: center; font-size: 0.78rem; color: var(--text-muted); }
/* Cover image in cards */
.content-card.has-cover { padding: 0; overflow: hidden; }
.content-card.has-cover .card-cover { width: 100%; aspect-ratio: 16/9; overflow: hidden; }
.content-card.has-cover .card-cover img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.4s ease; }
.content-card.has-cover:hover .card-cover img { transform: scale(1.05); }
.content-card.has-cover .content-card-category,
.content-card.has-cover h3,
.content-card.has-cover p,
.content-card.has-cover .card-excerpt,
.content-card.has-cover .content-card-footer { padding-left: 24px; padding-right: 24px; }
.content-card.has-cover .content-card-category { padding-top: 20px; }
.content-card.has-cover .content-card-footer { padding-bottom: 24px; }
.platform-badge { padding: 3px 10px; border-radius: 100px; background: var(--bg-section); font-weight: 500; }

/* ===== PROJECTS ===== */
.projects-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 24px; }
.project-card { background: var(--bg-card); border-radius: var(--radius-lg); border: 1px solid var(--border-light); padding: 40px; transition: all 0.3s; position: relative; overflow: hidden; }
.project-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); }
.project-card::before { content: ''; position: absolute; top: 0; left: 0; right: 0; height: 4px; }
.project-card.circleflow::before { background: linear-gradient(90deg, var(--accent-circular), var(--accent-ai)); }
.project-card.sdti::before { background: linear-gradient(90deg, var(--accent-circular), var(--accent-faith)); }
.project-card.debate::before { background: linear-gradient(90deg, var(--accent-ai), var(--accent-life)); }
.project-card.brand::before { background: linear-gradient(90deg, var(--accent-startup), var(--accent-ai)); }
.project-card.scorecard::before { background: linear-gradient(90deg, var(--accent-ai), var(--accent-life)); }
.project-card.formosa-esg::before { background: linear-gradient(90deg, var(--accent-faith), var(--accent-circular)); }
.project-icon { width: 48px; height: 48px; border-radius: 12px; display: flex; align-items: center; justify-content: center; font-size: 1.4rem; margin-bottom: 20px; }
.project-card h3 { font-family: var(--font-cjk); font-size: 1.25rem; font-weight: 700; margin-bottom: 12px; }
.project-card p { font-size: 0.9rem; color: var(--text-secondary); line-height: 1.7; margin-bottom: 20px; }
.project-tags { display: flex; gap: 8px; flex-wrap: wrap; }
.project-tag { padding: 4px 12px; border-radius: 6px; font-size: 0.75rem; font-weight: 500; background: var(--bg-section); color: var(--text-secondary); }

/* ===== ABOUT ===== */
.about-section { background: var(--bg-section); }
.about-grid { display: grid; grid-template-columns: 1fr 2fr; gap: 80px; align-items: start; }
.about-photo { width: 340px; height: 420px; border-radius: var(--radius-lg); overflow: hidden; position: relative; } .about-photo img { width: 100%; height: 100%; object-fit: contain; object-position: center center; border-radius: 12px; }

.about-content h2 { font-family: var(--font-display); font-size: 2rem; font-weight: 700; color: var(--brand-navy); margin-bottom: 24px; }
.about-content p { font-size: 0.95rem; color: var(--text-secondary); line-height: 1.85; margin-bottom: 20px; font-family: var(--font-cjk); }
.about-timeline { margin-top: 40px; padding-top: 32px; border-top: 1px solid var(--border); }
.timeline-item { display: grid; grid-template-columns: 100px 1fr; gap: 20px; margin-bottom: 20px; }
.timeline-year { font-size: 0.82rem; font-weight: 700; color: var(--brand-navy); padding-top: 2px; }
.timeline-text { font-size: 0.88rem; color: var(--text-secondary); font-family: var(--font-cjk); }
.timeline-text strong { color: var(--text-primary); }

.about-pillars-section { margin-top: 48px; padding-top: 40px; border-top: 1px solid var(--border); }
.about-pillars-section h3 { font-family: var(--font-display); font-size: 1.3rem; font-weight: 700; color: var(--brand-navy); margin-bottom: 24px; }
.about-pillar-grid { display: grid; grid-template-columns: repeat(5, 1fr); gap: 20px; }
.about-pillar-item { padding: 28px 24px; border-radius: var(--radius); border: 1px solid var(--border-light); background: var(--bg-card); position: relative; overflow: hidden; transition: all 0.3s cubic-bezier(0.23,1,0.32,1); }
.about-pillar-item::before { content: ''; position: absolute; top: 0; left: 0; right: 0; height: 3px; background: var(--border-light); transition: all 0.3s; }
.about-pillar-link { text-decoration: none; color: inherit; display: block; }
.about-pillar-link:visited { color: inherit; }
.about-pillar-item:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); border-color: transparent; }
.about-pillar-item h2, .about-pillar-item h4 { font-family: var(--font-cjk); font-size: 0.95rem; font-weight: 700; margin-bottom: 10px; display: flex; align-items: center; gap: 8px; color: var(--text-primary); line-height: 1.5; }
.about-pillar-item p { font-size: 0.82rem; color: var(--text-secondary); line-height: 1.65; margin-bottom: 0; }
/* About CTA Card */
.about-cta-card { text-align: center; padding: 48px 40px; background: var(--bg-card); border-radius: var(--radius-lg); border: 1px solid var(--border-light); box-shadow: var(--shadow-sm); }
.about-cta-card p { font-size: 1.05rem; color: var(--text-secondary); max-width: 560px; margin: 0 auto 28px; line-height: 1.8; font-family: var(--font-cjk); }
.about-cta-actions { display: flex; gap: 16px; justify-content: center; flex-wrap: wrap; }

/* ===== FEED ===== */
.feed-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; }
.feed-item { background: var(--bg-card); border-radius: var(--radius); border: 1px solid var(--border-light); padding: 24px; transition: all 0.2s; }
.feed-item:hover { box-shadow: var(--shadow-sm); }
.feed-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 12px; }
.feed-platform { font-size: 0.75rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.06em; display: flex; align-items: center; gap: 5px; }
.feed-date { font-size: 0.75rem; color: var(--text-muted); }
.feed-item p { font-size: 0.88rem; color: var(--text-secondary); line-height: 1.65; font-family: var(--font-cjk); display: -webkit-box; -webkit-line-clamp: 4; -webkit-box-orient: vertical; overflow: hidden; }

/* ===== CONTACT ===== */
.contact-section { background: var(--brand-navy); color: #fff; }
.contact-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 80px; align-items: center; }
.contact-text h2 { font-family: var(--font-display); font-size: 2.2rem; font-weight: 700; margin-bottom: 16px; color: #fff; }
.contact-text p { font-size: 0.95rem; color: rgba(255,255,255,0.7); line-height: 1.8; margin-bottom: 32px; }
.social-links { display: flex; gap: 12px; flex-wrap: wrap; }
.social-link { display: flex; align-items: center; gap: 8px; padding: 10px 18px; border-radius: 10px; background: rgba(255,255,255,0.08); border: 1px solid rgba(255,255,255,0.12); color: #fff; font-size: 0.85rem; font-weight: 500; text-decoration: none; transition: all 0.2s; }
.social-link:hover { background: rgba(255,255,255,0.15); transform: translateY(-2px); }
.contact-form { background: rgba(255,255,255,0.06); border: 1px solid rgba(255,255,255,0.1); border-radius: var(--radius-lg); padding: 36px; }
.form-group { margin-bottom: 20px; }
.form-group label { display: block; font-size: 0.82rem; font-weight: 500; margin-bottom: 8px; color: rgba(255,255,255,0.8); }
.form-group input, .form-group textarea { width: 100%; padding: 12px 16px; background: rgba(255,255,255,0.06); border: 1px solid rgba(255,255,255,0.15); border-radius: 8px; color: #fff; font-size: 0.9rem; font-family: var(--font-body); outline: none; transition: border-color 0.2s; }
.form-group input:focus, .form-group textarea:focus { border-color: rgba(255,255,255,0.4); }
.form-group textarea { height: 120px; resize: vertical; }
.form-group input::placeholder, .form-group textarea::placeholder { color: rgba(255,255,255,0.3); }
.btn-submit { width: 100%; padding: 14px; background: #fff; color: var(--brand-navy); border: none; border-radius: 10px; font-size: 0.95rem; font-weight: 600; cursor: pointer; transition: all 0.2s; font-family: var(--font-cjk); }
.btn-submit:hover { opacity: 0.9; transform: translateY(-1px); }

/* ===== FOOTER ===== */
footer { text-align: center; padding: 40px; font-size: 0.82rem; color: var(--text-muted); border-top: 1px solid var(--border-light); }

/* ===== BLOG PAGE ===== */
.blog-hero { padding: 20px 0 40px; text-align: center; }
.blog-hero h1 { font-family: var(--font-display); font-size: 2.8rem; color: var(--brand-navy); margin-bottom: 16px; }
.blog-hero p { font-size: 1rem; color: var(--text-secondary); max-width: 560px; margin: 0 auto; }
.blog-filters { display: flex; gap: 10px; justify-content: center; margin: 40px 0; flex-wrap: wrap; }
.filter-btn { padding: 8px 20px; border-radius: 100px; border: 1.5px solid var(--border); background: transparent; font-size: 0.85rem; font-weight: 500; cursor: pointer; font-family: var(--font-cjk); color: var(--text-secondary); transition: all 0.2s; }
.filter-btn:hover, .filter-btn.active { background: var(--brand-navy); color: #fff; border-color: var(--brand-navy); }

/* ===== LOAD MORE ===== */
.hidden-card { display: none; }
.load-more-wrap { text-align: center; margin: 40px 0 20px; }
.load-more-btn { padding: 12px 32px; border-radius: 100px; border: 1.5px solid var(--border); background: transparent; font-size: 0.9rem; font-weight: 500; cursor: pointer; font-family: var(--font-cjk); color: var(--text-secondary); transition: all 0.2s; }
.load-more-btn:hover { background: var(--brand-navy); color: #fff; border-color: var(--brand-navy); }

/* ===== ANIMATIONS ===== */
@keyframes fadeInUp { from { opacity: 0; transform: translateY(24px); } to { opacity: 1; transform: translateY(0); } }
.animate-in { animation: fadeInUp 0.6s cubic-bezier(0.23,1,0.32,1) forwards; opacity: 0; }
.delay-1 { animation-delay: 0.1s; }
.delay-2 { animation-delay: 0.2s; }
.delay-3 { animation-delay: 0.3s; }
.delay-4 { animation-delay: 0.4s; }
.delay-5 { animation-delay: 0.5s; }

/* ===== TABLET BREAKPOINT ===== */
@media (max-width: 1024px) {
  .content-grid { grid-template-columns: repeat(2, 1fr); }
  .about-pillar-grid { grid-template-columns: repeat(3, 1fr); }
  .hero-inner { gap: 40px; }
  .about-grid { gap: 40px; }
  .contact-grid { gap: 40px; }
}

/* ===== MOBILE ===== */
@media (max-width: 768px) {
  .hero-inner { grid-template-columns: 1fr; gap: 40px; }
  .hero-text h1 { font-size: 2.4rem; }
  .hero-visual { display: none; }
  .hero-portrait { max-width: 200px; }
  .hero-featured-card { max-width: 100%; }
  .content-grid { grid-template-columns: 1fr; }
  .projects-grid { grid-template-columns: 1fr; }
  .about-grid { grid-template-columns: 1fr; gap: 40px; }
  .about-pillar-grid { grid-template-columns: 1fr; }
  .contact-grid { grid-template-columns: 1fr; gap: 40px; }
  .feed-grid { grid-template-columns: 1fr; }
  .nav-hamburger { display: block; }
  .lang-switcher { display: none; margin-left: 0; border-left: none; padding-left: 0; }
  .nav-links {
    display: none;
    flex-direction: column;
    position: absolute;
    top: var(--nav-height);
    left: 0;
    right: 0;
    background: var(--brand-navy);
    padding: 16px 24px;
    box-shadow: var(--shadow-lg);
    z-index: 101;
  }
  .nav-links.mobile-open { display: flex; max-height: calc(100vh - var(--nav-height)); overflow-y: auto; }
  .nav-links a {
    padding: 6px 0;
    font-size: 0.85rem;
    color: rgba(255,255,255,0.85);
    border-bottom: 1px solid rgba(255,255,255,0.1);
    width: 100%;
  }
  .nav-links a.active { color: #fff; }
  .nav-links a:last-of-type { border-bottom: none; }
  .nav-links .nav-cta {
    margin-top: 8px;
    text-align: center;
    border: 1px solid rgba(255,255,255,0.3) !important;
    color: rgba(255,255,255,0.9) !important;
    background: transparent !important;
  }
  .nav-inner { padding: 0 16px; }
  .section-container { padding: 60px 24px; }
  .hero { padding: 60px 24px; }
  .blog-filters { gap: 8px; }
  .filter-btn { padding: 6px 14px; font-size: 0.8rem; }
  /* P2: About photo — prevent overflow on mobile */
  .about-photo {
    width: 100%;
    max-width: 280px;
    height: auto;
    margin: 0 auto;
  }
  /* P3: Project card — reduce padding on mobile */
  .project-card { padding: 24px; }
  /* P5: Hero pillar tags — compact on mobile */
  .pillar-tag { padding: 6px 12px; font-size: 0.75rem; }
}

/* ===== ARTICLE PAGE — Base Structure ===== */
.article-page { max-width: 840px; margin: 0 auto; padding: 120px 24px 80px; }
.article-back { display: inline-flex; align-items: center; gap: 6px; font-size: 0.85rem; color: var(--text-muted); text-decoration: none; margin-bottom: 40px; transition: color 0.2s; }
.article-back:hover { color: var(--brand-navy); }
/* Article cover hero */
.article-cover { margin: -40px -24px 32px; width: calc(100% + 48px); border-radius: var(--radius); overflow: hidden; }
.article-cover img { width: 100%; height: auto; display: block; aspect-ratio: 16/9; object-fit: cover; }
/* Mobile-only language bar on article pages */
.article-mobile-lang-bar { display: none; }
@media (max-width: 768px) {
  .article-mobile-lang-bar {
    display: flex;
    gap: 8px;
    margin-bottom: 48px;
    position: relative;
    z-index: 1;
  }
  .article-mobile-lang-bar .lang-btn {
    font-size: 0.75rem;
    font-weight: 500;
    padding: 5px 12px;
    border-radius: 4px;
    border: 1px solid var(--border);
    background: none;
    color: var(--text-muted);
    text-decoration: none;
    transition: all 0.2s;
  }
  .article-mobile-lang-bar .lang-btn:hover { color: var(--text-primary); }
  .article-mobile-lang-bar .lang-btn.active {
    color: var(--brand-navy);
    border-color: var(--brand-navy);
    background: rgba(27,45,79,0.06);
  }
}
.article-meta { margin-bottom: 48px; }
.article-pillar { font-size: 0.72rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.08em; margin-bottom: 16px; display: flex; align-items: center; gap: 6px; }
.article-meta h1 { font-family: var(--font-display); font-size: 2.4rem; font-weight: 700; color: var(--brand-navy); line-height: 1.25; letter-spacing: -0.02em; margin-bottom: 20px; }
.article-meta .article-subtitle { font-family: var(--font-cjk); font-size: 1.1rem; color: var(--text-secondary); line-height: 1.8; margin-bottom: 24px; }
.article-info { display: flex; gap: 24px; align-items: center; font-size: 0.82rem; color: var(--text-muted); padding-top: 20px; border-top: 1px solid var(--border-light); }
.article-info time { font-weight: 500; }

/* Article body — shared across all languages */
.article-body { font-family: var(--font-cjk); max-width: 650px; }
.article-body h2 { font-family: var(--font-cjk); font-size: 1.4rem; font-weight: 700; color: var(--brand-navy); margin: 56px 0 20px; padding-top: 20px; border-top: 1px solid var(--border-light); }
.article-body h3 { font-size: 1.15rem; font-weight: 700; color: var(--text-primary); margin: 40px 0 16px; }
.article-body blockquote { margin: 32px 0; padding: 20px 24px; border-left: 3px solid var(--accent-faith); background: var(--bg-section); border-radius: 0 8px 8px 0; font-style: italic; color: var(--text-secondary); }
.article-body blockquote p { margin-bottom: 0; font-size: 1rem; }
.article-body ul, .article-body ol { margin: 20px 0; padding-left: 24px; }
.article-body li { font-size: 1.05rem; color: var(--text-primary); margin-bottom: 8px; }
.article-body strong { color: var(--brand-navy); }
.article-body a { color: var(--accent-ai); text-decoration: underline; text-underline-offset: 3px; }
.article-body a:hover { color: var(--brand-navy); }
/* Article body images — unified aspect ratio */
.article-body img {
  width: 100%;
  max-height: 500px;
  object-fit: contain;
  border-radius: 8px;
  margin: 24px 0;
  display: block;
  background: #1a1f2e;
}
.article-body .callout { margin: 36px 0; padding: 24px; background: rgba(37,99,235,0.04); border: 1px solid rgba(37,99,235,0.12); border-radius: 12px; }
.article-body .callout p { margin-bottom: 0; font-size: 0.95rem; }
.article-tags { margin-top: 56px; padding-top: 24px; border-top: 1px solid var(--border-light); display: flex; gap: 8px; flex-wrap: wrap; }
.article-tag { padding: 4px 12px; border-radius: 6px; font-size: 0.75rem; font-weight: 500; background: var(--bg-section); color: var(--text-secondary); }
.article-nav-bottom { margin-top: 48px; padding-top: 32px; border-top: 1px solid var(--border); display: flex; justify-content: space-between; }
.article-nav-bottom a { font-size: 0.88rem; color: var(--text-muted); text-decoration: none; transition: color 0.2s; }
.article-nav-bottom a:hover { color: var(--brand-navy); }

/* ===== ARTICLE — English Typography ===== */
html[lang="en"] .article-body p {
  font-size: 1.05rem;
  line-height: 1.35;
  color: var(--text-primary);
  margin-bottom: 10px;
  letter-spacing: normal;
}
html[lang="en"] .article-body li {
  line-height: 1.35;
}

/* ===== ARTICLE — Traditional Chinese Typography ===== */
html[lang="zh-Hant"] ,
html[lang="zh-TW"] {
  --font-cjk: ui-sans-serif, system-ui, 'PingFang TC', 'Heiti TC', '微軟正黑體', 'Noto Sans TC', sans-serif;
  --font-body: 'DM Sans', ui-sans-serif, system-ui, 'PingFang TC', 'Heiti TC', '微軟正黑體', 'Noto Sans TC', sans-serif;
}
html[lang="zh-Hant"] .article-body,
html[lang="zh-TW"] .article-body {
  font-family: var(--font-cjk);
  letter-spacing: normal;
  text-align: justify;
  text-justify: inter-ideograph;
}
html[lang="zh-Hant"] .article-body p,
html[lang="zh-TW"] .article-body p {
  font-size: 1.05rem;
  line-height: 1.25;
  margin-bottom: 0.5em;
  color: var(--text-primary);
  letter-spacing: normal;
}
html[lang="zh-Hant"] .article-body h2,
html[lang="zh-TW"] .article-body h2 {
  margin: 40px 0 16px;
}
html[lang="zh-Hant"] .article-body h3,
html[lang="zh-TW"] .article-body h3 {
  margin: 32px 0 12px;
}
html[lang="zh-Hant"] .article-body li,
html[lang="zh-TW"] .article-body li {
  line-height: 1.25;
  margin-bottom: 6px;
}
html[lang="zh-Hant"] .article-body blockquote p,
html[lang="zh-TW"] .article-body blockquote p {
  line-height: 1.25;
}
html[lang="zh-Hant"] .hero-tagline,
html[lang="zh-TW"] .hero-tagline,
html[lang="zh-Hant"] .manifesto-body,
html[lang="zh-TW"] .manifesto-body,
html[lang="zh-Hant"] .about-content p,
html[lang="zh-TW"] .about-content p {
  letter-spacing: normal;
  line-height: 1.25;
  text-align: justify;
  text-justify: inter-ideograph;
}

/* ===== ARTICLE — Simplified Chinese Typography ===== */
html[lang="zh-Hans"],
html[lang="zh-CN"] {
  --font-cjk: ui-sans-serif, system-ui, 'PingFang SC', 'Heiti SC', 'Microsoft YaHei', 'Noto Sans SC', sans-serif;
  --font-body: 'DM Sans', ui-sans-serif, system-ui, 'PingFang SC', 'Heiti SC', 'Microsoft YaHei', 'Noto Sans SC', sans-serif;
}
html[lang="zh-Hans"] .article-body,
html[lang="zh-CN"] .article-body {
  font-family: var(--font-cjk);
  letter-spacing: normal;
  text-align: justify;
  text-justify: inter-ideograph;
}
html[lang="zh-Hans"] .article-body p,
html[lang="zh-CN"] .article-body p {
  font-size: 1.05rem;
  line-height: 1.25;
  margin-bottom: 0.5em;
  color: var(--text-primary);
  letter-spacing: normal;
}
html[lang="zh-Hans"] .article-body li,
html[lang="zh-CN"] .article-body li {
  line-height: 1.25;
}
html[lang="zh-Hans"] .hero-tagline,
html[lang="zh-CN"] .hero-tagline,
html[lang="zh-Hans"] .manifesto-body,
html[lang="zh-CN"] .manifesto-body,
html[lang="zh-Hans"] .about-content p,
html[lang="zh-CN"] .about-content p {
  letter-spacing: normal;
  line-height: 1.25;
  text-align: justify;
  text-justify: inter-ideograph;
}

/* ===== ARTICLE — Japanese Typography ===== */
html[lang="ja"] {
  --font-cjk: ui-sans-serif, system-ui, 'Hiragino Sans', 'Hiragino Kaku Gothic ProN', 'Noto Sans JP', 'Meiryo', sans-serif;
  --font-body: 'DM Sans', ui-sans-serif, system-ui, 'Hiragino Sans', 'Hiragino Kaku Gothic ProN', 'Noto Sans JP', 'Meiryo', sans-serif;
}
html[lang="ja"] .article-body {
  font-family: var(--font-cjk);
  letter-spacing: 0.03em;
  text-align: justify;
  text-justify: inter-ideograph;
  font-feature-settings: "palt" 1;
}
html[lang="ja"] .article-body p {
  font-size: 1.05rem;
  line-height: 1.35;
  margin-bottom: 0.7em;
  color: var(--text-primary);
}
html[lang="ja"] .article-body li {
  line-height: 1.35;
}
html[lang="ja"] .hero-tagline,
html[lang="ja"] .manifesto-body,
html[lang="ja"] .about-content p {
  letter-spacing: 0.03em;
  line-height: 1.35;
  text-align: justify;
  text-justify: inter-ideograph;
  font-feature-settings: "palt" 1;
}

/* ===== ARTICLE — Mobile Responsive ===== */
@media (max-width: 768px) {
  .article-page { padding: 8px 20px 60px; }
  .article-meta h1 { font-size: 1.8rem; }
  .article-body p { font-size: 1rem; }
  .article-info { flex-wrap: wrap; gap: 12px; }
}

.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; }


/* ============================================
   Article Page Enhancements (v2)
   ============================================ */

/* Author Card */
.author-card {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1.5rem;
  margin: 2.5rem 0 1.5rem;
  background: var(--bg-card, #f8f7f4);
  border-radius: 12px;
  border: 1px solid var(--border-subtle, #e5e2db);
}
.author-avatar {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
}
.author-info strong {
  display: block;
  font-size: 1rem;
  margin-bottom: 0.25rem;
}
.author-info p {
  font-size: 0.9rem;
  color: var(--text-muted, #8a8578);
  margin: 0;
  line-height: 1.5;
}

/* Share Buttons */
.share-buttons {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin: 1rem 0 2rem;
}
.share-label {
  font-size: 0.9rem;
  color: var(--text-muted, #8a8578);
}
.share-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border: 1px solid var(--border-subtle, #e5e2db);
  border-radius: 50%;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-secondary, #5a574f);
  text-decoration: none;
  transition: all 0.2s;
}
.share-btn:hover {
  border-color: var(--accent-ai, #2563eb);
  color: var(--accent-ai, #2563eb);
  background: rgba(37, 99, 235, 0.05);
}
.share-line {
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: -0.02em;
}
.share-line:hover {
  border-color: #06C755;
  color: #06C755;
  background: rgba(6, 199, 85, 0.05);
}
.share-fb {
  font-size: 1rem;
  font-weight: 700;
}
.share-fb:hover {
  border-color: #1877F2;
  color: #1877F2;
  background: rgba(24, 119, 242, 0.05);
}
.share-copy {
  width: auto;
  padding: 0 12px;
  border-radius: 100px;
  font-size: 0.75rem;
  cursor: pointer;
  background: transparent;
  font-family: inherit;
}
.share-copy:hover {
  border-color: var(--accent-circular, #059669);
  color: var(--accent-circular, #059669);
  background: rgba(5, 150, 105, 0.05);
}

/* Article Prev/Next Navigation */
.article-nav {
  position: static;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
  margin: 3rem 0 2rem;
  padding-top: 2rem;
  border-top: 1px solid var(--border-subtle, #e5e2db);
}
.article-nav-link {
  padding: 1.25rem;
  border: 1px solid var(--border-subtle, #e5e2db);
  border-radius: 8px;
  text-decoration: none;
  transition: border-color 0.2s, background 0.2s;
}
.article-nav-link:hover {
  border-color: var(--accent-ai, #2563eb);
  background: var(--bg-card, #f8f7f4);
}
.article-nav-link.next {
  text-align: right;
}
.article-nav .nav-label {
  display: block;
  font-size: 0.85rem;
  color: var(--text-muted, #8a8578);
  margin-bottom: 0.4rem;
}
.article-nav .nav-title {
  display: block;
  font-weight: 500;
  color: var(--text-primary, #2c2a25);
  line-height: 1.4;
  font-size: 0.95rem;
}

/* Related Articles */
.related-articles {
  margin: 2.5rem 0;
}
.related-articles h2 {
  font-size: 1.3rem;
  margin-bottom: 1.25rem;
  font-weight: 600;
}
.related-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1.25rem;
}
.related-card {
  padding: 1.25rem;
  border: 1px solid var(--border-subtle, #e5e2db);
  border-radius: 8px;
  text-decoration: none;
  transition: border-color 0.2s, transform 0.15s;
}
.related-card:hover {
  border-color: var(--accent-ai, #2563eb);
  transform: translateY(-2px);
}
.related-card h3 {
  font-size: 1rem;
  color: var(--text-primary, #2c2a25);
  margin: 0.6rem 0 0.4rem;
  line-height: 1.4;
}
.related-card time {
  font-size: 0.85rem;
  color: var(--text-muted, #8a8578);
}
.related-pillar {
  font-size: 0.8rem;
}

/* Back to Blog CTA */
.article-back {
  text-align: center;
  margin: 2rem 0 3rem;
}
.back-to-blog {
  display: inline-block;
  padding: 0.75rem 2rem;
  border: 1px solid var(--border-subtle, #e5e2db);
  border-radius: 24px;
  color: var(--text-secondary, #5a574f);
  text-decoration: none;
  transition: all 0.2s;
}
.back-to-blog:hover {
  border-color: var(--accent-ai, #2563eb);
  color: var(--text-primary, #2c2a25);
  background: var(--bg-card, #f8f7f4);
}

/* Mobile responsive */
@media (max-width: 640px) {
  .article-nav {
    grid-template-columns: 1fr;
    gap: 1rem;
  }
  .article-nav-link.next {
    text-align: left;
  }
  .related-grid {
    grid-template-columns: 1fr;
  }
  .author-card {
    flex-direction: column;
    text-align: center;
  }
}

/* ===== FOOTER ===== */
footer {
  background: var(--brand-navy);
  color: rgba(255,255,255,0.8);
  padding: 48px 24px 24px;
  margin-top: 64px;
}
/* Remove gap when footer follows dark contact section */
.contact-section + footer,
.has-contact-section footer {
  margin-top: 0;
}
.footer-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 32px;
  align-items: start;
}
.footer-logo {
  font-family: var(--font-display);
  font-size: 1.2rem;
  font-weight: 700;
  color: #fff;
  text-decoration: none;
}
.footer-tagline {
  font-size: 0.85rem;
  color: rgba(255,255,255,0.5);
  margin: 4px 0 0;
}
.footer-social-label {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: rgba(255,255,255,0.5);
  display: block;
  margin-bottom: 8px;
}
.footer-social-links {
  display: flex;
  gap: 8px;
}
.footer-social-links a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border: 1px solid rgba(255,255,255,0.2);
  border-radius: 50%;
  color: rgba(255,255,255,0.8);
  text-decoration: none;
  font-size: 0.85rem;
  font-weight: 600;
  transition: all 0.2s;
}
.footer-social-links a:hover {
  border-color: rgba(255,255,255,0.6);
  color: #fff;
  background: rgba(255,255,255,0.1);
}
.footer-bottom {
  grid-column: 1 / -1;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 24px;
  border-top: 1px solid rgba(255,255,255,0.1);
  font-size: 0.8rem;
  color: rgba(255,255,255,0.4);
}
.footer-rss {
  color: rgba(255,255,255,0.5);
  text-decoration: none;
  font-size: 0.8rem;
  border: 1px solid rgba(255,255,255,0.2);
  padding: 4px 12px;
  border-radius: 12px;
  transition: all 0.2s;
}
.footer-rss:hover {
  border-color: rgba(255,255,255,0.5);
  color: #fff;
}
@media (max-width: 640px) {
  .footer-inner {
    grid-template-columns: 1fr;
    gap: 24px;
  }
}

/* Event Footer (formosa-esg-2026) */
.event-footer .footer-social-links {
  flex-wrap: wrap;
}
.event-footer .footer-social-links a {
  font-size: 0.82rem;
  border: none;
  width: auto;
  height: auto;
  padding: 4px 0;
  color: rgba(255,255,255,0.7);
}
.event-footer .footer-social-links a:hover {
  color: #fff;
  background: none;
  border: none;
  text-decoration: underline;
}
.footer-powered {
  grid-column: 1 / -1;
  text-align: center;
  font-size: 0.75rem;
  color: var(--text-muted, rgba(255,255,255,0.4));
  margin-top: 4px;
}
.footer-powered a {
  color: var(--text-muted, rgba(255,255,255,0.5));
  text-decoration: underline;
}
.footer-powered a:hover {
  color: #fff;
}

/* ===== FONT SIZE TOGGLE ===== */
.font-size-toggle {
  position: fixed;
  right: 20px;
  bottom: 20px;
  z-index: 50;
  display: flex;
  gap: 4px;
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: 20px;
  padding: 4px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}
.font-size-btn {
  width: 32px;
  height: 32px;
  border: none;
  border-radius: 50%;
  background: transparent;
  color: var(--text-secondary);
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
}
.font-size-btn:hover {
  background: var(--bg-hover, rgba(0,0,0,0.05));
  color: var(--text-primary);
}
.font-size-btn.active {
  background: var(--brand-navy);
  color: #fff;
}


/* ===== SEARCH PAGE ===== */
.search-page {
  max-width: 720px;
  margin: 0 auto;
  padding: 120px 24px 80px;
}
.search-page h1 {
  font-size: 1.8rem;
  margin-bottom: 8px;
}
.search-hint {
  font-size: 0.9rem;
  color: var(--text-muted);
  margin-bottom: 24px;
}
.search-box {
  margin-bottom: 32px;
}
.search-box input {
  width: 100%;
  padding: 14px 20px;
  font-size: 1rem;
  border: 2px solid var(--border-subtle);
  border-radius: 12px;
  background: var(--bg-card);
  color: var(--text-primary);
  outline: none;
  transition: border-color 0.2s;
}
.search-box input:focus {
  border-color: var(--accent-ai);
}
.search-results {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.search-result-card {
  padding: 16px 20px;
  border: 1px solid var(--border-subtle);
  border-radius: 8px;
  text-decoration: none;
  transition: border-color 0.2s, background 0.2s;
}
.search-result-card:hover {
  border-color: var(--accent-ai);
  background: var(--bg-card);
}
.search-result-card h3 {
  font-size: 1rem;
  color: var(--text-primary);
  margin: 4px 0;
  line-height: 1.4;
}
.search-result-card p {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin: 0;
}
.search-date {
  font-size: 0.75rem;
  color: var(--text-muted);
}
.search-empty {
  text-align: center;
  color: var(--text-muted);
  font-size: 0.95rem;
  padding: 32px 0;
}
/* Mobile lang group inside hamburger menu */
.mobile-lang-divider { display: none; }
.mobile-lang-group { display: none; }
@media (max-width: 768px) {
  .mobile-lang-divider {
    display: block;
    width: 100%;
    height: 1px;
    background: rgba(255,255,255,0.15);
    margin: 8px 0 4px;
  }
  .mobile-lang-group {
    display: flex;
    gap: 6px;
    width: 100%;
    order: -1;
    margin-top: 8px;
    padding-bottom: 12px;
    border-bottom: 1px solid rgba(255,255,255,0.1);
  }
  /* P4: Touch targets — increase tap area for lang buttons */
  .mobile-lang-group .lang-btn {
    font-size: 0.78rem;
    padding: 8px 14px;
    min-height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid rgba(255,255,255,0.2);
    border-radius: 4px;
    color: rgba(255,255,255,0.7);
    text-decoration: none;
  }
  .mobile-lang-group .lang-btn.active {
    background: rgba(255,255,255,0.15);
    color: #fff;
  }
}

/* === Focus Mode === */
.focus-mode-btn {
  position: fixed;
  bottom: 24px;
  right: 80px;
  z-index: 999;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 1px solid var(--border, #d1d5db);
  background: var(--bg-card, #fff);
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  transition: all 0.3s ease;
}
.focus-mode-btn:hover {
  background: var(--bg-hover, #f3f4f6);
  box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}
body.focus-mode #main-nav,
body.focus-mode .cost-ticker {
  transition: transform 0.4s ease, opacity 0.4s ease;
}
body.focus-mode .article-page {
  max-width: 720px;
  margin: 0 auto;
}

/* === Career Timeline === */
.career-timeline {
  max-width: 720px;
  margin: 0 auto;
  padding: 40px 0;
}
.career-section-title {
  font-size: 1rem;
  font-weight: 600;
  color: var(--brand-navy, #1b2d4f);
  margin-bottom: 20px;
  padding-bottom: 8px;
  border-bottom: 2px solid var(--brand-navy, #1b2d4f);
}
.career-item {
  padding: 16px 0;
  border-bottom: 1px solid var(--border, #e5e7eb);
}
.career-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
  flex-wrap: wrap;
}
.career-header strong {
  font-size: 0.95rem;
}
.career-role {
  display: block;
  font-size: 0.82rem;
  color: var(--text-secondary, #6b7280);
  margin-top: 2px;
}
.career-period {
  flex-shrink: 0;
  font-size: 0.8rem;
  color: var(--text-secondary, #6b7280);
  white-space: nowrap;
}
.career-desc {
  font-size: 0.85rem;
  color: var(--text-secondary, #6b7280);
  margin-top: 8px;
  line-height: 1.5;
}

/* === Tags Link === */
.tags-link {
  display: inline-block;
  margin-top: 12px;
  font-size: 0.85rem;
  color: var(--brand-navy, #1b2d4f);
  text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: border-color 0.2s;
}
.tags-link:hover { border-bottom-color: var(--brand-navy, #1b2d4f); }

/* === Reading Time === */
.reading-time {
  color: var(--text-secondary, #6b7280);
  font-size: 0.82rem;
}

/* === Year Filter Pills === */
.blog-year-filters {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 24px;
}
.year-btn {
  padding: 6px 14px;
  border: 1px solid var(--border, #d1d5db);
  border-radius: 20px;
  background: transparent;
  color: var(--text-secondary, #6b7280);
  font-size: 0.82rem;
  cursor: pointer;
  transition: all 0.2s;
}
.year-btn:hover {
  border-color: var(--brand-navy, #1b2d4f);
  color: var(--brand-navy, #1b2d4f);
}
.year-btn.active {
  background: var(--brand-navy, #1b2d4f);
  color: #fff;
  border-color: var(--brand-navy, #1b2d4f);
}
/* =============================================
   FOCUS-VISIBLE — WCAG 2.1 AA Keyboard Navigation
   paulkuo.tw accessibility patch
   ============================================= */

/*
 * Strategy:
 * - :focus-visible only fires on keyboard nav (Tab), not mouse clicks
 * - 2px offset outline in brand-navy, won't clash with existing hover states
 * - Specific overrides for dark-bg sections (manifesto, contact, footer)
 */

/* === Global Default === */
:focus-visible {
  outline: 2px solid var(--brand-navy);
  outline-offset: 3px;
  border-radius: 4px;
}

/* Remove the default outline on mouse click (keep for keyboard only) */
:focus:not(:focus-visible) {
  outline: none;
}

/* === Nav Links & Logo === */
.nav-logo:focus-visible,
.nav-links a:focus-visible,
.nav-cta:focus-visible,
.nav-dropdown-menu a:focus-visible {
  outline: 2px solid var(--brand-navy);
  outline-offset: 3px;
  border-radius: 4px;
}

/* === Language Switcher === */
.lang-btn:focus-visible {
  outline: 2px solid var(--brand-navy);
  outline-offset: 2px;
  border-radius: 4px;
}

/* === Buttons === */
.btn-primary:focus-visible {
  outline: 2px solid #fff;
  outline-offset: 3px;
  border-radius: 10px;
}

.btn-secondary:focus-visible {
  outline: 2px solid var(--brand-navy);
  outline-offset: 3px;
  border-radius: 10px;
}

.filter-btn:focus-visible,
.year-btn:focus-visible,
.load-more-btn:focus-visible {
  outline: 2px solid var(--brand-navy);
  outline-offset: 2px;
}

/* === Cards (clickable) === */
.content-card:focus-visible,
.project-card:focus-visible,
.related-card:focus-visible,
.search-result-card:focus-visible,
.feed-item:focus-visible {
  outline: 2px solid var(--accent-ai);
  outline-offset: 2px;
  border-radius: var(--radius);
}

/* === Article Page Links === */
.article-body a:focus-visible {
  outline: 2px solid var(--accent-ai);
  outline-offset: 2px;
  border-radius: 2px;
}

.article-back:focus-visible,
.article-nav-link:focus-visible,
.back-to-blog:focus-visible {
  outline: 2px solid var(--brand-navy);
  outline-offset: 3px;
  border-radius: 8px;
}

/* === Share Buttons === */
.share-btn:focus-visible {
  outline: 2px solid var(--accent-ai);
  outline-offset: 2px;
}

/* === Pillar Tags === */
.pillar-tag:focus-visible {
  outline: 2px solid var(--brand-navy);
  outline-offset: 2px;
}

/* === Form Inputs (enhance existing :focus) === */
.form-group input:focus-visible,
.form-group textarea:focus-visible {
  border-color: rgba(255,255,255,0.6);
  outline: 2px solid rgba(255,255,255,0.4);
  outline-offset: 1px;
}

.search-box input:focus-visible {
  border-color: var(--accent-ai);
  outline: none; /* border change is sufficient */
}

/* === Dark Background Sections === */
/* Manifesto, Contact, Footer — need light outlines to be visible */
.manifesto a:focus-visible,
.manifesto-cta:focus-visible {
  outline: 2px solid rgba(255,255,255,0.7);
  outline-offset: 3px;
}

.contact-section a:focus-visible,
.social-link:focus-visible {
  outline: 2px solid rgba(255,255,255,0.7);
  outline-offset: 3px;
  border-radius: 10px;
}

.btn-submit:focus-visible {
  outline: 2px solid var(--brand-navy);
  outline-offset: 3px;
  border-radius: 10px;
}

/* Footer links */
footer a:focus-visible,
.footer-logo:focus-visible,
.footer-social-links a:focus-visible,
.footer-rss:focus-visible {
  outline: 2px solid rgba(255,255,255,0.7);
  outline-offset: 3px;
}

/* === Hamburger Menu Button === */
.nav-hamburger:focus-visible {
  outline: 2px solid var(--brand-navy);
  outline-offset: 3px;
  border-radius: 4px;
}

/* === Utility Buttons (font size, focus mode) === */
.font-size-btn:focus-visible {
  outline: 2px solid var(--brand-navy);
  outline-offset: 2px;
}

.focus-mode-btn:focus-visible {
  outline: 2px solid var(--brand-navy);
  outline-offset: 3px;
}

/* === Skip to Content === */
.skip-link {
  position: absolute;
  left: -9999px;
  z-index: 9999;
  padding: 8px 16px;
  background: var(--brand-navy);
  color: white;
  text-decoration: none;
  border-radius: 0 0 4px 0;
  font-size: 0.9rem;
  font-weight: 600;
}
.skip-link:focus {
  left: 0;
  top: 0;
}

/* ===== MOBILE UI PRESSURE RELIEF (2026-03-06) ===== */
/* Hide floating font toggle and focus mode on mobile — controls moved to nav */
@media (max-width: 768px) {
  .font-size-toggle { display: none !important; }
  .focus-mode-btn { display: none !important; }
  /* ReadingTracker card: smaller on mobile */
  #readingTracker {
    bottom: 12px !important;
    left: 12px !important;
    max-width: 240px !important;
    padding: 10px 14px !important;
    font-size: 0.8rem !important;
  }
}

/* Mobile font controls in hamburger menu */
.mobile-font-group {
  display: none;
}
@media (max-width: 768px) {
  .mobile-font-group {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 24px;
    border-top: 1px solid rgba(255,255,255,0.1);
  }
  .mobile-font-label {
    font-size: 0.75rem;
    color: rgba(255,255,255,0.5);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-right: 4px;
  }
  .mobile-font-btn {
    width: 36px;
    height: 36px;
    border: 1px solid rgba(255,255,255,0.2);
    border-radius: 50%;
    background: transparent;
    color: rgba(255,255,255,0.7);
    font-weight: 600;
    font-size: 0.85rem;
    cursor: pointer;
    transition: all 0.2s;
  }
  .mobile-font-btn:hover {
    background: rgba(255,255,255,0.1);
  }
  .mobile-font-btn.active {
    background: rgba(255,255,255,0.2);
    color: #fff;
    border-color: rgba(255,255,255,0.4);
  }
}

/* ===== HERO TEXT HIERARCHY (2026-03-06) ===== */
.hero-identity {
  font-family: var(--font-body);
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 8px;
  letter-spacing: 0.02em;
}
.hero-bio {
  font-family: var(--font-cjk);
  font-size: 0.95rem;
  color: var(--text-secondary);
  line-height: 1.85;
  margin-bottom: 12px;
  max-width: 520px;
}
@media (max-width: 768px) {
  .hero-identity { font-size: 1rem; }
  .hero-tagline { font-size: 1rem; margin-bottom: 20px; }
  .hero-bio { font-size: 0.88rem; line-height: 1.8; }
}

/* ===== AUTH UI (2026-03-06) ===== */
.nav-auth {
  display: flex; align-items: center;
  margin-left: 8px; margin-right: 4px;
}
.nav-auth-login {
  display: flex; align-items: center; gap: 6px;
  background: none; border: 1px solid var(--border);
  border-radius: 20px; padding: 5px 14px 5px 10px;
  font-size: 0.82rem; font-weight: 500;
  color: var(--text-secondary); cursor: pointer;
  transition: all 0.2s; font-family: inherit;
}
.nav-auth-login:hover {
  border-color: var(--brand-navy); color: var(--brand-navy);
  box-shadow: var(--shadow-sm);
}
.nav-auth-login svg { flex-shrink: 0; }
.nav-auth-user {
  display: flex; align-items: center; gap: 8px;
  cursor: pointer; position: relative;
  padding: 4px 8px; border-radius: 20px;
  transition: background 0.2s;
}
.nav-auth-user:hover { background: rgba(0,0,0,0.04); }
.nav-auth-avatar {
  width: 28px; height: 28px; border-radius: 50%;
  object-fit: cover; border: 2px solid var(--border-light);
}
.nav-auth-name {
  font-size: 0.82rem; font-weight: 500;
  color: var(--text-primary); max-width: 100px;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.nav-auth-dropdown {
  position: absolute; top: calc(100% + 8px); right: 0;
  background: #fff; border: 1px solid var(--border);
  border-radius: 10px; box-shadow: var(--shadow-md);
  padding: 8px 0; min-width: 180px;
  opacity: 0; visibility: hidden;
  transition: opacity 0.15s, visibility 0.15s;
  z-index: 1000;
}
.nav-auth-dropdown.open { opacity: 1; visibility: visible; }
.nav-auth-dropdown-info {
  padding: 8px 16px; font-size: 0.78rem;
  color: var(--text-muted); border-bottom: 1px solid var(--border-light);
  margin-bottom: 4px; word-break: break-all;
}
.nav-auth-dropdown-logout {
  display: block; width: 100%; text-align: left;
  padding: 8px 16px; font-size: 0.82rem;
  color: var(--text-secondary); background: none; border: none;
  cursor: pointer; font-family: inherit;
  transition: background 0.12s, color 0.12s;
}
.nav-auth-dropdown-logout:hover {
  background: #fef2f2; color: #dc2626;
}

/* Auth — mobile */
.nav-auth-mobile { display: none; }
.nav-auth-login-mobile {
  display: flex; align-items: center; gap: 6px;
  font-size: 0.85rem; font-weight: 500;
  color: rgba(255,255,255,0.85); text-decoration: none;
  padding: 8px 0;
}
.nav-auth-login-mobile:hover { color: #fff; }
.nav-auth-user-mobile {
  display: flex; align-items: center; gap: 8px;
  padding: 8px 0;
}
.nav-auth-user-mobile img {
  width: 24px; height: 24px; border-radius: 50%;
  border: 2px solid rgba(255,255,255,0.3);
}
.nav-auth-user-mobile span {
  font-size: 0.85rem; color: rgba(255,255,255,0.85);
}
.nav-auth-logout-mobile {
  margin-left: auto; background: none; border: 1px solid rgba(255,255,255,0.3);
  color: rgba(255,255,255,0.7); font-size: 0.78rem;
  padding: 3px 10px; border-radius: 12px; cursor: pointer;
  font-family: inherit;
}
.nav-auth-logout-mobile:hover {
  border-color: rgba(255,255,255,0.6); color: #fff;
}

@media (max-width: 768px) {
  .nav-auth { display: none; }
  .nav-auth-mobile { display: block; }
}
/* Auth multi-provider dropdown */
.nav-auth-login-wrap {
  position: relative; display: flex; align-items: center;
}
.nav-auth-providers {
  position: absolute; top: calc(100% + 8px); right: 0;
  background: #fff; border: 1px solid var(--border);
  border-radius: 10px; box-shadow: var(--shadow-md);
  padding: 6px; min-width: 160px;
  opacity: 0; visibility: hidden;
  transition: opacity 0.15s, visibility 0.15s;
  z-index: 1000;
}
.nav-auth-providers.open { opacity: 1; visibility: visible; }
.nav-auth-provider {
  display: flex; align-items: center; gap: 10px;
  padding: 9px 14px; border-radius: 7px;
  font-size: 0.82rem; font-weight: 500;
  color: var(--text-primary); text-decoration: none;
  transition: background 0.12s;
}
.nav-auth-provider:hover { background: rgba(0,0,0,0.04); }
.nav-auth-provider-line:hover { background: rgba(6,199,85,0.06); }

/* Mobile provider links */
.nav-auth-mobile-providers {
  display: flex; flex-direction: column; gap: 4px;
}
.nav-auth-login-mobile-line svg { margin-right: 2px; }

.nav-auth-provider-fb:hover { background: rgba(24,119,242,0.06); }

/* Article table styles */
.article-body table {
  width: 100%;
  border-collapse: collapse;
  margin: 1.5em 0;
  font-size: 0.92rem;
  line-height: 1.6;
}
.article-body th,
.article-body td {
  border: 1px solid var(--border-color, #e0e0e0);
  padding: 0.6em 0.8em;
  text-align: left;
  vertical-align: top;
}
.article-body th {
  background: var(--bg-secondary, #f5f5f5);
  font-weight: 600;
}
.article-body tr:hover {
  background: rgba(0, 0, 0, 0.02);
}
@media (max-width: 768px) {
  .article-body table {
    display: block;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }
}
