:root {
  color-scheme: dark;
  --ink: #f8fafc;
  --text: #e5e7eb;
  --muted: #a1a1aa;
  --quiet: #71717a;
  --paper: #111111;
  --surface: rgba(24, 24, 27, 0.74);
  --surface-strong: rgba(39, 39, 42, 0.82);
  --line: rgba(139, 92, 246, 0.2);
  --line-soft: rgba(139, 92, 246, 0.12);
  --purple: #8b5cf6;
  --blue: #3b82f6;
  --lavender: #a78bfa;
  --accent: #a78bfa;
  --gradient: linear-gradient(135deg, #8b5cf6 0%, #3b82f6 100%);
  --glow: 0 0 0 1px rgba(139, 92, 246, 0.05), 0 18px 44px rgba(59, 130, 246, 0.08), 0 0 34px rgba(139, 92, 246, 0.08);
  --glow-strong: 0 0 0 1px rgba(139, 92, 246, 0.18), 0 18px 58px rgba(139, 92, 246, 0.18);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background:
    radial-gradient(circle at 15% 0%, rgba(139, 92, 246, 0.2), transparent 32rem),
    radial-gradient(circle at 90% 12%, rgba(59, 130, 246, 0.16), transparent 34rem),
    linear-gradient(180deg, #0d0d0d 0%, #111111 48%, #0d0d0d 100%);
  color: var(--text);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", Arial, sans-serif;
  line-height: 1.65;
  text-rendering: optimizeLegibility;
}

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  width: min(1180px, calc(100% - 32px));
  margin: 14px auto 0;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: rgba(17, 17, 17, 0.72);
  box-shadow: var(--glow);
  backdrop-filter: blur(22px);
}

.brand,
.nav,
.hero-kicker,
.hero-actions,
.tag-row {
  display: flex;
  align-items: center;
}

.brand {
  gap: 12px;
  color: var(--ink);
  font-size: 14px;
  font-weight: 800;
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border-radius: 15px;
  background: var(--gradient);
  color: white;
  box-shadow: 0 0 28px rgba(139, 92, 246, 0.32);
  font-size: 12px;
}

.nav {
  gap: 6px;
}

.nav a {
  min-width: 44px;
  padding: 8px 12px;
  border-radius: 999px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
  text-align: center;
  white-space: nowrap;
}

.nav a:hover,
.nav a.active {
  background: rgba(139, 92, 246, 0.14);
  color: var(--lavender);
}

.section-shell {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 104px 0;
}

.hero {
  display: flex;
  min-height: calc(100vh - 72px);
  flex-direction: column;
  justify-content: center;
  padding-top: 72px;
}

.hero-kicker {
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 42px;
  color: var(--lavender);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.hero-kicker span {
  padding: 8px 12px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(139, 92, 246, 0.1);
  box-shadow: var(--glow);
}

.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 370px;
  gap: 48px;
  align-items: end;
}

.eyebrow {
  margin: 0 0 16px;
  background: var(--gradient);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  font-size: 13px;
  font-weight: 900;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

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

h1 {
  max-width: 980px;
  margin-bottom: 28px;
  color: var(--ink);
  font-size: clamp(44px, 7.4vw, 96px);
  line-height: 1.04;
  letter-spacing: 0;
}

h2 {
  margin-bottom: 18px;
  color: var(--ink);
  font-size: clamp(32px, 4.7vw, 58px);
  line-height: 1.1;
}

h3 {
  margin-bottom: 10px;
  color: var(--ink);
  font-size: 21px;
  line-height: 1.35;
}

.hero-lede,
.large-copy {
  max-width: 790px;
  color: var(--muted);
  font-size: clamp(20px, 2.25vw, 27px);
  line-height: 1.6;
}

.hero-actions {
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 34px;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 50px;
  padding: 0 20px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(24, 24, 27, 0.72);
  box-shadow: var(--glow);
  color: var(--ink);
  font-size: 15px;
  font-weight: 800;
}

.button.primary {
  border-color: transparent;
  background: var(--gradient);
  color: white;
  box-shadow: 0 0 34px rgba(139, 92, 246, 0.28);
}

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

.principle-card {
  padding: 30px;
  border: 1px solid var(--line);
  border-radius: 24px 24px 24px 6px;
  background: linear-gradient(180deg, rgba(39, 39, 42, 0.82), rgba(24, 24, 27, 0.72));
  box-shadow: var(--glow-strong);
}

.principle-card span {
  display: inline-flex;
  margin-bottom: 22px;
  padding: 8px 12px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(139, 92, 246, 0.12);
  color: var(--lavender);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.principle-card p {
  margin-bottom: 0;
  color: var(--ink);
  font-size: 25px;
  font-weight: 800;
  line-height: 1.42;
}

.split-section {
  display: grid;
  grid-template-columns: 0.45fr 1fr;
  gap: 72px;
}

.section-body p:last-child {
  margin-bottom: 0;
}

.identity-grid,
.project-grid,
.notes-grid,
.tools-grid {
  display: grid;
  gap: 18px;
}

.identity-grid {
  grid-template-columns: repeat(3, 1fr);
  margin-top: 42px;
}

.identity-grid article,
.project-card,
.notes-grid article,
.tools-grid article,
.timeline-item > div,
.contact-grid a {
  border: 1px solid var(--line);
  border-radius: 22px;
  background: var(--surface);
  box-shadow: var(--glow);
}

.identity-grid article,
.notes-grid article,
.tools-grid article,
.timeline-item > div {
  padding: 24px;
}

.identity-grid span,
.card-meta,
.notes-grid span,
.timeline-item > span {
  color: var(--lavender);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.identity-grid p,
.project-card p,
.notes-grid p,
.tools-grid p,
.timeline p,
.section-heading p,
.contact-section p {
  color: var(--muted);
}

.section-heading {
  display: grid;
  grid-template-columns: minmax(0, 0.8fr) minmax(270px, 0.35fr);
  gap: 52px;
  align-items: end;
  margin-bottom: 38px;
  padding-top: 8px;
}

.section-heading.compact {
  padding-top: 0;
}

.section-heading .eyebrow,
.section-heading h2 {
  grid-column: 1;
}

.section-heading p:last-child {
  grid-column: 2;
  grid-row: 1 / span 2;
  margin-bottom: 6px;
  padding: 22px;
  border: 1px solid var(--line-soft);
  border-radius: 22px 22px 6px 22px;
  background: rgba(139, 92, 246, 0.08);
  box-shadow: var(--glow);
}

.project-grid {
  grid-template-columns: repeat(3, 1fr);
}

.project-card {
  display: flex;
  min-height: 330px;
  flex-direction: column;
  padding: 28px;
  border-radius: 24px 24px 24px 8px;
}

.project-card.featured {
  grid-column: span 2;
  border-color: rgba(139, 92, 246, 0.32);
  background:
    radial-gradient(circle at 96% 0%, rgba(167, 139, 250, 0.28), transparent 16rem),
    linear-gradient(135deg, rgba(139, 92, 246, 0.22), rgba(59, 130, 246, 0.16)),
    rgba(24, 24, 27, 0.82);
  box-shadow: var(--glow-strong);
}

.card-meta {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 40px;
}

.tag-row {
  flex-wrap: wrap;
  gap: 10px;
  margin-top: auto;
  padding-top: 24px;
}

.tag-row span {
  padding: 7px 11px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(139, 92, 246, 0.12);
  color: var(--lavender);
  font-size: 12px;
  font-weight: 800;
}

.notes-grid,
.tools-grid {
  grid-template-columns: repeat(3, 1fr);
}

.notes-grid article {
  min-height: 210px;
  border-radius: 24px 24px 8px 24px;
}

.tools-grid article {
  min-height: 190px;
}

.timeline {
  border-left: 0;
}

.timeline-item {
  position: relative;
  display: grid;
  grid-template-columns: 150px 1fr;
  gap: 28px;
  padding: 0 0 26px 0;
}

.timeline-item > div {
  border-radius: 24px 24px 24px 8px;
}

.timeline-item::before {
  content: "";
  position: absolute;
  left: 132px;
  top: 29px;
  width: 13px;
  height: 13px;
  border-radius: 50%;
  background: var(--gradient);
  box-shadow: 0 0 0 8px rgba(139, 92, 246, 0.1), 0 0 24px rgba(139, 92, 246, 0.36);
}

.contact-section {
  display: grid;
  grid-template-columns: minmax(0, 0.85fr) minmax(360px, 1fr);
  gap: 56px;
  align-items: center;
}

.contact-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 18px;
}

.contact-grid a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  min-height: 78px;
  padding: 20px;
}

.contact-grid a:hover {
  border-color: rgba(167, 139, 250, 0.4);
  box-shadow: var(--glow-strong);
  transform: translateY(-1px);
}

.contact-grid span {
  color: var(--ink);
  font-weight: 800;
}

.contact-grid strong {
  color: var(--quiet);
  font-size: 13px;
}

.footer {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 34px 0 48px;
  color: var(--muted);
  font-size: 14px;
  font-weight: 700;
}

.footer a {
  color: var(--lavender);
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.chat-widget {
  position: fixed;
  right: 24px;
  bottom: 24px;
  z-index: 30;
}

.chat-toggle {
  position: relative;
  display: grid;
  place-items: center;
  width: 68px;
  height: 68px;
  border: 1px solid var(--line);
  border-radius: 24px;
  background: rgba(24, 24, 27, 0.86);
  box-shadow: var(--glow-strong);
  color: white;
  cursor: pointer;
}

.chat-icon {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 16px;
  background: var(--gradient);
  box-shadow: 0 0 28px rgba(139, 92, 246, 0.42);
  font-size: 13px;
  font-weight: 900;
}

.chat-pulse {
  position: absolute;
  right: 12px;
  top: 12px;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--lavender);
  box-shadow: 0 0 0 0 rgba(167, 139, 250, 0.45);
  animation: chat-pulse 1.8s infinite;
}

.chat-panel {
  position: absolute;
  right: 0;
  bottom: 86px;
  display: flex;
  width: min(430px, calc(100vw - 32px));
  max-height: min(700px, calc(100vh - 132px));
  flex-direction: column;
  gap: 16px;
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: 26px;
  background: rgba(17, 17, 17, 0.9);
  box-shadow: var(--glow-strong);
  opacity: 0;
  pointer-events: none;
  transform: translateY(14px) scale(0.98);
  transform-origin: bottom right;
  transition:
    opacity 220ms ease,
    transform 220ms ease;
  backdrop-filter: blur(22px);
}

.chat-panel.is-open {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0) scale(1);
}

.chat-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}

