/* Reset and Base Styles */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: "Inter", "Noto Sans SC", sans-serif;
  background: radial-gradient(
      ellipse 800px 600px at 20% 40%,
      rgba(250, 249, 247, 0.8) 0%,
      transparent 50%
    ),
    radial-gradient(
      ellipse 600px 800px at 80% 60%,
      rgba(245, 243, 240, 0.6) 0%,
      transparent 50%
    ),
    radial-gradient(
      ellipse 400px 300px at 60% 20%,
      rgba(139, 115, 85, 0.05) 0%,
      transparent 70%
    ),
    linear-gradient(135deg, #faf9f7 0%, #f5f3f0 60%, #f8f6f3 100%);
  color: #2c2c2c;
  line-height: 1.7;
  overflow-x: hidden;
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 2rem;
}

/* Navigation */
nav {
  position: fixed;
  top: 0;
  width: 100%;
  background: radial-gradient(
      ellipse 400px 200px at 30% 0%,
      rgba(250, 249, 247, 0.95) 0%,
      rgba(250, 249, 247, 0.85) 100%
    ),
    rgba(250, 249, 247, 0.9);
  backdrop-filter: blur(15px);
  z-index: 1000;
  border-bottom: 1px solid rgba(44, 44, 44, 0.05);
  border-radius: 0 0 20px 20px;
}

nav .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem 2rem;
}

.logo {
  font-size: 1.5rem;
  font-weight: 300;
  color: #2c2c2c;
  text-decoration: none;
  position: relative;
}

.logo::after {
  content: "冠維";
  position: absolute;
  left: 100%; /* Position it at the end of the text */
  margin-left: 10px; /* Add spacing to the right of "Wei" */
  top: 0;
  font-size: 1rem;
  font-weight: 500;
  animation: float 6s ease-in-out infinite;
  color: #8b7355;
  opacity: 0.7;
  white-space: nowrap; /* Keep characters horizontal */
}

nav ul {
  display: flex;
  list-style: none;
  gap: 2rem;
}

nav a {
  text-decoration: none;
  color: #2c2c2c;
  font-weight: 300;
  transition: all 0.3s ease;
  position: relative;
}

nav a:hover {
  color: #8b7355;
}

nav a::after {
  content: "";
  position: absolute;
  bottom: -5px;
  left: 0;
  width: 0;
  height: 2px;
  background: linear-gradient(90deg, #8b7355, #a08567, #8b7355);
  transition: width 0.3s ease;
  border-radius: 1px;
}

nav a:hover::after {
  width: 100%;
}

/* Hero Section */
.hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  position: relative;
  overflow: hidden;
}

.hero-content {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
  align-items: center;
}

.hero-text h1 {
  font-size: 3.5rem;
  font-weight: 300;
  margin-bottom: 1rem;
  color: #2c2c2c;
  line-height: 1.2;
}

/* Updated subtitle styling */
.hero-text .subtitle {
  font-family: "Noto Sans SC", "Inter", serif;
  font-size: 1.3rem;
  color: #8b7355;
  margin-bottom: 2rem;
  font-weight: 400;
  font-style: italic;
  line-height: 1.6;
  position: relative;
  opacity: 0.9;
}

.hero-text p {
  font-size: 1rem;
  color: #5a5a5a;
  margin-bottom: 2rem;
  max-width: 450px;
  line-height: 1.8;
}

/* Updated Profile Photo Section */
.hero-visual {
  position: relative;
  height: 500px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2rem;
}

.profile-container {
  position: relative;
  width: 280px;
  height: 280px;
}

@keyframes float {
  0%,
  100% {
    transform: translateY(0px) rotate(0deg);
  }
  33% {
    transform: translateY(-10px) rotate(1deg);
  }
  66% {
    transform: translateY(5px) rotate(-1deg);
  }
}

/* Background decorative elements */
.profile-container::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 320px;
  height: 320px;
  border: 1px solid rgba(139, 115, 85, 0.1);
  border-radius: 50%;
  z-index: 0;
  animation: slowRotate 20s linear infinite;
}

@keyframes slowRotate {
  from {
    transform: translate(-50%, -50%) rotate(0deg);
  }
  to {
    transform: translate(-50%, -50%) rotate(360deg);
  }
}

.section-title {
  font-size: 2.5rem;
  font-weight: 300;
  text-align: center;
  margin-bottom: 3rem;
  position: relative;
}

.section-title::after {
  content: "学";
  position: absolute;
  right: -50px;
  top: -10px;
  font-size: 2rem;
  color: #8b7355;
  opacity: 0.5;
}

