/* ============================================
   MicroHardCenter — Estilos globais
   Paleta: #16d842 (primário) · #1aff6b (hover) · #101010 / #151515 / #1a1a1a (fundos)
   ============================================ */

:root {
    --color-primary: #16d842;
    --color-primary-hover: #1aff6b;
    --color-bg: #101010;
    --color-surface: #151515;
    --color-surface-2: #1a1a1a;
    --color-text: #ffffff;
    --color-text-muted: #cbd5d1;
    --color-text-subtle: #9ba3a0;
    --color-border: rgba(26, 26, 26, 0.6);
    --color-border-hover: rgba(22, 216, 66, 0.5);

    --radius-sm: 0.5rem;
    --radius-md: 0.75rem;
    --radius-lg: 1rem;
    --radius-xl: 1.5rem;

    --shadow-glow: 0 0 20px rgba(22, 216, 66, 0.25);
    --shadow-glow-strong: 0 0 30px rgba(22, 216, 66, 0.45);
    --shadow-card: 0 25px 50px -12px rgba(22, 216, 66, 0.25);

    --ease: cubic-bezier(0.4, 0, 0.2, 1);
    --dur-fast: 0.2s;
    --dur-base: 0.3s;
    --dur-slow: 0.6s;

    --font-display: 'Space Grotesk', 'Plus Jakarta Sans', system-ui, sans-serif;
    --font-sans: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

body {
    font-family: var(--font-sans);
    background-color: var(--color-bg);
    color: var(--color-text);
    scroll-behavior: smooth;
    font-weight: 400;
    line-height: 1.65;
    letter-spacing: -0.005em;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-rendering: optimizeLegibility;
    font-feature-settings: 'ss01', 'cv01', 'cv03';
}

h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-display);
    font-weight: 700;
    letter-spacing: -0.035em;
    line-height: 1.1;
}

/* Botões, menus e campos herdam a mesma família premium */
button, input, textarea, select, .nav-link, .btn-primary, .btn-ghost {
    font-family: var(--font-sans);
}

p {
    letter-spacing: -0.003em;
}

/* Melhor contraste do cinza usado em textos de apoio */
.text-gray-300 { color: var(--color-text-muted) !important; }
.text-gray-400 { color: var(--color-text-subtle) !important; }
.text-gray-500 { color: #b0b7b4 !important; }

a, button {
    transition: color var(--dur-base) var(--ease),
                background-color var(--dur-base) var(--ease),
                border-color var(--dur-base) var(--ease),
                transform var(--dur-base) var(--ease),
                box-shadow var(--dur-base) var(--ease);
}

/* ============================================
   TIPOGRAFIA UTILITÁRIA
   ============================================ */
.gradient-text {
    background: linear-gradient(90deg, var(--color-primary), var(--color-primary-hover));
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

/* ============================================
   BOTÕES
   ============================================ */
.btn-primary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 1rem 2rem;
    background: var(--color-primary);
    color: #000;
    font-weight: 600;
    border-radius: var(--radius-sm);
    box-shadow: 0 10px 25px -10px rgba(22, 216, 66, 0.5);
}

/* ============================================
   HERO — retrato com card AppSec igual ao modelo
   ============================================ */
.hero-portrait {
    position: relative;
}

.hero-portrait__frame {
    position: relative;
    overflow: hidden;
    border: 2px solid var(--color-primary);
    border-radius: 1.5rem;
    background:
        radial-gradient(circle at 20% 0%, rgba(22, 216, 66, 0.2), transparent 45%),
        #06130c;
    box-shadow:
        0 0 0 1px rgba(22, 216, 66, 0.15),
        0 28px 90px rgba(22, 216, 66, 0.22);
}

.hero-portrait__image {
    display: block;
    width: 100%;
    height: auto;
    object-fit: cover;
}

.hero-identity-card {
    position: absolute;
    left: 1.25rem;
    right: 1.25rem;
    bottom: 1.25rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 1rem 1.25rem;
    background: rgba(3, 14, 9, 0.92);
    border: 1px solid rgba(22, 216, 66, 0.14);
    border-radius: 1rem;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.45);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
}

