:root {
  --bg: hsl(230, 24%, 8%);
  --bg-card: hsla(230, 22%, 18%, 0.6);
  --bg-card-solid: hsl(230, 20%, 14%);
  --border: hsla(230, 20%, 40%, 0.25);
  --text: hsl(230, 15%, 94%);
  --text-muted: hsl(230, 10%, 65%);
  --accent-teal: hsl(187, 80%, 55%);
  --accent-purple: hsl(270, 75%, 68%);
  --accent-gradient: linear-gradient(to right, var(--accent-teal), var(--accent-purple));
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'DM Sans', sans-serif;
  font-size: 15px;
  line-height: 1.6;
  color: var(--text);
  background: var(--bg);
  background-image:
    radial-gradient(ellipse 800px 500px at 15% -10%, hsla(187, 80%, 40%, 0.18), transparent),
    radial-gradient(ellipse 800px 500px at 85% 0%, hsla(270, 75%, 50%, 0.16), transparent);
  background-repeat: no-repeat;
}

.page {
  width: 100%;
  max-width: 820px;
  margin: 0 auto;
  padding: 20px 16px 50px;
}

/* === NAV === */
.nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px 16px;
  padding: 10px 0 28px;
}

.nav-name {
  font-family: 'Space Grotesk', sans-serif;
  font-weight: 700;
  font-size: 18px;
  color: var(--text);
  text-decoration: none;
  letter-spacing: -0.01em;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 8px 18px;
  flex-wrap: wrap;
}

.nav-link {
  font-family: 'Space Grotesk', sans-serif;
  font-weight: 500;
  font-size: 14px;
  color: var(--accent-teal);
  text-decoration: none;
  padding: 8px 4px;
  min-height: 44px;
  display: flex;
  align-items: center;
}

.nav-link:hover {
  text-decoration: underline;
}

/* === HERO === */
.hero {
  margin-bottom: 28px;
}

.hero h1 {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 32px;
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.15;
  margin-bottom: 12px;
  background: var(--accent-gradient);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.hero p {
  font-size: 15px;
  line-height: 1.7;
  color: var(--text-muted);
  max-width: 640px;
}

.hero p + p {
  margin-top: 8px;
}

.hero p a {
  color: var(--accent-teal);
  text-decoration: underline;
}

/* === CHAT (front and center) === */
.chat-section {
  position: relative;
  background: var(--bg-card);
  border: 1.5px solid hsla(187, 80%, 55%, 0.7);
  border-radius: 16px;
  padding: 18px;
  backdrop-filter: blur(16px);
  margin-bottom: 32px;
  /* Crisp edge ring + diffuse halo so the glow stays visible against the
     page's ambient background and at any animation phase. */
  box-shadow:
    0 0 0 1px hsla(187, 80%, 55%, 0.45),
    0 0 16px hsla(187, 80%, 55%, 0.45),
    0 0 44px hsla(270, 75%, 68%, 0.30);
  animation: chat-edge-glow 4s ease-in-out infinite;
}

@keyframes chat-edge-glow {
  0%, 100% {
    border-color: hsla(187, 80%, 55%, 0.7);
    box-shadow:
      0 0 0 1px hsla(187, 80%, 55%, 0.45),
      0 0 16px hsla(187, 80%, 55%, 0.40),
      0 0 40px hsla(270, 75%, 68%, 0.26);
  }
  50% {
    border-color: hsla(270, 75%, 68%, 0.85);
    box-shadow:
      0 0 0 1px hsla(270, 75%, 68%, 0.55),
      0 0 26px hsla(187, 80%, 55%, 0.55),
      0 0 64px hsla(270, 75%, 68%, 0.40);
  }
}

/* Reduced-motion: no pulse, but keep a clearly visible static glow. */
@media (prefers-reduced-motion: reduce) {
  .chat-section {
    animation: none;
    border-color: hsla(187, 80%, 55%, 0.7);
    box-shadow:
      0 0 0 1px hsla(187, 80%, 55%, 0.5),
      0 0 20px hsla(187, 80%, 55%, 0.5),
      0 0 50px hsla(270, 75%, 68%, 0.32);
  }
}

.chat-intro {
  font-size: 13px;
  color: var(--text-muted);
  margin-top: 18px;
  margin-bottom: 12px;
}

.suggested-questions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 14px;
}

