/* ===== CV — Zaidan Azka Al-Fariq ===== */
:root {
  --cv-bg: #0c0c0d;
  --cv-paper: #faf9f7;
  --cv-paper-alt: #f3f1ec;
  --cv-sidebar: #141416;
  --cv-sidebar-text: #e8e6e3;
  --cv-sidebar-muted: #9a9690;
  --cv-ink: #1a1a1c;
  --cv-muted: #5c5a56;
  --cv-accent: #8b7355;
  --cv-accent-light: #c8b89a;
  --cv-border: rgba(26, 26, 28, 0.1);
  --cv-font: 'DM Sans', system-ui, sans-serif;
  --cv-serif: 'Instrument Serif', Georgia, serif;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { font-size: 15px; }

body {
  font-family: var(--cv-font);
  background: var(--cv-bg);
  color: var(--cv-ink);
  min-height: 100vh;
  padding: 2rem 1rem 3rem;
  -webkit-font-smoothing: antialiased;
}

.cv-toolbar {
  max-width: 210mm;
  margin: 0 auto 1.25rem;
  display: flex;
  justify-content: flex-end;
  gap: 0.75rem;
}

.cv-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.55rem 1.1rem;
  font-family: var(--cv-font);
  font-size: 0.8rem;
  font-weight: 500;
  border-radius: 100px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.06);
  color: #fafafa;
  cursor: pointer;
  text-decoration: none;
  transition: background 0.25s, border-color 0.25s;
}

.cv-btn:hover {
  background: rgba(200, 184, 154, 0.15);
  border-color: var(--cv-accent-light);
}

.cv-btn--primary {
  background: var(--cv-accent-light);
  color: var(--cv-bg);
  border-color: transparent;
}

.cv-btn--primary:hover {
  filter: brightness(1.06);
}

.cv-page {
  max-width: 210mm;
  min-height: 297mm;
  margin: 0 auto;
  background: var(--cv-paper);
  box-shadow:
    0 0 0 1px rgba(255, 255, 255, 0.04),
    0 24px 80px rgba(0, 0, 0, 0.45);
  display: grid;
  grid-template-columns: 72mm 1fr;
  overflow: hidden;
}

/* Sidebar */
.cv-sidebar {
  background: var(--cv-sidebar);
  color: var(--cv-sidebar-text);
  padding: 1.75rem 1.35rem;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.cv-photo-wrap {
  position: relative;
  width: 100%;
  aspect-ratio: 3 / 4;
  border-radius: 12px;
  overflow: hidden;
  border: 2px solid rgba(200, 184, 154, 0.25);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.35);
}

.cv-photo {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center top;
  display: block;
}

.cv-name {
  font-family: var(--cv-serif);
  font-size: 1.45rem;
  font-weight: 400;
  line-height: 1.2;
  letter-spacing: -0.02em;
  color: #fff;
}

.cv-role {
  font-size: 0.72rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--cv-accent-light);
  margin-top: 0.35rem;
}

.cv-block__title {
  font-size: 0.65rem;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--cv-accent-light);
  margin-bottom: 0.65rem;
  padding-bottom: 0.4rem;
  border-bottom: 1px solid rgba(200, 184, 154, 0.2);
}

.cv-contact {
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
}

.cv-contact a {
  display: flex;
  align-items: flex-start;
  gap: 0.5rem;
  font-size: 0.72rem;
  color: var(--cv-sidebar-muted);
  text-decoration: none;
  line-height: 1.4;
  word-break: break-word;
  transition: color 0.2s;
}

