body {
    background-color: #0c0e10;
    transition: background-color 0.4s cubic-bezier(.4,0,.2,1);
}

.heading-hero {
  color: #ffffff; /* Tailwind's gray-500 */
  font-size: 3rem; /* Base size (text-5xl) */
  font-weight: 800; /* font-extrabold */
  letter-spacing: -0.02em; /* tighter spacing */
  line-height: 1.2; /* Tailwind's leading-tight */
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  margin: 1rem 0;
  transition: color 0.4s cubic-bezier(.4,0,.2,1);
}

.willcodesheading {
  /*   #7dd3fc     */
  color: #7dd3fc;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  text-shadow: 0 0 20px rgba(125, 211, 252, 0.3);
  transition: color 0.4s cubic-bezier(.4,0,.2,1);
}

body.light-mode .willcodesheading {
    color: #fbbf24;
}

@media (prefers-color-scheme: dark) {
  .heading-hero {
    color: #ffffff;
  }
}

@media (min-width: 640px) {
  .heading-hero {
    font-size: 3.75rem; /* sm:text-6xl */
  }
}

@media (min-width: 768px) {
  .heading-hero {
    font-size: 3.75rem; /* md:text-6xl */
  }
}

@media (min-width: 1024px) {
  .heading-hero {
    font-size: 6rem; /* lg:text-8xl */
  }
}

/* Moved from index */
.iframe-bottom-center {
  position: fixed;
  left: 50%;
  bottom: 20px;
  transform: translateX(-50%);
  z-index: 1000;
}
.button-group {
  display: flex;
  justify-content: center;
  gap: 20px;
  margin-top: 32px;
}
.nice-btn {
  background: transparent;
  border: 2px solid #fff;
  color: #fff;
  padding: 12px 32px;
  border-radius: 10px; /* Less rounded, more straight */
  font-size: 1.1rem;
  cursor: pointer;
  transition: 
    border-color 0.2s,
    color 0.2s,
    box-shadow 0.2s;
  outline: none;
}
.nice-btn:hover, .nice-btn:focus {
  border-color: #7dd3fc; /* subtle blue accent */
  color: #7dd3fc;
  box-shadow: 0 2px 12px 0 rgba(125, 211, 252, 0.15);
}

.light-mode-btn {
  position: fixed;
  top: 18px;
  left: 18px;
  background: rgba(255,255,255,0.85);
  border: none;
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.07);
  padding: 7px 8px 5px 8px;
  cursor: pointer;
  color: #fbbf24;
  transition: background 0.2s, box-shadow 0.2s;
  z-index: 1100;
  outline: none;
}
.light-mode-btn:hover, .light-mode-btn:focus {
  background: #fff;
  box-shadow: 0 4px 16px rgba(0,0,0,0.10);
}

body.light-mode {
  background-color: #f7fafc;
  transition: background-color 0.4s cubic-bezier(.4,0,.2,1);
}
body.light-mode .heading-hero {
  color: #222;
  transition: color 0.4s cubic-bezier(.4,0,.2,1);
}
body.light-mode .nice-btn {
  border-color: #222;
  color: #222;
  background: transparent;
}
body.light-mode .nice-btn:hover, body.light-mode .nice-btn:focus {
  border-color: #fbbf24;
  color: #fbbf24;
  box-shadow: 0 2px 12px 0 rgba(251, 191, 36, 0.15);
}

/* Sidebar styles */
.sidebar {
  position: fixed;
  top: 0;
  left: 0;
  height: 100vh;
  width: 270px;
  background: rgba(24, 27, 31, 0.72);
  backdrop-filter: blur(18px) saturate(1.2);
  -webkit-backdrop-filter: blur(18px) saturate(1.2);
  color: #fff;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  font-weight: 700;
  font-size: 1.15rem;
  box-shadow: 8px 0 32px 0 rgba(0,0,0,0.13);
  border-right: 1.5px solid rgba(125,211,252,0.13);
  border-top-right-radius: 18px;
  border-bottom-right-radius: 18px;
  transform: translateX(-100%);
  transition: transform 0.38s cubic-bezier(.4,0,.2,1);
  z-index: 3000; /* ensure on top */
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  padding: 3.8rem 1.2rem 1.2rem 1.2rem; /* more top padding for menu button */
  gap: 1.2rem;
  overflow: hidden;
  position: relative; /* allow absolute children */
  padding-bottom: 110px; /* more space for button */
}

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

