:root{
  --ink:#1a1a18;
  --muted:#4b4a45;

  /* Nature palette */
  --forest:#2f4a3c;
  --moss:#4f6b56;
  --sage:#7f9a86;
  --bark:#7b6b55;
  --ochre:#b08a42;
  --paper:#f6f2ea;

  --line:rgba(26,26,24,.18);
  --line2:rgba(26,26,24,.10);

  --radius:16px;
  --shadow: 0 10px 30px rgba(0,0,0,.08);

  --lib-full: var(--forest);
  --lib-part: var(--sage);
}

*{ box-sizing:border-box; }
html{ scroll-behavior:smooth; }
body{
  margin:0;
  font-family: Inter, system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
  color:var(--ink);
  background:
    linear-gradient(rgba(246,242,234,.88), rgba(246,242,234,.88)),
    url("assets/bg_full.jpg") center/cover fixed no-repeat;
}

h1,h2{
  font-family: Fraunces, Georgia, serif;
  letter-spacing:.2px;
  margin:0 0 10px 0;
}
h1{ font-size: clamp(2rem, 4vw, 3rem); }
h2{ font-size: clamp(1.6rem, 2.4vw, 2.2rem); }

p{ line-height:1.55; color:var(--muted); margin:0 0 12px 0; }

.site-header{
  position: sticky;
  top: 0;
  z-index: 1000;
  background: rgba(246,242,234,.78);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line2);
}
.nav-wrap{
  max-width: 1100px;
  margin: 0 auto;
  padding: 14px 18px;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
}
.brand{
  font-family: Fraunces, Georgia, serif;
  font-weight: 600;
  font-size: 1.1rem;
  color: var(--forest);
}
.nav{
  display:flex;
  align-items:center;
  gap: 14px;
  flex-wrap:wrap;
  justify-content:flex-end;
}
.nav a{
  color: var(--muted);
  text-decoration:none;
  font-weight: 500;
  font-size: .95rem;
  padding: 6px 8px;
  border-radius: 10px;
}

.nav a.btn{
  color: #fff;
}

.nav a:hover{ background: rgba(47,74,60,.08); color: var(--forest); }
.nav a.active:not(.btn){
  color: var(--forest);
  background: rgba(47,74,60,.10);
}

.btn{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  text-decoration:none;
  font-weight:600;
  border-radius: 12px;
  padding: 10px 14px;
  border: 1px solid transparent;
  color: #fff;
  background: var(--forest);
}
.btn:hover{ filter: brightness(.98); }
.btn.subtle{ background: var(--moss); }
.btn.outline{
  background: transparent;
  color: var(--forest);
  border-color: rgba(47,74,60,.35);
}

.section{
  max-width: 1100px;
  margin: 0 auto;
  padding: 36px 18px;
}
.hero .paper{
  padding: 26px 22px;
}
.paper{
  background: rgba(246,242,234,.92);
  border: 1px solid rgba(26,26,24,.10);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 22px;
}
.lede{ font-size: 1.05rem; }
.hero-actions{ display:flex; gap:10px; flex-wrap:wrap; margin-top: 8px; }

.section-head{
  display:flex;
  align-items:flex-end;
  justify-content:space-between;
  gap: 16px;
  flex-wrap:wrap;
  margin-bottom: 16px;
}

.section-head--banner{
  position: relative;
  padding: 18px 18px;
  border-radius: 16px;
  margin-bottom: 16px;
  border: 1px solid rgba(26,26,24,.08);
  background: 
    linear-gradient(rgba(246,242,234,.72), rgba(246,242,234,.72)),
    url("assets/Bottom-Tree-Banner.jpg") center/cover no-repeat;
}
.section-head--banner h2{
  margin: 0;
}

.hint{ max-width: 55ch; margin: 0; }

.track{
  position: relative;
  height: 42px;
  border-radius: 12px;
  background: rgba(255,255,255,.35);
  border: 1px solid rgba(26,26,24,.08);
  overflow:hidden;
}
.bar{
  position:absolute;
  top: 8px;
  height: 26px;
  border-radius: 10px;
  display:flex;
  align-items:center;
  padding: 0 10px;
  gap: 10px;
  cursor:pointer;
  white-space:nowrap;
  overflow:hidden;
  text-overflow:ellipsis;

  /* Option A: flat bars */
  box-shadow: none;
  border: 1px solid rgba(26,26,24,.12);
}
.bar span{
  color: rgba(255,255,255,.95);
  font-weight: 700;
  font-size: .95rem;
  position: absolute;
  left: 8px; 
  top: 50%;
  transform: translate(0, -50%);
  padding: 3px 8px; 
  border-radius: 10px;
  background: rgba(0,0,0,.18);
  white-space: nowrap;
  pointer-events: none;
}
.bar .dates{
  color: rgba(255,255,255,.85);
  font-weight: 600;
  font-size: .9rem;
}
.bar:focus-visible{
  outline: 3px solid rgba(176,138,66,.35);
  outline-offset: 2px;
}

