@import url('https://fonts.googleapis.com/css2?family=Linux+Libertine:wght@700&family=Arial&display=swap');
@import url('https://fonts.googleapis.com/css2?family=EB+Garamond:wght@400;700&display=swap');

:root{
  --bg:#fff;--fg:#202122;--muted:#54595d;--rule:#a2a9b1;--panel:#f8f9fa;--link:#0645ad;--accent:#cedff2;
}
body.light{background:var(--bg);color:var(--fg);}
body.dark{background:#111;color:#ddd;}
body{margin:0;font-family:Arial,Helvetica,sans-serif;line-height:1.65;}
a{color:var(--link);}a:hover{text-decoration:underline;}

.wiki-header{display:flex;flex-wrap:wrap;align-items:center;justify-content:space-between;border-bottom:1px solid var(--rule);background:var(--panel);padding:.5rem 1rem;}
.header-left{display:flex;align-items:center;gap:.6rem;}
.wiki-logo{width:45px;height:auto;}
.wiki-title{font-family:"Linux Libertine","Georgia",serif;line-height:1;}
.title-main{font-size:1.1rem;font-weight:700;}
.title-sub{font-size:.75rem;color:var(--muted);}
.header-nav a{margin-right:.8rem;font-size:.9rem;color:var(--fg);}
.header-right{display:flex;align-items:center;gap:.4rem;}
.search-box{padding:.3rem .5rem;border:1px solid var(--rule);border-radius:3px;font-size:.85rem;}
#theme-toggle{background:none;border:none;font-size:1.1rem;cursor:pointer;}

.mw-body{max-width:980px;margin:0 auto;padding:1rem;}
.firstHeading{font-family:"Linux Libertine","Georgia",serif;font-size:2rem;font-weight:700;margin:.5rem 0 1rem;}
h2{font-family:"Linux Libertine","Georgia",serif;font-size:1.4rem;font-weight:700;border-bottom:1px solid var(--rule);margin:1.2rem 0 .5rem;}
.infobox{float:right;clear:right;margin:0 0 1rem 1rem;width:300px;background:var(--panel);border:1px solid var(--rule);font-size:90%;border-collapse:collapse;}
.infobox caption{background:var(--accent);font-weight:700;text-align:center;padding:.4rem;}
.infobox th,.infobox td{border:1px solid var(--rule);padding:.35rem .5rem;vertical-align:top;}
.infologo{max-width:90%;display:block;margin:auto;}
.toc{border:1px solid var(--rule);background:var(--panel);padding:.6rem .8rem;margin:.5rem 0 1rem;max-width:420px;}
.toc ul{margin:.25rem 0;padding-left:1.2rem;}
.gallery{display:grid;grid-template-columns:repeat(auto-fit,minmax(250px,1fr));gap:1rem;margin:1rem 0;}
.gallery img{width:100%;height:auto;border:1px solid var(--rule);}
.gallery figcaption{text-align:center;font-size:.9rem;color:var(--muted);margin-top:.25rem;}
.references{font-size:90%;padding-left:1.2rem;}
.catlinks{border-top:1px solid var(--rule);margin-top:1.5rem;padding-top:.5rem;font-size:90%;}
.wiki-footer{border-top:1px solid var(--rule);background:var(--panel);text-align:center;padding:.8rem;font-size:.9rem;color:var(--muted);}
@media(max-width:900px){
  .infobox{float:none;width:100%;margin:1rem 0;}
}
body.dark a{color:#8ab4f8;}
body.dark .infobox,body.dark .toc,body.dark .wiki-header,body.dark .wiki-footer{background:#1e1e1e;border-color:#444;}

/* ---------- Wikipedia-style header bar ---------- */
.wiki-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--rule);
  background: var(--panel);
  padding: 0.3rem 1rem;
  height: 60px;
}

.header-left {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

/* Hamburger menu icon */
.menu-toggle {
  font-size: 1.4rem;
  cursor: pointer;
  user-select: none;
  color: #555;
  margin-right: 0.3rem;
}

/* Logo */
.wiki-logo {
  width: 45px;
  height: auto;
}

/* Title text (Wikipedia wordmark) */
.wiki-title {
  font-family: "EB Garamond", "Times New Roman", serif;
  line-height: 1;
  font-weight: 300;         /* makes letters thinner */
  letter-spacing: 0.03em;
}

.title-main {
  font-weight: 400;         /* thinner than bold */
  letter-spacing: 0.06em;
}

.title-sub {
  font-style: italic;
  font-size: 0.85rem;
  color: #333;
  font-weight: 300;
}

/* Search + right links */
.header-center {
  flex: 1;
  display: flex;
  justify-content: center;
  align-items: center;
}

.search-box {
  width: 460px;
  padding: 0.3rem 0.5rem;
  border: 1px solid var(--rule);
  border-right: none;
  border-radius: 3px 0 0 3px;
  font-size: 0.9rem;
}

.search-btn {
  border: 1px solid var(--rule);
  background: #f8f9fa;
  padding: 0.3rem 0.8rem;
  border-radius: 0 3px 3px 0;
  cursor: pointer;
  font-weight: 600;
}

.header-right {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.header-right a {
  color: #0645ad;
  font-size: 0.9rem;
  text-decoration: none;
}

.header-right a:hover {
  text-decoration: underline;
}

/* ---------- Mobile Wikipedia-style header ---------- */
@media (max-width: 768px) {
  .wiki-header {
    justify-content: space-between;
    background: #f8f9fa;
    padding: 0.4rem 0.8rem;
    height: 52px;
    border-bottom: 1px solid #c8ccd1;
  }

  .header-left, .header-center, .header-right {
    flex: none;
  }

  .menu-toggle {
    font-size: 1.5rem;
    cursor: pointer;
    color: #444;
  }

  .wiki-title {
    font-family: "EB Garamond", "Times New Roman", serif;
    font-weight: 400;
    letter-spacing: 0.05em;
    font-size: 1.2rem;
    margin: 0 auto;
    text-align: center;
  }

  .wiki-logo,
  .title-sub,
  .header-center,
  .header-right {
    display: none; /* hide these on mobile */
  }

  .header-left {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
  }

  .search-icon {
    font-size: 1.5rem;
    cursor: pointer;
    color: #444;
  }
}
