#import "data/config.typ": *
#import "data/theme.typ": *
#import "data/layout.typ": *

#set page(
  paper: "a4",
  margin: page-margin,
  fill: color-page,
  foreground: page-corners-layer(),
)

#set text(
  font: body-font,
  size: size-body,
  weight: "regular",
  fill: color-body,
  lang: "zh",
)

#set par(leading: leading-body, spacing: space-none, justify: true)

#let sidebar-content = [
  #section-title("联系", sidebar: true, above: space-none)
  #contact-block()
  #sidebar-section-divider()

  #section-title("教育", sidebar: true)
  #education-block(show-notes: true)
  #sidebar-section-divider()

  #section-title("技能", sidebar: true)
  #skills-section-block()
]

#let main-content = [
  #if research != "" [
    #section-title("研究经历", above: space-none)
    #research-block()
  ]

  #section-title("工作经历", above: if research != "" { auto } else { space-none })
  #experiences-block()

  #section-title("项目经历")
  #projects-block()

  #if publications.len() > 0 [
    #section-title("代表性成果")
    #publications-block()
  ]

  #if awards.len() > 0 [
    #section-title("获奖经历")
    #awards-block()
  ]
]

#hero-section()
#header-divider()

#grid(
  columns: (sidebar-column, stroke-divider-column, main-column),
  column-gutter: (space-column-gap, space-column-gap),
  align: (top, top, top),
  [#box(width: 100%)[#sidebar-content]],
  line(length: 100%, stroke: stroke-divider-sidebar),
  main-content,
)
