:root {
  --bg: #07111f;
  --bg-soft: #0d1730;
  --panel: rgba(10, 21, 43, 0.68);
  --panel-strong: rgba(11, 24, 48, 0.88);
  --line: rgba(122, 215, 255, 0.18);
  --text: #edf7ff;
  --muted: #96aeca;
  --accent: #86f7ff;
  --accent-strong: #29b7ff;
  --accent-warm: #9effc8;
  --shadow: 0 24px 80px rgba(0, 0, 0, 0.38);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: "Bahnschrift", "Segoe UI Variable Text", "Microsoft YaHei UI", sans-serif;
  color: var(--text);
  background:
    radial-gradient(circle at top left, rgba(41, 183, 255, 0.22), transparent 26%),
    radial-gradient(circle at 80% 10%, rgba(158, 255, 200, 0.12), transparent 20%),
    linear-gradient(180deg, #07101d 0%, #040913 100%);
  overflow-x: hidden;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  background:
    linear-gradient(rgba(255, 255, 255, 0.015) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.015) 1px, transparent 1px);
  background-size: 52px 52px;
  mask-image: linear-gradient(180deg, rgba(0, 0, 0, 0.82), transparent 94%);
  pointer-events: none;
}

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

.site-shell {
  position: relative;
  min-height: 100vh;
}

.orb {
  position: fixed;
  border-radius: 50%;
  filter: blur(80px);
  opacity: 0.55;
  pointer-events: none;
}

.orb-a {
  width: 18rem;
  height: 18rem;
  top: 8%;
  left: -3rem;
  background: rgba(41, 183, 255, 0.26);
  animation: floatA 12s ease-in-out infinite;
}

.orb-b {
  width: 14rem;
  height: 14rem;
  top: 46%;
  right: -2rem;
  background: rgba(158, 255, 200, 0.18);
  animation: floatB 14s ease-in-out infinite;
}

.grid-mask {
  position: fixed;
  inset: 0;
  background: radial-gradient(circle at var(--mx, 50%) var(--my, 50%), rgba(134, 247, 255, 0.16), transparent 18%);
  pointer-events: none;
  mix-blend-mode: screen;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1.2rem 5vw;
  backdrop-filter: blur(18px);
  background: rgba(4, 10, 21, 0.46);
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.brand {
  font-weight: 700;
  letter-spacing: 0.12em;
  font-size: 0.95rem;
}

.nav {
  display: flex;
  gap: 1.5rem;
  color: var(--muted);
  font-size: 0.95rem;
}

.nav a:hover {
  color: var(--text);
}

.section {
  width: min(1180px, 92vw);
  margin: 0 auto;
  padding: 5rem 0;
}

.hero {
  min-height: calc(100vh - 80px);
  display: grid;
  grid-template-columns: minmax(0, 1.8fr) minmax(320px, 0.72fr);
  gap: 3.5rem;
  align-items: center;
}

.eyebrow {
  margin: 0 0 0.8rem;
  color: var(--accent);
  letter-spacing: 0.22em;
  text-transform: uppercase;
  font-size: 0.78rem;
}

.hero-copy {
  position: relative;
  padding: 3.2rem 0 2rem;
}

.hero-copy::before {
  content: "";
  position: absolute;
  left: -1.6rem;
  top: 2.8rem;
  bottom: 1.8rem;
  width: 2px;
  background: linear-gradient(180deg, rgba(134, 247, 255, 0), rgba(134, 247, 255, 0.9), rgba(134, 247, 255, 0));
  box-shadow: 0 0 24px rgba(134, 247, 255, 0.35);
}

.hero-kicker {
  margin: 0 0 1rem;
  color: rgba(237, 247, 255, 0.45);
  letter-spacing: 0.28em;
  text-transform: uppercase;
  font-size: 0.84rem;
}

.hero h1,
.section-heading h2,
.contact-card h2 {
  margin: 0;
  line-height: 1.04;
  font-family: "Segoe UI Variable Display", "Microsoft YaHei UI", sans-serif;
}

.hero-title {
  max-width: none;
  font-size: clamp(4rem, 7vw, 6.6rem);
  font-weight: 900;
  letter-spacing: -0.03em;
  white-space: nowrap;
  text-shadow: 0 0 30px rgba(134, 247, 255, 0.08);
}

.hero-subtitle {
  margin: 1.25rem 0 0;
  max-width: 22ch;
  color: rgba(237, 247, 255, 0.78);
  font-family: "Segoe UI Variable Display", "Microsoft YaHei UI", sans-serif;
  font-size: clamp(1.7rem, 2.5vw, 2.35rem);
  font-weight: 500;
  line-height: 1.28;
}

.hero-subtitle span {
  display: block;
  white-space: nowrap;
}

.hero-intro {
  max-width: 42rem;
  margin: 1.8rem 0 0;
  color: var(--muted);
  font-size: 1.08rem;
  line-height: 1.95;
}

.hero-actions {
  display: flex;
  gap: 1rem;
  margin-top: 2.2rem;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 10rem;
  padding: 0.95rem 1.35rem;
  border-radius: 999px;
  border: 1px solid transparent;
  font-weight: 600;
  transition: transform 220ms ease, border-color 220ms ease, background 220ms ease;
}

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

.button-primary {
  color: #03101e;
  background: linear-gradient(120deg, var(--accent), var(--accent-warm));
  box-shadow: 0 10px 36px rgba(134, 247, 255, 0.25);
}

.button-secondary {
  border-color: rgba(134, 247, 255, 0.28);
  background: rgba(134, 247, 255, 0.08);
}

.button-tertiary {
  border-color: rgba(134, 247, 255, 0.28);
  background: rgba(7, 17, 31, 0.35);
}

.hero-tags,
.chip-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  padding: 0;
  margin: 1.8rem 0 0;
  list-style: none;
}

