:root {
  --bg: #0a0f1c;
  --bg-alt: #0d1426;
  --surface: #111a2e;
  --surface-2: #16223b;
  --border: rgba(148, 163, 184, 0.14);
  --border-strong: rgba(148, 163, 184, 0.28);
  --text: #e6eaf2;
  --muted: #94a3b8;
  --accent: #60a5fa;
  --accent-2: #22d3ee;
  --gradient: linear-gradient(135deg, #60a5fa 0%, #22d3ee 100%);
  --radius: 16px;
  --radius-sm: 10px;
  --shadow: 0 20px 45px -20px rgba(0, 0, 0, 0.6);
  --max: 1160px;
  --font: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --mono: 'JetBrains Mono', ui-monospace, 'SFMono-Regular', Menlo, monospace;
  /* usadas pelos estilos injetados no script.js */
  --card: var(--surface);
  --primary: var(--accent);
  --text-light: var(--muted);
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; scroll-padding-top: 80px; }
body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
a { color: inherit; text-decoration: none; }
img, iframe { display: block; max-width: 100%; }
.hero-grid > *, .about-grid > *, .contact-grid > * { min-width: 0; }
.container { width: 100%; max-width: var(--max); margin: 0 auto; padding: 0 24px; }

/* ---------- Cabeçalho ---------- */
.header {
  position: fixed; inset: 0 0 auto 0; z-index: 1000;
  background: rgba(10, 15, 28, 0.72);
  backdrop-filter: saturate(160%) blur(14px);
  -webkit-backdrop-filter: saturate(160%) blur(14px);
  border-bottom: 1px solid var(--border);
}
.nav { max-width: var(--max); margin: 0 auto; padding: 0 24px; height: 68px; display: flex; align-items: center; justify-content: space-between; }
.nav-brand { display: flex; align-items: center; gap: 10px; font-weight: 700; letter-spacing: -0.01em; }
.brand-mark {
  width: 34px; height: 34px; border-radius: 9px; display: grid; place-items: center;
  background: var(--gradient); color: #0a0f1c; font-family: var(--mono); font-size: 0.85rem; font-weight: 700;
}
.nav-menu { display: flex; align-items: center; gap: 4px; list-style: none; }
.nav-link { padding: 8px 14px; border-radius: 8px; font-size: 0.93rem; color: var(--muted); transition: color .2s, background .2s; }
.nav-link:hover { color: var(--text); background: rgba(148, 163, 184, 0.08); }
.nav-link.active { color: var(--text); }
.nav-cta { margin-left: 8px; }
.hamburger { display: none; flex-direction: column; gap: 5px; cursor: pointer; padding: 8px; background: none; border: 0; }
.hamburger span { width: 22px; height: 2px; background: var(--text); border-radius: 2px; transition: .3s; }
.hamburger.active span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.hamburger.active span:nth-child(2) { opacity: 0; }
.hamburger.active span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ---------- Botões ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 8px; padding: 12px 22px; border-radius: 10px;
  font-weight: 600; font-size: 0.95rem; border: 1px solid transparent; cursor: pointer;
  transition: transform .2s, box-shadow .2s, background .2s, border-color .2s; font-family: inherit;
}
.btn:hover { transform: translateY(-2px); }
.btn-primary { background: var(--gradient); color: #06101f; box-shadow: 0 10px 30px -10px rgba(96, 165, 250, 0.6); }
.btn-secondary { background: transparent; color: var(--text); border-color: var(--border-strong); }
.btn-secondary:hover { border-color: var(--accent); background: rgba(96, 165, 250, 0.06); }
.btn-sm { padding: 8px 14px; font-size: 0.85rem; border-radius: 8px; }

/* ---------- Hero ---------- */
.hero { position: relative; padding: 150px 0 90px; overflow: hidden; }
.hero::before {
  content: ''; position: absolute; inset: -20% -10% auto auto; width: 720px; height: 720px;
  background: radial-gradient(circle, rgba(96, 165, 250, 0.18), transparent 60%); pointer-events: none;
}
.hero::after {
  content: ''; position: absolute; inset: 0; pointer-events: none; opacity: .35;
  background-image: linear-gradient(var(--border) 1px, transparent 1px), linear-gradient(90deg, var(--border) 1px, transparent 1px);
  background-size: 56px 56px; mask-image: radial-gradient(ellipse at 30% 20%, #000 20%, transparent 70%);
  -webkit-mask-image: radial-gradient(ellipse at 30% 20%, #000 20%, transparent 70%);
}
.hero-grid { position: relative; z-index: 1; display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); gap: 56px; align-items: center; }
.status-badge {
  display: inline-flex; align-items: center; gap: 8px; padding: 6px 14px; border-radius: 999px;
  background: rgba(34, 211, 238, 0.08); border: 1px solid rgba(34, 211, 238, 0.25); color: #a5f3fc; font-size: 0.85rem; margin-bottom: 22px;
}
.status-dot { width: 8px; height: 8px; border-radius: 50%; background: #34d399; box-shadow: 0 0 0 4px rgba(52, 211, 153, 0.2); }
.hero-title { font-size: clamp(2.4rem, 5vw, 3.6rem); line-height: 1.08; letter-spacing: -0.03em; font-weight: 800; }
.gradient-text { background: var(--gradient); -webkit-background-clip: text; background-clip: text; color: transparent; }
.hero-subtitle { margin-top: 14px; font-size: clamp(1.1rem, 2vw, 1.3rem); color: var(--text); font-weight: 500; }
.hero-description { margin-top: 18px; color: var(--muted); font-size: 1.05rem; max-width: 560px; }
.hero-buttons { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 30px; }
.hero-social { display: flex; gap: 10px; margin-top: 28px; }
.hero-social a {
  width: 42px; height: 42px; border-radius: 10px; display: grid; place-items: center; font-size: 1.15rem;
  border: 1px solid var(--border); color: var(--muted); transition: .2s;
}
.hero-social a:hover { color: var(--text); border-color: var(--accent); transform: translateY(-2px); }

.code-window { background: #0c1324; border: 1px solid var(--border-strong); border-radius: var(--radius); box-shadow: var(--shadow); overflow: hidden; }
.code-header { display: flex; align-items: center; gap: 8px; padding: 12px 16px; border-bottom: 1px solid var(--border); background: rgba(148, 163, 184, 0.04); }
.code-header span { width: 11px; height: 11px; border-radius: 50%; }
.code-header span:nth-child(1) { background: #f87171; }
.code-header span:nth-child(2) { background: #fbbf24; }
.code-header span:nth-child(3) { background: #34d399; }
.code-header p { margin-left: auto; font-family: var(--mono); font-size: 0.78rem; color: var(--muted); }
.code-body { padding: 22px 22px 26px; font-family: var(--mono); font-size: 0.88rem; line-height: 1.85; color: #cbd5e1; overflow-x: auto; white-space: pre; }
.c-key { color: #c084fc; } .c-var { color: #7dd3fc; } .c-str { color: #86efac; } .c-fn { color: #fcd34d; } .c-com { color: #64748b; }

.hero-stats { position: relative; z-index: 1; display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin-top: 70px; }
.stat-item { padding: 22px 24px; border-radius: var(--radius); background: rgba(17, 26, 46, 0.7); border: 1px solid var(--border); }
.stat-item strong { display: block; font-size: 1.7rem; font-weight: 800; letter-spacing: -0.02em; }
.stat-item span { color: var(--muted); font-size: 0.92rem; }

/* ---------- Seções ---------- */
section { padding: 96px 0; }
.section-alt { background: var(--bg-alt); border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }
.section-head { margin-bottom: 44px; max-width: 640px; }
.eyebrow { font-family: var(--mono); font-size: 0.82rem; color: var(--accent-2); letter-spacing: 0.06em; text-transform: uppercase; }
.section-title { font-size: clamp(1.8rem, 3.4vw, 2.4rem); letter-spacing: -0.02em; font-weight: 800; margin-top: 8px; }
.section-subtitle { color: var(--muted); margin-top: 10px; font-size: 1.02rem; }

/* ---------- Sobre ---------- */
.about-grid { display: grid; grid-template-columns: 1.3fr 1fr; gap: 48px; align-items: start; }
.about-text p { color: var(--muted); font-size: 1.04rem; margin-bottom: 16px; }
.about-text strong { color: var(--text); font-weight: 600; }
.about-cards { display: grid; gap: 14px; }
.info-card { display: flex; gap: 16px; align-items: flex-start; padding: 20px; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--border); }
.info-card i { font-size: 1.35rem; color: var(--accent); margin-top: 2px; }
.info-card h3 { font-size: 1rem; font-weight: 600; }
.info-card p { color: var(--muted); font-size: 0.92rem; }

/* ---------- Projetos ---------- */
.featured-list { display: grid; gap: 28px; margin-bottom: 28px; }
.featured-card {
  display: grid; grid-template-columns: 1fr 1.05fr; border-radius: 20px; overflow: hidden;
  background: var(--surface); border: 1px solid var(--border); transition: border-color .3s, transform .3s;
}
.featured-card:hover { border-color: var(--border-strong); transform: translateY(-3px); }
.featured-card:nth-child(even) .featured-cover { order: 2; }
.featured-cover { position: relative; min-height: 320px; display: grid; place-items: center; padding: 32px; overflow: hidden; }
.cover-tcc { background: radial-gradient(circle at 20% 20%, rgba(96, 165, 250, 0.35), transparent 55%), radial-gradient(circle at 80% 90%, rgba(192, 132, 252, 0.3), transparent 55%), #0f1830; }
.cover-salao { background: radial-gradient(circle at 80% 20%, rgba(244, 114, 182, 0.32), transparent 55%), radial-gradient(circle at 10% 90%, rgba(251, 191, 36, 0.22), transparent 55%), #1a1426; }
.mock {
  width: 100%; max-width: 380px; border-radius: 14px; background: rgba(10, 15, 28, 0.82);
  border: 1px solid var(--border-strong); box-shadow: var(--shadow); padding: 18px; backdrop-filter: blur(6px);
}
.mock-top { display: flex; justify-content: space-between; align-items: center; margin-bottom: 14px; font-size: 0.85rem; color: var(--muted); }
.mock-top b { color: var(--text); font-size: 0.95rem; }
.mock-pill { font-family: var(--mono); font-size: 0.75rem; padding: 3px 10px; border-radius: 999px; background: rgba(52, 211, 153, 0.12); color: #6ee7b7; }
.mock-row { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 10px; background: rgba(148, 163, 184, 0.06); margin-top: 8px; font-size: 0.86rem; }
.mock-row i { color: var(--accent); }
.mock-row span { margin-left: auto; font-family: var(--mono); color: var(--muted); font-size: 0.78rem; }
.mock-bar { height: 8px; border-radius: 99px; background: rgba(148, 163, 184, 0.12); margin-top: 14px; overflow: hidden; }
.mock-bar div { height: 100%; width: 78%; background: var(--gradient); border-radius: 99px; }
.featured-body { padding: 36px; display: flex; flex-direction: column; }
.project-label { font-family: var(--mono); font-size: 0.78rem; color: var(--accent-2); text-transform: uppercase; letter-spacing: 0.06em; }
.featured-body h3 { font-size: 1.55rem; letter-spacing: -0.02em; margin: 8px 0 12px; }
.featured-body > p { color: var(--muted); }
.feature-bullets { list-style: none; margin: 18px 0 22px; display: grid; gap: 8px; }
.feature-bullets li { display: flex; gap: 10px; color: var(--text); font-size: 0.95rem; }
.feature-bullets li i { color: #34d399; margin-top: 3px; }
.project-tech { display: flex; flex-wrap: wrap; gap: 8px; margin-top: auto; }
.tech-tag {
  font-family: var(--mono); font-size: 0.76rem; padding: 4px 10px; border-radius: 6px;
  background: rgba(96, 165, 250, 0.08); color: #bfdbfe; border: 1px solid rgba(96, 165, 250, 0.18);
}
.project-buttons { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 22px; }

.projects-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
.project-card {
  display: flex; flex-direction: column; border-radius: var(--radius); overflow: hidden;
  background: var(--surface); border: 1px solid var(--border); transition: transform .3s, border-color .3s, box-shadow .3s;
}
.project-card:hover { transform: translateY(-4px); border-color: var(--border-strong); box-shadow: var(--shadow); }
.preview { position: relative; aspect-ratio: 16 / 10; overflow: hidden; background: #0c1324; border-bottom: 1px solid var(--border); }
.preview iframe { position: absolute; top: 0; left: 0; width: 1280px; height: 800px; max-width: none; border: 0; transform-origin: 0 0; pointer-events: none; background: #fff; }
.preview::after { content: ''; position: absolute; inset: 0; background: linear-gradient(180deg, transparent 60%, rgba(10, 15, 28, 0.55)); }
.preview-icon { position: absolute; inset: 0; display: grid; place-items: center; font-size: 2.6rem; color: rgba(148, 163, 184, 0.35); }
.project-content { padding: 22px; display: flex; flex-direction: column; flex: 1; }
.project-content h3 { font-size: 1.1rem; letter-spacing: -0.01em; }
.project-content > p { color: var(--muted); font-size: 0.93rem; margin: 8px 0 16px; }
.project-links { display: flex; gap: 16px; margin-top: 18px; font-size: 0.9rem; }
.project-links a, .project-links button {
  display: inline-flex; align-items: center; gap: 6px; color: var(--muted); background: none; border: 0;
  font: inherit; cursor: pointer; transition: color .2s;
}
.project-links a:hover, .project-links button:hover { color: var(--accent); }

/* ---------- Habilidades ---------- */
.skills-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
.skill-category { padding: 26px; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--border); }
.skill-category h3 { display: flex; align-items: center; gap: 10px; font-size: 1.05rem; margin-bottom: 18px; }
.skill-category h3 i { color: var(--accent); }
.skill-items { display: flex; flex-wrap: wrap; gap: 10px; }
.skill-item { display: inline-flex; align-items: center; gap: 8px; padding: 8px 14px; border-radius: 10px; background: var(--surface-2); border: 1px solid var(--border); font-size: 0.92rem; }
.skill-item i { font-size: 1.05rem; color: var(--accent-2); }

/* ---------- Experiência ---------- */
.timeline { position: relative; max-width: 820px; }
.timeline::before { content: ''; position: absolute; left: 11px; top: 6px; bottom: 6px; width: 2px; background: linear-gradient(var(--accent), transparent); }
.timeline-item { position: relative; padding-left: 48px; margin-bottom: 26px; }
.timeline-marker { position: absolute; left: 3px; top: 8px; width: 18px; height: 18px; border-radius: 50%; background: var(--bg); border: 3px solid var(--accent); }
.timeline-content { padding: 22px 24px; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--border); }
.timeline-top { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 6px 16px; align-items: baseline; }
.timeline-content h3 { font-size: 1.08rem; }
.timeline-date { font-family: var(--mono); font-size: 0.8rem; color: var(--accent-2); }
.timeline-content h4 { color: var(--text); font-weight: 500; font-size: 0.95rem; margin: 4px 0 8px; opacity: .85; }
.timeline-content p { color: var(--muted); font-size: 0.94rem; }

/* ---------- Contato ---------- */
.contact-grid { display: grid; grid-template-columns: 1fr 1.2fr; gap: 36px; }
.contact-info { display: grid; gap: 14px; align-content: start; }
.contact-item { display: flex; align-items: center; gap: 16px; padding: 18px 20px; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--border); transition: border-color .2s; }
.contact-item:hover { border-color: var(--accent); }
.contact-item i { font-size: 1.4rem; color: var(--accent); }
.contact-item h4 { font-size: 0.82rem; color: var(--muted); font-weight: 500; }
.contact-item p { font-weight: 600; word-break: break-all; }
.contact-form { padding: 28px; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--border); display: grid; gap: 14px; }
.form-group input, .form-group textarea {
  width: 100%; padding: 13px 15px; border-radius: 10px; background: var(--bg); border: 1px solid var(--border);
  color: var(--text); font: inherit; font-size: 0.95rem; resize: vertical; transition: border-color .2s;
}
.form-group input:focus, .form-group textarea:focus { outline: none; border-color: var(--accent); }
.contact-form .btn { justify-self: start; }

/* ---------- Rodapé ---------- */
.footer { padding: 34px 0; border-top: 1px solid var(--border); color: var(--muted); font-size: 0.9rem; }
.footer .container { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px; }
.footer a:hover { color: var(--text); }

/* ---------- Modal ---------- */
.modal { display: none; position: fixed; inset: 0; z-index: 2000; background: rgba(3, 7, 18, 0.75); backdrop-filter: blur(6px); overflow-y: auto; padding: 40px 16px; }
.modal-content { position: relative; max-width: 720px; margin: 0 auto; padding: 36px; border-radius: 20px; background: var(--surface); border: 1px solid var(--border-strong); box-shadow: var(--shadow); }
.close { position: absolute; top: 14px; right: 18px; font-size: 1.8rem; color: var(--muted); cursor: pointer; line-height: 1; }
.close:hover { color: var(--text); }
#modalBody h2 { font-size: 1.6rem; letter-spacing: -0.02em; margin-bottom: 12px; padding-right: 30px; }

.modal-desc { color: var(--muted); }
.modal-heading { font-size: 0.82rem; font-family: var(--mono); text-transform: uppercase; letter-spacing: 0.06em; color: var(--accent-2); margin: 24px 0 10px; }
#modalBody .feature-bullets { margin: 0; }

/* ---------- Notificação ---------- */
.notification {
  position: fixed; right: 20px; bottom: 20px; z-index: 3000; display: flex; align-items: center; gap: 10px;
  padding: 14px 18px; border-radius: 12px; background: var(--surface-2); border: 1px solid var(--border-strong);
  box-shadow: var(--shadow); color: var(--text); font-size: 0.93rem;
  opacity: 0; transform: translateY(12px); transition: opacity .3s, transform .3s;
}
.notification.show { opacity: 1; transform: none; }
.notification.success i { color: #34d399; }
.notification.error i { color: #f87171; }

/* ---------- Animação de entrada ---------- */
.reveal { opacity: 0; transform: translateY(24px); transition: opacity .7s ease, transform .7s ease; }
.reveal.visible { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; transition: none; }
}

/* ---------- Responsivo ---------- */
@media (max-width: 980px) {
  .hero-grid, .about-grid, .contact-grid { grid-template-columns: minmax(0, 1fr); }
  .hero-visual { max-width: 560px; }
  .featured-card { grid-template-columns: 1fr; }
  .featured-card:nth-child(even) .featured-cover { order: 0; }
  .featured-cover { min-height: 260px; }
  .projects-grid, .skills-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 760px) {
  .hamburger { display: flex; }
  .nav-menu {
    position: fixed; top: 68px; left: 0; right: 0; flex-direction: column; align-items: stretch; gap: 0;
    padding: 12px 20px 20px; background: rgba(10, 15, 28, 0.97); border-bottom: 1px solid var(--border);
    transform: translateY(-120%); transition: transform .3s ease;
  }
  .nav-menu.active { transform: translateY(0); }
  .nav-link { display: block; padding: 12px 8px; }
  .nav-cta { margin: 8px 0 0; }
  .nav-cta .btn { width: 100%; justify-content: center; }
  .hero { padding: 120px 0 70px; }
  .hero-stats { grid-template-columns: 1fr; margin-top: 48px; }
  section { padding: 72px 0; }
  .projects-grid, .skills-grid { grid-template-columns: 1fr; }
  .featured-body { padding: 26px; }
  .container, .nav { padding: 0 16px; }
  .code-body { font-size: 0.8rem; }
}
