:root {
    --bg:        #080b10;
    --bg2:       #0d1117;
    --bg3:       #111620;
    --surface:   #161c26;
    --border:    #2a1a1a;
    --border2:   #3d1010;
    --red:       #cc1a1a;
    --red-glow:  #ff2222;
    --red-dim:   #6b0000;
    --text:      #c8cdd6;
    --text-dim:  #7a8394;
    --gold:      #9a7a3a;

    --font-display: 'Cinzel Decorative', serif;
    --font-heading: 'Cinzel', serif;
    --font-body:    'IM Fell English', serif;
    --font-mono:    'Share Tech Mono', monospace;
}

*, *::before, *::after {
    margin: 0; padding: 0;
    box-sizing: border-box;
}

html { scroll-behavior: smooth; }

::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: var(--red-dim); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--red); }

body {
    background-color: var(--bg);
    color: var(--text);
    font-family: var(--font-body);
    font-size: 1.05rem;
    line-height: 1.7;
    overflow-x: hidden;
}

.noise-overlay {
    pointer-events: none;
    position: fixed;
    inset: 0;
    z-index: 999;
    opacity: 0.025;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)'/%3E%3C/svg%3E");
    background-repeat: repeat;
    background-size: 150px 150px;
}

.blood-drips {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 60px;
    pointer-events: none;
    z-index: 99;
    overflow: visible;
}
.blood-drips span {
    position: absolute;
    top: 52px;
    width: 3px;
    background: linear-gradient(to bottom, var(--red-dim), var(--red), transparent);
    border-radius: 0 0 50% 50%;
    animation: drip 6s ease-in infinite;
    opacity: 0;
}
.blood-drips span:nth-child(1)  { left: 8%;  height: 18px; animation-delay: 0s;    animation-duration: 7s; }
.blood-drips span:nth-child(2)  { left: 19%; height: 26px; animation-delay: 1.4s;  animation-duration: 8s; }
.blood-drips span:nth-child(3)  { left: 33%; height: 14px; animation-delay: 0.7s;  animation-duration: 6s; }
.blood-drips span:nth-child(4)  { left: 47%; height: 30px; animation-delay: 2.1s;  animation-duration: 9s; }
.blood-drips span:nth-child(5)  { left: 58%; height: 20px; animation-delay: 0.3s;  animation-duration: 7.5s; }
.blood-drips span:nth-child(6)  { left: 67%; height: 12px; animation-delay: 1.8s;  animation-duration: 6.5s; }
.blood-drips span:nth-child(7)  { left: 74%; height: 24px; animation-delay: 0.9s;  animation-duration: 8.5s; }
.blood-drips span:nth-child(8)  { left: 82%; height: 16px; animation-delay: 3s;    animation-duration: 7s; }
.blood-drips span:nth-child(9)  { left: 89%; height: 22px; animation-delay: 1.1s;  animation-duration: 9s; }
.blood-drips span:nth-child(10) { left: 95%; height: 10px; animation-delay: 2.5s;  animation-duration: 6s; }

@keyframes drip {
    0%   { opacity: 0; transform: scaleY(0); transform-origin: top; }
    10%  { opacity: 0.8; transform: scaleY(1); }
    70%  { opacity: 0.6; }
    100% { opacity: 0; transform: translateY(15px) scaleY(1.3); }
}

.container {
    width: 90%;
    max-width: 860px;
    margin: 0 auto;
}
.text-center { text-align: center; }
.mt-1 { margin-top: 1rem; }
.mt-2 { margin-top: 2rem; }

body.lang-pt .en { display: none !important; }
body.lang-en .pt { display: none !important; }

h1 {
    font-family: var(--font-display);
    font-size: clamp(1.6rem, 5vw, 2.8rem);
    color: var(--red-glow);
    text-shadow: 0 0 20px rgba(200, 0, 0, 0.4), 0 0 40px rgba(200, 0, 0, 0.15);
    letter-spacing: 0.05em;
    margin-bottom: 1.2rem;
    animation: flicker 8s infinite;
}

@keyframes flicker {
    0%, 95%, 100% { opacity: 1; }
    96%            { opacity: 0.85; }
    97%            { opacity: 1; }
    98%            { opacity: 0.9; }
}

h2 {
    font-family: var(--font-heading);
    font-size: clamp(1.2rem, 3vw, 1.7rem);
    color: var(--red);
    border-bottom: 1px solid var(--border2);
    padding-bottom: 0.5rem;
    margin-bottom: 1.2rem;
    letter-spacing: 0.04em;
}
h2 .sub {
    font-family: var(--font-mono);
    font-size: 0.65em;
    color: var(--text-dim);
    margin-left: 0.5rem;
    letter-spacing: 0.02em;
}

