/*
Theme Name: VannamIT 
Theme URI: https://vannamit.com
Author: Văn Nam IT
Author URI: https://vannamit.com
Description: Giao diện WordPress Theme phong cách dành cho Blog công nghệ, Lập trình viên & Portfolio cá nhân. Tích hợp Dark/Light Mode, Particle Background, Glassmorphism UI, AI Chatbox, Tech Stack & Activity Graph.
Version: 3.2.2
License: GNU General Public License v2 or later
Text Domain: vannamit
*/

/* ==========================================================================
   DESIGN SYSTEM & CSS VARIABLES
   ========================================================================== */
:root {
  /* Color Palette - Light Mode (#f8f0e8 Warm Light Theme as Default) */
  --bg-primary: #f8f0e8;
  --bg-secondary: #ffffff;
  --bg-surface: rgba(255, 255, 255, 0.92);
  --bg-surface-hover: #f1e4d5;
  --glass-bg: rgba(255, 255, 255, 0.88);
  --glass-border: rgba(92, 45, 10, 0.12);
  --glass-border-hover: rgba(92, 45, 10, 0.35);

  /* Brand Colors */
  --cyan: #5c2d0a;
  --cyan-dim: rgba(92, 45, 10, 0.12);
  --purple: #7a3e10;
  --pink: #d97706;
  --accent-gradient: linear-gradient(135deg, #00d4ff 0%, #7b2ff7 50%, #ff6bca 100%);
  --accent-gradient-hover: linear-gradient(135deg, #33dfff 0%, #8f48ff 50%, #ff85d5 100%);

  /* Typography Colors */
  --text-primary: #2b180a;
  --text-secondary: #5c3a21;
  --text-muted: #8c694d;
  --text-inverse: #ffffff;

  /* Fonts */
  --font-sans: 'Inter', 'Be Vietnam Pro', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-mono: 'JetBrains Mono', Consolas, Monaco, monospace;
  --font-heading: 'Space Grotesk', 'Inter', sans-serif;

  /* Borders & Shadows */
  --border-default: rgba(92, 45, 10, 0.12);
  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 20px;
  --radius-full: 9999px;
  --shadow-sm: 0 4px 12px rgba(92, 45, 10, 0.05);
  --shadow-md: 0 8px 24px rgba(92, 45, 10, 0.1);
  --shadow-glow: 0 0 25px rgba(92, 45, 10, 0.15);
  --shadow-glow-purple: 0 0 25px rgba(123, 47, 247, 0.25);

  /* Layout */
  --max-width: 1280px;
  --header-height: 64px;
}

/* Dark Mode Overrides */
[data-theme="dark"] {
  --bg-primary: #0a0d14;
  --bg-secondary: #121824;
  --bg-surface: rgba(18, 24, 36, 0.75);
  --bg-surface-hover: rgba(26, 35, 52, 0.85);
  --glass-bg: rgba(15, 22, 36, 0.65);
  --glass-border: rgba(255, 255, 255, 0.08);
  --glass-border-hover: rgba(0, 212, 255, 0.3);

  --cyan: #00d4ff;
  --cyan-dim: rgba(0, 212, 255, 0.15);
  --purple: #7b2ff7;
  --pink: #ff6bca;

  --text-primary: #f0f4fc;
  --text-secondary: #a0aec0;
  --text-muted: #64748b;
  --text-inverse: #0a0d14;

  --border-default: rgba(255, 255, 255, 0.08);
  --shadow-sm: 0 4px 12px rgba(0, 0, 0, 0.2);
  --shadow-md: 0 8px 24px rgba(0, 0, 0, 0.35);
  --shadow-glow: 0 0 25px rgba(0, 212, 255, 0.25);
}

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

html {
  font-family: var(--font-sans);
  font-size: 15px;
  line-height: 1.6;
  color: var(--text-primary);
  background-color: var(--bg-primary);
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  min-height: 100vh;
  position: relative;
  overflow-x: hidden;
  background-color: var(--bg-primary);
  color: var(--text-primary);
  transition: background-color 0.3s ease, color 0.3s ease;
}

a {
  color: var(--cyan);
  text-decoration: none;
  transition: color 0.2s ease, opacity 0.2s ease;
}

a:hover {
  color: var(--pink);
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

button, input, select, textarea {
  font-family: inherit;
  font-size: inherit;
  color: inherit;
  outline: none;
}

button {
  cursor: pointer;
  border: none;
  background: none;
}

ul, ol {
  list-style: none;
}

/* ==========================================================================
   PARTICLE CANVAS & GRADIENT ORBS
   ========================================================================== */
#particle-canvas {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 0;
  opacity: 0.6;
}

.gradient-orbs {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  overflow: hidden;
  pointer-events: none;
  z-index: 0;
}

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

.orb-1 {
  width: 450px;
  height: 450px;
  background: var(--cyan);
  top: -100px;
  left: -100px;
}

.orb-2 {
  width: 500px;
  height: 500px;
  background: var(--purple);
  bottom: -150px;
  right: -150px;
  animation-delay: -5s;
}

.orb-3 {
  width: 350px;
  height: 350px;
  background: var(--pink);
  top: 40%;
  left: 50%;
  transform: translate(-50%, -50%);
  animation-delay: -10s;
}

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

/* ==========================================================================
   LAYOUT STRUCTURE
   ========================================================================== */
.main-wrapper {
  position: relative;
  z-index: 1;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 80px 20px 40px;
}

.layout {
  display: grid;
  grid-template-columns: 310px 1fr;
  gap: 28px;
  align-items: start;
}

@media (min-width: 993px) {
  aside.profile-card,
  .profile-card,
  #profile-card {
    position: sticky !important;
    top: 90px !important;
    align-self: start !important;
    z-index: 10 !important;
  }
}

/* Single Post Page 1-column Full Width Reading View */
body.single .layout,
body.single-post .layout,
body.wp-singular .layout,
div.layout-single,
.layout.layout-single,
.single .layout,
#main .layout-single {
  display: block !important;
  max-width: 100% !important;
  margin: 0 auto !important;
  width: 100% !important;
  grid-template-columns: 100% !important;
}

body.single .content-area,
body.single-post .content-area,
body.wp-singular .content-area,
div.layout-single .content-area,
.layout-single .content-area,
.single .content-area,
#main .layout-single .content-area {
  width: 100% !important;
  max-width: 100% !important;
  grid-column: 1 / -1 !important;
}

body.single .profile-card,
body.single-post .profile-card,
body.wp-singular .profile-card,
.layout-single .profile-card,
.single .profile-card,
body.single aside,
.layout-single aside {
  display: none !important;
}

@media (max-width: 992px) {
  .layout {
    display: flex !important;
    flex-direction: column !important;
    gap: 24px !important;
  }

  .content-area {
    order: 1 !important;
    width: 100% !important;
  }

  .profile-card,
  .profile-sidebar,
  aside {
    order: 2 !important;
    width: 100% !important;
  }
}

/* Glassmorphism Card Utility */
.glass-card {
  background: var(--glass-bg);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
  transition: border-color 0.3s ease, transform 0.3s ease, box-shadow 0.3s ease;
}

.glass-card:hover {
  border-color: var(--glass-border-hover);
}
