/* ── FONTS ──────────────────────────────────────────────────── */
@font-face {
  font-family: 'Geist Mono';
  src: url('https://cdn.jsdelivr.net/npm/geist@1.3.0/dist/fonts/geist-mono/GeistMono-Light.woff2') format('woff2');
  font-weight: 300; font-style: normal; font-display: swap;
}
@font-face {
  font-family: 'Geist Mono';
  src: url('https://cdn.jsdelivr.net/npm/geist@1.3.0/dist/fonts/geist-mono/GeistMono-Regular.woff2') format('woff2');
  font-weight: 400; font-style: normal; font-display: swap;
}
@font-face {
  font-family: 'Geist Mono';
  src: url('https://cdn.jsdelivr.net/npm/geist@1.3.0/dist/fonts/geist-mono/GeistMono-Medium.woff2') format('woff2');
  font-weight: 500; font-style: normal; font-display: swap;
}
@font-face {
  font-family: 'Geist Mono';
  src: url('https://cdn.jsdelivr.net/npm/geist@1.3.0/dist/fonts/geist-mono/GeistMono-Bold.woff2') format('woff2');
  font-weight: 700; font-style: normal; font-display: swap;
}

/* ── TOKENS ─────────────────────────────────────────────────── */
:root {
  --accent:      #C8405A;
  --accent-dim:  #9E2E41;
  --accent-glow: rgba(200, 64, 90, 0.18);
  --accent-soft: rgba(200, 64, 90, 0.08);

  --bg:          #F2EEE9;
  --bg-sidebar:  #EAE4DC;
  --bg-card:     #FDFAF6;
  --border:      rgba(0,0,0,0.10);
  --text:        #1A1410;
  --text-muted:  #6B5F56;
  --tag-bg:      rgba(0,0,0,0.07);
  --tag-text:    #3A2E27;
  --scrollbar:   #C5BBB1;
  --noise: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='200' height='200'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='200' height='200' filter='url(%23n)' opacity='0.035'/%3E%3C/svg%3E");
}

[data-theme="dark"] {
  --bg:          #0F1520;
  --bg-sidebar:  #0C1119;
  --bg-card:     #141D2B;
  --border:      rgba(255,255,255,0.07);
  --text:        #DCE4EF;
  --text-muted:  #6A7F99;
  --tag-bg:      rgba(255,255,255,0.06);
  --tag-text:    #A8BCCF;
  --scrollbar:   #1E2D40;
  --noise: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='200' height='200'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='200' height='200' filter='url(%23n)' opacity='0.04'/%3E%3C/svg%3E");
}

/* ── RESET ──────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html, body { height: 100%; }

body {
  font-family: 'Geist Mono', 'JetBrains Mono', monospace;
  background: var(--bg);
  color: var(--text);
  display: flex;
  height: 100vh;
  overflow: hidden;
  transition: background .3s, color .3s;
}

::-webkit-scrollbar { width: 4px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--scrollbar); border-radius: 2px; }

/* ── SIDEBAR ────────────────────────────────────────────────── */
.sidebar {
  width: 280px;
  min-width: 280px;
  background: var(--bg-sidebar);
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  padding: 36px 28px;
  position: relative;
  overflow: hidden;
}

.sidebar::before {
  content: '';
  position: absolute;
  inset: 0;
  background: var(--noise);
  pointer-events: none;
}

.sidebar::after {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--accent), transparent);
}

.sidebar-avatar {
  width: 88px;
  height: 88px;
  border-radius: 50%;
  border: 2px solid var(--accent);
  object-fit: cover;
  display: block;
  margin-bottom: 20px;
  box-shadow: 0 0 0 4px var(--accent-soft), 0 0 24px var(--accent-glow);
}

.sidebar-avatar-fallback {
  display: none;
  width: 88px; height: 88px;
  border-radius: 50%;
  border: 2px solid var(--accent);
  background: var(--accent-soft);
  align-items: center;
  justify-content: center;
  margin-bottom: 20px;
  font-size: 2rem;
  color: var(--accent);
  box-shadow: 0 0 0 4px var(--accent-soft);
}

