/* ============================================================
   DSBRTI — Sistema de Ecossistemas Visuais Avançados
   Motores: Ubuntu (Yaru) · Linux Mint (Cinnamon) · Windows 11 (Fluent)
   ============================================================ */

/* ---------- RESET & BASE ENGINE ---------- */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

:root {
  --font-body: 'Segoe UI Variable', 'Segoe UI', 'Ubuntu', -apple-system, sans-serif;
  --font-mono: 'Cascadia Code', 'Fira Code', monospace;
  --transition-fluid: cubic-bezier(0.16, 1, 0.3, 1) 0.4s;
  --max-width: 1200px;
  --nav-height: 64px;
  
  /* Sombras de Oclusão Sombria (Padrão Windows 11 / Mint Layering) */
  --shadow-stroke: 0 0 0 1px rgba(255, 255, 255, 0.05);
  --shadow-layer: 0 4px 12px rgba(0, 0, 0, 0.15), 0 1px 2px rgba(0, 0, 0, 0.2);
  --shadow-flyout: 0 20px 40px rgba(0, 0, 0, 0.3), 0 1px 5px rgba(0, 0, 0, 0.1);
  
  --glass-blur: 25px;
}

html {
  font-size: 16px;
  scroll-behavior: smooth;
  height: 100%;
}

body {
  font-family: var(--font-body);
  background-color: var(--bg);
  background-image: var(--bg-image);
  background-size: cover;
  background-position: center;
  background-attachment: fixed;
  color: var(--text);
  line-height: 1.6;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  transition: background var(--transition-fluid), color var(--transition-fluid);
  -webkit-font-smoothing: antialiased;
}

a { 
  text-decoration: none; 
  color: inherit;
  transition: all var(--transition-fluid);
}

