/* ==========================================================================
   ANHNGOCINC - PORTFOLIO & BLOG (BENTO GRID / WINDOWS METRO DARK MODE)
   ========================================================================== */

:root {
  /* Core Theme Colors */
  --bg-primary: #0B0F17;        /* Dark Navy / Deep Charcoal */
  --bg-card: #1E293B;           /* Lighter Dark Navy / Slate */
  --bg-card-hover: #243247;
  --bg-card-subtle: rgba(30, 41, 59, 0.6);
  --bg-overlay: rgba(11, 15, 23, 0.88);

  /* Borders & Dividers */
  --border-subtle: rgba(148, 163, 184, 0.12);
  --border-light: rgba(255, 255, 255, 0.08);
  --border-hover: rgba(56, 189, 248, 0.45);
  --border-radius-base: 12px;   /* Theo yêu cầu: bo góc nhẹ 12px */
  --border-radius-sm: 8px;
  --border-radius-full: 9999px;

  /* Neon Tech Accents */
  --neon-blue: #38BDF8;         /* Cyan / Electric Sky Blue */
  --neon-indigo: #6366F1;       /* Indigo Glow */
  --neon-purple: #A855F7;       /* Cyberpunk Violet */
  --neon-emerald: #10B981;      /* Emerald Active Status */
  --neon-pink: #EC4899;         /* Accent Pink */
  
  /* Text Colors */
  --text-primary: #F8FAFC;      /* White */
  --text-secondary: #94A3B8;    /* Light Slate Gray */
  --text-muted: #64748B;        /* Muted Gray */
  --text-accent: #38BDF8;

  /* Shadows & Glows */
  --shadow-card: 0 10px 30px -10px rgba(0, 0, 0, 0.6), 0 4px 6px -2px rgba(0, 0, 0, 0.2);
  --shadow-hover: 0 20px 40px -15px rgba(0, 0, 0, 0.8), 0 0 25px rgba(56, 189, 248, 0.2);
  --shadow-neon-blue: 0 0 20px rgba(56, 189, 248, 0.5);
  --shadow-neon-purple: 0 0 20px rgba(168, 85, 247, 0.5);

  /* Typography */
  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  --font-display: 'Montserrat', var(--font-sans);

  /* Transitions */
  --transition-fast: 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-smooth: 0.35s cubic-bezier(0.16, 1, 0.3, 1);
  --transition-spring: 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
}

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

html {
  font-size: 16px;
  scroll-behavior: smooth;
  background-color: var(--bg-primary);
  color: var(--text-primary);
  font-family: var(--font-sans);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  min-height: 100vh;
  background-color: var(--bg-primary);
  background-image: 
    radial-gradient(circle at 15% 10%, rgba(56, 189, 248, 0.08) 0%, transparent 40%),
    radial-gradient(circle at 85% 85%, rgba(168, 85, 247, 0.08) 0%, transparent 45%),
    radial-gradient(circle at 50% 50%, rgba(30, 41, 59, 0.2) 0%, transparent 70%);
  background-attachment: fixed;
  overflow-x: hidden;
  line-height: 1.5;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}
::-webkit-scrollbar-track {
  background: var(--bg-primary);
}
::-webkit-scrollbar-thumb {
  background: #334155;
  border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
  background: var(--neon-blue);
}

/* --------------------------------------------------------------------------
   LAYOUT WRAPPER
   -------------------------------------------------------------------------- */
.app-viewport {
  position: relative;
  width: 100%;
  min-height: 100vh;
}

/* Bento Area Container */
.bento-wrapper {
  width: 100%;
  max-width: 1360px;
  margin: 0 auto;
  padding: 32px 24px 60px;
}

/* --------------------------------------------------------------------------
   HEADER / BRAND TOPBAR
   -------------------------------------------------------------------------- */
.site-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 24px;
  padding: 12px 18px;
  background: rgba(30, 41, 59, 0.4);
  backdrop-filter: blur(12px);
  border: 1px solid var(--border-light);
  border-radius: var(--border-radius-base);
}

.brand-badge {
  display: flex;
  align-items: center;
  gap: 12px;
}

/* Brand Logo with 3D Tilt and Neon Glow */
.brand-logo-wrapper {
  position: relative;
  width: 56px;
  height: 56px;
  perspective: 800px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.brand-logo-img {
  width: 54px;
  height: 54px;
  object-fit: contain;
  border-radius: 12px;
  transition: transform 0.45s cubic-bezier(0.16, 1, 0.3, 1), filter 0.45s ease;
  filter: drop-shadow(0 0 10px rgba(56, 189, 248, 0.45));
}

.brand-badge:hover .brand-logo-img,
.brand-logo-wrapper:hover .brand-logo-img {
  transform: perspective(600px) rotateY(18deg) rotateX(-10deg) scale(1.12);
  filter: drop-shadow(0 0 22px rgba(56, 189, 248, 0.95)) drop-shadow(0 0 35px rgba(168, 85, 247, 0.75));
}

/* Header Navigation Links */
.site-nav-menu {
  display: flex;
  align-items: center;
  gap: 8px;
  list-style: none;
}

.nav-link-pill {
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--text-secondary);
  text-decoration: none;
  padding: 6px 14px;
  border-radius: var(--border-radius-full);
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border-light);
  transition: all var(--transition-fast);
  display: inline-flex;
  align-items: center;
  gap: 6px;
  white-space: nowrap;
}

