* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

:root {
  --primary: #2563eb;
  --primary-dark: #1e40af;
  --bg: #f1f5f9;
  --card-bg: #ffffff;
  --text: #1e293b;
  --text-light: #64748b;
  --border: #e2e8f0;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC",
    "Microsoft YaHei", "Helvetica Neue", Arial, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.7;
}

.container {
  max-width: 1080px;
  margin: 0 auto;
  padding: 0 24px;
}

/* ---------- Hero ---------- */
.hero {
  background: linear-gradient(135deg, #1e3a8a, #2563eb 60%, #3b82f6);
  color: #fff;
  padding: 56px 0 48px;
}

.hero-inner {
  display: flex;
  align-items: center;
  gap: 32px;
  flex-wrap: wrap;
}

.avatar-wrap {
  flex-shrink: 0;
}

.avatar {
  width: 120px;
  height: 120px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.15);
  border: 3px solid rgba(255, 255, 255, 0.6);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 40px;
  font-weight: 700;
  letter-spacing: 2px;
}

.hero-text {
  flex: 1;
  min-width: 260px;
}

.hero-text h1 {
  font-size: 40px;
  font-weight: 800;
  letter-spacing: 1px;
}

.role {
  font-size: 18px;
  margin-top: 4px;
  opacity: 0.9;
}

.tagline {
  margin-top: 12px;
  opacity: 0.85;
  max-width: 520px;
}

.hero-actions {
  margin-top: 20px;
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.btn {
  display: inline-block;
  padding: 10px 24px;
  border-radius: 8px;
  font-size: 15px;
  font-weight: 600;
  text-decoration: none;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
  cursor: pointer;
  border: none;
}

.btn:hover {
  transform: translateY(-2px);
}

.btn-primary {
  background: #fff;
  color: var(--primary-dark);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.btn-outline {
  background: transparent;
  color: #fff;
  border: 1.5px solid rgba(255, 255, 255, 0.7);
}

.btn-outline:hover {
  background: rgba(255, 255, 255, 0.15);
}

/* ---------- Layout ---------- */
main {
  padding: 32px 0;
}

.layout {
  display: grid;
  grid-template-columns: 300px 1fr;
  gap: 24px;
  align-items: start;
}

.card {
  background: var(--card-bg);
  border-radius: 12px;
  padding: 24px;
  margin-bottom: 24px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
  border: 1px solid var(--border);
}

.card h2 {
  font-size: 18px;
  font-weight: 700;
  padding-bottom: 12px;
  margin-bottom: 16px;
  border-bottom: 2px solid var(--primary);
  display: inline-block;
  color: var(--text);
}

/* ---------- Contact ---------- */
.contact-list {
  list-style: none;
}

.contact-list li {
  display: flex;
  gap: 8px;
  padding: 6px 0;
  font-size: 14px;
}

.contact-list .label {
  color: var(--text-light);
  flex-shrink: 0;
  width: 44px;
}

/* ---------- Skills ---------- */
.skill-list {
  list-style: none;
}

.skill-list li {
  padding: 6px 0;
  font-size: 14px;
}

.skill-list li::before {
  content: "▸";
  color: var(--primary);
  margin-right: 6px;
}

.skill-bar {
  display: block;
  margin-top: 4px;
  height: 6px;
  background: var(--border);
  border-radius: 4px;
  overflow: hidden;
}

.skill-bar-fill {
  display: block;
  height: 100%;
  background: linear-gradient(90deg, var(--primary), #60a5fa);
  border-radius: 4px;
}

.plain-list {
  list-style: none;
  font-size: 14px;
}

.plain-list li {
  padding: 4px 0;
}

/* ---------- Content ---------- */
.about-text {
  color: var(--text-light);
  font-size: 15px;
}

.timeline-item {
  padding-bottom: 20px;
  margin-bottom: 20px;
  border-left: 3px solid var(--border);
  padding-left: 18px;
  position: relative;
}

.timeline-item:last-child {
  border-left-color: transparent;
  margin-bottom: 0;
  padding-bottom: 0;
}

.timeline-item::before {
  content: "";
  position: absolute;
  left: -7px;
  top: 6px;
  width: 11px;
  height: 11px;
  border-radius: 50%;
  background: var(--primary);
}

.timeline-item h3 {
  font-size: 16px;
  font-weight: 700;
}

.timeline-item .meta {
  font-size: 13px;
  color: var(--text-light);
  margin: 2px 0 8px;
}

.timeline-item ul {
  padding-left: 18px;
}

.timeline-item li {
  font-size: 14px;
  color: var(--text-light);
  margin: 4px 0;
}

.project-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 14px;
}

.project-item {
  background: #f8fafc;
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 14px 16px;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.project-item:hover {
  transform: translateY(-3px);
  box-shadow: 0 6px 14px rgba(37, 99, 235, 0.12);
}

.project-item h3 {
  font-size: 15px;
  font-weight: 700;
  margin-bottom: 6px;
}

.project-item p {
  font-size: 13px;
  color: var(--text-light);
}

/* ---------- Footer ---------- */
.footer {
  text-align: center;
  padding: 24px;
  color: var(--text-light);
  font-size: 13px;
}

/* ---------- Reveal animation ---------- */
.reveal {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.5s ease, transform 0.5s ease;
}

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

/* ---------- Responsive ---------- */
@media (max-width: 820px) {
  .layout {
    grid-template-columns: 1fr;
  }

  .hero-inner {
    flex-direction: column;
    text-align: center;
  }

  .hero-text h1 {
    font-size: 32px;
  }

  .hero-actions {
    justify-content: center;
  }
}

@media (max-width: 480px) {
  .container {
    padding: 0 16px;
  }

  .hero {
    padding: 40px 0;
  }

  .avatar {
    width: 96px;
    height: 96px;
    font-size: 32px;
  }
}
