/* ═══════════════════════════════════════════════════════════
   DESIGN TOKENS
   ═══════════════════════════════════════════════════════════ */
:root {
    /* ── Palette: Deep Blue Tech ── */
    --bg-primary:     #060b18;
    --bg-secondary:   #0a1128;
    --bg-card:        #0d1630;
    --bg-card-hover:  #111d3f;

    --text-primary:   #e2e8f4;
    --text-secondary: #8892a8;
    --text-muted:     #5a6482;

    --accent:         #3b82f6;
    --accent-light:   #60a5fa;
    --accent-dim:     rgba(59, 130, 246, 0.15);
    --accent-glow:    rgba(59, 130, 246, 0.25);

    --border:         rgba(255, 255, 255, 0.06);
    --border-hover:   rgba(59, 130, 246, 0.3);

    --whatsapp:       #25D366;
    --whatsapp-dim:   rgba(37, 211, 102, 0.15);

    /* ── Typography ── */
    --font: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;

    /* ── Spacing ── */
    --section-padding: 120px 0;
    --container-width: 1140px;

    /* ── Transitions ── */
    --ease: cubic-bezier(0.4, 0, 0.2, 1);
    --ease-spring: cubic-bezier(0.34, 1.56, 0.64, 1);
}

/* ═══════════════════════════════════════════════════════════
   RESET & BASE
   ═══════════════════════════════════════════════════════════ */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

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

body {
    font-family: var(--font);
    background-color: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.7;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

a {
    text-decoration: none;
    color: inherit;
    transition: color 0.3s var(--ease);
}

ul { list-style: none; }

img {
    display: block;
    max-width: 100%;
}

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

.section-label {
    font-size: 0.8rem;
    font-weight: 600;
    letter-spacing: 3px;
    text-transform: uppercase;
    color: var(--accent);
    margin-bottom: 12px;
}

.section-title {
    font-size: clamp(2rem, 5vw, 3rem);
    font-weight: 800;
    line-height: 1.15;
    margin-bottom: 16px;
}

.section-subtitle {
    font-size: 1.05rem;
    color: var(--text-secondary);
    max-width: 520px;
    margin-bottom: 56px;
}

.accent-dot {
    color: var(--accent);
}

/* ── Buttons ── */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 14px 28px;
    border-radius: 12px;
    font-family: var(--font);
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s var(--ease);
    border: none;
}

.btn-primary {
    background: var(--accent);
    color: #fff;
    box-shadow: 0 4px 20px rgba(59, 130, 246, 0.3);
}

.btn-primary:hover {
    background: var(--accent-light);
    box-shadow: 0 6px 30px rgba(59, 130, 246, 0.45);
    transform: translateY(-2px);
}

.btn-outline {
    background: transparent;
    color: var(--text-primary);
    border: 1.5px solid var(--border);
}

.btn-outline:hover {
    border-color: var(--accent);
    color: var(--accent-light);
    background: var(--accent-dim);
    transform: translateY(-2px);
}

/* ═══════════════════════════════════════════════════════════
   NAVBAR
   ═══════════════════════════════════════════════════════════ */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    padding: 0 24px;
    transition: all 0.4s var(--ease);
}

.navbar.scrolled {
    background: rgba(6, 11, 24, 0.85);
    backdrop-filter: blur(20px) saturate(1.5);
    -webkit-backdrop-filter: blur(20px) saturate(1.5);
    border-bottom: 1px solid var(--border);
}

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

.nav-logo {
    font-size: 1.15rem;
    font-weight: 700;
    letter-spacing: -0.5px;
}

.logo-bracket {
    color: var(--accent);
}

.nav-links {
    display: flex;
    gap: 8px;
}

.nav-link {
    padding: 8px 16px;
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--text-secondary);
    border-radius: 8px;
    transition: all 0.3s var(--ease);
    position: relative;
}

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

.nav-link.active::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 20px;
    height: 2px;
    background: var(--accent);
    border-radius: 1px;
}

