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

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Courier New', monospace;
    background: var(--darker);
    color: var(--white);
    overflow-x: hidden;
    position: relative;
    user-select: none;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
}

/* Performance optimizations */
* {
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

.feature-card,
.stat-card,
.terminal,
.cube,
.btn,
.nav-link {
    will-change: transform;
    transform: translateZ(0);
    backface-visibility: hidden;
}

:root {
    --primary: #00ff41;
    --secondary: #0f0;
    --dark: #0a0a0a;
    --darker: #000000;
    --white: #ffffff;
    --gray: #1a1a1a;
    --transition-fast: 0.2s ease;
    --transition-medium: 0.3s ease;
    --transition-smooth: 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Courier New', monospace;
    background: var(--darker);
    color: var(--white);
    overflow-x: hidden;
    position: relative;
    user-select: none;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
}

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

.glitch-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 9999;
    animation: glitch-overlay 5s infinite;
}

@keyframes glitch-overlay {
    0%, 100% { opacity: 0; }
    50% {
        opacity: 0.05;
        background: linear-gradient(transparent 50%, rgba(0, 255, 65, 0.02) 50%);
        background-size: 100% 4px;
    }
}

.navbar {
    position: fixed;
    top: 0;
    width: 100%;
    padding: 20px 50px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    z-index: 1000;
    background: rgba(0, 0, 0, 0.9);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--primary);
    animation: slideDown 0.6s cubic-bezier(0.16, 1, 0.3, 1);
    transition: background 0.3s ease;
}

