body {
    font-family: 'Inter', sans-serif;
    background-color: var(--primary-background);
    margin: 0;
    padding: 0;
    height: 100vh;
}
html { scroll-behavior: smooth; }

/* - - - - - Navigation Bar - - - - - - */
header {
    font-size: 0.86em;
    background-color: transparent;
    border-bottom: 2px solid var(--grid-line);
    padding: 0px 20px;
    position: fixed;
    width: 100%;
    top: 0;
    left: 0;
    z-index: 1000;
}
nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: transparent;
    backdrop-filter: blur(30px);
}
nav ul {
    list-style-type: none;
    padding: 0;
    display: flex;
}
nav ul li { margin: 5px 15px; }
nav ul li a {
    color: var(--light-gray);
    text-decoration: none;
    font-size: .875rem;
    line-height: 1.25rem;
    font-weight: 400;
}
nav ul li a.active {
    padding: 8px 15px;
    border-radius: 30px;
    background-image: linear-gradient(to bottom right, var(--primary-blue), var(--secondary-blue));
    color: var(--primary-background);
}
nav ul li a:hover {
    color: var(--dark-gray);
    font-weight: bold;
}

/* - - - - - Social Media & Utility Cluster - - - - - - */
.social-icons {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    gap: 20px;
    flex-wrap: wrap;
}
.social-icons a, .theme-link {
    color: var(--dark-gray);
    font-size: 1.5em;
    text-decoration: none;
    transition: transform 0.3s ease, color 0.3s ease;
    margin-left: 0;
}
.social-icons a:hover, .theme-link:hover {
    color: var(--secondary-blue);
    transform: scale(1.1);
}
#theme-icon { font-size: 0.9em; }
body.dark-mode #theme-icon.fa-sun { color: #ffcc00; }

/* - - - - - Background Grid System - - - - - */
.grid-background-container {
    position: fixed;
    top: 0; left: 0;
    width: 100vw; height: 100vh;
    z-index: -1;
    pointer-events: none;
    background-color: var(--primary-background);
    overflow: hidden;
}
.grid-pattern {
    position: absolute;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background-size: 30px 30px;
    background-image:
            linear-gradient(to right, var(--grid-line) 1px, transparent 1px),
            linear-gradient(to bottom, var(--grid-line) 1px, transparent 1px);
}
.grid-base {
    opacity: 0.5;
    mask-image: radial-gradient(circle at center, black 0%, transparent 80%);
    -webkit-mask-image: radial-gradient(circle at center, black 0%, transparent 80%);
}
.grid-highlight {
    opacity: 1;
    mask-image: radial-gradient(500px circle at var(--mouse-x, 50%) var(--mouse-y, 50%), black 0%, transparent 100%);
    -webkit-mask-image: radial-gradient(600px circle at var(--mouse-x, 50%) var(--mouse-y, 50%), black 0%, transparent 100%);
}

@media screen and (max-width: 768px) {
    nav { flex-direction: column; padding-top: 10px; padding-bottom: 10px; }
    nav ul { margin-bottom: 10px; flex-wrap: wrap; justify-content: center; }
    .social-icons { justify-content: center; width: 100%; margin-top: 10px; }
    header { position: relative; }
}