/* ===== CSS VARIABLES ===== */

/* ===== SKIP TO MAIN CONTENT (Accessibility) ===== */
.skip-link {
  position: absolute;
  top: -48px;
  left: 1rem;
  background: var(--accent-primary, #2c3e50);
  color: #fff;
  padding: 0.5rem 1rem;
  border-radius: 0 0 0.5rem 0.5rem;
  font-size: 0.9rem;
  font-weight: 600;
  text-decoration: none;
  z-index: 10000;
  transition: top 0.2s ease;
}

.skip-link:focus {
  top: 0;
  outline: 3px solid #fff;
  outline-offset: 2px;
}

/* ===== CSS VARIABLES ===== */
:root {
  /* Light Mode Colors - Elegant & Clean */
  --bg-primary: #ffffff;
  --bg-secondary: #f8f9fa;
  --bg-tertiary: #e9ecef;
  --text-primary: #212529;
  --text-secondary: #495057;
  --text-tertiary: #6c757d;
  --accent-primary: #2c3e50;
  --accent-secondary: #34495e;
  --primary-color: #2c3e50;
  --secondary-color: #34495e;
  --primary-light: rgba(44, 62, 80, 0.12);
  --accent-rgb: 44, 62, 80;
  --accent-gradient: linear-gradient(135deg, #000000 0%, #555555 100%);
  --border-color: #dee2e6;
  --shadow-sm: 0 1px 3px 0 rgba(0, 0, 0, 0.06);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.08);
  --shadow-lg: 0 10px 20px -3px rgba(0, 0, 0, 0.1);
  --shadow-xl: 0 20px 30px -5px rgba(0, 0, 0, 0.12);
  
  /* Border Widths */
  --border-thin: 1px;
  --border-medium: 2px;
  --border-thick: 4px;
  
  /* Skill Progress Colors */
  --skill-progress-bg: #e9ecef;
  --skill-progress-fill: linear-gradient(90deg, #000000 0%, #555555 100%);
  
  /* Card Colors */
  --card-bg: #ffffff;
  --card-hover-bg: #f8f9fa;
  --wechat-green-rgb: 7, 193, 96;
  --qr-frame-bg: #ffffff;
}

/* Dark Mode Colors — Tech / Cyber palette */
[data-theme="dark"] {
  --bg-primary: #060d1e;
  --bg-secondary: #0a1628;
  --bg-tertiary: #0f1f3a;
  --text-primary: #e6f1ff;
  --text-secondary: #8892b0;
  --text-tertiary: #56687a;
  --accent-primary: #00d4ff;
  --accent-secondary: #8b5cf6;
  --primary-color: #00d4ff;
  --secondary-color: #8b5cf6;
  --primary-light: rgba(0, 212, 255, 0.14);
  --accent-rgb: 0, 212, 255;
  --accent-gradient: linear-gradient(135deg, #00d4ff 0%, #8b5cf6 100%);
  --border-color: rgba(0, 212, 255, 0.15);
  --shadow-sm: 0 2px 8px rgba(0, 212, 255, 0.08);
  --shadow-md: 0 4px 16px rgba(0, 212, 255, 0.12), 0 0 30px rgba(0, 212, 255, 0.04);
  --shadow-lg: 0 8px 28px rgba(0, 212, 255, 0.15), 0 0 50px rgba(139, 92, 246, 0.06);
  --shadow-xl: 0 16px 44px rgba(0, 212, 255, 0.18), 0 0 80px rgba(139, 92, 246, 0.1);

  --skill-progress-bg: #0f1f3a;
  --skill-progress-fill: linear-gradient(90deg, #00d4ff 0%, #8b5cf6 100%);

  --card-bg: #0a1628;
  --card-hover-bg: #0f1f3a;
}

/* Dark mode tech ambient background */
[data-theme="dark"] body {
  background-image:
    radial-gradient(ellipse at 15% 20%, rgba(0, 212, 255, 0.04) 0%, transparent 50%),
    radial-gradient(ellipse at 85% 70%, rgba(139, 92, 246, 0.04) 0%, transparent 50%);
}

/* Dark mode enhanced card hover glow */
[data-theme="dark"] .project-card:hover,
[data-theme="dark"] .skill-item:hover,
[data-theme="dark"] .details-container:hover,
[data-theme="dark"] .certificate-gallery-item:hover,
[data-theme="dark"] .publication-card:hover,
[data-theme="dark"] .contact-info-container:hover {
  border-color: rgba(0, 212, 255, 0.45);
  box-shadow: 0 0 0 1px rgba(0, 212, 255, 0.1), var(--shadow-xl);
}

/* Dark mode theme button glow */
[data-theme="dark"] .theme-btn {
  border-color: rgba(0, 212, 255, 0.25);
}

[data-theme="dark"] .theme-btn:hover {
  background: rgba(0, 212, 255, 0.12);
  border-color: #00d4ff;
  color: #00d4ff;
  box-shadow: 0 0 14px rgba(0, 212, 255, 0.35);
}

/* Dark mode ripple on interactive cards */
[data-theme="dark"] .project-card::after,
[data-theme="dark"] .skill-item::after,
[data-theme="dark"] .certificate-gallery-item::after,
[data-theme="dark"] .details-container::after {
  background: radial-gradient(circle, rgba(0, 212, 255, 0.07) 0%, transparent 70%);
}

/* ===== LOADING SCREEN ===== */
#loading-screen {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: radial-gradient(ellipse at center, #f0f4f8 0%, #e8ecf0 100%);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 9999;
  transition: opacity 1s ease, visibility 1s ease;
}

[data-theme="dark"] #loading-screen {
  background: radial-gradient(ellipse at center, #0a1628 0%, #060d1e 100%);
}

#loading-screen.hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

/* Brand Loader */
.brand-loader {
  position: relative;
  width: 110px;
  height: 110px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.brand-ring {
  position: absolute;
  border-radius: 50%;
  border: 1.5px solid transparent;
}

.brand-ring--outer {
  width: 110px;
  height: 110px;
  border-top-color: #2c3e50;
  border-right-color: rgba(44, 62, 80, 0.35);
  animation: brandSpinCW 2.2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

[data-theme="dark"] .brand-ring--outer {
  border-top-color: #00d4ff;
  border-right-color: rgba(0, 212, 255, 0.35);
}

.brand-ring--middle {
  width: 72px;
  height: 72px;
  border-bottom-color: rgba(0, 0, 0, 0.65);
  border-left-color: rgba(0, 0, 0, 0.2);
  animation: brandSpinCCW 1.7s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

[data-theme="dark"] .brand-ring--middle {
  border-bottom-color: rgba(139, 92, 246, 0.65);
  border-left-color: rgba(139, 92, 246, 0.25);
}

.brand-ring--inner {
  width: 40px;
  height: 40px;
  border-top-color: rgba(44, 62, 80, 0.5);
  border-right-color: transparent;
  animation: brandSpinCW 1.2s linear infinite;
}

[data-theme="dark"] .brand-ring--inner {
  border-top-color: rgba(0, 212, 255, 0.5);
}

.brand-core {
  width: 8px;
  height: 8px;
  background: #2c3e50;
  border-radius: 50%;
  box-shadow: 0 0 14px rgba(44, 62, 80, 0.9), 0 0 30px rgba(44, 62, 80, 0.4);
  animation: brandPulse 2.2s ease-in-out infinite;
}

[data-theme="dark"] .brand-core {
  background: #00d4ff;
  box-shadow: 0 0 14px rgba(0, 212, 255, 0.9), 0 0 30px rgba(0, 212, 255, 0.5), 0 0 60px rgba(139, 92, 246, 0.3);
}

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

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

@keyframes brandPulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.6; transform: scale(0.8); }
}


/* ===== SMOKE EFFECT ===== */
.smoke-container {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 9997;
  pointer-events: none;
  opacity: 1;
  transition: opacity 2s ease-out;
}

.smoke-container.fade-out {
  opacity: 0;
}

.smoke {
  position: absolute;
  bottom: -150px;
  width: 200px;
  height: 200px;
  background: radial-gradient(circle, rgba(44, 62, 80, 0.15) 0%, transparent 70%);
  border-radius: 50%;
  filter: blur(40px);
  animation: smoke-rise 8s ease-out forwards;
}

[data-theme="dark"] .smoke {
  background: radial-gradient(circle, rgba(0, 212, 255, 0.08) 0%, transparent 70%);
}

.smoke:nth-child(1) {
  left: 10%;
  animation-delay: 0s;
  animation-duration: 7s;
}

.smoke:nth-child(2) {
  left: 25%;
  animation-delay: 0.5s;
  animation-duration: 8s;
  width: 250px;
  height: 250px;
}

.smoke:nth-child(3) {
  left: 45%;
  animation-delay: 1s;
  animation-duration: 9s;
  width: 180px;
  height: 180px;
}

.smoke:nth-child(4) {
  left: 60%;
  animation-delay: 0.3s;
  animation-duration: 7.5s;
  width: 220px;
  height: 220px;
}

.smoke:nth-child(5) {
  left: 80%;
  animation-delay: 0.8s;
  animation-duration: 8.5s;
  width: 190px;
  height: 190px;
}

@keyframes smoke-rise {
  0% {
    transform: translateY(0) translateX(0) scale(1);
    opacity: 0;
  }
  10% {
    opacity: 0.8;
  }
  50% {
    opacity: 0.5;
  }
  100% {
    transform: translateY(-100vh) translateX(50px) scale(1.8);
    opacity: 0;
  }
}

@media (prefers-reduced-motion: reduce) {
  .smoke {
    animation: none;
    opacity: 0;
  }
  
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

/* ===== SCROLL PROGRESS ===== */
.scroll-progress {
  position: fixed;
  top: 0;
  left: 0;
  height: 0.25rem;
  background: var(--accent-gradient);
  width: 0%;
  z-index: 9998;
  transition: width 0.1s ease;
}

/* ===== GENERAL STYLES ===== */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  -webkit-tap-highlight-color: transparent; /* Remove tap highlight on mobile browsers */
}

body {
  font-family: 'Inter', 'Poppins', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Helvetica Neue', Arial, sans-serif;
  background-color: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.6;
  transition: background-color 0.3s ease, color 0.3s ease;
  overflow-x: hidden;
}

html {
  scroll-behavior: smooth;
  overflow-x: hidden;
  font-size: 16px; /* Base font size for rem units */
  -webkit-text-size-adjust: 100%; /* Prevent font scaling on mobile orientation change */
  -moz-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

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

/* Responsive base font size for better zoom support */
@media screen and (max-width: 768px) {
  html {
    font-size: 15px;
  }
}

@media screen and (max-width: 480px) {
  html {
    font-size: 14px;
  }
}

/* ===== SMOOTH TRANSITIONS ===== */
a, .btn, .card, .skill-item, .project-card, .certificate-card, .publication-card, .certificate-gallery-item {
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ===== GRADIENT ANIMATION ===== */
@keyframes gradientShift {
  0%, 100% {
    background-position: 0% 50%;
  }
  50% {
    background-position: 100% 50%;
  }
}

body::before {
  content: '';
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: radial-gradient(circle at 20% 50%, rgba(44, 62, 80, 0.03) 0%, transparent 50%),
              radial-gradient(circle at 80% 80%, rgba(0, 0, 0, 0.03) 0%, transparent 50%);
  background-size: 200% 200%;
  animation: gradientShift 15s ease infinite;
  pointer-events: none;
  z-index: -1;
}

/* Add stagger animation for cards */
.skill-item {
  animation: slideInUp 0.6s ease-out backwards;
}

.skill-item:nth-child(1) { animation-delay: 0.1s; }
.skill-item:nth-child(2) { animation-delay: 0.2s; }
.skill-item:nth-child(3) { animation-delay: 0.3s; }
.skill-item:nth-child(4) { animation-delay: 0.4s; }

.project-card {
  animation: fadeInScale 0.6s ease-out backwards;
}

.project-card:nth-child(1) { animation-delay: 0.1s; }
.project-card:nth-child(2) { animation-delay: 0.2s; }
.project-card:nth-child(3) { animation-delay: 0.3s; }
.project-card:nth-child(4) { animation-delay: 0.4s; }

.certificate-gallery-item {
  animation: fadeInScale 0.6s ease-out backwards;
}

.certificate-gallery-item:nth-child(1) { animation-delay: 0.1s; }
.certificate-gallery-item:nth-child(2) { animation-delay: 0.15s; }
.certificate-gallery-item:nth-child(3) { animation-delay: 0.2s; }
.certificate-gallery-item:nth-child(4) { animation-delay: 0.25s; }
.certificate-gallery-item:nth-child(5) { animation-delay: 0.3s; }
.certificate-gallery-item:nth-child(6) { animation-delay: 0.35s; }
.certificate-gallery-item:nth-child(7) { animation-delay: 0.4s; }
.certificate-gallery-item:nth-child(8) { animation-delay: 0.45s; }

@keyframes slideInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes fadeInScale {
  from {
    opacity: 0;
    transform: scale(0.9);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

/* ===== NAVIGATION ===== */
nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1.5rem 5%;
  background-color: var(--bg-primary);
  border-bottom: var(--border-thin) solid var(--border-color);
  position: sticky;
  top: 0;
  z-index: 1000;
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  background-color: var(--bg-primary);
  opacity: 0.95;
  transition: all 0.3s ease;
  max-width: 100%;
}

[data-theme="dark"] nav {
  opacity: 0.97;
  border-bottom-color: rgba(0, 212, 255, 0.12);
}

nav.scrolled {
  box-shadow: var(--shadow-md);
}

.logo {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  font-size: 1.5rem;
  font-weight: 700;
  background: var(--accent-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  cursor: pointer;
}

.logo-icon {
  width: 2.1rem;
  height: 2.1rem;
  border-radius: 8px;
  flex-shrink: 0;
  display: block;
}

[data-theme="dark"] .logo-icon {
  /* Tint logo icon to match the cyan accent in dark mode */
  filter: invert(1) hue-rotate(160deg) saturate(1.5) brightness(1.1);
}

.nav-links {
  display: flex;
  gap: 2rem;
  list-style: none;
  align-items: center;
}

.nav-links a {
  color: var(--text-primary);
  text-decoration: none;
  font-weight: 500;
  position: relative;
  padding: 0.5rem 0;
}

.nav-links a.active {
  color: var(--accent-primary);
  font-weight: 600;
}

.nav-links a::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0%;
  height: var(--border-medium);
  background: var(--accent-gradient);
  transition: width 0.3s ease;
}

.nav-links a:hover::after,
.nav-links a.active::after {
  width: 100%;
}

/* Theme Toggle Button */
.theme-toggle {
  display: flex;
  align-items: center;
}

.theme-btn {
  background: var(--bg-secondary);
  border: var(--border-medium) solid var(--border-color);
  border-radius: 50%;
  width: 2.8rem;
  height: 2.8rem;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 1.2rem;
  transition: all 0.3s ease;
}

.theme-btn:hover {
  transform: rotate(20deg) scale(1.1);
  background: var(--accent-primary);
  border-color: var(--accent-primary);
}

/* ===== HAMBURGER MENU ===== */
#hamburger-nav {
  display: none;
}

.nav-right {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.hamburger-menu {
  position: relative;
  display: inline-block;
}

.hamburger-icon {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  height: 1.5rem;
  width: 1.875rem;
  cursor: pointer;
  /* Increase tap target via padding without changing flex layout */
  padding: 0.75rem;
  margin: -0.75rem;
  box-sizing: content-box;
  position: relative;
}

.hamburger-icon span {
  width: 1.875rem;
  height: 0.1875rem;
  background-color: var(--text-primary);
  transition: all 0.3s ease-in-out;
  border-radius: 0.125rem;
  display: block;
}

.menu-links {
  position: absolute;
  top: 100%;
  right: 0;
  background-color: var(--bg-secondary);
  width: max-content;
  min-width: 200px;
  max-width: min(300px, 90vw);
  max-height: 0;
  overflow: hidden;
  transition: all 0.3s ease-in-out;
  border-radius: 0.75rem;
  margin-top: 0.625rem;
  box-shadow: var(--shadow-lg);
  z-index: 1000;
}

.menu-links a {
  display: block;
  padding: 1rem 1.5rem;
  text-align: left;
  font-size: 1rem;
  color: var(--text-primary);
  text-decoration: none;
  transition: all 0.3s ease;
  border-bottom: var(--border-thin) solid var(--border-color);
  white-space: nowrap;
}

.menu-links a:hover {
  background-color: var(--bg-tertiary);
  padding-left: 2rem;
}

.menu-links li {
  list-style: none;
}

.menu-links li:last-child a {
  border-bottom: none;
}

.menu-links.open {
  max-height: min(400px, 80vh);
  padding: 0.5rem 0;
}

.hamburger-icon.open span:first-child {
  transform: rotate(45deg) translate(0.46rem, 0.46rem);
}

.hamburger-icon.open span:nth-child(2) {
  opacity: 0;
}

.hamburger-icon.open span:last-child {
  transform: rotate(-45deg) translate(0.46rem, -0.46rem);
}

/* ===== SECTIONS ===== */
section {
  padding: 3rem 5%;
  display: flex;
  flex-direction: column;
  justify-content: center;
  position: relative;
  z-index: 1;
  max-width: 100%;
  box-sizing: border-box;
  overflow-x: hidden;
}

.section__text__p1 {
  text-align: center;
  font-size: 1rem;
  color: var(--text-tertiary);
  text-transform: uppercase;
  letter-spacing: 0.125rem;
  margin-bottom: 0.5rem;
  font-weight: 500;
  opacity: 0;
  animation: slideDown 0.8s ease forwards;
}

@keyframes slideDown {
  from {
    opacity: 0;
    transform: translateY(-30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.title {
  font-size: 3rem;
  text-align: center;
  margin-bottom: 3rem;
  font-weight: 700;
  background: var(--accent-gradient);
  background-size: 200% auto;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  animation: shimmer 3s linear infinite;
  position: relative;
}

@keyframes shimmer {
  0% {
    background-position: 0% center;
  }
  100% {
    background-position: 200% center;
  }
}

/* ===== PROFILE SECTION ===== */
#home {
  display: flex;
  flex-direction: row-reverse;
  justify-content: center;
  align-items: center;
  gap: 3rem;
  padding-top: 6rem;
  padding-bottom: 2rem;
  min-height: 90vh;
}

.section__pic-container {
  display: flex;
  justify-content: center;
  align-items: center;
  opacity: 0;
  animation: fadeInScale 1.2s ease forwards 0.5s;
  position: relative;
  z-index: 1;
}

.profile-pic {
  width: clamp(220px, 40vw, 400px);
  height: clamp(220px, 40vw, 400px);
  aspect-ratio: 1 / 1;
  border-radius: 50%;
  object-fit: cover;
  box-shadow: var(--shadow-xl);
  border: 0.3rem solid var(--border-color);
  transition: transform 0.4s ease, box-shadow 0.4s ease, border-color 0.4s ease;
  position: relative;
  z-index: 1;
}





/* Hover effect removed from profile picture */
/* Removed reduced motion hover effect from profile picture */
@media (prefers-reduced-motion: reduce) {
  /* No hover effect on profile picture */
}

.section__text {
  text-align: center;
  max-width: 600px;
  position: relative;
  z-index: 2;
}

.section__text h1 {
  font-size: 2.5rem;
  margin: 1rem 0;
  background: var(--accent-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  opacity: 0;
  animation: fadeInScale 1s ease forwards 0.3s;
  white-space: nowrap;
}

@keyframes fadeInScale {
  from {
    opacity: 0;
    transform: scale(0.8);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

.section__text__p2 {
  font-size: 1.5rem;
  color: var(--text-secondary);
  margin-bottom: 1.5rem;
  font-weight: 500;
  opacity: 0;
  animation: slideUp 1s ease forwards 0.6s;
}

@keyframes slideUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.profile-description {
  color: var(--text-secondary);
  margin-bottom: 2rem;
  line-height: 1.8;
  font-size: 1.1rem;
  opacity: 0;
  animation: slideUp 1s ease forwards 0.9s;
}

/* ===== BUTTONS ===== */
.btn-container {
  display: flex;
  justify-content: center;
  gap: 1rem;
  margin: 1.5rem 0;
  flex-wrap: wrap;
  opacity: 0;
  animation: slideUp 1s ease forwards 1.2s;
}

.btn {
  font-weight: 600;
  padding: 1rem 2rem;
  border-radius: 50px;
  cursor: pointer;
  font-size: 1rem;
  border: none;
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  overflow: hidden;
  z-index: 1;
}

a.btn {
  display: inline-block;
  text-decoration: none;
}

.btn::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.3), transparent);
  transition: left 0.6s ease;
  z-index: -1;
}

.btn:hover::before {
  left: 100%;
}

.btn::after {
  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.6s ease, height 0.6s ease;
  z-index: -1;
}

.btn:hover::after {
  width: 300px;
  height: 300px;
}

.btn-color-1 {
  background: var(--accent-gradient);
  color: white;
  box-shadow: var(--shadow-md);
}

.btn-color-1:hover {
  transform: translateY(-3px) scale(1.02);
  box-shadow: 0 15px 35px -5px rgba(var(--accent-rgb), 0.45);
}

.btn-color-2 {
  background: transparent;
  color: var(--text-primary);
  border: 2px solid var(--accent-primary);
}

.btn-color-2:hover {
  background: var(--accent-primary);
  color: var(--bg-primary);
  transform: translateY(-3px) scale(1.02);
  box-shadow: 0 10px 25px -5px rgba(var(--accent-rgb), 0.35);
}

/* ===== SOCIALS ===== */
#socials-container {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 0.9rem;
  margin-top: 2rem;
  opacity: 0;
  animation: fadeInScale 1s ease forwards 1.5s;
}

.social-icon-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.6rem;
  height: 2.6rem;
  border-radius: 50%;
  border: 2px solid var(--border-color);
  background: var(--card-bg);
  color: var(--text-primary);
  font-size: 1.2rem;
  text-decoration: none;
  transition: all 0.35s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: var(--shadow-sm);
  position: relative;
  overflow: hidden;
}

.social-icon-link svg.orcid-icon,
.social-icon-link svg.wechat-icon {
  width: 1.1rem;
  height: 1.1rem;
}

.social-icon-link:hover {
  border-color: var(--accent-primary);
  color: var(--accent-primary);
  box-shadow: 0 6px 18px -3px rgba(102, 126, 234, 0.35);
  background: var(--bg-primary);
}

@media (prefers-reduced-motion: no-preference) {
  .social-icon-link:hover {
    /* No transform/translate - icons stay fixed in position */
  }
}

/* Individual social brand colours on hover */
.social-icon-link[aria-label="LinkedIn"]:hover    { color: #0a66c2; border-color: #0a66c2; box-shadow: 0 10px 25px -5px rgba(10,102,194,0.4); }
.social-icon-link[aria-label="GitHub"]:hover      { color: #333; border-color: #333; box-shadow: 0 10px 25px -5px rgba(0,0,0,0.3); }
[data-theme="dark"] .social-icon-link[aria-label="GitHub"]:hover { color: #00d4ff; border-color: #00d4ff; box-shadow: 0 10px 25px -5px rgba(0,212,255,0.35); }
.social-icon-link[aria-label="ORCID"]:hover       { color: #a6ce39; border-color: #a6ce39; box-shadow: 0 10px 25px -5px rgba(166,206,57,0.4); }
.social-icon-link[aria-label="Medium"]:hover      { color: #000; border-color: #000; box-shadow: 0 10px 25px -5px rgba(0,0,0,0.3); }
[data-theme="dark"] .social-icon-link[aria-label="Medium"]:hover { color: #00d4ff; border-color: #00d4ff; box-shadow: 0 10px 25px -5px rgba(0,212,255,0.35); }
.social-icon-link[aria-label="X (Twitter)"]:hover { color: #000; border-color: #000; box-shadow: 0 10px 25px -5px rgba(0,0,0,0.3); }
[data-theme="dark"] .social-icon-link[aria-label="X (Twitter)"]:hover { color: #00d4ff; border-color: #00d4ff; box-shadow: 0 10px 25px -5px rgba(0,212,255,0.35); }
.social-icon-link[aria-label="Instagram"]:hover   { color: #e1306c; border-color: #e1306c; box-shadow: 0 10px 25px -5px rgba(225,48,108,0.4); }
.social-icon-link[aria-label="Facebook"]:hover    { color: #1877f2; border-color: #1877f2; box-shadow: 0 10px 25px -5px rgba(24,119,242,0.4); }

/* ===== WECHAT QR CARD ===== */
.wechat-card {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.wechat-card summary {
  list-style: none;
}

.wechat-card summary::-webkit-details-marker {
  display: none;
}

.wechat-trigger {
  width: auto;
  min-width: 2.6rem;
  border-radius: 999px;
  gap: 0.45rem;
  padding: 0 1rem;
}

.wechat-trigger span {
  font-size: 0.82rem;
  font-weight: 600;
  letter-spacing: 0.01em;
}

.wechat-qr-popup {
  position: absolute;
  bottom: calc(100% + 12px);
  left: 50%;
  transform: translate(-50%, 6px) scale(0.92);
  background: var(--card-bg);
  border: 1px solid rgba(var(--wechat-green-rgb), 0.28);
  border-radius: 14px;
  padding: 0.55rem;
  box-shadow: 0 20px 45px -20px rgba(15, 23, 42, 0.45);
  z-index: 200;
  text-align: center;
  min-width: 145px;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: all 0.3s ease;
}

.wechat-qr-popup img {
  width: 135px;
  height: 135px;
  object-fit: contain;
  border-radius: 10px;
  border: 4px solid var(--qr-frame-bg);
  outline: 1px solid rgba(var(--wechat-green-rgb), 0.4);
  box-shadow: 0 12px 26px -16px rgba(var(--wechat-green-rgb), 0.7);
  display: block;
  margin: 0 auto;
  background: var(--qr-frame-bg);
}

.wechat-card:hover .wechat-qr-popup,
.wechat-card:focus-within .wechat-qr-popup,
.wechat-card[open] .wechat-qr-popup {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transform: translate(-50%, -2px) scale(1);
}

.social-icon-link[aria-label="WeChat"]:hover { color: #07c160; border-color: #07c160; box-shadow: 0 10px 25px -5px rgba(7,193,96,0.4); }

.icon {
  cursor: pointer;
  height: 2.5rem;
  width: 2.5rem;
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  filter: grayscale(0%);
  position: relative;
}

.icon::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 100%;
  height: 100%;
  background: var(--accent-primary);
  border-radius: 50%;
  transform: translate(-50%, -50%) scale(0);
  opacity: 0.3;
  transition: transform 0.4s ease, opacity 0.4s ease;
  z-index: -1;
}

.icon:hover::before {
  transform: translate(-50%, -50%) scale(1.5);
  opacity: 0;
}

.icon:hover {
  filter: brightness(1.2) drop-shadow(0 4px 10px rgba(102, 126, 234, 0.3));
}

@media (prefers-reduced-motion: no-preference) {
  .icon:hover {
    /* No transform/animation - icons stay fixed in position */
  }
}

/* ===== ABOUT SECTION ===== */
.section-container {
  display: flex;
  gap: 4rem;
  align-items: center;
  margin: 0 auto;
  max-width: min(1200px, 100%);
  width: 100%;
}

.about-pic {
  width: 100%;
  height: auto;
  border-radius: 20px;
  box-shadow: var(--shadow-lg);
  transition: transform 0.3s ease;
}

.about-pic:hover {
  transform: scale(1.02);
}

.about-details-container {
  flex: 1;
}

.about-containers {
  display: flex;
  gap: 2rem;
  margin-bottom: 2rem;
  flex-wrap: wrap;
}

.details-container {
  padding: 2rem;
  background: var(--card-bg);
  border-radius: 1.25rem;
  border: var(--border-medium) solid var(--border-color);
  text-align: center;
  flex: 1;
  min-width: 0;
  transition: all 0.3s ease;
  box-shadow: var(--shadow-sm);
  max-width: 100%;
}

.details-container:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-lg);
  border-color: var(--accent-primary);
}

.details-container h3 {
  margin: 1rem 0 0.5rem 0;
  color: var(--text-primary);
  font-size: 1.3rem;
}

.details-container p {
  color: var(--text-secondary);
}

.text-container {
  padding: 1.5rem;
  background: var(--bg-secondary);
  border-radius: 1rem;
  border-left: var(--border-thick) solid var(--accent-primary);
}

.text-container p {
  color: var(--text-secondary);
  line-height: 1.8;
  font-size: 1.05rem;
}

.text-container h2 {
  color: var(--text-primary);
  font-size: 1.8rem;
  margin-bottom: 1rem;
  margin-top: 1.5rem;
}

.text-container h3 {
  color: var(--accent-primary);
  font-size: 1.4rem;
  margin-top: 1.5rem;
  margin-bottom: 0.8rem;
  font-weight: 600;
}

.text-container h4 {
  color: var(--text-primary);
  font-size: 1.2rem;
  margin-top: 1rem;
  margin-bottom: 0.6rem;
  font-weight: 600;
}

.text-container ul {
  list-style: none;
  padding-left: 0;
  margin: 1rem 0;
}

.text-container ul li {
  color: var(--text-secondary);
  line-height: 1.8;
  padding: 0.4rem 0;
  padding-left: 1.5rem;
  position: relative;
}

.text-container ul li::before {
  content: "▸";
  color: var(--accent-primary);
  font-weight: bold;
  position: absolute;
  left: 0;
}

.text-container ol {
  counter-reset: item;
  list-style: none;
  padding-left: 0;
  margin: 1rem 0;
}

.text-container ol li {
  counter-increment: item;
  color: var(--text-secondary);
  line-height: 1.8;
  padding: 0.8rem 0;
  padding-left: 2rem;
  position: relative;
}

.text-container ol li::before {
  content: counter(item) ".";
  color: var(--accent-primary);
  font-weight: bold;
  position: absolute;
  left: 0;
}

.text-container a {
  color: var(--accent-primary);
  text-decoration: none;
  transition: color 0.3s ease;
}

.text-container a:hover {
  color: var(--accent-secondary);
  text-decoration: underline;
}

.text-container strong {
  color: var(--text-primary);
  font-weight: 600;
}

.text-container em {
  color: var(--text-tertiary);
  font-style: italic;
}

.publications {
  background: var(--card-bg);
  padding: 1.5rem;
  border-radius: 0.8rem;
  margin: 1rem 0;
  border: var(--border-thin) solid var(--border-color);
}

.skills-section {
  background: var(--card-bg);
  padding: 1.5rem;
  border-radius: 0.8rem;
  margin: 1rem 0;
  border: var(--border-thin) solid var(--border-color);
}

.skills-section h4 {
  color: var(--accent-primary);
  margin-top: 1rem;
  margin-bottom: 0.5rem;
}

.skills-section p {
  color: var(--text-secondary);
  line-height: 1.6;
  margin-bottom: 0.8rem;
}

.contact-links {
  background: var(--card-bg);
  padding: 1.5rem;
  border-radius: 0.8rem;
  margin: 1rem 0;
  border: var(--border-thin) solid var(--border-color);
}

.contact-links p {
  margin: 0;
  line-height: 2;
}


/* ===== ARROW ===== */
.arrow {
  position: absolute;
  bottom: 2rem;
  right: 5%;
  cursor: pointer;
  transition: transform 0.3s ease;
  animation: bounce 2s infinite;
}

.arrow:hover {
  transform: scale(1.2);
}

@keyframes bounce {
  0%, 20%, 50%, 80%, 100% {
    transform: translateY(0);
  }
  40% {
    transform: translateY(-10px);
  }
  60% {
    transform: translateY(-5px);
  }
}

/* ===== SKILLS SECTION ===== */
.skills-details-container {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 3rem;
}

.skills-category {
  background: var(--card-bg);
  padding: 2.5rem;
  border-radius: 20px;
  box-shadow: var(--shadow-md);
  border: 2px solid var(--border-color);
  transition: all 0.3s ease;
}

.skills-category:hover {
  box-shadow: var(--shadow-xl);
  transform: translateY(-5px);
}

.skills-sub-title {
  color: var(--text-primary);
  font-size: 1.8rem;
  margin-bottom: 2rem;
  text-align: center;
  font-weight: 600;
}

.skills-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(250px, 100%), 1fr));
  gap: 2rem;
}

.skill-item {
  background: var(--bg-secondary);
  padding: 1.5rem;
  border-radius: 15px;
  transition: all 0.3s ease;
  border: 1px solid var(--border-color);
}

.skill-item:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
  background: var(--card-hover-bg);
}

.skill-header {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  margin-bottom: 1rem;
}

.skill-header h3 {
  color: var(--text-primary);
  font-size: 1.1rem;
  font-weight: 600;
}

.skill-header .icon {
  height: 1.5rem;
  width: 1.5rem;
}

.skill-check-icon {
  font-size: 1.3rem;
  color: var(--accent-primary);
  flex-shrink: 0;
}

.skill-bar {
  background: var(--skill-progress-bg);
  height: 8px;
  border-radius: 10px;
  overflow: hidden;
  margin-bottom: 0.5rem;
}

.skill-progress {
  height: 100%;
  background: var(--skill-progress-fill);
  border-radius: 10px;
  transition: width 1s ease;
  animation: fillBar 1.5s ease-out;
}

@keyframes fillBar {
  from { width: 0; }
  to { width: 100%; }
}

.skill-level {
  font-size: 0.9rem;
  color: var(--text-tertiary);
  text-align: right;
  font-style: italic;
}

/* ===== PROJECTS SECTION ===== */
.projects-container {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(320px, 100%), 1fr));
  gap: 2.5rem;
  max-width: 1400px;
  margin: 0 auto;
}

.project-card {
  background: var(--card-bg);
  border-radius: 20px;
  overflow: hidden;
  box-shadow: var(--shadow-md);
  transition: all 0.3s ease;
  border: 2px solid var(--border-color);
  display: flex;
  flex-direction: column;
}

.project-card:hover {
  transform: translateY(-10px);
  box-shadow: var(--shadow-xl);
  border-color: var(--accent-primary);
}

.project-image {
  width: 100%;
  height: 250px;
  overflow: hidden;
  position: relative;
}

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

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

.project-content {
  padding: 2rem;
  flex: 1;
  display: flex;
  flex-direction: column;
}

.project-title {
  color: var(--text-primary);
  font-size: 1.5rem;
  margin-bottom: 1rem;
  font-weight: 600;
}

.project-description {
  color: var(--text-secondary);
  margin-bottom: 1.5rem;
  line-height: 1.6;
  flex: 1;
}

.project-details {
  margin-bottom: 1.5rem;
}

.project-detail-item {
  background: var(--bg-secondary);
  padding: 1rem;
  border-radius: 10px;
  border-left: 3px solid var(--accent-primary);
}

.project-detail-item strong {
  color: var(--text-primary);
  display: block;
  margin-bottom: 0.5rem;
  font-size: 0.95rem;
}

.project-detail-item p {
  color: var(--text-secondary);
  line-height: 1.7;
  margin: 0.45rem 0 0;
}

.project-detail-item ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.project-detail-item li {
  color: var(--text-secondary);
  padding: 0.3rem 0 0.3rem 1.2rem;
  position: relative;
  font-size: 0.9rem;
}

.project-detail-item li::before {
  content: '→';
  position: absolute;
  left: 0;
  color: var(--accent-primary);
  font-weight: bold;
}

.project-tags {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
  margin-bottom: 1.5rem;
}

.tag {
  background: var(--accent-gradient);
  color: white;
  padding: 0.4rem 1rem;
  border-radius: 20px;
  font-size: 0.85rem;
  font-weight: 500;
}

.project-btn {
  flex: 1;
  padding: 0.8rem 1.5rem;
}

/* ===== PUBLICATIONS SECTION ===== */
.publications-container {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(350px, 100%), 1fr));
  gap: 2rem;
  max-width: 1000px;
  margin: 0 auto;
}

.publication-card {
  background: var(--card-bg);
  padding: 2.5rem;
  border-radius: 20px;
  box-shadow: var(--shadow-md);
  border: 2px solid var(--border-color);
  transition: all 0.3s ease;
  display: flex;
  gap: 1.5rem;
}

.publication-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-xl);
  border-color: var(--accent-primary);
}

.publication-icon {
  font-size: 3rem;
  flex-shrink: 0;
}

.publication-content {
  flex: 1;
}

.publication-title {
  color: var(--text-primary);
  font-size: 1.4rem;
  margin-bottom: 1rem;
  font-weight: 600;
}

.publication-description {
  color: var(--text-secondary);
  margin-bottom: 1rem;
  line-height: 1.6;
}

.publication-status {
  display: inline-block;
  background: var(--accent-gradient);
  color: white;
  padding: 0.4rem 1rem;
  border-radius: 20px;
  font-size: 0.9rem;
  font-weight: 500;
}

/* ===== CERTIFICATES SECTION ===== */
.certificates-preview {
  max-width: 1400px;
  margin: 0 auto;
}

.certificates-preview-text {
  text-align: center;
  font-size: 1.15rem;
  color: var(--text-secondary);
  line-height: 1.8;
  margin-bottom: 3rem;
  max-width: 700px;
  margin-left: auto;
  margin-right: auto;
}

.certificates-gallery {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(300px, 100%), 1fr));
  gap: 2rem;
  max-width: 1400px;
  margin: 0 auto 3rem;
}

.certificate-gallery-item {
  position: relative;
  border-radius: 20px;
  overflow: hidden;
  box-shadow: var(--shadow-md);
  cursor: pointer;
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  border: 2px solid var(--border-color);
  aspect-ratio: 16 / 11;
}

.certificate-gallery-item:hover {
  transform: translateY(-10px) scale(1.02);
  box-shadow: var(--shadow-xl);
  border-color: var(--accent-primary);
}

.certificate-gallery-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.certificate-gallery-item:hover img {
  transform: scale(1.1);
}

.certificate-overlay {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.9), transparent);
  padding: 2rem 1.5rem 1.5rem;
  transform: translateY(100%);
  transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.certificate-gallery-item:hover .certificate-overlay {
  transform: translateY(0);
}

.certificate-overlay h3 {
  color: #ffffff;
  font-size: 1.1rem;
  font-weight: 600;
  margin-bottom: 0.3rem;
}

.certificate-overlay p {
  color: #e5e7eb;
  font-size: 0.9rem;
  font-weight: 400;
}

/* Certificate Modal (for future enhancement) */
.certificate-modal {
  display: none;
  position: fixed;
  z-index: 10000;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.95);
  animation: fadeIn 0.3s ease;
}

.certificate-modal-content {
  position: relative;
  margin: 2% auto;
  max-width: 90%;
  max-height: 90vh;
  animation: zoomIn 0.3s ease;
}

.certificate-modal-content img {
  width: 100%;
  height: auto;
  border-radius: 10px;
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes zoomIn {
  from { transform: scale(0.8); }
  to { transform: scale(1); }
}

.certificates-container {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(280px, 100%), 1fr));
  gap: 2rem;
  max-width: 1200px;
  margin: 0 auto;
}

.certificate-card {
  background: var(--card-bg);
  padding: 2rem;
  border-radius: 20px;
  box-shadow: var(--shadow-md);
  border: 2px solid var(--border-color);
  transition: all 0.3s ease;
  text-align: center;
}

.certificate-card:hover {
  transform: translateY(-5px) rotate(2deg);
  box-shadow: var(--shadow-xl);
  border-color: var(--accent-primary);
}

.certificate-icon {
  font-size: 3.5rem;
  margin-bottom: 1rem;
}

.certificate-content h3 {
  color: var(--text-primary);
  font-size: 1.3rem;
  margin-bottom: 0.5rem;
  font-weight: 600;
}

.certificate-content p {
  color: var(--text-secondary);
  margin-bottom: 0.5rem;
}

.certificate-issuer {
  color: var(--text-tertiary);
  font-size: 0.95rem;
  font-style: italic;
}

.certificate-date {
  display: inline-block;
  margin-top: 1rem;
  background: var(--bg-secondary);
  color: var(--accent-primary);
  padding: 0.4rem 1rem;
  border-radius: 20px;
  font-size: 0.9rem;
  font-weight: 500;
}

/* ===== CONTACT SECTION ===== */
#contact {
  min-height: 70vh;
}