.hero-tags li,
.chip-list li {
  padding: 0.55rem 0.9rem;
  border: 1px solid rgba(134, 247, 255, 0.18);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.03);
  color: #dff9ff;
  font-size: 0.92rem;
}

.panel,
.glass-card,
.project-card,
.contact-card {
  position: relative;
  border: 1px solid var(--line);
  background: linear-gradient(180deg, rgba(17, 31, 57, 0.82), rgba(8, 17, 33, 0.64));
  box-shadow: var(--shadow);
  backdrop-filter: blur(20px);
  overflow: hidden;
}

.panel::before,
.glass-card::before,
.project-card::before,
.contact-card::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(130deg, rgba(255, 255, 255, 0.08), transparent 40%, transparent 60%, rgba(134, 247, 255, 0.08));
  pointer-events: none;
}

.hero-panel {
  display: grid;
  gap: 1rem;
  align-self: center;
}

.panel {
  border-radius: 26px;
  padding: 1.5rem;
}

.panel-top {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  color: var(--muted);
}

.status-dot {
  width: 0.7rem;
  height: 0.7rem;
  border-radius: 50%;
  background: var(--accent-warm);
  box-shadow: 0 0 12px rgba(158, 255, 200, 0.7);
}

.profile-lines {
  display: grid;
  gap: 1rem;
  margin-top: 1.4rem;
}

.value-claim {
  margin: 1.2rem 0 1.4rem;
  color: var(--text);
  font-size: 1.02rem;
  line-height: 1.9;
}

.hero-photo-card {
  gap: 1rem;
  padding: 1.1rem;
}

.hero-portrait {
  margin: 0;
  border-radius: 28px;
  overflow: hidden;
  border: 1px solid rgba(134, 247, 255, 0.2);
  background:
    linear-gradient(180deg, rgba(17, 31, 57, 0.72), rgba(8, 17, 33, 0.88)),
    radial-gradient(circle at top, rgba(134, 247, 255, 0.12), transparent 55%);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.03);
}

.hero-portrait img {
  display: block;
  width: 100%;
  aspect-ratio: 3.4 / 4.4;
  object-fit: cover;
  object-position: center 18%;
  background:
    linear-gradient(135deg, rgba(134, 247, 255, 0.12), rgba(255, 255, 255, 0.02)),
    repeating-linear-gradient(
      180deg,
      rgba(255, 255, 255, 0.03) 0,
      rgba(255, 255, 255, 0.03) 2px,
      transparent 2px,
      transparent 6px
    );
}