.sidebar-name {
  font-family: 'Unbounded', sans-serif;
  font-weight: 700;
  font-size: 0.95rem;
  letter-spacing: -0.01em;
  color: var(--text);
  line-height: 1.2;
}

.sidebar-role {
  font-size: 0.7rem;
  color: var(--accent);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  margin-top: 6px;
  font-weight: 500;
}

.sidebar-divider {
  width: 100%;
  height: 1px;
  background: var(--border);
  margin: 24px 0;
}

/* ── SOCIAL BUTTONS ─────────────────────────────────────────── */
.social-links {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.social-btn {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 14px;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: transparent;
  color: var(--text-muted);
  font-family: 'Geist Mono', monospace;
  font-size: 0.72rem;
  letter-spacing: 0.05em;
  text-decoration: none;
  cursor: pointer;
  transition: all .2s;
  position: relative;
  overflow: hidden;
}

.social-btn::before {
  content: '';
  position: absolute;
  inset: 0;
  background: var(--accent-soft);
  transform: translateX(-100%);
  transition: transform .25s;
}

.social-btn:hover { border-color: var(--accent); color: var(--accent); }
.social-btn:hover::before { transform: translateX(0); }
.social-btn svg, .social-btn span { position: relative; z-index: 1; }

/* ── NAV ────────────────────────────────────────────────────── */
.nav-links {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin-top: 4px;
}

.nav-btn {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 14px;
  border-radius: 6px;
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-family: 'Geist Mono', monospace;
  font-size: 0.75rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  cursor: pointer;
  transition: all .2s;
  text-align: left;
  width: 100%;
}

.nav-btn .nav-index {
  color: var(--accent);
  font-size: 0.6rem;
  opacity: 0.7;
  width: 16px;
  flex-shrink: 0;
}

.nav-btn:hover { color: var(--text); background: var(--accent-soft); }
.nav-btn.active { color: var(--accent); background: var(--accent-soft); }
.nav-btn.active .nav-index { opacity: 1; }

/* ── THEME TOGGLE ───────────────────────────────────────────── */
.theme-toggle {
  position: absolute;
  top: 20px; right: 20px;
  background: transparent;
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 7px;
  cursor: pointer;
  color: var(--text-muted);
  transition: all .2s;
  display: flex;
  align-items: center;
  justify-content: center;
}
.theme-toggle:hover { border-color: var(--accent); color: var(--accent); }

/* ── MAIN ───────────────────────────────────────────────────── */
.main {
  flex: 1;
  overflow-y: auto;
  scroll-behavior: smooth;
}

.section {
  min-height: 100vh;
  padding: 72px 64px;
  border-bottom: 1px solid var(--border);
}

.section-label {
  font-size: 0.65rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--accent);
  font-weight: 500;
  margin-bottom: 8px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.section-label::after {
  content: '';
  flex: 1;
  max-width: 40px;
  height: 1px;
  background: var(--accent);
  opacity: 0.5;
}

.section-title {
  font-family: 'Unbounded', sans-serif;
  font-weight: 700;
  font-size: 1.9rem;
  letter-spacing: -0.02em;
  line-height: 1.15;
  margin-bottom: 40px;
  color: var(--text);
}

/* ── HERO ───────────────────────────────────────────────────── */
#inicio {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  padding: 72px 80px;
}

#inicio .hero-prompt,
#inicio .hero-sub,
#inicio .hero-status {
  text-align: left;
}

#inicio > * {
  width: 100%;
  max-width: 560px;
}

.hero-prompt {
  font-size: 0.72rem;
  color: var(--text-muted);
  margin-bottom: 28px;
  opacity: 0.8;
}

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

.hero-title {
  font-family: 'Unbounded', sans-serif;
  font-weight: 800;
  font-size: 2.8rem;
  letter-spacing: -0.03em;
  line-height: 1.1;
  color: var(--text);
  margin-bottom: 20px;
}

.hero-title em {
  font-style: normal;
  color: var(--accent);
}

