@import url('https://fonts.googleapis.com/css2?family=Orbitron:wght@400;700;900&family=Inter:wght@300;400;600&display=swap');

:root {
    --primary: #a855f7;
    --primary-glow: rgba(168, 85, 247, 0.6);
    --secondary: #22d3ee;
    --secondary-glow: rgba(34, 211, 238, 0.4);
    --accent: #f472b6;
    --bg-dark: #030712;
    --bg-card: rgba(17, 24, 39, 0.4);
    --text-main: #f3f4f6;
    --text-muted: #9ca3af;
    --glass-border: rgba(255, 255, 255, 0.1);
    --transition: all 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Inter', sans-serif;
    cursor: none;
}

body {
    background-color: var(--bg-dark);
    color: var(--text-main);
    line-height: 1.6;
    overflow-x: hidden;
}

/* Particle Background Container */
#particles-canvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -2;
    pointer-events: none;
}


/* Custom Cursor */
.cursor {
    width: 20px; /* Made slightly larger for visibility */
    height: 20px;
    background: var(--secondary);
    border-radius: 50%;
    position: fixed;
    top: -10px; /* Offset by half width */
    left: -10px; /* Offset by half height */
    pointer-events: none;
    z-index: 100001;
    box-shadow: 0 0 20px var(--secondary-glow);
    transition: transform 0.05s linear;
}

.cursor-follower {
    width: 40px; /* Lagging ring */
    height: 40px;
    border: 2px solid var(--primary);
    border-radius: 50%;
    position: fixed;
    top: -20px;
    left: -20px;
    pointer-events: none;
    z-index: 100000;
    box-shadow: 0 0 15px var(--primary-glow);
    transition: transform 0.15s ease-out;
}

/* Intro Loader */
.intro-loader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--bg-dark);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    font-family: 'Courier New', Courier, monospace;
}

.terminal-text {
    color: var(--secondary);
    font-size: 1.2rem;
    overflow: hidden;
    white-space: nowrap;
    border-right: 2px solid var(--secondary);
    animation: typing 2.5s steps(40, end), blink-caret .75s step-end infinite;
}

@keyframes typing { from { width: 0 } to { width: 100% } }
@keyframes blink-caret { from, to { border-color: transparent } 50% { border-color: var(--secondary); } }

/* Scanlines overlay */
body::before {
    content: " ";
    display: block;
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    right: 0;
    background: linear-gradient(rgba(18, 16, 16, 0) 50%, rgba(0, 0, 0, 0.25) 50%), linear-gradient(90deg, rgba(255, 0, 0, 0.06), rgba(0, 255, 0, 0.02), rgba(0, 0, 255, 0.06));
    z-index: 9997;
    background-size: 100% 2px, 3px 100%;
    pointer-events: none;
}


h1, h2, h3 {
    font-family: 'Orbitron', sans-serif;
    letter-spacing: 0.1em;
}

/* Neon animated border */
.glass {
    background: var(--bg-card);
    -webkit-backdrop-filter: blur(15px);
    backdrop-filter: blur(15px);
    border: 1px solid var(--glass-border);
    border-radius: 20px;
    position: relative;
    overflow: hidden;
}

.glass::after {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: conic-gradient(transparent, var(--primary), transparent, var(--secondary), transparent);
    animation: rotate-border 6s linear infinite;
    z-index: -1;
    opacity: 0;
    transition: 0.5s;
}

.glass:hover::after {
    opacity: 0.4;
}

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

/* 3D Tilt Wrapper */
.tilt-card {
    transform-style: preserve-3d;
    transition: transform 0.1s;
}


/* Navigation */
nav {
    position: fixed;
    top: 0;
    width: 100%;
    z-index: 1000;
    padding: 1rem 0;
    transition: var(--transition);
}

nav.scrolled {
    background: rgba(15, 23, 42, 0.8);
    -webkit-backdrop-filter: blur(10px);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--glass-border);
}

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

.logo {
    font-size: 1.5rem;
    font-weight: 800;
    color: white;
    text-decoration: none;
    font-family: 'Outfit', sans-serif;
}

.nav-links {
    display: flex;
    gap: 2rem;
}

.nav-links a {
    color: var(--text-muted);
    text-decoration: none;
    font-weight: 600;
    transition: var(--transition);
}

.nav-links a:hover {
    color: var(--primary);
}

/* Base Layout */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
}

section {
    padding: 100px 0;
    opacity: 0;
    transform: translateY(20px);
    transition: var(--transition);
}

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

/* Hero Section */
.hero {
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: radial-gradient(circle at top right, rgba(99, 102, 241, 0.15), transparent),
                radial-gradient(circle at bottom left, rgba(16, 185, 129, 0.1), transparent);
    text-align: center;
    position: relative;
    overflow: hidden;
}

