/* ===========================================
   Pablo Winter - Site Institucional
   Tema: Developer / Code / Java
   =========================================== */

/* CSS Variables */
:root {
    /* Colors - IDE/Code Theme */
    --bg-primary: #0d1117;
    --bg-secondary: #161b22;
    --bg-tertiary: #21262d;
    --bg-card: #1c2128;

    /* Text Colors */
    --text-primary: #e6edf3;
    --text-secondary: #8b949e;
    --text-muted: #6e7681;

    /* Code Syntax Colors */
    --code-keyword: #ff7b72;
    --code-string: #a5d6ff;
    --code-class: #ffa657;
    --code-method: #d2a8ff;
    --code-comment: #8b949e;
    --code-variable: #79c0ff;
    --code-annotation: #7ee787;
    --code-bracket: #8b949e;

    /* Accent Colors */
    --accent-primary: #f78166;
    --accent-secondary: #ffa657;
    --accent-glow: rgba(247, 129, 102, 0.4);

    /* Borders */
    --border-color: #30363d;
    --border-highlight: #f78166;

    /* Terminal Colors */
    --terminal-red: #ff5f56;
    --terminal-yellow: #ffbd2e;
    --terminal-green: #27c93f;

    /* Spacing */
    --section-padding: 100px 0;
    --container-max: 1200px;

    /* Transitions */
    --transition-fast: 0.2s ease;
    --transition-normal: 0.3s ease;
    --transition-slow: 0.5s ease;

    /* Typography */
    --font-mono: 'JetBrains Mono', 'Fira Code', 'Consolas', monospace;
    --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
}

/* Reset & Base */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

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

body {
    font-family: var(--font-sans);
    background-color: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.6;
    overflow-x: hidden;
}

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

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

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

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

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

/* Container */
.container {
    max-width: var(--container-max);
    margin: 0 auto;
    padding: 0 24px;
}

/* ===========================================
   Loader
   =========================================== */
.loader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--bg-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    transition: opacity 0.5s ease, visibility 0.5s ease;
}

.loader.hidden {
    opacity: 0;
    visibility: hidden;
}

.loader-content {
    font-family: var(--font-mono);
    font-size: 1.5rem;
    color: var(--code-string);
}

.blink {
    animation: blink 1s infinite;
}

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

/* ===========================================
   Navigation
   =========================================== */
.nav {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    padding: 16px 0;
    background: rgba(13, 17, 23, 0.9);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid transparent;
    z-index: 1000;
    transition: var(--transition-normal);
}

.nav.scrolled {
    border-bottom-color: var(--border-color);
}

.nav-container {
    max-width: var(--container-max);
    margin: 0 auto;
    padding: 0 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.nav-logo {
    font-family: var(--font-mono);
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--text-primary);
    text-decoration: none;
    transition: var(--transition-fast);
}

.nav-logo:hover {
    color: var(--accent-primary);
}

.code-tag {
    color: var(--code-keyword);
}

.nav-menu {
    display: flex;
    align-items: center;
    gap: 8px;
    list-style: none;
}

.nav-link {
    font-family: var(--font-mono);
    font-size: 0.875rem;
    color: var(--text-secondary);
    text-decoration: none;
    padding: 8px 16px;
    border-radius: 6px;
    transition: var(--transition-fast);
}

.nav-link:hover {
    color: var(--text-primary);
    background: var(--bg-tertiary);
}

.nav-link--cta {
    background: var(--accent-primary);
    color: var(--bg-primary) !important;
}

.nav-link--cta:hover {
    background: var(--accent-secondary) !important;
}

.nav-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
}

.nav-toggle span {
    display: block;
    width: 24px;
    height: 2px;
    background: var(--text-primary);
    border-radius: 2px;
    transition: var(--transition-fast);
}

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

.hero-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    z-index: 0;
}

.code-rain {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0.03;
}