.nav-link-pill:hover,
.nav-link-pill.is-active {
  color: #fff;
  background: rgba(56, 189, 248, 0.15);
  border-color: var(--neon-blue);
  box-shadow: 0 0 14px rgba(56, 189, 248, 0.3);
  transform: translateY(-2px);
}

.hotline-btn {
  color: #10B981 !important;
  background: rgba(16, 185, 129, 0.1) !important;
  border-color: rgba(16, 185, 129, 0.3) !important;
  font-weight: 600 !important;
}

.hotline-btn:hover {
  background: rgba(16, 185, 129, 0.2) !important;
  border-color: #10B981 !important;
  box-shadow: 0 0 16px rgba(16, 185, 129, 0.4) !important;
}

.brand-title {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.15rem;
  letter-spacing: -0.02em;
  color: #fff;
}

.brand-title span {
  color: var(--neon-blue);
}

.brand-tagline {
  font-size: 0.75rem;
  color: var(--text-muted);
  display: block;
}

.header-status {
  display: flex;
  align-items: center;
  gap: 16px;
}

.status-pill {
  display: flex;
  align-items: center;
  gap: 8px;
  background: rgba(16, 185, 129, 0.1);
  border: 1px solid rgba(16, 185, 129, 0.25);
  color: var(--neon-emerald);
  padding: 6px 14px;
  border-radius: var(--border-radius-full);
  font-size: 0.8rem;
  font-weight: 500;
}

.pulse-dot {
  width: 8px;
  height: 8px;
  background-color: var(--neon-emerald);
  border-radius: 50%;
  box-shadow: 0 0 8px var(--neon-emerald);
  animation: pulse-green 2s infinite;
}

@keyframes pulse-green {
  0% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.7); }
  70% { transform: scale(1); box-shadow: 0 0 0 8px rgba(16, 185, 129, 0); }
  100% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(16, 185, 129, 0); }
}

.clock-display {
  font-size: 0.82rem;
  color: var(--text-secondary);
  font-family: monospace;
  background: rgba(0,0,0,0.25);
  padding: 6px 10px;
  border-radius: var(--border-radius-sm);
  border: 1px solid var(--border-light);
}

/* --------------------------------------------------------------------------
   BENTO GRID SYSTEM
   -------------------------------------------------------------------------- */
.bento-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  grid-auto-rows: minmax(130px, auto);
  gap: 20px;
}

/* --------------------------------------------------------------------------
   BENTO CARD BASE (WINDOWS METRO / MODERN DARK CARD)
   -------------------------------------------------------------------------- */
.bento-card {
  position: relative;
  background: var(--bg-card);
  background: linear-gradient(145deg, rgba(30, 41, 59, 0.85) 0%, rgba(15, 23, 42, 0.95) 100%);
  border: 1px solid var(--border-light);
  border-radius: var(--border-radius-base);
  box-shadow: var(--shadow-card);
  padding: 24px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: transform var(--transition-smooth), border-color var(--transition-smooth), box-shadow var(--transition-smooth);
  backdrop-filter: blur(10px);
}

/* Hover Effects (Zoom nhẹ, đổi viền neon, nâng khối) */
.bento-card:hover {
  transform: translateY(-5px);
  border-color: var(--border-hover);
  box-shadow: var(--shadow-hover);
}

/* Metro subtle top neon accent line */
.bento-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--neon-blue), transparent);
  opacity: 0;
  transition: opacity var(--transition-smooth);
}

.bento-card:hover::before {
  opacity: 1;
}

/* Card Header Helper */
.card-meta-tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--neon-blue);
  margin-bottom: 12px;
}

.block-header-action-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
}

.header-action-link {
  font-size: 0.72rem;
  color: var(--neon-blue);
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  transition: transform var(--transition-fast), color var(--transition-fast);
}

.header-action-link:hover {
  color: #fff;
  transform: translateX(3px);
}

/* --------------------------------------------------------------------------
   BLOCK 1: GIỚI THIỆU (Large: 2 Cột x 2 Hàng)
   -------------------------------------------------------------------------- */
.block-intro {
  grid-column: span 2;
  grid-row: span 2;
  justify-content: space-between;
  background: linear-gradient(135deg, rgba(30, 41, 59, 0.9) 0%, rgba(15, 23, 42, 0.98) 100%);
  position: relative;
}

