/* public/css/global.css */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;700;800&display=swap');

:root {
  --bg-1: #071019;
  --bg-2: #0f2a34;
  --accent-a: #6ef0d6;
  --accent-b: #4fb6ff;
  --muted: #9fb8bb;
  --muted-2: #cfece7;
  --sidebar-w: 280px;
  --ease: cubic-bezier(.25, .8, .25, 1);
  --page-padding: 18px;
}

/* reset */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html, body {
  height: 100%;
}

body {
  font-family: 'Inter', sans-serif;
  background: linear-gradient(160deg, var(--bg-1), var(--bg-2));
  color: #e7f8f6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
  line-height: 1.5;
}

/* stop scrolling while sidebar open */
body.no-scroll {
  overflow: hidden;
}

/* --- Header & Hamburger Icon --- */
.navbar {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 14px var(--page-padding);
  position: sticky;
  top: 0;
  z-index: 200; /* ensure navbar is highest among layout elements */
  background: rgba(7, 16, 25, 0.7);
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  backdrop-filter: blur(8px);
}

.brand {
  color: #ffffff;
  text-decoration: none;
  font-weight: 700;
  font-size: 1.1rem;
}

/* Make hamburger positioned so z-index works */
.hamburger {
  width: 44px;
  height: 36px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 5px;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  position: relative; /* makes z-index effective */
  z-index: 9999;      /* ensure clickable */
  border: none;
  background: transparent;
}

.hamburger .bar {
  display: block;
  width: 22px;
  height: 2px;
  background: linear-gradient(90deg, var(--accent-b), var(--accent-a));
  border-radius: 2px;
  transition: transform 0.3s var(--ease), opacity 0.2s var(--ease);
}

/* Animate hamburger to an 'X' shape when open */
.hamburger.open .bar:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.hamburger.open .bar:nth-child(2) { opacity: 0; }
.hamburger.open .bar:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* --- Sidebar & Backdrop --- */
.sidebar {
  position: fixed;
  top: 0;
  left: 0;
  width: var(--sidebar-w);
  max-width: 90%;
  height: 100%;
  transform: translateX(-100%);
  transition: transform 0.3s var(--ease);
  background: var(--bg-1);
  border-right: 1px solid rgba(255, 255, 255, 0.05);
  z-index: 180; /* below navbar but above main content */
  padding: 20px;
  padding-top: 80px;
  outline: none;
}

.sidebar.open {
  transform: translateX(0);
  box-shadow: 5px 0 50px rgba(0, 0, 0, 0.3);
}

.sidebar .title {
  font-weight: 700;
  margin-bottom: 10px;
  color: var(--muted-2);
  font-size: 1.2rem;
}

#menu-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

#menu-list li a {
  display: block;
  color: var(--muted-2);
  text-decoration: none;
  padding: 12px 15px;
  border-radius: 8px;
  transition: background 0.2s var(--ease), transform 0.2s var(--ease), color 0.2s var(--ease);
  font-weight: 500;
  outline-offset: 2px;
}

#menu-list li a:hover {
  background: rgba(255, 255, 255, 0.05);
  transform: translateX(5px);
  color: var(--accent-a);
}

#menu-list li a.active {
  background: rgba(110, 240, 214, 0.1);
  color: var(--accent-a);
  font-weight: 700;
}

#menu-list li a:focus-visible {
  outline: 2px solid var(--accent-a);
}

/* Backdrop */
.backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(3px);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s;
  z-index: 170;
  cursor: pointer;
}

.backdrop.visible {
  opacity: 1;
  visibility: visible;
}

/* --- Main Content & Other Styles --- */
main {
  padding: 22px var(--page-padding);
  min-height: calc(100vh - 160px);
}

.hero {
  background: rgba(255, 255, 255, 0.02);
  border-radius: 14px;
  padding: 34px;
  border: 1px solid rgba(255, 255, 255, 0.05);
  margin: 18px 0;
}

.hero-title {
  margin: 0;
  font-size: clamp(1.8rem, 4vw, 2.6rem);
  color: #fff;
  font-weight: 800;
  line-height: 1.1;
}

.hero .lead {
  margin-top: 10px;
  color: var(--muted-2);
  font-size: 1.1rem;
  max-width: 600px;
}
