/* ==========================================================================
   base.css — zarathushtra.com
   Shared foundation: variables, fonts, reset, sidebar, hamburger, footer.
   Every content page loads this first, then its own section CSS.
   Sidebar values match Gallery_index.html exactly.
   ========================================================================== */

/* --------------------------------------------------------------------------
   GOOGLE FONTS
   -------------------------------------------------------------------------- */
@import url('https://fonts.googleapis.com/css2?family=Cinzel:wght@400;500&family=Cormorant+Garamond:ital,wght@0,300;0,400;1,300;1,400&display=swap');


/* --------------------------------------------------------------------------
   CSS VARIABLES  (canonical — match gallery source)
   -------------------------------------------------------------------------- */
:root {
  --deep:        #0F0620;               /* page background */
  --void:        #1A0A2E;               /* sidebar background */
  --purple1:     #26125A;
  --purple2:     #321870;
  --sidebar-w:   150px;
  --gold:        #C9A84C;
  --gold2:       #E8C96A;
  --gold-dim:    rgba(201, 168, 76, 0.18);
  --gold-rule:   rgba(201, 168, 76, 0.25);
  --text:        #E8DFC8;
  --text-dim:    rgba(232, 223, 200, 0.55);
  --font-head:   'Cinzel', serif;
  --font-body:   'Cormorant Garamond', Georgia, serif;
}


/* --------------------------------------------------------------------------
   RESET & BASE
   -------------------------------------------------------------------------- */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html, body {
  min-height: 100vh;
  background: var(--deep);
  color: var(--text);
  font-family: var(--font-body);
}

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

a:hover {
  color: var(--gold2);
}

img {
  display: block;
  max-width: 100%;
}


/* --------------------------------------------------------------------------
   PAGE LAYOUT
   Wrap page content in <div class="layout"> on every content page.
   The sidebar sits fixed at left; .main offsets itself with margin-left.
   -------------------------------------------------------------------------- */
.layout {
  display: flex;
  min-height: 100vh;
}

.main {
  margin-left: var(--sidebar-w);
  flex: 1;
  padding: 3rem 2.5rem 4rem;
  border-top: 1px solid var(--gold-dim);
}


/* --------------------------------------------------------------------------
   SIDEBAR — desktop fixed left column
   -------------------------------------------------------------------------- */
.sidebar {
  width: var(--sidebar-w);
  min-height: 100vh;
  background: var(--void);
  border-right: 1px solid var(--gold-dim);
  display: flex;
  flex-direction: column;
  align-items: center;
  position: fixed;
  top: 0;
  left: 0;
  z-index: 100;
  padding-top: 10px;
  padding-bottom: 1.5rem;
}

/* Portrait — direct <img> child of .sidebar */
.sidebar-portrait {
  display: block;
  width: 125px;
  height: 135px;
  object-fit: cover;
  object-position: center top;
  margin: 0 auto 0;
  border-bottom: 1px solid var(--gold-dim);
}

/* Site name */
.sidebar-site-name {
  font-family: var(--font-head);
  font-size: 0.58rem;
  font-weight: 500;
  letter-spacing: 0.18em;
  color: var(--gold);
  text-align: center;
  text-transform: uppercase;
  padding: 0.75rem 0.5rem 0.6rem;
  border-bottom: 1px solid var(--gold-dim);
  width: 100%;
}

/* Nav list */
.sidebar-nav {
  list-style: none;
  width: 100%;
  padding: 0.5rem 0;
  flex: 1;
}

.sidebar-nav li a {
  display: block;
  font-family: var(--font-head);
  font-size: 0.6rem;
  font-weight: 400;
  letter-spacing: 0.12em;
  color: rgba(201, 168, 76, 0.65);
  text-decoration: none;
  text-align: center;
  padding: 0.52rem 0.5rem;
  transition: color 0.2s, background 0.2s;
}

.sidebar-nav li a:hover {
  color: var(--gold2);
  background: rgba(201, 168, 76, 0.06);
}

.sidebar-nav li a.current {
  color: var(--gold);
  background: rgba(201, 168, 76, 0.09);
}

/* Divider before Home — <div class="sidebar-divider"> inside the <ul> */
.sidebar-divider {
  width: 60%;
  height: 1px;
  background: var(--gold-dim);
  margin: 0.3rem auto;
}

/* Motto */
.sidebar-tenets {
  font-family: var(--font-body);
  font-size: 0.62rem;
  font-style: italic;
  font-weight: 300;
  color: rgba(201, 168, 76, 0.5);
  text-align: center;
  line-height: 2;
  letter-spacing: 0.08em;
  padding: 0.5rem 0.5rem 0;
}


/* --------------------------------------------------------------------------
   HAMBURGER — mobile only (pure CSS checkbox)
   -------------------------------------------------------------------------- */
#menu-toggle {
  display: none;
}

.hamburger {
  display: none;
  position: fixed;
  top: 0.9rem;
  right: 1rem;
  z-index: 300;
  cursor: pointer;
  width: 36px;
  height: 36px;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 5px;
}

.hamburger span {
  display: block;
  width: 22px;
  height: 1.5px;
  background: var(--gold);
  transition: all 0.3s ease;
  transform-origin: center;
}

/* Mobile drawer */
.mobile-drawer {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 220px;
  height: 100vh;
  background: var(--void);
  border-right: 1px solid var(--gold-dim);
  z-index: 200;
  transform: translateX(-100%);
  transition: transform 0.3s ease;
  flex-direction: column;
  padding-top: 4rem;
  padding-bottom: 2rem;
  overflow-y: auto;
}

.mobile-drawer .sidebar-tenets {
  padding: 0.5rem 1rem 0;
}

.drawer-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.6);
  z-index: 199;
}

/* Open states */
#menu-toggle:checked ~ .drawer-overlay          { display: block; }
#menu-toggle:checked ~ .mobile-drawer           { display: flex; transform: translateX(0); }
#menu-toggle:checked ~ .hamburger span:nth-child(1) { transform: translateY(6.5px) rotate(45deg); }
#menu-toggle:checked ~ .hamburger span:nth-child(2) { opacity: 0; }
#menu-toggle:checked ~ .hamburger span:nth-child(3) { transform: translateY(-6.5px) rotate(-45deg); }


/* --------------------------------------------------------------------------
   SITE FOOTER
   -------------------------------------------------------------------------- */
.site-footer {
  margin-left: var(--sidebar-w);
  padding: 1.2rem 2.5rem;
  border-top: 1px solid var(--gold-dim);
  text-align: center;
  font-family: var(--font-body);
  font-size: 0.7rem;
  font-style: italic;
  font-weight: 300;
  color: rgba(201, 168, 76, 0.38);
  letter-spacing: 0.06em;
  line-height: 1.6;
}


/* --------------------------------------------------------------------------
   MOBILE — ≤ 767px
   -------------------------------------------------------------------------- */
@media (max-width: 767px) {

  .sidebar {
    display: none;   /* desktop sidebar hidden; mobile-drawer takes over */
  }

  .main {
    margin-left: 0;
    padding: 3.5rem 1.25rem 3rem;  /* top clears the hamburger */
  }

  .hamburger {
    display: flex;
  }

  .site-footer {
    margin-left: 0;
    padding: 1rem;
  }
}
