/* ==========================================================================
   FERNANDA (NANDA) YOUSSEF - PORTFÓLIO WEB DEVELOPER
   Design System: Elegância, Modernidade & Performance
   ========================================================================== */

/* --- Custom Variables & Palettes --- */
:root {
  /* Dark Luxury (Default) */
  --bg-primary: #0a090a;
  --bg-secondary: #121013;
  --bg-card: rgba(22, 18, 22, 0.72);
  --bg-card-hover: rgba(32, 26, 33, 0.85);
  --bg-glass: rgba(255, 255, 255, 0.03);
  --bg-glass-heavy: rgba(14, 11, 15, 0.82);

  /* Curated Accent Tones */
  --gold-primary: #d4af37;
  --gold-glow: #e6ca65;
  --gold-muted: rgba(212, 175, 55, 0.2);
  --rose-primary: #dca39c;
  --rose-glow: #f0bdb7;
  --rose-muted: rgba(220, 163, 156, 0.15);
  
  --gradient-accent: linear-gradient(135deg, #d4af37 0%, #dca39c 50%, #f0bdb7 100%);
  --gradient-card: linear-gradient(145deg, rgba(255, 255, 255, 0.04) 0%, rgba(255, 255, 255, 0.01) 100%);
  --gradient-glow: radial-gradient(circle, rgba(212, 175, 55, 0.15) 0%, rgba(220, 163, 156, 0.08) 50%, transparent 70%);

  /* Typography Colors */
  --text-main: #fbfafb;
  --text-muted: #aba2aa;
  --text-dim: #797178;
  --border-light: rgba(255, 255, 255, 0.08);
  --border-accent: rgba(212, 175, 55, 0.28);
  --border-rose: rgba(220, 163, 156, 0.25);

  /* Shadows */
  --shadow-sm: 0 4px 12px rgba(0, 0, 0, 0.3);
  --shadow-md: 0 10px 30px rgba(0, 0, 0, 0.45);
  --shadow-lg: 0 20px 50px rgba(0, 0, 0, 0.6);
  --shadow-gold: 0 8px 32px rgba(212, 175, 55, 0.18);
  --shadow-rose: 0 8px 32px rgba(220, 163, 156, 0.18);

  /* Layout */
  --header-height: 84px;
  --container-max: 1200px;
  --radius-sm: 8px;
  --radius-md: 16px;
  --radius-lg: 24px;
  --radius-full: 9999px;

  /* Fonts */
  --font-serif: 'Playfair Display', Georgia, serif;
  --font-sans: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-code: 'Fira Code', Consolas, Monaco, monospace;

  /* Transitions */
  --transition-fast: 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  --transition-normal: 0.35s cubic-bezier(0.16, 1, 0.3, 1);
  --transition-slow: 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

/* Light Mode Theme */
[data-theme="light"] {
  --bg-primary: #fbf8f6;
  --bg-secondary: #f3ece8;
  --bg-card: rgba(255, 255, 255, 0.85);
  --bg-card-hover: rgba(255, 255, 255, 0.98);
  --bg-glass: rgba(255, 255, 255, 0.6);
  --bg-glass-heavy: rgba(251, 248, 246, 0.92);

  --text-main: #1e191d;
  --text-muted: #5e545b;
  --text-dim: #8b8088;
  --border-light: rgba(30, 25, 29, 0.08);
  --border-accent: rgba(184, 134, 11, 0.3);
  --border-rose: rgba(196, 114, 105, 0.3);

  --shadow-sm: 0 4px 12px rgba(30, 25, 29, 0.05);
  --shadow-md: 0 12px 28px rgba(30, 25, 29, 0.08);
  --shadow-lg: 0 24px 50px rgba(30, 25, 29, 0.12);
  --shadow-gold: 0 8px 30px rgba(184, 134, 11, 0.12);
}

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

html {
  scroll-behavior: smooth;
  font-size: 16px;
  -webkit-text-size-adjust: 100%;
}

/* Custom Sleek Scrollbar */
::-webkit-scrollbar {
  width: 10px;
}
::-webkit-scrollbar-track {
  background: var(--bg-primary);
}
::-webkit-scrollbar-thumb {
  background: linear-gradient(to bottom, rgba(212, 175, 55, 0.4), rgba(220, 163, 156, 0.4));
  border-radius: 10px;
  border: 2px solid var(--bg-primary);
}
::-webkit-scrollbar-thumb:hover {
  background: var(--gradient-accent);
}

body {
  background-color: var(--bg-primary);
  color: var(--text-main);
  font-family: var(--font-sans);
  line-height: 1.6;
  overflow-x: hidden;
  transition: background-color var(--transition-normal), color var(--transition-normal);
  position: relative;
}

/* Background Ambient Lighting Effect */
.ambient-glow {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  pointer-events: none;
  z-index: 0;
  overflow: hidden;
}

.orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(100px);
  opacity: 0.45;
  animation: floatOrb 20s infinite alternate ease-in-out;
}

.orb-1 {
  width: 450px;
  height: 450px;
  background: var(--gold-primary);
  top: -100px;
  right: -50px;
  animation-duration: 22s;
}

.orb-2 {
  width: 500px;
  height: 500px;
  background: var(--rose-primary);
  bottom: 10%;
  left: -150px;
  animation-duration: 26s;
  animation-delay: -5s;
}

.orb-3 {
  width: 380px;
  height: 380px;
  background: #9d4edd;
  opacity: 0.25;
  top: 45%;
  right: 15%;
  animation-duration: 30s;
  animation-delay: -10s;
}

@keyframes floatOrb {
  0% { transform: translate(0, 0) scale(1); }
  50% { transform: translate(50px, 60px) scale(1.08); }
  100% { transform: translate(-40px, 30px) scale(0.95); }
}

/* Subtle Grid Texture */
.ambient-grid {
  position: fixed;
  inset: 0;
  background-image: 
    linear-gradient(to right, var(--border-light) 1px, transparent 1px),
    linear-gradient(to bottom, var(--border-light) 1px, transparent 1px);
  background-size: 60px 60px;
  opacity: 0.35;
  pointer-events: none;
  z-index: 0;
  mask-image: radial-gradient(circle at center, black 40%, transparent 85%);
  -webkit-mask-image: radial-gradient(circle at center, black 40%, transparent 85%);
}

/* --- Container & Utilities --- */
.container {
  width: 100%;
  max-width: var(--container-max);
  margin-left: auto;
  margin-right: auto;
  padding-left: 24px;
  padding-right: 24px;
  position: relative;
  z-index: 1;
}

section {
  padding: 100px 0;
  position: relative;
  z-index: 1;
}

.section-tag {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 16px;
  border-radius: var(--radius-full);
  background: var(--bg-glass);
  border: 1px solid var(--border-accent);
  color: var(--gold-primary);
  font-size: 0.82rem;
  font-weight: 600;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  margin-bottom: 16px;
  backdrop-filter: blur(8px);
}

.section-title {
  font-family: var(--font-serif);
  font-size: clamp(2rem, 4vw, 3rem);
  font-weight: 600;
  line-height: 1.2;
  margin-bottom: 16px;
  color: var(--text-main);
}

.section-title .text-gradient {
  background: var(--gradient-accent);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.section-subtitle {
  color: var(--text-muted);
  font-size: 1.05rem;
  max-width: 620px;
  margin-bottom: 50px;
}

/* Text Gradient Utility */
.text-gradient {
  background: var(--gradient-accent);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

/* --- Buttons --- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 14px 28px;
  border-radius: var(--radius-full);
  font-family: var(--font-sans);
  font-size: 0.95rem;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  transition: all var(--transition-normal);
  border: none;
  outline: none;
  position: relative;
  overflow: hidden;
}

.btn-primary {
  background: var(--gradient-accent);
  color: #0d0a0c;
  box-shadow: var(--shadow-gold);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 30px rgba(212, 175, 55, 0.35);
}

.btn-outline {
  background: var(--bg-glass);
  color: var(--text-main);
  border: 1px solid var(--border-accent);
  backdrop-filter: blur(10px);
}

.btn-outline:hover {
  background: rgba(212, 175, 55, 0.1);
  border-color: var(--gold-primary);
  transform: translateY(-2px);
  color: var(--gold-primary);
}

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

/* --- Header & Navbar --- */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: var(--header-height);
  z-index: 100;
  transition: all var(--transition-normal);
  display: flex;
  align-items: center;
}

.navbar.scrolled {
  height: 72px;
  background: var(--bg-glass-heavy);
  backdrop-filter: blur(18px);
  border-bottom: 1px solid var(--border-light);
  box-shadow: var(--shadow-sm);
}

.navbar-container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
}

.brand-logo {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
}

.logo-monogram {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: var(--gradient-accent);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-serif);
  font-size: 1.25rem;
  font-weight: 700;
  color: #0b090a;
  box-shadow: 0 4px 15px rgba(212, 175, 55, 0.3);
  transition: transform var(--transition-normal);
}

