/* ============================================
   FILOSDEV PORTFOLIO - MAIN STYLES
   Modern, animated, Python-focused design
   ============================================ */

/* CSS Variables - Dark theme with green & white */
:root {
    --primary: #22c55e;
    --primary-dark: #16a34a;
    --primary-light: #4ade80;
    --secondary: #10B981;
    --accent: #86efac;
    --python-blue: #306998;
    --python-yellow: #FFD43B;
    --dark: #0a0a0a;
    --dark-lighter: #141414;
    --dark-card: #171717;
    --text-primary: #ffffff;
    --text-secondary: #ffffff;
    --text-muted: #ffffff;
    --border-color: #262626;
    --gradient-primary: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 100%);
    --gradient-python: linear-gradient(135deg, var(--python-blue) 0%, var(--python-yellow) 100%);
    --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.3);
    --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.4), 0 2px 4px -2px rgb(0 0 0 / 0.3);
    --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.4), 0 4px 6px -4px rgb(0 0 0 / 0.3);
    --shadow-xl: 0 20px 25px -5px rgb(0 0 0 / 0.4), 0 8px 10px -6px rgb(0 0 0 / 0.3);
    --shadow-glow: 0 0 40px rgba(34, 197, 94, 0.15);
    --transition-fast: 0.15s ease;
    --transition-normal: 0.3s ease;
    --transition-slow: 0.5s ease;
}

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

html {
    scroll-behavior: smooth;
    scroll-padding-top: 80px;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    background-color: var(--dark);
    color: var(--text-primary);
    line-height: 1.6;
    overflow-x: hidden;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: 1rem;
}

.display-1, .display-2, .display-3 {
    font-weight: 800;
    letter-spacing: -0.02em;
}

code, pre, .font-mono {
    font-family: 'JetBrains Mono', monospace;
}

