/* === Hidden === */
.navbar-nav .dropdown-toggle::after {
  content: none !important;
}

/* === NAVBAR === */
.navbar {
  justify-content: flex-start !important;
  align-items: center !important;
  min-height: 80px !important;
  position: sticky;
  top: 0;
  z-index: 1000;
  background: rgba(255, 255, 255, 0.75);
  backdrop-filter: blur(10px);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.08);
  transition: background 0.3s ease, box-shadow 0.3s ease;
  border-bottom: 1px solid rgba(0, 0, 0, 0.06);
}

.navbar-nav {
  margin-left: 2.6rem !important;
}

.navbar-brand {
  display: flex !important;
  align-items: center !important;
  padding: 0 !important;
  margin: 0 !important;
}

.navbar-nav .nav-link[href$="about.qmd"] {
  margin-left: 2.0rem !important; 
}

/* Logo (YL) */
.navbar-brand img {
  height: 80px !important;
  max-height: none !important;   
  width: auto !important;
  object-fit: contain;
  display: block !important;
}

/* Hidden logo words */
.navbar-brand span {
  display: none !important;
}

/* === nav-text underline === */
.nav-text {
  position: relative;
  display: inline-block;
  transition: color 0.3s ease;
  font-weight: 600;
}

.nav-text::after {
  content: "";
  position: absolute;
  bottom: -4px;
  left: 0;
  height: 2px;
  width: 0%;
  background: #007bff;
  transition: width 0.3s ease;
}

.navbar-nav .nav-link:hover .nav-text,
.navbar-nav .active .nav-text {
  color: #007bff !important;
}

.navbar-nav .nav-link:hover .nav-text::after,
.navbar-nav .active .nav-text::after {
  width: 100%;
}

/* === Dropdown === */
.navbar-nav .dropdown-toggle {
  display: inline-flex !important;
  align-items: center !important;
  white-space: nowrap !important;
  gap: 0.4em;
  position: relative;
}

.navbar-nav .dropdown-toggle::before {
  content: "▾";
  display: inline-block;
  font-size: 1.5em;
  line-height: 1;
  color: #666;
  margin-left: 0.2em;
  transform: rotate(-90deg);
  transition: transform 0.3s ease, color 0.3s ease;
}

.navbar-nav .dropdown:hover .dropdown-toggle::before,
.navbar-nav .dropdown:focus-within .dropdown-toggle::before {
  transform: rotate(0deg);
  color: #007bff;
}

/* === Button === */
.btn {
  display: inline-block;
  padding: 0.4em 1em;
  border: 2px solid #007bff;
  border-radius: 0.4em;
  font-weight: 600;
  font-size: 0.9rem;
  color: #fff;
  background-color: #007bff;
  transition: all 0.2s ease;
  text-decoration: none;
  box-shadow: 0 2px 6px rgba(0, 123, 255, 0.2);
}

.btn:hover {
  background-color: #0056b3;
  border-color: #0056b3;
  color: #fff;
  box-shadow: 0 4px 10px rgba(0, 123, 255, 0.3);
}

/* === Card style === */
.project-card {
  border: 1px solid #e0e0e0;
  border-radius: 0.5em;
  padding: 1.5em;
  margin-bottom: 1.5em;
  transition: box-shadow 0.3s ease;
  text-align: left;
  line-height: 1.6;
}

.project-card:hover {
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.08);
}

.project-card .btn {
  margin-top: 1em;
  padding: 0.4em 1em;
  font-size: 0.9rem;
}

/* === Let’s Connect === */
.connect-container {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  max-width: 600px;
  margin: 2em auto;
  gap: 0.8em;
}

.connect-separator {
  display: inline-block;
  width: 1px;
  height: 2em;
  background-color: #ccc;
  margin: 0 1em;
}

.connect-left,
.connect-right {
  display: flex;
  gap: 0.5em;
  align-items: center;
}

/* === W Logo base === */
.navbar img.w-logo {
  height: 28px !important;     
  width: auto;
  display: inline-block;        
  vertical-align: middle;
  transform-origin: center;
  cursor: pointer;

  /* Default breathing glow */
  animation: w-glow 1s infinite alternate;
  transition: transform 0.8s ease, filter 0.8s ease;
}