.brand-logo:hover .logo-monogram {
  transform: rotate(6deg) scale(1.05);
}

.logo-text {
  display: flex;
  flex-direction: column;
}

.logo-title {
  font-family: var(--font-serif);
  font-size: 1.15rem;
  font-weight: 700;
  letter-spacing: 1.2px;
  color: var(--text-main);
}

.logo-tag {
  font-size: 0.68rem;
  letter-spacing: 2px;
  color: var(--gold-primary);
  text-transform: uppercase;
  font-weight: 600;
}

.nav-menu {
  display: flex;
  align-items: center;
  gap: 32px;
  list-style: none;
}

.nav-link {
  color: var(--text-muted);
  text-decoration: none;
  font-size: 0.92rem;
  font-weight: 500;
  transition: color var(--transition-fast);
  position: relative;
  padding: 6px 0;
}

.nav-link::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--gradient-accent);
  transition: width var(--transition-fast);
  border-radius: 2px;
}

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

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

.nav-actions {
  display: flex;
  align-items: center;
  gap: 16px;
}

.theme-toggle {
  background: var(--bg-glass);
  border: 1px solid var(--border-light);
  color: var(--text-main);
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all var(--transition-fast);
}

.theme-toggle:hover {
  background: rgba(212, 175, 55, 0.15);
  border-color: var(--gold-primary);
  transform: rotate(15deg);
}

