:root {
  --bg: #f8f8f6;
  --surface: #ffffff;
  --text: #1a1a1a;
  --muted: #6b7280;
  --accent: #2563eb;
  --accent-light: #eff6ff;
  --border: #e5e7eb;
  --max-width: 780px;
}

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

html {
  scroll-behavior: smooth;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.7;
  font-size: 16px;
}

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

a:hover {
  text-decoration: underline;
}

/* ── Layout ─────────────────────────────────────────── */
.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 24px;
}

/* ── Header / Hero ──────────────────────────────────── */
header {
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  padding: 48px 0 40px;
}

header .container {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.header-top {
  display: flex;
  align-items: flex-start;
  flex-wrap: wrap;
  gap: 20px;
}

header h1 {
  font-size: 2.25rem;
  font-weight: 700;
  letter-spacing: -0.5px;
  line-height: 1.2;
}

.profile-photo {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
}

.header-info {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.contact-links {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 0.9rem;
  color: var(--muted);
}

.contact-links a {
  color: var(--muted);
  display: flex;
  align-items: center;
  gap: 6px;
}

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

.contact-links .icon {
  width: 15px;
  text-align: center;
  flex-shrink: 0;
  color: var(--accent);
}

/* ── Nav ────────────────────────────────────────────── */
nav {
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 100;
}

nav .container {
  display: flex;
  gap: 0;
  overflow-x: auto;
}

nav a {
  color: var(--muted);
  font-size: 0.875rem;
  font-weight: 500;
  padding: 14px 18px;
  white-space: nowrap;
  border-bottom: 2px solid transparent;
  transition: color 0.15s, border-color 0.15s;
}

nav a:hover,
nav a.active {
  color: var(--accent);
  border-bottom-color: var(--accent);
  text-decoration: none;
}

/* ── Main content ───────────────────────────────────── */
main {
  padding: 48px 0 80px;
}

section {
  margin-bottom: 56px;
}

section:last-child {
  margin-bottom: 0;
}

/* ── Section headings ───────────────────────────────── */
.section-title {
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 20px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--border);
}

/* ── Timeline entries ───────────────────────────────── */
.entry {
  display: grid;
  grid-template-columns: 130px 1fr;
  gap: 0 24px;
  padding: 16px 0;
  border-bottom: 1px solid var(--border);
}

.entry:last-child {
  border-bottom: none;
}

.entry-date {
  font-size: 0.8rem;
  color: var(--muted);
  padding-top: 3px;
  font-variant-numeric: tabular-nums;
}

.entry-body h3 {
  font-size: 1rem;
  font-weight: 600;
  line-height: 1.4;
  margin-bottom: 4px;
}

.entry-body p {
  font-size: 0.9rem;
  color: var(--muted);
}

.entry-body .tag {
  display: inline-block;
  background: var(--accent-light);
  color: var(--accent);
  font-size: 0.75rem;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 99px;
  margin-top: 6px;
}

/* ── Publication ────────────────────────────────────── */
.publication {
  padding: 20px 0;
  border-bottom: 1px solid var(--border);
}

.publication:last-child {
  border-bottom: none;
}

.publication p {
  font-size: 0.925rem;
  line-height: 1.65;
  margin-bottom: 8px;
}

.pub-doi {
  font-size: 0.8rem;
  color: var(--muted);
}

/* ── Skills ─────────────────────────────────────────── */
.skills-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0;
}

.skill-entry {
  display: grid;
  grid-template-columns: 130px 1fr;
  gap: 0 24px;
  padding: 16px 0;
  border-bottom: 1px solid var(--border);
}

.skill-entry:last-child {
  border-bottom: none;
}

.skill-label {
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--accent);
  padding-top: 3px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.skill-desc {
  font-size: 0.9rem;
  color: var(--text);
  line-height: 1.65;
}

/* ── Footer ─────────────────────────────────────────── */
footer {
  border-top: 1px solid var(--border);
  background: var(--surface);
  padding: 24px 0;
  text-align: center;
  font-size: 0.8rem;
  color: var(--muted);
}

/* ── Responsive ─────────────────────────────────────── */
@media (max-width: 600px) {
  header h1 {
    font-size: 1.75rem;
  }

  .header-top {
    flex-direction: column;
  }

  .entry,
  .skill-entry {
    grid-template-columns: 1fr;
    gap: 4px;
  }

  .entry-date {
    font-size: 0.75rem;
  }
}
