/* Zhengzhi Du — personal site, framed after hejustinsun.com/zh visual system */

:root {
  --bg: #ffffff;
  --text: #09090b;
  --muted: #a1a1aa;
  --muted-2: #9ca3af;
  --blue: #00339e;
  --blue-hover: #606baf;
  --card-border: #f3f4f6;
  --wrap: 1280px;
  --nav-inset: 40px;
  --radius-banner: 24px;
  --radius-card: 25px;
  --shadow-card:
    0 0.72px 3.32px -1.33px rgba(0, 0, 0, 0.12),
    0 2.75px 12.63px -2.67px rgba(0, 0, 0, 0.11),
    0 12px 55.2px -4px rgba(0, 0, 0, 0.03);
  --shadow-pill:
    0 2px 8px rgba(0, 0, 0, 0.06),
    0 8px 24px rgba(0, 0, 0, 0.06);
  --font: "Inter", "Noto Sans SC", system-ui, -apple-system, sans-serif;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  font-family: var(--font);
  font-weight: 400;
  color: var(--text);
  background: var(--bg);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

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

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

button {
  font: inherit;
  color: inherit;
  background: none;
  border: 0;
  cursor: pointer;
  padding: 0;
}

.wrap {
  width: min(100% - 48px, var(--wrap));
  margin-inline: auto;
}

/* ---------- Nav ---------- */

.site-nav {
  position: sticky;
  top: 0;
  z-index: 100;
  padding: 18px 0 8px;
  background: transparent;
  transition: padding 0.28s ease;
}

.nav-shell {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 24px;
  width: min(100% - 48px, var(--wrap));
  margin-inline: auto;
  padding: 10px var(--nav-inset);
  border-radius: 0;
  background: transparent;
  transition:
    background 0.28s ease,
    box-shadow 0.28s ease,
    border-radius 0.28s ease,
    width 0.28s ease,
    padding 0.28s ease;
}

.site-nav.is-stuck .nav-shell {
  width: min(100% - 32px, 920px);
  background: #fff;
  border-radius: 999px;
  box-shadow: var(--shadow-pill);
  padding: 10px 28px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  z-index: 2;
}

.brand-mark {
  font-family: Georgia, "Noto Serif SC", "Songti SC", serif;
  font-style: italic;
  font-size: 22px;
  font-weight: 500;
  color: var(--blue);
  letter-spacing: 0.04em;
  line-height: 1;
}

.nav-links {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 28px;
}

.nav-links a {
  font-size: 15px;
  font-weight: 450;
  color: var(--muted);
  letter-spacing: 0.01em;
  transition: color 0.2s ease;
}

.nav-links a:hover,
.nav-links a.is-active {
  color: var(--blue);
}

.nav-cta {
  font-size: 13px;
  font-weight: 500;
  color: var(--blue);
  letter-spacing: 0.02em;
  white-space: nowrap;
  z-index: 2;
}

.nav-toggle {
  display: none;
  width: 40px;
  height: 40px;
  place-items: center;
  gap: 6px;
  flex-direction: column;
  z-index: 2;
}

.nav-toggle span {
  display: block;
  width: 18px;
  height: 1.5px;
  background: var(--text);
  transition: transform 0.2s ease, opacity 0.2s ease;
}

.site-nav.is-open .nav-toggle span:first-child {
  transform: translateY(3.75px) rotate(45deg);
}

.site-nav.is-open .nav-toggle span:last-child {
  transform: translateY(-3.75px) rotate(-45deg);
}

/* ---------- Hero ---------- */

.hero {
  padding: 24px 0 0;
}

.hero-banner {
  position: relative;
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  min-height: 494px;
  aspect-ratio: 1280 / 494;
  border-radius: var(--radius-banner);
  overflow: hidden;
  background:
    linear-gradient(120deg, #f8fafc 0%, #eef2ff 42%, #e0e7ff 100%);
  border: 1px solid var(--card-border);
}

.hero-banner-copy {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 56px 48px 56px 56px;
  gap: 14px;
}

.hero-kicker {
  margin: 0;
  font-size: 13px;
  font-weight: 550;
  letter-spacing: 0.14em;
  color: var(--blue);
}

.hero-banner-copy h1 {
  margin: 0;
  font-size: clamp(32px, 3.6vw, 48px);
  font-weight: 550;
  line-height: 1.08;
  letter-spacing: -0.02em;
  color: var(--text);
}

.hero-banner-desc {
  margin: 4px 0 0;
  max-width: 34ch;
  font-size: 16px;
  font-weight: 400;
  line-height: 1.45;
  color: #3f3f46;
}

.hero-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-top: 18px;
  align-self: flex-start;
  height: 40px;
  padding: 0 22px;
  border-radius: 999px;
  background: #fff;
  color: var(--text);
  font-size: 14px;
  font-weight: 500;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.06), 0 4px 14px rgba(0, 37, 99, 0.08);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.hero-pill:hover {
  transform: translateY(-1px);
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.06), 0 8px 20px rgba(0, 37, 99, 0.12);
}