.hero-img-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: -1;
    opacity: 0.3;
    filter: blur(5px);
}

.hero h1 {
    font-size: 5rem;
    font-weight: 800;
    margin-bottom: 1rem;
    background: linear-gradient(to right, #fff, var(--primary));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.hero p.hero-subtitle {
    color: var(--secondary);
    font-weight: bold;
    margin-bottom: 0.5rem;
    font-size: 1.2rem;
}

.hero p.hero-description {
    max-width: 700px;
    margin: 0 auto 2rem;
    font-size: 1.1rem;
}


.hero .cta {
    display: flex;
    gap: 1.5rem;
    justify-content: center;
    align-items: center;
    margin-top: 1rem;
}

.btn {
    padding: 12px 32px;
    border-radius: 50px;
    font-weight: 600;
    text-decoration: none;
    transition: var(--transition);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    vertical-align: middle;
}

.btn-primary {
    background: var(--primary);
    color: white;
    box-shadow: 0 0 20px var(--primary-glow);
}

.btn-secondary {
    border: 1px solid var(--secondary);
    color: var(--secondary);
}

.btn-secondary:hover {
    background: rgba(34, 211, 238, 0.1);
    box-shadow: 0 0 20px var(--secondary-glow);
    transform: scale(1.05);
}

.btn-primary:hover {
    transform: scale(1.05);
    box-shadow: 0 0 30px var(--primary-glow);
}

.btn-whatsapp {
    background: #25d366;
    color: white;
    box-shadow: 0 0 20px rgba(37, 211, 102, 0.4);
}

.btn-whatsapp:hover {
    transform: scale(1.05);
    box-shadow: 0 0 30px rgba(37, 211, 102, 0.6);
}

/* Glitch Effect */
.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;
}

@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); }
}

/* Utilities to replace inline styles */
.text-center { text-align: center; }
.mb-1 { margin-bottom: 1rem; }
.mb-2 { margin-bottom: 2rem; }
.mb-3 { margin-bottom: 3rem; }
.p-3 { padding: 3rem; }
.display-flex { display: flex; }
.flex-center { justify-content: center; }
.gap-1 { gap: 1rem; }
.flex-wrap { flex-wrap: wrap; }
.section-title { font-size: 2.5rem; margin-bottom: 3rem; text-align: center; }

/* Skills Section */
.skills-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 1.5rem;
}

.skill-item {
    text-align: center;
    padding: 2rem;
    transition: var(--transition);
}

.skill-item:hover {
    background: rgba(99, 102, 241, 0.05);
    border-color: var(--primary);
}

.skill-icon {
    font-size: 2.5rem;
    margin-bottom: 1rem;
    display: block;
}

/* Social Links */
.social-links {
    display: flex;
    gap: 1.5rem;
    justify-content: center;
    margin-top: 1.5rem;
}

.social-icon {
    color: var(--text-muted);
    font-size: 1.5rem;
    transition: var(--transition);
    text-decoration: none;
}

.social-icon:hover {
    color: var(--primary);
    transform: scale(1.2);
}

/* Project Cards */
.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.project-card {
    padding: 24px;
    transition: var(--transition);
    position: relative;
    overflow: hidden;
}

.project-card:hover {
    transform: translateY(-10px);
    border-color: var(--primary);
}

.project-card h3 {
    margin-bottom: 0.5rem;
    color: var(--primary);
}

.project-card p {
    color: var(--text-muted);
    font-size: 1rem;
    margin-bottom: 1.5rem;
}

.tag-list {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.tag {
    background: rgba(255, 255, 255, 0.05);
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 0.8rem;
    border: 1px solid var(--glass-border);
}

/* Contact */
.contact-container {
    max-width: 600px;
    margin: 0 auto;
    text-align: center;
}

footer {
    padding: 40px 0;
    text-align: center;
    border-top: 1px solid var(--glass-border);
    color: var(--text-muted);
}

@media (max-width: 768px) {
    .hero h1 { font-size: 2.5rem; }
    .hero p { font-size: 1rem; }
    .nav-links { gap: 1rem; }
    .logo { font-size: 1.2rem; }
    .section-title { font-size: 2rem; }
    .nav-links a { font-size: 0.8rem; }
    
    /* Auto-hide custom cursor on touch devices */
    * { cursor: auto !important; }
    .cursor, .cursor-follower { display: none !important; }
}

@media (max-width: 480px) {
    .nav-links { display: none; } /* Hide full nav on tiny screens or we could add a burger later */
    .hero h1 { font-size: 2.2rem; }
    .p-3 { padding: 1.5rem; }
}
