:root {
  --bg: #ebebeb;
  --ink: #111111;
  --white: #f4f4f4;
  --yellow: #f4cb1d;
  --blue: #4a88ea;
  --pink: #f76498;
  --green: #48cf87;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  color: var(--ink);
  font-family: "Inter", "PingFang SC", "Microsoft YaHei", sans-serif;
}

.dot-bg {
  background-color: var(--bg);
  background-image: radial-gradient(#8f8f8f 0.8px, transparent 0.8px);
  background-size: 20px 20px;
}

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

.site-nav-wrap {
  display: flex;
  justify-content: center;
  padding: 28px 14px 14px;
}

.site-nav {
  width: min(760px, 95vw);
  min-height: 70px;
  border: 4px solid var(--ink);
  border-radius: 999px;
  background: var(--white);
  box-shadow: 8px 8px 0 var(--ink);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 26px;
  padding: 8px 18px;
}

.nav-item {
  font-weight: 700;
  padding: 4px 2px;
  border-bottom: 3px solid transparent;
}

.nav-item.active {
  color: var(--blue);
  border-bottom-color: var(--ink);
}

.resume-btn {
  margin-left: 16px;
  border: 3px solid var(--ink);
  border-radius: 14px;
  background: var(--yellow);
  padding: 8px 16px;
  font-weight: 900;
  box-shadow: 2px 2px 0 var(--ink);
}

.page {
  width: min(1280px, 92vw);
  margin: 0 auto 44px;
}

.block {
  margin-top: 18px;
}

h1,
h2,
h3 {
  margin: 0;
}

.display-title {
  margin-top: 14px;
  margin-bottom: 18px;
  font-size: clamp(42px, 7vw, 84px);
  line-height: 0.98;
  font-weight: 900;
}

.ink-pink {
  background: var(--pink);
  color: #ffffff;
  padding: 0 6px;
}

.ink-blue {
  background: var(--blue);
  color: #ffffff;
  padding: 0 6px;
}

.pill {
  display: inline-block;
  border: 3px solid var(--ink);
  border-radius: 999px;
  background: var(--yellow);
  padding: 6px 12px;
  font-size: 13px;
  font-weight: 900;
}

.muted {
  color: #444444;
  font-size: clamp(15px, 1.8vw, 28px);
  line-height: 1.45;
}

.sub-muted {
  margin-top: 8px;
  color: #565656;
  font-size: clamp(13px, 1.2vw, 20px);
  line-height: 1.45;
}

.hero-grid {
  display: grid;
  gap: 36px;
  align-items: center;
  grid-template-columns: 1.2fr 0.8fr;
}

.btn-row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 20px;
}

.btn {
  border: 3px solid var(--ink);
  border-radius: 14px;
  box-shadow: 3px 3px 0 var(--ink);
  padding: 12px 22px;
  font-weight: 900;
  font-size: 16px;
}

.btn.small {
  font-size: 14px;
  padding: 10px 14px;
}

.btn-black {
  color: #ffffff;
  background: var(--ink);
}

.btn-white {
  background: var(--white);
}

.photo-frame {
  position: relative;
  border: 5px solid var(--ink);
  border-radius: 34px;
  box-shadow: 8px 8px 0 var(--ink);
  background: var(--yellow);
  padding: 16px;
  transition: transform 180ms ease, box-shadow 180ms ease;
}

.photo-frame img {
  width: 100%;
  height: 430px;
  border: 4px solid var(--ink);
  border-radius: 28px;
  object-fit: cover;
  display: block;
}

.sticker {
  position: absolute;
  border: 2px solid var(--ink);
  border-radius: 12px;
  padding: 5px 9px;
  font-size: 12px;
  font-weight: 900;
  background: #ffffff;
}

.sticker.top {
  right: 24px;
  top: 24px;
}

.sticker.bottom {
  right: 24px;
  bottom: 24px;
  background: #7addb4;
}

.section-head {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: center;
}

.section-head h2 {
  font-size: clamp(38px, 5.4vw, 68px);
  font-weight: 900;
}