.profile-lines p {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  margin: 0;
  padding-bottom: 0.85rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.profile-lines span,
.project-lead,
.glass-card p,
.timeline-item p,
.contact-lines,
.education-grid p {
  color: var(--muted);
}

.section-heading {
  margin-bottom: 2rem;
}

.section-heading h2,
.contact-card h2 {
  font-size: clamp(2rem, 4vw, 3.3rem);
}

.capability-layout,
.education-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1.2rem;
}

.capability-layout,
.education-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.glass-card,
.project-card {
  border-radius: 26px;
  padding: 1.5rem;
}

.card-index {
  display: inline-block;
  margin-bottom: 1rem;
  color: var(--accent);
  font-size: 0.88rem;
  letter-spacing: 0.18em;
}

.glass-card h3,
.project-card h3,
.timeline-item h3,
.education-grid h3 {
  margin: 0 0 0.85rem;
  font-size: 1.35rem;
}

.glass-card p,
.project-card p,
.timeline-item p,
.education-grid p {
  margin: 0;
  line-height: 1.8;
}

.project-stack {
  display: grid;
  gap: 1.6rem;
}

.project-card-featured {
  padding: 1.8rem;
  border-color: rgba(134, 247, 255, 0.28);
}

.project-overview-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1.2rem;
  margin-top: 1.4rem;
}

.project-overview-grid h4,
.project-subsection h4 {
  margin: 0 0 0.75rem;
  font-size: 1rem;
}

.project-overview-grid ul,
.project-subsection ul {
  margin: 0;
  padding-left: 1.1rem;
  color: var(--muted);
  line-height: 1.8;
}

.result-band {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 1.35rem;
}

.result-band span {
  padding: 0.65rem 0.9rem;
  border: 1px solid rgba(134, 247, 255, 0.2);
  border-radius: 999px;
  background: rgba(134, 247, 255, 0.08);
  color: #e6fcff;
  font-size: 0.92rem;
}

.project-split {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1.2rem;
  margin-top: 1.6rem;
}

.project-subsection {
  padding: 1.25rem;
  border-radius: 22px;
  border: 1px solid rgba(134, 247, 255, 0.14);
  background: rgba(255, 255, 255, 0.03);
}

.subsection-head {
  margin-bottom: 0.9rem;
}

.subsection-head .eyebrow {
  margin-bottom: 0.55rem;
  font-size: 0.68rem;
}

.project-meta {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1rem;
  color: var(--accent);
  font-size: 0.92rem;
}

.project-columns {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1.2rem;
  margin-top: 1.4rem;
}

.project-columns h4 {
  margin: 0 0 0.75rem;
  font-size: 1rem;
}

.project-columns ul {
  margin: 0;
  padding-left: 1.1rem;
  color: var(--muted);
  line-height: 1.8;
}

.timeline-list {
  display: grid;
  gap: 1.2rem;
  position: relative;
}

.timeline-item {
  display: grid;
  grid-template-columns: 140px 1fr;
  gap: 1.4rem;
  align-items: start;
  padding: 0.2rem 0;
}

.timeline-date {
  color: var(--accent);
  letter-spacing: 0.14em;
  font-size: 0.85rem;
  padding-top: 1rem;
}

.timeline-card {
  padding: 1.4rem 1.5rem;
  border-radius: 24px;
  border: 1px solid rgba(134, 247, 255, 0.14);
  background: linear-gradient(180deg, rgba(14, 24, 46, 0.88), rgba(8, 16, 31, 0.72));
  box-shadow: var(--shadow);
}

.timeline-head {
  display: block;
  margin-bottom: 0.7rem;
}

.timeline-role {
  margin: 0 0 0.7rem;
  color: rgba(237, 247, 255, 0.86);
  font-weight: 600;
}

.timeline-card p {
  line-height: 1.8;
}

