/* ============================================================
   OMD Soluções — Personal Site
   Design: dark tech, minimal, cyan/purple accent
   ============================================================ */

/* ───────────────── Design Tokens ───────────────── */
:root {
    --bg:           #060611;
    --bg-alt:       #0b0b1e;
    --surface:      rgba(255, 255, 255, 0.03);
    --surface-h:    rgba(255, 255, 255, 0.055);
    --border:       rgba(255, 255, 255, 0.07);
    --border-a:     rgba(0, 212, 255, 0.25);

    --cyan:         #00d4ff;
    --cyan-dim:     rgba(0, 212, 255, 0.12);
    --purple:       #8b5cf6;
    --purple-dim:   rgba(139, 92, 246, 0.12);

    --text:         #eeeeff;
    --text-muted:   #6b7280;
    --text-faint:   #2d2d4d;

    --grad:         linear-gradient(135deg, #00d4ff 0%, #8b5cf6 100%);
    --glow-cyan:    0 0 40px rgba(0, 212, 255, 0.18);
    --glow-card:    0 20px 60px rgba(0, 0, 0, 0.4);

    --radius:       14px;
    --radius-sm:    8px;
    --ease:         cubic-bezier(0.4, 0, 0.2, 1);
    --t:            0.28s;
}

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

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

body {
    font-family: 'Inter', system-ui, sans-serif;
    background-color: var(--bg);
    color: var(--text);
    line-height: 1.65;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

a { color: inherit; text-decoration: none; }

/* Custom scrollbar */
::-webkit-scrollbar              { width: 3px; }
::-webkit-scrollbar-track        { background: var(--bg); }
::-webkit-scrollbar-thumb        { background: var(--cyan); border-radius: 2px; }

/* ───────────────── Utilities ───────────────── */
.container {
    max-width: 1080px;
    margin: 0 auto;
    padding: 0 28px;
}

/* ───────────────── Navigation ───────────────── */
#nav {
    position: fixed;
    inset: 0 0 auto 0;
    z-index: 200;
    padding: 0;
    transition: background var(--t) var(--ease), border-color var(--t) var(--ease);
}

#nav.scrolled {
    background: rgba(6, 6, 17, 0.88);
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    border-bottom: 1px solid var(--border);
}

.nav-container {
    max-width: 1080px;
    margin: 0 auto;
    padding: 22px 28px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
}

/* Nav logo — recreated typographically */
.nav-logo {
    display: flex;
    align-items: center;
    gap: 6px;
    transition: opacity var(--t);
}

.nav-logo:hover { opacity: 0.8; }

.nav-logo-text {
    font-size: 1.4rem;
    font-weight: 900;
    letter-spacing: -0.06em;
    background: var(--grad);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    line-height: 1;
}

.nav-logo-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--cyan);
    box-shadow: 0 0 8px var(--cyan);
    flex-shrink: 0;
    animation: pulse-dot 2.5s ease-in-out infinite;
}

@keyframes pulse-dot {
    0%, 100% { opacity: 1; box-shadow: 0 0 8px var(--cyan); }
    50%       { opacity: 0.5; box-shadow: 0 0 16px var(--cyan); }
}

.nav-links {
    display: flex;
    list-style: none;
    gap: 40px;
}

.nav-links a {
    font-size: 0.8rem;
    font-weight: 500;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--text-muted);
    transition: color var(--t) var(--ease);
    position: relative;
    padding-bottom: 2px;
}

.nav-links a::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 1px;
    background: var(--cyan);
    transition: width var(--t) var(--ease);
}

.nav-links a:hover,
.nav-links a.active { color: var(--cyan); }

.nav-links a:hover::after,
.nav-links a.active::after { width: 100%; }

/* Hamburger */
.nav-toggle {
    display: none;
    flex-direction: column;
    gap: 6px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 4px;
    z-index: 201;
}