/* ---------- TEMA 1: WINDOWS 11 (FLUENT DESIGN DESIGN / MICA ART) ---------- */
[data-theme="winxp"] {
  --bg: #1a1a1a;
  --bg-image: radial-gradient(circle at 50% -20%, rgba(0, 120, 212, 0.18) 0%, transparent 50%),
              radial-gradient(circle at 10% 90%, rgba(38, 177, 255, 0.12) 0%, transparent 40%),
              linear-gradient(135deg, #0e1118 0%, #12151c 100%);
  
  /* Mica / Acrylic Real - Altamente Translúcido */
  --bg-card: rgba(32, 32, 32, 0.55);
  --bg-nav: rgba(22, 22, 22, 0.7);
  --bg-hover: rgba(255, 255, 255, 0.07);
  
  --text: #ffffff;
  --text-sec: rgba(255, 255, 255, 0.75);
  --text-nav: #ffffff;
  --text-sub: rgba(255, 255, 255, 0.5);
  
  --accent: #0078d4; /* Azul Padrão Windows */
  --accent-hover: #26b1ff;
  --border: rgba(255, 255, 255, 0.07);
  --border-glow: rgba(0, 120, 212, 0.5);
  
  --radius: 8px; /* Cantos icônicos do W11 */
  --radius-sm: 4px;
  
  --primary: #0078d4;
  --secondary: #107c41;
  --warning: #ffb900;
}

/* Otimização Exclusiva da Navbar no modo Windows 11 (Efeito Taskbar Centralizada Flutuante) */
[data-theme="winxp"] .navbar {
  margin: 12px auto;
  width: calc(100% - 24px);
  max-width: var(--max-width);
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: var(--shadow-flyout);
}
[data-theme="winxp"] .nav-links a.active {
  background: rgba(255, 255, 255, 0.06);
}
[data-theme="winxp"] .nav-links a.active::after {
  content: '';
  position: absolute;
  bottom: 4px;
  left: 35%;
  width: 30%;
  height: 3px;
  background: var(--accent);
  border-radius: 2px;
}

/* ---------- TEMA 2: LINUX MINT (CINNAMON CELESTIAL GREEN) ---------- */
[data-theme="fedora"] { /* Vinculado ao botão do Fedora para manter a estabilidade do JS */
  --bg: #141916;
  --bg-image: radial-gradient(circle at 80% 20%, rgba(135, 207, 63, 0.15) 0%, transparent 45%),
              linear-gradient(135deg, #0d120f 0%, #161f19 100%);
  
  /* Vidro Escuro Esmeralda */
  --bg-card: rgba(33, 41, 36, 0.65);
  --bg-nav: rgba(23, 28, 25, 0.8);
  --bg-hover: rgba(135, 207, 63, 0.1);
  
  --text: #f0f5f2;
  --text-sec: #cbdad1;
  --text-nav: #ffffff;
  --text-sub: #8fa095;
  
  --accent: #87cf3f; /* Verde Oficial do Linux Mint */
  --accent-hover: #9fdf5d;
  --border: rgba(255, 255, 255, 0.05);
  --border-glow: rgba(135, 207, 63, 0.4);
  
  --radius: 6px; /* Interface Cinnamon tradicionalmente mais reta e sóbria */
  --radius-sm: 3px;
  
  --primary: #87cf3f;
  --secondary: #2f4034;
  --warning: #f39c12;
}

[data-theme="fedora"] .navbar {
  border-bottom: 2px solid var(--accent);
}
[data-theme="fedora"] .nav-links a.active {
  background: var(--bg-hover);
  color: var(--accent);
}
[data-theme="fedora"] .badge-sector {
  background: rgba(135, 207, 63, 0.15);
  border: 1px solid rgba(135, 207, 63, 0.2);
  color: var(--accent);
}

/* ---------- TEMA 3: UBUNTU (YARU VIBRANT GLASS) ---------- */
[data-theme="ubuntu"] {
  --bg: #2c001e;
  --bg-image: radial-gradient(circle at 80% 20%, rgba(233, 84, 32, 0.25) 0%, transparent 50%),
              linear-gradient(135deg, #1f0015 0%, #3d002a 100%);
  
  --bg-card: rgba(255, 255, 255, 0.07);
  --bg-nav: rgba(16, 16, 16, 0.6);
  --bg-hover: rgba(255, 255, 255, 0.12);
  
  --text: #f5f5f5;
  --text-sec: #e2d1dc;
  --text-nav: #ffffff;
  --text-sub: #aea79f;
  
  --accent: #E95420;
  --accent-hover: #ff7342;
  --border: rgba(255, 255, 255, 0.08);
  --border-glow: rgba(233, 84, 32, 0.3);
  
  --radius: 12px;
  --radius-sm: 6px;
  
  --primary: #E95420;
  --secondary: #77216f;
  --warning: #f1c40f;
}

[data-theme="ubuntu"] .navbar {
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}
[data-theme="ubuntu"] .nav-links a.active {
  background: var(--accent);
}

/* ---------- CORE GLASSMORPHISM ENGINE ---------- */
.navbar, .card, .industrial-card, .curriculo-sidebar, .quick-ref, .footer {
  backdrop-filter: blur(var(--glass-blur)) saturate(190%);
  -webkit-backdrop-filter: blur(var(--glass-blur)) saturate(190%);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-stroke), var(--shadow-layer);
  transition: transform var(--transition-fluid), 
              box-shadow var(--transition-fluid), 
              background var(--transition-fluid), 
              border-color var(--transition-fluid);
}

/* ---------- ESTILIZAÇÃO E COMPORTAMENTO DA NAVBAR ---------- */
.navbar {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--bg-nav);
}

.nav-container {
  max-width: var(--max-width);
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: var(--nav-height);
  padding: 0 1.5rem;
}

.nav-brand {
  font-weight: 600;
  font-size: 1.1rem;
  color: var(--text-nav);
  letter-spacing: -0.3px;
}

.nav-links {
  display: flex;
  gap: 0.3rem;
}

.nav-links a {
  color: var(--text-nav);
  padding: 0.45rem 0.9rem;
  border-radius: var(--radius-sm);
  font-size: 0.9rem;
  font-weight: 500;
  position: relative;
}

.nav-links a:hover {
  background: var(--bg-hover);
}

/* ---------- INTERFACES DE INTERAÇÃO (SWITCHER) ---------- */
.theme-switcher {
  display: flex;
  gap: 0.25rem;
  background: rgba(0, 0, 0, 0.3);
  padding: 4px;
  border-radius: calc(var(--radius) + 2px);
  border: 1px solid rgba(255, 255, 255, 0.05);
}

.theme-btn {
  background: transparent;
  border: none;
  font-size: 1.1rem;
  padding: 0.4rem 0.7rem;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all var(--transition-fluid);
}

.theme-btn:hover {
  background: var(--bg-hover);
}

.theme-btn.active {
  background: rgba(255, 255, 255, 0.12);
  box-shadow: 0 2px 6px rgba(0,0,0,0.2), inset 0 1px 0 rgba(255,255,255,0.1);
}

/* ---------- HERO LAYOUT ---------- */
.hero {
  text-align: center;
  padding: 6rem 1.5rem 4rem;
}

.hero h1 {
  font-size: 3.4rem;
  font-weight: 700;
  letter-spacing: -1.5px;
  line-height: 1.15;
  background: linear-gradient(to right, #ffffff 30%, var(--text-sec));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.subtitle {
  font-size: 1.15rem;
  color: var(--text-sec);
  margin-top: 1rem;
  max-width: 680px;
  margin-left: auto;
  margin-right: auto;
}

/* ---------- CORPO DO CONTEÚDO ---------- */
.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 2rem 1.5rem;
  flex: 1;
  width: 100%;
}

.dashboard {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 1.5rem;
  margin-top: 2rem;
}

/* CARDS ULTRA-VÍTREOS */
.card, .industrial-card {
  background: var(--bg-card);
  padding: 1.75rem;
  border-radius: var(--radius);
}

.card:hover, .industrial-card:hover {
  transform: translateY(-4px);
  border-color: var(--border-glow);
  box-shadow: var(--shadow-stroke), var(--shadow-flyout);
  background: rgba(255, 255, 255, 0.09);
}

.card-header-tech {
  font-size: 1.2rem;
  font-weight: 600;
  margin-bottom: 0.75rem;
  color: var(--text);
}

.data-item-desc {
  font-size: 0.92rem;
  color: var(--text-sec);
  margin-bottom: 1.25rem;
}

/* BADGES MINT / FLUENT STYLE */
.badge-sector {
  display: inline-block;
  padding: 0.2rem 0.6rem;
  font-size: 0.75rem;
  font-weight: 600;
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: var(--text-sec);
  margin-bottom: 1rem;
}

/* BOTÕES REATIVOS DE ALTA FIDELIDADE */
.text-link, .hero-actions a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 500;
  font-size: 0.9rem;
  padding: 0.6rem 1.2rem;
  border-radius: var(--radius-sm);
  transition: all var(--transition-fluid);
  cursor: pointer;
}

