/* ================================================================
   EDUARDO MARTINS BARBOSA — Cybersecurity Portfolio
   Theme: Dark Purple/Red Cybersec
   ================================================================ */

/* ---------- CSS Variables ---------- */
:root {
  --bg-primary: #0a080f;
  --bg-secondary: #0d0b14;
  --bg-card: #12101a;
  --bg-card-hover: #1a1628;
  --accent-primary: #a855f7;   /* vivid purple */
  --accent-secondary: #f43f5e; /* rose red */
  --accent-dim: #7c3aed;       /* deep purple */
  --accent-red: #ef4444;       /* pure red */
  --text-primary: #e6edf3;
  --text-secondary: #8b949e;
  --text-muted: #6e7681;
  --border-color: #2a1f3d;
  --glow-primary: 0 0 10px rgba(168, 85, 247, .35), 0 0 40px rgba(168, 85, 247, .12);
  --glow-secondary: 0 0 10px rgba(244, 63, 94, .35), 0 0 40px rgba(244, 63, 94, .12);
  --glow-dim: 0 0 10px rgba(124, 58, 237, .35), 0 0 40px rgba(124, 58, 237, .12);
  --font-mono: 'JetBrains Mono', 'Fira Code', monospace;
  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  --radius: 8px;
  --transition: .3s ease;
}

/* ---------- Reset & Base ---------- */
*,
*::before,
*::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 70px;
}

body {
  font-family: var(--font-sans);
  background: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.7;
  overflow-x: hidden;
}

a {
  color: var(--accent-secondary);
  text-decoration: none;
  transition: color var(--transition);
}

a:hover { color: var(--accent-primary); }

ul { list-style: none; }
img { max-width: 100%; display: block; }

.container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 24px;
}

/* ---------- Selection ---------- */
::selection {
  background: var(--accent-primary);
  color: var(--bg-primary);
}

/* ---------- Scrollbar ---------- */
::-webkit-scrollbar { width: 8px; }
::-webkit-scrollbar-track { background: var(--bg-secondary); }
::-webkit-scrollbar-thumb {
  background: var(--accent-dim);
  border-radius: 4px;
}

/* ================================================================
   NAVBAR
   ================================================================ */
#navbar {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 1000;
  background: rgba(10, 8, 15, .88);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border-color);
  transition: box-shadow var(--transition);
}

#navbar.scrolled {
  box-shadow: 0 2px 20px rgba(168, 85, 247, .1);
}

.nav-container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
}

.nav-logo {
  font-family: var(--font-mono);
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--text-primary);
  letter-spacing: 2px;
}

.logo-bracket { color: var(--accent-primary); }

.nav-links {
  display: flex;
  gap: 28px;
}

.nav-links a {
  font-size: .85rem;
  font-weight: 500;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 1px;
  position: relative;
  padding: 4px 0;
}

.nav-links a::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--accent-primary), var(--accent-secondary));
  transition: width var(--transition);
  box-shadow: var(--glow-primary);
}

.nav-links a:hover,
.nav-links a.active {
  color: var(--accent-primary);
}

.nav-links a:hover::after,
.nav-links a.active::after {
  width: 100%;
}

/* Hamburger */
.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
}

.nav-toggle span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--text-primary);
  border-radius: 2px;
  transition: var(--transition);
}

.nav-toggle.open span:nth-child(1) {
  transform: rotate(45deg) translate(5px, 5px);
}

.nav-toggle.open span:nth-child(2) { opacity: 0; }

.nav-toggle.open span:nth-child(3) {
  transform: rotate(-45deg) translate(5px, -5px);
}

/* ================================================================
   HERO SECTION
   ================================================================ */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  overflow: hidden;
}

#particleCanvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
}

.hero-content {
  position: relative;
  z-index: 1;
  text-align: center;
  padding: 0 24px;
}

/* Terminal */
.terminal-window {
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius);
  max-width: 650px;
  margin: 0 auto 32px;
  text-align: left;
  overflow: hidden;
  box-shadow: 0 8px 32px rgba(0, 0, 0, .6), var(--glow-primary);
}

.terminal-header {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 16px;
  background: #130f1e;
  border-bottom: 1px solid var(--border-color);
}

.terminal-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
}

