@import url('https://fonts.googleapis.com/css2?family=Source+Sans+3:wght@400;500;600;700&display=swap');

* {
  font-family: 'Source Sans 3', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  box-sizing: border-box;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizelegibility;
  margin: 0;
  padding: 0;
}

html {
  font-size: 16px;
}

body {
  font-family: Arial, sans-serif;
  line-height: 1.4;
  color: #333;
  background: white;
  min-height: 100vh;
  display: flex;
  justify-content: center;
  padding: 15px;
}

.container {
  width: 100%;
  max-width: 1000px;
  margin: 0 auto;
  padding: 15px;
  background: white;
  position: relative;
}

/* Responsive container */
@media screen and (max-width: 1024px) {
  .container {
    max-width: 800px;
  }
}

@media screen and (max-width: 768px) {
  body {
    padding: 10px;
  }
  
  .container {
    padding: 12px;
  }

  .skills-container {
    display: flex !important;
    flex-direction: column !important;
    grid-template-columns: unset;
    grid: none;
    gap: 0;
  }

  .skill-section {
    margin-bottom: 25px;
    width: 100%;
  }

  .skill-section:last-child {
    margin-bottom: 0;
  }

  .skill-section h3 {
    font-size: 15px;
    margin-bottom: 10px;
    padding-bottom: 5px;
    border-bottom: 1px solid #e2e8f0;
  }

  .skill-section ul {
    padding-left: 20px;
  }

  .skill-section li {
    margin-bottom: 6px;
    line-height: 1.4;
  }

  .print-button {
    position: fixed;
    bottom: 15px;
    right: 15px;
  }
}

@media screen and (max-width: 480px) {
  body {
    padding: 8px;
  }
  
  .container {
    padding: 10px;
  }

  .name {
    font-size: 20px;
  }

  .role {
    font-size: 14px;
  }

  .skills-container {
    margin-top: 5px;
    display: flex !important;
    flex-direction: column !important;
    grid-template-columns: unset;
    grid: none;
    gap: 0;
  }

  .skill-section {
    margin-bottom: 20px;
  }

  .skill-section:last-child {
    margin-bottom: 0;
  }
  
  .skill-section h3 {
    font-size: 14px;
    margin-bottom: 8px;
  }

  .skill-section ul {
    padding-left: 16px;
  }

  .skill-section li {
    margin-bottom: 4px;
    font-size: 13px;
  }

  section h2 {
    font-size: 16px;
  }

  .job-header h3 {
    font-size: 14px;
  }

  .job-period {
    font-size: 12px;
  }

  .contact-info {
    font-size: 12px;
  }

  .contact-info .label {
    min-width: 70px;
  }

  .print-button {
    bottom: 10px;
    right: 10px;
  }

  .print-button button {
    padding: 6px 12px;
    font-size: 12px;
  }
}

/* Header styles */
header {
  margin-bottom: 20px;
}

.name {
  font-size: 24px;
  margin: 0 0 5px;
  word-wrap: break-word;
}

.role {
  font-size: 16px;
  margin: 0 0 10px;
  color: #666;
  word-wrap: break-word;
}

.contact-info {
  display: flex;
  flex-direction: column;
  gap: 8px;
  font-size: 14px;
}

.contact-info div {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  flex-wrap: wrap;
}

.contact-info .label {
  font-weight: bold;
  color: #555;
  min-width: 80px;
}

.contact-info a {
  color: #2c5282;
  text-decoration: none;
  word-break: break-all;
}

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

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

section h2 {
  font-size: 18px;
  margin: 0 0 15px;
  padding-bottom: 5px;
  border-bottom: 2px solid #2c5282;
  word-wrap: break-word;
}

h3 {
  font-size: 1.25rem;
  font-weight: 600;
  color: #2D3748;
  margin: 0 0 1rem 0;
}

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

.skill-section h3 {
  font-size: 16px;
  margin: 0 0 10px;
  color: #444;
  word-wrap: break-word;
}

.skill-section ul {
  margin: 0;
  padding-left: 20px;
}

.skill-section li {
  margin-bottom: 5px;
  word-wrap: break-word;
}

/* Experience section */
.job {
  margin-bottom: 2rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid #eee;
}

.job-header {
  margin-bottom: 1rem;
}

.job-header h3 {
  margin: 0;
  color: #2c3e50;
  font-size: 1.1rem;
}

.job-period {
  color: #666;
  font-size: 0.9rem;
  margin-top: 0.25rem;
}

.job-details {
  margin-top: 1rem;
}

.job-description {
  margin-bottom: 1rem;
  line-height: 1.6;
  font-size: 0.95rem;
}

.job-info {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  margin-bottom: 1rem;
  font-size: 0.9rem;
  color: #555;
}

.job-technologies,
.job-team {
  flex: 1;
  min-width: 200px;
}

.job-technologies strong,
.job-team strong {
  color: #2c3e50;
  margin-right: 0.5rem;
}

.job-achievements {
  margin-top: 1rem;
}

.job-achievements h4 {
  color: #2c3e50;
  margin-bottom: 0.5rem;
  font-size: 1rem;
}

