:root {
  color-scheme: light dark;
  --ink: #10151b;
  --ink-soft: #27313a;
  --space: #0b1016;
  --space-soft: #111922;
  --paper: #f3f1ec;
  --paper-cool: #e9eeec;
  --white: #fffdf8;
  --muted: #667078;
  --muted-dark: #a8b3ba;
  --line: rgba(16, 21, 27, 0.16);
  --line-dark: rgba(255, 255, 255, 0.16);
  --cyan: #20bfd0;
  --cyan-soft: #bdeff0;
  --coral: #ec665c;
  --yellow: #f4c75d;
  --radius: 8px;
  --shadow: 0 18px 48px rgba(16, 21, 27, 0.1);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 76px;
}

body {
  min-width: 320px;
  margin: 0;
  background: var(--space);
  color: var(--ink);
  font-family:
    "Avenir Next", "SF Pro Text", "PingFang SC", "Hiragino Sans GB", "Segoe UI",
    "Microsoft YaHei", sans-serif;
  letter-spacing: 0;
  text-rendering: optimizeLegibility;
}

body,
button {
  font-size: 16px;
}

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

button,
a {
  -webkit-tap-highlight-color: transparent;
}

button {
  font: inherit;
}

img {
  max-width: 100%;
}

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

h1,
h2,
h3 {
  margin: 0;
  font-weight: 700;
}

p {
  margin: 0;
}

:focus-visible {
  outline: 3px solid var(--yellow);
  outline-offset: 4px;
}

.shell {
  width: min(1180px, calc(100% - 40px));
  margin-inline: auto;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 30;
  border-bottom: 1px solid rgba(255, 255, 255, 0.11);
  background: rgba(11, 16, 22, 0.88);
  backdrop-filter: blur(18px);
}

.nav {
  min-height: 66px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 28px;
  color: var(--white);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 11px;
  font-weight: 700;
}

.brand img {
  width: 32px;
  height: 32px;
  display: block;
  border-radius: 7px;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 4px;
  color: #c1c9ce;
  font-size: 14px;
}

.nav-links a {
  min-height: 40px;
  display: inline-flex;
  align-items: center;
  padding: 0 12px;
  border-radius: 6px;
}

.nav-links a:hover {
  background: rgba(255, 255, 255, 0.08);
  color: var(--white);
}

.hero {
  position: relative;
  min-height: min(780px, calc(100svh - 104px));
  overflow: hidden;
  isolation: isolate;
  background: #111a23;
  color: var(--white);
}

.hero-visual,
.hero-shade {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.hero-visual {
  z-index: -3;
  display: block;
  object-fit: cover;
  object-position: center;
  transform: scale(1.015);
}

.hero-shade {
  z-index: -2;
  background:
    linear-gradient(90deg, rgba(7, 11, 16, 0.92) 0%, rgba(7, 11, 16, 0.68) 42%, rgba(7, 11, 16, 0.05) 68%),
    linear-gradient(180deg, rgba(7, 11, 16, 0.08) 55%, rgba(7, 11, 16, 0.68) 100%);
}

.hero-content {
  min-height: inherit;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: flex-start;
  padding-block: 72px 44px;
}

.hello,
.section-label {
  color: #137e88;
  font-size: 14px;
  font-weight: 700;
}

.hello {
  margin-bottom: 18px;
  color: var(--cyan-soft);
}

h1 {
  width: min(720px, 64%);
  font-size: 64px;
  line-height: 1.08;
}

.hero-copy {
  width: min(650px, 58%);
  margin-top: 24px;
  color: #c6cfd4;
  font-size: 18px;
  line-height: 1.8;
}

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

.button {
  min-height: 48px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 19px;
  border: 1px solid transparent;
  border-radius: 7px;
  font-weight: 700;
}

.button-light {
  background: var(--white);
  color: var(--ink);
}

.button-light:hover {
  background: var(--cyan-soft);
}

.text-link {
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.44);
  color: var(--white);
  font-weight: 700;
}

.text-link span {
  color: var(--cyan-soft);
  font-size: 20px;
}

.hero-meta {
  margin-top: auto;
  display: flex;
  flex-wrap: wrap;
  gap: 14px 28px;
  padding-top: 40px;
  color: #aeb9c0;
  font-size: 13px;
}

.hero-meta span {
  display: inline-flex;
  align-items: center;
  gap: 9px;
}

.hero-meta span::before {
  width: 7px;
  height: 7px;
  content: "";
  border-radius: 50%;
  background: var(--coral);
}