.terminal-dot.red { background: #ff5f57; }
.terminal-dot.yellow { background: #febc2e; }
.terminal-dot.green { background: #28c840; }

.terminal-title {
  font-family: var(--font-mono);
  font-size: .75rem;
  color: var(--text-muted);
  margin-left: 8px;
}

.terminal-body {
  padding: 20px;
  font-family: var(--font-mono);
  font-size: .9rem;
  line-height: 2;
}

.prompt { color: var(--accent-primary); }
.cmd { color: var(--accent-secondary); }

.terminal-output {
  color: var(--text-primary);
  padding-left: 20px;
  min-height: 1.6em;
}

.nmap-result {
  color: var(--accent-red);
  font-weight: 600;
}

.cmd-cursor {
  color: var(--accent-primary);
  animation: blink 1s step-end infinite;
}

@keyframes blink {
  50% { opacity: 0; }
}

/* Hero CTA */
.hero-cta {
  display: flex;
  gap: 16px;
  justify-content: center;
  flex-wrap: wrap;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 28px;
  border-radius: var(--radius);
  font-size: .9rem;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition);
  border: none;
  font-family: var(--font-sans);
}

.btn-primary {
  background: var(--accent-primary);
  color: var(--bg-primary);
  box-shadow: var(--glow-primary);
}

.btn-primary:hover {
  background: #c084fc;
  color: var(--bg-primary);
  transform: translateY(-2px);
  box-shadow: 0 0 20px rgba(168, 85, 247, .55);
}

.btn-outline {
  background: transparent;
  color: var(--accent-secondary);
  border: 1px solid var(--accent-secondary);
  box-shadow: var(--glow-secondary);
}

.btn-outline:hover {
  background: rgba(244, 63, 94, .1);
  color: var(--accent-secondary);
  transform: translateY(-2px);
}

.btn-full { width: 100%; justify-content: center; }

/* Scroll indicator */
.scroll-indicator {
  position: absolute;
  bottom: 32px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 1;
}

.scroll-arrow {
  width: 24px;
  height: 24px;
  border-right: 2px solid var(--accent-primary);
  border-bottom: 2px solid var(--accent-primary);
  transform: rotate(45deg);
  animation: scrollBounce 2s infinite;
  opacity: .6;
}

@keyframes scrollBounce {
  0%, 100% { transform: rotate(45deg) translateY(0); opacity: .6; }
  50% { transform: rotate(45deg) translateY(8px); opacity: 1; }
}

/* ================================================================
   SECTIONS COMMON
   ================================================================ */
.section {
  padding: 100px 0;
}

.section-alt {
  background: var(--bg-secondary);
}

.section-title {
  text-align: center;
  font-size: 2rem;
  font-weight: 700;
  margin-bottom: 60px;
  font-family: var(--font-mono);
}

.title-decoration {
  color: var(--accent-primary);
  font-weight: 400;
}

/* Animate on scroll: hidden by default */
[data-aos] {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity .6s ease, transform .6s ease;
}

[data-aos].visible {
  opacity: 1;
  transform: translateY(0);
}

/* ================================================================
   ABOUT
   ================================================================ */
.about-grid {
  display: grid;
  grid-template-columns: 260px 1fr;
  gap: 48px;
  align-items: start;
}

.avatar-frame {
  position: relative;
  width: 200px;
  height: 200px;
  margin: 0 auto;
}

.avatar-placeholder {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--accent-dim), var(--accent-secondary));
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 4rem;
  color: var(--bg-primary);
  border: 3px solid var(--accent-primary);
  box-shadow: var(--glow-primary);
}

.avatar-img {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
  object-position: center top;
  border: 3px solid var(--accent-primary);
  box-shadow: var(--glow-primary);
  display: block;
}

.avatar-glow {
  position: absolute;
  inset: -6px;
  border-radius: 50%;
  border: 2px solid transparent;
  background: conic-gradient(var(--accent-primary), var(--accent-secondary), var(--accent-dim), var(--accent-primary)) border-box;
  mask: linear-gradient(#fff 0 0) padding-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  animation: rotateGlow 4s linear infinite;
}

@keyframes rotateGlow {
  to { transform: rotate(360deg); }
}

.about-location {
  text-align: center;
  margin-top: 16px;
  color: var(--text-secondary);
  font-size: .85rem;
}

.about-intro {
  font-size: 1.1rem;
  margin-bottom: 16px;
}

.highlight {
  color: var(--accent-primary);
  font-weight: 600;
}

.about-text p {
  margin-bottom: 16px;
  color: var(--text-secondary);
}

.about-text strong {
  color: var(--text-primary);
}

.about-stats {
  display: flex;
  gap: 32px;
  margin-top: 32px;
  padding-top: 24px;
  border-top: 1px solid var(--border-color);
}

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

.stat-number {
  display: block;
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--accent-secondary);
  font-family: var(--font-mono);
}

