:root {
  --primary: #1e293b;
  --primary-light: #334155;
  --accent: #0284c7;
  --accent-bg: #f0f9ff;
  --text-dark: #0f172a;
  --text-muted: #475569;
  --bg-main: #f8fafc;
  --bg-card: #ffffff;
  --border: #e2e8f0;
  --radius: 6px;
  --shadow: 0 1px 3px rgba(0, 0, 0, 0.05), 0 1px 2px rgba(0, 0, 0, 0.02);
}

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

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  background-color: var(--bg-main);
  color: var(--text-dark);
  line-height: 1.5;
  padding: 2rem 1rem;
}

.resume-container {
  max-width: 960px;
  margin: 0 auto;
  background: var(--bg-card);
  box-shadow: var(--shadow);
  border-radius: var(--radius);
  border: 1px solid var(--border);
  overflow: hidden;
}

/* Header Styles */
header {
  background-color: var(--primary);
  color: #ffffff;
  padding: 2.5rem 2rem;
  border-bottom: 4px solid var(--accent);
}

.header-main {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

header h1 {
  font-size: 2.25rem;
  font-weight: 700;
  letter-spacing: -0.025em;
  text-transform: uppercase;
}

header h2 {
  font-size: 1.2rem;
  color: #bae6fd;
  font-weight: 500;
  margin-bottom: 1rem;
}

.contact-info {
  display: flex;
  flex-wrap: wrap;
  gap: 1.25rem;
  font-size: 0.9rem;
  color: #e2e8f0;
}

.contact-info a {
  color: #e2e8f0;
  text-decoration: none;
  transition: color 0.2s;
}

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

.contact-item {
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

/* Section Layouts */
.resume-content {
  padding: 2rem;
}

section {
  margin-bottom: 2.25rem;
}

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

.section-title {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--primary);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 1rem;
  padding-bottom: 0.3rem;
  border-bottom: 2px solid var(--border);
  position: relative;
}

.section-title::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 50px;
  height: 2px;
  background-color: var(--accent);
}

/* Summary & Skills */
.summary-text {
  color: var(--text-dark);
  text-align: justify;
  font-size: 0.95rem;
}

.skills-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1rem;
}

.skill-category {
  background: var(--bg-main);
  padding: 0.85rem;
  border-radius: var(--radius);
  border-left: 3px solid var(--accent);
}

.skill-category strong {
  display: block;
  font-size: 0.85rem;
  text-transform: uppercase;
  color: var(--primary-light);
  margin-bottom: 0.25rem;
  letter-spacing: 0.02em;
}

.skill-category p {
  font-size: 0.9rem;
  color: var(--text-dark);
}

/* Experience Timeline */
.timeline-item {
  margin-bottom: 1.5rem;
}

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

.job-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  flex-wrap: wrap;
  margin-bottom: 0.4rem;
}

.job-title-company {
  font-size: 1.05rem;
  color: var(--text-dark);
}

.job-title-company h3 {
  font-weight: 700;
  display: inline;
}

.job-title-company .company {
  color: var(--accent);
  font-weight: 600;
}

.job-date {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-muted);
  background: var(--bg-main);
  padding: 0.15rem 0.5rem;
  border-radius: 4px;
}

.job-bullets,
.project-bullets {
  list-style-type: none;
  padding-left: 0;
}

.job-bullets li,
.project-bullets li {
  position: relative;
  padding-left: 1.25rem;
  margin-bottom: 0.35rem;
  font-size: 0.92rem;
  color: var(--text-dark);
  text-align: justify;
}

.job-bullets li::before,
.project-bullets li::before {
  content: "•";
  position: absolute;
  left: 0.3rem;
  color: var(--accent);
  font-weight: bold;
}

/* Projects Grid */
.projects-container {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.project-card {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.2rem;
  background: #ffffff;
  transition: transform 0.2s, box-shadow 0.2s;
}

.project-card:hover {
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.04);
  border-color: #cbd5e1;
}

.project-title {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--primary);
  margin-bottom: 0.25rem;
}

.project-tech {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--accent);
  background: var(--accent-bg);
  padding: 0.2rem 0.5rem;
  border-radius: 4px;
  display: inline-block;
  margin-bottom: 0.6rem;
}

.project-desc {
  font-size: 0.9rem;
  color: var(--text-muted);
  margin-bottom: 0.6rem;
  font-style: italic;
}

/* Education */
.edu-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
}

.edu-details h3 {
  font-size: 1.05rem;
  font-weight: 700;
}

.edu-details p {
  font-size: 0.92rem;
  color: var(--text-muted);
}

/* Responsive Design Media Queries */
@media (max-width: 768px) {
  body {
    padding: 0;
  }

  .resume-container {
    border-radius: 0;
    border: none;
  }

  header {
    padding: 1.5rem 1.25rem;
  }

  header h1 {
    font-size: 1.75rem;
  }

  .contact-info {
    flex-direction: column;
    gap: 0.4rem;
  }

  .resume-content {
    padding: 1.25rem;
  }

  .job-header {
    flex-direction: column;
    gap: 0.2rem;
    margin-bottom: 0.5rem;
  }

  .job-date {
    align-self: flex-start;
  }

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

  .edu-item {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.2rem;
  }
}

/* Print optimization */
@media print {
  body {
    background-color: #fff;
    padding: 0;
    color: #000;
  }

  .resume-container {
    box-shadow: none;
    border: none;
    max-width: 100%;
  }

  header {
    background-color: #fff !important;
    color: #000 !important;
    padding: 0 0 1rem 0;
    border-bottom: 2px solid #000;
  }

  header h1 {
    color: #000 !important;
  }

  header h2 {
    color: #333 !important;
  }

  .contact-info,
  .contact-info a {
    color: #333 !important;
  }

  .job-date {
    background: none;
    padding: 0;
  }

  .skill-category {
    background: none;
    border-left: 1px solid #000;
  }

  .project-card {
    page-break-inside: avoid;
    border: 1px solid #ccc;
  }

  .section-title::after {
    background-color: #000;
  }
}