.hero-sub {
  font-size: 0.85rem;
  color: var(--text-muted);
  max-width: 440px;
  line-height: 1.8;
  margin-bottom: 44px;
}

.hero-status {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.68rem;
  color: var(--text-muted);
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.status-dot {
  width: 7px; height: 7px;
  border-radius: 50%;
  background: #3EC97A;
  box-shadow: 0 0 6px #3EC97A;
  animation: pulse 2s infinite;
}

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

/* ── SOBRE ──────────────────────────────────────────────────── */
#sobre {
  display: flex;
  flex-direction: column;
  align-items: center;
}

#sobre > * {
  width: 100%;
  max-width: 600px;
}
.about-text {
  font-size: 0.88rem;
  color: var(--text-muted);
  line-height: 2;
  max-width: 560px;
  margin-bottom: 44px;
}

.about-text strong { color: var(--text); font-weight: 500; }

.skills-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 10px;
  max-width: 580px;
}

.skill-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  border: 1px solid var(--border);
  border-radius: 6px;
  font-size: 0.72rem;
  color: var(--text-muted);
  background: var(--bg-card);
  letter-spacing: 0.04em;
  transition: border-color .2s, color .2s;
}

.skill-item:hover { border-color: var(--accent); color: var(--text); }

.skill-dot {
  width: 5px; height: 5px;
  border-radius: 50%;
  background: var(--accent);
  flex-shrink: 0;
}

/* ── PROJETOS ───────────────────────────────────────────────── */
.projects-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 20px;
}

.project-card {
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--bg-card);
  overflow: hidden;
  transition: border-color .25s, box-shadow .25s;
}

.project-card:hover {
  border-color: var(--accent);
  box-shadow: 0 0 24px var(--accent-glow);
}

.project-thumb-wrapper {
  position: relative;
  overflow: hidden;
  height: 160px;
}

.project-thumb-placeholder {
  width: 100%;
  height: 160px;
  background: linear-gradient(135deg, var(--bg-sidebar) 0%, var(--bg) 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
}

.project-thumb-placeholder::after {
  content: '';
  position: absolute;
  inset: 0;
  background: repeating-linear-gradient(
    45deg, transparent, transparent 10px,
    var(--border) 10px, var(--border) 11px
  );
  opacity: 0.4;
}

.project-thumb {
  width: 100%;
  height: 160px;
  object-fit: cover;
  display: block;
}

.project-overlay {
  position: absolute;
  inset: 0;
  background: rgba(12, 8, 10, 0.88);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity .25s;
  padding: 20px;
}

[data-theme="light"] .project-overlay { background: rgba(30, 18, 22, 0.9); }
.project-card:hover .project-overlay { opacity: 1; }

.project-overlay-text {
  font-size: 0.75rem;
  color: #e8d8dc;
  line-height: 1.8;
  text-align: center;
}

.project-body { padding: 18px 20px 20px; }

.project-name {
  font-family: 'Unbounded', sans-serif;
  font-weight: 700;
  font-size: 0.9rem;
  color: var(--text);
  margin-bottom: 10px;
}

.project-short {
  font-size: 0.72rem;
  color: var(--text-muted);
  line-height: 1.7;
  margin-bottom: 14px;
}

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

.project-tag {
  font-size: 0.62rem;
  letter-spacing: 0.06em;
  padding: 3px 8px;
  border-radius: 4px;
  background: var(--tag-bg);
  color: var(--tag-text);
  text-transform: uppercase;
  border: 1px solid var(--border);
}

.project-actions {
  display: flex;
  gap: 10px;
}

/* ── BUTTONS ────────────────────────────────────────────────── */
.btn-sm {
  font-family: 'Geist Mono', monospace;
  font-size: 0.68rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 7px 14px;
  border-radius: 5px;
  cursor: pointer;
  text-decoration: none;
  transition: all .2s;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border: 1px solid transparent;
}

.btn-accent { background: var(--accent); color: #fff; border-color: var(--accent); }
.btn-accent:hover { background: var(--accent-dim); border-color: var(--accent-dim); }

.btn-outline { background: transparent; color: var(--text-muted); border-color: var(--border); }
.btn-outline:hover { border-color: var(--accent); color: var(--accent); }

/* ── MODAL ──────────────────────────────────────────────────── */
.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.7);
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity .25s;
  backdrop-filter: blur(4px);
}