.stat-label {
  font-size: .8rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 1px;
}

/* ================================================================
   SKILLS
   ================================================================ */
.skills-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 20px;
}

@media (max-width: 1024px) {
  .skills-grid { grid-template-columns: repeat(3, 1fr); }
}

@media (max-width: 640px) {
  .skills-grid { grid-template-columns: repeat(2, 1fr); }
}

.skill-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius);
  padding: 32px 24px;
  transition: all var(--transition);
  position: relative;
  overflow: hidden;
}

.skill-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 3px;
  background: linear-gradient(90deg, var(--accent-primary), var(--accent-secondary));
  opacity: 0;
  transition: opacity var(--transition);
}

.skill-card:hover {
  border-color: var(--accent-primary);
  transform: translateY(-4px);
  box-shadow: var(--glow-primary);
}

.skill-card:hover::before { opacity: 1; }

.skill-icon {
  font-size: 2rem;
  color: var(--accent-secondary);
  margin-bottom: 16px;
}

.skill-card h3 {
  font-size: 1rem;
  font-family: var(--font-mono);
  margin-bottom: 16px;
  color: var(--text-primary);
}

.skill-list li {
  padding: 6px 0;
  color: var(--text-secondary);
  font-size: .9rem;
  border-bottom: 1px solid rgba(42, 31, 61, .7);
  position: relative;
  padding-left: 16px;
}

.skill-list li::before {
  content: '>';
  position: absolute;
  left: 0;
  color: var(--accent-primary);
  font-family: var(--font-mono);
  font-size: .8rem;
}

.skill-list li:last-child { border-bottom: none; }

/* ================================================================
   CERTIFICATIONS
   ================================================================ */
.certs-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 24px;
}

.cert-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius);
  padding: 28px;
  display: flex;
  gap: 20px;
  align-items: flex-start;
  transition: all var(--transition);
  position: relative;
  overflow: hidden;
}

.cert-card:hover {
  border-color: var(--accent-secondary);
  transform: translateY(-4px);
  box-shadow: var(--glow-secondary);
}

.cert-badge {
  font-size: 2rem;
  color: var(--accent-secondary);
  flex-shrink: 0;
}

.cert-info h3 {
  font-size: .95rem;
  margin-bottom: 8px;
  line-height: 1.4;
}

.cert-issuer,
.cert-date {
  font-size: .8rem;
  color: var(--text-muted);
  margin-bottom: 4px;
}

.cert-issuer i,
.cert-date i {
  width: 16px;
  color: var(--accent-primary);
}

/* Cert groups */
.certs-groups {
  display: flex;
  flex-direction: column;
  gap: 40px;
}

.cert-group-label {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-mono);
  font-size: .8rem;
  font-weight: 600;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 1.5px;
  margin-bottom: 16px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--border-color);
}

.cert-group-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  flex-shrink: 0;
}

