/* Design tokens: edit these variables to quickly change the site's look and spacing. */
:root {
  --bg: #f7f9fc;
  --surface: #ffffff;
  --surface-alt: #fbfdff;
  --text: #172033;
  --muted: #637083;
  --line: #dbe3ee;
  --accent: #2563eb;
  --accent-strong: #1d4ed8;
  --accent-contrast: #ffffff;
  --accent-soft: #e8f0ff;
  --header-bg: rgba(247, 249, 252, 0.88);
  --header-line: rgba(219, 227, 238, 0.8);
  --contact-bg: #172033;
  --contact-eyebrow: #93c5fd;
  --contact-muted: #dbeafe;
  --solid-text: #ffffff;
  --shadow: 0 18px 45px rgba(23, 32, 51, 0.1);
  --radius: 8px;
  --max-width: 1120px;
  color-scheme: light;
}

:root[data-theme="dark"] {
  --bg: #101112;
  --surface: #181b1d;
  --surface-alt: #202427;
  --text: #f3f7f5;
  --muted: #a8b2ae;
  --line: #30373a;
  --accent: #0ea5e9;
  --accent-strong: #38bdf8;
  --accent-contrast: #051016;
  --accent-soft: #0b3447;
  --header-bg: rgba(16, 17, 18, 0.9);
  --header-line: rgba(48, 55, 58, 0.85);
  --contact-bg: #15181b;
  --contact-eyebrow: #7dd3fc;
  --contact-muted: #c8d7d3;
  --solid-text: #ffffff;
  --shadow: 0 18px 45px rgba(0, 0, 0, 0.36);
  color-scheme: dark;
}

/* Base reset and document defaults. */
* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 88px;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.6;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}

body.nav-open {
  overflow: hidden;
}

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

a {
  color: inherit;
}

a:focus-visible,
button:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 4px;
}

/* Shared accessibility helpers. */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.skip-link {
  position: fixed;
  top: 12px;
  left: 12px;
  z-index: 100;
  padding: 10px 14px;
  border-radius: var(--radius);
  background: var(--text);
  color: #fff;
  font-weight: 800;
  text-decoration: none;
  transform: translateY(-140%);
  transition: transform 180ms ease;
}

.skip-link:focus {
  transform: translateY(0);
}

/* Sticky header and navigation styles, including the mobile menu button. */
.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  background: var(--header-bg);
  border-bottom: 1px solid var(--header-line);
  backdrop-filter: blur(16px);
}

.nav {
  width: min(calc(100% - 32px), var(--max-width));
  min-height: 72px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.logo {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: var(--radius);
  background: var(--text);
  color: var(--bg);
  font-weight: 800;
  letter-spacing: 0;
  text-decoration: none;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.nav-links > li > a {
  display: inline-flex;
  padding: 10px 14px;
  border-radius: var(--radius);
  color: var(--muted);
  font-size: 0.95rem;
  font-weight: 700;
  text-decoration: none;
  transition: background 180ms ease, color 180ms ease;
}

.nav-links > li > a:hover,
.nav-links > li > a.active {
  background: var(--accent-soft);
  color: var(--accent-strong);
}

.nav-links > li > a[aria-current="location"] {
  background: var(--accent-soft);
  color: var(--accent-strong);
}

.nav-resume-wrapper {
  position: relative;
}

.nav-resume-btn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 10px 14px;
  border: none;
  border-radius: var(--radius);
  background: var(--text);
  color: var(--bg);
  font-family: inherit;
  font-size: 0.95rem;
  font-weight: 800;
  cursor: pointer;
  transition: background 180ms ease, color 180ms ease;
}

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

.resume-caret {
  display: inline-block;
  font-size: 0.72em;
  line-height: 1;
  transition: transform 180ms ease;
}

.nav-resume-wrapper[data-open] .resume-caret {
  transform: rotate(180deg);
}

.nav-resume-dropdown {
  display: none;
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  z-index: 30;
  min-width: 210px;
  margin: 0;
  padding: 6px;
  list-style: none;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow);
}