/* --- Language Switcher --- */
.lang-switcher {
  display: inline-flex;
  align-items: center;
  background: var(--bg-glass);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-full);
  padding: 3px;
  gap: 3px;
  backdrop-filter: blur(10px);
}

.lang-btn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: transparent;
  border: none;
  color: var(--text-muted);
  padding: 4px 10px;
  border-radius: var(--radius-full);
  font-family: var(--font-sans);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.5px;
  cursor: pointer;
  transition: all var(--transition-fast);
}

.lang-btn .flag-icon {
  font-size: 1rem;
  line-height: 1;
}

.lang-btn .lang-code {
  font-size: 0.72rem;
  text-transform: uppercase;
}

.lang-btn:hover {
  color: var(--text-main);
  background: rgba(255, 255, 255, 0.05);
}

.lang-btn.active {
  background: var(--gradient-accent);
  color: #0b090a;
  box-shadow: 0 2px 10px rgba(212, 175, 55, 0.35);
}

.mobile-toggle {
  display: none;
  background: none;
  border: none;
  color: var(--text-main);
  font-size: 1.5rem;
  cursor: pointer;
}

/* --- Hero Section --- */
.hero-section {
  min-height: 100vh;
  display: flex;
  align-items: center;
  padding-top: calc(var(--header-height) + 40px);
  padding-bottom: 60px;
  position: relative;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.2fr 0.9fr;
  align-items: center;
  gap: 50px;
}

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

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  background: var(--bg-glass);
  border: 1px solid var(--border-rose);
  padding: 8px 18px;
  border-radius: var(--radius-full);
  font-size: 0.88rem;
  color: var(--rose-primary);
  font-weight: 600;
  width: fit-content;
  margin-bottom: 24px;
  backdrop-filter: blur(10px);
}

.hero-badge .status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #10b981;
  box-shadow: 0 0 10px #10b981;
  animation: pulseDot 2s infinite;
}

@keyframes pulseDot {
  0% { transform: scale(0.95); opacity: 0.8; }
  50% { transform: scale(1.3); opacity: 1; }
  100% { transform: scale(0.95); opacity: 0.8; }
}

.hero-title {
  font-family: var(--font-serif);
  font-size: clamp(2.4rem, 4.5vw, 4rem);
  font-weight: 700;
  line-height: 1.15;
  margin-bottom: 20px;
  letter-spacing: -0.5px;
}

.role-ticker-wrapper {
  display: block;
  font-family: var(--font-sans);
  font-size: clamp(1.2rem, 2.2vw, 1.8rem);
  font-weight: 600;
  margin-top: 8px;
  color: var(--gold-primary);
  min-height: 38px;
}

.typed-cursor {
  display: inline-block;
  opacity: 1;
  animation: blink 0.7s infinite;
  color: var(--rose-primary);
}

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

.hero-description {
  font-size: 1.1rem;
  color: var(--text-muted);
  line-height: 1.7;
  max-width: 560px;
  margin-bottom: 36px;
}

