:root {
  --ink: #111827;
  --muted: #5f6f89;
  --line: #d9e2ec;
  --paper: #f8fbfd;
  --panel: #ffffff;
  --cyan: #00a6c8;
  --leaf: #2fbf71;
  --coral: #ff6b4a;
  --violet: #6c63ff;
  --shadow: 0 24px 70px rgba(17, 24, 39, 0.11);
}

* {
  box-sizing: border-box;
}

html {
  min-height: 100%;
  background: var(--paper);
}

body {
  min-height: 100vh;
  margin: 0;
  color: var(--ink);
  font-family:
    Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
    "PingFang SC", "Microsoft YaHei", sans-serif;
  letter-spacing: 0;
  background:
    linear-gradient(90deg, rgba(17, 24, 39, 0.035) 1px, transparent 1px),
    linear-gradient(0deg, rgba(17, 24, 39, 0.035) 1px, transparent 1px),
    var(--paper);
  background-size: 36px 36px;
}

a {
  color: inherit;
}

.page-shell {
  width: min(1120px, calc(100% - 40px));
  margin: 0 auto;
  padding: 64px 0 96px;
}

.hero {
  min-height: calc(100vh - 170px);
  display: grid;
  grid-template-columns: minmax(0, 0.95fr) minmax(360px, 1.05fr);
  gap: 48px;
  align-items: center;
}

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

.eyebrow {
  margin: 0 0 16px;
  color: var(--cyan);
  font-size: 0.75rem;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

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

h1 {
  margin: 0;
  max-width: 10em;
  font-size: clamp(3.6rem, 9vw, 8rem);
  line-height: 0.92;
  font-weight: 900;
}

.intro {
  max-width: 37rem;
  margin: 28px 0 0;
  color: var(--muted);
  font-size: clamp(1rem, 2vw, 1.18rem);
  line-height: 1.8;
}

.signal-panel {
  position: relative;
  min-height: 420px;
  overflow: hidden;
  border: 1px solid rgba(17, 24, 39, 0.08);
  border-radius: 8px;
  background:
    radial-gradient(circle at 20% 20%, rgba(47, 191, 113, 0.12), transparent 26%),
    linear-gradient(135deg, rgba(255, 255, 255, 0.9), rgba(239, 247, 252, 0.94));
  box-shadow: var(--shadow);
}

.signal-panel::before {
  content: "";
  position: absolute;
  inset: 22px;
  border: 1px solid rgba(17, 24, 39, 0.08);
  border-radius: 6px;
  pointer-events: none;
}

#project-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.signal-label {
  position: absolute;
  left: 24px;
  right: 24px;
  bottom: 24px;
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: flex-end;
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.signal-label strong {
  color: var(--ink);
  font-size: 0.82rem;
  text-align: right;
}

.projects {
  padding-top: 24px;
}

.section-heading {
  display: flex;
  justify-content: space-between;
  gap: 24px;
  align-items: end;
  margin-bottom: 22px;
  border-top: 1px solid var(--line);
  padding-top: 28px;
}

.section-heading h2 {
  margin: 0;
  font-size: clamp(1.9rem, 4vw, 3.5rem);
  line-height: 1;
}

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

.project-card {
  min-height: 220px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 20px;
  background: rgba(255, 255, 255, 0.82);
  transition:
    transform 180ms ease,
    border-color 180ms ease,
    box-shadow 180ms ease;
}

.project-card:hover {
  transform: translateY(-4px);
  border-color: rgba(0, 166, 200, 0.45);
  box-shadow: 0 18px 46px rgba(17, 24, 39, 0.09);
}

.project-mark {
  width: 48px;
  height: 48px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  color: #fff;
  background: var(--ink);
  font-size: 0.8rem;
  font-weight: 900;
}

.project-card:nth-child(2) .project-mark {
  background: var(--cyan);
}

.project-card:nth-child(3) .project-mark {
  background: var(--leaf);
}

.project-card:nth-child(4) .project-mark {
  background: var(--coral);
}

.project-card h3 {
  margin: auto 0 0;
  font-size: 1.18rem;
}

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

.site-footer {
  width: min(1120px, calc(100% - 40px));
  margin: 0 auto;
  border-top: 1px solid var(--line);
  padding: 22px 0 30px;
  text-align: center;
  color: var(--muted);
  font-size: 0.9rem;
}

.site-footer a {
  text-decoration: none;
}

.site-footer a:hover,
.site-footer a:focus-visible {
  color: var(--cyan);
  text-decoration: underline;
  text-underline-offset: 4px;
}

:focus-visible {
  outline: 3px solid rgba(0, 166, 200, 0.35);
  outline-offset: 4px;
}

@media (max-width: 900px) {
  .page-shell {
    padding-top: 42px;
  }

  .hero {
    min-height: auto;
    grid-template-columns: 1fr;
    gap: 32px;
  }

  .signal-panel {
    min-height: 340px;
  }

  .project-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 620px) {
  .page-shell,
  .site-footer {
    width: min(100% - 28px, 1120px);
  }

  .page-shell {
    padding-bottom: 64px;
  }

  h1 {
    font-size: clamp(3rem, 17vw, 4.6rem);
  }

  .signal-panel {
    min-height: 290px;
  }

  .signal-label {
    flex-direction: column;
    align-items: flex-start;
  }

  .signal-label strong {
    text-align: left;
  }

  .section-heading {
    display: block;
  }

  .project-grid {
    grid-template-columns: 1fr;
  }

  .project-card {
    min-height: 176px;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
  }
}
