:root {
  color-scheme: light;
  --color-ink: #080808;
  --color-muted: #6f6f6f;
  --color-line: rgba(8, 8, 8, 0.12);
  --color-paper: #f5f3ef;
  --color-white: #ffffff;
  --shadow-soft: 0 24px 80px rgba(0, 0, 0, 0.12);
  --shadow-tight: 0 10px 30px rgba(0, 0, 0, 0.08);
  --radius-large: 34px;
  --radius-medium: 24px;
  --font-sans: "Noto Sans SC", "Inter", "PingFang SC", "Microsoft YaHei", sans-serif;
  --font-display: "Playfair Display", Georgia, serif;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  min-height: 100vh;
  margin: 0;
  color: var(--color-ink);
  font-family: var(--font-sans);
  background:
    radial-gradient(circle at 15% 12%, rgba(255, 255, 255, 0.94), transparent 30%),
    radial-gradient(circle at 82% 8%, rgba(0, 0, 0, 0.12), transparent 26%),
    linear-gradient(135deg, #fbfaf7 0%, #ece9e2 46%, #ffffff 100%);
}

body::before {
  position: fixed;
  inset: 0;
  z-index: -2;
  content: "";
  background-image:
    linear-gradient(rgba(0, 0, 0, 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(0, 0, 0, 0.035) 1px, transparent 1px);
  background-size: 88px 88px;
  mask-image: linear-gradient(to bottom, rgba(0, 0, 0, 0.82), transparent 88%);
}

body::after {
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  content: "";
  background:
    linear-gradient(115deg, transparent 0 40%, rgba(255, 255, 255, 0.72) 42%, transparent 45%),
    linear-gradient(295deg, transparent 0 58%, rgba(255, 255, 255, 0.55) 60%, transparent 63%);
  opacity: 0.54;
}

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

button,
input,
textarea {
  font: inherit;
}

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

.site-header {
  position: sticky;
  top: 18px;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  margin: 18px 0 76px;
  padding: 14px 16px;
  border: 1px solid rgba(255, 255, 255, 0.72);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.58);
  box-shadow: var(--shadow-tight);
  backdrop-filter: blur(28px) saturate(1.25);
}

.brand,
.primary-nav {
  display: flex;
  align-items: center;
}

.brand {
  gap: 10px;
  font-size: 0.88rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.brand-mark {
  display: grid;
  width: 34px;
  height: 34px;
  color: var(--color-white);
  place-items: center;
  border-radius: 50%;
  background: var(--color-ink);
  font-family: var(--font-display);
  font-size: 1.15rem;
}

.primary-nav {
  gap: 8px;
}

.primary-nav a {
  padding: 10px 14px;
  border-radius: 999px;
  color: rgba(8, 8, 8, 0.68);
  font-size: 0.88rem;
  transition:
    color 180ms ease,
    background-color 180ms ease;
}

.primary-nav a:hover,
.primary-nav a:focus-visible {
  color: var(--color-ink);
  background: rgba(8, 8, 8, 0.06);
}

.nav-toggle {
  display: none;
  width: 42px;
  height: 42px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: var(--color-ink);
  cursor: pointer;
}

.nav-toggle span {
  display: block;
  width: 17px;
  height: 1px;
  margin: 0 auto;
  background: var(--color-white);
  transition:
    transform 180ms ease,
    opacity 180ms ease;
}

.nav-toggle span + span {
  margin-top: 6px;
}

.nav-open .nav-toggle span:first-child {
  transform: translateY(3.5px) rotate(42deg);
}

.nav-open .nav-toggle span:last-child {
  transform: translateY(-3.5px) rotate(-42deg);
}

main {
  display: grid;
  gap: 112px;
}

.section-grid {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(320px, 1fr);
  gap: clamp(28px, 5vw, 78px);
  align-items: center;
}

.hero {
  min-height: calc(100vh - 160px);
}

.eyebrow,
.section-kicker {
  margin: 0 0 18px;
  color: var(--color-muted);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.26em;
  text-transform: uppercase;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1,
h2 {
  font-family: var(--font-display);
  line-height: 0.98;
  letter-spacing: -0.055em;
}

h1 {
  max-width: 760px;
  margin-bottom: 26px;
  font-size: clamp(3.2rem, 8vw, 7.45rem);
}

h2 {
  margin-bottom: 0;
  font-size: clamp(2.75rem, 6vw, 5.6rem);
}

h3 {
  margin-bottom: 14px;
  font-size: clamp(1.45rem, 2vw, 1.9rem);
  letter-spacing: -0.04em;
}

.hero-lead,
.content-card p,
.contact-card p,
.project-card p {
  color: rgba(8, 8, 8, 0.68);
  font-size: clamp(1rem, 1.4vw, 1.16rem);
  line-height: 1.82;
}

.hero-lead {
  max-width: 590px;
  margin-bottom: 34px;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0 22px;
  border: 1px solid var(--color-ink);
  border-radius: 999px;
  font-size: 0.92rem;
  font-weight: 700;
  transition:
    transform 180ms ease,
    box-shadow 180ms ease,
    background-color 180ms ease;
}

.button:hover,
.button:focus-visible {
  transform: translateY(-2px);
  box-shadow: var(--shadow-tight);
}

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

.button-secondary {
  color: var(--color-ink);
  background: rgba(255, 255, 255, 0.42);
}

.mirror-card {
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.76);
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.78), rgba(255, 255, 255, 0.28)),
    linear-gradient(320deg, rgba(0, 0, 0, 0.08), transparent 45%);
  box-shadow: var(--shadow-soft);
  backdrop-filter: blur(28px) saturate(1.18);
}

