/* ═══════════════════════════════════════════════════════
   RAPHAEL LOPES — Portfolio Dark Emerald
   Design: Cyberpunk + Verde Esmeralda + Preto
   ═══════════════════════════════════════════════════════ */

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

html {
    scroll-behavior: smooth;
    scrollbar-width: thin;
    scrollbar-color: rgba(0, 255, 136, 0.25) transparent;
}

::-webkit-scrollbar { width: 5px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: rgba(0, 255, 136, 0.2); border-radius: 10px; }
::-webkit-scrollbar-thumb:hover { background: rgba(0, 255, 136, 0.4); }

/* ── VARIABLES ── */
:root {
    --emerald: #00ff88;
    --emerald-dark: #00cc77;
    --emerald-deep: #006644;
    --emerald-glow: rgba(0, 255, 136, 0.15);
    --emerald-glass: rgba(0, 255, 136, 0.04);
    --bg-primary: #050505;
    --bg-secondary: #0a0a0a;
    --bg-card: rgba(255, 255, 255, 0.02);
    --text-primary: #e8e8e8;
    --text-secondary: rgba(255, 255, 255, 0.62);
    --text-muted: rgba(255, 255, 255, 0.35);
    --border-subtle: rgba(0, 255, 136, 0.08);
    --border-hover: rgba(0, 255, 136, 0.2);
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.7;
    overflow-x: hidden;
}

::selection {
    background: rgba(0, 255, 136, 0.2);
    color: #fff;
}

/* ── SCROLL PROGRESS ── */
#scroll-progress {
    position: fixed;
    top: 0; left: 0;
    height: 2px;
    background: linear-gradient(90deg, transparent, var(--emerald), var(--emerald-dark), transparent);
    z-index: 9999;
    width: 0%;
    box-shadow: 0 0 20px rgba(0, 255, 136, 0.3), 0 0 60px rgba(0, 255, 136, 0.1);
}

/* ── CANVAS BACKGROUND ── */
#particles-canvas {
    position: fixed;
    inset: 0;
    z-index: 0;
    pointer-events: none;
}

/* ── GRID BACKGROUND ── */
.bg-grid {
    position: fixed;
    inset: 0;
    z-index: 0;
    pointer-events: none;
    background-image:
        linear-gradient(rgba(0, 255, 136, 0.02) 1px, transparent 1px),
        linear-gradient(90deg, rgba(0, 255, 136, 0.02) 1px, transparent 1px);
    background-size: 60px 60px;
}

/* ── NAV ── */
.nav-bar {
    position: fixed;
    top: 0; left: 0; right: 0;
    z-index: 1000;
    padding: 18px 40px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: rgba(5, 5, 5, 0.5);
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    border-bottom: 1px solid var(--border-subtle);
    transition: all 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.nav-bar.scrolled {
    padding: 10px 40px;
    background: rgba(5, 5, 5, 0.92);
    border-bottom-color: rgba(0, 255, 136, 0.06);
}

.nav-logo {
    font-size: 22px;
    font-weight: 900;
    color: var(--emerald);
    text-decoration: none;
    letter-spacing: -0.5px;
    text-shadow: 0 0 20px rgba(0, 255, 136, 0.15);
    font-family: 'Cascadia Code', 'Fira Code', 'Consolas', 'Courier New', monospace;
}

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

.nav-links a {
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 13px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    transition: all 0.3s;
    position: relative;
    font-family: 'Cascadia Code', 'Fira Code', 'Consolas', 'Courier New', monospace;
}

.nav-links a::after {
    content: '';
    position: absolute;
    bottom: -4px; left: 0;
    width: 0; height: 1.5px;
    background: var(--emerald);
    transition: width 0.3s;
    box-shadow: 0 0 10px rgba(0, 255, 136, 0.3);
}

.nav-links a:hover { color: var(--emerald); }
.nav-links a:hover::after { width: 100%; }

.nav-toggle {
    display: none;
    background: none;
    border: 1px solid var(--border-subtle);
    color: var(--emerald);
    font-size: 20px;
    cursor: pointer;
    padding: 8px 12px;
    border-radius: 8px;
    transition: all 0.3s;
}

.nav-toggle:hover {
    border-color: var(--emerald);
    box-shadow: 0 0 20px rgba(0, 255, 136, 0.1);
}

/* ── CONTAINER ── */
.container {
    width: 90%;
    max-width: 1100px;
    margin: 0 auto;
    position: relative;
    z-index: 1;
}

/* ── HERO ── */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 100px 20px 60px;
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    inset: 0;
    background:
        radial-gradient(ellipse at 50% 0%, rgba(0, 255, 136, 0.04) 0%, transparent 60%),
        radial-gradient(ellipse at 80% 50%, rgba(0, 204, 119, 0.02) 0%, transparent 50%);
    pointer-events: none;
}

