:root{
  --bg: #EEF0EC;
  --ink: #1C232C;
  --ink-soft: #4B5460;
  --rule: #CBD0C6;
  --accent: #3A4F78;
  --mark: #B4862E;
  --serif: 'Newsreader', serif;
  --sans: 'IBM Plex Sans', sans-serif;
  --nav-bg: rgba(238,240,236,0.92);
}
:root[data-theme="dark"]{
  --bg: #14171C;
  --ink: #ECEAE2;
  --ink-soft: #AEB3A8;
  --rule: #2C3138;
  --accent: #8FA3C7;
  --mark: #D9AE5F;
  --nav-bg: rgba(20,23,28,0.92);
}

.theme-toggle{
  font-family: var(--sans);
  font-size: 13px;
  color: var(--ink-soft);
  background: none;
  border: 1px solid var(--rule);
  border-radius: 14px;
  padding: 4px 12px;
  cursor: pointer;
  flex: none;
  white-space: nowrap;
}
.theme-toggle:hover{ color: var(--ink); border-color: var(--rule); }

html{ scroll-behavior: smooth; }

*{ box-sizing: border-box; }
body{
  margin:0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}
::selection{ background: var(--accent); color: var(--bg); }
a{ color: var(--accent); text-decoration-color: #9AA6B8; text-underline-offset: 3px; }
a:hover{ color: var(--mark); }

.site-nav{
  position: sticky;
  top: 0;
  z-index: 10;
  background: var(--nav-bg);
  backdrop-filter: blur(6px);
  border-bottom: 1px solid var(--rule);
}
.site-nav-inner{
  max-width: 600px;
  margin: 0 auto;
  padding: 14px 28px;
  display: flex;
  align-items: center;
  gap: 18px;
}
.nav-links{
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 6px 18px;
  flex: 1 1 auto;
}
.site-nav a{
  color: var(--ink-soft);
  text-decoration: none;
  font-size: 14px;
  padding: 2px 0;
  border-bottom: 1px solid transparent;
}
.site-nav a:hover{
  color: var(--ink);
  border-bottom-color: var(--mark);
}

.wrap{
  max-width: 720px;
  margin: 0 auto;
  padding: 90px 28px 100px;
}

h1{
  font-family: var(--serif);
  font-weight: 500;
  font-size: 26px;
  margin: 0;
}
.header-left{
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 20px;
}
.dag-icon{
  width: 40px;
  height: 40px;
  flex-shrink: 0;
}
.dag-icon .dag-accent{ stroke: var(--accent); }
.dag-icon .dag-mark{ stroke: var(--mark); }
.avatar{
  display: block;
  float: right;
  height: 230px;
  width: auto;
  border-radius: 6px;
  margin: 0 0 16px 24px;
}
.avatar-placeholder{
  display: flex;
  align-items: center;
  justify-content: center;
  background: #DADFD5;
  border: 1px solid var(--rule);
  color: var(--ink-soft);
  font-family: var(--serif);
  font-size: 40px;
  letter-spacing: 0.02em;
}

p{ margin: 0 0 18px; }

h2{
  font-family: var(--serif);
  font-weight: 500;
  font-size: 21px;
  margin: 44px 0 16px;
  clear: both;
  scroll-margin-top: 70px;
}

ul.pubs{
  list-style: none;
  margin: 0;
  padding: 0;
}
ul.pubs li{
  margin-bottom: 20px;
  font-size: 15.5px;
}
ul.pubs b{ font-weight: 600; }
ul.pubs .venue{
  display: block;
  color: var(--ink-soft);
  font-style: italic;
  font-family: var(--serif);
  margin-top: 2px;
}
ul.pubs .links{
  font-size: 13px;
  color: var(--ink-soft);
}
ul.pubs .links a{ margin-right: 10px; }
.tag-best{
  color: var(--mark);
  font-style: normal;
  font-family: var(--sans);
  font-weight: 600;
  font-size: 12px;
}

ul.news-list{
  list-style: none;
  margin: 0;
  padding: 0;
}
ul.news-list li{
  margin-bottom: 12px;
  padding-left: 62px;
  position: relative;
  font-size: 15px;
  color: var(--ink);
}
ul.news-list .date{
  position: absolute;
  left: 0;
  color: var(--mark);
  font-size: 13px;
  font-weight: 600;
}
ul.news-list .is-new .date{
  position: static;
  margin-right: 6px;
}
.new-flag{
  display: inline-block;
  background: var(--mark);
  color: var(--bg);
  font-family: var(--sans);
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  padding: 2px 6px;
  border-radius: 3px;
  position: absolute;
  left: 0;
}

ul.courses{
  list-style: none;
  margin: 0;
  padding: 0;
}
ul.courses li{
  padding: 10px 0;
  border-bottom: 1px solid var(--rule);
  font-size: 15px;
}
ul.courses li:first-child{ padding-top: 0; }
.course-name{
  display: block;
  font-weight: 600;
}
.course-meta{
  display: block;
  color: var(--ink-soft);
  font-size: 13.5px;
  margin-top: 2px;
}

.see-more{
  display: inline-block;
  background: none;
  border: none;
  padding: 0;
  margin: 10px 0 0;
  font-family: var(--sans);
  font-size: 14px;
  font-weight: 600;
  color: var(--accent);
  cursor: pointer;
}
.see-more:hover{ color: var(--mark); }

.limit-8 li:nth-child(n+9){ display: none; }
.limit-8.expanded li{ display: list-item; }
.limit-6 li:nth-child(n+7){ display: none; }
.limit-6.expanded li{ display: list-item; }
.limit-5 li:nth-child(n+7){ display: none; }
.limit-5.expanded li{ display: list-item; }
.limit-4 li:nth-child(n+5){ display: none; }
.limit-4.expanded li{ display: list-item; }

.pub-title{
  display: block;
  font-weight: 600;
  margin-bottom: 2px;
}
.pub-authors{
  display: block;
  color: var(--ink);
  margin-bottom: 2px;
}
.pub-venue{
  color: var(--ink-soft);
  font-size: 14px;
}

.contact-line{
  color: var(--ink-soft);
}

.social{
  display: flex;
  gap: 16px;
  margin-top: 4px;
}
.social a{
  color: var(--ink-soft);
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.social a:hover{ color: var(--accent); }
.social svg{
  width: 34px;
  height: 34px;
  fill: currentColor;
}

footer{
  margin-top: 70px;
  padding-top: 20px;
  border-top: 1px solid var(--rule);
  font-size: 13px;
  color: var(--ink-soft);
}
