:root {
  color-scheme: light;
  --bg: #ffffff;
  --surface: #f7faf9;
  --surface-strong: #eef7f6;
  --ink: #111827;
  --muted: #5b6472;
  --subtle: #d9e4e2;
  --line: #c8d7d5;
  --accent: #0f766e;
  --accent-2: #0891b2;
  --accent-soft: #dff7f4;
  --shadow: 0 22px 70px rgba(17, 24, 39, 0.08);
  --max: 1120px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background:
    linear-gradient(90deg, rgba(15, 118, 110, 0.04) 1px, transparent 1px),
    linear-gradient(180deg, rgba(15, 118, 110, 0.035) 1px, transparent 1px),
    var(--bg);
  background-size: 72px 72px;
  color: var(--ink);
  font-family:
    "Noto Sans TC",
    "Microsoft JhengHei",
    "PingFang TC",
    system-ui,
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    sans-serif;
  font-size: 16px;
  line-height: 1.7;
  letter-spacing: 0;
}

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

a:focus-visible,
button:focus-visible {
  outline: 3px solid rgba(8, 145, 178, 0.35);
  outline-offset: 3px;
}

.skip-link {
  position: fixed;
  left: 16px;
  top: 12px;
  z-index: 20;
  transform: translateY(-140%);
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--bg);
  padding: 8px 12px;
  font-size: 0.9rem;
  transition: transform 160ms ease;
}

.skip-link:focus {
  transform: translateY(0);
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  border-bottom: 1px solid rgba(200, 215, 213, 0.78);
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(18px);
}

.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  width: min(var(--max), calc(100% - 40px));
  min-height: 72px;
  margin: 0 auto;
}

.brand,
.nav-links,
.hero-actions,
.contact-actions {
  display: flex;
  align-items: center;
}

.brand {
  gap: 10px;
  font-weight: 700;
  white-space: nowrap;
}

.brand-mark {
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--ink);
  color: #ffffff;
  font-size: 0.78rem;
  letter-spacing: 0.04em;
}

.nav-links {
  gap: 26px;
  color: var(--muted);
  font-size: 0.93rem;
}

.nav-links a,
.nav-action {
  transition:
    color 160ms ease,
    border-color 160ms ease,
    background 160ms ease;
}

.nav-links a:hover {
  color: var(--ink);
}

.nav-action {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 8px 13px;
  color: var(--accent);
  font-size: 0.9rem;
  font-weight: 700;
}

.nav-action:hover {
  border-color: var(--accent);
  background: var(--accent-soft);
}

.section-shell {
  width: min(var(--max), calc(100% - 40px));
  margin: 0 auto;
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 0.92fr) minmax(420px, 1.08fr);
  gap: 52px;
  align-items: center;
  min-height: calc(100vh - 128px);
  padding: 60px 0 46px;
}

.role-line {
  margin: 0 0 18px;
  color: var(--accent);
  font-size: 0.98rem;
  font-weight: 800;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1 {
  max-width: 760px;
  margin-bottom: 18px;
  font-size: clamp(2.5rem, 6vw, 5.45rem);
  line-height: 1.02;
  letter-spacing: 0;
}

h1 span {
  display: block;
  margin-top: 8px;
  font-size: 0.62em;
  line-height: 1.08;
}

.hero-subtitle {
  margin-bottom: 22px;
  color: var(--ink);
  font-size: clamp(1.05rem, 2.2vw, 1.45rem);
  font-weight: 700;
  line-height: 1.45;
}

.hero-statement {
  max-width: 620px;
  margin-bottom: 30px;
  color: var(--muted);
  font-size: 1.06rem;
}

.hero-actions,
.contact-actions {
  gap: 12px;
  flex-wrap: wrap;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  border-radius: 8px;
  padding: 11px 18px;
  font-size: 0.95rem;
  font-weight: 800;
  line-height: 1;
  transition:
    transform 160ms ease,
    box-shadow 160ms ease,
    border-color 160ms ease,
    background 160ms ease;
}

.button:hover {
  transform: translateY(-1px);
}

.button.primary {
  border: 1px solid var(--accent);
  background: var(--accent);
  color: #ffffff;
  box-shadow: 0 12px 28px rgba(15, 118, 110, 0.2);
}

.button.primary:hover {
  background: #115e59;
}

.button.secondary {
  border: 1px solid var(--line);
  background: #ffffff;
  color: var(--ink);
}

.button.secondary:hover {
  border-color: var(--accent);
  background: var(--accent-soft);
}

.action-card {
  display: inline-flex;
  flex: 1 1 210px;
  align-items: center;
  gap: 12px;
  min-width: 210px;
  min-height: 66px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.88);
  padding: 12px 15px;
  color: var(--ink);
  transition:
    transform 160ms ease,
    box-shadow 160ms ease,
    border-color 160ms ease,
    background 160ms ease;
}

