/* ===== CSS VARIABLES ===== */
:root {
  /* Colors */
  --primary-color: #6366f1;
  --primary-dark: #4f46e5;
  --secondary-color: #8b5cf6;
  --accent-color: #06b6d4;
  --success-color: #10b981;
  --warning-color: #f59e0b;
  --error-color: #ef4444;
  
  /* Background Colors */
  --bg-primary: #0f172a;
  --bg-secondary: #1e293b;
  --bg-tertiary: #334155;
  --bg-card: #1e293b;
  --bg-overlay: rgba(15, 23, 42, 0.9);
  
  /* Text Colors */
  --text-primary: #f8fafc;
  --text-secondary: #cbd5e1;
  --text-muted: #64748b;
  
  /* Gradients */
  --gradient-primary: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
  --gradient-secondary: linear-gradient(135deg, var(--accent-color), var(--primary-color));
  --gradient-hero: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  
  /* Shadows */
  --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
  --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1);
  --shadow-glow: 0 0 20px rgba(99, 102, 241, 0.3);
  
  /* Typography */
  --font-primary: 'Inter', sans-serif;
  --font-mono: 'JetBrains Mono', monospace;
  
  /* Spacing */
  --spacing-xs: 0.25rem;
  --spacing-sm: 0.5rem;
  --spacing-md: 1rem;
  --spacing-lg: 1.5rem;
  --spacing-xl: 2rem;
  --spacing-2xl: 3rem;
  --spacing-3xl: 4rem;
  
  /* Border Radius */
  --radius-sm: 0.375rem;
  --radius-md: 0.5rem;
  --radius-lg: 0.75rem;
  --radius-xl: 1rem;
  --radius-full: 9999px;
  
  /* Transitions */
  --transition-fast: 0.15s ease-in-out;
  --transition-normal: 0.3s ease-in-out;
  --transition-slow: 0.5s ease-in-out;
  
  /* Z-index */
  --z-dropdown: 1000;
  --z-sticky: 1020;
  --z-fixed: 1030;
  --z-modal: 1040;
  --z-popover: 1050;
  --z-tooltip: 1060;
}

/* Light Theme */
[data-theme="light"] {
  --bg-primary: #ffffff;
  --bg-secondary: #f8fafc;
  --bg-tertiary: #e2e8f0;
  --bg-card: #ffffff;
  --bg-overlay: rgba(255, 255, 255, 0.9);
  
  --text-primary: #1e293b;
  --text-secondary: #475569;
  --text-muted: #64748b;
}

/* ===== RESET & BASE STYLES ===== */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  font-size: 16px;
  overflow-x: hidden;
  max-width: 100%;
}

body {
  font-family: var(--font-primary);
  background-color: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.6;
  overflow-x: hidden;
  max-width: 100%;
}

/* Custom Cursor */
.cursor {
  position: fixed;
  width: 20px;
  height: 20px;
  background: var(--gradient-primary);
  border-radius: 50%;
  pointer-events: none;
  z-index: var(--z-tooltip);
  transition: transform 0.1s ease;
  mix-blend-mode: difference;
}

/* ===== LOADING SCREEN ===== */
#loading-screen {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: var(--bg-primary);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 9999;
  opacity: 1;
  visibility: visible;
  transition: opacity 0.5s ease, visibility 0.5s ease;
  overflow: hidden;
}

.loader {
  text-align: center;
}

.loader-text {
  font-size: clamp(1.1rem, 5vw, 1.5rem);
  font-weight: 600;
  margin-bottom: var(--spacing-lg);
  background: var(--gradient-primary);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  white-space: normal;
  word-wrap: break-word;
  max-width: 90vw;
  text-align: center;
}

.loader-bar {
  width: min(200px, 80vw);
  height: 4px;
  background: var(--bg-tertiary);
  border-radius: var(--radius-full);
  overflow: hidden;
}

.loader-progress {
  height: 100%;
  background: var(--gradient-primary);
  border-radius: var(--radius-full);
  animation: loading 2s ease-in-out;
}

@keyframes loading {
  0% { width: 0%; }
  100% { width: 100%; }
}

/* ===== SCROLL PROGRESS ===== */
.scroll-progress {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 4px;
  z-index: var(--z-fixed);
}

.scroll-progress-bar {
  height: 100%;
  background: var(--gradient-primary);
  width: 0%;
  transition: width 0.1s ease;
}

/* ===== NAVIGATION ===== */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  background: var(--bg-overlay);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--bg-tertiary);
  z-index: var(--z-fixed);
  transition: all var(--transition-normal);
}

.navbar.scrolled {
  background: var(--bg-secondary);
  box-shadow: var(--shadow-lg);
}

.nav-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 var(--spacing-lg);
  display: flex;
  justify-content: space-between;
  align-items: center;
  height: 70px;
}

.nav-logo {
  font-size: 1.5rem;
  font-weight: 700;
  text-decoration: none;
  color: var(--text-primary);
  display: flex;
  align-items: center;
}

.logo-text {
  background: var(--gradient-primary);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.logo-dot {
  color: var(--primary-color);
  margin-left: 2px;
}

.nav-menu {
  display: flex;
  list-style: none;
  gap: var(--spacing-xl);
}

.nav-link {
  text-decoration: none;
  color: var(--text-secondary);
  font-weight: 500;
  position: relative;
  transition: color var(--transition-normal);
}

.nav-link:hover,
.nav-link.active {
  color: var(--primary-color);
}

.nav-link::after {
  content: '';
  position: absolute;
  bottom: -5px;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--gradient-primary);
  transition: width var(--transition-normal);
}

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

.nav-toggle {
  display: none;
  flex-direction: column;
  cursor: pointer;
  gap: 4px;
}

.bar {
  width: 25px;
  height: 3px;
  background: var(--text-primary);
  transition: all var(--transition-normal);
}

.theme-toggle {
  background: none;
  border: 2px solid var(--bg-tertiary);
  color: var(--text-secondary);
  width: 40px;
  height: 40px;
  border-radius: var(--radius-full);
  cursor: pointer;
  transition: all var(--transition-normal);
  display: flex;
  align-items: center;
  justify-content: center;
}

.theme-toggle:hover {
  border-color: var(--primary-color);
  color: var(--primary-color);
}

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

.hero-background {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: var(--gradient-hero);
  opacity: 0.1;
}

.particles {
  position: absolute;
  width: 100%;
  height: 100%;
}

.particle {
  position: absolute;
  background: var(--primary-color);
  border-radius: 50%;
  opacity: 0.6;
  animation: float 6s ease-in-out infinite;
}

@keyframes float {
  0%, 100% { transform: translateY(0px); }
  50% { transform: translateY(-20px); }
}

.hero-content {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 var(--spacing-lg);
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--spacing-3xl);
  align-items: center;
}

.hero-text {
  z-index: 2;
}

.hero-title {
  font-size: clamp(2.5rem, 5vw, 4rem);
  font-weight: 700;
  line-height: 1.2;
  margin-bottom: var(--spacing-lg);
}

.highlight {
  background: var(--gradient-primary);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero-subtitle {
  font-size: 1.5rem;
  font-weight: 500;
  margin-bottom: var(--spacing-lg);
  color: var(--text-secondary);
  min-height: 2em;
}

.cursor-blink {
  animation: blink 1s infinite;
}

@keyframes blink {
  0%, 50% { opacity: 1; }
  51%, 100% { opacity: 0; }
}

.hero-description {
  font-size: 1.125rem;
  color: var(--text-muted);
  margin-bottom: var(--spacing-2xl);
  max-width: 500px;
}

.hero-buttons {
  display: flex;
  gap: var(--spacing-lg);
  flex-wrap: wrap;
}

.hero-image {
  display: flex;
  justify-content: center;
  z-index: 2;
}

.image-container {
  position: relative;
  width: 300px;
  height: 300px;
}

.profile-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: var(--radius-xl);
  border: 4px solid var(--primary-color);
  box-shadow: var(--shadow-glow);
}

.image-glow {
  position: absolute;
  top: -20px;
  left: -20px;
  right: -20px;
  bottom: -20px;
  background: var(--gradient-primary);
  border-radius: var(--radius-xl);
  z-index: -1;
  opacity: 0.3;
  filter: blur(20px);
}