/* Botões de Ação Primária */
.hero-actions a[style*="background: var(--primary)"],
.text-link {
  background: var(--accent) !important;
  color: #ffffff !important;
  border: 1px solid rgba(255, 255, 255, 0.15) !important;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.15);
}

.hero-actions a[style*="background: var(--primary)"]:hover,
.text-link:hover {
  background: var(--accent-hover) !important;
  box-shadow: 0 6px 20px var(--border-glow);
  text-decoration: none;
}

/* Botões Secundários */
.hero-actions a[style*="border: 1px solid"],
aside .text-link {
  background: rgba(255, 255, 255, 0.04) !important;
  color: var(--text) !important;
  border: 1px solid var(--border) !important;
}

.hero-actions a[style*="border: 1px solid"]:hover,
aside .text-link:hover {
  background: var(--bg-hover) !important;
  border-color: rgba(255, 255, 255, 0.2) !important;
}

/* ---------- CURRICULO E ESTRUTURAS INSTITUCIONAIS ---------- */
.curriculo-layout {
  display: grid;
  grid-template-columns: 1fr 320px;
  gap: 2rem;
}

.curriculo-section h2, .quick-ref h2 {
  font-size: 1.45rem;
  font-weight: 600;
  margin-bottom: 1rem;
}

.curriculo-sidebar {
  background: var(--bg-card);
}

.meta {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-sub);
  letter-spacing: 0.5px;
}

/* ---------- PAINEL DE CONTROLE DE REFS ---------- */
.quick-ref {
  background: var(--bg-card);
  padding: 2rem;
  margin-top: 3rem;
}

.quick-ref div[style*="border-left"] {
  border-left: 3px solid var(--accent) !important;
  background: rgba(255, 255, 255, 0.01);
  padding: 1.25rem !important;
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
}

.quick-ref div[style*="border-left"]:hover {
  background: var(--bg-hover);
}

/* ---------- TOAST ENGINE REATIVO ---------- */
.toast {
  position: fixed;
  bottom: 1.5rem;
  right: 1.5rem;
  background: var(--bg-card);
  border: 1px solid var(--border);
  color: var(--text);
  padding: 1rem 1.5rem;
  border-radius: var(--radius);
  box-shadow: var(--shadow-flyout);
  backdrop-filter: blur(var(--glass-blur));
  z-index: 1000;
  transform: translateY(150%);
  transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}
.toast.visible { transform: translateY(0); }

/* ---------- FOOTER COMPACTO VÍTREO ---------- */
.footer {
  background: var(--bg-nav);
  padding: 3rem 1.5rem;
  text-align: center;
  margin-top: 5rem;
  border-left: 0; border-right: 0; border-bottom: 0;
}

.footer-msg {
  color: var(--text-sub);
}

/* ---------- RESPONSIVIDADE ERGONÔMICA ---------- */
@media (max-width: 900px) {
  .curriculo-layout {
    grid-template-columns: 1fr;
  }
  .curriculo-layout aside {
    order: -1;
  }
}

@media (max-width: 768px) {
  [data-theme="winxp"] .navbar {
    width: 100%;
    margin: 0;
    border-radius: 0;
  }
  .nav-container {
    flex-direction: column;
    height: auto;
    padding: 1rem;
    gap: 0.75rem;
  }
  .nav-links {
    flex-wrap: wrap;
    justify-content: center;
  }
  .hero h1 {
    font-size: 2.2rem;
  }
}
