:root {
  --ink: #20333a;
  --muted: #6c7a79;
  --paper: #fffdf7;
  --paper-2: #f7f1df;
  --sky: #9bd0da;
  --sky-soft: #dff4f6;
  --leaf: #86a35b;
  --sun: #f2b93b;
  --coral: #ee9c72;
  --line: rgba(32, 51, 58, 0.14);
  --shadow: 0 22px 55px rgba(45, 60, 58, 0.12);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: "Noto Sans TC", "Microsoft JhengHei", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--ink);
  background:
    radial-gradient(circle at 12% 6%, rgba(242, 185, 59, 0.36) 0 76px, transparent 77px),
    radial-gradient(circle at 88% 2%, rgba(134, 163, 91, 0.32) 0 86px, transparent 87px),
    linear-gradient(180deg, #fffdf7 0%, #f7f1df 100%);
  min-height: 100vh;
}

a { color: inherit; }

body::before,
body::after {
  content: "";
  position: fixed;
  pointer-events: none;
  z-index: -1;
}
body::before {
  width: 220px;
  height: 220px;
  left: -70px;
  bottom: -40px;
  background:
    radial-gradient(circle, rgba(73, 151, 171, 0.75) 0 4px, transparent 5px) 0 0 / 25px 25px;
  opacity: .55;
}
body::after {
  width: 210px;
  height: 210px;
  right: -70px;
  top: 60px;
  background: repeating-linear-gradient(135deg, rgba(134, 163, 91, .55) 0 8px, transparent 8px 18px);
  border-radius: 50%;
  opacity: .5;
}

.hero {
  max-width: 1180px;
  margin: 0 auto;
  padding: 22px 22px 6px;
}

.topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  padding: 12px 4px;
}

.brand-mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 110px;
  padding: 9px 16px;
  border-radius: 999px;
  background: #ffffffcc;
  color: #2f6f73;
  text-decoration: none;
  font-weight: 800;
  letter-spacing: .05em;
  border: 1px solid rgba(73, 151, 171, .18);
  box-shadow: 0 8px 20px rgba(32, 51, 58, .08);
}

.nav-links { display: flex; gap: 10px; flex-wrap: wrap; }
.nav-links a {
  text-decoration: none;
  padding: 8px 12px;
  color: var(--muted);
  border-bottom: 2px solid transparent;
}
.nav-links a:hover { color: var(--ink); border-color: var(--sun); }

.hero-inner {
  position: relative;
  overflow: hidden;
  min-height: 500px;
  border-radius: 34px;
  padding: clamp(36px, 6vw, 78px);
  background:
    linear-gradient(90deg, rgba(255, 253, 247, .96) 0 50%, rgba(255, 253, 247, .72) 68%, rgba(255,255,255,.3) 100%),
    url("../img/innobase-poster.jpg");
  background-size: cover;
  background-position: center right;
  border: 1px solid rgba(32, 51, 58, .08);
  box-shadow: var(--shadow);
}

.hero-inner::before {
  content: "";
  position: absolute;
  inset: 22px auto auto 34px;
  width: 4px;
  height: 98px;
  background: linear-gradient(var(--sky), var(--leaf));
  border-radius: 999px;
  opacity: .75;
}
.hero-inner::after {
  content: "";
  position: absolute;
  right: 6%;
  bottom: 7%;
  width: 190px;
  height: 110px;
  background:
    radial-gradient(circle, rgba(242,185,59,.85) 0 5px, transparent 6px) 0 0 / 24px 24px;
  opacity: .36;
}

.eyebrow, .section-kicker {
  margin: 0 0 12px;
  color: #496c71;
  font-weight: 700;
  letter-spacing: .08em;
}

.hero h1 {
  margin: 0;
  font-size: clamp(3.5rem, 12vw, 8.5rem);
  line-height: .95;
  letter-spacing: .08em;
  font-weight: 900;
  text-shadow: 0 3px 0 rgba(242, 185, 59, .20);
}

.vision {
  display: inline-block;
  margin: 24px 0 14px;
  padding: 6px 0;
  font-size: clamp(1.1rem, 2.4vw, 1.65rem);
  font-weight: 800;
  border-bottom: 4px solid rgba(242, 185, 59, .55);
}

.formal-name {
  margin: 10px 0 18px;
  padding-left: 18px;
  border-left: 5px solid var(--sky);
  color: #384d4f;
}
.formal-name p { margin: 4px 0; font-size: 1.1rem; font-weight: 700; }
.formal-name span { color: var(--muted); }

.motto {
  margin: 18px 0 0;
  color: #7d915a;
  letter-spacing: .18em;
  font-weight: 700;
}

.hero-actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 30px;
}

.primary-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 10px 18px;
  border-radius: 999px;
  background: var(--ink);
  color: white;
  text-decoration: none;
  font-weight: 800;
  box-shadow: 0 10px 24px rgba(32, 51, 58, .16);
}
.primary-btn:hover { transform: translateY(-1px); }