/* Bar types */
.type-primary{ background: var(--forest); }
.type-concurrent{ background: var(--moss); }
.type-secondment{ background: var(--ochre); }
.type-early{ background: var(--sage); }
.type-transition{ background: var(--bark); }

.legend{
  display:flex;
  gap: 8px;
  flex-wrap:wrap;
  padding-top: 10px;
  border-top: 1px solid var(--line2);
}
.chip{
  border-radius: 999px;
  padding: 6px 10px;
  font-weight: 600;
  font-size: .85rem;
  border: 1px solid rgba(26,26,24,.10);
  background: rgba(255,255,255,.42);
  color: rgba(26,26,24,.78);
}
.chip-primary{ background: rgba(47,74,60,.10); }
.chip-concurrent{ background: rgba(79,107,86,.10); }
.chip-secondment{ background: rgba(176,138,66,.14); }
.chip-early{ background: rgba(127,154,134,.14); }
.chip-transition{ background: rgba(123,107,85,.14); }

.cards{
  margin-top: 18px;
  display:flex;
  flex-direction:column;
  gap: 10px;
}
.card{
  border: 1px solid rgba(26,26,24,.10);
  border-radius: 14px;
  background: rgba(255,255,255,.55);
  padding: 14px 14px;
}
.card-head{
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap: 12px;
}
.card-title{
  margin:0;
  font-weight: 800;
  color: rgba(26,26,24,.92);
}
.card-meta{
  color: rgba(26,26,24,.60);
  font-weight: 600;
  margin-top: 2px;
}
.toggle{
  background: transparent;
  border: 1px solid rgba(26,26,24,.18);
  color: rgba(26,26,24,.85);
  border-radius: 12px;
  padding: 8px 10px;
  cursor:pointer;
  font-weight: 700;
}
.toggle:hover{ background: rgba(47,74,60,.06); }
.details{
  margin-top: 10px;
  display:none;
}
.details.open{ display:block; }
ul{ margin: 8px 0 0 18px; color: rgba(26,26,24,.72); }
.fineprint{ font-size: .9rem; color: rgba(26,26,24,.55); }

.site-footer{
  padding: 24px 18px 40px;
  max-width: 1100px;
  margin: 0 auto;
}
.footer-inner{
  display:flex;
  justify-content:space-between;
  align-items:center;
  flex-wrap:wrap;
  gap: 12px;
  color: rgba(26,26,24,.70);
}
.footer-inner a{ color: var(--forest); text-decoration:none; font-weight:700; }
.footer-inner a:hover{ text-decoration:underline; }

.subhead{
  margin: 0 0 10px 0;
  font-family: Inter, system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
  font-size: 1.05rem;
  font-weight: 800;
  color: rgba(26,26,24,.88);
}

/* Librarian split segments */
.bar.kind-part{
  background: var(--sage);
}

.bar.kind-full{
  background: var(--forest);
}

/* Wrapper that does NOT scroll (so arrows stay visible) */
.timeline-shell{
  position: relative;
}

/* The timeline is the ONLY scroll container */
.timeline-scroll{
  max-width: 100%;
  overflow-x: auto;
  overflow-y: hidden;
  -webkit-overflow-scrolling: touch;

  /* room so bars aren't hidden under arrows */
  padding: 10px 56px;
}

/* Keep the wide inner area inside the scroller */
.timeline-inner{
  display: block;
  width: max-content;
  min-width: 1200px; /* fallback so it still feels like a timeline on wide screens */
}

/* Arrows always visible, pinned to wrapper */
.scroll-arrow{
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 50;

  width: 42px;
  height: 42px;
  border-radius: 999px;
  border: 1px solid rgba(26,26,24,.18);
  background: rgba(246,242,234,.92);
  backdrop-filter: blur(6px);
  color: rgba(26,26,24,.85);
  font-size: 22px;
  font-weight: 900;
  cursor: pointer;

  display: grid;
  place-items: center;
}

.scroll-arrow.left{ left: 8px; }
.scroll-arrow.right{ right: 8px; }

/* Optional: keep them visible but “dim” at ends */
.scroll-arrow:disabled{
  opacity: .35;
  cursor: default;
}

/* Make the timeline inner area act like a two-column grid */
.gantt-wrap{
  --label-col: 240px;
}

/* The axis itself becomes the right-hand “time” area */
#timeAxis{
  position: relative;
  height: 44px;
  border-bottom: 1px solid var(--line2);
  background: rgba(255,255,255,.20);
  border-radius: 12px;
  overflow: visible;
  margin-bottom: 0;
}

/* Keep your month grid, but make it fill the taller axis */
#timeAxis .month-grid{
  overflow: hidden;
  border-radius: 12px;
}

