:root {
  color-scheme: dark;
  font-family:
    Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
    "PingFang SC", "Microsoft YaHei", sans-serif;
  font-size: 16px;
  line-height: 1.5;
  color: #eff7ff;
  background: #030508;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  --bg: #030508;
  --panel: rgba(10, 16, 24, 0.78);
  --panel-strong: rgba(13, 22, 32, 0.96);
  --line: rgba(178, 212, 235, 0.14);
  --line-strong: rgba(155, 228, 255, 0.26);
  --text: #f2f8ff;
  --muted: rgba(225, 238, 248, 0.68);
  --soft: rgba(225, 238, 248, 0.48);
  --accent: #6ad7ff;
  --accent-2: #d4f3ff;
  --max: 1180px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  background: var(--bg);
}

body {
  margin: 0;
  overflow-x: hidden;
  background:
    radial-gradient(circle at 82% 10%, rgba(81, 205, 255, 0.14), transparent 31rem),
    radial-gradient(circle at 18% 42%, rgba(255, 255, 255, 0.055), transparent 26rem),
    #030508;
}

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

button,
input {
  font: inherit;
}

button {
  color: inherit;
}

.site-shell {
  min-height: 100vh;
  overflow-x: hidden;
}

.nav {
  position: fixed;
  z-index: 50;
  top: 24px;
  left: 50%;
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  width: min(calc(100vw - 64px), var(--max));
  padding: 10px 10px 10px 18px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 999px;
  background: rgba(4, 8, 13, 0.68);
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.32);
  backdrop-filter: blur(20px);
  transform: translateX(-50%);
}

.brand {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border: 1px solid rgba(106, 215, 255, 0.28);
  border-radius: 50%;
  color: var(--accent-2);
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0;
}

.nav nav {
  display: flex;
  justify-content: center;
  gap: 34px;
  color: rgba(239, 247, 255, 0.68);
  font-size: 0.9rem;
}

.nav nav a {
  transition:
    color 180ms ease,
    opacity 180ms ease;
}

.nav nav a:hover {
  color: #ffffff;
}

.nav-cta,
.hero-actions a,
.chat-form button,
.contact-actions a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  border-radius: 999px;
  border: 1px solid rgba(106, 215, 255, 0.34);
  background: linear-gradient(135deg, rgba(106, 215, 255, 0.22), rgba(255, 255, 255, 0.08));
  color: #f7fcff;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

.nav-cta {
  padding: 0 22px;
  font-size: 0.9rem;
}

.hero {
  position: relative;
  display: grid;
  min-height: 100vh;
  place-items: center;
  overflow: hidden;
  padding: 120px 64px 64px;
  border-bottom: 1px solid var(--line);
  isolation: isolate;
}

