/* 
  Modern 1-page CV Styles 
  Theme: Power Platform (Navy + Cyan/Light Blue)
  Optimized for Web & Print (1 page PDF via browser)
*/

:root {
  --bg-dark: #0a0f2c;
  --bg-light: #f8fafc;
  --text-primary: #1e293b;
  --text-muted: #64748b;
  --text-light: #f1f5f9;
  --text-light-muted: #cbd5e1;

  --primary: #00b4d8; /* Power Automate/Power Appsish blue */
  --secondary: #7b2ff7; /* Power Apps purple touch */
  --accent: #0ea5e9;

  --font: "Inter", system-ui, -apple-system, sans-serif;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: var(--font);
  background-color: #e2e8f0;
  color: var(--text-primary);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

/* Base Layout - Web View Wrapper */
.resume-container {
  max-width: 1100px;
  margin: 2rem auto;
  background: var(--bg-light);
  box-shadow:
    0 20px 25px -5px rgb(0 0 0 / 0.1),
    0 8px 10px -6px rgb(0 0 0 / 0.1);
  border-radius: 12px;
  overflow: hidden;
  display: grid;
  grid-template-columns: 320px 1fr;
  min-height: 100vh;
}

/* ================== LEFT SIDEBAR ================== */
.sidebar {
  background: var(--bg-dark);
  color: var(--text-light);
  padding: 3rem 2rem;
  display: flex;
  flex-direction: column;
  gap: 2.5rem;
  position: relative;
  z-index: 10;
}

.sidebar::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 6px;
  background: linear-gradient(90deg, var(--primary), var(--secondary));
}

.profile-section {
  text-align: center;
}

.avatar-container {
  width: 160px;
  height: 160px;
  margin: 0 auto 1.5rem;
  border-radius: 50%;
  padding: 4px;
  background: linear-gradient(135deg, var(--primary), var(--secondary));
}

.avatar {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 50%;
  border: 3px solid var(--bg-dark);
}

.name {
  font-size: 1.75rem;
  font-weight: 800;
  line-height: 1.1;
  margin-bottom: 0.5rem;
  letter-spacing: -0.5px;
}

.title {
  font-size: 1rem;
  font-weight: 500;
  color: var(--primary);
  text-transform: uppercase;
  letter-spacing: 1px;
}

.section-title {
  font-size: 1.1rem;
  font-weight: 700;
  color: white;
  margin-bottom: 1.25rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  padding-bottom: 0.5rem;
}

/* Lists */
.contact-list,
.language-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.contact-list li {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-size: 0.9rem;
  color: var(--text-light-muted);
}

.contact-list i {
  font-size: 1.2rem;
  color: var(--primary);
}

.hover-link {
  color: inherit;
  text-decoration: none;
  transition: color 0.2s ease;
}

.hover-link:hover {
  color: white;
}

/* Skills */
.skills-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.skill-badge {
  padding: 0.4rem 0.8rem;
  border-radius: 4px;
  font-size: 0.85rem;
  font-weight: 500;
}

.skill-badge.primary {
  background: rgba(0, 180, 216, 0.15);
  color: var(--primary);
  border: 1px solid rgba(0, 180, 216, 0.3);
}

.skill-badge.secondary {
  background: rgba(255, 255, 255, 0.05);
  color: var(--text-light-muted);
  border: 1px solid rgba(255, 255, 255, 0.1);
}

/* Languages */
.language-list li {
  display: flex;
  justify-content: space-between;
  font-size: 0.95rem;
}

.lang-level {
  color: var(--primary);
  font-size: 0.85rem;
}

/* Buttons */
.btn-link {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  background: rgba(255, 255, 255, 0.05);
  color: white;
  text-decoration: none;
  padding: 0.75rem 1rem;
  border-radius: 6px;
  font-size: 0.9rem;
  font-weight: 500;
  border: 1px solid rgba(255, 255, 255, 0.1);
  transition: all 0.2s;
}

