/* ========================================
   MATERIAL DESIGN 3 - PORTFOLIO VÕ VĂN CẢNH
   ======================================== */

/* === 1. CSS VARIABLES - MD3 DESIGN TOKENS === */
:root {
  /* =========================================
     GOOGLE POMELLI INSPIRED THEME
     Vibrant, Playful, Organic, Soft
     ========================================= */

  /* Primary - Vibrant & Playful Blue */
  --md-sys-color-primary: #4285F4; /* Google Blue */
  --md-sys-color-on-primary: #FFFFFF;
  --md-sys-color-primary-container: #D2E3FC;
  --md-sys-color-on-primary-container: #001D35;

  /* Secondary - Soft Teal/Green */
  --md-sys-color-secondary: #34A853; /* Google Green */
  --md-sys-color-on-secondary: #FFFFFF;
  --md-sys-color-secondary-container: #CEEAD6;
  --md-sys-color-on-secondary-container: #051F0A;

  /* Tertiary - Warm Yellow/Orange */
  --md-sys-color-tertiary: #FBBC05; /* Google Yellow */
  --md-sys-color-on-tertiary: #FFFFFF;
  --md-sys-color-tertiary-container: #FEF7E0;
  --md-sys-color-on-tertiary-container: #1F1200;

  /* Error - Soft Red */
  --md-sys-color-error: #EA4335; /* Google Red */
  --md-sys-color-on-error: #FFFFFF;
  --md-sys-color-error-container: #FAD2CF;
  --md-sys-color-on-error-container: #410E0B;

  /* Backgrounds - Clean & Airy */
  --md-sys-color-background: #FFFFFF;
  --md-sys-color-on-background: #1F1F1F;
  --md-sys-color-surface: #F8F9FA; /* Very light grey */
  --md-sys-color-on-surface: #1F1F1F;
  
  /* Surface Variants - For Cards */
  --md-sys-color-surface-variant: #F1F3F4;
  --md-sys-color-on-surface-variant: #444746;
  --md-sys-color-outline: #747775;
  --md-sys-color-outline-variant: #C4C7C5;

  /* Surface Containers - Pomelli uses distinct layers */
  --md-sys-color-surface-container-lowest: #FFFFFF;
  --md-sys-color-surface-container-low: #F8F9FA;
  --md-sys-color-surface-container: #F1F3F4;
  --md-sys-color-surface-container-high: #E8EAED;
  --md-sys-color-surface-container-highest: #DEE1E6;

  /* Elevation Shadows - Softer, more diffused */
  --md-sys-elevation-0: none;
  --md-sys-elevation-1: 0px 1px 2px 0px rgba(0, 0, 0, 0.06), 0px 2px 6px 2px rgba(0, 0, 0, 0.04);
  --md-sys-elevation-2: 0px 2px 4px 0px rgba(0, 0, 0, 0.08), 0px 4px 12px 4px rgba(0, 0, 0, 0.05);
  --md-sys-elevation-3: 0px 4px 8px 0px rgba(0, 0, 0, 0.10), 0px 6px 16px 6px rgba(0, 0, 0, 0.06);
  --md-sys-elevation-4: 0px 6px 12px 0px rgba(0, 0, 0, 0.12), 0px 8px 20px 8px rgba(0, 0, 0, 0.07);
  --md-sys-elevation-5: 0px 8px 16px 0px rgba(0, 0, 0, 0.14), 0px 12px 28px 12px rgba(0, 0, 0, 0.08);

  /* Typography Scale - Google Sans (Pixel's signature font) */
  --md-sys-typescale-display-large-font: 'Google Sans', 'Product Sans', 'Roboto', sans-serif;
  --md-sys-typescale-display-large-size: 57px;
  --md-sys-typescale-display-large-weight: 400;
  --md-sys-typescale-display-large-line-height: 64px;
  --md-sys-typescale-display-large-tracking: -0.25px;

  --md-sys-typescale-headline-large-font: 'Google Sans', 'Product Sans', 'Roboto', sans-serif;
  --md-sys-typescale-headline-large-size: 32px;
  --md-sys-typescale-headline-large-weight: 400;
  --md-sys-typescale-headline-large-line-height: 40px;
  --md-sys-typescale-headline-large-tracking: 0px;

  --md-sys-typescale-headline-medium-font: 'Google Sans', 'Product Sans', 'Roboto', sans-serif;
  --md-sys-typescale-headline-medium-size: 28px;
  --md-sys-typescale-headline-medium-weight: 400;
  --md-sys-typescale-headline-medium-line-height: 36px;
  --md-sys-typescale-headline-medium-tracking: 0px;

  --md-sys-typescale-title-large-font: 'Google Sans', 'Product Sans', 'Roboto', sans-serif;
  --md-sys-typescale-title-large-size: 22px;
  --md-sys-typescale-title-large-weight: 500;
  --md-sys-typescale-title-large-line-height: 28px;
  --md-sys-typescale-title-large-tracking: 0px;

  --md-sys-typescale-title-medium-font: 'Google Sans', 'Product Sans', 'Roboto', sans-serif;
  --md-sys-typescale-title-medium-size: 16px;
  --md-sys-typescale-title-medium-weight: 500;
  --md-sys-typescale-title-medium-line-height: 24px;
  --md-sys-typescale-title-medium-tracking: 0.15px;

  --md-sys-typescale-body-large-font: 'Google Sans', 'Product Sans', 'Roboto', sans-serif;
  --md-sys-typescale-body-large-size: 16px;
  --md-sys-typescale-body-large-weight: 400;
  --md-sys-typescale-body-large-line-height: 24px;
  --md-sys-typescale-body-large-tracking: 0.5px;

  --md-sys-typescale-body-medium-font: 'Google Sans', 'Product Sans', 'Roboto', sans-serif;
  --md-sys-typescale-body-medium-size: 14px;
  --md-sys-typescale-body-medium-weight: 400;
  --md-sys-typescale-body-medium-line-height: 20px;
  --md-sys-typescale-body-medium-tracking: 0.25px;

  --md-sys-typescale-body-small-font: 'Google Sans', 'Product Sans', 'Roboto', sans-serif;
  --md-sys-typescale-body-small-size: 12px;
  --md-sys-typescale-body-small-weight: 400;
  --md-sys-typescale-body-small-line-height: 16px;
  --md-sys-typescale-body-small-tracking: 0.4px;

  --md-sys-typescale-label-large-font: 'Google Sans', 'Product Sans', 'Roboto', sans-serif;
  --md-sys-typescale-label-large-size: 14px;
  --md-sys-typescale-label-large-weight: 500;
  --md-sys-typescale-label-large-line-height: 20px;
  --md-sys-typescale-label-large-tracking: 0.1px;

  /* Motion - Android 16 refined animations */
  --md-sys-motion-easing-standard: cubic-bezier(0.2, 0, 0, 1);
  --md-sys-motion-easing-emphasized: cubic-bezier(0.05, 0.7, 0.1, 1);
  --md-sys-motion-easing-emphasized-decelerate: cubic-bezier(0.05, 0.7, 0.1, 1);
  --md-sys-motion-easing-emphasized-accelerate: cubic-bezier(0.3, 0, 0.8, 0.15);
  
  --md-sys-motion-duration-short: 150ms;
  --md-sys-motion-duration-medium: 300ms;
  --md-sys-motion-duration-long: 500ms;
  --md-sys-motion-duration-extra-long: 700ms;

  /* Spacing - More generous (Pixel style) */
  --spacing-xs: 4px;
  --spacing-sm: 8px;
  --spacing-md: 16px;
  --spacing-lg: 24px;
  --spacing-xl: 32px;
  --spacing-2xl: 48px;
  --spacing-3xl: 64px;
  
  /* Shapes - Pomelli uses EXTRA rounded corners */
  --shape-corner-none: 0px;
  --shape-corner-xs: 12px;
  --shape-corner-sm: 16px;
  --shape-corner-md: 24px;
  --shape-corner-lg: 32px; /* Standard Card */
  --shape-corner-xl: 48px; /* Large Card */
  --shape-corner-2xl: 64px;
  --shape-corner-full: 9999px;
}

/* Dark Mode - Android 16 Pixel Dark Theme */
[data-theme="dark"] {
  /* Primary - Lighter, more vibrant blue */
  --md-sys-color-primary: #8AB4F8;
  --md-sys-color-on-primary: #002E6B;
  --md-sys-color-primary-container: #1A73E8;
  --md-sys-color-on-primary-container: #FFFFFF;

  /* Secondary - Lighter Green */
  --md-sys-color-secondary: #81C995;
  --md-sys-color-on-secondary: #051F0A;
  --md-sys-color-secondary-container: #34A853;
  --md-sys-color-on-secondary-container: #FFFFFF;

  /* Tertiary - Lighter Yellow */
  --md-sys-color-tertiary: #FDD663;
  --md-sys-color-on-tertiary: #1F1200;
  --md-sys-color-tertiary-container: #FBBC05;
  --md-sys-color-on-tertiary-container: #3E1F00;

  /* Surface Colors - Deep Grey/Black */
  --md-sys-color-background: #121212;
  --md-sys-color-on-background: #E3E3E3;
  --md-sys-color-surface: #1E1E1E;
  --md-sys-color-on-surface: #E3E3E3;
  
  --md-sys-color-surface-variant: #444746;
  --md-sys-color-on-surface-variant: #C4C7C5;
  --md-sys-color-outline: #8E918F;
  --md-sys-color-outline-variant: #444746;

  /* Surface Containers */
  --md-sys-color-surface-container-lowest: #0F0F0F;
  --md-sys-color-surface-container-low: #1E1E1E;
  --md-sys-color-surface-container: #252525;
  --md-sys-color-surface-container-high: #2B2B2B;
  --md-sys-color-surface-container-highest: #363636;

  /* Enhanced shadows for dark mode */
  --md-sys-elevation-1: 0px 1px 2px 0px rgba(0, 0, 0, 0.3), 0px 2px 6px 2px rgba(0, 0, 0, 0.15);
  --md-sys-elevation-2: 0px 2px 4px 0px rgba(0, 0, 0, 0.3), 0px 4px 12px 4px rgba(0, 0, 0, 0.15);
  --md-sys-elevation-3: 0px 4px 8px 0px rgba(0, 0, 0, 0.3), 0px 6px 16px 6px rgba(0, 0, 0, 0.15);
  --md-sys-elevation-4: 0px 6px 12px 0px rgba(0, 0, 0, 0.3), 0px 8px 20px 8px rgba(0, 0, 0, 0.15);
  --md-sys-elevation-5: 0px 8px 16px 0px rgba(0, 0, 0, 0.3), 0px 12px 28px 12px rgba(0, 0, 0, 0.15);
}

/* === 2. RESET & BASE === */
* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  font-family: var(--md-sys-typescale-body-large-font);
  font-size: var(--md-sys-typescale-body-large-size);
  line-height: var(--md-sys-typescale-body-large-line-height);
  color: var(--md-sys-color-on-background);
  /* Pomelli Gradient Background */
  background: linear-gradient(135deg, #F8F9FA 0%, #E8F0FE 100%);
  background-attachment: fixed;
  transition: background 0.3s ease, color 0.3s ease;
  min-height: 100vh;
}

