/* ═══════════════════════════════════════════════
   SURAT LAMARAN KERJA — Edvan M
   Theme: Modern Dark, konsisten dengan portofolio
   ═══════════════════════════════════════════════ */

:root {
  --bg-primary: #0a0a0f;
  --bg-secondary: #111118;
  --bg-card: #16161e;
  --bg-card-hover: #1c1c28;
  --text-primary: #f0f0f5;
  --text-secondary: #9999aa;
  --text-muted: #666680;
  --accent-1: #6c63ff;
  --accent-2: #00d4aa;
  --accent-gradient: linear-gradient(135deg, #6c63ff, #00d4aa);
  --border-color: rgba(255, 255, 255, 0.08);
  --border-hover: rgba(255, 255, 255, 0.16);
  --radius: 16px;
  --radius-sm: 8px;
  --transition: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  --font: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-mono: 'JetBrains Mono', monospace;
}

*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  font-family: var(--font);
  background: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.75;
  -webkit-font-smoothing: antialiased;
  padding: 32px 16px 0;
}

body.lang-ko {
  font-family: 'Noto Sans KR', var(--font);
}
body.lang-ko .sheet,
body.lang-ko .section,
body.lang-ko .footer {
  font-family: 'Noto Sans KR', var(--font);
}

a { color: inherit; text-decoration: none; }

.contact-line a,
.data-value a {
  color: var(--accent-2);
  text-decoration: none;
  transition: var(--transition);
}
.contact-line a:hover,
.data-value a:hover {
  color: var(--accent-1);
  text-decoration: underline;
}

.gradient-text {
  background: var(--accent-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.accent { color: var(--accent-1); }

/* ═══ ACTION BAR (sticky) ═══ */
.action-bar {
  position: sticky;
  top: 16px;
  z-index: 100;
  max-width: 880px;
  margin: 0 auto 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
  padding: 10px 14px;
  background: rgba(22, 22, 30, 0.85);
  backdrop-filter: blur(16px);
  border: 1px solid var(--border-color);
  border-radius: 100px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3);
}

/* Language toggle pill */
.lang-toggle {
  display: inline-flex;
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: 100px;
  padding: 4px;
  gap: 2px;
}
.lang-btn {
  border: none;
  background: transparent;
  color: var(--text-secondary);
  font-family: var(--font);
  font-size: 0.82rem;
  font-weight: 600;
  padding: 6px 14px;
  border-radius: 100px;
  cursor: pointer;
  transition: var(--transition);
  letter-spacing: 0.3px;
}
.lang-btn:hover { color: var(--text-primary); }
.lang-btn.active {
  background: var(--accent-gradient);
  color: #fff;
  box-shadow: 0 2px 8px rgba(108, 99, 255, 0.35);
}

.btn-link {
  font-size: 0.9rem;
  color: var(--text-secondary);
  transition: var(--transition);
}
.btn-link:hover { color: var(--text-primary); }

.btn {
  padding: 9px 18px;
  border-radius: 100px;
  font-weight: 600;
  font-size: 0.84rem;
  transition: var(--transition);
  cursor: pointer;
  border: none;
  font-family: var(--font);
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.btn-primary {
  background: var(--accent-gradient);
  color: #fff;
  box-shadow: 0 4px 20px rgba(108, 99, 255, 0.3);
}
.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 28px rgba(108, 99, 255, 0.42);
}
.btn-outline {
  background: transparent;
  color: var(--text-primary);
  border: 1px solid var(--border-hover);
}
.btn-outline:hover {
  border-color: var(--accent-1);
  background: rgba(108, 99, 255, 0.08);
}

/* ═══ SHEET (kertas surat) ═══ */
.sheet {
  max-width: 880px;
  margin: 0 auto;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: var(--radius);
  padding: 56px 64px;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.4);
  position: relative;
  overflow: hidden;
}
.sheet::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 4px;
  background: var(--accent-gradient);
}

