:root{
  --bg:#faf7f2; --ink:#1f2329; --muted:#5f676f; --line:#ded6c8;
  --brand:#8b6a2b; --accent:#2a59c9; --panel:#fffcf6;
  --radius:12px; --shadow:0 10px 28px rgba(20,18,12,.08);
  --maxw:1200px;
}
*{box-sizing:border-box}
html,body{margin:0;height:100%;background:var(--bg);color:var(--ink)}
body{font:16px/1.65 Inter,system-ui,Segoe UI,Roboto,Arial,sans-serif}
a{color:var(--accent);text-decoration:none}
a:hover{text-decoration:underline}
img{max-width:100%;display:block;height:auto}
.wrap{max-width:var(--maxw);margin:auto;padding:0 24px}

/* HEADER + NAV */
.site-header{
  border-bottom:1px solid var(--line);
  background:linear-gradient(#fffdf9,#fffaf3);
  position:relative;
  z-index:40;
}
.bar{
  display:flex;
  align-items:center;
  justify-content:space-between;
  padding:18px 20px;
}
.brand{
  font-family:'Source Serif 4',serif;
  font-weight:800;
  font-size:22px;
  color:#2b2416;
}
.site-nav a{
  padding:8px 10px;
  border-radius:10px;
  color:var(--ink);
}
.site-nav a:hover{background:#00000007}

/* Hamburger button (hidden on desktop) */
.menu-toggle{
  display:none;
  border:none;
  background:transparent;
  padding:6px 8px;
  border-radius:10px;
  font-size:22px;
  line-height:1;
  cursor:pointer;
}
.menu-toggle:hover{
  background:#00000007;
}

/* Mobile nav behaviour */
@media (max-width:768px){
  .bar{
    gap:8px;
  }
  .site-nav{
    position:absolute;
    top:100%;
    right:24px;
    background:#fffefb;
    border:1px solid var(--line);
    border-radius:12px;
    box-shadow:var(--shadow);
    padding:8px 6px;
    display:none;
    flex-direction:column;
    min-width:160px;
  }
  .site-nav.is-open{
    display:flex;
  }
  .site-nav a{
    display:block;
    width:100%;
    text-align:left;
  }
  .menu-toggle{
    display:inline-flex;
    margin-left:auto;
  }
}

.site-footer{border-top:1px solid var(--line);margin-top:30px}
.foot{display:flex;justify-content:space-between;align-items:center;gap:12px;padding:16px 24px;color:#6a6d74}

/* Timeline page */
.jumper{
  position:sticky;
  top:8px;
  align-self:start;
  background:#fffefb;
  border:1px solid var(--line);
  border-radius:999px;
  box-shadow:var(--shadow);
  padding:6px 8px;
  display:flex;
  gap:8px;
  overflow:auto;
  scrollbar-width:none;           /* Firefox */
}
.jumper::-webkit-scrollbar{       /* WebKit */
  display:none;
}
.jumper a{
  flex:0 0 auto;
  padding:6px 12px;
  border-radius:999px;
  font-size:13px;
  color:#4a4336;
  background:#f3ece0;
  border:1px solid #e0d6c4;
  text-decoration:none;
  transition:background .15s ease, color .15s ease, transform .1s ease, box-shadow .15s ease;
}
.jumper a:hover{
  background:var(--accent);
  color:#fff;
  box-shadow:0 4px 10px rgba(0,0,0,.08);
  transform:translateY(-1px);
}

/* Vertical timeline layout */
.vtl{
  display:grid;
  grid-template-columns:120px 1fr;
  gap:18px;
  max-width:var(--maxw);
  margin:18px auto;
  padding:0 16px;
}
.year-pin{
  position:sticky;
  top:70px;
  align-self:start;
  font:800 26px 'Source Serif 4',serif;
  color:#614a1c;
}
.year-section{
  scroll-margin-top:60px;
}
.year-head{
  display:flex;
  align-items:end;
  justify-content:space-between;
  border-bottom:1px solid var(--line);
  padding:14px 6px 8px;
  margin-bottom:10px;
}
.year-head h2{
  font:800 24px 'Source Serif 4',serif;
  margin:0;
  color:#3b2f18;
}
.year-summary{
  color:var(--muted);
  margin:0 0 6px 0;
}
.stack{
  display:grid;
  gap:12px;
}
.block{
  border:1px solid var(--line);
  background:var(--panel);
  border-radius:12px;
  padding:12px;
  box-shadow:var(--shadow);
  display:grid;
  gap:6px;
}
.block .title{
  font:800 18px 'Source Serif 4',serif;
  color:#1f1c14;
}
.block .desc{
  color:#514b3d;
}
.block .meta{
  font-size:12px;
  color:#7a7669;
}
.block a{
  display:block;
}

/* Mobile tweaks: center timeline & cards */
@media (max-width:768px){
  .vtl{
    grid-template-columns:1fr;
    gap:16px;
    padding:0 18px;
  }

  .year-pin{
    position:static;
    text-align:center;
    margin-top:4px;
    margin-bottom:4px;
    font-size:24px;
  }

  .jumper{
    position:static;
    margin:8px auto 4px;
    justify-content:center;
    width:100%;
    max-width:100%;
  }

  .stack{
    gap:14px;
  }

  .block{
    max-width:640px;
    margin:0 auto;
  }
}


/* Article layout */
.article-hero{
  position:relative;
  margin:0;
  overflow:hidden;
  background:#f4efe5;
}
.article-hero img{
  width:100%;
  height:52vh;
  min-height:320px;
  object-fit:cover;
  display:block;
  filter:contrast(1.03);
}
.article-hero figcaption{
  position:absolute;
  right:12px;
  bottom:10px;
  color:#2a2a2a;
  background:#ffffffba;
  padding:6px 8px;
  border-radius:8px;
  font-size:12px;
}
.article-wrap{
  max-width:860px;
  margin:0 auto;
  padding:24px 16px;
}
.article-head h1{
  font:800 40px/1.14 'Source Serif 4',serif;
  margin:12px 0 6px;
  color:#201c12;
}
.article-head .meta{
  color:#6f6a5d;
  font-size:14px;
  margin-bottom:6px;
}
.article-head .dek{
  font:400 18px/1.6 Inter,system-ui;
  color:#3c3a34;
  margin:6px 0 16px;
}
.article-body{
  font:18px/1.85 Inter,system-ui;
  color:#23211d;
}
.article-body p{margin:0 0 1.1em}
.article-body h2{
  font:800 26px 'Source Serif 4',serif;
  margin:1.4em 0 .6em;
  color:#1f1c14;
}
.article-body h3{
  font:700 18px 'Source Serif 4',serif;
  margin:1em 0 .4em;
  color:#2a271d;
}
.article-body blockquote{
  margin:1.2em 0;
  padding:0 0 0 16px;
  border-left:4px solid var(--line);
  color:#3c3a34;
  font-style:italic;
}
.article-audio{
  margin:16px 0;
  padding:12px;
  border-top:1px solid var(--line);
  border-bottom:1px solid var(--line);
  background:#fffcf2;
  border-radius:8px;
}
.article-audio label{
  display:block;
  font-weight:700;
  margin-bottom:6px;
  color:#3b362a;
}
.article-nav{
  display:flex;
  justify-content:space-between;
  gap:12px;
  margin:24px 0 0;
}
.article-nav a{
  display:inline-block;
  border:1px solid var(--line);
  padding:10px 12px;
  border-radius:999px;
  background:#fffefb;
  color:#2c281c;
}
.article-layout{
  display:grid;
  grid-template-columns:220px 1fr;
  gap:24px;
}
@media (max-width:980px){
  .article-layout{
    grid-template-columns:1fr;
  }
}

/* Center article head on mobile (e.g. Jagir page) */
@media (max-width:700px){
  .article-head{
    text-align:center;
  }
  .article-head .dek{
    max-width:32rem;
    margin-left:auto;
    margin-right:auto;
  }
}

/* TOC */
#toc{
  position:sticky;
  top:80px;
  align-self:start;
  border:1px solid var(--line);
  background:var(--panel);
  border-radius:12px;
  padding:12px;
  box-shadow:var(--shadow);
}
#toc .toc-head{
  font:700 14px 'Source Serif 4',serif;
  margin-bottom:6px;
}
#toc ul{
  list-style:none;
  margin:0;
  padding:0;
}
#toc li{margin:6px 0}
#toc a{
  color:var(--ink);
  text-decoration:none;
}
#toc a:hover{text-decoration:underline}
#toc a.active{
  font-weight:600;
  color:var(--accent);
}
#toc .toc-l2{
  margin-left:12px;
  opacity:.9;
  font-size:.95em;
}