[data-theme="dark"] body {
  background: linear-gradient(135deg, #0F0F0F 0%, #1E1E1E 100%);
}

/* === 3. TYPOGRAPHY === */
.display-large {
  font-family: var(--md-sys-typescale-display-large-font);
  font-size: var(--md-sys-typescale-display-large-size);
  font-weight: var(--md-sys-typescale-display-large-weight);
  line-height: var(--md-sys-typescale-display-large-line-height);
  letter-spacing: -0.25px;
}
.headline-large {
  font-family: var(--md-sys-typescale-headline-large-font);
  font-size: var(--md-sys-typescale-headline-large-size);
  font-weight: var(--md-sys-typescale-headline-large-weight);
  line-height: var(--md-sys-typescale-headline-large-line-height);
  letter-spacing: 0px;
}
.headline-medium {
  font-family: var(--md-sys-typescale-headline-medium-font);
  font-size: var(--md-sys-typescale-headline-medium-size);
  font-weight: var(--md-sys-typescale-headline-medium-weight);
  line-height: var(--md-sys-typescale-headline-medium-line-height);
  letter-spacing: 0px;
}
.title-large {
  font-family: var(--md-sys-typescale-title-large-font);
  font-size: var(--md-sys-typescale-title-large-size);
  font-weight: var(--md-sys-typescale-title-large-weight);
  line-height: var(--md-sys-typescale-title-large-line-height);
  letter-spacing: 0px;
}
.title-medium {
  font-family: var(--md-sys-typescale-title-medium-font);
  font-size: var(--md-sys-typescale-title-medium-size);
  font-weight: var(--md-sys-typescale-title-medium-weight);
  line-height: var(--md-sys-typescale-title-medium-line-height);
  letter-spacing: 0.15px;
}
.body-large {
  font-family: var(--md-sys-typescale-body-large-font);
  font-size: var(--md-sys-typescale-body-large-size);
  line-height: var(--md-sys-typescale-body-large-line-height);
  letter-spacing: 0.5px;
}
.body-medium {
  font-family: var(--md-sys-typescale-body-medium-font);
  font-size: var(--md-sys-typescale-body-medium-size);
  line-height: var(--md-sys-typescale-body-medium-line-height);
  letter-spacing: 0.25px;
}
.label-large {
  font-family: var(--md-sys-typescale-label-large-font);
  font-size: var(--md-sys-typescale-label-large-size);
  font-weight: var(--md-sys-typescale-label-large-weight);
  letter-spacing: 0.1px;
}

/* === 4. COMPONENTS === */

/* Buttons - Android 16 Pixel Style */
.md3-btn {
  height: 48px; /* Taller buttons like Pixel */
  padding: 0 28px;
  border-radius: 24px; /* More rounded */
  border: none;
  font-family: var(--md-sys-typescale-label-large-font);
  font-size: var(--md-sys-typescale-label-large-size);
  font-weight: 500;
  letter-spacing: 0.1px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: all var(--md-sys-motion-duration-short) var(--md-sys-motion-easing-standard);
  text-decoration: none;
  position: relative;
  overflow: hidden;
}

/* State Layer Overlay for Hover/Focus */
.md3-btn::before {
  content: "";
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  background: currentColor;
  opacity: 0;
  transition: opacity 0.2s ease;
  pointer-events: none;
}

.md3-btn:hover::before {
  opacity: 0.08; /* State layer opacity */
}

.md3-btn:focus-visible::before {
  opacity: 0.12;
}

.md3-btn:active::before {
  opacity: 0.12;
}

.md3-btn-filled {
  background-color: var(--md-sys-color-primary);
  color: var(--md-sys-color-on-primary);
}
.md3-btn-filled:hover {
  box-shadow: var(--md-sys-elevation-1);
}

.md3-btn-tonal {
  background-color: var(--md-sys-color-secondary-container);
  color: var(--md-sys-color-on-secondary-container);
}
.md3-btn-tonal:hover {
  box-shadow: var(--md-sys-elevation-1);
}

.md3-btn-text {
  background: transparent;
  color: var(--md-sys-color-primary);
  padding: 0 16px; /* Text buttons need padding too */
}
.md3-btn-text:hover {
  background-color: transparent; /* Handled by state layer */
}

/* Icon Button - Android 16 Style */
.md3-icon-btn {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  border: none;
  background: transparent;
  color: var(--md-sys-color-on-surface-variant);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all var(--md-sys-motion-duration-short) var(--md-sys-motion-easing-standard);
}
.md3-icon-btn:hover {
  background-color: color-mix(in srgb, var(--md-sys-color-on-surface-variant) 8%, transparent);
}

/* Cards - Android 16 Pixel Style */
.md3-card {
  background-color: var(--md-sys-color-surface-container-low);
  border-radius: var(--shape-corner-xl); /* Larger, more rounded corners */
  overflow: hidden;
  transition: all var(--md-sys-motion-duration-medium) var(--md-sys-motion-easing-emphasized);
  border: none;
  box-shadow: var(--md-sys-elevation-1); /* Subtle elevation by default */
}

.md3-card:hover {
  background-color: var(--md-sys-color-surface-container);
  box-shadow: var(--md-sys-elevation-3); /* More prominent on hover */
  transform: translateY(-4px); /* Slightly more lift */
}

.md3-card-content {
  padding: var(--spacing-xl); /* More generous padding */
}

/* Top App Bar & Floating Dock */
.top-app-bar {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: 64px;
  background-color: var(--md-sys-color-surface);
  display: flex;
  align-items: center;
  justify-content: center; /* Center the menu on desktop */
  padding: 0 var(--spacing-md);
  z-index: 1000;
  transition: all 0.4s var(--md-sys-motion-easing-emphasized);
}

.app-bar-start {
  display: flex;
  align-items: center;
  gap: 12px;
  transition: all 0.4s var(--md-sys-motion-easing-emphasized);
  opacity: 1;
  transform: translateX(0);
  max-width: 300px; /* Approximate width */
}

.dock-container {
  display: flex;
  align-items: center;
  gap: 8px;
  transition: all 0.4s var(--md-sys-motion-easing-emphasized);
}

/* Khi ở trên top (chưa scroll), nút icon có kích thước bằng nút menu (40px) */
.top-app-bar:not(.scrolled) .md3-icon-btn {
  width: 40px;
  height: 40px;
}



/* Scrolled State: Floating Layout */
.top-app-bar.scrolled {
  top: 16px;
  background-color: transparent; /* Remove background from main container */
  box-shadow: none;
  justify-content: center;
  gap: 16px; /* Gap between dock and back-to-top button */
  pointer-events: none; /* Let clicks pass through empty space */
  width: 100%;
  left: 0;
  transform: none;
  height: auto;
  padding: 0;
}

/* Hide Logo & Mobile Menu in Dock Mode */
/* Hide Logo & Mobile Menu in Dock Mode */
.top-app-bar.scrolled .app-bar-start {
  opacity: 0;
  transform: translateX(-20px);
  pointer-events: none;
  max-width: 0;
  overflow: hidden;
}

/* Dock Container Transformation */
/* Dock Container Transformation */
.top-app-bar.scrolled .dock-container {
  height: 60px; /* 44px icon + 8px padding top/bottom */
  border-radius: 100px;
  padding: 0 8px; /* 8px padding left/right */
  background-color: rgba(255, 255, 255, 0.1); /* Transparent white like mobile */
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  pointer-events: auto; /* Re-enable clicks */
  border: 1px solid rgba(255, 255, 255, 0.2);
}

[data-theme="dark"] .top-app-bar.scrolled .dock-container {
  background-color: rgba(0, 0, 0, 0.2); /* Transparent black like mobile dark mode */
  border: 1px solid rgba(255, 255, 255, 0.1);
}



/* Sliding Indicator */
.nav-indicator {
  position: absolute;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background-color: var(--md-sys-color-primary);
  box-shadow: var(--md-sys-elevation-1);
  opacity: 0;
  z-index: 1; /* Behind nav items */
  transition: all 0.8s var(--md-sys-motion-easing-emphasized);
  pointer-events: none;
  left: 0; /* Start position */
  top: 0;
}

/* Show indicator only in scrolled state */
.top-app-bar.scrolled .nav-indicator {
  opacity: 1;
}

/* Nav Items Transformation */
/* Nav Items Transformation */
/* Nav Items Transformation */
.nav-icon {
  display: flex; /* Dùng flex để căn giữa icon bên trong */
  align-items: center;
  justify-content: center;
  font-size: 24px;
  height: 24px; /* Chiều cao cố định */
  width: 24px;  /* Chiều rộng cố định để tránh méo */
  max-width: 0;
  opacity: 0;
  overflow: hidden;
  transition: all 0.4s var(--md-sys-motion-easing-emphasized);
}

.top-app-bar.scrolled .nav-desktop {
  gap: 8px; /* Increased gap between icons */
}

.top-app-bar.scrolled .nav-item {
  padding: 0;
  width: 44px;
  height: 44px;
  min-width: 44px;
  border-radius: 50%;
  justify-content: center;
  gap: 0; /* Remove gap so icon is perfectly centered */
}

.nav-label {
  display: block;
  max-width: 100px; /* Arbitrary large enough width */
  opacity: 1;
  transition: all 0.4s var(--md-sys-motion-easing-emphasized);
  white-space: nowrap;
  text-align: center;
  line-height: 24px; /* Đồng bộ chiều cao dòng với icon */
  padding-top: 1px; /* Tinh chỉnh nhỏ để cân bằng mắt thường nếu font lệch */
}

.top-app-bar.scrolled .nav-label {
  max-width: 0;
  opacity: 0;
  overflow: hidden;
}

.top-app-bar.scrolled .nav-icon {
  max-width: 22px;
  width: 22px;
  height: 22px;
  font-size: 22px;
  opacity: 1;
}

/* Đảm bảo nút theme có kích thước bằng các nút menu khác khi scroll */
.top-app-bar.scrolled .md3-icon-btn {
  width: 44px;
  height: 44px;
  min-width: 44px;
}

.top-app-bar.scrolled .md3-icon-btn .material-symbols-outlined {
  font-size: 22px;
}

.logo {
  font-size: 22px;
  color: var(--md-sys-color-on-surface);
  font-weight: 400;
  white-space: nowrap;
}

/* Navigation */
.nav-desktop {
  display: flex;
  gap: 8px;
  position: relative;
  align-items: center;
}

.nav-item {
  position: relative;
  transition: all 0.3s var(--md-sys-motion-easing-emphasized);
  z-index: 10; /* Higher z-index to stay above indicator */
  gap: 0; /* Gap về 0 theo yêu cầu */
}

/* Home Item - Always Icon */
.nav-desktop a[href="#home"] {
  padding: 0;
  width: 40px;
  height: 40px;
  min-width: 40px;
  justify-content: center;
  border-radius: 50%;
}

.nav-desktop a[href="#home"] .nav-label {
  display: none;
}

.nav-desktop a[href="#home"] .nav-icon {
  max-width: 24px;
  opacity: 1;
}

/* Active Navigation Item - Highlight Effect */
.nav-item.active {
  background-color: var(--md-sys-color-primary-container);
  color: var(--md-sys-color-on-primary-container);
}

.nav-item.active .nav-icon {
  color: var(--md-sys-color-primary);
  animation: icon-pulse-active 2s ease-in-out infinite;
}

.nav-item.active .nav-label {
  color: var(--md-sys-color-on-primary-container);
  font-weight: 600;
}

/* Home button khi active ở trên top (chưa scroll) - giống nút theme */
.top-app-bar:not(.scrolled) .nav-desktop a[href="#home"].active {
  background-color: transparent;
  color: var(--md-sys-color-on-surface-variant);
}

.top-app-bar:not(.scrolled) .nav-desktop a[href="#home"].active .nav-icon {
  color: var(--md-sys-color-on-surface-variant);
  animation: none;
}

/* Active state in scrolled dock */
.top-app-bar.scrolled .nav-item.active {
  background-color: transparent; /* Indicator handles background */
}

.top-app-bar.scrolled .nav-item.active .nav-icon {
  color: var(--md-sys-color-on-primary);
  animation: none;
}

/* Subtle glow animation for active icon */
@keyframes icon-glow-subtle {
  0%, 100% { 
    filter: drop-shadow(0 0 0px var(--md-sys-color-on-primary));
  }
  50% { 
    filter: drop-shadow(0 0 2px var(--md-sys-color-on-primary));
  }
}

@keyframes icon-pulse-active {
  0%, 100% { 
    transform: scale(1);
  }
  50% { 
    transform: scale(1.02);
  }
}

/* Sliding Indicator */
.nav-indicator {
  position: absolute;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background-color: var(--md-sys-color-primary);
  box-shadow: var(--md-sys-elevation-1);
  opacity: 0;
  z-index: 1; /* Behind nav items */
  transition: all 0.8s var(--md-sys-motion-easing-emphasized);
  pointer-events: none;
  left: 0; /* Start position */
  top: 0;
}

/* Show indicator only in scrolled state */
.top-app-bar.scrolled .nav-indicator {
  opacity: 1;
}

/* Active Navigation Item - Highlight Effect */
.nav-item.active {
  background-color: var(--md-sys-color-primary-container);
  color: var(--md-sys-color-on-primary-container);
}

.nav-item.active .nav-icon {
  color: var(--md-sys-color-primary);
  animation: icon-pulse-active 2s ease-in-out infinite;
}

.nav-item.active .nav-label {
  color: var(--md-sys-color-on-primary-container);
  font-weight: 600;
}

/* Active state in scrolled dock */
.top-app-bar.scrolled .nav-item.active {
  background-color: transparent; /* Indicator handles background */
}

.top-app-bar.scrolled .nav-item.active .nav-icon {
  color: var(--md-sys-color-on-primary);
  animation: none;
}

/* Subtle glow animation for active icon */
@keyframes icon-glow-subtle {
  0%, 100% { 
    filter: drop-shadow(0 0 0px var(--md-sys-color-on-primary));
  }
  50% { 
    filter: drop-shadow(0 0 2px var(--md-sys-color-on-primary));
  }
}

@keyframes icon-pulse-active {
  0%, 100% { 
    transform: scale(1);
  }
  50% { 
    transform: scale(1.02);
  }
}

.nav-mobile-btn {
  display: none;
  background: transparent;
  border: none;
  color: var(--md-sys-color-on-surface);
  cursor: pointer;
}

/* Mobile Drawer */
.nav-drawer {
  position: fixed;
  top: 0; left: 0; bottom: 0;
  width: 300px;
  background-color: var(--md-sys-color-surface-container-low);
  z-index: 1100;
  transform: translateX(-100%);
  transition: transform 0.3s var(--md-sys-motion-easing-emphasized);
  padding: 24px;
  box-shadow: var(--md-sys-elevation-1);
}
.nav-drawer.open {
  transform: translateX(0);
}
.drawer-overlay {
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(0,0,0,0.5);
  z-index: 1050;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}
.drawer-overlay.open {
  opacity: 1;
  pointer-events: auto;
}
.drawer-link {
  display: block;
  padding: 16px;
  color: var(--md-sys-color-on-surface-variant);
  text-decoration: none;
  border-radius: 28px;
  margin-bottom: 8px;
  font-weight: 500;
}
.drawer-link.active, .drawer-link:hover {
  background-color: var(--md-sys-color-secondary-container);
  color: var(--md-sys-color-on-secondary-container);
}

/* === 5. SECTIONS & ANIMATIONS === */
.section {
  padding: 80px 0;
  max-width: 1200px;
  margin: 0 auto;
  padding-left: 24px;
  padding-right: 24px;
  /* Section itself fades in gently */
  opacity: 0;
  transition: opacity 1.2s var(--md-sys-motion-easing-standard);
}
.section.visible {
  opacity: 1;
}

/* Staggered Animation Items */
.stagger-item {
  opacity: 0;
  transform: translateY(40px); /* Increased distance for slower feel */
  transition: 
    opacity 1.0s var(--md-sys-motion-easing-emphasized),
    transform 1.0s var(--md-sys-motion-easing-emphasized);
}

.section.visible .stagger-item {
  opacity: 1;
  transform: translateY(0);
}

/* Stagger Delays (Slower sequence) */
.section.visible .stagger-item:nth-child(1) { transition-delay: 150ms; }
.section.visible .stagger-item:nth-child(2) { transition-delay: 300ms; }
.section.visible .stagger-item:nth-child(3) { transition-delay: 450ms; }
.section.visible .stagger-item:nth-child(4) { transition-delay: 600ms; }
.section.visible .stagger-item:nth-child(5) { transition-delay: 750ms; }
.section.visible .stagger-item:nth-child(6) { transition-delay: 900ms; }
.section.visible .stagger-item:nth-child(7) { transition-delay: 1050ms; }
.section.visible .stagger-item:nth-child(8) { transition-delay: 1200ms; }
.section.visible .stagger-item:nth-child(9) { transition-delay: 1350ms; }
.section.visible .stagger-item:nth-child(10) { transition-delay: 1500ms; }

.hero {
  min-height: 100vh;
  min-height: 100dvh; /* For mobile browsers */
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  background: transparent;
  padding-top: 0;
  overflow: hidden;
  position: relative;
}

.hero-content { 
  max-width: 800px; 
  /* Initial state for hero animation */
  opacity: 0;
  transform: translateY(50px);
  animation: hero-entrance 1.5s var(--md-sys-motion-easing-emphasized) forwards;
}

@keyframes hero-entrance {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.hero-title {
  color: var(--md-sys-color-on-surface);
  margin-bottom: 16px;
}
.hero-subtitle {
  color: var(--md-sys-color-primary);
  margin-bottom: 24px;
  font-weight: 500;
}
.hero-desc {
  color: var(--md-sys-color-on-surface-variant);
  margin-bottom: 40px;
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
}

/* Grids */
.grid-auto {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 24px;
  margin-top: 40px;
}

/* === SKILLS CAROUSEL STYLES === */
.skills-carousel-wrapper {
  position: relative;
  width: 100%;
  max-width: 1000px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: center;
  height: 400px; /* Fixed height for carousel area */
  overflow: visible; /* Allow buttons to float outside if needed */
}

.skills-carousel-track {
  position: relative;
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  perspective: 1000px;
}

.skill-card {
  position: absolute;
  width: 300px;
  padding: 32px;
  background-color: var(--md-sys-color-surface-container);
  border-radius: 24px;
  text-align: center;
  transition: all 0.5s cubic-bezier(0.25, 1, 0.5, 1);
  box-shadow: var(--md-sys-elevation-2);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  /* Default hidden state */
  opacity: 0;
  transform: scale(0.5);
  z-index: 0;
  pointer-events: none;
}

/* Active Center Item */
.skill-card.active {
  opacity: 1;
  transform: translateX(0) scale(1.1);
  z-index: 10;
  background-color: var(--md-sys-color-surface-container-high);
  box-shadow: var(--md-sys-elevation-4);
  pointer-events: auto;
  border: 2px solid var(--md-sys-color-primary);
}

/* Left Item */
.skill-card.prev {
  opacity: 0.6;
  transform: translateX(-110%) scale(0.85);
  z-index: 5;
  cursor: pointer;
  pointer-events: auto;
}

/* Right Item */
.skill-card.next {
  opacity: 0.6;
  transform: translateX(110%) scale(0.85);
  z-index: 5;
  cursor: pointer;
  pointer-events: auto;
}

/* Hidden Items (Behind) */
.skill-card.hidden {
  opacity: 0;
  transform: scale(0.5);
  z-index: 0;
}

/* Inner Content Styles */
.skill-icon-container {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  background-color: var(--md-sys-color-secondary-container);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 8px;
  transition: all 0.3s ease;
}

.skill-card.active .skill-icon-container {
  background-color: var(--md-sys-color-primary-container);
  transform: scale(1.1);
}

.skill-icon {
  font-size: 40px;
  color: var(--md-sys-color-on-secondary-container);
}

.skill-card.active .skill-icon {
  color: var(--md-sys-color-on-primary-container);
}

.skill-level-bar {
  width: 100%;
  height: 6px;
  background-color: var(--md-sys-color-surface-variant);
  border-radius: 3px;
  margin-top: 8px;
  overflow: hidden;
}

.skill-level-bar .level {
  height: 100%;
  background-color: var(--md-sys-color-primary);
  border-radius: 3px;
}

/* Navigation Buttons */
.nav-btn {
  z-index: 20;
  background-color: var(--md-sys-color-surface-container-highest);
  width: 56px;
  height: 56px;
  min-width: 56px; /* Prevent shrinking */
  padding: 0; /* Remove default padding */
  aspect-ratio: 1/1; /* Enforce square aspect ratio */
  border-radius: 50%; /* Ensure perfect circle */
  box-shadow: var(--md-sys-elevation-2); /* Add depth */
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
  flex-shrink: 0; /* Do not shrink in flex container */
}

.nav-btn:hover {
  background-color: var(--md-sys-color-primary);
  color: var(--md-sys-color-on-primary);
}

.prev-btn {
  margin-right: 16px;
}

.next-btn {
  margin-left: 16px;
}

/* Mobile Responsiveness */
@media (max-width: 768px) {
  .skills-carousel-wrapper {
    height: 450px;
  }
  
  .skill-card {
    width: 260px;
  }
  
  .skill-card.prev {
    transform: translateX(-50%) scale(0.8);
    opacity: 0.4;
  }
  
  .skill-card.next {
    transform: translateX(50%) scale(0.8);
    opacity: 0.4;
  }
  
  .nav-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
  }
  
  .prev-btn { left: 0; }
  .next-btn { right: 0; }
}

/* === PROJECT GALLERY STYLES === */

/* Filter Tabs */
.project-filters {
  display: flex;
  justify-content: center;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 48px;
}

.filter-chip {
  height: 40px;
  padding: 0 24px;
  border-radius: 20px;
  border: 1px solid var(--md-sys-color-outline-variant);
  background-color: transparent;
  color: var(--md-sys-color-on-surface-variant);
  font-family: var(--md-sys-typescale-label-large-font);
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.3s ease;
}

.filter-chip:hover {
  background-color: var(--md-sys-color-surface-container-highest);
}

.filter-chip.active {
  background-color: var(--md-sys-color-secondary-container);
  color: var(--md-sys-color-on-secondary-container);
  border-color: transparent;
}

/* Gallery Grid */
.project-gallery {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 32px;
}

/* Project Card */
.project-card {
  background-color: var(--md-sys-color-surface-container-low);
  border-radius: 24px;
  overflow: hidden;
  transition: all 0.4s cubic-bezier(0.25, 0.8, 0.25, 1);
  border: 1px solid transparent;
  display: flex;
  flex-direction: column;
}

.project-card:hover {
  transform: translateY(-8px);
  box-shadow: var(--md-sys-elevation-3);
  background-color: var(--md-sys-color-surface-container);
}

/* Image Area */
.project-image-container {
  position: relative;
  width: 100%;
  height: 220px;
  overflow: hidden;
}

.project-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.6s ease;
}

