/*------------------------------------------------------------------
Nguyễn Thành Đạt - Portfolio Stylesheet (Apple Liquid Glassmorphism Theme)
------------------------------------------------------------------*/

@import url("https://fonts.googleapis.com/css2?family=Lexend:wght@300;400;500;600;700;800&display=swap");

:root {
  /* Default Dark Mode CSS Variables (Modern Dark-Blue/Black style) */
  --bg-primary: #030712; /* Obsidian black-blue */
  --bg-secondary: #080f25; /* Deep rich slate navy */
  --card-bg: rgba(
    13,
    20,
    38,
    0.4
  ); /* High-translucency Apple liquid glass dark */
  --card-border: rgba(255, 255, 255, 0.12);
  --card-border-hover: rgba(37, 99, 235, 0.4);

  --primary: #2563eb; /* Vibrant Royal Blue */
  --primary-hover: #1d4ed8;
  --primary-glow: rgba(37, 99, 235, 0.22);

  --secondary: #38bdf8; /* Vibrant Sky Blue */
  --secondary-hover: #0ea5e9;
  --secondary-glow: rgba(56, 189, 248, 0.22);

  --accent-gradient: linear-gradient(135deg, #2563eb 0%, #38bdf8 100%);
  --accent-gradient-hover: linear-gradient(135deg, #1d4ed8 0%, #0ea5e9 100%);

  --text-primary: #f8fafc; /* White Slate */
  --text-secondary: #cbd5e1; /* Gray-white Slate */
  --text-muted: #64748b; /* Slate 500 */

  --shadow: rgba(0, 0, 0, 0.4);
  --blob-opacity: 0.2;
  --input-bg: rgba(7, 10, 19, 0.45);
  --card-shadow:
    inset 0 1px 0 0 rgba(255, 255, 255, 0.35),
    inset 0 10px 20px -5px rgba(255, 255, 255, 0.08),
    inset 0 -1px 0 0 rgba(0, 0, 0, 0.25), 0 15px 35px -10px rgba(0, 0, 0, 0.4);

  --success: #10b981; /* Emerald 500 */
  --font-family: "Lexend", sans-serif;
  --transition-smooth:
    background-color 0.5s cubic-bezier(0.16, 1, 0.3, 1),
    color 0.4s cubic-bezier(0.16, 1, 0.3, 1),
    border-color 0.5s cubic-bezier(0.16, 1, 0.3, 1),
    box-shadow 0.5s cubic-bezier(0.16, 1, 0.3, 1),
    transform 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}

/* Light Theme Overrides (Modern Light-Blue/White style) */
body.light-theme {
  --bg-primary: #f0f4f8; /* Clean, soft snow-blue-white */
  --bg-secondary: #e2e8f0; /* Soft slate blue */
  --card-bg: rgba(
    255,
    255,
    255,
    0.4
  ); /* High-translucency Apple liquid glass light (Apple Music Style) */
  --card-border: rgba(255, 255, 255, 0.45); /* Frosty white border refraction */
  --card-border-hover: rgba(29, 78, 216, 0.3);

  --primary: #1d4ed8; /* Royal Blue */
  --primary-hover: #1e40af;
  --primary-glow: rgba(29, 78, 216, 0.12);

  --secondary: #0284c7; /* Deep Sky Blue */
  --secondary-hover: #0369a1;
  --secondary-glow: rgba(2, 132, 199, 0.12);

  --text-primary: #0f172a; /* Deep Slate 900 */
  --text-secondary: #1e293b; /* Slate 800 */
  --text-muted: #64748b; /* Slate 500 */

  --shadow: rgba(15, 23, 42, 0.06);
  --blob-opacity: 0.28; /* Glow behind light mode */
  --input-bg: rgba(255, 255, 255, 0.75);
  --card-shadow:
    inset 0 1px 0 0 rgba(255, 255, 255, 0.65),
    inset 0 10px 20px -5px rgba(255, 255, 255, 0.2),
    inset 0 -1px 0 0 rgba(0, 0, 0, 0.05),
    0 15px 35px -10px rgba(15, 23, 42, 0.06);
}

/*--------------------------- Reset & Base ---------------------------*/

html,
body {
  width: 100%;
  overflow-x: hidden;
}

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

body {
  font-family: var(--font-family);
  background-color: var(--bg-primary);
  color: var(--text-secondary);
  line-height: 1.6;
  font-size: 16px;
  transition: var(--transition-smooth);
}

a {
  text-decoration: none;
  color: inherit;
  transition: var(--transition-smooth);
}

ul {
  list-style: none;
}

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

/* Scrollbar styling */
::-webkit-scrollbar {
  width: 10px;
}

::-webkit-scrollbar-track {
  background: var(--bg-primary);
}

::-webkit-scrollbar-thumb {
  background: #1e293b;
  border-radius: 5px;
  border: 2px solid var(--bg-primary);
}

::-webkit-scrollbar-thumb:hover {
  background: var(--primary);
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
  position: relative;
  z-index: 2;
}

/*--------------------------- Glow Blobs ---------------------------*/

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

.glow-blob {
  position: absolute;
  border-radius: 50%;
  filter: blur(140px);
  opacity: var(--blob-opacity);
  transition:
    opacity 0.5s ease,
    background-color 0.5s ease;
}

.blob-1 {
  top: -10%;
  right: -10%;
  width: 500px;
  height: 500px;
  background: var(--primary);
}

.blob-2 {
  bottom: 10%;
  left: -10%;
  width: 600px;
  height: 600px;
  background: var(--secondary);
}

/*--------------------------- Apple Liquid Glass Card Class ---------------------------*/

.liquid-glass {
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  backdrop-filter: blur(40px) saturate(220%) contrast(90%) brightness(105%);
  -webkit-backdrop-filter: blur(40px) saturate(220%) contrast(90%)
    brightness(105%);
  border-radius: 24px; /* Squircle smooth corners */
  box-shadow: var(--card-shadow);
  transition: var(--transition-smooth);
}

/*--------------------------- Buttons ---------------------------*/

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 12px 28px;
  border-radius: 9999px;
  font-size: 15px;
  font-weight: 500;
  cursor: pointer;
  transition: var(--transition-smooth);
}

.btn-primary {
  background: var(--accent-gradient);
  color: #ffffff;
  box-shadow: 0 4px 20px var(--primary-glow);
  border: none;
}

.btn-primary:hover {
  background: var(--accent-gradient-hover);
  transform: translateY(-2px) scale(1.02);
  box-shadow: 0 6px 24px rgba(99, 102, 241, 0.3);
}

.btn-primary:active {
  transform: translateY(0) scale(0.98);
}

.btn-secondary {
  background: var(--card-bg);
  color: var(--text-primary);
  border: 1px solid var(--card-border);
  backdrop-filter: blur(10px) saturate(150%);
  -webkit-backdrop-filter: blur(10px) saturate(150%);
}

.btn-secondary:hover {
  background: rgba(255, 255, 255, 0.08) !important;
  border-color: var(--primary);
  transform: translateY(-2px) scale(1.02);
}

body.light-theme .btn-secondary:hover {
  background: rgba(0, 0, 0, 0.04) !important;
}

.btn-secondary:active {
  transform: translateY(0) scale(0.98);
}

/*--------------------------- Common Section Header ---------------------------*/

section {
  padding: 100px 0;
  position: relative;
  z-index: 2;
}

.section-title {
  margin-bottom: 60px;
  text-align: center;
}

.section-title h2 {
  font-size: 36px;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 15px;
  text-transform: capitalize;
  transition: color 0.5s ease;
}

.title-bar {
  width: 60px;
  height: 4px;
  background: var(--accent-gradient);
  border-radius: 2px;
  margin: 0 auto 20px;
}

.section-desc {
  font-size: 16px;
  color: var(--text-muted);
  max-width: 600px;
  margin: 0 auto;
}

/*--------------------------- Header & Navigation ---------------------------*/

.header-area {
  position: fixed;
  top: -100px; /* Hide initially, slide in via transition */
  left: 0;
  width: 100%;
  padding: 20px 0;
  z-index: 1000;
  pointer-events: none;
  opacity: 0;
  transition:
    top 0.7s cubic-bezier(0.16, 1, 0.3, 1),
    opacity 0.7s cubic-bezier(0.16, 1, 0.3, 1),
    padding 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

body.loaded .header-area {
  top: 0;
  opacity: 1;
}

.header-area.sticky {
  padding: 0;
}

.header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
  padding: 0;
  background: transparent;
  border: 1px solid transparent;
  border-radius: 0;
  pointer-events: auto;
  margin-top: 0;
  backdrop-filter: blur(0px) saturate(100%) contrast(100%) brightness(100%);
  -webkit-backdrop-filter: blur(0px) saturate(100%) contrast(100%)
    brightness(100%);
  transition:
    padding 0.6s cubic-bezier(0.16, 1, 0.3, 1),
    margin-top 0.6s cubic-bezier(0.16, 1, 0.3, 1),
    border-radius 0.6s cubic-bezier(0.16, 1, 0.3, 1),
    background-color 0.6s cubic-bezier(0.16, 1, 0.3, 1),
    border-color 0.6s cubic-bezier(0.16, 1, 0.3, 1),
    box-shadow 0.6s cubic-bezier(0.16, 1, 0.3, 1),
    backdrop-filter 0.6s cubic-bezier(0.16, 1, 0.3, 1),
    -webkit-backdrop-filter 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

.header-area.sticky .header {
  background-color: var(--card-bg);
  border: 1px solid var(--card-border);
  padding: 10px 24px;
  border-radius: 9999px;
  box-shadow: var(--card-shadow);
  backdrop-filter: blur(40px) saturate(220%) contrast(90%) brightness(105%);
  -webkit-backdrop-filter: blur(40px) saturate(220%) contrast(90%)
    brightness(105%);
  margin-top: 16px;
}

.logo {
  display: flex;
  align-items: center;
  position: relative;
}

.signature {
  height: 68px;
  width: auto;
  max-width: 280px;
  object-fit: contain;
  transition: var(--transition-smooth);
}

.header-area.sticky .signature {
  height: 48px;
}

body.light-theme .signature {
  filter: invert(1) hue-rotate(180deg) brightness(0.2); /* Invert white signature to black in light theme */
}

.logo .fa-bolt {
  color: var(--secondary);
  font-size: 14px;
  position: absolute;
  bottom: 0;
  right: -5px;
  animation: pulse-glow 2s infinite alternate;
}

.navbar {
  display: flex;
  align-items: center;
}

.navbar li {
  margin: 0 14px;
}

.navbar li a {
  font-size: 15px;
  font-weight: 500;
  color: var(--text-secondary);
  padding: 8px 0;
  position: relative;
}

.navbar li a::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 2px;
  background: var(--accent-gradient);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.navbar li a:hover,
.navbar li a.active {
  color: var(--text-primary);
}

.navbar li a:hover::after,
.navbar li a.active::after {
  transform: scaleX(1);
}

.hotline {
  border: 1px solid var(--card-border);
  padding: 8px 20px !important;
  border-radius: 9999px;
  color: var(--text-primary) !important;
  background: var(--card-bg);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

.hotline::after {
  display: none !important;
}

.hotline:hover {
  background: var(--accent-gradient) !important;
  border-color: transparent !important;
  box-shadow: 0 4px 15px var(--secondary-glow);
}

/* Theme Toggle Button */
.theme-toggle-btn {
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  color: var(--text-primary);
  width: 40px;
  height: 40px;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  transition: var(--transition-smooth);
}

.theme-toggle-btn:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: var(--primary);
  transform: scale(1.1);
}

body.light-theme .theme-toggle-btn:hover {
  background: rgba(0, 0, 0, 0.05);
}

.theme-toggle-btn:active {
  transform: scale(0.95);
}

/* Mobile Toggle Hamburger */
.menu_icon {
  color: var(--text-primary);
  font-size: 24px;
  cursor: pointer;
  display: none;
}

/*--------------------------- Hero Section ---------------------------*/

.hero-section {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding-top: 120px;
}

.hero-content {
  text-align: center;
  max-width: 850px;
  margin: 0 auto;
}

.badge-status {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(16, 185, 129, 0.08);
  border: 1px solid rgba(16, 185, 129, 0.2);
  color: var(--success);
  padding: 6px 16px;
  border-radius: 9999px;
  font-size: 13px;
  font-weight: 500;
  margin-bottom: 25px;
}

.pulse-dot {
  width: 8px;
  height: 8px;
  background-color: var(--success);
  border-radius: 50%;
  position: relative;
}

.pulse-dot::after {
  content: "";
  width: 100%;
  height: 100%;
  background-color: var(--success);
  border-radius: 50%;
  position: absolute;
  top: 0;
  left: 0;
  animation: pulse 1.5s infinite;
}

.hero-content h5 {
  font-size: 16px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 2px;
  color: var(--secondary);
  margin-bottom: 12px;
}

.hero-title {
  font-size: 64px;
  font-weight: 800;
  color: var(--text-primary);
  line-height: 1.3;
  padding: 0.1em 0;
  margin-bottom: 16px;
  background: var(--accent-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero-subtitle {
  font-size: 28px;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 24px;
}

.hero-subtitle span {
  color: var(--secondary);
}

.hero-description {
  font-size: 18px;
  color: var(--text-secondary);
  margin-bottom: 35px;
  max-width: 650px;
  margin-left: auto;
  margin-right: auto;
}

.hero-content .btn-group {
  display: flex;
  justify-content: center;
  gap: 16px;
  margin-bottom: 45px;
}

.social-links {
  display: flex;
  justify-content: center;
  gap: 16px;
}

.social-links a {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  color: var(--text-secondary);
  font-size: 18px;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

.social-links a.linkedin-link {
  color: #0077b5;
  border-color: rgba(0, 119, 181, 0.25);
}
.social-links a.zalo-link {
  color: #0068ff;
  border-color: rgba(0, 104, 255, 0.25);
}
.social-links a.phone-link {
  color: #25d366;
  border-color: rgba(37, 211, 102, 0.25);
}
.social-links a.email-link {
  color: #ea4335;
  border-color: rgba(234, 67, 53, 0.25);
}
.social-links a.gitlab-link {
  color: #e24329;
  border-color: rgba(226, 67, 41, 0.25);
}
.social-links a.github-link {
  color: var(--text-primary);
  border-color: var(--card-border);
}

.social-links a:hover {
  transform: translateY(-4px) scale(1.05);
}

.social-links a.linkedin-link:hover {
  background: #0077b5;
  color: #fff;
  border-color: #0077b5;
  box-shadow: 0 4px 15px rgba(0, 119, 181, 0.4);
}
.social-links a.zalo-link:hover {
  background: #0068ff;
  color: #fff;
  border-color: #0068ff;
  box-shadow: 0 4px 15px rgba(0, 104, 255, 0.4);
}
.social-links a.phone-link:hover {
  background: #25d366;
  color: #fff;
  border-color: #25d366;
  box-shadow: 0 4px 15px rgba(37, 211, 102, 0.4);
}
.social-links a.email-link:hover {
  background: #ea4335;
  color: #fff;
  border-color: #ea4335;
  box-shadow: 0 4px 15px rgba(234, 67, 53, 0.4);
}
.social-links a.gitlab-link:hover {
  background: #e24329;
  color: #fff;
  border-color: #e24329;
  box-shadow: 0 4px 15px rgba(226, 67, 41, 0.4);
}
.social-links a.github-link:hover {
  background: var(--text-primary);
  color: var(--bg-primary);
  border-color: var(--text-primary);
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.social-links a:active {
  transform: translateY(0) scale(0.95);
}

/*--------------------------- About Section ---------------------------*/

.about-grid {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 30px;
  margin-bottom: 50px;
}

.about-text-card {
  padding: 35px;
}

.about-text-card p {
  margin-bottom: 16px;
  font-size: 16px;
  color: var(--text-secondary);
  text-align: justify;
}

.about-text-card p:last-child {
  margin-bottom: 0;
}

.about-info-card {
  padding: 35px;
}

.about-info-card h3 {
  font-size: 20px;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 20px;
  border-bottom: 1px solid var(--card-border);
  padding-bottom: 10px;
}

.personal-info li {
  margin-bottom: 15px;
  font-size: 15px;
}

.personal-info li:last-child {
  margin-bottom: 0;
}

.personal-info li strong {
  color: var(--text-primary);
  font-weight: 500;
  display: inline-block;
  width: 100px;
}

.features-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  margin-top: 30px;
}

.feature-card {
  padding: 30px;
  text-align: center;
}

.feature-card:hover {
  transform: translateY(-5px);
  border-color: var(--primary);
  box-shadow: 0 15px 35px rgba(99, 102, 241, 0.12);
}

.feature-icon {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  background: rgba(99, 102, 241, 0.08);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 20px;
  font-size: 24px;
  color: var(--primary);
  border: 1px solid rgba(99, 102, 241, 0.15);
}

.feature-card h3 {
  font-size: 18px;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 12px;
}

.feature-card p {
  font-size: 14px;
  color: var(--text-muted);
}

/*--------------------------- Skills Section ---------------------------*/

.skills-container {
  display: flex;
  flex-direction: column;
  gap: 40px;
}

.skills-category {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.category-title {
  font-size: 20px;
  font-weight: 600;
  text-align: center;
  color: var(--text-primary);
  letter-spacing: 0.5px;
  text-transform: capitalize;
  margin-bottom: 5px;
}

.skills-items-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  justify-content: center;
}

.skill-item-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 20px;
  height: 110px;
  text-align: center;
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  backdrop-filter: blur(20px) saturate(190%);
  -webkit-backdrop-filter: blur(20px) saturate(190%);
  border-radius: 16px;
  box-shadow: 0 8px 32px 0 var(--shadow);
  transition: var(--transition-smooth);
}

.skill-item-card i,
.skill-item-card svg {
  font-size: 36px;
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.3s ease;
}

.skill-name {
  font-size: 13px;
  font-weight: 500;
  color: var(--text-secondary);
  margin-top: 12px;
}

.skill-item-card:hover {
  transform: translateY(-5px);
  border-color: var(--primary);
  box-shadow: 0 10px 25px var(--primary-glow);
}

.skill-item-card:hover i,
.skill-item-card:hover svg {
  transform: scale(1.1);
}

@media (max-width: 1024px) {
  .skills-items-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (max-width: 768px) {
  .skills-items-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

/*--------------------------- Projects Section ---------------------------*/

.projects-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 30px;
}

.project-card {
  overflow: hidden;
  display: flex;
  flex-direction: column;
  height: 100%;
}

.project-card:hover {
  transform: translateY(-8px);
  border-color: var(--secondary);
  box-shadow: 0 20px 40px -10px var(--secondary-glow);
}

.project-img-wrapper {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background-color: white;
  border-bottom: 1px solid var(--card-border);
}

.project-img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  padding: 24px 40px;
  transition: var(--transition-smooth);
}

.project-card:hover .project-img {
  transform: scale(1.06);
}

.project-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(7, 10, 19, 0.65);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: var(--transition-smooth);
}

body.light-theme .project-overlay {
  background: rgba(244, 246, 251, 0.65);
}

.project-card:hover .project-overlay {
  opacity: 1;
}

.project-link-icon {
  width: 50px;
  height: 50px;
  border-radius: 50%;
  background: var(--secondary);
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  transform: scale(0.8);
  transition: var(--transition-smooth);
}

.project-card:hover .project-link-icon {
  transform: scale(1);
}

.project-link-icon:hover {
  background: var(--secondary-hover);
  box-shadow: 0 0 15px var(--secondary);
}

.project-info {
  padding: 24px;
  display: flex;
  flex-direction: column;
  flex-grow: 1;
}

.project-info h3 {
  font-size: 20px;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 12px;
}

.project-desc {
  font-size: 14px;
  color: var(--text-secondary);
  margin-bottom: 16px;
  flex-grow: 1;
  text-align: justify;
}

.project-credentials {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 16px;
}

.cred-badge {
  font-size: 12px;
  background: rgba(245, 158, 11, 0.08);
  border: 1px solid rgba(245, 158, 11, 0.2);
  color: #fbbf24;
  padding: 4px 10px;
  border-radius: 6px;
}

.cred-badge.muted {
  background: rgba(255, 255, 255, 0.03);
  border-color: var(--card-border);
  color: var(--text-muted);
}

body.light-theme .cred-badge.muted {
  background: rgba(0, 0, 0, 0.02);
}

.project-techs {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.project-techs span {
  font-size: 11px;
  font-weight: 500;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--card-border);
  color: var(--text-secondary);
  padding: 3px 8px;
  border-radius: 4px;
}

body.light-theme .project-techs span {
  background: rgba(0, 0, 0, 0.02);
}

/*--------------------------- Contact Section ---------------------------*/

.contact-grid {
  display: grid;
  grid-template-columns: 0.9fr 1.1fr;
  gap: 40px;
}

.contact-info {
  padding: 40px;
}

.contact-info h3 {
  font-size: 22px;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 16px;
}

.contact-info > p {
  font-size: 15px;
  color: var(--text-secondary);
  margin-bottom: 35px;
}

.info-item {
  display: flex;
  gap: 15px;
  margin-bottom: 25px;
}

.info-item:last-child {
  margin-bottom: 0;
}

.info-icon {
  width: 46px;
  height: 46px;
  border-radius: 50%;
  background: rgba(6, 182, 212, 0.08);
  border: 1px solid rgba(6, 182, 212, 0.15);
  color: var(--secondary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  flex-shrink: 0;
}

.info-item h4 {
  font-size: 15px;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 4px;
}

.info-item p {
  font-size: 14px;
  color: var(--text-secondary);
}

.info-item a:hover {
  color: var(--secondary);
}

.contact-form-wrapper {
  padding: 40px;
}

.form-group {
  margin-bottom: 20px;
}

.form-group label {
  display: block;
  font-size: 14px;
  font-weight: 500;
  color: var(--text-primary);
  margin-bottom: 8px;
}

.form-group input,
.form-group textarea {
  width: 100%;
  background: var(--input-bg);
  border: 1px solid var(--card-border);
  border-radius: 12px; /* Apple UI smooth input */
  padding: 12px 16px;
  color: var(--text-primary);
  font-family: var(--font-family);
  font-size: 15px;
  transition: var(--transition-smooth);
}

.form-group input:focus,
.form-group textarea:focus {
  border-color: var(--primary);
  box-shadow: 0 0 10px var(--primary-glow);
  background-color: var(--bg-primary);
  outline: none;
}

.btn-submit {
  width: 100%;
  background: var(--accent-gradient);
  color: #ffffff;
  border: none;
  font-size: 16px;
  font-weight: 600;
  padding: 14px 0;
  box-shadow: 0 4px 15px var(--primary-glow);
}

.btn-submit:hover {
  background: var(--accent-gradient-hover);
  transform: translateY(-2px) scale(1.01);
  box-shadow: 0 6px 20px rgba(99, 102, 241, 0.35);
}

.btn-submit:active {
  transform: translateY(0) scale(0.99);
}

#msg {
  display: block;
  margin-top: 15px;
  font-size: 15px;
  text-align: center;
  color: var(--success);
}

/*--------------------------- Back to Top Button ---------------------------*/

#scrollTopBtn {
  position: fixed;
  bottom: 30px;
  right: 30px;
  z-index: 1000;
  font-size: 18px;
  background: var(--card-bg);
  color: var(--text-primary);
  border: 1px solid var(--card-border);
  border-radius: 50%;
  width: 50px;
  height: 50px;
  cursor: pointer;
  box-shadow: var(--card-shadow);
  backdrop-filter: blur(20px) saturate(190%);
  -webkit-backdrop-filter: blur(20px) saturate(190%);
  transition:
    opacity 0.3s ease,
    transform 0.3s ease,
    border-color 0.3s ease,
    box-shadow 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transform: translateY(10px);
}

#scrollTopBtn.show {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}

#scrollTopBtn.show:hover {
  transform: translateY(-4px) scale(1.05);
  border-color: var(--primary);
  box-shadow:
    var(--card-shadow),
    0 10px 25px var(--primary-glow);
}

#scrollTopBtn.show:active {
  transform: translateY(0) scale(0.95);
}

