/* ============================================
   GLASSMORPHISM PORTFOLIO THEME v4.0
   Futuristic UI - Apple Vision Pro Style
   ============================================ */

/* ===== FONTS ===== */
@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;500;600;700;800&family=Space+Grotesk:wght@400;500;600;700&family=JetBrains+Mono:wght@400;500&display=swap');

/* ===== CSS VARIABLES ===== */
:root {
  /* --- DARK MODE (Default) --- */
  --bg-page: #050508;
  --bg-mesh-1: #0f0a2e;
  --bg-mesh-2: #1a0a3a;
  --bg-mesh-3: #0a1a2e;

  --bg-glass: rgba(15, 15, 25, 0.6);
  --bg-glass-hover: rgba(25, 25, 40, 0.7);

  --text-main: #f0f0f5;
  --text-muted: #9090a0;
  --text-dim: #606070;

  --accent-primary: #6366f1;
  /* Indigo */
  --accent-secondary: #22d3ee;
  /* Cyan */
  --accent-tertiary: #a855f7;
  /* Purple */
  --accent-glow: rgba(99, 102, 241, 0.4);

  --border-glass: rgba(255, 255, 255, 0.08);
  --border-hover: rgba(99, 102, 241, 0.5);

  --shadow-glass: 0 8px 32px rgba(0, 0, 0, 0.4);
  --shadow-glow: 0 0 40px var(--accent-glow);

  /* --- LAYOUT --- */
  --radius-sm: 12px;
  --radius-md: 18px;
  --radius-lg: 24px;
  --radius-xl: 32px;

  --container-width: 1200px;
  --header-height: 72px;

  /* --- TYPOGRAPHY --- */
  --font-display: 'Outfit', 'Space Grotesk', sans-serif;
  --font-body: 'Outfit', sans-serif;
  --font-mono: 'JetBrains Mono', monospace;

  /* --- EFFECTS --- */
  --blur-glass: blur(20px) saturate(180%);
  --transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

/* --- LIGHT MODE --- */
[data-theme="light"] {
  --bg-page: #f0f2f5;
  --bg-mesh-1: #e8f0ff;
  --bg-mesh-2: #ffe8f8;
  --bg-mesh-3: #e8fff0;

  --bg-glass: rgba(255, 255, 255, 0.7);
  --bg-glass-hover: rgba(255, 255, 255, 0.85);

  --text-main: #0a0a15;
  --text-muted: #505060;
  --text-dim: #808090;

  --accent-primary: #4f46e5;
  --accent-secondary: #0891b2;
  --accent-tertiary: #9333ea;
  --accent-glow: rgba(79, 70, 229, 0.2);

  --border-glass: rgba(0, 0, 0, 0.06);
  --border-hover: rgba(79, 70, 229, 0.4);

  --shadow-glass: 0 4px 24px rgba(0, 0, 0, 0.08);
  --shadow-glow: none;
}

/* ===== RESET ===== */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
}

/* ===== ANIMATED MESH GRADIENT BACKGROUND ===== */
body {
  background: var(--bg-page);
  color: var(--text-main);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.6;
  min-height: 100vh;
  overflow-x: hidden;
  position: relative;
}

/* Animated Orbs */
body::before,
body::after {
  content: '';
  position: fixed;
  border-radius: 50%;
  filter: blur(100px);
  opacity: 0.6;
  z-index: -1;
  animation: float 20s ease-in-out infinite;
}

body::before {
  width: 600px;
  height: 600px;
  background: radial-gradient(circle, var(--accent-primary) 0%, transparent 70%);
  top: -200px;
  left: -200px;
  animation-delay: 0s;
}

body::after {
  width: 500px;
  height: 500px;
  background: radial-gradient(circle, var(--accent-tertiary) 0%, transparent 70%);
  bottom: -150px;
  right: -150px;
  animation-delay: -10s;
}

/* Third orb via pseudo on main */
.mesh-orb {
  position: fixed;
  width: 400px;
  height: 400px;
  border-radius: 50%;
  background: radial-gradient(circle, var(--accent-secondary) 0%, transparent 70%);
  filter: blur(80px);
  opacity: 0.4;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  z-index: -1;
  animation: pulse-orb 15s ease-in-out infinite;
  pointer-events: none;
}

