:root {
  --bg: #0b1220;
  --surface: rgba(18, 26, 43, 0.9);
  --surface-alt: rgba(24, 34, 53, 0.94);
  --surface-soft: rgba(11, 18, 32, 0.78);
  --text: #f5f7fa;
  --text-muted: #9ba7b4;
  --accent-amber: #f59e0b;
  --accent-cyan: #38bdf8;
  --border: rgba(92, 114, 144, 0.34);
  --shadow: 0 24px 60px rgba(3, 9, 22, 0.36);
  --radius-lg: 32px;
  --radius-md: 20px;
  --radius-sm: 14px;
  --container: min(1180px, calc(100vw - 40px));
  --header-height: 84px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  background: #111827;
}

body {
  margin: 0;
  min-height: 100vh;
  position: relative;
  background-color: #111827;
  background:
    radial-gradient(circle at 14% 72%, rgba(245, 158, 11, 0.16), transparent 18%),
    radial-gradient(circle at 86% 30%, rgba(56, 189, 248, 0.18), transparent 20%),
    linear-gradient(180deg, #0b1220 0%, #0c1628 46%, #0a1322 100%);
  color: var(--text);
  font-family: "Manrope", "Noto Sans TC", sans-serif;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

body::before {
  position: fixed;
  inset: 0;
  z-index: 0;
  background-image:
    linear-gradient(rgba(124, 154, 196, 0.14) 1px, transparent 1px),
    linear-gradient(90deg, rgba(124, 154, 196, 0.14) 1px, transparent 1px);
  background-size: 76px 76px;
  content: "";
  opacity: 0.72;
  pointer-events: none;
}

body::after {
  position: fixed;
  inset: 0;
  z-index: 0;
  background:
    radial-gradient(circle at 18% 18%, rgba(56, 189, 248, 0.08) 0, rgba(56, 189, 248, 0.08) 2px, transparent 3px),
    radial-gradient(circle at 18% 18%, rgba(56, 189, 248, 0.16) 0, transparent 140px),
    radial-gradient(circle at 78% 76%, rgba(245, 158, 11, 0.08) 0, rgba(245, 158, 11, 0.08) 2px, transparent 3px),
    radial-gradient(circle at 78% 76%, rgba(245, 158, 11, 0.14) 0, transparent 220px),
    linear-gradient(180deg, rgba(8, 14, 26, 0.2), rgba(8, 14, 26, 0.08) 18%, rgba(8, 14, 26, 0.2)),
    radial-gradient(circle at center, transparent 0%, rgba(8, 14, 26, 0.18) 100%);
  content: "";
  pointer-events: none;
}

a {
  color: inherit;
  text-decoration: none;
}

button {
  font: inherit;
}

.page-shell {
  position: relative;
  z-index: 1;
  overflow: clip;
}

.container {
  width: var(--container);
  margin: 0 auto;
}

.section {
  position: relative;
  padding: 112px 0;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  backdrop-filter: blur(18px);
  background: rgba(11, 18, 32, 0.68);
  border-bottom: 1px solid transparent;
  transition: background 220ms ease, border-color 220ms ease, box-shadow 220ms ease;
}

.site-header.is-scrolled {
  background: rgba(11, 18, 32, 0.9);
  border-color: var(--border);
  box-shadow: 0 18px 44px rgba(4, 9, 22, 0.24);
}

.header-inner {
  min-height: var(--header-height);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.brand,
.header-actions,
.site-nav,
.hero-actions,
.contact-grid,
.hero-label-row {
  display: flex;
  align-items: center;
}

.brand {
  gap: 14px;
  font-weight: 700;
  letter-spacing: 0.02em;
}

.brand-mark {
  width: 42px;
  height: 42px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.brand-mark img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
}

.header-actions {
  gap: 18px;
}

.site-nav {
  gap: 8px;
}

.nav-link {
  padding: 10px 14px;
  border-radius: 999px;
  color: var(--text-muted);
  transition: color 180ms ease, background 180ms ease;
}

.nav-link:hover,
.nav-link.is-active {
  color: var(--text);
  background: rgba(255, 255, 255, 0.06);
}

.language-switcher {
  display: inline-flex;
  padding: 4px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.04);
}

.language-button {
  border: 0;
  border-radius: 999px;
  padding: 8px 14px;
  background: transparent;
  color: var(--text-muted);
  cursor: pointer;
  transition: background 180ms ease, color 180ms ease;
}

.language-button.is-active {
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.94), rgba(255, 191, 36, 0.94));
  color: #0b1220;
  font-weight: 800;
}