/*--------------------------- Footer Section ---------------------------*/

.footer {
  padding: 40px 0;
  border-top: 1px solid var(--card-border);
  background: var(--bg-primary);
  text-align: center;
  transition: var(--transition-smooth);
}

.footer-msg {
  font-size: 14px;
  color: var(--text-secondary);
  margin-bottom: 8px;
}

.footer-copyright {
  font-size: 12px;
  color: var(--text-muted);
}

/*--------------------------- Animations ---------------------------*/

@keyframes pulse {
  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);
  }
}

@keyframes pulse-glow {
  0% {
    text-shadow: 0 0 2px var(--secondary);
    opacity: 0.8;
  }
  100% {
    text-shadow: 0 0 10px var(--secondary);
    opacity: 1;
  }
}

/*--------------------------- Responsive Designs ---------------------------*/

/* Medium layouts & Tablets */
@media (max-width: 1024px) {
  .hero-title {
    font-size: 52px;
  }

  .about-grid {
    grid-template-columns: 1fr;
  }

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

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

  .contact-grid {
    grid-template-columns: 1fr;
  }
}

/* Hide mobile navigation drawer by default on desktop */
.mobile-drawer {
  display: none;
}

@media (max-width: 768px) {
  /* Mobile Header toggle styling */
  .menu_icon {
    display: block;
  }

  .navbar {
    display: none !important;
  }

  .mobile-drawer {
    position: fixed;
    top: 0;
    right: -100%;
    width: 280px;
    height: 100vh;
    background: var(--card-bg);
    border-left: 1px solid var(--card-border);
    box-shadow: -10px 0 40px rgba(0, 0, 0, 0.35);
    backdrop-filter: blur(35px) saturate(210%);
    -webkit-backdrop-filter: blur(35px) saturate(210%);
    z-index: 2000;
    padding: 80px 24px;
    display: flex;
    flex-direction: column;
    gap: 30px;
    transition: right 0.5s cubic-bezier(0.16, 1, 0.3, 1);
  }

  .mobile-drawer.open {
    right: 0;
  }

  .drawer-close {
    position: absolute;
    top: 24px;
    right: 24px;
    font-size: 24px;
    color: var(--text-primary);
    cursor: pointer;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--card-border);
    transition: var(--transition-smooth);
  }

  .drawer-close:hover {
    background: rgba(255, 255, 255, 0.15);
    transform: rotate(90deg);
  }

  .drawer-menu {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 20px;
    width: 100%;
  }

  .drawer-menu li {
    width: 100%;
  }

  .drawer-menu li a {
    font-size: 18px;
    font-weight: 500;
    color: var(--text-secondary);
    display: block;
    padding: 8px 0;
    position: relative;
    transition: var(--transition-smooth);
  }

  .drawer-menu li a::after {
    content: "";
    position: absolute;
    bottom: 0;
    left: 0;
    width: 40px;
    height: 2px;
    background: var(--accent-gradient);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
  }

  .drawer-menu li a:hover,
  .drawer-menu li a.active {
    color: var(--text-primary);
  }

  .drawer-menu li a:hover::after,
  .drawer-menu li a.active::after {
    transform: scaleX(1);
  }

  .theme-toggle-btn-mobile {
    display: flex;
    align-items: center;
    gap: 12px;
    width: 100%;
    height: 48px;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid var(--card-border);
    color: var(--text-primary);
    font-size: 16px;
    font-weight: 500;
    padding-left: 20px;
    cursor: pointer;
    transition: var(--transition-smooth);
  }

  .theme-toggle-btn-mobile:hover {
    background: rgba(255, 255, 255, 0.15);
    border-color: var(--primary);
  }

  body.light-theme .theme-toggle-btn-mobile {
    background: rgba(0, 0, 0, 0.04);
  }
  body.light-theme .theme-toggle-btn-mobile:hover {
    background: rgba(0, 0, 0, 0.08);
  }

  /* Hero adjustments */
  .hero-title {
    font-size: 40px;
  }

  .hero-subtitle {
    font-size: 20px;
  }

  .features-grid {
    grid-template-columns: 1fr;
  }

  .projects-grid {
    grid-template-columns: 1fr;
  }

  .section-title h2 {
    font-size: 28px;
  }
}