.service-grid {
  margin-top: 18px;
  display: grid;
  gap: 20px;
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.service-card {
  border: 4px solid var(--ink);
  border-radius: 28px;
  padding: 18px;
  background: #e9e9e9;
  min-height: 350px;
  transition: transform 180ms ease, box-shadow 180ms ease;
}

.tilt-card:hover {
  transform: translateY(-4px) rotate(-0.8deg);
  box-shadow: 6px 6px 0 var(--ink);
}

.service-illus {
  height: 210px;
  border: 3px solid var(--ink);
  border-radius: 16px;
  background: #dbdbde;
  display: grid;
  place-items: center;
  margin-bottom: 14px;
  overflow: hidden;
}

.service-illus img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.sbox {
  width: 72px;
  height: 72px;
  border: 3px solid var(--ink);
  border-radius: 6px;
}

.sbox.blue {
  background: var(--blue);
}

.sbox.pink {
  background: var(--pink);
}

.sbox.green {
  background: #2dc467;
}

.service-card h3 {
  font-size: 33px;
  margin-bottom: 8px;
}

.service-card p {
  margin: 0;
  font-size: 16px;
  color: #444444;
}

.cta-block {
  border: 5px solid var(--ink);
  border-radius: 42px;
  box-shadow: 8px 8px 0 var(--ink);
  background: #ececec;
  padding: clamp(24px, 4.5vw, 56px);
  display: grid;
  gap: 20px;
  align-items: center;
  grid-template-columns: 1.1fr 0.9fr;
  transition: transform 180ms ease, box-shadow 180ms ease;
}

.cta-copy h2 {
  font-size: clamp(38px, 5vw, 68px);
  line-height: 1.08;
  font-weight: 900;
}

.cn-inline {
  display: inline-block;
  margin-top: 8px;
  font-size: clamp(22px, 3vw, 38px);
  line-height: 1.2;
  font-weight: 800;
}

.hl {
  border: 3px solid var(--ink);
  background: var(--yellow);
  padding: 0 8px;
}

.cta-art {
  position: relative;
  min-height: 300px;
}

.panel-layer {
  position: absolute;
  width: 78%;
  height: 82%;
  border: 4px solid var(--ink);
  border-radius: 30px;
}

.panel-layer.pink {
  background: var(--pink);
  right: 12%;
  top: 0;
}

.panel-layer.blue {
  background: var(--blue);
  right: 0;
  bottom: 0;
}

.panel-main {
  position: absolute;
  z-index: 2;
  width: 78%;
  height: 82%;
  right: 6%;
  top: 8%;
  border: 4px solid var(--ink);
  border-radius: 30px;
  background: #efefef;
  padding: 22px 20px;
}

.line {
  display: block;
  border: 3px solid var(--ink);
  border-radius: 10px;
  margin-bottom: 12px;
}

.line.dark {
  width: 66%;
  height: 20px;
  background: #111;
}

.line.light {
  width: 100%;
  height: 15px;
  border: none;
  background: #d7d7db;
}

.line.yellow {
  width: 100%;
  height: 70px;
  background: var(--yellow);
}

.line-row {
  display: grid;
  gap: 12px;
  grid-template-columns: 1fr 1fr;
}

.line.blue {
  height: 36px;
  width: 100%;
  background: #5ea1f0;
}

.line.green {
  height: 36px;
  width: 100%;
  background: #4fd78e;
}

.about-hero {
  display: grid;
  gap: 24px;
  align-items: center;
  grid-template-columns: 1fr 1fr;
}

.about-title {
  font-size: clamp(42px, 5.4vw, 78px);
  font-style: italic;
  line-height: 1.03;
  font-weight: 900;
  margin-bottom: 16px;
}

.about-photo {
  position: relative;
  border: 5px solid var(--ink);
  border-radius: 26px;
  overflow: hidden;
  transform: rotate(-2deg);
}

.about-photo img {
  width: 100%;
  height: 680px;
  object-fit: cover;
  display: block;
}

.badge-circle {
  position: absolute;
  right: -8px;
  bottom: -8px;
  width: 140px;
  height: 140px;
  border: 3px solid var(--ink);
  border-radius: 50%;
  background: var(--yellow);
  display: grid;
  place-items: center;
  text-align: center;
  font-size: 18px;
  font-weight: 900;
  line-height: 1.06;
}

.center-title {
  text-align: center;
  font-size: clamp(40px, 4.6vw, 66px);
  margin-bottom: 18px;
  font-style: italic;
}

.skills-grid {
  display: grid;
  gap: 14px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.skill-item {
  border: 4px solid var(--ink);
  border-radius: 20px;
  background: #ededed;
  padding: 16px 18px;
  transition: transform 160ms ease, box-shadow 160ms ease;
}

.skill-top {
  display: flex;
  justify-content: space-between;
  font-weight: 900;
  font-size: 28px;
}

.skill-bar {
  margin-top: 10px;
  border: 3px solid var(--ink);
  border-radius: 999px;
  background: #dfdfe3;
  overflow: hidden;
  height: 30px;
}

.skill-fill {
  height: 100%;
}

.journey-list {
  display: grid;
  gap: 14px;
}

.journey-item {
  border: 3px solid var(--ink);
  border-radius: 18px;
  background: #f2f2f2;
  padding: 14px 16px;
  transition: transform 160ms ease, box-shadow 160ms ease;
}

.journey-item h3 {
  font-size: 26px;
  margin-bottom: 6px;
}

.journey-item p {
  margin: 0;
  color: #434343;
}

.final-cta {
  border: 5px solid var(--ink);
  border-radius: 42px;
  box-shadow: 8px 8px 0 var(--ink);
  background: var(--yellow);
  text-align: center;
  padding: clamp(26px, 5vw, 54px);
}

.final-cta h2 {
  font-style: italic;
  font-size: clamp(38px, 5.6vw, 78px);
}

.final-cta p {
  margin: 14px auto 0;
  max-width: 920px;
  font-size: clamp(16px, 2vw, 28px);
}

.center {
  justify-content: center;
}

.writing-hero h1,
.repo-hero h1 {
  font-size: clamp(44px, 6vw, 74px);
  font-weight: 900;
}

.writing-list {
  display: grid;
  gap: 20px;
}

.writing-card {
  border: 3px solid var(--ink);
  border-radius: 22px;
  background: #ececec;
  padding: 16px;
  display: grid;
  gap: 12px;
  grid-template-columns: 78px 1fr;
  transition: transform 170ms ease, box-shadow 170ms ease;
}

.writing-date {
  width: 62px;
  height: 62px;
  border: 2px solid var(--ink);
  border-radius: 12px;
  background: var(--yellow);
  font-size: 12px;
  font-weight: 900;
  display: grid;
  place-items: center;
}

.writing-card h3 {
  margin: 0;
  font-size: 30px;
}

.writing-meta {
  margin: 4px 0;
  color: #555;
}

.repo-grid {
  display: grid;
  gap: 20px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.repo-card {
  border-radius: 30px;
  overflow: hidden;
  transition: transform 180ms ease;
}

.repo-thumb {
  border: 4px solid var(--ink);
  border-radius: 30px;
  height: 280px;
  position: relative;
  overflow: hidden;
  transition: transform 180ms ease, box-shadow 180ms ease;
}

.repo-thumb.has-image {
  background: #dedede;
}

.repo-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.repo-thumb .label {
  position: absolute;
  top: 12px;
  left: 12px;
  border: 2px solid var(--ink);
  border-radius: 999px;
  background: #fff;
  padding: 3px 8px;
  font-size: 12px;
  font-weight: 900;
  z-index: 2;
}

.repo-info h3 {
  margin-top: 10px;
  font-size: 40px;
  line-height: 1.08;
}

.repo-info p {
  margin: 8px 0;
  color: #444;
}

.repo-links {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.repo-link {
  border-bottom: 3px solid var(--ink);
  font-weight: 800;
  padding-bottom: 2px;
}

.site-footer {
  width: min(1280px, 92vw);
  margin: 10px auto 24px;
  padding-bottom: 10px;
  font-size: 14px;
}

.photo-frame:hover,
.cta-block:hover {
  transform: translateY(-3px);
  box-shadow: 10px 10px 0 var(--ink);
}

.skill-item:hover,
.journey-item:hover,
.writing-card:hover {
  transform: translateY(-3px);
  box-shadow: 5px 5px 0 var(--ink);
}

.repo-card:hover {
  transform: translateY(-4px);
}

.repo-card:hover .repo-thumb {
  transform: rotate(-0.6deg) scale(1.01);
  box-shadow: 7px 7px 0 var(--ink);
}

@media (max-width: 1024px) {
  .hero-grid,
  .about-hero,
  .cta-block {
    grid-template-columns: 1fr;
  }

  .service-grid,
  .skills-grid,
  .repo-grid {
    grid-template-columns: 1fr;
  }

  .photo-frame img,
  .about-photo img {
    height: 420px;
  }

  .site-nav {
    gap: 14px;
  }

  .resume-btn {
    margin-left: 0;
  }
}

@media (max-width: 700px) {
  .site-nav {
    justify-content: flex-start;
    overflow-x: auto;
    border-radius: 24px;
    min-height: 56px;
    box-shadow: 5px 5px 0 var(--ink);
  }

  .display-title,
  .about-title,
  .section-head h2,
  .writing-hero h1,
  .repo-hero h1,
  .final-cta h2 {
    font-size: clamp(30px, 10vw, 50px);
  }

  .service-card h3,
  .writing-card h3,
  .repo-info h3,
  .skill-top {
    font-size: 24px;
  }

  .writing-card {
    grid-template-columns: 1fr;
  }
}
