/* ===== 快樂溫暖風格 Warm & Happy theme ===== */
:root {
  --bg: #fffaf2;
  --tint: #fff1de;
  --card: #ffffff;
  --ink: #3b2c24;
  --muted: #7a6558;
  --coral: #e8704f;
  --coral-dark: #c4532f;
  --sun: #f6b93b;
  --sun-soft: #ffe3a3;
  --mint: #4fae9b;
  --line: #f1dcc4;
  --radius: 22px;
  --shadow: 0 6px 24px rgba(160, 90, 40, .10);
  --font: "Nunito", "Noto Sans TC", "PingFang TC", "Microsoft JhengHei", system-ui, sans-serif;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 84px; }
body { margin: 0; font-family: var(--font); color: var(--ink); background: var(--bg); line-height: 1.75; font-size: 17px; -webkit-font-smoothing: antialiased; }
a { color: var(--coral-dark); text-decoration-thickness: 1.5px; text-underline-offset: 3px; }
a:hover { color: var(--coral); }
img { max-width: 100%; display: block; }
h1, h2, h3 { line-height: 1.3; font-weight: 800; }
.wrap { width: min(1120px, 92vw); margin: 0 auto; }
.skip { position: absolute; left: -999px; top: 8px; background: var(--ink); color: #fff; padding: 8px 14px; border-radius: 10px; z-index: 99; }
.skip:focus { left: 8px; }
:focus-visible { outline: 3px solid var(--sun); outline-offset: 3px; border-radius: 8px; }

/* Header */
.site-header { position: sticky; top: 0; z-index: 50; background: rgba(255, 250, 242, .88); backdrop-filter: blur(10px); border-bottom: 1px solid var(--line); }
.header-inner { display: flex; align-items: center; justify-content: space-between; height: 68px; }
.brand { display: flex; align-items: center; gap: 10px; font-weight: 900; font-size: 1.15rem; color: var(--ink); text-decoration: none; }
.brand-dot { width: 38px; height: 38px; border-radius: 50%; display: grid; place-items: center; background: linear-gradient(135deg, var(--sun), var(--coral)); color: #fff; font-size: 1.05rem; box-shadow: 0 3px 10px rgba(232, 112, 79, .35); }
.nav { display: flex; gap: 4px; align-items: center; }
.nav a { padding: 7px 14px; border-radius: 999px; color: var(--ink); text-decoration: none; font-weight: 600; font-size: .95rem; transition: background .2s; }
.nav a:hover { background: var(--sun-soft); }
.nav a[aria-current="page"] { background: var(--coral); color: #fff; }
.nav a.lang { border: 2px solid var(--line); margin-left: 6px; }
.menu-btn { display: none; background: none; border: 0; width: 44px; height: 44px; cursor: pointer; padding: 10px; }
.menu-btn span { display: block; height: 3px; background: var(--ink); border-radius: 3px; margin: 5px 0; transition: .25s; }

/* Hero */
.hero { padding: 64px 0 40px; background: radial-gradient(circle at 85% 20%, var(--sun-soft) 0, transparent 40%), radial-gradient(circle at 5% 90%, #ffd9cb 0, transparent 35%); }
.hero-inner { display: grid; grid-template-columns: 1.3fr 1fr; gap: 48px; align-items: center; }
.hello { font-size: 1.25rem; color: var(--coral-dark); font-weight: 800; margin: 0; }
.hero h1 { font-size: clamp(2.4rem, 5vw, 3.6rem); margin: 4px 0 8px; font-weight: 900; }
.en-name { display: block; font-size: .42em; color: var(--muted); font-weight: 600; letter-spacing: .04em; }
.hero-title { color: var(--muted); margin: 0 0 14px; }
.tagline { font-size: 1.2rem; font-weight: 600; margin: 0 0 18px; }
.hero-photo { position: relative; justify-self: center; width: min(340px, 75vw); aspect-ratio: 1; }
.hero-photo img { position: relative; width: 100%; height: 100%; object-fit: cover; border-radius: 50%; border: 8px solid #fff; box-shadow: var(--shadow); z-index: 1; }
.blob { position: absolute; inset: -8%; background: linear-gradient(135deg, var(--sun), var(--coral)); border-radius: 42% 58% 63% 37% / 41% 44% 56% 59%; animation: wobble 12s ease-in-out infinite; opacity: .85; }
@keyframes wobble { 50% { border-radius: 58% 42% 38% 62% / 55% 38% 62% 45%; transform: rotate(8deg); } }
.sticker { position: absolute; z-index: 2; font-size: 2rem; background: #fff; width: 58px; height: 58px; border-radius: 50%; display: grid; place-items: center; box-shadow: var(--shadow); animation: float 5s ease-in-out infinite; }
.s1 { top: 4%; left: -6%; } .s2 { bottom: 6%; right: -6%; animation-delay: -2s; } .s3 { top: -4%; right: 12%; animation-delay: -3.5s; }
@keyframes float { 50% { transform: translateY(-10px); } }
@media (prefers-reduced-motion: reduce) { .blob, .sticker { animation: none; } html { scroll-behavior: auto; } }

.chips { list-style: none; padding: 0; margin: 0 0 8px; display: flex; flex-wrap: wrap; gap: 8px; }
.chips li { background: #fff; border: 2px solid var(--line); padding: 4px 14px; border-radius: 999px; font-weight: 600; font-size: .92rem; }
.chips li a { text-decoration: none; }
.chips.big li { padding: 8px 18px; font-size: 1rem; }
.chips small { color: var(--muted); font-weight: 400; }
.cta { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 22px; }
.btn { display: inline-flex; align-items: center; gap: 6px; padding: 11px 22px; border-radius: 999px; font-weight: 800; text-decoration: none; border: 2px solid var(--coral); color: var(--coral-dark); background: #fff; transition: transform .15s, box-shadow .15s; }
.btn:hover { transform: translateY(-2px); box-shadow: var(--shadow); }
.btn.primary { background: var(--coral); color: #fff; }
.btn.primary:hover { background: var(--coral-dark); color: #fff; }
.badge { display: inline-block; background: var(--sun-soft); color: #7a4b00; font-weight: 700; font-size: .82rem; padding: 2px 12px; border-radius: 999px; margin-top: 6px; }
.badge.gold { background: #fff0c2; margin: 0; }

/* Stats */
.stats { padding: 8px 0 24px; }
.stats-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.stat { background: var(--card); border-radius: var(--radius); padding: 18px; text-align: center; box-shadow: var(--shadow); }
.stat b { display: block; font-size: 2.2rem; color: var(--coral); font-weight: 900; line-height: 1.2; }
.stat span { color: var(--muted); font-size: .92rem; }

/* Sections */
.section { padding: 56px 0; }
.section.tint { background: var(--tint); }
.section-title { font-size: 1.75rem; margin: 0 0 24px; position: relative; display: inline-block; }
.section-title::after { content: ""; position: absolute; left: 0; bottom: -4px; width: 100%; height: 10px; background: var(--sun-soft); z-index: -1; border-radius: 6px; }
.sub { font-size: 1.2rem; margin: 32px 0 12px; color: var(--coral-dark); }
.sub small { color: var(--muted); font-weight: 400; }
.hint, .lead { color: var(--muted); margin-top: 0; }
.page-head { padding: 56px 0 36px; text-align: center; background: radial-gradient(circle at 50% 0, var(--sun-soft) 0, transparent 60%); }
.page-head h1 { font-size: clamp(2rem, 4vw, 2.8rem); margin: 8px 0; }
.page-head p { max-width: 720px; margin: 0 auto; color: var(--muted); font-size: 1.08rem; }
.page-emoji { font-size: 3rem; }

.cards { display: grid; gap: 20px; }
.cards.three { grid-template-columns: repeat(3, 1fr); }
.cards.two { grid-template-columns: repeat(2, 1fr); }
.card { background: var(--card); border-radius: var(--radius); padding: 26px; box-shadow: var(--shadow); border: 2px solid transparent; transition: transform .2s, border-color .2s; }
.card:hover { transform: translateY(-4px); border-color: var(--sun-soft); }
.card h3 { margin: 8px 0; font-size: 1.15rem; }
.card p { margin: 0; color: var(--muted); }
.card-icon { font-size: 2.2rem; width: 64px; height: 64px; display: grid; place-items: center; background: var(--tint); border-radius: 20px; }
.link-card { text-decoration: none; color: inherit; display: block; }
.mini-card { background: var(--card); border-radius: 16px; padding: 14px 18px; box-shadow: var(--shadow); display: flex; flex-direction: column; }
.mini-card small { color: var(--muted); }

.news { list-style: none; padding: 0; margin: 0; display: grid; gap: 12px; }
.news li { display: flex; gap: 16px; background: #fff; padding: 14px 20px; border-radius: 16px; align-items: baseline; box-shadow: var(--shadow); }
.news time { flex: none; font-weight: 800; color: var(--coral); min-width: 72px; }

.note-card { background: linear-gradient(135deg, #fff, var(--tint)); border: 3px dashed var(--sun); border-radius: var(--radius); padding: 28px 32px; font-size: 1.1rem; }
.note-card p { margin-top: 0; }

.contact-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px; }
.contact-item { display: flex; gap: 14px; align-items: flex-start; background: #fff; padding: 16px 20px; border-radius: 18px; box-shadow: var(--shadow); }
.contact-item > span { font-size: 1.6rem; }
.contact-item small { display: block; color: var(--muted); font-weight: 700; }
.pill-row { display: flex; gap: 10px; margin-top: 16px; flex-wrap: wrap; }
.pill { padding: 6px 16px; border-radius: 999px; background: #fff; border: 2px solid var(--line); text-decoration: none; font-weight: 700; }

.timeline { list-style: none; padding: 0 0 0 22px; margin: 0; border-left: 3px dotted var(--sun); }
.timeline li { position: relative; padding: 6px 0 14px 16px; }
.timeline li::before { content: ""; position: absolute; left: -32px; top: 14px; width: 16px; height: 16px; background: var(--coral); border: 3px solid #fff; border-radius: 50%; box-shadow: 0 0 0 2px var(--coral); }
.timeline time { display: block; font-weight: 800; color: var(--coral-dark); font-size: .92rem; }
.list-cards { list-style: none; padding: 0; margin: 0; display: grid; gap: 12px; }
.list-cards li { background: #fff; padding: 14px 20px; border-radius: 16px; box-shadow: var(--shadow); border-left: 6px solid var(--sun); }

.award-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; }
.award-list li { display: flex; gap: 16px; background: #fff; padding: 12px 18px; border-radius: 14px; box-shadow: var(--shadow); }
.award-list b { flex: none; min-width: 84px; color: var(--coral); }

.filters { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 8px; }
.filters button { font: inherit; font-weight: 700; border: 2px solid var(--line); background: #fff; padding: 6px 16px; border-radius: 999px; cursor: pointer; color: var(--ink); }
.filters button.on { background: var(--coral); border-color: var(--coral); color: #fff; }
.pubs { padding-left: 2.2em; margin: 0; }
.pubs li { margin-bottom: 12px; padding: 12px 16px; background: #fff; border-radius: 14px; box-shadow: var(--shadow); font-size: .95rem; }
.pubs li.hide { display: none; }
.pubs .me { color: var(--coral-dark); }
.tag { display: inline-block; font-size: .72rem; font-weight: 800; padding: 1px 10px; border-radius: 999px; vertical-align: 2px; }
.tag.edu { background: #dff3ee; color: #23695b; }
.tag.antenna { background: #ffe1d6; color: #9a3d1f; }
.tag.other { background: #eee6ff; color: #57409a; }
.doi { font-size: .78rem; font-weight: 800; background: var(--sun-soft); padding: 1px 8px; border-radius: 6px; text-decoration: none; color: #7a4b00; }
.projects { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; }
.projects li { display: grid; grid-template-columns: 170px 1fr; gap: 14px; background: #fff; padding: 12px 18px; border-radius: 14px; box-shadow: var(--shadow); }
.projects time { font-weight: 800; color: var(--coral); font-size: .9rem; }
.projects small { display: block; color: var(--muted); }

.equip-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.equip { background: #fff; border-radius: 18px; padding: 18px; text-align: center; box-shadow: var(--shadow); display: flex; flex-direction: column; align-items: center; gap: 2px; }
.equip-icon { font-size: 2.2rem; }
.equip b { font-size: 1.5rem; color: var(--coral); line-height: 1.2; }
.equip small { color: var(--muted); font-size: .8rem; }
.cert-row { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 20px; }
.cert-row .badge { font-size: .95rem; padding: 6px 16px; background: #dff3ee; color: #23695b; }

.jump { display: flex; gap: 10px; justify-content: center; margin-bottom: 8px; flex-wrap: wrap; }
.jump a { padding: 6px 18px; background: #fff; border-radius: 999px; border: 2px solid var(--line); text-decoration: none; font-weight: 700; }
.accordion details { background: #fff; border-radius: 16px; margin-bottom: 10px; box-shadow: var(--shadow); overflow: hidden; }
.accordion summary { cursor: pointer; padding: 14px 20px; font-weight: 800; list-style: none; display: flex; justify-content: space-between; }
.accordion summary::after { content: "＋"; color: var(--coral); }
.accordion details[open] summary::after { content: "－"; }
.accordion summary small { color: var(--muted); font-weight: 400; margin-left: 8px; margin-right: auto; }
.accordion ul { margin: 0; padding: 0 24px 16px 44px; }

.site-footer { background: var(--ink); color: #f5e6d8; padding: 32px 0; margin-top: 24px; font-size: .92rem; }
.site-footer a { color: var(--sun-soft); }
.footer-inner { display: flex; justify-content: space-between; gap: 20px; flex-wrap: wrap; align-items: flex-end; }
.footer-note { opacity: .8; }

/* Responsive */
@media (max-width: 900px) {
  .hero-inner { grid-template-columns: 1fr; text-align: center; }
  .hero-photo { order: -1; width: min(260px, 66vw); }
  .chips, .cta { justify-content: center; }
  .cards.three, .equip-grid { grid-template-columns: repeat(2, 1fr); }
  .stats-grid { grid-template-columns: repeat(2, 1fr); }
  .menu-btn { display: block; }
  .nav { position: absolute; top: 68px; right: 4vw; left: 4vw; flex-direction: column; align-items: stretch; background: #fff; padding: 12px; border-radius: 18px; box-shadow: var(--shadow); display: none; }
  .nav.open { display: flex; }
  .nav a.lang { margin: 6px 0 0; text-align: center; }
}
@media (max-width: 600px) {
  body { font-size: 16px; }
  .cards.three, .cards.two, .contact-grid { grid-template-columns: 1fr; }
  .equip-grid { grid-template-columns: repeat(2, 1fr); }
  .projects li { grid-template-columns: 1fr; gap: 2px; }
  .award-list li, .news li { flex-direction: column; gap: 2px; }
  .section { padding: 40px 0; }
  .sticker { width: 46px; height: 46px; font-size: 1.5rem; }
}
@media print { .site-header, .filters, .cta, .hero-photo { display: none; } .section.tint { background: none; } }