.cert-group-dot.ibsec      { background: var(--accent-primary); box-shadow: 0 0 6px rgba(168,85,247,.6); }
.cert-group-dot.cisco      { background: #1ba0d7; box-shadow: 0 0 6px rgba(27,160,215,.6); }
.cert-group-dot.google     { background: #ea4335; box-shadow: 0 0 6px rgba(234,67,53,.6); }
.cert-group-dot.hackershive{ background: var(--accent-red); box-shadow: 0 0 6px rgba(239,68,68,.6); }

/* Remove issuer line from cards (now shown in group label) */
.cert-issuer { display: none; }

.cert-glow {
  position: absolute;
  top: -50%;
  right: -50%;
  width: 100px;
  height: 100px;
  background: radial-gradient(circle, rgba(244, 63, 94, .08) 0%, transparent 70%);
  pointer-events: none;
}

.cert-card--badge {
  align-items: center;
}

.cert-badge-img {
  flex-shrink: 0;
  width: 72px;
  height: 72px;
}

.cert-badge-img img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  filter: drop-shadow(0 0 8px rgba(168, 85, 247, .4));
}

.cert-iso {
  display: inline-block;
  margin-top: 6px;
  font-size: .7rem;
  color: var(--accent-dim);
  font-family: var(--font-mono);
  letter-spacing: .5px;
}

.cert-tag-red {
  display: inline-block;
  margin-top: 6px;
  padding: 2px 10px;
  border-radius: 20px;
  font-size: .7rem;
  font-weight: 600;
  background: rgba(239, 68, 68, .15);
  color: var(--accent-red);
  border: 1px solid rgba(239, 68, 68, .35);
}

.cert-card--highlight {
  border-color: rgba(239, 68, 68, .25);
}

.cert-card--highlight:hover {
  border-color: var(--accent-red);
  box-shadow: var(--glow-secondary);
}

/* ================================================================
   EXPERIENCE (Timeline)
   ================================================================ */
.timeline {
  position: relative;
  padding-left: 40px;
}

.timeline::before {
  content: '';
  position: absolute;
  left: 14px;
  top: 0;
  bottom: 0;
  width: 2px;
  background: linear-gradient(180deg, var(--accent-primary), var(--accent-secondary), var(--accent-dim));
}

.timeline-item {
  position: relative;
  margin-bottom: 48px;
}

.timeline-item:last-child { margin-bottom: 0; }

.timeline-marker {
  position: absolute;
  left: -33px;
  top: 8px;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: var(--accent-primary);
  border: 3px solid var(--bg-primary);
  box-shadow: var(--glow-primary);
}

.timeline-content {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius);
  padding: 28px;
  transition: all var(--transition);
}

.timeline-content:hover {
  border-color: var(--accent-primary);
  box-shadow: var(--glow-primary);
}

.timeline-header { margin-bottom: 16px; }

.timeline-header h3 {
  font-size: 1.1rem;
  margin-bottom: 8px;
}

.timeline-company,
.timeline-date {
  display: block;
  font-size: .85rem;
  color: var(--text-muted);
  margin-bottom: 4px;
}

.timeline-company i,
.timeline-date i {
  width: 18px;
  color: var(--accent-primary);
}

.timeline-badge {
  display: inline-block;
  padding: 2px 12px;
  border-radius: 20px;
  font-size: .7rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-top: 8px;
}

.timeline-badge.active {
  background: rgba(168, 85, 247, .15);
  color: var(--accent-primary);
  border: 1px solid rgba(168, 85, 247, .35);
}

.timeline-details {
  list-style: none;
}

.timeline-details li {
  padding: 8px 0;
  font-size: .9rem;
  color: var(--text-secondary);
  border-bottom: 1px solid rgba(42, 31, 61, .5);
  padding-left: 16px;
  position: relative;
}

.timeline-details li::before {
  content: '$';
  position: absolute;
  left: 0;
  color: var(--accent-primary);
  font-family: var(--font-mono);
  font-size: .8rem;
}

.timeline-details li:last-child { border-bottom: none; }
.timeline-details li strong { color: var(--accent-secondary); }

/* ================================================================
   EDUCATION
   ================================================================ */
.education-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 24px;
}

.edu-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius);
  padding: 32px;
  text-align: center;
  transition: all var(--transition);
}

.edu-card:hover {
  border-color: var(--accent-dim);
  box-shadow: var(--glow-dim);
  transform: translateY(-4px);
}

.edu-icon {
  font-size: 2.5rem;
  color: var(--accent-dim);
  margin-bottom: 16px;
}

.edu-card h3 {
  font-size: 1rem;
  margin-bottom: 8px;
}

.edu-school {
  color: var(--text-muted);
  font-size: .9rem;
  margin-bottom: 8px;
}

.edu-period {
  color: var(--text-muted);
  font-size: .8rem;
  margin-bottom: 12px;
}

.edu-period i { color: var(--accent-primary); }

.edu-badge {
  display: inline-block;
  padding: 4px 16px;
  border-radius: 20px;
  font-size: .75rem;
  font-weight: 600;
  background: rgba(244, 63, 94, .12);
  color: var(--accent-secondary);
  border: 1px solid rgba(244, 63, 94, .3);
}

.edu-badge.completed {
  background: rgba(168, 85, 247, .12);
  color: var(--accent-primary);
  border-color: rgba(168, 85, 247, .3);
}

/* ================================================================
   PROJECTS
   ================================================================ */
.projects-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 24px;
}