.intro-profile {
  display: flex;
  align-items: center;
  gap: 20px;
  margin-bottom: 20px;
}

.avatar-wrapper {
  position: relative;
  width: 96px;
  height: 96px;
  flex-shrink: 0;
}

.avatar-img {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
  object-position: center 20%;
  border: 2px solid rgba(56, 189, 248, 0.6);
  box-shadow: 0 0 20px rgba(56, 189, 248, 0.3);
}

.avatar-glow-ring {
  position: absolute;
  inset: -5px;
  border-radius: 50%;
  background: conic-gradient(from 0deg, var(--neon-blue), var(--neon-purple), var(--neon-indigo), var(--neon-blue));
  z-index: -1;
  animation: rotateGlow 8s linear infinite;
  filter: blur(4px);
  opacity: 0.7;
}

@keyframes rotateGlow {
  to { transform: rotate(360deg); }
}

.intro-badge-row {
  display: flex;
  gap: 8px;
  margin-bottom: 6px;
}

.badge-tag {
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
  padding: 3px 8px;
  border-radius: var(--border-radius-sm);
  background: rgba(56, 189, 248, 0.12);
  color: var(--neon-blue);
  border: 1px solid rgba(56, 189, 248, 0.2);
}

.intro-greeting {
  font-family: var(--font-display);
  font-size: 1.6rem;
  font-weight: 800;
  line-height: 1.2;
  color: #fff;
  letter-spacing: -0.02em;
}

.intro-greeting .highlight-text {
  background: linear-gradient(90deg, #38BDF8, #A855F7);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.intro-desc {
  font-size: 0.95rem;
  color: var(--text-secondary);
  line-height: 1.65;
  margin-bottom: 24px;
}

.intro-action-group {
  display: flex;
  gap: 12px;
  align-items: center;
  flex-wrap: wrap;
}

.btn-primary {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: linear-gradient(135deg, #0284C7 0%, #2563EB 100%);
  color: #fff;
  font-size: 0.88rem;
  font-weight: 600;
  padding: 10px 20px;
  border-radius: var(--border-radius-sm);
  border: 1px solid rgba(56, 189, 248, 0.4);
  text-decoration: none;
  cursor: pointer;
  box-shadow: 0 4px 15px rgba(2, 132, 199, 0.35);
  transition: all var(--transition-fast);
}

.btn-primary:hover {
  background: linear-gradient(135deg, #0369a1 0%, #1d4ed8 100%);
  box-shadow: 0 6px 20px rgba(56, 189, 248, 0.5);
  transform: translateY(-2px);
}

.btn-secondary {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(255, 255, 255, 0.05);
  color: var(--text-primary);
  font-size: 0.88rem;
  font-weight: 500;
  padding: 10px 18px;
  border-radius: var(--border-radius-sm);
  border: 1px solid var(--border-light);
  text-decoration: none;
  cursor: pointer;
  transition: all var(--transition-fast);
}

.btn-secondary:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.2);
  transform: translateY(-2px);
}

/* --------------------------------------------------------------------------
   BLOCK 2: VIDEO SHOWREEL (Lớn nhất: 2 Cột x 2 Hàng) - DIRECT YOUTUBE EMBED
   Nhúng trực tiếp YouTube, phát ngay trong block mà không cần popup
   -------------------------------------------------------------------------- */
.block-showreel {
  grid-column: span 2;
  grid-row: span 2;
  padding: 20px;
  background: linear-gradient(145deg, rgba(30, 41, 59, 0.95) 0%, rgba(15, 23, 42, 0.98) 100%);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 12px;
}

.showreel-header-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.showreel-badge-group {
  display: flex;
  align-items: center;
  gap: 8px;
}

.badge-4k {
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(8px);
  border: 1px solid rgba(56, 189, 248, 0.4);
  color: var(--neon-blue);
  font-size: 0.7rem;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: var(--border-radius-sm);
  letter-spacing: 0.06em;
}

.badge-live-tag {
  font-size: 0.68rem;
  font-weight: 700;
  color: #EF4444;
  background: rgba(239, 68, 68, 0.12);
  border: 1px solid rgba(239, 68, 68, 0.3);
  padding: 4px 8px;
  border-radius: var(--border-radius-sm);
  display: inline-flex;
  align-items: center;
  gap: 6px;
  letter-spacing: 0.05em;
}

.badge-live-tag::before {
  content: '';
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #EF4444;
  box-shadow: 0 0 6px #EF4444;
}

.showreel-link-direct {
  font-size: 0.78rem;
  color: var(--neon-blue);
  background: rgba(56, 189, 248, 0.1);
  border: 1px solid rgba(56, 189, 248, 0.25);
  padding: 6px 12px;
  border-radius: var(--border-radius-sm);
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: all var(--transition-fast);
}

.showreel-link-direct:hover {
  background: var(--neon-blue);
  color: #0B0F17;
  transform: translateY(-2px);
}

/* Khung YouTube trực tiếp */
.showreel-embed-container {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  border-radius: var(--border-radius-sm);
  overflow: hidden;
  background: #000;
  border: 1px solid var(--border-light);
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.7);
}