/* Timeline Styles - Updated for cleaner wabi-sabi aesthetic */
.timeline-container {
  position: relative;
  max-width: 1000px;
  margin: 0 auto;
}

.timeline {
  position: relative;
  padding-left: 0;
}

/* Softer, more organic vertical line with irregular width but straight */
.timeline::before {
  content: "";
  position: absolute;
  left: 98.5px;
  top: 20px;
  bottom: 20px;
  width: 3px;
  background: linear-gradient(
    to bottom,
    transparent 0%,
    rgba(139, 115, 85, 0.2) 3%,
    rgba(139, 115, 85, 0.4) 8%,
    rgba(139, 115, 85, 0.3) 12%,
    rgba(139, 115, 85, 0.5) 18%,
    rgba(139, 115, 85, 0.3) 22%,
    rgba(139, 115, 85, 0.4) 28%,
    rgba(139, 115, 85, 0.35) 32%,
    rgba(139, 115, 85, 0.45) 38%,
    rgba(139, 115, 85, 0.3) 42%,
    rgba(139, 115, 85, 0.5) 48%,
    rgba(139, 115, 85, 0.35) 52%,
    rgba(139, 115, 85, 0.4) 58%,
    rgba(139, 115, 85, 0.3) 62%,
    rgba(139, 115, 85, 0.45) 68%,
    rgba(139, 115, 85, 0.35) 72%,
    rgba(139, 115, 85, 0.4) 78%,
    rgba(139, 115, 85, 0.3) 82%,
    rgba(139, 115, 85, 0.4) 88%,
    rgba(139, 115, 85, 0.2) 92%,
    rgba(139, 115, 85, 0.2) 97%,
    transparent 100%
  );
  border-radius: 2px;
  opacity: 0.8;
  box-shadow: 1px 0 0 rgba(139, 115, 85, 0.1), -1px 0 0 rgba(139, 115, 85, 0.05);
}

/* Remove the second line completely */
.timeline::after {
  display: none;
}

.timeline-item {
  position: relative;
  padding: 0;
  display: flex;
  align-items: flex-start;
  margin-bottom: 0;
}

.timeline-year {
  position: absolute;
  left: 0;
  top: 1.3rem;
  width: 80px;
  text-align: right;
  font-size: 0.85rem;
  color: #8b7355;
  font-weight: 300;
  opacity: 0.9;
  padding-right: 1.5rem;
  white-space: nowrap;
  line-height: 26px;
  height: 26px;
  display: flex;
  align-items: center;
  justify-content: flex-end;
}

/* Softer, more organic timeline nodes */
.timeline-node {
  position: absolute;
  left: 87px;
  top: 1.3rem;
  width: 26px;
  height: 26px;
  background: rgba(139, 115, 85, 0.6);
  border: 2px solid rgba(255, 255, 255, 0.8);
  border-radius: 50%;
  z-index: 10;
  box-shadow: 0 2px 12px rgba(139, 115, 85, 0.15);
  transition: all 0.3s ease;
  backdrop-filter: blur(5px);
}

.timeline-node:hover {
  transform: scale(1.15);
  box-shadow: 0 4px 20px rgba(139, 115, 85, 0.25);
  background: rgba(139, 115, 85, 0.8);
}

.timeline-content {
  margin-left: 140px;
  background: transparent;
  padding: 1rem 0;
  border-radius: 0;
  transition: all 0.4s ease;
  min-height: auto;
  box-shadow: none;
  border: none;
  position: relative;
  overflow: hidden;
}

/* Remove the texture overlay */
.timeline-content::before {
  display: none;
}

.timeline-content:hover {
  transform: none;
  box-shadow: none;
  border-color: transparent;
}

.timeline-title {
  font-size: 1.3rem;
  font-weight: 400;
  color: #2c2c2c;
  margin-bottom: 0.5rem;
  position: relative;
  z-index: 1;
}

.timeline-role {
  font-size: 1rem;
  color: #8b7355;
  margin-bottom: 1.2rem;
  font-weight: 300;
  position: relative;
  z-index: 1;
}

.timeline-description {
  font-size: 0.95rem;
  color: #4a4a4a;
  line-height: 1.7;
  margin-bottom: 0.5rem;
  position: relative;
  z-index: 1;
}

/* Research & Work Section */
.research {
  padding: 8rem 0;
  background: radial-gradient(
      ellipse 700px 500px at 70% 30%,
      rgba(250, 249, 247, 0.9) 0%,
      rgba(250, 249, 247, 0.7) 100%
    ),
    radial-gradient(
      ellipse 500px 400px at 20% 70%,
      rgba(245, 243, 240, 0.6) 0%,
      transparent 70%
    ),
    radial-gradient(
      ellipse 300px 200px at 90% 10%,
      rgba(139, 115, 85, 0.03) 0%,
      transparent 80%
    ),
    #faf9f7;
  position: relative;
}

