/* ── Variables ── */
:root {
  --bg: #fafbfc;
  --bg-alt: #f0f4f8;
  --surface: #ffffff;
  --text: #1a202c;
  /* #64748b only reached 4.3:1 on --bg-alt (chips, dates, tech tags) — below WCAG AA.
     #475569 clears AA everywhere (6.9:1 on --bg-alt, 7.3:1 on --bg). */
  --text-muted: #475569;
  --accent: #2563eb;
  --accent-light: #dbeafe;
  --accent-dark: #1d4ed8;
  --border: #e2e8f0;
  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.06);
  --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.08);
  --shadow-lg: 0 12px 40px rgba(0, 0, 0, 0.1);
  --radius: 12px;
  --radius-lg: 20px;
  --nav-height: 72px;
  --font-sans: "Inter", -apple-system, BlinkMacSystemFont, sans-serif;
  --font-display: "Playfair Display", Georgia, serif;
  --font-hero-name: "DM Serif Display", Georgia, serif;
  --transition: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ── Reset ── */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: var(--nav-height);
  color-scheme: light;
  /* Reserve the scrollbar track so locking scroll for the modal
     doesn't shift the page sideways. */
  scrollbar-gutter: stable;
}

/* Scroll lock while the resume dialog is open. */
body.modal-open {
  overflow: hidden;
}

body {
  font-family: var(--font-sans);
  background: var(--bg);
  color: var(--text);
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}

a {
  color: inherit;
  text-decoration: none;
}

/* Visible keyboard focus everywhere (buttons had no ring of their own). */
:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 3px;
  border-radius: 4px;
}

.skip-link {
  position: absolute;
  left: 1rem;
  top: -100%;
  z-index: 300;
  padding: 0.75rem 1.25rem;
  background: var(--accent);
  color: #fff;
  font-size: 0.9375rem;
  font-weight: 600;
  border-radius: 0 0 10px 10px;
  transition: top var(--transition);
}

.skip-link:focus {
  top: 0;
}

img {
  max-width: 100%;
  display: block;
}

.container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

/* ── Navigation ── */
.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  height: var(--nav-height);
  transition: background var(--transition), box-shadow var(--transition);
}

.nav.scrolled {
  background: rgba(255, 255, 255, 0.92);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
  box-shadow: var(--shadow-sm);
  border-bottom: 1px solid var(--border);
}

.nav-inner {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 1.5rem;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.nav-logo {
  font-size: 1.375rem;
  font-weight: 800;
  letter-spacing: -0.03em;
}

.nav-logo span {
  color: var(--accent);
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 2rem;
  list-style: none;
}

.nav-links a {
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text-muted);
  transition: color var(--transition);
  position: relative;
}

.nav-links a:hover,
.nav-links a.active {
  color: var(--text);
}

.nav-links a.active::after {
  content: "";
  position: absolute;
  bottom: -4px;
  left: 0;
  right: 0;
  height: 2px;
  background: var(--accent);
  border-radius: 1px;
}

.nav-cta {
  background: var(--accent) !important;
  color: #fff !important;
  padding: 0.5rem 1.25rem;
  border-radius: 8px;
  transition: background var(--transition) !important;
}

.nav-cta:hover {
  background: var(--accent-dark) !important;
}

.nav-cta::after {
  display: none !important;
}

.nav-resume-btn {
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text-muted);
  background: none;
  border: 1px solid var(--border);
  padding: 0.5rem 1rem;
  border-radius: 8px;
  cursor: pointer;
  font-family: inherit;
  transition: color var(--transition), border-color var(--transition), background var(--transition);
}

.nav-resume-btn:hover {
  color: var(--accent);
  border-color: var(--accent);
  background: var(--accent-light);
}

.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
}

.nav-toggle span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--text);
  border-radius: 2px;
  transition: var(--transition);
}

/* ── Hero ── */
.hero {
  position: relative;
  min-height: 100vh;
  /* svh keeps the hero from being clipped by mobile browser toolbars. */
  min-height: 100svh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: calc(var(--nav-height) + 2rem) 0 4rem;
  overflow: hidden;
}