.project-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius);
  padding: 28px;
  transition: all var(--transition);
  display: flex;
  flex-direction: column;
  gap: 14px;
  position: relative;
  overflow: hidden;
}

.project-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 3px;
  background: linear-gradient(90deg, var(--accent-dim), var(--accent-primary), var(--accent-secondary));
  opacity: 0;
  transition: opacity var(--transition);
}

.project-card:hover {
  border-color: var(--accent-primary);
  transform: translateY(-4px);
  box-shadow: var(--glow-primary);
}

.project-card:hover::before { opacity: 1; }

.project-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
}

.project-icon {
  font-size: 2rem;
  color: var(--accent-dim);
}

.project-links {
  display: flex;
  gap: 14px;
}

.project-link {
  color: var(--text-muted);
  font-size: 1.1rem;
  transition: all var(--transition);
}

.project-link:hover {
  color: var(--accent-primary);
  text-shadow: var(--glow-primary);
  transform: translateY(-2px);
}

.project-title {
  font-size: 1.05rem;
  font-family: var(--font-mono);
  color: var(--text-primary);
}

.project-desc {
  font-size: .9rem;
  color: var(--text-secondary);
  line-height: 1.6;
  flex: 1;
}

.project-tags {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 4px;
}

.project-card-add {
  border-style: dashed;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  min-height: 220px;
  gap: 12px;
  opacity: .45;
  cursor: default;
}

.project-card-add:hover {
  opacity: .7;
  border-color: var(--accent-primary);
  box-shadow: none;
  transform: none;
}

.project-card-add:hover::before { opacity: 0; }

.project-add-icon {
  font-size: 2.5rem;
  color: var(--accent-primary);
}

.project-add-text {
  color: var(--text-muted);
  font-size: .9rem;
  font-family: var(--font-mono);
}

/* ================================================================
   PROJECT FEATURED
   ================================================================ */
.project-featured {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius);
  padding: 36px;
  margin-bottom: 32px;
  position: relative;
  overflow: hidden;
  transition: border-color var(--transition);
}

.project-featured::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 3px;
  background: linear-gradient(90deg, var(--accent-dim), var(--accent-primary), var(--accent-secondary));
}

.project-featured:hover {
  border-color: var(--accent-primary);
  box-shadow: var(--glow-primary);
}

.project-featured-header {
  margin-bottom: 32px;
}

.project-featured-title-row {
  display: flex;
  align-items: flex-start;
  gap: 20px;
  margin-bottom: 20px;
  flex-wrap: wrap;
}

.project-icon-lg {
  font-size: 2.5rem;
  color: var(--accent-primary);
  flex-shrink: 0;
  margin-top: 4px;
}

.project-featured-label {
  font-family: var(--font-mono);
  font-size: .75rem;
  color: var(--accent-secondary);
  margin-bottom: 4px;
}

.project-featured-name {
  font-size: 1.5rem;
  font-family: var(--font-mono);
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 4px;
}

.project-featured-sub {
  font-size: .85rem;
  color: var(--text-muted);
}

.project-featured-links {
  display: flex;
  gap: 12px;
  margin-left: auto;
  flex-shrink: 0;
  align-self: flex-start;
}

.btn-sm {
  padding: 8px 16px;
  font-size: .8rem;
}

.project-featured-desc {
  color: var(--text-secondary);
  font-size: .95rem;
  line-height: 1.7;
  margin-bottom: 20px;
}

/* Screenshot do projeto featured */
.project-screenshot {
  margin: 20px 0;
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--border-color);
  position: relative;
}

.project-screenshot img {
  width: 100%;
  height: auto;
  display: block;
  transition: transform .4s ease;
}

.project-screenshot:hover img {
  transform: scale(1.02);
}

.project-screenshot-caption {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 8px 14px;
  background: rgba(10, 8, 15, .85);
  font-size: .75rem;
  font-family: var(--font-mono);
  color: var(--text-muted);
  backdrop-filter: blur(4px);
}

/* Galeria CTF no project card */
.project-ctf-gallery {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 6px;
  margin-bottom: 12px;
  border-radius: var(--radius);
  overflow: hidden;
}

.project-ctf-gallery img {
  width: 100%;
  height: 80px;
  object-fit: cover;
  display: block;
  transition: transform .3s ease, filter .3s ease;
  filter: brightness(.85);
  cursor: pointer;
}

