:root {
  --orange: #ff4f35;
  --black: #0c0c0c;
  --paper: #fff5ec;
  --ink: #141414;
  --muted: #5a3730;
  --line: rgba(12, 12, 12, 0.82);
  --panel: rgba(255, 255, 255, 0.76);
  --radius: 8px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--ink);
  background: var(--paper);
  font-family: "Microsoft YaHei", "Noto Sans SC", Arial, sans-serif;
}

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

img {
  display: block;
  max-width: 100%;
}

.home {
  min-height: 100vh;
  background: var(--orange);
  display: grid;
  place-items: center;
  padding: 48px;
}

.home-inner {
  width: min(1280px, 100%);
  display: grid;
  grid-template-columns: minmax(360px, 470px) minmax(420px, 560px);
  align-items: center;
  gap: 96px;
}

.photo-wrap {
  position: relative;
}

.profile-photo {
  width: 100%;
  aspect-ratio: 0.81;
  object-fit: cover;
  object-position: 50% 42%;
  border-radius: 0;
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.2);
}

.title-badge {
  position: absolute;
  top: -82px;
  right: -120px;
  width: 304px;
  height: 160px;
  border: 2px solid var(--black);
  border-radius: 50%;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 2px;
  color: var(--black);
  background: rgba(255, 79, 53, 0.12);
  font-weight: 900;
  line-height: 1.04;
  transform: rotate(-2deg);
}

.title-badge strong {
  display: block;
  font-size: clamp(26px, 2.4vw, 36px);
  letter-spacing: 0;
}

.home-menu {
  display: grid;
}

.home-menu a {
  min-height: 94px;
  display: grid;
  place-items: center;
  border-top: 2px solid var(--line);
  color: var(--black);
  font-size: clamp(28px, 3vw, 36px);
  letter-spacing: 0;
  transition:
    background 0.2s ease,
    padding-left 0.2s ease;
}

.home-menu a:last-child {
  border-bottom: 2px solid var(--line);
}

.home-menu a:hover,
.home-menu a:focus-visible {
  background: rgba(255, 255, 255, 0.18);
  padding-left: 18px;
  outline: none;
}

.subpage {
  min-height: 100vh;
  background: var(--paper);
}

.page-header {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 22px 40px;
  border-bottom: 2px solid var(--black);
  background: rgba(255, 245, 236, 0.94);
  backdrop-filter: blur(12px);
}

.page-header > a {
  display: inline-grid;
  place-items: center;
  min-width: 72px;
  height: 42px;
  border: 2px solid var(--black);
  border-radius: 8px;
  font-weight: 900;
}

.page-header nav {
  display: flex;
  align-items: center;
  gap: 10px;
}

.page-header nav a {
  display: inline-grid;
  place-items: center;
  min-height: 38px;
  padding: 0 14px;
  border-radius: 8px;
  font-weight: 800;
}

.page-header nav a:hover,
.page-header nav a.active {
  color: #fff;
  background: var(--black);
}

.subpage-main {
  min-height: calc(100vh - 88px);
}

.content-section {
  padding: 92px 40px;
  background: var(--paper);
}

.content-section:nth-of-type(odd) {
  background: #fffaf5;
}

.section-shell {
  width: min(1120px, 100%);
  margin: 0 auto;
}

.section-label {
  margin: 0 0 12px;
  color: var(--orange);
  font-size: 14px;
  font-weight: 900;
  text-transform: uppercase;
}

.section-shell h1,
.section-shell h2 {
  margin: 0 0 32px;
  color: var(--black);
  font-size: clamp(34px, 4vw, 56px);
  line-height: 1.1;
}

.about-grid,
.contact-grid {
  display: grid;
  grid-template-columns: 1.35fr 0.65fr;
  gap: 24px;
}

.about-grid article,
.profile-facts,
.skill-grid article,
.project-list article,
.contact-grid a {
  border: 2px solid var(--black);
  border-radius: var(--radius);
  background: var(--panel);
}

.about-grid article {
  padding: 34px;
}

.about-grid h3,
.about-grid h2,
.skill-grid h3,
.skill-grid h2,
.project-list h3,
.project-list h2 {
  margin: 0 0 16px;
  font-size: 26px;
}

.about-grid p,
.skill-grid p,
.project-list p,
.project-list li {
  color: var(--muted);
  font-size: 16px;
  line-height: 1.85;
}

.about-grid p {
  margin: 0;
}

.about-grid p + p {
  margin-top: 16px;
}

.profile-facts {
  display: grid;
  padding: 22px;
  gap: 16px;
}

.profile-facts div {
  display: grid;
  align-content: center;
  min-height: 100px;
  padding: 18px;
  border-radius: 8px;
  color: #fff;
  background: var(--black);
}

.profile-facts strong {
  font-size: 32px;
  line-height: 1;
}

.profile-facts span {
  margin-top: 8px;
  color: rgba(255, 255, 255, 0.76);
}

.skill-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 18px;
}

.skill-grid article {
  min-height: 260px;
  padding: 26px;
}

.skill-grid span {
  display: inline-grid;
  place-items: center;
  width: 54px;
  height: 54px;
  margin-bottom: 24px;
  border-radius: 50%;
  color: #fff;
  background: var(--orange);
  font-weight: 900;
}

.project-list {
  display: grid;
  gap: 22px;
}

.project-list article {
  padding: 28px;
}

.project-list time {
  display: block;
  margin-bottom: 10px;
  color: var(--orange);
  font-weight: 900;
}

.project-list p {
  margin: 0;
}

.project-list ul {
  margin: 18px 0 0;
  padding-left: 22px;
}

.contact-grid {
  grid-template-columns: repeat(4, 1fr);
}

.contact-grid a {
  display: grid;
  gap: 10px;
  min-height: 132px;
  padding: 24px;
  transition:
    transform 0.2s ease,
    background 0.2s ease;
}

.contact-grid a:hover {
  transform: translateY(-4px);
  background: #fff;
}

.contact-grid strong {
  font-size: 22px;
}

.contact-grid span {
  color: var(--muted);
  line-height: 1.5;
  overflow-wrap: anywhere;
}

@media (max-width: 980px) {
  .home {
    min-height: auto;
    padding: 28px 18px 42px;
  }

  .home-inner {
    grid-template-columns: 1fr;
    gap: 28px;
  }

  .photo-wrap {
    width: min(430px, 100%);
    margin: 58px auto 0;
  }

  .title-badge {
    top: -58px;
    right: 50%;
    width: 220px;
    height: 110px;
    transform: translateX(50%) rotate(-2deg);
  }

  .title-badge span,
  .title-badge strong {
    font-size: 25px;
  }

  .home-menu {
    width: 100%;
  }

  .home-menu a {
    min-height: 72px;
    font-size: 28px;
  }

  .content-section {
    padding: 64px 18px;
  }

  .page-header {
    position: static;
    display: grid;
    padding: 14px 18px;
  }

  .page-header nav {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    width: 100%;
  }

  .about-grid,
  .contact-grid,
  .skill-grid {
    grid-template-columns: 1fr;
  }

  .skill-grid article {
    min-height: auto;
  }
}