.hero-meta span:last-child::before {
  background: var(--cyan);
}

.section {
  position: relative;
  padding: 112px 0;
}

.about-section {
  background: var(--paper);
}

.about-layout {
  display: grid;
  grid-template-columns: minmax(300px, 0.82fr) minmax(0, 1.18fr);
  gap: 96px;
}

.section-label {
  margin-bottom: 18px;
}

.section-label-dark {
  color: var(--cyan-soft);
}

.section-intro h2,
.projects-heading h2,
.contact-layout h2 {
  font-size: 43px;
  line-height: 1.22;
}

.section-intro.narrow {
  max-width: 760px;
}

.about-story > p {
  color: var(--ink-soft);
  font-size: 19px;
  line-height: 1.85;
}

.about-story > p + p {
  margin-top: 20px;
}

.focus-list {
  margin-top: 52px;
  border-top: 1px solid var(--line);
}

.focus-list > div {
  display: grid;
  grid-template-columns: 54px minmax(150px, 0.52fr) minmax(0, 1fr);
  align-items: baseline;
  gap: 18px;
  padding: 20px 0;
  border-bottom: 1px solid var(--line);
}

.focus-list span {
  color: var(--coral);
  font-size: 13px;
  font-weight: 700;
}

.focus-list strong {
  font-size: 17px;
}

.focus-list p {
  color: var(--muted);
  font-size: 15px;
  line-height: 1.65;
}

.experience-section {
  overflow: hidden;
  background: var(--space-soft);
  color: var(--white);
}

.experience-section::after {
  position: absolute;
  right: -170px;
  top: 76px;
  width: 420px;
  height: 420px;
  content: "";
  border: 1px solid rgba(32, 191, 208, 0.23);
  border-radius: 50%;
  box-shadow:
    0 0 0 62px rgba(32, 191, 208, 0.04),
    0 0 0 124px rgba(236, 102, 92, 0.025);
}

.experience-list {
  position: relative;
  z-index: 1;
  margin-top: 70px;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  border-top: 1px solid var(--line-dark);
  border-bottom: 1px solid var(--line-dark);
}

.experience-item {
  min-height: 310px;
  padding: 34px 34px 34px 0;
}

.experience-item + .experience-item {
  padding-left: 34px;
  border-left: 1px solid var(--line-dark);
}

.experience-number {
  display: block;
  margin-bottom: 72px;
  color: var(--coral);
  font-size: 14px;
  font-weight: 700;
}

.experience-item h3 {
  font-size: 23px;
}

.experience-item p {
  margin-top: 16px;
  color: var(--muted-dark);
  line-height: 1.78;
}

.projects-section {
  overflow: hidden;
  background: var(--paper-cool);
}

.project-orbit {
  position: absolute;
  right: 6%;
  top: 42px;
  width: 430px;
  height: 150px;
  border: 1px solid rgba(16, 21, 27, 0.13);
  border-radius: 50%;
  transform: rotate(-8deg);
}

.project-orbit::before {
  position: absolute;
  inset: 24px 70px;
  content: "";
  border: 1px solid rgba(16, 21, 27, 0.09);
  border-radius: 50%;
}

.project-orbit span {
  position: absolute;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--cyan);
}

.project-orbit span:nth-child(1) { left: 12%; top: 61%; }
.project-orbit span:nth-child(2) { left: 34%; top: 7%; background: var(--coral); }
.project-orbit span:nth-child(3) { left: 54%; top: 75%; background: var(--yellow); }
.project-orbit span:nth-child(4) { left: 76%; top: 15%; }
.project-orbit span:nth-child(5) { right: 3%; top: 54%; background: var(--coral); }

.projects-heading {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: minmax(300px, 0.9fr) minmax(280px, 0.58fr);
  align-items: end;
  gap: 100px;
}

.projects-heading > p {
  color: var(--muted);
  font-size: 17px;
  line-height: 1.8;
}

.project-toolbar {
  margin-top: 54px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding-bottom: 18px;
  border-bottom: 1px solid var(--line);
}

.filter-bar {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 4px;
  padding: 4px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: rgba(255, 255, 255, 0.46);
}

.filter-button {
  min-height: 38px;
  padding: 0 13px;
  border: 0;
  border-radius: 5px;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  font-size: 14px;
  font-weight: 700;
}

.filter-button:hover,
.filter-button.active {
  background: var(--ink);
  color: var(--white);
}

.project-count {
  color: var(--muted);
  font-size: 14px;
}

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

