:root {
  --navy: #1B2A4A;
  --accent: #2563EB;
  --muted: #6B7280;
  --bg: #FFFFFF;
  --surface: #F8FAFC;
  --border: #E2E8F0;
  --text: #111827;
  --link-paper: #1D4ED8;
  --link-code: #15803D;
  --link-blog: #C2410C;
}

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

html {
  scroll-behavior: smooth;
}

body {
  font-family: 'Inter', sans-serif;
  font-size: 15px;
  line-height: 1.6;
  color: var(--text);
  background: var(--bg);
}

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

a:hover {
  text-decoration: underline;
}

/* ── Layout ── */

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

/* ── Header ── */

header {
  background: var(--navy);
  color: white;
  padding: 48px 0 40px;
}

header h1 {
  font-size: 2rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  margin-bottom: 4px;
}

header .subtitle {
  font-size: 0.95rem;
  color: #93C5FD;
  margin-bottom: 20px;
}

header .contact {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

header .contact a {
  color: #CBD5E1;
  font-size: 0.85rem;
  display: flex;
  align-items: center;
  gap: 5px;
  padding: 4px 10px;
  border: 1px solid #334155;
  border-radius: 4px;
  transition: color 0.15s, border-color 0.15s;
}

header .contact a:hover {
  color: white;
  border-color: #93C5FD;
  text-decoration: none;
}

/* ── Nav ── */

nav {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--navy);
  border-bottom: 1px solid #2D3D5A;
}

nav .container {
  display: flex;
  gap: 4px;
  padding-top: 0;
  padding-bottom: 0;
}

nav a {
  color: #94A3B8;
  font-size: 0.8rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  padding: 10px 12px;
  display: block;
  transition: color 0.15s;
}

nav a:hover {
  color: white;
  text-decoration: none;
}

/* ── Sections ── */

section {
  padding: 40px 0;
  border-bottom: 1px solid var(--border);
}

section:last-of-type {
  border-bottom: none;
}

.section-title {
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--navy);
  margin-bottom: 20px;
  padding-bottom: 8px;
  border-bottom: 2px solid var(--accent);
  display: inline-block;
}

/* ── About ── */

#about p {
  color: #374151;
  max-width: 640px;
  font-size: 0.95rem;
}

/* ── Publications ── */

.pub-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.pub {
  display: flex;
  gap: 16px;
  align-items: flex-start;
}

.pub-num {
  flex-shrink: 0;
  font-size: 0.75rem;
  color: var(--muted);
  width: 24px;
  text-align: right;
  padding-top: 2px;
}

.pub-body {
  flex: 1;
}

.pub-title {
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text);
  margin-bottom: 2px;
}

.pub-meta {
  font-size: 0.82rem;
  color: var(--muted);
  margin-bottom: 5px;
}

.pub-links {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.pub-links a {
  font-size: 0.75rem;
  font-weight: 600;
  padding: 1px 6px;
  border-radius: 3px;
}

.pub-links a.paper {
  color: var(--link-paper);
  background: #EFF6FF;
}

.pub-links a.code {
  color: var(--link-code);
  background: #F0FDF4;
}

.pub-links a.blog {
  color: var(--link-blog);
  background: #FFF7ED;
}

.pub-links a:hover {
  text-decoration: none;
  filter: brightness(0.85);
}

/* ── Experience / Education ── */

.entry-list {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.entry {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 0 16px;
}

.entry-org {
  font-weight: 600;
  font-size: 0.95rem;
  color: var(--navy);
}

.entry-role {
  font-size: 0.85rem;
  color: var(--muted);
  font-style: italic;
  grid-column: 1;
}

.entry-date {
  font-size: 0.8rem;
  color: var(--muted);
  text-align: right;
  white-space: nowrap;
  padding-top: 2px;
}

.entry-location {
  font-size: 0.78rem;
  color: var(--muted);
  text-align: right;
  grid-column: 2;
}

.entry-bullets {
  grid-column: 1 / -1;
  margin-top: 6px;
  padding-left: 16px;
  list-style: disc;
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.entry-bullets li {
  font-size: 0.85rem;
  color: #374151;
}

/* ── Certificates ── */

.cert {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 4px;
}

.cert-name {
  font-weight: 600;
  font-size: 0.95rem;
  color: var(--navy);
}

.cert-meta {
  font-size: 0.82rem;
  color: var(--muted);
}

.cert-desc {
  font-size: 0.85rem;
  color: #374151;
  margin-top: 3px;
}

/* ── Skills ── */

.skill-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.skill-row {
  display: flex;
  gap: 10px;
  align-items: baseline;
  flex-wrap: wrap;
}

.skill-label {
  font-size: 0.78rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--navy);
  min-width: 110px;
  flex-shrink: 0;
}

.skill-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.tag {
  font-size: 0.78rem;
  padding: 2px 8px;
  border-radius: 3px;
  background: var(--surface);
  border: 1px solid var(--border);
  color: #374151;
}

/* ── Footer ── */

footer {
  text-align: center;
  padding: 24px;
  font-size: 0.78rem;
  color: var(--muted);
}

/* ── Responsive ── */

@media (max-width: 600px) {
  header h1 { font-size: 1.6rem; }
  .entry { grid-template-columns: 1fr; }
  .entry-date, .entry-location { text-align: left; }
  .skill-label { min-width: auto; width: 100%; }
}