.hero-identity-card__name {
    margin: 0;
    color: #f3fff7;
    font-size: 1.05rem;
    font-weight: 800;
    line-height: 1.2;
    letter-spacing: -0.03em;
}

.hero-identity-card__role {
    margin: 0.15rem 0 0;
    color: rgba(203, 213, 209, 0.78);
    font-size: 0.95rem;
    font-weight: 500;
    line-height: 1.25;
}

.hero-identity-card__badges {
    display: inline-flex;
    gap: 0.5rem;
    flex-shrink: 0;
}

.hero-identity-card__badges span {
    padding: 0.4rem 0.65rem;
    border-radius: 0.35rem;
    background: rgba(22, 216, 66, 0.25);
    color: var(--color-primary);
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace;
    font-size: 0.75rem;
    font-weight: 800;
    letter-spacing: 0.08em;
}

.btn-primary:hover {
    background: var(--color-primary-hover);
    transform: translateY(-2px);
    box-shadow: 0 15px 35px -10px rgba(22, 216, 66, 0.65);
}

.btn-ghost {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 1rem 2rem;
    border: 2px solid var(--color-primary);
    color: var(--color-text);
    font-weight: 600;
    border-radius: var(--radius-sm);
}

.btn-ghost:hover {
    background: rgba(22, 216, 66, 0.1);
    border-color: var(--color-primary-hover);
    transform: translateY(-2px);
}

/* ============================================
   CARDS
   ============================================ */
.card-base {
    background: linear-gradient(135deg, var(--color-bg) 0%, var(--color-surface) 50%, var(--color-surface-2) 100%);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
    padding: 2rem;
    transition: all var(--dur-slow) var(--ease);
}

.card-hover {
    transition: all 0.4s var(--ease);
}

.card-hover:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-card), 0 0 0 1px rgba(22, 216, 66, 0.1);
}

/* ============================================
   GRADIENT BORDER
   ============================================ */
.gradient-border {
    position: relative;
    border-radius: var(--radius-sm);
}

.gradient-border::before {
    content: '';
    position: absolute;
    inset: -2px;
    background: linear-gradient(45deg, var(--color-primary), var(--color-primary-hover));
    border-radius: 0.6rem;
    z-index: -1;
    opacity: 0;
    transition: opacity var(--dur-base) ease;
}

.gradient-border:hover::before {
    opacity: 1;
}

/* ============================================
   ANIMAÇÕES
   ============================================ */
@keyframes float {
    0%, 100% { transform: translateY(0); }
    50%      { transform: translateY(-15px); }
}

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

