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

:root {
  --bg: #04070f;
  --bg-alt: #070b15;
  --card: #0d1220;
  --card-alt: #10162b;
  --fg: #f5f7fb;
  --muted: #9aa4ba;
  --accent: #93c5fd;
  --accent-strong: #2563eb;
  --border: rgba(148, 163, 184, 0.25);
  --border-light: rgba(148, 163, 184, 0.15);
  --radius-lg: 1.25rem;
  --radius-md: 0.8rem;
  --radius-pill: 999px;
  --font-sans: "Space Grotesk", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --font-mono: "IBM Plex Mono", ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: var(--font-sans);
  background: radial-gradient(circle at top, #111836, #04070f 60%);
  color: var(--fg);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

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

a:hover {
  text-decoration: underline;
}

.container {
  width: min(1080px, 100%);
  margin: 0 auto;
  padding: 0 1.25rem;
}

.section {
  padding: 4rem 0;
}

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

.section-header h2 {
  margin: 0;
  font-size: clamp(1.8rem, 3vw, 2.4rem);
}

.section-header p {
  margin: 0.35rem 0 0;
  color: var(--muted);
}

.eyebrow {
  font-size: 0.85rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--muted);
}

p {
  margin-top: 0;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  background: rgba(4, 7, 15, 0.9);
  border-bottom: 1px solid var(--border-light);
  backdrop-filter: blur(12px);
}

.nav-container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.8rem 0;
}

.logo {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--fg);
  font-family: var(--font-mono);
  letter-spacing: 0.12em;
}

.logo-dot {
  width: 0.7rem;
  height: 0.7rem;
  border-radius: 50%;
  background: radial-gradient(circle, var(--accent) 0%, #2563eb 70%, transparent);
  box-shadow: 0 0 20px rgba(37, 99, 235, 0.8);
}

.nav {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.nav-links {
  display: flex;
  list-style: none;
  margin: 0;
  padding: 0;
  gap: 1rem;
}

.nav-links a {
  color: var(--fg);
  font-size: 0.95rem;
  letter-spacing: 0.04em;
}

.nav-toggle {
  display: none;
  background: none;
  border: none;
  color: var(--fg);
}

.nav-toggle span {
  display: block;
  width: 1.3rem;
  height: 2px;
  background: var(--fg);
  margin: 0.25rem 0;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.6rem 1.1rem;
  border-radius: var(--radius-pill);
  border: 1px solid transparent;
  font-weight: 600;
  font-size: 0.95rem;
}

.primary-btn {
  background: linear-gradient(120deg, var(--accent), var(--accent-strong));
  color: #04070f;
}

.ghost-btn {
  border-color: var(--border);
  color: var(--fg);
  background: transparent;
}

.pill {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.2rem 0.8rem;
  border-radius: var(--radius-pill);
  border: 1px solid var(--border);
  font-size: 0.85rem;
  color: var(--fg);
}

.pill-soft {
  border-color: rgba(147, 197, 253, 0.5);
  background: rgba(147, 197, 253, 0.12);
  color: var(--accent);
}

.hero {
  padding-top: 5rem;
}

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

.hero-intro h1 {
  font-size: clamp(2.4rem, 4vw, 3.2rem);
  margin: 0.4rem 0 0.8rem;
}

.hero-lede {
  font-size: 1.1rem;
  color: rgba(245, 247, 251, 0.9);
  margin-bottom: 1.2rem;
}

.hero-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  margin-bottom: 1.2rem;
}

.hero-cta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.8rem;
  margin-bottom: 1.2rem;
}

.hero-highlights {
  list-style: none;
  padding: 0;
  margin: 0 0 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  color: rgba(245, 247, 251, 0.85);
}

.hero-highlights span {
  font-family: var(--font-mono);
  color: var(--muted);
  margin-right: 0.4rem;
}

.hero-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  font-family: var(--font-mono);
  font-size: 0.85rem;
}

.hero-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1rem;
}

.stat-card {
  padding: 1.1rem 1.2rem;
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
  background: var(--card);
  min-height: 140px;
}

.stat-title {
  margin: 0 0 0.4rem;
  font-size: 0.9rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}

.stat-body {
  margin: 0;
  color: rgba(245, 247, 251, 0.85);
}

.pulse-section {
  background: var(--bg-alt);
  border-top: 1px solid var(--border-light);
  border-bottom: 1px solid var(--border-light);
}

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

.snapshot-card {
  padding: 1.2rem;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  background: var(--card);
  min-height: 180px;
}

.card-label {
  font-size: 0.75rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 0.35rem;
}

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

.work-card {
  padding: 1.4rem;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  background: var(--card);
  min-height: 200px;
}