.contact-info-upper-container {
  display: flex;
  justify-content: center;
  gap: 2rem;
  flex-wrap: wrap;
  max-width: 800px;
  margin: 0 auto;
}

.contact-info-container {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1.5rem 2.5rem;
  background: var(--card-bg);
  border-radius: 15px;
  border: 2px solid var(--border-color);
  transition: all 0.3s ease;
  box-shadow: var(--shadow-sm);
}

.contact-info-container:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-lg);
  border-color: var(--accent-primary);
}

.contact-info-container p {
  font-size: 1.1rem;
  color: var(--text-primary);
}

.contact-info-container a {
  color: var(--accent-primary);
  text-decoration: none;
  font-weight: 500;
}

.contact-info-container a:hover {
  text-decoration: underline;
}

.contact-icon {
  height: 2.5rem;
  width: 2.5rem;
}

.contact-icon-bi {
  font-size: 2rem;
  color: var(--accent-primary);
  flex-shrink: 0;
}

/* ===== CONTACT FORM ===== */
.contact-form {
  max-width: 600px;
  margin: 2.5rem auto 0;
  display: flex;
  flex-direction: column;
  gap: 1.2rem;
}

.contact-form .form-group {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.contact-form label {
  font-weight: 600;
  font-size: 0.95rem;
  color: var(--text-secondary);
}

.contact-form input,
.contact-form textarea {
  padding: 0.85rem 1.2rem;
  border-radius: 10px;
  border: 2px solid var(--border-color);
  background: var(--card-bg);
  color: var(--text-primary);
  font-family: inherit;
  font-size: 1rem;
  transition: border-color 0.25s ease, box-shadow 0.25s ease;
  resize: vertical;
}

.contact-form input:focus,
.contact-form textarea:focus {
  outline: none;
  border-color: var(--accent-primary);
  box-shadow: 0 0 0 3px rgba(var(--accent-rgb), 0.15);
}

.contact-form button[type="submit"] {
  align-self: flex-start;
  margin-top: 0.5rem;
}

/* ===== ENHANCED PROFILE ANIMATIONS ===== */
.typing-effect {
  position: relative;
  display: inline-block;
}

.typing-effect::after {
  content: '';
  position: absolute;
  right: -10px;
  width: 3px;
  height: 100%;
  background: var(--accent-primary);
  animation: blink 1s infinite;
}

@keyframes blink {
  0%, 50% {
    opacity: 1;
  }
  51%, 100% {
    opacity: 0;
  }
}

@media (prefers-reduced-motion: reduce) {
  .typing-effect::after {
    animation: none;
    opacity: 0;
  }
}

/* ===== FOOTER ===== */
footer {
  background: var(--bg-secondary);
  padding: 2rem 5%;
  border-top: 1px solid var(--border-color);
  margin-top: 5rem;
}

footer nav {
  border-bottom: none;
  background: transparent;
  position: static;
  justify-content: center;
  padding: 1rem 0;
}

.nav-link-container {
  display: flex;
  justify-content: center;
}

footer .nav-links {
  flex-wrap: wrap;
  gap: 1.5rem;
}

footer p {
  text-align: center;
  color: var(--text-tertiary);
  margin-top: 1.5rem;
  font-size: 0.95rem;
}

/* ===== RESPONSIVE ANIMATIONS ===== */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
  
  /* Keep essential focus indicators */
  :focus {
    transition: outline 0.2s ease;
  }
}