.hero::after {
  position: absolute;
  inset: 0;
  z-index: -1;
  content: "";
  background:
    linear-gradient(90deg, rgba(3, 5, 8, 0.92) 0%, rgba(3, 5, 8, 0.48) 52%, rgba(3, 5, 8, 0.86) 100%),
    linear-gradient(180deg, rgba(3, 5, 8, 0.14) 0%, #030508 96%);
}

.hero-video,
.hero-canvas-source {
  position: absolute;
  z-index: -3;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero-canvas-source {
  display: none;
}

.hero-grid {
  position: absolute;
  z-index: -2;
  inset: 0;
  opacity: 0.24;
  background-image:
    linear-gradient(rgba(178, 212, 235, 0.08) 1px, transparent 1px),
    linear-gradient(90deg, rgba(178, 212, 235, 0.08) 1px, transparent 1px);
  background-size: 72px 72px;
  mask-image: linear-gradient(180deg, transparent 0%, #000 14%, #000 74%, transparent 100%);
}

.hero-content {
  width: min(100%, var(--max));
  padding-top: 54px;
}

.hero-kicker,
.section-kicker {
  margin: 0 0 22px;
  color: var(--accent);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.hero h1 {
  max-width: 820px;
  margin: 0;
  color: #ffffff;
  font-size: 8.8rem;
  line-height: 0.86;
  letter-spacing: 0;
}

.hero-lede {
  max-width: 760px;
  margin: 34px 0 0;
  color: rgba(239, 247, 255, 0.78);
  font-size: 1.35rem;
  line-height: 1.72;
}

.hero-actions {
  display: flex;
  gap: 14px;
  margin-top: 44px;
}

.hero-actions a {
  min-width: 148px;
  padding: 0 24px;
}

.hero-actions .ghost-link {
  border-color: rgba(255, 255, 255, 0.18);
  background: rgba(255, 255, 255, 0.055);
}

.hero-status {
  position: absolute;
  right: 64px;
  bottom: 42px;
  display: flex;
  gap: 12px;
  color: rgba(239, 247, 255, 0.6);
  font-size: 0.82rem;
}

.hero-status span {
  padding: 8px 12px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.18);
}

.section,
.chat-section,
.contact-section {
  width: min(calc(100vw - 96px), var(--max));
  margin: 0 auto;
}

.section,
.chat-section {
  padding: 118px 0;
  border-bottom: 1px solid var(--line);
}

.section-head {
  max-width: 760px;
}

.section-head.split {
  display: grid;
  grid-template-columns: minmax(0, 0.95fr) minmax(360px, 0.7fr);
  align-items: end;
  max-width: none;
  gap: 76px;
}

.section-head h2,
.contact-section h2 {
  margin: 0;
  color: #ffffff;
  font-size: 4.8rem;
  line-height: 0.96;
  letter-spacing: 0;
}

.section-head p {
  margin: 22px 0 0;
  color: var(--muted);
  font-size: 1.05rem;
  line-height: 1.9;
}

.profile-layout {
  display: grid;
  grid-template-columns: 390px minmax(0, 1fr);
  gap: 82px;
  align-items: center;
}

.portrait-card {
  position: relative;
  margin: 0;
  overflow: hidden;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.08), rgba(255, 255, 255, 0.02));
  box-shadow: 0 42px 120px rgba(0, 0, 0, 0.42);
}

.portrait-card::after {
  position: absolute;
  inset: auto 0 0;
  height: 46%;
  content: "";
  background: linear-gradient(180deg, transparent, rgba(3, 5, 8, 0.8));
}

.portrait-card img {
  display: block;
  width: 100%;
  height: 540px;
  object-fit: cover;
  object-position: center top;
  filter: saturate(1.02) contrast(1.05);
}

.profile-facts {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  margin-top: 40px;
}

.profile-facts div,
.experience-card,
.strength-card,
.honor-panel,
.chat-window,
.prompt-rail,
.project-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06);
  backdrop-filter: blur(16px);
}

.profile-facts div {
  padding: 22px;
}

.profile-facts span,
.experience-card span,
.project-meta,
.project-index {
  display: block;
  color: var(--soft);
  font-size: 0.78rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.profile-facts strong {
  display: block;
  margin-top: 8px;
  color: var(--text);
  font-size: 1rem;
  word-break: break-word;
}

.experience-strip {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
  margin-top: 72px;
}

.experience-card {
  padding: 24px;
}

.experience-card h3,
.strength-card h3,
.honor-panel h3,
.project-card h3 {
  margin: 14px 0 0;
  color: #ffffff;
  font-size: 1.2rem;
  line-height: 1.35;
}

.experience-card .role {
  margin: 8px 0 14px;
  color: var(--accent);
}

.experience-card p,
.strength-card p,
.project-card p {
  color: var(--muted);
  line-height: 1.8;
}

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

.project-card {
  position: relative;
  min-height: 580px;
  overflow: hidden;
  padding: 34px;
  background:
    linear-gradient(145deg, rgba(106, 215, 255, 0.1), rgba(255, 255, 255, 0.035) 45%, rgba(255, 255, 255, 0.02)),
    var(--panel-strong);
}

.project-card::before {
  position: absolute;
  inset: 0;
  pointer-events: none;
  content: "";
  background:
    linear-gradient(120deg, transparent 0%, rgba(255, 255, 255, 0.08) 46%, transparent 47%),
    radial-gradient(circle at 82% 8%, rgba(106, 215, 255, 0.16), transparent 22rem);
  opacity: 0.7;
}

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

.project-index {
  color: rgba(255, 255, 255, 0.22);
  font-size: 4.8rem;
  font-weight: 800;
  line-height: 1;
}

.project-meta {
  display: flex;
  justify-content: space-between;
  margin-top: 90px;
  color: var(--accent);
}

.project-card h3 {
  margin-top: 24px;
  font-size: 1.95rem;
}

.project-card ul {
  display: grid;
  gap: 12px;
  margin: 26px 0 0;
  padding: 0;
  list-style: none;
}

.project-card li {
  position: relative;
  padding-left: 18px;
  color: rgba(239, 247, 255, 0.72);
  line-height: 1.75;
}

.project-card li::before {
  position: absolute;
  top: 0.74em;
  left: 0;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent);
  content: "";
}

