:root {
  --bg: #f7f9fc;
  --surface: #ffffff;
  --surface-raised: #eef4fb;
  --surface-strong: #e6effa;
  --text: #101828;
  --text-muted: #475467;
  --text-subtle: #5f6b7c;
  --accent: #175cd3;
  --accent-hover: #1849a9;
  --accent-soft: #dbeafe;
  --accent-text: #0c3c87;
  --on-accent: #ffffff;
  --evidence: #167647;
  --border: #d0d5dd;
  --border-strong: #98a2b3;
  --header-bg: rgb(247 249 252 / 0.92);
  --hero-glow: rgb(23 92 211 / 0.14);
  --hero-grid: rgb(23 92 211 / 0.08);
  --approach-bg: #0e1f35;
  --approach-surface: #162d49;
  --approach-text: #f4f7fb;
  --approach-muted: #b7c6d8;
  --approach-accent: #67b7ff;
  --shadow-sm: 0 1px 2px rgb(16 24 40 / 0.06), 0 4px 12px rgb(16 24 40 / 0.05);
  --shadow-lg: 0 20px 48px rgb(16 24 40 / 0.12);
  --focus: #b54708;
  --content-width: 72rem;
  --reading-width: 65ch;
  --header-height: 4.25rem;
  color-scheme: light;
}

:root[data-theme="dark"] {
  --bg: #08111f;
  --surface: #0f1b2d;
  --surface-raised: #14233a;
  --surface-strong: #1a2d48;
  --text: #f4f7fb;
  --text-muted: #a9b7c9;
  --text-subtle: #8fa2b9;
  --accent: #67b7ff;
  --accent-hover: #93cbff;
  --accent-soft: #173c62;
  --accent-text: #d9edff;
  --on-accent: #08111f;
  --evidence: #6ee7a8;
  --border: #263a54;
  --border-strong: #3c5675;
  --header-bg: rgb(8 17 31 / 0.92);
  --hero-glow: rgb(103 183 255 / 0.18);
  --hero-grid: rgb(103 183 255 / 0.08);
  --approach-bg: #050b14;
  --approach-surface: #0f1b2d;
  --approach-text: #f4f7fb;
  --approach-muted: #a9b7c9;
  --approach-accent: #67b7ff;
  --shadow-sm: 0 1px 2px rgb(0 0 0 / 0.32), 0 4px 12px rgb(0 0 0 / 0.2);
  --shadow-lg: 0 20px 48px rgb(0 0 0 / 0.36);
  --focus: #fdb022;
  color-scheme: dark;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme]) {
    --bg: #08111f;
    --surface: #0f1b2d;
    --surface-raised: #14233a;
    --surface-strong: #1a2d48;
    --text: #f4f7fb;
    --text-muted: #a9b7c9;
    --text-subtle: #8fa2b9;
    --accent: #67b7ff;
    --accent-hover: #93cbff;
    --accent-soft: #173c62;
    --accent-text: #d9edff;
    --on-accent: #08111f;
    --evidence: #6ee7a8;
    --border: #263a54;
    --border-strong: #3c5675;
    --header-bg: rgb(8 17 31 / 0.92);
    --hero-glow: rgb(103 183 255 / 0.18);
    --hero-grid: rgb(103 183 255 / 0.08);
    --approach-bg: #050b14;
    --approach-surface: #0f1b2d;
    --approach-text: #f4f7fb;
    --approach-muted: #a9b7c9;
    --approach-accent: #67b7ff;
    --focus: #fdb022;
    color-scheme: dark;
  }
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-height) + 1.5rem);
}

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

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

button,
a {
  font: inherit;
}

a {
  color: var(--accent);
  text-underline-offset: 0.2em;
}

a:hover {
  color: var(--accent-hover);
}

:where(a, button, [tabindex]):focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 4px;
  border-radius: 0.4rem;
  box-shadow: 0 0 0 2px var(--bg);
}

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