.action-card:hover {
  border-color: var(--accent);
  background: #ffffff;
  box-shadow: 0 16px 38px rgba(17, 24, 39, 0.08);
  transform: translateY(-1px);
}

.action-card.primary {
  border-color: var(--accent);
  background: var(--accent);
  color: #ffffff;
  box-shadow: 0 14px 32px rgba(15, 118, 110, 0.22);
}

.action-card.primary:hover {
  background: #115e59;
}

.action-icon {
  display: grid;
  flex: 0 0 auto;
  width: 38px;
  height: 38px;
  place-items: center;
  border: 1px solid rgba(15, 118, 110, 0.26);
  border-radius: 8px;
  background: var(--accent-soft);
  color: var(--accent);
}

.action-card.primary .action-icon {
  border-color: rgba(255, 255, 255, 0.26);
  background: rgba(255, 255, 255, 0.12);
  color: #ffffff;
}

.action-icon svg {
  width: 21px;
  height: 21px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.9;
}

.action-copy {
  display: grid;
  gap: 3px;
  min-width: 0;
  text-align: left;
}

.action-title {
  font-size: 0.98rem;
  font-weight: 850;
  line-height: 1.2;
}

.action-meta {
  overflow: hidden;
  color: var(--muted);
  font-family: Consolas, "SFMono-Regular", monospace;
  font-size: 0.78rem;
  line-height: 1.25;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.action-card.primary .action-meta {
  color: rgba(255, 255, 255, 0.78);
}

.workflow-panel {
  position: relative;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background:
    radial-gradient(circle at 72% 24%, rgba(8, 145, 178, 0.12), transparent 26%),
    linear-gradient(180deg, #ffffff 0%, #f8fcfb 100%);
  box-shadow: var(--shadow);
}

.workflow-panel::before {
  position: absolute;
  inset: 0;
  content: "";
  background:
    linear-gradient(90deg, rgba(15, 118, 110, 0.08) 1px, transparent 1px),
    linear-gradient(180deg, rgba(15, 118, 110, 0.08) 1px, transparent 1px);
  background-size: 36px 36px;
  mask-image: linear-gradient(180deg, rgba(0, 0, 0, 0.72), transparent 92%);
  pointer-events: none;
}

.panel-header {
  position: relative;
  display: flex;
  align-items: center;
  gap: 9px;
  border-bottom: 1px solid var(--line);
  padding: 13px 16px;
  color: var(--muted);
  font-family: Consolas, "SFMono-Regular", monospace;
  font-size: 0.83rem;
}

.status-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 4px rgba(15, 118, 110, 0.12);
}

.workflow-svg {
  position: relative;
  display: block;
  width: 100%;
  height: auto;
}

.flow-line {
  fill: none;
  stroke-linecap: round;
  stroke-width: 2.5;
}

.flow-line.main {
  stroke: url("#flowGradient");
}

.flow-line.muted {
  stroke: rgba(91, 100, 114, 0.36);
  stroke-dasharray: 7 8;
}

.node rect {
  fill: rgba(255, 255, 255, 0.94);
  stroke: var(--line);
  stroke-width: 1.4;
}

.node.core rect {
  fill: #ecfffc;
  stroke: rgba(15, 118, 110, 0.48);
}

.node text {
  fill: var(--ink);
  font-family: Consolas, "SFMono-Regular", monospace;
  font-size: 18px;
  font-weight: 700;
}

.node .node-meta {
  fill: var(--muted);
  font-size: 14px;
  font-weight: 500;
}

.workflow-caption text {
  fill: var(--accent);
  font-family: Consolas, "SFMono-Regular", monospace;
  font-size: 15px;
  font-weight: 700;
}

.fit,
.value,
.projects,
.impact,
.experience,
.stack,
.credentials,
.contact {
  padding: 78px 0;
}

.fit {
  display: grid;
  grid-template-columns: 150px 1fr;
  gap: 28px;
  align-items: start;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  padding: 28px 0;
}

.fit-heading {
  color: var(--accent);
  font-weight: 800;
}

.fit-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.fit-tags span {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.78);
  padding: 8px 12px;
  color: var(--ink);
  font-family: Consolas, "SFMono-Regular", monospace;
  font-size: 0.88rem;
  font-weight: 700;
  line-height: 1.25;
}