@keyframes shimmer {
    0%   { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

@keyframes pulse-glow {
    0%, 100% { opacity: 1;   box-shadow: 0 0 20px rgba(22, 216, 66, 0.3); }
    50%      { opacity: 0.8; box-shadow: 0 0 30px rgba(22, 216, 66, 0.5); }
}

@keyframes logo-pulse {
    0%, 100% { box-shadow: var(--shadow-glow); }
    50%      { box-shadow: var(--shadow-glow-strong); }
}

.animate-spin { animation: spin 1s linear infinite; }
.floating     { animation: float 6s ease-in-out infinite; }

/* ============================================
   FADE IN ON SCROLL
   ============================================ */
.fade-in {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.8s var(--ease), transform 0.8s var(--ease);
}

.fade-in.visible {
    opacity: 1;
    transform: translateY(0);
}

/* ============================================
   NAVEGAÇÃO
   ============================================ */
nav { position: relative; }

.nav-link {
    position: relative;
    transition: all var(--dur-base) ease;
}

.nav-link::after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    background: linear-gradient(90deg, var(--color-primary), var(--color-primary-hover));
    transition: width var(--dur-base) ease;
    border-radius: 2px;
}

.nav-link:hover::after { width: 80%; }

.nav-link.active {
    color: var(--color-primary);
    background-color: rgba(22, 216, 66, 0.1);
}

.nav-link.active::after { width: 80%; }

/* ============================================
   PROJECT CARDS (FLIP 3D) — somente desktop
   ============================================ */
.project-card { perspective: 1200px; }

.project-inner {
    transition: transform 0.7s var(--ease);
    transform-style: preserve-3d;
    position: relative;
    width: 100%;
    height: 100%;
}

.project-front, .project-back {
    backface-visibility: hidden;
    position: absolute;
    inset: 0;
    border-radius: var(--radius-lg);
}

.project-front {
    background: linear-gradient(135deg, #101010 0%, #151515 50%, #1a1a1a 100%);
    border: 1px solid rgba(26, 26, 26, 0.5);
}

.project-back {
    transform: rotateY(180deg);
    background: linear-gradient(135deg, #101010 0%, #151515 50%, #1a1a1a 100%);
    border: 1px solid rgba(22, 216, 66, 0.3);
    box-shadow: 0 20px 60px rgba(22, 216, 66, 0.2);
}

/* Flip apenas em dispositivos com hover real (desktop) */
@media (hover: hover) and (pointer: fine) {
    .project-card:hover .project-inner {
        transform: rotateY(180deg);
    }
}

/* Mobile: card estático, mostra a frente (sem flip) */
@media (hover: none), (pointer: coarse) {
    .project-inner          { transform: none !important; }
    .project-back           { display: none; }
    .project-front          { position: relative; }
    .project-card           { height: auto !important; }
}

/* ============================================
   SKILL BARS (mantido mas opcional)
   ============================================ */
.skill-bar {
    height: 10px;
    background-color: rgba(255, 255, 255, 0.08);
    border-radius: 10px;
    overflow: hidden;
    position: relative;
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.3);
}

.skill-progress {
    height: 100%;
    background: linear-gradient(90deg, var(--color-primary), var(--color-primary-hover), var(--color-primary));
    background-size: 200% 100%;
    border-radius: 10px;
    transition: width 1.8s var(--ease);
    transform-origin: left;
    position: relative;
    box-shadow: 0 0 10px rgba(22, 216, 66, 0.5);
    animation: shimmer 3s infinite;
}

/* ============================================
   SKILLS — AGRUPAMENTO POR NÍVEL (novo, profissional)
   ============================================ */
.skill-group { margin-bottom: 2.5rem; }

.skill-group__title {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 1.05rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--color-primary);
    margin-bottom: 1rem;
    padding-bottom: 0.75rem;
    border-bottom: 1px solid rgba(22, 216, 66, 0.15);
}

.skill-group__title::before {
    content: '';
    width: 8px;
    height: 8px;
    background: var(--color-primary);
    border-radius: 50%;
    box-shadow: 0 0 10px var(--color-primary);
}

.skill-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 0.6rem;
}

.skill-chip {
    display: inline-flex;
    align-items: center;
    gap: 0.55rem;
    padding: 0.52rem 0.9rem;
    background: rgba(4, 20, 12, 0.82);
    border: 1px solid rgba(22, 216, 66, 0.14);
    border-radius: 0.7rem;
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace;
    font-size: 0.86rem;
    color: rgba(203, 213, 209, 0.78);
    font-weight: 700;
    transition: all var(--dur-base) var(--ease);
}

.skill-chip:hover {
    border-color: rgba(22, 216, 66, 0.35);
    transform: translateY(-2px);
    box-shadow: 0 10px 25px -15px rgba(22, 216, 66, 0.5);
}

.skill-chip__years {
    color: rgba(203, 213, 209, 0.78);
    font-size: 0.75rem;
    font-weight: 700;
    padding: 0;
    background: transparent;
    border-radius: 0;
}