/* Fade in animation for sections */
.fade-in {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.fade-in.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ===== DESKTOP ENHANCEMENTS ===== */

/* Desktop optimizations for 1440px+ */
@media screen and (min-width: 1440px) {
  nav {
    padding: 1.5rem 8%;
  }
  
  section {
    padding: 5rem 8%;
  }
  
  #profile {
    gap: 6rem;
  }
  
  .section__text h1 {
    font-size: 4rem;
  }
  
  .section__text__p2 {
    font-size: 1.6rem;
  }
  
  .profile-description {
    font-size: 1.15rem;
  }
  
  .projects-container {
    gap: 3rem;
  }
  
  .project-card {
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  }
  
  .project-card:hover {
    transform: translateY(-12px) scale(1.02);
  }
  
  .skill-item {
    padding: 2rem;
  }
  
  .text-container p {
    font-size: 1.1rem;
  }
}

/* Ultra-wide and 4K displays */
@media screen and (min-width: 1920px) {
  section {
    padding: 6rem 10%;
  }
  
  .title {
    font-size: 3.8rem;
  }
  
  .profile-pic {
    width: 480px;
    height: 480px;
    aspect-ratio: 1 / 1;
  }
  
  #home {
    gap: 5rem;
  }
  
  /* Enhanced desktop layout */
  .projects-container {
    grid-template-columns: repeat(2, 1fr);
    gap: 3.5rem;
    max-width: 1800px;
  }
  
  .project-card {
    max-width: none;
  }
  
  .project-content {
    padding: 2.5rem;
  }
  
  .project-title {
    font-size: 1.8rem;
  }
  
  .project-description {
    font-size: 1.1rem;
  }
  
  .skills-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 2.5rem;
  }
  
  .certificates-gallery {
    grid-template-columns: repeat(4, 1fr);
    gap: 2.5rem;
  }
  
  .about-containers {
    gap: 3rem;
  }
  
  .details-container {
    padding: 2.5rem;
  }
  
  .skills-category {
    padding: 3rem;
  }
  
  .skills-sub-title {
    font-size: 2rem;
  }
}

