:root {
  --bg: #ffffff;
  --surface: #ffffff;
  --surface-alt: #f7f8fa;
  --text: #172536;
  --muted: #4f6071;
  --muted-2: #6b7785;
  --line: #d9dee5;
  --link: #1b63b7;
  --link-hover: #164f92;
  --code-bg: #f7f7f7;
  --code-line: #e2e6eb;
}

[data-theme='dark'] {
  --bg: #0b0b0c;
  --surface: #0b0b0c;
  --surface-alt: #151618;
  --text: #e7edf5;
  --muted: #b2bfce;
  --muted-2: #93a3b8;
  --line: #2a2c31;
  --link: #8cbcff;
  --link-hover: #b3d0ff;
  --code-bg: #17191d;
  --code-line: #2a2c31;
}

body {
  font-family: Roboto, sans-serif;
  font-size: 16px;
  background-color: var(--bg);
  color: var(--muted);
}

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

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

.container {
  width: 760px !important;
  max-width: calc(100% - 120px) !important;
}

.site-nav-wrap,
.home-top {
  background: var(--surface);
}

.site-nav,
.home-masthead {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 24px;
  padding: 26px 0 18px;
  border-bottom: 1px solid var(--line);
}

.site-title a,
.home-name {
  color: var(--text);
  font-size: 2.08rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.05;
}

.home-role {
  margin-top: 10px;
  font-size: 1.02rem;
  color: var(--muted-2);
  line-height: 1.35;
}

.site-menu,
.home-menu {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 18px;
  padding-top: 8px;
}

.site-menu a,
.home-menu a {
  color: var(--text);
  font-size: 1rem;
  font-weight: 400;
}

.theme-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0;
  margin-left: 0;
  margin-right: 0;
  padding: 2px 4px;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: var(--text);
  font-size: 1rem;
  line-height: 1;
  vertical-align: middle;
}

.theme-toggle:hover {
  background: transparent;
}

.theme-toggle i {
  color: var(--muted-2);
}

.hero-intro {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 180px;
  align-items: center;
  column-gap: 40px;
  padding: 56px 0 8px;
}

.hero-copy {
  max-width: 410px;
}

.hero-text {
  margin: 0;
  font-size: 1.02rem;
  line-height: 1.68;
  color: var(--text);
}

.hero-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 22px;
}

.hero-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 112px;
  gap: 14px;
  padding: 9px 16px;
  color: var(--text);
  font-size: 0.95rem;
  font-weight: 400;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 10px;
}

.hero-button:hover {
  background: var(--surface-alt);
  text-decoration: none;
}

.hero-button i {
  font-size: 0.9rem;
  line-height: 1;
  color: var(--muted-2);
}

.hero-visual {
  display: flex;
  justify-content: flex-start;
  align-items: flex-start;
  padding-top: 0;
  padding-left: 0;
}

#portrait {
  width: 180px !important;
  height: 180px !important;
  object-fit: cover;
  border-radius: 50%;
  position: relative;
  left: -40px;
  top: -42px;
}

.content-section,
.grouped-section,
.article-page {
  margin-top: 30px;
}

.first-section {
  margin-top: 52px;
}

.content-section h1,
.section-page-title {
  display: inline-block;
  color: var(--text);
  font-size: 1.28rem;
  font-weight: 500;
  line-height: 1.15;
  margin: 0 0 14px;
  padding-bottom: 4px;
  border-bottom: 2px solid var(--text);
}

.article-page .section-page-title {
  font-size: 1.62rem;
  font-weight: 500;
  line-height: 1.15;
}

.grouped-section h2 {
  color: var(--text);
  font-size: 1.05rem;
  font-weight: 500;
  margin: 24px 0 12px;
}

.content-section p,
.article-content p,
.article-content li,
.article-content ol,
.article-content ul {
  font-size: 1.02rem;
  line-height: 1.66;
}

.content-entry {
  padding: 18px 0 20px;
  border-bottom: 1px solid #d9dee5;
}

