/* Minimal academic layout: clean typography, fast scan, low decoration */

*{ box-sizing:border-box; }
html{ scroll-behavior:smooth; }
body{ margin:0; }

:root{
  --bg:#ffffff;
  --text:#0b1220;
  --muted:#4b5563;
  --line:rgba(15,23,42,0.14);
  --accent:#1d4ed8;
  --panel:#ffffff;

  --sans: Inter, ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
  --serif: "Source Serif 4", ui-serif, Georgia, Cambria, "Times New Roman", Times, serif;
  --wrap: 1080px;
  --radius: 14px;
}

@media (prefers-color-scheme: dark){
  :root{
    --bg:#0b1220;
    --text:#eef2ff;
    --muted:#a5b4c4;
    --line:rgba(255,255,255,0.14);
    --accent:#60a5fa;
    --panel:#0f172a;
  }
}

body{
  font-family: var(--sans);
  color: var(--text);
  background: var(--bg);
  line-height: 1.65;
}

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

.skip-link{
  position:absolute;
  left:-9999px;
  top:10px;
  background: var(--panel);
  border: 1px solid var(--line);
  padding: 10px 12px;
  border-radius: 12px;
  z-index: 1000;
}
.skip-link:focus{ left: 16px; }

.wrap{
  width: min(var(--wrap), calc(100% - 40px));
  margin: 0 auto;
}

.topbar{
  position: sticky;
  top: 0;
  z-index: 50;
  background: color-mix(in srgb, var(--bg), transparent 5%);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(10px);
}

.topbar-inner{
  display:flex;
  align-items:center;
  justify-content:space-between;
  padding: 12px 0;
  gap: 16px;
}

.topbar-name{
  font-weight: 700;
  color: color-mix(in srgb, var(--text), transparent 8%);
}

.topbar-nav{
  display:flex;
  flex-wrap:wrap;
  gap: 10px;
  justify-content:flex-end;
}

.topbar-nav a{
  color: color-mix(in srgb, var(--text), transparent 12%);
  padding: 6px 10px;
  border-radius: 10px;
}

.topbar-nav a:hover{
  background: color-mix(in srgb, var(--panel), transparent 6%);
  border: 1px solid var(--line);
  padding: 5px 9px;
  text-decoration:none;
}

.topbar-cta{
  border: 1px solid var(--line);
  background: color-mix(in srgb, var(--panel), transparent 4%);
  font-weight: 650;
}

.layout{
  display:grid;
  grid-template-columns: 320px 1fr;
  gap: 34px;
  padding: 26px 0 60px;
}

.sidebar{
  position: sticky;
  top: 76px;
  align-self: start;
  border-right: 1px solid var(--line);
  padding-right: 22px;
}

.avatar{
  width: 100%;
  height: auto;
  border-radius: var(--radius);
  border: 1px solid var(--line);
}

.identity h1{
  font-family: var(--serif);
  font-size: 1.65rem;
  line-height: 1.2;
  margin: 14px 0 8px;
}

.tagline{
  margin: 0 0 12px;
  color: var(--muted);
}

.links{
  display:flex;
  flex-direction:column;
  gap: 8px;
  margin: 12px 0 14px;
}

.link{
  display:block;
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: color-mix(in srgb, var(--panel), transparent 3%);
  color: color-mix(in srgb, var(--text), transparent 10%);
  text-decoration:none;
}

.link:hover{
  border-color: color-mix(in srgb, var(--accent), transparent 55%);
  text-decoration:none;
}

.meta{
  margin: 14px 0 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: color-mix(in srgb, var(--panel), transparent 3%);
  padding: 10px 12px;
}

.meta-row{
  display:flex;
  justify-content:space-between;
  gap: 12px;
  padding: 8px 0;
  border-top: 1px solid var(--line);
  font-size: 0.95rem;
}
.meta-row:first-child{ border-top: none; }

.k{ color: var(--muted); font-weight: 600; }
.v{ color: color-mix(in srgb, var(--text), transparent 8%); font-weight: 650; }

.toc{
  display:flex;
  flex-direction:column;
  gap: 8px;
  margin: 10px 0 10px;
}

.toc a{
  color: color-mix(in srgb, var(--text), transparent 18%);
}

.fine{
  margin-top: 14px;
  color: var(--muted);
  font-size: 0.92rem;
}

.content{
  min-width: 0;
}

.section{
  padding: 6px 0 26px;
  border-bottom: 1px solid var(--line);
}

.section:last-child{
  border-bottom: none;
}

.section h2{
  font-family: var(--serif);
  margin: 0 0 10px;
  font-size: 1.35rem;
}

.item{
  padding: 14px 0;
  border-top: 1px solid var(--line);
}

.item:first-of-type{ border-top: none; }

.item h3{
  margin: 0 0 4px;
  font-size: 1.05rem;
}

.muted{
  color: var(--muted);
}

.callouts{
  display:grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-top: 14px;
}

.callout{
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: color-mix(in srgb, var(--panel), transparent 3%);
  padding: 12px 14px;
}

.callout-title{
  font-weight: 700;
  margin-bottom: 6px;
}

ul, ol{
  margin: 8px 0 0;
  padding-left: 18px;
}

li{ margin: 6px 0; }

.details{
  margin-top: 10px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 10px 12px;
  background: color-mix(in srgb, var(--panel), transparent 3%);
}

details > summary{
  cursor: pointer;
  font-weight: 650;
  color: color-mix(in srgb, var(--text), transparent 8%);
}

.pubs{
  margin: 10px 0 0;
  padding-left: 18px;
}

.pub-title{
  font-weight: 650;
}

.pub-links{
  margin-top: 4px;
  font-size: 0.95rem;
}

.footer{
  margin-top: 22px;
  padding-top: 14px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 0.95rem;
}

@media (max-width: 980px){
  .layout{
    grid-template-columns: 1fr;
  }
  .sidebar{
    position: static;
    border-right: none;
    padding-right: 0;
    border-bottom: 1px solid var(--line);
    padding-bottom: 18px;
  }
  .callouts{
    grid-template-columns: 1fr;
  }
}