h1,
h2,
h3 {
  margin: 0;
  color: var(--text);
  font-weight: 730;
  letter-spacing: -0.035em;
  line-height: 1.08;
}

h1 {
  max-width: 14ch;
  font-size: clamp(3.2rem, 6vw, 4.7rem);
}

h2 {
  max-width: 20ch;
  font-size: clamp(2.25rem, 4vw, 3.25rem);
}

h3 {
  font-size: clamp(1.25rem, 2vw, 1.55rem);
}

.visually-hidden {
  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: 0.75rem;
  left: 0.75rem;
  z-index: 1000;
  padding: 0.7rem 1rem;
  border-radius: 0.65rem;
  background: var(--accent);
  color: var(--on-accent);
  font-weight: 700;
  text-decoration: none;
  transform: translateY(-160%);
  transition: transform 160ms ease;
}

.skip-link:focus {
  color: var(--on-accent);
  transform: translateY(0);
}

.section-shell {
  width: min(100% - 3rem, var(--content-width));
  margin-inline: auto;
}

.eyebrow {
  margin: 0 0 1rem;
  color: var(--accent);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.13em;
  line-height: 1.4;
  text-transform: uppercase;
}

/* Header and navigation */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  min-height: var(--header-height);
  border-bottom: 1px solid var(--border);
  background: var(--header-bg);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
}

.site-nav {
  width: min(100% - 3rem, var(--content-width));
  min-height: var(--header-height);
  margin-inline: auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
}

.nav-brand {
  flex: 0 0 auto;
  display: grid;
  width: 2.45rem;
  height: 2.45rem;
  place-items: center;
  border-radius: 0.7rem;
  background: var(--accent);
  color: var(--on-accent);
  font-weight: 850;
  letter-spacing: -0.04em;
  text-decoration: none;
}

.nav-brand:hover {
  color: var(--on-accent);
}

.nav-menu {
  display: flex;
  align-items: center;
  gap: 0.15rem;
  margin: 0;
  padding: 0;
  list-style: none;
  white-space: nowrap;
}

.nav-menu > li {
  display: flex;
  align-items: center;
}

.nav-menu a {
  display: block;
  padding: 0.55rem 0.72rem;
  border-radius: 0.65rem;
  color: var(--text-muted);
  font-size: 0.92rem;
  font-weight: 650;
  line-height: 1.2;
  text-decoration: none;
}

.nav-menu a:hover,
.nav-menu a:focus-visible {
  background: var(--accent-soft);
  color: var(--accent-text);
}

.nav-menu .nav-resume {
  margin-left: 0.4rem;
  padding-inline: 1rem;
  background: var(--accent);
  color: var(--on-accent);
}

.nav-menu .nav-resume:hover,
.nav-menu .nav-resume:focus-visible {
  background: var(--accent-hover);
  color: var(--on-accent);
}

.nav-toggle,
.theme-toggle {
  display: grid;
  width: 2.55rem;
  height: 2.55rem;
  place-items: center;
  border: 1px solid var(--border);
  border-radius: 0.7rem;
  background: transparent;
  color: var(--text-muted);
  cursor: pointer;
}

.theme-toggle {
  margin-left: 0.3rem;
}

.theme-toggle[hidden] {
  display: none;
}

.theme-toggle:hover,
.nav-toggle:hover {
  border-color: var(--border-strong);
  background: var(--surface-raised);
  color: var(--text);
}

.theme-toggle:focus,
.nav-toggle:focus {
  outline: 3px solid var(--focus);
  outline-offset: 4px;
  box-shadow: 0 0 0 2px var(--bg);
}

.theme-toggle .icon-sun {
  display: none;
}

:root[data-theme="dark"] .theme-toggle .icon-sun {
  display: block;
}

:root[data-theme="dark"] .theme-toggle .icon-moon {
  display: none;
}

.nav-toggle {
  display: none;
  padding: 0.55rem;
}