/* ===== HERO SECTION (DESKTOP ONLY) ===== */
.desktop-only {
  display: none;
}

@media screen and (min-width: 1200px) {
  .desktop-only {
    display: flex;
  }
}

/* Enhanced Section Transitions */
section {
  position: relative;
}

section::before {
  content: '';
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 2px;
  height: 60px;
  background: linear-gradient(to bottom, transparent, var(--accent-primary), transparent);
  opacity: 0.3;
  animation: fadeIn 1s ease-out;
}

section:first-of-type::before,
#profile::before {
  display: none;
}

/* Page Load Animation */
body {
  animation: pageLoad 0.6s ease-out;
}

@keyframes pageLoad {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

/* Smooth Hover Transitions */
.project-card,
.skill-item,
.certificate-gallery-item,
.details-container {
  position: relative;
  overflow: hidden;
}

.project-card::after,
.skill-item::after,
.certificate-gallery-item::after,
.details-container::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 0;
  height: 0;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(102, 126, 234, 0.1) 0%, transparent 70%);
  transform: translate(-50%, -50%);
  transition: width 0.6s ease, height 0.6s ease;
  pointer-events: none;
  z-index: 0;
}

.project-card:hover::after,
.skill-item:hover::after,
.certificate-gallery-item:hover::after,
.details-container:hover::after {
  width: 300px;
  height: 300px;
}

.project-card > *,
.skill-item > *,
.details-container > * {
  position: relative;
  z-index: 1;
}

/* Icons stay fixed in position on hover - no pop/float effect */

/* Button Ripple Effect */
.btn {
  position: relative;
  overflow: hidden;
}

.btn::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 0;
  height: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.5);
  transform: translate(-50%, -50%);
  transition: width 0.6s ease, height 0.6s ease;
}

.btn:active::after {
  width: 300px;
  height: 300px;
  transition: width 0s, height 0s;
}

/* Section Divider Animation */
.section-divider {
  width: 100px;
  height: 4px;
  background: var(--accent-gradient);
  margin: 3rem auto;
  border-radius: 2px;
  animation: expandWidth 1s ease-out;
}

@keyframes expandWidth {
  from {
    width: 0;
  }
  to {
    width: 100px;
  }
}

/* Gradient Text Animation */
@keyframes gradientShift {
  0% {
    background-position: 0% 50%;
  }
  50% {
    background-position: 100% 50%;
  }
  100% {
    background-position: 0% 50%;
  }
}

.gradient-text,
.title {
  background-size: 200% 200%;
  animation: gradientShift 3s ease infinite;
}

/* Stagger Animation Enhancement */
.skill-item,
.project-card,
.certificate-gallery-item {
  opacity: 0;
  transform: translateY(20px);
  animation: staggerFadeIn 0.6s ease-out forwards;
}

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

.skill-item:nth-child(1) { animation-delay: 0.1s; }
.skill-item:nth-child(2) { animation-delay: 0.2s; }
.skill-item:nth-child(3) { animation-delay: 0.3s; }
.skill-item:nth-child(4) { animation-delay: 0.4s; }
.skill-item:nth-child(5) { animation-delay: 0.5s; }
.skill-item:nth-child(6) { animation-delay: 0.6s; }

.project-card:nth-child(1) { animation-delay: 0.1s; }
.project-card:nth-child(2) { animation-delay: 0.2s; }
.project-card:nth-child(3) { animation-delay: 0.3s; }
.project-card:nth-child(4) { animation-delay: 0.4s; }

/* Text Reveal Animation */
.title {
  overflow: hidden;
  position: relative;
}

.title::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: var(--bg-primary);
  animation: revealText 1s ease-out forwards;
}

