:root {
  --bg: #050816;
  --bg-alt: #0b1020;
  --card: #111827;
  --accent: #38bdf8;
  --accent-soft: rgba(56, 189, 248, 0.12);
  --text: #e5e7eb;
  --muted: #9ca3af;
  --border-subtle: rgba(148, 163, 184, 0.35);
  --radius-lg: 18px;
  --shadow-soft: 0 18px 45px rgba(15, 23, 42, 0.65);
  --font-main: system-ui, -apple-system, BlinkMacSystemFont, "SF Pro Text",
    "Segoe UI", sans-serif;
}

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

html,
body {
  margin: 0;
  padding: 0;
  font-family: var(--font-main);
  background: radial-gradient(circle at top, #0f172a 0, #020617 40%, #000 100%);
  color: var(--text);
}

/* Layout */

body {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.page-wrapper {
  max-width: 1100px;
  margin: 0 auto;
  padding: 1.5rem 1.25rem 3rem;
  width: 100%;
}

main {
  margin-top: 2.5rem;
}

/* Top Nav */

.site-nav {
  position: sticky;
  top: 0;
  z-index: 50;
  backdrop-filter: blur(18px);
  background: linear-gradient(
    to bottom,
    rgba(15, 23, 42, 0.92),
    rgba(15, 23, 42, 0.72),
    rgba(15, 23, 42, 0)
  );
  border-bottom: 1px solid rgba(148, 163, 184, 0.18);
}

.site-nav-inner {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0.85rem 1.25rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.brand-initials {
  width: 34px;
  height: 34px;
  border-radius: 999px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: radial-gradient(circle at 30% 0, #38bdf8, #4f46e5);
  color: white;
  font-weight: 700;
  font-size: 0.9rem;
  box-shadow: 0 0 0 1px rgba(15, 23, 42, 0.5),
    0 12px 30px rgba(56, 189, 248, 0.45);
}

.brand-text {
  display: flex;
  flex-direction: column;
}

.brand-text strong {
  letter-spacing: 0.04em;
  font-size: 0.95rem;
}

.brand-text span {
  font-size: 0.75rem;
  color: var(--muted);
}

.nav-links {
  display: flex;
  gap: 1.2rem;
  font-size: 0.9rem;
}

.nav-links a {
  color: var(--muted);
  text-decoration: none;
  padding: 0.35rem 0.65rem;
  border-radius: 999px;
  transition: color 0.15s ease, background 0.15s ease, transform 0.1s ease;
}

.nav-links a:hover {
  color: var(--text);
  background: rgba(15, 23, 42, 0.75);
  transform: translateY(-1px);
}

.nav-links a.active {
  color: white;
  background: var(--accent-soft);
  border: 1px solid rgba(56, 189, 248, 0.45);
}

/* Footer */

footer {
  margin-top: auto;
  border-top: 1px solid rgba(15, 23, 42, 0.9);
  background: radial-gradient(circle at bottom, #020617, #000);
}

.footer-inner {
  max-width: 1100px;
  margin: 0 auto;
  padding: 1.2rem 1.25rem 1.75rem;
  font-size: 0.8rem;
  color: var(--muted);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}

.footer-links {
  display: flex;
  gap: 0.8rem;
}

.footer-links a {
  color: var(--muted);
  text-decoration: none;
}

.footer-links a:hover {
  color: var(--accent);
}

/* Hero (Home) */

.hero {
  display: grid;
  grid-template-columns: minmax(0, 3fr) minmax(0, 2.4fr);
  gap: 2rem;
  align-items: center;
}

.hero-left {
  position: relative;
}

.hero-kicker {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.1rem 0.55rem;
  border-radius: 999px;
  border: 1px solid rgba(56, 189, 248, 0.35);
  background: rgba(15, 23, 42, 0.75);
  font-size: 0.75rem;
  color: var(--accent);
  margin-bottom: 0.9rem;
}

.hero-title {
  font-size: clamp(2.1rem, 3vw + 1rem, 2.9rem);
  line-height: 1.05;
  margin: 0 0 0.7rem;
}

.hero-title span {
  background: linear-gradient(120deg, #38bdf8, #a855f7);
  -webkit-background-clip: text;
  color: transparent;
}

.hero-sub {
  font-size: 0.98rem;
  color: var(--muted);
  max-width: 32rem;
  margin-bottom: 1.4rem;
}

.hero-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 0.7rem;
  margin-bottom: 1.6rem;
}

.badge {
  font-size: 0.78rem;
  border-radius: 999px;
  padding: 0.2rem 0.7rem;
  border: 1px solid rgba(148, 163, 184, 0.45);
  background: rgba(15, 23, 42, 0.85);
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  padding: 0.5rem 1.05rem;
  font-size: 0.9rem;
  border-radius: 999px;
  border: 1px solid transparent;
  text-decoration: none;
  cursor: pointer;
  transition: transform 0.12s ease, box-shadow 0.12s ease, background 0.12s ease,
    border-color 0.12s ease, color 0.12s ease;
}

.btn-primary {
  background: linear-gradient(120deg, #38bdf8, #4f46e5);
  color: white;
  box-shadow: 0 15px 35px rgba(37, 99, 235, 0.55);
}

.btn-primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 20px 40px rgba(37, 99, 235, 0.75);
}

.btn-ghost {
  background: rgba(15, 23, 42, 0.9);
  border-color: rgba(148, 163, 184, 0.7);
  color: var(--text);
}

.btn-ghost:hover {
  background: rgba(15, 23, 42, 1);
  border-color: var(--accent);
  color: white;
}

/* Hero "eye candy" card */

.hero-right {
  position: relative;
}

.hero-card {
  position: relative;
  border-radius: 24px;
  padding: 1.4rem 1.35rem;
  background:
    radial-gradient(circle at 0 0, rgba(56, 189, 248, 0.12), transparent 55%),
    radial-gradient(circle at 100% 0, rgba(168, 85, 247, 0.2), transparent 55%),
    linear-gradient(145deg, #020617, #020617, #020617);
  border: 1px solid rgba(148, 163, 184, 0.4);
  box-shadow: var(--shadow-soft);
  overflow: hidden;
}

.hero-card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.6rem;
}

.hero-pill {
  font-size: 0.7rem;
  padding: 0.2rem 0.65rem;
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.8);
  border: 1px solid rgba(56, 189, 248, 0.45);
  color: var(--accent);
}

.hero-card-title {
  font-size: 0.95rem;
  font-weight: 600;
}

.hero-card-body {
  margin-top: 0.8rem;
  font-size: 0.8rem;
  color: var(--muted);
}

.hero-stat-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.7rem;
  margin-top: 0.9rem;
}

.hero-stat {
  padding: 0.55rem 0.6rem;
  border-radius: 0.85rem;
  background: rgba(15, 23, 42, 0.9);
  border: 1px solid rgba(31, 41, 55, 0.9);
}

.hero-stat-label {
  font-size: 0.65rem;
  color: var(--muted);
}

.hero-stat-value {
  margin-top: 0.15rem;
  font-size: 0.95rem;
}

/* Section scaffolding */

.section-heading {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: 1.3rem;
  gap: 1rem;
}

.section-heading h1,
.section-heading h2 {
  margin: 0;
  font-size: 1.4rem;
}

.section-heading p {
  margin: 0;
  color: var(--muted);
  font-size: 0.9rem;
}

/* Cards */

.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1.1rem;
}

.card {
  background: var(--card);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-subtle);
  padding: 1rem;
  box-shadow: 0 18px 40px rgba(15, 23, 42, 0.75);
}

.card h3 {
  margin: 0 0 0.35rem;
  font-size: 1rem;
}

.card p {
  margin: 0;
  color: var(--muted);
  font-size: 0.88rem;
}

.card-meta {
  margin-top: 0.6rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  font-size: 0.75rem;
  color: var(--muted);
}

.card-meta span {
  padding: 0.15rem 0.55rem;
  border-radius: 999px;
  border: 1px solid rgba(55, 65, 81, 0.9);
  background: rgba(15, 23, 42, 0.9);
}

.card a.card-link {
  display: inline-flex;
  margin-top: 0.7rem;
  font-size: 0.82rem;
  text-decoration: none;
  color: var(--accent);
}

.card a.card-link:hover {
  text-decoration: underline;
}

/* Playground */

.playground-note {
  font-size: 0.85rem;
  color: var(--muted);
  margin-bottom: 1.4rem;
}

/* Contact */

.contact-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.7fr) minmax(0, 1.4fr);
  gap: 1.5rem;
}