.nav-toggle span {
  width: 1.35rem;
  height: 2px;
  margin-block: 2px;
  border-radius: 999px;
  background: currentColor;
  transition: transform 180ms ease, opacity 180ms ease;
}

.site-header[data-nav-open="true"] .nav-toggle span:nth-child(1) {
  transform: translateY(6px) rotate(45deg);
}

.site-header[data-nav-open="true"] .nav-toggle span:nth-child(2) {
  opacity: 0;
}

.site-header[data-nav-open="true"] .nav-toggle span:nth-child(3) {
  transform: translateY(-6px) rotate(-45deg);
}

/* Hero */
.hero {
  position: relative;
  isolation: isolate;
  min-height: 42rem;
  padding: clamp(5rem, 9vw, 7.5rem) 0 clamp(5rem, 8vw, 7rem);
  overflow: hidden;
  background:
    radial-gradient(circle at 74% 34%, var(--hero-glow), transparent 34rem),
    linear-gradient(180deg, transparent 0%, var(--bg) 100%);
}

.hero::before {
  content: "";
  position: absolute;
  z-index: -2;
  inset: 0;
  background-image:
    linear-gradient(var(--hero-grid) 1px, transparent 1px),
    linear-gradient(90deg, var(--hero-grid) 1px, transparent 1px);
  background-size: 4rem 4rem;
  mask-image: linear-gradient(90deg, transparent 20%, #000 70%, transparent 100%);
  pointer-events: none;
}

.hero::after {
  content: "";
  position: absolute;
  z-index: -2;
  inset: auto -10rem -16rem auto;
  width: 34rem;
  height: 34rem;
  border: 1px solid var(--border);
  border-radius: 50%;
  opacity: 0.55;
}

.hero-inner {
  width: min(100% - 3rem, var(--content-width));
  margin-inline: auto;
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(17rem, 0.65fr);
  align-items: center;
  gap: clamp(3rem, 7vw, 7rem);
}

.hero-lead {
  max-width: 57ch;
  margin: 1.1rem 0 0;
  color: var(--text-muted);
  font-size: clamp(1.02rem, 1.55vw, 1.16rem);
  line-height: 1.65;
}

.hero-positioning {
  max-width: 42ch;
  margin: 1.5rem 0 0;
  color: var(--text);
  font-size: clamp(1.18rem, 2vw, 1.45rem);
  font-weight: 720;
  line-height: 1.45;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  margin-top: 2rem;
}

.button {
  display: inline-flex;
  min-height: 3.15rem;
  align-items: center;
  justify-content: center;
  padding: 0.78rem 1.25rem;
  border: 1px solid transparent;
  border-radius: 0.75rem;
  font-weight: 750;
  line-height: 1.2;
  text-align: center;
  text-decoration: none;
  transition: background-color 180ms ease, border-color 180ms ease, color 180ms ease, transform 180ms ease;
}

.button:hover {
  transform: translateY(-1px);
}

.button-primary {
  background: var(--accent);
  color: var(--on-accent);
}

.button-primary:hover {
  background: var(--accent-hover);
  color: var(--on-accent);
}

.button-secondary {
  border-color: var(--border-strong);
  background: var(--surface);
  color: var(--text);
}

.button-secondary:hover {
  border-color: var(--accent);
  background: var(--accent-soft);
  color: var(--accent-text);
}

.availability {
  margin: 1.25rem 0 0;
  color: var(--text-subtle);
  font-size: 0.9rem;
}

.hero-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem 1.15rem;
  margin-top: 1.15rem;
}

.hero-links a {
  display: inline-flex;
  min-height: 2.75rem;
  align-items: center;
  color: var(--text-muted);
  font-size: 0.9rem;
  font-weight: 750;
  text-decoration-thickness: 1px;
}

.hero-links a:hover {
  color: var(--accent);
}

.hero-photo {
  justify-self: end;
  width: min(100%, 21rem);
}

.photo-frame {
  position: relative;
  padding: 0.65rem;
  border: 1px solid var(--border-strong);
  border-radius: 50%;
  background: var(--surface);
  box-shadow: var(--shadow-lg);
}

