/* ==========================================================================
   Luke Schwaller — Modern Editorial Design System
   Color Palette:
     Taupe:         #423629 (Espresso dark grounding tone)
     Olive Leaf:    #4F5D2F (Earthy botanical accent)
     Grey Olive:    #7D7E75 (Refined muted tone)
     Pale Slate:    #B0B2B8 (Cool soft slate borders & dividers)
     Lavender:      #CFD6EA (Serene periwinkle-lavender highlight)
   ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Bebas+Neue&family=Plus+Jakarta+Sans:wght@300;400;500;600;700;800&family=Syne:wght@600;700;800&display=swap');

:root {
  /* Core Palette Tokens */
  --palette-taupe: #423629;
  --palette-olive: #4F5D2F;
  --palette-olive-hover: #3d4924;
  --palette-grey-olive: #7D7E75;
  --palette-pale-slate: #B0B2B8;
  --palette-lavender: #CFD6EA;
  --palette-lavender-tint: rgba(207, 214, 234, 0.4);

  /* Panel Palette */
  --bg-sidebar: #423629;
  --bg-sidebar-alt: #362c21;
  --text-sidebar: #ffffff;
  --text-sidebar-muted: #CFD6EA;
  --text-sidebar-subtle: #B0B2B8;

  --bg-main: #f5f6fa;
  --bg-main-surface: #ffffff;
  --text-main: #2b241c;
  --text-main-muted: #7D7E75;
  --border-main: rgba(176, 178, 184, 0.45);

  --bg-accent: #4F5D2F;
  --bg-accent-hover: #3d4924;
  --text-accent: #ffffff;
  --text-accent-muted: rgba(255, 255, 255, 0.88);

  /* Fonts */
  --font-display: 'Bebas Neue', sans-serif;
  --font-heading: 'Syne', sans-serif;
  --font-body: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;

  /* Transitions */
  --transition-fast: 0.15s ease;
  --transition-normal: 0.25s ease;

  /* Shadows */
  --shadow-book: 0 12px 28px -6px rgba(66, 54, 41, 0.22), 0 4px 10px -4px rgba(66, 54, 41, 0.12);
  --shadow-card: 0 4px 20px rgba(66, 54, 41, 0.05);
}

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

html, body {
  height: 100vh;
  width: 100vw;
  margin: 0;
  padding: 0;
  overflow: hidden; /* Desktop: window itself does NOT scroll, center pane scrolls */
  font-family: var(--font-body);
  color: var(--text-main);
  background-color: var(--bg-sidebar);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

a {
  color: inherit;
  text-decoration: none;
  transition: all var(--transition-fast);
}

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

/* ==========================================================================
   Main Shell Layout (Desktop 3-Column Framework)
   Full-height sidebars with scrollable center canvas
   ========================================================================== */
.editorial-shell {
  display: grid;
  grid-template-columns: 360px 1fr 240px;
  height: 100vh;
  width: 100vw;
  overflow: hidden;
  background: var(--bg-main);
}

/* Left Sidebar: Profile & Identity (Full height top to bottom) */
.editorial-sidebar {
  height: 100vh;
  width: 100%;
  overflow-y: auto;
  overflow-x: hidden;
  background-color: var(--bg-sidebar);
  color: var(--text-sidebar);
  padding: 2.5rem 2.25rem;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  border-right: 1px solid rgba(207, 214, 234, 0.12);
  scrollbar-width: thin;
  scrollbar-color: rgba(207, 214, 234, 0.2) transparent;
}

.editorial-sidebar::-webkit-scrollbar {
  width: 4px;
}
.editorial-sidebar::-webkit-scrollbar-thumb {
  background: rgba(207, 214, 234, 0.2);
  border-radius: 4px;
}

/* Center Stage: The Scrollable Reading & Browsing Pane */
.editorial-canvas {
  height: 100vh;
  overflow-y: auto;
  overflow-x: hidden;
  background-color: var(--bg-main);
  color: var(--text-main);
  padding: 3.5rem 4rem;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: thin;
  scrollbar-color: rgba(125, 126, 117, 0.25) transparent;
}

.editorial-canvas::-webkit-scrollbar {
  width: 8px;
}

.editorial-canvas::-webkit-scrollbar-track {
  background: transparent;
}

.editorial-canvas::-webkit-scrollbar-thumb {
  background: rgba(125, 126, 117, 0.25);
  border-radius: 4px;
}

.editorial-canvas::-webkit-scrollbar-thumb:hover {
  background: rgba(125, 126, 117, 0.45);
}

/* Right Column: Categories / Quick Drawer (Full height top to bottom) */
.editorial-accent {
  height: 100vh;
  width: 100%;
  overflow-y: auto;
  overflow-x: hidden;
  background-color: var(--bg-accent);
  color: var(--text-accent);
  padding: 2.5rem 1.75rem;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  scrollbar-width: thin;
  scrollbar-color: rgba(255, 255, 255, 0.2) transparent;
}

.editorial-accent::-webkit-scrollbar {
  width: 4px;
}
.editorial-accent::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.2);
  border-radius: 4px;
}