.scroll-indicator {
  position: absolute;
  bottom: var(--spacing-xl);
  left: 50%;
  transform: translateX(-50%);
  z-index: 2;
}

.scroll-arrow {
  width: 40px;
  height: 40px;
  border: 2px solid var(--text-muted);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  animation: bounce 2s infinite;
  cursor: pointer;
  transition: all var(--transition-normal);
}

.scroll-arrow:hover {
  border-color: var(--primary-color);
  color: var(--primary-color);
}

@keyframes bounce {
  0%, 20%, 50%, 80%, 100% { transform: translateY(0); }
  40% { transform: translateY(-10px); }
  60% { transform: translateY(-5px); }
}

/* ===== BUTTONS ===== */
.btn {
  display: inline-flex;
  align-items: center;
  gap: var(--spacing-sm);
  padding: var(--spacing-md) var(--spacing-xl);
  border: none;
  border-radius: var(--radius-lg);
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  transition: all var(--transition-normal);
  position: relative;
  overflow: hidden;
}

.btn-primary {
  background: var(--gradient-primary);
  color: white;
  box-shadow: var(--shadow-lg);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-xl);
}

.btn-outline {
  background: transparent;
  color: var(--primary-color);
  border: 2px solid var(--primary-color);
}

.btn-outline:hover {
  background: var(--primary-color);
  color: white;
}

/* ===== SECTIONS ===== */
.container {
  max-width: 1200px;
  width: 100%;
  margin: 0 auto;
  padding: 0 var(--spacing-lg);
  box-sizing: border-box;
}

section {
  padding: var(--spacing-3xl) 0;
}

.section-header {
  text-align: center;
  margin-bottom: var(--spacing-3xl);
}

.section-title {
  font-size: clamp(2rem, 4vw, 3rem);
  font-weight: 700;
  margin-bottom: var(--spacing-md);
  background: var(--gradient-primary);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.section-subtitle {
  font-size: 1.125rem;
  color: var(--text-muted);
  max-width: 600px;
  margin: 0 auto;
}

/* ===== ABOUT SECTION ===== */
.about {
  background: var(--bg-secondary);
}

.about-content {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--spacing-3xl);
  align-items: center;
}

.about-text p {
  font-size: 1.125rem;
  color: var(--text-secondary);
  margin-bottom: var(--spacing-lg);
  text-align: justify;
    text-justify: inter-word;
}

.about-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--spacing-lg);
  margin-top: var(--spacing-2xl);
}

.stat {
  text-align: center;
  padding: var(--spacing-lg);
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  border: 1px solid var(--bg-tertiary);
}

.stat-number {
  display: block;
  font-size: 2rem;
  font-weight: 700;
  color: var(--primary-color);
  margin-bottom: var(--spacing-sm);
}

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

.about-image {
  display: flex;
  justify-content: center;
}

.image-wrapper {
  position: relative;
  width: 400px;
  height: 500px;
  border-radius: var(--radius-xl);
  overflow: hidden;
  box-shadow: var(--shadow-xl);
}

.image-wrapper img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform var(--transition-slow);
}

.image-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: var(--bg-overlay);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity var(--transition-normal);
}

.image-wrapper:hover .image-overlay {
  opacity: 1;
}

.image-wrapper:hover img {
  transform: scale(1.1);
}

.overlay-content {
  text-align: center;
  color: white;
}

.overlay-content i {
  font-size: 3rem;
  margin-bottom: var(--spacing-md);
  color: var(--primary-color);
}

/* ===== SKILLS SECTION ===== */
.skills-content {
  max-width: 800px;
  margin: 0 auto;
}

.skills-categories {
  display: grid;
  gap: var(--spacing-2xl);
}

.skill-category h3 {
  font-size: 1.5rem;
  font-weight: 600;
  margin-bottom: var(--spacing-lg);
  color: var(--primary-color);
}

.skills-list {
  display: grid;
  gap: var(--spacing-lg);
}

.skill-item {
  background: var(--bg-card);
  padding: var(--spacing-lg);
  border-radius: var(--radius-lg);
  border: 1px solid var(--bg-tertiary);
}

.skill-info {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: var(--spacing-sm);
}

.skill-name {
  font-weight: 600;
  color: var(--text-primary);
}

.skill-percentage {
  font-weight: 600;
  color: var(--primary-color);
}

.skill-bar {
  height: 8px;
  background: var(--bg-tertiary);
  border-radius: var(--radius-full);
  overflow: hidden;
}

.skill-progress {
  height: 100%;
  background: var(--gradient-primary);
  border-radius: var(--radius-full);
  width: 0%;
  transition: width 1s ease-in-out;
}

/* ===== EXPERIENCE SECTION ===== */
.experience {
  background: var(--bg-secondary);
}

.timeline {
  max-width: 800px;
  margin: 0 auto;
  position: relative;
}

.timeline::before {
  content: '';
  position: absolute;
  left: 50%;
  top: 0;
  bottom: 0;
  width: 2px;
  background: var(--gradient-primary);
  transform: translateX(-50%);
}

.timeline-item {
  position: relative;
  margin-bottom: var(--spacing-3xl);
  display: flex;
  align-items: center;
}

.timeline-item:nth-child(odd) {
  flex-direction: row-reverse;
}

.timeline-dot {
  width: 20px;
  height: 20px;
  background: var(--gradient-primary);
  border-radius: 50%;
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  z-index: 2;
  box-shadow: 0 0 0 4px var(--bg-secondary);
}

.timeline-content {
  background: var(--bg-card);
  padding: var(--spacing-xl);
  border-radius: var(--radius-lg);
  border: 1px solid var(--bg-tertiary);
  width: calc(50% - 40px);
  box-shadow: var(--shadow-lg);
}

.timeline-item:nth-child(odd) .timeline-content {
  margin-right: auto;
  margin-left: 40px;
}

.timeline-item:nth-child(even) .timeline-content {
  margin-left: auto;
  margin-right: 40px;
}

.timeline-content h3 {
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--primary-color);
  margin-bottom: var(--spacing-xs);
}

.timeline-content h4 {
  font-size: 1rem;
  font-weight: 500;
  color: var(--text-secondary);
  margin-bottom: var(--spacing-sm);
}

.timeline-date {
  font-size: 0.875rem;
  color: var(--text-muted);
  font-weight: 500;
  display: block;
  margin-bottom: var(--spacing-md);
}

.timeline-content p {
  color: var(--text-secondary);
  line-height: 1.6;
}

/* ===== PROJECTS SECTION ===== */
.projects-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
  gap: var(--spacing-2xl);
}

.project-card {
  background: var(--bg-card);
  border-radius: var(--radius-xl);
  overflow: hidden;
  border: 1px solid var(--bg-tertiary);
  transition: all var(--transition-normal);
  box-shadow: var(--shadow-lg);
}

.project-card:hover {
  transform: translateY(-10px);
  box-shadow: var(--shadow-xl);
}

.project-image {
  position: relative;
  height: 250px;
  overflow: hidden;
}

.project-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform var(--transition-slow);
}

.project-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: var(--bg-overlay);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity var(--transition-normal);
}

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

.project-card:hover .project-image img {
  transform: scale(1.1);
}

.project-links {
  display: flex;
  gap: var(--spacing-lg);
}

.project-link {
  width: 50px;
  height: 50px;
  background: var(--gradient-primary);
  color: white;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  transition: transform var(--transition-normal);
}

.project-link:hover {
  transform: scale(1.1);
}

.project-content {
  padding: var(--spacing-xl);
}

.project-content h3 {
  font-size: 1.25rem;
  font-weight: 600;
  margin-bottom: var(--spacing-md);
  color: var(--text-primary);
}

.project-content p {
  color: var(--text-secondary);
  margin-bottom: var(--spacing-lg);
  line-height: 1.6;
}

.project-tech {
  display: flex;
  flex-wrap: wrap;
  gap: var(--spacing-sm);
}

.tech-tag {
  background: var(--bg-tertiary);
  color: var(--text-secondary);
  padding: var(--spacing-xs) var(--spacing-md);
  border-radius: var(--radius-full);
  font-size: 0.875rem;
  font-weight: 500;
}

/* ===== CONTACT SECTION ===== */
.contact {
  background: var(--bg-secondary);
}

.contact-content {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--spacing-3xl);
}

