/* --- CONFIGURĂRI GLOBALE ȘI TEME (Aesthetic iOS + Gradients) --- */
:root {
  --c: #09f;
  --bg-color: #000;
  --text: #fff;
  /* Densitate Apple de sticlă mată (blur 25px + saturație mărită 180%) */
  --f: blur(25px) saturate(180%) brightness(1.05); 
  --island-bg: rgba(22, 22, 22, 0.65); 
  --shadow-color: rgba(0, 153, 255, 0.08);
  --bg-overlay: rgba(0, 0, 0, 0.3); /* Overlay fluid dar curat, fără blur pe container */
  --accent-grad: linear-gradient(135deg, #a855f7, #09f); 
}

body.light-mode {
  --c: #0044ff;
  --bg-color: #ffffff;
  --text: #000;
  --f: blur(25px) saturate(180%) brightness(0.95); 
  --island-bg: rgba(245, 245, 245, 0.7); 
  --shadow-color: rgba(0, 68, 255, 0.05);
  --bg-overlay: rgba(255, 255, 255, 0.3); 
  --accent-grad: linear-gradient(135deg, #7c3aed, #0044ff);
}

* { 
  margin: 0; 
  padding: 0; 
  box-sizing: border-box; 
}

body { 
  font-family: 'Plus Jakarta Sans', sans-serif; 
  color: var(--text); 
  min-height: 100vh; 
  overflow-x: hidden; 
  overflow-y: auto; 
  background-color: var(--bg-color); 
}

/* Scrollbar personalizat */
html::-webkit-scrollbar {
  width: 8px;
}
html::-webkit-scrollbar-track {
  background: var(--bg-color);
}
html::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.15);
  border-radius: 10px;
}
html.light-mode::-webkit-scrollbar-thumb {
  background: rgba(0, 0, 0, 0.15);
}

/* --- CONTAINER FUNDAL --- */
.container { 
  position: fixed; 
  inset: 0; 
  width: 100%; 
  height: 100%; 
  z-index: 1; 
  background-color: var(--bg-color); 
  overflow: hidden; 
}

.container::after { 
  content: ""; 
  position: absolute; 
  inset: 0; 
  z-index: 2; /* Deasupra video, asigură doar masca transparentă de contrast */
  background-color: var(--bg-overlay); 
}

/* VIDEOCLIPURI */
.bg-video {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center bottom; 
  display: block; 
}

/* --- DASHBOARD UI --- */
.ui-container { 
  min-height: 100vh; 
  display: flex; 
  flex-direction: column; 
  padding: 130px 30px 120px; 
  position: relative; 
  z-index: 100; 
  background: transparent; 
}

/* EFECT STICLĂ APPLE PE COMPONENTE: Reflexie superioară subțire integrată la top edge */
.glass { 
  background: var(--island-bg); 
  backdrop-filter: var(--f); /* Blurul se aplică DOAR pe componente! */
  -webkit-backdrop-filter: var(--f);
  border: 1px solid rgba(255, 255, 255, 0.12); 
  border-radius: 40px; 
  box-shadow: 
    inset 0 1px 1px rgba(255, 255, 255, 0.1), /* Apple Top Edge Highlight */
    0 15px 35px rgba(0, 0, 0, 0.15);
}

body.light-mode .glass {
  border: 1px solid rgba(255, 255, 255, 0.4);
  box-shadow: 
    inset 0 1px 1px rgba(255, 255, 255, 0.5),
    0 15px 35px rgba(0, 68, 255, 0.04);
}

/* NAVBAR */
.top-nav { 
  position: fixed;
  top: 20px;
  left: 50%;
  transform: translateX(-50%);
  width: calc(100% - 60px);
  max-width: 1250px;
  height: 80px; 
  display: flex; 
  flex-direction: column; /* Necesar pentru extinderea meniul pe mobil */
  justify-content: flex-start; /* Meniul va coborî în jos */
  padding: 0 40px; 
  z-index: 1000;
  overflow: hidden; /* Ascunde linkurile mobile când e închis */
  transition: all 0.4s cubic-bezier(0.25, 1, 0.5, 1);
}

/* Rândul principal interior al navbarului */
.nav-container-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
  height: 80px; /* Înălțime fixă pentru rândul principal */
  flex-shrink: 0;
  transition: height 0.3s ease;
}