.nav-toggle span {
    display: block;
    width: 22px;
    height: 2px;
    background: var(--text);
    border-radius: 2px;
    transition: transform var(--t) var(--ease), opacity var(--t) var(--ease), background var(--t);
}

.nav-toggle.open span:first-child { transform: rotate(45deg) translate(5px, 5px); background: var(--cyan); }
.nav-toggle.open span:last-child  { transform: rotate(-45deg) translate(5px, -5px); background: var(--cyan); }

/* ───────────────── Hero ───────────────── */
#hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
    padding: 100px 28px 80px;
}

/* Particle canvas */
#particles-canvas {
    position: absolute;
    inset: 0;
    z-index: 0;
    pointer-events: none;
}

/* Blurred gradient orbs */
.hero-bg-orbs {
    position: absolute;
    inset: 0;
    z-index: 1;
    pointer-events: none;
}

.orb {
    position: absolute;
    border-radius: 50%;
    filter: blur(90px);
    opacity: 0.22;
    animation: float-orb 10s ease-in-out infinite alternate;
}

.orb-1 {
    width: 520px;
    height: 520px;
    background: radial-gradient(circle, #00d4ff, transparent 70%);
    top: -160px;
    right: -80px;
    animation-delay: 0s;
}

.orb-2 {
    width: 420px;
    height: 420px;
    background: radial-gradient(circle, #8b5cf6, transparent 70%);
    bottom: -120px;
    left: -80px;
    animation-delay: -5s;
}

@keyframes float-orb {
    from { transform: translate(0, 0) scale(1); }
    to   { transform: translate(30px, -30px) scale(1.08); }
}

/* Subtle grid overlay */
.hero-grid-lines {
    position: absolute;
    inset: 0;
    z-index: 1;
    background-image:
        linear-gradient(rgba(0, 212, 255, 0.025) 1px, transparent 1px),
        linear-gradient(90deg, rgba(0, 212, 255, 0.025) 1px, transparent 1px);
    background-size: 64px 64px;
    pointer-events: none;
}

/* Large "omd" as atmospheric background */
.hero-brand-bg {
    position: absolute;
    right: -2vw;
    bottom: -4vh;
    font-size: clamp(14rem, 28vw, 22rem);
    font-weight: 900;
    letter-spacing: -0.07em;
    line-height: 0.85;
    z-index: 1;
    pointer-events: none;
    user-select: none;
    background: var(--grad);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    opacity: 0.04;
}

/* Hero content */
.hero-content {
    position: relative;
    z-index: 2;
    text-align: center;
    max-width: 820px;
    width: 100%;
}

.hero-greeting {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 16px;
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.78rem;
    color: var(--cyan);
    letter-spacing: 0.14em;
    text-transform: lowercase;
    margin-bottom: 28px;
    opacity: 0;
    animation: fade-up 0.7s var(--ease) 0.1s forwards;
}

.greeting-line {
    display: block;
    width: 36px;
    height: 1px;
    background: var(--cyan);
    opacity: 0.45;
}

/* Name */
.hero-name {
    font-size: clamp(3.2rem, 9vw, 7rem);
    font-weight: 900;
    letter-spacing: -0.04em;
    line-height: 1.0;
    margin-bottom: 28px;
    opacity: 0;
    animation: fade-up 0.7s var(--ease) 0.25s forwards;
}

.name-first {
    display: block;
    color: var(--text);
}

.name-last {
    display: block;
    background: var(--grad);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Typing subtitle */
.hero-subtitle {
    font-family: 'JetBrains Mono', monospace;
    font-size: clamp(0.9rem, 2.2vw, 1.1rem);
    color: var(--text-muted);
    margin-bottom: 44px;
    min-height: 1.65em;
    opacity: 0;
    animation: fade-up 0.7s var(--ease) 0.4s forwards;
}

.typed { color: var(--cyan); }

.cursor {
    display: inline-block;
    color: var(--cyan);
    animation: blink 0.9s step-end infinite;
    font-weight: 300;
    margin-left: 1px;
}

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

/* CTA buttons */
.hero-cta {
    display: flex;
    gap: 14px;
    justify-content: center;
    flex-wrap: wrap;
    opacity: 0;
    animation: fade-up 0.7s var(--ease) 0.55s forwards;
}

.btn {
    display: inline-flex;
    align-items: center;
    padding: 14px 34px;
    border-radius: var(--radius-sm);
    font-size: 0.85rem;
    font-weight: 600;
    letter-spacing: 0.04em;
    transition: all var(--t) var(--ease);
    cursor: pointer;
    border: 1px solid transparent;
}

.btn-primary {
    background: var(--grad);
    color: #fff;
    box-shadow: 0 0 32px rgba(0, 212, 255, 0.28);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 0 52px rgba(0, 212, 255, 0.45);
}

.btn-ghost {
    background: transparent;
    color: var(--text-muted);
    border-color: var(--border);
}

.btn-ghost:hover {
    border-color: var(--border-a);
    color: var(--cyan);
    transform: translateY(-2px);
}

/* Scroll bounce indicator */
.scroll-indicator {
    position: absolute;
    bottom: 32px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 2;
    opacity: 0;
    animation: fade-up 1s var(--ease) 1s forwards;
}

.scroll-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--cyan);
    box-shadow: 0 0 12px var(--cyan);
    animation: scroll-bounce 2s ease-in-out infinite;
}

@keyframes scroll-bounce {
    0%, 100% { transform: translateY(0); opacity: 1; }
    50%       { transform: translateY(10px); opacity: 0.4; }
}

/* Entry animation */
@keyframes fade-up {
    from { opacity: 0; transform: translateY(28px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* ───────────────── Sections ───────────────── */
section:not(#hero) {
    padding: 120px 0;
    position: relative;
}

.section-header { margin-bottom: 56px; }

.section-tag {
    display: block;
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.78rem;
    color: var(--cyan);
    letter-spacing: 0.1em;
    margin-bottom: 12px;
    opacity: 0.75;
}

.section-title {
    font-size: clamp(2rem, 5vw, 3.5rem);
    font-weight: 800;
    letter-spacing: -0.04em;
    line-height: 1.08;
}

/* Top border gradient line */
section:not(#hero)::before {
    content: '';
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 60%;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--border), transparent);
}

/* ───────────────── About ───────────────── */
#about { background: var(--bg-alt); }

.about-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 72px;
    align-items: center;
}

.about-text p {
    color: var(--text-muted);
    font-size: 1.02rem;
    line-height: 1.85;
    margin-bottom: 18px;
}

.about-text strong {
    color: var(--cyan);
    font-weight: 600;
}

.about-stack {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 32px;
}

.stack-tag {
    padding: 5px 16px;
    border-radius: 100px;
    font-size: 0.77rem;
    font-weight: 500;
    font-family: 'JetBrains Mono', monospace;
    letter-spacing: 0.04em;
    border: 1px solid var(--border-a);
    color: var(--cyan);
    background: var(--cyan-dim);
    transition: all var(--t) var(--ease);
    cursor: default;
}

.stack-tag:hover {
    background: var(--cyan);
    color: #000;
    border-color: var(--cyan);
}

/* Stats */
.about-stats {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px;
}

.stat-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 30px 22px;
    text-align: center;
    transition: all var(--t) var(--ease);
    position: relative;
    overflow: hidden;
}

