:root {
    --primary-red: #7a0000;
    --primary-green: #3c8527;
    --primary-blue: #3b83bd;
    --dark-bg: #0d0d0d;
    --text-color: #e0e0e0;
    --card-bg: rgba(22, 22, 22, 0.7);
    --border-color: rgba(184, 0, 0, 0.3);
}

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

html {
    scroll-behavior: smooth;
}

body {
    background-color: var(--dark-bg);
    color: var(--text-color);
    font-family: 'Roboto Mono', monospace;
    overflow-x: hidden;
}

#matrix-canvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    opacity: 0.3;
}

header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    padding: 1rem 5%;
    background: rgba(13, 13, 13, 0.7);
    backdrop-filter: blur(10px);
    z-index: 10;
    border-bottom: 1px solid var(--border-color);
}

nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary-red);
    text-shadow: 0 0 5px var(--primary-red);
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.logo-img {
    height: 40px;
    width: auto;
    filter: drop-shadow(0 0 4px var(--primary-red));
}

.nav-link {
    text-decoration: none;
    color: var(--text-color);
    transition: color 0.3s ease, text-shadow 0.3s ease;
}

.nav-link:hover {
    color: var(--primary-red);
    text-shadow: 0 0 5px var(--primary-red);
}

.nav-mine-link {
    text-decoration: none;
    color: var(--text-color);
    transition: color 0.3s ease, text-shadow 0.3s ease;
}

.nav-mine-link:hover {
    color: var(--primary-green);
    text-shadow: 0 0 5px var(--primary-green);
}

.nav-aman-link {
    text-decoration: none;
    color: var(--text-color);
    transition: color 0.3s ease, text-shadow 0.3s ease;
}

.nav-aman-link:hover {
    color: var(--primary-blue);
    text-shadow: 0 0 5px var(--primary-blue);
}

.nav-menu {
    list-style: none;
    display: flex;
    gap: 2rem;
}

.hamburger {
    display: none;
    cursor: pointer;
    background: transparent;
    border: none;
    padding: 0;
    z-index: 1001;
}

.bar {
    display: block;
    width: 25px;
    height: 3px;
    margin: 5px auto;
    -webkit-transition: all 0.3s ease-in-out;
    transition: all 0.3s ease-in-out;
    background-color: var(--text-color);
}

main {
    padding: 0 8%;
}

.hero {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
}

.hero h1 {
    font-size: 3.5rem;
    margin-bottom: 1rem;
    color: var(--text-color);
    font-weight: 700;
}

.hero p {
    font-size: 1.2rem;
    color: #a0a0a0;
}

.glitch {
    position: relative;
    text-shadow: 0.05em 0 0 rgba(255,0,0,.75),
               -0.025em -0.05em 0 rgba(0,255,0,.75),
                0.025em 0.05em 0 rgba(0,0,255,.75);
    animation: glitch 500ms infinite;
}

.glitch:before,
.glitch:after {
    content: attr(data-text);
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--dark-bg);
    overflow: hidden;
    clip: rect(0, 900px, 0, 0);
}
.glitch:before {
    left: -2px;
    text-shadow: -1px 0 var(--primary-red);
    animation: glitch-anim-1 2s infinite linear alternate-reverse;
}
.glitch:after {
    left: 2px;
    text-shadow: 1px 0 #00e5ff;
    animation: glitch-anim-2 1s infinite linear alternate-reverse;
}

@keyframes glitch {
  0% { text-shadow: 0.05em 0 0 rgba(255,0,0,.75), -0.05em -0.025em 0 rgba(0,255,0,.75), -0.025em 0.05em 0 rgba(0,0,255,.75); }
  14% { text-shadow: 0.05em 0 0 rgba(255,0,0,.75), -0.05em -0.025em 0 rgba(0,255,0,.75), -0.025em 0.05em 0 rgba(0,0,255,.75); }
  15% { text-shadow: -0.05em -0.025em 0 rgba(255,0,0,.75), 0.025em 0.025em 0 rgba(0,255,0,.75), -0.05em -0.05em 0 rgba(0,0,255,.75); }
  49% { text-shadow: -0.05em -0.025em 0 rgba(255,0,0,.75), 0.025em 0.025em 0 rgba(0,255,0,.75), -0.05em -0.05em 0 rgba(0,0,255,.75); }
  50% { text-shadow: 0.025em 0.05em 0 rgba(255,0,0,.75), 0.05em 0 0 rgba(0,255,0,.75), 0 -0.05em 0 rgba(0,0,255,.75); }
  99% { text-shadow: 0.025em 0.05em 0 rgba(255,0,0,.75), 0.05em 0 0 rgba(0,255,0,.75), 0 -0.05em 0 rgba(0,0,255,.75); }
  100% { text-shadow: -0.025em 0 0 rgba(255,0,0,.75), -0.025em -0.025em 0 rgba(0,255,0,.75), -0.025em -0.05em 0 rgba(0,0,255,.75); }
}