/* ═══ HEADER ═══ */
.letter-header {
  display: flex;
  align-items: center;
  gap: 24px;
  padding-bottom: 28px;
  border-bottom: 1px solid var(--border-color);
  margin-bottom: 28px;
}
.photo-wrap {
  position: relative;
  flex-shrink: 0;
  width: 130px;
  height: 130px;
  border-radius: 50%;
  overflow: hidden;
  border: 3px solid transparent;
  background: linear-gradient(var(--bg-card), var(--bg-card)) padding-box,
              var(--accent-gradient) border-box;
  box-shadow: 0 8px 24px rgba(108, 99, 255, 0.25);
}
.photo {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 18%;
  transform: scale(1.85);
  transform-origin: center 30%;
}
.header-info { flex: 1; min-width: 0; }
.applicant-name {
  font-size: 1.7rem;
  font-weight: 800;
  letter-spacing: -0.5px;
  margin-bottom: 4px;
}
.applicant-role {
  color: var(--text-secondary);
  font-size: 0.92rem;
  font-weight: 500;
  margin-bottom: 10px;
}
.contact-line {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  font-size: 0.83rem;
  color: var(--text-muted);
}

.date-line {
  text-align: right;
  font-size: 0.88rem;
  color: var(--text-secondary);
  margin-bottom: 18px;
}
.subject-ref {
  margin-top: 6px;
  font-size: 0.85rem;
  color: var(--text-secondary);
}
.subject-ref strong { color: var(--text-primary); }

@keyframes pulse { 0%, 100% { opacity: 1; } 50% { opacity: 0.4; } }

/* ═══ SUBJECT ═══ */
.subject-block {
  margin-bottom: 28px;
}
.subject-tag {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 1.2px;
  text-transform: uppercase;
  color: var(--accent-1);
  background: rgba(108, 99, 255, 0.12);
  padding: 4px 12px;
  border-radius: 100px;
  margin-bottom: 12px;
}
.subject-title {
  font-size: 1.4rem;
  font-weight: 700;
  line-height: 1.4;
  letter-spacing: -0.4px;
}

/* ═══ RECIPIENT ═══ */
.recipient {
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  padding: 18px 22px;
  margin-bottom: 24px;
  font-size: 0.95rem;
}
.recipient p { margin: 0; line-height: 1.8; }
.recipient em { color: var(--text-muted); font-style: normal; }

.salutation {
  font-weight: 600;
  margin-bottom: 18px;
}

/* ═══ BODY ═══ */
.letter-body p {
  margin-bottom: 16px;
  color: var(--text-primary);
  font-size: 0.97rem;
  text-align: justify;
}
.letter-body strong { color: var(--text-primary); font-weight: 600; }

/* ═══ DATA GRID ═══ */
.data-grid {
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  padding: 20px 24px;
  margin: 8px 0 28px;
}
.data-row {
  display: grid;
  grid-template-columns: 220px 1fr;
  gap: 16px;
  padding: 9px 0;
  border-bottom: 1px dashed var(--border-color);
  font-size: 0.92rem;
}
.data-row:last-child { border-bottom: none; }
.data-label {
  color: var(--text-secondary);
  font-weight: 500;
}
.data-value {
  color: var(--text-primary);
  font-weight: 500;
}

/* ═══ HIGHLIGHT BLOCK ═══ */
.highlight-block {
  margin-bottom: 28px;
}
.block-title {
  font-size: 1rem;
  font-weight: 700;
  margin-bottom: 14px;
  letter-spacing: -0.2px;
  display: flex;
  align-items: center;
  gap: 10px;
}
.block-title::before {
  content: '';
  width: 4px;
  height: 18px;
  border-radius: 2px;
  background: var(--accent-gradient);
}

.pill-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.pill {
  font-size: 0.82rem;
  padding: 7px 14px;
  border-radius: 100px;
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  color: var(--text-primary);
  font-weight: 500;
  transition: var(--transition);
}
.pill:hover {
  border-color: var(--accent-1);
  color: var(--accent-1);
  transform: translateY(-1px);
}

.bullet-list {
  list-style: none;
  padding: 0;
}
.bullet-list li {
  padding: 8px 0 8px 22px;
  position: relative;
  font-size: 0.93rem;
  color: var(--text-primary);
  border-bottom: 1px dashed var(--border-color);
}
.bullet-list li:last-child { border-bottom: none; }
.bullet-list li::before {
  content: '';
  position: absolute;
  left: 0; top: 16px;
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--accent-gradient);
}
.bullet-list em { color: var(--text-secondary); font-style: italic; }