.stat-card::after {
    content: '';
    position: absolute;
    inset: 0;
    background: var(--grad);
    opacity: 0;
    transition: opacity var(--t) var(--ease);
    border-radius: var(--radius);
}

.stat-card:hover {
    border-color: var(--border-a);
    transform: translateY(-4px);
    box-shadow: var(--glow-cyan);
}

.stat-card:hover::after { opacity: 0.04; }

.stat-number-wrap {
    display: flex;
    align-items: baseline;
    justify-content: center;
    gap: 2px;
    position: relative;
    z-index: 1;
}

.stat-number {
    font-size: 2.8rem;
    font-weight: 900;
    letter-spacing: -0.05em;
    line-height: 1;
    background: var(--grad);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.stat-suffix {
    font-size: 1.6rem;
    font-weight: 900;
    background: var(--grad);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.stat-label {
    display: block;
    font-size: 0.77rem;
    color: var(--text-muted);
    margin-top: 8px;
    letter-spacing: 0.03em;
    position: relative;
    z-index: 1;
}

/* ───────────────── Services ───────────────── */
.services-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 18px;
}

.service-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 40px 36px;
    transition: all var(--t) var(--ease);
    position: relative;
    overflow: hidden;
}

/* Animated top border */
.service-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: var(--grad);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.4s var(--ease);
}