.showreel-embed-container iframe {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border: none;
}

.showreel-footer-info {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.showreel-title {
  font-family: var(--font-display);
  font-size: 1.15rem;
  font-weight: 700;
  color: #fff;
}

.showreel-subtitle {
  font-size: 0.82rem;
  color: var(--text-secondary);
}

/* --------------------------------------------------------------------------
   BLOCK 3: KỸ NĂNG & TOOLS (2 Cột x 1 Hàng)
   -------------------------------------------------------------------------- */
.block-skills {
  grid-column: span 2;
  grid-row: span 1;
}

.skills-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  margin-top: 4px;
}

.skill-item {
  display: flex;
  align-items: center;
  gap: 10px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border-light);
  border-radius: var(--border-radius-sm);
  padding: 10px;
  transition: all var(--transition-fast);
}

.skill-item:hover {
  background: rgba(56, 189, 248, 0.08);
  border-color: rgba(56, 189, 248, 0.35);
  transform: translateY(-3px);
}

.skill-icon-box {
  width: 34px;
  height: 34px;
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 0.85rem;
  flex-shrink: 0;
  box-shadow: 0 2px 8px rgba(0,0,0,0.3);
}

/* Custom Tool Colors */
.icon-pr { background: #00005b; color: #9999ff; border: 1px solid #9999ff; }
.icon-ae { background: #00005b; color: #d291ff; border: 1px solid #d291ff; }
.icon-ps { background: #001e36; color: #31a8ff; border: 1px solid #31a8ff; }
.icon-dv { background: #1a0033; color: #f43f5e; border: 1px solid #f43f5e; }
.icon-blender { background: #261605; color: #ea580c; border: 1px solid #ea580c; }
.icon-figma { background: #0f172a; color: #06b6d4; border: 1px solid #06b6d4; }
.icon-ai { background: #331500; color: #f59e0b; border: 1px solid #f59e0b; }
.icon-c4d { background: #041d3d; color: #38bdf8; border: 1px solid #38bdf8; }

.skill-info {
  overflow: hidden;
}

.skill-name {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.skill-level {
  font-size: 0.7rem;
  color: var(--text-muted);
}

/* --------------------------------------------------------------------------
   BLOCK 4: THỐNG KÊ & THÀNH TÍCH (2 Cột x 1 Hàng)
   -------------------------------------------------------------------------- */
.block-stats {
  grid-column: span 2;
  grid-row: span 1;
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  height: 100%;
  align-items: center;
  margin-top: 4px;
}

.stat-item {
  display: flex;
  flex-direction: column;
  padding: 10px 12px;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid var(--border-light);
  border-radius: var(--border-radius-sm);
  transition: all var(--transition-fast);
}

.stat-item:hover {
  background: rgba(168, 85, 247, 0.08);
  border-color: rgba(168, 85, 247, 0.35);
  transform: translateY(-3px);
}

.stat-number {
  font-family: var(--font-display);
  font-size: 1.6rem;
  font-weight: 800;
  line-height: 1.1;
  background: linear-gradient(90deg, #38BDF8, #A855F7);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.stat-label {
  font-size: 0.75rem;
  color: var(--text-secondary);
  margin-top: 4px;
}

/* --------------------------------------------------------------------------
   BLOCK 5: BÀI VIẾT (DỌC - 2 Cột x 2 Hàng)
   -------------------------------------------------------------------------- */
.block-posts {
  grid-column: span 2;
  grid-row: span 2;
  display: flex;
  flex-direction: column;
}

.posts-header-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 14px;
}

.posts-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
  flex: 1;
  justify-content: space-between;
}

.post-link-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 16px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border-light);
  border-radius: var(--border-radius-sm);
  text-decoration: none;
  cursor: pointer;
  transition: all var(--transition-fast);
  position: relative;
}

.post-link-card:hover {
  background: rgba(56, 189, 248, 0.08);
  border-color: rgba(56, 189, 248, 0.4);
  transform: translateX(4px);
}

.post-meta-left {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding-right: 12px;
}

.post-tagline-row {
  display: flex;
  align-items: center;
  gap: 8px;
}

.post-category-tag {
  font-size: 0.68rem;
  font-weight: 600;
  text-transform: uppercase;
  color: var(--neon-blue);
  background: rgba(56, 189, 248, 0.1);
  padding: 2px 6px;
  border-radius: 4px;
}

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

.post-title {
  font-size: 0.94rem;
  font-weight: 600;
  color: var(--text-primary);
  line-height: 1.35;
}

.post-action-arrow {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.04);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-secondary);
  flex-shrink: 0;
  transition: all var(--transition-fast);
}

.post-link-card:hover .post-action-arrow {
  background: var(--neon-blue);
  color: #0B0F17;
  transform: translateX(3px);
}

/* --------------------------------------------------------------------------
   BLOCK 6: THƯ VIỆN ẢNH (Horizontal Gallery - 2 Cột x 1 Hàng)
   -------------------------------------------------------------------------- */
.block-gallery {
  grid-column: span 2;
  grid-row: span 1;
}

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  margin-top: 8px;
}

.gallery-thumb-item {
  position: relative;
  aspect-ratio: 16 / 11;
  border-radius: var(--border-radius-sm);
  overflow: hidden;
  cursor: pointer;
  border: 1px solid var(--border-light);
  background: #0f172a;
  display: block;
  text-decoration: none;
}

.gallery-thumb-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}

.gallery-thumb-item:hover .gallery-thumb-img {
  transform: scale(1.15);
}

.gallery-thumb-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 40%, rgba(11, 15, 23, 0.9) 100%);
  display: flex;
  align-items: flex-end;
  padding: 8px;
  opacity: 0.85;
  transition: opacity var(--transition-fast);
}

