/* ============================================================
   EVAN SPREEN — subpage.css
   Shared styles for all sub-pages (CV, Plays, Poems, etc.)
   Includes: sticky header, sliding left drawer nav, content area
   ============================================================ */

/* ── Sub-page body ── */
.subpage-body {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

/* ============================================================
   SLIDING LEFT DRAWER
   ============================================================ */

/* Drawer panel */
.site-drawer {
  position: fixed;
  top: 0;
  left: 0;
  width: 270px;
  height: 100vh;
  background: rgba(10, 10, 22, 0.97);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-right: 2px solid rgba(139, 92, 246, 0.55);
  box-shadow: 6px 0 32px rgba(0, 0, 0, 0.7);
  z-index: 500;
  /* default: fully hidden off-screen to the left */
  transform: translateX(-100%);
  transition: transform 0.35s cubic-bezier(0.4, 0, 0.2, 1);
  display: flex;
  flex-direction: column;
  padding: 72px 20px 32px;
  gap: 10px;
  overflow-y: auto;
  overscroll-behavior: contain;
}

/* Drawer open state */
.site-drawer.open {
  transform: translateX(0);
}

/* Drawer logo / site name at top */
.drawer-logo {
  color: #ffe600;
  font-family: 'Press Start 2P', monospace;
  font-size: 11px;
  line-height: 1.6;
  text-align: center;
  padding-bottom: 18px;
  margin-bottom: 10px;
  border-bottom: 1px solid rgba(139, 92, 246, 0.4);
  text-shadow: 1px 1px 0 rgba(0,0,0,0.8);
  letter-spacing: 0.5px;
}

/* Drawer nav links */
.drawer-link {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  background: rgba(139, 92, 246, 0.18);
  color: #d4b8ff;
  text-decoration: none;
  border: 1px solid rgba(167, 139, 250, 0.3);
  border-radius: 8px;
  font-family: 'Press Start 2P', monospace;
  font-size: 11px;
  letter-spacing: 0.5px;
  transition:
    background 0.2s,
    border-color 0.2s,
    color 0.2s,
    transform 0.15s,
    box-shadow 0.2s;
  position: relative;
  overflow: hidden;
  cursor: url('https://i.imgur.com/7zH3uLx.png'), pointer;
  touch-action: manipulation;
}

/* Shimmer sweep on hover */
.drawer-link::after {
  content: '';
  position: absolute;
  top: 0; left: -100%;
  width: 55%;
  height: 100%;
  background: linear-gradient(
    120deg,
    transparent,
    rgba(255, 255, 255, 0.14),
    transparent
  );
  transition: left 0.35s ease;
  pointer-events: none;
}

/* Only apply hover on pointer devices — prevents iOS double-tap issue */
@media (hover: hover) {
  .drawer-link:hover::after { left: 160%; }

  .drawer-link:hover {
    background: rgba(139, 92, 246, 0.45);
    border-color: #ffe600;
    color: #ffe600;
    transform: translateX(4px);
    box-shadow: 0 0 12px rgba(255, 230, 0, 0.25);
  }
}

.drawer-link:active {
  transform: scale(0.96) translateX(2px);
  background: rgba(139, 92, 246, 0.65);
}

/* Active / current page link */
.drawer-link.active {
  background: #8b5cf6;
  border-color: #ffe600;
  color: #ffe600;
  box-shadow: 0 0 14px rgba(139, 92, 246, 0.6);
  pointer-events: none;
  cursor: default;
}

/* ── Hamburger / close toggle button ── */
.drawer-toggle {
  position: fixed;
  top: 16px;
  left: 16px;
  width: 46px;
  height: 46px;
  background: #8b5cf6;
  color: #fff;
  border: 2px solid #a78bfa;
  border-radius: 8px;
  font-family: 'Press Start 2P', monospace;
  font-size: 16px;
  line-height: 1;
  z-index: 600;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: url('https://i.imgur.com/7zH3uLx.png'), pointer;
  touch-action: manipulation;
  transition:
    background 0.2s,
    box-shadow 0.2s,
    transform 0.15s,
    left 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Shift toggle button to the right when drawer is open on desktop */
body.drawer-open .drawer-toggle {
  left: 278px;
}

@media (hover: hover) {
  .drawer-toggle:hover {
    background: #a78bfa;
    box-shadow: 0 0 14px rgba(167, 139, 250, 0.8);
  }
}

.drawer-toggle:active {
  transform: scale(0.93);
  background: #c5a3ff;
}

/* ── Backdrop overlay ── */
.drawer-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(3px);
  -webkit-backdrop-filter: blur(3px);
  z-index: 400;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.35s ease;
}

.drawer-overlay.visible {
  opacity: 1;
  pointer-events: auto;
}



/* ============================================================
   MAIN CONTENT AREA
   ============================================================ */
.subpage-content {
  flex: 1;
  padding: 80px 32px 60px; /* top pad clears the floating toggle button */
  max-width: 1100px;
  width: 100%;
  margin: 0 auto;
}

/* ── Generic glass card for content ── */
.subpage-card {
  background: rgba(20, 20, 35, 0.78);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 2px solid #8b5cf6;
  border-radius: 12px;
  padding: 36px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.6);
}

.placeholder-text {
  color: #94a3b8;
  font-size: 12px;
  text-align: center;
  padding: 40px 0;
  line-height: 2;
}

/* 'tap outside' hint — hidden on desktop, shown on mobile */
.drawer-close-hint {
  display: none;
  margin-top: auto;
  padding-top: 24px;
  font-family: 'Press Start 2P', monospace;
  font-size: 6px;
  color: rgba(139,92,246,0.5);
  text-align: center;
  letter-spacing: 0.5px;
  line-height: 2;
}

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 600px) {
  .subpage-header {
    padding: 14px 18px 14px 72px;
  }

  .subpage-content {
    padding: 72px 16px 40px;
  }

  .subpage-card {
    padding: 24px 18px;
  }

  /* Full-width on mobile so it's unmistakably a modal overlay */
  .site-drawer {
    width: 100vw;
    border-right: none;
  }

  /* Toggle turns dark purple with yellow border when drawer is open */
  body.drawer-open .drawer-toggle {
    left: 16px;
    background: #3b0764;
    border-color: #ffe600;
    box-shadow: 0 0 12px rgba(255,230,0,0.3);
  }

  /* Dim hint at the bottom of the drawer */
  .drawer-close-hint {
    display: block;
  }
}