/* Year labels should be positioned inside the axis bar */
#timeAxis .year-label{
  position: absolute;
  top: 4px;
  font-weight: 800;
  font-size: 1.0rem;
  color: rgba(26,26,24,.70);
  white-space: nowrap;
}

/* Make sure axis labels are visible and layered above the grid */
#timeAxis .month-grid { z-index: 0; }
#timeAxis .year-label { z-index: 2; }
#timeAxis .month-label { z-index: 1; }

#timeAxis .month-label{
  position: absolute;
  top: 24px;
  transform: translateX(-50%);
  font-weight: 700;
  font-size: .85rem;
  color: rgba(26,26,24,.55);
  white-space: nowrap;
}

@media (max-width: 860px){
  .nav{
    display:none;
    width: 100%;
    flex-direction: column;
    align-items: flex-start;
    gap: 6px;
    padding-top: 10px;
  }

  .nav.is-open{
    display:flex;
  }

  .nav-wrap{
    align-items:flex-start;
    flex-wrap:wrap;
  }
}

/* Visually-hidden helper */
.sr-only{
  position:absolute;
  width:1px; height:1px;
  padding:0; margin:-1px;
  overflow:hidden;
  clip:rect(0,0,0,0);
  white-space:nowrap;
  border:0;
}

/* Toggle button style */
.nav-toggle{
  display:none; /* shown only on mobile */
  border: 1px solid rgba(26,26,24,.18);
  background: rgba(246,242,234,.92);
  border-radius: 12px;
  padding: 10px 12px;
  font-size: 18px;
  font-weight: 900;
  color: rgba(26,26,24,.85);
}

/* Mobile layout */
@media (max-width: 860px){
  .nav-toggle{ display:inline-flex; align-items:center; justify-content:center; }
}

.hero-paper{
  position: relative;
  overflow: hidden;
}

.hero-banner{
  height: 140px;
  border-radius: 14px;
  margin-bottom: 14px;
  background: url("assets/Long-Tree-Banner.jpeg") center/cover no-repeat;
  filter: saturate(.95) contrast(.95);
  opacity: .9;
  border: 1px solid rgba(26,26,24,.10);
}

body{
  position: relative;
}

/* Soft side accents */
body::before,
body::after{
  content:"";
  position: fixed;
  top: 90px;          /* below header */
  bottom: 40px;
  width: 220px;
  pointer-events: none;
  opacity: .10;
  filter: grayscale(10%) contrast(.95);
  z-index: 0;
}

body::before{
  left: 0;
  background: url("assets/Left-Side-Tree.jpg") left center/contain no-repeat;
}

body::after{
  right: 0;
  background: url("assets/Right-Side-Tree.jpg") right center/contain no-repeat;
}

/* Keep your content above the decorative images */
.section,
.site-footer{
  position: relative;
  z-index: 1;
}

/* On small screens, remove side images */
@media (max-width: 900px){
  body::before,
  body::after{ display:none; }
}

.section-divider{
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 18px 10px;
}

.section-divider::before{
  content:"";
  display:block;
  height: 110px;
  border-radius: 16px;
  background: url("assets/Bottom-Tree-Banner.jpg") center/cover no-repeat;
  opacity: .35;
  border: 1px solid rgba(26,26,24,.08);
}

.section-head{
  position: relative;
}

.section-badge{
  width: 72px;
  height: 72px;
  border-radius: 16px;
  background: url("assets/Small-Tree-Feature.jpg") center/cover no-repeat;
  border: 1px solid rgba(26,26,24,.10);
  box-shadow: 0 10px 30px rgba(0,0,0,.06);
}

.card--experience{
  display: grid;
  grid-template-columns: 84px 1fr;
  gap: 12px;
  align-items: start;
}

.card--experience .card-media{
  width: 72px;
  height: 72px;
  border-radius: 16px;
  background: url("assets/Small-Tree-Feature.jpg") center/cover no-repeat;
  border: 1px solid rgba(26,26,24,.10);
  box-shadow: 0 10px 30px rgba(0,0,0,.06);
}

.card--experience .card-body{
  min-width: 0;
}

@media (max-width: 560px){
  .card--experience{
    grid-template-columns: 1fr;
  }
  .card--experience .card-media{
    width: 100%;
    height: 120px;
    border-radius: 14px;
  }
}

.about-section {
  background-color: #ffffff;
  padding: 1.5rem;
  border-radius: 8px;
  margin-bottom: 2rem;
  box-shadow: 0 2px 6px rgba(0,0,0,0.1);
}

#passwordOverlay {
  position: fixed;
  inset: 0;
  background: #f5f5f5;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
}

.password-box {
  background: white;
  padding: 2rem;
  max-width: 400px;
  text-align: center;
  border-radius: 12px;
  box-shadow: 0 10px 30px rgba(0,0,0,0.15);
}

.password-box input {
  padding: 0.5rem;
  width: 100%;
  margin-top: 1rem;
}

.password-box button {
  margin-top: 1rem;
}
