/* ==================== MAIN.CSS ==================== */
/* Global Styles and Theme Variables */

:root {
    /* Clean Grey and White Theme */
    --bg-primary: #1a1a1a;
    --bg-secondary: #2d2d2d;
    --bg-tertiary: #3a3a3a;
    --color-primary: #c0c0c0;
    --color-secondary: #e8e8e8;
    --color-accent: #ffffff;
    --color-success: #d0d0d0;
    --color-warning: #e0e0e0;
    --color-danger: #a0a0a0;
    --text-primary: #ffffff;
    --text-secondary: #d8d8d8;
    --text-muted: #999999;
    --gradient-primary: linear-gradient(135deg, #c0c0c0 0%, #ffffff 100%);
    --gradient-secondary: linear-gradient(135deg, #e8e8e8 0%, #d0d0d0 100%);
    --gradient-accent: linear-gradient(135deg, #ffffff 0%, #d8d8d8 50%, #c0c0c0 100%);
    --shadow-glow: 0 0 30px rgba(255, 255, 255, 0.2);
    --shadow-glow-strong: 0 0 50px rgba(255, 255, 255, 0.3);
    --shadow-gold: 0 0 30px rgba(232, 232, 232, 0.3);
    --shadow-teal: 0 0 30px rgba(192, 192, 192, 0.3);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: var(--bg-primary);
    background-image:
        radial-gradient(circle at 10% 20%, rgba(255, 255, 255, 0.05) 0%, transparent 50%),
        radial-gradient(circle at 90% 80%, rgba(232, 232, 232, 0.05) 0%, transparent 50%),
        radial-gradient(circle at 50% 50%, rgba(192, 192, 192, 0.03) 0%, transparent 50%);
    background-attachment: fixed;
    color: var(--text-primary);
    line-height: 1.6;
    overflow-x: hidden;
}

/* Loading Screen */
#loading-screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--bg-primary);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    transition: opacity 0.5s ease;
}

#loading-screen.hidden {
    opacity: 0;
    pointer-events: none;
}

.loading-text {
    font-size: 1.2rem;
    color: var(--color-primary);
    margin-bottom: 20px;
    font-family: 'Courier New', monospace;
}

.loading-bar {
    width: 300px;
    height: 4px;
    background: var(--bg-secondary);
    border-radius: 2px;
    overflow: hidden;
}

.loading-progress {
    height: 100%;
    background: var(--gradient-primary);
    width: 0%;
    animation: loadProgress 2s ease-out forwards;
}


/* Main Container */
.container {
    position: relative;
    z-index: 1;
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Section Styling */
section {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 80px 20px;
    position: relative;
    z-index: 1;
    opacity: 0;
    transform: translateY(50px);
    transition: opacity 0.8s ease, transform 0.8s ease;
}

section.visible {
    opacity: 1;
    transform: translateY(0);
}

/* Section Title */
.section-title {
    font-size: 2.8rem;
    font-weight: 700;
    text-align: center;
    margin-bottom: 70px;
    position: relative;
    display: inline-block;
    left: 50%;
    transform: translateX(-50%);
    background: var(--gradient-accent);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    letter-spacing: -0.5px;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: -15px;
    left: 50%;
    transform: translateX(-50%);
    width: 60%;
    height: 4px;
    background: var(--gradient-primary);
    border-radius: 2px;
    box-shadow: var(--shadow-glow);
}

.section-title::before {
    content: '';
    position: absolute;
    bottom: -15px;
    left: 50%;
    transform: translateX(-50%);
    width: 60%;
    height: 4px;
    background: var(--gradient-secondary);
    border-radius: 2px;
    filter: blur(10px);
    opacity: 0.6;
}

/* Hero Section */
#hero {
    flex-direction: column;
    text-align: center;
}

.terminal-container {
    background: linear-gradient(135deg, rgba(15, 20, 25, 0.95), rgba(26, 31, 38, 0.95));
    border: 2px solid var(--color-primary);
    border-radius: 15px;
    padding: 35px;
    max-width: 850px;
    box-shadow: var(--shadow-glow), 0 10px 40px rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(20px);
    position: relative;
    overflow: hidden;
}

.terminal-container::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: var(--gradient-accent);
    opacity: 0.5;
}

.terminal-header {
    display: flex;
    gap: 8px;
    margin-bottom: 20px;
}

