.resume-page main { padding-bottom: 3rem; }

.resume-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1.1rem 0 0.5rem;
}

.back-link {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  padding: 0.58rem 0.95rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-chip);
  background: var(--surface);
  box-shadow: var(--shadow-soft);
  color: var(--text);
  font-weight: 800;
  font-size: 0.9rem;
  transition: transform 160ms ease, border-color 160ms ease;
}
.back-link:hover { transform: translateY(-1px); border-color: color-mix(in srgb, var(--accent) 68%, var(--border)); }
.back-glyph {
  width: 0.7rem;
  height: 0.7rem;
  border-left: 2px solid var(--accent-strong);
  border-bottom: 2px solid var(--accent-strong);
  transform: rotate(45deg);
}
.resume-toolbar-actions { display: flex; align-items: center; gap: 0.6rem; }
.ghost-button { padding: 0.62rem 0.95rem; font-weight: 800; }

.resume-sheet {
  margin-top: 0.5rem;
  padding: clamp(1.25rem, 3vw, 2.6rem);
  border: 1px solid var(--border);
  border-radius: var(--radius-card);
  background: color-mix(in srgb, var(--surface-solid) 92%, transparent);
  box-shadow: var(--shadow);
}

.resume-header {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 1.4rem;
  align-items: center;
  padding-bottom: 1.4rem;
  border-bottom: 1px solid var(--border);
}
.resume-header img {
  width: 6.4rem;
  height: 6.4rem;
  border-radius: 24px;
  object-fit: cover;
  object-position: center top;
  border: 1px solid var(--border-strong);
  box-shadow: var(--shadow-soft);
}
.resume-id h1 {
  margin: 0;
  font-family: var(--font-display);
  font-size: clamp(1.9rem, 4vw, 2.8rem);
  letter-spacing: -0.05em;
}
.resume-id .role {
  margin: 0.2rem 0 0.55rem;
  color: var(--accent-strong);
  font-weight: 800;
  font-size: clamp(1rem, 2vw, 1.15rem);
}
.resume-id .summary {
  margin: 0 0 0.85rem;
  color: var(--muted);
  max-width: 52rem;
}
.contact-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1.1rem;
  font-size: 0.9rem;
  font-weight: 700;
}
.contact-row a { color: var(--accent-strong); text-decoration: underline; text-underline-offset: 3px; }
.contact-row span { color: var(--muted); }

.stat-band {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
  margin: 1.4rem 0;
  padding: 1.1rem;
  border: 1px solid var(--border);
  border-radius: 20px;
  background: var(--accent-soft);
}
.stat-band div { display: grid; gap: 0.2rem; }
.stat-band strong {
  font-family: var(--font-display);
  font-size: clamp(1.3rem, 3vw, 1.9rem);
  letter-spacing: -0.04em;
}
.stat-band span { color: var(--muted); font-size: 0.82rem; }

.resume-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.7fr) minmax(0, 1fr);
  gap: 2rem;
}

.resume-section { margin-bottom: 1.8rem; }
.resume-section:last-child { margin-bottom: 0; }
.resume-section > h2 {
  margin: 0 0 0.95rem;
  font-family: var(--font-display);
  font-size: 1.12rem;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  color: var(--text);
  padding-bottom: 0.4rem;
  border-bottom: 2px solid var(--accent-soft);
}

.entry { margin-bottom: 1.25rem; }
.entry:last-child { margin-bottom: 0; }
.entry.compact { margin-bottom: 0.95rem; }
.entry-head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.5rem;
}
.entry-head h3 { margin: 0; font-size: 1.04rem; letter-spacing: -0.01em; }
.entry-dates { color: var(--muted-2); font-size: 0.82rem; font-weight: 700; white-space: nowrap; }
.entry-company { margin: 0.1rem 0 0.35rem; color: var(--accent-strong); font-weight: 700; font-size: 0.92rem; }
.entry-summary { margin: 0 0 0.5rem; color: var(--muted); }
.entry ul { margin: 0.3rem 0 0; padding-left: 1.15rem; display: grid; gap: 0.4rem; }
.entry li { color: var(--text); }
.entry li::marker { color: var(--accent-strong); }

.tags { display: flex; flex-wrap: wrap; gap: 0.4rem; margin: 0.2rem 0 0.5rem; }
.tags span {
  padding: 0.2rem 0.6rem;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--surface);
  font-size: 0.74rem;
  font-weight: 700;
  color: var(--muted);
}
.proof-link { color: var(--accent-strong); font-weight: 800; text-decoration: underline; text-underline-offset: 3px; font-size: 0.88rem; }

.resume-aside ul { margin: 0; padding-left: 1.15rem; display: grid; gap: 0.4rem; }
.resume-aside li::marker { color: var(--accent-strong); }