@keyframes float {

  0%,
  100% {
    transform: translate(0, 0) scale(1);
  }

  25% {
    transform: translate(50px, 30px) scale(1.1);
  }

  50% {
    transform: translate(20px, -40px) scale(0.95);
  }

  75% {
    transform: translate(-30px, 20px) scale(1.05);
  }
}

@keyframes pulse-orb {

  0%,
  100% {
    opacity: 0.3;
    transform: translate(-50%, -50%) scale(1);
  }

  50% {
    opacity: 0.5;
    transform: translate(-50%, -50%) scale(1.2);
  }
}

/* ===== GLASSMORPHISM BASE ===== */
.glass {
  background: var(--bg-glass);
  backdrop-filter: var(--blur-glass);
  -webkit-backdrop-filter: var(--blur-glass);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-glass);
}

/* ===== TYPOGRAPHY ===== */
h1,
h2,
h3,
h4,
h5,
h6 {
  font-family: var(--font-display);
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.1;
  color: var(--text-main);
}

h1 {
  font-size: clamp(2.5rem, 6vw, 4rem);
}

h2 {
  font-size: clamp(1.75rem, 4vw, 2.5rem);
}

h3 {
  font-size: clamp(1.25rem, 3vw, 1.5rem);
}

a {
  text-decoration: none;
  color: inherit;
}

img {
  display: block;
  max-width: 100%;
}

ul,
ol {
  list-style: none;
}

/* ===== UTILITIES ===== */
.container {
  width: 100%;
  max-width: var(--container-width);
  margin: 0 auto;
  padding: 0 24px;
}

.text-gradient {
  background: linear-gradient(135deg, var(--accent-primary), var(--accent-tertiary));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.text-glow {
  text-shadow: 0 0 30px var(--accent-glow);
}

/* ===== NAVIGATION (GLASS) ===== */
.app-top {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  height: var(--header-height);
  background: var(--bg-glass);
  backdrop-filter: var(--blur-glass);
  -webkit-backdrop-filter: var(--blur-glass);
  border-bottom: 1px solid var(--border-glass);
  transition: var(--transition);
}

.app-top__bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  height: 100%;
}

.brand {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.brand__name {
  font-family: var(--font-display);
  font-size: 20px;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--text-main);
}

.brand__meta {
  font-size: 12px;
  font-family: var(--font-mono);
  color: var(--text-muted);
}

/* ===== BUTTONS ===== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 24px;
  border: none;
  border-radius: 100px;
  font-family: var(--font-body);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
}

.btn-primary {
  background: linear-gradient(135deg, var(--accent-primary), var(--accent-tertiary));
  color: #fff;
  box-shadow: 0 4px 20px var(--accent-glow);
}

.btn-primary:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 30px var(--accent-glow);
}

.btn-secondary {
  background: var(--bg-glass);
  backdrop-filter: var(--blur-glass);
  color: var(--text-main);
  border: 1px solid var(--border-glass);
}

.btn-secondary:hover {
  background: var(--bg-glass-hover);
  border-color: var(--border-hover);
}

.theme-toggle {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  background: var(--bg-glass);
  backdrop-filter: var(--blur-glass);
  -webkit-backdrop-filter: var(--blur-glass);
  border: 1px solid var(--border-glass);
  border-radius: 50%;
  color: var(--text-main);
  cursor: pointer;
  transition: transform 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease, background 0.3s ease;
  position: relative;
  overflow: hidden;
}

.theme-toggle i {
  font-size: 20px;
  transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.3s ease;
}

.theme-toggle:hover {
  border-color: var(--border-hover);
  box-shadow: 0 0 20px var(--accent-glow);
  transform: scale(1.05);
}

.theme-toggle:focus-visible {
  outline: none;
  box-shadow: 0 0 0 3px var(--accent-primary), 0 0 20px var(--accent-glow);
}

.theme-toggle:active {
  transform: scale(0.95);
}

/* Icon rotation animation on theme change */
.theme-toggle.switching i {
  transform: rotate(360deg);
}

/* Global theme transition (scoped) */
html.theme-transition,
html.theme-transition *,
html.theme-transition *::before,
html.theme-transition *::after {
  transition: background-color 0.3s ease, border-color 0.3s ease, color 0.3s ease, box-shadow 0.3s ease !important;
}