.hero-content {
    position: relative;
    z-index: 2;
}

/* ── TERMINAL ── */
.terminal {
    position: relative;
    z-index: 2;
    width: 100%;
    max-width: 700px;
    background: rgba(0, 0, 0, 0.75);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(0, 255, 136, 0.12);
    border-radius: 14px;
    box-shadow: 0 0 60px rgba(0, 255, 136, 0.04), 0 20px 60px rgba(0, 0, 0, 0.5);
    overflow: hidden;
    font-family: 'Cascadia Code', 'Fira Code', 'Consolas', 'Courier New', monospace;
}

.terminal-bar {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 18px;
    background: rgba(0, 0, 0, 0.4);
    border-bottom: 1px solid rgba(0, 255, 136, 0.06);
}

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

.terminal-dot.red { background: #ff5f56; }
.terminal-dot.yellow { background: #ffbd2e; }
.terminal-dot.green { background: #27c93f; }

.terminal-title {
    flex: 1;
    text-align: center;
    font-size: 12px;
    color: rgba(255, 255, 255, 0.25);
    font-family: inherit;
}

.terminal-body {
    padding: 24px 28px;
}

.terminal-line {
    font-size: 14px;
    line-height: 1.8;
    color: rgba(255, 255, 255, 0.6);
    white-space: pre-wrap;
    font-family: inherit;
}

.terminal-line-empty {
    height: 8px;
}

.terminal-line .prompt {
    color: var(--emerald);
    opacity: 0.6;
    font-weight: 300;
}

.terminal-line .host {
    color: var(--emerald);
    font-weight: 700;
}

.terminal-line .sep {
    color: rgba(255, 255, 255, 0.3);
}

.terminal-line .path {
    color: rgba(255, 255, 255, 0.4);
}

.terminal-line .amp {
    color: var(--emerald);
    opacity: 0.6;
}

.terminal-line .val {
    color: rgba(255, 255, 255, 0.7);
}

.cursor-line {
    color: var(--emerald);
    font-weight: 600;
}

.terminal-cursor {
    display: inline-block;
    animation: terminalBlink 1s step-end infinite;
    color: var(--emerald);
    font-weight: 700;
}

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

/* Responsive terminal */
@media (max-width: 768px) {
    .terminal-body { padding: 16px 18px; }
    .terminal-line { font-size: 12px; line-height: 1.6; }
    .terminal { max-width: 92%; }
}

@media (max-width: 480px) {
    .terminal-line { font-size: 10px; }
    .terminal-body { padding: 12px 14px; }
    .terminal-title { font-size: 10px; }
}



/* ── HERO GLOW ORB ── */


.hero-glow {
    position: absolute;
    width: 700px;
    height: 700px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(0, 255, 136, 0.04) 0%, transparent 60%);
    top: 40%;
    left: 50%;
    transform: translate(-50%, -50%);
    pointer-events: none;
    animation: glowPulse 8s ease-in-out infinite alternate;
}

@keyframes glowPulse {
    0% { transform: translate(-50%, -50%) scale(1); opacity: 0.6; }
    100% { transform: translate(-50%, -50%) scale(1.4); opacity: 1; }
}

/* ── BUTTONS ── */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 14px 32px;
    margin: 5px;
    border-radius: 100px;
    text-decoration: none;
    font-weight: 700;
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 1px;
    transition: all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
    cursor: pointer;
    border: none;
    position: relative;
    overflow: hidden;
}

.btn-primary {
    background: linear-gradient(135deg, var(--emerald), var(--emerald-dark));
    color: #050505;
    box-shadow: 0 4px 24px rgba(0, 255, 136, 0.2);
}

.btn-primary:hover {
    transform: translateY(-3px) scale(1.02);
    box-shadow: 0 12px 40px rgba(0, 255, 136, 0.3);
}

.btn-outline {
    background: transparent;
    color: var(--emerald);
    border: 1.5px solid rgba(0, 255, 136, 0.2);
}

.btn-outline:hover {
    border-color: var(--emerald);
    color: #050505;
    background: var(--emerald);
    box-shadow: 0 0 30px rgba(0, 255, 136, 0.2);
}

.btn-small {
    padding: 10px 22px;
    font-size: 11px;
}

/* ── SECTION ── */
.section {
    padding: 5rem 0;
    position: relative;
    z-index: 1;
}

.section-header {
    text-align: center;
    margin-bottom: 3.5rem;
}

.section-tag {
    display: inline-block;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 2px;
    color: var(--emerald);
    margin-bottom: 12px;
}

.section-tag::before {
    content: '// ';
    opacity: 0.5;
}

.section-title {
    font-size: clamp(32px, 5vw, 52px);
    font-weight: 900;
    color: #fff;
    line-height: 1.05;
}

.section-sub {
    color: var(--text-secondary);
    font-size: 1.05rem;
    max-width: 550px;
    margin: 12px auto 0;
    font-weight: 300;
}

/* ── GLASS CARD ── */
.glass-card {
    background: var(--bg-card);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--border-subtle);
    border-radius: 20px;
    padding: 2.5rem;
    transition: all 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
    position: relative;
    overflow: hidden;
}