.skill { margin-bottom: 0.9rem; }
.skill:last-child { margin-bottom: 0; }
.skill-head { display: flex; justify-content: space-between; gap: 0.5rem; font-size: 0.9rem; }
.skill-head span { color: var(--muted-2); font-weight: 700; }
.skill-bar {
  margin: 0.32rem 0 0.32rem;
  height: 0.42rem;
  border-radius: 999px;
  background: var(--surface-strong);
  overflow: hidden;
}
.skill-bar span {
  display: block;
  height: 100%;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--accent), var(--accent-strong));
}
.skill p { margin: 0; color: var(--muted); font-size: 0.82rem; }

@media (max-width: 860px) {
  .resume-grid { grid-template-columns: 1fr; gap: 1.4rem; }
}

@media (max-width: 560px) {
  .resume-header { grid-template-columns: 1fr; text-align: left; gap: 1rem; }
  .resume-header img { width: 5rem; height: 5rem; }
  .stat-band { grid-template-columns: 1fr; gap: 0.6rem; padding: 0.9rem; }
}

/* ============================================================
   Shellac terminal theme for the classic resume.
   White background, black + green text, monospaced everything.
   Activated via resume.html?theme=terminal (data-brand="shellac").
   ============================================================ */
[data-brand="shellac"] {
  --bg: #ffffff;
  --bg-2: #ffffff;
  --surface: #f4f7f4;
  --surface-strong: #eef3ee;
  --surface-solid: #ffffff;
  --border: #111111;
  --border-strong: #111111;
  --text: #0a0a0a;
  --muted: #1a1a1a;
  --muted-2: #2f6f37;
  --accent: #0b7a26;
  --accent-strong: #0b7a26;
  --accent-soft: rgba(11, 122, 38, 0.1);
  --success: #0b7a26;
  --font-display: var(--font-mono);
  --font-sans: var(--font-mono);
  --font-user: var(--font-mono);
  --font-answer: var(--font-mono);
  color-scheme: light;
}
[data-brand="shellac"] body,
[data-brand="shellac"].resume-page body {
  background: #ffffff;
  color: var(--text);
  font-family: var(--font-mono);
}
[data-brand="shellac"] body::before,
[data-brand="shellac"] .ambient { display: none !important; }