.hero-bg {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 70% 60% at 50% 0%, rgba(37, 99, 235, 0.08), transparent),
    radial-gradient(circle at 80% 80%, rgba(139, 92, 246, 0.05), transparent 50%),
    var(--bg);
  z-index: 0;
}

.hero-content {
  position: relative;
  z-index: 1;
  text-align: center;
}

.hero-greeting {
  font-size: 1rem;
  font-weight: 500;
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: 0.15em;
  margin-bottom: 0.75rem;
}

.hero-name {
  font-family: var(--font-hero-name);
  font-size: clamp(3.5rem, 9vw, 5.75rem);
  font-weight: 400;
  letter-spacing: 0.01em;
  line-height: 1.1;
  margin-bottom: 0.5rem;
}

.hero-title {
  font-size: clamp(1.125rem, 3vw, 1.5rem);
  color: var(--text-muted);
  font-weight: 500;
  margin-bottom: 1.25rem;
}

.hero-tagline {
  max-width: 520px;
  margin: 0 auto 2rem;
  color: var(--text-muted);
  font-size: 1.0625rem;
}

.hero-actions {
  display: flex;
  gap: 1rem;
  justify-content: center;
  flex-wrap: wrap;
  margin-bottom: 3.5rem;
}

.btn {
  display: inline-flex;
  align-items: center;
  padding: 0.75rem 1.75rem;
  border-radius: 10px;
  font-size: 0.9375rem;
  font-weight: 600;
  transition: all var(--transition);
  cursor: pointer;
  border: 2px solid transparent;
}

.btn-primary {
  background: var(--accent);
  color: #fff;
}

.btn-primary:hover {
  background: var(--accent-dark);
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(37, 99, 235, 0.3);
}

.btn-outline {
  border-color: var(--border);
  color: var(--text);
  background: var(--surface);
}

.btn-outline:hover {
  border-color: var(--accent);
  color: var(--accent);
  transform: translateY(-2px);
}

.hero-stats {
  display: flex;
  gap: 3rem;
  justify-content: center;
  flex-wrap: wrap;
}

.stat {
  text-align: center;
}

.stat-number {
  display: block;
  font-size: 2rem;
  font-weight: 800;
  color: var(--accent);
  letter-spacing: -0.02em;
}

.stat-label {
  font-size: 0.8125rem;
  color: var(--text-muted);
  font-weight: 500;
}

.scroll-hint {
  position: absolute;
  bottom: 2rem;
  left: 50%;
  transform: translateX(-50%);
  width: 24px;
  height: 40px;
  border: 2px solid var(--border);
  border-radius: 12px;
  display: flex;
  justify-content: center;
  padding-top: 8px;
}

.scroll-hint span {
  width: 4px;
  height: 8px;
  background: var(--accent);
  border-radius: 2px;
  animation: scrollBounce 2s ease-in-out infinite;
}

@keyframes scrollBounce {
  0%, 100% { transform: translateY(0); opacity: 1; }
  50% { transform: translateY(8px); opacity: 0.3; }
}

/* ── Sections ── */
.section {
  padding: 6rem 0;
}

.section-alt {
  background: var(--bg-alt);
}

.section-header {
  text-align: center;
  margin-bottom: 3.5rem;
}

.section-label {
  display: inline-block;
  font-size: 0.8125rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--accent);
  margin-bottom: 0.75rem;
}

.section-title {
  font-family: var(--font-display);
  font-size: clamp(1.75rem, 4vw, 2.5rem);
  font-weight: 700;
  letter-spacing: -0.02em;
}

/* ── About ── */
.about-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2.5rem;
  align-items: stretch;
}

.about-text {
  height: 100%;
}

.about-text p {
  color: var(--text-muted);
  margin-bottom: 1rem;
  font-size: 1.0625rem;
  text-align: justify;
  -webkit-hyphens: auto;
  hyphens: auto;
}

.about-text p:last-child {
  margin-bottom: 0;
}

.skills-card {
  height: 100%;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 2rem;
  box-shadow: var(--shadow-sm);
}