.gallery-thumb-item:hover .gallery-thumb-overlay {
  opacity: 1;
  background: linear-gradient(180deg, rgba(56, 189, 248, 0.2) 0%, rgba(11, 15, 23, 0.95) 100%);
}

.gallery-thumb-caption {
  font-size: 0.72rem;
  font-weight: 600;
  color: #fff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* --------------------------------------------------------------------------
   BLOCK 7: MẠNG XÃ HỘI (Metro Tiles - 2 Cột x 1 Hàng)
   -------------------------------------------------------------------------- */
.block-socials {
  grid-column: span 2;
  grid-row: span 1;
}

.social-tiles-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  margin-top: 8px;
}

.social-tile-link {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 14px 8px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border-light);
  border-radius: var(--border-radius-sm);
  text-decoration: none;
  transition: all var(--transition-fast);
}

.social-tile-link:hover {
  transform: translateY(-3px);
}

.social-tile-link.yt:hover { background: rgba(239, 68, 68, 0.15); border-color: #EF4444; color: #EF4444; box-shadow: 0 0 16px rgba(239, 68, 68, 0.35); }
.social-tile-link.rec:hover { background: rgba(255, 85, 0, 0.15); border-color: #FF5500; color: #FF7722; box-shadow: 0 0 16px rgba(255, 85, 0, 0.35); }
.social-tile-link.fb:hover { background: rgba(24, 119, 242, 0.15); border-color: #1877F2; color: #38BDF8; box-shadow: 0 0 16px rgba(24, 119, 242, 0.35); }
.social-tile-link.li:hover { background: rgba(10, 102, 194, 0.15); border-color: #0A66C2; color: #38BDF8; box-shadow: 0 0 16px rgba(10, 102, 194, 0.35); }
.social-tile-link.phone:hover { background: rgba(16, 185, 129, 0.15); border-color: #10B981; color: #10B981; box-shadow: 0 0 16px rgba(16, 185, 129, 0.35); }

/* --------------------------------------------------------------------------
   BLOCK 8: HỆ THỐNG PHẦN MỀM & CÔNG CỤ TỰ PHÁT TRIỂN (4 Cột x 1 Hàng)
   -------------------------------------------------------------------------- */
.block-apps {
  grid-column: span 4;
}

.apps-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin-top: 8px;
}

.app-card-item {
  display: flex;
  align-items: center;
  gap: 16px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border-light);
  border-radius: var(--border-radius-base);
  padding: 18px 20px;
  text-decoration: none;
  transition: all var(--transition-smooth);
}

.app-card-item:hover {
  transform: translateY(-4px);
  border-color: var(--neon-blue);
  box-shadow: 0 10px 25px rgba(56, 189, 248, 0.15);
  background: rgba(56, 189, 248, 0.05);
}

.app-card-icon-box {
  width: 64px;
  height: 64px;
  flex-shrink: 0;
  border-radius: 12px;
  background: rgba(15, 23, 42, 0.85);
  border: 1px solid rgba(255, 255, 255, 0.1);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 8px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.app-card-icon-img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
}

.app-card-info {
  flex: 1;
}

.app-card-tag-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 4px;
}

.app-tech-badge {
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 2px 8px;
  border-radius: 4px;
}

.app-card-title {
  font-family: var(--font-display);
  font-size: 1.1rem;
  font-weight: 700;
  color: #fff;
  margin-bottom: 4px;
}

.app-card-desc {
  font-size: 0.82rem;
  color: var(--text-secondary);
  line-height: 1.45;
  margin: 0;
}

.app-card-action {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--neon-blue);
  margin-top: 8px;
}

/* Local Video Player Styling */
.showreel-local-video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 8px;
  background: #000;
}

