/* =========================================================
   Clairton Lima — Portfólio  |  Dark Mode + Gold Accent
   ========================================================= */
:root {
    --bg:        #0b0d12;
    --bg-2:      #10131b;
    --bg-3:      #161a24;
    --card:      #141824;
    --card-hover:#1b2130;
    --border:    #242a38;
    --text:      #e7e9ee;
    --text-2:    #9aa3b2;
    --gold:      #d4af37;
    --gold-2:    #f0cf6b;
    --gold-soft: rgba(212, 175, 55, 0.12);
    --wa:        #25d366;
    --wa-dark:   #128c7e;
    --shadow:    0 18px 45px rgba(0, 0, 0, 0.45);
    --radius:    16px;
    --font:      'Poppins', system-ui, -apple-system, sans-serif;
    --mono:      'JetBrains Mono', monospace;
}

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

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

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

::selection { background: var(--gold); color: #000; }

/* Scrollbar */
::-webkit-scrollbar { width: 10px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: #2a3142; border-radius: 10px; }
::-webkit-scrollbar-thumb:hover { background: var(--gold); }

a { text-decoration: none; color: inherit; }
.text-gold { color: var(--gold) !important; }
.text-muted-2 { color: var(--text-2) !important; }
.mono { font-family: var(--mono); }

/* ---------- Buttons ---------- */
.btn { font-weight: 600; border-radius: 50px; padding: .6rem 1.6rem; transition: all .25s ease; }
.btn-gold {
    background: linear-gradient(135deg, var(--gold), var(--gold-2));
    color: #1a1400; border: none;
    box-shadow: 0 8px 22px rgba(212,175,55,.28);
}
.btn-gold:hover { color:#1a1400; transform: translateY(-3px); box-shadow: 0 12px 30px rgba(212,175,55,.42); }
.btn-outline-light { border: 1.5px solid var(--border); color: var(--text); }
.btn-outline-light:hover { background: #fff; color: #000; transform: translateY(-3px); }

/* ---------- Navbar ---------- */
#mainNav {
    padding: 1rem 0;
    background: transparent;
    transition: all .35s ease;
}
#mainNav.scrolled {
    background: rgba(11,13,18,.92);
    backdrop-filter: blur(12px);
    padding: .55rem 0;
    border-bottom: 1px solid var(--border);
    box-shadow: 0 8px 30px rgba(0,0,0,.4);
}
.brand-logo { height: 40px; width: 40px; object-fit: contain; border-radius: 8px; }
.brand-text { font-weight: 800; font-size: 1.25rem; letter-spacing: .3px; color: var(--text); }
.navbar-nav .nav-link {
    color: var(--text-2); font-weight: 500; padding: .5rem 1rem !important;
    position: relative; transition: color .25s;
}
.navbar-nav .nav-link::after {
    content: ''; position: absolute; left: 1rem; bottom: .35rem;
    width: 0; height: 2px; background: var(--gold); transition: width .25s;
}
.navbar-nav .nav-link:hover, .navbar-nav .nav-link.active { color: var(--text); }
.navbar-nav .nav-link:hover::after, .navbar-nav .nav-link.active::after { width: calc(100% - 2rem); }
.navbar-toggler { border: none; color: var(--gold); font-size: 1.6rem; box-shadow: none !important; }

/* ---------- Hero ---------- */
.hero {
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: center;
    padding: 130px 0 90px;
    overflow: hidden;
}
.hero-bg {
    position: absolute; inset: 0; z-index: 0;
    background:
        radial-gradient(circle at 80% 20%, rgba(212,175,55,.14), transparent 45%),
        radial-gradient(circle at 10% 90%, rgba(212,175,55,.08), transparent 40%),
        linear-gradient(180deg, var(--bg), var(--bg-2));
}
.hero-bg::before {
    content: ''; position: absolute; inset: 0;
    background-image:
        linear-gradient(rgba(255,255,255,.025) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255,255,255,.025) 1px, transparent 1px);
    background-size: 48px 48px;
    mask-image: radial-gradient(circle at 60% 40%, #000, transparent 75%);
}
.hero .container { position: relative; z-index: 1; }
.hero-greeting { color: var(--gold); font-weight: 500; letter-spacing: 1px; margin-bottom: .5rem; }
.hero-greeting .mono { color: var(--gold-2); }
.hero-name {
    font-size: clamp(2.6rem, 6vw, 4.4rem);
    font-weight: 800; line-height: 1.05; margin-bottom: .4rem;
    background: linear-gradient(120deg, #fff 30%, var(--gold) 100%);
    -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent;
}
.hero-role { font-size: clamp(1.2rem, 3vw, 1.9rem); font-weight: 600; color: var(--text); margin-bottom: 1.3rem; }
.hero-desc { color: var(--text-2); max-width: 560px; margin-bottom: 1.8rem; font-size: 1.05rem; }
.hero-desc strong { color: var(--text); }
.hero-actions { display: flex; flex-wrap: wrap; gap: .9rem; margin-bottom: 2rem; }
.hero-social { display: flex; gap: .8rem; }
.hero-social a, .footer-social a {
    width: 46px; height: 46px; border-radius: 12px;
    display: grid; place-items: center; font-size: 1.25rem;
    background: var(--card); color: var(--text-2);
    border: 1px solid var(--border); transition: all .25s;
}
.hero-social a:hover, .footer-social a:hover {
    color: var(--gold); border-color: var(--gold);
    transform: translateY(-4px); box-shadow: 0 10px 22px rgba(0,0,0,.4);
}

/* Hero photo */
.hero-photo-wrap { position: relative; display: inline-block; }
.hero-photo {
    width: min(360px, 80vw); aspect-ratio: 1/1.15; object-fit: cover;
    border-radius: 26px; border: 3px solid var(--border);
    box-shadow: var(--shadow); position: relative; z-index: 1;
}
.hero-photo-ring {
    position: absolute; inset: -14px; border-radius: 34px;
    border: 2px dashed rgba(212,175,55,.45); z-index: 0;
    animation: spin 24s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

.scroll-down {
    position: absolute; bottom: 26px; left: 50%; transform: translateX(-50%);
    color: var(--gold); font-size: 1.7rem; z-index: 1; animation: bounce 1.8s infinite;
}
@keyframes bounce { 0%,100%{transform:translate(-50%,0);} 50%{transform:translate(-50%,10px);} }

/* ---------- Stats ---------- */
.stats-strip { background: var(--bg-3); border-block: 1px solid var(--border); padding: 2.6rem 0; }
.stat-num { font-size: clamp(2rem, 5vw, 3rem); font-weight: 800; color: var(--gold); line-height: 1; }
.stat-label { color: var(--text-2); font-size: .92rem; margin-top: .35rem; }

/* ---------- Sections ---------- */
.section { padding: 100px 0; }
.section-alt { background: var(--bg-2); }
.section-heading { margin-bottom: 3rem; max-width: 680px; }
.section-heading.text-center { margin-inline: auto; }
.section-tag {
    display: inline-block; font-family: var(--mono); font-size: .8rem;
    letter-spacing: 2px; text-transform: uppercase; color: var(--gold);
    background: var(--gold-soft); padding: .3rem 1rem; border-radius: 50px;
    border: 1px solid rgba(212,175,55,.3); margin-bottom: 1rem;
}
.section-heading h2 { font-size: clamp(1.8rem, 4vw, 2.6rem); font-weight: 800; }
.section-sub { color: var(--text-2); margin-top: .8rem; }

/* ---------- Sobre ---------- */
.about-img-wrap { position: relative; border-radius: var(--radius); overflow: hidden; }
.about-img { width: 100%; border-radius: var(--radius); border: 1px solid var(--border); box-shadow: var(--shadow); display: block; }
.about-img-wrap::after {
    content: ''; position: absolute; inset: 0; border-radius: var(--radius);
    box-shadow: inset 0 0 0 1px rgba(212,175,55,.25);
    background: linear-gradient(180deg, transparent 60%, rgba(212,175,55,.12));
    pointer-events: none;
}
#sobre p { color: var(--text-2); }
#sobre p strong { color: var(--text); }
.about-list { list-style: none; margin: 1.4rem 0; display: grid; gap: .7rem; }
.about-list li { display: flex; align-items: center; gap: .7rem; color: var(--text-2); }

/* ---------- Skills ---------- */
.skill-box {
    background: var(--card); border: 1px solid var(--border);
    border-radius: var(--radius); padding: 2rem 1.5rem; height: 100%;
    transition: all .3s ease; text-align: center;
}
.skill-box:hover { transform: translateY(-8px); border-color: var(--gold); background: var(--card-hover); }
.skill-icon {
    width: 64px; height: 64px; margin: 0 auto 1.1rem; border-radius: 16px;
    display: grid; place-items: center; font-size: 1.7rem; color: var(--gold);
    background: var(--gold-soft); border: 1px solid rgba(212,175,55,.3);
}
.skill-box h4 { font-weight: 700; margin-bottom: 1rem; font-size: 1.15rem; }
.skill-tags { display: flex; flex-wrap: wrap; gap: .5rem; justify-content: center; }
.skill-tags span {
    font-size: .8rem; padding: .3rem .8rem; border-radius: 50px;
    background: var(--bg-3); color: var(--text-2); border: 1px solid var(--border);
    transition: all .2s;
}
.skill-box:hover .skill-tags span { border-color: rgba(212,175,55,.35); color: var(--text); }

/* ---------- Timeline ---------- */
.timeline { position: relative; max-width: 860px; margin: 0 auto; padding-left: 10px; }
.timeline::before {
    content: ''; position: absolute; left: 22px; top: 8px; bottom: 8px;
    width: 2px; background: linear-gradient(var(--gold), transparent);
}
.timeline-item { position: relative; padding: 0 0 2.2rem 66px; }
.timeline-dot {
    position: absolute; left: 0; top: 0; width: 46px; height: 46px;
    border-radius: 50%; background: var(--card); border: 2px solid var(--gold);
    display: grid; place-items: center; color: var(--gold); font-size: 1.15rem; z-index: 1;
}
.timeline-content {
    background: var(--card); border: 1px solid var(--border);
    border-radius: var(--radius); padding: 1.4rem 1.6rem; transition: all .3s;
}
.timeline-content:hover { border-color: var(--gold); transform: translateX(6px); }
.timeline-date {
    display: inline-block; font-family: var(--mono); font-size: .78rem;
    color: var(--gold); background: var(--gold-soft); padding: .2rem .8rem;
    border-radius: 50px; margin-bottom: .6rem;
}
.timeline-content h4 { font-weight: 700; font-size: 1.15rem; margin-bottom: .2rem; }
.timeline-content h5 { font-size: .95rem; color: var(--gold-2); font-weight: 500; margin-bottom: .7rem; }
.timeline-content p { color: var(--text-2); font-size: .95rem; margin-bottom: 0; }

/* ---------- Formação ---------- */
.edu-card { background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); padding: 2rem; height: 100%; }
.edu-card h3 { font-size: 1.25rem; font-weight: 700; margin-bottom: 1.4rem; }
.edu-item { padding: .9rem 0; border-bottom: 1px dashed var(--border); }
.edu-item:last-child { border-bottom: none; padding-bottom: 0; }
.edu-item h5 { font-size: 1rem; font-weight: 600; margin-bottom: .2rem; }
.edu-item p { color: var(--text-2); font-size: .9rem; margin-bottom: 0; }
.cert-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: .6rem 1.2rem; }
.cert-grid span { display: flex; align-items: center; gap: .55rem; color: var(--text-2); font-size: .92rem; }

/* ---------- Contato ---------- */
.contact-info-card, .contact-form-card {
    background: var(--card); border: 1px solid var(--border);
    border-radius: var(--radius); padding: 2rem; height: 100%;
}
.contact-info-card h3, .contact-form-card h3 { font-size: 1.3rem; font-weight: 700; margin-bottom: 1.5rem; }
.contact-line {
    display: flex; align-items: center; gap: 1rem; padding: .85rem 0;
    border-bottom: 1px solid var(--border); transition: all .2s;
}
.contact-line:last-child { border-bottom: none; }
.contact-line i {
    width: 44px; height: 44px; border-radius: 12px; flex-shrink: 0;
    display: grid; place-items: center; font-size: 1.2rem;
    background: var(--gold-soft); color: var(--gold); border: 1px solid rgba(212,175,55,.3);
    transition: all .25s;
}
.contact-line:not(.no-hover):hover i { background: var(--gold); color: #000; }
.contact-line span { display: block; font-size: .78rem; color: var(--text-2); }
.contact-line strong { font-size: .98rem; color: var(--text); }

.form-label { font-size: .9rem; font-weight: 500; color: var(--text-2); }
.form-control {
    background: var(--bg-3); border: 1px solid var(--border); color: var(--text);
    border-radius: 12px; padding: .7rem 1rem;
}
.form-control::placeholder { color: #5c6474; }
.form-control:focus {
    background: var(--bg-3); color: var(--text); border-color: var(--gold);
    box-shadow: 0 0 0 .2rem rgba(212,175,55,.2);
}

/* ---------- Footer ---------- */
.footer { background: var(--bg-2); border-top: 1px solid var(--border); padding: 2.6rem 0; }
.footer-brand { font-weight: 800; font-size: 1.2rem; color: var(--text); }
.footer-social { display: flex; gap: .6rem; justify-content: center; }
@media (min-width: 768px){ .footer-social { justify-content: flex-end; } }
.footer-social a { width: 42px; height: 42px; font-size: 1.1rem; }

/* =========================================================
   WhatsApp Floating Widget
   ========================================================= */
.wa-widget { position: fixed; right: 22px; bottom: 22px; z-index: 1100; }
.wa-fab {
    width: 62px; height: 62px; border-radius: 50%; border: none;
    background: var(--wa); color: #fff; font-size: 1.8rem;
    display: grid; place-items: center; cursor: pointer;
    box-shadow: 0 10px 28px rgba(37,211,102,.45);
    position: relative; transition: transform .25s;
    animation: wa-pulse 2.4s infinite;
}
.wa-fab:hover { transform: scale(1.08); }
@keyframes wa-pulse {
    0% { box-shadow: 0 10px 28px rgba(37,211,102,.45), 0 0 0 0 rgba(37,211,102,.5); }
    70% { box-shadow: 0 10px 28px rgba(37,211,102,.45), 0 0 0 16px rgba(37,211,102,0); }
    100% { box-shadow: 0 10px 28px rgba(37,211,102,.45), 0 0 0 0 rgba(37,211,102,0); }
}
.wa-fab-badge {
    position: absolute; top: -4px; right: -4px; min-width: 22px; height: 22px;
    background: #ff3b30; color: #fff; border-radius: 50%; font-size: .75rem;
    display: grid; place-items: center; font-weight: 700; border: 2px solid var(--bg);
}
.wa-fab.open .wa-fab-badge { display: none; }

.wa-popup {
    position: absolute; bottom: 78px; right: 0; width: 320px; max-width: calc(100vw - 44px);
    background: var(--card); border: 1px solid var(--border); border-radius: 18px;
    box-shadow: var(--shadow); overflow: hidden;
    opacity: 0; visibility: hidden; transform: translateY(20px) scale(.96);
    transform-origin: bottom right; transition: all .28s cubic-bezier(.2,.8,.2,1);
}
.wa-popup.show { opacity: 1; visibility: visible; transform: translateY(0) scale(1); }
.wa-popup-header {
    background: linear-gradient(135deg, var(--wa-dark), var(--wa));
    padding: .9rem 1rem; display: flex; align-items: center; gap: .7rem;
}
.wa-popup-avatar {
    width: 42px; height: 42px; border-radius: 50%; background: rgba(255,255,255,.2);
    display: grid; place-items: center; font-size: 1.4rem; color: #fff; flex-shrink: 0;
}
.wa-popup-info { flex: 1; color: #fff; line-height: 1.25; }
.wa-popup-info strong { font-size: .98rem; }
.wa-popup-info small { display: flex; align-items: center; gap: .35rem; font-size: .76rem; opacity: .95; }
.wa-online-dot { width: 8px; height: 8px; border-radius: 50%; background: #b6ff9e; display: inline-block; }
.wa-popup-close { background: transparent; border: none; color: #fff; font-size: 1rem; cursor: pointer; opacity: .85; }
.wa-popup-close:hover { opacity: 1; }

/* Chat area */
.wa-chat {
    background:
        linear-gradient(rgba(11,13,18,.94), rgba(11,13,18,.94)),
        repeating-linear-gradient(45deg, #1b2130 0 12px, #171c28 12px 24px);
    padding: 1rem; height: 300px; overflow-y: auto;
    display: flex; flex-direction: column; gap: .55rem;
}
.wa-chat::-webkit-scrollbar { width: 6px; }
.wa-msg {
    max-width: 82%; padding: .55rem .8rem; font-size: .88rem; line-height: 1.45;
    border-radius: 14px; white-space: pre-wrap; word-wrap: break-word;
    animation: waMsgIn .25s ease; box-shadow: 0 2px 6px rgba(0,0,0,.25);
}
@keyframes waMsgIn { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
.wa-msg-bot {
    align-self: flex-start; background: var(--card); color: var(--text);
    border: 1px solid var(--border); border-radius: 4px 14px 14px 14px;
}
.wa-msg-user {
    align-self: flex-end; background: #075e54; color: #eafff4;
    border-radius: 14px 4px 14px 14px;
}
.wa-typing { display: inline-flex; align-items: center; gap: 4px; padding: .7rem .85rem; }
.wa-typing span {
    width: 7px; height: 7px; border-radius: 50%; background: var(--text-2);
    animation: waBlink 1.2s infinite both;
}
.wa-typing span:nth-child(2) { animation-delay: .2s; }
.wa-typing span:nth-child(3) { animation-delay: .4s; }
@keyframes waBlink { 0%,80%,100% { opacity: .25; } 40% { opacity: 1; } }

/* Input row */
.wa-input-row { display: flex; gap: .5rem; padding: .7rem; background: var(--card); border-top: 1px solid var(--border); }
.wa-input {
    flex: 1; background: var(--bg-3); border: 1px solid var(--border); color: var(--text);
    border-radius: 50px; padding: .6rem 1rem; font-size: .9rem; outline: none;
}
.wa-input::placeholder { color: #5c6474; }
.wa-input:focus { border-color: var(--wa); box-shadow: 0 0 0 .18rem rgba(37,211,102,.22); }
.wa-send {
    width: 44px; height: 44px; flex-shrink: 0; border: none; border-radius: 50%;
    background: var(--wa); color: #fff; font-size: 1.05rem; cursor: pointer;
    display: grid; place-items: center; transition: background .2s, transform .15s;
}
.wa-send:hover { background: var(--wa-dark); transform: scale(1.05); }

/* ---------- AOS fallback ---------- */
[data-aos] { transition-property: transform, opacity; }

/* ---------- Responsive ---------- */
@media (max-width: 991px){
    #mainNav .navbar-collapse {
        background: rgba(11,13,18,.98); margin-top: .8rem; padding: 1rem;
        border-radius: 14px; border: 1px solid var(--border);
    }
    .navbar-nav .nav-link::after { display: none; }
    .hero { text-align: center; }
    .hero-actions, .hero-social { justify-content: center; }
    .hero-desc { margin-inline: auto; }
}
@media (max-width: 575px){
    .section { padding: 70px 0; }
    .wa-fab { width: 56px; height: 56px; font-size: 1.6rem; }
}