.experience-section {
  background: var(--bg-alt);
}

.timeline {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.timeline-item {
  padding: 1.2rem 1.4rem;
  border-radius: var(--radius-lg);
  border: 1px dashed rgba(148, 163, 184, 0.4);
  background: rgba(13, 18, 32, 0.7);
}

.timeline-item h3 {
  margin: 0.2rem 0 0.4rem;
}

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

.stack-column {
  padding: 1.4rem;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  background: var(--card);
}

.pill-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 0.9rem;
}

.notes-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 0.8rem;
}

.notes-list strong {
  display: block;
  margin-bottom: 0.2rem;
}

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

.contact-card {
  padding: 1.4rem;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  background: var(--card);
}

.contact-form label {
  display: block;
  margin-bottom: 0.4rem;
  font-weight: 600;
}

.contact-form textarea {
  width: 100%;
  min-height: 120px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
  background: rgba(4, 7, 15, 0.6);
  color: var(--fg);
  font-family: var(--font-sans);
  padding: 0.7rem;
  resize: vertical;
}

.contact-form textarea:focus {
  outline: 1px solid var(--accent);
}

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

.site-footer {
  padding: 1.8rem 0;
  border-top: 1px solid var(--border-light);
  background: #03050b;
}

.footer-inner {
  display: flex;
  flex-wrap: wrap;
  gap: 0.8rem;
  justify-content: space-between;
  color: var(--muted);
}

.footer-meta {
  margin: 0;
}

/* AI widget */
.ai-widget {
  position: fixed;
  bottom: 1.8rem;
  right: 1.5rem;
  z-index: 15;
  display: flex;
  align-items: flex-end;
  gap: 0.6rem;
}

.ai-widget-toggle {
  width: 2.8rem;
  height: 2.8rem;
  border-radius: 50%;
  border: 1px solid rgba(147, 197, 253, 0.6);
  background: radial-gradient(circle, var(--accent), var(--accent-strong));
  color: #03050b;
  font-weight: 600;
  cursor: pointer;
  box-shadow: 0 15px 40px rgba(37, 99, 235, 0.5);
}

.ai-widget-panel {
  width: min(320px, 80vw);
  max-height: 60vh;
  border-radius: var(--radius-lg);
  border: 1px solid rgba(37, 99, 235, 0.4);
  background: rgba(4, 7, 15, 0.95);
  box-shadow: 0 20px 60px rgba(2, 6, 23, 0.8);
  display: flex;
  flex-direction: column;
  opacity: 0;
  transform: translateY(12px);
  pointer-events: none;
  transition: opacity 140ms ease-out, transform 160ms ease-out;
}

.ai-widget-panel.open {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

.ai-widget-header {
  padding: 0.9rem 1rem;
  border-bottom: 1px solid rgba(15, 23, 42, 0.9);
}

.ai-widget-body {
  padding: 0.9rem 1rem;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.ai-msg {
  max-width: 90%;
  padding: 0.4rem 0.7rem;
  border-radius: 0.85rem;
  font-size: 0.85rem;
  line-height: 1.4;
}

.ai-msg-bot {
  border: 1px solid rgba(37, 99, 235, 0.4);
  background: rgba(13, 18, 32, 0.9);
}

.ai-msg-user {
  margin-left: auto;
  border: 1px solid rgba(147, 197, 253, 0.6);
  background: rgba(147, 197, 253, 0.12);
}

.ai-widget-input {
  padding: 0.8rem 0.9rem;
  border-top: 1px solid rgba(15, 23, 42, 0.9);
  display: flex;
  gap: 0.4rem;
}

.ai-widget-input input {
  flex: 1;
  border-radius: var(--radius-pill);
  border: 1px solid var(--border);
  background: rgba(4, 7, 15, 0.7);
  color: var(--fg);
  padding: 0.35rem 0.75rem;
}

.ai-widget-input button {
  border-radius: var(--radius-pill);
  border: 1px solid rgba(147, 197, 253, 0.6);
  background: rgba(147, 197, 253, 0.15);
  color: var(--accent);
  font-size: 0.8rem;
  padding: 0.3rem 0.7rem;
  cursor: pointer;
}

@media (max-width: 720px) {
  .nav-links {
    position: absolute;
    top: 100%;
    right: 1.25rem;
    flex-direction: column;
    background: rgba(4, 7, 15, 0.95);
    padding: 1rem 1.4rem;
    border-radius: var(--radius-md);
    border: 1px solid var(--border);
    display: none;
  }

  .nav-links.open {
    display: flex;
  }

  .nav-toggle {
    display: block;
  }

  .hero-cta {
    flex-direction: column;
    align-items: stretch;
  }
}