@media (max-width: 480px) {
  .hero-title {
    font-size: 32px;
  }

  .hero-content .btn-group {
    flex-direction: column;
    width: 100%;
  }

  .hero-content .btn {
    width: 100%;
  }
}

/*--------------------------- Apply Apple Liquid Glass Styles to elements ---------------------------*/

.about-text-card,
.about-info-card,
.feature-card,
.project-card,
.contact-info,
.contact-form-wrapper {
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  backdrop-filter: blur(40px) saturate(220%) contrast(90%) brightness(105%);
  -webkit-backdrop-filter: blur(40px) saturate(220%) contrast(90%)
    brightness(105%);
  border-radius: 24px;
  box-shadow: var(--card-shadow);
  transition: var(--transition-smooth);
}

/*--------------------------- Contact Floating Action Button (FAB) ---------------------------*/

.contact-fab {
  position: fixed;
  bottom: 30px;
  right: 30px;
  z-index: 999;
  display: flex;
  flex-direction: column;
  align-items: center;
  transition:
    bottom 0.4s cubic-bezier(0.16, 1, 0.3, 1),
    transform 0.4s ease;
}

/* Sibling selector: push contact-fab up when scrollTopBtn has class 'show' */
#scrollTopBtn.show ~ .contact-fab {
  bottom: 95px;
}

