/* ============================================
   Shirl Lakeway — Profile site
   Works at root (slaake.github.io) and subpaths
   ============================================ */

:root {
  --bg: #fafaf9;
  --bg-sidebar: #0d2818;
  --bg-card: #ffffff;
  --bg-card-hover: #f5f5f4;
  --text: #1c1917;
  --text-muted: #57534e;
  --text-subtle: #78716c;
  --text-sidebar: #fafaf9;
  --text-sidebar-muted: #a7a29e;
  --accent: #15803d;
  --accent-hover: #166534;
  --accent-light: #dcfce7;
  --gold: #b45309;
  --gold-bg: #fef3c7;
  --border: #e7e5e4;
  --border-sidebar: rgba(255,255,255,0.08);
  --radius: 12px;
  --radius-sm: 8px;
  --shadow: 0 1px 3px rgba(0,0,0,0.06);
  --shadow-md: 0 4px 12px rgba(0,0,0,0.08);
  --font-sans: 'Plus Jakarta Sans', system-ui, -apple-system, sans-serif;
  --font-serif: 'Instrument Serif', Georgia, serif;
  --ease: 0.2s ease;
}

*, *::before, *::after { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
}

body {
  margin: 0;
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.6;
  color: var(--text);
  background: var(--bg);
}

/* Page layout */
.page {
  display: grid;
  grid-template-columns: 1fr;
  min-height: 100vh;
}

@media (min-width: 900px) {
  .page {
    grid-template-columns: 300px 1fr;
    grid-template-areas: "sidebar main";
  }
  .sidebar {
    grid-area: sidebar;
  }
  .main {
    grid-area: main;
  }
}

/* ========== Sidebar ========== */
.sidebar {
  background: var(--bg-sidebar);
  color: var(--text-sidebar);
  padding: 2rem 1.5rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  border-bottom: 1px solid var(--border);
}

@media (min-width: 900px) {
  .sidebar {
    position: sticky;
    top: 0;
    align-self: start;
    height: 100vh;
    max-height: 100vh;
    border-bottom: none;
    border-right: 1px solid var(--border-sidebar);
    padding: 2.5rem 1.75rem;
    z-index: 2;
    overflow-y: auto;
  }
}

/* Main content - stays in its column, below sidebar in stack order */
.main {
  position: relative;
  z-index: 1;
}

.sidebar-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  max-width: 240px;
}

@media (min-width: 900px) {
  .sidebar-inner {
    max-width: none;
  }
}

.sidebar-avatar {
  width: 120px;
  height: 120px;
  border-radius: 50%;
  object-fit: cover;
  border: 3px solid var(--accent);
  margin-bottom: 1.25rem;
  box-shadow: var(--shadow-md);
}

@media (min-width: 900px) {
  .sidebar-avatar {
    width: 140px;
    height: 140px;
    margin-bottom: 1.5rem;
  }
}

.sidebar-name {
  font-family: var(--font-serif);
  font-size: 1.75rem;
  font-weight: 400;
  margin: 0 0 0.2rem;
  color: var(--text-sidebar);
  line-height: 1.2;
}

@media (min-width: 900px) {
  .sidebar-name {
    font-size: 2rem;
  }
}

.sidebar-title {
  font-size: 0.9rem;
  font-weight: 600;
  color: #4ade80;
  margin: 0 0 0.15rem;
}

.sidebar-org,
.sidebar-location {
  font-size: 0.875rem;
  color: var(--text-sidebar-muted);
  margin: 0;
}

.sidebar-location {
  margin-bottom: 1.75rem;
}

.sidebar-nav {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  width: 100%;
}

@media (max-width: 899px) {
  .sidebar-nav {
    flex-direction: row;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.35rem;
  }
}

.sidebar-nav a {
  color: var(--text-sidebar-muted);
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 500;
  padding: 0.5rem 0.75rem;
  border-radius: var(--radius-sm);
  transition: color var(--ease), background var(--ease);
  text-align: center;
}

.sidebar-nav a:hover {
  color: var(--text-sidebar);
  background: rgba(255,255,255,0.08);
}

.sidebar-cta {
  display: inline-block;
  margin-top: auto;
  padding-top: 1.5rem;
  font-size: 0.9rem;
  font-weight: 600;
  color: #4ade80;
  text-decoration: none;
  transition: color var(--ease);
}

.sidebar-cta:hover {
  color: #86efac;
}

/* ========== Main content ========== */
.main {
  padding: 2rem 1.25rem 3rem;
  max-width: 640px;
  margin: 0 auto;
  width: 100%;
}

@media (min-width: 600px) {
  .main {
    padding: 2.5rem 2rem 3.5rem;
  }
}

.section {
  margin-bottom: 2.5rem;
  padding-bottom: 2.5rem;
  border-bottom: 1px solid var(--border);
}

.section:last-child {
  border-bottom: none;
  margin-bottom: 0;
  padding-bottom: 0;
}

