:root {
  --bg: #f7f7f3; --surface: #fff; --soft: #eeeee7; --ink: #151714;
  --muted: #626860; --line: #d9d9d0; --accent: #214e42; --accent-soft: #dce8df;
  --shadow: 0 20px 50px rgb(27 35 29 / 7%); --radius-lg: 30px; --radius-md: 20px;
  --shell: min(1160px, calc(100% - 48px));
}
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; background: var(--bg); color: var(--ink); font-family: "Noto Sans TC", "PingFang TC", "Microsoft JhengHei", Arial, sans-serif; line-height: 1.65; }
a { color: inherit; text-decoration: none; }
.shell { width: var(--shell); margin-inline: auto; }
.skip-link { position: fixed; top: 12px; left: 12px; z-index: 100; padding: 10px 16px; border-radius: 999px; background: var(--ink); color: #fff; transform: translateY(-160%); }
.skip-link:focus { transform: translateY(0); }
:focus-visible { outline: 3px solid #408c78; outline-offset: 3px; }
.site-header { position: sticky; top: 0; z-index: 10; border-bottom: 1px solid transparent; background: rgb(247 247 243 / 82%); backdrop-filter: blur(14px); transition: border-color 180ms ease; }
.site-header.is-scrolled { border-color: var(--line); }
.nav { display: flex; align-items: center; justify-content: space-between; min-height: 78px; }
.brand { display: inline-flex; align-items: center; gap: 12px; font-weight: 700; letter-spacing: -.02em; }
.brand small { color: var(--muted); font-size: .92em; font-weight: 500; }
.brand-mark { display: grid; place-items: center; width: 42px; aspect-ratio: 1; border-radius: 50%; background: var(--ink); color: white; font-size: .8rem; letter-spacing: .05em; }
.nav-links { display: flex; align-items: center; gap: 32px; color: var(--muted); font-size: .95rem; }
.nav-links a:hover, .site-footer a:hover { color: var(--ink); }
.nav-cta { padding: 10px 20px; border: 1px solid var(--line); border-radius: 999px; color: var(--ink); }
.nav-toggle { display: none; width: 48px; height: 46px; border: 1px solid var(--line); border-radius: 999px; background: transparent; cursor: pointer; }
.nav-toggle span:not(.sr-only) { display: block; width: 17px; height: 1.5px; margin: 5px auto; background: var(--ink); }
.hero { display: grid; grid-template-columns: minmax(480px, 1fr) 382px; align-items: center; gap: 76px; min-height: calc(100vh - 78px); padding: 78px 0 92px; }
.eyebrow { margin: 0 0 20px; color: var(--accent); font-size: .75rem; font-weight: 700; letter-spacing: .2em; text-transform: uppercase; }
.hero h1 { margin: 0 0 28px; font-size: clamp(3rem, 5.1vw, 4.7rem); font-weight: 600; letter-spacing: -.075em; line-height: 1.14; }
.hero h1 span { color: var(--accent); }
.hero-intro { max-width: 560px; margin: 0 0 40px; color: var(--muted); font-size: 1.08rem; }
.hero-intro strong { color: var(--ink); font-weight: 600; }
.hero-actions { display: flex; gap: 14px; }
.button { display: inline-flex; align-items: center; justify-content: center; min-height: 54px; padding: 0 28px; border-radius: 999px; font-weight: 600; transition: transform 160ms ease; }
.button:hover { transform: translateY(-2px); }
.button.primary { background: var(--accent); color: #fff; box-shadow: 0 14px 28px rgb(33 78 66 / 18%); }
.button.secondary { border: 1px solid var(--line); background: var(--surface); }
.hero-panel { padding: 24px; border: 1px solid var(--line); border-radius: var(--radius-lg); background: var(--surface); box-shadow: var(--shadow); }
.panel-top { display: flex; justify-content: space-between; margin-bottom: 38px; color: var(--muted); font-size: .82rem; }
.status { display: flex; align-items: center; gap: 7px; color: var(--accent); }
.status i { width: 7px; height: 7px; border-radius: 50%; background: #4f9c67; }
.panel-card { min-height: 236px; padding: 28px; border-radius: var(--radius-md); background: var(--accent-soft); }
.panel-card p { margin: 0 0 7px; color: var(--muted); font-size: .85rem; }
.panel-card strong { font-size: 1.55rem; font-weight: 600; letter-spacing: -.045em; }
.lines { display: flex; flex-direction: column; gap: 12px; margin-top: 54px; }
.lines span { display: block; height: 8px; border-radius: 8px; background: rgb(33 78 66 / 12%); }
.lines span:nth-child(1) { width: 100%; } .lines span:nth-child(2) { width: 82%; } .lines span:nth-child(3) { width: 55%; }
.metric-row { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; margin-top: 18px; }
.metric-row div { padding: 15px 17px; border-radius: 15px; background: var(--soft); }
.metric-row strong, .metric-row small { display: block; }
.metric-row strong { font-size: 1.2rem; letter-spacing: -.04em; } .metric-row small { color: var(--muted); }
.section { padding: 96px 0; border-top: 1px solid var(--line); }
.section-heading h2 { margin: 0; font-size: clamp(2rem, 3vw, 2.65rem); font-weight: 600; letter-spacing: -.065em; }
.about { display: grid; grid-template-columns: .82fr 1.35fr; gap: 82px; }
.about-text { max-width: 680px; color: var(--muted); font-size: 1.15rem; }
.about-text p { margin: 0 0 22px; }
.resume .section-heading { margin-bottom: 52px; }
.timeline { display: flex; flex-direction: column; gap: 0; }
.timeline-item { display: grid; grid-template-columns: 220px 1fr; gap: 48px; padding: 0 0 42px; position: relative; }
.timeline-item:not(:last-child)::before { position: absolute; top: 13px; bottom: 0; left: 205px; width: 1px; background: var(--line); content: ""; }
.timeline-item::after { position: absolute; top: 8px; left: 199px; width: 13px; height: 13px; border-radius: 50%; background: var(--accent); content: ""; }
.timeline-year { margin: 0; color: var(--accent); font-size: .9rem; font-weight: 700; letter-spacing: .08em; }
.timeline-item h3 { margin: 0 0 9px; font-size: 1.34rem; letter-spacing: -.045em; }
.timeline-item div > p:not(.tag) { margin: 0; color: var(--muted); }
.timeline-item .tag { margin-bottom: 8px; }
.graduation div { padding: 27px 30px; border-radius: var(--radius-md); background: var(--surface); border: 1px solid var(--line); }
.graduation::after { top: 35px; }
.text-link { display: inline-flex; align-items: center; gap: 7px; margin-top: 20px; color: var(--accent); font-weight: 600; font-size: .94rem; }
.text-link:hover { text-decoration: underline; text-underline-offset: 4px; }
.skills .section-heading, .projects .section-heading { margin-bottom: 52px; }
.skill-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.skill-card { min-height: 246px; padding: 31px; border: 1px solid var(--line); border-radius: var(--radius-md); background: var(--surface); }
.skill-card span { color: var(--accent); font-size: .78rem; font-weight: 700; letter-spacing: .14em; }
.skill-card h3 { margin: 50px 0 12px; font-size: 1.35rem; letter-spacing: -.045em; }
.skill-card p { margin: 0; color: var(--muted); }
.project-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 20px; }
.project-card { overflow: hidden; border: 1px solid var(--line); border-radius: var(--radius-lg); background: var(--surface); }
.project-visual { display: flex; align-items: flex-end; min-height: 260px; padding: 26px; }
.featured .project-visual { min-height: 326px; }
.project-visual span { padding: 7px 13px; border-radius: 999px; background: rgb(255 255 255 / 72%); color: var(--accent); font-size: .77rem; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; }
.visual-one { background: linear-gradient(128deg, transparent 40%, rgb(255 255 255 / 30%)), #cddfd6; }
.visual-two { background: radial-gradient(circle at 70% 25%, #e9ede5 0 14%, transparent 15%), #ece8df; }
.visual-three { background: linear-gradient(135deg, #d7e3e2 0%, #eaf0ed 58%, #dce8df 100%); }
.visual-four { background: linear-gradient(115deg, #ece8df 0%, #dde3d8 100%); }
.project-content { padding: 30px 31px 32px; }
.tag { margin: 0 0 10px; color: var(--accent); font-size: .78rem; font-weight: 700; letter-spacing: .17em; text-transform: uppercase; }
.project-content h3 { margin: 0 0 11px; font-size: 1.48rem; letter-spacing: -.05em; }
.project-content > p:not(.tag) { margin: 0; color: var(--muted); }
.contact { padding-bottom: 112px; }
.contact-card { padding: clamp(45px, 7vw, 76px); border-radius: var(--radius-lg); background: var(--accent); color: #fff; text-align: center; }
.contact-card .eyebrow { color: #b8d5ca; }
.contact-card h2 { max-width: 650px; margin: 0 auto 16px; font-size: clamp(2.2rem, 4vw, 3.2rem); letter-spacing: -.065em; }
.contact-card p:not(.eyebrow) { margin: 0 auto 36px; color: #d7e5de; }
.contact-card .button { background: #fff; color: var(--accent); }
.contact-actions { display: flex; justify-content: center; gap: 14px; }
.contact-card .button.outline { border: 1px solid rgb(255 255 255 / 38%); background: transparent; color: #fff; box-shadow: none; }
.contact-card small { display: block; margin-top: 24px; color: #c0d4cb; }
.site-footer { display: flex; justify-content: space-between; padding: 0 0 42px; color: var(--muted); font-size: .9rem; }
.site-footer p { margin: 0; }
.reveal { opacity: 0; transform: translateY(18px); transition: opacity 580ms ease, transform 580ms ease; }
.reveal.is-visible { opacity: 1; transform: translateY(0); }
.sr-only { position: absolute; overflow: hidden; width: 1px; height: 1px; clip-path: inset(50%); white-space: nowrap; }
@media (max-width: 920px) {
  :root { --shell: min(100% - 36px, 690px); }
  .hero { display: flex; flex-direction: column; align-items: stretch; gap: 55px; min-height: 0; padding: 78px 0 84px; }
  .hero-panel { max-width: 430px; }
  .about, .skill-grid, .project-grid { display: block; }
  .about-text { margin-top: 38px; }
  .timeline-item { grid-template-columns: 1fr; gap: 11px; padding-left: 33px; }
  .timeline-item:not(:last-child)::before { left: 6px; }
  .timeline-item::after { left: 0; }
  .graduation::after { top: 8px; }
  .skill-card, .project-card { margin-bottom: 18px; }
}
@media (max-width: 620px) {
  :root { --shell: calc(100% - 32px); }
  .nav { min-height: 72px; } .brand small { display: none; } .nav-toggle { display: block; }
  .nav-links { position: absolute; top: 72px; left: 16px; right: 16px; display: none; flex-direction: column; align-items: stretch; gap: 6px; padding: 14px; border: 1px solid var(--line); border-radius: var(--radius-md); background: var(--surface); box-shadow: var(--shadow); }
  .nav-links.is-open { display: flex; } .nav-links a { padding: 11px 14px; } .nav-cta { margin-top: 4px; }
  .hero { padding-top: 54px; } .hero h1 { font-size: clamp(2.12rem, 10.4vw, 2.5rem); letter-spacing: -.09em; } .hero-actions { flex-direction: column; }
  .section { padding: 68px 0; } .skills .section-heading, .projects .section-heading { margin-bottom: 35px; }
  .skill-card { min-height: auto; padding: 26px; } .skill-card h3 { margin-top: 34px; }
  .project-visual, .featured .project-visual { min-height: 230px; } .project-content { padding: 25px; }
  .graduation div { padding: 22px; }
  .contact-actions { flex-direction: column; }
  .site-footer { flex-direction: column; gap: 8px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto; transition-duration: .001ms !important; animation-duration: .001ms !important; }
  .reveal { opacity: 1; transform: none; }
}