.fab-main {
  width: 50px;
  height: 50px;
  border-radius: 50%;
  background: var(--card-bg);
  color: var(--primary);
  border: 1px solid var(--card-border);
  box-shadow: var(--card-shadow);
  backdrop-filter: blur(20px) saturate(190%);
  -webkit-backdrop-filter: blur(20px) saturate(190%);
  cursor: pointer;
  font-size: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition-smooth);
  z-index: 10;
}

.fab-main:hover {
  transform: scale(1.05);
  border-color: var(--primary);
  box-shadow:
    var(--card-shadow),
    0 10px 25px var(--primary-glow);
}

.fab-main i {
  transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

/* Rotate icon in both hover (desktop) and active (mobile click) states */
.contact-fab.active .fab-main i {
  transform: rotate(135deg);
}

@media (hover: hover) {
  .contact-fab:hover .fab-main i {
    transform: rotate(135deg);
  }
}

.fab-menu {
  position: absolute;
  bottom: 60px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  align-items: center;
  pointer-events: none;
}

/* Hover shield / bridge to prevent accidental closure of the menu */
.fab-menu::before {
  content: "";
  position: absolute;
  top: -20px;
  bottom: -60px; /* extends down to main button */
  left: -40px; /* wide area to prevent accidental exit */
  right: -40px; /* wide area */
  z-index: -1;
  background: transparent;
  pointer-events: auto;
}

.fab-item {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  box-shadow: var(--card-shadow);
  backdrop-filter: blur(15px);
  -webkit-backdrop-filter: blur(15px);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  cursor: pointer;
  opacity: 0;
  transform: translateY(20px) scale(0.8);
  transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

/* Stagger animation delay */
.fab-item:nth-child(1) {
  transition-delay: 0.05s;
}
.fab-item:nth-child(2) {
  transition-delay: 0.1s;
}
.fab-item:nth-child(3) {
  transition-delay: 0.15s;
}
.fab-item:nth-child(4) {
  transition-delay: 0.2s;
}

/* Expanded states */
.contact-fab.active .fab-menu {
  pointer-events: auto;
}

.contact-fab.active .fab-item {
  opacity: 1;
  transform: translateY(0) scale(1);
}

@media (hover: hover) {
  .contact-fab:hover .fab-menu {
    pointer-events: auto;
  }

  .contact-fab:hover .fab-item {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

/* Official brand colors for FAB items */
.fab-item.linkedin {
  color: #0077b5;
}
.fab-item.zalo {
  color: #0068ff;
}
.fab-item.phone {
  color: #25d366;
}
.fab-item.email {
  color: #ea4335;
}

.fab-item:hover {
  transform: scale(1.1) !important;
  background: var(--bg-secondary);
}

.fab-item.linkedin:hover {
  border-color: #0077b5;
  box-shadow: 0 0 15px rgba(0, 119, 181, 0.4);
}
.fab-item.zalo:hover {
  border-color: #0068ff;
  box-shadow: 0 0 15px rgba(0, 104, 255, 0.4);
}
.fab-item.phone:hover {
  border-color: #25d366;
  box-shadow: 0 0 15px rgba(37, 211, 102, 0.4);
}
.fab-item.email:hover {
  border-color: #ea4335;
  box-shadow: 0 0 15px rgba(234, 67, 53, 0.4);
}

/*--------------------------- Global Transitions & Theme Switch Animation ---------------------------*/

body,
.header-area,
.logo,
.navbar a,
.btn,
.liquid-glass,
.about-text-card,
.about-info-card,
.feature-card,
.skill-item-card,
.project-card,
.timeline-item,
.contact-info,
.contact-form-wrapper,
#scrollTopBtn,
.theme-toggle-btn {
  transition:
    background-color 0.5s cubic-bezier(0.16, 1, 0.3, 1),
    border-color 0.5s cubic-bezier(0.16, 1, 0.3, 1),
    color 0.4s cubic-bezier(0.16, 1, 0.3, 1),
    box-shadow 0.5s cubic-bezier(0.16, 1, 0.3, 1),
    transform 0.4s cubic-bezier(0.16, 1, 0.3, 1),
    backdrop-filter 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}

/* Theme Toggle Button rotation */
.theme-toggle-btn i {
  transition:
    transform 0.6s cubic-bezier(0.34, 1.56, 0.64, 1),
    opacity 0.3s ease;
}

.theme-toggle-btn:active i {
  transform: scale(0.7) rotate(180deg);
}

/*--------------------------- Timeline Section ---------------------------*/

.timeline-section {
  padding: 100px 0;
  position: relative;
  z-index: 2;
}

.timeline-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px;
  margin-top: 50px;
}

.timeline-col {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.col-title {
  font-size: 22px;
  font-weight: 600;
  color: var(--text-primary);
  display: flex;
  align-items: center;
  margin-bottom: 8px;
}

.timeline-items {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.timeline-item {
  padding: 24px 30px;
  position: relative;
}

.time-badge {
  display: inline-block;
  padding: 4px 12px;
  border-radius: 9999px;
  background: var(--primary-glow);
  border: 1px solid rgba(37, 99, 235, 0.25);
  color: var(--secondary);
  font-size: 13px;
  font-weight: 500;
  margin-bottom: 12px;
}

.item-title {
  font-size: 18px;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 4px;
}

.item-subtitle {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-muted);
  margin-bottom: 8px;
  letter-spacing: 0.5px;
}

.item-link a {
  font-size: 13px;
  color: var(--secondary);
  transition: var(--transition-smooth);
}

.item-link a:hover {
  text-decoration: underline;
}

.item-details {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 12px;
}

.item-details li {
  font-size: 14px;
  color: var(--text-secondary);
  position: relative;
  padding-left: 16px;
}

.item-details li::before {
  content: "•";
  position: absolute;
  left: 0;
  color: var(--primary);
  font-size: 18px;
  line-height: 1;
  top: -2px;
}

@media (max-width: 991px) {
  .timeline-grid {
    grid-template-columns: 1fr;
    gap: 48px;
  }
}