/* --------------------------------------------------------------------------
   PHOTO GALLERY 3X3 TILES PAGE STYLES
   -------------------------------------------------------------------------- */
.gallery-grid-3x3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  margin-top: 20px;
}

.gallery-card-3x3 {
  position: relative;
  aspect-ratio: 16 / 11;
  border-radius: var(--border-radius-base);
  overflow: hidden;
  border: 1px solid var(--border-light);
  background: #0f172a;
  cursor: pointer;
  transition: transform var(--transition-smooth), border-color var(--transition-smooth), box-shadow var(--transition-smooth);
}

.gallery-card-3x3:hover {
  transform: translateY(-6px) scale(1.02);
  border-color: var(--neon-blue);
  box-shadow: 0 14px 35px rgba(0, 0, 0, 0.7), 0 0 25px rgba(56, 189, 248, 0.3);
}

.gallery-card-3x3 img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

.gallery-card-3x3:hover img {
  transform: scale(1.1);
}

.gallery-card-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 35%, rgba(11, 15, 23, 0.95) 100%);
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 16px;
  opacity: 0.9;
  transition: opacity var(--transition-fast);
}

.gallery-card-3x3:hover .gallery-card-overlay {
  opacity: 1;
  background: linear-gradient(180deg, rgba(56, 189, 248, 0.15) 0%, rgba(11, 15, 23, 0.98) 100%);
}

.gallery-card-tag {
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--neon-blue);
  margin-bottom: 4px;
}

.gallery-card-title {
  font-family: var(--font-display);
  font-size: 0.95rem;
  font-weight: 700;
  color: #fff;
  line-height: 1.3;
}

/* --------------------------------------------------------------------------
   VIDEO GALLERY (VERTICAL FEED LAYOUT)
   Dạng dọc khoảng 6 video từ YouTube
   -------------------------------------------------------------------------- */
.protocol-alert-box {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  background: rgba(245, 158, 11, 0.08);
  border: 1px solid rgba(245, 158, 11, 0.35);
  border-radius: var(--border-radius-base);
  padding: 16px 20px;
  margin-top: 20px;
  backdrop-filter: blur(8px);
}

.protocol-alert-icon {
  flex-shrink: 0;
  margin-top: 2px;
}

.protocol-alert-text {
  flex: 1;
}

.protocol-alert-text h4 {
  font-size: 0.95rem;
  font-weight: 700;
  color: #FBBF24;
  margin-bottom: 6px;
}

.protocol-alert-text p {
  font-size: 0.85rem;
  color: var(--text-secondary);
  line-height: 1.5;
  margin-bottom: 8px;
}

.protocol-alert-text ul {
  margin: 0;
  padding-left: 18px;
  font-size: 0.83rem;
  color: var(--text-secondary);
  line-height: 1.6;
}

.protocol-alert-text code {
  background: rgba(255, 255, 255, 0.08);
  padding: 2px 6px;
  border-radius: 4px;
  color: #FDE68A;
  font-family: monospace;
}

.videos-vertical-feed {
  display: flex;
  flex-direction: column;
  gap: 28px;
  margin-top: 24px;
}

.video-feed-card {
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: 24px;
  align-items: center;
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  border-radius: var(--border-radius-base);
  padding: 20px;
  box-shadow: var(--shadow-card);
  transition: transform var(--transition-smooth), border-color var(--transition-smooth), box-shadow var(--transition-smooth);
}

.video-feed-card:hover {
  transform: translateY(-4px);
  border-color: var(--neon-blue);
  box-shadow: var(--shadow-hover);
}

.video-embed-box {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  border-radius: var(--border-radius-sm);
  overflow: hidden;
  background: #000;
  border: 1px solid var(--border-light);
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.8);
}

.video-embed-box iframe {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border: none;
}

.video-meta-content {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.video-tag-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  color: #EF4444;
  background: rgba(239, 68, 68, 0.12);
  border: 1px solid rgba(239, 68, 68, 0.3);
  padding: 4px 10px;
  border-radius: var(--border-radius-full);
  align-self: flex-start;
}

.video-card-title {
  font-family: var(--font-display);
  font-size: 1.25rem;
  font-weight: 700;
  color: #fff;
  line-height: 1.35;
}

.video-card-desc {
  font-size: 0.88rem;
  color: var(--text-secondary);
  line-height: 1.6;
}

.video-card-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 4px;
}

/* --------------------------------------------------------------------------
   AUDIO GALLERY (HANOIREC SOUNDCLOUD)
   10 bài hát có view nhiều nhất từ SoundCloud Hanoirec
   -------------------------------------------------------------------------- */
.soundcloud-brand-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: linear-gradient(135deg, rgba(255, 85, 0, 0.12) 0%, rgba(30, 41, 59, 0.9) 100%);
  border: 1px solid rgba(255, 85, 0, 0.35);
  border-radius: var(--border-radius-base);
  padding: 24px;
  margin-bottom: 24px;
  flex-wrap: wrap;
  gap: 16px;
}