@keyframes revealText {
  from {
    left: 0;
  }
  to {
    left: 100%;
  }
}

/* Media query for reduced motion */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
  
  .title::before {
    display: none;
  }
}

/* Parallax Effect Enhancement */
@media screen and (min-width: 1200px) {
  #hero-section {
    background-attachment: fixed;
  }
}

/* ===== PAGE HEADER SECTIONS ===== */
#skills-header,
#projects-header,
#certificates-header {
  min-height: 50vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  background: linear-gradient(135deg, var(--bg-primary) 0%, var(--bg-secondary) 100%);
  padding: 8rem 5% 4rem;
  position: relative;
  overflow: hidden;
}

#skills-header::before,
#projects-header::before,
#certificates-header::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: radial-gradient(circle at 50% 50%, rgba(102, 126, 234, 0.1) 0%, transparent 70%);
  pointer-events: none;
}

.header-content {
  max-width: 800px;
  margin: 0 auto;
  position: relative;
  z-index: 2;
  animation: fadeInUp 1s ease-out;
}

.skills-intro,
.projects-intro,
.certificates-intro {
  font-size: 1.2rem;
  line-height: 1.8;
  color: var(--text-secondary);
  margin-top: 1.5rem;
}

#skills-main,
#projects-main,
#certificates-main {
  padding: 5rem 5%;
}

#back-to-home {
  min-height: auto;
  padding: 3rem 5%;
  text-align: center;
}

#back-to-home .btn {
  font-size: 1.1rem;
  padding: 1.2rem 2.5rem;
}

/* ==================== BLOG SECTION ==================== */
#blog {
  padding: 5rem 5%;
  min-height: 100vh;
}

.page-header {
  text-align: center;
  margin-bottom: 4rem;
  animation: fadeInUp 0.8s ease-out;
}

.page-description {
  font-size: 1.1rem;
  color: var(--text-secondary);
  max-width: 700px;
  margin: 1.5rem auto 0;
  line-height: 1.8;
}

.blog-container {
  max-width: 1200px;
  margin: 0 auto;
}

/* Featured Blog Post */
.featured-post {
  margin-bottom: 4rem;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
  background: var(--card-bg);
  border-radius: 20px;
  padding: 2rem;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.1);
  transition: all 0.3s ease;
  animation: fadeInUp 0.8s ease-out 0.2s both;
}

.featured-post:hover {
  transform: translateY(-5px);
  box-shadow: 0 15px 50px rgba(0, 0, 0, 0.15);
}

.blog-post-image {
  position: relative;
  overflow: hidden;
  border-radius: 15px;
  height: 350px;
}

.featured-post .blog-post-image {
  height: 100%;
}

.blog-image-placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.5s ease;
}

.blog-post:hover .blog-image-placeholder {
  transform: scale(1.05);
}

.blog-icon {
  font-size: 4rem;
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
}

.blog-badge {
  position: absolute;
  top: 1rem;
  right: 1rem;
  background: rgba(255, 255, 255, 0.95);
  color: #333;
  padding: 0.5rem 1rem;
  border-radius: 20px;
  font-size: 0.85rem;
  font-weight: 600;
  z-index: 1;
}

.featured-badge {
  background: linear-gradient(135deg, #333333 0%, #000000 100%);
  color: white;
}

.coming-soon-badge {
  background: #6c757d;
  color: white;
}

/* Blog Grid */
.blog-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(350px, 100%), 1fr));
  gap: 2rem;
  margin-bottom: 4rem;
}

.blog-post {
  background: var(--card-bg);
  border-radius: 20px;
  overflow: hidden;
  box-shadow: 0 5px 20px rgba(0, 0, 0, 0.08);
  transition: all 0.3s ease;
  animation: fadeInUp 0.8s ease-out;
  display: flex;
  flex-direction: column;
}

.blog-grid .blog-post:nth-child(1) { animation-delay: 0.3s; }
.blog-grid .blog-post:nth-child(2) { animation-delay: 0.4s; }
.blog-grid .blog-post:nth-child(3) { animation-delay: 0.5s; }
.blog-grid .blog-post:nth-child(4) { animation-delay: 0.6s; }
.blog-grid .blog-post:nth-child(5) { animation-delay: 0.7s; }

.blog-post:hover {
  transform: translateY(-8px);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.12);
}

.blog-grid .blog-post-image {
  height: 200px;
}

.blog-post-content {
  padding: 1.5rem;
  flex: 1;
  display: flex;
  flex-direction: column;
}

.featured-post .blog-post-content {
  padding: 0;
}

.blog-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  margin-bottom: 1rem;
  font-size: 0.85rem;
  color: var(--text-secondary);
}

.blog-date,
.blog-reading-time,
.blog-category {
  display: flex;
  align-items: center;
  gap: 0.3rem;
}

.blog-category {
  color: var(--primary-color);
  font-weight: 600;
}

.blog-post-title {
  margin-bottom: 1rem;
  line-height: 1.4;
}

.blog-post-title a {
  color: var(--text-primary);
  text-decoration: none;
  transition: color 0.3s ease;
}

.blog-post-title a:hover {
  color: var(--primary-color);
}

.featured-post .blog-post-title {
  font-size: 2rem;
  margin-bottom: 1.5rem;
}

.blog-grid .blog-post-title {
  font-size: 1.3rem;
}

.blog-post-excerpt {
  color: var(--text-secondary);
  line-height: 1.8;
  margin-bottom: 1.5rem;
  flex: 1;
}

.featured-post .blog-post-excerpt {
  font-size: 1.05rem;
}

.blog-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 1.5rem;
}

.blog-tag {
  background: var(--primary-light);
  color: var(--primary-color);
  padding: 0.4rem 0.8rem;
  border-radius: 15px;
  font-size: 0.8rem;
  font-weight: 500;
  transition: all 0.3s ease;
}

.blog-tag:hover {
  background: var(--primary-color);
  color: white;
  transform: scale(1.05);
}

.blog-read-more {
  color: var(--primary-color);
  text-decoration: none;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  transition: all 0.3s ease;
}

.blog-read-more:hover {
  gap: 1rem;
}

.blog-read-more .arrow {
  transition: transform 0.3s ease;
}

.blog-read-more:hover .arrow {
  transform: translateX(5px);
}

/* Newsletter Section */
.blog-newsletter {
  background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
  border-radius: 20px;
  padding: 3rem;
  text-align: center;
  color: white;
  animation: fadeInUp 0.8s ease-out 0.8s both;
}

.newsletter-title {
  font-size: 2rem;
  margin-bottom: 1rem;
  color: white;
}

.newsletter-description {
  font-size: 1.1rem;
  margin-bottom: 2rem;
  opacity: 0.9;
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
}

.newsletter-note {
  font-size: 1.1rem;
  margin: 0;
}

.newsletter-note a {
  color: white;
  text-decoration: underline;
  font-weight: 600;
  transition: opacity 0.3s ease;
}

.newsletter-note a:hover {
  opacity: 0.8;
}

/* Animation */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}


/* ===== ABOUT SECTION ON HOMEPAGE ===== */
#about-home {
  padding: 8rem 2rem;
  background: var(--bg-secondary);
  position: relative;
  overflow: hidden;
}

#about-home::before {
  content: '';
  position: absolute;
  top: -50%;
  right: -10%;
  width: 500px;
  height: 500px;
  background: radial-gradient(circle, rgba(102, 126, 234, 0.1) 0%, transparent 70%);
  border-radius: 50%;
  animation: float 20s ease-in-out infinite;
}

#about-home::after {
  content: '';
  position: absolute;
  bottom: -30%;
  left: -10%;
  width: 400px;
  height: 400px;
  background: radial-gradient(circle, rgba(118, 75, 162, 0.1) 0%, transparent 70%);
  border-radius: 50%;
  animation: float 25s ease-in-out infinite reverse;
}

@keyframes float {
  0%, 100% {
    transform: translateY(0) translateX(0);
  }
  50% {
    transform: translateY(-30px) translateX(30px);
  }
}

#about-home .section__text__p1 {
  text-align: center;
  font-size: 1rem;
  font-weight: 600;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 2px;
  margin-bottom: 0.5rem;
}

#about-home .title {
  text-align: center;
  font-size: 3rem;
  margin-bottom: 4rem;
  background: var(--accent-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.about-home-container {
  max-width: 1200px;
  margin: 0 auto;
  position: relative;
  z-index: 1;
}

.about-info-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(280px, 100%), 1fr));
  gap: 2rem;
  margin-bottom: 4rem;
}

.info-card {
  background: var(--card-bg);
  padding: 2.5rem 2rem;
  border-radius: 20px;
  text-align: center;
  box-shadow: var(--shadow-md);
  border: 1px solid var(--border-color);
  position: relative;
  overflow: hidden;
  opacity: 0;
  transform: translateY(30px);
  transition: all 0.6s ease-out, opacity 0.6s ease-out, transform 0.6s ease-out;
}

.info-card.visible {
  opacity: 1;
  transform: translateY(0);
}

.info-card:nth-child(1).visible {
  transition-delay: 0.1s;
}

.info-card:nth-child(2).visible {
  transition-delay: 0.2s;
}

.info-card:nth-child(3).visible {
  transition-delay: 0.3s;
}

.info-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 4px;
  background: var(--accent-gradient);
  transform: scaleX(0);
  transition: transform 0.5s ease;
}

.info-card:hover::before {
  transform: scaleX(1);
}

.info-card:hover {
  transform: translateY(-12px) scale(1.02);
  box-shadow: 0 20px 40px -10px rgba(102, 126, 234, 0.3);
  border-color: var(--accent-primary);
}

.info-card:hover .info-icon {
  /* Icons stay fixed in position on hover */
}

.info-icon {
  font-size: 3.5rem;
  margin-bottom: 1rem;
  transition: transform 0.3s ease;
}

.info-card h3 {
  font-size: 1.5rem;
  margin-bottom: 1rem;
  color: var(--text-primary);
  font-weight: 600;
}

.info-detail {
  font-size: 1.1rem;
  color: var(--text-primary);
  font-weight: 600;
  margin-bottom: 0.5rem;
}

.info-sub {
  font-size: 0.95rem;
  color: var(--text-secondary);
}

.about-details {
  background: var(--card-bg);
  padding: 3rem;
  border-radius: 20px;
  box-shadow: var(--shadow-md);
  border: 1px solid var(--border-color);
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.6s ease-out 0.4s, transform 0.6s ease-out 0.4s;
}

.about-details.visible {
  opacity: 1;
  transform: translateY(0);
}

.about-subtitle {
  font-size: 1.8rem;
  margin-bottom: 1.5rem;
  background: var(--accent-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  font-weight: 700;
}

.about-text p {
  font-size: 1.1rem;
  line-height: 1.8;
  color: var(--text-secondary);
  margin-bottom: 1.5rem;
}

.skills-highlight {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  margin: 2rem 0;
  padding: 2rem 0;
  border-top: 1px solid var(--border-color);
  border-bottom: 1px solid var(--border-color);
}

.skill-tag {
  background: var(--bg-secondary);
  color: var(--text-primary);
  padding: 0.6rem 1.2rem;
  border-radius: 25px;
  font-size: 0.95rem;
  font-weight: 500;
  border: 1px solid var(--border-color);
  transition: all 0.3s ease;
  cursor: default;
  opacity: 0;
  transform: scale(0.8);
}

.skill-tag.visible {
  opacity: 1;
  transform: scale(1);
}

.skill-tag:nth-child(1).visible { transition-delay: 0.5s; }
.skill-tag:nth-child(2).visible { transition-delay: 0.55s; }
.skill-tag:nth-child(3).visible { transition-delay: 0.6s; }
.skill-tag:nth-child(4).visible { transition-delay: 0.65s; }
.skill-tag:nth-child(5).visible { transition-delay: 0.7s; }
.skill-tag:nth-child(6).visible { transition-delay: 0.75s; }
.skill-tag:nth-child(7).visible { transition-delay: 0.8s; }
.skill-tag:nth-child(8).visible { transition-delay: 0.85s; }

@keyframes popIn {
  to {
    opacity: 1;
    transform: scale(1);
  }
}

.skill-tag:hover {
  background: var(--accent-gradient);
  color: white;
  border-color: transparent;
  transform: scale(1.1) translateY(-5px);
  box-shadow: 0 10px 25px -5px rgba(102, 126, 234, 0.4);
}

@media (prefers-reduced-motion: no-preference) {
  .skill-tag:hover {
    transform: scale(1.1) translateY(-5px) rotate(2deg);
  }
}

.about-cta {
  margin-top: 2rem;
  text-align: center;
}

.about-cta .btn {
  padding: 1rem 2.5rem;
  font-size: 1.1rem;
}


/* ===== TOOLS & TECHNOLOGIES SECTION ===== */
#tools {
  padding: 5rem 2rem;
  background: var(--bg-secondary);
  min-height: auto;
}