.hero-cta-group {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 36px;
  flex-wrap: wrap;
}

.hero-socials {
  display: flex;
  align-items: center;
  gap: 14px;
}

.social-icon-btn {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--bg-glass);
  border: 1px solid var(--border-light);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  text-decoration: none;
  font-size: 1.1rem;
  transition: all var(--transition-fast);
}

.social-icon-btn:hover {
  background: rgba(212, 175, 55, 0.15);
  border-color: var(--gold-primary);
  color: var(--gold-primary);
  transform: translateY(-3px);
  box-shadow: 0 6px 15px rgba(212, 175, 55, 0.2);
}

/* --- Hero Visual Card & Code Terminal --- */
.hero-visual {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.portrait-frame-container {
  position: relative;
  width: 100%;
  max-width: 420px;
}

.portrait-glow {
  position: absolute;
  inset: -15px;
  background: var(--gradient-accent);
  filter: blur(28px);
  opacity: 0.35;
  border-radius: 36px;
  z-index: 0;
}

.portrait-card {
  position: relative;
  z-index: 1;
  border-radius: 28px;
  overflow: hidden;
  background: var(--bg-card);
  border: 1px solid var(--border-accent);
  box-shadow: var(--shadow-lg);
}

.portrait-img {
  width: 100%;
  height: 480px;
  object-fit: cover;
  object-position: center 18%;
  display: block;
  transition: transform var(--transition-slow);
}

.portrait-card:hover .portrait-img {
  transform: scale(1.03);
}

/* Floating Badges on Portrait */
.floating-badge {
  position: absolute;
  background: var(--bg-glass-heavy);
  backdrop-filter: blur(14px);
  border: 1px solid var(--border-accent);
  border-radius: var(--radius-md);
  padding: 12px 18px;
  display: flex;
  align-items: center;
  gap: 12px;
  box-shadow: var(--shadow-md);
  z-index: 2;
  transition: transform var(--transition-normal);
}

.floating-badge:hover {
  transform: translateY(-4px) scale(1.02);
}

.badge-top-left {
  top: 24px;
  left: -20px;
}

.badge-bottom-right {
  bottom: 24px;
  right: -20px;
}

.badge-icon {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: rgba(212, 175, 55, 0.15);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  color: var(--gold-primary);
}

.badge-text-title {
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--text-main);
  line-height: 1.2;
}

.badge-text-sub {
  font-size: 0.72rem;
  color: var(--text-muted);
}

/* --- Terminal Dev Widget --- */
.dev-terminal-widget {
  width: 100%;
  max-width: 440px;
  background: #0f0d10;
  border: 1px solid rgba(212, 175, 55, 0.3);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-lg);
  margin-top: 24px;
  overflow: hidden;
  position: relative;
  z-index: 2;
}

.terminal-header {
  background: #181419;
  padding: 10px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--border-light);
}

.terminal-dots {
  display: flex;
  gap: 6px;
}

.dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
}
.dot-red { background: #ff5f56; }
.dot-yellow { background: #ffbd2e; }
.dot-green { background: #27c93f; }

.terminal-title {
  font-family: var(--font-code);
  font-size: 0.75rem;
  color: var(--text-muted);
}

.terminal-body {
  padding: 16px 20px;
  font-family: var(--font-code);
  font-size: 0.82rem;
  line-height: 1.6;
  color: #e2d9e0;
}

.code-keyword { color: #f472b6; }
.code-class { color: #fbbf24; }
.code-var { color: #93c5fd; }
.code-str { color: #86efac; }
.code-comment { color: #6b7280; font-style: italic; }

/* --- About Section --- */
.about-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px;
  align-items: center;
}

.about-narrative p {
  color: var(--text-muted);
  font-size: 1.05rem;
  line-height: 1.8;
  margin-bottom: 20px;
}

.about-pillars {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  margin-top: 36px;
}

.pillar-card {
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  padding: 24px;
  transition: all var(--transition-normal);
  backdrop-filter: blur(10px);
}

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

.pillar-number {
  font-family: var(--font-serif);
  font-size: 1.8rem;
  font-weight: 700;
  color: var(--gold-primary);
  margin-bottom: 8px;
}

.pillar-title {
  font-size: 1rem;
  font-weight: 600;
  color: var(--text-main);
  margin-bottom: 8px;
}

.pillar-desc {
  font-size: 0.85rem;
  color: var(--text-muted);
  line-height: 1.5;
}

/* Stats / Highlights Banner */
.stats-banner {
  background: var(--bg-glass-heavy);
  border: 1px solid var(--border-accent);
  border-radius: var(--radius-lg);
  padding: 40px;
  margin-top: 60px;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 30px;
  text-align: center;
  box-shadow: var(--shadow-md);
}

.stat-item .stat-num {
  font-family: var(--font-serif);
  font-size: 2.5rem;
  font-weight: 700;
  background: var(--gradient-accent);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  margin-bottom: 4px;
}

.stat-item .stat-label {
  font-size: 0.88rem;
  color: var(--text-muted);
  font-weight: 500;
}

/* --- Projects Section --- */
.projects-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  margin-bottom: 40px;
  flex-wrap: wrap;
  gap: 20px;
}

.project-filters {
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--bg-card);
  padding: 6px;
  border-radius: var(--radius-full);
  border: 1px solid var(--border-light);
  overflow-x: auto;
  max-width: 100%;
}

.filter-btn {
  background: none;
  border: none;
  color: var(--text-muted);
  padding: 8px 18px;
  border-radius: var(--radius-full);
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition-fast);
  white-space: nowrap;
}

.filter-btn:hover {
  color: var(--text-main);
}

.filter-btn.active {
  background: var(--gradient-accent);
  color: #0d0a0c;
  box-shadow: 0 4px 12px rgba(212, 175, 55, 0.25);
}

.projects-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
  gap: 32px;
}

.project-card {
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: all var(--transition-normal);
  display: flex;
  flex-direction: column;
  backdrop-filter: blur(12px);
  position: relative;
}

.project-card:hover {
  transform: translateY(-8px);
  border-color: var(--border-accent);
  box-shadow: var(--shadow-lg), var(--shadow-gold);
}

.project-thumbnail-wrapper {
  position: relative;
  width: 100%;
  height: 240px;
  overflow: hidden;
  background: #151216;
}

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

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

.project-category-badge {
  position: absolute;
  top: 16px;
  left: 16px;
  background: var(--bg-glass-heavy);
  backdrop-filter: blur(8px);
  border: 1px solid var(--border-accent);
  padding: 5px 12px;
  border-radius: var(--radius-full);
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--gold-primary);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.project-status-badge {
  position: absolute;
  top: 16px;
  right: 16px;
  background: rgba(16, 185, 129, 0.15);
  border: 1px solid rgba(16, 185, 129, 0.4);
  color: #34d399;
  padding: 4px 10px;
  border-radius: var(--radius-full);
  font-size: 0.72rem;
  font-weight: 600;
}

.project-body {
  padding: 24px;
  display: flex;
  flex-direction: column;
  flex-grow: 1;
}

.project-title {
  font-family: var(--font-serif);
  font-size: 1.4rem;
  font-weight: 600;
  color: var(--text-main);
  margin-bottom: 10px;
}

.project-desc {
  font-size: 0.92rem;
  color: var(--text-muted);
  line-height: 1.6;
  margin-bottom: 20px;
  flex-grow: 1;
}

.tech-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 24px;
}

.tech-tag {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border-light);
  padding: 4px 10px;
  border-radius: 6px;
  font-size: 0.75rem;
  font-family: var(--font-code);
  color: var(--rose-primary);
}

.project-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-top: 1px solid var(--border-light);
  padding-top: 18px;
}

.project-links {
  display: flex;
  align-items: center;
  gap: 12px;
}

.btn-icon-link {
  color: var(--text-muted);
  text-decoration: none;
  font-size: 1.1rem;
  transition: color var(--transition-fast);
}

.btn-icon-link:hover {
  color: var(--gold-primary);
}

/* --- Skills & Tech Stack Section --- */
.skills-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 30px;
}

.skill-category-card {
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-lg);
  padding: 32px;
  backdrop-filter: blur(12px);
  transition: all var(--transition-normal);
}

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

.skill-category-header {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 24px;
}

.skill-cat-icon {
  width: 48px;
  height: 48px;
  border-radius: 14px;
  background: var(--gradient-accent);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.3rem;
  color: #0b090a;
  box-shadow: 0 4px 15px rgba(212, 175, 55, 0.25);
}

.skill-cat-title {
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--text-main);
}

.skill-items-list {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.skill-item {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.skill-info {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.9rem;
}

.skill-name {
  font-weight: 600;
  color: var(--text-main);
  display: flex;
  align-items: center;
  gap: 8px;
}

.skill-percent {
  font-size: 0.8rem;
  font-family: var(--font-code);
  color: var(--gold-primary);
}

.skill-bar-bg {
  width: 100%;
  height: 8px;
  background: rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-full);
  overflow: hidden;
  position: relative;
  box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.3);
}