.text-gradient {
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.text-gradient-python {
    background: var(--gradient-python);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Navbar */
.navbar-blur {
    background: rgba(15, 23, 42, 0.85);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    transition: var(--transition-normal);
}

.navbar-blur.scrolled {
    background: rgba(15, 23, 42, 0.95);
    box-shadow: var(--shadow-lg);
}

.navbar-brand {
    font-size: 1.5rem;
    letter-spacing: -0.02em;
}

.nav-link {
    font-weight: 500;
    color: var(--text-secondary) !important;
    padding: 0.5rem 1rem !important;
    position: relative;
    transition: var(--transition-fast);
}

.nav-link:hover,
.nav-link.active {
    color: var(--text-primary) !important;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    width: 0;
    height: 2px;
    background: var(--gradient-primary);
    transition: var(--transition-normal);
    transform: translateX(-50%);
}

.nav-link:hover::after,
.nav-link.active::after {
    width: 60%;
}

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

.hero-bg {
    position: absolute;
    inset: 0;
    background:
        radial-gradient(ellipse at 20% 50%, rgba(34, 197, 94, 0.15) 0%, transparent 50%),
        radial-gradient(ellipse at 80% 50%, rgba(16, 185, 129, 0.1) 0%, transparent 50%),
        radial-gradient(ellipse at 50% 100%, rgba(245, 158, 11, 0.08) 0%, transparent 40%);
    z-index: -1;
}

.hero-grid {
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(rgba(34, 197, 94, 0.03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(34, 197, 94, 0.03) 1px, transparent 1px);
    background-size: 60px 60px;
    z-index: -1;
    mask-image: radial-gradient(ellipse at center, black 20%, transparent 70%);
}

.hero-title {
    font-size: clamp(2.5rem, 8vw, 4.5rem);
    font-weight: 800;
    line-height: 1.1;
    margin-bottom: 1.5rem;
}

.hero-subtitle {
    font-size: clamp(1rem, 3vw, 1.25rem);
    color: var(--text-secondary);
    max-width: 600px;
    margin-bottom: 2rem;
}

.hero-code {
    background: var(--dark-lighter);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 1.5rem;
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.9rem;
    overflow: hidden;
    position: relative;
}

.hero-code::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 40px;
    background: linear-gradient(180deg, var(--dark-lighter), transparent);
    pointer-events: none;
}

.code-line {
    opacity: 0;
    animation: fadeInLine 0.5s ease forwards;
}

.code-line:nth-child(1) { animation-delay: 0.2s; }
.code-line:nth-child(2) { animation-delay: 0.4s; }
.code-line:nth-child(3) { animation-delay: 0.6s; }
.code-line:nth-child(4) { animation-delay: 0.8s; }
.code-line:nth-child(5) { animation-delay: 1.0s; }
.code-line:nth-child(6) { animation-delay: 1.2s; }

@keyframes fadeInLine {
    to { opacity: 1; }
}

.code-keyword { color: #C792EA; }
.code-function { color: #82AAFF; }
.code-string { color: #C3E88D; }
.code-comment { color: #546E7A; }
.code-class { color: #FFCB6B; }
.code-number { color: #F78C6C; }

/* Buttons */
.btn {
    font-weight: 600;
    padding: 0.75rem 1.5rem;
    border-radius: 8px;
    transition: var(--transition-normal);
    position: relative;
    overflow: hidden;
}

.btn-primary {
    background: var(--gradient-primary);
    border: none;
    color: white;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 30px rgba(34, 197, 94, 0.3);
}

.btn-outline-light {
    border: 2px solid var(--border-color);
    color: var(--text-primary);
}

.btn-outline-light:hover {
    background: var(--dark-lighter);
    border-color: var(--primary);
    color: var(--primary-light);
}

.btn-lg {
    padding: 1rem 2rem;
    font-size: 1.1rem;
}

/* Cards */
.card {
    background: var(--dark-card);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    overflow: hidden;
    transition: var(--transition-normal);
}

.card:hover {
    transform: translateY(-5px);
    border-color: var(--primary);
    box-shadow: var(--shadow-glow);
}

.card-glass {
    background: rgba(30, 41, 59, 0.5);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

/* Section Styles */
.section {
    padding: 6rem 0;
    position: relative;
}

.section-title {
    font-size: 2.5rem;
    font-weight: 800;
    margin-bottom: 1rem;
    position: relative;
    display: inline-block;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 0;
    width: 60px;
    height: 4px;
    background: var(--gradient-primary);
    border-radius: 2px;
}

.section-subtitle {
    color: var(--text-secondary);
    font-size: 1.1rem;
    margin-bottom: 3rem;
}

/* About Section */
.about-image {
    position: relative;
}

.about-image img {
    border-radius: 20px;
    box-shadow: var(--shadow-xl);
}

.about-image::before {
    content: '';
    position: absolute;
    top: 20px;
    left: 20px;
    right: -20px;
    bottom: -20px;
    border: 3px solid var(--primary);
    border-radius: 20px;
    z-index: -1;
}

.about-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
    margin-top: 2rem;
}

.stat-item {
    text-align: center;
    padding: 1.5rem;
    background: var(--dark-lighter);
    border-radius: 12px;
    border: 1px solid var(--border-color);
    transition: var(--transition-normal);
}

.stat-item:hover {
    border-color: var(--primary);
    transform: scale(1.05);
}

.stat-number {
    font-size: 2.5rem;
    font-weight: 800;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.stat-label {
    color: var(--text-secondary);
    font-size: 0.9rem;
    margin-top: 0.25rem;
}

/* Skills Section */
.skill-card {
    padding: 2rem;
    text-align: center;
    height: 100%;
}

.skill-icon {
    width: 80px;
    height: 80px;
    margin: 0 auto 1.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 20px;
    background: var(--dark);
    font-size: 2rem;
    transition: var(--transition-normal);
}

.skill-card:hover .skill-icon {
    transform: scale(1.1) rotate(5deg);
    background: var(--gradient-primary);
}

.skill-name {
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.skill-bar {
    height: 6px;
    background: var(--dark);
    border-radius: 3px;
    overflow: hidden;
    margin-top: 1rem;
}

.skill-progress {
    height: 100%;
    background: var(--gradient-primary);
    border-radius: 3px;
    width: 0;
    transition: width 1s ease;
}

/* Experience Timeline */
.timeline {
    position: relative;
    padding-left: 30px;
}

.timeline::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 2px;
    background: var(--border-color);
}

.timeline-item {
    position: relative;
    padding-bottom: 3rem;
}

.timeline-item:last-child {
    padding-bottom: 0;
}

.timeline-marker {
    position: absolute;
    left: -38px;
    top: 0;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: var(--primary);
    border: 3px solid var(--dark);
    box-shadow: 0 0 0 3px var(--primary);
}

.timeline-item.current .timeline-marker {
    background: var(--secondary);
    box-shadow: 0 0 0 3px var(--secondary);
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% { box-shadow: 0 0 0 3px var(--secondary); }
    50% { box-shadow: 0 0 0 6px rgba(16, 185, 129, 0.3); }
}

.timeline-content {
    background: var(--dark-card);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 1.5rem;
    transition: var(--transition-normal);
}

.timeline-content:hover {
    border-color: var(--primary);
    box-shadow: var(--shadow-glow);
}

.timeline-date {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    background: var(--dark);
    border-radius: 20px;
    font-size: 0.85rem;
    color: var(--text-secondary);
    margin-bottom: 0.75rem;
}

.timeline-title {
    font-size: 1.25rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.timeline-company {
    color: var(--primary-light);
    font-weight: 500;
    margin-bottom: 1rem;
}

.timeline-content ul {
    color: var(--text-primary);
}

.timeline-content ul li {
    color: var(--text-primary);
}

/* Project Cards */
.project-card {
    height: 100%;
    display: flex;
    flex-direction: column;
}

.project-image {
    position: relative;
    overflow: hidden;
    aspect-ratio: 16/10;
}

.project-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: var(--transition-slow);
}

.project-card:hover .project-image img {
    transform: scale(1.1);
}

.project-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, transparent 0%, rgba(15, 23, 42, 0.9) 100%);
    display: flex;
    align-items: flex-end;
    padding: 1.5rem;
    opacity: 0;
    transition: var(--transition-normal);
}

.project-card:hover .project-overlay {
    opacity: 1;
}

.project-body {
    padding: 1.5rem;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.project-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.project-tag {
    padding: 0.25rem 0.75rem;
    background: var(--dark);
    border-radius: 20px;
    font-size: 0.75rem;
    color: var(--text-secondary);
    border: 1px solid var(--border-color);
}

.project-title {
    font-size: 1.25rem;
    font-weight: 700;
    margin-bottom: 0.75rem;
}

.project-description {
    color: var(--text-secondary);
    font-size: 0.95rem;
    flex: 1;
}

.project-links {
    display: flex;
    gap: 1rem;
    margin-top: 1.5rem;
}

.project-link {
    color: var(--text-secondary);
    font-size: 1.25rem;
    transition: var(--transition-fast);
}

.project-link:hover {
    color: var(--primary);
    transform: translateY(-2px);
}

/* Featured Project */
.featured-badge {
    position: absolute;
    top: 1rem;
    right: 1rem;
    padding: 0.5rem 1rem;
    background: var(--gradient-primary);
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
    color: white;
    z-index: 10;
}

/* Contact Section */
.contact-info-card {
    padding: 2rem;
    height: 100%;
}

.contact-icon {
    width: 60px;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 15px;
    background: var(--dark);
    font-size: 1.5rem;
    color: var(--primary);
    margin-bottom: 1.5rem;
    transition: var(--transition-normal);
}

.contact-info-card:hover .contact-icon {
    background: var(--gradient-primary);
    color: white;
    transform: scale(1.1);
}

/* Form Styles */
.form-control,
.form-select {
    background: var(--dark);
    border: 1px solid var(--border-color);
    color: var(--text-primary);
    padding: 0.875rem 1rem;
    border-radius: 10px;
    transition: var(--transition-fast);
}

.form-control:focus,
.form-select:focus {
    background: var(--dark);
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(34, 197, 94, 0.15);
    color: var(--text-primary);
}

.form-control::placeholder {
    color: var(--text-muted);
}

.form-label {
    font-weight: 500;
    margin-bottom: 0.5rem;
    color: var(--text-secondary);
}

/* Footer */
.footer {
    background: var(--dark-lighter);
    border-top: 1px solid var(--border-color);
}

.footer-links li {
    margin-bottom: 0.5rem;
}

.footer-links a {
    color: var(--text-muted);
    text-decoration: none;
    transition: var(--transition-fast);
}

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

.social-links a {
    color: var(--text-muted);
    transition: var(--transition-fast);
}

.social-links a:hover {
    color: var(--primary);
    transform: translateY(-3px);
}

/* Back to Top */
.btn-back-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: var(--transition-normal);
    z-index: 1000;
}

.btn-back-to-top.visible {
    opacity: 1;
    visibility: visible;
}

.btn-back-to-top:hover {
    transform: translateY(-5px);
}

/* Background Gradients */
.bg-dark-gradient {
    background: linear-gradient(180deg, var(--dark) 0%, var(--dark-lighter) 100%);
}

.bg-gradient-subtle {
    background:
        radial-gradient(ellipse at 0% 0%, rgba(34, 197, 94, 0.08) 0%, transparent 50%),
        radial-gradient(ellipse at 100% 100%, rgba(16, 185, 129, 0.08) 0%, transparent 50%),
        var(--dark);
}

/* Utility Classes */
.text-primary-gradient {
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.border-gradient {
    border: 2px solid;
    border-image: var(--gradient-primary) 1;
}

.glow {
    box-shadow: var(--shadow-glow);
}

/* Animations */
@keyframes float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-20px); }
}

.float-animation {
    animation: float 6s ease-in-out infinite;
}

@keyframes gradient-shift {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

.gradient-animation {
    background-size: 200% 200%;
    animation: gradient-shift 3s ease infinite;
}

/* Responsive */
@media (max-width: 991.98px) {
    .hero-section {
        text-align: center;
    }

    .hero-subtitle {
        margin-left: auto;
        margin-right: auto;
    }

    .about-stats {
        grid-template-columns: repeat(2, 1fr);
    }

    .timeline {
        padding-left: 20px;
    }

    .timeline-marker {
        left: -28px;
        width: 14px;
        height: 14px;
    }
}

@media (max-width: 575.98px) {
    .section {
        padding: 4rem 0;
    }

    .about-stats {
        grid-template-columns: 1fr;
    }

    .hero-title {
        font-size: 2rem;
    }

    .btn-back-to-top {
        bottom: 20px;
        right: 20px;
        width: 45px;
        height: 45px;
    }
}

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 10px;
}

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

::-webkit-scrollbar-thumb {
    background: var(--border-color);
    border-radius: 5px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--primary);
}

/* Selection */
::selection {
    background: var(--primary);
    color: white;
}

/* WhatsApp Floating Button */
.btn-whatsapp {
    position: fixed;
    bottom: 5rem;
    right: 1.5rem;
    width: 52px;
    height: 52px;
    background: #25D366;
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    text-decoration: none;
    z-index: 999;
    box-shadow: 0 4px 12px rgba(37, 211, 102, 0.4);
    transition: var(--transition-normal);
}

.btn-whatsapp:hover {
    background: #1ebe5d;
    color: white;
    transform: scale(1.1);
    box-shadow: 0 6px 20px rgba(37, 211, 102, 0.5);
}

/* Print Styles */
@media print {
    .navbar, .footer, .btn-back-to-top {
        display: none !important;
    }

    body {
        background: white;
        color: black;
    }

    .section {
        padding: 2rem 0;
    }
}