.cv-contact a:hover { color: #fff; }

.cv-contact svg {
  width: 14px;
  height: 14px;
  flex-shrink: 0;
  margin-top: 1px;
  opacity: 0.7;
}

.cv-skills {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
}

.cv-skill {
  font-size: 0.68rem;
  padding: 0.28em 0.65em;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 100px;
  color: var(--cv-sidebar-text);
}

.cv-skill--accent {
  border-color: rgba(200, 184, 154, 0.35);
  color: var(--cv-accent-light);
}

.cv-lang {
  font-size: 0.78rem;
  color: var(--cv-sidebar-muted);
  line-height: 1.5;
}

/* Main */
.cv-main {
  padding: 1.75rem 1.6rem 1.75rem 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 1.35rem;
}

.cv-section__title {
  font-family: var(--cv-serif);
  font-size: 1.15rem;
  font-weight: 400;
  color: var(--cv-ink);
  margin-bottom: 0.6rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.cv-section__title::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--cv-border);
}

.cv-summary {
  font-size: 0.82rem;
  line-height: 1.65;
  color: var(--cv-muted);
  font-weight: 400;
}

.cv-edu {
  padding: 0.85rem 1rem;
  background: var(--cv-paper-alt);
  border-radius: 10px;
  border-left: 3px solid var(--cv-accent);
}

.cv-edu__school {
  font-weight: 600;
  font-size: 0.88rem;
  color: var(--cv-ink);
}

.cv-edu__detail {
  font-size: 0.78rem;
  color: var(--cv-muted);
  margin-top: 0.2rem;
}

.cv-project {
  padding: 0.9rem 1rem;
  background: var(--cv-paper-alt);
  border-radius: 10px;
}

.cv-project__name {
  font-weight: 600;
  font-size: 0.88rem;
}

.cv-project__name a {
  color: var(--cv-ink);
  text-decoration: none;
}

.cv-project__name a:hover { color: var(--cv-accent); }

.cv-project__desc {
  font-size: 0.78rem;
  color: var(--cv-muted);
  margin-top: 0.35rem;
  line-height: 1.5;
}

.cv-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.3rem;
  margin-top: 0.5rem;
}

.cv-tag {
  font-size: 0.65rem;
  padding: 0.2em 0.55em;
  background: #fff;
  border: 1px solid var(--cv-border);
  border-radius: 4px;
  color: var(--cv-muted);
}

/* Blok isi sendiri — salin .cv-entry untuk item baru */
.cv-entry {
  padding: 0.85rem 1rem;
  background: var(--cv-paper-alt);
  border-radius: 10px;
  border-left: 3px solid var(--cv-accent);
  margin-bottom: 0.65rem;
}

.cv-entry:last-child {
  margin-bottom: 0;
}

.cv-entry--empty {
  border-left-color: rgba(139, 115, 85, 0.35);
}

.cv-entry--empty .cv-entry__period,
.cv-entry--empty .cv-entry__title,
.cv-entry--empty .cv-entry__org,
.cv-entry--empty .cv-entry__desc {
  color: var(--cv-muted);
  font-style: italic;
}

.cv-entry__period {
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  color: var(--cv-accent);
  margin-bottom: 0.25rem;
}

.cv-entry__title {
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--cv-ink);
}

.cv-entry__org {
  font-size: 0.78rem;
  color: var(--cv-muted);
  margin-top: 0.15rem;
}

.cv-entry__desc {
  font-size: 0.78rem;
  line-height: 1.55;
  color: var(--cv-muted);
  margin-top: 0.45rem;
}

/* Print */
@page {
  size: A4;
  margin: 0;
}

@media print {
  body {
    background: #fff;
    padding: 0;
  }

  .cv-toolbar { display: none !important; }

  .cv-page {
    box-shadow: none;
    max-width: none;
    width: 100%;
    min-height: auto;
  }
}

@media (max-width: 720px) {
  body { padding: 1rem 0.5rem 2rem; }

  .cv-page {
    grid-template-columns: 1fr;
    max-width: 100%;
  }

  .cv-sidebar {
    padding: 1.5rem;
  }

  .cv-photo-wrap {
    max-width: 200px;
    margin: 0 auto;
  }

  .cv-toolbar {
    padding: 0 0.5rem;
    justify-content: center;
    flex-wrap: wrap;
  }
}