@keyframes glitch-anim-1 { 0% { clip: rect(132px, 9999px, 119px, 0); } 100% { clip: rect(32px, 9999px, 59px, 0); } }
@keyframes glitch-anim-2 { 0% { clip: rect(85px, 9999px, 99px, 0); } 100% { clip: rect(25px, 9999px, 115px, 0); } }


.content-section {
    padding: 6rem 0;
    border-bottom: 1px solid var(--border-color);
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

.content-section.is-visible {
    opacity: 1;
    transform: translateY(0);
}

.content-section:last-of-type {
    border-bottom: none;
}

.content-section h2 {
    font-size: 2.5rem;
    margin-bottom: 2rem;
    text-align: center;
}

.red-text {
    color: var(--primary-red);
}

#about p {
    font-size: 1.1rem;
    line-height: 1.8;
    max-width: 800px;
    margin: 0 auto;
    text-align: center;
}

.skills-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.5rem;
}

.skill-card {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    padding: 2rem;
    border-radius: 8px;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    backdrop-filter: blur(5px);
}

.skill-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 0 20px var(--border-color);
}

.skill-card h3 {
    color: var(--primary-red);
    font-size: 1.3rem;
    margin-bottom: 1rem;
}

.skill-card p {
    line-height: 1.6;
    color: #c0c0c0;
}

#contact {
    text-align: center;
}

#contact p {
    font-size: 1.1rem;
    margin-bottom: 2rem;
}

.contact-links {
    display: flex;
    justify-content: center;
    gap: 1rem;
    flex-wrap: wrap;
}

.btn {
    display: inline-block;
    padding: 0.8rem 1.8rem;
    border: 1px solid var(--primary-red);
    color: var(--primary-red);
    text-decoration: none;
    font-weight: 700;
    border-radius: 4px;
    transition: background-color 0.3s ease, color 0.3s ease;
}

.btn:hover {
    background-color: var(--primary-red);
    color: var(--text-color);
}

footer {
    text-align: center;
    padding: 2rem;
    color: #666;
}

@media (min-width: 600px) {
    .skills-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (min-width: 992px) {
    .skills-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 768px) {
    .hero h1 {
        font-size: 2.5rem;
    }

    .nav-menu {
        position: fixed;
        left: -100%;
        top: 0;
        flex-direction: column;
        background-color: var(--dark-bg);
        width: 100%;
        height: 100vh;
        text-align: center;
        transition: 0.3s;
        gap: 2rem;
        justify-content: center;
        align-items: center;
        z-index: 1000;
        padding: 0;
    }

    .nav-menu.active {
        left: 0;
    }

    .nav-menu li {
        margin: 16px 0;
    }

    .nav-menu .nav-link {
        font-size: 1.5rem;
    }

    .nav-menu .nav-mine-link {
        font-size: 1.5rem;
    }

    .hamburger {
        display: block;
    }

    .hamburger.active .bar:nth-child(1) {
       transform: translateY(8px) rotate(45deg);
    }

    .hamburger.active .bar:nth-child(1)::before {
       content: "";
       position: absolute;
       width: 25px;
       height: 3px;
       background-color: var(--text-color);
       transform: rotate(90deg);
    }
     .hamburger .bar:nth-child(1){
        transition: transform 0.3s ease;
    }
    .hamburger .bar:nth-child(1)::before{
        transition: transform 0.3s ease;
    }

    main {
        padding: 0 5%;
    }

    .content-section {
        padding: 4rem 0;
    }

    .content-section h2 {
        font-size: 2rem;
    }

    .skills-grid {
        grid-template-columns: 1fr;
    }

    .contact-links {
        flex-direction: column;
        align-items: center;
    }

    .btn {
        width: 100%;
        max-width: 280px;
        text-align: center;
    }
}