.skill-bar-fill {
  height: 100%;
  background: var(--gradient-accent);
  border-radius: var(--radius-full);
  box-shadow: 0 0 12px rgba(212, 175, 55, 0.5);
  transition: width 1.2s cubic-bezier(0.16, 1, 0.3, 1);
  position: relative;
}

.skill-bar-fill::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.35), transparent);
  animation: barShine 3s infinite ease-in-out;
}

@keyframes barShine {
  0% { transform: translateX(-100%); }
  100% { transform: translateX(100%); }
}

/* --- Journey / Trajetória Section --- */
.timeline {
  position: relative;
  max-width: 860px;
  margin: 0 auto;
  padding: 20px 0;
}

.timeline::before {
  content: '';
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 2px;
  height: 100%;
  background: linear-gradient(to bottom, transparent, var(--gold-primary), var(--rose-primary), transparent);
}

.timeline-item {
  position: relative;
  margin-bottom: 50px;
  width: 50%;
}

.timeline-item:nth-child(odd) {
  left: 0;
  padding-right: 40px;
  text-align: right;
}

.timeline-item:nth-child(even) {
  left: 50%;
  padding-left: 40px;
  text-align: left;
}

.timeline-dot {
  position: absolute;
  top: 8px;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--gold-primary);
  border: 4px solid var(--bg-primary);
  box-shadow: 0 0 12px var(--gold-primary);
  z-index: 2;
}

.timeline-item:nth-child(odd) .timeline-dot {
  right: -8px;
}

.timeline-item:nth-child(even) .timeline-dot {
  left: -8px;
}

.timeline-card {
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  padding: 24px;
  backdrop-filter: blur(10px);
  transition: all var(--transition-normal);
}

.timeline-card:hover {
  border-color: var(--border-accent);
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
}

.timeline-date {
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 1px;
  color: var(--gold-primary);
  text-transform: uppercase;
  margin-bottom: 6px;
}

.timeline-title {
  font-family: var(--font-serif);
  font-size: 1.25rem;
  color: var(--text-main);
  margin-bottom: 8px;
}

.timeline-desc {
  font-size: 0.9rem;
  color: var(--text-muted);
  line-height: 1.6;
}

/* --- Contact Section --- */
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1.2fr;
  gap: 50px;
  align-items: flex-start;
}

.contact-info-card {
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-lg);
  padding: 36px;
  backdrop-filter: blur(12px);
}

.contact-channels {
  display: flex;
  flex-direction: column;
  gap: 20px;
  margin-top: 28px;
}

.channel-item {
  display: flex;
  align-items: center;
  gap: 16px;
  text-decoration: none;
  color: inherit;
  padding: 12px;
  border-radius: var(--radius-md);
  border: 1px solid transparent;
  transition: all var(--transition-fast);
}

.channel-item:hover {
  background: rgba(255, 255, 255, 0.03);
  border-color: var(--border-light);
  transform: translateX(6px);
}

.channel-icon {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: rgba(212, 175, 55, 0.12);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  color: var(--gold-primary);
}

.channel-title {
  font-size: 0.8rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.channel-value {
  font-size: 0.98rem;
  font-weight: 600;
  color: var(--text-main);
}

.contact-form-card {
  background: var(--bg-card);
  border: 1px solid var(--border-accent);
  border-radius: var(--radius-lg);
  padding: 40px;
  backdrop-filter: blur(14px);
  box-shadow: var(--shadow-lg);
}

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

.form-label {
  display: block;
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--text-main);
  margin-bottom: 8px;
}

.form-control {
  width: 100%;
  background: rgba(0, 0, 0, 0.25);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-md);
  padding: 14px 18px;
  color: var(--text-main);
  font-family: var(--font-sans);
  font-size: 0.95rem;
  outline: none;
  transition: all var(--transition-fast);
}

.form-control:focus {
  border-color: var(--gold-primary);
  box-shadow: 0 0 0 3px rgba(212, 175, 55, 0.15);
  background: rgba(0, 0, 0, 0.4);
}

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

.form-feedback {
  margin-top: 16px;
  padding: 14px 18px;
  border-radius: var(--radius-md);
  font-size: 0.9rem;
  display: none;
}

.form-feedback.success {
  display: block;
  background: rgba(16, 185, 129, 0.15);
  border: 1px solid #10b981;
  color: #34d399;
}