/* ═══ SIGNATURE ═══ */
.signature {
  margin-top: 36px;
  padding-top: 24px;
  border-top: 1px solid var(--border-color);
}
.sign-name {
  font-size: 1.2rem;
  font-weight: 700;
  margin: 56px 0 6px;
  letter-spacing: -0.4px;
  background: var(--accent-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  display: inline-block;
}
.sign-contact {
  display: flex;
  flex-wrap: wrap;
  gap: 18px;
  font-size: 0.86rem;
  color: var(--text-secondary);
}

/* ═══ FOOTER ═══ */
.letter-footer {
  margin-top: 36px;
  padding-top: 18px;
  border-top: 1px solid var(--border-color);
  text-align: center;
  font-size: 0.78rem;
  color: var(--text-muted);
  letter-spacing: 0.4px;
}

/* ═══ PORTFOLIO DIVIDER ═══ */
.portfolio-divider {
  margin: 80px auto 0;
  padding: 64px 24px 32px;
  text-align: center;
  border-top: 1px solid var(--border-color);
  position: relative;
}
.portfolio-divider::before {
  content: '';
  position: absolute;
  top: -1px;
  left: 50%;
  transform: translateX(-50%);
  width: 80px;
  height: 3px;
  background: var(--accent-gradient);
  border-radius: 2px;
}
.divider-tag {
  display: inline-block;
  padding: 4px 14px;
  border-radius: 100px;
  background: var(--accent-glow);
  color: var(--accent-1);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  margin-bottom: 16px;
}
.divider-title {
  font-size: clamp(1.8rem, 3.5vw, 2.4rem);
  font-weight: 800;
  letter-spacing: -0.8px;
  margin-bottom: 14px;
}
.divider-sub {
  color: var(--text-muted);
  font-size: 0.98rem;
  max-width: 600px;
  margin: 0 auto;
}

/* Override portfolio sections to remove top padding clash */
.section { padding: 64px 0; }

/* ═══ RESPONSIVE ═══ */
@media (max-width: 720px) {
  body { padding: 16px 8px 60px; }
  .sheet { padding: 32px 24px; border-radius: 12px; }
  .letter-header { flex-direction: column; align-items: flex-start; gap: 16px; text-align: left; }
  .photo-wrap { width: 105px; height: 105px; }
  .applicant-name { font-size: 1.4rem; }
  .subject-title { font-size: 1.15rem; }
  .date-line { text-align: left; }
  .data-row { grid-template-columns: 1fr; gap: 4px; }
  .data-label { font-size: 0.78rem; text-transform: uppercase; letter-spacing: 0.5px; }
  .action-bar { flex-direction: column; align-items: stretch; }
  .action-bar .btn { justify-content: center; }
}

/* ═══ PRINT MODE ═══ */
@media print {
  @page { size: A4; margin: 16mm; }
  body {
    background: #fff;
    color: #111;
    padding: 0;
    line-height: 1.55;
  }
  .no-print { display: none !important; }
  .portfolio-divider,
  .section,
  .footer { display: none !important; }
  .sheet {
    background: #fff;
    color: #111;
    box-shadow: none;
    border: none;
    border-radius: 0;
    padding: 0;
    max-width: 100%;
  }
  .sheet::before { display: none; }
  .letter-header,
  .letter-footer,
  .signature,
  .recipient,
  .data-grid,
  .data-row,
  .bullet-list li {
    border-color: #ddd !important;
  }
  .recipient,
  .data-grid {
    background: #fafafa;
  }
  .photo {
    box-shadow: none;
    border: 2px solid #6c63ff;
    background: #fff;
  }
  .contact-line, .date-line, .subject-ref {
    color: #444 !important;
  }
  .applicant-name,
  .applicant-role,
  .subject-title,
  .block-title,
  .data-label,
  .data-value,
  .letter-body p,
  .salutation,
  .recipient p,
  .bullet-list li,
  .sign-contact,
  .letter-footer {
    color: #111 !important;
  }
  .gradient-text,
  .sign-name {
    color: #6c63ff !important;
    -webkit-text-fill-color: #6c63ff !important;
    background: none !important;
  }
  .subject-tag {
    color: #6c63ff !important;
    background: #eeebff !important;
  }
  .pill {
    background: #f5f5f8 !important;
    color: #111 !important;
    border-color: #ddd !important;
  }
  .logo-mark {
    background: #6c63ff !important;
    box-shadow: none;
  }
  .bullet-list li::before,
  .block-title::before {
    background: #6c63ff !important;
  }
  .status-dot,
  .status-dot::before {
    color: #00a880 !important;
    background: #00a880 !important;
  }
}