.nav-resume-wrapper[data-open] .nav-resume-dropdown {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.nav-resume-dropdown a {
  display: block;
  padding: 9px 12px;
  border-radius: calc(var(--radius) - 2px);
  color: var(--text);
  font-size: 0.9rem;
  font-weight: 700;
  text-decoration: none;
  white-space: nowrap;
  transition: background 180ms ease, color 180ms ease;
}

.nav-resume-dropdown a:hover,
.nav-resume-dropdown a:focus-visible {
  background: var(--accent-soft);
  color: var(--accent-strong);
}

.theme-control {
  display: inline-flex;
  align-items: center;
}

.theme-toggle {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 56px;
  height: 44px;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  color: var(--text);
  cursor: pointer;
  box-shadow: 0 8px 20px rgba(23, 32, 51, 0.08);
  transition: background 180ms ease, border-color 180ms ease, box-shadow 180ms ease, transform 180ms ease;
}

.theme-toggle:hover {
  background: var(--accent-soft);
  border-color: var(--accent-strong);
  box-shadow: 0 12px 24px rgba(23, 32, 51, 0.12);
  transform: translateY(-1px);
}

.theme-toggle::before,
.theme-toggle::after {
  position: absolute;
  z-index: 1;
  top: 50%;
  font-size: 0.76rem;
  line-height: 1;
  transform: translateY(-50%);
  transition: color 180ms ease, opacity 180ms ease;
}

.theme-toggle::before {
  left: 9px;
  content: "\263E";
  color: var(--muted);
}

.theme-toggle::after {
  right: 8px;
  content: "\2600";
  color: #b45309;
}

.mobile-theme-toggle {
  display: none;
}

.theme-toggle-track {
  position: relative;
  width: 42px;
  height: 24px;
  border-radius: 999px;
  background: #e2e8f0;
  box-shadow: inset 0 0 0 1px rgba(23, 32, 51, 0.16);
  transition: background 180ms ease, box-shadow 180ms ease;
}

.theme-toggle-thumb {
  position: absolute;
  z-index: 2;
  top: 3px;
  left: 3px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--surface);
  box-shadow: 0 2px 7px rgba(23, 32, 51, 0.36);
  transition: transform 180ms ease, background 180ms ease;
}

:root[data-theme="dark"] .theme-toggle-track {
  background: #075985;
  box-shadow: inset 0 0 0 1px rgba(125, 211, 252, 0.42);
}

:root[data-theme="dark"] .theme-toggle-thumb {
  background: var(--text);
  transform: translateX(18px);
}

:root[data-theme="dark"] .theme-toggle::before {
  color: #7dd3fc;
}

:root[data-theme="dark"] .theme-toggle::after {
  color: var(--muted);
  opacity: 0.72;
}

.nav-toggle {
  display: none;
  width: 44px;
  height: 44px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  cursor: pointer;
}

.nav-toggle span:not(.sr-only) {
  display: block;
  width: 20px;
  height: 2px;
  margin: 5px auto;
  background: var(--text);
  border-radius: 2px;
  transition: transform 180ms ease, opacity 180ms ease;
}

.nav-toggle[aria-expanded="true"] span:nth-child(2) {
  transform: translateY(7px) rotate(45deg);
}

.nav-toggle[aria-expanded="true"] span:nth-child(3) {
  opacity: 0;
}

.nav-toggle[aria-expanded="true"] span:nth-child(4) {
  transform: translateY(-7px) rotate(-45deg);
}

/* Shared page section layout and heading styles. */
.section {
  width: min(calc(100% - 32px), var(--max-width));
  margin: 0 auto;
  padding: 96px 0;
  scroll-margin-top: 90px;
}

.no-break {
  white-space: nowrap;
  overflow-wrap: normal;
  word-break: keep-all;
}

.role-lead,
.role-divider,
.role-comma,
.role-amp {
  white-space: normal;
}

/* Hero section: main intro, portrait, highlights, and call-to-action buttons. */
.hero {
  min-height: calc(100vh - 72px);
  display: grid;
  grid-template-columns: minmax(0, 1.18fr) minmax(280px, 0.72fr);
  align-items: center;
  gap: 44px;
  padding-top: 72px;
}