.chat-eyebrow {
  display: inline-flex;
  margin-bottom: 8px;
  background: var(--gradient);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.chat-header h2 {
  margin-bottom: 6px;
  font-size: 24px;
}

.chat-header p {
  margin-bottom: 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.55;
}

.chat-close {
  flex: 0 0 auto;
  width: 36px;
  height: 36px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(39, 39, 42, 0.82);
  color: var(--muted);
  cursor: pointer;
  font-size: 24px;
  line-height: 1;
}

.quick-questions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.quick-questions button {
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(139, 92, 246, 0.12);
  color: var(--lavender);
  cursor: pointer;
  font: inherit;
  font-size: 13px;
  font-weight: 800;
  padding: 8px 12px;
}

.chat-messages {
  display: flex;
  min-height: 220px;
  max-height: 310px;
  flex-direction: column;
  gap: 12px;
  overflow-y: auto;
  padding: 8px 4px 8px 0;
}

.message {
  max-width: 88%;
  border: 1px solid var(--line-soft);
  border-radius: 18px;
  padding: 12px 14px;
  font-size: 14px;
  line-height: 1.65;
  white-space: pre-line;
}

.message.bot {
  align-self: flex-start;
  border-radius: 18px 18px 18px 6px;
  background: rgba(39, 39, 42, 0.78);
  color: var(--text);
}

.message.user {
  align-self: flex-end;
  border-color: transparent;
  border-radius: 18px 18px 6px 18px;
  background: var(--gradient);
  box-shadow: 0 0 28px rgba(139, 92, 246, 0.2);
  color: white;
}

.chat-form {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 10px;
}

.chat-form input {
  min-width: 0;
  height: 46px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(24, 24, 27, 0.82);
  color: var(--ink);
  font: inherit;
  outline: none;
  padding: 0 16px;
}

.chat-form input::placeholder {
  color: var(--quiet);
}

.chat-form button {
  height: 46px;
  border: 0;
  border-radius: 999px;
  background: var(--gradient);
  box-shadow: 0 0 28px rgba(139, 92, 246, 0.26);
  color: white;
  cursor: pointer;
  font: inherit;
  font-weight: 900;
  padding: 0 16px;
}

.project-card,
.identity-grid article,
.notes-grid article,
.tools-grid article,
.timeline-item > div,
.contact-grid a,
.principle-card,
.button,
.tag-row span,
.hero-kicker span,
.quick-questions button,
.chat-close,
.chat-toggle,
.chat-form button {
  transition:
    transform 220ms ease,
    box-shadow 220ms ease,
    border-color 220ms ease,
    background 220ms ease;
}

.project-card:hover,
.identity-grid article:hover,
.notes-grid article:hover,
.tools-grid article:hover,
.timeline-item > div:hover {
  border-color: rgba(167, 139, 250, 0.38);
  box-shadow: var(--glow-strong);
  transform: translateY(-4px);
}

.tag-row span:hover,
.hero-kicker span:hover,
.quick-questions button:hover,
.chat-close:hover,
.chat-form button:hover {
  transform: translateY(-2px);
}

.reveal {
  opacity: 0;
  transform: translateY(18px);
}

.reveal.is-visible {
  animation: reveal-up 620ms cubic-bezier(0.2, 0.8, 0.2, 1) forwards;
}

@keyframes reveal-up {
  from {
    opacity: 0;
    transform: translateY(18px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes chat-pulse {
  0% {
    box-shadow: 0 0 0 0 rgba(167, 139, 250, 0.45);
  }

  70% {
    box-shadow: 0 0 0 10px rgba(167, 139, 250, 0);
  }

  100% {
    box-shadow: 0 0 0 0 rgba(167, 139, 250, 0);
  }
}

@media (max-width: 980px) {
  .site-header {
    align-items: flex-start;
    flex-direction: column;
  }

  .nav {
    width: 100%;
    overflow-x: auto;
    padding-bottom: 2px;
  }

  .hero-grid,
  .split-section,
  .section-heading,
  .contact-section {
    grid-template-columns: 1fr;
  }

  .principle-card {
    max-width: 560px;
  }

  .section-heading p:last-child,
  .section-heading .eyebrow,
  .section-heading h2 {
    grid-column: auto;
    grid-row: auto;
  }

  .identity-grid,
  .project-grid,
  .notes-grid,
  .tools-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .project-card.featured {
    grid-column: span 2;
  }

  .timeline-item::before {
    left: -5px;
  }
}

@media (max-width: 640px) {
  .site-header,
  .section-shell,
  .footer {
    width: min(100% - 24px, 1180px);
  }

  .section-shell {
    padding: 72px 0;
  }

  .hero {
    min-height: auto;
    padding-top: 58px;
  }

  h1 {
    font-size: 42px;
  }

  .hero-lede,
  .large-copy {
    font-size: 19px;
  }

  .principle-card p {
    font-size: 21px;
  }

  .identity-grid,
  .project-grid,
  .notes-grid,
  .tools-grid,
  .timeline-item,
  .contact-grid {
    grid-template-columns: 1fr;
  }

  .project-card.featured {
    grid-column: auto;
  }

  .timeline-item {
    gap: 8px;
    padding-left: 22px;
  }

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

  .footer {
    flex-direction: column;
  }

  .chat-widget {
    right: 16px;
    bottom: 16px;
  }

  .chat-panel {
    bottom: 78px;
    max-height: calc(100vh - 104px);
  }

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

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

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

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