.hero-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    align-items: center;
    position: relative;
    z-index: 1;
}

.hero-text {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.hero-greeting {
    font-family: var(--font-mono);
    font-size: 1rem;
}

.code-comment {
    color: var(--code-comment);
}

.hero-title {
    font-family: var(--font-mono);
    font-size: clamp(2.5rem, 5vw, 4rem);
    font-weight: 700;
    line-height: 1.1;
    margin: 8px 0;
}

.code-class {
    color: var(--code-class);
}

.code-method {
    color: var(--code-method);
}

.code-keyword {
    color: var(--code-keyword);
}

.code-string {
    color: var(--code-string);
}

.code-variable {
    color: var(--code-variable);
}

.code-annotation {
    color: var(--code-annotation);
}

.code-bracket {
    color: var(--code-bracket);
}

.hero-subtitle {
    font-family: var(--font-mono);
    font-size: 1rem;
    color: var(--text-secondary);
}

.hero-description {
    font-family: var(--font-mono);
    font-size: 0.9rem;
    color: var(--code-string);
    padding-left: 24px;
    min-height: 60px;
}

.hero-closing {
    font-family: var(--font-mono);
    font-size: 1rem;
    color: var(--text-secondary);
}

.hero-cta {
    display: flex;
    gap: 16px;
    margin-top: 32px;
}

/* Buttons */
.btn {
    font-family: var(--font-mono);
    font-size: 0.9rem;
    padding: 12px 24px;
    border-radius: 8px;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: var(--transition-normal);
    border: 1px solid transparent;
}

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

.btn-primary:hover {
    background: var(--accent-secondary);
    transform: translateY(-2px);
    box-shadow: 0 0 30px var(--accent-glow);
}

.btn-code {
    color: var(--bg-secondary);
    font-weight: 600;
}

.btn-secondary {
    background: transparent;
    color: var(--text-primary);
    border-color: var(--border-color);
}

.btn-secondary:hover {
    border-color: var(--accent-primary);
    color: var(--accent-primary);
}

/* Hero Image - Terminal */
.hero-image {
    display: flex;
    justify-content: center;
}

.terminal-window {
    background: var(--bg-secondary);
    border-radius: 12px;
    border: 1px solid var(--border-color);
    overflow: hidden;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
    width: 100%;
    max-width: 400px;
}

.terminal-header {
    background: var(--bg-tertiary);
    padding: 12px 16px;
    display: flex;
    align-items: center;
    gap: 8px;
    border-bottom: 1px solid var(--border-color);
}

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

.terminal-dot.red { background: var(--terminal-red); }
.terminal-dot.yellow { background: var(--terminal-yellow); }
.terminal-dot.green { background: var(--terminal-green); }

.terminal-title {
    margin-left: auto;
    font-family: var(--font-mono);
    font-size: 0.75rem;
    color: var(--text-muted);
}

.terminal-body {
    padding: 20px;
    display: flex;
    justify-content: center;
}

.profile-image {
    width: 100%;
    max-width: 300px;
    border-radius: 8px;
    border: 2px solid var(--border-color);
}

/* Scroll Indicator */
.scroll-indicator {
    position: absolute;
    bottom: 40px;
    left: 50%;
    transform: translateX(-50%);
    color: var(--text-muted);
    text-decoration: none;
}

.scroll-arrow {
    display: block;
    width: 24px;
    height: 24px;
    border-right: 2px solid var(--text-muted);
    border-bottom: 2px solid var(--text-muted);
    transform: rotate(45deg);
    animation: scrollBounce 2s infinite;
}

@keyframes scrollBounce {
    0%, 20%, 50%, 80%, 100% { transform: rotate(45deg) translateY(0); }
    40% { transform: rotate(45deg) translateY(10px); }
    60% { transform: rotate(45deg) translateY(5px); }
}

/* ===========================================
   Sections General
   =========================================== */
.section {
    padding: var(--section-padding);
}

.section-title {
    font-family: var(--font-mono);
    font-size: 0.9rem;
    margin-bottom: 48px;
    line-height: 1.8;
}

/* ===========================================
   Sobre Section
   =========================================== */
.sobre-content {
    display: grid;
    grid-template-columns: 1fr 1.5fr;
    gap: 60px;
    align-items: start;
}

.code-window {
    background: var(--bg-secondary);
    border-radius: 12px;
    border: 1px solid var(--border-color);
    overflow: hidden;
}

.code-header {
    background: var(--bg-tertiary);
    padding: 12px 16px;
    border-bottom: 1px solid var(--border-color);
}

.code-file {
    font-family: var(--font-mono);
    font-size: 0.8rem;
    color: var(--text-secondary);
}

.sobre-photo {
    width: 100%;
    display: block;
}

.sobre-text {
    display: flex;
    flex-direction: column;
    gap: 40px;
}

.code-block {
    background: var(--bg-secondary);
    border-radius: 12px;
    border: 1px solid var(--border-color);
    padding: 24px;
    overflow-x: auto;
}

.code-block pre {
    margin: 0;
}

.code-block code {
    font-family: var(--font-mono);
    font-size: 0.85rem;
    line-height: 1.8;
}

.sobre-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
}