.nav-cta {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    border-radius: 10px;
    font-size: 0.85rem;
    font-weight: 600;
    color: #fff;
    background: var(--whatsapp);
    transition: all 0.3s var(--ease);
    box-shadow: 0 2px 12px rgba(37, 211, 102, 0.25);
}

.nav-cta:hover {
    background: #2be573;
    box-shadow: 0 4px 20px rgba(37, 211, 102, 0.4);
    transform: translateY(-1px);
}

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

.nav-toggle span {
    width: 22px;
    height: 2px;
    background: var(--text-primary);
    border-radius: 2px;
    transition: all 0.3s var(--ease);
}

/* ═══════════════════════════════════════════════════════════
   HERO SECTION
   ═══════════════════════════════════════════════════════════ */
.hero {
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: center;
    overflow: hidden;
    padding: 100px 24px 60px;
}

.hero-bg-grid {
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(rgba(59, 130, 246, 0.03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(59, 130, 246, 0.03) 1px, transparent 1px);
    background-size: 60px 60px;
    mask-image: radial-gradient(ellipse 60% 60% at 50% 40%, black 20%, transparent 70%);
    -webkit-mask-image: radial-gradient(ellipse 60% 60% at 50% 40%, black 20%, transparent 70%);
}

.hero-glow {
    position: absolute;
    top: -20%;
    right: -10%;
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, rgba(59, 130, 246, 0.08) 0%, transparent 70%);
    pointer-events: none;
}

.hero-container {
    max-width: var(--container-width);
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1fr 1fr;
    align-items: center;
    gap: 60px;
    width: 100%;
}

.hero-greeting {
    font-size: 1rem;
    font-weight: 500;
    color: var(--accent);
    letter-spacing: 1px;
    margin-bottom: 12px;
}

.hero-name {
    font-size: clamp(2.5rem, 6vw, 4rem);
    font-weight: 800;
    line-height: 1.1;
    margin-bottom: 16px;
    background: linear-gradient(135deg, var(--text-primary) 0%, var(--accent-light) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-title {
    font-size: 1.3rem;
    font-weight: 600;
    color: var(--text-secondary);
    margin-bottom: 20px;
}

.hero-description {
    font-size: 1.05rem;
    color: var(--text-muted);
    max-width: 460px;
    margin-bottom: 36px;
    line-height: 1.8;
}

.hero-actions {
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
}

/* ── Avatar & Floating Badges ── */
.hero-visual {
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

.hero-avatar-wrapper {
    position: relative;
    width: 320px;
    height: 320px;
}

.avatar-ring {
    position: absolute;
    inset: -12px;
    border-radius: 50%;
    border: 2px solid transparent;
    border-top-color: var(--accent);
    border-right-color: rgba(59, 130, 246, 0.3);
    animation: ring-spin 8s linear infinite;
}

@keyframes ring-spin {
    to { transform: rotate(360deg); }
}

.hero-avatar {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid var(--bg-card);
    box-shadow: 0 0 60px rgba(59, 130, 246, 0.15);
}

.floating-badge {
    position: absolute;
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 18px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 12px;
    font-size: 0.8rem;
    font-weight: 600;
    white-space: nowrap;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
    animation: float 6s ease-in-out infinite;
}

.badge-icon {
    font-size: 1.1rem;
}

.badge-1 {
    top: 10%;
    right: -20px;
    animation-delay: 0s;
}

.badge-2 {
    bottom: 20%;
    right: -40px;
    animation-delay: -2s;
}

.badge-3 {
    bottom: 5%;
    left: -20px;
    animation-delay: -4s;
}

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

/* ── Scroll Indicator ── */
.scroll-indicator {
    position: absolute;
    bottom: 32px;
    left: 50%;
    transform: translateX(-50%);
}

.scroll-line {
    width: 1px;
    height: 48px;
    background: linear-gradient(to bottom, var(--accent), transparent);
    animation: scroll-pulse 2s ease-in-out infinite;
}

@keyframes scroll-pulse {
    0%, 100% { opacity: 0.3; transform: scaleY(0.6); }
    50% { opacity: 1; transform: scaleY(1); }
}

/* ═══════════════════════════════════════════════════════════
   SKILLS SECTION
   ═══════════════════════════════════════════════════════════ */
.skills {
    padding: var(--section-padding);
    position: relative;
}

.skills-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 24px;
}

.skill-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 20px;
    padding: 36px;
    transition: all 0.4s var(--ease);
    position: relative;
    overflow: hidden;
}

.skill-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, transparent, var(--accent), transparent);
    opacity: 0;
    transition: opacity 0.4s var(--ease);
}

