/* ============================================================
   Alejandro Aguilar — CV document
   Reproduces the compact, one-page LaTeX resume layout.
   ============================================================ */

@font-face {
  font-family: "Ubuntu Sans";
  font-style: normal;
  font-weight: 300 800;
  font-display: swap;
  src: url("../fonts/ubuntu-sans-latin.woff2") format("woff2");
}
@font-face {
  font-family: "Ubuntu Sans";
  font-style: normal;
  font-weight: 300 800;
  font-display: swap;
  src: url("../fonts/ubuntu-sans-latin-ext.woff2") format("woff2");
}

:root {
  --ink: #16161a;
  --soft: #4a4a52;
  --faint: #77777f;
  --rule: #16161a;
  --accent: #a3122b;
  --page-w: 8.5in;
  --page-pad: 0.5in;
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  padding: 1.5rem 0 3rem;
  background: #0b0b0e;
  color: var(--ink);
  font-family: "Ubuntu Sans", system-ui, -apple-system, "Segoe UI", Arial, sans-serif;
  font-size: 10pt;
  line-height: 1.32;
  -webkit-font-smoothing: antialiased;
}

/* ---------- toolbar (screen only) ---------- */
.toolbar {
  width: 100%;
  max-width: var(--page-w);
  margin: 0 auto 1rem;
  padding: 0 var(--page-pad);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}
.toolbar .who {
  color: #f2f2f0;
  font-size: 0.85rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}
.toolbar .who b { color: #c8102e; font-weight: 600; }
.toolbar .acts { display: flex; gap: 0.6rem; flex-wrap: wrap; }
.btnp {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.6rem 1.05rem;
  border-radius: 999px;
  border: 1px solid #3a3a42;
  background: transparent;
  color: #f2f2f0;
  font: inherit;
  font-size: 0.88rem;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
}
.btnp--solid {
  background: linear-gradient(180deg, #e4193a, #c8102e);
  border-color: transparent;
  color: #fff;
}
.btnp svg { width: 16px; height: 16px; }

/* ---------- the sheet ---------- */
.sheet {
  width: var(--page-w);
  max-width: 100%;
  margin: 0 auto;
  padding: var(--page-pad);
  background: #fff;
  color: var(--ink);
  box-shadow: 0 30px 80px -30px rgba(0, 0, 0, 0.9);
}

/* ---------- header ---------- */
.cv-head { text-align: center; margin-bottom: 0.35rem; }
.cv-head h1 {
  margin: 0 0 0.1rem;
  font-size: 21pt;
  font-weight: 700;
  letter-spacing: 0.01em;
}
.cv-head .role {
  margin: 0 0 0.28rem;
  font-size: 9.5pt;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--accent);
}
.cv-head .contact { font-size: 8.7pt; color: var(--soft); }
.cv-head .contact a { color: inherit; text-decoration: none; }
.cv-head .contact .sep { margin: 0 0.4rem; color: #c2c2c8; }

.cv-section a {
  color: var(--ink);
  text-decoration: underline;
  text-decoration-color: #c2c2c8;
  text-underline-offset: 2px;
}
.cv-section a:hover { color: var(--accent); text-decoration-color: currentColor; }

/* ---------- sections ---------- */
.cv-section { margin-top: 0.62rem; }
.cv-section > h2 {
  margin: 0 0 0.26rem;
  padding-bottom: 0.1rem;
  border-bottom: 1px solid var(--rule);
  font-size: 10pt;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

/* ---------- entries ---------- */
.entry { margin-bottom: 0.42rem; }
.entry:last-child { margin-bottom: 0; }
.entry-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
}
.entry-head .left { font-weight: 700; }
.entry-head .right { font-size: 8.8pt; color: var(--soft); white-space: nowrap; }
.entry-sub {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
  font-style: italic;
  font-size: 9pt;
  color: var(--soft);
}
.entry ul { margin: 0.12rem 0 0; padding-left: 0.95rem; }
.entry li { margin: 0.03rem 0; }

/* ---------- skills ---------- */
.skills p { margin: 0.05rem 0; }
.skills b { font-weight: 700; }

/* ---------- certifications ---------- */
.achv { list-style: none; margin: 0; padding: 0; }
.achv li {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
  font-size: 9.4pt;
  padding: 0.02rem 0;
}
.achv li .d { color: var(--soft); font-size: 8.8pt; white-space: nowrap; }

/* ---------- print ---------- */
@media print {
  @page { size: Letter; margin: 0; }
  html, body { background: #fff !important; }
  body { padding: 0; font-size: 10.2pt; line-height: 1.36; }
  .cv-section { margin-top: 0.72rem; }
  .entry { margin-bottom: 0.5rem; }
  .toolbar { display: none !important; }
  .sheet {
    width: auto;
    margin: 0;
    padding: var(--page-pad);
    box-shadow: none;
  }
  .cv-section, .entry, .achv li { break-inside: avoid; }
  a { color: inherit; text-decoration: none; }
}

@media (max-width: 9in) {
  :root { --page-pad: 0.45in; }
  body { font-size: 9.4pt; }
  .cv-head h1 { font-size: 17pt; }
}