.timeline-card ul {
  margin: 0.9rem 0 0;
  padding-left: 1.1rem;
  color: var(--muted);
  line-height: 1.8;
}

.contact-card {
  display: grid;
  justify-content: center;
  gap: 1.2rem;
  align-items: center;
  border-radius: 30px;
  padding: 3.2rem 2rem;
  text-align: center;
}

.contact-lines {
  display: grid;
  gap: 0.95rem;
  text-align: center;
  font-size: 1.15rem;
}

.contact-note {
  margin: 0;
  color: var(--muted);
  font-size: 1rem;
  line-height: 1.8;
}

.contact-lines a {
  color: var(--text);
}

.contact-lines a:hover {
  color: var(--accent);
}

.avatar-assistant {
  position: fixed;
  right: 1.4rem;
  bottom: 1.4rem;
  z-index: 40;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 0.9rem;
}

.assistant-greeting {
  display: grid;
  gap: 0.35rem;
  max-width: 360px;
  padding: 1.05rem 1.1rem;
  border: 1px solid rgba(134, 247, 255, 0.22);
  border-radius: 18px 18px 6px 18px;
  background:
    linear-gradient(180deg, rgba(10, 22, 42, 0.98), rgba(6, 14, 29, 0.92)),
    radial-gradient(circle at top right, rgba(134, 247, 255, 0.14), transparent 46%);
  color: var(--text);
  box-shadow:
    0 0 0 1px rgba(134, 247, 255, 0.06),
    0 16px 40px rgba(0, 0, 0, 0.34),
    0 0 28px rgba(41, 183, 255, 0.14);
  text-align: left;
  line-height: 1.7;
  cursor: pointer;
  backdrop-filter: blur(18px);
  animation: assistantGreetingGlow 2.8s ease-in-out infinite;
}

.assistant-greeting-main {
  color: #f3fbff;
  font-size: 1.04rem;
  font-weight: 700;
  line-height: 1.45;
}

.assistant-greeting-sub {
  color: var(--accent);
  font-size: 0.95rem;
  line-height: 1.7;
}

@keyframes assistantGreetingGlow {
  0%,
  100% {
    border-color: rgba(134, 247, 255, 0.22);
    box-shadow:
      0 0 0 1px rgba(134, 247, 255, 0.06),
      0 16px 40px rgba(0, 0, 0, 0.34),
      0 0 20px rgba(41, 183, 255, 0.1);
  }
  50% {
    border-color: rgba(134, 247, 255, 0.34);
    box-shadow:
      0 0 0 1px rgba(134, 247, 255, 0.1),
      0 16px 40px rgba(0, 0, 0, 0.34),
      0 0 34px rgba(41, 183, 255, 0.18);
  }
}

.assistant-trigger {
  position: relative;
  width: 118px;
  height: 142px;
  border: 0;
  background: transparent;
  cursor: pointer;
}

.assistant-trigger-ring {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  border-radius: 50%;
}

.assistant-trigger-ring-outer {
  bottom: 6px;
  width: 108px;
  height: 26px;
  border: 1px solid rgba(134, 247, 255, 0.28);
  background: radial-gradient(circle, rgba(134, 247, 255, 0.14), transparent 72%);
  filter: blur(0.2px);
}

.assistant-trigger-ring-inner {
  bottom: 10px;
  width: 76px;
  height: 14px;
  border: 1px solid rgba(158, 255, 200, 0.34);
  animation: assistantBasePulse 2.6s ease-in-out infinite;
}

.assistant-avatar {
  position: absolute;
  left: 50%;
  bottom: 18px;
  width: 92px;
  height: 114px;
  transform: translateX(-50%);
}

.assistant-avatar-halo {
  position: absolute;
  top: 4px;
  left: 50%;
  width: 78px;
  height: 78px;
  transform: translateX(-50%);
  border-radius: 50%;
  background: radial-gradient(circle, rgba(134, 247, 255, 0.3), rgba(41, 183, 255, 0.08) 56%, transparent 74%);
  filter: blur(12px);
}

