/* ============================================================
   PPG Alumni – Main Stylesheet
   Palette: warm 1970s earth tones
   ============================================================ */

:root {
  --color-sand:       #D4C5A9;   /* page background          */
  --color-ocher:      #C8A96E;   /* sidebar accent / borders */
  --color-brown:      #8B5E3C;   /* sidebar background       */
  --color-avocado:    #4A6741;   /* headings, active link    */
  --color-terra:      #7A3B2E;   /* hover, login link        */
  --color-ink:        #2C2416;   /* body text                */
  --color-cream:      #F2EBD9;   /* main content background  */
  --color-rule:       #B89A6A;   /* horizontal rules         */

  --sidebar-width:    288px;
  --main-max-width:   680px;
  --header-height:    54px;
  --font-display:     'Playfair Display', Georgia, serif;
  --font-body:        'Source Sans 3', system-ui, sans-serif;
  --radius:           4px;
}

/* ── Reset & base ─────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { font-size: 17px; }

body {
  font-family: var(--font-body);
  font-weight: 400;
  color: var(--color-ink);
  background: var(--color-sand);
  line-height: 1.7;
  min-height: 100vh;
}

/* ── Layout shell ─────────────────────────────────────────── */
.layout {
  display: flex;
  min-height: 100vh;
}

/* ── Sidebar ──────────────────────────────────────────────── */
.sidebar {
  width: var(--sidebar-width);
  flex-shrink: 0;
  background: var(--color-brown);
  color: var(--color-sand);
  position: sticky;
  top: 0;
  height: 100vh;
  overflow-y: auto;
  /* Signature element: subtle 70s hatching texture */
  background-image:
    repeating-linear-gradient(
      135deg,
      transparent,
      transparent 18px,
      rgba(200,169,110,0.07) 18px,
      rgba(200,169,110,0.07) 19px
    );
}

.sidebar-inner {
  padding: 2rem 1.25rem 2rem;
  display: flex;
  flex-direction: column;
  gap: 2rem;
  height: 100%;
}

.sidebar-logo {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  padding-bottom: 1.5rem;
  border-bottom: 1px solid rgba(200,169,110,0.35);
}

.sidebar-logo-img {
  width: 110px;
  height: auto;
  /* Logo is already ocher; add a subtle glow so it pops on the dark sidebar */
  filter: drop-shadow(0 1px 3px rgba(0,0,0,0.4));
}

.sidebar-tagline {
  font-family: var(--font-display);
  font-size: 1rem;
  font-weight: 400;
  font-style: italic;
  color: var(--color-ocher);
  letter-spacing: 0.04em;
}

/* Nav list */
.nav-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  flex: 1;
}

.nav-list a {
  display: block;
  padding: 0.55rem 0.75rem;
  border-radius: var(--radius);
  color: #F0E8D8;            /* brighter than --color-sand for better contrast */
  text-decoration: none;
  font-size: 0.95rem;
  font-weight: 400;          /* up from 300 */
  letter-spacing: 0.02em;
  transition: background 0.15s, color 0.15s;
  opacity: 1;                /* was 0.9 */
}

.nav-list a:hover {
  background: rgba(200,169,110,0.25);
  color: #fff;
  opacity: 1;
}

.nav-list a[aria-current="page"] {
  background: var(--color-avocado);
  color: #fff;
  font-weight: 600;
  opacity: 1;
}

.nav-login {
  margin-top: 0.5rem;
  border-top: 1px solid rgba(200,169,110,0.2);
  padding-top: 0.5rem;
}

.nav-list .nav-login a {
  color: var(--color-ocher);
  font-weight: 600;
}

.nav-list .nav-login a:hover {
  background: var(--color-terra);
  color: #fff;
}

/* Status widget */
.sidebar-status {
  font-size: 0.78rem;
  color: rgba(212,197,169,0.7);
  line-height: 1.5;
  padding-top: 1rem;
  border-top: 1px solid rgba(200,169,110,0.2);
}

.sidebar-status strong {
  display: block;
  color: var(--color-ocher);
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  margin-bottom: 0.2rem;
}

/* ── Main content ─────────────────────────────────────────── */
.main-content {
  flex: 1;
  background: var(--color-cream);
  padding: 3rem 2.5rem 4rem;
  min-height: 100vh;
}

.main-content > * {
  max-width: var(--main-max-width);
  margin-left: auto;
  margin-right: auto;
}