.project-card:hover .project-img {
  transform: scale(1.05);
}

.project-placeholder-img {
  width: 100%;
  height: 100%;
  background-color: var(--md-sys-color-surface-container-highest);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--md-sys-color-on-surface-variant);
}

.project-placeholder-img span {
  font-size: 48px;
  opacity: 0.5;
}

/* Overlay Action */
.project-overlay {
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  background-color: rgba(0, 0, 0, 0.4);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.3s ease;
  backdrop-filter: blur(2px);
}

.project-card:hover .project-overlay {
  opacity: 1;
}

/* Badge */
.project-badge {
  position: absolute;
  top: 16px;
  right: 16px;
  background-color: rgba(255, 255, 255, 0.9);
  color: #000;
  padding: 4px 12px;
  border-radius: 12px;
  font-size: 12px;
  font-weight: 600;
  box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

/* Content */
.project-content {
  padding: 24px;
  flex-grow: 1;
  display: flex;
  flex-direction: column;
}

.project-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: auto; /* Push to bottom */
  padding-top: 16px;
}

.project-tags span {
  font-size: 12px;
  color: var(--md-sys-color-primary);
  background-color: var(--md-sys-color-primary-container);
  padding: 4px 10px;
  border-radius: 8px;
  font-weight: 500;
}

