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

:root{
  --primary: #d78a3a;
  --text: #222;
  --muted: #555;
  --line: #111;
  --bg: #f2f2f2;
}

body {
  font-family: "Inter", sans-serif;
  background: var(--bg);
  color: var(--text);
  padding: 30px 0;
}

.top-actions{
  width: 100%;
  display: flex;
  justify-content: center;
  margin-bottom: 20px;
}

#downloadBtn{
  border: none;
  outline: none;
  background: #111;
  color: white;
  padding: 14px 24px;
  border-radius: 12px;
  cursor: pointer;
  font-size: 15px;
  font-weight: 600;
  transition: 0.3s ease;
  box-shadow: 0 10px 30px rgba(0,0,0,0.12);
}

#downloadBtn:hover{
  transform: translateY(-2px);
}

body.modal-open{
  overflow: hidden;
}

.pdf-preview{
  position: fixed;
  inset: 0;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 24px;
  z-index: 1000;
}

.pdf-preview.is-open{
  display: flex;
}

.pdf-preview__backdrop{
  position: absolute;
  inset: 0;
  background: rgba(17, 17, 17, 0.6);
  backdrop-filter: blur(2px);
}

.pdf-preview__dialog{
  position: relative;
  width: min(920px, 92vw);
  background: #fff;
  border-radius: 16px;
  box-shadow: 0 30px 80px rgba(0,0,0,0.35);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.pdf-preview__header{
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  border-bottom: 1px solid #eee;
}

.pdf-preview__header h3{
  font-size: 18px;
  font-weight: 700;
  color: #111;
}

.pdf-preview__close{
  border: none;
  background: transparent;
  color: #444;
  font-size: 18px;
  cursor: pointer;
  padding: 6px;
}

.pdf-preview__body{
  background: #f7f7f7;
  padding: 12px;
  height: min(72vh, 720px);
}

.pdf-preview__body iframe{
  width: 100%;
  height: 100%;
  border: none;
  background: #fff;
}

.pdf-preview__actions{
  display: flex;
  justify-content: flex-end;
  gap: 12px;
  padding: 16px 20px;
  border-top: 1px solid #eee;
}

.pdf-preview__actions button{
  border: none;
  outline: none;
  background: #111;
  color: #fff;
  padding: 10px 18px;
  border-radius: 10px;
  cursor: pointer;
  font-size: 14px;
  font-weight: 600;
  transition: 0.3s ease;
}

.pdf-preview__actions button:hover{
  transform: translateY(-1px);
}

.pdf-preview__actions .ghost-btn{
  background: #f1f1f1;
  color: #111;
  box-shadow: none;
}

.page-wrapper{
  display: flex;
  justify-content: center;
  align-items: flex-start;
}

.resume-container{
  width: 210mm;
  min-height: 297mm;
  background: white;
  padding: 20mm 14mm;
  box-shadow: 0 20px 60px rgba(0,0,0,0.12);
}

body.pdf-export .resume-container{
  padding: 12mm 3mm;
  box-shadow: none;
}

body.pdf-export .resume-header h1{
  font-size: 36px;
}

body.pdf-export .resume-header h2{
  font-size: 20px;
}

body.pdf-export .contact-row{
  gap: 12px;
  margin-top: 10px;
  font-size: 12px;
}

body.pdf-export .resume-content{
  gap: 22px;
}

body.pdf-export .section{
  margin-bottom: 18px;
}

body.pdf-export .section-title{
  font-size: 18px;
  margin-bottom: 10px;
  border-bottom-width: 3px;
}

body.pdf-export .section p{
  font-size: 12px;
  line-height: 1.55;
  margin-bottom: 10px;
}

body.pdf-export .experience-block{
  margin-bottom: 16px;
}

body.pdf-export .experience-block h4,
body.pdf-export .education-block h4,
body.pdf-export .project h4{
  font-size: 16px;
}

body.pdf-export .experience-block h5,
body.pdf-export .education-block h5{
  font-size: 14px;
  margin-bottom: 8px;
}

body.pdf-export .meta{
  gap: 12px;
  margin-bottom: 8px;
  font-size: 11px;
}

body.pdf-export .experience-block li{
  font-size: 12px;
  margin-bottom: 6px;
  line-height: 1.4;
}

body.pdf-export .skills-grid{
  gap: 8px;
}

body.pdf-export .skills-grid span{
  padding: 6px 10px;
  font-size: 12px;
}

body.pdf-export .project{
  margin-bottom: 14px;
  padding-bottom: 10px;
}

body.pdf-export .project p{
  font-size: 12px;
  margin-bottom: 4px;
}

body.pdf-export .achievement{
  margin-bottom: 14px;
}

body.pdf-export .achievement span{
  font-size: 12.5px;
}

.resume-header{
  margin-bottom: 20px;
}

.resume-header h1{
  font-size: 42px;
  font-weight: 800;
  letter-spacing: 1px;
  color: #111;
}

.resume-header h2{
  font-size: 24px;
  color: var(--primary);
  margin-top: 4px;
  font-weight: 700;
}

.contact-row{
  display: flex;
  flex-wrap: wrap;
  gap: 18px;
  margin-top: 14px;
  font-size: 13px;
  color: #444;
}

.contact-row span,
.contact-row a{
  display: flex;
  align-items: center;
  gap: 8px;
}

.contact-row a{
  color: inherit;
  text-decoration: none;
}

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

.contact-row i{
  color: var(--primary);
}

.resume-content{
  display: grid;
  grid-template-columns: 62% 34%;
  gap: 30px;
}

.section{
  margin-bottom: 24px;
}

.section-title{
  font-size: 20px;
  font-weight: 800;
  margin-bottom: 14px;
  padding-bottom: 6px;
  border-bottom: 4px solid #111;
  letter-spacing: 0.5px;
}

.section p{
  font-size: 13px;
  line-height: 1.7;
  color: #444;
  margin-bottom: 14px;
}

.experience-block{
  margin-bottom: 22px;
}

.experience-block h4,
.education-block h4,
.project h4{
  font-size: 18px;
  font-weight: 800;
  color: #111;
}

.experience-block h5,
.education-block h5{
  color: var(--primary);
  font-size: 16px;
  margin-top: 4px;
  margin-bottom: 10px;
}

.meta{
  display: flex;
  flex-wrap: wrap;
  gap: 18px;
  font-size: 12px;
  color: #555;
  margin-bottom: 10px;
}

.meta span{
  display: flex;
  align-items: center;
  gap: 7px;
}

.meta i{
  color: var(--primary);
}

.experience-block ul{
  padding-left: 18px;
}

.experience-block li{
  font-size: 13px;
  margin-bottom: 8px;
  line-height: 1.5;
  color: #444;
}

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

.skills-grid span{
  border: 1px solid #ddd;
  padding: 8px 14px;
  border-radius: 6px;
  font-size: 13px;
  font-weight: 600;
  background: #fafafa;
}

.project{
  margin-bottom: 18px;
  padding-bottom: 14px;
  border-bottom: 1px dashed #ddd;
}

.project p{
  margin-bottom: 5px;
  font-size: 13px;
}

.achievement{
  display: flex;
  gap: 12px;
  margin-bottom: 18px;
  align-items: flex-start;
}

.achievement i{
  color: var(--primary);
  font-size: 20px;
  margin-top: 2px;
}

.achievement span{
  font-size: 14px;
  font-weight: 600;
  line-height: 1.5;
}

.interests{
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px 28px;
}

.interest-item{
  display: flex;
  align-items: center;
  gap: 10px;
}

.interest-item i{
  color: var(--primary);
  font-size: 20px;
}

.interest-item span{
  font-weight: 600;
  white-space: nowrap;
}

@media (max-width: 900px){

  body{
    padding: 10px;
  }

  .resume-container{
    width: 100%;
    min-height: auto;
    padding: 24px;
  }

  .resume-content{
    grid-template-columns: 1fr;
  }

  .resume-header h1{
    font-size: 32px;
  }

  .resume-header h2{
    font-size: 20px;
  }

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

@page {
  size: A4;
  margin: 0;
}

@media print {

  body{
    background: white;
    padding: 0;
  }

  .top-actions{
    display: none;
  }

  .resume-container{
    width: 210mm;
    min-height: 297mm;
    box-shadow: none;
    margin: 0;
    page-break-inside: avoid;
  }

  *{
    -webkit-print-color-adjust: exact !important;
    print-color-adjust: exact !important;
  }
}