:root {
  color-scheme: light;
  --ink: #18202c;
  --muted: #5b6472;
  --line: #d9e0ea;
  --paper: #fffdf7;
  --soft: #f3f8fb;
  --mint: #d9f4ec;
  --sun: #ffd56a;
  --coral: #ff8d7a;
  --blue: #3d74d7;
  --green: #208c71;
  --shadow: 0 18px 45px rgba(24, 32, 44, 0.1);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background:
    linear-gradient(180deg, rgba(217, 244, 236, 0.75), rgba(255, 253, 247, 0.9) 38%),
    var(--paper);
  color: var(--ink);
  font-family: "Microsoft JhengHei", "Noto Sans TC", system-ui, sans-serif;
}

a {
  color: inherit;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 16px clamp(18px, 4vw, 56px);
  background: rgba(255, 253, 247, 0.9);
  border-bottom: 1px solid rgba(217, 224, 234, 0.8);
  backdrop-filter: blur(14px);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--ink);
  font-weight: 800;
  text-decoration: none;
}

.brand-mark {
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  border-radius: 8px;
  background: var(--ink);
  color: white;
}

.nav {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
}

.nav a {
  min-height: 36px;
  padding: 9px 12px;
  border-radius: 8px;
  color: var(--muted);
  font-size: 0.95rem;
  font-weight: 700;
  text-decoration: none;
}

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

main {
  overflow: hidden;
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(300px, 0.85fr);
  align-items: center;
  gap: clamp(28px, 6vw, 72px);
  min-height: calc(100vh - 67px);
  padding: clamp(44px, 7vw, 86px) clamp(18px, 5vw, 72px) 38px;
}

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

.eyebrow,
.section-kicker {
  margin: 0 0 12px;
  color: var(--green);
  font-size: 0.82rem;
  font-weight: 900;
  letter-spacing: 0;
  text-transform: uppercase;
}

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

h1 {
  margin: 0;
  max-width: 12ch;
  font-size: clamp(2.6rem, 7vw, 5.7rem);
  line-height: 0.98;
  letter-spacing: 0;
}

h2 {
  margin: 0;
  font-size: clamp(2rem, 4vw, 3.8rem);
  line-height: 1.05;
}

h3 {
  margin: 0 0 8px;
  font-size: 1.15rem;
}

.intro,
.section p,
.contact-section p,
footer p {
  color: var(--muted);
  font-size: 1.05rem;
  line-height: 1.8;
}

.intro {
  max-width: 640px;
  margin: 24px 0 0;
}

.hero-actions,
.contact-section {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
}

.hero-actions {
  margin-top: 30px;
}

.button {
  display: inline-flex;
  min-height: 46px;
  align-items: center;
  justify-content: center;
  border: 2px solid transparent;
  border-radius: 8px;
  padding: 12px 18px;
  font-weight: 900;
  text-decoration: none;
}

.button.primary {
  background: var(--blue);
  color: white;
  box-shadow: 0 12px 26px rgba(61, 116, 215, 0.25);
}

.button.secondary {
  border-color: var(--line);
  background: white;
  color: var(--ink);
}

.hero-visual {
  position: relative;
}

.hero-visual img {
  display: block;
  width: 100%;
  min-width: 0;
  filter: drop-shadow(0 30px 40px rgba(24, 32, 44, 0.14));
}

.quick-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 clamp(18px, 4vw, 40px) 42px;
  gap: 14px;
}

.quick-stats div {
  min-height: 104px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: white;
  box-shadow: var(--shadow);
}

.quick-stats strong {
  display: block;
  font-size: 2rem;
}

.quick-stats span {
  color: var(--muted);
  font-weight: 800;
}

.section {
  padding: clamp(56px, 8vw, 104px) clamp(18px, 5vw, 72px);
}

.split-section {
  display: grid;
  grid-template-columns: minmax(0, 0.8fr) minmax(280px, 1fr);
  gap: clamp(26px, 5vw, 70px);
  align-items: center;
  background: #eef8ff;
}

.youtube-panel {
  display: grid;
  gap: 18px;
}

.play-card {
  display: flex;
  align-items: center;
  gap: 18px;
  min-height: 190px;
  padding: clamp(20px, 4vw, 34px);
  border: 1px solid rgba(61, 116, 215, 0.22);
  border-radius: 8px;
  background:
    linear-gradient(135deg, rgba(255, 213, 106, 0.35), rgba(255, 255, 255, 0)),
    white;
  box-shadow: var(--shadow);
}

.play-icon {
  position: relative;
  flex: 0 0 auto;
  width: 72px;
  height: 72px;
  border-radius: 8px;
  background: var(--coral);
}

.play-icon::after {
  position: absolute;
  top: 22px;
  left: 27px;
  width: 0;
  height: 0;
  border-top: 14px solid transparent;
  border-bottom: 14px solid transparent;
  border-left: 21px solid white;
  content: "";
}

.text-link {
  color: var(--blue);
  font-weight: 900;
  text-decoration-thickness: 3px;
  text-underline-offset: 5px;
}

.section-heading {
  max-width: 760px;
  margin-bottom: 28px;
}

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

.project-card {
  display: grid;
  gap: 18px;
  align-content: start;
  min-height: 100%;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: white;
  box-shadow: var(--shadow);
}

.project-card img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: contain;
  border-radius: 8px;
  background: var(--soft);
}

.project-card p {
  margin: 0;
  color: var(--muted);
  line-height: 1.7;
}

.learning-section {
  background: #fbf4e6;
}

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

.timeline article {
  min-height: 230px;
  padding: 22px;
  border-left: 6px solid var(--sun);
  border-radius: 8px;
  background: white;
  box-shadow: var(--shadow);
}

.timeline span {
  display: inline-grid;
  width: 42px;
  height: 42px;
  margin-bottom: 24px;
  place-items: center;
  border-radius: 8px;
  background: var(--mint);
  color: var(--green);
  font-weight: 900;
}

.contact-section {
  justify-content: space-between;
  background: var(--ink);
  color: white;
}

.contact-section p,
.contact-section .section-kicker {
  color: rgba(255, 255, 255, 0.78);
}

.contact-section div {
  max-width: 760px;
}

footer {
  padding: 24px clamp(18px, 5vw, 72px);
  background: #111822;
  text-align: center;
}

footer p {
  margin: 0;
  color: rgba(255, 255, 255, 0.72);
  font-size: 0.95rem;
}

.is-visible {
  animation: rise 0.6s ease both;
}

@keyframes rise {
  from {
    opacity: 0;
    transform: translateY(18px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (max-width: 860px) {
  .site-header {
    position: static;
    align-items: flex-start;
    flex-direction: column;
  }

  .nav {
    justify-content: flex-start;
  }

  .hero,
  .split-section {
    grid-template-columns: 1fr;
  }

  .hero {
    min-height: auto;
  }

  h1 {
    max-width: 11ch;
  }

  .quick-stats,
  .project-grid,
  .timeline {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 540px) {
  .hero-actions,
  .contact-section {
    align-items: stretch;
    flex-direction: column;
  }

  .button {
    width: 100%;
  }

  .play-card {
    align-items: flex-start;
    flex-direction: column;
  }
}