.skill-card:hover {
    border-color: var(--border-hover);
    background: var(--bg-card-hover);
    transform: translateY(-4px);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
}

.skill-card:hover::before {
    opacity: 1;
}

.skill-icon-wrapper {
    width: 52px;
    height: 52px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--accent-dim);
    border-radius: 14px;
    margin-bottom: 20px;
    color: var(--accent);
}

.skill-icon {
    width: 26px;
    height: 26px;
}

.skill-name {
    font-size: 1.15rem;
    font-weight: 700;
    margin-bottom: 10px;
}

.skill-desc {
    font-size: 0.9rem;
    color: var(--text-secondary);
    margin-bottom: 20px;
    line-height: 1.7;
}

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

.tag {
    padding: 5px 14px;
    background: rgba(59, 130, 246, 0.08);
    border: 1px solid rgba(59, 130, 246, 0.12);
    border-radius: 8px;
    font-size: 0.75rem;
    font-weight: 500;
    color: var(--accent-light);
}

/* ═══════════════════════════════════════════════════════════
   PROJECTS SECTION
   ═══════════════════════════════════════════════════════════ */
.projects {
    padding: var(--section-padding);
    background: var(--bg-secondary);
    position: relative;
}

.projects::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--border), transparent);
}

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

.project-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 20px;
    padding: 32px;
    display: flex;
    flex-direction: column;
    transition: all 0.4s var(--ease);
    position: relative;
}

.project-card:hover {
    border-color: var(--border-hover);
    transform: translateY(-6px);
    box-shadow: 0 24px 64px rgba(0, 0, 0, 0.35);
}

.project-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 24px;
}

.project-folder {
    width: 40px;
    height: 40px;
    color: var(--accent);
}

.project-link {
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    color: var(--text-muted);
    transition: all 0.3s var(--ease);
}

.project-link svg {
    width: 18px;
    height: 18px;
}

.project-link:hover {
    color: var(--accent-light);
    background: var(--accent-dim);
}

.project-name {
    font-size: 1.15rem;
    font-weight: 700;
    margin-bottom: 12px;
    transition: color 0.3s var(--ease);
}

.project-card:hover .project-name {
    color: var(--accent-light);
}

.project-desc {
    font-size: 0.88rem;
    color: var(--text-secondary);
    line-height: 1.7;
    flex: 1;
    margin-bottom: 24px;
}

.project-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: auto;
}

.project-tags span {
    font-size: 0.72rem;
    font-weight: 500;
    color: var(--text-muted);
    padding: 4px 0;
}

.project-tags span::after {
    content: '·';
    margin-left: 8px;
    color: var(--border);
}

.project-tags span:last-child::after {
    display: none;
}

.projects-cta {
    text-align: center;
    margin-top: 48px;
}

/* ═══════════════════════════════════════════════════════════
   CONTACT SECTION
   ═══════════════════════════════════════════════════════════ */
.contact {
    padding: var(--section-padding);
    position: relative;
}

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

.contact-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 20px;
    padding: 36px;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 4px;
    transition: all 0.4s var(--ease);
    cursor: pointer;
}

.contact-card:hover {
    border-color: var(--border-hover);
    transform: translateY(-4px);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
}

.contact-card.whatsapp-card:hover {
    border-color: rgba(37, 211, 102, 0.3);
    box-shadow: 0 20px 60px rgba(37, 211, 102, 0.1);
}

.contact-icon-wrapper {
    width: 56px;
    height: 56px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 16px;
    margin-bottom: 16px;
}