.glass-card::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: inherit;
    background: radial-gradient(circle at var(--mx, 50%) var(--my, 50%), rgba(0, 255, 136, 0.04), transparent 60%);
    opacity: 0;
    transition: opacity 0.4s;
    pointer-events: none;
}

.glass-card:hover::before { opacity: 1; }
.glass-card:hover { transform: translateY(-4px); border-color: rgba(0, 255, 136, 0.12); }

/* ── ABOUT ── */
.about-grid {
    display: grid;
    grid-template-columns: 1.2fr 0.8fr;
    gap: 40px;
    align-items: start;
}

.about-text p {
    font-size: 1.05rem;
    color: var(--text-secondary);
    margin-bottom: 1.2rem;
    line-height: 1.9;
}

.about-text strong { color: var(--emerald); }

.about-highlights {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

.highlight-item {
    background: var(--bg-card);
    border: 1px solid var(--border-subtle);
    border-radius: 14px;
    padding: 18px 20px;
    transition: all 0.4s;
}

.highlight-item:hover {
    border-color: rgba(0, 255, 136, 0.15);
    background: rgba(0, 255, 136, 0.02);
    transform: translateY(-2px);
}

.highlight-item i {
    color: var(--emerald);
    font-size: 1.2rem;
    margin-bottom: 6px;
}

.highlight-item span {
    display: block;
    font-size: 13px;
    color: var(--text-secondary);
    line-height: 1.4;
}

/* ── SKILLS ── */
.skills-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: 16px;
}

.skill-card {
    background: var(--bg-card);
    border: 1px solid var(--border-subtle);
    border-radius: 16px;
    padding: 1.8rem 1.5rem;
    text-align: center;
    transition: all 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
    position: relative;
    overflow: hidden;
}

.skill-card::after {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 2px;
    background: linear-gradient(90deg, transparent, var(--emerald), transparent);
    transform: scaleX(0);
    transition: transform 0.5s;
    transform-origin: center;
}