.photo-frame::before,
.photo-frame::after {
  content: "";
  position: absolute;
  width: 0.55rem;
  height: 0.55rem;
  border-radius: 50%;
  background: var(--evidence);
  box-shadow: 0 0 0 0.45rem var(--bg);
}

.photo-frame::before {
  top: 2.2rem;
  right: 1.2rem;
}

.photo-frame::after {
  bottom: 2rem;
  left: 1.1rem;
}

.photo-frame img {
  width: 100%;
  height: auto;
  aspect-ratio: 1;
  border-radius: 50%;
  object-fit: cover;
}

.photo-caption {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  margin: 1.1rem 0 0;
  color: var(--text-muted);
  font-size: 0.82rem;
  font-weight: 650;
}

.photo-caption span {
  width: 0.55rem;
  height: 0.55rem;
  flex: 0 0 auto;
  border-radius: 50%;
  background: var(--evidence);
}

/* Capability strip */
.capability-strip {
  border-block: 1px solid var(--border);
  background: var(--surface);
}

.capability-strip ul {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin: 0;
  padding: 1.6rem 0;
  list-style: none;
}

.capability-strip li {
  min-width: 0;
  padding: 0.2rem 1.5rem;
  border-left: 1px solid var(--border);
}

.capability-strip li:first-child {
  padding-left: 0;
  border-left: 0;
}

.capability-strip strong,
.capability-strip span {
  display: block;
}

.capability-strip strong {
  color: var(--text);
  font-size: 1rem;
  line-height: 1.35;
}

.capability-strip span {
  margin-top: 0.18rem;
  color: var(--text-subtle);
  font-size: 0.85rem;
}

/* Shared sections */
.section {
  padding: clamp(5.5rem, 9vw, 8rem) 0;
  scroll-margin-top: calc(var(--header-height) + 1.5rem);
}

.section-surface {
  border-block: 1px solid var(--border);
  background: var(--surface-raised);
}

.section-heading {
  max-width: 48rem;
  margin-bottom: clamp(2.75rem, 5vw, 4.5rem);
}

.section-heading > p:last-child {
  max-width: var(--reading-width);
  margin: 1.3rem 0 0;
  color: var(--text-muted);
  font-size: 1.08rem;
}

/* Expertise */
.expertise-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1.25rem;
}

.expertise-card {
  position: relative;
  min-width: 0;
  padding: 2rem;
  border: 1px solid var(--border);
  border-top: 4px solid var(--accent);
  border-radius: 1rem;
  background: var(--surface);
  box-shadow: var(--shadow-sm);
}

.card-index {
  margin: 0 0 2rem;
  color: var(--accent);
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.78rem;
  font-weight: 750;
  letter-spacing: 0.08em;
}

.expertise-card > p:not(.card-index) {
  margin: 1rem 0 0;
  color: var(--text-muted);
}

.feature-list {
  margin: 1.5rem 0 0;
  padding: 1.4rem 0 0;
  border-top: 1px solid var(--border);
  list-style: none;
}

.feature-list li {
  position: relative;
  margin-top: 0.7rem;
  padding-left: 1.15rem;
  color: var(--text-muted);
  font-size: 0.9rem;
}

.feature-list li::before {
  content: "";
  position: absolute;
  top: 0.68em;
  left: 0;
  width: 0.35rem;
  height: 0.35rem;
  border-radius: 50%;
  background: var(--accent);
}

/* Building now */
.building-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1.25rem;
  align-items: start;
}

.project-card {
  min-width: 0;
  padding: 1.65rem;
  border: 1px solid var(--border);
  border-radius: 1rem;
  background: var(--surface);
  box-shadow: var(--shadow-sm);
}

.project-header {
  display: flex;
  align-items: flex-start;
  padding-bottom: 1.3rem;
  border-bottom: 1px solid var(--border);
}

.project-header h3 {
  margin-top: 0.35rem;
  overflow-wrap: anywhere;
}