.modal-backdrop.open { opacity: 1; pointer-events: all; }

.modal {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-top: 2px solid var(--accent);
  border-radius: 10px;
  padding: 36px 40px;
  max-width: 600px;
  width: 90%;
  position: relative;
  max-height: 80vh;
  overflow-y: auto;
  transform: translateY(12px);
  transition: transform .25s;
}

.modal-backdrop.open .modal { transform: translateY(0); }

.modal-title {
  font-family: 'Unbounded', sans-serif;
  font-weight: 700;
  font-size: 1.2rem;
  margin-bottom: 16px;
  color: var(--text);
}

.modal-body {
  font-size: 0.82rem;
  color: var(--text-muted);
  line-height: 1.9;
  margin-bottom: 24px;
}

.modal-close {
  position: absolute;
  top: 16px; right: 16px;
  background: transparent;
  border: 1px solid var(--border);
  border-radius: 5px;
  padding: 6px 10px;
  cursor: pointer;
  color: var(--text-muted);
  font-family: 'Geist Mono', monospace;
  font-size: 0.7rem;
  transition: all .2s;
}

.modal-close:hover { border-color: var(--accent); color: var(--accent); }

/* ── CONTATO ────────────────────────────────────────────────── */
#contato {
  display: flex;
  flex-direction: column;
  align-items: center;
}

#contato > * {
  width: 100%;
  max-width: 800px;
}
.contact-intro {
  font-size: 0.85rem;
  color: var(--text-muted);
  max-width: 480px;
  line-height: 1.9;
  margin-bottom: 40px;
}

.contact-form-col { width: 100%; max-width: 640px; }

.contact-social-row {
  display: flex;
  gap: 12px;
  margin-top: 16px;
  max-width: 640px;
  flex-wrap: wrap;
}

.contact-social-row .contact-link-card { flex: 1; min-width: 180px; }

.contact-link-card {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 18px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--bg-card);
  color: var(--text-muted);
  text-decoration: none;
  font-size: 0.75rem;
  letter-spacing: 0.05em;
  transition: all .2s;
}

.contact-link-card:hover { border-color: var(--accent); color: var(--accent); }

.contact-link-icon {
  width: 36px; height: 36px;
  border-radius: 6px;
  background: var(--accent-soft);
  border: 1px solid var(--accent-glow);
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}

.contact-label {
  font-size: .7rem;
  letter-spacing: .08em;
  text-transform: uppercase;
  margin-bottom: 2px;
}

.contact-sublabel { font-size: .65rem; opacity: .6; }

.contact-form-col iframe {
  width: 100%;
  min-height: 440px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--bg-card);
}

/* ── FOOTER ─────────────────────────────────────────────────── */
footer {
  border-top: 1px solid var(--border);
  padding: 28px 64px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.68rem;
  color: var(--text-muted);
  letter-spacing: 0.06em;
}

.footer-links { display: flex; gap: 20px; }
.footer-links a {
  color: var(--text-muted);
  text-decoration: none;
  text-transform: uppercase;
  transition: color .2s;
}
.footer-links a:hover { color: var(--accent); }

/* ── RESPONSIVE ─────────────────────────────────────────────── */
@media (max-width: 800px) {
  body { flex-direction: column; overflow: auto; height: auto; }
  .sidebar { width: 100%; min-width: unset; border-right: none; border-bottom: 1px solid var(--border); padding: 28px 24px; }
  .main { overflow-y: visible; }
  .section { padding: 52px 24px; min-height: unset; }
  .contact-grid { grid-template-columns: 1fr; }
  footer { flex-direction: column; gap: 16px; padding: 24px; text-align: center; }
  .hero-title { font-size: 1.8rem; }
}