.terminal-btn {
    width: 12px;
    height: 12px;
    border-radius: 50%;
}

.terminal-btn.red { background: #ff5f56; }
.terminal-btn.yellow { background: #ffbd2e; }
.terminal-btn.green { background: #27c93f; }

.terminal-content {
    font-family: 'Courier New', monospace;
    text-align: left;
    font-size: 1.1rem;
    line-height: 1.8;
    min-height: 150px;
}

.terminal-line {
    margin: 10px 0;
}

.prompt { color: var(--color-primary); }
.command { color: var(--color-secondary); }
.output { color: var(--text-primary); }

.hero-title {
    font-size: 3.5rem;
    font-weight: 800;
    background: var(--gradient-accent);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin: 40px 0 20px;
    letter-spacing: -1px;
    text-shadow: 0 0 30px rgba(16, 185, 129, 0.3);
    animation: titleGlow 3s ease-in-out infinite;
    position: relative;
}

@keyframes titleGlow {
    0%, 100% { filter: brightness(1); }
    50% { filter: brightness(1.2); }
}

.hero-subtitle {
    font-size: 1.3rem;
    color: var(--text-secondary);
    margin-bottom: 40px;
}

.cta-buttons {
    display: flex;
    gap: 20px;
    justify-content: center;
    flex-wrap: wrap;
}

.btn {
    padding: 16px 40px;
    border: 2px solid var(--color-primary);
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.1), rgba(20, 184, 166, 0.1));
    color: var(--color-primary);
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    border-radius: 10px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    font-family: 'Courier New', monospace;
    text-decoration: none;
    display: inline-block;
    position: relative;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
}

.btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: var(--gradient-primary);
    transition: left 0.3s ease;
    z-index: -1;
}

.btn:hover {
    color: var(--bg-primary);
    box-shadow: var(--shadow-glow-strong), 0 8px 25px rgba(0, 0, 0, 0.4);
    transform: translateY(-5px);
    border-color: var(--color-primary);
}

.btn:hover::before {
    left: 0;
}

.btn-secondary {
    border-color: var(--color-secondary);
    color: var(--color-secondary);
    background: linear-gradient(135deg, rgba(245, 158, 11, 0.1), rgba(251, 191, 36, 0.1));
}

.btn-secondary::before {
    background: var(--gradient-secondary);
}

.btn-secondary:hover {
    color: var(--bg-primary);
    border-color: var(--color-secondary);
    box-shadow: var(--shadow-gold), 0 8px 25px rgba(0, 0, 0, 0.4);
}

.btn-primary {
    border-color: var(--color-primary);
    color: var(--text-primary);
    background: var(--gradient-primary);
    font-weight: 700;
}

.btn-primary::before {
    background: var(--gradient-secondary);
}

.btn-primary:hover {
    color: var(--bg-primary);
    border-color: var(--color-primary);
    box-shadow: var(--shadow-glow-strong), 0 8px 25px rgba(0, 0, 0, 0.4);
}

.btn-whatsapp {
    border-color: var(--color-primary);
    color: var(--color-primary);
    background: linear-gradient(135deg, rgba(168, 168, 168, 0.15), rgba(140, 140, 140, 0.15));
}

.btn-whatsapp::before {
    background: var(--gradient-primary);
}

.btn-whatsapp:hover {
    color: var(--bg-primary);
    border-color: var(--color-primary);
    box-shadow: var(--shadow-glow-strong), 0 8px 25px rgba(0, 0, 0, 0.4);
}

.btn-cv {
    border-color: var(--color-accent);
    color: var(--color-accent);
    background: linear-gradient(135deg, rgba(140, 140, 140, 0.15), rgba(192, 192, 192, 0.15));
}

.btn-cv::before {
    background: var(--gradient-accent);
}

.btn-cv:hover {
    color: var(--bg-primary);
    border-color: var(--color-accent);
    box-shadow: var(--shadow-teal), 0 8px 25px rgba(0, 0, 0, 0.4);
}

/* About Section */
.about-container {
    max-width: 1200px;
    width: 100%;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 30px;
    margin-bottom: 60px;
}

.stat-card {
    background: linear-gradient(135deg, rgba(15, 20, 25, 0.8), rgba(26, 31, 38, 0.8));
    border: 2px solid transparent;
    background-clip: padding-box;
    border-radius: 15px;
    padding: 35px;
    text-align: center;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    backdrop-filter: blur(20px);
    position: relative;
    overflow: hidden;
}