.hero-banner-visual {
  position: relative;
  overflow: hidden;
}

.hero-orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(2px);
}

.hero-orb-a {
  width: 280px;
  height: 280px;
  right: 8%;
  top: 12%;
  background: radial-gradient(circle at 30% 30%, #93c5fd, #00339e 70%);
  opacity: 0.55;
}

.hero-orb-b {
  width: 180px;
  height: 180px;
  right: 28%;
  bottom: 10%;
  background: radial-gradient(circle at 40% 40%, #c7d2fe, #2563eb 75%);
  opacity: 0.7;
}

.hero-grid {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(0, 51, 158, 0.06) 1px, transparent 1px),
    linear-gradient(90deg, rgba(0, 51, 158, 0.06) 1px, transparent 1px);
  background-size: 36px 36px;
  mask-image: radial-gradient(ellipse at 70% 50%, #000 20%, transparent 70%);
}

.hero-panel {
  position: absolute;
  right: 12%;
  top: 50%;
  transform: translateY(-50%);
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 28px 32px;
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.72);
  backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.8);
  box-shadow: var(--shadow-card);
}

.hero-panel span {
  font-size: 18px;
  font-weight: 550;
  letter-spacing: 0.08em;
  color: var(--blue);
}

.hero-intro {
  margin: 64px auto 0;
  max-width: 820px;
  text-align: center;
  font-size: clamp(22px, 2.5vw, 32px);
  font-weight: 450;
  line-height: 1.1;
  letter-spacing: -0.01em;
  color: var(--text);
}

/* ---------- Sections ---------- */

.section {
  padding: 80px 0 0;
}

.section-head {
  margin-bottom: 28px;
}

.section-head h2 {
  margin: 0;
  font-size: 36px;
  font-weight: 550;
  line-height: 1;
  letter-spacing: -0.01em;
  color: var(--blue);
}

.section-sub {
  margin: 10px 0 0;
  font-size: 15px;
  font-weight: 400;
  color: var(--muted-2);
}

/* ---------- Milestones ---------- */

.timeline-track {
  margin: 8px 0 20px;
}

.timeline-line-wrap {
  overflow: hidden;
}

.timeline-line {
  position: relative;
  display: flex;
  align-items: center;
  gap: calc((100% - 32px) / 3);
  height: 28px;
  padding-top: 8px;
}

.timeline-line::before {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: 15px;
  height: 1px;
  background: #e5e7eb;
}

.timeline-line .dot {
  position: relative;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #d1d5db;
  flex: 0 0 auto;
}

.timeline-line .dot::after {
  content: attr(data-label);
  position: absolute;
  left: 50%;
  top: -18px;
  transform: translateX(-50%);
  font-size: 11px;
  font-weight: 500;
  color: var(--muted-2);
  white-space: nowrap;
  letter-spacing: 0.04em;
}

.milestones-scroller {
  overflow-x: auto;
  overflow-y: hidden;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  padding: 8px 0 24px;
  outline: none;
}

.milestones-scroller::-webkit-scrollbar {
  display: none;
}

.milestones-row {
  display: flex;
  gap: 20px;
  width: max-content;
  padding-inline: max(24px, calc((100vw - var(--wrap)) / 2));
}

.ms-card {
  flex: 0 0 320px;
  width: 320px;
  height: 547px;
  display: flex;
  flex-direction: column;
  border-radius: var(--radius-card);
  border: 1px solid var(--card-border);
  background: #fff;
  box-shadow: var(--shadow-card);
  overflow: hidden;
  scroll-snap-align: start;
  transition: transform 0.25s ease;
}

.ms-card:hover {
  transform: translateY(-2px);
}

