/* Written mostly by Gemini */

/* ==========================================================================
   Minimal Responsive Stylesheet (Base, Headers, Links)
   ========================================================================== */

/* Base Layout & Mobile First */
body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  font-size: 1rem;
  line-height: 1.6;
  color: #24292e;
  background-color: #ffffff;
  margin: 0 auto;

  /* Mobile: Fill full screen width */
  width: 100%;
  max-width: 100%;
  padding: 1.25rem 1rem;
  box-sizing: border-box;
}

/* Laptop & Desktop Screens */
@media screen and (min-width: 768px) {
  body {
    /* Limit width to ~80 characters */
    max-width: 80ch;
    padding: 2.5rem 1.5rem;
  }
}

/* Headings */
h1, h2 {
  line-height: 1.25;
  margin-top: 1.5em;
  margin-bottom: 0.5em;
  color: #1b1f23;
}

h1 {
  font-size: 2em;
  margin-top: 0;
  border-bottom: 2px solid #e1e4e8;
  padding-bottom: 0.3em;
}

h2 {
  font-size: 1.5em;
  border-bottom: 1px solid #e1e4e8;
  padding-bottom: 0.3em;
}

/* Links */
a {
  color: #0366d6;
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

/* Written by Gemini*/

/* CSS Reset & Basic Box Sizing */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

/* Base Typography & Background Styling */
body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    background-color: #f8fafc;
    color: #0f172a;
    line-height: 1.5;
    min-height: 100vh;
}

/* Top Header Navigation Bar */
.header {
    position: relative;
    z-index: 30;
    background-color: #ffffff;
    border-bottom: 1px solid #e2e8f0;
    box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.05);
}

.header-container {
    max-width: 600px;
    margin: 0 auto;
    padding: 0 1rem;
    height: 4rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.header-title {
    font-size: 1.125rem;
    font-weight: 600;
    color: #0f172a;
    letter-spacing: -0.025em;
}

/* Burger Toggle Button */
.burger-button {
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 0.5rem;
    border-radius: 0.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #334155;
    transition: background-color 0.2s ease, color 0.2s ease;
}

.burger-button:hover,
.burger-button:focus-visible {
    background-color: #f1f5f9;
    color: #0f172a;
}

.burger-button:focus-visible {
    outline: 2px solid #2563eb;
    outline-offset: 2px;
}

.burger-icon {
    width: 1.5rem;
    height: 1.5rem;
}

/* Hamburger Line Morphing Animations */
.burger-line {
    transition: transform 0.3s ease, opacity 0.2s ease;
    transform-origin: center;
}

.burger-button.is-active .line-top {
    transform: translateY(6px) rotate(45deg);
}

.burger-button.is-active .line-middle {
    opacity: 0;
    transform: scaleX(0);
}

.burger-button.is-active .line-bottom {
    transform: translateY(-6px) rotate(-45deg);
}

/* Expandable Drawer Menu */
.menu-drawer {
    position: absolute;
    top: 100%;
    left: 0;
    width: 100%;
    background-color: #ffffff;
    border-bottom: 1px solid #e2e8f0;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    z-index: 30;
    transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.3s ease, visibility 0.3s ease;
}

.menu-drawer.closed {
    transform: translateY(-10px);
    opacity: 0;
    pointer-events: none;
    visibility: hidden;
}

.menu-drawer.open {
    transform: translateY(0);
    opacity: 1;
    pointer-events: auto;
    visibility: visible;
}

.menu-list {
    max-width: 600px;
    margin: 0 auto;
    padding: 0.75rem 1rem;
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    list-style: none;
}

/* Menu Items & Links */
.menu-link {
    display: block;
    padding: 0.75rem 1rem;
    border-radius: 0.5rem;
    color: #334155;
    font-weight: 500;
    font-size: 1rem;
    text-decoration: none;
    transition: background-color 0.2s ease, color 0.2s ease;
}

.menu-link:hover,
.menu-link:focus-visible {
    background-color: #f8fafc;
    color: #2563eb;
}

.menu-link:focus-visible {
    outline: 2px solid #2563eb;
    outline-offset: -2px;
}

/* Backdrop Overlay */
.menu-overlay {
    position: fixed;
    inset: 0;
    background-color: rgba(15, 23, 42, 0.25);
    z-index: 20;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.menu-overlay.closed {
    opacity: 0;
    pointer-events: none;
    visibility: hidden;
}

.menu-overlay.open {
    opacity: 1;
    pointer-events: auto;
    visibility: visible;
}
