:root {
    --primary: #6e17ff;
    --secondary: #00d9ff;
    --dark: #0f0f1a;
    --darker: #060611;
    --light: #e0e0ff;
}

body {
    background-color: var(--darker);
    color: var(--light);
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    overflow-x: hidden;
    margin: 0;
    padding: 0;
}

::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: var(--darker);
}

::-webkit-scrollbar-thumb {
    background: var(--primary);
    border-radius: 10px;
}

.neon-text {
    text-shadow: 0 0 5px rgba(110, 23, 255, 0.7),
                 0 0 10px rgba(110, 23, 255, 0.5),
                 0 0 15px rgba(110, 23, 255, 0.3);
}

.neon-box {
    box-shadow: 0 0 5px rgba(0, 217, 255, 0.7),
                0 0 10px rgba(0, 217, 255, 0.5),
                0 0 15px rgba(0, 217, 255, 0.3);
}

.cyber-gradient {
    background: linear-gradient(45deg, var(--primary), var(--secondary));
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

#particles-js {
    position: absolute;
    width: 100%;
    height: 100%;
    z-index: 0;
    top: 0;
    left: 0;
    pointer-events: none;
}

section, nav, footer {
    position: relative;
    z-index: 1;
}

.glitch {
    position: relative;
}

.animate-glitch {
    animation: glitch 1s linear infinite;
}

@keyframes glitch {
    2%, 64% { transform: translate(2px, 0) skew(0deg); }
    4%, 60% { transform: translate(-2px, 0) skew(0deg); }
    62% { transform: translate(0, 0) skew(5deg); }
}

.glitch:before,
.glitch:after {
    content: attr(data-text);
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--darker);
    overflow: hidden;
}

.glitch:before {
    left: 2px;
    text-shadow: -2px 0 var(--secondary);
    clip: rect(44px, 450px, 56px, 0);
    animation: glitch-anim 5s infinite linear alternate-reverse;
}

.glitch:after {
    left: -2px;
    text-shadow: -2px 0 var(--primary);
    clip: rect(44px, 450px, 56px, 0);
    animation: glitch-anim2 5s infinite linear alternate-reverse;
}

@keyframes glitch-anim {
    0% { clip: rect(34px, 9999px, 28px, 0); }
    20% { clip: rect(78px, 9999px, 15px, 0); }
    40% { clip: rect(2px, 9999px, 4px, 0); }
    60% { clip: rect(49px, 9999px, 98px, 0); }
    80% { clip: rect(17px, 9999px, 23px, 0); }
    100% { clip: rect(53px, 9999px, 69px, 0); }
}

@keyframes glitch-anim2 {
    0% { clip: rect(31px, 9999px, 91px, 0); }
    20% { clip: rect(45px, 9999px, 8px, 0); }
    40% { clip: rect(65px, 9999px, 71px, 0); }
    60% { clip: rect(16px, 9999px, 2px, 0); }
    80% { clip: rect(87px, 9999px, 93px, 0); }
    100% { clip: rect(99px, 9999px, 12px, 0); }
}

.hexagon-container {
    display: flex;
    flex-wrap: wrap;
    width: 100%;
    justify-content: center;
    margin: 0 auto;
    overflow: hidden;
}

.hexagon {
    position: relative;
    width: 250px;
    height: 280px;
    margin: 20px 10px;
    background-color: var(--dark);
    clip-path: polygon(50% 0%, 100% 25%, 100% 75%, 50% 100%, 0% 75%, 0% 25%);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 2rem;
    transition: all 0.3s ease;
    cursor: pointer;
    text-align: center;
}

.hexagon:hover {
    transform: translateY(-10px);
    background-color: rgba(110, 23, 255, 0.2);
    box-shadow: 0 0 15px rgba(110, 23, 255, 0.5);
}

.hexagon:hover i {
    color: var(--secondary);
    transform: scale(1.2);
}

.hexagon i {
    font-size: 3rem;
    margin-bottom: 1rem;
    color: var(--primary);
    transition: all 0.3s ease;
}

.terminal {
    background-color: var(--dark);
    border-radius: 8px;
    border: 1px solid var(--primary);
    padding: 1.5rem;
    padding-top: 45px;
    position: relative;
    font-family: 'Courier New', monospace;
    overflow: hidden;
    height: 100%;
}

.terminal-header {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 30px;
    background-color: var(--primary);
    border-radius: 8px 8px 0 0;
    display: flex;
    align-items: center;
    padding: 0 10px;
}

.terminal-circle {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    margin-right: 6px;
}

.terminal-content { }

.terminal-line {
    display: block;
    line-height: 1.5;
    margin-bottom: 0.5rem;
    word-break: break-all;
}

.terminal-prompt::before {
    content: "$ ";
    color: var(--secondary);
}

.cursor {
    display: inline-block;
    width: 10px;
    height: 18px;
    background-color: var(--secondary);
    margin-left: 5px;
    animation: blink 1s infinite;
    vertical-align: middle;
}

@keyframes blink {
    0%, 50% { opacity: 1; }
    51%, 100% { opacity: 0; }
}

.floating {
    animation: floating 3s ease-in-out infinite;
}

@keyframes floating {
    0% { transform: translate(0, 0px); }
    50% { transform: translate(0, 15px); }
    100% { transform: translate(0, 0px); }
}