.hero {
  padding-top: 76px;
}

.hero-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(280px, 0.78fr);
  gap: 32px;
  align-items: stretch;
}

.hero-copy,
.hero-panel,
.contact-panel,
.capability-card,
.portfolio-card {
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
}

.hero-copy {
  padding: 44px;
  border-radius: var(--radius-lg);
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.05), transparent 34%),
    linear-gradient(180deg, rgba(18, 26, 43, 0.96), rgba(11, 18, 32, 0.92));
}

.eyebrow,
.section-kicker,
.panel-kicker,
.case-chip,
.contact-label {
  color: var(--accent-cyan);
  font-size: 0.88rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.hero-label-row {
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 18px;
}

.role-pill,
.location-pill {
  display: inline-flex;
  align-items: center;
  padding: 10px 14px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: var(--text);
  font-size: 0.92rem;
  font-weight: 600;
}

.location-pill {
  color: var(--text-muted);
}

.hero-title,
.section-heading h2 {
  margin: 0;
  line-height: 0.98;
  letter-spacing: -0.04em;
}

.hero-title {
  display: grid;
  gap: 8px;
  margin-top: 0;
  font-size: clamp(2.7rem, 7vw, 5.6rem);
}

.hero-title span:last-child {
  color: #f9dd8d;
}

.hero-body,
.section-heading p,
.panel-summary,
.capability-card p,
.portfolio-card p,
.contact-location {
  color: var(--text-muted);
}

.hero-body {
  max-width: 54ch;
  margin: 28px 0 0;
  font-size: 1.05rem;
}

.hero-actions {
  gap: 14px;
  flex-wrap: wrap;
  margin-top: 32px;
}

.button,
.filter-button,
.portfolio-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border-radius: 999px;
  cursor: pointer;
  transition: transform 180ms ease, background 180ms ease, color 180ms ease, border-color 180ms ease;
}

.button {
  min-height: 52px;
  padding: 0 22px;
  font-weight: 700;
}

.button:hover,
.filter-button:hover,
.portfolio-toggle:hover {
  transform: translateY(-1px);
}

.button-primary {
  background: linear-gradient(135deg, var(--accent-amber), #ffd06f);
  color: #0b1220;
}

.button-secondary {
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.04);
  color: var(--text);
}

.hero-panel,
.contact-panel {
  padding: 32px;
  border-radius: var(--radius-lg);
  background:
    radial-gradient(circle at top, rgba(56, 189, 248, 0.12), transparent 45%),
    linear-gradient(180deg, rgba(24, 34, 53, 0.98), rgba(13, 20, 36, 0.98));
}

.metric-list {
  display: grid;
  gap: 14px;
  margin: 24px 0;
}

.metric-item {
  padding: 18px 18px 16px;
  border-radius: var(--radius-md);
  border: 1px solid rgba(255, 255, 255, 0.06);
  background: rgba(255, 255, 255, 0.04);
}

.metric-value {
  display: block;
  margin-top: 8px;
  color: #fff0c2;
  font-size: 1.4rem;
  font-weight: 800;
  letter-spacing: -0.04em;
}

.section-heading {
  max-width: 760px;
}

.section-heading h2 {
  margin-top: 12px;
  font-size: clamp(2rem, 4vw, 3.4rem);
}

.section-heading p {
  margin: 20px 0 0;
  font-size: 1.02rem;
}

.capability-grid,
.portfolio-grid {
  display: grid;
  gap: 20px;
  margin-top: 36px;
}

.capability-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.capability-card {
  padding: 26px;
  border-radius: var(--radius-md);
  background: linear-gradient(180deg, rgba(18, 26, 43, 0.94), rgba(11, 18, 32, 0.88));
}

.capability-card h3,
.portfolio-card h3 {
  margin: 0;
  line-height: 1.2;
}