.research::before {
  content: "研";
  position: absolute;
  left: -50px;
  top: 50%;
  transform: translateY(-50%);
  font-family: "Noto Sans SC", serif;
  font-size: 8rem;
  color: #8b7355;
  opacity: 0.1;
  z-index: 1;
}

.research .section-title::after {
  content: "究";
}

.research-grid {
  display: grid;
  gap: 4rem;
  position: relative;
  z-index: 10;
}

.research-item {
  display: grid;
  grid-template-columns: 1fr 1.5fr;
  gap: 3rem;
  align-items: center;
  padding: 2rem 0;
}

.research-content h3 {
  font-size: 1.5rem;
  font-weight: 400;
  margin-bottom: 1rem;
  color: #2c2c2c;
}

.research-content .research-type {
  font-size: 0.9rem;
  color: #8b7355;
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 1rem;
}

.research-content p {
  color: #666;
  line-height: 1.7;
  margin-bottom: 1.5rem;
}

.research-tags {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
  margin-bottom: 1rem;
}

.tag {
  font-size: 0.8rem;
  color: #8b7355;
  border: 1.5px solid #8b7355;
  padding: 0.3rem 0.8rem;
  text-transform: uppercase;
  letter-spacing: 1px;
  border-radius: 15px;
  background: radial-gradient(
      ellipse 80px 40px at 30% 30%,
      rgba(139, 115, 85, 0.05) 0%,
      transparent 70%
    ),
    transparent;
  transition: all 0.3s ease;
}

.tag:hover {
  background: radial-gradient(
      ellipse 100px 60px at 50% 50%,
      rgba(139, 115, 85, 0.1) 0%,
      rgba(139, 115, 85, 0.05) 100%
    ),
    rgba(139, 115, 85, 0.05);
  transform: translateY(-1px);
}

.research-links {
  display: flex;
  gap: 1rem;
}

.research-link {
  color: #8b7355;
  text-decoration: none;
  font-size: 0.9rem;
  border-bottom: 1px solid transparent;
  transition: border-color 0.3s ease;
}

.research-link:hover {
  border-bottom: 2px solid;
  border-image: linear-gradient(90deg, #8b7355, #a08567, #8b7355) 1;
  border-radius: 1px;
}

.research-visual {
  height: 200px;
  background: radial-gradient(
      ellipse 250px 150px at 30% 40%,
      rgba(245, 243, 240, 0.9) 0%,
      rgba(245, 243, 240, 0.6) 100%
    ),
    radial-gradient(
      ellipse 200px 200px at 70% 60%,
      rgba(237, 233, 228, 0.7) 0%,
      transparent 70%
    ),
    linear-gradient(135deg, #f5f3f0, #ede9e4);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #8b7355;
  font-size: 1.2rem;
  border: 2px solid rgba(139, 115, 85, 0.2);
  border-radius: 20px;
  position: relative;
  overflow: hidden;
  transition: all 0.4s ease;
}

.research-visual:hover {
  transform: rotate(1deg) scale(1.02);
  border-color: rgba(139, 115, 85, 0.4);
}

.research-visual::before {
  content: "";
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: radial-gradient(
      ellipse 150px 200px at 50% 50%,
      rgba(255, 255, 255, 0.6) 0%,
      transparent 70%
    ),
    linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.4), transparent);
  transition: left 0.6s ease;
  border-radius: 20px;
}

.research-item:hover .research-visual::before {
  left: 100%;
}

/* Publications Section */
.publications {
  padding: 8rem 0;
  background: radial-gradient(
      ellipse 600px 400px at 80% 20%,
      rgba(255, 255, 255, 0.9) 0%,
      rgba(255, 255, 255, 0.7) 100%
    ),
    radial-gradient(
      ellipse 400px 500px at 20% 80%,
      rgba(248, 246, 243, 0.6) 0%,
      transparent 70%
    ),
    white;
}

.publications .section-title::after {
  content: "文";
}

.publication-list {
  max-width: 900px;
  margin: 0 auto;
}

.publication-item {
  padding: 2rem 0;
  border-bottom: 1px solid rgba(139, 115, 85, 0.15);
  transition: all 0.3s ease;
}

.publication-item:hover {
  padding-left: 0.5rem;
}

.publication-item:last-child {
  border-bottom: none;
}