.form-feedback.error {
  display: block;
  background: rgba(239, 68, 68, 0.15);
  border: 1px solid #ef4444;
  color: #f87171;
}

/* --- Project Modal --- */
.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(5, 4, 5, 0.85);
  backdrop-filter: blur(12px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  opacity: 0;
  visibility: hidden;
  transition: all var(--transition-normal);
  padding: 24px;
}

.modal-backdrop.active {
  opacity: 1;
  visibility: visible;
}

.modal-container {
  background: var(--bg-card);
  border: 1px solid var(--border-accent);
  border-radius: var(--radius-lg);
  max-width: 780px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: var(--shadow-lg);
  transform: scale(0.92);
  transition: transform var(--transition-normal);
  position: relative;
}

.modal-backdrop.active .modal-container {
  transform: scale(1);
}

.modal-close-btn {
  position: absolute;
  top: 18px;
  right: 18px;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--bg-glass-heavy);
  border: 1px solid var(--border-light);
  color: var(--text-main);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 10;
  font-size: 1.1rem;
  transition: all var(--transition-fast);
}

.modal-close-btn:hover {
  background: var(--rose-primary);
  color: #0b090a;
}

.modal-image-wrapper {
  width: 100%;
  height: 320px;
  background: #110e12;
  overflow: hidden;
}

.modal-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.modal-body {
  padding: 32px;
}

.modal-category {
  font-size: 0.8rem;
  color: var(--gold-primary);
  text-transform: uppercase;
  font-weight: 700;
  letter-spacing: 1px;
}

.modal-title {
  font-family: var(--font-serif);
  font-size: 1.8rem;
  color: var(--text-main);
  margin: 6px 0 16px;
}

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

.modal-actions {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
}

/* --- Footer --- */
.site-footer {
  background: var(--bg-secondary);
  border-top: 1px solid var(--border-light);
  padding: 60px 0 30px;
  position: relative;
  z-index: 1;
}

.footer-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 40px;
  flex-wrap: wrap;
  gap: 24px;
}

.footer-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-top: 1px solid var(--border-light);
  padding-top: 24px;
  font-size: 0.85rem;
  color: var(--text-dim);
  flex-wrap: wrap;
  gap: 12px;
}

/* Scroll To Top Button */
.scroll-top-btn {
  position: fixed;
  bottom: 24px;
  right: 24px;
  width: 46px;
  height: 46px;
  border-radius: 50%;
  background: var(--gradient-accent);
  color: #0d0a0c;
  border: none;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  cursor: pointer;
  z-index: 90;
  box-shadow: var(--shadow-gold);
  opacity: 0;
  visibility: hidden;
  transition: all var(--transition-normal);
}

.scroll-top-btn.visible {
  opacity: 1;
  visibility: visible;
}

.scroll-top-btn:hover {
  transform: translateY(-4px);
}

/* ==========================================================================
   HERO ENTRANCE ANIMATIONS (IMMEDIATE ON LOAD)
   ========================================================================== */