.skills-card h3 {
  font-size: 1.125rem;
  margin-bottom: 1.25rem;
}

.skill-groups {
  display: grid;
  gap: 0.75rem;
}

.skill-group {
  display: grid;
  gap: 0.18rem;
  padding: 0.85rem 0.95rem;
  background: linear-gradient(135deg, rgba(219, 234, 254, 0.55), rgba(255, 255, 255, 0.9));
  border: 1px solid rgba(226, 232, 240, 0.9);
  border-radius: 10px;
}

.skill-group strong {
  color: var(--accent-dark);
  font-size: 0.82rem;
  line-height: 1.2;
}

.skill-group span {
  color: var(--text-muted);
  font-size: 0.9rem;
  line-height: 1.45;
}

/* ── Timeline / Experience ── */
.timeline {
  position: relative;
  max-width: 1000px;
  margin: 0 auto;
}

.timeline::before {
  content: "";
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  top: 0;
  bottom: 0;
  width: 2px;
  background: var(--border);
}

.timeline-item {
  position: relative;
  width: 50%;
  margin-bottom: 2.5rem;
}

.timeline-item:nth-child(odd) {
  padding-right: 2.5rem;
}

.timeline-item:nth-child(even) {
  margin-left: 50%;
  padding-left: 2.5rem;
}

.timeline-item:last-child {
  margin-bottom: 0;
}

.timeline-marker {
  position: absolute;
  top: 24px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--surface);
  border: 3px solid var(--accent);
  z-index: 1;
}

.timeline-item:nth-child(odd) .timeline-marker {
  right: -9px;
  left: auto;
}

.timeline-item:nth-child(even) .timeline-marker {
  left: -9px;
  right: auto;
}

.timeline-marker.current {
  background: var(--accent);
  box-shadow: 0 0 0 4px var(--accent-light);
}

.timeline-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.75rem 2rem;
  box-shadow: var(--shadow-sm);
  transition: box-shadow var(--transition), transform var(--transition);
}

.timeline-card:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}

.timeline-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 1rem;
  margin-bottom: 0.75rem;
  flex-wrap: wrap;
}

.timeline-company {
  font-size: 1.25rem;
  font-weight: 700;
}

.timeline-role {
  color: var(--accent);
  font-weight: 600;
  font-size: 0.9375rem;
}

.timeline-date {
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--text-muted);
  background: var(--bg-alt);
  padding: 0.25rem 0.75rem;
  border-radius: 6px;
  white-space: nowrap;
}

.timeline-desc {
  color: var(--text-muted);
  font-size: 0.9375rem;
  margin-bottom: 1rem;
}

.timeline-card ul {
  display: grid;
  gap: 0.55rem;
  margin: 0 0 1.1rem;
  padding: 0;
  list-style: none;
}

.timeline-card li {
  position: relative;
  padding-left: 1.45rem;
  color: var(--text-muted);
  font-size: 0.92rem;
  line-height: 1.55;
}

.timeline-card li::before {
  content: "";
  position: absolute;
  top: 0.62em;
  left: 0;
  width: 0.5rem;
  height: 0.5rem;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 4px var(--accent-light);
}

.timeline-tech {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.timeline-tech span {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--text-muted);
  background: var(--bg-alt);
  padding: 0.25rem 0.625rem;
  border-radius: 6px;
  border: 1px solid var(--border);
}

/* ── Education ── */
.education-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 1.5rem;
  max-width: 900px;
  margin: 0 auto;
}

.edu-card {
  display: flex;
  gap: 1.25rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 2rem;
  box-shadow: var(--shadow-sm);
  transition: box-shadow var(--transition), transform var(--transition);
}

.edu-card:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}

.edu-icon {
  flex-shrink: 0;
  width: 48px;
  height: 48px;
  background: var(--accent-light);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--accent);
}

.edu-icon svg {
  width: 24px;
  height: 24px;
}

.edu-content h3 {
  font-size: 1.0625rem;
  font-weight: 700;
  margin-bottom: 0.25rem;
}

.edu-school {
  color: var(--accent);
  font-weight: 600;
  font-size: 0.9375rem;
  margin-bottom: 0.25rem;
}