/* Animation for Filtering */
.project-card.hidden {
  display: none;
}

.project-card.fade-in {
  animation: fadeIn 0.5s ease forwards;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}

/* Footer */
footer {
  background-color: var(--md-sys-color-surface-container);
  padding: 48px 24px;
  text-align: center;
  margin-top: 80px;
}

/* Ripple */
.ripple { position: relative; overflow: hidden; }
.ripple::after {
  content: "";
  position: absolute;
  background: rgba(255,255,255,0.3);
  border-radius: 50%;
  transform: scale(0);
  animation: ripple 0.6s linear;
  pointer-events: none;
}
@keyframes ripple {
  to { transform: scale(4); opacity: 0; }
}

/* Responsive */
@media (max-width: 768px) {
  .top-app-bar { justify-content: space-between; } /* Keep space-between on mobile */
  .nav-desktop { display: none; }
  .nav-mobile-btn { display: block; }
  .display-large { font-size: 44px; line-height: 52px; }
  .headline-large { font-size: 28px; line-height: 36px; }
}

/* === ABOUT SECTION STYLES (CREATIVE TIMELINE) === */
.about-creative-container {
  display: grid;
  grid-template-columns: 300px 1fr;
  gap: 48px;
  margin-top: 40px;
  align-items: start;
}

/* --- Sticky Profile Side --- */
.creative-profile-side {
  position: sticky;
  top: 100px;
  display: flex;
  flex-direction: column;
  gap: 24px;
  text-align: center;
}

.profile-image-frame {
  position: relative;
  width: 100%;
  aspect-ratio: 1/1;
  border-radius: 24px;
  overflow: visible; /* Allow badge to float out */
}

.creative-avatar {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 24px;
  box-shadow: var(--md-sys-elevation-2);
  transition: transform 0.4s var(--md-sys-motion-easing-emphasized);
}

.profile-image-frame:hover .creative-avatar {
  transform: scale(1.02) translateY(-4px);
  box-shadow: var(--md-sys-elevation-4);
}

.profile-floating-badge {
  position: absolute;
  bottom: -16px;
  left: 50%;
  transform: translateX(-50%);
  background-color: var(--md-sys-color-tertiary-container);
  color: var(--md-sys-color-on-tertiary-container);
  padding: 8px 16px;
  border-radius: 100px;
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  font-weight: 500;
  box-shadow: var(--md-sys-elevation-2);
  white-space: nowrap;
}

.profile-name-block {
  margin-top: 16px;
}

.profile-action-row {
  display: flex;
  flex-direction: column;
  gap: 12px;
  align-items: center;
}

.social-mini-row {
  display: flex;
  gap: 8px;
}

/* --- Content Side --- */
.creative-content-side {
  display: flex;
  flex-direction: column;
  gap: 48px;
}

.content-block {
  background-color: var(--md-sys-color-surface-container-low);
  padding: 32px;
  border-radius: 24px;
  position: relative;
}

.section-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 24px;
  color: var(--md-sys-color-primary);
}

/* Manifesto Block */
.manifesto-block {
  background: linear-gradient(135deg, var(--md-sys-color-surface-container-low) 0%, var(--md-sys-color-surface-container) 100%);
  border-left: 4px solid var(--md-sys-color-primary);
}

.block-icon {
  font-size: 40px;
  color: var(--md-sys-color-primary);
  opacity: 0.2;
  position: absolute;
  top: 24px;
  right: 24px;
}

.highlight-pill {
  background-color: var(--md-sys-color-secondary-container);
  color: var(--md-sys-color-on-secondary-container);
  padding: 2px 8px;
  border-radius: 4px;
  font-weight: 500;
}

/* Timeline Styles */
.timeline {
  position: relative;
  padding-left: 12px;
}

.timeline::before {
  content: "";
  position: absolute;
  top: 0; bottom: 0; left: 23px; /* Align with marker center */
  width: 2px;
  background-color: var(--md-sys-color-outline-variant);
}

.timeline-item {
  position: relative;
  padding-left: 48px;
  margin-bottom: 32px;
}

.timeline-item:last-child {
  margin-bottom: 0;
}

.timeline-marker {
  position: absolute;
  left: 16px;
  top: 4px;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background-color: var(--md-sys-color-surface);
  border: 4px solid var(--md-sys-color-primary);
  z-index: 2;
  transition: all 0.3s ease;
}

.timeline-item:hover .timeline-marker {
  transform: scale(1.3);
  background-color: var(--md-sys-color-primary);
}

.timeline-year {
  font-size: 14px;
  font-weight: 700;
  color: var(--md-sys-color-primary);
  margin-bottom: 4px;
}