/* ==========================================================================
   Left Sidebar Details
   ========================================================================== */
.sidebar-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 2.5rem;
}

.brand-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  font-family: var(--font-heading);
  font-size: 0.9rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: #ffffff;
}

.brand-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background-color: var(--palette-lavender);
  box-shadow: 0 0 10px var(--palette-lavender);
}

.sidebar-nav-pills {
  display: flex;
  gap: 1rem;
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--text-sidebar-muted);
}

.sidebar-nav-pills a:hover {
  color: #ffffff;
}

.sidebar-profile {
  margin-bottom: 2rem;
}

.avatar-container {
  width: 90px;
  height: 90px;
  border-radius: 50%;
  overflow: hidden;
  border: 3px solid var(--palette-olive);
  margin-bottom: 1.25rem;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.35);
}

.avatar-container img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.profile-name {
  font-family: var(--font-heading);
  font-size: 1.85rem;
  font-weight: 800;
  line-height: 1.15;
  margin-bottom: 0.75rem;
  color: #ffffff;
}

.social-links {
  display: flex;
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.social-links a {
  color: var(--palette-pale-slate);
  font-size: 1.1rem;
  transition: transform var(--transition-fast), color var(--transition-fast);
}

.social-links a:hover {
  color: var(--palette-lavender);
  transform: translateY(-2px);
}

.profile-bio {
  font-size: 0.92rem;
  line-height: 1.7;
  color: rgba(207, 214, 234, 0.85);
  margin-bottom: 1.5rem;
}

.profile-bio p + p {
  margin-top: 1rem;
}

/* Nav Menu in Left Sidebar */
.primary-nav {
  margin: 1.5rem 0;
  border-top: 1px solid rgba(207, 214, 234, 0.15);
  border-bottom: 1px solid rgba(207, 214, 234, 0.15);
  padding: 1.25rem 0;
}

.primary-nav-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.primary-nav-item a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.65rem 0.9rem;
  border-radius: 8px;
  font-weight: 600;
  font-size: 0.95rem;
  color: var(--palette-lavender);
  transition: all var(--transition-fast);
}

.primary-nav-item a:hover {
  background: rgba(79, 93, 47, 0.45);
  color: #ffffff;
}

.primary-nav-item.active a {
  background: var(--palette-olive);
  color: #ffffff;
  font-weight: 700;
}

.primary-nav-item a i {
  font-size: 0.85rem;
}

/* Circular Seal / Stamp at bottom */
.sidebar-badge {
  margin-top: auto;
  text-align: center;
  padding-top: 1.5rem;
}

.seal-circle {
  width: 140px;
  height: 140px;
  margin: 0 auto 0.75rem auto;
  border-radius: 50%;
  border: 2px dashed rgba(207, 214, 234, 0.45);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 0.75rem;
  font-family: var(--font-heading);
  font-size: 0.65rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--palette-lavender);
  line-height: 1.3;
  text-align: center;
}

.seal-circle span.seal-highlight {
  font-size: 0.85rem;
  color: #ffffff;
  display: block;
  margin: 0.2rem 0;
}

.sidebar-badge-caption {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--palette-pale-slate);
}

