.resume-page { min-height: 100vh; }

/* ─── Active nav link (current page) ─── */

.site-nav a[aria-current="page"] { color: var(--accent); }

/* ─── The document sheet (light, high-contrast) ─── */

.resume-main {
  --sheet: #e7e2d7;
  --sheet-line: #d4cec1;
  --sheet-ink: #20222a;
  --sheet-dim: #4a4d55;
  --sheet-faint: #797c84;
  --sheet-accent: #0c7a52;

  position: relative; z-index: 1;
  width: min(900px, 92vw); margin: 120px auto 90px;
  padding: clamp(36px, 5vw, 70px);
  background: var(--sheet);
  color: var(--sheet-ink);
  border: 1px solid var(--border-bright);
  border-radius: 16px;
  box-shadow: 0 40px 90px -50px rgba(0, 0, 0, .9);
  animation: sheet-in .6s .15s ease both;
}

/* Whole page eases up from the dark background, so the light sheet
   never lands as a sudden flash when arriving from the homepage. */
.resume-page { animation: page-fade .55s ease both; }

@keyframes page-fade {
  from { opacity: 0; }
  to { opacity: 1; }
}
@keyframes sheet-in {
  from { opacity: 0; transform: translateY(12px); }
  to { opacity: 1; transform: none; }
}
@media (prefers-reduced-motion: reduce) {
  .resume-page, .resume-main { animation: none; }
}

/* ─── Header block ─── */

.resume-top {
  display: flex; justify-content: space-between; align-items: flex-end;
  padding-bottom: 36px; margin-bottom: 50px;
  border-bottom: 2px solid var(--sheet-ink);
}
.resume-top h1 {
  font-family: var(--display); font-weight: 600;
  font-size: clamp(40px, 6vw, 62px); line-height: .94; letter-spacing: -.035em;
}
.resume-title {
  margin-top: 13px; font-family: var(--mono); font-size: 12px;
  letter-spacing: .04em; color: var(--sheet-accent);
}
.resume-contact {
  text-align: right; font-size: 13px; line-height: 1.9;
  color: var(--sheet-dim); flex-shrink: 0; margin-left: 30px;
}
.resume-contact a {
  display: block; color: var(--sheet-accent); font-weight: 500;
  transition: opacity .15s;
}
.resume-contact a:hover { opacity: .7; }

/* ─── Sections ─── */

.resume-section { margin-bottom: 56px; }
.resume-section:last-child { margin-bottom: 0; }
.resume-section .section-label {
  display: block; font-family: var(--mono); font-size: 12px;
  color: var(--sheet-faint); letter-spacing: .02em;
  padding-bottom: 14px; margin-bottom: 36px;
  border-bottom: 1px solid var(--sheet-line);
}
.resume-section .section-label::before { content: "// "; color: var(--sheet-accent); }

/* ─── Entries ─── */

.resume-entry { margin-bottom: 38px; }
.resume-entry:last-child { margin-bottom: 0; }
.entry-head {
  display: flex; justify-content: space-between; align-items: flex-start;
  margin-bottom: 16px;
}
.resume-entry h3 {
  font-family: var(--display); font-weight: 600; font-size: 23px; line-height: 1.1;
  color: var(--sheet-ink);
}
.entry-role {
  margin-top: 6px; font-family: var(--mono); font-size: 11px;
  letter-spacing: .03em; color: var(--sheet-accent);
}
.entry-meta {
  text-align: right; font-family: var(--mono); font-size: 11px;
  color: var(--sheet-faint); line-height: 1.9; flex-shrink: 0; margin-left: 30px; padding-top: 4px;
}
.resume-entry ul {
  margin: 0; padding-left: 20px; color: var(--sheet-dim);
  line-height: 1.8; font-size: 14.5px;
}
.resume-entry li { margin-bottom: 6px; }
.resume-entry li::marker { color: var(--sheet-accent); }

/* ─── Skills grid ─── */

.skills-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
.skill-group {
  padding: 22px; border: 1px solid var(--sheet-line); border-radius: 12px;
  background: #eee9df;
}
.skill-group h4 {
  font-family: var(--mono); font-size: 11px; letter-spacing: .05em;
  text-transform: uppercase; color: var(--sheet-ink); margin-bottom: 15px;
  padding-bottom: 11px; border-bottom: 1px solid var(--sheet-line);
}
.skill-group ul {
  margin: 0; padding: 0; list-style: none;
  font-size: 13.5px; color: var(--sheet-dim); line-height: 2;
}

/* ─── Footer (stays dark) ─── */

.resume-footer {
  position: relative; z-index: 1;
  display: flex; justify-content: space-between; align-items: center;
  padding: 24px max(5vw, calc((100vw - 900px) / 2));
  border-top: 1px solid var(--border);
  font-family: var(--mono); font-size: 12px; color: var(--text-faint);
}
.resume-footer a { color: var(--accent); transition: opacity .15s; }
.resume-footer a:hover { opacity: .75; }

/* ─── Mobile ─── */

@media (max-width: 680px) {
  .resume-top { flex-direction: column; align-items: flex-start; gap: 20px; }
  .resume-contact { text-align: left; margin-left: 0; }
  .entry-head { flex-direction: column; gap: 8px; }
  .entry-meta { text-align: left; margin-left: 0; }
  .skills-grid { grid-template-columns: 1fr; }
}

/* ─── Print ─── */

@media print {
  body { background: #fff; }
  .bg-grid, .site-header, .resume-footer { display: none; }
  .resume-main {
    width: 100%; margin: 0; padding: 0; border: 0; border-radius: 0; box-shadow: none;
    animation: none;
  }
}
