:root {
  --bg: #07101c;
  --bg-elevated: #0c1828;
  --surface: rgba(15, 30, 49, 0.78);
  --surface-solid: #101f32;
  --text: #f2f7ff;
  --muted: #9cafc7;
  --faint: #6f839d;
  --line: rgba(158, 191, 229, 0.18);
  --line-strong: rgba(158, 191, 229, 0.34);
  --accent: #66a8ff;
  --accent-strong: #8bc0ff;
  --accent-soft: rgba(102, 168, 255, 0.14);
  --header-bg: rgba(7, 16, 28, 0.74);
  --shadow: 0 24px 70px rgba(0, 5, 16, 0.38);
  --radius-lg: 28px;
  --radius-md: 18px;
  --content: 1160px;
}

[data-theme="light"] {
  --bg: #eef5fc;
  --bg-elevated: #f7fbff;
  --surface: rgba(255, 255, 255, 0.78);
  --surface-solid: #ffffff;
  --text: #0b1b2e;
  --muted: #4f657d;
  --faint: #71849a;
  --line: rgba(32, 75, 117, 0.16);
  --line-strong: rgba(32, 75, 117, 0.3);
  --accent-soft: rgba(47, 125, 214, 0.12);
  --header-bg: rgba(238, 245, 252, 0.78);
  --shadow: 0 24px 70px rgba(27, 68, 108, 0.13);
}

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

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

body {
  margin: 0;
  min-width: 320px;
  color: var(--text);
  background:
    radial-gradient(circle at 82% 8%, var(--accent-soft), transparent 26rem),
    linear-gradient(180deg, var(--bg) 0%, var(--bg-elevated) 46%, var(--bg) 100%);
  font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  font-size: 1rem;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

body::before {
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  content: "";
  opacity: 0.28;
  background-image: linear-gradient(var(--line) 1px, transparent 1px), linear-gradient(90deg, var(--line) 1px, transparent 1px);
  background-size: 72px 72px;
  mask-image: linear-gradient(to bottom, black, transparent 55%);
}

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

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

button {
  font: inherit;
}

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

.skip-link {
  position: fixed;
  top: 12px;
  left: 12px;
  z-index: 100;
  padding: 10px 14px;
  border-radius: 10px;
  color: #06101d;
  background: var(--accent-strong);
  transform: translateY(-160%);
}

.skip-link:focus {
  transform: translateY(0);
}

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

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  border-bottom: 1px solid transparent;
  background: var(--header-bg);
  backdrop-filter: blur(18px);
  transition: border-color 180ms ease;
}

.site-header.is-scrolled {
  border-color: var(--line);
}

.nav-shell {
  width: min(calc(100% - 40px), var(--content));
  min-height: 72px;
  margin-inline: auto;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 24px;
}

.brand {
  width: fit-content;
  display: inline-flex;
  align-items: center;
  gap: 11px;
  font-size: 0.92rem;
  font-weight: 700;
  letter-spacing: 0.02em;
}

.brand-mark {
  width: 12px;
  height: 12px;
  border: 3px solid var(--accent);
  border-radius: 50%;
  box-shadow: 0 0 0 5px var(--accent-soft);
}

.main-nav {
  display: flex;
  align-items: center;
  gap: 30px;
  color: var(--muted);
  font-size: 0.9rem;
}

.main-nav a,
.site-footer a {
  transition: color 160ms ease;
}

.main-nav a:hover,
.site-footer a:hover {
  color: var(--accent-strong);
}

.theme-toggle {
  justify-self: end;
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 50%;
  color: var(--text);
  background: var(--surface);
  cursor: pointer;
  transition: transform 160ms ease, border-color 160ms ease, background 160ms ease;
}

.theme-toggle:hover {
  transform: translateY(-2px);
  border-color: var(--line-strong);
  background: var(--accent-soft);
}

.theme-icon {
  font-size: 1.05rem;
  line-height: 1;
}

.hero {
  min-height: calc(100vh - 72px);
  min-height: calc(100svh - 72px);
  padding-block: 80px 96px;
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(320px, 0.8fr);
  align-items: center;
  gap: clamp(48px, 8vw, 112px);
}

.eyebrow,
.section-index {
  margin: 0;
  color: var(--accent-strong);
  font-size: 0.78rem;
  font-weight: 750;
  letter-spacing: 0.13em;
  text-transform: uppercase;
}

.eyebrow {
  display: flex;
  align-items: center;
  gap: 9px;
}

.status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 6px var(--accent-soft);
}

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

h1 {
  max-width: 850px;
  margin: 22px 0 8px;
  font-size: clamp(3.25rem, 8vw, 7rem);
  font-weight: 780;
  line-height: 0.96;
  letter-spacing: -0.06em;
}

h2 {
  margin: 6px 0 0;
  font-size: clamp(2rem, 4vw, 3.7rem);
  line-height: 1.12;
  letter-spacing: -0.04em;
}

