body::before {
    content: '';
    position: fixed;
    inset: 0;
    z-index: 9999;
    pointer-events: none;
    opacity: 0.035;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)'/%3E%3C/svg%3E");
    background-repeat: repeat;
    background-size: 128px 128px;
}

body::after {
    content: '';
    position: fixed;
    inset: 0;
    z-index: 9998;
    pointer-events: none;
    background: repeating-linear-gradient(
        0deg,
        transparent,
        transparent 2px,
        rgba(0, 0, 0, 0.07) 2px,
        rgba(0, 0, 0, 0.07) 4px
    );
}

main > header {
    position: relative;
    overflow: hidden;
    padding: 3rem 0 2rem;
}

main > header::before {
    content: '';
    position: absolute;
    inset: -50%;
    background-image:
        linear-gradient(rgba(0, 242, 255, 0.04) 1px, transparent 1px),
        linear-gradient(90deg, rgba(0, 242, 255, 0.04) 1px, transparent 1px);
    background-size: 40px 40px;
    animation: grid-drift 20s linear infinite;
    pointer-events: none;
    z-index: 0;
}

main > header::after {
    content: '';
    position: absolute;
    inset: 0;
    /* This adds a 40% dark tint to the top to increase text contrast */
    background: linear-gradient(
        to bottom,
        rgba(13, 17, 23, 0.4) 0%,
        transparent 50%,
        #0d1117 100%
    );
    pointer-events: none;
    z-index: 1;
}

main > header > * {
    position: relative;
    z-index: 2;
}

@keyframes grid-drift {
    0%   { transform: translate(0, 0); }
    100% { transform: translate(40px, 40px); }
}


h1 {
    position: relative;
}

h1::before,
h1::after {
    content: attr(data-text);
    position: absolute;
    inset: 0;
    opacity: 0;
    pointer-events: none;
}

/* Update these sections in your effects.css */

h1:hover {
    animation: glitch 0.4s steps(2) forwards;
    color: #ffffff;
    text-shadow: 
        0 0 10px rgba(13, 17, 23, 1), 
        0 0 20px rgba(13, 17, 23, 0.8);
    z-index: 10;
}
h1:hover::before {
    animation: glitch-red 0.4s steps(2) forwards;
    color: #ff0055;
    /* Move red further left to separate from cyan */
    transform: translateX(-5px); 
    clip-path: polygon(0 20%, 100% 20%, 100% 40%, 0 40%);
    opacity: 0.8;
}

h1:hover::after {
    animation: glitch-cyan 0.4s steps(2) forwards;
    color: #00f2ff;
    /* Move cyan further right to separate from red */
    transform: translateX(5px);
    clip-path: polygon(0 60%, 100% 60%, 100% 80%, 0 80%);
    opacity: 0.8;
}

@keyframes glitch {
    0%, 100% { transform: translateX(0) skew(0deg); }
    20%      { transform: translateX(-2px) skew(-1deg); }
    40%      { transform: translateX(2px) skew(1deg); }
    60%      { transform: translateX(-1px); }
    80%      { transform: translateX(1px) skew(0.5deg); }
}

@keyframes glitch-red {
    0%, 100% { opacity: 0; }
    20%, 60% { opacity: 0.7; }
    40%, 80% { opacity: 0; }
}

@keyframes glitch-cyan {
    0%, 100% { opacity: 0; }
    30%, 70% { opacity: 0.7; }
    50%, 90% { opacity: 0; }
}

/* ============================================
   5. CARD SCAN LINE ON HOVER
   ============================================ */
article {
    position: relative;
    overflow: hidden;
}

article::before {
    content: '';
    position: absolute;
    left: 0;
    right: 0;
    top: -2px;
    height: 2px;
    background: linear-gradient(
        90deg,
        transparent 0%,
        #00f2ff 30%,
        rgba(0, 242, 255, 0.8) 50%,
        #00f2ff 70%,
        transparent 100%
    );
    box-shadow: 0 0 12px rgba(0, 242, 255, 0.8);
    pointer-events: none;
    z-index: 10;
    opacity: 0;
}

article:hover::before {
    animation: scan-line 0.6s ease-in forwards;
}

@keyframes scan-line {
    0%   { top: -2px;  opacity: 1; }
    100% { top: 102%;  opacity: 0; }
}

/* ============================================
   6. CORNER BRACKET ACCENT ON HOVER
   ============================================ */
article::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 18px;
    height: 18px;
    border-top: 2px solid #00f2ff;
    border-left: 2px solid #00f2ff;
    border-radius: 14px 0 0 0;
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
    z-index: 5;
}

article:hover::after {
    opacity: 1;
}