.ms-photo {
  position: relative;
  flex: 0 0 399px;
  height: 399px;
  background: #09090b;
  overflow: hidden;
}

.ms-photo-inner {
  position: absolute;
  inset: 0;
  background: var(--ms-grad, linear-gradient(145deg, #0c1423, #2563eb));
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
}

.ms-glyph {
  font-size: 64px;
  font-weight: 550;
  color: rgba(255, 255, 255, 0.92);
  letter-spacing: 0.04em;
  line-height: 1;
}

.ms-tag {
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.65);
}

.ms-date {
  position: absolute;
  left: 22px;
  bottom: 20px;
  margin: 0;
  font-size: 36px;
  font-weight: 550;
  line-height: 1;
  letter-spacing: -0.02em;
  color: #fff;
  z-index: 2;
}

.ms-body {
  flex: 1;
  display: flex;
  align-items: center;
  padding: 22px 24px;
  background: #fff;
  transition: background 0.25s ease, color 0.25s ease;
}

.ms-body p {
  margin: 0;
  font-size: 20px;
  font-weight: 400;
  line-height: 1.2;
  color: var(--text);
  transition: color 0.25s ease;
}

.ms-card:hover .ms-body {
  background: var(--blue);
}

.ms-card:hover .ms-body p {
  color: #fff;
}

/* ---------- Works ---------- */

.works-featured {
  margin-bottom: 40px;
}

.work-featured {
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 0;
  border-radius: var(--radius-card);
  border: 1px solid var(--card-border);
  overflow: hidden;
  box-shadow: var(--shadow-card);
  background: #fff;
}

.work-featured-visual {
  display: grid;
  place-items: center;
  min-height: 220px;
  background: linear-gradient(145deg, #0c1423 0%, #00339e 55%, #2563eb 100%);
}

.work-featured-mark {
  font-size: 72px;
  font-weight: 550;
  color: rgba(255, 255, 255, 0.95);
  letter-spacing: 0.06em;
}

.work-featured-copy {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 36px 40px;
  gap: 10px;
}

.work-eyebrow {
  margin: 0;
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.08em;
  color: var(--muted-2);
  text-transform: uppercase;
}

.work-featured-copy h3 {
  margin: 0;
  font-size: 28px;
  font-weight: 550;
  line-height: 1.15;
  letter-spacing: -0.01em;
  color: var(--text);
}

.work-featured-copy > p:not(.work-eyebrow) {
  margin: 0;
  max-width: 52ch;
  font-size: 16px;
  line-height: 1.5;
  color: #3f3f46;
}

.work-links {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 10px;
}

.work-links a {
  display: inline-flex;
  align-items: center;
  height: 34px;
  padding: 0 16px;
  border-radius: 999px;
  border: 1px solid #e5e7eb;
  font-size: 13px;
  font-weight: 500;
  color: var(--blue);
  transition: background 0.2s ease, border-color 0.2s ease;
}

.work-links a:hover {
  background: #eff6ff;
  border-color: #bfdbfe;
}

.works-group-label {
  margin: 0 0 16px;
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted-2);
}

.works-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  padding-bottom: 24px;
}

.work-card {
  display: flex;
  flex-direction: column;
  gap: 16px;
  padding: 24px;
  border-radius: 20px;
  border: 1px solid var(--card-border);
  background: #fff;
  box-shadow: var(--shadow-card);
  transition: transform 0.2s ease, border-color 0.2s ease;
  min-height: 180px;
}

.work-card:hover {
  transform: translateY(-2px);
  border-color: #e5e7eb;
}

.work-icon {
  width: 52px;
  height: 52px;
  border-radius: 14px;
  display: grid;
  place-items: center;
  font-size: 20px;
  font-weight: 550;
  color: #fff;
  background: var(--c, var(--blue));
}

.work-meta h3 {
  margin: 0 0 6px;
  font-size: 18px;
  font-weight: 550;
  line-height: 1.2;
  color: var(--text);
}

.work-meta p {
  margin: 0;
  font-size: 14px;
  line-height: 1.4;
  color: #71717a;
}

.work-pill {
  margin-top: auto;
  align-self: flex-start;
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.04em;
  color: var(--blue);
  background: #eff6ff;
  padding: 5px 10px;
  border-radius: 999px;
}

/* ---------- Footer ---------- */