.project-ctf-gallery img:hover {
  transform: scale(1.05);
  filter: brightness(1);
  z-index: 1;
  position: relative;
}

.project-card code {
  font-family: var(--font-mono);
  font-size: .82rem;
  color: var(--accent-primary);
  background: rgba(168, 85, 247, .1);
  padding: 1px 5px;
  border-radius: 3px;
}

/* Roadmap */
.project-roadmap {
  border-top: 1px solid var(--border-color);
  padding-top: 28px;
}

.roadmap-title {
  font-family: var(--font-mono);
  font-size: .95rem;
  color: var(--text-secondary);
  margin-bottom: 24px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.roadmap-title i { color: var(--accent-primary); }

.roadmap-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 16px;
}

.roadmap-item {
  display: flex;
  gap: 14px;
  align-items: flex-start;
  padding: 16px;
  border-radius: var(--radius);
  border: 1px solid transparent;
  transition: all var(--transition);
}

.roadmap-item.done {
  background: rgba(168, 85, 247, .05);
  border-color: rgba(168, 85, 247, .15);
}

.roadmap-item.active {
  background: rgba(244, 63, 94, .06);
  border-color: rgba(244, 63, 94, .25);
}

.roadmap-item.planned {
  background: rgba(42, 31, 61, .4);
  border-color: rgba(42, 31, 61, .8);
}

.roadmap-marker {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: .7rem;
  flex-shrink: 0;
}

.roadmap-item.done .roadmap-marker {
  background: rgba(168, 85, 247, .2);
  color: var(--accent-primary);
  border: 1px solid var(--accent-primary);
}

.roadmap-item.active .roadmap-marker {
  background: rgba(244, 63, 94, .2);
  color: var(--accent-secondary);
  border: 1px solid var(--accent-secondary);
  animation: pulse-red 2s infinite;
}

@keyframes pulse-red {
  0%, 100% { box-shadow: 0 0 0 0 rgba(244, 63, 94, .4); }
  50% { box-shadow: 0 0 0 6px rgba(244, 63, 94, 0); }
}

.roadmap-item.planned .roadmap-marker {
  background: rgba(110, 118, 129, .1);
  color: var(--text-muted);
  border: 1px solid rgba(110, 118, 129, .3);
}

.roadmap-content {
  flex: 1;
}

.roadmap-version {
  font-family: var(--font-mono);
  font-size: .7rem;
  font-weight: 700;
  margin-right: 8px;
}

.roadmap-item.done .roadmap-version { color: var(--accent-primary); }
.roadmap-item.active .roadmap-version { color: var(--accent-secondary); }
.roadmap-item.planned .roadmap-version { color: var(--text-muted); }

.roadmap-name {
  font-size: .85rem;
  font-weight: 600;
  color: var(--text-primary);
}

.roadmap-content p {
  font-size: .8rem;
  color: var(--text-muted);
  margin-top: 6px;
  line-height: 1.5;
}

/* ================================================================
   CTF & ACHIEVEMENTS
   ================================================================ */
.ctf-content {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 48px;
  align-items: center;
}

.ctf-highlight {
  display: flex;
  gap: 24px;
  align-items: flex-start;
}

.ctf-trophy {
  font-size: 3rem;
  color: #ffd700;
  flex-shrink: 0;
  text-shadow: 0 0 20px rgba(255, 215, 0, .4);
}

.ctf-details h3 {
  font-size: 1.4rem;
  margin-bottom: 4px;
}

.ctf-rank {
  font-family: var(--font-mono);
  font-size: 1.8rem;
  font-weight: 700;
  color: var(--accent-primary);
  text-shadow: var(--glow-primary);
  margin-bottom: 12px;
}

.ctf-date-label {
  font-size: .75rem;
  color: var(--text-muted);
  font-family: var(--font-mono);
  font-weight: 400;
  margin-left: 8px;
}

.ctf-stats {
  display: flex;
  gap: 24px;
  margin-bottom: 16px;
}

.ctf-stat {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.ctf-stat-val {
  font-family: var(--font-mono);
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--accent-secondary);
}

.ctf-stat-lbl {
  font-size: .7rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 1px;
}

.ctf-desc {
  color: var(--text-secondary);
  font-size: .9rem;
  margin-bottom: 16px;
  line-height: 1.7;
}