.status-label {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  margin: 0;
  color: var(--evidence);
  font-size: 0.75rem;
  font-weight: 800;
  letter-spacing: 0.07em;
  text-transform: uppercase;
}

.status-label span {
  width: 0.5rem;
  height: 0.5rem;
  border-radius: 50%;
  background: currentColor;
}

.maturity-label {
  margin: 1rem 0 0;
  color: var(--text);
  font-size: 0.85rem;
  font-weight: 780;
}

.project-details {
  margin: 0;
}

.project-details > div {
  padding: 1rem 0;
  border-bottom: 1px solid var(--border);
}

.project-details dt {
  color: var(--text);
  font-size: 0.73rem;
  font-weight: 800;
  letter-spacing: 0.07em;
  text-transform: uppercase;
}

.project-details dd {
  margin: 0.35rem 0 0;
  color: var(--text-muted);
  font-size: 0.9rem;
  line-height: 1.55;
}

.technology-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin: 1.15rem 0;
  padding: 0;
  list-style: none;
}

.technology-list li {
  padding: 0.3rem 0.65rem;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--accent-text);
  font-size: 0.78rem;
  font-weight: 700;
}

.text-link {
  display: inline-flex;
  align-items: center;
  min-height: 2.75rem;
  font-weight: 750;
  text-decoration-thickness: 1.5px;
}

/* Experience */
.experience-list {
  margin: 0;
  padding: 0;
  list-style: none;
}

.experience-item {
  display: grid;
  grid-template-columns: 11rem minmax(0, 1fr);
  gap: clamp(2rem, 5vw, 5rem);
  padding: 2.5rem 0;
  border-top: 1px solid var(--border);
}

.experience-item:last-child {
  border-bottom: 1px solid var(--border);
}

.experience-meta {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
  color: var(--text-subtle);
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.78rem;
}

