/* Adapted from Hanchao Zhang; CC0-1.0. */

        .beyond-link{ display:inline-flex; align-items:center; gap:7px; margin-top:4px;
          font-size:.8rem; font-weight:600; letter-spacing:.01em; color:#fff;
          text-decoration:none; padding:8px 18px; border-radius:22px;
          background:linear-gradient(135deg,var(--accent),var(--accent-hover));
          box-shadow:0 4px 12px rgba(var(--accent-rgb), .28);
          transition:filter .2s ease, transform .2s ease, box-shadow .2s ease; }
        .beyond-link:hover{ filter:brightness(1.08); transform:translateY(-1px);
          box-shadow:0 6px 16px rgba(var(--accent-rgb), .36); color:#fff; }


  /* Education list — same visual language as .research-interests */
  .edu-list{ flex:1; min-width:280px; }
  .edu-list h2{ margin-bottom:16px; }
  .edu-list ul{
    list-style:none; padding:0; margin:0;
    /* The site override disables this inherited education fade. */
    -webkit-mask-image: linear-gradient(to bottom,
      #000 0%, #000 60%,
      rgba(0,0,0,0.5) 76%,
      rgba(0,0,0,0.2) 86%,
      rgba(0,0,0,0.02) 92%);
    mask-image: linear-gradient(to bottom,
      #000 0%, #000 60%,
      rgba(0,0,0,0.5) 76%,
      rgba(0,0,0,0.2) 86%,
      rgba(0,0,0,0.02) 92%);
  }
  .edu-list li{
    padding:8px 12px;
    border-left:3px solid var(--accent);
    margin-bottom:10px;
    background:rgba(var(--accent-rgb), 0.03);
    border-radius:0 7px 7px 0;
    font-size:0.95rem;
    line-height:1.5;
    transition:background .2s ease, border-left-color .2s ease, transform .2s ease, opacity .25s ease;
  }
  .edu-list li:hover{
    background:rgba(var(--accent-rgb), 0.07);
    border-left-color:var(--accent-hover);
    transform:translateX(2px);
  }
  .edu-list .school{ font-weight:700; }
  .edu-list .school a{ color:var(--text); text-decoration:none; }
  .edu-list .school a:hover{ color:var(--accent); }
  .edu-list .deg{ color:var(--muted); font-size:0.88rem; margin-top:1px; }
  .edu-list .deg a{ color:var(--accent-hover); text-decoration:none; }
  .edu-list .deg a:hover{ text-decoration:underline; }
  .edu-list .yr{ color:var(--muted); font-weight:600; }

  /* Subtle tint for the current institution. */
  .edu-list li.l1{ background:rgba(var(--accent-rgb), 0.06); }




  /* === Flex layout for education + research interests === */
  .container-flex {
    display: flex;
    flex-wrap: wrap;
    gap: 24px;
    align-items: stretch;   /* both columns share the same height */
  }

  /* === Timeline container === */
  .timeline-container {
    flex: 1;
    min-width: 280px;
    max-width: 800px;
    position: relative;
  }

  .timeline-container h2 {
    margin-bottom: 16px;
  }

  .timeline-line {
    position: absolute;
    top: 70px;
    left: 14px;
    width: 2px;
    height: calc(100% - 136px);
    background: linear-gradient(to bottom, var(--accent) 0%, rgba(var(--accent-rgb), 0.12) 100%);
    border-radius: 2px;
  }

  /* === Timeline entries === */
  .timeline-entry {
    position: relative;
    margin-bottom: 18px;
    padding-left: 44px;
  }

  /* [3] Timeline pulse dots */
  .year-circle {
    position: absolute;
    left: 0;
    top: 6px;
    width: 30px;
    height: 30px;
    background: linear-gradient(135deg, var(--accent), var(--accent-hover));
    color: white;
    font-weight: 700;
    font-size: 0.62rem;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    z-index: 2;
    letter-spacing: -0.5px;
    box-shadow: 0 0 0 3px rgba(var(--accent-rgb), 0.14), 0 2px 8px rgba(var(--accent-rgb), 0.28);
  }

  .year-circle::before {
    content: '';
    position: absolute;
    inset: -5px;
    border-radius: 50%;
    border: 2px solid var(--accent);
    animation: pulse-ring 2.2s ease-out infinite;
    opacity: 0;
  }

  @keyframes pulse-ring {
    0%   { transform: scale(0.85); opacity: 0.55; }
    100% { transform: scale(1.7);  opacity: 0; }
  }

  /* === Entry content — glassmorphism card === */
  .entry-content {
    background: rgba(255, 255, 255, 0.76);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(var(--accent-rgb), 0.1);
    border-radius: 10px;
    padding: 10px 14px;
    box-shadow: 0 2px 10px rgba(var(--accent-rgb), 0.06);
    transition: box-shadow 0.25s ease, transform 0.25s ease;
  }

  .entry-content:hover {
    box-shadow: 0 5px 22px rgba(var(--accent-rgb), 0.13);
    transform: translateX(3px);
  }

  .entry-content h3 {
    margin: 0 0 5px 0;
    font-size: 1.05rem;
    line-height: 1.3;
  }

  .entry-content div {
    font-size: 0.95rem;
    color: #666;
    margin: 0;
    line-height: 1.4;
  }

  .entry-content ul {
    margin: 5px 0 0 0;
    padding-left: 18px;
  }

  .entry-content ul li {
    margin-bottom: 4px;
    font-size: 0.95rem;
  }

  /* === Research Interests === */
  .research-interests {
    flex: 1;
    min-width: 280px;
    display: flex;
    flex-direction: column;
  }

  .research-interests ul {
    list-style: none;
    padding: 0;
    margin: 0;
    flex: 1;                          /* fill the column so height matches Education */
    display: flex;
    flex-direction: column;
    justify-content: space-between;   /* spread items evenly across that height */
    /* same top→bottom fade as Education: items stay solid, the last block fades out */
    -webkit-mask-image: linear-gradient(to bottom,
      #000 0%, #000 78%,
      rgba(0,0,0,0.5) 86%,
      rgba(0,0,0,0.12) 93%,
      rgba(0,0,0,0.02) 99%);
    mask-image: linear-gradient(to bottom,
      #000 0%, #000 78%,
      rgba(0,0,0,0.5) 86%,
      rgba(0,0,0,0.12) 93%,
      rgba(0,0,0,0.02) 99%);
  }

  .research-interests ul li {
    padding: 6px 12px;
    border-left: 3px solid var(--accent);
    margin-bottom: 6px;
    background: rgba(var(--accent-rgb), 0.03);
    border-radius: 0 7px 7px 0;
    font-size: 0.9rem;
    line-height: 1.38;
    transition: background 0.2s ease, border-left-color 0.2s ease, transform 0.2s ease;
  }

  .research-interests ul li:hover {
    background: rgba(var(--accent-rgb), 0.07);
    border-left-color: var(--accent-hover);
    transform: translateX(2px);
  }

  /* === Scroll-reveal base === */
  .reveal {
    opacity: 0;
    transform: translateY(16px);
    transition: opacity 0.5s ease, transform 0.5s ease;
  }

  .reveal.visible {
    opacity: 1;
    transform: translateY(0);
  }

  /* [1] Gradient name shimmer */
  header h1 {
    background: linear-gradient(90deg, var(--accent-hover) 0%, var(--accent-hover) 40%, var(--accent) 70%, var(--accent-hover) 100%);
    background-size: 220% auto;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: name-shimmer 4s linear infinite;
  }

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

  /* [4] Scroll progress bar */
  #scroll-progress {
    position: fixed;
    top: 0;
    left: 0;
    height: 3px;
    width: 0%;
    background: linear-gradient(90deg, var(--accent), var(--accent-soft));
    z-index: 9999;
    border-radius: 0 2px 2px 0;
    transition: width 0.08s linear;
    pointer-events: none;
  }


  /* Dark mode overrides */