[data-brand="shellac"] .resume-sheet {
  border: 1px solid #111111;
  border-radius: 0;
  background: #ffffff;
  box-shadow: none;
  font-family: var(--font-mono);
}
[data-brand="shellac"] .back-link,
[data-brand="shellac"] .ghost-button,
[data-brand="shellac"] .theme-toggle {
  border-radius: 0;
  border: 1px solid #111111;
  background: #ffffff;
  color: #0a0a0a;
  box-shadow: none;
  font-family: var(--font-mono);
}
[data-brand="shellac"] .back-link:hover,
[data-brand="shellac"] .ghost-button:hover {
  border-color: #0b7a26;
  color: #0b7a26;
}
[data-brand="shellac"] .resume-id h1,
[data-brand="shellac"] .resume-section > h2,
[data-brand="shellac"] .entry-head h3,
[data-brand="shellac"] .stat-band strong {
  font-family: var(--font-mono);
  letter-spacing: 0;
  color: #0a0a0a;
}
[data-brand="shellac"] .resume-id h1::before { content: "$ "; color: #0b7a26; }
[data-brand="shellac"] .resume-section > h2 { border-bottom: 1px solid #111111; }
[data-brand="shellac"] .resume-section > h2::before { content: "## "; color: #0b7a26; }
[data-brand="shellac"] .resume-id .role,
[data-brand="shellac"] .entry-company,
[data-brand="shellac"] .contact-row a,
[data-brand="shellac"] .proof-link,
[data-brand="shellac"] .entry li::marker,
[data-brand="shellac"] .resume-aside li::marker,
[data-brand="shellac"] .skill-head span { color: #0b7a26; }
[data-brand="shellac"] .resume-id .summary,
[data-brand="shellac"] .entry-summary,
[data-brand="shellac"] .entry-dates,
[data-brand="shellac"] .stat-band span,
[data-brand="shellac"] .skill p,
[data-brand="shellac"] .contact-row span { color: #1a1a1a; }
[data-brand="shellac"] .resume-header img {
  border-radius: 0;
  border: 1px solid #111111;
  filter: grayscale(1) contrast(1.05);
}
[data-brand="shellac"] .stat-band {
  border: 1px solid #111111;
  border-radius: 0;
  background: #f4f7f4;
}
[data-brand="shellac"] .tags span {
  border: 1px solid #111111;
  border-radius: 0;
  background: #ffffff;
  color: #0b7a26;
}
[data-brand="shellac"] .tags span::before { content: "#"; }
[data-brand="shellac"] .skill-bar {
  border: 1px solid #111111;
  border-radius: 0;
  background: #ffffff;
  height: 0.8rem;
}
[data-brand="shellac"] .skill-bar span {
  background: repeating-linear-gradient(90deg, #0b7a26 0, #0b7a26 6px, #ffffff 6px, #ffffff 8px);
  border-radius: 0;
}

/* ---- shellac terminal: DARK mode (black bg, white + green text) ---- */
[data-brand="shellac"][data-theme="dark"] {
  --bg: #0a0a0a;
  --bg-2: #0a0a0a;
  --surface: #111511;
  --surface-strong: #161b16;
  --surface-solid: #0a0a0a;
  --border: #2f6f37;
  --border-strong: #3a8a45;
  --text: #f4fff4;
  --muted: #d6e6d6;
  --muted-2: #7fd98f;
  --accent: #2fd158;
  --accent-strong: #2fd158;
  --accent-soft: rgba(47, 209, 88, 0.12);
  --success: #2fd158;
  color-scheme: dark;
}
[data-brand="shellac"][data-theme="dark"] body,
[data-brand="shellac"][data-theme="dark"].resume-page body {
  background: #0a0a0a;
  color: var(--text);
}
[data-brand="shellac"][data-theme="dark"] .resume-sheet {
  border-color: #2f6f37;
  background: #0a0a0a;
}
[data-brand="shellac"][data-theme="dark"] .back-link,
[data-brand="shellac"][data-theme="dark"] .ghost-button,
[data-brand="shellac"][data-theme="dark"] .theme-toggle {
  border-color: #2f6f37;
  background: #0a0a0a;
  color: #f4fff4;
}
[data-brand="shellac"][data-theme="dark"] .back-link:hover,
[data-brand="shellac"][data-theme="dark"] .ghost-button:hover {
  border-color: #2fd158;
  color: #2fd158;
}
[data-brand="shellac"][data-theme="dark"] .resume-id h1,
[data-brand="shellac"][data-theme="dark"] .resume-section > h2,
[data-brand="shellac"][data-theme="dark"] .entry-head h3,
[data-brand="shellac"][data-theme="dark"] .stat-band strong { color: #f4fff4; }
[data-brand="shellac"][data-theme="dark"] .resume-id h1::before,
[data-brand="shellac"][data-theme="dark"] .resume-section > h2::before { color: #2fd158; }
[data-brand="shellac"][data-theme="dark"] .resume-section > h2 { border-bottom-color: #2f6f37; }
[data-brand="shellac"][data-theme="dark"] .resume-id .role,
[data-brand="shellac"][data-theme="dark"] .entry-company,
[data-brand="shellac"][data-theme="dark"] .contact-row a,
[data-brand="shellac"][data-theme="dark"] .proof-link,
[data-brand="shellac"][data-theme="dark"] .entry li::marker,
[data-brand="shellac"][data-theme="dark"] .resume-aside li::marker,
[data-brand="shellac"][data-theme="dark"] .skill-head span { color: #2fd158; }
[data-brand="shellac"][data-theme="dark"] .resume-id .summary,
[data-brand="shellac"][data-theme="dark"] .entry-summary,
[data-brand="shellac"][data-theme="dark"] .entry-dates,
[data-brand="shellac"][data-theme="dark"] .entry li,
[data-brand="shellac"][data-theme="dark"] .resume-aside li,
[data-brand="shellac"][data-theme="dark"] .stat-band span,
[data-brand="shellac"][data-theme="dark"] .skill p,
[data-brand="shellac"][data-theme="dark"] .contact-row span { color: #d6e6d6; }
[data-brand="shellac"][data-theme="dark"] .resume-header,
[data-brand="shellac"][data-theme="dark"] .resume-header img { border-color: #2f6f37; }
[data-brand="shellac"][data-theme="dark"] .stat-band {
  border-color: #2f6f37;
  background: #111511;
}
[data-brand="shellac"][data-theme="dark"] .tags span {
  border-color: #2f6f37;
  background: #0a0a0a;
  color: #2fd158;
}
[data-brand="shellac"][data-theme="dark"] .skill-bar {
  border-color: #2f6f37;
  background: #0a0a0a;
}
[data-brand="shellac"][data-theme="dark"] .skill-bar span {
  background: repeating-linear-gradient(90deg, #2fd158 0, #2fd158 6px, #0a0a0a 6px, #0a0a0a 8px);
}

@media print {
  .ambient, .resume-toolbar, body::before { display: none !important; }
  /* data-theme is forced to light before printing, so brand text/accent
     colors are already paper-legible. Keep a clean white page but let the
     selected brand's fonts and accent carry into the PDF. */
  body { background: #fff; }
  .resume-sheet { border: 0; box-shadow: none; margin: 0; padding: 0; background: #fff; }
  .skill-bar span { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  .stat-band, .blog-card, .md-table thead th { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
}