#tools .section__text__p1 {
  text-align: center;
  font-size: 1rem;
  color: var(--text-secondary);
  margin-bottom: 0.5rem;
  text-transform: uppercase;
  letter-spacing: 2px;
}

#tools .title {
  text-align: center;
  font-size: 2.5rem;
  margin-bottom: 3rem;
  background: var(--accent-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.tools-container {
  max-width: 1200px;
  margin: 0 auto;
}

.tools-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(150px, 100%), 1fr));
  gap: 2rem;
  padding: 2rem 0;
}

.tool-card {
  background: var(--card-bg);
  padding: 2rem 1.5rem;
  border-radius: 15px;
  text-align: center;
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  border: 1px solid var(--border-color);
  box-shadow: var(--shadow-sm);
  cursor: default;
}

.tool-card:hover {
  transform: translateY(-10px);
  box-shadow: var(--shadow-xl);
  border-color: var(--accent-primary);
  background: var(--card-hover-bg);
}

.tool-icon {
  font-size: 3.5rem;
  margin-bottom: 1rem;
  background: var(--accent-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  transition: transform 0.4s ease;
}

.tool-card:hover .tool-icon {
  /* Icons stay fixed in position on hover */
}

.tool-card h3 {
  font-size: 1.2rem;
  margin-bottom: 0.5rem;
  color: var(--text-primary);
  font-weight: 600;
}

.tool-card p {
  font-size: 0.9rem;
  color: var(--text-secondary);
  font-weight: 400;
}

/* Responsive Design for Tools */
@media screen and (max-width: 768px) {
  .tools-grid {
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 1.5rem;
  }
  
  .tool-card {
    padding: 1.5rem 1rem;
  }
  
  .tool-icon {
    font-size: 2.5rem;
  }
  
  .tool-card h3 {
    font-size: 1rem;
  }
  
  .tool-card p {
    font-size: 0.8rem;
  }
}

@media screen and (max-width: 480px) {
  .tools-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
  }
}

/* Bootstrap Icons Styles for Theme Toggle */
.theme-icon {
  font-size: 1.2rem;
  transition: transform 0.4s ease, opacity 0.3s ease;
}

.theme-btn:hover .theme-icon {
  transform: rotate(25deg) scale(1.15);
}

.theme-btn.rotating .theme-icon {
  transform: rotate(360deg);
  opacity: 0.7;
}

/* ===== TOOLS PAGE SPECIFIC STYLES ===== */
#tools-header {
  padding: 8rem 2rem 4rem;
  background: var(--bg-secondary);
  text-align: center;
}

#tools-header .header-content {
  max-width: 800px;
  margin: 0 auto;
}

#tools-header .section__text__p1 {
  font-size: 1rem;
  color: var(--text-secondary);
  margin-bottom: 0.5rem;
  text-transform: uppercase;
  letter-spacing: 2px;
}

#tools-header .title {
  font-size: 3rem;
  margin-bottom: 1.5rem;
  background: var(--accent-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.tools-intro {
  font-size: 1.1rem;
  color: var(--text-secondary);
  line-height: 1.8;
}

#tools-main {
  padding: 4rem 2rem;
  background: var(--bg-primary);
  min-height: 60vh;
}

/* Keyboard-like Layout for Desktop */
.tools-keyboard-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.5rem;
  max-width: 1200px;
  margin: 0 auto;
}

/* Staggered rows to create keyboard effect */
.tools-keyboard-grid .tool-card:nth-child(5),
.tools-keyboard-grid .tool-card:nth-child(6),
.tools-keyboard-grid .tool-card:nth-child(7),
.tools-keyboard-grid .tool-card:nth-child(8) {
  margin-left: 4%;
}

.tools-keyboard-grid .tool-card:nth-child(9),
.tools-keyboard-grid .tool-card:nth-child(10),
.tools-keyboard-grid .tool-card:nth-child(11),
.tools-keyboard-grid .tool-card:nth-child(12) {
  margin-left: 8%;
}

/* Tablet View */
@media screen and (max-width: 1024px) {
  .tools-keyboard-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
  }
  
  /* Reset stagger for tablet */
  .tools-keyboard-grid .tool-card:nth-child(5),
  .tools-keyboard-grid .tool-card:nth-child(6),
  .tools-keyboard-grid .tool-card:nth-child(7),
  .tools-keyboard-grid .tool-card:nth-child(8) {
    margin-left: 0;
  }
  
  .tools-keyboard-grid .tool-card:nth-child(9),
  .tools-keyboard-grid .tool-card:nth-child(10),
  .tools-keyboard-grid .tool-card:nth-child(11),
  .tools-keyboard-grid .tool-card:nth-child(12) {
    margin-left: 0;
  }
  
  /* Stagger for 3-column layout */
  .tools-keyboard-grid .tool-card:nth-child(4),
  .tools-keyboard-grid .tool-card:nth-child(5),
  .tools-keyboard-grid .tool-card:nth-child(6) {
    margin-left: 3%;
  }
  
  .tools-keyboard-grid .tool-card:nth-child(7),
  .tools-keyboard-grid .tool-card:nth-child(8),
  .tools-keyboard-grid .tool-card:nth-child(9) {
    margin-left: 6%;
  }
}

/* Mobile View */
@media screen and (max-width: 768px) {
  #tools-header {
    padding: 6rem 1.5rem 3rem;
  }
  
  #tools-header .title {
    font-size: 2rem;
  }
  
  .tools-intro {
    font-size: 1rem;
  }
  
  #tools-main {
    padding: 3rem 1.5rem;
  }
  
  .tools-keyboard-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 1.25rem;
  }
  
  /* Reset all stagger for mobile */
  .tools-keyboard-grid .tool-card:nth-child(n) {
    margin-left: 0;
  }
}

@media screen and (max-width: 480px) {
  .tools-keyboard-grid {
    gap: 1rem;
  }
  
  .tool-card {
    padding: 1.5rem 1rem;
  }
  
  .tool-icon {
    font-size: 2.5rem;
  }
  
  .tool-card h3 {
    font-size: 0.95rem;
  }
  
  .tool-card p {
    font-size: 0.75rem;
  }
}

/* ===== ABOUT PAGE DEDICATED SECTIONS ===== */

/* About page section spacing */
#about-header {
  min-height: auto;
  padding-top: 5rem;
  padding-bottom: 3rem;
  text-align: center;
  background: var(--bg-secondary);
}

.header-content .about-intro {
  max-width: 680px;
  margin: 0 auto;
  color: var(--text-secondary);
  font-size: 1.1rem;
  line-height: 1.8;
}

/* About overview section */
#about {
  padding: 5rem 5%;
  background: var(--bg-primary);
}

.about-overview-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(220px, 100%), 1fr));
  gap: 1.8rem;
  max-width: 1100px;
  margin: 0 auto 3.5rem;
}

.about-bio-card {
  max-width: 860px;
  margin: 0 auto;
}

/* Research section */
#about-research {
  background: var(--bg-secondary);
  padding: 5rem 5%;
}

.about-research-highlights {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(320px, 100%), 1fr));
  gap: 2rem;
  max-width: 1100px;
  margin: 0 auto 3rem;
}

.about-highlight-card {
  background: var(--card-bg);
  padding: 2rem;
  border-radius: 16px;
  border: 2px solid var(--border-color);
  box-shadow: var(--shadow-sm);
  transition: all 0.3s ease;
}

.about-highlight-card:hover {
  box-shadow: var(--shadow-lg);
  border-color: var(--accent-primary);
}

.about-highlight-icon {
  font-size: 2rem;
  color: var(--accent-primary);
  margin-bottom: 1rem;
}

.about-highlight-card h3 {
  color: var(--text-primary);
  font-size: 1.1rem;
  font-weight: 600;
  margin-bottom: 0.8rem;
}

.about-highlight-card p {
  color: var(--text-secondary);
  line-height: 1.7;
  font-size: 0.95rem;
}

.about-highlight-card ul {
  list-style: none;
  padding: 0;
  margin: 0.8rem 0 0;
}

.about-highlight-card ul li {
  color: var(--text-secondary);
  font-size: 0.9rem;
  padding: 0.3rem 0 0.3rem 1.2rem;
  position: relative;
}

.about-highlight-card ul li::before {
  content: '→';
  position: absolute;
  left: 0;
  color: var(--accent-primary);
  font-weight: bold;
}

.about-publications {
  max-width: 1100px;
  margin: 0 auto;
}

.about-publications h3 {
  color: var(--text-primary);
  font-size: 1.4rem;
  font-weight: 600;
  margin-bottom: 1.5rem;
  text-align: center;
}

/* Academics section */
#about-academics {
  padding: 5rem 5%;
  background: var(--bg-primary);
}

.about-edu-info {
  max-width: 700px;
  margin: 0 auto 3rem;
  background: var(--card-bg);
  border: 2px solid var(--border-color);
  border-left: 4px solid var(--accent-primary);
  border-radius: 12px;
  padding: 2rem 2.5rem;
  text-align: center;
}

.about-edu-info h3 {
  color: var(--text-primary);
  font-size: 1.4rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
}

.about-edu-info p {
  color: var(--text-secondary);
  font-size: 1rem;
  line-height: 1.8;
}

.about-edu-info .gpa-badge {
  display: inline-block;
  margin-top: 0.8rem;
  background: var(--accent-gradient);
  color: white;
  padding: 0.4rem 1.2rem;
  border-radius: 20px;
  font-size: 0.95rem;
  font-weight: 600;
}

.about-honors-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(260px, 100%), 1fr));
  gap: 1.5rem;
  max-width: 1100px;
  margin: 0 auto;
}

.about-honor-card {
  background: var(--card-bg);
  border: 1px solid var(--border-color);
  border-radius: 14px;
  padding: 1.5rem;
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  transition: all 0.3s ease;
  box-shadow: var(--shadow-sm);
}

.about-honor-card:hover {
  box-shadow: var(--shadow-md);
  border-color: var(--accent-primary);
}

.about-honor-card .honor-icon {
  font-size: 1.6rem;
  color: #c9a96e;
  flex-shrink: 0;
  margin-top: 0.1rem;
}

.about-honor-card .honor-body h4 {
  color: var(--text-primary);
  font-size: 0.95rem;
  font-weight: 600;
  margin-bottom: 0.3rem;
  line-height: 1.4;
}

.about-honor-card .honor-body p {
  color: var(--text-tertiary);
  font-size: 0.85rem;
}

/* Leadership section */
#about-leadership {
  padding: 5rem 5%;
  background: var(--bg-secondary);
}

.yoongwin-split-layout {
  max-width: 1100px;
  margin: 0 auto 1.8rem;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(320px, 460px);
  gap: 1.5rem;
  align-items: stretch;
}

.yoongwin-role-card {
  height: 100%;
}

.yoongwin-video-card {
  background: var(--card-bg);
  border: 2px solid var(--border-color);
  border-radius: 16px;
  padding: 1rem;
  box-shadow: var(--shadow-sm);
  display: flex;
  align-items: center;
}

.yoongwin-internship-video {
  width: 100%;
  height: 100%;
  max-height: 360px;
  border-radius: 12px;
  background: #000;
  object-fit: cover;
}

#about-internship-impact {
  padding: 5rem 5%;
  background: var(--bg-primary);
}

.internship-impact-grid {
  max-width: 1100px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(280px, 100%), 1fr));
  gap: 1.4rem;
}

.internship-impact-card {
  background: var(--card-bg);
  border: 1px solid var(--border-color);
  border-radius: 14px;
  padding: 1.5rem;
  box-shadow: var(--shadow-sm);
}

.internship-impact-card h3 {
  color: var(--text-primary);
  margin-bottom: 0.7rem;
  font-size: 1.1rem;
}

.internship-impact-card ul {
  padding-left: 1.1rem;
}

.internship-impact-card li {
  color: var(--text-secondary);
  margin-bottom: 0.45rem;
  line-height: 1.7;
}

#about-now-next {
  padding: 5rem 5%;
  background: var(--bg-secondary);
}