.ctf-tags {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.tag {
  padding: 4px 12px;
  border-radius: 20px;
  font-size: .75rem;
  font-weight: 500;
  background: rgba(124, 58, 237, .15);
  color: var(--accent-dim);
  border: 1px solid rgba(124, 58, 237, .3);
}

.ctf-ascii {
  color: var(--accent-primary);
  font-family: var(--font-mono);
  font-size: .7rem;
  opacity: .3;
  line-height: 1.3;
}

/* ================================================================
   CONTACT
   ================================================================ */
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
  align-items: start;
}

.contact-intro {
  font-size: 1.1rem;
  margin-bottom: 32px;
  color: var(--text-secondary);
}

.contact-links {
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin-bottom: 24px;
}

.contact-link {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius);
  color: var(--text-secondary);
  transition: all var(--transition);
  font-size: .9rem;
}

.contact-link i {
  font-size: 1.2rem;
  color: var(--accent-secondary);
  width: 24px;
  text-align: center;
}

.contact-link:hover {
  border-color: var(--accent-primary);
  color: var(--accent-primary);
  box-shadow: var(--glow-primary);
  transform: translateX(4px);
}

.contact-location {
  color: var(--text-muted);
  font-size: .85rem;
  display: flex;
  align-items: center;
  gap: 8px;
}

.contact-location i { color: var(--accent-primary); }

/* Contact Form */
.contact-form {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius);
  padding: 32px;
}

.form-group {
  margin-bottom: 20px;
}

.form-group label {
  display: block;
  font-size: .85rem;
  font-weight: 500;
  color: var(--text-secondary);
  margin-bottom: 6px;
  font-family: var(--font-mono);
}

.form-group input,
.form-group textarea {
  width: 100%;
  padding: 12px 16px;
  background: var(--bg-primary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius);
  color: var(--text-primary);
  font-family: var(--font-sans);
  font-size: .9rem;
  transition: border-color var(--transition), box-shadow var(--transition);
}

.form-group input:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--accent-primary);
  box-shadow: 0 0 0 3px rgba(168, 85, 247, .12);
}

.form-group textarea { resize: vertical; }

.form-note {
  text-align: center;
  font-size: .75rem;
  color: var(--text-muted);
  margin-top: 12px;
}

/* ================================================================
   FOOTER
   ================================================================ */
.footer {
  background: var(--bg-secondary);
  border-top: 1px solid var(--border-color);
  padding: 40px 0;
}

.footer-content {
  text-align: center;
}

.footer-logo {
  font-family: var(--font-mono);
  font-size: 1.2rem;
  font-weight: 700;
  margin-bottom: 16px;
}

.footer-socials {
  display: flex;
  justify-content: center;
  gap: 20px;
  margin-bottom: 16px;
}

.footer-socials a {
  font-size: 1.2rem;
  color: var(--text-muted);
  transition: all var(--transition);
}

.footer-socials a:hover {
  color: var(--accent-primary);
  text-shadow: var(--glow-primary);
}

.footer-copy {
  font-size: .8rem;
  color: var(--text-muted);
}

/* ================================================================
   BACK TO TOP
   ================================================================ */
.back-to-top {
  position: fixed;
  bottom: 32px;
  right: 32px;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--accent-primary);
  color: var(--bg-primary);
  border: none;
  cursor: pointer;
  font-size: 1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transform: translateY(10px);
  transition: all var(--transition);
  box-shadow: var(--glow-primary);
  z-index: 999;
}