.section-heading {
  display: grid;
  grid-template-columns: 54px 1fr;
  gap: 18px;
  align-items: baseline;
  margin-bottom: 30px;
}

.section-index {
  color: var(--accent);
  font-family: Consolas, "SFMono-Regular", monospace;
  font-size: 0.9rem;
  font-weight: 800;
}

h2 {
  margin-bottom: 0;
  font-size: clamp(1.75rem, 3vw, 2.55rem);
  line-height: 1.16;
}

.value-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.7);
}

.value-item {
  min-height: 220px;
  padding: 26px;
}

.value-item + .value-item {
  border-left: 1px solid var(--line);
}

h3 {
  margin-bottom: 12px;
  font-size: 1.05rem;
  line-height: 1.38;
}

.value-item p,
.project-card dd,
.timeline-item p,
.credential-grid p,
.contact p {
  margin-bottom: 0;
  color: var(--muted);
}

.project-list {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

.project-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.8);
  padding: 24px;
}

.project-card h3 {
  min-height: 58px;
  margin-bottom: 20px;
  color: var(--ink);
  font-size: 1.12rem;
}

.project-card dl {
  display: grid;
  gap: 16px;
  margin: 0;
}

.project-card dt {
  margin-bottom: 4px;
  color: var(--accent);
  font-family: Consolas, "SFMono-Regular", monospace;
  font-size: 0.78rem;
  font-weight: 800;
  text-transform: uppercase;
}

.project-card dd {
  margin-left: 0;
  font-size: 0.94rem;
  line-height: 1.62;
}

.impact-list {
  display: grid;
  gap: 0;
  border-top: 1px solid var(--line);
}

.impact-list article {
  position: relative;
  border-bottom: 1px solid var(--line);
  padding: 24px 0 24px 28px;
}

.impact-list article::before {
  position: absolute;
  top: 34px;
  left: 0;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent);
  content: "";
}

.impact-list p {
  max-width: 900px;
  margin-bottom: 0;
  color: var(--muted);
  font-size: 1rem;
  line-height: 1.55;
}

.impact-list h3 {
  margin-bottom: 8px;
  font-size: clamp(1.08rem, 1.8vw, 1.28rem);
}

.timeline {
  display: grid;
  gap: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
}

.timeline-item {
  display: grid;
  grid-template-columns: 150px 1fr;
  gap: 34px;
  padding: 28px;
}

.timeline-item + .timeline-item {
  border-top: 1px solid var(--line);
}

.timeline-item time {
  color: var(--accent);
  font-family: Consolas, "SFMono-Regular", monospace;
  font-size: 0.93rem;
  font-weight: 800;
}

.stack-table {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
  overflow: hidden;
}

.stack-table div {
  display: grid;
  grid-template-columns: 120px 1fr;
  gap: 20px;
  min-height: 74px;
  align-items: center;
  border-bottom: 1px solid var(--line);
  padding: 18px 22px;
}