.skill-card:hover::after { transform: scaleX(1); }
.skill-card:hover { transform: translateY(-6px); border-color: rgba(0, 255, 136, 0.2); box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3); }

.skill-icon {
    font-size: 2.4rem;
    margin-bottom: 0.8rem;
    color: var(--emerald);
}

.skill-card h3 {
    color: #fff;
    font-size: 1rem;
    margin-bottom: 0.4rem;
}

.skill-card p {
    color: var(--text-secondary);
    font-size: 0.82rem;
}

/* ── PROJECTS ── */
.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(340px, 1fr));
    gap: 20px;
}

.project-card {
    background: var(--bg-card);
    border: 1px solid var(--border-subtle);
    border-radius: 18px;
    padding: 2rem;
    transition: all 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
    position: relative;
    overflow: hidden;
}

.project-card:hover {
    transform: translateY(-6px);
    border-color: rgba(0, 255, 136, 0.15);
    box-shadow: 0 30px 60px rgba(0, 0, 0, 0.4);
}

.project-card::before {
    content: '';
    position: absolute;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background: linear-gradient(135deg, rgba(0, 255, 136, 0.02), transparent 50%);
    opacity: 0;
    transition: opacity 0.5s;
    pointer-events: none;
}

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

.project-tag {
    display: inline-block;
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    padding: 4px 12px;
    border-radius: 100px;
    background: rgba(0, 255, 136, 0.06);
    color: var(--emerald);
    border: 1px solid rgba(0, 255, 136, 0.1);
    margin-bottom: 14px;
}

.project-card h3 {
    color: #fff;
    font-size: 1.2rem;
    margin-bottom: 0.6rem;
}

.project-card p {
    color: var(--text-secondary);
    font-size: 0.9rem;
    margin-bottom: 1.2rem;
    line-height: 1.7;
}

.project-links {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.project-links a {
    font-size: 12px;
    padding: 8px 18px;
}

.project-lang {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-size: 11px;
    color: var(--text-muted);
    margin-bottom: 1rem;
}

.project-lang .dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    display: inline-block;
}

/* ── GITHUB SECTION ── */
.github-embed {
    background: var(--bg-card);
    border: 1px solid var(--border-subtle);
    border-radius: 18px;
    padding: 2rem;
    max-width: 700px;
    margin: 0 auto;
}

.github-header {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 1.5rem;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid var(--border-subtle);
}

.github-avatar {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    border: 2px solid var(--emerald);
    box-shadow: 0 0 20px rgba(0, 255, 136, 0.15);
}

.github-info h3 {
    font-size: 1.1rem;
    color: #fff;
}

.github-info p {
    font-size: 0.85rem;
    color: var(--text-secondary);
}

.github-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(100px, 1fr));
    gap: 12px;
}

.github-stat {
    text-align: center;
    padding: 12px;
    background: rgba(0, 255, 136, 0.02);
    border-radius: 12px;
    border: 1px solid var(--border-subtle);
}

.github-stat-num {
    font-size: 20px;
    font-weight: 900;
    color: var(--emerald);
}

.github-stat-label {
    font-size: 10px;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-top: 2px;
}

/* ── PHILOSOPHY ── */
.philosophy-block {
    max-width: 800px;
    margin: 0 auto;
    background: linear-gradient(135deg, rgba(0, 255, 136, 0.03), rgba(0, 204, 119, 0.03));
    border: 1px solid rgba(0, 255, 136, 0.08);
    border-radius: 24px;
    padding: 3.5rem;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.philosophy-block::before {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at 30% 20%, rgba(0, 255, 136, 0.04) 0%, transparent 60%);
}

.philosophy-text {
    font-size: 1.6rem;
    font-weight: 500;
    font-style: italic;
    color: rgba(255, 255, 255, 0.85);
    line-height: 1.6;
    position: relative;
}

.philosophy-text::before {
    content: '';
    display: block;
    width: 40px;
    height: 3px;
    background: var(--emerald);
    margin: 0 auto 24px;
    border-radius: 4px;
    box-shadow: 0 0 20px rgba(0, 255, 136, 0.3);
}