body.scrolled .top-nav {
  top: 10px;
  height: 65px;
  background: rgba(22, 22, 22, 0.65);
  border-color: rgba(255, 255, 255, 0.06);
}

body.scrolled .nav-container-inner {
  height: 65px;
}

body.light-mode.scrolled .top-nav {
  background: rgba(245, 245, 245, 0.7);
  border-color: rgba(0, 0, 0, 0.04);
}

/* Link-urile din navbar (pe desktop) */
.nav-center { 
  display: flex; 
  gap: 20px; 
  align-items: center;
}

.nav-center a { 
  position: relative;
  text-decoration: none; 
  color: inherit; 
  font-weight: 800; 
  font-size: 0.85rem; 
  letter-spacing: 1px; 
  opacity: 0.85; /* Optimizat de la 0.6 la 0.85 pentru contrast suficient (Lighthouse 100) */
  padding: 8px 16px;
  border-radius: 20px;
  transition: opacity 0.25s ease, transform 0.15s ease, background-color 0.25s ease; 
}

.nav-center a:hover { 
  opacity: 1; 
  background-color: rgba(255, 255, 255, 0.05);
}

body.light-mode .nav-center a:hover {
  background-color: rgba(0, 0, 0, 0.03);
}

.nav-center a:active {
  transform: scale(0.95);
}

.nav-right { 
  display: flex; 
  align-items: center;
  justify-content: flex-end; 
  gap: 20px;
}

/* MENIU BURGER PENTRU MOBIL */
.burger-menu {
  display: none;
  flex-direction: column;
  justify-content: space-between;
  width: 26px;
  height: 18px;
  background: transparent;
  border: none;
  cursor: pointer;
  padding: 0;
  z-index: 1001; 
}

.burger-menu span {
  width: 100%;
  height: 3px;
  background-color: var(--text);
  border-radius: 5px;
  transition: all 0.3s cubic-bezier(0.25, 1, 0.5, 1);
}

.burger-menu.open span:nth-child(1) {
  transform: translateY(7.5px) rotate(45deg);
}
.burger-menu.open span:nth-child(2) {
  opacity: 0;
}
.burger-menu.open span:nth-child(3) {
  transform: translateY(-7.5px) rotate(-45deg);
}

/* PANORAMIC VIEW (GRILĂ PE DESKTOP) */
.panoramic-view { 
  flex: 1; 
  display: grid; 
  grid-template-columns: 1.15fr 1fr 1.15fr; 
  gap: 30px;
  align-items: center;
  width: 100%;
  max-width: 1250px; 
  margin: 0 auto;  
}

/* STRUCTURA COLOANEI DIN DREAPTA */
.right-column {
  display: flex;
  flex-direction: column;
  gap: 30px;
  width: 100%;
  height: 100%;
  justify-content: center;
}

/* CARDURI */
.island { 
  width: 100%; 
  padding: 40px; 
  border-radius: 40px !important; 
  transition: transform 0.5s cubic-bezier(0.075, 0.82, 0.165, 1), box-shadow 0.3s ease, border-color 0.3s ease; 
  display: flex; 
  flex-direction: column; 
  align-items: center; 
  justify-content: center; 
  text-align: center; 
}

/* GLOW DISCRET PE MARGINI DUAL-TONE (Purple + Blue) */
.island:hover {
  border-color: rgba(168, 85, 247, 0.35);
  box-shadow: 
    inset 0 1px 1px rgba(255, 255, 255, 0.12),
    0 20px 45px rgba(0, 153, 255, 0.08), 
    0 5px 20px rgba(168, 85, 247, 0.04);
}

/* Bio Island (Stânga) */
.bio-island { 
  align-items: flex-start; 
  text-align: left; 
  min-height: 530px; 
}

.avatar-container {
  width: 90px;
  height: 90px;
  border-radius: 50%;
  overflow: hidden;
  margin-bottom: 20px;
  border: 3px solid #a855f7; 
  box-shadow: 0 8px 25px var(--shadow-color);
  background: rgba(255, 255, 255, 0.1);
  display: flex;
  align-items: center;
  justify-content: center;
}

