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

:root {
  --bg: #ffffff;
  --text: #111111;
  --muted: #666666;
  --border: #e5e5e5;
  --accent: #111111;
  --max-width: 680px;
  --font: -apple-system, BlinkMacSystemFont, 'Segoe UI', Helvetica, Arial, sans-serif;
}

body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; text-decoration: none; }
a:hover { text-decoration: underline; }

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

/* ── Header ── */
.site-header {
  padding: 48px 0 0;
  text-align: center;
}

.site-name {
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  display: inline-block;
  margin-bottom: 32px;
}

.site-name a:hover { text-decoration: none; }

/* ── Nav ── */
.site-nav {
  display: flex;
  justify-content: center;
  gap: 28px;
  margin-bottom: 40px;
  flex-wrap: wrap;
}

.site-nav a {
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
  transition: color 0.15s;
}

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

/* ── Homepage ── */
.home-photo {
  display: block;
  width: 120px;
  height: 120px;
  border-radius: 50%;
  object-fit: cover;
  margin: 0 auto 32px;
}

.home-bio {
  text-align: center;
  max-width: 520px;
  margin: 0 auto 32px;
}

.home-bio h1 {
  font-size: 22px;
  font-weight: 600;
  margin-bottom: 12px;
}

.home-bio p {
  color: var(--muted);
  font-size: 15px;
  line-height: 1.7;
  margin-bottom: 10px;
}

/* ── Social links ── */
.social-links {
  display: flex;
  justify-content: center;
  gap: 20px;
  margin-bottom: 64px;
  flex-wrap: wrap;
}

.social-links a {
  font-size: 13px;
  font-weight: 500;
  color: var(--muted);
  letter-spacing: 0.04em;
  transition: color 0.15s;
  display: flex;
  align-items: center;
  gap: 5px;
}

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

.social-links svg {
  width: 15px;
  height: 15px;
  fill: currentColor;
}

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

.section-title {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 32px;
}

/* ── Essay list ── */
.essay-list { list-style: none; }

.essay-item {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  padding: 20px 0;
  border-bottom: 1px solid var(--border);
  gap: 16px;
}

.essay-item:first-child { border-top: 1px solid var(--border); }

.essay-info { flex: 1; }

.essay-title {
  font-size: 15px;
  font-weight: 600;
  margin-bottom: 3px;
}

.essay-author {
  font-size: 13px;
  color: var(--muted);
}

.essay-read {
  font-size: 13px;
  font-weight: 500;
  color: var(--muted);
  white-space: nowrap;
  display: flex;
  align-items: center;
  gap: 4px;
  padding-top: 2px;
  flex-shrink: 0;
  transition: color 0.15s;
}

.essay-item:hover .essay-read { color: var(--text); }

/* ── Essays page group ── */
.essay-group { margin-bottom: 48px; }

.essay-group-title {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 4px;
}

/* ── Single page ── */
.page-content {
  padding: 48px 0 80px;
}

.page-content h1 {
  font-size: 24px;
  font-weight: 700;
  margin-bottom: 32px;
}

.page-content h3 {
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
  margin: 36px 0 12px;
}

.page-content p {
  font-size: 15px;
  line-height: 1.75;
  color: #333;
  margin-bottom: 16px;
}

.page-content ul {
  list-style: none;
  padding: 0;
}

.page-content ul li {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  padding: 14px 0;
  border-bottom: 1px solid var(--border);
  font-size: 15px;
  gap: 16px;
}

.page-content ul li:first-child { border-top: 1px solid var(--border); }

.page-content ul li a {
  font-weight: 500;
  flex: 1;
}

.page-content ul li a:hover { text-decoration: underline; }

.page-content ul li .essay-by {
  font-size: 13px;
  color: var(--muted);
  white-space: nowrap;
}

.page-content hr {
  border: none;
  border-top: 1px solid var(--border);
  margin: 32px 0;
}

/* ── Footer ── */
.site-footer {
  padding: 32px 0 48px;
  text-align: center;
  border-top: 1px solid var(--border);
}

.site-footer p {
  font-size: 12px;
  color: var(--muted);
}

/* ── Academic work ── */
.academic-item {
  padding: 24px 0;
  border-bottom: 1px solid var(--border);
}

.academic-item:first-child { border-top: 1px solid var(--border); }

.academic-label {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 6px;
}

.academic-title {
  font-size: 16px;
  font-weight: 600;
  margin-bottom: 10px;
}

.academic-abstract {
  font-size: 14px;
  line-height: 1.75;
  color: #444;
  margin-bottom: 16px;
}

.academic-refs-title {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 8px;
}

.academic-refs ol {
  padding-left: 20px;
  margin: 0;
}

.academic-refs ol li {
  font-size: 13px;
  line-height: 1.6;
  color: #555;
  margin-bottom: 4px;
}

/* ── Courses ── */
.courses-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 32px 40px;
}

.course-group-title {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 10px;
}

.course-group ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.course-group ul li {
  font-size: 13px;
  line-height: 1.6;
  color: #444;
  padding: 3px 0;
  border: none !important;
}

/* ── Responsive ── */
@media (max-width: 560px) {
  .site-header { padding-top: 32px; }
  .essay-item { flex-direction: column; gap: 8px; }
  .page-content ul li { flex-direction: column; gap: 2px; }
  .courses-grid { grid-template-columns: 1fr; gap: 24px; }
}

/* ── Reference-style homepage ── */
.site-header { padding: 32px 0 0; }
.site-nav { margin-bottom: 48px; gap: 24px; }
.site-nav a { font-size: 14px; letter-spacing: 0.02em; text-transform: none; }

.home { text-align: center; }
.home-photo { width: 160px; height: 160px; margin-bottom: 24px; }
.home-name { font-size: 40px; font-weight: 700; letter-spacing: -0.02em; line-height: 1.15; margin-bottom: 8px; }
.home-tagline { font-size: 17px; color: var(--muted); margin-bottom: 20px; }
.home-tagline .sep { margin: 0 8px; color: var(--border); }
.home .social-links { margin-bottom: 32px; }
.home-bio { text-align: left; max-width: none; margin-bottom: 48px; }
.home-bio p { font-size: 16px; color: var(--text); line-height: 1.75; margin-bottom: 14px; }

.link-blocks { text-align: left; border-top: 1px solid var(--border); margin-bottom: 64px; }
.link-block {
  position: relative;
  display: block;
  padding: 22px 40px 22px 0;
  border-bottom: 1px solid var(--border);
}
.link-block:hover { text-decoration: none; }
.link-block-title { font-size: 18px; font-weight: 600; margin-bottom: 4px; }
.link-block-desc { font-size: 15px; color: var(--muted); }
.link-block-arrow {
  position: absolute; right: 0; top: 50%;
  transform: translateY(-50%);
  font-size: 20px; color: var(--muted);
  transition: transform 0.15s, color 0.15s;
}
.link-block:hover .link-block-arrow { transform: translate(4px, -50%); color: var(--text); }

.footer-links { margin-top: 6px; }
.footer-links a { text-decoration: underline; }

@media (max-width: 560px) {
  .home-name { font-size: 32px; }
  .home-photo { width: 130px; height: 130px; }
}

@media (max-width: 560px) {
  .home .social-links { gap: 12px; flex-wrap: nowrap; }
  .home .social-links a { font-size: 12px; letter-spacing: 0; gap: 4px; }
}
