/* Resume: anuvakas suite (Ledger family). Shared by index.html and it-audit.html. */

:root {
  --bg: #f6f4ef; --bg-2: #efece4; --paper: #fffdf9; --paper-2: #faf8f3;
  --ink: #1c1b19; --ink-2: #4a4741; --ink-3: #8a857b; --line: #e4dfd4; --line-2: #d6d0c3;
  --accent: #3b4fd8; --accent-ink: #ffffff; --accent-soft: #e8ebfd;
  --good: #1f7a4d; --good-soft: #e3f3ea; --warn: #a15c07; --warn-soft: #fbefd9; --bad: #b42318; --bad-soft: #fde8e6;
  --serif: "Fraunces", "Iowan Old Style", "Palatino Linotype", Georgia, serif;
  --sans: "Inter", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  --radius: 12px; --radius-sm: 8px;
  --shadow-sm: 0 1px 2px rgba(28,27,25,.06);
  --shadow: 0 1px 2px rgba(28,27,25,.05), 0 8px 24px -12px rgba(28,27,25,.18);
  --date-col: 128px;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #141311; --bg-2: #1b1a17; --paper: #1e1d1a; --paper-2: #232220;
    --ink: #eeeae2; --ink-2: #bdb7ab; --ink-3: #868175; --line: #2e2c28; --line-2: #3a3833;
    --accent: #8b9bff; --accent-ink: #11131f; --accent-soft: #252a4a;
    --good: #5fcf96; --good-soft: #17301f; --warn: #f0b155; --warn-soft: #362a14; --bad: #ff8a7d; --bad-soft: #3a1c19;
    --shadow-sm: 0 1px 2px rgba(0,0,0,.3); --shadow: 0 1px 2px rgba(0,0,0,.3), 0 8px 24px -12px rgba(0,0,0,.6);
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #141311; --bg-2: #1b1a17; --paper: #1e1d1a; --paper-2: #232220;
  --ink: #eeeae2; --ink-2: #bdb7ab; --ink-3: #868175; --line: #2e2c28; --line-2: #3a3833;
  --accent: #8b9bff; --accent-ink: #11131f; --accent-soft: #252a4a;
  --good: #5fcf96; --good-soft: #17301f; --warn: #f0b155; --warn-soft: #362a14; --bad: #ff8a7d; --bad-soft: #3a1c19;
  --shadow-sm: 0 1px 2px rgba(0,0,0,.3); --shadow: 0 1px 2px rgba(0,0,0,.3), 0 8px 24px -12px rgba(0,0,0,.6);
  color-scheme: dark;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  padding: 40px 16px 56px;
  background: var(--bg);
  color: var(--ink);
  font: 14px/1.55 var(--sans);
  font-feature-settings: "cv11", "ss01";
  -webkit-font-smoothing: antialiased;
}
::selection { background: var(--accent-soft); }
a { color: inherit; }
a:focus-visible, .btn:focus-visible {
  outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 4px;
}

/* ------------------------------------------------------------ sheet */
.page {
  max-width: 840px;
  margin: 0 auto;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 52px 60px 40px;
}

/* ------------------------------------------------------------ header */
.masthead {
  display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; flex-wrap: wrap;
  padding-bottom: 22px; border-bottom: 1px solid var(--line-2);
}
h1 {
  margin: 0;
  font: 500 clamp(32px, 4.6vw, 46px)/1.04 var(--serif);
  letter-spacing: -.015em;
  font-variation-settings: "opsz" 120;
}
.tagline {
  margin: 8px 0 0;
  font: italic 400 17px/1.35 var(--serif);
  font-variation-settings: "opsz" 24;
  color: var(--ink-2);
}
.contact {
  margin-top: 12px;
  display: flex; flex-wrap: wrap; align-items: baseline; gap: 2px 0;
  color: var(--ink-2); font-size: 13.5px;
  font-variant-numeric: tabular-nums;
}
.contact a { text-decoration: none; color: var(--ink-2); border-bottom: 1px solid var(--line-2); }
.contact a:hover { color: var(--accent); border-bottom-color: var(--accent); }
.sep { color: var(--ink-3); margin: 0 9px; }