.entry-title {
  font-size: 1.12rem;
  line-height: 1.32;
  font-weight: 500;
  color: var(--text);
}

.entry-summary,
.entry-authors,
.entry-venue,
.entry-year,
.article-submeta,
.article-meta {
  color: var(--muted);
}

.entry-summary {
  margin-top: 8px;
  font-size: 1.02rem;
  line-height: 1.68;
}

.entry-authors,
.entry-venue,
.entry-year,
.article-submeta {
  margin-top: 8px;
  font-size: 0.9rem;
}

.article-page .article-submeta,
.article-page .article-meta {
  font-size: 0.9rem;
}

.entry-venue {
  white-space: nowrap;
}

.entry-venue a {
  display: inline;
}

.entry-links,
.article-links {
  margin-top: 10px;
  font-size: 0.98rem;
}

.entry-links a,
.article-links a {
  color: var(--link);
}

.article-meta {
  margin-bottom: 14px;
  font-size: 0.95rem;
}

.article-content h2 {
  margin: 34px 0 14px;
  color: var(--text);
  font-size: 1.7rem;
  font-weight: 400;
}

.article-content h3 {
  margin: 26px 0 12px;
  color: var(--text);
  font-size: 1.25rem;
  font-weight: 500;
}

.article-page .article-content p,
.article-page .article-content li,
.article-page .article-content ol,
.article-page .article-content ul {
  font-size: 1.02rem;
  line-height: 1.66;
}

.article-content h5 {
  margin: 22px 0 8px;
  color: var(--text);
  font-size: 1rem;
  font-weight: 700;
}

.article-content pre {
  background: var(--code-bg);
  border: 1px solid var(--code-line);
  border-radius: 6px;
  padding: 14px 16px;
  overflow-x: auto;
}

.article-content code {
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", Menlo, monospace;
  font-size: 0.95em;
}

.article-content figure {
  margin: 24px 0;
}

.article-content figcaption {
  margin-top: 10px;
  text-align: center;
  color: var(--muted);
  font-size: 0.95rem;
}

.article-content iframe {
  width: 100%;
  aspect-ratio: 16 / 9;
  border: 0;
}

.video-wrap {
  margin: 20px 0;
}

.article-content ul,
.article-content ol {
  padding-left: 20px;
}

.article-content hr {
  margin: 24px 0;
  border: 0;
  border-top: 1px solid var(--line);
}

@media (max-width: 991px) {
  .container {
    width: auto !important;
    max-width: calc(100% - 40px) !important;
  }

  .site-nav,
  .home-masthead,
  .hero-intro {
    display: block;
  }

  .site-menu,
  .home-menu {
    margin-top: 16px;
    padding-top: 0;
  }

  .hero-intro {
    padding-top: 42px;
  }

  .hero-visual {
    justify-content: flex-start;
    margin-top: 28px;
  }

  #portrait {
    width: 155px !important;
    height: 155px !important;
  }
}

@media (max-width: 640px) {
  .container {
    max-width: calc(100% - 28px) !important;
  }

  .site-nav,
  .home-masthead {
    padding: 18px 0 14px;
  }

  .site-title a,
  .home-name {
    font-size: 1.72rem;
  }

  .home-role {
    font-size: 0.94rem;
  }

  .site-menu,
  .home-menu {
    gap: 12px;
    margin-top: 12px;
  }

  .site-menu a,
  .home-menu a {
    font-size: 0.94rem;
  }

  .hero-intro {
    padding-top: 30px;
  }

  .hero-text {
    font-size: 1rem;
    line-height: 1.62;
  }

  .hero-buttons {
    gap: 10px;
    margin-top: 18px;
  }

  .hero-button {
    min-width: 0;
    padding: 8px 14px;
    font-size: 0.94rem;
    gap: 10px;
  }

  .hero-visual {
    justify-content: center;
    margin-top: 20px;
  }

  #portrait {
    width: 145px !important;
    height: 145px !important;
    left: 0;
    top: 0;
  }
}