.edu-meta {
  font-size: 0.8125rem;
  color: var(--text-muted);
  margin-bottom: 0.5rem;
}

/* ── Portfolio ── */
.portfolio-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 1.5rem;
}

.portfolio-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: box-shadow var(--transition), transform var(--transition);
}

.portfolio-card:hover {
  box-shadow: var(--shadow-lg);
  transform: translateY(-4px);
}

.portfolio-img {
  height: 160px;
  background: linear-gradient(135deg, var(--accent), color-mix(in srgb, var(--accent) 60%, #000));
  display: flex;
  align-items: center;
  justify-content: center;
}

.portfolio-icon {
  width: 4.5rem;
  height: 4.5rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 1.35rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  border: 2px solid rgba(255, 255, 255, 0.45);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.14);
  box-shadow: 0 18px 34px rgba(15, 23, 42, 0.18);
}

.portfolio-body {
  padding: 1.5rem;
}

.portfolio-category {
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--accent);
}

.portfolio-body h3 {
  font-size: 1.125rem;
  font-weight: 700;
  margin: 0.375rem 0 0.5rem;
}

.portfolio-body p {
  font-size: 0.875rem;
  color: var(--text-muted);
  margin-bottom: 0.65rem;
}

.portfolio-body p:last-of-type {
  margin-bottom: 1rem;
}

.portfolio-body p strong {
  color: var(--text);
}

.portfolio-tech {
  display: flex;
  flex-wrap: wrap;
  gap: 0.375rem;
}

.portfolio-tech span {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--text-muted);
  background: var(--bg-alt);
  padding: 0.2rem 0.5rem;
  border-radius: 4px;
}

/* ── Contact ── */
.contact-section {
  padding-bottom: 4rem;
}

.contact-card {
  background: linear-gradient(135deg, #1e3a5f, #2563eb);
  border-radius: var(--radius-lg);
  padding: 3.5rem 2rem;
  text-align: center;
  color: #fff;
}

.contact-card .section-label {
  color: rgba(255, 255, 255, 0.7);
}

.contact-card .section-title {
  color: #fff;
}

.contact-subtitle {
  color: rgba(255, 255, 255, 0.75);
  margin-top: 0.75rem;
  font-size: 1.0625rem;
}

.contact-links {
  display: flex;
  gap: 1rem;
  justify-content: center;
  flex-wrap: wrap;
  margin-top: 2rem;
}

.contact-item {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.2);
  padding: 0.75rem 1.5rem;
  border-radius: 10px;
  font-size: 0.9375rem;
  font-weight: 500;
  transition: background var(--transition), transform var(--transition);
}

.contact-item:hover {
  background: rgba(255, 255, 255, 0.2);
  transform: translateY(-2px);
}

/* ── Footer ── */
.footer {
  padding: 2rem 0;
  text-align: center;
  font-size: 0.8125rem;
  color: var(--text-muted);
  border-top: 1px solid var(--border);
}

/* ── Reveal animation ── */
.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}

.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ── Responsive ── */
@media (max-width: 768px) {
  .nav-toggle {
    display: flex;
  }

  .nav-links {
    position: fixed;
    top: var(--nav-height);
    left: 0;
    right: 0;
    background: var(--surface);
    flex-direction: column;
    padding: 1.5rem;
    gap: 0;
    border-bottom: 1px solid var(--border);
    box-shadow: var(--shadow-md);
    transform: translateY(-120%);
    opacity: 0;
    transition: transform var(--transition), opacity var(--transition);
    pointer-events: none;
  }

  .nav-links.open {
    transform: translateY(0);
    opacity: 1;
    pointer-events: auto;
  }

  .nav-links li {
    width: 100%;
  }

  .nav-links a {
    display: block;
    padding: 0.875rem 0;
    font-size: 1rem;
  }

  .nav-toggle.open span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
  }

  .nav-toggle.open span:nth-child(2) {
    opacity: 0;
  }

  .nav-toggle.open span:nth-child(3) {
    transform: rotate(-45deg) translate(5px, -5px);
  }

  .about-grid {
    grid-template-columns: 1fr;
  }

  .hero-stats {
    gap: 2rem;
  }

  .timeline::before {
    left: 16px;
    transform: none;
  }

  .timeline-item,
  .timeline-item:nth-child(even) {
    width: 100%;
    margin-left: 0;
    padding-left: 48px;
    padding-right: 0;
  }

  .timeline-item:nth-child(odd) .timeline-marker,
  .timeline-item:nth-child(even) .timeline-marker {
    left: 8px;
    right: auto;
  }

  .timeline-header {
    flex-direction: column;
  }

  .edu-card {
    flex-direction: column;
  }

  /* Justification produces large word gaps in a narrow column. */
  .about-text p,
  .resume-block p {
    text-align: left;
  }
}