.back-to-top.visible {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.back-to-top:hover {
  transform: translateY(-3px);
  box-shadow: 0 0 22px rgba(168, 85, 247, .65);
}

/* ================================================================
   GLITCH EFFECT (for typed name)
   ================================================================ */
@keyframes glitch {
  0%   { text-shadow: 2px 0 var(--accent-red), -2px 0 var(--accent-dim); }
  20%  { text-shadow: -2px 0 var(--accent-red), 2px 0 var(--accent-dim); }
  40%  { text-shadow: 2px 2px var(--accent-red), -2px -2px var(--accent-dim); }
  60%  { text-shadow: -1px 1px var(--accent-red), 1px -1px var(--accent-dim); }
  80%  { text-shadow: 1px -2px var(--accent-red), -1px 2px var(--accent-dim); }
  100% { text-shadow: 2px 0 var(--accent-red), -2px 0 var(--accent-dim); }
}

.glitch {
  animation: glitch .3s infinite;
  font-weight: 700;
}

/* ================================================================
   RESPONSIVE
   ================================================================ */

/* Tablet */
@media (max-width: 768px) {
  .nav-toggle { display: flex; }

  .nav-links {
    position: fixed;
    top: 64px;
    left: 0;
    width: 100%;
    background: rgba(10, 8, 15, .97);
    backdrop-filter: blur(16px);
    flex-direction: column;
    align-items: center;
    gap: 0;
    padding: 0;
    max-height: 0;
    overflow: hidden;
    transition: max-height .4s ease, padding .4s ease;
    border-bottom: 1px solid var(--border-color);
  }

  .nav-links.open {
    max-height: 450px;
    padding: 16px 0;
  }

  .nav-links li { width: 100%; text-align: center; }

  .nav-links a {
    display: block;
    padding: 12px 0;
    font-size: .95rem;
  }

  .about-grid {
    grid-template-columns: 1fr;
    text-align: center;
  }

  .about-stats {
    justify-content: center;
  }

  .ctf-content {
    grid-template-columns: 1fr;
  }

  .ctf-ascii { display: none; }

  .contact-grid {
    grid-template-columns: 1fr;
  }

  .section-title {
    font-size: 1.6rem;
  }

  .section { padding: 70px 0; }

  .terminal-body { font-size: .8rem; }
}

/* ================================================================
   LIGHTBOX
   ================================================================ */
.lightbox {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 10000;
  background: rgba(5, 3, 10, .95);
  backdrop-filter: blur(8px);
  align-items: center;
  justify-content: center;
}

.lightbox.open {
  display: flex;
}

.lightbox-content {
  position: relative;
  max-width: 90vw;
  max-height: 85vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
}

.lightbox-content img {
  max-width: 100%;
  max-height: 78vh;
  object-fit: contain;
  border-radius: var(--radius);
  border: 1px solid var(--border-color);
  box-shadow: 0 0 40px rgba(168, 85, 247, .2);
}

.lightbox-caption {
  font-family: var(--font-mono);
  font-size: .8rem;
  color: var(--text-secondary);
  text-align: center;
  max-width: 600px;
  padding: 0 12px;
}

.lightbox-close {
  position: fixed;
  top: 20px;
  right: 24px;
  background: rgba(168, 85, 247, .15);
  border: 1px solid rgba(168, 85, 247, .35);
  color: var(--text-primary);
  width: 40px;
  height: 40px;
  border-radius: 50%;
  font-size: 1rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all var(--transition);
  z-index: 10001;
}

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

.lightbox-prev,
.lightbox-next {
  position: fixed;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(168, 85, 247, .15);
  border: 1px solid rgba(168, 85, 247, .35);
  color: var(--text-primary);
  width: 44px;
  height: 44px;
  border-radius: 50%;
  font-size: 1rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all var(--transition);
  z-index: 10001;
}

.lightbox-prev { left: 16px; }
.lightbox-next { right: 16px; }

.lightbox-prev:hover,
.lightbox-next:hover {
  background: var(--accent-primary);
  color: var(--bg-primary);
}

.lightbox-counter {
  position: fixed;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  font-family: var(--font-mono);
  font-size: .75rem;
  color: var(--text-muted);
  background: rgba(10, 8, 15, .7);
  padding: 4px 12px;
  border-radius: 20px;
}

.lightbox-hint {
  font-size: .7rem;
  color: var(--accent-primary);
  opacity: .65;
  margin-left: 6px;
}

[data-lightbox] {
  cursor: zoom-in;
}

/* ================================================================
   PREFERS REDUCED MOTION
   ================================================================ */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }

  html { scroll-behavior: auto; }

  #particleCanvas { display: none; }
}

/* Mobile small */
@media (max-width: 480px) {
  .terminal-window { margin: 0 8px 24px; }
  .terminal-body { padding: 14px; font-size: .75rem; }
  .about-stats { flex-direction: column; gap: 16px; }

  .ctf-highlight {
    flex-direction: column;
    align-items: center;
    text-align: center;
  }

  .ctf-tags { justify-content: center; }

  .cert-card { flex-direction: column; text-align: center; }

  .hero-cta { flex-direction: column; align-items: center; }
  .hero-cta .btn { width: 100%; max-width: 260px; justify-content: center; }

  .section-title { font-size: 1.3rem; margin-bottom: 40px; }
}
