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

/* TEMA ESCURO — padrão */
:root {
    --bg: #0d0d0d;
    --bg2: #141414;
    --bg3: #1a1a1a;
    --line: #2a2a2a;
    --muted: #555;
    --sub: #888;
    --text: #d4d0c8;
    --bright: #f0ece0;
    --accent: #c8b97a;
    --accent2: #7ab8c8;
    --green: #7ac87a;
    --red: #c87a7a;
    --font-mono: 'IBM Plex Mono', monospace;
    --font-sans: 'IBM Plex Sans', sans-serif;
    --nav-bg: rgba(13,13,13,0.85);
}

/* TEMA CLARO */
[data-theme="light"] {
    --bg: #f5f3ee;
    --bg2: #eeece6;
    --bg3: #e6e3da;
    --line: #d0cdc4;
    --muted: #a09d94;
    --sub: #6b6860;
    --text: #2e2c28;
    --bright: #1a1816;
    --accent: #8a6a1a;
    --accent2: #1a6a8a;
    --green: #2a7a2a;
    --red: #8a2a2a;
    --nav-bg: rgba(245,243,238,0.88);
}

html { scroll-behavior: smooth; }

body {
    background: var(--bg);
    color: var(--text);
    font-family: var(--font-mono);
    font-size: 14px;
    line-height: 1.7;
    min-height: 100vh;
    transition: background 0.3s ease, color 0.3s ease;
}

a { color: inherit; text-decoration: none; }

/* GRID LINES */
body::before {
    content: '';
    position: fixed;
    inset: 0;
    background-image:
      linear-gradient(var(--line) 1px, transparent 1px),
      linear-gradient(90deg, var(--line) 1px, transparent 1px);
    background-size: 40px 40px;
    opacity: 0.3;
    pointer-events: none;
    z-index: 0;
    transition: opacity 0.3s ease;
}

[data-theme="light"] body::before {
    opacity: 0.4;
}

.container {
    max-width: 860px;
    margin: 0 auto;
    padding: 0 2rem;
    position: relative;
    z-index: 1;
}

/* NAV */
nav {
    position: fixed;
    top: 0; left: 0; right: 0;
    z-index: 100;
    background: var(--nav-bg);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--line);
    transition: background 0.3s ease, border-color 0.3s ease;
}

nav .inner {
    max-width: 860px;
    margin: 0 auto;
    padding: 0 2rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 52px;
}

.nav-logo {
    font-size: 12px;
    color: var(--accent);
    letter-spacing: 0.05em;
}

.nav-links {
    display: flex;
    gap: 2rem;
    list-style: none;
}

.nav-links a {
    font-size: 11px;
    color: var(--sub);
    letter-spacing: 0.08em;
    text-transform: uppercase;
    transition: color 0.2s;
}

.nav-links a:hover { color: var(--bright); }

/* THEME TOGGLE */
#theme-toggle {
    background: transparent;
    border: 1px solid var(--line);
    color: var(--sub);
    font-size: 14px;
    width: 32px;
    height: 32px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: border-color 0.2s, background 0.2s;
    line-height: 1;
}

#theme-toggle:hover {
    border-color: var(--accent);
    background: var(--bg2);
}

/* HERO */
.hero {
    padding: 140px 0 80px;
    border-bottom: 1px solid var(--line);
}

.hero-tag {
    font-size: 11px;
    color: var(--accent);
    letter-spacing: 0.12em;
    text-transform: uppercase;
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    gap: 8px;
}

.hero-tag::before {
    content: '';
    display: inline-block;
    width: 24px;
    height: 1px;
    background: var(--accent);
}

.hero h1 {
    font-family: var(--font-mono);
    font-size: clamp(2rem, 5vw, 3.2rem);
    font-weight: 300;
    color: var(--bright);
    line-height: 1.2;
    margin-bottom: 1.5rem;
    letter-spacing: -0.02em;
}

.hero h1 span {
    color: var(--accent);
}

.hero-desc {
    font-family: var(--font-sans);
    font-size: 15px;
    font-weight: 300;
    color: var(--sub);
    max-width: 480px;
    line-height: 1.8;
    margin-bottom: 2.5rem;
}

.hero-actions {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.btn {
    font-family: var(--font-mono);
    font-size: 11px;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    padding: 10px 20px;
    border: 1px solid;
    cursor: pointer;
    transition: all 0.2s;
    display: inline-block;
}

.btn-primary {
    border-color: var(--accent);
    color: var(--accent);
    background: transparent;
}

.btn-primary:hover {
    background: var(--accent);
    color: var(--bg);
}

.btn-ghost {
    border-color: var(--line);
    color: var(--sub);
    background: transparent;
}

.btn-ghost:hover {
    border-color: var(--sub);
    color: var(--text);
}

/* STATUS */
.status-bar {
    display: flex;
    gap: 2rem;
    flex-wrap: wrap;
    padding: 1.2rem 0;
    border-bottom: 1px solid var(--line);
    font-size: 11px;
    color: var(--muted);
    letter-spacing: 0.06em;
}

.status-item {
    display: flex;
    align-items: center;
    gap: 6px;
}

.dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--green);
    animation: pulse 2s ease-in-out infinite;
}

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