@keyframes slideDown {
    from {
        transform: translateY(-100%);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.logo {
    font-size: 24px;
    font-weight: bold;
    letter-spacing: 3px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.logo:hover {
    text-shadow: 0 0 20px var(--primary);
    transform: scale(1.05);
}

.nav-links {
    display: flex;
    gap: 30px;
}

.nav-link {
    color: var(--white);
    text-decoration: none;
    font-size: 14px;
    letter-spacing: 2px;
    position: relative;
    transition: color 0.3s ease, text-shadow 0.3s ease;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--primary);
    transition: width 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

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

.nav-link:hover::after {
    width: 100%;
}

.glitch {
    position: relative;
    color: var(--white);
}

.glitch::before,
.glitch::after {
    content: attr(data-text);
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0.8;
}

.glitch::before {
    left: 2px;
    text-shadow: -2px 0 var(--primary);
    clip: rect(24px, 550px, 90px, 0);
    animation: glitch-anim 3s infinite linear alternate-reverse;
}

.glitch::after {
    left: -2px;
    text-shadow: -2px 0 #00ffff;
    clip: rect(85px, 550px, 140px, 0);
    animation: glitch-anim 4s infinite linear alternate-reverse;
}

@keyframes glitch {
    0%, 100% { transform: translate(0); }
    20% { transform: translate(-1px, 1px); }
    40% { transform: translate(-1px, -1px); }
    60% { transform: translate(1px, 1px); }
    80% { transform: translate(1px, -1px); }
}

@keyframes glitch-anim {
    0% { clip: rect(10px, 9999px, 31px, 0); }
    20% { clip: rect(70px, 9999px, 71px, 0); }
    40% { clip: rect(30px, 9999px, 91px, 0); }
    60% { clip: rect(90px, 9999px, 20px, 0); }
    80% { clip: rect(50px, 9999px, 60px, 0); }
    100% { clip: rect(80px, 9999px, 40px, 0); }
}

.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 100px 50px;
    position: relative;
    z-index: 1;
}

.hero-content {
    flex: 1;
    max-width: 600px;
    animation: fadeInUp 1s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(40px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.hero-title {
    font-size: 72px;
    line-height: 1.2;
    margin-bottom: 30px;
    display: flex;
    flex-direction: column;
}

.hero-subtitle {
    font-size: 20px;
    color: var(--primary);
    margin-bottom: 50px;
    letter-spacing: 2px;
    min-height: 30px;
    overflow: visible;
    white-space: normal;
    max-width: 100%;
}

@keyframes typing {
    from { width: 0; opacity: 1; }
    to { width: 100%; opacity: 1; }
}

@keyframes blink {
    50% { border-color: transparent; }
}

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

.cta-buttons {
    display: flex;
    gap: 20px;
}

.btn {
    padding: 15px 40px;
    font-size: 16px;
    font-family: 'Courier New', monospace;
    letter-spacing: 2px;
    border: 2px solid var(--primary);
    background: transparent;
    color: var(--white);
    cursor: pointer;
    position: relative;
    overflow: hidden;
    transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.btn span {
    position: relative;
    z-index: 2;
    transition: color 0.4s ease;
}

.btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: var(--primary);
    transition: left 0.5s cubic-bezier(0.16, 1, 0.3, 1);
    z-index: 1;
}

.btn:hover {
    color: var(--darker);
    box-shadow: 0 0 20px rgba(0, 255, 65, 0.6);
    transform: translateY(-2px);
}

.btn:hover::before {
    left: 0;
}

.btn:active {
    transform: translateY(0);
}

.btn-secondary {
    border-color: var(--white);
}

.btn-secondary::before {
    background: var(--white);
}

.hero-visual {
    flex: 1;
    display: flex;
    justify-content: center;
    align-items: center;
}

.cube-container {
    perspective: 1000px;
    width: 300px;
    height: 300px;
}

.cube {
    width: 100%;
    height: 100%;
    position: relative;
    transform-style: preserve-3d;
    animation: rotateCube 20s infinite linear;
    transition: transform 0.1s ease-out;
}

@keyframes rotateCube {
    from { transform: rotateX(0deg) rotateY(0deg); }
    to { transform: rotateX(360deg) rotateY(360deg); }
}

.cube-face {
    position: absolute;
    width: 300px;
    height: 300px;
    border: 2px solid var(--primary);
    background: rgba(0, 255, 65, 0.03);
    box-shadow: 0 0 20px rgba(0, 255, 65, 0.4);
    transition: all 0.3s ease;
}

.cube-face::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 80%;
    height: 80%;
    transform: translate(-50%, -50%);
    border: 1px solid var(--primary);
    opacity: 0.6;
}

.front { transform: rotateY(0deg) translateZ(150px); }
.back { transform: rotateY(180deg) translateZ(150px); }
.right { transform: rotateY(90deg) translateZ(150px); }
.left { transform: rotateY(-90deg) translateZ(150px); }
.top { transform: rotateX(90deg) translateZ(150px); }
.bottom { transform: rotateX(-90deg) translateZ(150px); }

.features {
    padding: 100px 50px;
    position: relative;
    z-index: 1;
}

.section-title {
    font-size: 48px;
    text-align: center;
    margin-bottom: 80px;
    letter-spacing: 5px;
    opacity: 0;
    animation: fadeInUp 0.8s cubic-bezier(0.16, 1, 0.3, 1) forwards;
    animation-delay: 0.2s;
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 30px;
    max-width: 1200px;
    margin: 0 auto;
}

.feature-card {
    background: transparent;
    padding: 40px;
    border: 1px solid var(--primary);
    position: relative;
    overflow: hidden;
    transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    cursor: pointer;
    opacity: 0;
    animation: fadeInUp 0.6s cubic-bezier(0.16, 1, 0.3, 1) forwards;
    backdrop-filter: blur(10px);
    background: linear-gradient(135deg, rgba(0, 255, 65, 0.02), rgba(0, 0, 0, 0.3));
}

.feature-card:nth-child(1) { animation-delay: 0.1s; }
.feature-card:nth-child(2) { animation-delay: 0.2s; }
.feature-card:nth-child(3) { animation-delay: 0.3s; }
.feature-card:nth-child(4) { animation-delay: 0.4s; }

.feature-card::before {
    content: '';
    position: absolute;
    top: -2px;
    left: -2px;
    right: -2px;
    bottom: -2px;
    background: linear-gradient(45deg, var(--primary), transparent, var(--primary));
    z-index: -1;
    opacity: 0;
    transition: opacity 0.4s ease;
}

.feature-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 10px 40px rgba(0, 255, 65, 0.3);
}

.feature-card:hover::before {
    opacity: 0.6;
}

@keyframes borderRotate {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.feature-icon {
    width: 100px;
    height: 100px;
    margin: 0 auto 30px;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
}

.icon-svg {
    width: 100%;
    height: 100%;
    filter: drop-shadow(0 0 10px rgba(0, 255, 65, 0.5));
    transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.icon-circle-1,
.icon-circle-2,
.icon-circle-3,
.icon-hex,
.icon-hex-inner,
.icon-orbit,
.icon-lock-circle,
.icon-lock-inner,
.icon-lock-shackle {
    fill: none;
    stroke: var(--primary);
    stroke-width: 2;
    transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.icon-circle-1 {
    stroke-dasharray: 188;
    stroke-dashoffset: 0;
}

.icon-circle-2 {
    stroke-dasharray: 125;
    stroke-dashoffset: 0;
}

.icon-circle-3 {
    fill: rgba(0, 255, 65, 0.1);
}

.icon-line,
.icon-lock-key {
    stroke: var(--primary);
    stroke-width: 2;
    stroke-linecap: round;
}

.icon-core,
.icon-node,
.icon-lock-hole {
    fill: var(--primary);
    filter: drop-shadow(0 0 5px var(--primary));
    transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.icon-node {
    opacity: 0.8;
}

.feature-card:hover .icon-svg {
    transform: scale(1.15);
    filter: drop-shadow(0 0 20px rgba(0, 255, 65, 0.8));
}

.feature-card:hover .icon-circle-1 {
    stroke-dashoffset: 50;
    stroke: #00ffff;
}

.feature-card:hover .icon-circle-2 {
    stroke-dashoffset: -50;
    stroke: #00ffff;
}

.feature-card:hover .icon-hex,
.feature-card:hover .icon-orbit,
.feature-card:hover .icon-lock-circle,
.feature-card:hover .icon-lock-inner {
    stroke: #00ffff;
    stroke-width: 2.5;
}

.feature-card:hover .icon-core,
.feature-card:hover .icon-node,
.feature-card:hover .icon-lock-hole {
    fill: #00ffff;
    filter: drop-shadow(0 0 15px #00ffff);
}

.feature-card:hover .icon-lock-shackle {
    stroke: #00ffff;
}

@keyframes rotate {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

.icon-text {
    font-size: 32px;
    z-index: 1;
    transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.feature-card:hover .icon-text {
    transform: scale(1.1);
}

.feature-card h3 {
    font-size: 20px;
    margin-bottom: 15px;
    letter-spacing: 2px;
    text-align: center;
}

.feature-card p {
    color: #aaa;
    text-align: center;
    line-height: 1.6;
}

.card-glow {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 150px;
    height: 150px;
    background: radial-gradient(circle, rgba(0, 255, 65, 0.4) 0%, transparent 70%);
    opacity: 0;
    transform: translate(-50%, -50%);
    transition: opacity 0.3s ease;
    pointer-events: none;
}

.feature-card:hover .card-glow {
    opacity: 0.6;
}

@keyframes glow {
    0%, 100% { transform: translate(-50%, -50%) scale(1); opacity: 0.6; }
    50% { transform: translate(-50%, -50%) scale(1.3); opacity: 0.8; }
}

.tech-section {
    padding: 100px 50px;
    position: relative;
    z-index: 1;
}

.tech-container {
    max-width: 1200px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 50px;
}

.terminal {
    background: var(--gray);
    border: 1px solid var(--primary);
    border-radius: 5px;
    overflow: hidden;
    box-shadow: 0 0 20px rgba(0, 255, 65, 0.2);
    transition: all 0.3s ease;
    opacity: 0;
    animation: fadeInUp 0.6s cubic-bezier(0.16, 1, 0.3, 1) forwards;
    animation-delay: 0.2s;
}

.terminal:hover {
    transform: translateY(-3px);
    box-shadow: 0 5px 30px rgba(0, 255, 65, 0.3);
}

.terminal-header {
    background: #1a1a1a;
    padding: 10px 15px;
    display: flex;
    align-items: center;
    gap: 8px;
    border-bottom: 1px solid var(--primary);
}

.terminal-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
}

.terminal-dot.red { background: #ff5f56; }
.terminal-dot.yellow { background: #ffbd2e; }
.terminal-dot.green { background: #27c93f; }

.terminal-title {
    margin-left: auto;
    font-size: 12px;
    color: var(--primary);
}

.terminal-body {
    padding: 20px;
    font-size: 14px;
    line-height: 1.8;
    height: 250px;
    overflow: hidden;
}

.terminal-line {
    margin-bottom: 10px;
    animation: fadeIn 0.5s;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateX(-20px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.prompt {
    color: var(--primary);
    margin-right: 10px;
}

.command {
    color: #00ffff;
}

.output {
    color: #aaa;
    display: block;
    margin-left: 20px;
}

.output.success {
    color: var(--primary);
}

.output.warning {
    color: #ffaa00;
}

.cursor {
    animation: blink 1s infinite;
}

.stats-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

.stat-card {
    background: transparent;
    padding: 30px;
    border: 1px solid var(--primary);
    text-align: center;
    position: relative;
    overflow: hidden;
    transition: all 0.3s ease;
    opacity: 0;
    animation: fadeInUp 0.6s cubic-bezier(0.16, 1, 0.3, 1) forwards;
    backdrop-filter: blur(10px);
    background: linear-gradient(135deg, rgba(0, 255, 65, 0.02), rgba(0, 0, 0, 0.3));
}

.stat-card:nth-child(1) { animation-delay: 0.3s; }
.stat-card:nth-child(2) { animation-delay: 0.4s; }
.stat-card:nth-child(3) { animation-delay: 0.5s; }
.stat-card:nth-child(4) { animation-delay: 0.6s; }

.stat-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 5px 25px rgba(0, 255, 65, 0.3);
    border-color: #00ffff;
}

.stat-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(0, 255, 65, 0.1), transparent);
    animation: scan 3s infinite;
}

@keyframes scan {
    0% { left: -100%; }
    100% { left: 100%; }
}

.stat-value {
    font-size: 48px;
    color: var(--primary);
    font-weight: bold;
    margin-bottom: 10px;
}

.stat-label {
    font-size: 12px;
    letter-spacing: 2px;
    color: #aaa;
}

.contact-section {
    padding: 100px 50px;
    position: relative;
    z-index: 1;
}

.contact-container {
    max-width: 600px;
    margin: 0 auto;
}

.contact-form {
    display: flex;
    flex-direction: column;
    gap: 30px;
}

.form-group {
    position: relative;
}

.form-input {
    width: 100%;
    padding: 15px 0;
    background: transparent;
    border: none;
    border-bottom: 2px solid #333;
    color: var(--white);
    font-family: 'Courier New', monospace;
    font-size: 16px;
    letter-spacing: 1px;
    transition: border-bottom-color 0.3s ease;
}

.form-input:focus {
    outline: none;
    border-bottom-color: var(--primary);
}

.form-input::placeholder {
    color: #555;
}

.input-line {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--primary);
    transition: width 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.form-input:focus + .input-line {
    width: 100%;
}

textarea.form-input {
    resize: none;
}

.footer {
    padding: 40px 50px;
    border-top: 1px solid var(--primary);
    text-align: center;
    position: relative;
    z-index: 1;
}

.footer p {
    margin-bottom: 20px;
    color: #aaa;
}

.footer-links {
    display: flex;
    justify-content: center;
    gap: 30px;
}

.footer-links a {
    color: var(--white);
    text-decoration: none;
    font-size: 14px;
    transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.footer-links a:hover {
    color: var(--primary);
    text-shadow: 0 0 10px var(--primary);
}

@media (max-width: 768px) {
    .navbar {
        padding: 20px;
    }

    .nav-links {
        display: none;
    }

    .hero {
        flex-direction: column;
        padding: 100px 20px;
    }

    .hero-title {
        font-size: 48px;
    }

    .tech-container {
        grid-template-columns: 1fr;
    }

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