:root {
  --bg: #f4f7f5;
  --surface: #ffffff;
  --ink: #17211f;
  --muted: #63736f;
  --line: #d9e4df;
  --green: #14533a;
  --green-soft: #e9f3ee;
  --blue: #2e6ea6;
  --shadow: 0 16px 42px rgba(23, 33, 31, 0.1);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--ink);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.88), rgba(244, 247, 245, 0.96)),
    radial-gradient(circle at top left, rgba(46, 110, 166, 0.12), transparent 34%),
    var(--bg);
  font-family:
    "Noto Sans TC",
    "Microsoft JhengHei",
    system-ui,
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    sans-serif;
}

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

.project-header {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 24px;
  min-height: 72px;
  padding: 12px clamp(18px, 4vw, 54px);
  background: rgba(255, 255, 255, 0.92);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(14px);
}

.project-brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.project-brand span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 126px;
  height: 44px;
  padding: 0 16px;
  color: #fff;
  background: var(--green);
  border-radius: 8px;
  font-size: 0.84rem;
  line-height: 1;
  font-weight: 800;
  white-space: nowrap;
}

.project-brand strong {
  font-size: 1.05rem;
}

.project-nav {
  display: flex;
  gap: 8px;
  color: var(--muted);
  font-size: 0.94rem;
}

.project-nav a {
  display: inline-flex;
  align-items: center;
  min-height: 40px;
  padding: 8px 12px;
  border-radius: 6px;
  font-weight: 700;
}

.project-nav a:hover,
.project-nav a:focus-visible {
  color: var(--green);
  background: var(--green-soft);
  outline: none;
}

main {
  width: min(1400px, calc(100% - 64px));
  margin: 0 auto;
}

.eyebrow {
  margin: 0 0 12px;
  color: var(--green);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

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

.project-section {
  padding: 12px 0 72px;
}

.section-heading {
  display: block;
  margin-bottom: 18px;
  text-align: left;
}

.section-heading h2 {
  margin-bottom: 0;
  font-size: clamp(1.7rem, 3vw, 2.6rem);
}

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

.project-card {
  display: grid;
  overflow: hidden;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
  transition:
    transform 160ms ease,
    border-color 160ms ease,
    box-shadow 160ms ease;
}

.project-card:hover {
  transform: translateY(-2px);
  border-color: var(--green);
  box-shadow: 0 20px 48px rgba(23, 33, 31, 0.14);
}

.project-thumb {
  display: grid;
  place-items: center;
  aspect-ratio: 16 / 6.7;
  overflow: hidden;
  background: var(--green-soft);
}

.project-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 18%;
}

.project-card-body {
  padding: 13px 14px 14px;
}

.project-status {
  display: inline-flex;
  margin-bottom: 8px;
  padding: 3px 7px;
  color: #fff;
  background: var(--blue);
  border-radius: 6px;
  font-size: 0.68rem;
  font-weight: 800;
}

.project-card h3 {
  margin-bottom: 5px;
  font-size: 1.08rem;
}

.project-card p {
  margin-bottom: 6px;
  color: var(--green);
  font-weight: 800;
  font-size: 0.84rem;
}

.project-card small {
  color: var(--muted);
  font-size: 0.75rem;
  line-height: 1.45;
}

.project-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 10px;
}

.project-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 32px;
  padding: 6px 10px;
  color: var(--green);
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 6px;
  font-size: 0.78rem;
  font-weight: 800;
}

.project-action.primary {
  color: #fff;
  background: var(--green);
  border-color: var(--green);
}

.project-thumb:focus-visible,
.project-action:focus-visible,
.project-action:hover {
  border-color: var(--green);
  outline: none;
  box-shadow: 0 0 0 3px rgba(20, 83, 58, 0.14);
}

@media (max-width: 900px) {
  main {
    width: min(100% - 24px, 1400px);
  }

  .project-grid {
    display: flex;
    gap: 12px;
    padding-bottom: 10px;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    scrollbar-width: thin;
  }

  .project-card {
    flex: 0 0 min(360px, 82vw);
    min-width: 0;
    scroll-snap-align: start;
  }
}

@media (max-width: 760px) {

  .project-header {
    align-items: center;
    flex-direction: row;
  }

  .project-nav {
    width: 100%;
    overflow-x: auto;
  }

}