.assistant-avatar-beam {
  position: absolute;
  left: 50%;
  top: 30px;
  width: 72px;
  height: 72px;
  transform: translateX(-50%);
  background: linear-gradient(180deg, rgba(134, 247, 255, 0), rgba(134, 247, 255, 0.08) 24%, rgba(41, 183, 255, 0.16) 58%, rgba(134, 247, 255, 0) 100%);
  clip-path: polygon(26% 0, 74% 0, 100% 100%, 0 100%);
  filter: blur(3px);
}

.assistant-avatar-bust {
  position: absolute;
  left: 50%;
  top: 8px;
  width: 86px;
  height: 104px;
  transform: translateX(-50%);
}

.assistant-avatar-head {
  position: absolute;
  top: 10px;
  left: 50%;
  width: 42px;
  height: 48px;
  transform: translateX(-50%);
  border: 1px solid rgba(134, 247, 255, 0.42);
  border-radius: 48% 48% 52% 52%;
  background: linear-gradient(180deg, rgba(158, 255, 200, 0.12), rgba(41, 183, 255, 0.08));
  box-shadow: 0 0 20px rgba(41, 183, 255, 0.18), inset 0 0 16px rgba(134, 247, 255, 0.08);
}

.assistant-avatar-head::after {
  content: "";
  position: absolute;
  left: 8px;
  right: 8px;
  top: 22px;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(134, 247, 255, 0.95), transparent);
  box-shadow: 0 0 10px rgba(134, 247, 255, 0.6);
}

.assistant-avatar-face {
  position: absolute;
  inset: 6px 7px 10px;
  border-radius: 46% 46% 52% 52%;
  background:
    radial-gradient(circle at 50% 18%, rgba(255, 255, 255, 0.12), transparent 36%),
    linear-gradient(180deg, rgba(134, 247, 255, 0.08), rgba(255, 255, 255, 0.02));
}

.assistant-avatar-eye {
  position: absolute;
  top: 24px;
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 8px rgba(134, 247, 255, 0.6);
  opacity: 0.75;
}

.assistant-avatar-eye-left {
  left: 11px;
}

.assistant-avatar-eye-right {
  right: 11px;
}

.assistant-avatar-neck {
  position: absolute;
  top: 58px;
  left: 50%;
  width: 10px;
  height: 10px;
  transform: translateX(-50%);
  background: linear-gradient(180deg, rgba(158, 255, 200, 0.48), rgba(41, 183, 255, 0.28));
  box-shadow: 0 0 10px rgba(41, 183, 255, 0.18);
}

.assistant-avatar-shoulders {
  position: absolute;
  top: 64px;
  left: 50%;
  width: 74px;
  height: 34px;
  transform: translateX(-50%);
  border: 1px solid rgba(134, 247, 255, 0.28);
  border-radius: 50% 50% 26% 26%;
  background: linear-gradient(180deg, rgba(41, 183, 255, 0.12), rgba(158, 255, 200, 0.05));
  clip-path: polygon(12% 22%, 88% 22%, 100% 100%, 0 100%);
  box-shadow: 0 0 14px rgba(41, 183, 255, 0.14), inset 0 0 12px rgba(134, 247, 255, 0.06);
}

.assistant-avatar-core {
  position: absolute;
  left: 50%;
  top: 72px;
  width: 18px;
  height: 18px;
  transform: translateX(-50%);
  border-radius: 50%;
  background: radial-gradient(circle, rgba(158, 255, 200, 0.95), rgba(41, 183, 255, 0.42));
  box-shadow: 0 0 18px rgba(134, 247, 255, 0.36);
}

.assistant-avatar-scan {
  position: absolute;
  inset: 0;
  border-radius: 48px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0) 0%, rgba(134, 247, 255, 0.1) 42%, rgba(255, 255, 255, 0) 58%);
  mix-blend-mode: screen;
  animation: assistantScan 3.4s linear infinite;
}

.assistant-avatar-bust::before {
  content: "";
  position: absolute;
  left: 50%;
  top: 2px;
  width: 72px;
  height: 72px;
  transform: translateX(-50%);
  border-radius: 50%;
  border: 1px solid rgba(134, 247, 255, 0.22);
  box-shadow: inset 0 0 20px rgba(134, 247, 255, 0.06);
}

