:root{
  /* Tweak these */
  --accent: #a28b09;      /* link color - dark green theme */
  /* --accent: #622b10;      link color - dark green theme */
  --header-gray: #666;    /* subtitle + muted text */
  --maxw: 1200px;
  --header-bg: #f5f5f5;

  --base: 18px;
  --lh: 1.42;
}

*{ box-sizing:border-box; }
html{ scroll-behavior:smooth; }
html, body {
  width: 100%;
  overflow-x: hidden;
}
body{
  margin:0;
  padding:0;
  background: #fff;
  color:#111;
  font-family: "Linux Libertine", "Linux Libertine O", "Libertinus Serif", "Times New Roman", serif;
  font-size: var(--base);
  line-height: var(--lh);
  padding-top: 60px; /* Space for fixed header */
  position: relative;
}

/* Side panels with pattern background */
.decorative-line{
  position: fixed;
  top: 0;
  bottom: 0;
  width: calc((100% - var(--maxw)) / 2);
  min-width: 100px;
  background-image: url('../assets/img/bg-image.png');
  background-repeat: repeat;
  background-size: auto;
  z-index: -1;
  pointer-events: none;
  display: none; /* default hidden, only show on wide screens */
}
.decorative-line-left{
  left: 0;
  border-right: 2px solid #f4ebda;
}
.decorative-line-right{
  right: 0;
  border-left: 2px solid #f4ebda;
}

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

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

.page{
  max-width: min(var(--maxw), 100%);
  margin: 14px auto 28px;
  padding: 0 24px;
  box-sizing: border-box;
  position: relative;
  z-index: 1;
}

