:root {
  --bg: #f4f1ea;
  --bg-raise: #fbf9f4;
  --ink: #161412;
  --mute: #5e5850;
  --line: #ddd6c8;
  --accent: #1d4a3c;
  --accent-hover: #14352b;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: 100%;
}

body {
  color: var(--ink);
  background:
    linear-gradient(180deg, #ebe6db 0%, transparent 18rem),
    var(--bg);
  font-family: "Noto Sans TC", "IBM Plex Sans", sans-serif;
  font-size: 1.05rem;
  line-height: 1.65;
  letter-spacing: 0.01em;
}

a {
  color: var(--accent);
}

a:hover {
  color: var(--accent-hover);
}

.shell {
  max-width: 42rem;
  margin: 0 auto;
  padding: 4.25rem 1.5rem 3.5rem;
}

.identity {
  padding-bottom: 2.5rem;
  border-bottom: 1px solid var(--line);
}

.kicker {
  margin: 0 0 1.35rem;
  color: var(--mute);
  font-family: "IBM Plex Sans", "Noto Sans TC", sans-serif;
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

h1 {
  margin: 0;
  display: grid;
  gap: 0.4rem;
}

.name-zh {
  font-size: clamp(2.4rem, 7vw, 3.35rem);
  font-weight: 700;
  letter-spacing: 0.18em;
  line-height: 1.1;
}

.name-en {
  font-family: "Newsreader", "Noto Sans TC", serif;
  font-size: 1.35rem;
  font-weight: 500;
  font-optical-sizing: auto;
  letter-spacing: 0.04em;
  color: var(--mute);
}

.role {
  margin: 1.15rem 0 0;
  font-weight: 500;
}

.lede {
  margin: 0.85rem 0 0;
  max-width: 36rem;
  color: #3a352f;
}

.contact {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem 1.15rem;
  margin-top: 1.6rem;
}

.contact a {
  font-family: "IBM Plex Sans", "Noto Sans TC", sans-serif;
  font-size: 0.92rem;
  font-weight: 500;
  text-decoration: none;
  border-bottom: 1px solid color-mix(in srgb, var(--accent) 35%, transparent);
}

.contact a:hover {
  border-bottom-color: var(--accent);
}

section {
  padding: 2.35rem 0 0;
}

h2 {
  margin: 0 0 1.1rem;
  color: var(--mute);
  font-family: "IBM Plex Sans", "Noto Sans TC", sans-serif;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.products,
.links {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0.75rem;
}

.product {
  display: grid;
  gap: 0.45rem;
  padding: 1.05rem 1.1rem;
  background: var(--bg-raise);
  border: 1px solid var(--line);
  border-radius: 2px;
  text-decoration: none;
  color: inherit;
}

.product:hover {
  border-color: color-mix(in srgb, var(--accent) 45%, var(--line));
  color: inherit;
}

.product-meta {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
}

.product-name {
  font-family: "Newsreader", "Noto Sans TC", serif;
  font-size: 1.2rem;
  font-weight: 600;
  letter-spacing: 0.01em;
}

.product-host {
  color: var(--mute);
  font-family: "IBM Plex Sans", sans-serif;
  font-size: 0.78rem;
}

.product-desc {
  color: #3f3a34;
  font-size: 0.95rem;
  line-height: 1.55;
}

.work {
  margin: 0;
  padding: 0;
  list-style: none;
  counter-reset: work;
  display: grid;
  gap: 1.35rem;
}

.work li {
  counter-increment: work;
  display: grid;
  grid-template-columns: 2rem 1fr;
  column-gap: 0.65rem;
}

.work li::before {
  content: counter(work, decimal-leading-zero);
  color: var(--accent);
  font-family: "IBM Plex Sans", sans-serif;
  font-size: 0.78rem;
  font-weight: 500;
  letter-spacing: 0.04em;
  padding-top: 0.28rem;
}

.work-title {
  margin: 0;
  grid-column: 2;
  font-weight: 700;
}

.work p {
  margin: 0.35rem 0 0;
  grid-column: 2;
  color: #3f3a34;
}

.stack {
  margin: 0;
  max-width: 36rem;
  color: var(--mute);
  font-family: "IBM Plex Sans", "Noto Sans TC", sans-serif;
  font-size: 0.95rem;
  line-height: 1.7;
}

.links li {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.7rem 0;
  border-bottom: 1px solid var(--line);
}

.links a {
  text-decoration: none;
  font-weight: 500;
}

.links a:hover {
  text-decoration: underline;
  text-underline-offset: 0.18em;
}

.links span {
  color: var(--mute);
  font-size: 0.85rem;
}

footer {
  margin-top: 3rem;
  padding-top: 1.25rem;
  border-top: 1px solid var(--line);
}

footer p {
  margin: 0;
  color: var(--mute);
  font-size: 0.85rem;
}

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

footer a:hover {
  color: var(--accent);
}

@media (max-width: 640px) {
  .shell {
    padding-top: 2.75rem;
  }

  .product-meta {
    flex-direction: column;
    gap: 0.15rem;
  }

  .links li {
    flex-direction: column;
    gap: 0.15rem;
  }
}

@media (prefers-reduced-motion: no-preference) {
  a,
  .product {
    transition:
      color 0.15s ease,
      border-color 0.15s ease;
  }
}