.contact-info h3 {
  font-size: 1.5rem;
  font-weight: 600;
  margin-bottom: var(--spacing-md);
  color: var(--text-primary);
}

.contact-info p {
  color: var(--text-secondary);
  margin-bottom: var(--spacing-2xl);
  line-height: 1.6;
}

.contact-items {
  margin-bottom: var(--spacing-2xl);
}

.contact-item {
  display: flex;
  align-items: center;
  gap: var(--spacing-lg);
  margin-bottom: var(--spacing-lg);
  padding: var(--spacing-lg);
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  border: 1px solid var(--bg-tertiary);
}

.contact-icon {
  width: 50px;
  height: 50px;
  background: var(--gradient-primary);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 1.25rem;
}

.contact-details h4 {
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: var(--spacing-xs);
}

.contact-details p {
  color: var(--text-secondary);
  margin: 0;
}

.social-links {
  display: flex;
  gap: var(--spacing-md);
}

.social-link {
  width: 50px;
  height: 50px;
  background: var(--bg-card);
  border: 2px solid var(--bg-tertiary);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-secondary);
  text-decoration: none;
  transition: all var(--transition-normal);
  font-size: 1.25rem;
}

.social-link:hover {
  background: var(--gradient-primary);
  border-color: var(--primary-color);
  color: white;
  transform: translateY(-2px);
}

.social-links--form { display: none; margin-top: 1.5rem; }

.contact-form {
  background: var(--bg-card);
  padding: var(--spacing-2xl);
  border-radius: var(--radius-xl);
  border: 1px solid var(--bg-tertiary);
  box-shadow: var(--shadow-lg);
}

.form-group {
  margin-bottom: var(--spacing-lg);
}

.form-group label {
  display: block;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: var(--spacing-sm);
}

.form-group input,
.form-group textarea {
  width: 100%;
  padding: var(--spacing-md);
  background: var(--bg-secondary);
  border: 2px solid var(--bg-tertiary);
  border-radius: var(--radius-lg);
  color: var(--text-primary);
  font-family: inherit;
  transition: border-color var(--transition-normal);
}

.form-group input:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--primary-color);
}

.form-group textarea {
  resize: vertical;
  min-height: 120px;
}

/* ===== FOOTER ===== */
.footer {
  background: var(--bg-primary);
  border-top: 1px solid var(--bg-tertiary);
  padding: var(--spacing-xl) 0;
}

.footer-content {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: var(--spacing-lg);
}

.footer-text p {
  color: var(--text-muted);
  margin: 0;
}

.footer-links {
  display: flex;
  gap: var(--spacing-lg);
}

.footer-links a {
  color: var(--text-muted);
  text-decoration: none;
  transition: color var(--transition-normal);
}

.footer-links a:hover {
  color: var(--primary-color);
}

/* ===== BACK TO TOP ===== */
.back-to-top {
  position: fixed;
  bottom: var(--spacing-xl);
  right: var(--spacing-xl);
  width: 50px;
  height: 50px;
  background: var(--gradient-primary);
  color: white;
  border: none;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
  opacity: 0;
  visibility: hidden;
  transition: all var(--transition-normal);
  z-index: var(--z-fixed);
  box-shadow: var(--shadow-lg);
}

.back-to-top.visible {
  opacity: 1;
  visibility: visible;
}

.back-to-top:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-xl);
}

/* ===== RESPONSIVE DESIGN ===== */
@media (max-width: 1024px) {
  .hero-content {
    grid-template-columns: 1fr;
    text-align: center;
    gap: var(--spacing-2xl);
  }
  
  .about-content {
    grid-template-columns: 1fr;
    gap: var(--spacing-2xl);
  }
  
  .contact-content {
    grid-template-columns: 1fr;
    gap: var(--spacing-2xl);
  }
  
  .timeline::before {
    left: 20px;
  }
  
  .timeline-item {
    flex-direction: row !important;
  }
  
  .timeline-dot {
    left: 20px;
    transform: translateX(-50%);
  }
  
  .timeline-content {
    width: calc(100% - 60px);
    margin-left: 60px !important;
    margin-right: 0 !important;
  }
}

@media (max-width: 768px) {
  .nav-menu {
    position: fixed;
    left: -100%;
    top: 70px;
    flex-direction: column;
    background-color: var(--bg-secondary);
    width: 100%;
    text-align: center;
    transition: 0.3s;
    box-shadow: var(--shadow-lg);
    padding: var(--spacing-xl) 0;
  }
  
  .nav-menu.active {
    left: 0;
  }
  
  .nav-toggle {
    display: flex;
  }
  
  .nav-toggle.active .bar:nth-child(2) {
    opacity: 0;
  }
  
  .nav-toggle.active .bar:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
  }
  
  .nav-toggle.active .bar:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
  }
  
  .hero-buttons {
    justify-content: center;
  }
  
  .about-stats {
    grid-template-columns: 1fr;
  }
  
  .projects-grid {
    grid-template-columns: 1fr;
  }
  
  .skills-categories {
    gap: var(--spacing-xl);
  }
}

@media (max-width: 480px) {
  .nav-container {
    padding: 0 var(--spacing-md);
  }
  
  .container {
    padding: 0 var(--spacing-md);
  }
  
  .hero-buttons {
    flex-direction: column;
    align-items: center;
  }
  
  .btn {
    width: 100%;
    justify-content: center;
  }
  
  .contact-form {
    padding: var(--spacing-lg);
  }
  
  .footer-content {
    flex-direction: column;
    text-align: center;
  }
}