.site-footer {
  margin-top: 80px;
  background: linear-gradient(33deg, #0c1423 -2%, #2563eb 90%);
  color: #fff;
}

.footer-inner {
  display: grid;
  grid-template-columns: 1.1fr 2fr;
  gap: 48px;
  padding: 64px 0 48px;
}

.footer-logo {
  margin: 0;
  font-size: 32px;
  font-weight: 550;
  font-style: italic;
  font-family: Georgia, "Noto Serif SC", serif;
  letter-spacing: 0.02em;
}

.footer-tag {
  margin: 10px 0 0;
  font-size: 14px;
  color: rgba(255, 255, 255, 0.72);
}

.footer-social {
  display: flex;
  gap: 10px;
  margin-top: 22px;
}

.footer-social a {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.35);
  display: grid;
  place-items: center;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.04em;
  transition: background 0.2s ease;
}

.footer-social a:hover {
  background: rgba(255, 255, 255, 0.12);
}

.footer-cols {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
}

.footer-col-label {
  margin: 0 0 10px;
  font-size: 13px;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.6);
  letter-spacing: 0.04em;
}

.footer-col a {
  font-size: 15px;
  font-weight: 450;
  word-break: break-all;
  transition: opacity 0.2s ease;
}

.footer-col a:hover {
  opacity: 0.8;
}

.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.18);
}

.footer-bottom-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  padding: 18px 0 28px;
  font-size: 13px;
  color: rgba(255, 255, 255, 0.75);
}

.footer-bottom-inner a:hover {
  color: #fff;
}

/* ---------- Reveal ---------- */

.reveal {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 0.55s ease, transform 0.55s ease;
}

.reveal.is-in {
  opacity: 1;
  transform: none;
}

/* ---------- Responsive ---------- */

@media (max-width: 1100px) {
  .works-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .footer-cols {
    grid-template-columns: repeat(2, 1fr);
  }

  .hero-banner {
    aspect-ratio: auto;
    min-height: 420px;
  }
}

@media (max-width: 860px) {
  .nav-shell {
    grid-template-columns: auto auto 1fr;
    padding: 8px 12px;
  }

  .nav-cta {
    display: none;
  }

  .nav-toggle {
    display: inline-flex;
    margin-left: auto;
  }

  .nav-links {
    position: absolute;
    left: 16px;
    right: 16px;
    top: calc(100% + 8px);
    display: none;
    flex-direction: column;
    gap: 0;
    padding: 12px;
    background: #fff;
    border-radius: 16px;
    box-shadow: var(--shadow-pill);
    border: 1px solid var(--card-border);
  }

  .site-nav.is-open .nav-links {
    display: flex;
  }

  .nav-links a {
    width: 100%;
    padding: 12px 14px;
    border-radius: 10px;
  }

  .nav-links a:hover {
    background: #f8fafc;
  }

  .site-nav.is-stuck .nav-shell {
    width: min(100% - 24px, 920px);
    border-radius: 20px;
  }

  .hero-banner {
    grid-template-columns: 1fr;
    min-height: 0;
  }

  .hero-banner-copy {
    padding: 40px 28px 28px;
  }

  .hero-banner-visual {
    min-height: 220px;
  }

  .hero-panel {
    right: 50%;
    transform: translate(50%, -50%);
  }

  .hero-intro {
    margin-top: 40px;
    font-size: 22px;
  }

  .section {
    padding-top: 56px;
  }

  .section-head h2 {
    font-size: 28px;
  }

  .work-featured {
    grid-template-columns: 1fr;
  }

  .work-featured-copy {
    padding: 28px;
  }

  .footer-inner {
    grid-template-columns: 1fr;
    gap: 36px;
    padding: 48px 0 36px;
  }

  .ms-card {
    flex-basis: 280px;
    width: 280px;
    height: 500px;
  }

  .ms-photo {
    flex-basis: 360px;
    height: 360px;
  }

  .ms-date {
    font-size: 30px;
  }

  .ms-body p {
    font-size: 17px;
  }
}

@media (max-width: 560px) {
  .wrap {
    width: min(100% - 32px, var(--wrap));
  }

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

  .footer-cols {
    grid-template-columns: 1fr;
  }

  .footer-bottom-inner {
    flex-direction: column;
    align-items: flex-start;
  }

  .milestones-row {
    padding-inline: 16px;
  }

  .brand-mark {
    font-size: 18px;
  }
}
