:root {
  --page-bg: #f0f0f0;
  --paper: #ffffff;
  --text: #1a1a1a;
  --text-secondary: #4a4a4a;
  --text-muted: #888888;
  --accent: #3b7ddd;
  --border: #e0e0e0;
  --tag-bg: #f2f2f2;
  --tag-border: #e8e8e8;
  --page-width: 595px;
  --font: Arial, Helvetica, sans-serif;
}

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

html {
  font-size: 14px;
  -webkit-font-smoothing: antialiased;
}

body {
  font-family: var(--font);
  color: var(--text);
  background: var(--page-bg);
  line-height: 1.5;
  min-height: 100vh;
}

a {
  color: inherit;
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

.page-wrapper {
  display: flex;
  justify-content: center;
  padding: 2rem 1rem 3rem;
}

.cv-page {
  width: 100%;
  max-width: var(--page-width);
  background: var(--paper);
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
  padding: 2.5rem 2.75rem 2rem;
}

.cv-header {
  display: flex;
  gap: 1.5rem;
  align-items: flex-start;
  margin-bottom: 2rem;
}

.header-photo img {
  width: 120px;
  height: 120px;
  object-fit: cover;
  border-radius: 4px;
  display: block;
}

.name {
  font-size: 1.45rem;
  font-weight: 700;
  color: var(--text);
  line-height: 1.2;
  letter-spacing: -0.01em;
}

.title {
  margin-top: 0.35rem;
  font-size: 0.95rem;
  color: var(--text-secondary);
}

.location {
  margin-top: 0.5rem;
  font-size: 0.85rem;
  color: var(--text-secondary);
}

.contact {
  margin-top: 0.35rem;
  font-size: 0.85rem;
  color: var(--text-secondary);
}

.contact .sep {
  margin: 0 0.35rem;
  color: var(--text-muted);
}

.social-links {
  display: flex;
  gap: 0.6rem;
  margin-top: 0.75rem;
}

.social-btn {
  display: inline-block;
  font-size: 0.82rem;
  font-weight: 500;
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 0.3rem 1rem;
  transition: background 0.15s;
}

.social-btn:hover {
  background: var(--tag-bg);
  text-decoration: none;
}

.section {
  margin-bottom: 1.75rem;
}

.section-title {
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-muted);
  margin-bottom: 0.4rem;
}

.section-divider {
  height: 1px;
  background: var(--border);
  margin-bottom: 1.1rem;
}

.entry {
  display: grid;
  grid-template-columns: 108px 1fr;
  gap: 0.5rem 1rem;
}

.entry-meta {
  padding-top: 0.1rem;
}

.entry-date {
  font-size: 0.82rem;
  color: var(--text-muted);
  line-height: 1.4;
}

.entry-duration {
  font-size: 0.82rem;
  color: var(--text-muted);
  margin-top: 0.15rem;
}

.entry-heading {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--text);
  line-height: 1.3;
}

.pipe {
  font-weight: 400;
  color: var(--text-muted);
}

.entry-desc {
  margin-top: 0.5rem;
  font-size: 0.85rem;
  color: var(--text-secondary);
  line-height: 1.55;
}

.entry-list {
  margin: 0.5rem 0 0 1rem;
  font-size: 0.85rem;
  color: var(--text-secondary);
}

.entry-list li {
  margin-bottom: 0.2rem;
  line-height: 1.5;
}

.highlight {
  color: var(--accent);
  font-weight: 600;
}

.tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-top: 0.65rem;
}

.tag {
  display: inline-block;
  font-size: 0.75rem;
  color: var(--text-secondary);
  background: var(--tag-bg);
  border: 1px solid var(--tag-border);
  border-radius: 4px;
  padding: 0.15rem 0.55rem;
  line-height: 1.4;
}

.project + .project {
  margin-top: 1.25rem;
}

.project-title {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 0.35rem;
}

.education-title {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--text);
}

.education-degree {
  margin-top: 0.15rem;
  font-size: 0.85rem;
  color: var(--text-secondary);
}

.education .entry-list {
  margin-top: 0.45rem;
}

.about {
  font-size: 0.85rem;
  color: var(--text-secondary);
  line-height: 1.6;
}

.cv-footer {
  margin-top: 1.5rem;
  padding-top: 1.25rem;
  border-top: 1px solid var(--border);
  text-align: center;
}

.download-link {
  display: inline-block;
  font-size: 0.82rem;
  font-weight: 500;
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 0.4rem 1.2rem;
  transition: background 0.15s;
}

.download-link:hover {
  background: var(--tag-bg);
  text-decoration: none;
}

@media print {
  body {
    background: #fff;
  }

  .page-wrapper {
    padding: 0;
  }

  .cv-page {
    box-shadow: none;
    max-width: none;
    padding: 1.5rem;
  }

  .cv-footer {
    display: none;
  }
}

@media (max-width: 600px) {
  .cv-page {
    padding: 1.5rem 1.25rem;
  }

  .cv-header {
    flex-direction: column;
    align-items: center;
    text-align: center;
  }

  .social-links {
    justify-content: center;
  }

  .entry {
    grid-template-columns: 1fr;
    gap: 0.25rem;
  }

  .entry-meta {
    display: flex;
    gap: 0.5rem;
    align-items: baseline;
  }

  .entry-duration {
    margin-top: 0;
  }
}