.philosophy-author {
    margin-top: 20px;
    font-size: 13px;
    color: var(--emerald);
    font-weight: 600;
    letter-spacing: 1px;
    text-transform: uppercase;
}

/* ── CONTACT ── */
.contact-wrapper {
    max-width: 600px;
    margin: 0 auto;
}

.contact-form {
    display: grid;
    gap: 1rem;
    margin-bottom: 2rem;
}

.contact-form input,
.contact-form textarea {
    width: 100%;
    padding: 16px 18px;
    border-radius: 12px;
    border: 1px solid var(--border-subtle);
    background: rgba(255, 255, 255, 0.02);
    color: #fff;
    font-size: 15px;
    font-family: inherit;
    transition: all 0.3s;
}

.contact-form input:focus,
.contact-form textarea:focus {
    outline: none;
    border-color: rgba(0, 255, 136, 0.25);
    background: rgba(0, 255, 136, 0.02);
    box-shadow: 0 0 0 3px rgba(0, 255, 136, 0.04);
}

.contact-form input::placeholder,
.contact-form textarea::placeholder { color: var(--text-muted); }

.contact-form button {
    justify-self: center;
}

.contact-links {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 10px;
}

.contact-links .btn {
    font-size: 12px;
    padding: 12px 24px;
}

.contact-links .btn i { font-size: 1rem; }

/* ── FOOTER ── */
footer {
    background: rgba(0, 0, 0, 0.3);
    border-top: 1px solid var(--border-subtle);
    padding: 2.5rem 0;
    text-align: center;
    position: relative;
    z-index: 1;
}

footer p {
    color: var(--text-muted);
    font-size: 0.85rem;
}

footer .heart {
    color: var(--emerald);
}

/* ── REVEAL ANIMATIONS ── */
[data-reveal] {
    opacity: 0;
    transform: translateY(40px);
    transition: all 0.8s cubic-bezier(0.34, 1.56, 0.64, 1);
}

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

[data-reveal-delay="100"] { transition-delay: 0.1s; }
[data-reveal-delay="200"] { transition-delay: 0.2s; }
[data-reveal-delay="300"] { transition-delay: 0.3s; }
[data-reveal-delay="400"] { transition-delay: 0.4s; }
[data-reveal-delay="500"] { transition-delay: 0.5s; }
[data-reveal-delay="600"] { transition-delay: 0.6s; }
[data-reveal-delay="700"] { transition-delay: 0.7s; }

/* ── RESPONSIVE ── */
@media (max-width: 768px) {
    .nav-bar { padding: 14px 20px; }
    .nav-links { display: none; flex-direction: column; position: absolute; top: 100%; left: 0; right: 0; background: rgba(5, 5, 5, 0.96); backdrop-filter: blur(24px); padding: 24px; gap: 20px; border-bottom: 1px solid var(--border-subtle); }
    .nav-links.open { display: flex; }
    .nav-toggle { display: block; }
    .hero { min-height: auto; padding: 120px 20px 60px; }
    .about-grid { grid-template-columns: 1fr; gap: 30px; }
    .about-highlights { grid-template-columns: 1fr 1fr; }
    .projects-grid { grid-template-columns: 1fr; }
    .skills-grid { grid-template-columns: repeat(3, 1fr); }
    .section { padding: 3rem 0; }
    .section-title { font-size: 28px; }
    .philosophy-text { font-size: 1.2rem; }
    .philosophy-block { padding: 2rem; }
}

@media (max-width: 480px) {
    .skills-grid { grid-template-columns: repeat(2, 1fr); }
    .about-highlights { grid-template-columns: 1fr; }
    .container { width: 92%; }
    .btn { padding: 12px 24px; font-size: 11px; }
}

/* ── SCROLL ANIMATIONS ── */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        transition-duration: 0.01ms !important;
    }
    [data-reveal] { opacity: 1; transform: none; }
}