.eyebrow {
  margin: 0 0 14px;
  color: var(--accent-strong);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

h1,
h2,
h3,
p {
  overflow-wrap: anywhere;
}

h1,
h2,
h3 {
  margin: 0;
  line-height: 1.08;
}

h1 {
  max-width: 760px;
  font-size: clamp(3.25rem, 9vw, 6.6rem);
  letter-spacing: 0;
}

h2 {
  max-width: 720px;
  font-size: clamp(2rem, 5vw, 3.4rem);
  letter-spacing: 0;
}

h3 {
  font-size: 1.35rem;
}

.hero-tagline {
  max-width: 680px;
  margin: 24px 0 0;
  color: var(--muted);
  font-size: clamp(1.1rem, 2.4vw, 1.45rem);
}

.hero-role {
  max-width: 820px;
  margin: 18px 0 0;
  color: var(--text);
  font-size: clamp(1.12rem, 2.3vw, 1.48rem);
  font-weight: 800;
  line-height: 1.3;
  overflow-wrap: normal;
  text-wrap: balance;
}

.hero-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  max-width: 760px;
  margin: 28px 0 0;
  padding: 0;
  list-style: none;
}

.hero-badges li {
  display: inline-flex;
  align-items: center;
  max-width: 100%;
  min-width: 0;
  min-height: 38px;
  padding: 7px 11px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  color: var(--text);
  font-size: 0.9rem;
  font-weight: 800;
  line-height: 1.2;
  overflow-wrap: anywhere;
  text-align: center;
  word-break: break-word;
}

.variant-hero h1 {
  max-width: 830px;
  font-size: clamp(1.9rem, 4.2vw, 3.4rem);
  overflow-wrap: anywhere;
}

.variant-hero .hero-tagline {
  font-size: clamp(1.02rem, 2vw, 1.24rem);
}

.hero-highlights {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  max-width: 720px;
  margin: 30px 0 0;
}

.hero-highlights div {
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: color-mix(in srgb, var(--surface) 78%, transparent);
}

.hero-highlights dt {
  color: var(--muted);
  font-size: 0.74rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.hero-highlights dd {
  margin: 4px 0 0;
  color: var(--text);
  font-weight: 800;
  line-height: 1.25;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 34px;
}

.hero-actions .btn {
  padding-right: 18px;
  padding-left: 18px;
}

.resume-quick-links {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  max-width: 760px;
  margin-top: 16px;
}

.resume-quick-links a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  max-width: 100%;
  min-width: 0;
  min-height: 40px;
  padding: 8px 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface-alt);
  color: var(--accent-strong);
  font-size: 0.9rem;
  font-weight: 800;
  line-height: 1.2;
  text-align: center;
  text-decoration: none;
  white-space: normal;
  word-break: break-word;
}

.resume-quick-links a:hover {
  background: var(--accent-soft);
}

/* Reusable button styles used in the hero and other action areas. */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  max-width: 100%;
  min-width: 0;
  min-height: 48px;
  padding: 0 20px;
  border: 1px solid transparent;
  border-radius: var(--radius);
  font-weight: 800;
  line-height: 1.2;
  text-align: center;
  text-decoration: none;
  white-space: normal;
  word-break: break-word;
  transition: transform 180ms ease, box-shadow 180ms ease, background 180ms ease;
}

.btn:hover {
  transform: translateY(-2px);
}

.btn.primary {
  background: var(--accent);
  color: var(--accent-contrast);
  box-shadow: 0 14px 30px rgba(37, 99, 235, 0.28);
}

.btn.primary:hover {
  background: var(--accent-strong);
}

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

.btn.text {
  color: var(--accent-strong);
}

.btn.text:hover {
  background: var(--accent-soft);
}

.hero-visual {
  position: relative;
  min-width: 0;
}

.hero-content {
  min-width: 0;
}

.hero-visual::before {
  content: "";
  position: absolute;
  inset: 12%;
  z-index: -1;
  border-radius: 30px;
  background: var(--accent-soft);
  transform: rotate(-8deg);
}

.hero-visual img {
  width: min(100%, 440px);
  aspect-ratio: 1;
  margin-left: auto;
  border: 8px solid var(--surface);
  border-radius: 28px;
  object-fit: cover;
  box-shadow: var(--shadow);
}

/* About section layout. */
.section-heading {
  margin-bottom: 34px;
}

.about-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 28px;
}

.about-grid p,
.contact-panel p {
  margin: 0;
  color: var(--muted);
  font-size: 1.08rem;
}

.about-grid-wide {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

/* Skills section category cards and pill lists. */
.skills-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 20px;
}

.skill-group {
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: 0 8px 24px rgba(23, 32, 51, 0.05);
}

.skill-group h3 {
  margin-bottom: 16px;
  font-size: 1.05rem;
}

