/* =============================================
   TOKENS — DARK MODE (default)
============================================= */
:root {
  --bg:          #08090a;
  --void:        #0d0f12;
  --surface:     #13161b;
  --border:      #1e2228;
  --muted:       #3a3f4a;
  --text-dim:    #7a8394;
  --text:        #c8cdd6;
  --white:       #eef0f4;
  --gold:        #c9a84c;
  --gold-glow:   rgba(201,168,76,0.18);
  --gold-dim:    rgba(201,168,76,0.06);
  --wave-a:      rgba(201,168,76,0.07);
  --wave-b:      rgba(80,120,200,0.05);
  --wave-c:      rgba(140,80,180,0.04);
  --gold-ring:   rgba(201,168,76,0.5);
  --on-gold:     #0a0802;
  --logo-ink:    #eef0f4;

  --font-display: 'Bebas Neue', sans-serif;
  --font-body:    'Inter', sans-serif;
  --font-mono:    'Space Mono', monospace;
  --ease-out:     cubic-bezier(0.16, 1, 0.3, 1);
}

/* =============================================
   TOKENS — LIGHT MODE
============================================= */
[data-theme="light"] {
  --bg:          #f5f0e8;
  --void:        #ede8de;
  --surface:     #faf7f2;
  --border:      #d8d0be;
  --muted:       #b0a898;
  --text-dim:    #7a7060;
  --text:        #3a3228;
  --white:       #1a1410;
  /* tudo o que é dourado no dark mode passa a Dark Forest Green */
  --gold:        #002D04;
  --gold-glow:   rgba(0,45,4,0.15);
  --gold-dim:    rgba(0,45,4,0.06);
  --gold-ring:   rgba(0,45,4,0.45);
  --on-gold:     #f5f0e8;
  --logo-ink:    #002D04;
  --wave-a:      rgba(0,45,4,0.08);
  --wave-b:      rgba(0,70,20,0.05);
  --wave-c:      rgba(0,45,4,0.04);
}

/* =============================================
   RESET & BASE
============================================= */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; font-size: 16px; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-weight: 300;
  line-height: 1.65;
  overflow-x: hidden;
  cursor: none;
  transition: background 0.4s, color 0.4s;
}

a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }
[hidden] { display: none !important; }

/* =============================================
   CURSOR
============================================= */
#cursor-dot {
  position: fixed;
  width: 8px; height: 8px;
  background: var(--gold);
  border-radius: 50%;
  pointer-events: none;
  z-index: 9999;
  transform: translate(-50%, -50%);
  transition: opacity 0.3s;
}

#cursor-ring {
  position: fixed;
  width: 36px; height: 36px;
  border: 1px solid var(--gold-ring);
  border-radius: 50%;
  pointer-events: none;
  z-index: 9998;
  transform: translate(-50%, -50%);
  transition: width 0.3s var(--ease-out), height 0.3s var(--ease-out), opacity 0.3s, border-color 0.3s;
}

body.cursor-hover #cursor-ring {
  width: 60px; height: 60px;
  border-color: var(--gold);
}

/* =============================================
   CONSTELLATION CANVAS
============================================= */
#constellation-canvas {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  opacity: 1;
}

/* =============================================
   NOISE OVERLAY
============================================= */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.035'/%3E%3C/svg%3E");
  pointer-events: none;
  z-index: 100;
}

/* =============================================
   NAV
============================================= */
nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 500;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1.5rem 4rem;
  transition: background 0.4s, backdrop-filter 0.4s, border-color 0.4s;
}

nav.scrolled {
  background: rgba(8,9,10,0.88);
  backdrop-filter: blur(18px);
  border-bottom: 1px solid var(--border);
}

[data-theme="light"] nav.scrolled {
  background: rgba(245,240,232,0.92);
}

.nav-logo {
  font-family: var(--font-display);
  font-size: 1.6rem;
  letter-spacing: 0.08em;
  color: var(--white);
}

.nav-logo span { color: var(--gold); }

.nav-links {
  display: flex;
  gap: 2.5rem;
  list-style: none;
  align-items: center;
}

.nav-links a {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--text-dim);
  transition: color 0.2s;
}

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