.page-counter, .counter-pill {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  border-radius: 999px;
  padding: 8px 13px;
  color: #2f6f73;
  background: var(--sky-soft);
  border: 1px solid rgba(73,151,171,.25);
  font-weight: 700;
}

.section {
  max-width: 1120px;
  margin: 40px auto;
  padding: 0 22px;
}

.section-heading {
  margin: 0 0 20px;
}
.section-heading h2 {
  margin: 0;
  font-size: clamp(1.7rem, 4vw, 2.5rem);
  letter-spacing: .06em;
}
.split-heading {
  display: flex;
  justify-content: space-between;
  align-items: end;
  gap: 18px;
}
.section-note {
  max-width: 420px;
  margin: 0;
  color: var(--muted);
  line-height: 1.7;
}

.project-list {
  display: grid;
  gap: 18px;
}
.loading-card, .project-item, .goal-card {
  background: rgba(255,255,255,.82);
  backdrop-filter: blur(8px);
  border: 1px solid rgba(32, 51, 58, .08);
  box-shadow: 0 14px 36px rgba(32, 51, 58, .08);
}
.loading-card { padding: 28px; border-radius: 24px; color: var(--muted); }

.project-item {
  position: relative;
  overflow: hidden;
  border-radius: 28px;
  padding: 26px 28px 22px;
}
.project-item::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 10px;
  background: linear-gradient(180deg, var(--sky), var(--sun), var(--leaf));
}
.project-item::after {
  content: "Explore · Learn · Create";
  position: absolute;
  right: 28px;
  bottom: 14px;
  color: rgba(73, 151, 171, .10);
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(1.4rem, 4vw, 2.4rem);
  font-weight: 800;
  pointer-events: none;
}

.project-header {
  display: flex;
  justify-content: space-between;
  align-items: start;
  gap: 16px;
  position: relative;
  z-index: 1;
}
.project-title-wrap {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
}
.project-code {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 72px;
  padding: 5px 12px;
  border-radius: 999px;
  background: var(--leaf);
  color: white;
  font-weight: 900;
  font-family: Georgia, "Times New Roman", serif;
  letter-spacing: .05em;
}
.project-title {
  font-size: 1.45rem;
  font-weight: 900;
  text-decoration: none;
  color: var(--ink);
  border-bottom: 3px solid rgba(242,185,59,.55);
}
.project-title:hover { color: #2f6f73; }
.project-description {
  position: relative;
  z-index: 1;
  margin: 18px 0 18px;
  color: #33484c;
  font-size: 1.04rem;
  line-height: 1.85;
  max-width: 860px;
}

.version-details {
  position: relative;
  z-index: 1;
  border-top: 1px dashed var(--line);
  padding-top: 14px;
}
.version-details summary {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: #6f8d47;
  font-size: 1.05rem;
  font-weight: 900;
  cursor: pointer;
  list-style: none;
}
.version-details summary::-webkit-details-marker { display: none; }
.version-details summary::before {
  content: "";
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: radial-gradient(circle at 50% 50%, white 0 34%, transparent 35%), var(--sun);
  box-shadow: 0 0 0 3px rgba(242,185,59,.18);
}
.version-list {
  display: grid;
  gap: 8px;
  margin-top: 12px;
}
.version-row {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  color: var(--muted);
}
.version-row a {
  color: #2f7f89;
  font-weight: 800;
  text-decoration: none;
  border-bottom: 1px solid rgba(47,127,137,.3);
}
.version-row a:hover { border-color: currentColor; }
.version-note { color: var(--muted); }
.version-count { color: #517073; font-size: .94rem; }

.goals-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 14px;
}
.goal-card {
  min-height: 150px;
  border-radius: 24px;
  padding: 22px;
  background: rgba(255,255,255,.74);
}
.goal-card span {
  display: inline-block;
  margin-bottom: 16px;
  color: var(--sun);
  font-family: Georgia, "Times New Roman", serif;
  font-size: 1.6rem;
  font-weight: 900;
}
.goal-card p { margin: 0; line-height: 1.7; font-weight: 700; }

.site-footer {
  max-width: 1120px;
  margin: 60px auto 0;
  padding: 28px 22px 42px;
  text-align: center;
  color: var(--muted);
  border-top: 1px solid var(--line);
}
.site-footer p { margin: 6px 0; }

@media (max-width: 840px) {
  .hero-inner { min-height: auto; background-position: center; }
  .split-heading, .project-header { display: block; }
  .project-header .counter-pill { margin-top: 12px; }
  .goals-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 560px) {
  .topbar { align-items: flex-start; flex-direction: column; }
  .hero { padding: 12px; }
  .hero-inner { border-radius: 24px; padding: 34px 24px; }
  .hero h1 { letter-spacing: .02em; }
  .project-item { padding: 22px 20px; border-radius: 22px; }
  .goals-grid { grid-template-columns: 1fr; }
}
