/* core.css – global base styles */

* {
    box-sizing: border-box;
}

/* Root */

html {
    margin: 0;
    padding: 0;
    background: #000; /* prevents white bounce flash */
}

body {
    margin: 0;
    padding: 0;
    font-family: system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
    background-image: url("../images/pk.StarFieldBackground.jpg");
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    color: #111111;
    font-size: 14px;
    line-height: 1.5;
}

/* Headings */

h1,
h2,
h3,
h4,
h5,
h6 {
    margin-top: 0;
    margin-bottom: 0.5rem;
    font-weight: 700;
}

h1 {
    font-size: 24px;
}

h2 {
    font-size: 20px;
}

h3 {
    font-size: 18px;
}

h4 {
    font-size: 16px;
}

/* Text + lists */

p {
    margin-top: 0;
    margin-bottom: 0.75rem;
}

ul {
    margin-top: 0;
    padding-left: 1.2rem;
}

/* Links */

a {
    color: inherit;
    text-decoration: none;
}

a:hover {
    text-decoration: underline;
}

/* Images */

img {
    max-width: 100%;
    display: block;
}

/* Top navigation */

.top-nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

/* Left and right nav sections */
.top-nav-left,
.top-nav-right {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

/* Make sure separators only live in the left nav */
.top-nav-left .sep {
    opacity: 0.7;
}

.top-nav .btn {
    margin-left: 0.5rem;
}

.top-nav-container {
    max-width: 900px;   /* match .page width */
    margin: 0 auto;     /* center container */
    padding: 24px 24px; /* match .page side padding */
    position: relative; /* anchor for absolute dropdown */
    z-index: 40;
}

.top-nav {
    font-size: 0.95rem;
}

.top-nav a {
    color: #ffffff;
}

.top-nav .sep {
    color: #ffffff;
    margin: 0 0.4rem;
}

/* Active nav link */

.nav-link-active {
    font-weight: 700;
    text-decoration: underline;
}

/* --- Hamburger button (mobile) --- */

.nav-hamburger {
    display: none; /* desktop default */
    position: relative;
    width: 36px;
    height: 36px;
    padding: 0;
    margin-right: 4px;
    border-radius: 50%; /* perfect circle */
    border: 1px solid rgba(255, 255, 255, 0.6);
    background: rgba(0, 0, 0, 0.55);
    cursor: pointer;

    /* kill default blue focus ring / system styles */
    outline: none;
    -webkit-appearance: none;
    -webkit-tap-highlight-color: transparent;
}

.nav-hamburger:focus,
.nav-hamburger:active {
    outline: none;
    box-shadow: none;
}

/* The three lines */

.nav-hamburger span {
    position: absolute;
    left: 50%;
    top: 50%;
    width: 18px;
    height: 2px;
    margin-left: -9px;  /* center horizontally */
    margin-top: -1px;   /* center vertically */
    border-radius: 999px;
    background: #ffffff;
    transition:
        transform 0.18s ease,
        opacity 0.18s ease;
}

/* stacked as top / middle / bottom via translateY */

.nav-hamburger span:nth-child(1) {
    transform: translateY(-6px);
}
.nav-hamburger span:nth-child(2) {
    transform: translateY(0);
}
.nav-hamburger span:nth-child(3) {
    transform: translateY(6px);
}

/* When menu is open, turn into an “X” */

.top-nav-container.nav-open .nav-hamburger span:nth-child(1) {
    transform: translateY(0) rotate(45deg);
}
.top-nav-container.nav-open .nav-hamburger span:nth-child(2) {
    opacity: 0;
}
.top-nav-container.nav-open .nav-hamburger span:nth-child(3) {
    transform: translateY(0) rotate(-45deg);
}

/* Footer */

.footer {
    text-align: center;
    margin-top: 3rem;
    padding: 2rem 0;
    opacity: 0.9;
    font-size: 0.9rem;
}

.footer-text {
    margin-bottom: 1rem;
    line-height: 1.5;
    color: #ffffff;
}

.footer-nav {
    margin-top: 0.5rem;
    font-size: 0.95rem;
}

.footer-nav a {
    color: #ffffff;
    transition: opacity 0.2s ease;
}

.footer-nav a:hover {
    opacity: 0.7;
}

.footer-nav .sep {
    margin: 0 0.4rem;
    opacity: 0.6;
}

/* --- Mobile nav layout --- */
@media (max-width: 720px) {
    .nav-hamburger {
        display: inline-flex;
        align-items: center;
        justify-content: center;
    }

    /* Hide inline nav links by default on mobile */
    .top-nav-left {
        display: none;
        position: absolute;
        left: 0;
        right: 0;
        top: 100%;              /* start right below nav container */
        margin-top: -14px;        /* small gap so circle isn’t covered */
        flex-direction: column;
        gap: 0;

        /* ↓ tweak this first value to move menu items up/down */
        padding: 4px 16px 12px 16px;

        background: rgba(5, 5, 20, 0.96);
        
        border-top-left-radius: 0;     /* 👈 ADD THIS */
        border-top-right-radius: 0;    /* 👈 ADD THIS */
        
        border-bottom-left-radius: 16px;
        border-bottom-right-radius: 16px;
        box-shadow: 0 8px 24px rgba(0, 0, 0, 0.45);
        z-index: 40;

        max-height: calc(100vh - 56px);
        overflow-y: auto;
    }

    .top-nav-container.nav-open .top-nav-left {
        display: flex;
    }

    .top-nav-left a {
        padding: 6px 0;
        display: block;
    }

    .top-nav-left .sep {
        display: none;
    }
}