.nav-controls {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.ctrl-btn {
  font-family: var(--font-mono);
  font-size: 0.65rem;
  letter-spacing: 0.1em;
  background: none;
  border: 1px solid var(--border);
  color: var(--text-dim);
  padding: 0.3rem 0.6rem;
  cursor: none;
  transition: border-color 0.2s, color 0.2s;
}

.ctrl-btn.active,
.ctrl-btn:hover {
  border-color: var(--gold);
  color: var(--gold);
}

.theme-btn {
  width: 32px; height: 32px;
  display: flex; align-items: center; justify-content: center;
  font-size: 0.85rem;
  border: 1px solid var(--border);
  background: none;
  cursor: none;
  transition: border-color 0.2s, color 0.2s;
  color: var(--text-dim);
}

.theme-btn:hover { border-color: var(--gold); color: var(--gold); }

/* =============================================
   HERO
============================================= */
#hero {
  position: relative;
  min-height: 100vh;
  display: grid;
  grid-template-columns: 1fr 1fr;
  align-items: center;
  gap: 4rem;
  padding: 0 4rem;
  z-index: 1;
  overflow: hidden;
}

.hero-left { display: flex; flex-direction: column; }

.hero-eyebrow {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 1.5rem;
  opacity: 0;
  transform: translateY(20px);
  animation: fadeUp 0.8s var(--ease-out) 0.3s forwards;
  line-height: 1.6;
}

.hero-title {
  font-family: var(--font-display);
  font-size: clamp(4.5rem, 10vw, 11rem);
  line-height: 0.9;
  color: var(--white);
  letter-spacing: 0.02em;
  opacity: 0;
  transform: translateY(30px);
  animation: fadeUp 1s var(--ease-out) 0.5s forwards;
}

.hero-title .gold { color: var(--gold); }

.hero-sub {
  margin-top: 2rem;
  font-size: 1rem;
  font-weight: 300;
  color: var(--text-dim);
  line-height: 1.8;
  opacity: 0;
  transform: translateY(20px);
  animation: fadeUp 0.8s var(--ease-out) 0.8s forwards;
}

.hero-sub em {
  font-style: italic;
  color: var(--text);
  font-family: var(--font-mono);
  font-size: 0.9rem;
}

.hero-cta {
  margin-top: 2.5rem;
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
  opacity: 0;
  animation: fadeUp 0.8s var(--ease-out) 1s forwards;
}

/* RIGHT SIDE — stats card */
.hero-right {
  opacity: 0;
  animation: fadeUp 1s var(--ease-out) 0.7s forwards;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.hero-card {
  border: 1px solid var(--border);
  background: rgba(19,22,27,0.6);
  backdrop-filter: blur(12px);
  padding: 2rem;
  transition: border-color 0.3s;
}

[data-theme="light"] .hero-card {
  background: rgba(250,247,242,0.75);
}

.hero-card:hover { border-color: var(--gold); }

.hero-card-title {
  font-family: var(--font-mono);
  font-size: 0.6rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 1rem;
}

.hero-stats-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
}

.h-stat { text-align: center; }

.h-stat-num {
  font-family: var(--font-display);
  font-size: 2.8rem;
  color: var(--gold);
  line-height: 1;
}

.h-stat-lbl {
  font-family: var(--font-mono);
  font-size: 0.58rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-dim);
  margin-top: 0.3rem;
}

.hero-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.hero-tag {
  font-family: var(--font-mono);
  font-size: 0.6rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 0.35rem 0.8rem;
  border: 1px solid var(--border);
  color: var(--text-dim);
  transition: border-color 0.2s, color 0.2s;
}

.hero-tag:hover { border-color: var(--gold); color: var(--gold); }

.hero-scroll {
  position: absolute;
  bottom: 2.5rem;
  left: 4rem;
  display: flex;
  align-items: center;
  gap: 1rem;
  opacity: 0;
  animation: fadeIn 1s var(--ease-out) 1.5s forwards;
}

.scroll-line {
  width: 48px; height: 1px;
  background: var(--muted);
  position: relative; overflow: hidden;
}

