:root {
  color-scheme: light;
  --ink: #18201e;
  --muted: #66706d;
  --paper: #fbf7ef;
  --surface: #ffffff;
  --surface-warm: #f3eadb;
  --line: rgba(24, 32, 30, 0.14);
  --teal: #1d6f67;
  --copper: #b3623d;
  --gold: #bd8f25;
  --charcoal: #151a19;
  --shadow: 0 24px 70px rgba(24, 32, 30, 0.12);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  min-height: 100vh;
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: "Segoe UI", "Noto Sans TC", system-ui, sans-serif;
  letter-spacing: 0;
}

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

img {
  display: block;
  max-width: 100%;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 72px;
  padding: 16px clamp(20px, 4vw, 56px);
  background: rgba(251, 247, 239, 0.88);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(18px);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
}

.brand-mark {
  display: grid;
  width: 38px;
  height: 38px;
  place-items: center;
  color: #fff;
  background: var(--charcoal);
  border-radius: 8px;
  font-size: 0.82rem;
  font-weight: 900;
}

nav {
  display: flex;
  gap: clamp(12px, 2.6vw, 30px);
  color: var(--muted);
  font-size: 0.94rem;
  font-weight: 700;
}

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

.hero {
  display: grid;
  grid-template-columns: minmax(0, 0.76fr) minmax(360px, 1fr);
  gap: clamp(28px, 5vw, 78px);
  align-items: center;
  padding: clamp(54px, 8vw, 110px) clamp(20px, 5vw, 76px) 64px;
}

.hero-copy {
  max-width: 720px;
}

.eyebrow {
  margin: 0 0 14px;
  color: var(--gold);
  font-size: 0.78rem;
  font-weight: 900;
  letter-spacing: 0;
  text-transform: uppercase;
}

h1,
h2,
h3,
p {
  overflow-wrap: anywhere;
}

h1 {
  margin: 0;
  font-family: "LXGW WenKai TC", "Noto Serif TC", "PMingLiU", "MingLiU", serif;
  font-size: clamp(4.4rem, 11vw, 8.8rem);
  font-weight: 700;
  line-height: 1.02;
  letter-spacing: 0;
  color: #101816;
  text-wrap: balance;
}

.name-line {
  margin: 14px 0 0;
  color: var(--teal);
  font-size: clamp(1.05rem, 1.8vw, 1.35rem);
  font-weight: 800;
}

.hero-lead {
  margin: 28px 0 0;
  color: var(--muted);
  font-size: clamp(1.05rem, 1.7vw, 1.24rem);
  line-height: 1.82;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 34px;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 0 18px;
  border-radius: 8px;
  font-weight: 850;
  transition: transform 160ms ease, background 160ms ease, border-color 160ms ease;
}

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

.button.primary {
  color: #fff;
  background: var(--charcoal);
}

.button.secondary {
  color: var(--charcoal);
  border: 1px solid var(--line);
  background: var(--surface);
}

.hero-visual {
  margin: 0;
  overflow: hidden;
  border: 1px solid rgba(24, 32, 30, 0.12);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: var(--shadow);
}

.hero-visual img {
  width: 100%;
  height: clamp(420px, 42vw, 680px);
  object-fit: cover;
  object-position: center;
}

.intro-band,
.section,
.contact-section {
  padding: clamp(64px, 8vw, 110px) clamp(20px, 5vw, 76px);
}

.intro-band {
  display: grid;
  grid-template-columns: minmax(0, 0.85fr) minmax(0, 1fr);
  gap: clamp(28px, 6vw, 86px);
  background: var(--charcoal);
  color: #fff;
}

.intro-band p:last-child {
  margin: 0;
  color: rgba(255, 255, 255, 0.74);
  font-size: clamp(1.04rem, 1.8vw, 1.25rem);
  line-height: 1.85;
}

.section-heading {
  display: grid;
  gap: 12px;
  max-width: 960px;
  margin-bottom: 34px;
}

h2 {
  margin: 0;
  font-size: clamp(2rem, 4.8vw, 3.85rem);
  line-height: 1.08;
  letter-spacing: 0;
}

