/* ===== Reset & Base ===== */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, 'Noto Sans SC', sans-serif;
  background: #000000;
  color: #e0e0e0;
  line-height: 1.7;
  overflow-x: hidden;
}

/* ===== Particles Canvas (hero bg) ===== */
#particles-canvas {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  pointer-events: none;
}

/* ===== Helper ===== */
.section-title {
  font-size: 2rem;
  font-weight: 700;
  text-align: center;
  margin-bottom: 3rem;
  position: relative;
  display: inline-block;
}
.section-title::after {
  content: '';
  position: absolute;
  bottom: -10px;
  left: 0;
  width: 100%;
  height: 3px;
  background: #2997ff;
  border-radius: 2px;
}
.section-title-wrap {
  text-align: center;
  margin-bottom: 1rem;
}

/* ===== Navigation ===== */
nav {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  padding: 1rem 2rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  z-index: 100;
  background: rgba(10, 10, 12, 0.8);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(255,255,255,0.06);
}
nav .logo {
  font-size: 1.2rem;
  font-weight: 700;
  color: #fff;
  letter-spacing: 1px;
}
nav .logo span {
  background: #2997ff;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}
nav ul {
  list-style: none;
  display: flex;
  gap: 2rem;
}
nav ul li a {
  color: #aaa;
  text-decoration: none;
  font-size: 0.95rem;
  transition: color 0.3s;
  position: relative;
}
nav ul li a:hover {
  color: #fff;
}
nav ul li a::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 0;
  height: 2px;
  background: #2997ff;
  transition: width 0.3s;
}
nav ul li a:hover::after {
  width: 100%;
}

/* ===== Sections ===== */
section {
  position: relative;
  z-index: 1;
  padding: 5rem 2rem;
  max-width: 1100px;
  margin: 0 auto;
}

/* ===== Hero ===== */
#hero {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding-top: 6rem;
}
#hero .avatar {
  width: 120px;
  height: 120px;
  border-radius: 50%;
  background: #2997ff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 3rem;
  color: #fff;
  margin-bottom: 1.5rem;
  box-shadow: 0 0 40px rgba(41, 151, 255, 0.25);
  animation: float 3s ease-in-out infinite;
}
@keyframes float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-10px); }
}
#hero h1 {
  font-size: 3.5rem;
  font-weight: 800;
  background: linear-gradient(180deg, #f5f5f7, #86868b);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  margin-bottom: 0.5rem;
}
#hero .subtitle {
  font-size: 1.4rem;
  color: #999;
  margin-bottom: 0.3rem;
}
#hero .subtitle em {
  font-style: normal;
  color: #2997ff;
}
#hero .tagline {
  font-size: 1.1rem;
  color: #777;
  max-width: 600px;
  margin: 1rem auto 2rem;
}
#hero .scroll-hint {
  margin-top: 3rem;
  color: #555;
  font-size: 0.85rem;
  animation: bounce 2s infinite;
}
@keyframes bounce {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(8px); }
}

/* ===== About / Roles ===== */
#about {
  padding-top: 4rem;
  padding-bottom: 4rem;
}
.roles-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
  margin-top: 2rem;
}
.role-card {
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 16px;
  padding: 2rem;
  transition: transform 0.3s, box-shadow 0.3s;
}
.role-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.5);
}
.role-card .role-icon {
  font-size: 2rem;
  margin-bottom: 0.8rem;
}
.role-card h3 {
  font-size: 1.4rem;
  color: #fff;
  margin-bottom: 0.3rem;
}
.role-card .role-sub {
  font-size: 0.9rem;
  color: #888;
  margin-bottom: 1rem;
}
.role-card ul {
  list-style: none;
  padding: 0;
}
.role-card ul li {
  position: relative;
  padding-left: 1.2rem;
  margin-bottom: 0.6rem;
  font-size: 0.95rem;
  color: #ccc;
}
.role-card ul li::before {
  content: '▸';
  position: absolute;
  left: 0;
  color: #30d158;
}

/* ===== Projects ===== */
#projects {
  padding-top: 4rem;
  padding-bottom: 4rem;
}
.projects-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
  margin-top: 2rem;
}
.project-card {
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 16px;
  overflow: hidden;
  transition: transform 0.3s, box-shadow 0.3s;
}
.project-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.5);
}
.project-card .project-img {
  width: 100%;
  aspect-ratio: 16 / 10;
  object-fit: cover;
  display: block;
  border-bottom: 1px solid rgba(255,255,255,0.06);
}
.project-card .project-body {
  padding: 1.5rem;
}
.project-card h3 {
  font-size: 1.2rem;
  color: #fff;
  margin-bottom: 0.3rem;
}
.project-card .project-url {
  font-size: 0.85rem;
  color: #2997ff;
  margin-bottom: 0.8rem;
  word-break: break-all;
}
.project-card .project-url a {
  color: #2997ff;
  text-decoration: none;
}
.project-card .project-url a:hover {
  text-decoration: underline;
}
.project-card p {
  font-size: 0.95rem;
  color: #aaa;
  line-height: 1.6;
}
.project-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-top: 0.8rem;
}
.project-tags span {
  background: rgba(41, 151, 255, 0.14);
  color: #2997ff;
  font-size: 0.75rem;
  padding: 0.2rem 0.7rem;
  border-radius: 20px;
  border: 1px solid rgba(41, 151, 255, 0.25);
}

/* ===== Contact ===== */
#contact {
  padding-top: 4rem;
  padding-bottom: 6rem;
}
.contact-wrap {
  display: flex;
  justify-content: center;
  gap: 2rem;
  flex-wrap: wrap;
  margin-top: 2rem;
}
.contact-item {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 12px;
  padding: 1rem 1.5rem;
  transition: transform 0.2s;
}
.contact-item:hover {
  transform: translateY(-2px);
}
.contact-item .icon {
  font-size: 1.3rem;
}
.contact-item a {
  color: #ccc;
  text-decoration: none;
  font-size: 0.95rem;
}
.contact-item a:hover {
  color: #fff;
}

/* ===== Footer / Beian ===== */
footer {
  position: relative;
  z-index: 1;
  text-align: center;
  padding: 2rem;
  border-top: 1px solid rgba(255,255,255,0.06);
  font-size: 0.85rem;
  color: #666;
}
footer a {
  color: #888;
  text-decoration: none;
}
footer a:hover {
  color: #aaa;
}

/* ===== Responsive ===== */
@media (max-width: 768px) {
  nav ul { gap: 1rem; }
  nav ul li a { font-size: 0.85rem; }
  #hero h1 { font-size: 2.4rem; }
  #hero .subtitle { font-size: 1.1rem; }
  .roles-grid { grid-template-columns: 1fr; }
  .projects-grid { grid-template-columns: 1fr; }
  section { padding: 3rem 1.2rem; }
  .contact-wrap { flex-direction: column; align-items: center; }
}