.scroll-line::after {
  content: '';
  position: absolute;
  top: 0; left: -100%;
  width: 100%; height: 100%;
  background: var(--gold);
  animation: lineSlide 2s ease-in-out 2s infinite;
}

.scroll-label {
  font-family: var(--font-mono);
  font-size: 0.6rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--muted);
}

/* =============================================
   BUTTONS
============================================= */
.btn-primary {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  padding: 0.9rem 2rem;
  background: var(--gold);
  color: var(--on-gold);
  font-weight: 600;
  border: none;
  cursor: none;
  transition: background 0.2s, transform 0.2s;
  display: inline-block;
}

.btn-primary:hover { filter: brightness(1.1); transform: translateY(-2px); }

.btn-ghost {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  padding: 0.9rem 2rem;
  background: transparent;
  color: var(--text);
  border: 1px solid var(--border);
  cursor: none;
  transition: border-color 0.2s, color 0.2s, transform 0.2s;
  display: inline-block;
}

.btn-ghost:hover { border-color: var(--gold); color: var(--gold); transform: translateY(-2px); }

/* =============================================
   SECTION BASE
============================================= */
section {
  position: relative;
  z-index: 1;
  padding: 8rem 4rem;
}

.section-inner {
  max-width: 1280px;
  margin: 0 auto;
}

.section-label {
  font-family: var(--font-mono);
  font-size: 0.65rem;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 1rem;
  display: flex;
  align-items: center;
  gap: 1rem;
}

.section-label::after {
  content: '';
  flex: 0 0 40px; height: 1px;
  background: var(--gold);
  opacity: 0.4;
}

.section-title {
  font-family: var(--font-display);
  font-size: clamp(2.5rem, 5vw, 5rem);
  color: var(--white);
  line-height: 1;
  letter-spacing: 0.02em;
  margin-bottom: 3rem;
}

/* REVEAL */
.reveal {
  opacity: 0;
  transform: translateY(40px);
  transition: opacity 0.9s var(--ease-out), transform 0.9s var(--ease-out);
}

.reveal.visible { opacity: 1; transform: translateY(0); }

/* =============================================
   SOBRE
============================================= */
#sobre {
  background: var(--void);
  border-top: 1px solid var(--border);
}

.sobre-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6rem;
  align-items: start;
}

.sobre-text p {
  color: var(--text-dim);
  margin-bottom: 1.5rem;
  font-size: 1rem;
  line-height: 1.85;
}

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

.sobre-highlight {
  margin-top: 2rem;
  border-left: 2px solid var(--gold);
  padding-left: 1.5rem;
}

.sobre-highlight p {
  font-family: var(--font-mono);
  font-size: 0.85rem;
  font-style: italic;
  color: var(--text);
  margin-bottom: 0 !important;
}

.sobre-right { display: flex; flex-direction: column; gap: 1.5rem; }

.sobre-stats {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

.stat-card {
  border: 1px solid var(--border);
  padding: 1.5rem;
  background: var(--surface);
  transition: border-color 0.3s;
}

.stat-card:hover { border-color: var(--gold); }

.stat-number {
  font-family: var(--font-display);
  font-size: 3rem;
  color: var(--gold);
  line-height: 1;
}

.stat-label {
  font-family: var(--font-mono);
  font-size: 0.6rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--text-dim);
  margin-top: 0.4rem;
}

.sobre-education {
  border: 1px solid var(--border);
  background: var(--surface);
  padding: 1.5rem;
}

.sobre-education-title {
  font-family: var(--font-mono);
  font-size: 0.6rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 1rem;
}

.edu-item {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  padding: 0.75rem 0;
  border-bottom: 1px solid var(--border);
}

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

.edu-name {
  font-size: 0.85rem;
  color: var(--text);
  font-weight: 500;
}

.edu-org {
  font-family: var(--font-mono);
  font-size: 0.62rem;
  letter-spacing: 0.08em;
  color: var(--gold);
}

.edu-period {
  font-family: var(--font-mono);
  font-size: 0.6rem;
  color: var(--text-dim);
}

/* =============================================
   PROJETOS
============================================= */
#projetos { background: var(--bg); }

.projects-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1.25rem;
}

