/* Reset and base styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary: #00ff9d;
    --secondary: #6e5dcf;
    --dark: #0e1525;
    --light: #e0e3f0;
    --darker: #061020;
    --accent: #ff3864;
    --code-bg: #1e2a42;
}

/* Google Fonts are now imported in the HTML file */

body {
    font-family: 'Space Grotesk', sans-serif;
    line-height: 1.6;
    color: var(--light);
    background-color: var(--dark);
    overflow-x: hidden;
}

code, pre, .code-font {
    font-family: 'Fira Code', monospace;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Animations */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

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

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

@keyframes slideInRight {
    from { transform: translateX(100px); opacity: 0; }
    to { transform: translateX(0); opacity: 1; }
}

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

@keyframes float {
    0% { transform: translateY(0px); }
    50% { transform: translateY(-10px); }
    100% { transform: translateY(0px); }
}

@keyframes pulse {
    0% { box-shadow: 0 0 0 0 rgba(0, 255, 157, 0.7); }
    70% { box-shadow: 0 0 0 10px rgba(0, 255, 157, 0); }
    100% { box-shadow: 0 0 0 0 rgba(0, 255, 157, 0); }
}

/* Glow effects */
.glow {
    text-shadow: 0 0 5px var(--primary), 0 0 10px var(--primary);
}

.glow-box {
    box-shadow: 0 0 15px var(--primary);
}

/* Matrix background effect */
.matrix-bg {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: -1;
    opacity: 0.05;
    background: linear-gradient(0deg, rgba(0, 0, 0, 0.1) 50%, rgba(0, 0, 0, 0.1) 50%),
                linear-gradient(90deg, var(--primary) 0.1%, var(--dark) 0.1%);
    background-size: 3px 3px;
}

/* Cyber elements */
.cyber-bar {
    height: 5px;
    background: linear-gradient(90deg, transparent, var(--primary), transparent);
    margin: 20px 0;
    position: relative;
    overflow: hidden;
}

.cyber-bar::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, var(--accent), transparent);
    animation: cyber-scan 3s linear infinite;
}

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

.cyber-box {
    border: 2px solid var(--primary);
    position: relative;
    padding: 20px;
    margin: 20px 0;
}

.cyber-box::before {
    content: '';
    position: absolute;
    top: -2px;
    left: -2px;
    width: 10%;
    height: 10%;
    border-top: 2px solid var(--accent);
    border-left: 2px solid var(--accent);
}

.cyber-box::after {
    content: '';
    position: absolute;
    bottom: -2px;
    right: -2px;
    width: 10%;
    height: 10%;
    border-bottom: 2px solid var(--accent);
    border-right: 2px solid var(--accent);
}

/* Terminal text effect */
.terminal-text {
    color: var(--primary);
    font-family: 'Fira Code', monospace;
    position: relative;
    display: inline-block;
}

.terminal-text::after {
    content: '_';
    animation: blink 1s step-end infinite;
}

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

/* Header & Navigation */
header {
    background-color: rgba(14, 21, 37, 0.9);
    backdrop-filter: blur(10px);
    box-shadow: 0 2px 20px rgba(0, 255, 157, 0.1);
    position: fixed;
    width: 100%;
    top: 0;
    z-index: 100;
    animation: fadeIn 1s forwards;
}

nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 0;
}

.logo {
    font-size: 24px;
    font-weight: bold;
    color: var(--primary);
    display: flex;
    align-items: center;
    font-family: 'Fira Code', monospace;
}

.logo::before {
    content: '<';
    margin-right: 5px;
    animation: pulse 2s infinite;
}

.logo::after {
    content: '/>';
    margin-left: 5px;
    animation: pulse 2s infinite;
}

.nav-links {
    display: flex;
    list-style: none;
}

.nav-links li {
    margin-left: 30px;
}

.nav-links a {
    text-decoration: none;
    color: var(--light);
    font-weight: 500;
    transition: color 0.3s, text-shadow 0.3s;
    font-family: 'Fira Code', monospace;
    position: relative;
}

.nav-links a::before {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 2px;
    background-color: var(--primary);
    transition: width 0.3s ease;
}

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

.nav-links a:hover::before {
    width: 100%;
}

/* Mobile menu */
.hamburger {
    display: none;
    cursor: pointer;
    border: none;
    background: transparent;
    color: var(--light);
    font-size: 24px;
}

/* Hero Section */
.hero {
    display: flex;
    align-items: center;
    min-height: 100vh;
    padding: 100px 0;
    position: relative;
    overflow: hidden;
}

.hero .container {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.hero-content {
    max-width: 600px;
    animation: slideInRight 1s forwards;
    position: relative;
    z-index: 5; /* Add z-index to ensure content is above particles */
}

.hero-tag {
    font-family: 'Fira Code', monospace;
    color: var(--secondary);
    margin-bottom: 10px;
}

.hero h1 {
    font-size: 48px;
    margin-bottom: 20px;
    color: var(--light);
}

.hero h1 span {
    color: var(--primary);
    position: relative;
    display: inline-block;
}

.hero h1 span:hover {
    animation: glitch 0.3s linear;
}

.hero p {
    font-size: 20px;
    margin-bottom: 30px;
    color: var(--light);
    opacity: 0.8;
}

.hero-img {
    width: 300px;
    height: 300px;
    border-radius: 20px;
    position: relative;
    overflow: hidden;
    animation: float 6s ease-in-out infinite, slideInLeft 1s forwards;
    border: 2px solid var(--secondary);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
    transform-style: preserve-3d;
    perspective: 1000px;
    margin-right: 50px;
    z-index: 5; /* Add z-index to ensure image is above particles */
}

.hero-img::before {
    content: '';
    position: absolute;
    top: -10%;
    left: -10%;
    width: 120%;
    height: 120%;
    background: linear-gradient(
        225deg,
        transparent,
        transparent,
        var(--primary),
        var(--primary)
    );
    transition: transform 0.5s;
    animation: rotate 4s linear infinite;
}

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

.hero-img::after {
    content: '';
    position: absolute;
    inset: 3px;
    background: var(--dark);
    border-radius: 17px;
}

.hero-img img {
    position: relative;
    z-index: 1;
    width: 100%;
    height: auto;
}

.hero-particles {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    z-index: 1; /* Lower z-index to ensure it's below content */
    pointer-events: none; /* This ensures clicks pass through to elements below */
}

.particle {
    position: absolute;
    width: 2px;
    height: 2px;
    background-color: var(--primary);
    border-radius: 50%;
    opacity: 0.5;
}