.assistant-avatar-bust::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 48px;
  background: repeating-linear-gradient(180deg, rgba(255, 255, 255, 0.04) 0, rgba(255, 255, 255, 0.04) 1px, transparent 1px, transparent 6px);
  opacity: 0.22;
}

.assistant-trigger:hover .assistant-avatar,
.assistant-trigger:focus-visible .assistant-avatar {
  transform: translateX(-50%) translateY(-4px) scale(1.01);
}

.assistant-trigger:hover .assistant-avatar-halo,
.assistant-trigger:focus-visible .assistant-avatar-halo {
  filter: blur(14px);
  opacity: 0.96;
}

.assistant-trigger:hover .assistant-trigger-ring-outer,
.assistant-trigger:focus-visible .assistant-trigger-ring-outer {
  box-shadow: 0 0 24px rgba(134, 247, 255, 0.24);
}

.assistant-trigger::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: 24px;
  width: 86px;
  height: 86px;
  transform: translateX(-50%);
  border-radius: 50%;
  border: 1px solid rgba(134, 247, 255, 0.08);
  background: radial-gradient(circle, rgba(134, 247, 255, 0.04), transparent 72%);
  pointer-events: none;
}

.assistant-trigger::before {
  content: "";
  position: absolute;
  left: 50%;
  bottom: 24px;
  width: 1px;
  height: 66px;
  transform: translateX(-50%);
  background: linear-gradient(180deg, rgba(134, 247, 255, 0), rgba(134, 247, 255, 0.35), rgba(134, 247, 255, 0));
  opacity: 0.5;
  pointer-events: none;
}

.assistant-panel {
  width: min(360px, calc(100vw - 1.4rem));
  height: min(560px, calc(100vh - 8rem));
  display: none;
  grid-template-rows: auto 1fr auto auto;
  border: 1px solid rgba(134, 247, 255, 0.18);
  border-radius: 26px;
  background: rgba(6, 14, 29, 0.94);
  box-shadow: var(--shadow);
  backdrop-filter: blur(20px);
  overflow: hidden;
}

.assistant-panel.is-open {
  display: grid;
}

.assistant-header {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  align-items: flex-start;
  padding: 1rem 1rem 0.9rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.assistant-title,
.assistant-subtitle,
.assistant-message p {
  margin: 0;
}

.assistant-title {
  font-weight: 700;
}

.assistant-subtitle {
  margin-top: 0.3rem;
  color: var(--muted);
  font-size: 0.88rem;
  line-height: 1.6;
}

.assistant-close {
  border: 0;
  background: transparent;
  color: var(--muted);
  font-size: 1.8rem;
  line-height: 1;
  cursor: pointer;
}

.assistant-input {
  min-width: 0;
  padding: 0.9rem 1rem;
  border: 1px solid rgba(134, 247, 255, 0.14);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.04);
  color: var(--text);
}

.assistant-messages {
  display: grid;
  gap: 0.8rem;
  padding: 1rem;
  overflow-y: auto;
}

.assistant-message {
  max-width: 88%;
  padding: 0.85rem 0.95rem;
  border-radius: 16px;
  line-height: 1.75;
}

.assistant-message p,
.assistant-message ul,
.assistant-message ol,
.assistant-message pre,
.assistant-message h1,
.assistant-message h2,
.assistant-message h3 {
  margin: 0;
}

.assistant-message p + p,
.assistant-message p + ul,
.assistant-message p + ol,
.assistant-message ul + p,
.assistant-message ol + p,
.assistant-message pre + p {
  margin-top: 0.7rem;
}

.assistant-message ul,
.assistant-message ol {
  padding-left: 1.2rem;
}

.assistant-message li + li {
  margin-top: 0.25rem;
}

.assistant-message pre {
  overflow-x: auto;
  padding: 0.7rem 0.85rem;
  border-radius: 12px;
  background: rgba(0, 0, 0, 0.22);
  border: 1px solid rgba(255, 255, 255, 0.06);
}