.project-card {
  position: relative;
  font: inherit;
  color: inherit;
  text-align: left;
  padding: 0;
  width: 100%;
  border: 1px solid var(--border);
  background: var(--surface);
  overflow: hidden;
  transition: border-color 0.3s, transform 0.3s var(--ease-out);
  cursor: none;
  display: flex;
  flex-direction: column;
}

.project-card:hover {
  border-color: var(--gold);
  transform: translateY(-4px);
}

/* IMAGE WRAPPER — always same ratio */
.project-thumb {
  width: 100%;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background: var(--void);
  position: relative;
  flex-shrink: 0;
}

.project-card:focus-visible { outline: 2px solid var(--gold); outline-offset: 3px; }

.project-thumb .media { transition: transform 0.5s var(--ease-out); }
.project-card:hover .project-thumb .media { transform: scale(1.05); }

/* MEDIA · imagens de projeto (cards e modal) */
.media {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

.media img {
  width: 100%; height: 100%;
  display: block;
  object-position: center;
}

.media--cover img { object-fit: cover; }

.media--contain { padding: 12% 14%; }
/* imagens com partes brancas que não são monocromáticas: fundo escuro nos dois temas */
.media--dark { background: #0d0f12; }
.media--contain img { object-fit: contain; }

/* logos monocromáticos (brancos): desenhados como máscara com a cor do tema,
   para não desaparecerem no light mode */
.media-mask {
  display: block;
  width: 100%; height: 100%;
  background: var(--logo-ink);
  -webkit-mask-repeat: no-repeat;
          mask-repeat: no-repeat;
  -webkit-mask-position: center;
          mask-position: center;
  -webkit-mask-size: contain;
          mask-size: contain;
  transition: background 0.4s;
}

.card-glow {
  position: absolute;
  width: 260px; height: 260px;
  border-radius: 50%;
  background: radial-gradient(circle, var(--gold-glow), transparent 70%);
  transform: translate(-50%, -50%);
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.3s;
  z-index: 0;
}
.project-card:hover .card-glow { opacity: 1; }
.project-thumb, .project-body { position: relative; z-index: 1; }

.project-tag {
  font-family: var(--font-mono);
  font-size: 0.55rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-dim);
  margin-bottom: -0.35rem;
}

.project-thumb-placeholder {
  width: 100%; height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, var(--void), var(--surface));
}

.project-thumb-placeholder span {
  font-family: var(--font-display);
  font-size: 3rem;
  color: var(--gold);
  opacity: 0.25;
  letter-spacing: 0.05em;
}

.project-body {
  padding: 1.25rem 1.5rem 1.5rem;
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  gap: 0.75rem;
}

.project-body .project-open { margin-top: auto; }

.project-title {
  display: block;
  font-family: var(--font-display);
  font-size: 1.5rem;
  color: var(--white);
  letter-spacing: 0.03em;
  line-height: 1.1;
}

.project-open {
  font-family: var(--font-mono);
  font-size: 0.6rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--gold);
  transition: letter-spacing 0.2s;
  display: inline-block;
}

.project-card:hover .project-open { letter-spacing: 0.2em; }

.pill {
  font-family: var(--font-mono);
  font-size: 0.55rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 0.25rem 0.55rem;
  border: 1px solid var(--gold);
  color: var(--gold);
  background: var(--gold-dim);
}

.project-pills {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}

#modal-pills {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}

/* =============================================
   MODAL
============================================= */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.85);
  backdrop-filter: blur(8px);
  z-index: 800;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s;
}

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

.modal {
  background: var(--surface);
  border: 1px solid var(--border);
  max-width: 760px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  transform: translateY(30px);
  transition: transform 0.3s var(--ease-out);
  position: relative;
}

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

.modal-gallery {
  width: 100%;
  aspect-ratio: 16 / 9;
  background: var(--void);
  overflow: hidden;
  position: relative;
}


.modal-gallery-placeholder {
  width: 100%; height: 100%;
  display: flex; align-items: center; justify-content: center;
  background: linear-gradient(135deg, var(--void), var(--surface));
}

.modal-gallery-placeholder span {
  font-family: var(--font-display);
  font-size: 5rem;
  color: var(--gold);
  opacity: 0.2;
}

