:root {
  color-scheme: light;
  --paper: #f7f7fa;
  --ink: #191925;
  --muted: #565669;
  --accent: #543394;
  --line: #dedde8;
  --white: #fff;
  font-family: Inter, "Noto Sans TC", "Microsoft JhengHei", system-ui, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; background: var(--paper); color: var(--ink); }
a { color: inherit; }
a:focus-visible { outline: 3px solid var(--accent); outline-offset: 5px; }
section[id] { scroll-margin-top: 2rem; }
.site-width { width: min(100% - 5rem, 1200px); margin-inline: auto; }

.skip-link {
  position: absolute;
  z-index: 1;
  top: .5rem;
  left: .5rem;
  padding: .75rem 1rem;
  background: var(--white);
  transform: translateY(-180%);
}
.skip-link:focus { transform: translateY(0); }

.site-header { border-bottom: 1px solid var(--line); }
.header-inner, .footer-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1.5rem;
}
.header-inner { min-height: 5rem; }
.site-brand {
  display: inline-flex;
  align-items: center;
  gap: .75rem;
  font-weight: 750;
  text-decoration: none;
}
.brand-mark {
  display: grid;
  place-items: center;
  width: 2.125rem;
  aspect-ratio: 1;
  background: var(--accent);
  color: var(--white);
  font-size: 1.125rem;
  font-weight: 750;
  border-radius: .35rem;
}
nav { display: flex; gap: clamp(1.25rem, 3vw, 2.5rem); }
nav a, .footer-inner a {
  text-decoration: none;
  color: var(--muted);
  font-size: .9375rem;
  font-weight: 600;
  padding-block: .5rem;
}
nav a:hover, .footer-inner a:hover { color: var(--accent); text-decoration: underline; }

.hero {
  display: grid;
  grid-template-columns: minmax(0, .94fr) minmax(0, 1.06fr);
  align-items: center;
  gap: clamp(2rem, 6vw, 5.25rem);
  padding: clamp(3.75rem, 6.2vw, 6.5rem) 0;
}
.section-label {
  margin: 0;
  color: var(--accent);
  font-size: .875rem;
  font-weight: 750;
  letter-spacing: .075em;
}
h1, h2, h3 { margin: 0; line-height: 1.23; }
h1 {
  margin-top: 1.2rem;
  font-size: clamp(2.75rem, 5vw, 4.375rem);
  letter-spacing: -.035em;
  font-weight: 800;
}
h1 span { display: block; color: var(--accent); }
.intro {
  color: var(--muted);
  max-width: 31rem;
  font-size: 1.0625rem;
  line-height: 1.85;
  margin: 1.4rem 0 1.75rem;
}
.hero-figure {
  margin: 0;
  background: #231b40;
  border-radius: .7rem;
  overflow: hidden;
  aspect-ratio: 4 / 3;
}
.hero-figure img { display: block; width: 100%; height: 100%; object-fit: cover; }
.button {
  display: inline-flex;
  min-height: 3rem;
  align-items: center;
  justify-content: center;
  padding: .6rem 1.35rem;
  border-radius: .375rem;
  color: var(--white);
  font-size: .9375rem;
  font-weight: 700;
  text-decoration: none;
}
.button-ink { background: var(--ink); }
.button-ink:hover { background: #3a344b; }
.button-accent { background: var(--accent); }
.button-accent:hover { background: #422577; }

.projects { padding: 2.8rem 0 3.5rem; border-top: 1px solid var(--line); }
h2 { font-size: clamp(1.6rem, 3vw, 2.125rem); }
.project-card {
  display: grid;
  grid-template-columns: minmax(0, 1.3fr) minmax(0, .85fr);
  align-items: start;
  gap: clamp(1.5rem, 5vw, 4.5rem);
  margin-top: 1.5rem;
  padding: clamp(1.5rem, 4.2vw, 3rem);
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: .7rem;
}
h3 {
  font-size: clamp(2rem, 4.5vw, 3rem);
  letter-spacing: -.045em;
  margin-top: .6rem;
}
.project-copy > p:not(.section-label), .about p {
  color: var(--muted);
  line-height: 1.8;
  margin: .8rem 0 1.35rem;
}
.project-details {
  margin: 0;
  padding: 0 0 0 clamp(1rem, 3vw, 2rem);
  border-left: 1px solid var(--line);
}
.project-details div { padding: .65rem 0; }
.project-details div + div { border-top: 1px solid var(--line); }
.project-details dt { font-weight: 750; }
.project-details dd { margin: .3rem 0 0; color: var(--muted); font-size: .9375rem; line-height: 1.6; }

.about {
  display: grid;
  grid-template-columns: 1fr 2fr;
  gap: 1.25rem;
  border-top: 1px solid var(--line);
  padding: 2.5rem 0 3.5rem;
}
.about p { max-width: 36rem; margin: 0; }
.site-footer { border-top: 1px solid var(--line); }
.footer-inner { min-height: 4.5rem; font-size: .9375rem; }

@media (max-width: 900px) {
  .site-width { width: min(100% - 3rem, 1200px); }
  .hero { gap: 1.75rem; }
  h1 { font-size: clamp(2.35rem, 5.6vw, 3.5rem); }
}
@media (max-width: 660px) {
  .site-width { width: calc(100% - 2rem); }
  .header-inner { min-height: 4.25rem; }
  .hero, .project-card, .about { grid-template-columns: 1fr; }
  .hero { padding-block: 2.75rem; }
  .hero-figure { aspect-ratio: 4 / 3; }
  .hero-figure img { object-position: center; }
  .projects { padding-top: 2.1rem; }
  .project-details { border-left: 0; border-top: 1px solid var(--line); padding: .65rem 0 0; }
  .about { gap: .8rem; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}