/* Top nav (fixed header) */
.topnav{
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  background: #f4ebda;
  border-bottom: 3px solid #f4ebda;
  font-size: 18px;
  z-index: 1000;
  max-width: 100%;
}
.topnav-inner{
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 12px 24px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.topnav-links{
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 12px;
}
.topnav a{ 
  color: #1a3d2e; 
}

/* About */
.titleline{
  display: flex;
  align-items: flex-start;
  gap: 24px;
  margin-bottom: 14px;
  width: 100%; /* Ensure full width of container */
}
.name-photo{
  display: flex;
  flex-direction: column;
  gap: 12px;
  width: 200px;
  flex-shrink: 0;
}
.titleline h1{
  margin: 0;
  font-size: 46px;
  font-weight: 700;
  letter-spacing: 0.2px;
  white-space: nowrap;
  color: #1a3d2e;
  line-height: 1.1;
}
.subtitle{
  margin: 0 0 10px 0;
  color: var(--header-gray);
  font-size: 20px;
}

.abouttext{
  flex: 1;
  margin-top: 0;
  padding-top: 62px; /* Align with photo: h1 height (~50px) + gap (12px) */
  align-self: flex-start;
}
.abouttext p{ margin: 8px 0; }
.contact{ margin-top: 12px; }
.trees{ margin: 8px 0 0; color:#333; }

.aboutimg{
  margin-top: 0;
}
.portrait{
  width: 200px;
  max-width: 100%;
  height: auto;
  display: block;
  border-radius: 8px;
}

/* Social links in header */
.topnav .socialLinks{
  display: flex;
  gap: 8px;
  align-items: center;
  flex-wrap: wrap;
}
.topnav .socialLink{
  color: #1a3d2e;
  text-decoration: none;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  flex-shrink: 0;
  transition: opacity 0.2s;
}
.topnav .socialLink:hover{
  opacity: 0.7;
  text-decoration: none;
}
.topnav .socialLink svg{
  width: 20px;
  height: 20px;
  display: block;
}

/* Note label styling */
.note-label{
  color: #d47304;
}

/* Sections */
.section{ 
  margin-top: 20px; 
  width: 100%; /* Ensure full width of container */
}
.sectionhead{
  display:flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}
h2{
  margin: 0 0 10px 0;
  font-size: 30px;
  font-weight: 700;
}

/* News: minimal, arrow to expand older items */
.newsToggle{
  border: none;
  background: transparent;
  cursor: pointer;
  padding: 8px 2px;
  line-height: 1;
  margin-top: 8px;
  display: block;
  margin-left: auto;
  margin-right: auto;
}
.newsToggle .chev{
  display:inline-block;
  font-size: 28px;
  color: #1a3d2e;
  transition: transform 120ms ease, color 120ms ease;
  transform: rotate(90deg);
}
.newsToggle[aria-expanded="true"] .chev{
  transform: rotate(180deg);
  color: #1a3d2e;
}
.newsList{
  list-style: none;
  padding: 0;
  margin: 0;
}
.newsList li{
  margin: 6px 0;
}
.newsDate{
  display:inline-block;
  min-width: 90px;
  color: var(--header-gray);
  font-variant-numeric: tabular-nums;
  margin-right: 10px;
  white-space: nowrap;
}

/* Publications */
.pubControls{
  margin: 0 0 14px 0;
  display:flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  width: 100%; /* Ensure full width of container */
}
.pubControlsLabel{ color: var(--header-gray); }
.pubControls input[type="search"]{
  width: min(420px, 100%);
  padding: 6px 8px;
  border: 1px solid #ddd;
  border-radius: 4px;
  font-family: inherit;
  font-size: 16px;
}
.pubControlsCheck{
  color: var(--header-gray);
  font-size: 16px;
}
.pubControlsNote{
  color: var(--header-gray);
  font-size: 16px;
  margin-left: 12px;
}
.pubYear{
  margin: 14px 0 0;
}
.pubYear h3{
  margin: 14px 0 8px;
  font-size: 22px;
  font-weight: 700;
}
.pub{
  display: grid;
  grid-template-columns: 180px 1fr;
  gap: 16px;
  margin: 0 0 14px 0;
  width: 100%; /* Ensure full width of container */
}
.pubMedia img{
  width: var(--w, 180px);
  max-width: 100%;
  height: auto;
  display:block;
}
.pubTitle{
  font-size: 20px;
  font-weight: 700;
  margin: 0 0 2px 0;
}
.pubAuthors{
  margin: 0 0 2px 0;
}
.authorHighlight{
  color: var(--accent);
}
.authorLink{
  color: #111;
  text-decoration: none;
  transition: color 0.2s;
}
.authorLink.authorHighlight{
  color: var(--accent);
}
.authorLink:hover{
  color: #1a3d2e;
  text-decoration: underline;
}
.authorLink.authorHighlight:hover{
  color: #1a3d2e;
  text-decoration: underline;
}
.pubVenue{
  margin: 0 0 6px 0;
  color: #333;
}
.pubLinks{
  margin: 0 0 6px 0;
  font-size: 18px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}
.pubLinks a{
  color: #1a3d2e;
  background-color: transparent;
  padding: 6px 14px;
  border: 2px solid #1a3d2e;
  border-radius: 4px;
  white-space: nowrap;
  transition: background-color 0.2s, color 0.2s;
  font-size: 18px;
  font-family: "Linux Libertine", "Linux Libertine O", "Libertinus Serif", "Times New Roman", serif;
}
.pubLinks a span{
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace;
}
.pubLinks a:hover{
  background-color: #1a3d2e;
  color: #fff;
  text-decoration: none;
}
.bibToggle{
  color: #1a3d2e;
  background-color: transparent;
  cursor: pointer;
  font-size: 18px;
  font-family: "Linux Libertine", "Linux Libertine O", "Libertinus Serif", "Times New Roman", serif;
  user-select: none;
  padding: 6px 14px;
  border: 2px solid #1a3d2e;
  border-radius: 4px;
  white-space: nowrap;
  transition: background-color 0.2s, color 0.2s;
  display: inline-block;
}
.bibToggle:hover{
  background-color: #1a3d2e;
  color: #fff;
}
.bib{
  display:none;
  margin-top: 6px;
  padding: 8px 10px;
  background: #fafafa;
  border: 1px solid #eee;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace;
  font-size: 13px;
  white-space: pre-wrap;
}

.hint{
  margin-top: 14px;
  color:#444;
  font-size: 16px;
}

.errors{ color:#b00020; margin-top:14px; }


/* Footer */
.footer{
  margin-top: 34px;
  padding-top: 14px;
  border-top: 1px solid #eee;
  display:flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  flex-wrap: wrap;
  color:#555;
  font-size: 15px;
}
.footTrees{
  display:flex;
  align-items:center;
  gap: 10px;
}
.footTrees img{ width: 24px; height: 24px; }

/* Mobile: Hide side panels on narrow screens */
@media (max-width: 900px) {
  :root{
    --base: 16px;
  }
  .titleline{
    flex-direction: column;
    gap: 18px;
  }
  .titleline h1{
    font-size: 36px;
    white-space: normal;
    line-height: 1.05;
  }
  .name-photo{
    width: 180px;
  }
  .abouttext{
    padding-top: 0;
  }
  .page{
    padding: 0 18px;
  }
}

@media (min-width: 1280px) {
  .decorative-line{
    display: block;
  }
}
