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

:root {
  --bg: #fafafa;
  --surface: #ffffff;
  --text: #1a1a1a;
  --text-secondary: #6b7280;
  --accent: #0071e3;
  --border: #e5e7eb;
  --radius: 12px;
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

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

/* Hero */
.hero {
  padding: 80px 0 60px;
  text-align: center;
}

.hero h1 {
  font-size: 2.5rem;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.tagline {
  font-size: 1.15rem;
  color: var(--text-secondary);
  margin-top: 8px;
}

.intro {
  margin-top: 20px;
  font-size: 1.05rem;
  color: var(--text-secondary);
  max-width: 560px;
  margin-left: auto;
  margin-right: auto;
  line-height: 1.7;
}

.hero-links {
  margin-top: 24px;
}

.hero-links a {
  color: var(--accent);
  text-decoration: none;
  font-weight: 500;
  font-size: 0.95rem;
}

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

/* Sections */
section {
  margin-bottom: 64px;
}

section > h2 {
  font-size: 1.25rem;
  font-weight: 600;
  margin-bottom: 24px;
  letter-spacing: -0.01em;
}

/* Timeline */
.timeline {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.job {
  display: grid;
  grid-template-columns: 160px 1fr;
  gap: 16px;
  padding: 20px 24px;
  background: var(--surface);
  border-radius: var(--radius);
  border: 1px solid var(--border);
  transition: box-shadow 0.2s;
}

.job:hover {
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.06);
}

.job-period {
  font-size: 0.85rem;
  color: var(--text-secondary);
  padding-top: 2px;
  white-space: nowrap;
}

.job-body h3 {
  font-size: 1rem;
  font-weight: 600;
}

.badge {
  font-size: 0.75rem;
  font-weight: 500;
  color: var(--accent);
  background: rgba(0, 113, 227, 0.08);
  padding: 2px 8px;
  border-radius: 6px;
  vertical-align: middle;
}

.company {
  font-weight: 500;
  color: var(--text-secondary);
  font-size: 0.95rem;
}

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

.description {
  font-size: 0.9rem;
  margin-top: 8px;
  color: var(--text-secondary);
  line-height: 1.65;
}

.detail {
  font-size: 0.9rem;
  margin-top: 6px;
  color: var(--text-secondary);
}

/* Tags */
.tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 12px;
}

.tag {
  font-size: 0.75rem;
  font-weight: 500;
  padding: 3px 10px;
  border-radius: 100px;
  background: #f3f4f6;
  color: var(--text-secondary);
}

/* Skills */
.skill-group {
  margin-bottom: 28px;
}

.skill-group h3 {
  font-size: 0.85rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-secondary);
  margin-bottom: 12px;
}

.skills-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.skill {
  background: var(--surface);
  border: 1px solid var(--border);
  padding: 8px 16px;
  border-radius: 100px;
  font-size: 0.9rem;
  font-weight: 500;
}

.skill.strong {
  background: var(--text);
  color: var(--surface);
  border-color: var(--text);
}

.skill.muted {
  opacity: 0.5;
}

/* Interests */
.interests-text {
  font-size: 1rem;
  color: var(--text-secondary);
  line-height: 1.7;
}

/* Footer */
footer {
  padding: 40px 0;
  text-align: center;
  color: var(--text-secondary);
  font-size: 0.85rem;
}

/* Responsive */
@media (max-width: 600px) {
  .hero {
    padding: 48px 0 40px;
  }

  .hero h1 {
    font-size: 1.75rem;
  }

  .job {
    grid-template-columns: 1fr;
    gap: 4px;
  }

  .job-period {
    font-size: 0.8rem;
  }
}

/* Print / PDF styles */
@media print {
  :root {
    --bg: #ffffff;
    --surface: #ffffff;
    --border: #d1d5db;
  }

  body {
    font-size: 9.5pt;
    line-height: 1.5;
    background: white;
  }

  .container {
    max-width: 100%;
    padding: 0;
  }

  /* Compact hero */
  .hero {
    padding: 0 0 20px;
    border-bottom: 2px solid var(--text);
    margin-bottom: 8px;
  }

  .hero h1 {
    font-size: 1.8rem;
    margin-bottom: 2px;
  }

  .tagline {
    font-size: 0.95rem;
    margin-top: 2px;
  }

  .intro {
    margin-top: 10px;
    font-size: 0.9rem;
    max-width: 100%;
    line-height: 1.55;
  }

  .hero-links {
    margin-top: 10px;
  }

  .hero-links a {
    color: var(--text);
    font-size: 0.85rem;
  }

  /* Tighter sections */
  section {
    margin-bottom: 20px;
  }

  section > h2 {
    font-size: 1.05rem;
    margin-bottom: 10px;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    border-bottom: 1px solid var(--border);
    padding-bottom: 4px;
  }

  /* Compact job cards */
  .timeline {
    gap: 0;
  }

  .job {
    grid-template-columns: 120px 1fr;
    gap: 12px;
    padding: 10px 0;
    background: transparent;
    border: none;
    border-radius: 0;
    border-bottom: 1px solid #eee;
    page-break-inside: avoid;
    break-inside: avoid;
  }

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

  .job:hover {
    box-shadow: none;
  }

  .job-period {
    font-size: 0.75rem;
    padding-top: 1px;
  }

  .job-body h3 {
    font-size: 0.9rem;
  }

  .badge {
    font-size: 0.65rem;
    padding: 1px 6px;
    border: 1px solid var(--accent);
    background: transparent;
    color: var(--accent);
  }

  .company {
    font-size: 0.85rem;
  }

  .location {
    font-size: 0.75rem;
  }

  .description {
    font-size: 0.8rem;
    margin-top: 4px;
    line-height: 1.5;
    color: #444;
  }

  /* Compact tags */
  .tags {
    margin-top: 6px;
    gap: 4px;
  }

  .tag {
    font-size: 0.65rem;
    padding: 1px 7px;
    background: #f0f0f0;
  }

  /* Compact skills */
  .skill-group {
    margin-bottom: 14px;
  }

  .skill-group h3 {
    font-size: 0.7rem;
    margin-bottom: 6px;
  }

  .skills-grid {
    gap: 4px;
  }

  .skill {
    font-size: 0.75rem;
    padding: 4px 10px;
    border-color: #ccc;
  }

  .skill.strong {
    background: var(--text);
    color: white;
    border-color: var(--text);
  }

  /* Education: compact */
  #education .job {
    padding: 6px 0;
  }

  /* Skills + Education + Interests: keep together on last page */
  #education, #skills, #interests {
    page-break-inside: avoid;
    break-inside: avoid;
  }

  /* Interests */
  .interests-text {
    font-size: 0.85rem;
  }

  /* Hide footer */
  footer {
    display: none;
  }
}