.sc-logo-box {
  display: flex;
  align-items: center;
  gap: 16px;
}

.sc-logo-icon {
  width: 54px;
  height: 54px;
  background: #FF5500;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 0 20px rgba(255, 85, 0, 0.5);
  color: #fff;
  flex-shrink: 0;
}

.sc-brand-title {
  font-family: var(--font-display);
  font-size: 1.3rem;
  font-weight: 800;
  color: #fff;
}

.sc-brand-subtitle {
  font-size: 0.82rem;
  color: #cbd5e1;
}

/* SoundCloud Iframe Embed Grid & Cards */
.sc-embed-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
}

.sc-embed-card {
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  border-radius: var(--border-radius-base);
  padding: 18px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  transition: transform var(--transition-smooth), border-color var(--transition-smooth), box-shadow var(--transition-smooth);
}

.sc-embed-card:hover {
  transform: translateY(-4px);
  border-color: #FF5500;
  box-shadow: 0 14px 35px rgba(0, 0, 0, 0.65), 0 0 25px rgba(255, 85, 0, 0.25);
}

.sc-embed-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.sc-embed-left {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
  flex: 1;
}

.audio-rank-num {
  font-family: var(--font-display);
  font-size: 1.25rem;
  font-weight: 800;
  color: #FF5500;
  min-width: 28px;
  line-height: 1;
}

.sc-embed-info {
  overflow: hidden;
  flex: 1;
}

.sc-embed-title {
  font-family: var(--font-display);
  font-size: 0.95rem;
  font-weight: 700;
  color: #fff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-bottom: 2px;
}

.sc-embed-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.76rem;
  color: var(--text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.sc-play-pill {
  font-size: 0.72rem;
  font-weight: 600;
  color: #FF7722;
  background: rgba(255, 85, 0, 0.12);
  border: 1px solid rgba(255, 85, 0, 0.3);
  padding: 2px 8px;
  border-radius: var(--border-radius-full);
}

.sc-iframe-box {
  width: 100%;
  height: 166px;
  border-radius: 10px;
  overflow: hidden;
  background: #0f172a;
  border: 1px solid rgba(255, 255, 255, 0.06);
}

.sc-iframe-box iframe {
  width: 100%;
  height: 100%;
  border: none;
  display: block;
}

/* Featured Spotlight Embed */
.sc-spotlight-card {
  background: var(--bg-card);
  border: 1px solid rgba(255, 85, 0, 0.45);
  border-radius: var(--border-radius-base);
  padding: 20px;
  margin-bottom: 24px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.6), 0 0 20px rgba(255, 85, 0, 0.2);
}

.sc-spotlight-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 14px;
}

/* Sound Wave Equalizer Bars Animation */
.sound-bars {
  display: flex;
  align-items: flex-end;
  gap: 3px;
  height: 20px;
}

.sound-bar {
  width: 3px;
  background: #FF5500;
  border-radius: 2px;
  animation: equalize 1.2s ease-in-out infinite alternate;
}

.sound-bar:nth-child(1) { height: 60%; animation-delay: 0.1s; }
.sound-bar:nth-child(2) { height: 90%; animation-delay: 0.3s; }
.sound-bar:nth-child(3) { height: 40%; animation-delay: 0.2s; }
.sound-bar:nth-child(4) { height: 100%; animation-delay: 0.4s; }
.sound-bar:nth-child(5) { height: 75%; animation-delay: 0.15s; }

@keyframes equalize {
  0% { transform: scaleY(0.3); }
  100% { transform: scaleY(1); }
}

.social-tile-name {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--text-primary);
}

.social-tile-stat {
  font-size: 0.68rem;
  color: var(--text-muted);
}

/* --------------------------------------------------------------------------
   PAGE LOAD ENTRANCE ANIMATIONS (Fade-in & Slide-up)
   -------------------------------------------------------------------------- */