.role-company {
  margin: 0 0 0.35rem;
  color: var(--accent);
  font-size: 0.85rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.experience-body > p:not(.role-company) {
  max-width: 70ch;
  margin: 1rem 0 0;
  color: var(--text-muted);
  font-size: 1.04rem;
}

.experience-body ul {
  max-width: 70ch;
  margin: 1rem 0 0;
  padding-left: 1.15rem;
  color: var(--text-muted);
}

.experience-body li {
  margin-top: 0.45rem;
}

.experience-body li::marker {
  color: var(--accent);
}

.earlier-experience {
  display: grid;
  grid-template-columns: 11rem repeat(2, minmax(0, 1fr));
  gap: clamp(1.5rem, 4vw, 3rem);
  margin-top: 2.5rem;
  padding: 2rem;
  border-radius: 1rem;
  background: var(--surface-raised);
}

.earlier-experience p {
  margin: 0;
  color: var(--text-muted);
  font-size: 0.9rem;
}

.earlier-experience div p:first-child {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 0.55rem;
  color: var(--text);
}

.earlier-experience span {
  flex: 0 0 auto;
  color: var(--text-subtle);
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.72rem;
}

/* Approach */
.section-approach {
  background: var(--approach-bg);
  color: var(--approach-text);
}

.section-approach h2,
.section-approach h3 {
  color: var(--approach-text);
}

.section-approach .section-heading > p:last-child {
  color: var(--approach-muted);
}

.section-approach .eyebrow {
  color: var(--approach-accent);
}

.approach-flow {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1px;
  margin: 0;
  padding: 1px;
  border-radius: 1rem;
  background: var(--border-strong);
  list-style: none;
  overflow: hidden;
}

.approach-flow li {
  position: relative;
  min-width: 0;
  min-height: 15rem;
  padding: 1.6rem;
  background: var(--approach-surface);
}

.approach-flow li::after {
  content: "→";
  position: absolute;
  top: 1.2rem;
  right: 1.2rem;
  color: var(--approach-accent);
  font-weight: 800;
}

.approach-flow li:last-child::after {
  content: "✓";
  color: var(--evidence);
}

.approach-flow span {
  color: var(--approach-accent);
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.74rem;
  font-weight: 800;
}

.approach-flow h3 {
  margin-top: 2.5rem;
  font-size: 1.12rem;
  letter-spacing: -0.02em;
}

.approach-flow p {
  margin: 0.75rem 0 0;
  color: var(--approach-muted);
  font-size: 0.88rem;
  line-height: 1.55;
}

/* Credentials */
.credentials-layout {
  display: grid;
  grid-template-columns: minmax(18rem, 0.8fr) minmax(0, 1.2fr);
  gap: clamp(3rem, 7vw, 7rem);
  align-items: start;
}

.credentials-layout .section-heading {
  margin-bottom: 0;
}

.credentials-grid {
  display: grid;
  gap: 1.25rem;
}

.credential-group {
  padding: 1.75rem;
  border: 1px solid var(--border);
  border-radius: 1rem;
  background: var(--surface);
}

.credential-group h3 {
  margin-bottom: 1.25rem;
  font-size: 1rem;
  letter-spacing: 0.03em;
  text-transform: uppercase;
}

.credential-group ul {
  margin: 0;
  padding: 0;
  list-style: none;
}

.credential-group li {
  display: grid;
  gap: 0.2rem;
  padding: 0.85rem 0;
  border-top: 1px solid var(--border);
}

.credential-group span {
  color: var(--text-subtle);
  font-size: 0.83rem;
}

/* About */
.about-layout {
  display: grid;
  grid-template-columns: minmax(18rem, 0.8fr) minmax(0, 1.2fr);
  gap: clamp(3rem, 8vw, 8rem);
}

.about-layout .section-heading {
  margin-bottom: 0;
}

.about-copy > p {
  max-width: var(--reading-width);
  margin: 0 0 1.25rem;
  color: var(--text-muted);
  font-size: 1.04rem;
}

/* Contact and footer */
.contact-section {
  padding-block: clamp(3.5rem, 7vw, 5.75rem);
}

.contact-panel {
  width: min(100% - 3rem, var(--content-width));
  margin-inline: auto;
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(20rem, 0.75fr);
  align-items: center;
  gap: clamp(2rem, 5vw, 5rem);
  padding: clamp(1.75rem, 4vw, 3.5rem);
  border: 1px solid var(--border-strong);
  border-radius: 1.5rem;
  background: linear-gradient(135deg, var(--surface) 0%, var(--surface-raised) 100%);
  box-shadow: var(--shadow-lg);
}

.contact-panel h2 {
  max-width: 22ch;
}

.contact-intro > p:last-child {
  max-width: 60ch;
  margin: 1.25rem 0 0;
  color: var(--text-muted);
  font-size: 1.04rem;
}

.contact-card {
  min-width: 0;
  padding: 1.25rem;
  border: 1px solid var(--border);
  border-radius: 1rem;
  background: var(--surface);
  box-shadow: var(--shadow-sm);
}

.contact-label {
  margin: 0 0 0.35rem;
  color: var(--text-subtle);
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.1em;
  line-height: 1.4;
  text-transform: uppercase;
}

.contact-email-tools {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 0.75rem;
}

.contact-email-address {
  min-width: 0;
  overflow-wrap: anywhere;
  font-weight: 700;
}

.contact-email-value {
  grid-column: 1 / -1;
  color: var(--text-muted);
  overflow-wrap: anywhere;
  font-size: 0.9rem;
}

.copy-email-button {
  min-height: 2.75rem;
  padding: 0.5rem 0.7rem;
  border: 1px solid var(--border);
  border-radius: 0.6rem;
  background: transparent;
  color: var(--text-muted);
  cursor: pointer;
  font-weight: 700;
  font-size: 0.8rem;
  line-height: 1.2;
}

.copy-email-button:hover {
  border-color: var(--accent);
  background: var(--accent-soft);
  color: var(--accent-text);
}

.contact-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem 1rem;
  margin: 0.85rem 0 0;
  padding: 0;
  border-top: 1px solid var(--border);
  list-style: none;
}