/* Tech Chips */
.tech-chip-container {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.md3-chip {
  display: inline-flex;
  align-items: center;
  height: 32px;
  padding: 0 16px;
  border-radius: 8px;
  background-color: var(--md-sys-color-surface-container-high);
  color: var(--md-sys-color-on-surface-variant);
  font-size: 14px;
  font-weight: 500;
  border: 1px solid transparent;
  transition: all 0.2s ease;
  cursor: default;
}

.md3-chip:hover {
  background-color: var(--md-sys-color-secondary-container);
  color: var(--md-sys-color-on-secondary-container);
  border-color: var(--md-sys-color-secondary);
}

/* Responsive */
@media (max-width: 900px) {
  .about-creative-container {
    grid-template-columns: 1fr;
  }
  .creative-profile-side {
    position: relative;
    top: 0;
    max-width: 400px;
    margin: 0 auto;
  }
}



/* === SOCIAL HUB STYLES === */
.social-hub-container {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 24px;
  margin-top: 40px;
}

.social-card {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 16px;
  background-color: var(--md-sys-color-surface-container-low);
  border-radius: 16px;
  text-decoration: none;
  color: var(--md-sys-color-on-surface);
  transition: all 0.3s var(--md-sys-motion-easing-standard);
  border: 1px solid transparent;
}

.social-card:hover {
  background-color: var(--md-sys-color-surface-container);
  transform: translateY(-4px);
  box-shadow: var(--md-sys-elevation-2);
}

.social-icon-box {
  width: 48px;
  height: 48px;
  min-width: 48px; /* Prevent shrinking */
  flex-shrink: 0; /* Ensure it stays circular */
  border-radius: 50%; /* Make icons circular */
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: var(--md-sys-color-surface-container-highest);
  color: var(--md-sys-color-on-surface-variant);
  transition: all 0.3s ease;
}

.social-card:hover .social-icon-box {
  color: #fff; /* Icon becomes white on hover */
}

.social-info {
  display: flex;
  flex-direction: column;
}

.social-name {
  font-size: 14px;
  font-weight: 600;
  color: var(--md-sys-color-on-surface);
}

.social-handle {
  font-size: 12px;
  color: var(--md-sys-color-on-surface-variant);
}

/* Brand Colors on Hover */
.social-card.phone:hover .social-icon-box { background-color: #4CAF50; }
.social-card.email:hover .social-icon-box { background-color: #EA4335; }
.social-card.zalo:hover .social-icon-box { background-color: #0068FF; }
.social-card.facebook:hover .social-icon-box { background-color: #1877F2; }
.social-card.tiktok:hover .social-icon-box { background-color: #000000; }
.social-card.telegram:hover .social-icon-box { background-color: #229ED9; }
.social-card.github:hover .social-icon-box { background-color: #333; }
.social-card.discord:hover .social-icon-box { background-color: #5865F2; }
.social-card.instagram:hover .social-icon-box { 
  background: linear-gradient(45deg, #f09433 0%,#e6683c 25%,#dc2743 50%,#cc2366 75%,#bc1888 100%); 
}

/* Responsive Adjustments */
@media (max-width: 600px) {
  .social-hub-container {
    grid-template-columns: 1fr; /* Stack vertically on small mobile */
  }
}

/* === GALLERY LIGHTBOX STYLES === */
.gallery-lightbox {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 2000;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s var(--md-sys-motion-easing-emphasized);
}

.gallery-lightbox.active {
  opacity: 1;
  pointer-events: auto;
}

.lightbox-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: rgba(0, 0, 0, 0.85);
  backdrop-filter: blur(10px);
}

.lightbox-content {
  position: relative;
  max-width: 90vw;
  max-height: 90vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  z-index: 1;
  animation: lightbox-zoom-in 0.3s var(--md-sys-motion-easing-emphasized);
}

@keyframes lightbox-zoom-in {
  from {
    transform: scale(0.8);
    opacity: 0;
  }
  to {
    transform: scale(1);
    opacity: 1;
  }
}

.lightbox-close {
  position: absolute;
  top: -60px;
  right: 0;
  background-color: var(--md-sys-color-surface-container-high);
  color: var(--md-sys-color-on-surface);
  z-index: 2;
}

.lightbox-close:hover {
  background-color: var(--md-sys-color-error);
  color: var(--md-sys-color-on-error);
}

.lightbox-image {
  max-width: 100%;
  max-height: 70vh;
  border-radius: var(--shape-corner-lg);
  box-shadow: var(--md-sys-elevation-5);
  object-fit: contain;
}

.lightbox-info {
  background-color: var(--md-sys-color-surface-container);
  padding: 16px 24px;
  border-radius: var(--shape-corner-md);
  text-align: center;
  max-width: 600px;
}

.lightbox-title {
  color: var(--md-sys-color-on-surface);
  margin-bottom: 8px;
}

.lightbox-description {
  color: var(--md-sys-color-on-surface-variant);
}

/* === GALLERY SECTION - CREATIVE STAGGERED LAYOUT === */
.gallery-section {
  min-height: 100vh;
  display: flex;
  align-items: center;
  padding: 120px 24px;
}

.gallery-container {
  display: grid;
  grid-template-columns: 1fr 1.5fr;
  gap: 80px;
  max-width: 1400px;
  margin: 0 auto;
  width: 100%;
  align-items: center;
}

/* Left Side - Title & Description */
.gallery-left {
  display: flex;
  flex-direction: column;
  gap: 24px;
  padding-right: 40px;
}

.gallery-main-title {
  color: var(--md-sys-color-primary);
  font-size: clamp(48px, 8vw, 80px);
  line-height: 1.1;
  font-weight: 700;
  margin: 0;
  position: relative;
}

.gallery-main-title::after {
  content: '';
  display: block;
  width: 80px;
  height: 6px;
  background: var(--md-sys-color-primary);
  margin-top: 16px;
  border-radius: 3px;
}

.gallery-description {
  color: var(--md-sys-color-on-surface-variant);
  font-size: 18px;
  line-height: 1.6;
  max-width: 500px;
}

/* Right Side - Staggered Grid */
.gallery-right {
  position: relative;
  min-height: 600px;
}

.gallery-grid-staggered {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
  position: relative;
}

/* Gallery Item - Rotated Cards */
.gallery-item {
  position: relative;
  width: 100%;
  aspect-ratio: 3 / 4;
  transform: rotate(-8deg);
  transition: all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
  cursor: pointer;
  border-radius: var(--shape-corner-lg);
  overflow: hidden;
  box-shadow: var(--md-sys-elevation-3);
}

/* Stagger rotation for variety */
.gallery-item:nth-child(2n) {
  transform: rotate(8deg);
}

.gallery-item:nth-child(3n) {
  transform: rotate(-5deg);
}

/* Row offsets for staggered effect */
/* Row offsets for staggered effect - 4 columns */
.gallery-item:nth-child(4n+1) {
  margin-top: 0;
}

.gallery-item:nth-child(4n+2) {
  margin-top: 40px;
}

.gallery-item:nth-child(4n+3) {
  margin-top: -20px;
}

.gallery-item:nth-child(4n+4) {
  margin-top: 20px;
}

/* Hover Effect - Straighten and lift */
.gallery-item:hover {
  transform: rotate(0deg) translateY(-12px) scale(1.05);
  box-shadow: var(--md-sys-elevation-5);
  z-index: 10;
}

/* Gallery Image Styling */
.gallery-item .project-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 30%;
  transition: transform 0.4s ease;
}

.gallery-item:hover .project-img {
  transform: scale(1.1);
}

/* Overlay gradient */
.gallery-item::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(
    to top, 
    rgba(0,0,0,0.7) 0%, 
    rgba(0,0,0,0.3) 50%,
    transparent 100%
  );
  opacity: 0;
  transition: opacity 0.3s ease;
  pointer-events: none;
}

.gallery-item:hover::after {
  opacity: 1;
}

/* Title overlay on hover */
.gallery-item::before {
  content: attr(data-title);
  position: absolute;
  bottom: 20px;
  left: 20px;
  right: 20px;
  color: white;
  font-size: 16px;
  font-weight: 600;
  opacity: 0;
  transform: translateY(10px);
  transition: all 0.3s ease;
  z-index: 2;
  pointer-events: none;
}

.gallery-item:hover::before {
  opacity: 1;
  transform: translateY(0);
}

/* Mobile Responsive */
@media (max-width: 1024px) {
  .gallery-container {
    grid-template-columns: 1fr;
    gap: 60px;
  }
  
  .gallery-left {
    text-align: center;
    padding-right: 0;
    align-items: center;
  }
  
  .gallery-main-title::after {
    margin-left: auto;
    margin-right: auto;
  }
  
  .gallery-description {
    max-width: 100%;
  }
  
  .gallery-grid-staggered {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 768px) {
  .lightbox-content {
    max-width: 95vw;
    max-height: 95vh;
  }
  
  .lightbox-image {
    max-height: 60vh;
  }
  
  .lightbox-close {
    top: -50px;
  }
  
  /* Gallery responsive */
  .gallery-item {
    aspect-ratio: 4 / 3; /* Giữ tỷ lệ landscape trên mobile */
  }
}

@media (max-width: 480px) {
  /* Gallery 2 cột trên mobile nhỏ */
  #gallery .grid-auto {
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 12px !important;
  }
}

/* === UNIQUE SECTION HEADINGS === */

/* Common styles for centering */
.section {
  display: flex;
  flex-direction: column;
  align-items: center; /* Căn giữa tất cả nội dung con (bao gồm tiêu đề) */
}

.section .headline-large {
  display: inline-block;
  margin-bottom: 48px; /* Standard spacing */
  position: relative;
  text-align: center;
  max-width: 100%;
}

/* Ensure content containers take full width */
.about-creative-container,
.gallery-container,
.grid-auto,
.skills-carousel-wrapper,
.project-gallery,
.project-filters {
  width: 100%;
  max-width: 1400px; /* Giới hạn chiều rộng tối đa cho đẹp */
}

/* 1. About Section - Personal & Signature Style */
#about .headline-large {
  font-family: var(--md-sys-typescale-headline-large-font);
  font-style: italic;
  margin-bottom: 80px !important;
}

#about .headline-large::after {
  content: '';
  position: absolute;
  bottom: -10px;
  left: 50%;
  transform: translateX(-50%);
  width: 120px;
  height: 4px;
  background: var(--md-sys-color-primary);
  border-radius: 2px;
  box-shadow: 4px 4px 0 var(--md-sys-color-secondary-container);
}

/* 2. Skills Section - Tech & Block Style */
#skills .headline-large {
  font-family: 'Roboto Mono', monospace;
  text-transform: uppercase;
  letter-spacing: 2px;
  background: linear-gradient(90deg, var(--md-sys-color-primary) 0%, var(--md-sys-color-tertiary) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  padding: 8px 24px;
  border: 2px solid var(--md-sys-color-outline);
  border-radius: 8px;
}

#skills .headline-large::before {
  content: '< ';
  color: var(--md-sys-color-primary);
  -webkit-text-fill-color: var(--md-sys-color-primary);
}

#skills .headline-large::after {
  content: ' />';
  color: var(--md-sys-color-primary);
  -webkit-text-fill-color: var(--md-sys-color-primary);
}

/* 3. Projects Section - Modern & Highlight */
#projects .headline-large {
  z-index: 1;
}

#projects .headline-large::before {
  content: '';
  position: absolute;
  bottom: 4px;
  left: -10px;
  right: -10px;
  height: 12px;
  background-color: var(--md-sys-color-tertiary-container);
  z-index: -1;
  transform: skewX(-20deg);
  opacity: 0.7;
}

/* 4. Blog Section - Journal & Marker Style */
#blog .headline-large {
  border-left: 6px solid var(--md-sys-color-secondary);
  border-right: 6px solid var(--md-sys-color-secondary); /* Add right border for symmetry */
  padding: 0 24px;
  /* Removed left-align properties */
}

/* 5. Contact Section - Friendly & Connect */
#contact .headline-large {
  background-color: var(--md-sys-color-primary-container);
  color: var(--md-sys-color-on-primary-container) !important;
  padding: 12px 32px;
  border-radius: 50px;
  display: inline-flex; /* Override inline-block from common */
  align-items: center;
  gap: 12px;
  box-shadow: var(--md-sys-elevation-2);
}

#contact .headline-large::before {
  content: '👋';
  font-size: 32px;
}

/* 6. Gallery Section - Framed Perspective Style */
.gallery-header {
  text-align: center;
  margin-bottom: 64px;
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.gallery-main-title {
  font-family: 'Outfit', sans-serif; /* Modern geometric font */
  font-weight: 800;
  letter-spacing: 4px;
  text-transform: uppercase;
  position: relative;
  padding: 16px 40px;
  display: inline-block;
  margin-bottom: 24px;
  color: var(--md-sys-color-on-surface);
}

/* Camera Viewfinder Corners */
.gallery-main-title::before,
.gallery-main-title::after {
  content: '';
  position: absolute;
  width: 24px;
  height: 24px;
  border-color: var(--md-sys-color-primary);
  border-style: solid;
  transition: all 0.3s ease;
}

.gallery-main-title::before {
  top: 0;
  left: 0;
  border-width: 3px 0 0 3px; /* Top-Left corner */
}

.gallery-main-title::after {
  bottom: 0;
  right: 0;
  border-width: 0 3px 3px 0; /* Bottom-Right corner */
}

/* Secondary corners using pseudo-element of a span (requires HTML change or extra trick, 
   but for simplicity we'll stick to 2 corners or add background element) */
/* Let's add a background subtle frame instead */
.gallery-main-title {
  background: 
    linear-gradient(to right, var(--md-sys-color-primary) 3px, transparent 3px) 100% 0,
    linear-gradient(to bottom, var(--md-sys-color-primary) 3px, transparent 3px) 100% 0;
  background-size: 24px 24px;
  background-repeat: no-repeat;
}

.gallery-description {
  max-width: 600px;
  margin: 0 auto;
  color: var(--md-sys-color-on-surface-variant);
  text-align: center;
}

/* Updated Gallery Grid Layout */
.gallery-container-full {
  width: 100%;
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 24px;
}

.gallery-grid-staggered {
  display: grid;
  grid-template-columns: repeat(4, 1fr); /* 4 columns for smaller cards */
  gap: 24px;
  padding-bottom: 40px;
}

/* Responsive adjustments for Gallery */
@media (max-width: 1200px) {
  .gallery-grid-staggered {
    grid-template-columns: repeat(3, 1fr); /* 3 columns on large tablet */
  }
}

@media (max-width: 900px) {
  .gallery-grid-staggered {
    grid-template-columns: repeat(2, 1fr); /* 2 columns on tablet */
  }
}

@media (max-width: 768px) {
  .gallery-grid-staggered {
    grid-template-columns: repeat(2, 1fr);
  }
  
  .gallery-main-title {
    font-size: 32px;
    padding: 12px 24px;
  }
}

@media (max-width: 480px) {
  .gallery-grid-staggered {
    grid-template-columns: 1fr;
  }
}

/* ========================================
   MODERN ABOUT SECTION REDESIGN
   ======================================== */

.about-section-modern {
  padding: 120px 24px 80px;
  position: relative;
  overflow: hidden;
}


/* Modern Title */
.about-title-modern {
  color: var(--md-sys-color-primary);
  text-align: center;
  margin-bottom: 64px;
  position: relative;
  display: inline-block;
  width: 100%;
}

.title-underline-animated {
  display: block;
  width: 80px;
  height: 4px;
  background: linear-gradient(
    90deg,
    var(--md-sys-color-primary) 0%,
    var(--md-sys-color-tertiary) 100%
  );
  margin: 16px auto 0;
  border-radius: 2px;
}

/* Bento Grid Layout */
.about-bento-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  grid-auto-rows: minmax(200px, auto);
  gap: 24px;
  max-width: 1400px;
  margin: 0 auto;
}