/* Embeds */
.embed{
  position:relative;
  width:100%;
  background:#000;
  border-radius:10px;
  overflow:hidden;
  margin:18px 0;
}
.embed.ratio-16x9{padding-top:56.25%}
.embed iframe,
.embed video{
  position:absolute;
  inset:0;
  width:100%;
  height:100%;
  border:0;
}
.embed figcaption{
  font-size:13px;
  color:#a8a39a;
  margin-top:6px;
}

/* Buttons */
.btn{
  display:inline-flex;
  align-items:center;
  gap:6px;
  border:1px solid #c9c3b6;
  background:#f6f1e7;
  border-radius:10px;
  padding:8px 12px;
  color:#2c2b28;
  cursor:pointer;
}
.btn:hover{filter:brightness(0.98)}

/* Audio library + mini-player */
.library{
  max-width:var(--maxw);
  margin:0 auto;
  padding:16px 24px;
}
.controls{
  display:flex;
  gap:10px;
  flex-wrap:wrap;
  margin:12px 0;
}
.controls input,
.controls select{
  border:1px solid var(--line);
  border-radius:10px;
  background:#fffefc;
  padding:10px;
}
.tracks{
  display:grid;
  grid-template-columns:1fr;
  gap:8px;
}
.track{
  display:grid;
  grid-template-columns:auto 1fr auto;
  gap:12px;
  align-items:center;
  border:1px solid var(--line);
  background:var(--panel);
  padding:10px;
  border-radius:12px;
  box-shadow:var(--shadow);
  transition:
    background .15s ease,
    box-shadow .15s ease,
    border-color .15s ease;
}
.track.is-playing{
  border-color:var(--accent);
  background:#f2f6ff;
  box-shadow:0 0 0 1px rgba(42,89,201,.35), var(--shadow);
}
.track.is-playing .t-title{
  color:var(--accent);
}
.t-meta{
  display:flex;
  flex-direction:column;
}
.t-title{font-weight:700}
.t-sub{
  font-size:12px;
  color:var(--muted);
}

