html, body, main, header, footer {
  padding: 0px;
  margin: 0px;
}

:root {
  --primary: #2c7da0;
  --primary-dark: #1a5c7a;
  --primary-light: #e8f4f8;
  --accent: #61a5c2;
  --text: #333333;
  --text-light: #666666;
  --text-muted: #999999;
  --bg: #f0f4f8;
  --card-bg: #ffffff;
  --border: #e0e7ee;
  --shadow: 0 2px 12px rgba(0, 0, 0, 0.06);
  --shadow-hover: 0 4px 20px rgba(0, 0, 0, 0.1);
  --radius: 12px;
  --transition: 0.3s ease;
}

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

/* ========== Header ========== */
#header {
  background: linear-gradient(135deg, var(--primary-dark), var(--primary), var(--accent));
  padding: 60px 20px 50px;
  text-align: center;
  position: relative;
  overflow: hidden;
}

#header::before {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: radial-gradient(circle, rgba(255,255,255,0.05) 0%, transparent 70%);
  animation: headerPulse 8s ease-in-out infinite;
}

@keyframes headerPulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.1); }
}

.header-overlay {
  position: relative;
  z-index: 1;
}

#header-name {
  font-size: 48px;
  font-weight: 700;
  color: #ffffff;
  margin: 0 0 12px;
  letter-spacing: 4px;
  text-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

#header-title {
  font-size: 18px;
  color: rgba(255,255,255,0.9);
  margin: 0;
  letter-spacing: 2px;
}

/* ========== Main Layout ========== */
#main {
  padding: 30px 20px;
  max-width: 1200px;
  margin: 0 auto;
}

#app {
  display: flex;
  gap: 30px;
  align-items: flex-start;
}

/* ========== Sidebar ========== */
#sidebar {
  flex: 0 0 300px;
  position: sticky;
  top: 30px;
}

#avatar-card {
  text-align: center;
  padding: 30px 20px;
}

#avatar-placeholder {
  width: 120px;
  height: 120px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--primary-light), #d0eaf5);
  margin: 0 auto 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 4px solid var(--primary);
}

#avatar-icon {
  font-size: 56px;
}

#sidebar-name {
  font-size: 24px;
  font-weight: 700;
  color: var(--primary-dark);
  margin: 0 0 4px;
}

#sidebar-job {
  font-size: 14px;
  color: var(--text-muted);
  margin: 0 0 20px;
}

#contact-info {
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  padding: 16px 0;
  margin-bottom: 16px;
}

.contact-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 6px 0;
  font-size: 14px;
  color: var(--text);
}

.contact-icon {
  width: 24px;
  text-align: center;
  font-size: 16px;
}

#basic-info {
  text-align: left;
}

.info-row {
  display: flex;
  justify-content: space-between;
  padding: 8px 0;
  border-bottom: 1px dashed var(--border);
  font-size: 14px;
}

.info-row:last-child {
  border-bottom: none;
}

.info-label {
  color: var(--text-muted);
}

.info-value {
  color: var(--text);
  font-weight: 500;
}

/* ========== Content ========== */
#content {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 24px;
}

/* ========== Card ========== */
.card {
  background: var(--card-bg);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 28px 32px;
  transition: box-shadow var(--transition);
}

.card:hover {
  box-shadow: var(--shadow-hover);
}

/* ========== Section Title ========== */
.section-title {
  font-size: 20px;
  font-weight: 700;
  color: var(--primary-dark);
  margin: 0 0 20px;
  padding-bottom: 12px;
  border-bottom: 2px solid var(--primary-light);
  display: flex;
  align-items: center;
  gap: 8px;
}

/* ========== Timeline ========== */
.timeline-item {
  position: relative;
  padding-left: 28px;
  padding-bottom: 24px;
  border-left: 2px solid var(--primary-light);
}

.timeline-item:last-child {
  padding-bottom: 0;
}

.timeline-item::before {
  content: '';
  position: absolute;
  left: -7px;
  top: 4px;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--primary);
  border: 2px solid #fff;
  box-shadow: 0 0 0 2px var(--primary);
}

.timeline-date {
  font-size: 13px;
  color: var(--primary);
  font-weight: 600;
  margin-bottom: 6px;
  letter-spacing: 0.5px;
}

.timeline-body h4 {
  font-size: 17px;
  font-weight: 600;
  color: var(--text);
  margin: 0 0 4px;
}

.timeline-major {
  font-size: 14px;
  color: var(--text-light);
  margin: 0 0 8px;
}

.timeline-desc {
  font-size: 14px;
  color: var(--text-light);
  margin: 0;
  line-height: 1.7;
}

.timeline-list {
  margin: 0;
  padding-left: 18px;
}

.timeline-list li {
  font-size: 14px;
  color: var(--text-light);
  margin-bottom: 4px;
  line-height: 1.7;
}

/* ========== Skills Grid ========== */
.skills-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

.skill-item {
  text-align: center;
  padding: 20px 16px;
  border-radius: 10px;
  background: var(--primary-light);
  transition: transform var(--transition), box-shadow var(--transition);
}

.skill-item:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow);
}

.skill-icon {
  font-size: 36px;
  margin-bottom: 10px;
}

.skill-item h4 {
  font-size: 15px;
  font-weight: 600;
  color: var(--primary-dark);
  margin: 0 0 8px;
}

.skill-item p {
  font-size: 13px;
  color: var(--text-light);
  margin: 0;
  line-height: 1.6;
}

/* ========== Self Intro ========== */
#self-intro p {
  font-size: 15px;
  color: var(--text-light);
  line-height: 1.8;
  margin: 0;
}

/* ========== Cover Letter ========== */
.letter-body {
  font-size: 15px;
  color: var(--text-light);
  line-height: 1.9;
}

.letter-body p {
  margin: 0 0 12px;
  text-indent: 2em;
}

.letter-body p:first-child {
  text-indent: 0;
}

.letter-closing {
  text-indent: 0 !important;
  margin-top: 20px !important;
}

.letter-sign {
  text-align: right;
  margin-top: 8px !important;
  text-indent: 0 !important;
  color: var(--text);
  font-weight: 500;
}

/* ========== Footer ========== */
#footer {
  text-align: center;
  padding: 24px 20px;
  background: var(--card-bg);
  border-top: 1px solid var(--border);
  margin-top: 40px;
}

.page-info {
  font-size: 13px;
  color: var(--text-muted);
}

.page-info a {
  color: var(--primary);
  text-decoration: none;
}

.page-info a:hover {
  text-decoration: underline;
}

/* ========== div#app ========== */
div#app {
  /* no max-width limit */
}

/* ========== Responsive ========== */
@media (max-width: 1024px) {
  #sidebar {
    flex: 0 0 260px;
  }
  .skills-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 768px) {
  #header {
    padding: 40px 20px 30px;
  }
  #header-name {
    font-size: 36px;
  }
  #header-title {
    font-size: 15px;
  }
  #app {
    flex-direction: column;
  }
  #sidebar {
    flex: none;
    width: 100%;
    position: static;
  }
  #main {
    padding: 20px 16px;
  }
  .card {
    padding: 20px 18px;
  }
  .skills-grid {
    grid-template-columns: 1fr;
    gap: 12px;
  }
  .section-title {
    font-size: 18px;
  }
}
