/* =============================================
   RENATO ATUALIZAÇÕES — PREMIUM v2.0
   ============================================= */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;600;700;800;900&display=swap');

:root {
    --bg-base:        #03030a;
    --bg-surface:     #08080f;
    --red-strong:     #ff003c;
    --red-mid:        #cc0030;
    --red-glow:       rgba(255, 0, 60, 0.45);
    --red-glow-soft:  rgba(255, 0, 60, 0.15);
    --text-white:     #ffffff;
    --text-silver:    #c8cdd8;
    --text-muted:     #64748b;
    --text-faint:     #2e3440;
    --font:           'Inter', system-ui, -apple-system, sans-serif;
    --radius-card:    18px;
    --transition:     0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
}

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

html, body {
    width: 100%;
    min-height: 100vh;
    overflow-x: hidden;
    background: var(--bg-base);
    font-family: var(--font);
    color: var(--text-white);
    display: flex;
    align-items: center;
    justify-content: center;
}

/* ============================================
   PRELOADER
   ============================================ */
#preloader {
    position: fixed;
    inset: 0;
    background: var(--bg-base);
    z-index: 99999;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: opacity 0.9s cubic-bezier(0.25, 1, 0.5, 1), visibility 0.9s;
}

#preloader.hidden {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

.preloader-inner {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
}

.waveform-container {
    width: 220px;
    height: 60px;
}

#waveformCanvas {
    width: 100%;
    height: 100%;
}

.preloader-brand {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
}

.preloader-crown {
    font-size: 28px;
    animation: crown-float 2s ease-in-out infinite alternate;
    display: block;
    margin-bottom: 4px;
}

@keyframes crown-float {
    from { transform: translateY(0px); }
    to   { transform: translateY(-6px); }
}

.preloader-name {
    font-size: 28px;
    font-weight: 900;
    letter-spacing: 8px;
    color: var(--text-white);
    text-transform: uppercase;
    line-height: 1;
}

.preloader-sub {
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 5px;
    color: var(--red-strong);
    text-transform: uppercase;
}

.preloader-progress-wrap {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 220px;
}

.preloader-progress-bar {
    flex: 1;
    height: 2px;
    background: rgba(255,255,255,0.06);
    border-radius: 2px;
    overflow: hidden;
}

.preloader-progress-fill {
    height: 100%;
    width: 0%;
    background: var(--red-strong);
    box-shadow: 0 0 10px var(--red-strong);
    border-radius: 2px;
    transition: width 0.1s linear;
}

.preloader-percent {
    font-size: 11px;
    font-weight: 700;
    color: var(--red-strong);
    width: 32px;
    text-align: right;
    font-variant-numeric: tabular-nums;
}

/* ============================================
   PARTÍCULAS CANVAS
   ============================================ */
#particlesCanvas {
    position: fixed;
    inset: 0;
    width: 100vw;
    height: 100vh;
    z-index: 0;
    pointer-events: none;
}

/* ============================================
   FUNDO / ORBES
   ============================================ */
.bg-animation {
    position: fixed;
    inset: 0;
    z-index: 0;
    overflow: hidden;
    pointer-events: none;
}

.orb {
    position: absolute;
    border-radius: 50%;
    filter: blur(140px);
    opacity: 0.22;
    mix-blend-mode: screen;
    will-change: transform;
    transition: transform 0.08s linear;
}