.sidebar-header {
  display: none; /* Remove the title */
}

/* Sidebar close button */
.sidebar-close-btn {
  position: absolute;
  top: 22px;
  right: 22px;
  background: rgba(24,27,31,0.92);
  border: 2px solid #7dd3fc;
  border-radius: 50%;
  color: #7dd3fc;
  font-size: 2rem;
  width: 44px;
  height: 44px;
  display: none !important; /* Hide close button, since menu button is always visible and used for toggle */
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: 
    background 0.18s, 
    color 0.18s, 
    border-color 0.18s, 
    box-shadow 0.18s;
  outline: none;
  z-index: 4100;
  box-shadow: 0 2px 8px #0008;
}
.sidebar-close-btn:hover, .sidebar-close-btn:focus {
  background: #7dd3fc;
  color: #181b1f;
  border-color: #fff;
}
body.light-mode .sidebar-close-btn {
  background: #fff;
  color: #fbbf24;
  border-color: #fbbf24;
}
body.light-mode .sidebar-close-btn:hover, 
body.light-mode .sidebar-close-btn:focus {
  background: #fbbf24;
  color: #fff;
  border-color: #222;
}

.sidebar-nav {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  flex: 1 1 auto;
  overflow-y: auto;
  min-height: 0;
}

.sidebar-nav a {
  color: #fff;
  text-decoration: none;
  font-size: 1.07rem;
  font-weight: 600;
  padding: 7px 14px;
  border-radius: 8px;
  transition: color 0.18s, background 0.18s, box-shadow 0.18s;
  opacity: 0.96;
  background: transparent;
  box-shadow: none;
  letter-spacing: -0.01em;
}
.sidebar-nav a:hover, .sidebar-nav a:focus {
  color: #7dd3fc;
  background: rgba(125, 211, 252, 0.13);
  box-shadow: 0 2px 8px 0 rgba(125, 211, 252, 0.08);
}
body.light-mode .sidebar-nav a:hover, body.light-mode .sidebar-nav a:focus {
  color: #fbbf24;
  background: rgba(251,191,36,0.13);
  box-shadow: 0 2px 8px 0 rgba(251,191,36,0.08);
}

/* Style for the "Light mode" text link */
.sidebar-nav a#sidebar-light-mode-link {
  color: #7dd3fc;
  text-align: left;
  padding-left: 0;
  border-radius: 6px;
  transition: color 0.18s, background 0.18s;
  cursor: pointer;
  display: block;
}
.sidebar-nav a#sidebar-light-mode-link:hover, 
.sidebar-nav a#sidebar-light-mode-link:focus {
  color: #fbbf24;
  background: rgba(125,211,252,0.10);
}
body.light-mode .sidebar-nav a#sidebar-light-mode-link {
  color: #fbbf24;
}
body.light-mode .sidebar-nav a#sidebar-light-mode-link:hover, 
body.light-mode .sidebar-nav a#sidebar-light-mode-link:focus {
  color: #7dd3fc;
  background: rgba(251,191,36,0.10);
}