/* === On hover: stop breathing, zoom in and glow stronger === */
.navbar img.w-logo:hover {
  animation: none;   /* stop breathing animation */
  transform: scale(1.5);
  filter: drop-shadow(0 0 12px rgba(0, 150, 255, 1));
}

/* === Name === */
.name{
  position:relative;
  display:inline-block;
  font-family:system-ui,-apple-system,"Segoe UI",Roboto,"Helvetica Neue",sans-serif;
  font-size:2.4em;
  font-weight:900;
  background:linear-gradient(270deg,#0d6efd,#1e90ff,#00bfff,#0d6efd);
  background-size:320% auto;
  -webkit-background-clip:text;
  -webkit-text-fill-color:transparent;
  animation:gradientScroll 6s linear infinite;
  transition:transform .3s ease;
  will-change:background-position,transform;
  z-index:0;
}

.name::after{ content:none; }

.name:hover{
  transform:scale(1.03);
  background:linear-gradient(
    270deg,
    #ffd700 0%,
    #ffc107 8%,
    #ffdf6e 16%,
    #ffe680 24%,
    #ffd700 32%,
    #ffb347 40%,
    #9adcfb 56%,
    #6ec9ff 64%,
    #ffd700 75%,
    #ffdf6e 88%,
    #ffd700 100%
  );
  background-size:500% auto;
  -webkit-background-clip:text;
  -webkit-text-fill-color:transparent;
  animation:gradientScroll 5s linear infinite;
  will-change:background-position,transform;
}

@keyframes gradientScroll{
  0%{ background-position:0% center; }
  100%{ background-position:300% center; }
}

/* === Motto === */
.motto {
  font-style: italic;
  font-size: 1.1em;
  color: #555;
  transition: color .3s ease;
}
.motto:hover {
  color: #111; /* Darker on hover */
}

.motto::before {
  content: "❝";
  margin-right: 6px;
  color: #0d6efd;
  opacity: 0.85;
}
.motto::after {
  content: "❞";
  margin-left: 6px;
  color: #0d6efd;
  opacity: 0.85;
}

/* === Avatar (Headshot) === */
.avatar{
  width:180px;
  height:180px;
  border-radius:50%;
  object-fit:cover;
  display:block;
  margin:0 auto;
  position:relative;
  z-index:1;
  box-shadow:0 0 8px rgba(13,110,253,.25);
  transition:transform .4s ease;
}

.avatar-wrapper{
  position:relative;
  display:inline-block;
}

.avatar-wrapper::after{
  content:"";
  position:absolute;
  inset:-8px;
  border-radius:50%;
  z-index:-1;
  opacity:.35;
  transition:opacity .4s ease, background .4s ease, animation-duration .4s ease;
  background:conic-gradient(
    #0d6efd,
    #1e90ff,
    #00bfff,
    #0d6efd
  );
  filter:blur(14px) saturate(1.2);
  transform-origin:50% 50%;
  animation:avatarSpin 16s linear infinite;
  will-change:transform;
}

.avatar-wrapper:hover .avatar{ transform:scale(1.08); }

.avatar-wrapper:hover::after{
  opacity:.9;
  background:conic-gradient(
    #ffd700,   /* 金色 */
    #ffc107,   /* 金黄 */
    #1e90ff,   /* 亮蓝 */
    #ffdf6e,   /* 浅金 */
    #ffd700    /* 金色收尾 */
  );
  animation-duration:3s; /* hover 时加快旋转 */
}

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

/* === Breathing animation === */
@keyframes w-glow {
  0% {
    filter: drop-shadow(0 0 0px rgba(0,123,255,0));
    transform: scale(1);
  }
  100% {
    filter: drop-shadow(0 0 8px rgba(0,123,255,0.8));
    transform: scale(1.15);
  }
}

/* Hide arrow ONLY for Resume dropdown */
.navbar-nav .dropdown:has(.resume-tab) > .dropdown-toggle::before {
  display: none !important;
}