.contact-links a {
  display: inline-flex;
  min-height: 2.75rem;
  align-items: center;
  color: var(--text-muted);
  font-size: 0.9rem;
  font-weight: 700;
  text-decoration-thickness: 1px;
}

.contact-links a:hover {
  color: var(--accent);
}

.contact-details {
  display: grid;
  gap: 0.65rem;
  margin: 0;
  padding-top: 0.9rem;
  border-top: 1px solid var(--border);
}

.contact-details > div {
  display: grid;
  grid-template-columns: 5.25rem minmax(0, 1fr);
  gap: 0.75rem;
}

.contact-details dt,
.contact-details dd {
  margin: 0;
  font-size: 0.82rem;
  line-height: 1.45;
}

.contact-details dt {
  color: var(--text-subtle);
  font-weight: 700;
}

.contact-details dd {
  color: var(--text-muted);
}

.site-footer {
  border-top: 1px solid var(--border);
  background: var(--surface);
}

.site-footer .section-shell {
  min-height: 7rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  padding-block: 1.5rem;
}

.site-footer p {
  margin: 0;
  color: var(--text-subtle);
  font-size: 0.82rem;
}

.site-footer p:first-child {
  display: grid;
}

.site-footer strong {
  color: var(--text);
}

.site-footer a {
  font-weight: 700;
}

@media (max-width: 1080px) {
  .site-nav {
    position: relative;
  }

  .site-header[data-nav-enhanced="true"] .nav-toggle {
    display: grid;
    margin-left: auto;
  }

  .site-header[data-nav-enhanced="true"] .nav-menu {
    position: absolute;
    top: calc(100% + 0.65rem);
    left: 0;
    right: 0;
    display: grid;
    gap: 0.25rem;
    padding: 0.75rem;
    border: 1px solid var(--border);
    border-radius: 0.9rem;
    background: var(--surface);
    box-shadow: var(--shadow-lg);
    white-space: normal;
  }

  .site-header[data-nav-enhanced="true"] .nav-menu[hidden] {
    display: none;
  }

  .site-header[data-nav-enhanced="true"] .nav-menu > li,
  .site-header[data-nav-enhanced="true"] .nav-menu a,
  .site-header[data-nav-enhanced="true"] .theme-toggle {
    width: 100%;
  }

  .site-header[data-nav-enhanced="true"] .nav-menu a {
    min-height: 2.75rem;
    display: flex;
    align-items: center;
    padding-inline: 0.9rem;
  }

  .site-header[data-nav-enhanced="true"] .nav-menu .nav-resume {
    margin-left: 0;
  }

  .site-header[data-nav-enhanced="true"] .theme-toggle {
    margin: 0;
  }

  .site-header:not([data-nav-enhanced="true"]) .site-nav {
    flex-wrap: wrap;
    padding-block: 0.7rem;
  }

  .site-header:not([data-nav-enhanced="true"]) .nav-menu {
    flex: 1 0 100%;
    flex-wrap: wrap;
    padding-bottom: 0.25rem;
    white-space: normal;
  }

  .site-header:not([data-nav-enhanced="true"]) .nav-resume {
    margin-left: 0;
  }

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

  .project-card:last-child {
    grid-column: 1 / -1;
    max-width: calc(50% - 0.625rem);
  }

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

@media (max-width: 820px) {
  .section-shell,
  .site-nav,
  .hero-inner,
  .contact-panel {
    width: min(100% - 2.5rem, var(--content-width));
  }

  .hero {
    min-height: 0;
  }

  .hero-inner {
    grid-template-columns: 1fr;
    gap: 3.25rem;
  }

  .hero-photo {
    justify-self: start;
    width: min(72vw, 19rem);
  }

  .capability-strip ul {
    grid-template-columns: 1fr;
  }

  .capability-strip li {
    border-left: 0;
  }

  .capability-strip li:nth-child(n + 2) {
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid var(--border);
  }

  .expertise-grid,
  .building-grid,
  .credentials-layout,
  .about-layout,
  .contact-panel {
    grid-template-columns: 1fr;
  }

  .project-card:last-child {
    grid-column: auto;
    max-width: none;
  }

  .experience-item {
    grid-template-columns: 1fr;
    gap: 1.25rem;
  }

  .experience-meta {
    flex-direction: row;
    justify-content: space-between;
  }

  .earlier-experience {
    grid-template-columns: 1fr;
  }

  .credentials-layout .section-heading,
  .about-layout .section-heading {
    margin-bottom: 0;
  }

  .site-footer .section-shell {
    min-height: 0;
    align-items: flex-start;
    flex-direction: column;
  }
}

@media (max-width: 560px) {
  :root {
    --header-height: 3.9rem;
  }

  .section-shell,
  .site-nav,
  .hero-inner,
  .contact-panel {
    width: calc(100% - 2.5rem);
  }

  h1 {
    font-size: clamp(2.55rem, 12vw, 3.35rem);
  }

  h2 {
    font-size: clamp(2rem, 9vw, 2.55rem);
  }

  .hero {
    padding: 4.5rem 0 4rem;
  }

  .hero-lead {
    font-size: 1.02rem;
  }

  .hero-actions .button {
    flex: 1 1 auto;
    padding-inline: 0.9rem;
  }

  .capability-strip li {
    padding-inline: 0.9rem;
  }

  .section {
    padding-block: 4.75rem;
  }

  .section-heading {
    margin-bottom: 2.5rem;
  }

  .expertise-card,
  .project-card,
  .credential-group {
    padding: 1.35rem;
  }

  .approach-flow {
    grid-template-columns: 1fr;
  }

  .approach-flow li {
    min-height: 0;
  }

  .earlier-experience div p:first-child {
    align-items: flex-start;
    flex-direction: column;
    gap: 0.25rem;
  }

  .contact-panel {
    padding: 1.5rem;
  }

  .contact-email-tools {
    grid-template-columns: 1fr;
  }

  .copy-email-button {
    justify-self: start;
  }
}

@media (max-width: 380px) {
  .hero-actions .button {
    flex-basis: 100%;
    width: 100%;
  }
}

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

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

}