.chip {
  font-family: 'DM Sans', sans-serif;
  font-size: 13px;
  font-weight: 500;
  color: var(--accent-teal);
  background: hsla(187, 80%, 55%, 0.1);
  border: 1px solid hsla(187, 80%, 55%, 0.3);
  border-radius: 18px;
  padding: 10px 14px;
  min-height: 40px;
  cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease;
}

.chip:hover {
  background: hsla(187, 80%, 55%, 0.18);
  border-color: hsla(187, 80%, 55%, 0.5);
}

.chat-window-wrap {
  position: relative;
}

.chat-window {
  display: flex;
  flex-direction: column;
  gap: 12px;
  min-height: 220px;
  max-height: 50vh;
  overflow-y: auto;
  margin-bottom: 14px;
  padding-right: 4px;
}

.scroll-hint {
  position: absolute;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%);
  display: none;
  align-items: center;
  gap: 4px;
  font-family: 'Space Grotesk', sans-serif;
  font-size: 12px;
  font-weight: 700;
  color: hsl(230, 24%, 8%);
  background: var(--accent-gradient);
  border: none;
  border-radius: 14px;
  padding: 6px 12px;
  cursor: pointer;
  box-shadow: 0 4px 12px hsla(230, 30%, 4%, 0.35);
  animation: scroll-hint-bounce 1.4s ease-in-out infinite;
}

.scroll-hint.visible {
  display: flex;
}

@keyframes scroll-hint-bounce {
  0%, 100% { transform: translate(-50%, 0); }
  50% { transform: translate(-50%, 4px); }
}

.chat-message {
  padding: 12px 16px;
  border-radius: 12px;
  font-size: 14px;
  line-height: 1.55;
  max-width: 90%;
  white-space: pre-wrap;
}

.chat-message.user {
  align-self: flex-end;
  background: hsla(270, 75%, 68%, 0.16);
  border: 1px solid hsla(270, 75%, 68%, 0.25);
  color: var(--text);
}

.chat-message.assistant {
  align-self: flex-start;
  background: var(--bg-card-solid);
  border: 1px solid var(--border);
  color: var(--text);
}

.chat-message.welcome {
  align-self: stretch;
  max-width: 100%;
  background: hsla(187, 80%, 55%, 0.06);
  border: 1px solid hsla(187, 80%, 55%, 0.18);
  border-radius: 12px;
  color: var(--text);
  font-size: 15px;
  line-height: 1.55;
  padding: 14px 16px;
}

.welcome-greeting {
  font-family: 'Space Grotesk', sans-serif;
  font-weight: 700;
  font-size: 18px;
}

.welcome-name {
  background: var(--accent-gradient);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.chat-message.pending {
  color: var(--text-muted);
  font-style: italic;
}

.chat-message.error {
  background: hsla(0, 70%, 50%, 0.12);
  border: 1px solid hsla(0, 70%, 50%, 0.3);
  color: hsl(0, 80%, 75%);
}

.chat-prompt-label {
  display: block;
  font-family: 'Space Grotesk', sans-serif;
  font-weight: 500;
  font-size: 13px;
  color: var(--accent-teal);
  margin-bottom: 8px;
}

.chat-form {
  display: flex;
  gap: 8px;
}

.chat-form input {
  flex: 1;
  font-family: 'DM Sans', sans-serif;
  font-size: 14px;
  padding: 12px 14px;
  min-height: 44px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: hsla(230, 20%, 10%, 0.6);
  color: var(--text);
}

.chat-form input::placeholder {
  color: var(--text-muted);
  opacity: 1;
}

.chat-form input:focus {
  outline: 2px solid var(--accent-teal);
  outline-offset: 1px;
}

.chat-form button {
  font-family: 'Space Grotesk', sans-serif;
  font-weight: 700;
  font-size: 14px;
  color: hsl(230, 24%, 8%);
  background: var(--accent-gradient);
  border: none;
  border-radius: 8px;
  padding: 12px 22px;
  min-height: 44px;
  cursor: pointer;
}

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

.chat-disclaimer {
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 10px;
}

/* === SECONDARY PROOF POINTS STRIP === */
.proof-strip {
  margin-bottom: 28px;
}

.proof-strip-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
  margin-bottom: 14px;
}