/* ── Reduced motion ── */
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }

  /* Content must still appear even though the reveal transition is gone. */
  .reveal {
    opacity: 1;
    transform: none;
  }
}

/* ── Resume Print Modal ── */
.resume-modal[hidden] {
  display: none;
}

.resume-modal {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
}

.resume-modal-backdrop {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 25% 10%, rgba(37, 99, 235, 0.22), transparent 34%),
    rgba(15, 23, 42, 0.62);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
}

.resume-modal-panel {
  position: relative;
  z-index: 1;
  width: min(900px, 100%);
  max-height: calc(100vh - 3rem);
  background: var(--surface);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  border: 1px solid rgba(255, 255, 255, 0.36);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.resume-modal-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1.25rem 1.5rem;
  border-bottom: 1px solid var(--border);
  background:
    linear-gradient(135deg, rgba(37, 99, 235, 0.1), rgba(255, 255, 255, 0.92)),
    var(--bg-alt);
  flex-wrap: wrap;
}

.resume-modal-toolbar h2 {
  font-size: 1.125rem;
  font-weight: 700;
}

.resume-modal-actions {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.btn-icon {
  padding: 0.625rem;
  justify-content: center;
  line-height: 0;
}

.btn-icon svg {
  width: 1.25rem;
  height: 1.25rem;
}

.btn-icon:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

/* Spinner while the PDF is being generated. */
.btn-icon.is-busy svg {
  animation: btnSpin 0.8s linear infinite;
}

@keyframes btnSpin {
  to { transform: rotate(360deg); }
}

.resume-modal-body {
  overflow: auto;
  padding: 1.5rem;
  background:
    linear-gradient(180deg, rgba(219, 234, 254, 0.6), rgba(248, 250, 252, 0.92)),
    #e8ecf1;
}

.resume-printable {
  max-width: 8.5in;
  margin: 0 auto;
  padding: 2.5rem 2.75rem;
  background: #fff;
  color: var(--text);
  font-family: var(--font-sans);
  font-size: 10.5pt;
  line-height: 1.55;
  border-radius: 16px;
  border: 1px solid rgba(226, 232, 240, 0.9);
  box-shadow: 0 24px 70px rgba(15, 23, 42, 0.16);
}

.resume-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  margin: -0.75rem -0.75rem 1.5rem;
  padding: 1.25rem;
  border: 1px solid rgba(37, 99, 235, 0.12);
  border-radius: 14px;
  background:
    linear-gradient(135deg, rgba(37, 99, 235, 0.1), rgba(219, 234, 254, 0.35)),
    #f8fafc;
}

.resume-header-text {
  flex: 1;
  text-align: left;
}

.resume-photo {
  width: 96px;
  height: 116px;
  flex: 0 0 96px;
  object-fit: cover;
  object-position: center;
  border: 3px solid #fff;
  border-radius: 14px;
  box-shadow: 0 12px 28px rgba(15, 23, 42, 0.18);
}

.resume-name {
  font-family: var(--font-display);
  font-size: 25pt;
  font-weight: 700;
  letter-spacing: 0;
  line-height: 1.1;
  margin-bottom: 0.25rem;
  color: var(--text);
}

.resume-headline {
  display: inline-flex;
  align-items: center;
  font-size: 10pt;
  font-weight: 600;
  margin-bottom: 0.6rem;
  padding: 0.25rem 0.7rem;
  color: var(--accent-dark);
  background: var(--accent-light);
  border-radius: 999px;
}