.stat-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    border-radius: 15px;
    padding: 2px;
    background: var(--gradient-primary);
    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    opacity: 0.6;
}

.stat-card:hover {
    transform: translateY(-15px) scale(1.02);
    box-shadow: var(--shadow-glow-strong), 0 20px 60px rgba(0, 0, 0, 0.6);
}

.stat-card:hover::before {
    background: var(--gradient-accent);
    opacity: 1;
}

.stat-number {
    font-size: 3rem;
    font-weight: 800;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 10px;
    letter-spacing: -1px;
}

.stat-label {
    font-size: 1rem;
    color: var(--text-secondary);
    font-weight: 500;
}

.skills-container {
    margin-top: 60px;
}

.skill-categories {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
}

.skill-category {
    background: linear-gradient(135deg, rgba(15, 20, 25, 0.8), rgba(26, 31, 38, 0.8));
    padding: 30px;
    border-radius: 15px;
    border-left: 5px solid var(--color-primary);
    border-top: 1px solid rgba(16, 185, 129, 0.2);
    backdrop-filter: blur(20px);
    transition: all 0.3s ease;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

.skill-category:hover {
    transform: translateX(10px);
    border-left-color: var(--color-secondary);
    box-shadow: var(--shadow-glow), 0 8px 30px rgba(0, 0, 0, 0.4);
}

.skill-category h3 {
    color: var(--color-primary);
    margin-bottom: 15px;
    font-size: 1.3rem;
}

.skill-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.skill-tag {
    padding: 10px 18px;
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.15), rgba(20, 184, 166, 0.15));
    border: 1.5px solid rgba(16, 185, 129, 0.4);
    border-radius: 25px;
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--text-primary);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: pointer;
    position: relative;
    overflow: hidden;
}

.skill-tag::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: var(--gradient-primary);
    transition: left 0.3s ease;
    z-index: -1;
}

.skill-tag:hover {
    border-color: var(--color-primary);
    color: var(--bg-primary);
    transform: scale(1.08) translateY(-2px);
    box-shadow: var(--shadow-glow);
}

.skill-tag:hover::before {
    left: 0;
}

/* Experience Timeline */
.timeline {
    max-width: 900px;
    width: 100%;
    position: relative;
    padding: 40px 0;
}

.timeline::before {
    content: '';
    position: absolute;
    left: 50%;
    top: 0;
    bottom: 0;
    width: 2px;
    background: var(--gradient-primary);
    transform: translateX(-50%);
}

.timeline-item {
    display: flex;
    margin-bottom: 60px;
    position: relative;
}

.timeline-item:nth-child(odd) {
    flex-direction: row-reverse;
}

.timeline-content {
    width: calc(50% - 40px);
    background: linear-gradient(135deg, rgba(15, 20, 25, 0.95), rgba(26, 31, 38, 0.95));
    padding: 30px;
    border-radius: 15px;
    border: 2px solid transparent;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    backdrop-filter: blur(20px);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.4);
    position: relative;
}

.timeline-content::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    border-radius: 15px;
    padding: 2px;
    background: var(--gradient-primary);
    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    opacity: 0.5;
}

.timeline-content:hover {
    transform: scale(1.05);
    box-shadow: var(--shadow-glow-strong), 0 10px 40px rgba(0, 0, 0, 0.5);
}

.timeline-content:hover::before {
    background: var(--gradient-accent);
    opacity: 1;
}

.timeline-marker {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    width: 20px;
    height: 20px;
    background: var(--color-primary);
    border: 4px solid var(--bg-primary);
    border-radius: 50%;
    box-shadow: var(--shadow-glow);
}

.timeline-date {
    color: var(--color-secondary);
    font-weight: 600;
    margin-bottom: 10px;
}

.timeline-title {
    font-size: 1.4rem;
    color: var(--color-primary);
    margin-bottom: 10px;
}

.timeline-company {
    color: var(--text-secondary);
    margin-bottom: 15px;
}

.timeline-description {
    color: var(--text-primary);
    line-height: 1.6;
}

.timeline-projects {
    list-style: none;
    padding: 0;
    margin-top: 15px;
}

.timeline-projects li {
    color: var(--text-secondary);
    line-height: 1.8;
    margin-bottom: 12px;
    padding-left: 20px;
    position: relative;
}