.orb-1 {
    width: 560px; height: 560px;
    background: radial-gradient(circle, var(--red-strong) 0%, transparent 70%);
    top: -12%; left: -12%;
}
.orb-2 {
    width: 640px; height: 640px;
    background: radial-gradient(circle, #3730a3 0%, transparent 70%);
    bottom: -18%; right: -12%;
}
.orb-3 {
    width: 420px; height: 420px;
    background: radial-gradient(circle, #ea580c 0%, transparent 70%);
    top: 38%; left: 38%;
    opacity: 0.14;
}

/* SCANLINES */
.scanlines {
    position: fixed;
    inset: 0;
    z-index: 0;
    pointer-events: none;
    background: repeating-linear-gradient(
        0deg,
        transparent,
        transparent 2px,
        rgba(0,0,0,0.07) 2px,
        rgba(0,0,0,0.07) 4px
    );
}

/* ============================================
   CONTAINER
   ============================================ */
.container {
    width: 100%;
    max-width: 440px;
    padding: 48px 20px 36px;
    z-index: 1;
    text-align: center;
    position: relative;
}

/* ============================================
   LOGO
   ============================================ */
.logo-container {
    position: relative;
    width: 130px;
    height: 130px;
    margin: 0 auto 24px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.logo-hexagon {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    overflow: hidden;
    border: 2.5px solid var(--red-strong);
    box-shadow:
        0 0 0 4px rgba(255,0,60,0.08),
        0 0 30px var(--red-glow),
        0 0 60px rgba(255,0,60,0.15);
    position: relative;
    z-index: 2;
}

.profile-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.pulse-ring {
    position: absolute;
    border-radius: 50%;
    border: 1.5px solid var(--red-strong);
    top: 50%; left: 50%;
    transform: translate(-50%, -50%);
    pointer-events: none;
}

.pulse-ring-1 {
    width: 140px; height: 140px;
    animation: pulse-out 2.8s cubic-bezier(0.24, 0, 0.38, 1) infinite;
}
.pulse-ring-2 {
    width: 140px; height: 140px;
    animation: pulse-out 2.8s cubic-bezier(0.24, 0, 0.38, 1) 1.4s infinite;
}

@keyframes pulse-out {
    0%   { transform: translate(-50%,-50%) scale(0.9); opacity: 0.7; }
    100% { transform: translate(-50%,-50%) scale(1.5); opacity: 0; }
}

.logo-energy-ring {
    position: absolute;
    width: 128px; height: 128px;
    top: 50%; left: 50%;
    transform: translate(-50%, -50%) rotate(0deg);
    border-radius: 50%;
    border: 1.5px solid transparent;
    border-top-color: var(--red-strong);
    border-right-color: var(--red-strong);
    animation: spin-slow 4s linear infinite;
    z-index: 3;
}

@keyframes spin-slow {
    to { transform: translate(-50%, -50%) rotate(360deg); }
}

/* ============================================
   HEADER TEXT
   ============================================ */
.header-text { margin-bottom: 24px; }

.eyebrow {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 3.5px;
    color: var(--red-strong);
    margin-bottom: 10px;
    text-transform: uppercase;
}

.eyebrow-line {
    flex: 0 0 30px;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--red-strong));
}
.eyebrow .eyebrow-line:last-child {
    background: linear-gradient(90deg, var(--red-strong), transparent);
}

.brand-title {
    font-size: 28px;
    font-weight: 900;
    letter-spacing: -0.8px;
    margin-bottom: 10px;
    background: linear-gradient(170deg, #ffffff 30%, #9ca3af 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    min-height: 40px;
    line-height: 1.2;
}

.cursor-blink {
    -webkit-text-fill-color: var(--red-strong);
    animation: blink-cursor 0.85s step-end infinite;
    font-weight: 300;
}

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

.brand-desc {
    font-size: 13px;
    color: #94a3b8;
    font-weight: 400;
    max-width: 310px;
    margin: 0 auto;
    line-height: 1.6;
}

/* ============================================
   STATS
   ============================================ */
.stats-row {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0;
    margin: 20px auto 22px;
    max-width: 300px;
    background: rgba(255,255,255,0.02);
    border: 1px solid rgba(255,255,255,0.06);
    border-radius: 16px;
    padding: 14px 0;
    backdrop-filter: blur(8px);
}

.stat-item {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
}

.stat-number {
    font-size: 20px;
    font-weight: 900;
    color: var(--red-strong);
    font-variant-numeric: tabular-nums;
    letter-spacing: -0.5px;
    text-shadow: 0 0 20px var(--red-glow);
}

.stat-label {
    font-size: 10px;
    color: var(--text-muted);
    font-weight: 600;
    letter-spacing: 0.5px;
    text-transform: uppercase;
}

.stat-divider {
    width: 1px;
    height: 30px;
    background: rgba(255,255,255,0.07);
}

/* ============================================
   CARDS
   ============================================ */
.links-container {
    display: flex;
    flex-direction: column;
    gap: 18px;
    perspective: 1200px;
}

.link-card {
    display: flex;
    align-items: center;
    background: rgba(8, 8, 18, 0.85);
    border: 1.5px solid rgba(255, 0, 60, 0.4);
    border-radius: var(--radius-card);
    padding: 18px 20px;
    text-decoration: none;
    color: var(--text-white);
    position: relative;
    overflow: hidden;
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    transform-style: preserve-3d;
    will-change: transform;
    transition: border-color var(--transition), box-shadow var(--transition), transform 0.15s ease-out;
    cursor: pointer;
}

/* Animated gradient border glow on hover */
.link-card::before {
    content: '';
    position: absolute;
    inset: -1px;
    border-radius: calc(var(--radius-card) + 1px);
    background: conic-gradient(
        from var(--border-angle, 0deg),
        transparent 0%,
        var(--red-strong) 15%,
        transparent 30%
    );
    z-index: -1;
    opacity: 0;
    transition: opacity 0.4s ease;
}

.link-card:hover::before {
    opacity: 1;
    animation: border-spin 2s linear infinite;
}

@property --border-angle {
    syntax: '<angle>';
    initial-value: 0deg;
    inherits: false;
}

@keyframes border-spin {
    to { --border-angle: 360deg; }
}

.link-card:hover {
    border-color: rgba(255, 0, 60, 0.75);
    box-shadow:
        0 0 0 1px rgba(255,0,60,0.1),
        0 12px 40px rgba(255, 0, 60, 0.3),
        inset 0 0 20px rgba(255, 0, 60, 0.06);
}

/* Wave canvas behind card content */
.card-wave-canvas {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    transition: opacity 0.4s ease;
    pointer-events: none;
    z-index: 0;
}

.link-card:hover .card-wave-canvas {
    opacity: 1;
}

/* Glare layer */
.card-glare {
    position: absolute;
    inset: 0;
    background: radial-gradient(
        circle at var(--gx, 50%) var(--gy, 50%),
        rgba(255,255,255,0.1) 0%,
        transparent 55%
    );
    pointer-events: none;
    z-index: 4;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.link-card:hover .card-glare {
    opacity: 1;
}

/* Card tag */
.card-tag {
    display: block;
    font-size: 9.5px;
    font-weight: 800;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    color: var(--red-strong);
    margin-bottom: 3px;
    opacity: 0.85;
}

/* Icon */
.card-icon {
    width: 48px; height: 48px;
    background: rgba(255, 0, 60, 0.07);
    border: 1px solid rgba(255,0,60,0.2);
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--red-strong);
    font-size: 20px;
    margin-right: 16px;
    flex-shrink: 0;
    position: relative;
    transform: translateZ(22px);
    transition: background 0.25s ease, transform 0.2s ease-out, border-color 0.25s;
    will-change: transform;
    z-index: 2;
}

.link-card:hover .card-icon {
    background: rgba(255, 0, 60, 0.18);
    border-color: rgba(255,0,60,0.5);
}

.icon-ripple {
    position: absolute;
    inset: 0;
    border-radius: 14px;
    border: 1.5px solid var(--red-strong);
    opacity: 0;
    transform: scale(1);
}

.link-card:hover .icon-ripple {
    animation: icon-pulse 1.6s ease-out infinite;
}

@keyframes icon-pulse {
    0%   { transform: scale(1);   opacity: 0.7; }
    100% { transform: scale(1.7); opacity: 0; }
}

/* Card info */
.card-info {
    flex: 1;
    text-align: left;
    transform: translateZ(16px);
    z-index: 2;
}

.card-title {
    display: block;
    font-weight: 800;
    font-size: 15.5px;
    margin-bottom: 3px;
    letter-spacing: -0.3px;
    color: #f1f5f9;
}

.card-desc {
    display: block;
    font-size: 12px;
    color: #64748b;
    line-height: 1.4;
}

.card-arrow {
    color: #334155;
    font-size: 13px;
    transform: translateZ(10px);
    transition: transform 0.3s ease, color 0.3s;
    z-index: 2;
    flex-shrink: 0;
}

.link-card:hover .card-arrow {
    transform: translateZ(10px) translateX(5px);
    color: var(--red-strong);
}

/* Click ripple */
.card-ripple-container {
    position: absolute;
    inset: 0;
    overflow: hidden;
    border-radius: var(--radius-card);
    pointer-events: none;
    z-index: 5;
}

.ripple-wave {
    position: absolute;
    border-radius: 50%;
    background: rgba(255,0,60,0.25);
    transform: scale(0);
    animation: ripple-expand 0.7s ease-out forwards;
    pointer-events: none;
}

@keyframes ripple-expand {
    to { transform: scale(4); opacity: 0; }
}

/* ============================================
   FOOTER / SOCIAL
   ============================================ */
.profile-footer {
    margin-top: 48px;
}

.social-links {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-bottom: 18px;
}

.social-btn {
    position: relative;
    width: 46px; height: 46px;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #4a5568;
    font-size: 20px;
    background: rgba(255,255,255,0.03);
    border: 1px solid rgba(255,255,255,0.07);
    text-decoration: none;
    transition: color var(--transition), background var(--transition), border-color var(--transition), transform var(--transition);
}

.social-btn:hover {
    color: var(--red-strong);
    background: rgba(255,0,60,0.08);
    border-color: rgba(255,0,60,0.3);
    transform: translateY(-4px);
}

.social-tooltip {
    position: absolute;
    bottom: calc(100% + 8px);
    left: 50%;
    transform: translateX(-50%);
    background: rgba(10,10,15,0.95);
    border: 1px solid rgba(255,255,255,0.1);
    color: var(--text-white);
    font-size: 11px;
    font-weight: 600;
    padding: 4px 10px;
    border-radius: 8px;
    white-space: nowrap;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s;
}

.social-btn:hover .social-tooltip {
    opacity: 1;
}

.note {
    font-size: 11px;
    color: #2e3440;
    line-height: 1.6;
}

.note code {
    background: rgba(255,255,255,0.03);
    padding: 2px 6px;
    border-radius: 4px;
    color: #475569;
    font-size: 10.5px;
}

/* ============================================
   REVEAL ANIMATIONS
   ============================================ */
.reveal {
    opacity: 0;
    transform: translateY(28px);
    transition: opacity 0.7s cubic-bezier(0.25,0.8,0.25,1), transform 0.7s cubic-bezier(0.25,0.8,0.25,1);
}

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

/* ============================================
   DEV CREDIT
   ============================================ */
.dev-credit {
    margin-top: 32px;
    display: flex;
    justify-content: center;
}

.dev-credit-inner {
    position: relative;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 9px 18px 9px 12px;
    border: 1px solid rgba(255,255,255,0.05);
    border-radius: 12px;
    background: rgba(255,255,255,0.015);
    overflow: hidden;
}

/* circuit board canvas de fundo */
#devCircuit {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    opacity: 0.55;
}

.dev-credit-text {
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 1px;
    line-height: 1;
}

.dev-label {
    font-size: 8.5px;
    font-weight: 700;
    letter-spacing: 3px;
    color: #334155;
    text-transform: uppercase;
}

.dev-name {
    font-size: 13px;
    font-weight: 800;
    letter-spacing: 1.5px;
    color: #4a5568;
    display: flex;
    align-items: center;
    gap: 1px;
    font-variant-numeric: tabular-nums;
    text-transform: uppercase;
}

.dev-name-scramble {
    color: #475569;
}

.dev-cursor {
    color: #ff003c;
    opacity: 0.6;
    animation: blink-cursor 1.1s step-end infinite;
    font-weight: 300;
}

/* ============================================
   RESPONSIVE
   ============================================ */
@media (max-width: 380px) {
    .container { padding: 36px 16px 28px; }
    .brand-title { font-size: 22px; }
    .stats-row { max-width: 280px; }
    .stat-number { font-size: 17px; }
    .link-card { padding: 15px 16px; }
    .card-title { font-size: 14px; }
}

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; }
}