.skill-list {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.skill-list li {
  display: inline-flex;
  align-items: center;
  min-height: 40px;
  padding: 8px 11px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface-alt);
  color: var(--text);
  font-size: 0.92rem;
  font-weight: 700;
  text-align: center;
}

.priority-skills {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.priority-skills li {
  display: inline-flex;
  align-items: center;
  min-height: 42px;
  padding: 9px 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  color: var(--text);
  font-weight: 800;
  box-shadow: 0 6px 18px rgba(23, 32, 51, 0.05);
}

/* Role fit section for quickly matching portfolio evidence to target job families. */
.role-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px;
}

.role-path-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.role-card {
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: 0 8px 24px rgba(23, 32, 51, 0.05);
}

.role-card h3 {
  margin-bottom: 18px;
  font-size: 1.18rem;
}

.role-path-card {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.role-path-card h3 {
  margin-bottom: 0;
}

.role-path-card .role-list {
  margin-bottom: 6px;
}

.role-path-card .btn {
  width: 100%;
  margin-top: auto;
  text-align: center;
}

.path-label {
  margin: 0;
  color: var(--accent-strong);
  font-size: 0.78rem;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.card-intro {
  margin: 0;
  color: var(--muted);
}

.role-list {
  display: grid;
  gap: 10px;
  margin: 0;
  padding-left: 20px;
  color: var(--muted);
}

.role-list li::marker {
  color: var(--accent-strong);
}

/* Project cards and project technology tags. */
.project-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 20px;
}

.project-grid-wide {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.project-card {
  display: flex;
  min-height: 380px;
  flex-direction: column;
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: 0 12px 30px rgba(23, 32, 51, 0.06);
  transition: transform 180ms ease, box-shadow 180ms ease;
}

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

.project-number {
  margin: 0 0 20px;
  color: var(--accent-strong);
  font-weight: 900;
}

.project-image {
  width: 100%;
  height: clamp(170px, 32vw, 240px);
  margin: -18px 0 20px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  object-fit: contain;
  object-position: center;
  background: #a1a1a0;
}

.project-card p:not(.project-number):not(.project-impact) {
  margin: 16px 0 24px;
  color: var(--muted);
}

.project-impact {
  margin: 0 0 24px;
  padding-left: 12px;
  border-left: 3px solid var(--accent);
  color: var(--text);
  font-size: 0.95rem;
  font-weight: 650;
}

.project-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 18px 0 20px;
  padding: 0;
  list-style: none;
}

.project-tags li {
  padding: 6px 10px;
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--accent-strong);
  font-size: 0.82rem;
  font-weight: 800;
}

.project-highlights {
  display: grid;
  gap: 8px;
  margin: 0 0 24px 18px;
  padding: 0;
  color: var(--muted);
}

.project-highlights li::marker {
  color: var(--accent-strong);
}

.project-links {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: auto;
}

.project-links a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  max-width: 100%;
  min-width: 0;
  min-height: 40px;
  padding: 8px 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface-alt);
  color: var(--accent-strong);
  cursor: pointer;
  font-size: 0.92rem;
  font-weight: 900;
  line-height: 1.2;
  text-align: center;
  text-decoration: none;
  white-space: normal;
  word-break: break-word;
  transition: background 200ms ease, border-color 200ms ease, transform 200ms ease;
}

.project-links a:hover {
  background: var(--accent-soft);
  border-color: #b7ccff;
  text-decoration: underline;
  transform: translateY(-1px);
}

/* Contact callout panel and social links. */
.contact-panel {
  max-width: 820px;
  padding: 44px;
  border-radius: var(--radius);
  background: var(--contact-bg);
  color: var(--solid-text);
  box-shadow: var(--shadow);
}

.contact-panel .eyebrow {
  color: var(--contact-eyebrow);
}

.contact-panel p {
  margin-top: 18px;
  color: var(--contact-muted);
}

.contact-links {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 28px;
  font-style: normal;
}

.contact-links a {
  display: inline-flex;
  justify-content: center;
  max-width: 100%;
  min-width: 0;
  padding: 10px 14px;
  border: 1px solid rgba(255, 255, 255, 0.24);
  border-radius: var(--radius);
  color: var(--solid-text);
  font-weight: 800;
  line-height: 1.2;
  text-align: center;
  text-decoration: none;
  white-space: normal;
  word-break: break-word;
  transition: background 180ms ease;
}