.timeline-projects li::before {
    content: '▸';
    position: absolute;
    left: 0;
    color: var(--color-primary);
    font-weight: bold;
}

.timeline-projects li strong {
    color: var(--color-primary);
    font-weight: 600;
}

/* Contact Section */
.contact-container {
    max-width: 800px;
    width: 100%;
    text-align: center;
}

.api-docs {
    background: linear-gradient(135deg, rgba(15, 20, 25, 0.95), rgba(26, 31, 38, 0.95));
    border: 2px solid transparent;
    border-radius: 20px;
    padding: 45px;
    text-align: left;
    backdrop-filter: blur(20px);
    box-shadow: var(--shadow-glow), 0 10px 40px rgba(0, 0, 0, 0.5);
    position: relative;
    overflow: hidden;
}

.api-docs::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    border-radius: 20px;
    padding: 2px;
    background: var(--gradient-accent);
    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    opacity: 0.7;
}

.endpoint {
    margin: 30px 0;
    padding: 25px;
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.08), rgba(20, 184, 166, 0.08));
    border-left: 5px solid var(--color-primary);
    border-radius: 12px;
    transition: all 0.3s ease;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
}

.endpoint:hover {
    transform: translateX(10px);
    border-left-color: var(--color-secondary);
    box-shadow: var(--shadow-glow), 0 4px 20px rgba(0, 0, 0, 0.3);
}

.endpoint-method {
    display: inline-block;
    padding: 5px 15px;
    background: var(--color-success);
    color: var(--bg-primary);
    border-radius: 5px;
    font-weight: 600;
    margin-right: 10px;
}

.endpoint-path {
    font-family: 'Courier New', monospace;
    color: var(--color-primary);
    font-size: 1.1rem;
}

.endpoint-desc {
    margin-top: 15px;
    color: var(--text-secondary);
}

.endpoint-link {
    color: var(--color-primary);
    text-decoration: none;
    transition: all 0.3s ease;
    border-bottom: 1px solid transparent;
}

.endpoint-link:hover {
    color: var(--color-secondary);
    border-bottom-color: var(--color-secondary);
}

.social-links {
    display: flex;
    justify-content: center;
    gap: 30px;
    margin-top: 40px;
    flex-wrap: wrap;
}

.social-link {
    padding: 16px 35px;
    border: 2px solid var(--color-primary);
    border-radius: 12px;
    color: var(--color-primary);
    text-decoration: none;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    font-weight: 600;
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.1), rgba(20, 184, 166, 0.1));
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
    position: relative;
    overflow: hidden;
}

.social-link::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: var(--gradient-primary);
    transition: left 0.3s ease;
    z-index: -1;
}

.social-link:hover {
    color: var(--bg-primary);
    transform: translateY(-7px) scale(1.05);
    box-shadow: var(--shadow-glow-strong), 0 10px 30px rgba(0, 0, 0, 0.5);
    border-color: var(--color-primary);
}

.social-link:hover::before {
    left: 0;
}

/* Performance Monitor */
.perf-monitor {
    position: fixed;
    bottom: 20px;
    right: 20px;
    background: linear-gradient(135deg, rgba(15, 20, 25, 0.95), rgba(26, 31, 38, 0.95));
    padding: 12px 18px;
    border-radius: 10px;
    border: 1.5px solid rgba(16, 185, 129, 0.5);
    font-family: 'Courier New', monospace;
    font-size: 0.85rem;
    color: var(--color-primary);
    z-index: 999;
    backdrop-filter: blur(20px);
    box-shadow: var(--shadow-glow), 0 4px 15px rgba(0, 0, 0, 0.4);
    transition: all 0.3s ease;
}

.perf-monitor:hover {
    transform: scale(1.05);
    border-color: var(--color-primary);
}

/* Responsive Design */
@media (max-width: 1024px) {
    .timeline::before { left: 30px; }
    .timeline-item { flex-direction: column !important; }
    .timeline-content { width: calc(100% - 60px); margin-left: 60px; }
    .timeline-marker { left: 30px; }
}

@media (max-width: 768px) {
    .hero-title { font-size: 2rem; }
    .section-title { font-size: 2rem; }
    .terminal-container { padding: 20px; }
    .terminal-content { font-size: 0.95rem; }
    .stats-grid { grid-template-columns: 1fr; }
    .skill-categories { grid-template-columns: 1fr; }
}