.skill-chip__years::before {
    content: "· ";
    color: var(--color-primary);
}

/* ============================================
   SCROLLBAR
   ============================================ */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
    background-color: #000;
}

::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, var(--color-primary), var(--color-primary-hover));
    border-radius: 10px;
}

::-webkit-scrollbar-thumb:hover { background: var(--color-primary-hover); }
::-webkit-scrollbar-track       { background: #000; }

/* ============================================
   FORMULÁRIOS
   ============================================ */
input:focus, textarea:focus {
    box-shadow: 0 0 0 3px rgba(22, 216, 66, 0.15);
}

button:active { transform: scale(0.98); }

/* ============================================
   GLASSMORPHISM
   ============================================ */
.glass {
    background: rgba(16, 16, 16, 0.7);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.08);
}

/* ============================================
   LIGHT MODE (reservado — tema padrão é dark)
   ============================================ */
[data-theme="light"] {
    --bg-primary: #ffffff;
    --bg-secondary: #f5f5f5;
    --text-primary: #1a1a1a;
    --text-secondary: #4a4a4a;
    --border-color: #e5e5e5;
}

/* ============================================
   PROJECT FILTER
   ============================================ */
.project-filter.active {
    background-color: var(--color-primary);
    color: #000;
    border-color: var(--color-primary);
}

/* ============================================
   COUNTER
   ============================================ */
.counter { font-variant-numeric: tabular-nums; }

/* ============================================
   CURSOR DOT — somente em dispositivos com mouse
   ============================================ */
.cursor-dot { display: none; }

@media (hover: hover) and (pointer: fine) {
    .cursor-dot {
        display: block;
        transition: transform var(--dur-fast) ease, opacity var(--dur-fast) ease;
    }
}

/* ============================================
   ACESSIBILIDADE
   ============================================ */
.skip-link {
    position: absolute;
    top: -80px;
    left: 1rem;
    background: var(--color-primary);
    color: #000;
    padding: 0.75rem 1.25rem;
    text-decoration: none;
    font-weight: 700;
    border-radius: 0 0 var(--radius-sm) var(--radius-sm);
    z-index: 100;
    transition: top var(--dur-base) var(--ease);
}

.skip-link:focus { top: 0; }

*:focus-visible {
    outline: 2px solid var(--color-primary);
    outline-offset: 2px;
    border-radius: 4px;
}

/* Reduce motion — respeita preferência do usuário */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
    .floating, .fade-in { animation: none; opacity: 1; transform: none; }
}

/* Timeline fallback (caso HTML use .timeline-item) */
.timeline-item::before {
    content: '';
    position: absolute;
    left: -2px;
    top: 0;
    bottom: 0;
    width: 2px;
    background: linear-gradient(to bottom, var(--color-primary), transparent);
}

/* ============================================
   Nav brand logo — ícone hexagonal </>
   ============================================ */
.nav-brand {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    width: auto;
    height: 44px;
    border-radius: 0.75rem;
    position: relative;
    transition: transform 0.35s ease;
    text-decoration: none;
}

.nav-brand::after {
    content: "";
    position: absolute;
    inset: -2px;
    border-radius: 0.85rem;
    background: radial-gradient(circle at center, rgba(22, 216, 66, 0.35), transparent 70%);
    opacity: 0;
    transition: opacity 0.4s ease;
    z-index: -1;
}

.nav-brand:hover { transform: translateY(-1px); }
.nav-brand:hover::after { opacity: 1; }

.nav-brand__svg {
    width: 44px;
    height: 44px;
    display: block;
    overflow: visible;
    flex-shrink: 0;
}

.nav-brand__text {
    color: rgba(255, 255, 255, 0.88);
    font-size: 1.05rem;
    font-weight: 800;
    letter-spacing: -0.04em;
}

