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

body {
    font-family: 'Courier New', Courier, monospace;
    background-color: #121212;
    color: #0f0;
}

/* Header and Navigation Styles */
header {
    padding: 20px;
    text-align: center;
}

nav a {
    color: #0f0;
    text-decoration: none;
    padding: 10px;
    transition: all 0.3s;
}

nav a:hover {
    color: #fff;
    background-color: #333;
}

/* Main Content and Article Styles */
main {
    padding: 40px;
}

.articles {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    grid-gap: 20px;
}

.article {
    background-color: #333;
    padding: 20px;
    border: 1px solid #0f0;
    position: relative;
    overflow: hidden;
}

.article h3 {
    margin-bottom: 10px;
}

/* Fixed hover glow effect */
.article::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: linear-gradient(135deg, rgba(0, 255, 0, 0.1), transparent);
    transform: scaleX(0);
    transition: transform 0.5s;
    pointer-events: none;
    z-index: -1;
}

.article:hover::before {
    transform: scaleX(1);
}

/* Additional Styles and Modifications */
.hero {
    background-color: #333;
    padding: 40px;
    text-align: center;
    margin-bottom: 40px;
}

.hero h1 {
    font-size: 3rem;
    margin-bottom: 20px;
}

.hero p {
    font-size: 1.5rem;
}

#about,
#contact {
    padding: 40px;
    margin-bottom: 40px;
}

#about h2,
#contact h2 {
    margin-bottom: 20px;
}

/* Footer Styles */
footer {
    padding: 20px;
    text-align: center;
    margin-top: 40px;
    border-top: 1px solid #0f0;
}

.back-to-top {
    display: none;
    position: fixed;
    bottom: 20px;
    right: 20px;
    background-color: #333;
    color: #0f0;
    border: 1px solid #0f0;
    padding: 10px 20px;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.3s;
}

.back-to-top:hover {
    background-color: #0f0;
    color: #121212;
}
/* Typing effect for header text */
@keyframes typing {
    0% {
        width: 0;
    }
    80% {
        width: 100%;
    }
    100% {
        width: 100%;
    }
}

@keyframes blink {
    0%, 80% {
        border-right: 0.1em solid #0f0;
    }
    100% {
        border-right: none;
    }
}

h1.typing {
    position: relative;
    overflow: hidden;
    white-space: nowrap;
    animation: typing 4s steps(40, end) 1 forwards, blink 4s steps(40, end) 1 forwards;
}

/* Glitch effect for header text */
@keyframes glitch {
    0%, 100% {
        transform: translate(0);
    }
    7% {
        transform: translate(-2px, 2px);
    }
    15% {
        transform: translate(2px, -2px);
    }
    22% {
        transform: translate(-1px, 1px);
    }
    28%, 44% {
        transform: translate(1px, -1px);
    }
}

h1.glitch {
    position: relative;
    color: #0f0;
    animation: glitch 2s infinite;
}

h1.glitch::before,
h1.glitch::after {
    content: attr(data-text);
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    animation: glitch 2s infinite;
}

h1.glitch::before {
    color: rgba(255, 0, 0, 0.6);
    clip-path: polygon(0 0, 100% 0, 100% 33%, 0 33%);
}

h1.glitch::after {
    color: rgba(0, 0, 255, 0.6);
    clip-path: polygon(0 67%, 100% 67%, 100% 100%, 0 100%);
}
