/* ============================================================
   Standalone stylesheet for the web résumé (/resume).
   Self-contained on purpose: the résumé does not share the site
   layout, nav or theme toggle. Dark mode follows the reader's OS
   via prefers-color-scheme — no JS, no toggle.
   The print/PDF version uses resume-print.css instead.
   ============================================================ */

:root {
  --serif: 'New York', Georgia, 'Noto Serif', 'Liberation Serif', 'Times New Roman', serif;
  --sans: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;

  --page: #e9e4d8;
  --bg: #faf8f3;
  --ink: #201d18;
  --ink-2: #7c7566;
  --accent: #b26a15;
  --line: #e6ded0;
  --panel: #2a2723;
  --panel-ink: #efe9dd;
  --panel-ink-2: #b8b0a0;
  --panel-accent: #e0a23e;
  --panel-line: rgba(239, 233, 221, 0.16);
}

@media (prefers-color-scheme: dark) {
  :root {
    --page: #0c0b0a;
    --bg: #161512;
    --ink: #ece7dd;
    --ink-2: #948d7d;
    --accent: #e0a23e;
    --line: #2c2822;
    --panel: #0f0e0c;
    --panel-ink: #ece7dd;
    --panel-ink-2: #8f887a;
    --panel-accent: #e6ac4e;
    --panel-line: rgba(236, 231, 221, 0.14);
  }
}

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

html {
  font-size: 18px;
}

body {
  background: var(--page);
  color: var(--ink);
  font-family: var(--serif);
  line-height: 1.5;
  min-height: 100vh;
  padding: clamp(0rem, 4vw, 3rem);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

::selection {
  background: color-mix(in srgb, var(--accent) 26%, transparent);
}

/* ---- Layout ---- */
.resume {
  display: grid;
  grid-template-columns: 15rem 1fr;
  max-width: 60rem;
  margin: 0 auto;
  background: var(--bg);
  box-shadow:
    0 1px 2px rgba(0, 0, 0, 0.08),
    0 12px 40px rgba(0, 0, 0, 0.1);
  border-radius: 4px;
  overflow: hidden;
}

/* ---- Sidebar ---- */
.resume-side {
  background: var(--panel);
  color: var(--panel-ink);
  padding: 2.6rem 1.7rem;
}

.resume-header > h1 {
  font-size: 1.9rem;
  font-weight: 600;
  line-height: 1.03;
  letter-spacing: -0.02em;
}

.resume-role {
  color: var(--panel-accent);
  font-style: italic;
  font-size: 1.05rem;
  margin-top: 0.35rem;
}

/* Sidebar section headers (the markdown <h2> in skills, plus contact) */
.resume-side .block-title,
.resume-skills h2 {
  font-family: var(--sans);
  font-size: 0.7rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  font-weight: 700;
  color: var(--panel-accent);
  margin-bottom: 0.7rem;
  padding-bottom: 0.4rem;
  border-bottom: 1px solid var(--panel-line);
}

.resume-side .block-title {
  margin-top: 2rem;
}

.resume-contact {
  list-style: none;
  margin-top: 0.7rem;
  display: grid;
  gap: 0.5rem;
  font-family: var(--sans);
  font-size: 0.82rem;
}

.resume-contact li {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  line-height: 1.2;
}

.resume-contact .ico {
  width: 14px;
  height: 14px;
  flex: none;
  color: var(--panel-accent);
}

.resume-contact a {
  color: var(--panel-ink);
  text-decoration: none;
  word-break: break-word;
}

.resume-contact a:hover {
  text-decoration: underline;
  text-underline-offset: 2px;
  text-decoration-color: var(--panel-accent);
}

.resume-skills {
  margin-top: 2rem;
}

.resume-skills ul {
  list-style: none;
}

.resume-skills li {
  font-size: 0.9rem;
  margin-bottom: 0.7rem;
  color: var(--panel-ink);
}

.resume-skills li strong {
  display: block;
  color: var(--panel-accent);
  font-weight: 600;
  font-size: 0.82rem;
  margin-bottom: 0.1rem;
}

/* ---- Main column ---- */
.resume-main {
  padding: 2.6rem 2.4rem;
}

.resume-summary {
  font-size: 1.12rem;
  line-height: 1.5;
  color: var(--ink);
  margin-bottom: 1.9rem;
  max-width: 46ch;
}

.resume-main section {
  margin-bottom: 1.7rem;
}

.resume-main section:last-child {
  margin-bottom: 0;
}

/* Section headers in the main column (Experience / Side projects / Interests) */
.resume-main h2 {
  font-family: var(--sans);
  font-size: 0.72rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  font-weight: 700;
  color: var(--accent);
  margin-bottom: 0.9rem;
}

/* Work experience entries */
.work-experience {
  display: grid;
  grid-template-columns: 1fr auto;
  grid-template-areas:
    'company date'
    'role role'
    'desc desc';
  margin-bottom: 1.4rem;
}

.work-experience:last-child {
  margin-bottom: 0;
}

.work-experience > h3 {
  grid-area: company;
  font-size: 1.1rem;
  font-weight: 600;
}

.work-experience > p {
  grid-area: date;
  justify-self: end;
  font-family: var(--sans);
  font-size: 0.78rem;
  color: var(--ink-2);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
  padding-top: 0.2rem;
}

.work-experience > h4 {
  grid-area: role;
  color: var(--accent);
  font-weight: 600;
  font-size: 0.98rem;
  margin: 0.1rem 0 0.5rem;
}

.work-experience > div {
  grid-area: desc;
  color: var(--ink-2);
}

.work-experience > div > p {
  margin-bottom: 0.6rem;
  line-height: 1.55;
}

.work-experience > div > p:last-child {
  margin-bottom: 0;
}

/* Side projects */
.resume-side-projects p {
  color: var(--ink-2);
  margin-bottom: 0.8rem;
  line-height: 1.55;
}

.resume-side-projects ul {
  list-style: none;
  display: grid;
  gap: 0.5rem;
}

.resume-side-projects li {
  color: var(--ink-2);
  line-height: 1.45;
}

/* Interests */
.resume-interests p {
  color: var(--ink-2);
  line-height: 1.55;
}

/* Links in the main column */
.resume-main a {
  color: var(--ink);
  text-decoration: underline;
  text-decoration-color: var(--accent);
  text-underline-offset: 2px;
  text-decoration-thickness: 1px;
}

.resume-main a:hover {
  text-decoration-thickness: 2px;
}

/* ---- Responsive: collapse to one column on narrow screens ---- */
@media (max-width: 640px) {
  body {
    padding: 0;
  }

  .resume {
    grid-template-columns: 1fr;
    border-radius: 0;
    box-shadow: none;
  }

  .resume-side {
    padding: 2rem 1.5rem;
  }

  .resume-main {
    padding: 2rem 1.5rem;
  }

  .work-experience > p {
    padding-top: 0;
  }
}