.stat {
    text-align: center;
    padding: 24px;
    background: var(--bg-secondary);
    border-radius: 12px;
    border: 1px solid var(--border-color);
}

.stat-number {
    display: block;
    font-family: var(--font-mono);
    font-size: 2rem;
    font-weight: 700;
    color: var(--accent-primary);
}

.stat-label {
    display: block;
    font-size: 0.85rem;
    color: var(--text-secondary);
    margin-top: 8px;
}

/* ===========================================
   Experiencia Section
   =========================================== */
.experiencia {
    background: var(--bg-secondary);
}

.timeline {
    position: relative;
    padding-left: 40px;
}

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

.timeline-item {
    position: relative;
    margin-bottom: 40px;
}

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

.timeline-marker {
    position: absolute;
    left: -40px;
    top: 8px;
    width: 16px;
    height: 16px;
    background: var(--bg-secondary);
    border: 2px solid var(--accent-primary);
    border-radius: 50%;
    z-index: 1;
}

.timeline-item:first-child .timeline-marker {
    background: var(--accent-primary);
    box-shadow: 0 0 10px var(--accent-glow);
}

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

.timeline-content:hover {
    border-color: var(--accent-primary);
    transform: translateX(8px);
}

.job-header {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 12px;
}

.job-date {
    font-family: var(--font-mono);
    font-size: 0.8rem;
    color: var(--text-muted);
}

.job-status {
    font-family: var(--font-mono);
    font-size: 0.75rem;
    color: var(--terminal-green);
}

.job-title {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 4px;
}

.job-company {
    font-size: 1rem;
    color: var(--accent-primary);
    font-weight: 500;
    margin-bottom: 16px;
}

.job-via {
    color: var(--text-muted);
    font-weight: 400;
    font-size: 0.9rem;
}

.job-description {
    font-size: 0.95rem;
    color: var(--text-secondary);
    line-height: 1.7;
    margin-bottom: 16px;
}

.job-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.tag {
    font-family: var(--font-mono);
    font-size: 0.75rem;
    padding: 4px 12px;
    background: var(--bg-tertiary);
    color: var(--code-string);
    border-radius: 4px;
    border: 1px solid var(--border-color);
}

/* ===========================================
   Skills Section
   =========================================== */
.skills-code-block {
    max-width: 800px;
    margin: 0 auto;
}

.skills-code-block .code-window {
    background: var(--bg-secondary);
    border-radius: 12px;
    border: 1px solid var(--border-color);
    overflow: hidden;
    transition: var(--transition-normal);
}