/* SECTION */
section {
    padding: 60px 0;
    border-bottom: 1px solid var(--line);
}

.section-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 2.5rem;
}

.section-num {
    font-size: 11px;
    color: var(--muted);
    letter-spacing: 0.1em;
    min-width: 28px;
}

.section-title {
    font-size: 11px;
    color: var(--accent);
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.section-line {
    flex: 1;
    height: 1px;
    background: var(--line);
}

/* SKILLS */
.skills-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 1px;
    background: var(--line);
    border: 1px solid var(--line);
}

.skill-cell {
    background: var(--bg2);
    padding: 1.2rem;
    transition: background 0.2s;
}

.skill-cell:hover { background: var(--bg3); }

.skill-cat {
    font-size: 10px;
    color: var(--muted);
    letter-spacing: 0.1em;
    text-transform: uppercase;
    margin-bottom: 0.8rem;
}

.skill-list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.skill-list li {
    font-size: 13px;
    color: var(--text);
    display: flex;
    align-items: center;
    gap: 6px;
}

.skill-list li::before {
    content: '›';
    color: var(--accent2);
    font-size: 14px;
}

/* PROJECTS */
.projects-list {
    display: flex;
    flex-direction: column;
    gap: 0;
}

.project-item {
    border: 1px solid var(--line);
    margin-top: -1px;
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 1.5rem;
    padding: 1.5rem;
    transition: background 0.2s;
    cursor: pointer;
    align-items: start;
}

.project-item:hover { background: var(--bg2); }

.project-meta {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 0.5rem;
}

.project-num {
    font-size: 10px;
    color: var(--muted);
    letter-spacing: 0.08em;
}

.project-lang {
    font-size: 10px;
    color: var(--accent2);
    border: 1px solid var(--accent2);
    padding: 1px 6px;
    letter-spacing: 0.06em;
}

.project-title {
    font-size: 15px;
    font-weight: 400;
    color: var(--bright);
    margin-bottom: 0.4rem;
}

.project-desc {
    font-family: var(--font-sans);
    font-size: 13px;
    font-weight: 300;
    color: var(--sub);
    line-height: 1.7;
    margin-bottom: 0.8rem;
}

.project-tags {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
}

.tag {
    font-size: 10px;
    color: var(--muted);
    background: var(--bg3);
    padding: 2px 8px;
    letter-spacing: 0.06em;
}

.project-arrow {
    font-size: 18px;
    color: var(--line);
    transition: color 0.2s;
    margin-top: 4px;
}

.project-item:hover .project-arrow { color: var(--accent); }

/* EXPERIENCE */
.exp-list {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.exp-item {
    display: grid;
    grid-template-columns: 120px 1fr;
    gap: 1.5rem;
    padding-bottom: 2rem;
    border-bottom: 1px solid var(--line);
}

.exp-item:last-child { border-bottom: none; padding-bottom: 0; }

.exp-date {
    font-size: 11px;
    color: var(--muted);
    letter-spacing: 0.06em;
    padding-top: 2px;
    line-height: 1.6;
}

.exp-role {
    font-size: 14px;
    color: var(--bright);
    margin-bottom: 2px;
}

.exp-company {
    font-size: 12px;
    color: var(--accent);
    margin-bottom: 0.6rem;
    letter-spacing: 0.04em;
}

.exp-desc {
    font-family: var(--font-sans);
    font-size: 13px;
    font-weight: 300;
    color: var(--sub);
    line-height: 1.7;
}

/* CONTACT */
.contact-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1px;
    background: var(--line);
    border: 1px solid var(--line);
}

.contact-item {
    background: var(--bg2);
    padding: 1.2rem 1.5rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    transition: background 0.2s;
    cursor: pointer;
}

.contact-item:hover { background: var(--bg3); }

.contact-label {
    font-size: 10px;
    color: var(--muted);
    letter-spacing: 0.1em;
    text-transform: uppercase;
    margin-bottom: 3px;
}

.contact-value {
    font-size: 13px;
    color: var(--text);
}

.contact-icon {
    font-size: 16px;
    color: var(--line);
    transition: color 0.2s;
}

.contact-item:hover .contact-icon { color: var(--accent); }

/* FOOTER */
footer {
    padding: 2rem 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 11px;
    color: var(--muted);
    letter-spacing: 0.06em;
    flex-wrap: wrap;
    gap: 0.5rem;
}

/* FADE IN */
.fade-in {
    opacity: 0;
    transform: translateY(16px);
    animation: fadeUp 0.5s ease forwards;
}

@keyframes fadeUp {
    to { opacity: 1; transform: translateY(0); }
}

.fade-in:nth-child(1) { animation-delay: 0.1s; }
.fade-in:nth-child(2) { animation-delay: 0.2s; }
.fade-in:nth-child(3) { animation-delay: 0.3s; }
.fade-in:nth-child(4) { animation-delay: 0.4s; }

@media (max-width: 600px) {
    .exp-item { grid-template-columns: 1fr; gap: 0.4rem; }
    .contact-grid { grid-template-columns: 1fr; }
    .hero h1 { font-size: 1.8rem; }
}