/* Respect reduced motion */
@media (prefers-reduced-motion: reduce) {

  .theme-toggle,
  .theme-toggle i,
  html.theme-transition,
  html.theme-transition *,
  html.theme-transition *::before,
  html.theme-transition *::after {
    transition: none !important;
  }
}

/* ===== HERO SECTION ===== */
.hero-section {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 60px;
  padding-top: calc(var(--header-height) + 80px);
  padding-bottom: 60px;
}

.hero-content {
  flex: 1;
  max-width: 600px;
}

.hero-visual {
  flex-shrink: 0;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 18px;
  margin-bottom: 24px;
  background: var(--bg-glass);
  backdrop-filter: var(--blur-glass);
  border: 1px solid var(--border-glass);
  border-radius: 100px;
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 600;
  color: var(--accent-secondary);
  letter-spacing: 0.05em;
}

.hero-title {
  margin-bottom: 24px;
}

.hero-subtitle {
  font-size: 18px;
  color: var(--text-muted);
  margin-bottom: 32px;
  line-height: 1.7;
}

/* ===== TECH STACK ===== */
.tech-stack {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.tech-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 16px;
  background: var(--bg-glass);
  backdrop-filter: var(--blur-glass);
  border: 1px solid var(--border-glass);
  border-radius: 100px;
  font-size: 13px;
  color: var(--text-muted);
  transition: var(--transition);
}

.tech-pill:hover {
  border-color: var(--accent-primary);
  color: var(--text-main);
  box-shadow: 0 0 20px var(--accent-glow);
}

/* ===== BENTO GRID ===== */
.bento-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  grid-auto-rows: minmax(180px, auto);
  gap: 20px;
  margin-bottom: 60px;
}

/* ===== GLASS CARDS ===== */
.bento-card,
.cyber-card {
  position: relative;
  display: flex;
  flex-direction: column;
  background: var(--bg-glass);
  backdrop-filter: var(--blur-glass);
  -webkit-backdrop-filter: var(--blur-glass);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-lg);
  padding: 24px;
  overflow: hidden;
  transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1),
    border-color 0.3s ease,
    box-shadow 0.4s ease;
  box-shadow: var(--shadow-glass);
  will-change: transform, box-shadow;
}

.bento-card:hover,
.cyber-card:hover {
  transform: translateY(-4px) scale(1.01);
  border-color: var(--border-hover);
  box-shadow: var(--shadow-glass), 0 15px 40px rgba(99, 102, 241, 0.15);
}

/* Accessibility: Reduce motion if user prefers */
@media (prefers-reduced-motion: reduce) {

  .bento-card,
  .cyber-card {
    transition: none;
  }

  .bento-card:hover,
  .cyber-card:hover {
    transform: none;
  }
}

.bento-card.has-image {
  padding: 0;
}

.bento-card.has-image .card-content {
  padding: 20px;
}

.span-2 {
  grid-column: span 2;
}

.span-3 {
  grid-column: span 3;
}

.span-4 {
  grid-column: span 4;
}

.row-2 {
  grid-row: span 2;
}

/* ===== CARD COMPONENTS ===== */
.card-image-wrapper {
  position: relative;
  width: 100%;
  height: 180px;
  overflow: hidden;
}

.card-image-wrapper img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.6s ease;
}

.bento-card:hover .card-image-wrapper img {
  transform: scale(1.05);
}

.card-tags {
  position: absolute;
  top: 12px;
  left: 12px;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.tag {
  padding: 5px 12px;
  background: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 100px;
  font-size: 11px;
  font-weight: 600;
  color: #fff;
}

.card-content {
  flex: 1;
  display: flex;
  flex-direction: column;
}

.card-title {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-display);
  font-size: 18px;
  font-weight: 700;
  margin-bottom: 10px;
  color: var(--text-main);
}

.card-subtitle {
  font-size: 13px;
  font-weight: 500;
  color: var(--text-muted);
  margin-bottom: 8px;
}

.card-desc {
  font-size: 14px;
  color: var(--text-dim);
  line-height: 1.6;
}

/* ===== FOOTER (GLASS) ===== */
.site-footer {
  background: var(--bg-glass);
  backdrop-filter: var(--blur-glass);
  border-top: 1px solid var(--border-glass);
  padding: 40px 0;
  margin-top: 60px;
  text-align: center;
}