.strength-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
  margin-top: 52px;
}

.strength-card {
  min-height: 250px;
  padding: 26px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.07), rgba(255, 255, 255, 0.025));
}

.honor-panel {
  margin-top: 18px;
  padding: 30px;
}

.honor-panel h3 {
  margin-top: 0;
}

.honor-list {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 18px;
}

.honor-list span,
.prompt-rail button {
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.04);
  color: rgba(239, 247, 255, 0.76);
}

.honor-list span {
  padding: 9px 13px;
  font-size: 0.9rem;
}

.chat-shell {
  display: grid;
  grid-template-columns: 320px minmax(0, 1fr);
  gap: 18px;
  margin-top: 46px;
}

.prompt-rail {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 18px;
}

.prompt-rail button {
  cursor: pointer;
  padding: 14px 16px;
  text-align: left;
  transition:
    border-color 180ms ease,
    color 180ms ease,
    background 180ms ease;
}

.prompt-rail button:hover {
  border-color: rgba(106, 215, 255, 0.44);
  background: rgba(106, 215, 255, 0.08);
  color: #ffffff;
}

.chat-window {
  min-height: 460px;
  padding: 18px;
}

.chat-log {
  display: flex;
  flex-direction: column;
  gap: 12px;
  height: 352px;
  overflow-y: auto;
  padding-right: 8px;
}

.message {
  max-width: 78%;
  padding: 14px 16px;
  border-radius: 8px;
  color: rgba(239, 247, 255, 0.82);
  line-height: 1.75;
}

.message.assistant {
  align-self: flex-start;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(255, 255, 255, 0.045);
}

.message.user {
  align-self: flex-end;
  border: 1px solid rgba(106, 215, 255, 0.28);
  background: rgba(106, 215, 255, 0.1);
}

.chat-form {
  display: grid;
  grid-template-columns: 1fr 98px;
  gap: 10px;
  margin-top: 18px;
}

.chat-form input {
  width: 100%;
  border: 1px solid rgba(255, 255, 255, 0.13);
  border-radius: 999px;
  outline: none;
  background: rgba(255, 255, 255, 0.05);
  color: #ffffff;
  padding: 0 18px;
}

.chat-form input:focus {
  border-color: rgba(106, 215, 255, 0.5);
}

.chat-form button {
  cursor: pointer;
}

.chat-form button:disabled {
  cursor: wait;
  opacity: 0.6;
}

.contact-section {
  display: grid;
  min-height: 100vh;
  align-content: center;
  gap: 54px;
  padding: 130px 0 44px;
}

.contact-section h2 {
  max-width: 960px;
  font-size: 7.2rem;
}

.contact-actions {
  display: flex;
  gap: 14px;
}

.contact-actions a {
  min-width: 210px;
  padding: 0 24px;
}

.contact-section footer {
  display: flex;
  justify-content: space-between;
  padding-top: 56px;
  border-top: 1px solid var(--line);
  color: var(--soft);
  font-size: 0.9rem;
}

@media (max-width: 1200px) {
  .experience-strip,
  .strength-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .profile-layout {
    grid-template-columns: 340px 1fr;
    gap: 52px;
  }
}