.project-card {
  min-height: 340px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 26px;
  padding: 26px;
  border: 1px solid rgba(16, 21, 27, 0.14);
  border-radius: var(--radius);
  background: rgba(255, 253, 248, 0.82);
  box-shadow: 0 0 0 rgba(16, 21, 27, 0);
  transition: border-color 180ms ease, box-shadow 180ms ease, transform 180ms ease;
}

.project-card:hover {
  border-color: rgba(16, 21, 27, 0.3);
  box-shadow: var(--shadow);
  transform: translateY(-3px);
}

.project-card-head {
  display: grid;
  grid-template-columns: 78px minmax(0, 1fr);
  align-items: center;
  gap: 18px;
}

.project-icon {
  width: 78px;
  height: 78px;
  display: block;
  border: 1px solid rgba(16, 21, 27, 0.1);
  border-radius: 18px;
  object-fit: cover;
  box-shadow: 0 10px 24px rgba(16, 21, 27, 0.14);
}

.project-kind {
  display: block;
  margin-bottom: 6px;
  color: #46757a;
  font-size: 13px;
  font-weight: 700;
}

.project-card h3 {
  font-size: 26px;
  line-height: 1.2;
}

.project-description {
  margin-top: 22px;
  color: var(--ink-soft);
  font-size: 16px;
  line-height: 1.75;
}

.project-meta {
  margin-top: 18px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.project-meta span {
  min-height: 28px;
  display: inline-flex;
  align-items: center;
  padding: 0 9px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--muted);
  font-size: 12px;
}

.project-links {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  padding-top: 20px;
  border-top: 1px solid var(--line);
}

.project-link {
  min-height: 40px;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 0 12px;
  border: 1px solid var(--ink);
  border-radius: 6px;
  color: var(--ink);
  font-size: 14px;
  font-weight: 700;
}

.project-link:hover {
  background: var(--ink);
  color: var(--white);
}

.project-link span {
  font-size: 17px;
}

.empty-state {
  grid-column: 1 / -1;
  min-height: 220px;
  display: grid;
  place-items: center;
  border: 1px dashed var(--line);
  border-radius: var(--radius);
  color: var(--muted);
}

.project-pager {
  min-height: 50px;
  margin-top: 22px;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
}

.project-pager > span {
  min-width: 76px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
  text-align: center;
}

.pager-button {
  width: 44px;
  height: 44px;
  display: inline-grid;
  place-items: center;
  padding: 0;
  border: 1px solid var(--ink);
  border-radius: 6px;
  background: transparent;
  color: var(--ink);
  cursor: pointer;
  font-size: 19px;
  font-weight: 700;
}

.pager-button:hover:not(:disabled) {
  background: var(--ink);
  color: var(--white);
}

.pager-button:disabled {
  cursor: not-allowed;
  opacity: 0.28;
}

.contact-section {
  padding: 96px 0;
  background: var(--coral);
  color: var(--ink);
}

.contact-layout {
  display: grid;
  grid-template-columns: 150px minmax(0, 1fr);
  gap: 56px;
}

.contact-layout .section-label {
  margin: 9px 0 0;
  color: rgba(16, 21, 27, 0.68);
}

.contact-layout h2 {
  max-width: 860px;
}

.contact-email {
  grid-column: 2;
  margin-top: 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 18px 0;
  border-top: 1px solid rgba(16, 21, 27, 0.42);
  border-bottom: 1px solid rgba(16, 21, 27, 0.42);
  font-size: 21px;
  font-weight: 700;
}

.contact-email span:last-child {
  font-size: 28px;
}

.footer {
  padding: 28px 0;
  background: var(--space);
  color: #9aa6ad;
  font-size: 13px;
}

.footer-inner {
  display: flex;
  justify-content: space-between;
  gap: 20px;
}

.motion-ready .reveal {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 560ms ease, transform 560ms ease;
}

.motion-ready .reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

@media (max-width: 980px) {
  h1 {
    width: 68%;
    font-size: 50px;
  }

  .hero-copy {
    width: 64%;
  }

  .section {
    padding: 90px 0;
  }

  .about-layout,
  .projects-heading {
    grid-template-columns: 1fr;
    gap: 48px;
  }

  .section-intro h2,
  .projects-heading h2,
  .contact-layout h2 {
    font-size: 38px;
  }

  .experience-list {
    grid-template-columns: 1fr;
  }

  .experience-item {
    min-height: auto;
    display: grid;
    grid-template-columns: 48px minmax(190px, 0.55fr) minmax(0, 1fr);
    gap: 20px;
    align-items: start;
    padding: 28px 0;
  }

  .experience-item + .experience-item {
    padding-left: 0;
    border-top: 1px solid var(--line-dark);
    border-left: 0;
  }

  .experience-number,
  .experience-item p {
    margin: 0;
  }

  .experience-item p {
    margin-top: -4px;
  }

  .project-orbit {
    right: -130px;
  }
}