.site-footer p {
  font-size: 14px;
  color: var(--text-dim);
}

/* ===== RESPONSIVE ===== */
@media (max-width: 1024px) {
  .bento-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .span-3,
  .span-4 {
    grid-column: span 2;
  }
}

@media (max-width: 768px) {
  .hero-section {
    flex-direction: column;
    text-align: center;
    gap: 40px;
  }

  .hero-content {
    max-width: 100%;
  }

  .hero-badge {
    margin-left: auto;
    margin-right: auto;
  }

  .bento-grid {
    grid-template-columns: 1fr;
  }

  .span-2,
  .span-3,
  .span-4 {
    grid-column: span 1;
  }

  body::before,
  body::after {
    opacity: 0.3;
  }
}

/* ===== SCROLLBAR ===== */
::-webkit-scrollbar {
  width: 8px;
}

::-webkit-scrollbar-track {
  background: var(--bg-page);
}

::-webkit-scrollbar-thumb {
  background: var(--border-glass);
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: var(--accent-primary);
}

/* ===== SELECTION ===== */
::selection {
  background: var(--accent-primary);
  color: #fff;
}

/* ===== IMAGE LIGHTBOX ===== */
.lightbox-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.9);
  backdrop-filter: blur(20px);
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
  cursor: zoom-out;
}

.lightbox-overlay.active {
  opacity: 1;
  visibility: visible;
}

.lightbox-overlay img {
  max-width: 90%;
  max-height: 90vh;
  object-fit: contain;
  border-radius: var(--radius-md);
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
}

.lightbox-close {
  position: absolute;
  top: 20px;
  right: 20px;
  width: 48px;
  height: 48px;
  background: var(--bg-glass);
  backdrop-filter: var(--blur-glass);
  border: 1px solid var(--border-glass);
  border-radius: 50%;
  color: #fff;
  font-size: 24px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}

.zoomable {
  cursor: zoom-in;
}

.zoomable:hover {
  transform: scale(1.02);
}

/* ===== STAT NUMBERS ===== */
.stat-number {
  font-family: var(--font-display);
  font-size: clamp(2.5rem, 5vw, 4rem);
  font-weight: 800;
  line-height: 1;
  background: linear-gradient(135deg, var(--accent-primary), var(--accent-secondary));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.stat-label {
  font-size: 12px;
  color: var(--text-dim);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-top: 8px;
}

/* ===== BREADCRUMBS ===== */
.breadcrumbs {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 20px;
  margin-bottom: 24px;
  background: var(--bg-glass);
  backdrop-filter: var(--blur-glass);
  border: 1px solid var(--border-glass);
  border-radius: var(--radius-md);
  font-size: 13px;
}

.breadcrumbs a {
  color: var(--text-muted);
  transition: color 0.2s ease;
}

.breadcrumbs a:hover {
  color: var(--accent-primary);
}

.breadcrumbs .sep {
  color: var(--text-dim);
  margin: 0 4px;
}

.breadcrumbs .current {
  color: var(--text-main);
  font-weight: 500;
}

/* ===== GALLERY ===== */
.gallery {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 16px;
  margin-top: 40px;
}

.gallery-item {
  position: relative;
  aspect-ratio: 16/10;
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: var(--bg-glass);
  border: 1px solid var(--border-glass);
}

.gallery-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
  cursor: zoom-in;
}

.gallery-item:hover img {
  transform: scale(1.05);
}

.gallery-item .caption {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 16px;
  background: linear-gradient(transparent, rgba(0, 0, 0, 0.8));
  font-size: 13px;
  color: #fff;
}

/* ===== BILAN HIGHLIGHT (NEW) ===== */
.bento-highlight {
  border-color: var(--accent-secondary) !important;
  box-shadow: 0 0 20px rgba(34, 211, 238, 0.2) !important;
  background: linear-gradient(135deg, rgba(34, 211, 238, 0.05), transparent) !important;
}

.bento-highlight .card-title {
  color: var(--accent-secondary);
}

.bento-highlight .card-title::after {
  content: '🎯';
  margin-left: 8px;
  filter: drop-shadow(0 0 5px var(--accent-secondary));
}

/* Note: Footer styles are in premium-footer.css */