.assistant-message code {
  padding: 0.12rem 0.35rem;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.08);
  font-family: Consolas, "Courier New", monospace;
  font-size: 0.92em;
}

.assistant-message pre code {
  padding: 0;
  background: transparent;
}

.assistant-message a {
  color: var(--accent);
  text-decoration: underline;
  text-underline-offset: 0.15em;
}

.assistant-message-bot {
  border: 1px solid rgba(134, 247, 255, 0.14);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.05), rgba(41, 183, 255, 0.04));
}

.assistant-message-user {
  justify-self: end;
  background: rgba(134, 247, 255, 0.14);
}

.assistant-suggestions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
  padding: 0 1rem 0.95rem;
}

.assistant-chip {
  padding: 0.45rem 0.75rem;
  border: 1px solid rgba(134, 247, 255, 0.18);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.03);
  color: var(--text);
  cursor: pointer;
}

.assistant-form {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 0.7rem;
  padding: 0 1rem 1rem;
}

.assistant-send {
  padding: 0.9rem 1rem;
  border: 0;
  border-radius: 14px;
  background: linear-gradient(120deg, var(--accent), var(--accent-warm));
  color: #04111e;
  font-weight: 700;
  cursor: pointer;
}

@keyframes assistantBasePulse {
  0%,
  100% {
    transform: translateX(-50%) scale(1);
    opacity: 0.72;
  }
  50% {
    transform: translateX(-50%) scale(1.08);
    opacity: 1;
  }
}

@keyframes assistantScan {
  0% {
    transform: translateY(-24px);
    opacity: 0;
  }
  18% {
    opacity: 0.9;
  }
  55% {
    opacity: 0.55;
  }
  100% {
    transform: translateY(34px);
    opacity: 0;
  }
}

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

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

@keyframes floatA {
  0%,
  100% {
    transform: translate3d(0, 0, 0);
  }
  50% {
    transform: translate3d(2rem, 1.5rem, 0);
  }
}

@keyframes floatB {
  0%,
  100% {
    transform: translate3d(0, 0, 0);
  }
  50% {
    transform: translate3d(-1.5rem, -1rem, 0);
  }
}

@media (max-width: 980px) {
  .hero,
  .project-overview-grid,
  .project-columns,
  .project-split,
  .capability-layout,
  .education-grid,
  .contact-card,
  .timeline-item {
    grid-template-columns: 1fr;
  }

  .timeline-date {
    padding-top: 0;
  }

  .hero {
    min-height: auto;
    padding-top: 2rem;
    gap: 1.5rem;
  }

  .hero-copy {
    padding: 1rem 0 0;
  }

  .hero-copy::before {
    display: none;
  }

  .contact-card {
    align-items: center;
  }

  .assistant-panel {
    width: min(360px, calc(100vw - 2rem));
  }

}

@media (max-width: 720px) {
  .topbar {
    flex-direction: column;
    gap: 0.9rem;
  }

  .nav {
    flex-wrap: wrap;
    justify-content: center;
  }

  .section {
    padding: 3.7rem 0;
  }

  .hero-title {
    font-size: clamp(2.8rem, 12vw, 4rem);
    white-space: normal;
  }

  .hero-subtitle {
    max-width: none;
    font-size: 1.3rem;
  }

  .hero-subtitle span {
    white-space: normal;
  }

  .hero-actions {
    flex-direction: column;
  }

  .project-meta,
  .profile-lines p {
    flex-direction: column;
  }

  .avatar-assistant {
    right: 0.9rem;
    bottom: 0.9rem;
  }

  .assistant-greeting {
    max-width: min(280px, calc(100vw - 2rem));
  }

  .assistant-greeting-main {
    font-size: 0.98rem;
  }

  .assistant-greeting-sub {
    font-size: 0.9rem;
  }

  .assistant-trigger {
    width: 102px;
    height: 128px;
  }

  .assistant-panel {
    width: calc(100vw - 1.2rem);
    height: min(70vh, 520px);
  }
}