.contact-details {
  font-size: 0.9rem;
  color: var(--muted);
}

.contact-details a {
  color: var(--accent);
  text-decoration: none;
}

.contact-details a:hover {
  text-decoration: underline;
}

.contact-list {
  margin: 0.75rem 0 0;
  padding: 0;
  list-style: none;
}

.contact-list li {
  margin-bottom: 0.35rem;
}

.contact-form {
  background: var(--card);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-subtle);
  padding: 1rem;
  box-shadow: 0 18px 40px rgba(15, 23, 42, 0.75);
}

.contact-form label {
  display: block;
  font-size: 0.8rem;
  margin-bottom: 0.25rem;
}

.contact-form input,
.contact-form textarea {
  width: 100%;
  border-radius: 0.7rem;
  border: 1px solid rgba(55, 65, 81, 0.9);
  background: rgba(15, 23, 42, 0.85);
  color: var(--text);
  padding: 0.5rem 0.6rem;
  font-size: 0.85rem;
  margin-bottom: 0.7rem;
  outline: none;
}

.contact-form input:focus,
.contact-form textarea:focus {
  border-color: var(--accent);
}

.contact-form textarea {
  min-height: 130px;
  resize: vertical;
}

/* Chat playground input styles */
#chat-input {
  width: 100%;
  border-radius: 0.8rem;
  border: 1px solid rgba(55, 65, 81, 0.9);
  background: linear-gradient(180deg, rgba(255,255,255,0.02), rgba(255,255,255,0.01));
  color: var(--text);
  padding: 0.8rem 0.9rem;
  font-size: 0.95rem;
  line-height: 1.4;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.02);
  transition: border-color 0.12s ease, box-shadow 0.12s ease, transform 0.08s ease;
  outline: none;
}

