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

:root {
  --bg: #FBFBFE;
  --surface: #F4F5FB;
  --blue: #4A6CF7;
  --blue-soft: #E8ECFF;
  --blue-dim: #B0BFF8;
  --blue-ring: #4A6CF7;
  --text: #1C1D24;
  --text-mid: #4B4E5C;
  --text-light: #9598A6;
  --border: #E2E4EE;
}

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

body {
  font-family: 'Geist', system-ui, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.75;
  font-size: 15px;
  -webkit-font-smoothing: antialiased;
}

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

/* ── Layout ── */
.wrap {
  max-width: 560px;
  margin: 0 auto;
  padding: 0 28px;
}

/* ── Nav (simple top links) ── */
.site-nav {
  padding: 100px 0 0;
  text-align: center;
  font-size: 0.82rem;
  color: var(--text-light);
}

.site-nav a {
  color: var(--text-mid);
  margin: 0 10px;
  transition: color 0.15s;
}

.site-nav a:hover { color: var(--blue); text-decoration: none; }
.site-nav a.active { color: var(--blue); }

.site-nav .sep {
  color: var(--border);
  user-select: none;
}

/* ── Profile header (home) ── */
.profile {
  text-align: center;
  padding: 48px 0 56px;
}

.profile-photo {
  width: 110px;
  height: 110px;
  border-radius: 50%;
  object-fit: cover;
  border: 3px solid var(--blue-ring);
  margin-bottom: 28px;
}

.profile h1 {
  font-family: 'Instrument Serif', serif;
  font-size: 2rem;
  font-weight: 400;
  letter-spacing: 0.04em;
  margin-bottom: 12px;
}

.profile-links {
  font-size: 0.85rem;
  margin-bottom: 8px;
}

.profile-links a {
  color: var(--text-mid);
  margin: 0 6px;
}

.profile-links a:hover { color: var(--blue); }

.profile-links .dot {
  color: var(--border);
  margin: 0 2px;
  user-select: none;
}

.profile-id {
  font-size: 0.78rem;
  color: var(--text-light);
  font-family: 'Geist Mono', 'SF Mono', monospace;
}

/* ── Bio text ── */
.bio {
  text-align: center;
  padding: 0 0 48px;
  border-bottom: 1px solid var(--border);
}

.bio p {
  font-family: 'Instrument Serif', serif;
  font-size: 1.12rem;
  line-height: 1.7;
  color: var(--text);
  max-width: 480px;
  margin: 0 auto 16px;
}

.bio .email {
  font-family: 'Geist', system-ui, sans-serif;
  font-size: 0.9rem;
  color: var(--text-mid);
  margin-top: 24px;
}

.bio .email a { color: var(--blue); }

/* ── Section ── */
.section {
  padding: 48px 0;
  border-bottom: 1px solid var(--border);
}

.section:last-of-type {
  border-bottom: none;
  padding-bottom: 80px;
}

.section-title {
  font-family: 'Instrument Serif', serif;
  font-size: 1.3rem;
  font-weight: 400;
  text-align: center;
  margin-bottom: 28px;
  letter-spacing: 0.01em;
}

.section p {
  color: var(--text-mid);
  margin-bottom: 12px;
}

/* ── Skills (inline) ── */
.skills-inline {
  text-align: center;
  color: var(--text-mid);
  font-size: 0.88rem;
}

.skills-inline span {
  display: inline;
}

.skills-inline .dot {
  color: var(--border);
  margin: 0 4px;
  user-select: none;
}

/* ── Project list ── */
.project-list-item {
  display: block;
  padding: 20px 0;
  border-top: 1px solid var(--border);
  text-decoration: none;
  transition: opacity 0.15s;
}

.project-list-item:hover { opacity: 0.7; text-decoration: none; }

.project-list-item h3 {
  font-size: 0.92rem;
  font-weight: 500;
  color: var(--text);
  margin-bottom: 3px;
}

.project-list-item p {
  font-size: 0.82rem;
  color: var(--text-mid);
  margin-bottom: 4px;
}