.mirror-card::before {
  position: absolute;
  inset: -45% auto auto -20%;
  width: 68%;
  height: 170%;
  content: "";
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.72), transparent);
  transform: rotate(22deg);
  opacity: 0.58;
}

.mirror-card::after {
  position: absolute;
  inset: 0;
  pointer-events: none;
  content: "";
  border-radius: inherit;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.72), transparent 24%);
  opacity: 0.7;
}

.hero-card {
  min-height: clamp(420px, 58vw, 650px);
  padding: clamp(22px, 4vw, 40px);
  border-radius: var(--radius-large);
}

.portrait-frame {
  position: relative;
  z-index: 1;
  display: grid;
  height: 100%;
  min-height: 390px;
  place-items: center;
  border: 1px solid rgba(8, 8, 8, 0.11);
  border-radius: calc(var(--radius-large) - 10px);
  background:
    radial-gradient(circle at 50% 30%, rgba(255, 255, 255, 0.95), transparent 26%),
    linear-gradient(150deg, #111 0%, #f7f7f7 45%, #050505 100%);
}

.portrait-frame::before,
.portrait-frame::after {
  position: absolute;
  content: "";
  border-radius: inherit;
}

.portrait-frame::before {
  inset: 18px;
  border: 1px solid rgba(255, 255, 255, 0.34);
}

.portrait-frame::after {
  inset: auto 24px 22px;
  height: 28%;
  background: linear-gradient(180deg, transparent, rgba(255, 255, 255, 0.5));
  filter: blur(22px);
}

.portrait-frame span {
  position: relative;
  z-index: 1;
  color: rgba(255, 255, 255, 0.92);
  font-family: var(--font-display);
  font-size: clamp(4.5rem, 11vw, 9rem);
  letter-spacing: -0.08em;
  mix-blend-mode: difference;
}

.profile-meta {
  position: absolute;
  right: 34px;
  bottom: 34px;
  left: 34px;
  z-index: 2;
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 20px;
  color: var(--color-white);
}

.profile-meta p,
.profile-meta strong {
  margin: 0;
  text-shadow: 0 2px 12px rgba(0, 0, 0, 0.32);
}

.profile-meta p {
  font-size: 0.78rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.profile-meta strong {
  max-width: 230px;
  text-align: right;
  font-size: 0.96rem;
  line-height: 1.4;
}

.content-card,
.contact-card {
  padding: clamp(26px, 5vw, 54px);
  border-radius: var(--radius-large);
}

.content-card p:last-of-type,
.contact-card p {
  margin-bottom: 0;
}

.skill-list {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 28px;
}

.skill-list span {
  padding: 9px 13px;
  border: 1px solid var(--color-line);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.42);
  color: rgba(8, 8, 8, 0.72);
  font-size: 0.86rem;
}

.section-heading {
  max-width: 720px;
  margin-bottom: 34px;
}

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

.project-card {
  min-height: 330px;
  padding: 28px;
  border-radius: var(--radius-medium);
  transition:
    transform 180ms ease,
    box-shadow 180ms ease;
}

.project-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 32px 90px rgba(0, 0, 0, 0.16);
}