/* Glass Card Effect */
/* Glass Card Effect - Pomelli Style */
.glass-card {
  background: rgba(255, 255, 255, 0.4); /* More opaque for "milky" glass look */
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  border: 1px solid rgba(255, 255, 255, 0.4);
  box-shadow: 
    0 4px 24px -1px rgba(0, 0, 0, 0.05),
    0 0 0 1px rgba(255, 255, 255, 0.2) inset; /* Inner glow */
  transition: all 0.5s cubic-bezier(0.34, 1.56, 0.64, 1); /* Bouncy transition */
  border-radius: 40px; /* Extra rounded */
}

[data-theme="dark"] .glass-card {
  background: rgba(30, 30, 30, 0.6);
  border: 1px solid rgba(255, 255, 255, 0.05);
  box-shadow: 0 4px 24px -1px rgba(0, 0, 0, 0.3);
}

.glass-card:hover {
  transform: translateY(-8px) scale(1.01);
  background: rgba(255, 255, 255, 0.6);
  border-color: rgba(255, 255, 255, 0.6);
  box-shadow: 0 20px 40px -5px rgba(0, 0, 0, 0.1);
}

[data-theme="dark"] .glass-card:hover {
  background: rgba(40, 40, 40, 0.7);
  border-color: rgba(255, 255, 255, 0.1);
}

/* Bento Card Base */
.bento-card {
  border-radius: 40px; /* Extra rounded */
  padding: 40px; /* More padding */
  position: relative;
  overflow: hidden;
}

/* Main Profile Card - Spans 2x3 */
.bento-profile-main {
  grid-column: span 2;
  grid-row: span 3;
  display: flex;
  flex-direction: column;
  gap: 32px;
}

/* 3D Avatar Container */
.profile-3d-container {
  position: relative;
  width: 100%;
  aspect-ratio: 1/1;
  max-width: 300px;
  margin: 0 auto;
  perspective: 1000px;
}

.avatar-glow-ring {
  position: absolute;
  inset: -20px;
  border-radius: 50%;
  background: conic-gradient(
    from 0deg,
    var(--md-sys-color-primary),
    var(--md-sys-color-tertiary),
    var(--md-sys-color-primary)
  );
  opacity: 0.3;
  filter: blur(20px);
  animation: ring-rotate 8s linear infinite;
}

@keyframes ring-rotate {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

.avatar-3d {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 50%;
  position: relative;
  z-index: 2;
  box-shadow: 
    0 20px 60px rgba(0, 0, 0, 0.3),
    0 0 0 10px rgba(255, 255, 255, 0.05);
  transition: transform 0.6s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.avatar-3d:hover {
  transform: scale(1.05) rotateY(10deg) rotateX(5deg);
}

/* Status Badge */
.status-badge {
  position: absolute;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--md-sys-color-primary);
  color: var(--md-sys-color-on-primary);
  padding: 8px 20px;
  border-radius: 50px;
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  font-weight: 500;
  box-shadow: 0 4px 16px rgba(0, 106, 106, 0.4);
  z-index: 3;
  white-space: nowrap; /* Prevent text wrapping */
}

.status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--md-sys-color-on-primary);
  animation: pulse-dot 2s ease-in-out infinite;
  flex-shrink: 0; /* Prevent dot from shrinking */
}

.status-text {
  white-space: nowrap; /* Ensure text stays on one line */
  overflow: hidden;
  text-overflow: ellipsis; /* Add ellipsis if text is too long */
}

@keyframes pulse-dot {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.5; transform: scale(1.2); }
}

/* Profile Info */
.profile-info-modern {
  text-align: center;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.profile-name-gradient {
  background: linear-gradient(
    135deg,
    var(--md-sys-color-primary) 0%,
    var(--md-sys-color-tertiary) 100%
  );
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin-bottom: 8px;
}

.profile-role {
  color: var(--md-sys-color-on-surface-variant);
  font-weight: 500;
}

.profile-tagline {
  color: var(--md-sys-color-on-surface-variant);
  opacity: 0.8;
  line-height: 1.6;
  text-align: center !important;
}

/* Profile Actions */
.profile-actions-modern {
  display: flex;
  gap: 12px;
  justify-content: center;
  margin-top: 8px;
}

.btn-glow {
  position: relative;
  overflow: visible;
}

.btn-glow::after {
  content: '';
  position: absolute;
  inset: -2px;
  background: inherit;
  border-radius: inherit;
  filter: blur(12px);
  opacity: 0;
  transition: opacity 0.3s ease;
  z-index: -1;
}

.btn-glow:hover::after {
  opacity: 0.6;
}

/* Social Links */
.social-links-modern {
  display: flex;
  gap: 12px;
  justify-content: center;
  margin-top: 8px;
}

.social-icon-modern {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: var(--md-sys-color-surface-container-high);
  color: var(--md-sys-color-on-surface-variant);
  display: flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
  position: relative;
}

.social-icon-modern::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background: var(--md-sys-color-primary);
  opacity: 0;
  transform: scale(0);
  transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.social-icon-modern:hover {
  transform: translateY(-4px) scale(1.1);
  box-shadow: 0 8px 24px rgba(0, 106, 106, 0.3);
}

.social-icon-modern:hover::before {
  opacity: 1;
  transform: scale(1);
}

.social-icon-modern .material-symbols-outlined {
  position: relative;
  z-index: 1;
  transition: color 0.3s ease;
}

.social-icon-modern:hover .material-symbols-outlined {
  color: var(--md-sys-color-on-primary);
}


/* Skills Cloud Card - Spans 2x1 */
.bento-skills {
  grid-column: span 2;
  grid-row: span 1;
}

.card-title {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 24px;
  color: var(--md-sys-color-on-surface);
}

.card-title .material-symbols-outlined {
  color: var(--md-sys-color-primary);
  font-size: 28px;
}

.skills-cloud-modern {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.skill-tag-modern {
  padding: 10px 20px;
  border-radius: 50px;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
  position: relative;
  overflow: hidden;
}

.skill-tag-modern::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 0;
  height: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.2);
  transform: translate(-50%, -50%);
  transition: width 0.4s ease, height 0.4s ease;
}

.skill-tag-modern:hover::before {
  width: 200%;
  height: 200%;
}

.skill-primary {
  background: var(--md-sys-color-primary-container);
  color: var(--md-sys-color-on-primary-container);
  border: 2px solid var(--md-sys-color-primary);
}

.skill-secondary {
  background: var(--md-sys-color-secondary-container);
  color: var(--md-sys-color-on-secondary-container);
  border: 2px solid var(--md-sys-color-secondary);
}

.skill-tertiary {
  background: var(--md-sys-color-tertiary-container);
  color: var(--md-sys-color-on-tertiary-container);
  border: 2px solid var(--md-sys-color-tertiary);
}

.skill-tag-modern:hover {
  transform: translateY(-4px) scale(1.05);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2);
}

/* Quote Card - Spans 2x1 */
.bento-quote {
  grid-column: span 2;
  grid-row: span 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  position: relative;
}

.quote-icon {
  position: absolute;
  top: 24px;
  left: 24px;
  font-size: 60px;
  color: var(--md-sys-color-primary);
  opacity: 0.1;
}

.quote-text {
  font-style: italic;
  color: var(--md-sys-color-on-surface);
  line-height: 1.6;
  margin-bottom: 16px;
  position: relative;
  z-index: 1;
  text-indent: 3em;
  text-align: justify;
}

.quote-author {
  font-size: 14px;
  color: var(--md-sys-color-primary);
  font-weight: 500;
  text-align: right;
}


/* Interests Card - Spans 2x1 */
.bento-interests {
  grid-column: span 2;
  grid-row: span 1;
}

.interests-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
}

.interest-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding: 16px;
  background: var(--md-sys-color-surface-container-low);
  border-radius: 16px;
  transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
  cursor: pointer;
}

.interest-item:hover {
  background: var(--md-sys-color-primary-container);
  transform: translateY(-4px) scale(1.05);
  box-shadow: 0 8px 24px rgba(0, 106, 106, 0.2);
}

.interest-item .material-symbols-outlined {
  font-size: 32px;
  color: var(--md-sys-color-primary);
  transition: transform 0.3s ease;
}

.interest-item:hover .material-symbols-outlined {
  transform: scale(1.2) rotate(10deg);
}

.interest-item span:last-child {
  font-size: 12px;
  font-weight: 500;
  color: var(--md-sys-color-on-surface-variant);
  text-align: center;
}

/* Responsive Design */
@media (max-width: 1200px) {
  .about-bento-grid {
    grid-template-columns: repeat(4, 1fr);
  }
  
  .bento-profile-main {
    grid-column: span 3;
    grid-row: span 2;
  }
}

@media (max-width: 768px) {
  .about-section-modern {
    padding: 80px 16px 60px;
  }
  
  .about-bento-grid {
    grid-template-columns: 1fr;
    gap: 16px;
  }
  
  .bento-card {
    padding: 24px;
  }
  
  .bento-profile-main,
  .bento-skills,
  .bento-quote,
  .bento-interests {
    grid-column: span 1;
    grid-row: span 1;
  }
  
  .profile-3d-container {
    max-width: 200px;
  }
  
  .profile-actions-modern {
    flex-direction: column;
  }
  
  .profile-actions-modern .md3-btn {
    width: 100%;
  }
  
  .interests-grid {
    grid-template-columns: repeat(4, 1fr);
  }
}

@media (max-width: 480px) {
  .about-title-modern {
    font-size: 28px;
  }
  
  .skills-cloud-modern {
    gap: 8px;
  }
  
  .skill-tag-modern {
    padding: 8px 16px;
    font-size: 12px;
  }
  
  .interests-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* ========================================
   MODERN BLOG SECTION REDESIGN
   ======================================== */

.blog-section-modern {
  padding: 120px 24px;
  position: relative;
}

.blog-title-modern {
  text-align: center;
  margin-bottom: 64px;
  position: relative;
  display: inline-block;
  width: 100%;
  color: var(--md-sys-color-primary);
}

.blog-grid-modern {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
  gap: 32px;
  max-width: 1400px;
  margin: 0 auto;
}

.blog-card-modern {
  background: rgba(255, 255, 255, 0.03);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 24px;
  overflow: hidden;
  transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  display: flex;
  flex-direction: column;
  height: 100%;
  position: relative;
}

.blog-card-modern:hover {
  transform: translateY(-10px);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
  border-color: var(--md-sys-color-primary);
  background: rgba(255, 255, 255, 0.05);
}

.blog-card-header {
  height: 200px;
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, rgba(255,255,255,0.05) 0%, rgba(255,255,255,0.01) 100%);
}

