:root {
  --navy: #10243e;
  --navy-2: #183657;
  --blue: #2457d6;
  --blue-soft: #edf3ff;
  --coral: #e56b4a;
  --ink: #142033;
  --muted: #5e6b7d;
  --line: #cbd5e3;
  --line-dark: #91a0b5;
  --white: #fff;
  --shell: 1240px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; overflow-x: clip; color: var(--ink); background: var(--white); font-family: "Noto Sans TC", "Microsoft JhengHei", system-ui, sans-serif; line-height: 1.75; -webkit-font-smoothing: antialiased; }
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-decoration: none; }
button, a { -webkit-tap-highlight-color: transparent; }
.shell { width: min(calc(100% - 48px), var(--shell)); margin-inline: auto; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip-link { position: fixed; top: 8px; left: 8px; z-index: 999; padding: 8px 14px; color: white; background: var(--navy); transform: translateY(-150%); }
.skip-link:focus { transform: translateY(0); }

.site-header { position: sticky; top: 0; z-index: 50; background: rgba(255,255,255,.96); border-bottom: 1px solid var(--line); backdrop-filter: blur(14px); }
.header-inner { min-height: 72px; display: flex; align-items: center; justify-content: space-between; gap: 28px; }
.brand { display: inline-flex; flex: 0 0 auto; align-items: center; gap: 12px; color: var(--navy); font-family: Georgia, "Noto Serif TC", serif; font-weight: 700; }
.brand-mark { display: block; width: 40px; height: 40px; object-fit: cover; background: var(--navy); }
.brand-copy { font-size: 15px; }
.header-actions { display: flex; min-width: 0; align-items: center; gap: 20px; }
.site-nav { display: flex; align-items: center; gap: 28px; color: var(--navy); font-size: 14px; font-weight: 650; }
.site-nav a { position: relative; padding: 24px 0 20px; white-space: nowrap; }
.site-nav a::after { content: ""; position: absolute; left: 0; right: 100%; bottom: 0; height: 3px; background: var(--blue); transition: right .25s ease; }
.site-nav a:hover::after, .site-nav a.is-active::after { right: 0; }
.google-login { display: inline-flex; min-height: 44px; align-items: center; gap: 10px; padding: 8px 15px; color: var(--navy); background: white; border: 1px solid var(--blue); font-size: 13px; font-weight: 750; white-space: nowrap; transition: color .2s ease, background .2s ease, transform .2s ease; }
.google-login:hover { color: white; background: var(--blue); transform: translateY(-1px); }
.google-mark { display: grid; place-items: center; width: 22px; height: 22px; color: #4285f4; background: white; border: 1px solid var(--line); border-radius: 50%; font: 800 14px/1 Arial, sans-serif; }
.private-label { display: inline-flex; align-items: center; gap: 7px; color: var(--navy); font-size: 12px; white-space: nowrap; }
.private-label svg { width: 16px; fill: currentColor; }
.menu-button { display: none; width: 44px; height: 44px; padding: 10px; border: 0; background: transparent; }
.menu-button > span:not(.sr-only) { display: block; width: 24px; height: 2px; margin: 5px auto; background: var(--navy); }

.hero { min-height: 670px; display: grid; grid-template-columns: .88fr 1.12fr; align-items: center; gap: 30px; padding-block: 54px 50px; }
.hero-copy { position: relative; z-index: 2; }
.eyebrow { margin: 0 0 18px !important; color: var(--coral) !important; font-size: 14px !important; font-weight: 800; letter-spacing: .12em; }
.hero h1, h2 { margin: 0; color: var(--navy); font-family: Georgia, "Noto Serif TC", "Microsoft JhengHei", serif; font-weight: 700; line-height: 1.22; letter-spacing: -.035em; }
.hero h1 { font-size: clamp(46px, 4.35vw, 66px); }
.hero h1 em { color: var(--blue); font-style: normal; }
.hero-copy > p:not(.eyebrow) { max-width: 555px; margin: 25px 0 0; color: #435167; font-size: 17px; line-height: 1.9; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 30px; }
.button { display: inline-flex; min-height: 50px; align-items: center; justify-content: center; gap: 22px; padding: 10px 24px; border: 1px solid var(--blue); font-size: 15px; font-weight: 750; transition: transform .2s ease, box-shadow .2s ease, background .2s ease; }
.button:hover { transform: translateY(-2px); box-shadow: 0 14px 30px rgba(36,87,214,.16); }
.button-primary { color: white; background: var(--blue); }
.button-secondary { color: var(--navy); background: white; border-color: var(--line-dark); }
.access-note { display: flex; max-width: 590px; align-items: flex-start; gap: 10px; margin-top: 23px; color: var(--muted); font-size: 12px; line-height: 1.65; }
.access-note svg { flex: 0 0 auto; width: 17px; margin-top: 2px; fill: var(--navy); }
.access-note a { color: var(--blue); font-weight: 750; text-decoration: underline; text-underline-offset: 3px; }
.hero-visual { margin: 0 -46px 0 -58px; }

.oauth-overview { display: grid; grid-template-columns: .72fr 2.28fr; gap: 54px; padding-block: 52px 66px; }
.oauth-summary h2 { margin: 0; color: var(--navy); font-family: Georgia, "Noto Serif TC", "Microsoft JhengHei", serif; font-size: clamp(32px, 3.3vw, 46px); line-height: 1.22; letter-spacing: -.035em; }
.oauth-summary > p:not(.eyebrow) { margin: 20px 0 0; color: var(--muted); font-size: 15px; }
.oauth-details { min-width: 0; }
.oauth-grid { display: grid; grid-template-columns: repeat(3, 1fr); border-block: 1px solid var(--line-dark); }
.oauth-grid article { min-width: 0; padding: 26px 24px 30px; border-right: 1px solid var(--line); }
.oauth-grid article:last-child { border-right: 0; }
.oauth-grid article > span { color: var(--blue); font: 750 12px/1 system-ui; letter-spacing: .12em; }
.oauth-grid h3 { margin: 16px 0 9px; color: var(--navy); font-size: 18px; }
.oauth-grid p { margin: 0; color: var(--muted); font-size: 13px; line-height: 1.75; }
.oauth-policy-links { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 22px; padding-top: 20px; color: var(--muted); font-size: 13px; }
.oauth-policy-links > span { margin-right: auto; }
.oauth-policy-links a { color: var(--blue); font-weight: 750; }
.oauth-policy-links a:hover { text-decoration: underline; text-underline-offset: 4px; }

.section-rule { border-top: 1px solid var(--line-dark); }
.about { display: grid; grid-template-columns: .74fr 2.26fr; gap: 54px; padding-block: 45px 66px; }
.section-intro h2, .section-heading h2, .experience h2, .ai-workflow h2, .contact h2 { font-size: clamp(34px, 4vw, 50px); }
.section-intro p, .section-heading p { margin: 14px 0 0; color: var(--muted); }
.capability-rail { display: grid; grid-template-columns: repeat(4, 1fr); border-left: 1px solid var(--line); }
.capability-rail article { min-width: 0; padding: 4px 21px 0; border-right: 1px solid var(--line); }
.capability-index { color: var(--blue); font: 700 13px/1 system-ui; letter-spacing: .12em; }
.capability-rail h3 { margin: 17px 0 8px; color: var(--navy); font-size: 18px; }
.capability-rail p { margin: 0; color: var(--muted); font-size: 14px; line-height: 1.75; }

.featured-project { padding-block: 76px; color: white; background: var(--navy); overflow: hidden; }
.featured-grid { display: grid; grid-template-columns: .82fr 1.18fr; gap: 64px; align-items: center; }
.section-number { margin: 0 0 20px; color: #99b8ff; font: 750 13px/1 system-ui; letter-spacing: .16em; }
.featured-copy h2 { color: white; font-size: clamp(36px, 4vw, 54px); }
.featured-copy > p { margin: 24px 0; color: #cbd7e8; font-size: 17px; }
.feature-list { margin: 0; padding: 0; list-style: none; }
.feature-list li { position: relative; padding: 10px 0 10px 28px; color: #eaf0f9; border-top: 1px solid rgba(255,255,255,.16); }
.feature-list li::before { content: ""; position: absolute; left: 2px; top: 21px; width: 8px; height: 8px; background: var(--coral); }
.stack-line { margin-top: 24px; color: #92b3ff; font-size: 12px; font-weight: 750; letter-spacing: .07em; text-transform: uppercase; }
.featured-visual { margin: 0; }
.featured-visual img { border: 1px solid rgba(255,255,255,.26); box-shadow: 0 36px 90px rgba(0,0,0,.34); }

.projects { padding-block: 88px 96px; }
.section-heading { display: flex; align-items: end; justify-content: space-between; gap: 30px; margin-bottom: 40px; }
.section-count { color: transparent; -webkit-text-stroke: 1px var(--line-dark); font: 800 clamp(72px,10vw,132px)/.8 Georgia, serif; }
.project-index { display: grid; grid-template-columns: repeat(2,1fr); gap: 0 54px; margin: 0; padding: 0; list-style: none; border-top: 2px solid var(--navy); }
.project-index li { display: grid; grid-template-columns: 44px minmax(0,1fr) minmax(180px,.86fr); align-items: center; min-height: 92px; gap: 12px; border-bottom: 1px solid var(--line); transition: background .2s ease, transform .2s ease; }
.project-index li:hover { background: var(--blue-soft); transform: translateX(4px); }
.project-no { color: var(--blue); font: 700 16px/1 Georgia, serif; }
.project-index div { display: flex; min-width: 0; flex-direction: column; }
.project-index strong { color: var(--navy); font-family: Georgia, serif; font-size: 20px; letter-spacing: .03em; }
.project-index div span { color: #415069; font-size: 14px; }
.project-index small { color: var(--muted); font-size: 11px; line-height: 1.55; text-align: right; }

.experience { padding-block: 78px 90px; }
.experience .section-intro { max-width: 680px; }
.timeline { display: grid; grid-template-columns: repeat(4,1fr); margin: 58px 0 0; padding: 0; list-style: none; border-top: 2px solid var(--navy); }
.timeline li { position: relative; padding: 34px 32px 0 0; }
.timeline li::before { content: ""; position: absolute; top: -8px; left: 0; width: 12px; height: 12px; background: white; border: 2px solid var(--blue); border-radius: 50%; }
.timeline li:last-child::before { border-color: var(--coral); }
.timeline-year { color: var(--blue); font: 750 14px/1 system-ui; }
.timeline-place { margin-top: 11px; color: var(--navy); font: 700 25px/1.2 Georgia,"Noto Serif TC",serif; }
.timeline p { margin: 16px 0 0; color: var(--muted); font-size: 14px; }

.ai-workflow { padding-block: 88px 94px; background: #f5f8fd; border-block: 1px solid var(--line); }
.workflow { display: grid; grid-template-columns: repeat(5,1fr); margin: 46px 0 0; padding: 0; list-style: none; border-block: 1px solid var(--line-dark); }
.workflow li { padding: 30px 24px 34px; border-right: 1px solid var(--line); }
.workflow li:last-child { border-right: 0; }
.workflow span { color: var(--blue); font: 750 13px/1 system-ui; }
.workflow strong { display: block; margin: 18px 0 8px; color: var(--navy); font-size: 18px; }
.workflow p { margin: 0; color: var(--muted); font-size: 13px; }
.ai-position { max-width: 960px; margin: 42px auto 0; padding: 24px 28px; color: var(--navy); background: white; border-left: 4px solid var(--coral); font: 700 clamp(18px,2vw,25px)/1.6 Georgia,"Noto Serif TC",serif; text-align: center; box-shadow: 0 10px 34px rgba(16,36,62,.07); }

.contact { display: grid; grid-template-columns: 1.15fr .85fr; gap: 90px; align-items: start; padding-block: 96px 100px; }
.contact-copy p { max-width: 560px; margin: 24px 0 0; color: var(--muted); font-size: 17px; }
.contact-terms { padding-top: 10px; }
.contact-terms dl { margin: 0 0 30px; border-top: 2px solid var(--navy); }
.contact-terms dl div { display: grid; grid-template-columns: 74px 1fr; gap: 14px; padding: 16px 0; border-bottom: 1px solid var(--line); }
.contact-terms dt { color: var(--blue); font-weight: 750; }
.contact-terms dd { margin: 0; color: #3c4a5f; }
.site-footer { color: white; background: var(--navy); }
.footer-inner { min-height: 80px; display: flex; align-items: center; justify-content: space-between; gap: 20px; font-size: 13px; }
.footer-inner a { color: #a9c1ff; }
.reveal { opacity: 0; transform: translateY(18px); transition: opacity .65s ease, transform .65s ease; }
.reveal[data-delay="1"] { transition-delay: .12s; }
.reveal.is-visible { opacity: 1; transform: none; }

@media (max-width: 1340px) {
  .hero-visual { margin-right: 0; }
}
@media (max-width: 1120px) {
  .site-nav { gap: 19px; }
  .private-label { display: none; }
}
@media (max-width: 960px) {
  .menu-button { display: block; }
  .header-actions { position: absolute; top: 72px; left: 0; right: 0; display: grid; gap: 12px; padding: 12px 24px 22px; background: white; border-bottom: 1px solid var(--line); transform: translateY(-135%); visibility: hidden; transition: transform .25s ease, visibility .25s ease; }
  .header-actions.is-open { transform: translateY(0); visibility: visible; }
  .site-nav { display: grid; grid-template-columns: repeat(5,1fr); gap: 0; }
  .site-nav a { padding: 12px 8px; text-align: center; border-bottom: 1px solid var(--line); }
  .site-nav a::after { display: none; }
  .google-login { justify-content: center; }
  .hero { grid-template-columns: 1fr; padding-top: 70px; }
  .hero-copy { max-width: 760px; }
  .hero-visual { margin: -10px -16px 0; }
  .oauth-overview, .about, .featured-grid { grid-template-columns: 1fr; }
  .capability-rail { grid-template-columns: repeat(2,1fr); row-gap: 28px; }
  .project-index { grid-template-columns: 1fr; }
  .workflow { grid-template-columns: repeat(3,1fr); }
  .workflow li:nth-child(3) { border-right: 0; }
  .workflow li:nth-child(n+4) { border-top: 1px solid var(--line); }
}
@media (max-width: 680px) {
  .shell { width: min(calc(100% - 32px),var(--shell)); }
  .header-inner { min-height: 62px; }
  .header-actions { top: 62px; padding-inline: 16px; }
  .brand-copy { font-size: 13px; }
  .site-nav { grid-template-columns: 1fr; }
  .site-nav a { text-align: left; }
  .hero { min-height: auto; padding-block: 50px 42px; }
  .hero h1 { font-size: clamp(40px,12vw,58px); }
  .hero-copy > p:not(.eyebrow) { font-size: 16px; }
  .hero-actions { align-items: stretch; flex-direction: column; }
  .button { width: 100%; }
  .hero-visual { margin: 10px -8px 0; }
  .oauth-overview, .about, .projects, .experience, .contact { padding-block: 64px; }
  .oauth-grid { grid-template-columns: 1fr; }
  .oauth-grid article { border-right: 0; border-bottom: 1px solid var(--line); }
  .oauth-grid article:last-child { border-bottom: 0; }
  .oauth-policy-links { align-items: flex-start; flex-direction: column; }
  .oauth-policy-links > span { margin-right: 0; }
  .capability-rail { grid-template-columns: 1fr; border-top: 1px solid var(--line); }
  .capability-rail article { padding: 24px 14px; border-bottom: 1px solid var(--line); }
  .featured-project, .ai-workflow { padding-block: 64px; }
  .section-heading { align-items: start; }
  .section-count { font-size: 78px; }
  .project-index li { grid-template-columns: 38px 1fr; padding: 15px 0; }
  .project-index small { grid-column: 2; text-align: left; }
  .timeline { grid-template-columns: 1fr; border-top: 0; border-left: 2px solid var(--navy); margin-left: 7px; }
  .timeline li { padding: 0 0 40px 28px; }
  .timeline li::before { top: 4px; left: -8px; }
  .workflow { grid-template-columns: 1fr; }
  .workflow li, .workflow li:nth-child(3) { border-right: 0; border-top: 1px solid var(--line); }
  .workflow li:first-child { border-top: 0; }
  .contact { grid-template-columns: 1fr; gap: 36px; }
  .footer-inner { min-height: 94px; align-items: flex-start; flex-direction: column; justify-content: center; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition-duration: .01ms !important; animation-duration: .01ms !important; }
  .reveal { opacity: 1; transform: none; }
}
@media print {
  .site-header, .site-footer, .hero-actions, .access-note { display: none; }
  .hero { min-height: auto; padding-top: 24px; }
  .reveal { opacity: 1; transform: none; }
}