h3 {
    font-family: var(--font-heading);
    color: var(--red);
    font-size: 1.1rem;
    margin-bottom: 0.5rem;
}

.skills-title {
    font-family: var(--font-heading);
    font-size: 1rem;
    color: var(--text-dim);
    letter-spacing: 0.08em;
    text-transform: uppercase;
    border: none;
}

.quote {
    font-family: var(--font-body);
    font-style: italic;
    color: var(--red-dim);
    font-size: 1.05rem;
    line-height: 1.6;
    margin: 0.8rem auto;
    max-width: 600px;
}
.quote-author {
    display: block;
    font-size: 0.85rem;
    color: var(--text-dim);
    margin-top: 0.3rem;
    font-style: normal;
    font-family: var(--font-mono);
}

.role {
    font-family: var(--font-heading);
    color: var(--text);
    font-size: 1rem;
    letter-spacing: 0.03em;
}

.bio {
    color: var(--text-dim);
    max-width: 560px;
    margin: 0 auto;
    font-size: 0.98rem;
}

header {
    background: rgba(5, 6, 10, 0.92);
    backdrop-filter: blur(8px);
    position: fixed;
    width: 100%;
    top: 0;
    border-bottom: 1px solid var(--border2);
    z-index: 98;
    box-shadow: 0 2px 20px rgba(140, 0, 0, 0.12);
}

nav ul {
    list-style: none;
    display: flex;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.3rem 1.2rem;
    padding: 0.75rem 1rem;
}

nav ul li a {
    color: var(--text-dim);
    text-decoration: none;
    font-family: var(--font-mono);
    font-size: 0.85rem;
    letter-spacing: 0.06em;
    transition: color 0.2s, text-shadow 0.2s;
}
nav ul li a:hover {
    color: var(--red-glow);
    text-shadow: 0 0 8px rgba(255, 30, 30, 0.5);
}

.btn-lang {
    background: transparent;
    border: 1px solid var(--border2);
    color: var(--red);
    padding: 3px 10px;
    cursor: pointer;
    font-family: var(--font-mono);
    font-size: 0.8rem;
    border-radius: 2px;
    transition: background 0.2s, border-color 0.2s;
}
.btn-lang:hover {
    background: var(--red-dim);
    border-color: var(--red);
    color: #fff;
}

section {
    padding: 100px 0 60px;
    min-height: 80vh;
    display: flex;
    align-items: center;
    position: relative;
}

.sigil {
    font-size: 4rem;
    color: var(--red-dim);
    opacity: 0.3;
    line-height: 1;
    margin-bottom: 0.5rem;
    animation: pulse-sigil 4s ease-in-out infinite;
}
@keyframes pulse-sigil {
    0%, 100% { opacity: 0.25; transform: scale(1); }
    50%       { opacity: 0.45; transform: scale(1.05); }
}

.section-divider {
    text-align: center;
    padding: 1rem 0;
    color: var(--red-dim);
    font-size: 1.1rem;
    opacity: 0.5;
    letter-spacing: 0.3em;
}

.reveal {
    opacity: 0;
    transform: translateY(24px);
    transition: opacity 0.7s ease, transform 0.7s ease;
}
.reveal.visible {
    opacity: 1;
    transform: translateY(0);
}

.actions { display: flex; flex-direction: column; align-items: center; gap: 0.5rem; }

.btn-download {
    display: inline-block;
    border: 1px solid var(--red-dim);
    padding: 9px 22px;
    color: var(--red);
    text-decoration: none;
    font-family: var(--font-mono);
    font-size: 0.9rem;
    letter-spacing: 0.06em;
    transition: background 0.25s, box-shadow 0.25s, color 0.25s;
    border-radius: 2px;
}
.btn-download:hover {
    background: var(--red-dim);
    color: #fff;
    box-shadow: 0 0 14px rgba(180, 0, 0, 0.35);
}

.social-links {
    display: flex;
    justify-content: center;
    gap: 0.75rem;
    flex-wrap: wrap;
}
.social-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 6px 14px;
    background: var(--surface);
    border: 1px solid var(--border);
    color: var(--text-dim);
    text-decoration: none;
    font-family: var(--font-mono);
    font-size: 0.82rem;
    border-radius: 2px;
    transition: border-color 0.2s, color 0.2s, box-shadow 0.2s;
}
.social-btn:hover {
    border-color: var(--red);
    color: var(--red);
    box-shadow: 0 0 10px rgba(180, 0, 0, 0.2);
}
.social-icon {
    font-size: 0.9rem;
    color: var(--red-dim);
}

