/* Contains global styles for my site*/

/* CSS Variables for consistent theming across the site */
:root {
  --font-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --font-mono: 'SF Mono', SF Mono, Consolas, "Liberation Mono", Menlo, Courier, monospace;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}
body {
    font-family: var(--font-sans);
    min-height: 100vh;
    width: 100%;
    margin: 0 auto;
}

.container {
    width: 100%;
    margin-left: auto;
    margin-right: auto;
    padding-left: 0.5rem;
    padding-right: 0.5rem;
}

/* Header styles */
.page-header {
    grid-area: header;
    position: relative;
    z-index: 10;
    border-bottom: 1px solid #e0e0e0;
}

/*Hidden checkbox for toggling the menu*/
.page-header #menu-toggle {
    display: none;
}

/*Flex container for header contents*/
.page-header .header-items {
    height: 100%;
    display: flex;
    z-index: 3;
    justify-content: space-between;
    padding: 0 3rem 0 2rem;
    align-items: center;
    position: relative;
    background: white;
}

/* Logo and navigation size */
#logo, #nav-icon{
    width: 1.625rem;
    height: 1.625rem;
}

.nav-button{
    cursor: pointer;
}

#nav-icon {
    transition: transform 0.5s ease;
}

.nav-menu {
    position: absolute;
    width: 100%;
    height: auto;
    min-height: 120px;
    top: 100%;
    
    border-bottom-left-radius: 1rem;
    border-bottom-right-radius: 1rem;
    border-top: none;
    transform: translateY(-100%);
    transition: transform 0.5s ease;
    pointer-events: none;
    overflow: hidden;

    display: flex;
    flex-direction: column;
    padding: 0;
    gap: 0;
    justify-content: flex-start;
    align-items: stretch;
    background: white;
    
}

.nav-menu a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    padding: 1rem 1.5rem;
    font-family: var(--font-mono);
    text-decoration: none;
    color: #fff;
    background: gray;
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
}

.nav-menu a:last-child {
    border-bottom: none;
}
/* Using a Next Combinator selector to toggle the menu and rotate the nav-icon */
#menu-toggle:checked + .header-items .nav-button #nav-icon {
    transform: rotate(-180deg);
}
#menu-toggle:checked + .header-items + .nav-menu {
    transform: translateY(0);
    pointer-events: auto;
}