/* ==========================================================================
   Center Stage / Content Canvas
   ========================================================================== */
.canvas-header {
  margin-bottom: 2.5rem;
}

.canvas-breadcrumb {
  font-size: 0.85rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--palette-grey-olive);
  margin-bottom: 0.75rem;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}

.canvas-title {
  font-family: var(--font-display);
  font-size: 4.5rem;
  line-height: 0.95;
  letter-spacing: -0.01em;
  color: var(--palette-olive);
  text-transform: uppercase;
  margin-bottom: 0.75rem;
}

.canvas-subtitle {
  font-size: 1.15rem;
  color: var(--palette-grey-olive);
  max-width: 650px;
  line-height: 1.6;
}

/* Book Grid (Editorial Shelf) */
.editorial-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(210px, 1fr));
  gap: 2.5rem 2rem;
  margin-top: 2rem;
}

.book-card {
  display: flex;
  flex-direction: column;
  transition: transform var(--transition-normal);
  cursor: pointer;
}

.book-card:hover {
  transform: translateY(-6px);
}

.book-card:hover .book-card-title {
  color: var(--palette-olive);
}

.book-card:hover .book-poster {
  box-shadow: 0 18px 36px -8px rgba(66, 54, 41, 0.28);
}

.book-poster {
  border-radius: 8px;
  overflow: hidden;
  box-shadow: var(--shadow-book);
  margin-bottom: 1rem;
  aspect-ratio: 2 / 3;
  background: rgba(207, 214, 234, 0.25);
  position: relative;
  transition: box-shadow var(--transition-normal);
}

.book-poster img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.book-card-author {
  font-size: 0.85rem;
  color: var(--palette-grey-olive);
  margin-bottom: 0.25rem;
  font-weight: 500;
}

.book-card-title {
  font-family: var(--font-heading);
  font-size: 1.15rem;
  font-weight: 700;
  line-height: 1.25;
  color: var(--palette-taupe);
  margin-bottom: 0.4rem;
  transition: color var(--transition-fast);
}

.book-card-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.8rem;
  margin-top: auto;
  padding-top: 0.4rem;
}

.book-card-rating {
  color: #eab308;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
}

.book-card-badge {
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 0.25rem 0.55rem;
  border-radius: 4px;
  background: var(--palette-lavender);
  color: var(--palette-taupe);
}

/* ==========================================================================
   Right Accent Panel: Genres & Quick Filters (Olive Leaf Theme)
   ========================================================================== */
.accent-title {
  font-family: var(--font-heading);
  font-size: 1.1rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: #ffffff;
  margin-bottom: 1.75rem;
  padding-bottom: 0.75rem;
  border-bottom: 2px solid rgba(207, 214, 234, 0.35);
}

.genre-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
}

.genre-item a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.95rem;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.88);
  padding: 0.3rem 0;
  transition: all var(--transition-fast);
}

.genre-item a:hover {
  color: #ffffff;
  padding-left: 0.4rem;
}

.genre-item.active a {
  color: #ffffff;
  font-weight: 700;
}

.genre-count {
  font-size: 0.72rem;
  font-weight: 800;
  background: var(--palette-lavender);
  color: var(--palette-taupe);
  padding: 0.15rem 0.55rem;
  border-radius: 9999px;
}

.accent-bottom {
  margin-top: auto;
  padding-top: 2rem;
}

.accent-btn {
  display: block;
  width: 100%;
  text-align: center;
  background: #ffffff;
  color: var(--palette-olive);
  padding: 0.85rem 1.25rem;
  border-radius: 8px;
  font-weight: 700;
  font-size: 0.9rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.18);
  transition: transform var(--transition-fast), background var(--transition-fast), color var(--transition-fast);
}

.accent-btn:hover {
  background: var(--palette-lavender);
  color: var(--palette-taupe);
  transform: translateY(-2px);
}

.accent-footer-links {
  display: flex;
  gap: 0.75rem;
  margin-top: 1.25rem;
  font-size: 0.75rem;
  color: var(--palette-lavender);
  opacity: 0.9;
  justify-content: center;
}

