:root {
  --bg: #ffffff;
  --fg: #0d1117;
  --muted: #57606a;
  --card-border: rgba(13, 17, 23, 0.08);
  --accent: #1f6feb;
  --maxw: 760px;
  --padx: 20px;
}

* {
  box-sizing: border-box;
}

html,
body {
  height: 100%;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font: 16px/1.7 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica Neue, Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

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

a:hover {
  text-decoration: underline;
}

a:focus-visible {
  outline: 2px solid color-mix(in oklab, var(--accent) 70%, transparent);
  outline-offset: 3px;
  border-radius: 6px;
}

.accent-left {
  position: fixed;
  bottom: 20px;
  left: -20px;
  width: 260px;
  height: auto;
  pointer-events: none;
  z-index: 0;
  opacity: 0.18;
}

.accent-right {
  position: fixed;
  bottom: 20px;
  right: 0;
  width: 300px;
  height: auto;
  pointer-events: none;
  z-index: 0;
  opacity: 0.18;
}

.page {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 32px var(--padx) 80px;
  position: relative;
  z-index: 1;
}

header {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 12px;
  margin-bottom: 34px;
  padding: 18px 0 8px;
}

.site-title {
  margin: 0;
  color: var(--fg);
  font-family: Georgia, "Times New Roman", Times, serif;
  font-size: clamp(24px, 3vw, 34px);
  font-weight: 400;
  letter-spacing: -0.3px;
  line-height: 1.2;
}

.nav {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  font-size: 13px;
}

.nav a {
  color: var(--muted);
  border-bottom: 1px solid var(--card-border);
  transition: color 0.2s ease, border-color 0.2s ease;
}

.nav a:hover {
  color: var(--fg);
  border-color: var(--fg);
  text-decoration: none;
}

.nav .home-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border: 1px solid var(--card-border);
  border-radius: 50%;
}

.nav .home-link i {
  font-size: 16px;
  line-height: 1;
}

main {
  border-top: 1px solid var(--card-border);
  padding-top: 28px;
}

h1 {
  margin: 0 0 8px;
  font-family: Georgia, "Times New Roman", Times, serif;
  font-size: clamp(24px, 3vw, 34px);
  font-weight: 400;
  line-height: 1.3;
}

h2 {
  margin: 34px 0 14px;
  font-size: 14px;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--muted);
  font-weight: 400;
  font-family: -apple-system, BlinkMacSystemFont, Segoe UI, sans-serif;
}

.date {
  margin: 0 0 28px;
  color: var(--muted);
  font-size: 13px;
}

p {
  margin: 0 0 18px;
  color: var(--muted);
}

article p {
  color: var(--fg);
  font-size: 1.05rem;
  line-height: 1.8;
}

.math-block {
  margin: 24px 0 28px;
  overflow-x: auto;
  overflow-y: hidden;
  padding: 2px 0;
}

.math-block mjx-container {
  min-width: max-content;
}

.essay-list {
  list-style: none;
  margin: 24px 0 0;
  padding: 0;
}

.essay-list li {
  margin: 0 0 16px;
}

.essay-list a {
  font-size: 1.05rem;
}

.essay-list .essay-date {
  display: block;
  margin-top: 2px;
  color: var(--muted);
  font-size: 13px;
}

footer {
  border-top: 1px solid var(--card-border);
  margin-top: 42px;
  padding-top: 18px;
  color: var(--muted);
  font-size: 13px;
}

@media (max-width: 768px) {
  .accent-left {
    width: 180px;
    bottom: 10px;
    left: -30px;
    opacity: 0.14;
  }

  .accent-right {
    width: 200px;
    bottom: 10px;
    right: -20px;
    opacity: 0.14;
  }
}

@media (max-width: 480px) {
  .accent-left {
    width: 140px;
    bottom: 5px;
    left: -30px;
    opacity: 0.1;
  }

  .accent-right {
    width: 160px;
    bottom: 5px;
    right: -20px;
    opacity: 0.1;
  }

  .page {
    padding-top: 30px;
  }

  header {
    margin-bottom: 26px;
    padding-top: 8px;
  }
}