.relic-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-left: 3px solid var(--red-dim);
    padding: 1.2rem 1.4rem;
    border-radius: 3px;
    transition: border-left-color 0.3s, box-shadow 0.3s;
}
.relic-card:hover {
    border-left-color: var(--red);
    box-shadow: -4px 0 16px rgba(180, 0, 0, 0.15);
}
.relic-header {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
}
.relic-glyph {
    font-size: 1.8rem;
    color: var(--red-dim);
    line-height: 1.2;
    flex-shrink: 0;
}
.school { color: var(--text-dim); font-family: var(--font-mono); font-size: 0.85rem; }

.badge {
    display: inline-block;
    background: rgba(100, 0, 0, 0.25);
    border: 1px solid var(--red-dim);
    color: var(--red);
    font-family: var(--font-mono);
    font-size: 0.7rem;
    padding: 1px 7px;
    border-radius: 2px;
    margin-left: 0.5rem;
    vertical-align: middle;
    letter-spacing: 0.05em;
}

.tech-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}
.tech-pill {
    background: var(--surface);
    border: 1px solid var(--border);
    color: var(--text-dim);
    font-family: var(--font-mono);
    font-size: 0.8rem;
    padding: 5px 12px;
    border-radius: 20px;
    transition: border-color 0.2s, color 0.2s, box-shadow 0.2s;
    cursor: default;
}
.tech-pill:hover {
    border-color: var(--red);
    color: var(--red);
    box-shadow: 0 0 8px rgba(180, 0, 0, 0.2);
}


.projetos {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

.card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 4px;
    padding: 1.3rem;
    position: relative;
    overflow: hidden;
    transition: border-color 0.25s, transform 0.25s, box-shadow 0.25s;
}
.card::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(140,0,0,0.04) 0%, transparent 60%);
    pointer-events: none;
}
.card:hover {
    border-color: var(--red-dim);
    transform: translateY(-3px);
    box-shadow: 0 8px 24px rgba(130, 0, 0, 0.18);
}

.card.featured {
    border-left: 3px solid var(--red);
    grid-column: span 2;
    display: flex;
    flex-direction: column;
}

.card-glyph {
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
    opacity: 0.7;
}

.tag {
    display: inline-block;
    background: rgba(100, 0, 0, 0.2);
    border: 1px solid var(--border2);
    color: var(--text-dim);
    font-family: var(--font-mono);
    font-size: 0.7rem;
    padding: 2px 8px;
    border-radius: 2px;
    letter-spacing: 0.05em;
    margin-top: 0.5rem;
}

.link-projeto {
    color: var(--red);
    text-decoration: none;
    font-family: var(--font-mono);
    font-size: 0.82rem;
    display: inline-block;
    margin-top: 0.75rem;
    transition: color 0.2s, letter-spacing 0.2s;
}
.link-projeto:hover {
    color: var(--red-glow);
    letter-spacing: 0.05em;
}

form {
    background: var(--surface);
    border: 1px solid var(--border);
    padding: 2rem;
    max-width: 520px;
    margin: 0 auto;
    text-align: left;
    border-radius: 4px;
}

.form-group {
    margin-bottom: 1.2rem;
}

label {
    display: block;
    font-family: var(--font-mono);
    font-size: 0.8rem;
    color: var(--text-dim);
    letter-spacing: 0.08em;
    margin-bottom: 0.4rem;
    text-transform: uppercase;
}

input, textarea {
    width: 100%;
    padding: 10px 12px;
    background: var(--bg2);
    border: 1px solid var(--border);
    color: var(--text);
    font-family: var(--font-mono);
    font-size: 0.9rem;
    border-radius: 2px;
    transition: border-color 0.2s, box-shadow 0.2s;
    outline: none;
}
input:focus, textarea:focus {
    border-color: var(--red-dim);
    box-shadow: 0 0 10px rgba(150, 0, 0, 0.15);
}
textarea { resize: vertical; }

.btn {
    width: 100%;
    padding: 11px;
    background: rgba(100, 0, 0, 0.15);
    color: var(--red);
    border: 1px solid var(--red-dim);
    font-family: var(--font-heading);
    font-size: 0.95rem;
    letter-spacing: 0.1em;
    cursor: pointer;
    border-radius: 2px;
    transition: background 0.25s, box-shadow 0.25s, color 0.25s;
}
.btn:hover {
    background: var(--red-dim);
    color: #fff;
    box-shadow: 0 0 16px rgba(180, 0, 0, 0.3);
}

footer {
    text-align: center;
    padding: 1.5rem;
    border-top: 1px solid var(--border2);
    color: var(--text-dim);
    font-family: var(--font-mono);
    font-size: 0.78rem;
    letter-spacing: 0.06em;
}

@media (max-width: 640px) {
    .projetos {
        grid-template-columns: 1fr;
    }
    .card.featured {
        grid-column: span 1;
    }
    nav ul {
        gap: 0.4rem 0.8rem;
    }
    nav ul li a {
        font-size: 0.75rem;
    }
    h1 {
        font-size: 1.5rem;
    }
}