.stack-table div:nth-child(odd) {
  border-right: 1px solid var(--line);
}

.stack-table div:nth-last-child(-n + 2) {
  border-bottom: 0;
}

.stack-table span {
  color: var(--muted);
  font-family: Consolas, "SFMono-Regular", monospace;
  font-size: 0.86rem;
}

.stack-table strong {
  font-size: 0.98rem;
  line-height: 1.45;
}

.credential-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.credential-grid article {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  padding: 24px;
}

.contact {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 34px;
  align-items: center;
  margin-bottom: 72px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: linear-gradient(135deg, #f1fffd 0%, #ffffff 62%);
  padding: 36px;
}

.contact h2 {
  max-width: 760px;
  margin-bottom: 12px;
}

@media (max-width: 920px) {
  .nav {
    width: min(100% - 28px, var(--max));
  }

  .nav-links {
    display: none;
  }

  .section-shell {
    width: min(100% - 28px, var(--max));
  }

  .hero {
    grid-template-columns: 1fr;
    gap: 36px;
    min-height: auto;
    padding: 46px 0 54px;
  }

  .workflow-panel {
    max-width: 720px;
  }

  .action-card {
    flex-basis: 100%;
  }

  .fit,
  .value-grid,
  .project-list,
  .stack-table,
  .credential-grid {
    grid-template-columns: 1fr;
  }

  .value-item + .value-item,
  .stack-table div:nth-child(odd) {
    border-left: 0;
    border-right: 0;
  }

  .value-item {
    min-height: auto;
    border-top: 1px solid var(--line);
  }

  .value-item:first-child {
    border-top: 0;
  }

  .stack-table div:nth-last-child(2) {
    border-bottom: 1px solid var(--line);
  }

  .contact {
    grid-template-columns: 1fr;
  }

  .project-card h3 {
    min-height: auto;
  }
}

@media (max-width: 620px) {
  body {
    background-size: 54px 54px;
  }

  .nav {
    min-height: 64px;
  }

  .brand-mark {
    width: 32px;
    height: 32px;
  }

  .nav-action {
    padding: 8px 10px;
  }

  .hero {
    gap: 18px;
    padding-top: 18px;
    padding-bottom: 22px;
  }

  h1 {
    margin-bottom: 12px;
    font-size: clamp(1.95rem, 11vw, 2.85rem);
  }

  h1 span {
    margin-top: 4px;
  }

  .hero-statement {
    margin-bottom: 16px;
    font-size: 1rem;
  }

  .hero-subtitle {
    margin-bottom: 14px;
  }

  .role-line {
    margin-bottom: 12px;
  }

  .button {
    width: 100%;
  }

  .action-card {
    flex: 1 1 100%;
    width: 100%;
    min-width: 0;
  }

  .workflow-panel {
    overflow: hidden;
  }

  .panel-header {
    padding: 10px 12px;
  }

  .workflow-svg {
    max-height: 188px;
  }

  .node text {
    font-size: 20px;
  }

  .node .node-meta,
  .workflow-caption text {
    display: none;
  }

  .fit,
  .value,
  .projects,
  .impact,
  .experience,
  .stack,
  .credentials,
  .contact {
    padding: 54px 0;
  }

  .fit {
    gap: 14px;
    padding: 22px 0;
  }

  .fit-tags span {
    font-size: 0.82rem;
  }

  .section-heading {
    grid-template-columns: 42px 1fr;
    gap: 12px;
    margin-bottom: 22px;
  }

  .value-item,
  .project-card,
  .timeline-item {
    padding: 22px;
  }

  .impact-list article,
  .timeline-item,
  .stack-table div {
    grid-template-columns: 1fr;
    gap: 8px;
  }

  .impact-list article::before {
    display: none;
  }

  .impact-list article {
    padding-left: 0;
  }

  .contact {
    margin-bottom: 42px;
    padding: 26px 20px;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
  }
}