#chat-input::placeholder {
  color: rgba(156,163,175,0.6);
}

#chat-input:focus {
  border-color: var(--accent);
  box-shadow: 0 6px 30px rgba(56,189,248,0.08), inset 0 0 0 3px rgba(56,189,248,0.06);
  transform: translateY(-1px);
}

/* Make the input area visually distinct when empty vs when user types */
#chat-input:placeholder-shown {
  background: linear-gradient(180deg, rgba(255,255,255,0.01), rgba(255,255,255,0.007));
}

/* Character counter next to the input */
#chat-counter {
  font-size: 0.78rem;
  color: var(--muted);
  margin-left: 0.3rem;
}

/* Emphasize the Send button when input is focused */
#chat-form button[type='submit'] {
  transition: transform 0.12s ease, box-shadow 0.12s ease, opacity 0.12s ease;
}

#chat-input:focus + #chat-counter,
#chat-input:not(:placeholder-shown) + #chat-counter {
  color: var(--accent);
}
/* Utilities */

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

/* Responsive tweaks */

@media (max-width: 800px) {
  .hero {
    grid-template-columns: 1fr;
  }

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

  .site-nav-inner {
    flex-direction: column;
    align-items: flex-start;
  }

  .nav-links {
    flex-wrap: wrap;
  }
}

/* Philosophy section (styled like hero card / site cards) */

.philosophy {
  margin-top: 3rem;
}

.philosophy-card {
  border-radius: 24px;
  padding: 1.35rem 1.35rem 1.15rem;
  background:
    radial-gradient(circle at 0 0, rgba(56, 189, 248, 0.12), transparent 55%),
    radial-gradient(circle at 100% 0, rgba(168, 85, 247, 0.18), transparent 55%),
    linear-gradient(145deg, #020617, #020617, #020617);
  border: 1px solid rgba(148, 163, 184, 0.4);
  box-shadow: var(--shadow-soft);
}

.philosophy-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
  margin-bottom: 0.85rem;
}

.philosophy-title {
  margin: 0;
  font-size: 1.15rem;
  letter-spacing: 0.01em;
}

.philosophy-sub {
  margin: 0.35rem 0 0;
  color: var(--muted);
  font-size: 0.9rem;
  max-width: 44rem;
  line-height: 1.5;
}

.philosophy-tags {
  display: flex;
  gap: 0.45rem;
  flex-wrap: wrap;
}

.philosophy-tag {
  font-size: 0.75rem;
  padding: 0.18rem 0.6rem;
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.8);
  border: 1px solid rgba(56, 189, 248, 0.35);
  color: var(--accent);
}

.philosophy-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.8rem;
  margin-top: 0.8rem;
}

.philosophy-item {
  padding: 0.8rem 0.85rem;
  border-radius: 0.95rem;
  background: rgba(15, 23, 42, 0.9);
  border: 1px solid rgba(31, 41, 55, 0.9);
}

.philosophy-item-title {
  font-size: 0.8rem;
  font-weight: 650;
  color: var(--text);
  margin-bottom: 0.25rem;
}

.philosophy-item-body {
  font-size: 0.85rem;
  color: var(--muted);
  line-height: 1.45;
}

@media (max-width: 900px) {
  .philosophy-grid {
    grid-template-columns: 1fr;
  }
}
