:root {
    --primary-color: rgb(25, 25, 25);
    --secondary-color: rgba(70, 70, 70, 0.8);
}

*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

/* ── Sticky footer layout ── */
html, body {
    min-height: 100vh;
}

body {
    display: flex;
    flex-direction: column;
    background-color: var(--primary-color);
    background-image: url('../Images/halftoneGradient1.png');
    background-size: cover;
    background-attachment: fixed;
    background-position: center;
    color: rgb(200, 200, 200);
}

main {
    flex: 1; /* pushes footer to bottom on short pages */
}

/* ── Header ── */
header {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 8px;
    background-color: var(--secondary-color);
    box-shadow: inset 0 0 10px rgba(0, 0, 0, 0.75);
    border-radius: 5px;
    margin: 5px;
    margin-top: 15px;
    padding: 12px 16px;
    z-index: 1;
    transition: filter 0.3s ease;
}

header:hover {
    filter: drop-shadow(0 0 10px rgba(255, 255, 255, 0.6));
    border: 1px solid rgb(205, 205, 205);
}

/* ── Nav links ── */
.nav-link-center {
    color: rgb(200, 200, 200);
    text-decoration: none;
    border-radius: 10px;
    margin: 0 5px;
    padding: 10px 15px;
    transition: color 0.3s ease, background-color 0.3s ease, padding 0.3s ease;
}

.nav-link-center:hover {
    color: rgb(255, 255, 255);
    background-color: rgba(255, 255, 255, 0.1);
    padding: 15px 20px;
}

@media (max-width: 480px) {
    .nav-link-center {
        padding: 8px 10px;
        font-size: 14px;
    }

    .nav-link-center:hover {
        padding: 8px 10px; /* disable padding grow on mobile — causes layout jumps */
    }
}

/* ── Form ── */
form {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin: 50px auto;
    width: min(100% - 32px, 420px); /* 16px breathing room each side on small screens */
    background-color: var(--secondary-color);
    border-radius: 5px;
    padding: 20px;
    box-shadow: inset 0 0 10px rgba(0, 0, 0, 0.75);
}

form input[type="text"],
form input[type="password"],
form input[type="email"],
form textarea {
    width: 100%;
    padding: 12px 14px;
    margin: 8px 0;
    border: 1px solid transparent;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.05);
    box-shadow: inset 0 0 10px rgba(0, 0, 0, 0.75);
    outline: none;
    font-size: 14px;
    color: rgb(200, 200, 200);
    transition: border-color 0.2s ease, background 0.2s ease;
}

form input[type="text"]:focus,
form input[type="password"]:focus,
form input[type="email"]:focus,
form textarea:focus {
    border-color: rgba(255, 255, 255, 0.5);
    background: rgba(255, 255, 255, 0.1);
    filter: drop-shadow(0 0 5px rgba(255, 255, 255, 0.3));
    transition: border-color 0.2s ease, background 0.2s ease, filter 0.2s ease;
}

form input[type="submit"] {
    width: clamp(80px, 25%, 160px); /* responsive but bounded */
    padding: 10px;
    border: none;
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.15);
    box-shadow: inset 0 0 10px rgba(0, 0, 0, 0.75);
    color: #fff;
    cursor: pointer;
    transition: background 0.2s ease, filter 0.2s ease;
}

form input[type="submit"]:hover {
    background: rgba(255, 255, 255, 0.25);
    filter: drop-shadow(0 0 5px rgba(255, 255, 255, 0.4));
}

footer {
    background-color: rgb(0, 0, 0);
    border-top: 1px solid rgb(255, 255, 255);
    padding: 32px 40px 20px;
    color: rgb(200, 200, 200);
}

.footer-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: 32px;
    margin-bottom: 28px;
}

.footer-section h4 {
    font-size: 13px;
    font-weight: 500;
    color: rgb(255, 255, 255);
    letter-spacing: 0.08em;
    text-transform: uppercase;
    margin: 0 0 12px;
}

.footer-section p,
.footer-section a {
    font-size: 13px;
    color: rgb(160, 160, 160);
    margin: 0 0 6px;
    text-decoration: none;
    display: block;
    transition: color 0.2s ease;
}

.footer-section a:hover {
    color: rgb(255, 255, 255);
}

.social-row {
    display: flex;
    gap: 12px;
    margin-top: 4px;
    flex-wrap: wrap;
}

.social-row a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 6px;
    color: rgb(160, 160, 160);
    font-size: 16px;
    transition: border-color 0.2s ease, color 0.2s ease;
}

.social-row a:hover {
    border-color: rgb(255, 255, 255);
    color: rgb(255, 255, 255);
}

.social-row img {
    width: 16px;
    height: 16px;
}

.footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding-top: 16px;
    font-size: 12px;
    color: rgb(100, 100, 100);
    text-align: center;
}

@media (max-width: 480px) {
    footer {
        padding: 24px 20px 16px;
    }

    .footer-grid {
        grid-template-columns: 1fr; /* stack columns on mobile */
        gap: 24px;
    }
}

@media (max-height: 500px) {
    header {
        padding: 6px 16px; /* shrink header on landscape mobile */
        margin-top: 5px;
    }
}