/* Improved light mode button in sidebar */
.sidebar-light-mode-btn {
  position: fixed;
  left: 32px;
  /* keep away from edge on mobile */
  right: auto;
  bottom: 32px;
  margin: 0;
  align-self: center;
  background: #111d26;
  border: 3px solid #7dd3fc;
  border-radius: 50%;
  box-shadow: 0 6px 32px 0 #7dd3fc55, 0 2px 8px 0 #0008;
  padding: 0;
  cursor: pointer;
  color: #fff;
  font-size: 2rem;
  transition: 
    background 0.18s, 
    color 0.18s, 
    border-color 0.18s, 
    box-shadow 0.18s;
  outline: none;
  display: none; /* Hide by default */
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 60px;
  height: 60px;
  opacity: 1;
  z-index: 4000;
}
.sidebar.open .sidebar-light-mode-btn {
  display: flex; /* Show when sidebar is open */
}
.sidebar-light-mode-btn svg {
  color: #7dd3fc;
  width: 32px;
  height: 32px;
  transition: color 0.18s;
}
.sidebar-light-mode-btn:hover, .sidebar-light-mode-btn:focus {
  background: #7dd3fc;
  color: #181b1f;
  border-color: #fff;
  box-shadow: 0 8px 32px 0 #7dd3fc99, 0 2px 8px 0 #000a;
}
.sidebar-light-mode-btn:hover svg, .sidebar-light-mode-btn:focus svg {
  color: #181b1f;
}
body.light-mode .sidebar-light-mode-btn {
  background: #fff;
  border-color: #fbbf24;
  color: #fbbf24;
  box-shadow: 0 6px 32px 0 #fbbf2455, 0 2px 8px 0 #0004;
}
body.light-mode .sidebar-light-mode-btn svg {
  color: #fbbf24;
}
body.light-mode .sidebar-light-mode-btn:hover, 
body.light-mode .sidebar-light-mode-btn:focus {
  background: #fbbf24;
  color: #fff;
  border-color: #222;
  box-shadow: 0 8px 32px 0 #fbbf2499, 0 2px 8px 0 #0006;
}
body.light-mode .sidebar-light-mode-btn:hover svg, 
body.light-mode .sidebar-light-mode-btn:focus svg {
  color: #fff;
}

/* Menu button (hamburger/X) styles */
.sidebar-open-btn {
  position: fixed;
  top: 22px;
  left: 18px;
  background: rgba(24,27,31,0.82);
  border: none;
  border-radius: 50%;
  color: #7dd3fc;
  font-size: 2.1rem;
  padding: 10px;
  cursor: pointer;
  box-shadow: 0 2px 8px rgba(0,0,0,0.10);
  z-index: 4100; /* above sidebar */
  transition: background 0.2s, color 0.2s;
  outline: none;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
}
.sidebar-open-btn:hover, .sidebar-open-btn:focus {
  background: #23272f;
  color: #fff;
}
body.light-mode .sidebar-open-btn {
  background: rgba(255,255,255,0.82);
  color: #fbbf24;
  box-shadow: 0 2px 8px rgba(251,191,36,0.10);
}
body.light-mode .sidebar-open-btn:hover, body.light-mode .sidebar-open-btn:focus {
  background: #f7fafc;
  color: #222;
}

/* Hamburger/X animation */
.sidebar-open-btn .bar {
  display: block;
  width: 26px;
  height: 3px;
  margin: 4px 0;
  background: currentColor;
  border-radius: 2px;
  transition: 0.3s;
}
.sidebar-open-btn.open .bar1 {
  transform: rotate(45deg) translate(5px, 5px);
}
.sidebar-open-btn.open .bar2 {
  opacity: 0;
}
.sidebar-open-btn.open .bar3 {
  transform: rotate(-45deg) translate(5px, -5px);
}

/* Hide original floating light mode button by default */
.light-mode-btn {
  display: none;
}

/* Make sidebar overlay and mobile friendly */
@media (max-width: 700px) {
  .sidebar {
    width: 85vw;
    min-width: 0;
    max-width: 98vw;
    border-top-right-radius: 0;
    border-bottom-right-radius: 0;
    box-shadow: 0 0 0 9999px rgba(0,0,0,0.32), 8px 0 32px 0 rgba(0,0,0,0.13);
    padding-left: 6vw;
    padding-right: 6vw;
    padding-top: 3.8rem;
  }
  .sidebar-light-mode-btn {
    left: 16px;
    bottom: 16px;
    width: 56px;
    height: 56px;
  }
}
@media (max-width: 400px) {
  .sidebar {
    width: 100vw;
    padding-left: 2vw;
    padding-right: 2vw;
  }
  .sidebar-light-mode-btn {
    left: 8px;
    bottom: 8px;
    width: 48px;
    height: 48px;
  }
}
/* Ensure sidebar content scrolls if needed */
.sidebar {
  overflow-y: auto;
  max-height: 100vh;
  position: fixed;
  /* Ensure flex layout doesn't break scrolling */
  display: flex;
  flex-direction: column;
}

/* Ensure nav takes available space but allows scrolling if needed */
.sidebar-nav {
  flex: 1;
  overflow-y: visible; /* Let the parent .sidebar handle scrolling */
  min-height: min-content;
}