.contact-links a:hover {
  background: rgba(255, 255, 255, 0.12);
}

.improvement-card {
  max-width: 820px;
}

/* Footer. */
.site-footer {
  width: min(calc(100% - 32px), var(--max-width));
  margin: 0 auto;
  padding: 28px 0 42px;
  color: var(--muted);
  font-size: 0.95rem;
}

.site-footer p {
  margin: 0;
}

/* Tablet and small laptop layout adjustments. */
@media (max-width: 860px) {
  .mobile-theme-toggle {
    display: inline-flex;
    margin-left: auto;
  }

  .nav-toggle {
    display: block;
    margin-left: 8px;
  }

  .nav-links {
    position: fixed;
    top: 72px;
    right: 16px;
    left: 16px;
    display: none;
    flex-direction: column;
    align-items: stretch;
    padding: 14px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: var(--surface);
    box-shadow: var(--shadow);
  }

  .nav-links.open {
    display: flex;
  }

  .nav-links > li > a {
    justify-content: center;
  }

  .nav-links .theme-control {
    display: none;
  }

  .theme-control {
    justify-content: center;
    padding: 4px 0;
  }

  .hero {
    grid-template-columns: 1fr;
    gap: 40px;
    min-height: auto;
    padding-top: 64px;
  }

  .hero-visual img {
    width: min(100%, 360px);
    margin: 0 auto;
  }

  .about-grid,
  .about-grid-wide,
  .role-grid,
  .role-path-grid,
  .project-grid,
  .project-grid-wide {
    grid-template-columns: 1fr;
  }

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

  .hero-highlights {
    grid-template-columns: 1fr;
  }

  /* Dropdown: show all three links inline in the mobile nav panel. */
  .nav-resume-wrapper {
    display: flex;
    flex-direction: column;
    gap: 4px;
  }

  .nav-resume-btn .resume-caret {
    display: none;
  }

  .nav-resume-dropdown {
    display: flex;
    flex-direction: column;
    gap: 2px;
    position: static;
    border: none;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
    padding: 0 0 0 10px;
    border-left: 2px solid var(--line);
  }

  .nav-resume-dropdown a {
    justify-content: center;
    text-align: center;
    color: var(--muted);
    font-size: 0.92rem;
  }
}

/* Phone layout adjustments. */
@media (max-width: 560px) {
  html,
  body {
    max-width: 100%;
    overflow-x: hidden;
  }

  .nav,
  .section,
  .site-footer {
    width: calc(100% - 32px);
    max-width: 100%;
    padding-right: 0;
    padding-left: 0;
  }

  .section {
    padding-top: 70px;
    padding-bottom: 70px;
  }

  .hero {
    padding-top: 48px;
  }

  .hero-content,
  .hero-badges,
  .hero-actions,
  .resume-quick-links {
    width: 100%;
    max-width: 100%;
  }

  .hero-role {
    font-size: 0.98rem;
    line-height: 1.35;
    word-break: normal;
  }

  .hero-role .role-lead,
  .hero-role .role-devops {
    display: block;
  }

  .hero-role .role-divider,
  .hero-role .role-amp {
    display: none;
  }

  .hero-role .role-devops::before {
    content: "& ";
  }

  .hero-tagline {
    font-size: 1rem;
  }

  .hero-badges {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
  }

  .hero-badges li {
    justify-content: center;
  }

  .btn {
    min-height: auto;
    padding: 14px;
    font-size: 0.95rem;
  }

  .hero-visual img {
    width: min(100%, 320px);
  }

  h1 {
    font-size: clamp(3rem, 16vw, 4.2rem);
  }

  .variant-hero h1 {
    font-size: clamp(1.6rem, 8vw, 2rem);
    line-height: 1.12;
  }

  .variant-hero .hero-tagline {
    font-size: 1rem;
  }

  .hero-actions,
  .contact-links,
  .resume-quick-links {
    flex-direction: column;
    align-items: stretch;
  }

  .btn,
  .contact-links a,
  .resume-quick-links a {
    width: 100%;
  }

  .skill-group {
    padding: 18px;
  }

  .contact-panel {
    padding: 28px 20px;
  }

  .project-card {
    min-height: auto;
  }
}

/* Respect users who prefer reduced animation. */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
  }
}