.actions { display: flex; gap: 8px; flex-wrap: wrap; }
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  height: 34px; padding: 0 14px; border-radius: 9px;
  border: 1px solid var(--line-2); background: var(--paper); color: var(--ink);
  font: 500 13px/1 var(--sans); cursor: pointer; white-space: nowrap; text-decoration: none;
  transition: background .12s, border-color .12s, transform .08s;
}
.btn:hover { background: var(--paper-2); border-color: var(--ink-3); }
.btn:active { transform: translateY(1px); }
.btn.primary { background: var(--ink); color: var(--bg); border-color: var(--ink); }
.btn.primary:hover { opacity: .9; }
.btn svg { width: 15px; height: 15px; flex: none; }

/* ------------------------------------------------------------ sections */
section { margin-top: 34px; }
h2 {
  margin: 0 0 16px;
  display: flex; align-items: center; gap: 12px;
  font: 600 12px/1.2 var(--sans); letter-spacing: .08em; text-transform: uppercase; color: var(--ink-3);
}
h2::after { content: ""; flex: 1; height: 1px; background: var(--line); }

.summary {
  margin: 0;
  max-width: 68ch;
  font: 400 16px/1.6 var(--serif);
  font-variation-settings: "opsz" 18;
  color: var(--ink-2);
}

/* ------------------------------------------------------------ timeline */
.timeline { position: relative; }
.entry {
  display: grid;
  grid-template-columns: var(--date-col) minmax(0, 1fr);
  column-gap: 28px;
  padding-bottom: 22px;
}
.entry:last-child { padding-bottom: 0; }
.entry-date {
  padding-top: 3px;
  font-size: 12.5px; font-weight: 500; line-height: 1.5;
  color: var(--ink-3);
  font-variant-numeric: tabular-nums lining-nums;
  white-space: nowrap;
  text-align: right;
}
.entry-body {
  position: relative;
  padding-left: 22px;
  border-left: 1px solid var(--line);
}
.entry:last-child .entry-body { border-left-color: transparent; }
.entry:last-child .entry-body::after {
  /* keep the rail running down to the last marker only */
  content: ""; position: absolute; left: -1px; top: 0; height: 12px; width: 1px; background: var(--line);
}
.entry-body::before {
  content: ""; position: absolute; left: -4.5px; top: 8px;
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--paper); border: 1.5px solid var(--ink-3);
}
.entry.current .entry-body::before { background: var(--accent); border-color: var(--accent); }
.entry-title {
  margin: 0;
  font: 500 17px/1.35 var(--serif);
  font-variation-settings: "opsz" 24;
  color: var(--ink);
}
.entry-sub { margin: 2px 0 0; font-size: 13.5px; font-weight: 500; color: var(--ink-2); }

.entry ul { margin: 8px 0 0; padding: 0; list-style: none; }
.entry li { position: relative; padding-left: 16px; margin: 5px 0; color: var(--ink-2); }
.entry li::before {
  content: ""; position: absolute; left: 2px; top: .72em;
  width: 5px; height: 1.5px; background: var(--ink-3);
}
.entry li strong { color: var(--ink); font-weight: 600; }

/* compact list (education, certifications): same grid, no rail */
.timeline.plain .entry-body { border-left-color: transparent; }
.timeline.plain .entry-body::before,
.timeline.plain .entry:last-child .entry-body::after { display: none; }
.timeline.plain .entry { padding-bottom: 14px; }
.timeline.plain .entry:last-child { padding-bottom: 0; }

/* ------------------------------------------------------------ chips */
.chips { display: flex; flex-wrap: wrap; gap: 6px; margin: 0; padding: 0; list-style: none; }
.chip {
  display: inline-flex; align-items: center; min-height: 23px; padding: 2px 10px;
  border-radius: 999px; background: var(--bg-2); color: var(--ink-2);
  font-size: 12px; font-weight: 500; line-height: 1.3;
}
.chip.status { min-height: 21px; padding: 1px 9px; font-size: 11.5px; background: var(--accent-soft); color: var(--accent); }

.skills { display: grid; grid-template-columns: var(--date-col) minmax(0, 1fr); gap: 12px 28px; margin: 0; }
.skills dt {
  padding-top: 3px;
  font-size: 12.5px; font-weight: 600; color: var(--ink); text-align: right;
}
.skills dd { margin: 0; }