.project-card > * {
  position: relative;
  z-index: 1;
}

.project-index {
  display: block;
  margin-bottom: 92px;
  color: rgba(8, 8, 8, 0.42);
  font-family: var(--font-display);
  font-size: 3rem;
  line-height: 1;
}

.project-card p {
  margin-bottom: 28px;
}

.project-card a {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-weight: 700;
}

.project-card a::after {
  content: "";
  width: 34px;
  height: 1px;
  background: currentColor;
  transition: width 180ms ease;
}

.project-card a:hover::after,
.project-card a:focus-visible::after {
  width: 48px;
}

.contact-card {
  display: grid;
  gap: 32px;
}

.contact-list {
  display: grid;
  gap: 12px;
  padding: 0;
  margin: 0;
  list-style: none;
}

.contact-list li {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 16px 0;
  border-bottom: 1px solid var(--color-line);
}

.contact-list li:first-child {
  border-top: 1px solid var(--color-line);
}

.contact-list span:first-child {
  color: var(--color-muted);
  font-size: 0.76rem;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.contact-list a,
.contact-list span:last-child {
  font-weight: 700;
}

.site-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 52px 0 34px;
  color: rgba(8, 8, 8, 0.56);
  font-size: 0.9rem;
}

.site-footer p {
  margin: 0;
}

.site-footer a {
  font-weight: 700;
}

@media (max-width: 900px) {
  .site-header {
    align-items: flex-start;
    border-radius: 28px;
  }

  .nav-toggle {
    display: block;
    flex: 0 0 auto;
  }

  .primary-nav {
    position: absolute;
    top: calc(100% + 10px);
    right: 0;
    left: 0;
    display: grid;
    padding: 10px;
    border: 1px solid rgba(255, 255, 255, 0.72);
    border-radius: 24px;
    background: rgba(255, 255, 255, 0.82);
    box-shadow: var(--shadow-tight);
    backdrop-filter: blur(22px);
    opacity: 0;
    transform: translateY(-8px);
    pointer-events: none;
    transition:
      opacity 180ms ease,
      transform 180ms ease;
  }

  .nav-open .primary-nav {
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
  }

  .primary-nav a {
    padding: 14px 16px;
  }

  main {
    gap: 86px;
  }

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

  .hero {
    min-height: auto;
  }

  .hero-card {
    min-height: 430px;
  }

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

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

  .project-index {
    margin-bottom: 54px;
  }
}

@media (max-width: 560px) {
  .page-shell {
    width: min(100% - 24px, 1180px);
  }

  .site-header {
    top: 12px;
    margin: 12px 0 62px;
    padding: 10px;
  }

  h1 {
    font-size: clamp(3rem, 18vw, 4.75rem);
  }

  .hero-actions,
  .button {
    width: 100%;
  }

  .hero-card {
    padding: 16px;
    border-radius: 26px;
  }

  .portrait-frame {
    min-height: 330px;
    border-radius: 18px;
  }

  .profile-meta {
    right: 24px;
    bottom: 24px;
    left: 24px;
    display: grid;
  }

  .profile-meta strong {
    text-align: left;
  }

  .content-card,
  .contact-card,
  .project-card {
    padding: 22px;
    border-radius: 22px;
  }

  .contact-list li {
    align-items: flex-start;
    flex-direction: column;
    gap: 6px;
  }

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