/* gallery nav dots */
.gallery-dots {
  position: absolute;
  bottom: 0.75rem; left: 0; right: 0;
  display: flex;
  justify-content: center;
  gap: 0.5rem;
}

.gallery-dot {
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--muted);
  cursor: none;
  border: none;
  transition: background 0.2s;
}

.gallery-dot.active { background: var(--gold); }

.modal-prev, .modal-next {
  position: absolute;
  top: 50%; transform: translateY(-50%);
  background: rgba(0,0,0,0.5);
  border: none;
  color: var(--white);
  font-size: 1.2rem;
  padding: 0.75rem 1rem;
  cursor: none;
  transition: background 0.2s;
  z-index: 2;
}

.modal-prev { left: 0; }
.modal-next { right: 0; }
.modal-prev:hover, .modal-next:hover { background: var(--gold); color: var(--on-gold); }

.modal-body { padding: 2rem; }

.modal-tag {
  font-family: var(--font-mono);
  font-size: 0.6rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 0.5rem;
}

.modal-title {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: 2.5rem;
  line-height: 1.05;
  padding-right: 2.5rem;
  color: var(--white);
  letter-spacing: 0.03em;
  margin-bottom: 1rem;
}

.modal-desc {
  font-size: 0.95rem;
  color: var(--text-dim);
  line-height: 1.8;
  margin-bottom: 1.5rem;
}

.modal-footer {
  display: flex;
  gap: 1rem;
  align-items: center;
  flex-wrap: wrap;
  padding-top: 1.5rem;
  border-top: 1px solid var(--border);
}

.modal-close {
  position: absolute;
  top: 1rem; right: 1rem;
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--text-dim);
  width: 36px; height: 36px;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.1rem;
  cursor: none;
  transition: border-color 0.2s, color 0.2s;
  z-index: 3;
}

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

/* =============================================
   EXPERIÊNCIA
============================================= */
#experiencia {
  background: var(--void);
  border-top: 1px solid var(--border);
}

.exp-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
  align-items: start;
}

.timeline {
  position: relative;
  padding-left: 1.5rem;
}

.timeline::before {
  content: '';
  position: absolute;
  left: 0; top: 0; bottom: 0;
  width: 1px;
  background: linear-gradient(to bottom, var(--gold), transparent);
}

.timeline-item {
  position: relative;
  padding-left: 2rem;
  padding-bottom: 2.5rem;
}

.timeline-item::before {
  content: '';
  position: absolute;
  left: -1.5rem; top: 0.4rem;
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--gold);
  transform: translateX(-50%);
  box-shadow: 0 0 10px var(--gold);
}

.timeline-period {
  font-family: var(--font-mono);
  font-size: 0.62rem;
  letter-spacing: 0.15em;
  color: var(--gold);
  margin-bottom: 0.4rem;
}

.timeline-role {
  font-family: var(--font-display);
  font-size: 1.5rem;
  color: var(--white);
  letter-spacing: 0.03em;
  margin-bottom: 0.2rem;
}

.timeline-company {
  font-size: 0.82rem;
  color: var(--text-dim);
  margin-bottom: 0.6rem;
}

.timeline-desc {
  font-size: 0.88rem;
  color: var(--text-dim);
  line-height: 1.7;
}

/* right panel — key highlights */
.exp-highlights { display: flex; flex-direction: column; gap: 1rem; }

.exp-highlight-title {
  font-family: var(--font-mono);
  font-size: 0.6rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 0.5rem;
}

.highlight-card {
  border: 1px solid var(--border);
  background: var(--surface);
  padding: 1.25rem 1.5rem;
  transition: border-color 0.3s;
}

.highlight-card:hover { border-color: var(--gold); }

.highlight-card p {
  font-size: 0.88rem;
  color: var(--text-dim);
  line-height: 1.65;
}

.highlight-card p strong { color: var(--text); font-weight: 500; }

/* =============================================
   SKILLS
============================================= */
#skills { background: var(--bg); }

.skills-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
  align-items: start;
}