/* ── Typography ───────────────────────────────────────────── */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-display);
  color: var(--color-avocado);
  line-height: 1.25;
  margin-top: 2rem;
  margin-bottom: 0.6rem;
}

h1 { font-size: 2.1rem; margin-top: 0; }
h2 { font-size: 1.55rem; }
h3 { font-size: 1.2rem; }

p  { margin-bottom: 1.1rem; }
p:last-child { margin-bottom: 0; }

a  { color: var(--color-terra); }
a:hover { color: var(--color-brown); }

ul, ol {
  padding-left: 1.4rem;
  margin-bottom: 1rem;
}

li { margin-bottom: 0.3rem; }

hr {
  border: none;
  border-top: 2px solid var(--color-rule);
  margin: 2.5rem 0;
  opacity: 0.5;
}

blockquote {
  border-left: 4px solid var(--color-ocher);
  padding: 0.5rem 1rem;
  margin: 1.5rem 0;
  color: var(--color-brown);
  font-style: italic;
}

code {
  font-family: 'Courier New', monospace;
  background: rgba(139,94,60,0.1);
  padding: 0.1em 0.35em;
  border-radius: 3px;
  font-size: 0.88em;
}

pre {
  background: var(--color-ink);
  color: var(--color-sand);
  padding: 1.2rem;
  border-radius: var(--radius);
  overflow-x: auto;
  margin-bottom: 1.2rem;
}

pre code { background: none; padding: 0; }

img { max-width: 100%; height: auto; border-radius: var(--radius); }

/* ── Blog entry cards (home page) ────────────────────────── */
.blog-entry {
  max-width: var(--main-max-width);
  margin: 0 auto 2.5rem;
  padding-bottom: 2.5rem;
  border-bottom: 1px solid var(--color-rule);
}

.blog-entry:last-child { border-bottom: none; }

.blog-entry-date {
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--color-terra);
  margin-bottom: 0.5rem;
}

/* ── Memorial entry cards ─────────────────────────────────── */
.memorial-entry {
  max-width: var(--main-max-width);
  margin: 0 auto 2.5rem;
  padding-bottom: 2.5rem;
  border-bottom: 1px solid #c0c0c0;
}

.memorial-entry:last-child { border-bottom: none; }

/* ── Page header (non-home pages) ────────────────────────── */
.page-header {
  max-width: var(--main-max-width);
  margin: 0 auto 2.5rem;
  padding-bottom: 1.25rem;
  border-bottom: 2px solid var(--color-ocher);
}

.page-header h1 { margin-top: 0; }

/* ── Mobile header ────────────────────────────────────────── */
.site-header {
  display: none;
  position: sticky;
  top: 0;
  z-index: 200;
  height: var(--header-height);
  background: var(--color-brown);
  padding: 0 1.1rem;
  align-items: center;
  gap: 0.85rem;
  box-shadow: 0 2px 6px rgba(0,0,0,0.25);
}

.site-title {
  font-family: var(--font-display);
  font-size: 1.15rem;
  color: var(--color-ocher);
}

/* Hamburger button */
.hamburger {
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.2rem;
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.hamburger span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--color-sand);
  border-radius: 2px;
  transition: transform 0.25s, opacity 0.25s;
}

.hamburger[aria-expanded="true"] span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}
.hamburger[aria-expanded="true"] span:nth-child(2) {
  opacity: 0;
}
.hamburger[aria-expanded="true"] span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

/* ── Responsive: mobile ───────────────────────────────────── */
@media (max-width: 700px) {
  .site-header { display: flex; }

  .layout { flex-direction: column; }

  .sidebar {
    position: fixed;
    top: var(--header-height);
    left: 0;
    width: 312px;
    height: calc(100% - var(--header-height));
    z-index: 100;
    transform: translateX(-100%);
    transition: transform 0.28s ease;
    box-shadow: 3px 0 12px rgba(0,0,0,0.3);
  }

  .sidebar.is-open { transform: translateX(0); }

  /* Overlay behind open nav */
  .sidebar.is-open::after {
    content: '';
    position: fixed;
    top: var(--header-height);
    bottom: 0;
    left: 312px;
    right: 0;
    background: rgba(0,0,0,0.35);
    z-index: -1;
  }

  .main-content {
    padding: 1.75rem 1.1rem 3rem;
    min-height: calc(100vh - 54px);
  }
}

@media (prefers-reduced-motion: reduce) {
  .sidebar, .hamburger span { transition: none; }
}