.capability-card h3 {
  margin-top: 14px;
  font-size: 1.2rem;
}

.filter-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 36px;
}

.filter-button {
  min-height: 46px;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.04);
  padding: 0 18px;
  color: var(--text-muted);
}

.filter-button.is-active {
  border-color: rgba(245, 158, 11, 0.35);
  background: rgba(245, 158, 11, 0.14);
  color: #ffe4a0;
}

.portfolio-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.portfolio-card {
  padding: 28px;
  border-radius: 26px;
  background: linear-gradient(180deg, rgba(18, 26, 43, 0.96), rgba(11, 18, 32, 0.92));
}

.portfolio-card-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
}

.portfolio-card-meta {
  display: grid;
  gap: 10px;
}

.portfolio-company {
  color: #f9dd8d;
  font-weight: 700;
}

.portfolio-role,
.portfolio-period {
  color: var(--text-muted);
  font-size: 0.95rem;
}

.portfolio-summary {
  margin: 18px 0 0;
}

.detail-block {
  margin-top: 16px;
}

.detail-label {
  margin-bottom: 6px;
  color: var(--text);
  font-weight: 700;
}

.tag-list {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 20px;
}

.case-chip,
.tag {
  display: inline-flex;
  align-items: center;
  padding: 8px 12px;
  border-radius: 999px;
  background: rgba(56, 189, 248, 0.08);
  border: 1px solid rgba(56, 189, 248, 0.18);
  color: #b6eaff;
  font-size: 0.82rem;
  letter-spacing: 0.03em;
  text-transform: none;
}

.portfolio-toggle {
  min-height: 44px;
  margin-top: 22px;
  padding: 0 16px;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.04);
  color: var(--text);
}

.portfolio-modal[hidden] {
  display: none;
}

.portfolio-modal {
  position: fixed;
  inset: 0;
  z-index: 40;
}

.portfolio-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(4, 10, 22, 0.72);
  backdrop-filter: blur(14px);
}

.portfolio-modal-dialog {
  position: relative;
  width: min(760px, calc(100vw - 24px));
  max-height: min(88vh, 920px);
  margin: min(7vh, 56px) auto;
  border: 1px solid var(--border);
  border-radius: 28px;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.05), transparent 32%),
    linear-gradient(180deg, rgba(18, 26, 43, 0.98), rgba(11, 18, 32, 0.98));
  box-shadow: 0 30px 90px rgba(2, 7, 18, 0.55);
  overflow: hidden;
}

.portfolio-modal-body {
  max-height: min(88vh, 920px);
  overflow: auto;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
  padding: 28px;
}

.portfolio-modal-close {
  position: absolute;
  top: 16px;
  right: 16px;
  z-index: 1;
  width: 42px;
  height: 42px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.05);
  color: var(--text);
  font-size: 1.7rem;
  line-height: 1;
  cursor: pointer;
}

.portfolio-modal-header {
  padding-right: 52px;
}

.portfolio-modal-title {
  margin: 16px 0 0;
  font-size: clamp(1.8rem, 5vw, 2.8rem);
  line-height: 1.04;
  letter-spacing: -0.04em;
}

.portfolio-modal-meta {
  display: grid;
  gap: 8px;
  margin-top: 14px;
}

.portfolio-modal-summary {
  margin: 24px 0 0;
  font-size: 1.04rem;
}

.portfolio-modal-content {
  margin-top: 26px;
}

.portfolio-modal-content .detail-block:first-child {
  margin-top: 0;
}

.body-locked {
  overflow: hidden;
  width: 100%;
}

.section-heading-compact {
  max-width: 680px;
}

.contact-grid {
  align-items: stretch;
  gap: 16px;
  margin-top: 32px;
  flex-wrap: wrap;
}

.contact-card {
  flex: 1 1 220px;
  min-height: 120px;
  padding: 22px;
  text-align: left;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: rgba(255, 255, 255, 0.04);
}

.contact-card strong {
  display: block;
  margin-top: 14px;
  font-size: 1.08rem;
}

.contact-location {
  margin: 28px 0 0;
}

.is-hidden {
  display: none;
}

.no-scroll-behavior {
  scroll-behavior: auto;
}