.project-list-item .tags {
  font-size: 0.73rem;
  color: var(--text-light);
}

/* ── Page header (subpages) ── */
.page-header {
  text-align: center;
  padding: 32px 0 48px;
}

.page-header h1 {
  font-family: 'Instrument Serif', serif;
  font-size: 1.8rem;
  font-weight: 400;
  letter-spacing: 0.02em;
  margin-bottom: 8px;
}

.page-header p {
  color: var(--text-mid);
  font-size: 0.9rem;
}

/* ── Photos ── */
.photo-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  padding-bottom: 80px;
}

.photo-card {
  border-radius: 8px;
  overflow: hidden;
  border: 1px solid var(--border);
  transition: border-color 0.2s, transform 0.2s;
}

.photo-card:hover {
  border-color: var(--blue-dim);
  transform: translateY(-2px);
}

.photo-card img {
  width: 100%;
  aspect-ratio: 4/3;
  object-fit: cover;
  display: block;
}

.photo-caption {
  padding: 12px 14px;
}

.photo-caption h3 {
  font-size: 0.82rem;
  font-weight: 500;
  margin-bottom: 2px;
}

.photo-caption p {
  font-size: 0.76rem;
  color: var(--text-mid);
  line-height: 1.5;
}

/* ── Blog ── */
.blog-list { padding-bottom: 80px; }

.blog-post {
  display: block;
  padding: 24px 0;
  border-top: 1px solid var(--border);
  text-decoration: none;
  transition: opacity 0.15s;
}

.blog-post:hover { opacity: 0.65; text-decoration: none; }

.blog-date {
  font-size: 0.73rem;
  color: var(--text-light);
  margin-bottom: 4px;
}

.blog-post h3 {
  font-family: 'Instrument Serif', serif;
  font-size: 1.1rem;
  font-weight: 400;
  color: var(--text);
  margin-bottom: 4px;
}

.blog-post p {
  font-size: 0.82rem;
  color: var(--text-mid);
}

/* ── CV items ── */
.cv-group { padding-bottom: 8px; }

.cv-group h2 {
  font-family: 'Instrument Serif', serif;
  font-size: 1.15rem;
  font-weight: 400;
  margin-bottom: 12px;
  margin-top: 36px;
}

.cv-entry {
  padding: 16px 0;
  border-top: 1px solid var(--border);
}

.cv-row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: 2px;
}

.cv-entry h3 { font-size: 0.9rem; font-weight: 500; }

.cv-entry .period {
  font-size: 0.75rem;
  color: var(--text-light);
  white-space: nowrap;
  margin-left: 16px;
}

.cv-entry .org {
  font-size: 0.82rem;
  color: var(--blue);
  margin-bottom: 3px;
}

.cv-entry p:last-child {
  font-size: 0.8rem;
  color: var(--text-mid);
}

/* ── Academic ── */
.ac-text {
  font-size: 0.9rem;
  color: var(--text-mid);
  line-height: 1.7;
  text-align: center;
  max-width: 480px;
  margin: 0 auto 12px;
}

.pub-entry {
  padding: 16px 0;
  border-top: 1px solid var(--border);
}

.pub-entry h3 {
  font-family: 'Instrument Serif', serif;
  font-size: 0.98rem;
  font-weight: 400;
  margin-bottom: 3px;
}

.pub-authors { font-size: 0.78rem; color: var(--text-mid); margin-bottom: 2px; }
.pub-venue { font-size: 0.73rem; color: var(--text-light); }

/* ── Footer ── */
footer {
  border-top: 1px solid var(--border);
  padding: 28px;
  text-align: center;
  font-size: 0.74rem;
  color: var(--text-light);
}

/* ── Mobile ── */
@media (max-width: 600px) {
  .site-nav { padding-top: 60px; }
  .profile h1 { font-size: 1.6rem; }
  .bio p { font-size: 1rem; }
  .photo-grid { grid-template-columns: 1fr; }
  .cv-row { flex-direction: column; gap: 1px; }
}
