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

body {
  font-family: "Segoe UI", "Noto Sans TC", "Microsoft JhengHei", sans-serif;
  line-height: 1.6;
  color: #333;
  max-width: 800px;
  margin: 0 auto;
  padding: 40px 20px;
  background: #fff;
}

/* Header */
header {
  text-align: center;
  margin-bottom: 40px;
  padding-bottom: 20px;
  border-bottom: 2px solid #333;
}

header h1 {
  font-size: 2.5rem;
  letter-spacing: 0.3em;
  color: #555;
  font-weight: 300;
}

/* Section */
section {
  margin-bottom: 30px;
}

section h2 {
  font-size: 1.2rem;
  color: #333;
  border-bottom: 1px solid #ddd;
  padding-bottom: 8px;
  margin-bottom: 15px;
  letter-spacing: 0.1em;
}

/* Contact */
.contact ul {
  list-style: none;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 8px;
}

.contact li {
  font-size: 0.9rem;
}

.contact strong {
  color: #555;
}

/* Education */
.education h3 {
  font-size: 1rem;
  font-weight: 600;
}

.education .subtitle {
  color: #666;
  font-size: 0.9rem;
}

/* Achievement & Summary */
.achievement ul,
.summary ul {
  list-style: disc;
  padding-left: 20px;
}

.achievement li,
.summary li {
  margin-bottom: 8px;
  font-size: 0.9rem;
}

/* Highlights */
.highlights {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 15px;
  margin-top: 16px;
  margin-bottom: 20px;
}

.highlight-box {
  background: transparent;
  border: 1px solid #dee2e6;
  border-radius: 8px;
  padding: 15px;
  text-align: center;
  transition: transform 0.2s, box-shadow 0.2s;
}

.highlight-box:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.highlight-icon {
  width: 32px;
  height: 32px;
  margin: 0 auto 10px;
  display: block;
  color: #495057;
}

.highlight-box h4 {
  font-size: 0.9rem;
  color: #333;
  margin-bottom: 5px;
  font-weight: 600;
}

.highlight-box p {
  font-size: 0.75rem;
  color: #666;
  line-height: 1.4;
  margin: 0;
}

/* Awards */
.awards table {
  width: 100%;
  border-collapse: collapse;
}

.awards tr {
  border-bottom: 1px solid #eee;
}

.awards td {
  padding: 8px 0;
  font-size: 0.9rem;
}

.awards .award {
  text-align: right;
  font-weight: 600;
  color: #555;
}

/* Experience */
.experience article.job {
  margin-bottom: 25px;
  padding-bottom: 20px;
  border-bottom: 1px solid #eee;
}

.experience article.job:last-child {
  border-bottom: none;
}

.experience h3 {
  font-size: 1.1rem;
  color: #333;
  margin-bottom: 5px;
}

.experience .position {
  font-weight: 600;
  color: #555;
  font-size: 0.9rem;
  margin-bottom: 5px;
}

.experience .description {
  color: #666;
  font-size: 0.85rem;
  margin-bottom: 10px;
}

.experience .links {
  font-size: 0.85rem;
  color: #666;
  margin-bottom: 10px;
}

.experience .links a {
  color: #1a73e8;
  text-decoration: none;
}

.experience .links a:hover {
  text-decoration: underline;
}

.experience .job-content {
  display: flex;
  gap: 20px;
  align-items: flex-start;
}

.experience .job-content img {
  width: 150px;
  height: auto;
  object-fit: contain;
  flex-shrink: 0;
}

.experience ul {
  list-style: disc;
  padding-left: 20px;
}

.experience li {
  font-size: 0.9rem;
  margin-bottom: 5px;
  color: #555;
}

/* Side Projects */
.projects-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
}

.project {
  text-align: center;
}

.project a {
  color: #1a73e8;
  text-decoration: none;
  font-size: 0.85rem;
  display: block;
  margin-bottom: 8px;
}

.project a:hover {
  text-decoration: underline;
}

.project ul {
  list-style: none;
  font-size: 0.8rem;
  color: #666;
  margin-bottom: 10px;
}

.project img {
  max-width: 100%;
  height: auto;
  border: 1px solid #eee;
  border-radius: 4px;
}

/* Skills */
.skills table {
  width: 100%;
  border-collapse: collapse;
}

.skills tr {
  border-bottom: 1px solid #eee;
}

.skills th {
  text-align: right;
  padding: 10px 20px 10px 0;
  vertical-align: top;
  font-weight: 600;
  color: #555;
  width: 120px;
  font-size: 0.9rem;
}

.skills td {
  padding: 10px 0;
}

.skills td p {
  font-size: 0.9rem;
  color: #666;
  margin-bottom: 3px;
}

/* Talks */
.talks article {
  margin-bottom: 15px;
}

.talks p {
  font-size: 0.9rem;
  margin-bottom: 3px;
}

.talks a {
  color: #1a73e8;
  text-decoration: none;
  font-size: 0.85rem;
  word-break: break-all;
}

.talks a:hover {
  text-decoration: underline;
}

/* Print styles */
@media print {
  body {
    padding: 0;
    max-width: none;
  }

  section {
    page-break-inside: avoid;
  }
}

/* Responsive */
@media (max-width: 600px) {
  header h1 {
    font-size: 1.8rem;
    letter-spacing: 0.15em;
  }

  .projects-grid {
    grid-template-columns: 1fr;
  }

  .experience .job-content {
    flex-direction: column;
  }

  .experience .job-content img {
    width: 100%;
    max-width: 200px;
  }

  .skills th {
    display: block;
    text-align: left;
    width: 100%;
    padding-bottom: 5px;
  }

  .skills td {
    display: block;
  }

  .highlights {
    grid-template-columns: repeat(2, 1fr);
  }
}