@media (max-width: 720px) {
  .shell {
    width: min(100% - 28px, 1180px);
  }

  .nav {
    min-height: 62px;
    gap: 14px;
  }

  .brand {
    flex: 0 0 auto;
    font-size: 14px;
  }

  .brand img {
    width: 30px;
    height: 30px;
  }

  .nav-links {
    min-width: 0;
    overflow-x: auto;
    font-size: 12px;
    scrollbar-width: none;
  }

  .nav-links::-webkit-scrollbar {
    display: none;
  }

  .nav-links a {
    min-height: 36px;
    padding: 0 8px;
    white-space: nowrap;
  }

  .hero {
    min-height: 760px;
  }

  .hero-visual {
    object-position: 68% center;
  }

  .hero-shade {
    background:
      linear-gradient(180deg, rgba(7, 11, 16, 0.12) 0%, rgba(7, 11, 16, 0.25) 40%, rgba(7, 11, 16, 0.96) 69%),
      linear-gradient(90deg, rgba(7, 11, 16, 0.36), rgba(7, 11, 16, 0.03));
  }

  .hero-content {
    justify-content: flex-end;
    padding-block: 300px 28px;
  }

  .hello {
    margin-bottom: 12px;
  }

  h1 {
    width: 100%;
    font-size: 38px;
    line-height: 1.12;
  }

  .hero-copy {
    width: 100%;
    margin-top: 17px;
    font-size: 16px;
    line-height: 1.7;
  }

  .hero-actions {
    width: 100%;
    margin-top: 24px;
    gap: 14px;
  }

  .button-light {
    flex: 1 1 180px;
  }

  .text-link {
    flex: 0 0 auto;
  }

  .hero-meta {
    margin-top: 26px;
    padding-top: 0;
    gap: 8px 18px;
    font-size: 12px;
  }

  .section {
    padding: 68px 0;
  }

  .section-intro h2,
  .projects-heading h2,
  .contact-layout h2 {
    font-size: 31px;
  }

  .about-layout,
  .projects-heading {
    gap: 34px;
  }

  .about-story > p {
    font-size: 17px;
    line-height: 1.78;
  }

  .focus-list {
    margin-top: 38px;
  }

  .focus-list > div {
    grid-template-columns: 40px minmax(0, 1fr);
    gap: 8px 12px;
  }

  .focus-list p {
    grid-column: 2;
  }

  .experience-list {
    margin-top: 42px;
  }

  .experience-item {
    grid-template-columns: 36px minmax(0, 1fr);
    gap: 12px;
  }

  .experience-item p {
    grid-column: 2;
    margin-top: 0;
  }

  .experience-item h3 {
    font-size: 21px;
  }

  .project-orbit {
    display: none;
  }

  .projects-heading > p {
    font-size: 16px;
  }

  .project-toolbar {
    margin-top: 38px;
    align-items: flex-end;
  }

  .filter-bar {
    flex: 1 1 auto;
  }

  .filter-button {
    flex: 1 1 calc(50% - 4px);
  }

  .project-count {
    display: none;
  }

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

  .project-card {
    min-height: 330px;
    padding: 20px;
  }

  .project-card-head {
    grid-template-columns: 68px minmax(0, 1fr);
    gap: 15px;
  }

  .project-icon {
    width: 68px;
    height: 68px;
    border-radius: 16px;
  }

  .project-card h3 {
    font-size: 23px;
  }

  .project-pager {
    justify-content: center;
  }

  .contact-section {
    padding: 70px 0;
  }

  .contact-layout {
    grid-template-columns: 1fr;
    gap: 18px;
  }

  .contact-layout .section-label {
    margin: 0;
  }

  .contact-email {
    grid-column: 1;
    min-width: 0;
    margin-top: 14px;
    font-size: 16px;
  }

  .contact-email span:first-child {
    min-width: 0;
    overflow-wrap: anywhere;
  }

  .footer-inner {
    flex-direction: column;
    gap: 8px;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  .hero-visual,
  .project-card,
  .motion-ready .reveal {
    transform: none;
    transition: none;
  }
}