@media print {
  :root,
  :root[data-theme="dark"] {
    --bg: #ffffff;
    --surface: #ffffff;
    --surface-raised: #f4f4f4;
    --surface-strong: #eeeeee;
    --text: #000000;
    --text-muted: #222222;
    --text-subtle: #444444;
    --accent: #003f8f;
    --accent-text: #003f8f;
    --border: #aaaaaa;
    --approach-bg: #ffffff;
    --approach-surface: #ffffff;
    --approach-text: #000000;
    --approach-muted: #222222;
    --approach-accent: #003f8f;
    color-scheme: light;
  }

  html,
  body {
    background: #ffffff;
    color: #000000;
    scroll-behavior: auto;
  }

  .site-header,
  .hero-photo,
  .hero-links,
  .copy-email-button,
  .site-footer a,
  .skip-link {
    display: none !important;
  }

  .section,
  .hero,
  .contact-section {
    padding-block: 1.5rem;
  }

  .section-shell,
  .hero-inner,
  .contact-panel {
    width: 100%;
  }

  .hero {
    min-height: 0;
  }

  .hero-inner,
  .expertise-grid,
  .building-grid,
  .credentials-layout,
  .about-layout,
  .contact-panel {
    grid-template-columns: 1fr;
  }

  .project-card:last-child {
    max-width: none;
  }

  .expertise-card,
  .project-card,
  .credential-group,
  .contact-panel {
    break-inside: avoid;
    box-shadow: none;
  }

  a[href^="http"]::after {
    content: " (" attr(href) ")";
    color: #333333;
    font-size: 0.75em;
    font-weight: 400;
  }
}