.now-next-grid {
  max-width: 1100px;
  margin: 0 auto 1.8rem;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(320px, 100%), 1fr));
  gap: 1.4rem;
}

.now-next-card,
.social-proof-card {
  background: var(--card-bg);
  border: 1px solid var(--border-color);
  border-radius: 14px;
  padding: 1.4rem;
  box-shadow: var(--shadow-sm);
}

.now-next-card h3,
.social-proof-card h3 {
  color: var(--text-primary);
  margin-bottom: 0.65rem;
}

.now-next-card ul {
  padding-left: 1.1rem;
}

.now-next-card li,
.social-proof-card p {
  color: var(--text-secondary);
  margin-bottom: 0.4rem;
  line-height: 1.7;
}

.social-proof-grid {
  max-width: 1100px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(280px, 100%), 1fr));
  gap: 1.4rem;
}

.about-leadership-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(300px, 100%), 1fr));
  gap: 2rem;
  max-width: 1100px;
  margin: 0 auto;
}

.about-role-card {
  background: var(--card-bg);
  border: 2px solid var(--border-color);
  border-radius: 16px;
  padding: 2rem;
  transition: all 0.3s ease;
  box-shadow: var(--shadow-sm);
  position: relative;
  overflow: hidden;
}

.about-role-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 3px;
  background: var(--accent-gradient);
  transform: scaleX(0);
  transition: transform 0.4s ease;
}

.about-role-card:hover::before {
  transform: scaleX(1);
}

.about-role-card:hover {
  box-shadow: var(--shadow-lg);
  border-color: var(--accent-primary);
}

.about-role-card .role-title {
  color: var(--accent-primary);
  font-size: 1rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 0.4rem;
}

.about-role-card h3 {
  color: var(--text-primary);
  font-size: 1.1rem;
  font-weight: 600;
  margin-bottom: 0.3rem;
}

.about-role-card .role-period {
  display: inline-block;
  background: var(--bg-secondary);
  color: var(--text-tertiary);
  font-size: 0.8rem;
  padding: 0.2rem 0.8rem;
  border-radius: 12px;
  margin-bottom: 0.8rem;
}

.about-role-card p {
  color: var(--text-secondary);
  font-size: 0.9rem;
  line-height: 1.6;
}

/* Skills section */
#about-skills-section {
  padding: 5rem 5%;
  background: var(--bg-primary);
}

.about-skills-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(300px, 100%), 1fr));
  gap: 2rem;
  max-width: 1100px;
  margin: 0 auto 3rem;
}

.about-skill-category {
  background: var(--card-bg);
  border: 1px solid var(--border-color);
  border-radius: 16px;
  padding: 2rem;
  box-shadow: var(--shadow-sm);
  transition: all 0.3s ease;
}

.about-skill-category:hover {
  box-shadow: var(--shadow-md);
  border-color: var(--accent-primary);
}

.about-skill-category h3 {
  color: var(--text-primary);
  font-size: 1rem;
  font-weight: 700;
  margin-bottom: 1.2rem;
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

.about-skill-category h3 i {
  color: var(--accent-primary);
  font-size: 1.1rem;
}

.about-languages-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(180px, 100%), 1fr));
  gap: 1.2rem;
  max-width: 860px;
  margin: 0 auto;
}

.about-lang-item {
  background: var(--card-bg);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  padding: 1.2rem 1.5rem;
  text-align: center;
  transition: all 0.3s ease;
  box-shadow: var(--shadow-sm);
}

.about-lang-item:hover {
  border-color: var(--accent-primary);
  box-shadow: var(--shadow-md);
}

.about-lang-item strong {
  display: block;
  color: var(--text-primary);
  font-weight: 600;
  font-size: 1rem;
  margin-bottom: 0.3rem;
}

.about-lang-item span {
  color: var(--text-tertiary);
  font-size: 0.85rem;
}

/* Connect section */
#about-connect {
  padding: 5rem 5%;
  background: var(--bg-secondary);
  text-align: center;
}

.about-connect-intro {
  max-width: 600px;
  margin: 0 auto 3rem;
  color: var(--text-secondary);
  font-size: 1.05rem;
  line-height: 1.8;
}

.about-connect-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(220px, 100%), 1fr));
  gap: 1.5rem;
  max-width: 1100px;
  margin: 0 auto 2.5rem;
}

/* WeChat section within connect */
.wechat-qr-section {
  max-width: 190px;
  margin: 0 auto 3rem;
  background: var(--card-bg);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  padding: 0.5rem;
  text-align: center;
  box-shadow: var(--shadow-sm);
  transition: all 0.3s ease;
  scroll-margin-top: 7rem;
}

.wechat-qr-section:hover {
  box-shadow: 0 12px 35px -8px rgba(7,193,96,0.35);
}

.wechat-qr-section .wechat-header {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
  margin-bottom: 1rem;
}

.wechat-qr-section .wechat-header i {
  font-size: 1.6rem;
  color: #07c160;
}

.wechat-qr-section h4 {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--text-primary);
  margin: 0;
}

.wechat-qr-section .wechat-badge {
  display: inline-block;
  background: rgba(7,193,96,0.12);
  color: #07c160;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.8px;
  text-transform: uppercase;
  padding: 0.2rem 0.7rem;
  border-radius: 20px;
  margin-bottom: 1rem;
}

.wechat-qr-section .wechat-qr-img {
  width: 150px;
  height: 150px;
  object-fit: contain;
  border-radius: 10px;
  border: 4px solid var(--qr-frame-bg);
  outline: 1px solid rgba(var(--wechat-green-rgb), 0.4);
  box-shadow: 0 12px 26px -16px rgba(var(--wechat-green-rgb), 0.7);
  display: block;
  margin: 0 auto;
  background: var(--qr-frame-bg);
}

.wechat-qr-section p {
  font-size: 0.88rem;
  color: var(--text-secondary);
  margin: 0;
  line-height: 1.6;
}

.wechat-qr-fallback {
  display: none;
  padding: 2rem 0;
  color: var(--text-tertiary);
  font-size: 0.85rem;
}

.wechat-qr-fallback i {
  font-size: 3rem;
  display: block;
  margin-bottom: 0.5rem;
}

.about-connect-card {
  background: var(--card-bg);
  border: 2px solid var(--border-color);
  border-radius: 14px;
  padding: 1.8rem;
  display: flex;
  align-items: center;
  gap: 1.2rem;
  text-decoration: none;
  color: var(--text-primary);
  transition: all 0.3s ease;
  box-shadow: var(--shadow-sm);
}

.about-connect-card:hover {
  box-shadow: var(--shadow-lg);
  border-color: var(--accent-primary);
  color: var(--accent-primary);
}

.about-connect-card i {
  font-size: 1.8rem;
  color: var(--accent-primary);
  flex-shrink: 0;
}

.about-connect-card .connect-info strong {
  display: block;
  font-size: 0.85rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--text-tertiary);
  margin-bottom: 0.2rem;
}

.about-connect-card .connect-info {
  min-width: 0;
  text-align: left;
}

.about-connect-card .connect-info span {
  font-size: 0.95rem;
  font-weight: 500;
  overflow-wrap: break-word;
}

.about-connect-card .connect-info .about-email-address {
  font-size: clamp(0.8rem, 2.7vw, 0.95rem);
  white-space: nowrap;
}

.about-connect-card .connect-info strong {
  overflow-wrap: break-word;
}

/* Back to home section */
#back-to-home {
  padding: 2rem 5%;
  text-align: center;
  background: var(--bg-primary);
  min-height: auto;
}

/* ===== HOVER TRANSFORMS (only on devices that support hover) ===== */
@media (hover: hover) {
  .about-highlight-card:hover { transform: translateY(-5px); }
  .about-honor-card:hover     { transform: translateY(-4px); }
  .about-role-card:hover      { transform: translateY(-6px); }
  .about-skill-category:hover { transform: translateY(-4px); }
  .about-lang-item:hover      { transform: translateY(-3px); }
  .wechat-qr-section:hover    { transform: translateY(-4px); }
  .about-connect-card:hover   { transform: translateY(-5px); }
}

/* ===== BACK TO TOP BUTTON ===== */
#back-to-top-btn {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  width: 3rem;
  height: 3rem;
  border-radius: 50%;
  background: var(--accent-primary);
  color: #fff;
  border: none;
  cursor: pointer;
  font-size: 1.6rem;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 16px rgba(0,0,0,0.25);
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.3s ease, transform 0.3s ease, background 0.2s ease;
  pointer-events: none;
  z-index: 999;
}

#back-to-top-btn.visible {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

@media (hover: hover) {
  #back-to-top-btn:hover {
    background: var(--accent-secondary);
    transform: translateY(-3px);
  }
}

/* ===== BLOG NEWSLETTER MEDIUM ICON & CTA ===== */
.newsletter-medium-icon {
  margin-right: 0.4rem;
}

.blog-medium-cta {
  display: inline-block;
  text-decoration: none;
}

/* ===== AI WRITING ASSISTANT — Modern Unified Tool ===== */
#utility-tools {
  padding: 5rem 8%;
  background: var(--bg-primary);
  position: relative;
  overflow: hidden;
}

#utility-tools::before {
  content: '';
  position: absolute;
  top: -180px;
  right: -180px;
  width: 460px;
  height: 460px;
  background: radial-gradient(circle, rgba(var(--accent-rgb), 0.06) 0%, transparent 70%);
  pointer-events: none;
}

#utility-tools::after {
  content: '';
  position: absolute;
  bottom: -120px;
  left: -120px;
  width: 320px;
  height: 320px;
  background: radial-gradient(circle, rgba(var(--accent-rgb), 0.04) 0%, transparent 70%);
  pointer-events: none;
}

.awt-wrapper {
  max-width: 960px;
  margin: 0 auto;
  position: relative;
  z-index: 1;
}

.awt-section-intro {
  text-align: center;
  margin-bottom: 3rem;
}

.awt-intro-text {
  color: var(--text-secondary);
  font-size: 1rem;
  max-width: 520px;
  margin: 0.6rem auto 0;
  line-height: 1.7;
}

/* ── Main Card ───────────────────────────────────────────────────────────── */
.awt-card {
  background: var(--card-bg);
  border-radius: 24px;
  border: 1px solid var(--border-color);
  box-shadow: var(--shadow-xl);
  overflow: hidden;
  position: relative;
}

.awt-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: var(--accent-gradient);
  z-index: 1;
}

/* ── Card Header ─────────────────────────────────────────────────────────── */
.awt-card-header {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1.4rem 2rem;
  background: var(--bg-secondary);
  border-bottom: 1px solid var(--border-color);
}

.awt-card-header-icon {
  width: 46px;
  height: 46px;
  border-radius: 12px;
  background: var(--accent-gradient);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.3rem;
  color: #fff;
  flex-shrink: 0;
}

.awt-card-header-text {
  flex: 1;
}

.awt-card-header-text h3 {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--text-primary);
  margin: 0 0 0.2rem;
}

.awt-card-header-text p {
  font-size: 0.85rem;
  color: var(--text-secondary);
  margin: 0;
}

.awt-ai-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  background: rgba(var(--accent-rgb), 0.1);
  border: 1px solid rgba(var(--accent-rgb), 0.25);
  color: var(--accent-primary);
  font-size: 0.75rem;
  font-weight: 700;
  padding: 0.3rem 0.75rem;
  border-radius: 999px;
  white-space: nowrap;
  letter-spacing: 0.4px;
  text-transform: uppercase;
}

.awt-ai-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--accent-primary);
  box-shadow: 0 0 0 0 rgba(var(--accent-rgb), 0.6);
  animation: awt-pulse 2s ease-in-out infinite;
  flex-shrink: 0;
}

@keyframes awt-pulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(var(--accent-rgb), 0.5); }
  50%       { box-shadow: 0 0 0 5px rgba(var(--accent-rgb), 0); }
}

/* ── Stats Strip ─────────────────────────────────────────────────────────── */
.awt-stats-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  padding: 1.25rem 2rem;
  background: var(--bg-secondary);
  border-bottom: 1px solid var(--border-color);
}

.awt-stat-chip {
  display: flex;
  flex-direction: column;
  align-items: center;
  background: var(--card-bg);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  padding: 0.6rem 1rem;
  min-width: 80px;
  flex: 1;
  transition: border-color 0.25s ease, box-shadow 0.25s ease;
}

.awt-stat-chip:hover {
  border-color: rgba(var(--accent-rgb), 0.35);
}