.proof-strip-item {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 12px 14px;
  font-size: 13px;
  line-height: 1.5;
  color: var(--text-muted);
}

.proof-strip-item strong {
  color: var(--text);
  font-family: 'Space Grotesk', sans-serif;
}

.proof-strip-link {
  display: inline-block;
  font-size: 14px;
  font-weight: 500;
  color: var(--accent-teal);
  text-decoration: none;
}

.proof-strip-link:hover {
  text-decoration: underline;
}

/* === ARCHITECTURE DIAGRAM === */
.arch-diagram {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 0;
  margin: 24px 0;
}

.arch-node {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 16px 18px;
  backdrop-filter: blur(16px);
}

.arch-node-title {
  font-family: 'Space Grotesk', sans-serif;
  font-weight: 700;
  font-size: 15px;
  color: var(--text);
  margin-bottom: 4px;
}

.arch-node-sub {
  font-size: 13px;
  color: var(--text-muted);
  line-height: 1.5;
}

.arch-node-tag {
  display: inline-block;
  font-family: 'Space Grotesk', sans-serif;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--accent-teal);
  margin-bottom: 6px;
}

.arch-arrow {
  align-self: center;
  width: 2px;
  height: 28px;
  background: var(--accent-gradient);
  position: relative;
}

.arch-arrow::after {
  content: "";
  position: absolute;
  bottom: -1px;
  left: 50%;
  transform: translateX(-50%);
  width: 0;
  height: 0;
  border-left: 5px solid transparent;
  border-right: 5px solid transparent;
  border-top: 7px solid var(--accent-purple);
}

.arch-arrow-label {
  align-self: center;
  font-size: 11px;
  color: var(--text-muted);
  text-align: center;
  margin: 2px 0;
}

.arch-guardrails {
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
  margin-top: 8px;
}

.arch-guardrail-item {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 12px 14px;
  font-size: 13px;
  line-height: 1.5;
  color: var(--text-muted);
}

.arch-guardrail-item strong {
  color: var(--text);
  font-family: 'Space Grotesk', sans-serif;
  display: block;
  margin-bottom: 2px;
}

/* === RESUME PAGE SECTIONS === */
.section {
  margin-bottom: 36px;
}

.section-title {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 14px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--accent-teal);
  border-bottom: 1.5px solid var(--border);
  padding-bottom: 6px;
  margin-bottom: 14px;
}

.summary-text {
  font-size: 15px;
  line-height: 1.7;
  color: var(--text-muted);
  margin-bottom: 12px;
}

.proof-points {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.proof-points li {
  font-size: 14px;
  line-height: 1.5;
  padding-left: 18px;
  position: relative;
  color: var(--text-muted);
}

.proof-points li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 8px;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--accent-purple);
}

.job {
  margin-bottom: 22px;
}

.job-header {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 4px 12px;
  margin-bottom: 6px;
}

.job-title {
  font-family: 'Space Grotesk', sans-serif;
  font-weight: 700;
  font-size: 15px;
  color: var(--text);
}

.job-dates {
  font-size: 13px;
  color: var(--text-muted);
  white-space: nowrap;
}

.job-bullets {
  list-style: disc;
  margin-left: 20px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.job-bullets li {
  font-size: 14px;
  line-height: 1.55;
  color: var(--text-muted);
}

/* === FOOTER === */
.footer {
  font-size: 13px;
  color: var(--text-muted);
  text-align: center;
  padding-top: 20px;
}

.footer a {
  color: var(--accent-teal);
  text-decoration: none;
}

.footer a:hover {
  text-decoration: underline;
}

/* === DESKTOP === */
@media (min-width: 768px) {
  .page {
    padding: 36px 24px 60px;
  }

  .hero h1 {
    font-size: 44px;
  }

  .hero p {
    font-size: 16px;
  }

  .chat-section {
    padding: 28px;
  }

  .chat-window {
    max-height: 480px;
    min-height: 320px;
  }

  .proof-strip-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}