.profile-avatar {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.bio-text {
  font-size: 1rem;
  line-height: 1.5;
  margin-top: 10px;
  opacity: 0.85;
}

.label { 
  font-size: 0.75rem; 
  font-weight: 800; 
  color: var(--c); 
  letter-spacing: 3px; 
  text-transform: uppercase; 
}

h1 { 
  font-size: 2.5rem; 
  font-weight: 800; 
  line-height: 1.15; 
  margin: 15px 0; 
}

h2 {
  font-size: 1.8rem;
  font-weight: 800;
  margin-bottom: 12px;
}

/* GRADIENT PE TEXT */
.accent { 
  background: var(--accent-grad);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.widget-stack { 
  width: 100%; 
  margin-top: 25px; 
  display: flex;
  flex-direction: column;
  gap: 12px; 
}

.w-item { 
  width: 100%; 
  padding: 16px 20px; 
  text-decoration: none; 
  color: inherit; 
  font-weight: 700; 
  font-size: 0.95rem; 
  text-align: left; 
  display: block; 
  border: 1px solid rgba(255, 255, 255, 0.05); 
  transition: transform 0.2s cubic-bezier(0.25, 1, 0.5, 1), box-shadow 0.2s ease, border-color 0.2s ease;
}

body.light-mode .w-item {
  border: 1px solid rgba(0, 0, 0, 0.05);
}

.w-item:hover {
  transform: translateY(-4px);
  border-color: var(--c);
  box-shadow: 0 8px 20px var(--shadow-color);
}

.w-item:active {
  transform: translateY(1px) scale(0.97);
}

/* Focal Island (Mijloc - Cerc pe desktop) */
.focal-island { 
  width: 100%;
  max-width: 380px;
  aspect-ratio: 1 / 1; 
  border-radius: 50% !important; 
  margin: 0 auto;
  padding: 0;
}

.focal-content { 
  display: flex; 
  flex-direction: column; 
  align-items: center; 
  justify-content: center; 
  width: 100%; 
}

.floating-books { 
  font-size: 5rem; 
  margin-bottom: 15px; 
  animation: float 4s infinite ease-in-out; 
  transition: transform 0.6s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.focal-island:hover .floating-books {
  transform: scale(1.15) rotate(10deg);
}

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

/* BUTON INTERACTIV LANSARE (Cu gradient asortat) */
.uiverse-launch {
  width: 11em; 
  position: relative; 
  height: 3.5em; 
  border: 3px solid #a855f7; 
  outline: none; 
  background: transparent; 
  color: var(--text);
  border-radius: 0.3em; 
  font-size: 16px; 
  font-weight: bold;
  cursor: pointer; 
  text-decoration: none; 
  display: flex; 
  align-items: center; 
  justify-content: center; 
  margin-top: 15px;
  transition: box-shadow 0.3s ease, transform 0.2s cubic-bezier(0.25, 1, 0.5, 1);
}

.uiverse-launch::after, .uiverse-launch::before {
  content: ""; 
  position: absolute; 
  left: 2.5%; 
  width: 95%; 
  height: 40%;
  background-color: var(--island-bg); 
  transition: 0.4s cubic-bezier(0.25, 1, 0.5, 1); 
  transform-origin: center; 
  z-index: -1;
}

.uiverse-launch::after { top: -10px; }
.uiverse-launch::before { top: 80%; }
.uiverse-launch span { position: relative; z-index: 2; }
.uiverse-launch:hover::before, .uiverse-launch:hover::after { transform: scale(0); }
.uiverse-launch:hover { 
  box-shadow: inset 0px 0px 25px rgba(0, 153, 255, 0.4), 0 0 15px rgba(168, 85, 247, 0.3); 
}

.uiverse-launch:active {
  transform: translateY(1px) scale(0.95) !important;
}

/* Contact Island */
.contact-island { 
  width: 100%;
  min-height: 250px;
  border-radius: 40px !important; 
  padding: 30px;
}

/* Secțiunea News */
.news-island {
  width: 100%;
  height: 250px;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  text-align: left;
  padding: 24px 20px;
}

.news-container {
  flex: 1;
  margin-top: 15px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding-right: 5px;
}

.news-container::-webkit-scrollbar {
  width: 4px;
}
.news-container::-webkit-scrollbar-track {
  background: transparent;
}
.news-container::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.15);
  border-radius: 10px;
}
body.light-mode .news-container::-webkit-scrollbar-thumb {
  background: rgba(0, 0, 0, 0.1);
}

.news-item {
  display: flex;
  gap: 10px;
  padding: 12px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.03);
  text-decoration: none;
  color: inherit;
  transition: transform 0.2s cubic-bezier(0.25, 1, 0.5, 1), border-color 0.2s ease, background-color 0.2s ease;
}