.section-heading {
  font-family: var(--font-serif);
  font-size: 1.5rem;
  font-weight: 400;
  color: var(--text);
  margin: 0 0 1.25rem;
}

/* About */
.about-lead {
  font-size: 1.125rem;
  color: var(--text);
  margin: 0 0 0.5rem;
  line-height: 1.65;
}

.about-body {
  font-size: 1rem;
  color: var(--text-muted);
  margin: 0;
  line-height: 1.7;
}

/* Timeline */
.timeline {
  position: relative;
  padding-left: 1.5rem;
  border-left: 2px solid var(--border);
  margin-left: 0.4rem;
}

.timeline-entry {
  position: relative;
  padding-bottom: 2rem;
}

.timeline-entry:last-child {
  padding-bottom: 0;
}

.timeline-dot {
  position: absolute;
  left: -1.6rem;
  top: 0.35rem;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--accent);
  border: 3px solid var(--bg);
  box-shadow: 0 0 0 2px var(--accent);
}

.timeline-body {
  padding-left: 0;
}

.timeline-title {
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--text);
  margin: 0 0 0.25rem;
}

.timeline-meta {
  font-size: 0.85rem;
  color: var(--text-subtle);
  margin: 0 0 0.6rem;
}

.timeline-list {
  margin: 0;
  padding-left: 1.25rem;
  font-size: 0.95rem;
  color: var(--text-muted);
  line-height: 1.65;
}

.timeline-list li {
  margin-bottom: 0.4rem;
}

.timeline-list li:last-child {
  margin-bottom: 0;
}

.timeline-desc {
  font-size: 0.95rem;
  color: var(--text-muted);
  margin: 0;
  line-height: 1.6;
}

/* Cards */
.card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.35rem 1.5rem;
  margin-bottom: 1rem;
  box-shadow: var(--shadow);
  transition: box-shadow var(--ease), border-color var(--ease);
}

.card:last-child {
  margin-bottom: 0;
}

.card:hover {
  box-shadow: var(--shadow-md);
}

.card-featured {
  border-color: rgba(180, 83, 9, 0.35);
  background: var(--gold-bg);
}

.card-tag {
  display: inline-block;
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 0.4rem;
}

.card-title {
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--text);
  margin: 0 0 0.25rem;
}

.card-meta {
  font-size: 0.85rem;
  color: var(--text-subtle);
  margin: 0 0 0.5rem;
}

.card-text {
  font-size: 0.95rem;
  color: var(--text-muted);
  margin: 0;
  line-height: 1.6;
}

/* Pills (certifications) */
.pills {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.pill {
  display: inline-block;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--accent);
  background: var(--accent-light);
  padding: 0.45rem 0.9rem;
  border-radius: 999px;
  border: 1px solid rgba(21, 128, 61, 0.2);
  transition: background var(--ease), transform var(--ease);
}

.pill:hover {
  background: #bbf7d0;
  transform: translateY(-1px);
}

/* Contact */
.section-contact .contact-text {
  margin: 0 0 1rem;
  color: var(--text-muted);
}

.btn {
  display: inline-block;
  padding: 0.65rem 1.35rem;
  background: var(--accent);
  color: #fff !important;
  text-decoration: none;
  font-weight: 600;
  font-size: 0.9rem;
  border-radius: var(--radius-sm);
  transition: background var(--ease), transform var(--ease);
  box-shadow: var(--shadow);
}

.btn:hover {
  background: var(--accent-hover);
  transform: translateY(-1px);
}

/* Footer */
.footer {
  text-align: center;
  padding: 1.5rem;
  font-size: 0.875rem;
  color: var(--text-subtle);
  border-top: 1px solid var(--border);
  background: var(--bg);
}

.footer p {
  margin: 0;
}

/* Mobile: compact header when sidebar is on top */
@media (max-width: 899px) {
  .sidebar {
    flex-direction: row;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.75rem 1rem;
    padding: 1.25rem 1rem;
  }

  .sidebar-inner {
    flex-direction: row;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    max-width: none;
    gap: 0.75rem 1rem;
  }

  .sidebar-avatar {
    width: 72px;
    height: 72px;
    margin-bottom: 0;
    order: 0;
  }

  .sidebar-name {
    font-size: 1.4rem;
    margin: 0;
    order: 1;
    flex: 1;
    min-width: 0;
    text-align: left;
  }

  .sidebar-title,
  .sidebar-org,
  .sidebar-location {
    display: none;
  }

  .sidebar-nav {
    order: 2;
    width: 100%;
    margin: 0;
  }

  .sidebar-cta {
    order: 3;
    margin-top: 0;
    padding-top: 0;
  }

  .main {
    padding: 1.75rem 1rem 2rem;
  }

  .section {
    margin-bottom: 2rem;
    padding-bottom: 2rem;
  }

  .timeline {
    padding-left: 1.25rem;
    margin-left: 0.25rem;
  }

  .timeline-dot {
    left: -1.35rem;
    width: 10px;
    height: 10px;
    border-width: 2px;
  }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    transition-duration: 0.01ms !important;
  }
}