@keyframes heroSlideInLeft {
  0% {
    opacity: 0;
    transform: translateX(-40px);
  }
  100% {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes heroSlideInRight {
  0% {
    opacity: 0;
    transform: translateX(40px);
  }
  100% {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes heroSlideInUp {
  0% {
    opacity: 0;
    transform: translateY(28px) scale(0.97);
  }
  100% {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.hero-animate-left {
  animation: heroSlideInLeft 0.85s cubic-bezier(0.16, 1, 0.3, 1) both;
  will-change: opacity, transform;
}

.hero-animate-right {
  animation: heroSlideInRight 0.95s cubic-bezier(0.16, 1, 0.3, 1) 0.1s both;
  will-change: opacity, transform;
}

.hero-animate-up {
  animation: heroSlideInUp 1s cubic-bezier(0.16, 1, 0.3, 1) 0.25s both;
  will-change: opacity, transform;
}

/* Floating Badges Gentle Micro-Animations */
@keyframes floatBadgeTop {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-8px); }
}

@keyframes floatBadgeBottom {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(8px); }
}

.badge-top-left {
  animation: floatBadgeTop 6s ease-in-out infinite;
}

.badge-bottom-right {
  animation: floatBadgeBottom 7s ease-in-out infinite 0.8s;
}

/* Glow Ring on Portrait Card */
.portrait-card {
  position: relative;
  z-index: 1;
  border-radius: 28px;
  overflow: hidden;
  background: var(--bg-card);
  border: 1px solid var(--border-accent);
  box-shadow: 0 15px 45px rgba(0, 0, 0, 0.5), 0 0 30px rgba(212, 175, 55, 0.2);
  transition: transform var(--transition-normal), box-shadow var(--transition-normal);
}

.portrait-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 22px 60px rgba(0, 0, 0, 0.65), 0 0 45px rgba(212, 175, 55, 0.35);
}

/* ==========================================================================
   SCROLL REVEAL & TRANSITION EFFECTS (FLUID SCROLL)
   ========================================================================== */
.reveal,
.reveal-left,
.reveal-right,
.reveal-scale {
  transition: opacity 0.85s cubic-bezier(0.16, 1, 0.3, 1),
              transform 0.85s cubic-bezier(0.16, 1, 0.3, 1),
              filter 0.85s cubic-bezier(0.16, 1, 0.3, 1);
  will-change: opacity, transform;
}

/* Fallback: Elements are visible by default! Only fade when JS activates scroll observer */
body.js-reveal-active .reveal:not(.revealed) {
  opacity: 0;
  transform: translateY(32px);
}

body.js-reveal-active .reveal-left:not(.revealed) {
  opacity: 0;
  transform: translateX(-40px);
}

body.js-reveal-active .reveal-right:not(.revealed) {
  opacity: 0;
  transform: translateX(40px);
}

body.js-reveal-active .reveal-scale:not(.revealed) {
  opacity: 0;
  transform: scale(0.93);
}

.reveal.revealed,
.reveal-left.revealed,
.reveal-right.revealed,
.reveal-scale.revealed {
  opacity: 1 !important;
  transform: translate(0, 0) scale(1) !important;
}

/* Stagger Delays for Grid Elements */
.stagger-parent .reveal:nth-child(1) { transition-delay: 0.05s; }
.stagger-parent .reveal:nth-child(2) { transition-delay: 0.15s; }
.stagger-parent .reveal:nth-child(3) { transition-delay: 0.25s; }
.stagger-parent .reveal:nth-child(4) { transition-delay: 0.35s; }
.stagger-parent .reveal:nth-child(5) { transition-delay: 0.45s; }
.stagger-parent .reveal:nth-child(6) { transition-delay: 0.55s; }

@media (prefers-reduced-motion: reduce) {
  .hero-animate-left,
  .hero-animate-right,
  .hero-animate-up,
  .badge-top-left,
  .badge-bottom-right,
  .reveal,
  .reveal-left,
  .reveal-right,
  .reveal-scale {
    opacity: 1 !important;
    transform: none !important;
    animation: none !important;
    transition: none !important;
  }
}

/* --- Responsive Media Queries --- */
@media (max-width: 992px) {
  .hero-grid {
    grid-template-columns: 1fr;
    gap: 40px;
    text-align: center;
  }
  .hero-badge { margin: 0 auto 20px; }
  .hero-description { margin-left: auto; margin-right: auto; }
  .hero-cta-group { justify-content: center; }
  .hero-socials { justify-content: center; }
  .portrait-frame-container { margin: 0 auto; }
  .dev-terminal-widget { margin: 24px auto 0; text-align: left; }

  .about-grid { grid-template-columns: 1fr; }
  .stats-banner { grid-template-columns: repeat(2, 1fr); gap: 20px; }
  .contact-grid { grid-template-columns: 1fr; }

  .timeline::before { left: 24px; }
  .timeline-item { width: 100%; padding-left: 60px !important; padding-right: 0 !important; text-align: left !important; }
  .timeline-item:nth-child(even) { left: 0; }
  .timeline-dot { left: 16px !important; }
}

@media (max-width: 768px) {
  :root { --header-height: 70px; }
  .nav-menu {
    position: fixed;
    top: 70px;
    right: -100%;
    width: 280px;
    height: calc(100vh - 70px);
    background: var(--bg-glass-heavy);
    backdrop-filter: blur(20px);
    border-left: 1px solid var(--border-light);
    flex-direction: column;
    padding: 30px 24px;
    gap: 20px;
    transition: right var(--transition-normal);
    box-shadow: var(--shadow-lg);
  }
  .nav-menu.open { right: 0; }
  .mobile-toggle { display: block; }
  .nav-cta-btn { display: none; }
  .stats-banner { grid-template-columns: 1fr 1fr; padding: 24px; }
  .about-pillars { grid-template-columns: 1fr; }
  .projects-grid { grid-template-columns: 1fr; }
  .floating-badge { display: none; }
}