.hero-role {
  margin: 18px 0 0;
  color: var(--accent-strong);
  font-size: 1rem;
  font-weight: 700;
  letter-spacing: 0.04em;
}

.hero-intro {
  max-width: 700px;
  margin: 22px 0 0;
  color: var(--muted);
  font-size: clamp(1.12rem, 2.1vw, 1.38rem);
  line-height: 1.65;
}

.hero-actions,
.contact-actions {
  margin-top: 34px;
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.button {
  min-height: 48px;
  padding: 11px 18px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  border: 1px solid transparent;
  border-radius: 13px;
  font-weight: 720;
  cursor: pointer;
  transition: transform 160ms ease, box-shadow 160ms ease, background 160ms ease, border-color 160ms ease;
}

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

.button-primary {
  color: #06101d;
  background: var(--accent-strong);
  box-shadow: 0 12px 30px var(--accent-soft);
}

.button-secondary {
  color: var(--text);
  border-color: var(--line);
  background: var(--surface);
}

.button-secondary:hover {
  border-color: var(--line-strong);
  background: var(--accent-soft);
}

.button[aria-disabled="true"] {
  color: var(--faint);
  background: var(--surface);
  border-color: var(--line);
  box-shadow: none;
  cursor: not-allowed;
}

.button[aria-disabled="true"]:hover {
  transform: none;
}

.hero-card {
  position: relative;
  isolation: isolate;
  padding: 14px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: linear-gradient(145deg, var(--surface-solid), var(--surface));
  box-shadow: var(--shadow);
  transform: rotate(2deg);
}

.hero-card::after {
  position: absolute;
  inset: 0;
  z-index: -1;
  content: "";
  background: linear-gradient(135deg, transparent 55%, var(--accent-soft));
}

.hero-card-glow {
  position: absolute;
  width: 180px;
  height: 180px;
  right: -40px;
  top: -50px;
  z-index: -1;
  border-radius: 50%;
  background: var(--accent);
  filter: blur(72px);
  opacity: 0.26;
}

.avatar-frame {
  overflow: hidden;
  aspect-ratio: 1;
  border-radius: 20px;
  background: #091426;
}

.avatar-frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.profile-mini {
  padding: 18px 6px 10px;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
}

.profile-mini strong,
.profile-mini span {
  display: block;
}

.profile-mini strong {
  font-size: 1rem;
}

.profile-mini div span,
.location {
  color: var(--muted);
  font-size: 0.8rem;
}

.location {
  text-align: right;
}

.signal {
  height: 22px;
  padding-inline: 6px;
  display: flex;
  align-items: end;
  gap: 4px;
}

.signal span {
  width: 3px;
  border-radius: 4px;
  background: var(--accent);
}

.signal span:nth-child(1) { height: 7px; }
.signal span:nth-child(2) { height: 14px; }
.signal span:nth-child(3) { height: 10px; }
.signal span:nth-child(4) { height: 18px; }
.signal span:nth-child(5) { height: 12px; }

.section-block {
  padding-block: 112px;
  border-top: 1px solid var(--line);
}

.section-heading {
  display: grid;
  grid-template-columns: minmax(130px, 0.3fr) minmax(0, 1fr);
  gap: 30px;
  align-items: start;
}

.section-note {
  margin: 15px 0 0;
  color: var(--muted);
}

.about-content {
  margin-top: 50px;
  margin-left: calc(30% + 30px);
}

.about-content > p {
  max-width: 780px;
  margin: 0;
  color: var(--muted);
  font-size: clamp(1.08rem, 2vw, 1.3rem);
  line-height: 1.9;
}

.stats {
  margin: 54px 0 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  border-top: 1px solid var(--line);
}

.stat {
  padding: 24px 18px 0 0;
}

.stat dt {
  color: var(--muted);
  font-size: 0.85rem;
}

.stat dd {
  margin: 5px 0 0;
  font-size: clamp(1.5rem, 3vw, 2.2rem);
  font-weight: 760;
  letter-spacing: -0.04em;
}

.works-grid {
  margin-top: 52px;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 26px;
}

.work-card {
  position: relative;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: var(--surface);
  box-shadow: 0 18px 50px rgba(0, 7, 19, 0.1);
  transition: transform 220ms ease, border-color 220ms ease, box-shadow 220ms ease;
}

.work-card:hover {
  transform: translateY(-5px);
  border-color: var(--line-strong);
  box-shadow: var(--shadow);
}

.work-image {
  overflow: hidden;
  aspect-ratio: 16 / 10;
  border-bottom: 1px solid var(--line);
  background: var(--bg-elevated);
}

.work-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 500ms cubic-bezier(.2,.7,.2,1);
}

.work-card:hover .work-image img {
  transform: scale(1.025);
}

.work-body {
  padding: 25px;
}