.blog-card-bg-icon {
  font-size: 120px;
  opacity: 0.1;
  position: absolute;
  transform: rotate(-15deg);
  transition: all 0.5s ease;
  color: var(--md-sys-color-primary);
}

.blog-card-modern:hover .blog-card-bg-icon {
  transform: rotate(0deg) scale(1.2);
  opacity: 0.15;
}

.blog-card-icon-wrapper {
  width: 80px;
  height: 80px;
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(5px);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 2;
  border: 1px solid rgba(255, 255, 255, 0.2);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
  transition: all 0.3s ease;
}

.blog-card-modern:hover .blog-card-icon-wrapper {
  transform: scale(1.1);
  background: var(--md-sys-color-primary-container);
  color: var(--md-sys-color-on-primary-container);
}

.blog-card-content {
  padding: 32px;
  flex-grow: 1;
  display: flex;
  flex-direction: column;
}

.blog-category-badge {
  display: inline-block;
  padding: 6px 16px;
  border-radius: 50px;
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 16px;
  align-self: flex-start;
  background: rgba(var(--md-sys-color-primary-rgb), 0.1);
  color: var(--md-sys-color-primary);
  border: 1px solid rgba(var(--md-sys-color-primary-rgb), 0.2);
}

.blog-card-title {
  font-size: 24px;
  font-weight: 700;
  margin-bottom: 12px;
  line-height: 1.3;
  background: linear-gradient(to right, var(--md-sys-color-on-surface), var(--md-sys-color-on-surface-variant));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  transition: all 0.3s ease;
}

.blog-card-modern:hover .blog-card-title {
  background: linear-gradient(to right, var(--md-sys-color-primary), var(--md-sys-color-tertiary));
  -webkit-background-clip: text;
  background-clip: text;
}

.blog-card-desc {
  color: var(--md-sys-color-on-surface-variant);
  line-height: 1.6;
  margin-bottom: 24px;
  flex-grow: 1;
}


/* Responsive */
@media (max-width: 768px) {
  .blog-grid-modern {
    grid-template-columns: 1fr;
  }
  
  .blog-card-header {
    height: 160px;
  }
}

/* ========================================
   MODERN CONTACT SECTION
   ======================================== */

.contact-grid-modern {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 24px;
  max-width: 1000px;
  margin: 0 auto;
}

.contact-card-modern {
  background: rgba(255, 255, 255, 0.03);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 16px;
  padding: 24px;
  display: flex;
  align-items: center;
  gap: 20px;
  text-decoration: none;
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}

.contact-card-modern:hover {
  background: rgba(255, 255, 255, 0.08);
  transform: translateY(-5px);
  border-color: var(--md-sys-color-primary);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

.contact-icon-box {
  width: 56px;
  height: 56px;
  border-radius: 12px;
  background: var(--md-sys-color-surface-variant);
  color: var(--md-sys-color-on-surface-variant);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
}

.contact-card-modern:hover .contact-icon-box {
  background: var(--md-sys-color-primary);
  color: var(--md-sys-color-on-primary);
  transform: scale(1.1) rotate(-5deg);
}

.contact-info {
  display: flex;
  flex-direction: column;
}

.contact-label {
  font-size: 14px;
  color: var(--md-sys-color-on-surface-variant);
  margin-bottom: 4px;
}

.contact-value {
  font-size: 16px;
  font-weight: 600;
  color: var(--md-sys-color-on-surface);
}


/* ========================================
   CONTACT SECTION REDESIGN (SPLIT LAYOUT)
   ======================================== */

.contact-wrapper-redesigned {
  display: flex;
  flex-direction: column;
  gap: 64px;
  max-width: 1000px;
  margin: 0 auto;
}

/* Direct Contact Grid (Email, Phone, Address) */
.contact-direct-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 24px;
}

.contact-card-large {
  background: rgba(255, 255, 255, 0.03);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 24px;
  padding: 32px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  text-decoration: none;
  transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  position: relative;
  overflow: hidden;
}

.contact-card-large::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, rgba(255,255,255,0.1) 0%, rgba(255,255,255,0) 100%);
  opacity: 0;
  transition: opacity 0.4s ease;
}

.contact-card-large:hover {
  transform: translateY(-8px);
  border-color: var(--md-sys-color-primary);
  box-shadow: 0 15px 40px rgba(0, 0, 0, 0.15);
}

.contact-card-large:hover::before {
  opacity: 1;
}

.contact-icon-large {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  background: var(--md-sys-color-secondary-container);
  color: var(--md-sys-color-on-secondary-container);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 20px;
  transition: all 0.4s ease;
  font-size: 32px;
}

.contact-card-large:hover .contact-icon-large {
  background: var(--md-sys-color-primary);
  color: var(--md-sys-color-on-primary);
  transform: scale(1.1) rotate(10deg);
}

.contact-label-large {
  font-size: 14px;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--md-sys-color-on-surface-variant);
  margin-bottom: 8px;
  font-weight: 600;
}

.contact-value-large {
  font-size: 18px;
  font-weight: 700;
  color: var(--md-sys-color-on-surface);
  word-break: break-word;
}

/* Social Section */
.contact-social-section {
  text-align: center;
}

.social-title {
  font-size: 20px;
  font-weight: 600;
  margin-bottom: 32px;
  color: var(--md-sys-color-on-surface);
  position: relative;
  display: inline-block;
}

.social-title::after {
  content: '';
  position: absolute;
  bottom: -8px;
  left: 50%;
  transform: translateX(-50%);
  width: 40px;
  height: 3px;
  background: var(--md-sys-color-primary);
  border-radius: 2px;
}

.contact-social-grid {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 20px;
}

.social-card-modern {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 24px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 50px;
  text-decoration: none;
  transition: all 0.3s ease;
}

.social-card-modern:hover {
  background: var(--md-sys-color-surface-variant);
  transform: translateY(-4px);
  border-color: var(--md-sys-color-primary);
}

.social-icon-modern {
  font-size: 24px;
  color: var(--md-sys-color-primary);
}

.social-name-modern {
  font-weight: 600;
  color: var(--md-sys-color-on-surface);
}

/* Responsive */
@media (max-width: 600px) {
  .contact-direct-grid {
    grid-template-columns: 1fr;
  }
  
  .contact-social-grid {
    flex-direction: column;
    align-items: stretch;
  }
  
  .social-card-modern {
    justify-content: center;
  }
}

/* ========================================
   CONTACT SECTION ULTRA (MODERN & UNIQUE)
   ======================================== */

.contact-wrapper-ultra {
  display: flex;
  flex-direction: column;
  gap: 80px;
  max-width: 1000px;
  margin: 0 auto;
  padding: 20px;
}

/* Direct Contact - Ultra Cards */
.contact-direct-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 32px;
}

.contact-card-ultra {
  position: relative;
  background: rgba(20, 20, 20, 0.6);
  border-radius: 24px;
  padding: 40px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  text-decoration: none;
  overflow: hidden;
  transition: all 0.5s cubic-bezier(0.23, 1, 0.32, 1);
  border: 1px solid rgba(255, 255, 255, 0.05);
}

/* Gradient Border Effect */
.contact-card-ultra::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 24px;
  padding: 2px;
  background: linear-gradient(45deg, transparent, rgba(255, 255, 255, 0.3), transparent);
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  opacity: 0.5;
  transition: opacity 0.5s ease;
}

.contact-card-ultra:hover {
  transform: translateY(-10px) scale(1.02);
  background: rgba(30, 30, 30, 0.8);
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.3);
}

.contact-card-ultra:hover::before {
  opacity: 1;
  background: linear-gradient(45deg, var(--md-sys-color-primary), var(--md-sys-color-tertiary));
}

.ultra-icon-box {
  width: 80px;
  height: 80px;
  border-radius: 20px;
  background: linear-gradient(135deg, rgba(255,255,255,0.1), rgba(255,255,255,0.02));
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 24px;
  font-size: 36px;
  color: var(--md-sys-color-primary);
  box-shadow: 0 10px 30px rgba(0,0,0,0.2);
  transition: all 0.5s ease;
  border: 1px solid rgba(255,255,255,0.1);
}

.contact-card-ultra:hover .ultra-icon-box {
  transform: rotateY(180deg);
  background: var(--md-sys-color-primary);
  color: var(--md-sys-color-on-primary);
  border-color: transparent;
}

.ultra-label {
  font-family: 'Outfit', sans-serif;
  font-size: 14px;
  text-transform: uppercase;
  letter-spacing: 2px;
  color: var(--md-sys-color-on-surface-variant);
  margin-bottom: 8px;
}