.skills-grid {
    align-items: start;
  grid-auto-rows: 1fr;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

.skill-group {
  border: 1px solid var(--border);
  padding: 1.5rem;
  background: var(--surface);
  transition: border-color 0.3s;
}

.skill-group:hover { border-color: var(--gold); }

.skill-group-title {
  font-family: var(--font-mono);
  font-size: 0.6rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 1rem;
}

.skill-list { list-style: none; display: flex; flex-direction: column; gap: 0.5rem; }

.skill-list li {
  font-size: 0.88rem;
  color: var(--text-dim);
  display: flex;
  align-items: flex-start;
  gap: 0.6rem;
  line-height: 1.4;
}

.skill-list li::before {
  content: '';
  display: inline-block;
  width: 4px; height: 4px;
  background: var(--gold);
  border-radius: 50%;
  flex-shrink: 0;
  margin-top: 0.45rem;
}

/* right side — languages + ai focus */
.skills-right { display: flex; flex-direction: column; gap: 1rem; }

.skills-right { display: flex; flex-direction: column; gap: 1rem; }

.lang-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.5rem;
}

.lang-card {
  border: 1px solid var(--border);
  padding: 0.75rem 1rem;
  background: var(--surface);
  text-align: center;
  transition: border-color 0.3s;
}

.lang-card:hover { border-color: var(--gold); }

.lang-name {
  font-family: var(--font-display);
  font-size: 1.1rem;
  color: var(--white);
  letter-spacing: 0.05em;
}

.lang-level {
  font-family: var(--font-mono);
  font-size: 0.55rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--gold);
  margin-top: 0.15rem;
}

.ai-focus-card {
  border: 1px solid var(--gold);
  background: var(--gold-dim);
  padding: 1.5rem;
}

.ai-focus-label {
  font-family: var(--font-mono);
  font-size: 0.6rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 0.75rem;
}

.ai-focus-title {
  font-family: var(--font-display);
  font-size: 1.8rem;
  color: var(--white);
  letter-spacing: 0.03em;
  margin-bottom: 0.5rem;
}

.ai-focus-desc {
  font-size: 0.85rem;
  color: var(--text-dim);
  line-height: 1.7;
}

/* =============================================
   CONTACTO
============================================= */
#contacto {
  background: var(--void);
  border-top: 1px solid var(--border);
}

.contacto-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6rem;
  align-items: start;
}

.contacto-left .section-label { justify-content: flex-start; }

.contact-desc {
  color: var(--text-dim);
  font-size: 1rem;
  line-height: 1.8;
  margin-bottom: 2.5rem;
}

.contact-links { display: flex; flex-direction: column; gap: 0.75rem; }

.contact-item {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  padding: 1.25rem 1.5rem;
  border: 1px solid var(--border);
  background: var(--surface);
  transition: border-color 0.3s, transform 0.3s var(--ease-out);
  cursor: none;
}

.contact-item:hover { border-color: var(--gold); transform: translateX(4px); }

.contact-item-label {
  font-family: var(--font-mono);
  font-size: 0.58rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--gold);
  min-width: 70px;
}

.contact-item-value {
  font-size: 0.88rem;
  color: var(--text);
}

.cv-download {
  margin-top: 1.5rem;
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  padding: 1rem 1.75rem;
  border: 1px solid var(--gold);
  background: var(--gold-dim);
  color: var(--gold);
  font-family: var(--font-mono);
  font-size: 0.7rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  cursor: none;
  transition: background 0.2s, transform 0.2s;
}

.cv-download:hover { background: var(--gold-glow); transform: translateY(-2px); }

.cv-download svg { width: 16px; height: 16px; stroke: var(--gold); fill: none; stroke-width: 2; }

/* contacto right — quick form placeholder */
.contacto-right { display: flex; flex-direction: column; gap: 1rem; }

.contact-note {
  font-family: var(--font-mono);
  font-size: 0.6rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 0.5rem;
}

.form-field { display: flex; flex-direction: column; gap: 0.4rem; }

.form-field label {
  font-family: var(--font-mono);
  font-size: 0.6rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--text-dim);
}

.form-field input,
.form-field textarea {
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 0.9rem;
  font-weight: 300;
  padding: 0.8rem 1rem;
  outline: none;
  transition: border-color 0.2s;
  resize: none;
  cursor: none;
}