.radar-container {
    position: relative;
    width: 300px;
    height: 300px;
    margin: 2rem auto;
}

.radar-screen {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    background-color: rgba(15, 15, 26, 0.7);
    border: 2px solid var(--primary);
    position: relative;
    overflow: hidden;
}

.radar-screen::before {
    content: "";
    position: absolute;
    top: 50%;
    left: 50%;
    width: 50%;
    height: 2px;
    background: linear-gradient(to right, transparent, var(--secondary));
    transform-origin: left center;
    animation: radar-sweep 3s infinite linear;
    z-index: 2;
}

.radar-screen::after {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    border-radius: 50%;
    box-shadow: inset 0 0 20px rgba(0, 217, 255, 0.5);
    z-index: 1;
}

@keyframes radar-sweep {
    from { transform: rotate(-90deg) translateX(-50%); }
    to { transform: rotate(270deg) translateX(-50%); }
}

.radar-ping {
    position: absolute;
    width: 8px;
    height: 8px;
    background-color: var(--secondary);
    border-radius: 50%;
    box-shadow: 0 0 10px var(--secondary);
    z-index: 3;
}

.ping-1 { top: 30%; left: 70%; animation: ping 3s infinite 0.5s; }
.ping-2 { top: 60%; left: 40%; animation: ping 4s infinite 1s; }
.ping-3 { top: 45%; left: 25%; animation: ping 2.5s infinite 1.5s; }

@keyframes ping {
    0% { transform: scale(1); opacity: 1; }
    70% { transform: scale(2.5); opacity: 0; }
    100% { transform: scale(1); opacity: 0; }
}

.code-border {
    border: 1px solid var(--primary);
    position: relative;
}

.code-border::before,
.code-border::after {
    content: "";
    position: absolute;
    width: 20px;
    height: 20px;
    border-color: var(--primary);
    border-style: solid;
    z-index: 1;
}

.code-border::before { top: -5px; left: -5px; border-width: 2px 0 0 2px; }
.code-border::after { bottom: -5px; right: -5px; border-width: 0 2px 2px 0; }

.timeline {
    position: relative;
    max-width: 1200px;
    margin: 0 auto;
}

.timeline::after {
    content: '';
    position: absolute;
    width: 2px;
    background-color: var(--primary);
    top: 0;
    bottom: 0;
    left: 50%;
    margin-left: -1px;
    z-index: 0;
}

.timeline-item {
    padding: 10px 40px;
    position: relative;
    width: 50%;
    box-sizing: border-box;
    margin-bottom: 30px;
}

.timeline-item::after {
    content: '';
    position: absolute;
    width: 20px;
    height: 20px;
    background-color: var(--darker);
    border: 4px solid var(--primary);
    top: 15px;
    border-radius: 50%;
    z-index: 2;
}

.timeline-left { left: 0; }
.timeline-right { left: 50%; }

.timeline-left::after { right: -14px; }
.timeline-right::after { left: -14px; }

.timeline-content {
    padding: 20px;
    background-color: var(--dark);
    position: relative;
    border-radius: 6px;
    z-index: 1;
}

@media screen and (max-width: 768px) {
    .timeline::after {
        left: 31px;
    }

    .timeline-item {
        width: 100%;
        padding-left: 70px;
        padding-right: 25px;
    }

    .timeline-item::after {
        left: 18px;
    }

    .timeline-left, .timeline-right {
        left: 0%;
    }

    .timeline-content {
        position: relative;
    }

    .timeline-content::before {
        content: " ";
        height: 0;
        position: absolute;
        top: 22px;
        width: 0;
        z-index: 1;
        left: -15px;
        border: medium solid var(--dark);
        border-width: 10px 10px 10px 0;
        border-color: transparent var(--dark) transparent transparent;
    }

     .timeline-left .timeline-content::before,
     .timeline-right .timeline-content::before {
        left: -15px;
        border-width: 10px 10px 10px 0;
        border-color: transparent var(--dark) transparent transparent;
    }
}

.contact-card {
    background-color: var(--dark);
    border-radius: 10px;
    transition: all 0.3s ease;
    overflow: hidden;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    text-align: center;
    padding: 2rem;
}

.contact-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0, 217, 255, 0.2);
}

.digital-rain {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: -1;
    overflow: hidden;
    opacity: 0.2;
}

.rain-column {
    position: absolute;
    top: -150px;
    width: 1px;
    height: 150px;
    background: linear-gradient(to bottom, transparent, rgba(110, 23, 255, 0.1), var(--primary), var(--secondary), transparent);
    animation: rain-fall linear infinite;
}

@keyframes rain-fall {
    0% { transform: translateY(-150px); }
    100% { transform: translateY(calc(100vh + 150px)); }
}

@media (prefers-reduced-motion: reduce) {
  .glitch, .floating, .radar-screen::before, .radar-ping, .digital-rain, .rain-column, .animate-bounce {
    animation: none !important;
    transition: none !important;
  }
  .glitch:before, .glitch:after {
      display: none;
  }
  .neon-text, .neon-box {
      text-shadow: none;
      box-shadow: none;
  }
}

*:focus-visible {
    outline: 2px solid var(--secondary) !important;
    outline-offset: 2px;
}