.resume-contact {
  font-size: 10pt;
  color: var(--text-muted);
}

.resume-block {
  margin-top: 1rem;
}

.resume-block h2 {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  font-size: 10.5pt;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--accent-dark);
  border-bottom: 1px solid var(--border);
  padding-bottom: 0.45rem;
  margin-bottom: 0.75rem;
}

.resume-block h2::before {
  content: "";
  width: 0.55rem;
  height: 0.55rem;
  border-radius: 999px;
  background: var(--accent);
  box-shadow: 0 0 0 4px var(--accent-light);
}

.resume-block > p {
  margin-bottom: 0.5rem;
  color: var(--text-muted);
}

.resume-summary {
  text-align: justify;
  -webkit-hyphens: auto;
  hyphens: auto;
}

.resume-entry {
  margin-bottom: 0.85rem;
  padding: 0.8rem 0.9rem;
  border: 1px solid rgba(226, 232, 240, 0.95);
  border-radius: 10px;
  background: #fff;
  box-shadow: 0 4px 14px rgba(15, 23, 42, 0.04);
}

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

.resume-entry-header {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 1rem;
  flex-wrap: wrap;
  margin-bottom: 0.2rem;
}

.resume-entry-header h3 {
  font-size: 11pt;
  font-weight: 700;
  color: var(--text);
}

.resume-entry-header span {
  font-size: 9.5pt;
  white-space: nowrap;
  font-weight: 700;
  color: var(--accent-dark);
  background: var(--accent-light);
  padding: 0.12rem 0.5rem;
  border-radius: 6px;
}

.resume-entry ul {
  display: grid;
  gap: 0.35rem;
  margin: 0.45rem 0 0;
  padding: 0;
  list-style: none;
}

.resume-entry ul ul {
  margin-top: 0.35rem;
  margin-left: 0.15rem;
  padding-left: 0.9rem;
  border-left: 2px solid var(--accent-light);
}

.resume-entry li {
  position: relative;
  margin-bottom: 0.2rem;
  padding-left: 1.15rem;
  color: var(--text-muted);
}

.resume-entry li::before {
  content: "";
  position: absolute;
  top: 0.58em;
  left: 0;
  width: 0.42rem;
  height: 0.42rem;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-light);
}

.resume-entry ul ul li::before {
  width: 0.35rem;
  height: 0.35rem;
  background: var(--accent-dark);
  box-shadow: none;
}

.resume-entry p {
  font-size: 10.5pt;
  margin-bottom: 0.15rem;
  color: var(--text-muted);
}