.btn-link:hover {
  background: var(--primary);
  border-color: var(--primary);
  transform: translateY(-2px);
}

.mt-sm {
  margin-top: 0.75rem;
}

/* ================== RIGHT MAIN CONTENT ================== */
.main-content {
  background: var(--bg-light);
  padding: 3.5rem 4rem;
  display: flex;
  flex-direction: column;
  gap: 3.5rem;
}

.main-title {
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--bg-dark);
  margin-bottom: 1.5rem;
  display: flex;
  align-items: center;
  gap: 1rem;
}

.main-title::after {
  content: "";
  height: 2px;
  flex: 1;
  background: #e2e8f0;
}

/* Profile Summary */
.summary-text {
  font-size: 1.05rem;
  color: var(--text-muted);
  line-height: 1.7;
  text-align: justify;
}

.summary-text strong {
  color: var(--bg-dark);
}

/* Timeline/Experience */
.timeline {
  position: relative;
  padding-left: 1.5rem;
}

.timeline::before {
  content: "";
  position: absolute;
  left: 0;
  top: 8px; /* start at the dot */
  bottom: 0;
  width: 2px;
  background: #e2e8f0;
}

.timeline-item {
  position: relative;
  padding-bottom: 2.5rem;
}

.timeline-item:last-child {
  padding-bottom: 0;
}

.timeline-dot {
  position: absolute;
  left: -1.5rem;
  top: 6px;
  transform: translateX(-50%);
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: white;
  border: 3px solid var(--primary);
  z-index: 2;
}

.timeline-date {
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--primary);
  margin-bottom: 0.25rem;
  letter-spacing: 0.5px;
}

.job-role {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--bg-dark);
  margin-bottom: 0.25rem;
}

.job-company {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text-muted);
  margin-bottom: 0.75rem;
}

.job-desc {
  font-size: 0.95rem;
  color: var(--text-muted);
  margin-bottom: 1rem;
  font-style: italic;
}

.job-bullets {
  list-style: none;
  font-size: 0.95rem;
  color: var(--text-muted);
}

.job-bullets li {
  position: relative;
  padding-left: 1.25rem;
  margin-bottom: 0.5rem;
  line-height: 1.5;
}

.job-bullets li::before {
  content: "►";
  position: absolute;
  left: 0;
  top: 2px;
  font-size: 0.7rem;
  color: var(--primary);
}

.job-bullets strong {
  color: var(--text-primary);
}

/* Bottom Grid (Edu & Tech) */
.bottom-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
}

/* Education List */
.edu-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.edu-list li {
  display: flex;
  gap: 1rem;
  align-items: flex-start;
}

.edu-list i {
  font-size: 1.5rem;
  color: var(--bg-dark);
  margin-top: 2px;
}

.edu-list div {
  display: flex;
  flex-direction: column;
}

.edu-list strong {
  font-size: 0.95rem;
  color: var(--bg-dark);
}

.edu-list span {
  font-size: 0.85rem;
  color: var(--text-muted);
}

/* Extra tech */
.tech-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.tech-tags span {
  background: white;
  border: 1px solid #e2e8f0;
  padding: 0.4rem 0.8rem;
  border-radius: 40px;
  font-size: 0.85rem;
  color: var(--text-primary);
  font-weight: 500;
}

/* ================== ANIMATIONS ================== */
.fade-in {
  opacity: 0;
  transform: translateY(20px);
  animation: fadeIn 0.8s ease forwards;
}

.delay-1 {
  animation-delay: 0.2s;
}
.delay-2 {
  animation-delay: 0.4s;
}