.job-achievements ul {
  margin: 0;
  padding-left: 1.5rem;
}

.job-achievements li {
  margin-bottom: 0.5rem;
  line-height: 1.5;
  font-size: 0.95rem;
}

/* Projects */
.project {
  margin-bottom: 12px;
}

.project:last-child {
  margin-bottom: 0;
}

.project h3 {
  font-size: 16px;
  margin: 0 0 4px;
}

.project-tech {
  font-size: 14px;
  color: #666;
  margin-bottom: 6px;
}

.project p {
  margin: 0 0 6px;
}

.project ul {
  margin: 0;
  padding-left: 20px;
}

.project li {
  margin-bottom: 4px;
}

/* Education */
.education-item {
  margin-bottom: 12px;
}

.education-item:last-child {
  margin-bottom: 0;
}

.education-item h3 {
  font-size: 16px;
  margin: 0 0 4px;
}

.education-period {
  font-size: 14px;
  color: #666;
  margin-bottom: 2px;
}

.education-location {
  font-size: 14px;
  color: #666;
}

/* Print button */
.print-button {
  position: fixed;
  bottom: 20px;
  right: 20px;
  z-index: 100;
  display: flex;
  gap: 10px;
}

.print-button button {
  background-color: #2c5282;
  color: white;
  border: none;
  padding: 8px 16px;
  border-radius: 4px;
  cursor: pointer;
  font-size: 14px;
  display: flex;
  align-items: center;
  gap: 6px;
  box-shadow: 0 2px 4px rgba(0,0,0,0.1);
  transition: background-color 0.2s ease;
}

.print-button button:hover {
  background-color: #1a365d;
}

#language-toggle {
  background-color: #38a169;
}

#language-toggle:hover {
  background-color: #2f855a;
}

/* Print Styles */
@media print {
  @page {
    margin: 0.8cm;
    size: A4;
  }

  * {
    margin: 0;
    padding: 0;
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
  }

  html {
    font-size: 9pt;
  }

  body {
    padding: 0;
    margin: 0;
    line-height: 1.15;
    color: #000;
    min-height: 0;
    background: none;
  }

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

  header {
    margin-bottom: 8pt;
  }

  .name {
    font-size: 14pt;
    margin-bottom: 2pt;
    color: #2c5282;
  }

  .role {
    font-size: 10pt;
    margin-bottom: 4pt;
    color: #444;
  }

  .contact-info {
    gap: 2pt;
    margin-bottom: 8pt;
  }

  .contact-info div {
    font-size: 8pt;
    gap: 3pt;
  }

  section {
    margin-bottom: 4pt !important;
    page-break-inside: avoid;
    padding: 0 !important;
  }

  section h2 {
    font-size: 12pt;
    margin-bottom: 6pt;
    padding-bottom: 2pt;
    border-bottom: 1pt solid #2c5282;
    color: #2c5282;
  }

  h3 {
    font-size: 9pt;
    margin-bottom: 2pt;
    color: #2c5282;
  }

  p, li {
    font-size: 9pt;
    line-height: 1.2;
    margin-bottom: 1pt;
  }

  /* Skills section specific */
  .skills-container {
    gap: 6pt;
    margin-bottom: 8pt;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
  }

  .skill-section {
    break-inside: avoid;
    margin-bottom: 0;
  }

  .skill-section h3 {
    margin-bottom: 2pt;
    color: #444;
    font-weight: 600;
  }

  .skill-section ul {
    padding-left: 10pt;
  }

  .skill-section li {
    margin-bottom: 0;
    line-height: 1.2;
  }

  /* Experience section */
  .job {
    margin-bottom: 4pt !important;
    page-break-inside: avoid;
    padding-bottom: 0 !important;
    border-bottom: none !important;
  }

  .job:last-child {
    margin-bottom: 8pt;
  }

  .job-header {
    margin-bottom: 2pt;
  }

  .job ul {
    padding-left: 10pt;
  }

  .job li {
    margin-bottom: 1pt;
  }

  .job-period {
    font-size: 8pt;
    color: #444;
  }

  .job-description {
    font-size: 9pt;
    margin-bottom: 4pt;
  }

  .job-info {
    gap: 4pt;
    margin-bottom: 4pt;
    font-size: 8pt;
  }

  .job-achievements h4 {
    font-size: 9pt;
    margin-bottom: 2pt;
  }

  .job-achievements li {
    font-size: 8pt;
    margin-bottom: 2pt;
  }

  /* Projects section */
  .project {
    margin-bottom: 4pt !important;
    page-break-inside: avoid;
  }

  .project-tech {
    font-size: 8pt;
    color: #444;
    margin-bottom: 1pt;
    font-style: italic;
  }

  .project ul {
    padding-left: 10pt;
  }

  /* Education section */
  .education-item {
    margin-bottom: 4pt;
    page-break-inside: avoid;
  }

  .education-period, .education-location {
    font-size: 8pt;
    color: #444;
  }

  .print-button {
    display: none;
  }

  a {
    text-decoration: none;
    color: #2c5282;
  }

  ul {
    list-style-type: square;
  }
}