.ultra-value {
  font-size: 20px;
  font-weight: 700;
  color: var(--md-sys-color-on-surface);
  background: linear-gradient(to right, #fff, #aaa);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

/* Social Orbs */
.social-section-ultra {
  text-align: center;
}

.social-grid-ultra {
  display: flex;
  justify-content: center;
  gap: 32px;
  flex-wrap: wrap;
}

.social-orb {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.1);
  display: flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  color: var(--md-sys-color-on-surface-variant);
  transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  position: relative;
}

.social-orb svg {
  width: 28px;
  height: 28px;
  fill: currentColor;
  transition: all 0.3s ease;
}

.social-orb:hover {
  transform: translateY(-8px) scale(1.1);
  background: var(--orb-color, var(--md-sys-color-surface-variant));
  border-color: transparent;
  color: white;
  box-shadow: 0 10px 20px rgba(0,0,0,0.2);
}

.social-orb:hover svg {
  transform: scale(1.2);
}

/* Brand Colors for Orbs */
.orb-facebook { --orb-color: #1877F2; }
.orb-zalo { --orb-color: #0068FF; }
.orb-tiktok { --orb-color: #000000; border-color: rgba(255,255,255,0.2); } /* Dark mode friendly */
.orb-github { --orb-color: #333; }
.orb-linkedin { --orb-color: #0077B5; }

/* Tooltip for Orbs */
.social-orb::after {
  content: attr(data-label);
  position: absolute;
  bottom: -30px;
  left: 50%;
  transform: translateX(-50%) translateY(10px);
  background: rgba(0,0,0,0.8);
  color: white;
  padding: 4px 8px;
  border-radius: 4px;
  font-size: 12px;
  opacity: 0;
  pointer-events: none;
  transition: all 0.3s ease;
  white-space: nowrap;
}

.social-orb:hover::after {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

@media (max-width: 600px) {
  .contact-direct-row {
    grid-template-columns: 1fr;
  }
  .social-grid-ultra {
    gap: 20px;
  }
}

/* ========================================
   CONTACT SECTION MD3 (MATERIAL YOU)
   ======================================== */

.contact-wrapper-md3 {
  display: flex;
  flex-direction: column;
  gap: 48px;
  max-width: 900px;
  margin: 0 auto;
  padding: 0 24px;
}

/* Direct Contact - MD3 Filled Cards */
.contact-direct-md3 {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 24px;
}

.contact-card-md3 {
  background-color: var(--md-sys-color-surface-container-high, #ECE6F0); /* Fallback color */
  color: var(--md-sys-color-on-surface);
  border-radius: 24px; /* MD3 Large Shape */
  padding: 24px;
  display: flex;
  align-items: center;
  gap: 24px;
  text-decoration: none;
  transition: all 0.2s cubic-bezier(0.2, 0.0, 0, 1.0); /* Standard easing */
  position: relative;
  overflow: hidden;
  border: 1px solid transparent;
}

/* Dark mode fallback adjustment if variable missing */
[data-theme="dark"] .contact-card-md3 {
  background-color: var(--md-sys-color-surface-container-high, #2B2930);
}

.contact-card-md3:hover {
  background-color: var(--md-sys-color-surface-container-highest, #E6E0E9);
  box-shadow: 0 4px 8px 3px rgba(0, 0, 0, 0.15); /* Elevation 2 */
  transform: translateY(-2px);
}

.contact-card-md3:active {
  transform: scale(0.98);
}

.md3-icon-box {
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--md-sys-color-primary);
}

.md3-icon-box .material-symbols-outlined {
  font-size: 32px;
}

.md3-card-content {
  display: flex;
  flex-direction: column;
}

.md3-card-label {
  font-size: 12px; /* Label Medium */
  font-weight: 500;
  letter-spacing: 0.5px;
  color: var(--md-sys-color-on-surface-variant);
  text-transform: uppercase;
  margin-bottom: 4px;
}

.md3-card-value {
  font-size: 16px; /* Body Large */
  font-weight: 400;
  color: var(--md-sys-color-on-surface);
}

/* Social Section - MD3 Tonal Icon Buttons */
.social-section-md3 {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 24px;
}

.social-title-md3 {
  font-size: 14px; /* Title Small */
  font-weight: 500;
  letter-spacing: 0.1px;
  color: var(--md-sys-color-on-surface-variant);
  text-transform: uppercase;
}

.social-row-md3 {
  display: flex;
  justify-content: center;
  gap: 16px;
  flex-wrap: wrap;
}

.social-btn-md3 {
  width: 64px;
  height: 64px;
  border-radius: 20px; /* MD3 Medium/Large Shape */
  background-color: var(--md-sys-color-secondary-container);
  color: var(--md-sys-color-on-secondary-container);
  display: flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  transition: all 0.2s cubic-bezier(0.2, 0.0, 0, 1.0);
  position: relative;
}

.social-btn-md3:hover {
  background-color: var(--md-sys-color-primary-container);
  color: var(--md-sys-color-on-primary-container);
  box-shadow: 0 2px 6px 2px rgba(0, 0, 0, 0.15); /* Elevation 1 */
}

.social-btn-md3 svg {
  width: 28px;
  height: 28px;
  fill: currentColor;
}

/* Tooltip for Social Buttons */
.social-btn-md3::after {
  content: attr(data-label);
  position: absolute;
  bottom: -32px;
  left: 50%;
  transform: translateX(-50%);
  background-color: var(--md-sys-color-inverse-surface);
  color: var(--md-sys-color-inverse-on-surface);
  padding: 4px 8px;
  border-radius: 4px;
  font-size: 12px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s;
  white-space: nowrap;
}

.social-btn-md3:hover::after {
  opacity: 1;
}

@media (max-width: 600px) {
  .contact-direct-md3 {
    grid-template-columns: 1fr;
  }
}

/* ========================================
   CONTACT SECTION MD3 BENTO (CREATIVE)
   ======================================== */

.contact-bento-wrapper {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 24px;
  max-width: 1000px;
  margin: 0 auto;
  padding: 0 24px;
}

/* Base Bento Card */
.bento-card-md3 {
  border-radius: 28px; /* MD3 Extra Large Shape */
  padding: 32px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  text-decoration: none;
  transition: all 0.3s cubic-bezier(0.2, 0.0, 0, 1.0);
  position: relative;
  overflow: hidden;
  min-height: 200px;
}

.bento-card-md3:hover {
  transform: translateY(-4px) scale(1.01);
  box-shadow: 0 8px 12px 6px rgba(0, 0, 0, 0.15); /* Elevation 3 */
}

/* 1. Email Card (Primary) */
.bento-email {
  background-color: var(--md-sys-color-primary-container);
  color: var(--md-sys-color-on-primary-container);
  grid-column: span 2; /* Spans 2 columns on large screens */
}

.bento-email .card-icon {
  background-color: var(--md-sys-color-primary);
  color: var(--md-sys-color-on-primary);
}

/* 2. Phone Card (Secondary) */
.bento-phone {
  background-color: var(--md-sys-color-secondary-container);
  color: var(--md-sys-color-on-secondary-container);
}

.bento-phone .card-icon {
  background-color: var(--md-sys-color-on-secondary-container);
  color: var(--md-sys-color-secondary-container);
}

/* 3. Social Card (Surface Variant) */
.bento-social {
  background-color: var(--md-sys-color-surface-container-highest);
  color: var(--md-sys-color-on-surface-variant);
  grid-column: span 1; /* Default span */
}

/* Card Internals */
.bento-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 24px;
}

.card-icon {
  width: 56px;
  height: 56px;
  border-radius: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 28px;
}

.action-arrow {
  font-size: 24px;
  opacity: 0.7;
  transition: transform 0.3s ease;
}

.bento-card-md3:hover .action-arrow {
  transform: translate(4px, -4px);
  opacity: 1;
}

.bento-content {
  display: flex;
  flex-direction: column;
}

.bento-label {
  font-size: 14px;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 1px;
  opacity: 0.8;
  margin-bottom: 8px;
}

.bento-value {
  font-size: 24px; /* Headline Small */
  font-weight: 600;
  word-break: break-word;
}

/* Social Links Grid inside Bento */
.bento-social-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
  margin-top: auto;
}

.bento-social-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 56px;
  border-radius: 16px;
  background-color: rgba(0,0,0,0.05);
  color: inherit;
  transition: background-color 0.2s;
}

.bento-social-btn:hover {
  background-color: rgba(0,0,0,0.1);
}

.bento-social-btn svg {
  width: 24px;
  height: 24px;
  fill: currentColor;
}

/* Responsive Adjustments */
@media (max-width: 768px) {
  .contact-bento-wrapper {
    grid-template-columns: 1fr;
  }
  
  .bento-email {
    grid-column: span 1;
  }
}

/* ========================================
   CONTACT HUB MD3 (CREATIVE NEW DESIGN)
   ======================================== */

.contact-hub-wrapper {
  display: flex;
  flex-direction: column;
  gap: 48px;
  max-width: 900px;
  margin: 0 auto;
  padding: 0 24px;
}

/* Hero Contact Card */
.contact-hero-card {
  background: linear-gradient(135deg, 
    var(--md-sys-color-primary-container) 0%, 
    var(--md-sys-color-secondary-container) 100%);
  border-radius: 28px;
  padding: 48px 40px;
  position: relative;
  overflow: hidden;
  box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.contact-hero-card::before {
  content: '';
  position: absolute;
  top: -50%;
  right: -20%;
  width: 400px;
  height: 400px;
  background: radial-gradient(circle, rgba(255,255,255,0.1) 0%, transparent 70%);
  border-radius: 50%;
  animation: float 6s ease-in-out infinite;
}

@keyframes float {
  0%, 100% { transform: translateY(0px); }
  50% { transform: translateY(-20px); }
}

.hero-content {
  position: relative;
  z-index: 1;
}

.hero-title {
  font-size: 32px;
  font-weight: 700;
  color: var(--md-sys-color-on-primary-container);
  margin-bottom: 12px;
  line-height: 1.2;
}

.hero-subtitle {
  font-size: 16px;
  color: var(--md-sys-color-on-primary-container);
  opacity: 0.9;
  margin-bottom: 32px;
}

/* Quick Actions (FAB Style) */
.quick-actions {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
}

.action-fab {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px 24px;
  background-color: var(--md-sys-color-surface);
  color: var(--md-sys-color-on-surface);
  border-radius: 28px;
  text-decoration: none;
  box-shadow: 0 2px 8px rgba(0,0,0,0.15);
  transition: all 0.3s cubic-bezier(0.2, 0.0, 0, 1.0);
  font-weight: 600;
}

.action-fab:hover {
  box-shadow: 0 6px 16px rgba(0,0,0,0.2);
  transform: translateY(-2px);
  background-color: var(--md-sys-color-primary);
  color: var(--md-sys-color-on-primary);
}

.action-fab .material-symbols-outlined {
  font-size: 24px;
}

.action-label {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}

.action-label-small {
  font-size: 11px;
  opacity: 0.7;
  font-weight: 400;
}

.action-label-large {
  font-size: 14px;
  font-weight: 600;
}

/* Social Links Section */
.social-hub-section {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.social-hub-title {
  font-size: 22px;
  font-weight: 600;
  color: var(--md-sys-color-on-surface);
  text-align: center;
}

.social-links-row {
  display: flex;
  justify-content: center;
  gap: 16px;
  flex-wrap: wrap;
}

.social-link-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  padding: 20px;
  background-color: var(--md-sys-color-surface-container);
  border-radius: 20px;
  text-decoration: none;
  transition: all 0.3s ease;
  min-width: 100px;
  position: relative;
}

.social-link-card:hover {
  background-color: var(--md-sys-color-surface-container-high);
  transform: translateY(-4px);
  box-shadow: 0 8px 16px rgba(0,0,0,0.1);
}

.social-icon-circle {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background-color: var(--md-sys-color-primary-container);
  color: var(--md-sys-color-on-primary-container);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
}

.social-link-card:hover .social-icon-circle {
  background-color: var(--md-sys-color-primary);
  color: var(--md-sys-color-on-primary);
  transform: scale(1.1) rotate(5deg);
}

.social-icon-circle svg {
  width: 28px;
  height: 28px;
  fill: currentColor;
}

.social-link-name {
  font-size: 14px;
  font-weight: 600;
  color: var(--md-sys-color-on-surface);
}

/* Responsive */
@media (max-width: 600px) {
  .contact-hero-card {
    padding: 32px 24px;
  }
  
  .hero-title {
    font-size: 24px;
  }
  
  .quick-actions {
    flex-direction: column;
  }
  
  .action-fab {
    width: 100%;
    justify-content: center;
  }
  
  .social-links-row {
    gap: 12px;
  }
  
  .social-link-card {
    min-width: 80px;
    padding: 16px;
  }
}

/* === FIXES FOR GRID LAYOUTS === */

/* Ensure Project Gallery is a proper grid */
.project-gallery {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 32px;
  width: 100%;
  max-width: 1400px;
  margin: 0 auto;
}

/* Ensure Blog Grid is a proper grid */
.blog-grid-modern {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
  gap: 32px;
  width: 100%;
  max-width: 1400px;
  margin: 0 auto;
}

/* Ensure cards have equal height in the row */
.project-card, .blog-card-modern {
  height: 100%;
  display: flex;
  flex-direction: column;
}

.project-content, .blog-card-content {
  flex-grow: 1;
  display: flex;
  flex-direction: column;
}

.project-tags, .blog-card-desc {
  margin-top: auto;
}

/* Responsive adjustments for smaller screens */
@media (max-width: 768px) {
  .project-gallery, .blog-grid-modern {
    grid-template-columns: 1fr;
    padding: 0 16px;
  }
}