.publication-title {
  font-size: 1.2rem;
  font-weight: 500;
  color: #2c2c2c;
  margin-bottom: 0.5rem;
}

.publication-authors {
  font-size: 0.95rem;
  color: #8b7355;
  margin-bottom: 0.5rem;
}

.publication-venue {
  font-size: 0.9rem;
  color: #666;
  font-style: italic;
  margin-bottom: 1rem;
}

.publication-links {
  display: flex;
  gap: 1rem;
}

.publication-link {
  font-size: 0.85rem;
  color: #8b7355;
  text-decoration: none;
  border: 1.5px solid #8b7355;
  padding: 0.3rem 0.8rem;
  transition: all 0.4s ease;
  border-radius: 12px;
  background: radial-gradient(
      ellipse 60px 30px at 30% 30%,
      rgba(139, 115, 85, 0.05) 0%,
      transparent 70%
    ),
    transparent;
  position: relative;
  overflow: hidden;
}

.publication-link:hover {
  background: radial-gradient(
      ellipse 100px 60px at 50% 50%,
      rgba(139, 115, 85, 0.9) 0%,
      rgba(139, 115, 85, 0.8) 100%
    ),
    #8b7355;
  color: white;
  transform: translateY(-2px) rotate(-1deg);
  box-shadow: 0 5px 15px rgba(139, 115, 85, 0.3);
}

/* Responsive Design */
@media (max-width: 768px) {
  .hero-content {
    grid-template-columns: 1fr;
    text-align: center;
  }

  .hero-text h1 {
    font-size: 2.5rem;
  }

  .hero-text .subtitle {
    font-size: 1.1rem;
  }

  .profile-container {
    width: 220px;
    height: 220px;
  }

  .hero-btn {
    padding: 0.6rem 1.5rem;
    font-size: 0.85rem;
  }

  .research-item {
    grid-template-columns: 1fr;
  }

  .contact-info {
    flex-direction: column;
    gap: 1.5rem;
  }

  nav ul {
    gap: 1rem;
  }

  /* Timeline mobile responsive */
  .timeline::before {
    left: 60px;
  }

  .timeline-year {
    position: static;
    width: auto;
    text-align: left;
    margin-bottom: 0.5rem;
    padding-right: 0;
    font-size: 0.8rem;
  }

  .timeline-node {
    left: 47px;
    width: 20px;
    height: 20px;
  }

  .timeline-content {
    margin-left: 0;
    padding: 1.5rem 2rem;
    border-radius: 15px;
  }

  .timeline-item {
    flex-direction: column;
    margin-bottom: 1.5rem;
  }

  .timeline-title {
    font-size: 1.2rem;
  }

  .section-title {
    font-size: 2rem;
  }

  .section-title::after {
    right: -30px;
    font-size: 1.5rem;
  }
}

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

.hero-content,
.about-content,
.research-grid,
.contact-content,
.publication-list {
  animation: fadeInUp 1s ease forwards;
}

/* Timeline animations */
.timeline-item {
  opacity: 0;
  transform: translateY(20px);
  animation: fadeInUp 0.6s ease forwards;
}

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

.profile-photo {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
  border: 3px solid rgba(139, 115, 85, 0.4);
  position: relative;
  overflow: hidden;
  transition: all 0.4s ease;
  box-shadow: 0 8px 32px rgba(139, 115, 85, 0.25),
    inset 0 2px 8px rgba(255, 255, 255, 0.3);
  z-index: 2;
}

.profile-photo:hover {
  transform: scale(1.02) rotate(-1deg);
  border-color: rgba(139, 115, 85, 0.6);
  box-shadow: 0 12px 40px rgba(139, 115, 85, 0.35),
    inset 0 2px 8px rgba(255, 255, 255, 0.4);
}

.hero-links {
  margin-top: 1.5rem;
  display: flex;
  align-items: center;
  gap: 0.8rem;
  flex-wrap: wrap;
}

.hero-link {
  color: #8b7355;
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 400;
  transition: all 0.3s ease;
  position: relative;
  padding-bottom: 2px;
}

.hero-link::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 1px;
  background: #8b7355;
  transition: width 0.3s ease;
}

.hero-link:hover {
  color: #a08567;
}

.hero-link:hover::after {
  width: 100%;
}

.link-divider {
  color: #8b7355;
  opacity: 0.4;
  font-size: 0.9rem;
}

/* Mobile responsive */
@media (max-width: 768px) {
  .hero-links {
    margin-top: 1.2rem;
    gap: 0.6rem;
  }

  .hero-link {
    font-size: 0.85rem;
  }
}