h3 {
  margin: 10px 0 10px;
  font-size: 1.16rem;
}

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

.impact-grid article,
.expertise-card,
.skills-panel {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: 0 12px 36px rgba(24, 32, 30, 0.07);
}

.impact-grid article {
  min-height: 170px;
  padding: 22px;
}

.impact-grid strong {
  display: block;
  margin-bottom: 14px;
  color: var(--teal);
  font-size: clamp(1.28rem, 2.6vw, 1.86rem);
  line-height: 1.1;
}

.impact-grid span,
.expertise-card p,
.work-item p,
.timeline p,
.contact-copy p {
  margin: 0;
  color: var(--muted);
  line-height: 1.76;
}

.expertise,
.resume {
  background: var(--surface-warm);
}

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

.expertise-card {
  min-height: 260px;
  padding: 22px;
}

.expertise-card.feature {
  color: #fff;
  background: var(--teal);
}

.expertise-card.feature p {
  color: rgba(255, 255, 255, 0.78);
}

.expertise-card span {
  color: var(--copper);
  font-size: 0.82rem;
  font-weight: 900;
}

.expertise-card.feature span {
  color: #f8ddb1;
}

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

.work-item {
  display: grid;
  grid-template-columns: minmax(240px, 0.42fr) minmax(0, 1fr);
  gap: clamp(22px, 5vw, 64px);
  padding: 28px 0;
  border-bottom: 1px solid var(--line);
}

.work-item span,
.timeline span {
  color: var(--teal);
  font-size: 0.82rem;
  font-weight: 900;
  text-transform: uppercase;
}

.resume-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(280px, 0.42fr);
  gap: clamp(24px, 5vw, 64px);
  align-items: start;
}

.timeline {
  display: grid;
  gap: 18px;
}

.timeline article {
  padding-bottom: 20px;
  border-bottom: 1px solid var(--line);
}

.timeline h3 {
  margin-top: 8px;
}

.skills-panel {
  position: sticky;
  top: 96px;
  padding: 22px;
}

.skills-panel h3 {
  margin-top: 0;
}

.skill-cloud {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.skill-cloud span {
  padding: 8px 10px;
  color: var(--ink);
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.contact-section {
  display: grid;
  grid-template-columns: minmax(0, 0.88fr) minmax(0, 1fr);
  gap: clamp(24px, 6vw, 80px);
  align-items: end;
  color: #fff;
  background: var(--charcoal);
}

.contact-copy {
  display: grid;
  gap: 22px;
}

.contact-copy p {
  color: rgba(255, 255, 255, 0.72);
  font-size: 1.08rem;
}

.contact-section .button.primary {
  justify-self: start;
  color: var(--charcoal);
  background: var(--surface);
}

footer {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  padding: 24px clamp(20px, 5vw, 76px);
  color: rgba(255, 255, 255, 0.66);
  background: #0e1211;
  font-size: 0.92rem;
}

@media (max-width: 1160px) {
  .hero,
  .intro-band,
  .contact-section {
    grid-template-columns: 1fr;
  }

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

  .hero-visual img {
    height: clamp(300px, 52vw, 520px);
  }
}

@media (max-width: 820px) {
  .resume-grid {
    grid-template-columns: 1fr;
  }

  .skills-panel {
    position: static;
  }

  .work-item {
    grid-template-columns: 1fr;
    gap: 10px;
  }
}

@media (max-width: 640px) {
  .site-header {
    align-items: flex-start;
    gap: 14px;
    flex-direction: column;
  }

  nav {
    width: 100%;
    justify-content: space-between;
    gap: 8px;
    font-size: 0.86rem;
  }

  .hero {
    padding-top: 38px;
  }

  h1 {
    font-size: clamp(4rem, 22vw, 5.8rem);
  }

  .impact-grid,
  .expertise-layout {
    grid-template-columns: 1fr;
  }

  .expertise-card,
  .impact-grid article {
    min-height: 0;
  }

  footer {
    flex-direction: column;
  }
}