@media (max-width: 980px) {
  .nav {
    top: 14px;
    width: calc(100vw - 28px);
    grid-template-columns: auto auto;
    gap: 10px 16px;
    padding: 10px;
    border-radius: 22px;
  }

  .brand {
    width: 38px;
    height: 38px;
  }

  .nav nav {
    grid-column: 1 / -1;
    grid-row: 2;
    justify-content: flex-start;
    gap: 18px;
    overflow-x: auto;
    padding: 2px 2px 4px;
    scrollbar-width: none;
    white-space: nowrap;
  }

  .nav nav::-webkit-scrollbar {
    display: none;
  }

  .nav-cta {
    justify-self: end;
    min-height: 38px;
    padding: 0 16px;
  }

  .hero {
    min-height: 100svh;
    padding: 154px 24px 44px;
    place-items: end start;
  }

  .hero h1 {
    font-size: 6.4rem;
  }

  .hero-lede {
    max-width: 640px;
    font-size: 1.08rem;
    line-height: 1.75;
  }

  .hero-status {
    position: static;
    flex-wrap: wrap;
    margin-top: 34px;
  }

  .section,
  .chat-section,
  .contact-section {
    width: calc(100vw - 40px);
  }

  .section,
  .chat-section {
    padding: 86px 0;
  }

  .section-head.split,
  .profile-layout,
  .chat-shell {
    grid-template-columns: 1fr;
    gap: 34px;
  }

  .section-head h2,
  .contact-section h2 {
    font-size: 3.7rem;
  }

  .portrait-card {
    width: min(420px, 100%);
  }

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

  .project-card {
    min-height: auto;
  }

  .project-meta {
    margin-top: 54px;
  }

  .strength-grid,
  .experience-strip {
    grid-template-columns: 1fr;
  }

  .prompt-rail {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .contact-section {
    min-height: 100svh;
  }

  .contact-actions {
    flex-direction: column;
    align-items: flex-start;
  }
}

@media (max-width: 640px) {
  :root {
    font-size: 15px;
  }

  body {
    background:
      radial-gradient(circle at 74% 4%, rgba(81, 205, 255, 0.12), transparent 18rem),
      #030508;
  }

  .nav {
    top: 10px;
    width: calc(100vw - 24px);
    grid-template-columns: auto auto;
    border-radius: 999px;
    background: rgba(4, 8, 13, 0.82);
  }

  .nav nav {
    display: none;
  }

  .brand {
    width: 36px;
    height: 36px;
    font-size: 0.72rem;
  }

  .nav-cta {
    min-height: 36px;
    padding: 0 15px;
    font-size: 0.82rem;
  }

  .hero {
    min-height: auto;
    padding: 112px 18px 48px;
    place-items: start;
  }

  .hero-kicker,
  .section-kicker {
    margin-bottom: 16px;
    font-size: 0.68rem;
    letter-spacing: 0.12em;
  }

  .hero h1 {
    font-size: 3.85rem;
    line-height: 0.94;
  }

  .hero-lede {
    max-width: 22rem;
    margin-top: 20px;
    font-size: 1rem;
    line-height: 1.68;
  }

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

  .hero-actions {
    flex-direction: column;
    margin-top: 28px;
  }

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

  .hero-status {
    display: grid;
    gap: 8px;
    margin-top: 24px;
    font-size: 0.76rem;
  }

  .section,
  .chat-section,
  .contact-section {
    width: calc(100vw - 28px);
  }

  .section,
  .chat-section {
    padding: 56px 0;
  }

  .section-head h2,
  .contact-section h2 {
    font-size: 2.15rem;
    line-height: 1.08;
  }

  .section-head p {
    font-size: 0.98rem;
    line-height: 1.75;
  }

  .portrait-card img {
    height: 340px;
  }

  .profile-facts {
    grid-template-columns: 1fr;
  }

  .experience-strip {
    margin-top: 34px;
  }

  .project-card {
    padding: 22px;
    border-radius: 10px;
  }

  .project-index {
    font-size: 3rem;
  }

  .project-meta {
    display: grid;
    gap: 8px;
    margin-top: 38px;
  }

  .project-card h3 {
    font-size: 1.28rem;
    line-height: 1.45;
  }

  .project-card p,
  .project-card li,
  .experience-card p,
  .strength-card p {
    font-size: 0.94rem;
    line-height: 1.72;
  }

  .strength-card {
    min-height: 0;
  }

  .honor-panel,
  .experience-card,
  .strength-card {
    padding: 20px;
  }

  .experience-card,
  .strength-card,
  .honor-panel,
  .chat-window,
  .prompt-rail,
  .profile-facts div {
    border-radius: 10px;
  }

  .prompt-rail {
    grid-template-columns: 1fr;
  }

  .chat-window {
    min-height: 390px;
  }

  .chat-log {
    height: 304px;
  }

  .message {
    max-width: 92%;
  }

  .chat-form {
    grid-template-columns: 1fr;
  }

  .chat-form input,
  .chat-form button {
    min-height: 44px;
    border-radius: 12px;
  }

  .contact-section {
    gap: 36px;
    min-height: auto;
    padding: 72px 0 32px;
  }

  .contact-section footer {
    flex-direction: column;
    gap: 10px;
    padding-top: 34px;
  }

  .contact-actions a {
    min-width: 0;
    min-height: 46px;
    border-radius: 12px;
  }
}

@media (max-width: 390px) {
  .hero h1 {
    font-size: 3.45rem;
  }

  .section-head h2,
  .contact-section h2 {
    font-size: 1.95rem;
  }

  .nav-cta {
    padding: 0 12px;
  }
}