.skills-code-block .code-window:hover {
    border-color: var(--accent-primary);
    box-shadow: 0 0 30px rgba(247, 129, 102, 0.1);
}

.skills-code-block .code-body {
    padding: 24px;
    overflow-x: auto;
}

.skills-code-block pre {
    margin: 0;
}

.skills-code-block code {
    font-family: var(--font-mono);
    font-size: 0.9rem;
    line-height: 1.7;
}

/* ===========================================
   Contato Section
   =========================================== */
.contato {
    background: var(--bg-secondary);
}

.contato-content {
    display: grid;
    grid-template-columns: 1.5fr 1fr;
    gap: 60px;
    align-items: start;
}

.contato-code {
    padding: 32px;
}

.contato-links {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.contato-card {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 20px;
    background: var(--bg-card);
    border-radius: 12px;
    border: 1px solid var(--border-color);
    text-decoration: none;
    transition: var(--transition-normal);
}

.contato-card:hover {
    border-color: var(--accent-primary);
    transform: translateX(8px);
}

.contato-icon {
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-tertiary);
    border-radius: 12px;
}

.contato-icon svg {
    width: 24px;
    height: 24px;
    color: var(--accent-primary);
}

.contato-info {
    display: flex;
    flex-direction: column;
}

.contato-label {
    font-size: 0.75rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.contato-value {
    font-family: var(--font-mono);
    font-size: 0.9rem;
    color: var(--text-primary);
}

/* ===========================================
   Footer
   =========================================== */
.footer {
    padding: 40px 0;
    border-top: 1px solid var(--border-color);
}

.footer-content {
    text-align: center;
}

.footer-text {
    font-family: var(--font-mono);
    font-size: 0.85rem;
    color: var(--text-secondary);
}

/* ===========================================
   Animations
   =========================================== */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-in-up {
    animation: fadeInUp 0.6s ease forwards;
}

/* ===========================================
   Responsive
   =========================================== */
@media (max-width: 1024px) {
    .sobre-content {
        grid-template-columns: 1fr;
        gap: 40px;
    }

    .sobre-image {
        max-width: 400px;
        margin: 0 auto;
    }
}

@media (max-width: 768px) {
    :root {
        --section-padding: 60px 0;
    }

    .nav-toggle {
        display: flex;
    }

    .nav-menu {
        position: fixed;
        top: 0;
        right: -100%;
        width: 80%;
        max-width: 300px;
        height: 100vh;
        background: var(--bg-secondary);
        flex-direction: column;
        justify-content: center;
        align-items: center;
        gap: 24px;
        transition: var(--transition-normal);
        border-left: 1px solid var(--border-color);
    }

    .nav-menu.active {
        right: 0;
    }

    .nav-toggle.active span:nth-child(1) {
        transform: rotate(45deg) translate(5px, 5px);
    }

    .nav-toggle.active span:nth-child(2) {
        opacity: 0;
    }

    .nav-toggle.active span:nth-child(3) {
        transform: rotate(-45deg) translate(5px, -5px);
    }

    .hero-content {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .hero-text {
        order: 2;
    }

    .hero-image {
        order: 1;
    }

    .terminal-window {
        max-width: 280px;
    }

    .hero-cta {
        justify-content: center;
        flex-wrap: wrap;
    }

    .scroll-indicator {
        display: none;
    }

    .contato-content {
        grid-template-columns: 1fr;
        gap: 40px;
    }

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

    .skills-code-block code {
        font-size: 0.75rem;
    }

    .timeline {
        padding-left: 30px;
    }

    .timeline-marker {
        left: -30px;
        width: 12px;
        height: 12px;
    }
}

@media (max-width: 480px) {
    .hero-title {
        font-size: 2rem;
    }

    .btn {
        padding: 10px 20px;
        font-size: 0.85rem;
    }

    .code-block {
        padding: 16px;
    }

    .code-block code {
        font-size: 0.75rem;
    }
}