.whatsapp-bg {
    background: var(--whatsapp-dim);
    color: var(--whatsapp);
}

.github-bg {
    background: rgba(255, 255, 255, 0.06);
    color: var(--text-primary);
}

.email-bg {
    background: var(--accent-dim);
    color: var(--accent);
}

.contact-card h3 {
    font-size: 1.1rem;
    font-weight: 700;
    margin-bottom: 2px;
}

.contact-card p {
    font-size: 0.88rem;
    color: var(--text-secondary);
    margin-bottom: 16px;
}

.contact-action {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--accent);
    transition: all 0.3s var(--ease);
    margin-top: auto;
}

.contact-card:hover .contact-action {
    color: var(--accent-light);
    transform: translateX(4px);
}

.whatsapp-card:hover .contact-action {
    color: var(--whatsapp);
}

/* ═══════════════════════════════════════════════════════════
   FOOTER
   ═══════════════════════════════════════════════════════════ */
.footer {
    padding: 40px 24px;
    border-top: 1px solid var(--border);
}

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

.footer-logo {
    font-size: 1rem;
    font-weight: 700;
}

.footer-copy {
    font-size: 0.8rem;
    color: var(--text-muted);
}

.footer-socials {
    display: flex;
    gap: 16px;
}

.footer-socials a {
    color: var(--text-muted);
    transition: all 0.3s var(--ease);
    display: flex;
}

.footer-socials a:hover {
    color: var(--accent-light);
    transform: translateY(-2px);
}

/* ═══════════════════════════════════════════════════════════
   ANIMATIONS (Scroll Reveal)
   ═══════════════════════════════════════════════════════════ */
.animate-in {
    opacity: 0;
    transform: translateY(30px);
    animation: fadeInUp 0.8s var(--ease) forwards;
}

.delay-1 { animation-delay: 0.15s; }
.delay-2 { animation-delay: 0.3s; }
.delay-3 { animation-delay: 0.45s; }
.delay-4 { animation-delay: 0.6s; }

@keyframes fadeInUp {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

[data-reveal] {
    opacity: 0;
    transform: translateY(40px);
    transition: opacity 0.7s var(--ease), transform 0.7s var(--ease);
}

[data-reveal].revealed {
    opacity: 1;
    transform: translateY(0);
}

/* ═══════════════════════════════════════════════════════════
   RESPONSIVE
   ═══════════════════════════════════════════════════════════ */
@media (max-width: 1024px) {
    .hero-container {
        grid-template-columns: 1fr;
        text-align: center;
    }

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

    .hero-actions {
        justify-content: center;
    }

    .hero-visual {
        order: -1;
    }

    .hero-avatar-wrapper {
        width: 240px;
        height: 240px;
    }

    .skills-grid {
        grid-template-columns: 1fr 1fr;
    }

    .projects-grid {
        grid-template-columns: 1fr 1fr;
    }
}

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

    .nav-links {
        display: none;
        position: absolute;
        top: 72px;
        left: 0;
        right: 0;
        flex-direction: column;
        background: rgba(6, 11, 24, 0.97);
        backdrop-filter: blur(20px);
        padding: 16px 24px;
        border-bottom: 1px solid var(--border);
        gap: 4px;
    }

    .nav-links.open {
        display: flex;
    }

    .nav-cta {
        display: none;
    }

    .nav-toggle {
        display: flex;
    }

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

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

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

    .skills-grid {
        grid-template-columns: 1fr;
    }

    .projects-grid {
        grid-template-columns: 1fr;
    }

    .contact-grid {
        grid-template-columns: 1fr;
    }

    .hero-avatar-wrapper {
        width: 200px;
        height: 200px;
    }

    .floating-badge {
        font-size: 0.7rem;
        padding: 8px 14px;
    }

    .badge-2 {
        right: -10px;
    }

    .footer-container {
        flex-direction: column;
        gap: 16px;
        text-align: center;
    }
}

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

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

    .section-title {
        font-size: 1.8rem;
    }
}