.player{
  position:sticky;
  bottom:0;
  z-index:50;
  border-top:1px solid var(--line);
  background:#fffdf8;
}
.player-inner{
  max-width:var(--maxw);
  margin:0 auto;
  padding:10px 24px;
  display:grid;
  grid-template-columns:1fr auto;
  gap:12px;
  align-items:center;
}
.p-info{
  display:flex;
  flex-direction:column;
  gap:4px;
}
.p-title{font-weight:700}
.p-sub{
  font-size:12px;
  color:var(--muted);
}
.p-ctrls{
  display:flex;
  align-items:center;
  gap:10px;
}
.progress{
  appearance:none;
  width:320px;
  max-width:55vw;
  height:6px;
  border-radius:999px;
  background:#e5dccb;
}
.progress::-webkit-slider-thumb{
  appearance:none;
  width:12px;
  height:12px;
  border-radius:50%;
  background:#2a59c9;
  cursor:pointer;
}
.time{
  font-size:12px;
  color:var(--muted);
}
@media (max-width:700px){
  .player-inner{
    grid-template-columns:1fr;
  }
  .progress{
    max-width:100%;
  }
}

#backTop:hover {
  filter: brightness(1.1);
  transform: translateY(-2px);
}
@media (max-width:600px){
  #backTop{
    right:16px;
    bottom:16px;
    width:38px;
    height:38px;
    font-size:18px;
  }
}

/* Hide TOC on mobile */
@media (max-width:768px){
  #toc{
    display:none;
  }
}






/* Video page layout */
.video-page .video-layout {
  display: grid;
  grid-template-columns: minmax(0, 2fr) minmax(0, 1fr);
  gap: 2rem;
  align-items: flex-start;
}

/* Maintain 16:9 aspect ratio for video */
.video-aspect {
  position: relative;
  width: 100%;
  padding-top: 56.25%; /* 16:9 */
  background: #111;
  border-radius: 12px;
  overflow: hidden;
}

.video-aspect video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.video-meta {
  margin-top: 1rem;
}

.video-meta h2 {
  font-size: 1.3rem;
  margin-bottom: 0.25rem;
}

.video-meta p {
  font-size: 0.95rem;
  color: var(--text-muted, #666);
}

/* Playlist styles */
.video-playlist {
  border-left: 1px solid rgba(0, 0, 0, 0.06);
  padding-left: 1.5rem;
}

.playlist-heading {
  font-size: 1rem;
  font-weight: 600;
  margin-bottom: 0.75rem;
}

.video-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.video-item {
  display: flex;
  align-items: baseline;
  gap: 0.5rem;
  padding: 0.5rem 0.75rem;
  margin-bottom: 0.25rem;
  border-radius: 999px;
  cursor: pointer;
  transition: background-color 0.15s ease, transform 0.05s ease;
}

.video-item:hover {
  background: rgba(0, 0, 0, 0.03);
  transform: translateX(2px);
}

.video-item.is-active {
  background: rgba(0, 0, 0, 0.08);
  font-weight: 600;
}

.video-year {
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  opacity: 0.7;
  min-width: 3.2rem;
}

.video-name {
  font-size: 0.9rem;
}

/* Mobile: stack player & playlist */
@media (max-width: 768px) {
  .video-page .video-layout {
    grid-template-columns: 1fr;
  }
  .video-playlist {
    border-left: none;
    border-top: 1px solid rgba(0, 0, 0, 0.06);
    padding-left: 0;
    padding-top: 1rem;
  }
  .video-item {
    border-radius: 8px;
  }
}

/* Video filters (search + event chips) */
.video-filters {
  margin-bottom: 0.75rem;
}

.video-search {
  width: 100%;
  max-width: 100%;
  padding: 0.45rem 0.75rem;
  border-radius: 999px;
  border: 1px solid rgba(0, 0, 0, 0.12);
  font-size: 0.9rem;
  outline: none;
}

.video-search:focus {
  border-color: rgba(0, 0, 0, 0.28);
}

/* Event chips (concert filters) */
.video-event-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-top: 0.5rem;
}

.event-chip {
  border: none;
  border-radius: 999px;
  padding: 0.2rem 0.7rem;
  font-size: 0.78rem;
  cursor: pointer;
  background: rgba(0, 0, 0, 0.04);
  color: inherit;
  transition: background-color 0.12s ease, transform 0.05s ease;
}

.event-chip:hover {
  background: rgba(0, 0, 0, 0.08);
  transform: translateY(-1px);
}

.event-chip.is-active {
  background: rgba(0, 0, 0, 0.85);
  color: #fff;
}