/* ===== ANIMATIONS ===== */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes fadeInLeft {
  from {
    opacity: 0;
    transform: translateX(-30px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes fadeInRight {
  from {
    opacity: 0;
    transform: translateX(30px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

/* ===== UTILITY CLASSES ===== */
.text-center { text-align: center; }
.text-left { text-align: left; }
.text-right { text-align: right; }

.hidden { display: none; }
.visible { display: block; }

.fade-in { animation: fadeInUp 0.6s ease-out; }
.fade-in-left { animation: fadeInLeft 0.6s ease-out; }
.fade-in-right { animation: fadeInRight 0.6s ease-out; }

/* ===== ACCESSIBILITY ===== */
@media (prefers-reduced-motion: reduce) {
  * {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* Focus styles for keyboard navigation */
a:focus,
button:focus,
input:focus,
textarea:focus {
  outline: 2px solid var(--primary-color);
  outline-offset: 2px;
}

/* High contrast mode support */
@media (prefers-contrast: high) {
  :root {
    --bg-primary: #000000;
    --bg-secondary: #1a1a1a;
    --text-primary: #ffffff;
    --primary-color: #00ff00;
  }
}

.certificates-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
    padding: 20px 0;
}

.certificate-card {
    background: rgba(255, 255, 255, 0.05); /* Fundo levemente visível */
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    display: flex;
    align-items: center;
    padding: 20px;
    text-decoration: none;
    transition: all 0.3s ease;
}

.certificate-card:hover {
    background: rgba(255, 255, 255, 0.1);
    transform: translateY(-5px);
    border-color: #6c5ce7; /* Cor de destaque */
}

.card-icon {
    font-size: 2.5rem;
    color: #ff7675; /* Vermelho PDF mais elegante */
    margin-right: 20px;
}

.card-info h3 {
    font-size: 1.1rem;
    color: #fff;
    margin-bottom: 5px;
}

.card-info p {
    font-size: 0.9rem;
    color: #ccc;
    margin-bottom: 10px;
}

.btn-view {
    font-size: 0.8rem;
    color: #6c5ce7;
    font-weight: bold;
    text-transform: uppercase;
}

/* Criando o ícone personalizado da 7You */
.icon-7you {
    display: inline-block;
    width: 20px; /* Mesma largura dos ícones do FontAwesome */
    height: 20px;
    background-color: currentColor; /* Faz o ícone herdar a cor do texto/link */
    mask: url('https://7you.app/assets/images/logo-icon.png') no-repeat center;
    -webkit-mask: url('https://7you.app/assets/images/logo-icon.png') no-repeat center;
    mask-size: contain;
    -webkit-mask-size: contain;
    vertical-align: middle;
}

/* Efeito de hover para combinar com o resto do seu site */
.social-icon:hover .icon-7you {
    background-color: var(--primary-color); /* Ou a cor que você usa no hover do LinkedIn */
}

.link-branco {
    color: #ffffff !important; /* Força a cor branca */
    text-decoration: none;     /* Remove o sublinhado se desejar */
    transition: opacity 0.3s;
}

.link-branco:hover {
    color: var(--primary-color) !important; /* Muda de cor ao passar o mouse para manter o feedback */
    opacity: 0.8;
}

/* =========================================
   REMOÇÃO DE CURSOR CUSTOMIZADO NO MOBILE
   ========================================= */
@media (max-width: 768px) {
    /* Oculta a bolinha personalizada */
    .cursor, 
    .cursor-dot, 
    .cursor-outline { 
        display: none !important; 
    }

    /* Garante que o navegador use o sistema de toque padrão */
    * {
        cursor: auto !important;
    }
}

/* =========================================
   CORREÇÃO DE RESPONSIVIDADE E VISIBILIDADE
   ========================================= */

/* Força links de projetos a serem visíveis */
.project-tech a, .project-tech a:visited {
    color: #ffffff !important; /* Branco forçado */
    text-decoration: underline;
}

/* Responsividade Mobile (Celulares) */
@media (max-width: 768px) {
    /* TIMELINE: Transforma em lista vertical simples */
    .timeline::before {
        left: 20px; /* Linha encosta na esquerda */
    }
    
    .timeline-item {
        flex-direction: column !important; /* Empilha verticalmente */
        align-items: flex-start;
        margin-bottom: 40px;
    }
    
    .timeline-dot {
        left: 20px; /* Bolinha na esquerda */
        transform: translateX(-50%);
    }
    
    /* Remove as margens alternadas que quebravam o layout */
    .timeline-item:nth-child(odd) .timeline-content,
    .timeline-item:nth-child(even) .timeline-content {
        width: calc(100% - 50px); /* Ocupa a largura toda menos o espaço da bolinha */
        margin-left: 50px !important;
        margin-right: 0 !important;
        text-align: left; /* Garante texto alinhado à esquerda */
    }

    /* GRID: Garante 1 coluna no celular */
    .certificates-grid, .projects-grid {
        grid-template-columns: 1fr; /* Uma coluna só */
        padding: 0 10px;
    }
    
    /* TEXTO: Ajuste de tamanho para não estourar */
    .section-title {
        font-size: 2rem;
    }
}/* ================================================================
   ROGER ALMEIDA — PORTFOLIO CSS
   Versão corrigida: mobile-first, sem duplicações, responsivo
   ================================================================ */

/* ===== CSS VARIABLES ===== */
:root {
  --primary-color: #6366f1;
  --primary-dark:  #4f46e5;
  --secondary-color: #8b5cf6;
  --accent-color:  #06b6d4;
  --success-color: #10b981;
  --error-color:   #ef4444;

  --bg-primary:   #0f172a;
  --bg-secondary: #1e293b;
  --bg-tertiary:  #334155;
  --bg-card:      #1e293b;
  --bg-overlay:   rgba(15, 23, 42, 0.9);

  --text-primary:   #f8fafc;
  --text-secondary: #cbd5e1;
  --text-muted:     #64748b;

  --gradient-primary: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
  --gradient-hero:    linear-gradient(135deg, #0f172a 0%, #1e1b4b 100%);

  --shadow-sm:   0 1px 2px rgba(0,0,0,.05);
  --shadow-md:   0 4px 6px -1px rgba(0,0,0,.1);
  --shadow-lg:   0 10px 15px -3px rgba(0,0,0,.1);
  --shadow-xl:   0 20px 25px -5px rgba(0,0,0,.15);
  --shadow-glow: 0 0 20px rgba(99,102,241,.3);

  --font-primary: 'Inter', sans-serif;
  --font-mono:    'JetBrains Mono', monospace;

  --spacing-xs:  0.25rem;
  --spacing-sm:  0.5rem;
  --spacing-md:  1rem;
  --spacing-lg:  1.5rem;
  --spacing-xl:  2rem;
  --spacing-2xl: 3rem;
  --spacing-3xl: 4rem;

  --radius-sm:   0.375rem;
  --radius-md:   0.5rem;
  --radius-lg:   0.75rem;
  --radius-xl:   1rem;
  --radius-full: 9999px;

  --transition-fast:   0.15s ease-in-out;
  --transition-normal: 0.3s ease-in-out;
  --transition-slow:   0.5s ease-in-out;

  --z-fixed:  1030;
  --z-modal:  1040;
  --z-cursor: 9999;

  --nav-height: 70px;
}

/* Light Theme */
[data-theme="light"] {
  --bg-primary:   #ffffff;
  --bg-secondary: #f8fafc;
  --bg-tertiary:  #e2e8f0;
  --bg-card:      #ffffff;
  --bg-overlay:   rgba(255,255,255,0.9);
  --text-primary:   #1e293b;
  --text-secondary: #475569;
  --text-muted:     #64748b;
  --gradient-hero: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%);
}

/* ===== RESET ===== */
*, *::before, *::after { margin:0; padding:0; box-sizing:border-box; }
html { scroll-behavior: smooth; font-size: 16px; }
body {
  font-family: var(--font-primary);
  background: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.6;
  overflow-x: hidden;
  transition: background-color 0.3s, color 0.3s;
}
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; }
button { font-family: inherit; }

/* Anti-overflow horizontal global */
html, body { max-width: 100%; overflow-x: hidden; }
*, *::before, *::after { min-width: 0; }

/* ===== CUSTOM CURSOR (desktop only) ===== */
@media (pointer: fine) {
  body { cursor: none; }
  .cursor {
    position: fixed;
    width: 20px; height: 20px;
    background: var(--gradient-primary);
    border-radius: 50%;
    pointer-events: none;
    z-index: var(--z-cursor);
    transition: transform 0.1s ease;
    mix-blend-mode: difference;
    top: 0; left: 0;
  }
}
@media (pointer: coarse) { .cursor { display: none; } }

/* ===== LOADING SCREEN ===== */
#loading-screen {
  position: fixed; inset: 0;
  width: 100vw; height: 100vh;
  background: var(--bg-primary);
  display: flex; align-items: center; justify-content: center;
  z-index: 9999;
  transition: opacity 0.5s ease, visibility 0.5s ease;
  overflow: hidden;
}
#loading-screen.hidden { opacity: 0; visibility: hidden; }
.loader { text-align: center; }
.loader-text {
  font-size: clamp(1.1rem, 5vw, 1.5rem); font-weight: 700;
  margin-bottom: var(--spacing-lg);
  background: var(--gradient-primary);
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent;
  white-space: normal;
  word-wrap: break-word;
  max-width: 90vw;
  text-align: center;
}
.loader-bar {
  width: min(200px, 80vw); height: 4px;
  background: var(--bg-tertiary);
  border-radius: var(--radius-full); overflow: hidden;
}
.loader-progress {
  height: 100%; background: var(--gradient-primary);
  border-radius: var(--radius-full);
  animation: loading 2s ease-in-out forwards;
}
@keyframes loading { from { width: 0 } to { width: 100% } }

/* ===== SCROLL PROGRESS ===== */
.scroll-progress {
  position: fixed; top: 0; left: 0; width: 100%; height: 4px;
  z-index: var(--z-fixed); background: transparent;
}
.scroll-progress-bar {
  height: 100%; background: var(--gradient-primary);
  width: 0; transition: width 0.1s linear;
}

/* ===== NAVIGATION ===== */
.navbar {
  position: fixed; top: 0; left: 0; width: 100%;
  z-index: var(--z-fixed);
  background: var(--bg-overlay);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--bg-tertiary);
  transition: all var(--transition-normal);
}
.navbar.scrolled {
  background: var(--bg-secondary);
  box-shadow: var(--shadow-lg);
}
.nav-container {
  max-width: 1200px; margin: 0 auto;
  padding: 0 var(--spacing-lg);
  height: var(--nav-height);
  display: flex; align-items: center; justify-content: space-between;
}
.nav-logo {
  font-size: 1.5rem; font-weight: 700;
  text-decoration: none; color: var(--text-primary);
  display: flex; align-items: center;
  flex-shrink: 0;
}
.logo-text {
  background: var(--gradient-primary);
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent;
}
.logo-dot { color: var(--primary-color); margin-left: 2px; }

.nav-menu {
  display: flex; list-style: none;
  gap: var(--spacing-xl);
  align-items: center;
}
.nav-link {
  text-decoration: none; color: var(--text-secondary);
  font-weight: 500; font-size: 0.95rem;
  position: relative; white-space: nowrap;
  transition: color var(--transition-normal);
}
.nav-link::after {
  content: ''; position: absolute;
  bottom: -4px; left: 0;
  width: 0; height: 2px;
  background: var(--gradient-primary);
  transition: width var(--transition-normal);
}
.nav-link:hover, .nav-link.active { color: var(--primary-color); }
.nav-link:hover::after, .nav-link.active::after { width: 100%; }

.nav-actions { display: flex; align-items: center; gap: var(--spacing-md); }

.theme-toggle {
  background: none; border: 2px solid var(--bg-tertiary);
  color: var(--text-secondary);
  width: 40px; height: 40px; border-radius: var(--radius-full);
  cursor: pointer; display: flex; align-items: center; justify-content: center;
  transition: all var(--transition-normal); flex-shrink: 0;
}
.theme-toggle:hover { border-color: var(--primary-color); color: var(--primary-color); }

.nav-toggle {
  display: none; flex-direction: column;
  cursor: pointer; gap: 5px; padding: 4px;
  flex-shrink: 0;
}
.bar {
  width: 24px; height: 2px;
  background: var(--text-primary);
  border-radius: 2px;
  transition: all var(--transition-normal);
}
.nav-toggle.active .bar:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle.active .bar:nth-child(2) { opacity: 0; }
.nav-toggle.active .bar:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ===== HERO ===== */
.hero {
  min-height: 100svh;
  display: flex; align-items: center;
  position: relative; overflow: hidden;
  padding-top: var(--nav-height);
  background: var(--gradient-hero);
}
.hero-background {
  position: absolute; inset: 0; z-index: 0;
}
.particles { position: absolute; width: 100%; height: 100%; }
.particle {
  position: absolute; background: var(--primary-color);
  border-radius: 50%; opacity: 0.5;
  animation: float 6s ease-in-out infinite;
}
@keyframes float {
  0%, 100% { transform: translateY(0); }
  50%       { transform: translateY(-18px); }
}

.hero-content {
  position: relative; z-index: 1;
  width: 100%; max-width: 1200px;
  margin: 0 auto; padding: var(--spacing-xl) var(--spacing-lg);
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--spacing-3xl);
  align-items: center;
  box-sizing: border-box;
}
/* Desktop: texto à esquerda, imagem à direita */
.hero-text  { order: 1; }
.hero-image { order: 2; }

.hero-title {
  font-size: clamp(2rem, 5vw, 3.75rem);
  font-weight: 700; line-height: 1.15;
  margin-bottom: var(--spacing-md);
}
.highlight {
  background: var(--gradient-primary);
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent;
}
.hero-subtitle {
  font-size: clamp(1rem, 2.5vw, 1.4rem);
  font-weight: 500; color: var(--text-secondary);
  margin-bottom: var(--spacing-lg);
  font-family: var(--font-mono);
  min-height: 2em;
}
.cursor-blink { animation: blink 1s step-end infinite; color: var(--primary-color); }
@keyframes blink { 50% { opacity: 0; } }

.hero-description {
  font-size: 1.05rem; color: var(--text-muted);
  margin-bottom: var(--spacing-xl);
  max-width: 480px; line-height: 1.7;
}
.hero-buttons {
  display: flex; gap: var(--spacing-md);
  flex-wrap: wrap;
}

.hero-image {
  display: flex; justify-content: center; align-items: center;
}
.image-container {
  position: relative;
  width: clamp(220px, 35vw, 320px);
  height: clamp(220px, 35vw, 320px);
}
.profile-image {
  width: 100%; height: 100%; object-fit: cover;
  border-radius: var(--radius-xl);
  border: 4px solid var(--primary-color);
  box-shadow: var(--shadow-glow);
  position: relative; z-index: 2;
}
.image-glow {
  position: absolute; inset: -16px;
  background: var(--gradient-primary);
  border-radius: var(--radius-xl);
  z-index: 1; filter: blur(24px); opacity: 0.35;
}

.scroll-indicator {
  position: absolute; bottom: var(--spacing-lg); left: 50%;
  transform: translateX(-50%); z-index: 2;
}
.scroll-arrow {
  width: 40px; height: 40px;
  border: 2px solid var(--text-muted);
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  color: var(--text-muted);
  animation: bounce-arrow 2s infinite;
  cursor: pointer;
}
@keyframes bounce-arrow {
  0%, 100% { transform: translateY(0); }
  50%       { transform: translateY(-8px); }
}

/* ===== BUTTONS ===== */
.btn {
  display: inline-flex; align-items: center; gap: var(--spacing-sm);
  padding: 0.8rem 1.75rem;
  border: none; border-radius: var(--radius-lg);
  font-weight: 600; font-size: 0.95rem;
  text-decoration: none; cursor: pointer;
  transition: all var(--transition-normal);
  white-space: nowrap;
}
.btn-primary {
  background: var(--gradient-primary); color: #fff;
  box-shadow: 0 4px 15px rgba(99,102,241,.4);
}
.btn-primary:hover { transform: translateY(-2px); box-shadow: var(--shadow-xl); }
.btn-outline {
  background: transparent; color: var(--primary-color);
  border: 2px solid var(--primary-color);
}
.btn-outline:hover { background: var(--primary-color); color: #fff; }
.btn-full { width: 100%; justify-content: center; }

/* ===== GENERAL SECTIONS ===== */
.container { max-width: 1200px; width: 100%; margin: 0 auto; padding: 0 var(--spacing-lg); box-sizing: border-box; }
section { padding: var(--spacing-3xl) 0; }
.section-header { text-align: center; margin-bottom: var(--spacing-3xl); }
.section-title {
  font-size: clamp(1.75rem, 4vw, 2.75rem);
  font-weight: 700; margin-bottom: var(--spacing-sm);
  background: var(--gradient-primary);
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent;
}
.section-subtitle { font-size: 1rem; color: var(--text-muted); }

/* ===== ABOUT ===== */
.about { background: var(--bg-secondary); }
.about-content {
  display: grid; grid-template-columns: 1fr 1fr;
  gap: var(--spacing-3xl); align-items: center;
}
.about-text p {
  font-size: 1rem; color: var(--text-secondary);
  margin-bottom: var(--spacing-lg);
  text-align: justify; text-justify: inter-word;
}
.about-stats {
  display: grid; grid-template-columns: repeat(3,1fr);
  gap: var(--spacing-md); margin-top: var(--spacing-xl);
}
.stat {
  text-align: center; padding: var(--spacing-lg);
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  border: 1px solid var(--bg-tertiary);
}
.stat-number {
  display: block; font-size: 2rem; font-weight: 700;
  color: var(--primary-color); margin-bottom: var(--spacing-xs);
}
.stat-label { font-size: 0.8rem; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.5px; }

.about-image { display: flex; justify-content: center; }
.image-wrapper {
  position: relative;
  width: 100%; max-width: 400px;
  border-radius: var(--radius-xl); overflow: hidden;
  box-shadow: var(--shadow-xl);
}
.image-wrapper img {
  width: 100%; height: 100%;
  object-fit: cover;
  transition: transform var(--transition-slow);
}
.image-overlay {
  position: absolute; inset: 0;
  background: var(--bg-overlay);
  display: flex; align-items: center; justify-content: center;
  opacity: 0; transition: opacity var(--transition-normal);
}
.image-wrapper:hover .image-overlay { opacity: 1; }
.image-wrapper:hover img { transform: scale(1.08); }
.overlay-content { text-align: center; color: #fff; }
.overlay-content i { font-size: 2.5rem; color: var(--primary-color); margin-bottom: var(--spacing-sm); }

/* ===== PROJECTS ===== */
.projects-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(300px, 100%), 1fr));
  gap: var(--spacing-xl);
}
.project-card {
  background: var(--bg-card);
  border-radius: var(--radius-xl); overflow: hidden;
  border: 1px solid var(--bg-tertiary);
  box-shadow: var(--shadow-lg);
  transition: all var(--transition-normal);
  display: flex; flex-direction: column;
}
.project-card:hover { transform: translateY(-8px); box-shadow: var(--shadow-xl); border-color: var(--primary-color); }

.project-image {
  position: relative; height: 200px; overflow: hidden;
  background: var(--bg-tertiary);
}
.project-image img {
  width: 100%; height: 100%; object-fit: cover;
  transition: transform var(--transition-slow);
}
.project-card:hover .project-image img { transform: scale(1.08); }
.project-overlay {
  position: absolute; inset: 0;
  background: var(--bg-overlay);
  display: flex; align-items: center; justify-content: center;
  opacity: 0; transition: opacity var(--transition-normal);
}
.project-card:hover .project-overlay { opacity: 1; }
.project-links { display: flex; gap: var(--spacing-md); }
.project-link {
  width: 48px; height: 48px;
  background: var(--gradient-primary); color: #fff;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  text-decoration: none; font-size: 1.1rem;
  transition: transform var(--transition-normal);
  cursor: pointer; border: none;
}
.project-link:hover { transform: scale(1.12); }

.project-content {
  padding: var(--spacing-lg);
  display: flex; flex-direction: column; gap: var(--spacing-sm);
  flex: 1;
}
.project-content h3 { font-size: 1.1rem; font-weight: 600; color: var(--text-primary); }
.project-content > p { color: var(--text-secondary); font-size: 0.9rem; line-height: 1.6; flex: 1; }
.project-tech { display: flex; flex-wrap: wrap; gap: 6px; }
.tech-tag {
  background: var(--bg-tertiary); color: var(--text-secondary);
  padding: 3px 10px; border-radius: var(--radius-full);
  font-size: 0.78rem; font-weight: 500;
}
.project-cta {
  display: inline-flex; align-items: center; gap: 6px;
  color: var(--primary-color); font-size: 0.85rem; font-weight: 600;
  text-decoration: none; margin-top: var(--spacing-xs);
  transition: gap var(--transition-fast);
}
.project-cta:hover { gap: 10px; }

/* Card futuro */
.project-card--future { border-style: dashed; }
.project-image--future {
  height: 200px; background: var(--bg-tertiary);
  display: flex; align-items: center; justify-content: center;
}
.future-icon { font-size: 3rem; color: var(--primary-color); opacity: 0.6; }

/* ===== SKILLS ===== */
.skills-content { max-width: 900px; margin: 0 auto; }
.skills-categories { display: grid; gap: var(--spacing-xl); }
.skill-category {
  background: var(--bg-card);
  border: 1px solid var(--bg-tertiary);
  border-radius: var(--radius-xl);
  padding: var(--spacing-xl);
}
.skill-category h3 {
  font-size: 1.1rem; font-weight: 600; margin-bottom: var(--spacing-lg);
  color: var(--primary-color);
}
.skills-list { display: grid; gap: var(--spacing-md); }
.skill-item {
  padding: var(--spacing-md);
  background: var(--bg-secondary);
  border-radius: var(--radius-lg);
  border: 1px solid var(--bg-tertiary);
}
.skill-info {
  display: flex; justify-content: space-between; align-items: center;
  margin-bottom: var(--spacing-sm);
}
.skill-name { font-weight: 500; color: var(--text-primary); font-size: 0.9rem; }
.skill-percentage { font-weight: 600; color: var(--primary-color); font-size: 0.9rem; }
.skill-bar {
  height: 7px; background: var(--bg-tertiary);
  border-radius: var(--radius-full); overflow: hidden;
}
.skill-progress {
  height: 100%; background: var(--gradient-primary);
  border-radius: var(--radius-full);
  width: 0; transition: width 1.2s ease-in-out;
}

/* ===== CERTIFICATES ===== */
.certificates { background: var(--bg-secondary); }
.certificates-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: var(--spacing-xl);
}
.certificate-card {
  background: var(--bg-card);
  border: 1px solid rgba(255,255,255,0.07);
  border-radius: var(--radius-xl);
  display: flex; align-items: center;
  gap: var(--spacing-lg); padding: var(--spacing-xl);
  text-decoration: none;
  transition: all var(--transition-normal);
}
.certificate-card:hover {
  background: var(--bg-tertiary);
  transform: translateY(-4px);
  border-color: var(--primary-color);
  box-shadow: var(--shadow-lg);
}
.card-icon { font-size: 2.5rem; color: #ff6b6b; flex-shrink: 0; }
.card-info h3 { font-size: 1rem; color: var(--text-primary); margin-bottom: 4px; font-weight: 600; }
.card-info p  { font-size: 0.85rem; color: var(--text-muted); margin-bottom: 8px; }
.btn-view {
  font-size: 0.8rem; color: var(--primary-color);
  font-weight: 700; text-transform: uppercase;
  display: inline-flex; align-items: center; gap: 5px;
  letter-spacing: 0.5px;
}

/* ===== EXPERIENCE / TIMELINE ===== */
.experience { background: var(--bg-primary); }

/* ===== CONTACT ===== */
.contact { background: var(--bg-secondary); }
.contact-content {
  display: grid; grid-template-columns: 1fr 1fr;
  gap: var(--spacing-3xl);
}
.contact-info h3 { font-size: 1.4rem; font-weight: 600; margin-bottom: var(--spacing-sm); color: var(--text-primary); }
.contact-info > p { color: var(--text-secondary); margin-bottom: var(--spacing-xl); line-height: 1.6; font-size: 0.95rem; }
.contact-items { display: flex; flex-direction: column; gap: var(--spacing-md); margin-bottom: var(--spacing-xl); }
.contact-item {
  display: flex; align-items: flex-start; gap: var(--spacing-md);
  padding: var(--spacing-md);
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  border: 1px solid var(--bg-tertiary);
}
.contact-icon {
  width: 44px; height: 44px; flex-shrink: 0;
  background: var(--gradient-primary); border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  color: #fff; font-size: 1.1rem;
}
.contact-details h4 { font-weight: 600; color: var(--text-primary); font-size: 0.9rem; margin-bottom: 2px; }
.contact-details p  { color: var(--text-secondary); margin: 0; font-size: 0.875rem; }
.contact-link {
  color: var(--text-secondary); font-size: 0.875rem;
  text-decoration: none; word-break: break-all;
  transition: color var(--transition-normal);
}
.contact-link:hover { color: var(--primary-color); }

.social-links { display: flex; gap: var(--spacing-md); flex-wrap: wrap; }
.social-link {
  width: 46px; height: 46px;
  background: var(--bg-card); border: 2px solid var(--bg-tertiary);
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  color: var(--text-secondary); text-decoration: none;
  font-size: 1.2rem;
  transition: all var(--transition-normal);
}
.social-link:hover {
  background: var(--gradient-primary); border-color: var(--primary-color);
  color: #fff; transform: translateY(-2px);
}

.contact-form {
  background: var(--bg-card); padding: var(--spacing-2xl);
  border-radius: var(--radius-xl);
  border: 1px solid var(--bg-tertiary);
  box-shadow: var(--shadow-lg);
}
.form-group { margin-bottom: var(--spacing-lg); }
.form-group label { display: block; font-weight: 600; color: var(--text-primary); margin-bottom: var(--spacing-sm); font-size: 0.9rem; }
.form-group input,
.form-group textarea {
  width: 100%; padding: var(--spacing-md);
  background: var(--bg-secondary); border: 2px solid var(--bg-tertiary);
  border-radius: var(--radius-lg); color: var(--text-primary);
  font-family: inherit; font-size: 0.95rem;
  transition: border-color var(--transition-normal);
}
.form-group input:focus,
.form-group textarea:focus { outline: none; border-color: var(--primary-color); }
.form-group textarea { resize: vertical; min-height: 120px; }

/* ===== FOOTER ===== */
.footer {
  background: var(--bg-primary);
  border-top: 1px solid var(--bg-tertiary);
  padding: var(--spacing-xl) 0;
}
.footer-content {
  display: flex; justify-content: space-between; align-items: center;
  flex-wrap: wrap; gap: var(--spacing-md);
}
.footer-text { color: var(--text-muted); font-size: 0.875rem; }
.footer-links { display: flex; gap: var(--spacing-lg); flex-wrap: wrap; }
.footer-links a {
  color: var(--text-muted); text-decoration: none; font-size: 0.875rem;
  transition: color var(--transition-normal);
}
.footer-links a:hover { color: var(--primary-color); }

/* ===== BACK TO TOP ===== */
.back-to-top {
  position: fixed; bottom: var(--spacing-xl); right: var(--spacing-xl);
  width: 48px; height: 48px;
  background: var(--gradient-primary); color: #fff;
  border: none; border-radius: 50%; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.1rem;
  opacity: 0; visibility: hidden;
  transition: all var(--transition-normal);
  z-index: var(--z-fixed);
  box-shadow: var(--shadow-lg);
}
.back-to-top.visible { opacity: 1; visibility: visible; }
.back-to-top:hover { transform: translateY(-2px); box-shadow: var(--shadow-xl); }

/* ===== PWA INSTALL BUTTON ===== */
.btn-install {
  position: fixed; bottom: 80px; right: var(--spacing-xl);
  background: var(--gradient-primary); color: #fff;
  border: none; border-radius: var(--radius-lg);
  padding: 0.7rem 1.2rem; font-size: 0.9rem; font-weight: 600;
  cursor: pointer; z-index: var(--z-fixed);
  box-shadow: var(--shadow-lg);
  display: flex; align-items: center; gap: var(--spacing-sm);
}

/* ===== ACCESSIBILITY ===== */
a:focus-visible, button:focus-visible, input:focus-visible, textarea:focus-visible {
  outline: 2px solid var(--primary-color); outline-offset: 2px;
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
}

/* =================================================================
   RESPONSIVE — TABLET (≤ 1024px)
   ================================================================= */
@media (max-width: 1024px) {
  .nav-menu { gap: var(--spacing-lg); }

  .hero-content { gap: var(--spacing-xl); }
  .about-content { gap: var(--spacing-2xl); }
  .contact-content { gap: var(--spacing-2xl); }
}

/* =================================================================
   RESPONSIVE — MOBILE (≤ 768px)
   ================================================================= */
@media (max-width: 768px) {
  :root { --nav-height: 64px; }

  /* ---- Trava anti-overflow: apenas elementos de bloco diretos ---- */
  body > *, section, .container, header, footer, nav,
  .hero, .about, .projects, .skills, .certificates, .experience, .contact {
    max-width: 100%;
    box-sizing: border-box;
  }
  img, video, canvas, iframe { max-width: 100%; height: auto; }

  /* ---- Layout base ---- */
  section { padding: 2.5rem 0; }
  .container { padding: 0 1rem; }
  .section-header { margin-bottom: 2rem; }
  .section-title { font-size: 1.7rem; }
  .section-subtitle { font-size: 0.875rem; }

  /* ---- Navbar ---- */
  .nav-container { padding: 0 1rem; }
  .nav-logo { font-size: 1.25rem; }
  .nav-toggle { display: flex; }
  .theme-toggle { width: 36px; height: 36px; }

  .nav-menu {
    position: fixed;
    top: var(--nav-height); left: -100%;
    width: 100%; height: calc(100vh - var(--nav-height));
    flex-direction: column; align-items: stretch;
    background: var(--bg-secondary);
    padding: 1.5rem 1rem;
    gap: 0;
    overflow-y: auto;
    box-shadow: var(--shadow-xl);
    transition: left 0.3s ease;
    z-index: var(--z-fixed);
  }
  .nav-menu.active { left: 0; }
  .nav-item { border-bottom: 1px solid var(--bg-tertiary); }
  .nav-link {
    display: block; padding: 1rem 0.5rem;
    font-size: 1.05rem;
  }
  .nav-link::after { bottom: 0; }

  /* ---- Hero mobile ---- */
  .hero { padding-top: var(--nav-height); min-height: 100svh; }
  .hero-content {
    grid-template-columns: 1fr !important;
    text-align: center;
    padding: 2rem 1rem 3rem;
    gap: 1.75rem;
    width: 100%;
    max-width: 100%;
    overflow: hidden;
  }
  /* Imagem ACIMA do texto no mobile */
  .hero-image { order: -1; }
  .hero-text  { order: 1; width: 100%; min-width: 0; }

  .image-container {
    width: min(200px, 60vw);
    height: min(200px, 60vw);
    margin: 0 auto;
  }
  .hero-title {
    font-size: clamp(1.5rem, 5.5vw, 2rem);
    line-height: 1.2;
    word-break: break-word;
    overflow-wrap: break-word;
  }
  .hero-subtitle { font-size: 0.9rem; }
  .hero-description {
    font-size: 0.875rem; max-width: 100%;
    margin-left: auto; margin-right: auto;
    padding: 0 0.25rem;
    word-break: break-word;
  }
  .hero-buttons { justify-content: center; flex-wrap: wrap; gap: 0.75rem; }
  .btn { padding: 0.7rem 1.1rem; font-size: 0.875rem; }
  .scroll-indicator { display: none; }

  /* ---- About mobile ---- */
  .about-content { grid-template-columns: 1fr; gap: 2rem; text-align: center; }
  .about-image { order: -1; }
  .image-wrapper { max-width: 100%; max-height: 260px; }
  .image-wrapper img { max-height: 260px; }
  .about-text p { text-align: left; font-size: 0.95rem; }
  .about-stats {
    grid-template-columns: repeat(3,1fr);
    gap: 0.5rem; margin-top: 1.25rem;
  }
  .stat { padding: 0.75rem 0.5rem; }
  .stat-number { font-size: 1.5rem; }
  .stat-label  { font-size: 0.7rem; }

  /* ---- Projects mobile ---- */
  .projects-grid { grid-template-columns: 1fr; gap: 1.25rem; }
  .project-image { height: 180px; }
  .project-content { padding: 1rem; }
  .project-content h3 { font-size: 1rem; }
  .project-content > p { font-size: 0.875rem; }

  /* ---- Skills mobile ---- */
  .skills-categories { gap: 1rem; }
  .skill-category { padding: 1.25rem; }
  .skill-name { font-size: 0.85rem; }

  /* ---- Certificates mobile ---- */
  .certificates-grid { grid-template-columns: 1fr; gap: 1rem; }
  .certificate-card { padding: 1rem; gap: 1rem; }
  .card-icon { font-size: 2rem; }
  .card-info h3 { font-size: 0.9rem; }
  .card-info p  { font-size: 0.8rem; }

  /* ---- Timeline mobile ---- */
  .timeline {
    padding-left: 1.5rem;
    margin-left: 1.5rem;
    border-left-width: 2px;
  }
  .timeline-dot {
    left: calc(-1.5rem - 9px);
    width: 16px; height: 16px;
  }
  .timeline-content { padding: 1rem; }
  .timeline-content h3 { font-size: 1rem; }
  .timeline-content h4 { font-size: 0.85rem; }
  .timeline-content p  { font-size: 0.875rem; }
  .timeline-date { font-size: 0.78rem; }
  .timeline-item { margin-bottom: 1.5rem; }

  /* ---- Contact mobile ---- */
  .contact-content { grid-template-columns: 1fr; gap: 1.5rem; }
  .contact-info h3 { font-size: 1.2rem; }
  .contact-info > p { font-size: 0.875rem; }
  .contact-item { gap: 0.875rem; padding: 0.875rem; }
  .contact-icon { width: 40px; height: 40px; font-size: 1rem; }
  .contact-details h4 { font-size: 0.85rem; }
  .contact-link { font-size: 0.82rem; word-break: break-all; }
  .contact-details p { font-size: 0.85rem; }
  .social-link { width: 42px; height: 42px; font-size: 1.1rem; }
  .social-links { margin-top: 1.5rem; }
  .contact-info .social-links { display: none; }
  .social-links--form { display: flex; margin-top: 1.25rem; }
  .contact-form { padding: 1.25rem; }
  .form-group input,
  .form-group textarea { padding: 0.75rem; font-size: 0.9rem; }
  .form-group label { font-size: 0.85rem; }

  /* ---- Footer mobile ---- */
  .footer-content { flex-direction: column; text-align: center; gap: 0.75rem; }
  .footer-links { justify-content: center; gap: 1rem; }
  .footer-text, .footer-links a { font-size: 0.8rem; }

  /* ---- Back to top / install ---- */
  .back-to-top { bottom: 1rem; right: 1rem; width: 42px; height: 42px; }
  .btn-install { bottom: 60px; right: 1rem; font-size: 0.8rem; padding: 0.6rem 1rem; }
}

/* =================================================================
   RESPONSIVE — SMALL MOBILE (≤ 400px)
   ================================================================= */
@media (max-width: 400px) {
  .hero-title { font-size: 1.4rem; }
  .image-container { width: min(180px, 75vw); height: min(180px, 75vw); }
  .hero-buttons { flex-direction: column; align-items: stretch; }
  .btn { width: 100%; justify-content: center; }
  .about-stats { grid-template-columns: 1fr 1fr; }
  .about-stats .stat:last-child { grid-column: 1 / -1; }
  .certificate-card { flex-direction: column; align-items: flex-start; }
  .nav-logo { font-size: 1.1rem; }
  .theme-toggle { width: 32px; height: 32px; font-size: 0.85rem; }
}

/* ===== LIGHT THEME ADJUSTMENTS ===== */
[data-theme="light"] .skill-item,
[data-theme="light"] .timeline-content,
[data-theme="light"] .contact-item,
[data-theme="light"] .contact-form,
[data-theme="light"] .stat {
  background: #fff;
  border-color: #e2e8f0;
  box-shadow: 0 2px 8px rgba(0,0,0,.06);
}
[data-theme="light"] .project-card { background: #fff; border-color: #e2e8f0; }
[data-theme="light"] .certificate-card { background: #fff; border-color: #e2e8f0; }
[data-theme="light"] .skill-category { background: #fff; border-color: #e2e8f0; }
[data-theme="light"] .card-info h3,
[data-theme="light"] .card-info p { color: var(--text-primary); }
[data-theme="light"] .nav-menu { background: #f8fafc; }
[data-theme="light"] .timeline-dot { box-shadow: 0 0 0 3px #f8fafc; }
[data-theme="light"] .form-group input,
[data-theme="light"] .form-group textarea {
  background: #f8fafc; border-color: #cbd5e1; color: #1e293b;
}
[data-theme="light"] .social-link { background: #f8fafc; border-color: #cbd5e1; color: #475569; }

/* Telas muito pequenas (iPhone SE, etc) */
@media (max-width: 480px) {
    .container {
        padding: 0 15px; /* Reduz padding lateral */
    }
    
    .hero-title {
        font-size: 2rem; /* Diminui título gigante */
    }
}

/* ============================================
   CTA — BAIXAR CURRÍCULO (fim da timeline de Experiência)
   ============================================ */
.cv-cta {
  margin-top: var(--spacing-2xl);
  background: var(--bg-card);
  border: 1px solid var(--bg-tertiary);
  border-radius: var(--radius-xl);
  padding: var(--spacing-xl) var(--spacing-2xl);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--spacing-xl);
  flex-wrap: wrap;
}

.cv-cta-text h3 {
  color: var(--text-primary);
  font-size: 1.15rem;
  margin-bottom: 4px;
}

.cv-cta-text p {
  color: var(--text-secondary);
  font-size: 0.92rem;
  max-width: 460px;
}

.cv-cta .btn {
  white-space: nowrap;
}

@media (max-width: 600px) {
  .cv-cta {
    flex-direction: column;
    align-items: flex-start;
    text-align: left;
  }
}

/* ============================================
   GALERIA DE FOTOS — LIGHTBOX COM NAVEGAÇÃO LATERAL
   ============================================ */

.image-wrapper[role="button"] { cursor: pointer; }

.gallery-count {
  display: block;
  margin-top: 6px;
  font-size: 0.85rem;
  color: var(--text-secondary);
}

.gallery-lightbox {
  position: fixed;
  inset: 0;
  z-index: 20000;
  background: rgba(2, 6, 23, 0.94);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.25s ease, visibility 0.25s ease;
  cursor: default; /* restaura o cursor do sistema — o cursor customizado do site fica atrás do lightbox */
}

/* Reforço: enquanto o lightbox estiver aberto, desliga de vez o cursor customizado
   (a bolinha) e garante o cursor normal do sistema em qualquer navegador */
body.lightbox-open {
  cursor: auto !important;
}
body.lightbox-open .cursor {
  display: none !important;
}

.gallery-lightbox.active {
  opacity: 1;
  visibility: visible;
}

.gallery-lightbox-content {
  max-width: min(85vw, 900px);
  max-height: 85vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
}

.gallery-lightbox-content img {
  max-width: 100%;
  max-height: 72vh;
  object-fit: contain;
  border-radius: var(--radius-lg);
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
  user-select: none;
}

.gallery-caption {
  color: #f1f5f9;
  font-size: 0.95rem;
  text-align: center;
  max-width: 600px;
}

.gallery-index {
  color: #94a3b8;
  font-size: 0.8rem;
  letter-spacing: 0.05em;
}

.gallery-close {
  position: absolute;
  top: 24px;
  right: 24px;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.25);
  background: rgba(255, 255, 255, 0.08);
  color: #f1f5f9;
  font-size: 1.1rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s ease, transform 0.2s ease;
}

.gallery-close:hover { background: rgba(255, 255, 255, 0.18); transform: rotate(90deg); }

.gallery-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 52px;
  height: 52px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.25);
  background: rgba(255, 255, 255, 0.08);
  color: #f1f5f9;
  font-size: 1.3rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s ease, transform 0.2s ease;
  z-index: 1;
}

.gallery-arrow:hover { background: rgba(255, 255, 255, 0.2); }
.gallery-arrow--prev { left: clamp(12px, 4vw, 48px); }
.gallery-arrow--next { right: clamp(12px, 4vw, 48px); }
.gallery-arrow:active { transform: translateY(-50%) scale(0.92); }

@media (max-width: 640px) {
  .gallery-arrow { width: 42px; height: 42px; font-size: 1.05rem; }
  .gallery-close { width: 38px; height: 38px; top: 14px; right: 14px; }
  .gallery-lightbox-content img { max-height: 60vh; }
}

/* ============================================
   SKILLS — TAGS SIMPLES (sem porcentagem/barra)
   ============================================ */
.skill-category {
  position: relative;
  overflow: hidden;
}

.skill-category::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
  background: var(--cat-accent, var(--gradient-primary));
}

.skill-category--contabil    { --cat-accent: linear-gradient(90deg, #6366f1, #06b6d4); }
.skill-category--ferramentas { --cat-accent: linear-gradient(90deg, #8b5cf6, #ec4899); }
.skill-category--frontend    { --cat-accent: linear-gradient(90deg, #f97316, #f59e0b); }
.skill-category--backend     { --cat-accent: linear-gradient(90deg, #10b981, #06b6d4); }

.skill-category h3 i {
  font-size: 0.9em;
  margin-right: 8px;
  -webkit-text-fill-color: initial;
  background: var(--cat-accent, var(--gradient-primary));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.skills-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: var(--spacing-md);
}

.skill-tag {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 9px;
  padding: 9px 18px 9px 15px;
  border-radius: var(--radius-full);
  background: linear-gradient(160deg, rgba(99, 102, 241, 0.14), rgba(139, 92, 246, 0.06));
  border: 1px solid rgba(139, 92, 246, 0.25);
  color: var(--text-primary);
  font-size: 0.88rem;
  font-weight: 600;
  letter-spacing: 0.01em;
  cursor: default;
  transition: border-color 0.25s ease, transform 0.25s ease, background 0.25s ease, box-shadow 0.25s ease;
}

.skill-tag i {
  font-size: 0.95em;
  color: var(--primary-color);
  width: 15px;
  text-align: center;
  flex-shrink: 0;
}

.skill-tag:hover {
  border-color: var(--primary-color);
  transform: translateY(-3px);
  background: linear-gradient(160deg, rgba(99, 102, 241, 0.24), rgba(139, 92, 246, 0.12));
  box-shadow: 0 8px 20px rgba(99, 102, 241, 0.18);
}

.skill-tag:hover i { color: #fff; }

[data-theme="light"] .skill-tag {
  background: linear-gradient(160deg, #eef2ff, #f5f3ff);
  border-color: rgba(99, 102, 241, 0.2);
  color: #1e293b;
}
[data-theme="light"] .skill-tag:hover {
  background: linear-gradient(160deg, #e0e7ff, #ede9fe);
}