.service-card:hover::before { transform: scaleX(1); }

.service-card:hover {
    border-color: var(--border-a);
    transform: translateY(-5px);
    box-shadow: var(--glow-card);
    background: var(--surface-h);
}

.service-icon {
    width: 50px;
    height: 50px;
    border-radius: 12px;
    background: var(--cyan-dim);
    border: 1px solid var(--border-a);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 24px;
    transition: all var(--t) var(--ease);
}

.service-icon svg {
    width: 22px;
    height: 22px;
    color: var(--cyan);
    stroke: var(--cyan);
    transition: all var(--t) var(--ease);
}

.service-card:hover .service-icon {
    background: var(--cyan);
    border-color: var(--cyan);
    box-shadow: 0 0 20px rgba(0, 212, 255, 0.45);
}

.service-card:hover .service-icon svg {
    stroke: #000;
    color: #000;
}

.service-card h3 {
    font-size: 1.12rem;
    font-weight: 700;
    letter-spacing: -0.02em;
    margin-bottom: 12px;
}

.service-card p {
    color: var(--text-muted);
    font-size: 0.92rem;
    line-height: 1.75;
}

/* ───────────────── Contact ───────────────── */
#contact { background: var(--bg-alt); }

.contact-sub {
    color: var(--text-muted);
    font-size: 1.02rem;
    line-height: 1.75;
    max-width: 480px;
    margin-bottom: 48px;
}

.contact-grid {
    display: flex;
    flex-direction: column;
    gap: 14px;
    max-width: 660px;
}

.contact-card {
    display: flex;
    align-items: center;
    gap: 20px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 22px 26px;
    transition: all var(--t) var(--ease);
    position: relative;
    overflow: hidden;
    cursor: pointer;
}

/* Left accent bar */
.contact-card::before {
    content: '';
    position: absolute;
    left: 0;
    top: 12px;
    bottom: 12px;
    width: 2px;
    background: var(--grad);
    border-radius: 2px;
    transform: scaleY(0);
    transform-origin: top;
    transition: transform 0.35s var(--ease);
}

.contact-card:hover::before { transform: scaleY(1); }

.contact-card:hover {
    border-color: var(--border-a);
    background: var(--surface-h);
    transform: translateX(5px);
    box-shadow: var(--glow-cyan);
}

.contact-icon {
    width: 42px;
    height: 42px;
    flex-shrink: 0;
    border-radius: 10px;
    background: var(--cyan-dim);
    border: 1px solid var(--border-a);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all var(--t) var(--ease);
}

.contact-icon svg {
    width: 18px;
    height: 18px;
    color: var(--cyan);
    stroke: var(--cyan);
    fill: var(--cyan);
    transition: all var(--t) var(--ease);
}

/* GitHub and LinkedIn icons use fill, not stroke */
.contact-icon svg[fill="currentColor"] { stroke: none; }

.contact-card:hover .contact-icon {
    background: var(--cyan);
    border-color: var(--cyan);
    box-shadow: 0 0 16px rgba(0, 212, 255, 0.4);
}

