:root {
  color-scheme: light dark;
  --bg-deep: #0b1220;
  --bg-mid: #111827;
  --surface: rgba(17, 24, 39, 0.85);
  --border: #334155;
  --text: #e2e8f0;
  --muted: #94a3b8;
  --accent: #38bdf8;
  --accent-dim: #0ea5e9;
  --wrap: min(52rem, 92vw);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: Inter, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  background: linear-gradient(160deg, var(--bg-deep) 0%, #0f172a 40%, var(--bg-mid) 100%);
  color: var(--text);
  line-height: 1.55;
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0.5rem;
  z-index: 100;
  padding: 0.5rem 1rem;
  background: var(--accent);
  color: #0f172a;
  font-weight: 700;
  border-radius: 8px;
  text-decoration: none;
}

.skip-link:focus {
  left: 0.5rem;
}

.wrap {
  width: var(--wrap);
  margin-inline: auto;
  padding-inline: 1.25rem;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  border-bottom: 1px solid var(--border);
  background: rgba(11, 18, 32, 0.85);
  backdrop-filter: blur(10px);
}

.nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem 1rem;
  padding: 0.75rem 0;
  font-size: 0.875rem;
}

.nav a {
  color: var(--muted);
  text-decoration: none;
  font-weight: 600;
}

.nav a:hover,
.nav a:focus-visible {
  color: var(--accent);
}

.main {
  padding-block: 2rem 3rem;
}

.hero {
  padding: 1.5rem 0 2.5rem;
  border-bottom: 1px solid var(--border);
  margin-bottom: 2rem;
}

.eyebrow {
  margin: 0 0 0.5rem;
  color: var(--accent);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-size: 0.75rem;
  font-weight: 700;
}

.hero h1 {
  margin: 0 0 0.75rem;
  font-size: clamp(1.75rem, 4vw, 2.5rem);
  line-height: 1.15;
}

.tagline {
  margin: 0 0 1.25rem;
  color: var(--muted);
  font-size: 1rem;
}

.contact {
  list-style: none;
  margin: 0 0 1.25rem;
  padding: 0;
  display: grid;
  gap: 0.5rem;
}

@media (min-width: 480px) {
  .contact {
    grid-template-columns: repeat(2, 1fr);
  }
}

.contact li {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.95rem;
}

.contact-icon {
  flex-shrink: 0;
}

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

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

.availability {
  margin: 0;
  font-weight: 700;
  color: #fbbf24;
  font-size: 0.95rem;
}

.section {
  margin-bottom: 2.75rem;
}

.section h2 {
  margin: 0 0 1.25rem;
  font-size: 1.35rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid var(--border);
}

.prose p {
  margin: 0 0 1rem;
  color: #cbd5e1;
}

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

.job,
.project,
.edu {
  margin-bottom: 0;
}

.job h3,
.project h3,
.edu h3 {
  margin: 0 0 0.35rem;
  font-size: 1.1rem;
  line-height: 1.3;
}

.job h4,
.project h4 {
  margin: 1rem 0 0.5rem;
  font-size: 0.95rem;
  color: var(--accent-dim);
}

.job-meta {
  margin: 0 0 0.75rem;
  color: var(--muted);
  font-size: 0.9rem;
}

.job > p:not(.job-meta),
.project-lead {
  margin: 0 0 0.75rem;
  color: #cbd5e1;
}

.project-preview {
  margin: 0 0 1rem;
  max-width: min(28rem, 100%);
  border-radius: 10px;
  overflow: hidden;
  border: 1px solid var(--border);
  background: rgba(15, 23, 42, 0.6);
}

.project-preview img {
  display: block;
  width: 100%;
  height: auto;
}

ul {
  margin: 0 0 0.5rem;
  padding-left: 1.25rem;
}

li {
  margin-bottom: 0.35rem;
}

li::marker {
  color: var(--accent);
}

.divider {
  border: none;
  border-top: 1px solid var(--border);
  margin: 1.5rem 0;
}

.project-link {
  margin: 0.75rem 0 0;
}

.project-link a {
  color: var(--accent);
  font-weight: 600;
  text-decoration: none;
}

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

.project-link .link-sep {
  margin: 0 0.4rem;
  color: var(--muted);
  user-select: none;
}

.pub-code {
  font-weight: 400;
}

.pub-code a {
  color: var(--accent);
  font-weight: 600;
  text-decoration: none;
}

.pub-code a:hover {
  text-decoration: underline;
}

.pub-year {
  margin: 1.5rem 0 0.4rem;
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent-dim);
}

.pub-year:first-of-type {
  margin-top: 0.25rem;
}

.pub-year:not(:first-of-type) {
  margin-top: 1.75rem;
}

.pub-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.pub-arxiv {
  color: var(--accent);
  font-weight: 600;
  text-decoration: none;
}

.pub-arxiv:hover {
  text-decoration: underline;
}

.pub-list li {
  padding: 0.65rem 0;
  border-bottom: 1px solid rgba(51, 65, 85, 0.6);
  margin: 0;
}

.pub-list li:last-child {
  border-bottom: none;
}

.skill-grid {
  display: grid;
  gap: 1rem;
  margin: 0;
}

@media (min-width: 640px) {
  .skill-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

.skill-block {
  padding: 1rem;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: var(--surface);
}

.skill-block dt {
  margin: 0 0 0.35rem;
  font-weight: 700;
  color: var(--accent);
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.skill-block dd {
  margin: 0;
  color: #cbd5e1;
  font-size: 0.9rem;
}

.site-footer {
  border-top: 1px solid var(--border);
  padding: 1.25rem 0 2rem;
  text-align: center;
  color: var(--muted);
  font-size: 0.875rem;
}

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

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