@keyframes fadeIn {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ================== RESPONSIVE MOBILE ================== */
.print-msg {
  display: none;
}

@media (max-width: 900px) {
  .resume-container {
    grid-template-columns: 1fr;
    margin: 0;
    border-radius: 0;
  }
  .sidebar {
    padding: 2.5rem 1.5rem;
  }
  .main-content {
    padding: 2.5rem 1.5rem;
  }
  .bottom-grid {
    grid-template-columns: 1fr;
    gap: 2.5rem;
  }
}

/* ================== PRINT STYLES (PDF EXPORT) ================== */
@media print {
  @page {
    size: A4;
    margin: 0;
  }

  body {
    background: white !important;
    padding: 0 !important;
    margin: 0 !important;
    color: #1e293b !important;
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
  }

  .resume-container {
    margin: 0 !important;
    padding: 0 !important;
    box-shadow: none !important;
    width: 210mm;
    min-height: 297mm;
    max-height: 297mm;
    grid-template-columns: 185px 1fr !important;
    border-radius: 0 !important;
    overflow: hidden !important;
    page-break-after: avoid;
  }

  .sidebar {
    padding: 0.4rem 0.45rem !important;
    gap: 0.3rem !important;
    overflow: hidden !important;
  }

  .avatar-container {
    width: 60px !important;
    height: 60px !important;
    margin-bottom: 0.2rem !important;
  }

  .name {
    font-size: 1rem !important;
    line-height: 1 !important;
  }

  .title {
    font-size: 0.6rem !important;
    margin-top: -2px !important;
  }

  .profile-section {
    margin-bottom: 0 !important;
  }

  .sidebar-section {
    gap: 0.3rem !important;
  }

  .section-title {
    font-size: 0.75rem !important;
    margin-bottom: 0.2rem !important;
    padding-bottom: 0.1rem !important;
  }

  .contact-list, .language-list {
    gap: 0.1rem !important;
  }

  .contact-list li, .language-list li {
    font-size: 0.6rem !important;
  }

  .contact-list i {
    font-size: 0.75rem !important;
  }

  .skills-grid {
    gap: 0.15rem !important;
  }

  .skill-badge {
    padding: 0.05rem 0.25rem !important;
    font-size: 0.55rem !important;
    line-height: 1.2 !important;
  }

  .main-content {
    padding: 1rem 1.25rem !important;
    gap: 0.8rem !important;
  }

  .main-title {
    font-size: 1rem !important;
    margin-bottom: 0.3rem !important;
  }

  .summary-text {
    font-size: 0.75rem !important;
    line-height: 1.2 !important;
  }

  .timeline {
    padding-left: 0.75rem !important;
  }

  .timeline-item {
    padding-bottom: 0.4rem !important;
  }

  .job-role {
    font-size: 0.9rem !important;
    line-height: 1 !important;
  }

  .job-company {
    font-size: 0.75rem !important;
    margin-bottom: 1px !important;
  }

  .job-desc {
    display: none !important; 
  }

  .job-bullets {
    font-size: 0.7rem !important;
    line-height: 1.15 !important;
  }

  .job-bullets li {
    margin-bottom: 1px !important;
    padding-left: 0.75rem !important;
  }

  .bottom-grid {
    gap: 1.5rem !important;
    margin-top: 5px !important;
    grid-template-columns: 1fr; /* Stack education to save width if needed */
  }

  .edu-list {
    gap: 0.2rem !important;
  }

  .edu-list i {
    font-size: 0.9rem !important;
  }

  .edu-list strong {
    font-size: 0.75rem !important;
  }

  .edu-list span {
    font-size: 0.65rem !important;
  }

  /* Show links as simple text in print mode */
  .btn-link {
    background: transparent !important;
    color: var(--primary) !important;
    border: none !important;
    padding: 0.1rem 0 !important;
    text-decoration: underline !important;
    font-size: 0.65rem !important;
    justify-content: flex-start !important;
    margin-top: 0 !important;
  }

  .btn-link i {
    display: none !important;
  }

  .mt-sm {
    margin-top: 0.2rem !important;
  }

  /* Hide print-unfriendly buttons */
  .sidebar::before, .print-btn {
    display: none !important;
  }

  .print-msg {
    display: block !important;
    position: absolute !important;
    bottom: 5px !important;
    left: 0 !important;
    right: 0 !important;
    text-align: center !important;
    font-size: 0.5rem !important;
    opacity: 0.4 !important;
  }
}