body.light-mode .news-item {
  background: rgba(0, 0, 0, 0.01);
  border: 1px solid rgba(0, 0, 0, 0.02);
}

.news-item:hover {
  background: rgba(255, 255, 255, 0.05);
  border-color: var(--c);
  transform: translateY(-2px);
}

body.light-mode .news-item:hover {
  background: rgba(0, 0, 0, 0.03);
}

.news-item:active {
  transform: scale(0.97);
}

.news-icon {
  font-size: 1.3rem;
  display: flex;
  align-items: center;
  justify-content: center;
}

.news-content {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.news-date {
  font-size: 0.65rem;
  font-weight: 800;
  color: var(--c);
  opacity: 0.8;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.news-text {
  font-size: 0.8rem;
  line-height: 1.3;
  opacity: 0.9;
}

/* Footer */
.footer-container { 
  margin-top: 50px;
  width: 100%; 
  display: flex; 
  justify-content: center; 
  pointer-events: none; 
}

.footer-pill { 
  padding: 12px 40px; 
  border-radius: 100px; 
  font-size: 0.75rem; 
  pointer-events: auto; 
  transition: transform 0.2s ease, background-color 0.2s ease;
}

.footer-pill:hover {
  transform: scale(1.03);
  background-color: rgba(255, 255, 255, 0.1);
}

body.light-mode .footer-pill:hover {
  background-color: rgba(0, 0, 0, 0.05);
}

/* THEME SWITCH */
.theme-switch { scale: 0.8; transition: transform 0.2s ease; }
.theme-switch:active { transform: scale(0.9); }
.theme-switch__container { width: 5.6em; height: 2.5em; background: #5caad4; border-radius: 0.4em; position: relative; cursor: pointer; filter: url(#sketchy); transition: 0.5s; }
.theme-switch__checkbox { display: none; }
.theme-switch__checkbox:checked + .theme-switch__container { background: #1b1e36; }
.theme-switch__circle-container { width: 3.3em; height: 3.3em; position: absolute; left: -0.4em; top: -0.4em; transition: 0.4s; }
.theme-switch__checkbox:checked + .theme-switch__container .theme-switch__circle-container { left: calc(100% - 3em); }
.theme-switch__sun-moon-container { width: 2.1em; height: 2.1em; background: #f5c518; border-radius: 0.4em; margin: auto; display: flex; transition: 0.5s; }
.theme-switch__checkbox:checked + .theme-switch__container .theme-switch__sun-moon-container { background: #d8d4c0; }

/* =========================
   SOCIAL MEDIA (Grupare rotundă)
   ========================= */
.social-orbit {
  width: 208px;
  height: 208px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  grid-template-rows: 1fr 1fr;
  gap: 8px;
  margin: 12px auto 0;
  border-radius: 50%;
  overflow: hidden;
}

.social-card {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
  background: #fff;
  color: #000;
  text-decoration: none;
  transition: transform 0.2s cubic-bezier(0.25, 1, 0.5, 1), background 0.25s ease, color 0.25s ease;
}

.social-card svg {
  width: 29px;
  height: 29px;
  fill: currentColor;
  transition: transform 0.2s cubic-bezier(0.175, 0.885, 0.32, 1.275), fill 0.2s ease;
}

.social-instagram { border-radius: 104px 6px 6px 6px; }
.social-facebook { border-radius: 6px 104px 6px 6px; }
.social-youtube { border-radius: 6px 6px 6px 104px; }
.social-tiktok { border-radius: 6px 6px 104px 6px; }

.social-instagram:hover { 
  background: #e1306c; 
  color: white; 
  z-index: 2; 
  box-shadow: 4px 4px 15px rgba(225, 48, 108, 0.4);
}
.social-facebook:hover { 
  background: #1877f2; 
  color: white; 
  z-index: 2; 
  box-shadow: -4px 4px 15px rgba(24, 119, 242, 0.4);
}
.social-youtube:hover { 
  background: #ff0000; 
  color: white; 
  z-index: 2; 
  box-shadow: 4px -4px 15px rgba(255, 0, 0, 0.4);
}
.social-tiktok:hover { 
  background: #111; 
  color: white; 
  z-index: 2; 
  box-shadow: 0px 4px 15px rgba(17, 17, 17, 0.5);
}

.social-card:active {
  transform: scale(0.9) !important;
}

.social-card:hover svg {
  transform: scale(1.15);
}

/* =========================
   SCROLL REVEAL CLASE
   ========================= */
.reveal {
  opacity: 0;
  transform: translateY(35px);
  transition: opacity 0.8s cubic-bezier(0.25, 1, 0.5, 1), transform 0.8s cubic-bezier(0.25, 1, 0.5, 1);
}

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


/* =========================================================================
   MEDIA QUERY 1: TABLETĂ (ecrane medii 768px - 1023px)
   ========================================================================= */
@media (max-width: 1023px) and (min-width: 768px) {
  .panoramic-view {
    grid-template-columns: 1fr 1fr; 
    max-width: 850px;
    padding: 20px;
  }

  .bio-island {
    grid-column: span 2; 
    min-height: auto;
  }

  .focal-island {
    max-width: 320px;
    height: 320px;
  }

  .right-column {
    height: auto;
  }
}

/* =========================================================================
   MEDIA QUERY 2: MOBIL (ecrane sub 767px) - MENIU INTEGRAT DINAMIC
   ========================================================================= */
@media (max-width: 767px) {
  .top-nav {
    padding: 0 24px;
    width: calc(100% - 30px);
    height: 70px; /* Înălțime mai compactă pe mobil */
  }

  body.scrolled .top-nav {
    top: 10px;
    height: 60px;
  }

  .nav-container-inner {
    height: 70px;
  }

  body.scrolled .nav-container-inner {
    height: 60px;
  }

  /* Când este deschis, navbar-ul își mărește înălțimea în jos */
  .top-nav.open {
    height: 290px !important; 
    border-color: rgba(255, 255, 255, 0.08);
  }

  /* RE-PROIECTARE MENIU INTEGRAT: Coboară din navbar */
  .nav-center {
    display: flex; 
    flex-direction: column;
    align-items: center;
    gap: 20px;
    width: 100%;
    padding: 20px 0 30px;
    opacity: 0;
    transform: translateY(-10px);
    pointer-events: none;
    transition: opacity 0.35s ease, transform 0.35s cubic-bezier(0.25, 1, 0.5, 1);
  }

  /* Afișarea lină a link-urilor la extindere */
  .top-nav.open .nav-center {
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
  }

  .burger-menu {
    display: flex; 
  }

  .panoramic-view {
    display: flex;
    flex-direction: column; 
    align-items: center;
    gap: 25px;
    padding: 20px 15px;
    width: 100%;
    max-width: 480px; 
    margin: 0 auto;
  }

  .island {
    border-radius: 30px !important;
    padding: 30px 20px;
    width: 100%;
  }

  .bio-island {
    min-height: auto;
  }

  h1 {
    font-size: 2rem;
  }

  .focal-island {
    width: 320px;
    height: 320px;
    border-radius: 50% !important;
  }

  .floating-books {
    font-size: 4.5rem;
  }

  .right-column {
    gap: 25px;
    width: 100%;
    align-items: center;
  }

  .contact-island {
    width: 320px;
    height: 320px;
    border-radius: 50% !important; 
  }

  .news-island {
    height: 320px;
  }

  /* OPTIMIZARE CPU MOBILĂ - FĂRĂ ANIMĂRI GRELE */
  .container {
    animation: none !important;
    will-change: auto !important;
  }
  
  .container::after {
    backdrop-filter: none !important;
    will-change: auto !important;
    background-color: rgba(0, 0, 0, 0.75) !important; 
  }
  
  body.light-mode .container::after {
    background-color: rgba(255, 255, 255, 0.8) !important;
  }

  .social-card:hover {
    transform: none !important;
    box-shadow: none !important;
  }
}