.nav-brand__hex {
    fill: url(#brand-hex-fill);
    stroke: url(#brand-hex-stroke);
    stroke-width: 2;
    transition: filter 0.4s ease;
    filter: drop-shadow(0 0 6px rgba(22, 216, 66, 0.25));
}

.nav-brand:hover .nav-brand__hex {
    filter: drop-shadow(0 0 12px rgba(22, 216, 66, 0.55));
}

.nav-brand__glyph {
    fill: none;
    stroke: #16d842;
    stroke-width: 2.2;
    stroke-linecap: round;
    stroke-linejoin: round;
    transition: stroke 0.3s ease, transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
    transform-origin: center;
}

.nav-brand:hover .nav-brand__glyph {
    stroke: #1aff6b;
    transform: rotate(-4deg);
}

.nav-brand__slash {
    stroke: #1aff6b;
}

@media (prefers-reduced-motion: reduce) {
    .nav-brand:hover,
    .nav-brand:hover .nav-brand__glyph { transform: none; }
}

@media (max-width: 640px) {
    .nav-brand__text { display: none; }

    .hero-identity-card {
        left: 0.9rem;
        right: 0.9rem;
        bottom: 0.9rem;
        padding: 0.85rem 0.95rem;
    }

    .hero-identity-card__badges span {
        padding: 0.35rem 0.5rem;
        font-size: 0.68rem;
    }
}

/* ============================================
   REFINAMENTOS PREMIUM (microinterações)
   ============================================ */

/* Nav: estado ao rolar — profundidade sutil */
nav {
    transition: background-color var(--dur-base) var(--ease),
        box-shadow var(--dur-base) var(--ease),
        border-color var(--dur-base) var(--ease);
}

nav.is-scrolled {
    background-color: rgba(9, 9, 9, 0.92);
    border-color: rgba(22, 216, 66, 0.12);
    box-shadow: 0 10px 30px -14px rgba(0, 0, 0, 0.65),
        0 0 0 1px rgba(22, 216, 66, 0.05);
}

/* Glow dinâmico (spotlight) que segue o cursor nos cards */
.card-base,
.card-hover {
    position: relative;
}

.card-base::after,
.card-hover::after {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: inherit;
    background: radial-gradient(240px circle at var(--mx, 50%) var(--my, -30%),
            rgba(22, 216, 66, 0.09), transparent 62%);
    opacity: 0;
    transition: opacity 0.45s var(--ease);
    pointer-events: none;
    z-index: 1;
}

.card-base:hover::after,
.card-hover:hover::after {
    opacity: 1;
}

/* Borda do card ganha brilho verde sutil no hover */
.card-base {
    will-change: transform;
}

.card-base:hover {
    border-color: rgba(22, 216, 66, 0.28);
}

/* Hover premium dos botões — brilho dinâmico mais refinado */
.btn-primary {
    position: relative;
    overflow: hidden;
}

.btn-primary::before {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(120px circle at 50% -40%, rgba(255, 255, 255, 0.35), transparent 60%);
    opacity: 0;
    transition: opacity var(--dur-base) var(--ease);
    pointer-events: none;
}

.btn-primary:hover::before {
    opacity: 1;
}

.btn-primary:hover {
    box-shadow: 0 18px 40px -12px rgba(22, 216, 66, 0.7),
        0 0 0 1px rgba(22, 216, 66, 0.2);
}

.btn-primary:active,
.btn-ghost:active {
    transform: translateY(0) scale(0.985);
}

.btn-ghost:hover {
    box-shadow: 0 0 24px -6px rgba(22, 216, 66, 0.4);
}

/* Camadas com parallax usam aceleração de GPU */
[data-parallax] {
    will-change: transform;
}

/* Respeita preferência de movimento reduzido */
@media (prefers-reduced-motion: reduce) {
    .card-base::after,
    .card-hover::after { display: none; }

    [data-parallax] { transform: none !important; }
}