.form-field input:focus,
.form-field textarea:focus { border-color: var(--gold); }

.form-field input::placeholder,
.form-field textarea::placeholder { color: var(--muted); }

/* =============================================
   FOOTER
============================================= */
footer {
  position: relative;
  z-index: 1;
  background: var(--bg);
  border-top: 1px solid var(--border);
  padding: 2rem 4rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.footer-copy {
  font-family: var(--font-mono);
  font-size: 0.62rem;
  letter-spacing: 0.1em;
  color: var(--muted);
}

.footer-admin {
  font-family: var(--font-mono);
  font-size: 0.62rem;
  letter-spacing: 0.1em;
  color: var(--muted);
  transition: color 0.2s;
}

.footer-admin:hover { color: var(--gold); }

/* =============================================
   KEYFRAMES
============================================= */
@keyframes fadeUp {
  to { opacity: 1; transform: translateY(0); }
}

@keyframes fadeIn {
  to { opacity: 1; }
}

@keyframes lineSlide {
  0%   { left: -100%; }
  50%  { left: 0%; }
  100% { left: 100%; }
}

/* ALERTS (contact form feedback) */
.alert {
  padding: 0.9rem 1.25rem;
  font-size: 0.88rem;
  border-left: 3px solid;
  margin-bottom: 1rem;
}

.alert-error   { background: rgba(192,57,43,0.1);  border-color: #c0392b; color: #e74c3c; }
.alert-success { background: rgba(39,174,96,0.1);  border-color: #27ae60; color: #2ecc71; }

/* =============================================
   SCROLLBAR
============================================= */
::-webkit-scrollbar { width: 4px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: var(--muted); }
::-webkit-scrollbar-thumb:hover { background: var(--gold); }

/* =============================================
   RESPONSIVE
============================================= */
@media (max-width: 1024px) {
  #hero { grid-template-columns: 1fr; padding-top: 8rem; }
  .hero-right { display: none; }
  .sobre-grid, .exp-grid, .skills-layout, .contacto-grid { grid-template-columns: 1fr; gap: 3rem; }
  .skills-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 768px) {
  nav { padding: 1.25rem 1.5rem; }
  .nav-links { display: none; }
  #hero, section, footer { padding-left: 1.5rem; padding-right: 1.5rem; }
  .skills-grid { grid-template-columns: 1fr; }
  .lang-grid { grid-template-columns: repeat(2, 1fr); }
  .hero-stats-row { grid-template-columns: repeat(3, 1fr); }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .reveal { opacity: 1; transform: none; }
}


/* ---- TIMELINE ANIMATION ---- */
.timeline::before {
  transform-origin: top;
  transform: scaleY(0);
  transition: transform 1.2s var(--ease-out);
}

.timeline:has(.timeline-visible)::before {
  transform: scaleY(1);
}

.timeline-item::before {
  transform: translateX(-50%) scale(0);
  transition: transform 0.4s var(--ease-out), box-shadow 0.4s;
}

.timeline-item.timeline-visible::before {
  transform: translateX(-50%) scale(1);
  animation: pulse-dot 2s ease-in-out 0.4s infinite;
}

.timeline-desc,
.timeline-role,
.timeline-period,
.timeline-company {
  opacity: 0;
  transform: translateX(-10px);
  transition: opacity 0.5s var(--ease-out), transform 0.5s var(--ease-out);
}

.timeline-item.timeline-visible .timeline-period  { opacity: 1; transform: translateX(0); transition-delay: 0.1s; }
.timeline-item.timeline-visible .timeline-role    { opacity: 1; transform: translateX(0); transition-delay: 0.2s; }
.timeline-item.timeline-visible .timeline-company { opacity: 1; transform: translateX(0); transition-delay: 0.3s; }
.timeline-item.timeline-visible .timeline-desc    { opacity: 1; transform: translateX(0); transition-delay: 0.4s; }

@keyframes pulse-dot {
  0%, 100% { box-shadow: 0 0 8px var(--gold); }
  50%       { box-shadow: 0 0 18px var(--gold), 0 0 30px var(--gold-glow); }
}

/* ---- SKILLS ANIMATION ---- */
.skill-list li {
  opacity: 0;
  transform: translateX(-8px);
  transition: opacity 0.4s var(--ease-out), transform 0.4s var(--ease-out);
}

.skill-list li.skill-item-visible {
  opacity: 1;
  transform: translateX(0);
}

.skill-group::before {
  content: '';
  position: absolute;
  inset: 0;
  border: 1px solid transparent;
  transition: border-color 0.3s;
  pointer-events: none;
}

.skill-group { position: relative; }

.skill-group:hover::before {
  border-color: var(--gold);
}

.skill-group:hover .skill-list li::before {
  animation: pulse-dot 1.2s ease-in-out infinite;
}

/* ---- JARVIS ---- */
.jarvis-wrap {
  position: relative;
  width: 100%;
  height: 520px;
  display: flex;
  flex-direction: column;
  border: 1px solid var(--border);
  background: var(--surface);
  overflow: hidden;
}

#jarvis-canvas {
  position: absolute;
  top: 0; left: 0;
  width: 100%; height: 60%;
  z-index: 0;
}

.jarvis-chat {
  position: absolute;
  bottom: 0; left: 0; right: 0;
  height: 52%;
  display: flex;
  flex-direction: column;
  border-top: 1px solid var(--border);
  background: rgba(13,15,18,0.92);
  backdrop-filter: blur(8px);
  z-index: 2;
}

.jarvis-messages {
  flex: 1;
  overflow-y: auto;
  padding: 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  scrollbar-width: thin;
  scrollbar-color: var(--muted) transparent;
}

.jarvis-msg {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  line-height: 1.6;
  max-width: 88%;
}

.jarvis-msg--bot {
  color: var(--gold);
  align-self: flex-start;
}

.jarvis-msg--user {
  color: var(--text);
  align-self: flex-end;
  text-align: right;
}

.jarvis-msg--bot .jarvis-cursor {
  color: var(--gold);
  font-weight: 600;
  margin-right: 0.4rem;
}

.jarvis-thinking {
  color: var(--muted);
  font-style: italic;
  font-family: var(--font-mono);
  font-size: 0.68rem;
  align-self: flex-start;
}

.jarvis-input-wrap {
  display: flex;
  border-top: 1px solid var(--border);
}

.jarvis-input-wrap input {
  flex: 1;
  background: transparent;
  border: none;
  color: var(--text);
  font-family: var(--font-mono);
  font-size: 0.72rem;
  padding: 0.75rem 1rem;
  outline: none;
}

.jarvis-input-wrap input::placeholder { color: var(--muted); }

.jarvis-input-wrap button {
  background: transparent;
  border: none;
  border-left: 1px solid var(--border);
  color: var(--gold);
  font-size: 1.1rem;
  padding: 0 1.25rem;
  cursor: none;
  transition: background 0.2s;
}

.jarvis-input-wrap button:hover { background: var(--gold-dim); }

[data-theme="light"] #jarvis-canvas {
  opacity: 0.85;
}

[data-theme="light"] .modal-overlay { background: rgba(40,36,28,0.55); }

[data-theme="light"] .jarvis-chat {
  background: rgba(245,240,232,0.92);
}

[data-theme="light"] .jarvis-msg--bot {
  color: var(--gold);
}

[data-theme="light"] .jarvis-input-wrap input {
  color: var(--text);
}
.jarvis-input-wrap button:disabled { opacity: 0.4; }
.jarvis-msg { white-space: pre-wrap; }

/* ---- DISPOSITIVOS TÁTEIS: cursor normal ---- */
@media (hover: none), (pointer: coarse) {
  body, .ctrl-btn, .theme-btn, .btn-primary, .btn-ghost, .project-card,
  .contact-item, .gallery-dot, .modal-prev, .modal-next, .modal-close,
  .jarvis-input-wrap button { cursor: auto; }
  #cursor-dot, #cursor-ring { display: none; }
}

@media (max-width: 600px) {
  .modal-overlay { padding: 0.75rem; }
  .modal-body { padding: 1.5rem; }
  .modal-title { font-size: 2rem; }
}

/* ---- TYPEWRITER (Sobre) ---- */
.typewriter { display: block; min-height: 1em; }