/* ------------------------------------------------------------ footer */
footer {
  margin-top: 40px; padding-top: 14px; border-top: 1px solid var(--line);
  color: var(--ink-3); font-size: 12px; text-align: center;
}
footer a { color: var(--ink-3); text-decoration: none; border-bottom: 1px solid var(--line-2); }
footer a:hover { color: var(--accent); border-bottom-color: var(--accent); }

/* ------------------------------------------------------------ narrow */
@media (max-width: 720px) {
  body { padding: 16px 16px 32px; }
  .page { padding: 32px 26px 28px; }
  :root { --date-col: 104px; }
  .entry { column-gap: 20px; }
}
@media (max-width: 560px) {
  body { padding: 0 0 24px; }
  .page { border-radius: 0; border-width: 0 0 1px; box-shadow: none; padding: 28px 18px 24px; }
  .masthead { align-items: flex-start; }
  .entry { grid-template-columns: minmax(0, 1fr); }
  .entry-date { text-align: left; padding: 0 0 1px; }
  .entry-body, .entry:last-child .entry-body { padding-left: 0; border-left: 0; }
  .entry-body::before, .entry:last-child .entry-body::after { display: none; }
  .timeline:not(.plain) .entry + .entry { padding-top: 18px; border-top: 1px solid var(--line); }
  .timeline:not(.plain) .entry { padding-bottom: 18px; }
  .timeline:not(.plain) .entry:last-child { padding-bottom: 0; }
  .skills { grid-template-columns: minmax(0, 1fr); gap: 4px; }
  .skills dt { text-align: left; padding-top: 10px; }
  .skills dt:first-child { padding-top: 0; }
}

@media (prefers-reduced-motion: reduce) {
  .btn { transition: none; }
  .btn:active { transform: none; }
}

/* ------------------------------------------------------------ print */
@page { size: A4; margin: 14mm 15mm 14mm; }
@media print {
  /* same specificity as the dark selectors, later in the file, so paper always wins */
  :root, :root:not([data-theme="light"]), :root[data-theme="dark"] {
    --bg: #fff; --bg-2: #fff; --paper: #fff; --paper-2: #fff;
    --ink: #000; --ink-2: #1a1a1a; --ink-3: #555; --line: #c8c8c8; --line-2: #999;
    --accent: #000; --accent-soft: #fff;
    color-scheme: light;
  }
  html, body { background: #fff !important; color: #000; }
  body { padding: 0; font-size: 10pt; line-height: 1.45; }
  .page { max-width: none; margin: 0; padding: 0; border: 0; border-radius: 0; box-shadow: none; background: #fff; }
  .actions { display: none; }
  .masthead { padding-bottom: 10pt; }
  h1 { font-size: 26pt; }
  .tagline { font-size: 12pt; margin-top: 3pt; }
  .contact { margin-top: 6pt; font-size: 9.5pt; }
  .contact a, footer a { color: #000; border-bottom: 0; }
  section { margin-top: 15pt; }
  h2 { margin-bottom: 8pt; font-size: 8.5pt; color: #000; break-after: avoid; page-break-after: avoid; }
  .summary { font-size: 10.5pt; max-width: none; color: #000; }
  .entry { padding-bottom: 10pt; break-inside: avoid; page-break-inside: avoid; }
  .entry-title { font-size: 11.5pt; }
  .entry-sub { font-size: 9.5pt; }
  .entry-date { font-size: 9pt; }
  .entry li { margin: 2pt 0; color: #000; }
  .entry.current .entry-body::before { background: #000; border-color: #000; }
  .entry-body::before { background: #fff; }
  /* chips read as an inline list on paper */
  .chips { display: block; }
  .chip { display: inline; padding: 0; min-height: 0; background: none; color: #000; font-size: 9.5pt; border-radius: 0; }
  .chip.status { color: #000; background: none; font-weight: 600; }
  .chip:not(:last-child)::after { content: "  \00b7  "; white-space: pre; color: #555; }
  .skills { gap: 4pt 20pt; }
  .skills dt { font-size: 9.5pt; padding-top: 0; }
  .skills dt, .skills dd { break-inside: avoid; }
  footer { margin-top: 18pt; padding-top: 6pt; font-size: 8.5pt; color: #555; }
  a { text-decoration: none; }
}