.resume-block > ul {
  display: grid;
  gap: 0.5rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.resume-block > ul > li {
  position: relative;
  padding: 0.55rem 0.75rem 0.55rem 2.05rem;
  color: var(--text-muted);
  background: linear-gradient(135deg, rgba(219, 234, 254, 0.45), rgba(255, 255, 255, 0.9));
  border: 1px solid rgba(226, 232, 240, 0.9);
  border-radius: 10px;
}

.resume-block > ul > li::before {
  content: "";
  position: absolute;
  top: 1rem;
  left: 0.85rem;
  width: 0.45rem;
  height: 0.45rem;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 4px var(--accent-light);
}

@media (max-width: 768px) {
  .resume-modal {
    padding: 0;
  }

  .resume-modal-panel {
    max-height: 100vh;
    height: 100vh;
    border-radius: 0;
  }

  .resume-printable {
    padding: 1.5rem 1.25rem;
  }

  .resume-header {
    flex-direction: column-reverse;
    gap: 0.75rem;
    text-align: center;
  }

  .resume-photo {
    width: 88px;
    height: 106px;
    flex-basis: 88px;
  }

  .resume-modal-toolbar {
    flex-direction: column;
    align-items: stretch;
  }

  .resume-modal-actions {
    justify-content: stretch;
  }

  .resume-modal-actions .btn {
    flex: 1;
    justify-content: center;
  }
}

@media print {
  @page {
    margin: 0.5in;
  }

  /* Don't let a heading or an entry get orphaned across a page break. */
  .resume-block h2,
  .resume-entry-header {
    break-after: avoid;
    page-break-after: avoid;
  }

  .resume-entry,
  .resume-block > ul > li {
    break-inside: avoid;
    page-break-inside: avoid;
  }

  .resume-block {
    break-inside: auto;
  }

  body.print-resume-mode > *:not(.resume-modal) {
    display: none !important;
  }

  body.print-resume-mode .resume-modal {
    position: static;
    display: block !important;
    padding: 0;
  }

  body.print-resume-mode .resume-modal[hidden] {
    display: block !important;
  }

  body.print-resume-mode .resume-modal-backdrop,
  body.print-resume-mode .resume-modal-toolbar {
    display: none !important;
  }

  body.print-resume-mode .resume-modal-panel {
    max-height: none;
    width: 100%;
    box-shadow: none;
    border-radius: 0;
    overflow: visible;
  }

  body.print-resume-mode .resume-modal-body {
    overflow: visible;
    padding: 0;
    background: #fff;
  }

  body.print-resume-mode .resume-printable {
    box-shadow: none;
    max-width: none;
    padding: 0;
    margin: 0;
    color: #111;
    font-family: Georgia, "Times New Roman", Times, serif;
    font-size: 11pt;
    line-height: 1.45;
    border: 0;
    border-radius: 0;
  }

  body.print-resume-mode .resume-header {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    gap: 1.5rem;
    text-align: initial;
    margin: 0 0 1.25rem;
    padding: 0 0 1rem;
    border: 0;
    border-bottom: 2px solid #111;
    border-radius: 0;
    background: #fff;
  }

  body.print-resume-mode .resume-header-text {
    text-align: left;
  }

  body.print-resume-mode .resume-photo {
    width: 96px;
    height: 116px;
    flex: 0 0 96px;
    border: 1px solid #111;
    border-radius: 0;
    box-shadow: none;
  }

  body.print-resume-mode .resume-name {
    font-family: Georgia, "Times New Roman", Times, serif;
    font-size: 24pt;
    letter-spacing: 0.02em;
  }

  body.print-resume-mode .resume-headline {
    display: block;
    font-size: 12pt;
    padding: 0;
    color: #111;
    background: none;
    border-radius: 0;
  }

  body.print-resume-mode .resume-contact,
  body.print-resume-mode .resume-block > p,
  body.print-resume-mode .resume-entry p,
  body.print-resume-mode .resume-entry li,
  /* Achievements is a direct child list, so it missed the ink-black override
     and printed grey while every other section printed black. */
  body.print-resume-mode .resume-block > ul > li {
    color: #111;
  }

  body.print-resume-mode .resume-block h2 {
    display: block;
    font-size: 12pt;
    color: #111;
    border-bottom: 1px solid #333;
    padding-bottom: 0.2rem;
    margin-bottom: 0.65rem;
  }

  body.print-resume-mode .resume-block h2::before {
    display: none;
  }

  body.print-resume-mode .resume-entry {
    padding: 0;
    border: 0;
    border-radius: 0;
    box-shadow: none;
  }

  body.print-resume-mode .resume-entry ul,
  body.print-resume-mode .resume-block > ul {
    display: block;
    margin: 0.25rem 0 0 1.15rem;
    padding: 0;
    list-style: disc;
  }

  body.print-resume-mode .resume-entry ul ul {
    margin-top: 0.15rem;
    margin-left: 1.35rem;
    padding-left: 0;
    border-left: 0;
  }

  body.print-resume-mode .resume-entry li,
  body.print-resume-mode .resume-block > ul > li {
    position: static;
    margin-bottom: 0.2rem;
    padding: 0;
    background: none;
    border: 0;
    border-radius: 0;
  }

  body.print-resume-mode .resume-entry li::before,
  body.print-resume-mode .resume-block > ul > li::before {
    display: none;
  }

  body.print-resume-mode .resume-entry-header span {
    color: #111;
    background: none;
    padding: 0;
    border-radius: 0;
  }
}
