/* Schematic Blue: navy-black base, blue grid/links/markers, purple heading slashes, gold highlights */
:root {
  color-scheme: dark;
  --bg: #040a1a;
  --surface: #0a1530;
  --text: #dde6fb;
  --muted: #8797c2;
  --border: #16264f;
  --accent: #f2c14e;       /* gold: primary button, badges */
  --accent-text: #0a0a0f;
  --link: #6f9bff;         /* blue: links, grid */
  --marker: #4fb3ff;       /* sky blue: eyebrow, callout, year labels */
  --purple: #9a7cff;       /* only the // before section headings */
  --radius: 2px;
  --sans: 'IBM Plex Sans', system-ui, -apple-system, sans-serif;
  --mono: 'JetBrains Mono', ui-monospace, monospace;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; scroll-padding-top: 72px; }

body {
  margin: 0;
  background-color: var(--bg);
  background-image:
    linear-gradient(rgba(90, 150, 255, 0.08) 1px, transparent 1px),
    linear-gradient(90deg, rgba(90, 150, 255, 0.08) 1px, transparent 1px);
  background-size: 32px 32px;
  background-attachment: fixed;
  color: var(--text);
  font-family: var(--sans);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--link); text-decoration: none; }
a:hover { text-decoration: underline; }

h1, h2, h3, .nav, .btn, .date, .eyebrow, .chips li, .badge, .pub-year, .note {
  font-family: var(--mono);
}

.container { max-width: 760px; margin: 0 auto; padding: 0 20px; }

/* Nav */
.nav {
  position: sticky;
  top: 0;
  z-index: 10;
  background: color-mix(in srgb, var(--bg) 85%, transparent);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--border);
}
.nav-inner { display: flex; align-items: center; justify-content: space-between; height: 56px; }
.nav .nav-inner { max-width: 960px; }   /* wider than the content so the view links fit */
.logo, .nav nav a { white-space: nowrap; }
.logo { font-weight: 600; color: var(--text); }
.nav nav { display: flex; gap: 20px; }
.nav nav a { color: var(--muted); font-size: 0.95rem; }
.nav nav a:hover { color: var(--text); text-decoration: none; }
.nav nav a.view-switch { color: var(--link); border: 1px solid var(--border); padding: 0 8px; }

/* Hero */
.hero { padding: 88px 0 48px; }
.eyebrow { margin: 0; color: var(--marker); font-weight: 600; }
.eyebrow::before { content: '> '; }
.hero h1 { margin: 4px 0 8px; font-size: clamp(2.2rem, 6vw, 3.2rem); font-weight: 600; line-height: 1.1; letter-spacing: -0.03em; }
.tagline { margin: 0 0 16px; font-size: 1.25rem; color: var(--muted); }
.lead { max-width: 60ch; }
.actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 24px; }

.btn {
  display: inline-block;
  padding: 9px 16px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  color: var(--text);
  font-weight: 500;
}
.btn:hover { text-decoration: none; border-color: var(--muted); }
.btn.primary { background: var(--accent); border-color: var(--accent); color: var(--accent-text); }
.btn.primary:hover { opacity: 0.9; }

/* Sections */
section { padding: 40px 0; border-top: 1px solid var(--border); }
section.hero { border-top: none; }
h2 { margin: 0 0 24px; font-size: 1.2rem; font-weight: 600; }
h2::before { content: '// '; color: var(--purple); }
h3 { margin: 0; font-size: 0.98rem; }

.item { margin-bottom: 28px; }
.item:last-child { margin-bottom: 0; }
.item-head { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 4px 16px; }
.item-head h3 span { font-weight: 400; color: var(--muted); }
.date { color: var(--muted); font-size: 0.9rem; }
.item ul { margin: 8px 0 0; padding-left: 20px; }
.item li { margin-bottom: 4px; }

/* Projects */
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 14px; }
.card {
  display: block;
  padding: 18px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  color: var(--text);
  transition: border-color 0.15s, transform 0.15s;
}
a.card:hover { text-decoration: none; border-color: var(--link); transform: translateY(-2px); }
.card p { margin: 6px 0 0; color: var(--muted); font-size: 0.95rem; }
.card .tags { margin-top: 12px; font-size: 0.85rem; }

.figure { margin: 24px 0 0; }
.figure img {
  display: block;
  width: 100%;
  height: auto;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
}
.figure figcaption { margin-top: 8px; color: var(--muted); font-size: 0.9rem; }

.sub { margin: 6px 0 0; color: var(--muted); }
.note { margin: -12px 0 16px; color: var(--muted); font-size: 0.9rem; }

.callout {
  max-width: 60ch;
  padding: 10px 14px;
  border: 1px solid var(--border);
  border-left: 3px solid var(--marker);
  border-radius: 6px;
  background: var(--surface);
}

/* News */
.news { margin: 0; padding: 0; list-style: none; }
.news li { display: flex; gap: 16px; margin-bottom: 8px; }
.news .date { flex: 0 0 48px; padding-top: 2px; }

/* Publications */
.pub-year { margin: 24px 0 10px; color: var(--marker); font-size: 0.95rem; }
.pub-year:first-child { margin-top: 0; }
.pubs { margin: 0; padding: 0; list-style: none; }
.badge {
  display: inline-block;
  margin-left: 6px;
  padding: 1px 8px;
  border-radius: 999px;
  background: color-mix(in srgb, var(--accent) 15%, transparent);
  color: var(--accent);
  font-size: 0.78rem;
  font-weight: 600;
  white-space: nowrap;
  vertical-align: 2px;
}
.pubs li { margin-bottom: 18px; }
.pubs p { margin: 0; }
.pub-title { font-weight: 600; }
.pub-authors, .pub-venue { color: var(--muted); font-size: 0.95rem; }
.pub-authors strong { color: var(--text); font-weight: 600; }

/* Skills */
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin: 0; padding: 0; list-style: none; }
.chips li {
  padding: 4px 12px;
  border: 1px solid color-mix(in srgb, var(--link) 35%, var(--border));
  border-radius: 999px;
  background: var(--surface);
  font-size: 0.9rem;
}

.footer { padding: 32px 20px 48px; color: var(--muted); font-size: 0.9rem; }

@media (max-width: 560px) {
  .nav-inner { gap: 14px; }
  .logo { white-space: nowrap; }
  .nav nav { gap: 14px; overflow-x: auto; scrollbar-width: none; }
  .nav nav a { font-size: 0.85rem; white-space: nowrap; }
  .nav nav a.view-switch { order: -1; }  /* keep it visible before the scrolling links */
  .hero { padding-top: 56px; }
}