.accent-footer-links a {
  color: var(--palette-lavender);
}

.accent-footer-links a:hover {
  text-decoration: underline;
  opacity: 1;
}

/* ==========================================================================
   Content Cards (Overview, Resume, About)
   ========================================================================== */
.content-box {
  background: var(--bg-main-surface);
  border: 1px solid var(--border-main);
  border-radius: 12px;
  padding: 2.5rem;
  box-shadow: var(--shadow-card);
  margin-bottom: 2rem;
}

.content-box h2 {
  font-family: var(--font-heading);
  font-size: 1.75rem;
  font-weight: 800;
  margin-bottom: 1.25rem;
  color: var(--palette-taupe);
}

.content-box p {
  font-size: 1.05rem;
  line-height: 1.75;
  color: var(--text-main);
  margin-bottom: 1.25rem;
}

.skills-pill-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  margin-top: 1rem;
}

.skill-pill {
  background: rgba(207, 214, 234, 0.45);
  color: var(--palette-taupe);
  font-size: 0.85rem;
  font-weight: 600;
  padding: 0.4rem 0.9rem;
  border-radius: 9999px;
  border: 1px solid rgba(176, 178, 184, 0.55);
}

/* Responsive PDF embed */
.pdf-viewer-frame {
  width: 100%;
  height: 900px;
  border: 1px solid var(--border-main);
  border-radius: 8px;
  background: #ffffff;
}

/* Action button strip */
.btn-strip {
  display: flex;
  gap: 1rem;
  margin: 1.5rem 0;
  flex-wrap: wrap;
}

.btn-primary {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: var(--palette-olive);
  color: #ffffff;
  padding: 0.8rem 1.6rem;
  border-radius: 8px;
  font-weight: 700;
  font-size: 0.95rem;
  box-shadow: 0 4px 14px rgba(79, 93, 47, 0.35);
  border: none;
}

.btn-primary:hover {
  background: var(--palette-olive-hover);
  color: #ffffff;
  transform: translateY(-2px);
}

.btn-secondary {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: #ffffff;
  color: var(--palette-taupe);
  border: 1px solid var(--palette-pale-slate);
  padding: 0.8rem 1.6rem;
  border-radius: 8px;
  font-weight: 600;
  font-size: 0.95rem;
}

.btn-secondary:hover {
  background: rgba(207, 214, 234, 0.25);
  border-color: var(--palette-grey-olive);
}

/* ==========================================================================
   Mobile & Tablet Responsiveness
   ========================================================================== */
@media screen and (max-width: 1200px) {
  .editorial-shell {
    grid-template-columns: 320px 1fr;
  }
  .editorial-accent {
    display: none;
  }
  .editorial-canvas {
    padding: 3rem 2.5rem;
  }
}

@media screen and (max-width: 900px) {
  html, body {
    height: auto;
    width: 100%;
    overflow: visible;
    overflow-x: hidden;
  }

  .editorial-shell {
    display: flex;
    flex-direction: column;
    height: auto;
    width: 100%;
    overflow: visible;
  }

  .editorial-sidebar {
    height: auto;
    overflow-y: visible;
    border-right: none;
    border-bottom: 1px solid rgba(207, 214, 234, 0.15);
    padding: 2rem 1.5rem;
  }

  .sidebar-badge {
    display: none;
  }

  .editorial-accent {
    display: none;
  }

  .editorial-canvas {
    height: auto;
    overflow-y: visible;
    padding: 2rem 1.5rem;
  }

  .canvas-title {
    font-size: 3rem;
  }

  .editorial-grid {
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: 1.5rem 1rem;
  }
}

@media screen and (max-height: 800px) and (min-width: 901px) {
  .editorial-sidebar {
    padding: 1.75rem 1.5rem;
  }
  .sidebar-top {
    margin-bottom: 1.5rem;
  }
  .avatar-container {
    width: 75px;
    height: 75px;
    margin-bottom: 1rem;
  }
  .seal-circle {
    width: 110px;
    height: 110px;
    font-size: 0.6rem;
  }
  .profile-bio {
    font-size: 0.88rem;
    margin-bottom: 1rem;
  }
}