.anim-fade-up {
  opacity: 0;
  transform: translateY(24px);
  animation: fadeUpIn 0.75s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes fadeUpIn {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Stagger animation delays for bento blocks */
.bento-card:nth-child(1) { animation-delay: 0.08s; }
.bento-card:nth-child(2) { animation-delay: 0.16s; }
.bento-card:nth-child(3) { animation-delay: 0.24s; }
.bento-card:nth-child(4) { animation-delay: 0.32s; }
.bento-card:nth-child(5) { animation-delay: 0.40s; }
.bento-card:nth-child(6) { animation-delay: 0.48s; }
.bento-card:nth-child(7) { animation-delay: 0.56s; }

/* --------------------------------------------------------------------------
   SUBPAGES BENTO GRID UNIFIED LAYOUT
   Đồng bộ giao diện Bento Grid cho tất cả các trang đích
   -------------------------------------------------------------------------- */
.subpage-bento-grid {
  display: grid;
  grid-template-columns: 2.5fr 1fr;
  gap: 24px;
  align-items: start;
}

.subpage-main-card {
  padding: 32px;
}

.subpage-sidebar {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.sidebar-bento-card {
  padding: 20px;
}

/* Header Breadcrumb */
.header-nav-group {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 0.82rem;
}

.nav-back-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--neon-blue);
  text-decoration: none;
  font-weight: 500;
  background: rgba(56, 189, 248, 0.1);
  border: 1px solid rgba(56, 189, 248, 0.25);
  padding: 6px 12px;
  border-radius: var(--border-radius-sm);
  transition: all var(--transition-fast);
}

.nav-back-link:hover {
  background: var(--neon-blue);
  color: #0B0F17;
  transform: translateX(-2px);
}

.breadcrumb-separator {
  color: var(--text-muted);
}

.breadcrumb-current {
  color: var(--text-secondary);
  font-weight: 500;
  max-width: 220px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Sidebar Author Box */
.sidebar-profile-box {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 14px;
}

.sidebar-avatar {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  object-fit: cover;
  object-position: center 20%;
  border: 2px solid var(--neon-blue);
  box-shadow: 0 0 12px rgba(56, 189, 248, 0.4);
}

.sidebar-name {
  font-family: var(--font-display);
  font-size: 1rem;
  font-weight: 700;
  color: #fff;
}

.sidebar-role {
  font-size: 0.72rem;
  color: var(--neon-blue);
}

.sidebar-bio {
  font-size: 0.82rem;
  color: var(--text-secondary);
  line-height: 1.55;
  margin-bottom: 14px;
}

/* Sidebar Related Links */
.related-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.related-item-link {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border-light);
  border-radius: var(--border-radius-sm);
  text-decoration: none;
  transition: all var(--transition-fast);
}

.related-item-link:hover {
  background: rgba(56, 189, 248, 0.08);
  border-color: rgba(56, 189, 248, 0.35);
  transform: translateX(3px);
}

.related-thumb {
  width: 44px;
  height: 44px;
  border-radius: 6px;
  object-fit: cover;
  flex-shrink: 0;
  border: 1px solid var(--border-light);
}

.related-meta {
  overflow: hidden;
}

.related-title {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-bottom: 2px;
}

.related-tag {
  font-size: 0.68rem;
  color: var(--neon-blue);
}

/* Sidebar Social 2x2 grid */
.sidebar-social-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
}

/* --------------------------------------------------------------------------
   FOOTER
   -------------------------------------------------------------------------- */
.site-footer {
  margin-top: 40px;
  padding-top: 20px;
  border-top: 1px solid var(--border-light);
  display: flex;
  justify-content: space-between;
  align-items: center;
  color: var(--text-muted);
  font-size: 0.8rem;
}

.site-footer a {
  color: var(--neon-blue);
  text-decoration: none;
}

/* --------------------------------------------------------------------------
   RESPONSIVE DESIGN (MOBILE & TABLET ADAPTATION)
   Chuyển hoàn hảo sang 1 cột duy nhất trên Mobile
   -------------------------------------------------------------------------- */
@media (max-width: 1024px) {
  .bento-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  
  .subpage-bento-grid {
    grid-template-columns: 1fr;
  }

  .gallery-grid-3x3 {
    grid-template-columns: repeat(2, 1fr);
  }

  .video-feed-card {
    grid-template-columns: 1fr;
  }

  .apps-grid {
    grid-template-columns: 1fr;
  }
  
  .block-intro,
  .block-showreel,
  .block-skills,
  .block-stats,
  .block-posts,
  .block-gallery,
  .block-socials,
  .block-apps {
    grid-column: span 2;
  }
}

@media (max-width: 768px) {
  .bento-wrapper {
    padding: 16px 12px 40px;
  }

  .site-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 14px;
  }

  .site-nav-menu {
    flex-wrap: wrap;
    gap: 6px;
  }

  /* Chuyển toàn bộ các block sang 1 cột duy nhất */
  .bento-grid {
    grid-template-columns: 1fr;
    gap: 16px;
  }

  .gallery-grid-3x3 {
    grid-template-columns: 1fr;
  }

  .apps-grid {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  .sc-embed-grid {
    grid-template-columns: 1fr;
    gap: 16px;
  }

  .sc-embed-header {
    flex-wrap: wrap;
    gap: 10px;
  }

  .block-intro,
  .block-showreel,
  .block-skills,
  .block-stats,
  .block-posts,
  .block-gallery,
  .block-socials,
  .block-apps {
    grid-column: span 1 !important;
    grid-row: auto !important;
  }

  .intro-profile {
    flex-direction: column;
    align-items: flex-start;
    gap: 14px;
  }

  .skills-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .stats-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .gallery-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .social-tiles-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}
