/* =============================================
   Libertinus Sans — loaded via jsDelivr CDN
   ============================================= */
@font-face {
  font-family: 'Libertinus Sans';
  src: url('https://cdn.jsdelivr.net/gh/alerque/libertinus@7.040/files/LibertinusSans-Regular.woff2') format('woff2');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'Libertinus Sans';
  src: url('https://cdn.jsdelivr.net/gh/alerque/libertinus@7.040/files/LibertinusSans-Italic.woff2') format('woff2');
  font-weight: 400;
  font-style: italic;
  font-display: swap;
}

@font-face {
  font-family: 'Libertinus Sans';
  src: url('https://cdn.jsdelivr.net/gh/alerque/libertinus@7.040/files/LibertinusSans-Bold.woff2') format('woff2');
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

/* =============================================
   Color palette
   ============================================= */
:root {
  --bg:       #FAF7F2;
  --text:     #2C2416;
  --accent:   #8B5E3C;
  --muted:    #7A6A55;
  --border:   #E8DFD0;
  --left-w:   38.2vw;
}

/* =============================================
   Reset & base
   ============================================= */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html, body {
  height: 100%;
  overflow: hidden;
}

body {
  font-family: 'Libertinus Sans', Georgia, serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.7;
  font-size: 24px;
}

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

a:hover {
  text-decoration: underline;
}

/* =============================================
   Left panel — position: fixed, never scrolls
   ============================================= */
.left-panel {
  position: fixed;
  top: 0;
  left: 0;
  width: var(--left-w);
  height: 100vh;
  padding: 3rem 2.5rem;
  background: #F2EBE0;
  overflow: hidden;

  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  gap: 1rem;
}

.site-name {
  font-size: 1.6rem;
  font-weight: 700;
  line-height: 1.2;
  color: #111;
  border-bottom: 2px solid #111;
  padding-bottom: 0.4rem;
  flex-shrink: 0;
}

.about-photo {
  width: 240px;
  height: 240px;
  border-radius: 24px;
  object-fit: cover;
  object-position: top;
  border: 1px solid var(--border);
  flex-shrink: 0;
}

.about-bio {
  font-size: 0.95rem;
  color: var(--muted);
  line-height: 1.6;
  flex-shrink: 0;
  margin-top: 1.25rem;
}

.left-links {
  font-size: 0.95rem;
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.3rem;
}

/* =============================================
   Right panel — scrollable, offset by left width
   ============================================= */
.right-panel {
  margin-left: var(--left-w);
  height: 100vh;
  overflow-y: auto;
  overflow-x: hidden;
  padding: 3rem 3.5rem 4rem;
  min-width: 0;
  display: flex;
  flex-direction: column;
}

.right-inner {
  margin-block: auto;
}

.right-panel::-webkit-scrollbar { width: 4px; }
.right-panel::-webkit-scrollbar-track { background: transparent; }
.right-panel::-webkit-scrollbar-thumb { background: var(--border); border-radius: 2px; }

/* =============================================
   Section structure
   ============================================= */
section {
  margin-bottom: 2.75rem;
  max-width: 560px;
}

.section-title {
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 1.25rem;
  padding-bottom: 0.4rem;
  border-bottom: 1px solid var(--border);
}

/* =============================================
   Paper entries
   ============================================= */
.paper-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.paper-entry {
  padding-bottom: 0;
}

.paper-title {
  font-weight: 700;
  font-size: 1rem;
  margin-bottom: 0.2rem;
  line-height: 1.4;
}

.paper-meta {
  font-size: 0.92rem;
  color: var(--muted);
  margin-bottom: 0.45rem;
}

.paper-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0 1rem;
  margin-bottom: 0.4rem;
  font-size: 0.92rem;
}

.abstract-toggle {
  background: none;
  border: none;
  cursor: pointer;
  color: var(--muted);
  font-family: inherit;
  font-size: 0.92rem;
  padding: 0;
  letter-spacing: 0.01em;
}

.abstract-toggle:hover {
  color: var(--accent);
}

.abstract-body {
  display: none;
  margin-top: 0.5rem;
  font-size: 0.93rem;
  color: var(--muted);
  line-height: 1.65;
  padding-left: 0.75rem;
  border-left: 2px solid var(--border);
}

.abstract-body.open {
  display: block;
}

/* =============================================
   Works in progress
   ============================================= */
.wip-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.wip-entry {
  font-size: 1rem;
}

.wip-title {
  font-weight: 700;
}

.wip-desc {
  color: var(--muted);
  font-size: 0.93rem;
}

/* =============================================
   Responsive — stack on small screens
   ============================================= */
@media (max-width: 700px) {
  html, body {
    overflow: auto;
    height: auto;
  }

  .left-panel {
    position: static;
    width: 100%;
    height: auto;
    overflow: visible;
    border-bottom: 1px solid var(--border);
    padding: 2rem 1.5rem 1.5rem;
  }

  .about-photo {
    width: 100px;
    height: 100px;
  }

  .right-panel {
    margin-left: 0;
    height: auto;
    overflow: visible;
    padding: 2rem 1.5rem 3rem;
  }
}