.work-meta {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  color: var(--accent-strong);
  font-size: 0.76rem;
  font-weight: 720;
  letter-spacing: 0.09em;
  text-transform: uppercase;
}

.work-body h3 {
  margin: 15px 0 0;
  font-size: 1.52rem;
  line-height: 1.25;
}

.work-body p {
  min-height: 3.4em;
  margin: 13px 0 0;
  color: var(--muted);
}

.work-link {
  width: fit-content;
  margin-top: 22px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--text);
  font-weight: 720;
}

.work-link::after {
  content: "↗";
  color: var(--accent-strong);
  transition: transform 160ms ease;
}

.work-link:hover::after {
  transform: translate(2px, -2px);
}

.work-link[aria-disabled="true"] {
  color: var(--faint);
  cursor: not-allowed;
}

.work-link[aria-disabled="true"]::after {
  content: "—";
}

.platform-list {
  margin: 48px 0 0;
  padding: 0;
  list-style: none;
  border-top: 1px solid var(--line);
}

.platform-link {
  min-height: 86px;
  padding: 16px 4px;
  display: grid;
  grid-template-columns: 1fr 1fr auto;
  align-items: center;
  gap: 24px;
  border-bottom: 1px solid var(--line);
  transition: padding 180ms ease, color 180ms ease, background 180ms ease;
}

.platform-link:hover {
  padding-inline: 14px;
  color: var(--accent-strong);
  background: linear-gradient(90deg, var(--accent-soft), transparent 68%);
}

.platform-name {
  font-size: 1.15rem;
  font-weight: 730;
}

.platform-username {
  color: var(--muted);
  font-size: 0.9rem;
}

.platform-arrow {
  font-size: 1.2rem;
}

.contact {
  margin-bottom: 112px;
  padding: clamp(30px, 6vw, 64px);
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(240px, 0.65fr);
  gap: 48px;
  align-items: end;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-lg);
  background:
    linear-gradient(125deg, var(--accent-soft), transparent 45%),
    var(--surface);
  box-shadow: var(--shadow);
}

.contact-copy p:last-child {
  max-width: 660px;
  margin: 20px 0 0;
  color: var(--muted);
}

.contact-actions {
  margin: 0;
  justify-content: flex-end;
}

.copy-status {
  width: 100%;
  min-height: 1.6em;
  margin: 5px 0 0;
  color: var(--accent-strong);
  font-size: 0.85rem;
  text-align: right;
}

.site-footer {
  color: var(--muted);
  border-top: 1px solid var(--line);
  font-size: 0.83rem;
}

.footer-inner {
  min-height: 96px;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 24px;
}

.footer-inner p {
  margin: 0;
}

.footer-inner a {
  justify-self: end;
  color: var(--text);
}

.empty-state,
.noscript {
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  color: var(--muted);
  background: var(--surface);
}

.noscript {
  position: fixed;
  right: 18px;
  bottom: 18px;
  z-index: 30;
}

.reveal {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 600ms ease, transform 600ms ease;
}

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

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

  .main-nav {
    display: none;
  }

  .hero {
    min-height: auto;
    padding-block: 76px 90px;
    grid-template-columns: 1fr;
  }

  .hero-copy {
    order: 1;
  }

  .hero-card {
    width: min(100%, 420px);
    order: 2;
    transform: rotate(0);
  }

  .about-content {
    margin-left: 0;
  }

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

  .contact-actions,
  .copy-status {
    justify-content: flex-start;
    text-align: left;
  }
}

@media (max-width: 580px) {
  .section-shell,
  .nav-shell {
    width: min(calc(100% - 28px), var(--content));
  }

  .site-header {
    position: relative;
  }

  .hero {
    padding-block: 52px 76px;
    gap: 52px;
  }

  h1 {
    font-size: clamp(3rem, 17vw, 4.5rem);
  }

  .section-block {
    padding-block: 80px;
  }

  .section-heading {
    grid-template-columns: 1fr;
    gap: 10px;
  }

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

  .stat {
    padding-block: 18px;
    border-bottom: 1px solid var(--line);
  }

  .work-body {
    padding: 21px;
  }

  .work-body p {
    min-height: auto;
  }

  .platform-link {
    grid-template-columns: 1fr auto;
    gap: 8px 16px;
  }

  .platform-username {
    grid-column: 1;
    grid-row: 2;
  }

  .platform-arrow {
    grid-column: 2;
    grid-row: 1 / span 2;
  }

  .contact {
    width: min(calc(100% - 28px), var(--content));
    margin-bottom: 80px;
  }

  .contact-actions .button {
    width: 100%;
  }

  .footer-inner {
    padding-block: 28px;
    grid-template-columns: 1fr;
    gap: 8px;
  }

  .footer-inner a {
    justify-self: start;
    margin-top: 8px;
  }
}

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

  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
  }

  .reveal {
    opacity: 1;
    transform: none;
  }
}