.awt-stat-chip--accent {
  background: rgba(var(--accent-rgb), 0.06);
  border-color: rgba(var(--accent-rgb), 0.2);
}

.awt-stat-chip-val {
  font-size: 1.45rem;
  font-weight: 800;
  color: var(--accent-primary);
  line-height: 1.1;
  transition: transform 0.15s ease;
}

.awt-stat-pulse {
  animation: awt-stat-pop 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes awt-stat-pop {
  0%   { transform: scale(1); }
  50%  { transform: scale(1.18); }
  100% { transform: scale(1); }
}

.awt-stat-chip-lbl {
  font-size: 0.68rem;
  color: var(--text-tertiary);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-top: 0.25rem;
  text-align: center;
  white-space: nowrap;
}

/* ── Editor Area ─────────────────────────────────────────────────────────── */
.awt-editor-area {
  padding: 1.5rem 2rem 0;
}

.awt-textarea {
  width: 100%;
  min-height: 190px;
  padding: 1.1rem 1.25rem;
  border: 1.5px solid var(--border-color);
  border-radius: 14px;
  background: var(--bg-primary);
  color: var(--text-primary);
  font-family: 'Inter', 'Poppins', sans-serif;
  font-size: 0.96rem;
  line-height: 1.75;
  resize: vertical;
  outline: none;
  transition: border-color 0.25s ease, box-shadow 0.25s ease;
  box-sizing: border-box;
}

.awt-textarea:focus {
  border-color: var(--accent-primary);
  box-shadow: 0 0 0 4px rgba(var(--accent-rgb), 0.12);
}

.awt-editor-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.5rem 0.25rem 0;
  margin-bottom: 0.25rem;
}

.awt-char-live {
  font-size: 0.8rem;
  color: var(--text-tertiary);
}

.awt-editor-hint {
  font-size: 0.78rem;
  color: var(--text-tertiary);
  display: flex;
  align-items: center;
  gap: 0.3rem;
}

/* ── Action Bar ──────────────────────────────────────────────────────────── */
.awt-action-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 1.25rem 2rem 1.5rem;
  flex-wrap: wrap;
}

.awt-action-left {
  display: flex;
  gap: 0.6rem;
}

.awt-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.6rem 1.25rem;
  border-radius: 10px;
  font-size: 0.88rem;
  font-weight: 600;
  cursor: pointer;
  border: none;
  transition: all 0.25s ease;
  font-family: inherit;
  white-space: nowrap;
}

.awt-btn-ghost {
  background: var(--bg-secondary);
  color: var(--text-secondary);
  border: 1px solid var(--border-color);
}

.awt-btn-ghost:hover {
  background: var(--bg-tertiary);
  color: var(--text-primary);
  transform: translateY(-2px);
}

.awt-btn-ai {
  background: var(--accent-gradient);
  color: #fff;
  box-shadow: 0 4px 14px rgba(var(--accent-rgb), 0.35);
  gap: 0.5rem;
  padding: 0.65rem 1.5rem;
  font-size: 0.93rem;
}

.awt-btn-ai:hover:not(:disabled) {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(var(--accent-rgb), 0.45);
}

.awt-btn-ai:disabled {
  opacity: 0.55;
  cursor: not-allowed;
  transform: none;
}

.awt-btn-arrow {
  font-size: 1rem;
  transition: transform 0.2s ease;
}

.awt-btn-ai:hover:not(:disabled) .awt-btn-arrow {
  transform: translateX(4px);
}

.awt-btn-copied {
  background: #059669 !important;
  box-shadow: none;
}

/* ── Grammar Panel ───────────────────────────────────────────────────────── */
.awt-grammar-panel {
  border-top: 1px solid var(--border-color);
  padding: 0 2rem 1.5rem;
}

.awt-grammar-panel:empty {
  padding: 0;
  border-top: none;
}

/* Loading state */
.awt-grammar-loading {
  display: flex;
  align-items: center;
  gap: 1.25rem;
  padding: 1.5rem 0;
}

.awt-grammar-spinner {
  position: relative;
  width: 44px;
  height: 44px;
  flex-shrink: 0;
}

.awt-spinner-ring {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  border: 3px solid var(--border-color);
  border-top-color: var(--accent-primary);
  animation: awt-spin 0.75s linear infinite;
}

@keyframes awt-spin { to { transform: rotate(360deg); } }

.awt-spinner-core {
  position: absolute;
  inset: 8px;
  border-radius: 50%;
  background: rgba(var(--accent-rgb), 0.1);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.85rem;
  color: var(--accent-primary);
}

.awt-loading-text {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
}

.awt-loading-text span:first-child {
  font-weight: 600;
  color: var(--text-primary);
  font-size: 0.95rem;
}

.awt-loading-sub {
  font-size: 0.82rem;
  color: var(--text-tertiary);
}

/* Results wrapper */
.awt-grammar-results {
  padding-top: 1.25rem;
}

/* All clear */
.awt-gr-allclear {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  background: rgba(16, 185, 129, 0.08);
  border: 1px solid rgba(16, 185, 129, 0.3);
  border-radius: 14px;
  padding: 1.1rem 1.4rem;
}

.awt-gr-allclear-icon {
  font-size: 1.6rem;
  color: #059669;
  flex-shrink: 0;
  line-height: 1;
  padding-top: 0.15rem;
}

.awt-gr-allclear strong {
  color: #059669;
  display: block;
  margin-bottom: 0.2rem;
  font-size: 1rem;
}

.awt-gr-allclear p {
  color: var(--text-secondary);
  font-size: 0.875rem;
  margin: 0;
}

/* Summary bar */
.awt-gr-summary {
  display: flex;
  align-items: center;
  gap: 1rem;
  background: rgba(var(--accent-rgb), 0.07);
  border: 1px solid rgba(var(--accent-rgb), 0.2);
  border-radius: 14px;
  padding: 1rem 1.4rem;
  margin-bottom: 1.25rem;
}

.awt-gr-summary-icon {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: var(--accent-gradient);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 1rem;
  flex-shrink: 0;
}

.awt-gr-summary strong {
  color: var(--text-primary);
  font-size: 0.95rem;
  display: block;
}

.awt-gr-summary span {
  font-size: 0.8rem;
  color: var(--text-tertiary);
}

/* Issue list */
.awt-gr-list {
  display: flex;
  flex-direction: column;
  gap: 0.9rem;
}

.awt-gr-item {
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: 14px;
  padding: 1rem 1.25rem;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.awt-gr-item:hover {
  border-color: rgba(var(--accent-rgb), 0.25);
  box-shadow: var(--shadow-sm);
}

.awt-gr-item-head {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  margin-bottom: 0.6rem;
  flex-wrap: wrap;
}

.awt-gr-num {
  background: var(--accent-gradient);
  color: #fff;
  font-size: 0.7rem;
  font-weight: 800;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.awt-gr-tag {
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.6px;
  padding: 0.18rem 0.55rem;
  border-radius: 999px;
  border: 1px solid currentColor;
  background: rgba(var(--accent-rgb), 0.08);
  color: var(--accent-primary);
}

.awt-gr-tag--misspelling { color: #dc2626; background: rgba(220,38,38,0.08); border-color: rgba(220,38,38,0.3); }
.awt-gr-tag--grammar     { color: #d97706; background: rgba(217,119,6,0.08); border-color: rgba(217,119,6,0.3); }
.awt-gr-tag--style       { color: #7c3aed; background: rgba(124,58,237,0.08); border-color: rgba(124,58,237,0.3); }
.awt-gr-tag--punctuation { color: #0284c7; background: rgba(2,132,199,0.08); border-color: rgba(2,132,199,0.3); }

.awt-gr-msg {
  font-size: 0.875rem;
  color: var(--text-primary);
  font-weight: 500;
  flex: 1;
  min-width: 0;
}

.awt-gr-context {
  font-size: 0.84rem;
  color: var(--text-secondary);
  font-style: italic;
  background: var(--bg-primary);
  border-radius: 8px;
  padding: 0.5rem 0.75rem;
  margin-bottom: 0.75rem;
  word-break: break-word;
}

.awt-gr-mark {
  background: rgba(234, 179, 8, 0.3);
  color: var(--text-primary);
  border-radius: 4px;
  padding: 0 3px;
  font-style: normal;
}

.awt-gr-suggestions {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.awt-gr-sug-label {
  font-size: 0.78rem;
  color: var(--text-tertiary);
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 0.35rem;
}

.awt-gr-sug-label i { color: var(--accent-primary); }

.awt-gr-sug-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}

.awt-gr-sug-chip {
  background: var(--card-bg);
  border: 1.5px solid rgba(var(--accent-rgb), 0.3);
  color: var(--accent-primary);
  border-radius: 8px;
  padding: 0.28rem 0.7rem;
  font-size: 0.83rem;
  font-weight: 600;
  cursor: pointer;
  font-family: inherit;
  transition: all 0.2s ease;
}

.awt-gr-sug-chip:hover {
  background: var(--accent-primary);
  color: #fff;
  border-color: var(--accent-primary);
  transform: translateY(-1px);
}

/* Notice messages */
.awt-gr-notice {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.9rem 1.2rem;
  border-radius: 12px;
  font-size: 0.9rem;
  font-weight: 500;
}

.awt-gr-notice--info {
  background: rgba(var(--accent-rgb), 0.07);
  border: 1px solid rgba(var(--accent-rgb), 0.2);
  color: var(--accent-primary);
}

.awt-gr-notice--error {
  background: rgba(220, 38, 38, 0.07);
  border: 1px solid rgba(220, 38, 38, 0.25);
  color: #dc2626;
}

/* ── Dark mode enhancements ──────────────────────────────────────────────── */
[data-theme="dark"] .awt-card {
  border-color: rgba(0, 212, 255, 0.18);
}

[data-theme="dark"] .awt-card:hover {
  border-color: rgba(0, 212, 255, 0.35);
}

[data-theme="dark"] .awt-textarea:focus {
  border-color: var(--accent-primary);
  box-shadow: 0 0 0 4px rgba(0, 212, 255, 0.14), 0 0 20px rgba(0, 212, 255, 0.08);
}

/* ── Responsive ──────────────────────────────────────────────────────────── */
@media screen and (max-width: 900px) {
  #utility-tools { padding: 4rem 5%; }
  .awt-stats-strip { padding: 1rem 1.5rem; }
  .awt-editor-area { padding: 1.25rem 1.5rem 0; }
  .awt-action-bar { padding: 1.1rem 1.5rem 1.4rem; }
  .awt-grammar-panel { padding: 0 1.5rem 1.4rem; }
  .awt-card-header { padding: 1.2rem 1.5rem; }
}

@media screen and (max-width: 640px) {
  .awt-stats-strip { gap: 0.4rem; }
  .awt-stat-chip { min-width: 70px; padding: 0.5rem 0.6rem; }
  .awt-stat-chip-val { font-size: 1.2rem; }
  .awt-action-bar { flex-direction: column; align-items: stretch; }
  .awt-action-left { justify-content: stretch; }
  .awt-btn { justify-content: center; flex: 1; }
  .awt-btn-ai { justify-content: center; }
  .awt-card-header { flex-wrap: wrap; }
  .awt-ai-badge { order: 3; }
  .awt-gr-item-head { gap: 0.4rem; }
}

@media screen and (max-width: 420px) {
  .awt-stat-chip-lbl { font-size: 0.62rem; letter-spacing: 0; }
}

/* ===== BUTTON RESET FOR HAMBURGER ICON ===== */
button.hamburger-icon {
  background: none;
  border: none;
  outline-offset: 4px;
}

/* ===== SHARE BUTTONS (Blog) ===== */
.blog-share {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-top: 0.75rem;
  flex-wrap: wrap;
}

.blog-share-label {
  font-size: 0.8rem;
  color: var(--text-tertiary);
  font-weight: 500;
}

.share-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2rem;
  height: 2rem;
  border-radius: 50%;
  font-size: 0.9rem;
  text-decoration: none;
  transition: transform 0.2s ease, opacity 0.2s ease;
  color: #fff;
}

.share-btn:hover {
  transform: scale(1.15);
  opacity: 0.9;
}

.share-linkedin {
  background-color: #0077b5;
}

.share-twitter {
  background-color: #000;
}

/* ===== ANCHOR RESET FOR LOGO LINK ===== */
a.logo {
  text-decoration: none;
}


.form-status {
  margin-top: 0.75rem;
  font-size: 0.95rem;
  color: #198754;
  font-weight: 500;
  min-height: 1.4em;
}
