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

body {
    background-color: #000;
    color: #fff;
    font-family: Ariel, sans-serif;
    overflow-x: hidden;
    min-height: 100vh;
}

a {
    text-decoration: none;
}

p {
    font-family: 'Optima', serif;
}

/* Matrix Background Canvas */
#matrix-bg {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    opacity: 0.15;
}

.header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 30px 40px;
    border-bottom: 2px solid #fff;
    background-color: transparent;
}

.title {
    font-size: 4.5em;
    font-weight: lighter;
    color: #fff;
}

.email-link {
    font-size: 4rem;
    color: #fff;
    text-decoration: none;
    transition: transform 0.3s ease;
}

.email-link:hover {
    transform: scale(1.1);
}

/* Navigation */
.top-nav {
    display: grid;
    justify-items: center;
    gap: 1rem;
    width:100%;
    height: 60px;
    border-bottom: 2px solid #fff;
    grid-template-columns: repeat(4, 1fr);
}

.top-nav a {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100%;
}

.top-nav h1 {
    font-weight: lighter;
    font-size: 2rem;
}

/* Top Navigation Button Backgrounds */
.navig-button {
    transition: opacity 0.3s ease;
    color: white;
    text-transform: uppercase;
}

.navig-button:hover {
    opacity: 0.8;
}

.container {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    padding: 40px;
    padding-top: 0;
    position: relative;
    z-index: 1;
    max-width: 1400px;
    margin: 0 auto;
}

.profile-section {
    display: flex;
    gap: 10px;
    width: 100%;
    margin-left: 0;
    z-index: 10;
    position: relative;
}

.profile-image {
    width: 18%;
}

.profile-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.main-title img {
    position: relative;
    max-width: 80%;
    width: auto;
}

.navigation {
    display: flex;
    gap: 40px;
    flex-wrap: wrap;
    justify-content: flex-start;
    width: 100%;
    z-index: 100; /* High z-index to ensure clickability */
    position: relative;
}

.nav-button {
    width: 280px;
    height: 100px;
    border: 1px solid #fff;
    background: transparent;
    color: #fff;
    font-size: 2rem;
    font-weight: lighter;
    font-family: "Roboto Thin", sans-serif;
    text-transform: uppercase;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    z-index: 101; /* Ensure individual buttons are above everything */
    pointer-events: auto; /* Explicitly enable pointer events */
}

.nav-button:hover {
    background-color: #fff;
    color: #000;
    transform: scale(1.05);
}

.nav-button:active {
    transform: scale(0.98);
}

.spider-web {
    position: absolute;
    top: -20%;
    right: -10%;
    width: 900px;
    height: 900px;
    opacity: 0.4;
    z-index: 0;
    pointer-events: none; /* Prevent spider web from blocking clicks */
}

.spider-web img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.spider {
    position: absolute;
    top: -200px;
    right: -10%;
    width: 800px;
    z-index: 1;
    rotate: 13deg;
    pointer-events: none; /* Prevent spider from blocking clicks */
}

.spider img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

/* Glitch Animation Keyframes */
@keyframes glitch {
    0% { transform: translate(0); }
    20% { transform: translate(-2px, 2px); }
    40% { transform: translate(-2px, -2px); }
    60% { transform: translate(2px, 2px); }
    80% { transform: translate(2px, -2px); }
    100% { transform: translate(0); }
}

/* Cursor Trail Effect */
.cursor-trail {
    position: fixed;
    width: 2px;
    height: 2px;
    background: #00ff00;
    pointer-events: none;
    z-index: 9999;
    box-shadow: 0 0 5px #00ff00;
}

@media (max-width: 1200px) {
    .container {
        padding: 30px;
    }

    .profile-image {
        width: 140px;
        height: 140px;
    }

    .main-title img {
        max-height: 100px;
    }

    .nav-button {
        width: 220px;
        height: 80px;
        font-size: 1.6rem;
    }

    .spider-web {
        width: 400px;
        height: 400px;
    }

    .spider {
        width: 160px;
        height: 160px;
        top: 120px;
        right: 120px;
    }
}

@media (max-width: 768px) {
    .profile-section {
        flex-direction: column;
        gap: 30px;
        align-items: center;
        justify-content: center;
    }

    .profile-image {
        width: 120px;
        height: 120px;
    }

    .main-title img {
        max-height: 80px;
    }

    .navigation {
        gap: 20px;
        justify-content: center;
    }

    .nav-button {
        width: 180px;
        height: 70px;
        font-size: 1.4rem;
    }

    .spider-web, .spider {
        display: none;
    }
}