.contact-card:hover .contact-icon svg {
    color: #000;
    stroke: #000;
    fill: #000;
}

.contact-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
}

.contact-label {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.7rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.1em;
}

.contact-value {
    font-size: 0.98rem;
    font-weight: 500;
    color: var(--text);
    transition: color var(--t);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.contact-card:hover .contact-value { color: var(--cyan); }

.contact-arrow {
    font-size: 1.1rem;
    color: var(--text-muted);
    font-family: monospace;
    transition: all var(--t) var(--ease);
    flex-shrink: 0;
}

.contact-card:hover .contact-arrow {
    color: var(--cyan);
    transform: translateX(4px);
}

/* ───────────────── Footer ───────────────── */
#footer {
    padding: 36px 0;
    border-top: 1px solid var(--border);
}

.footer-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 20px;
}

.footer-brand {
    display: flex;
    align-items: baseline;
    gap: 6px;
}

.footer-logo-text {
    font-size: 1.3rem;
    font-weight: 900;
    letter-spacing: -0.06em;
    background: var(--grad);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    opacity: 0.5;
}

.footer-tagline {
    font-size: 0.7rem;
    color: var(--text-faint);
    text-transform: uppercase;
    letter-spacing: 0.1em;
}

.footer-copy {
    font-size: 0.78rem;
    color: var(--text-faint);
    letter-spacing: 0.02em;
}

/* ───────────────── Scroll Reveal ───────────────── */
.reveal {
    opacity: 0;
    transform: translateY(36px);
    transition: opacity 0.75s var(--ease), transform 0.75s var(--ease);
}

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

/* Staggered delay for sibling .reveal elements */
.about-stats .stat-card.reveal:nth-child(1) { transition-delay: 0s; }
.about-stats .stat-card.reveal:nth-child(2) { transition-delay: 0.08s; }
.about-stats .stat-card.reveal:nth-child(3) { transition-delay: 0.16s; }
.about-stats .stat-card.reveal:nth-child(4) { transition-delay: 0.24s; }

.services-grid .service-card.reveal:nth-child(1) { transition-delay: 0s; }
.services-grid .service-card.reveal:nth-child(2) { transition-delay: 0.1s; }
.services-grid .service-card.reveal:nth-child(3) { transition-delay: 0.2s; }
.services-grid .service-card.reveal:nth-child(4) { transition-delay: 0.3s; }

.contact-grid .contact-card.reveal:nth-child(1) { transition-delay: 0s; }
.contact-grid .contact-card.reveal:nth-child(2) { transition-delay: 0.1s; }
.contact-grid .contact-card.reveal:nth-child(3) { transition-delay: 0.2s; }

/* ───────────────── Responsive ───────────────── */
@media (max-width: 768px) {
    .nav-toggle { display: flex; }

    .nav-links {
        position: fixed;
        inset: 0;
        background: rgba(6, 6, 17, 0.97);
        backdrop-filter: blur(24px);
        flex-direction: column;
        align-items: center;
        justify-content: center;
        gap: 36px;
        z-index: 199;
        opacity: 0;
        pointer-events: none;
        transition: opacity 0.3s var(--ease);
    }

    .nav-links.open {
        opacity: 1;
        pointer-events: all;
    }

    .nav-links a {
        font-size: 1.4rem;
        letter-spacing: 0.12em;
    }

    .about-grid {
        grid-template-columns: 1fr;
        gap: 48px;
    }

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

    section:not(#hero) { padding: 88px 0; }

    .hero-brand-bg { opacity: 0.03; }
}

@media (max-width: 520px) {
    .about-stats {
        grid-template-columns: 1fr 1fr;
    }

    .hero-cta {
        flex-direction: column;
        align-items: stretch;
    }

    .btn { justify-content: center; }

    .contact-value { font-size: 0.88rem; }
}
