* {
  box-sizing: border-box;
}

/* Skip Navigation (WCAG 2.4.1) */
.skip-link {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}

.skip-link:focus {
  position: fixed;
  top: 0;
  left: 1rem;
  z-index: 10000;
  width: auto;
  height: auto;
  padding: 0.75rem 1.5rem;
  margin: 0;
  overflow: visible;
  clip: auto;
  clip-path: none;
  white-space: normal;
  background: var(--color-bg, #111);
  color: var(--color-fg, #fff);
  border: 2px solid var(--color-accent, #6cf);
  border-radius: 0 0 0.5rem 0.5rem;
  font-size: 1rem;
  font-weight: 600;
  text-decoration: none;
  outline: 3px solid var(--color-accent, #6cf);
  outline-offset: 2px;
}

html {
  font-size: 16px;
  text-size-adjust: 100%;
  -webkit-text-size-adjust: 100%;
  background: var(--color-bg);
  color-scheme: light dark;
}

html[data-theme='light'] {
  color-scheme: light;
}

html[data-theme='dark'] {
  color-scheme: dark;
}

html.is-print-lifecycle *,
html.is-print-lifecycle *::before,
html.is-print-lifecycle *::after {
  transition: none !important;
}

body {
  margin: 0;
  min-height: 100dvh;
  font-family: var(--font-family-body);
  font-size: var(--font-scale);
  line-height: 1.55;
  letter-spacing: 0.004em;
  font-feature-settings: 'kern' 1, 'liga' 1, 'calt' 1;
  font-kerning: normal;
  color: var(--color-fg);
  background:
    radial-gradient(circle at 92% 7%, color-mix(in oklab, var(--color-accent-soft) 74%, transparent), transparent 44%),
    radial-gradient(circle at 12% 16%, color-mix(in oklab, var(--color-accent-soft) 58%, transparent), transparent 40%),
    radial-gradient(ellipse at 55% 120%, color-mix(in oklab, var(--color-accent-soft) 35%, transparent), transparent 45%),
    var(--color-bg);
}

a {
  color: var(--color-emphasis);
  text-underline-offset: 0.16em;
}

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

.resume-shell {
  width: min(100% - var(--gutter-inline, clamp(0.95rem, 3vw, 2.1rem)), var(--max-width));
  margin: 0 auto;
  padding-top: clamp(0.45rem, 0.75vw + 0.22rem, 0.9rem);
  padding-bottom: 1.8rem;
  display: grid;
  gap: var(--section-gap);
}

.resume-card {
  background: color-mix(in oklab, var(--color-surface) 97%, transparent);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  box-shadow:
    var(--shadow-card),
    inset 0 1px 0 color-mix(in oklab, white 78%, transparent),
    inset 0 -1px 0 color-mix(in oklab, var(--color-emphasis) 14%, transparent);
}

.resume-header {
  padding: clamp(1.1rem, 1.4vw + 0.75rem, 2.2rem);
  display: grid;
  gap: 1.02rem;
  position: relative;
  overflow: hidden;
}

.resume-header::after {
  content: '';
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(124deg, color-mix(in oklab, var(--color-accent-soft) 52%, transparent) 0%, transparent 55%),
    radial-gradient(ellipse at 85% 20%, color-mix(in oklab, var(--color-accent-soft) 28%, transparent), transparent 50%);
  opacity: var(--header-overlay-opacity);
  transition: opacity 400ms ease;
}

.resume-title-row,
.resume-tagline,
.perspective-nav,
.resume-actions {
  position: relative;
  z-index: 1;
}

.resume-title-row {
  display: block;
  min-height: clamp(8.4rem, 13.8vw, 11.8rem);
  position: relative;
  overflow: hidden;
  --viz-lane-width: clamp(7.4rem, 16.2vw, 12.8rem);
  --viz-max-height: clamp(8.4rem, 13.8vw, 11.8rem);
  --viz-inline-offset: clamp(1.35rem, 2.9vw, 2.6rem);
  --viz-block-offset: clamp(-0.08rem, 0.8vw, 0.55rem);
}

.resume-title-text {
  display: grid;
  gap: clamp(0.26rem, 0.55vw, 0.52rem);
  align-content: center;
  text-align: center;
  justify-items: center;
  min-width: 0;
  max-width: 100%;
  padding-right: calc(var(--viz-lane-width) + var(--viz-inline-offset) + 0.54rem);
  position: relative;
  z-index: 1;
}

.resume-identity {
  display: grid;
  gap: clamp(0.06rem, 0.24vw, 0.2rem);
  justify-items: inherit;
  width: 100%;
}

/* ── Perspective visualization ── */
.perspective-viz {
  width: var(--viz-lane-width);
  height: auto;
  max-height: var(--viz-max-height, 100%);
  position: absolute;
  right: var(--viz-inline-offset);
  top: var(--viz-block-offset);
  color: var(--color-accent);
  opacity: 0.2;
  z-index: 0;
  transition: color 300ms ease, opacity 260ms ease;
  animation: vizFloat 9s cubic-bezier(0.34, 0.06, 0.2, 0.98) infinite;
  transform: translateZ(0);
  contain: layout paint;
}

.viz-shape {
  opacity: 0;
  visibility: hidden;
  transform-box: view-box;
  transform-origin: 50% 50%;
  transform: translateY(var(--viz-shift-y, 0));
  transition: opacity 210ms cubic-bezier(0.22, 1, 0.36, 1), visibility 0s linear 210ms;
  pointer-events: none;
  backface-visibility: hidden;
}

html[data-view='general'] .viz-general,
html[data-view='qa'] .viz-qa,
html[data-view='fullstack'] .viz-fullstack,
html[data-view='frontend'] .viz-frontend,
html[data-view='leadership'] .viz-leadership,
html[data-view='builder'] .viz-builder {
  opacity: 1;
  visibility: visible;
  transition: opacity 230ms cubic-bezier(0.22, 1, 0.36, 1), visibility 0s linear 0s;
}

.perspective-viz .viz-shape,
.perspective-viz .viz-shape * {
  animation-play-state: paused !important;
}

html[data-view='general'] .viz-general,
html[data-view='general'] .viz-general *,
html[data-view='qa'] .viz-qa,
html[data-view='qa'] .viz-qa *,
html[data-view='fullstack'] .viz-fullstack,
html[data-view='fullstack'] .viz-fullstack *,
html[data-view='frontend'] .viz-frontend,
html[data-view='frontend'] .viz-frontend *,
html[data-view='leadership'] .viz-leadership,
html[data-view='leadership'] .viz-leadership *,
html[data-view='builder'] .viz-builder,
html[data-view='builder'] .viz-builder * {
  animation-play-state: running !important;
}

@keyframes vizFloat {
  0%, 100% { transform: translateY(0); }
  28% { transform: translateY(-4px); }
  58% { transform: translateY(-1.5px); }
  82% { transform: translateY(-2.5px); }
}

/* ── General: entire hexagon + inner lines rotate as one unit ── */
.viz-general {
  --viz-shift-y: -0.1rem;
}

.viz-general-orbit {
  transform-origin: 40px 40px;
  transform-box: view-box;
  animation: hexSpin 28s linear infinite;
}

.viz-qa {
  --viz-shift-y: -0.18rem;
}

.viz-fullstack {
  --viz-shift-y: -0.24rem;
}

.viz-frontend {
  --viz-shift-y: -0.31rem;
}

.viz-leadership {
  --viz-shift-y: -0.31rem;
}

.viz-builder {
  --viz-shift-y: -0.2rem;
}

.viz-general .viz-hex-shell {
  animation: hexPulse 6.8s cubic-bezier(0.4, 0, 0.2, 1) infinite;
}

.viz-general .viz-hex-inner {
  transform-origin: 40px 40px;
  transform-box: view-box;
  animation: hexPulse 6.8s cubic-bezier(0.4, 0, 0.2, 1) infinite;
}

.viz-general .viz-general-spoke {
  transform-origin: 40px 40px;
  transform-box: view-box;
  shape-rendering: geometricPrecision;
}

@keyframes hexSpin {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

@keyframes hexPulse {
  0%, 100% { opacity: 0.55; }
  45% { opacity: 1; }
  70% { opacity: 0.72; }
}

/* ── QA: checkmark draws in cyclically, shield breathes ── */
.viz-check {
  stroke-width: 2.8;
  stroke-dasharray: 31 31;
  stroke-dashoffset: 31;
  stroke-linecap: round;
  stroke-linejoin: round;
  transform-origin: 50% 50%;
  transform-box: view-box;
  opacity: 0.18;
  animation: checkCycle 3.35s cubic-bezier(0.34, 0.08, 0.2, 1) infinite;
}

@keyframes checkCycle {
  0% {
    stroke-dashoffset: 31;
    opacity: 0.1;
  }

  34% {
    stroke-dashoffset: 0;
    opacity: 0.98;
  }

  42% {
    stroke-dashoffset: -1.15;
    opacity: 1;
  }

  56% {
    stroke-dashoffset: 0;
    opacity: 0.94;
  }

  72% {
    stroke-dashoffset: 0;
    opacity: 0.92;
  }

  100% {
    stroke-dashoffset: -31;
    opacity: 0.14;
  }
}

.viz-shield {
  transform-origin: 50% 50%;
  transform-box: view-box;
  animation: shieldBreathe 4.8s cubic-bezier(0.26, 0.12, 0.22, 1) infinite;
}

@keyframes shieldBreathe {
  0%, 100% { opacity: 0.96; }
  50% { opacity: 0.62; }
}

/* ── Full-stack: layers bob with stagger ── */
.viz-fullstack {
  transform-origin: 50% 50%;
  transform-box: view-box;
  animation: fullstackBreathe 6.2s cubic-bezier(0.32, 0.06, 0.24, 1) infinite;
}

.viz-layer {
  transform-origin: 50% 50%;
  transform-box: view-box;
  shape-rendering: geometricPrecision;
  backface-visibility: hidden;
}

.viz-layer-top { animation: layerPulse 4.8s cubic-bezier(0.32, 0.06, 0.24, 1) infinite; }
.viz-layer-mid { animation: layerPulse 4.8s cubic-bezier(0.32, 0.06, 0.24, 1) 0.36s infinite; }
.viz-layer-btm { animation: layerPulse 4.8s cubic-bezier(0.32, 0.06, 0.24, 1) 0.72s infinite; }
.viz-layer-mid-sep { animation: layerSeparatorPulse 5.2s cubic-bezier(0.34, 0.11, 0.3, 1) infinite; }

@keyframes fullstackBreathe {
  0%, 100% { transform: none; opacity: 0.86; }
  50% { transform: none; opacity: 1; }
}

@keyframes layerPulse {
  0%, 100% { opacity: 0.78; }
  50% { opacity: 1; }
}

@keyframes layerSeparatorPulse {
  0%, 100% { opacity: 0.3; }
  42% { opacity: 0.76; }
  72% { opacity: 0.44; }
}

/* ── Frontend: browser dots pulse, content lines shimmer ── */
.viz-dot,
.viz-line,
.viz-cursor {
  backface-visibility: hidden;
}

.viz-dot-1 { animation: dotPulse 3s cubic-bezier(0.3, 0.04, 0.2, 1) infinite; }
.viz-dot-2 { animation: dotPulse 3s cubic-bezier(0.3, 0.04, 0.2, 1) 0.35s infinite; }
.viz-dot-3 { animation: dotPulse 3s cubic-bezier(0.3, 0.04, 0.2, 1) 0.7s infinite; }

@keyframes dotPulse {
  0%, 100% { opacity: 0.24; transform: scale(0.92); }
  50% { opacity: 0.96; transform: scale(1); }
}

.viz-line-1 { animation: lineShimmer 4s cubic-bezier(0.42, 0, 0.2, 1) infinite; }
.viz-line-2 { animation: lineShimmer 4s cubic-bezier(0.42, 0, 0.2, 1) 0.6s infinite; }
.viz-line {
  transform-origin: left center;
  transform-box: fill-box;
}
.viz-cursor { animation: cursorBlink 1.8s cubic-bezier(0.36, 0.02, 0.2, 1) infinite; }

@keyframes lineShimmer {
  0%, 100% { opacity: 0.1; transform: scaleX(0.92); }
  50% { opacity: 0.85; transform: scaleX(1); }
}

@keyframes cursorBlink {
  0%, 100% { opacity: 0.72; }
  50% { opacity: 0.12; }
}

/* ── Leadership: compass points rotate slowly ── */
.viz-compass-ring {
  transform-origin: 40px 40px;
  transform-box: view-box;
  animation: compassRingBreathe 8.2s cubic-bezier(0.35, 0.06, 0.22, 1) infinite;
  opacity: 0.82;
  shape-rendering: geometricPrecision;
}

.viz-compass-points {
  transform-origin: 40px 40px;
  transform-box: view-box;
  animation: compassRotateSmooth 12s linear infinite;
}

.viz-compass-center {
  transform-origin: 40px 40px;
  transform-box: view-box;
  animation: compassPulse 3.8s cubic-bezier(0.37, 0, 0.25, 1) infinite;
}

.viz-compass-scan {
  transform-origin: 40px 40px;
  transform-box: view-box;
  stroke-dasharray: none;
  opacity: 0.24;
  stroke-linecap: round;
  stroke-linejoin: round;
  animation: compassSweep 5.8s linear infinite;
}

.viz-compass-pointer-main {
  animation: compassNeedleGlow 3.2s cubic-bezier(0.34, 0.08, 0.2, 1) infinite;
}

.viz-compass-pointer-tail {
  animation: compassNeedleTail 3.2s cubic-bezier(0.34, 0.08, 0.2, 1) infinite;
}

.viz-compass-pointer-side {
  opacity: 0.26;
  animation: compassSidePulse 4.6s cubic-bezier(0.34, 0.08, 0.2, 1) infinite;
}

.viz-compass-pointer-east {
  animation-delay: 0.42s;
}

@keyframes compassPulse {
  0%, 100% { opacity: 0.22; transform: scale(1); }
  50% { opacity: 0.62; transform: scale(1.28); }
}

@keyframes compassRingBreathe {
  0%, 100% { opacity: 0.62; }
  50% { opacity: 0.94; }
}

@keyframes compassRotateSmooth {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

@keyframes compassSweep {
  0% { transform: rotate(0deg); opacity: 0.12; }
  45% { opacity: 0.34; }
  100% { transform: rotate(360deg); opacity: 0.12; }
}

@keyframes compassNeedleGlow {
  0%, 100% { opacity: 0.64; }
  50% { opacity: 0.92; }
}

@keyframes compassNeedleTail {
  0%, 100% { opacity: 0.28; }
  50% { opacity: 0.46; }
}

@keyframes compassSidePulse {
  0%, 100% { opacity: 0.2; }
  50% { opacity: 0.32; }
}

/* ── Builder: nodes pulse sequentially, edges flow ── */
.viz-node-core-1 { animation: nodePulse 3.7s cubic-bezier(0.4, 0, 0.2, 1) infinite; }
.viz-node-core-2 { animation: nodePulse 3.7s cubic-bezier(0.4, 0, 0.2, 1) 0.8s infinite; }
.viz-node-core-3 { animation: nodePulse 3.7s cubic-bezier(0.4, 0, 0.2, 1) 1.6s infinite; }
.viz-node-outer-1 { animation: nodeShellPulse 3.7s cubic-bezier(0.4, 0, 0.2, 1) infinite; }
.viz-node-outer-2 { animation: nodeShellPulse 3.7s cubic-bezier(0.4, 0, 0.2, 1) 0.8s infinite; }
.viz-node-outer-3 { animation: nodeShellPulse 3.7s cubic-bezier(0.4, 0, 0.2, 1) 1.6s infinite; }

@keyframes nodePulse {
  0%, 100% { opacity: 0.15; }
  50% { opacity: 0.5; }
}

@keyframes nodeShellPulse {
  0%, 100% { opacity: 0.35; transform: scale(1); }
  50% { opacity: 1; transform: scale(1.08); }
}

.viz-edge {
  stroke-dasharray: 4 3;
  animation: edgeFlow 2.35s linear infinite, edgePulse 4.7s cubic-bezier(0.4, 0, 0.2, 1) infinite;
}

@keyframes edgePulse {
  0%, 100% { opacity: 0.25; }
  50% { opacity: 0.7; }
}

@keyframes edgeFlow {
  from { stroke-dashoffset: 0; }
  to { stroke-dashoffset: -14; }
}

.resume-title {
  margin: 0;
  display: inline-block;
  font-family: var(--font-family-display);
  font-size: clamp(2.42rem, 3.35vw + 0.96rem, 4.26rem);
  line-height: 1.03;
  padding-bottom: 0.04em;
  letter-spacing: -0.038em;
  text-wrap: balance;
  /* Analogous gradient with hue offsets (±18-22°) for visible differentiation.
   * Uses mode-adaptive tokens (--t-l-*, --t-chroma*) from tokens.css so one
   * gradient definition serves both light and dark modes. Chroma floors
   * ensure saturation even for the neutral general accent (0.055). */
  background: linear-gradient(
    124deg,
    oklch(var(--t-l-peak) var(--t-chroma) calc(var(--accent-hue) - 18)) 0%,
    oklch(var(--t-l-base) var(--t-chroma-soft) calc(var(--accent-hue) - 6)) 8.33%,
    oklch(var(--t-l-mid) var(--t-chroma) var(--accent-hue)) 16.66%,
    oklch(var(--t-l-base) var(--t-chroma-soft) calc(var(--accent-hue) + 12)) 25%,
    oklch(var(--t-l-peak) var(--t-chroma) calc(var(--accent-hue) + 22)) 33.33%,
    oklch(var(--t-l-mid) var(--t-chroma-soft) calc(var(--accent-hue) + 6)) 41.66%,
    oklch(var(--t-l-peak) var(--t-chroma) calc(var(--accent-hue) - 18)) 50%,
    oklch(var(--t-l-base) var(--t-chroma-soft) calc(var(--accent-hue) - 6)) 58.33%,
    oklch(var(--t-l-mid) var(--t-chroma) var(--accent-hue)) 66.66%,
    oklch(var(--t-l-base) var(--t-chroma-soft) calc(var(--accent-hue) + 12)) 75%,
    oklch(var(--t-l-peak) var(--t-chroma) calc(var(--accent-hue) + 22)) 83.33%,
    oklch(var(--t-l-mid) var(--t-chroma-soft) calc(var(--accent-hue) + 6)) 91.66%,
    oklch(var(--t-l-peak) var(--t-chroma) calc(var(--accent-hue) - 18)) 100%
  );
  background-size: 260% 120%;
  background-repeat: repeat;
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
  text-shadow:
    0 1px 0 color-mix(in oklab, white 30%, transparent),
    0 3px 8px color-mix(in oklab, var(--color-accent) 10%, transparent),
    0 7px 18px color-mix(in oklab, var(--color-accent) 6%, transparent);
  will-change: background-position, text-shadow;
  animation:
    titleShimmer 18s linear infinite,
    titleRelief 18s ease-in-out infinite;
}

/* Light mode: gradient is now mode-adaptive via --t-l-*/--t-chroma* tokens
 * in tokens.css. No separate gradient override needed. */

@keyframes titleShimmer {
  0%   { background-position: 0% 50%; }
  100% { background-position: 260% 50%; }
}

@keyframes titleRelief {
  0%,
  100% {
    text-shadow:
      0 1px 0 color-mix(in oklab, white 28%, transparent),
      0 3px 8px color-mix(in oklab, var(--color-accent) 10%, transparent),
      0 7px 18px color-mix(in oklab, var(--color-accent) 6%, transparent);
  }

  50% {
    text-shadow:
      0 1px 0 color-mix(in oklab, white 36%, transparent),
      0 4px 10px color-mix(in oklab, var(--color-accent) 14%, transparent),
      0 9px 24px color-mix(in oklab, var(--color-accent) 10%, transparent);
  }
}

.resume-role {
  margin: 0;
  display: flex;
  flex-wrap: nowrap;
  justify-content: center;
  gap: 0 0.42rem;
  color: var(--color-fg-muted);
  font-family: var(--font-family-ui);
  font-weight: 680;
  line-height: 1.2;
  font-size: calc(clamp(0.9rem, 0.22vw + 0.84rem, 1.03rem) * var(--detail-text-scale));
  letter-spacing: 0.006em;
  text-shadow: var(--text-relief-subtle);
}

.role-segment {
  position: relative;
  white-space: nowrap;
}

.role-segment:not(:last-child)::after {
  content: '·';
  position: relative;
  margin-inline-start: 0.34rem;
  color: color-mix(in oklab, var(--color-accent) 56%, var(--color-fg-muted));
}

.resume-tagline {
  margin: 0.08rem 0 0;
  color: var(--color-fg-muted);
  max-width: 70ch;
  text-wrap: pretty;
  line-height: 1.48;
  font-size: calc(clamp(0.96rem, 0.2vw + 0.92rem, 1.08rem) * var(--detail-text-scale));
}

.perspective-nav {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.58rem;
}

.perspective-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  border: 1.6px solid var(--color-border);
  background: var(--color-surface);
  color: var(--color-fg-muted);
  border-radius: 999px;
  text-align: center;
  white-space: nowrap;
  padding: 0.52rem 1.02rem;
  font-family: var(--font-family-ui);
  font-size: calc(0.86rem * var(--detail-text-scale));
  line-height: 1.15;
  font-weight: 700;
  min-block-size: 2.4rem;
  box-shadow:
    0 6px 16px -12px color-mix(in oklab, var(--color-accent) 34%, transparent),
    inset 0 1px 0 color-mix(in oklab, white 84%, transparent),
    inset 0 -1px 0 color-mix(in oklab, var(--color-emphasis) 14%, transparent);
  transition: transform 150ms ease, color 180ms ease, border-color 180ms ease, background-color 180ms ease, box-shadow 250ms ease;
}

.perspective-link:hover,
.perspective-link:focus-visible {
  color: var(--color-emphasis);
  border-color: color-mix(in oklab, var(--color-accent) 58%, var(--color-border));
  box-shadow: 0 2px 8px -2px color-mix(in oklab, var(--color-accent) 24%, transparent);
  transform: translateY(-1px);
}

.perspective-link.is-active {
  color: var(--color-emphasis);
  font-weight: 800;
  text-decoration: underline;
  text-decoration-thickness: 2px;
  text-underline-offset: 0.18em;
  text-decoration-color: color-mix(in oklab, var(--color-accent) 62%, var(--color-emphasis));
  border-color: color-mix(in oklab, var(--color-accent) 72%, var(--color-border));
  background: color-mix(in oklab, var(--color-accent-soft) 82%, var(--color-surface));
  box-shadow: 0 0 0 2px color-mix(in oklab, var(--color-accent) 16%, transparent),
              0 2px 10px -3px color-mix(in oklab, var(--color-accent) 28%, transparent);
  pointer-events: none;
  cursor: default;
}

.resume-main {
  padding: clamp(1.14rem, 1.08vw + 0.82rem, 2.08rem);
  display: grid;
  gap: clamp(1.02rem, 0.72vw + 0.84rem, 1.52rem);
}

.resume-section {
  position: relative;
  overflow: hidden;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  background: color-mix(in oklab, var(--color-surface-2) 84%, transparent);
  box-shadow:
    inset 0 1px 0 color-mix(in oklab, white 62%, transparent),
    inset 0 -1px 0 color-mix(in oklab, var(--color-emphasis) 10%, transparent);
  padding: clamp(1.14rem, 0.9vw + 0.84rem, 1.84rem);
  content-visibility: auto;
  contain-intrinsic-size: 24rem;
  transition: border-color 180ms ease, box-shadow 180ms ease;
}

.resume-section::before {
  content: '';
  position: absolute;
  inset: 0 0 auto;
  height: 2.5px;
  background: linear-gradient(
    90deg,
    color-mix(in oklab, var(--color-accent) 88%, transparent) 0%,
    color-mix(in oklab, var(--color-accent) 62%, transparent) 40%,
    transparent 75%
  );
  opacity: 0.85;
  transition: opacity 300ms ease;
}

.resume-section:hover::before {
  opacity: 1;
}

.resume-section > h2 {
  margin: 0 0 0.95rem;
  display: inline-flex;
  align-items: center;
  gap: 0.58rem;
  font-family: var(--font-family-display);
  font-size: clamp(1.3rem, 0.72vw + 1rem, 1.82rem);
  letter-spacing: 0.01em;
  line-height: 1.16;
  font-weight: 800;
  padding-bottom: 0.02em;
  color: var(--color-emphasis);
  text-shadow: var(--text-relief);
}

.section-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.1rem;
  height: 2.1rem;
  border-radius: 999px;
  border: 1.6px solid color-mix(in oklab, var(--color-accent) 58%, var(--color-border));
  color: color-mix(in oklab, var(--color-accent) 82%, var(--color-emphasis));
  background: color-mix(in oklab, var(--color-accent-soft) 82%, var(--color-surface));
  box-shadow: 0 0 0 0 color-mix(in oklab, var(--color-accent) 0%, transparent);
  transition: box-shadow 300ms ease, border-color 300ms ease, transform 300ms ease;
  flex-shrink: 0;
  animation: sectionIconHalo 8.4s cubic-bezier(0.39, 0.05, 0.2, 1) infinite;
  animation-play-state: paused;
}

.section-icon svg {
  width: 1.14rem;
  height: 1.14rem;
  stroke-width: 2;
  animation: sectionGlyphDrift 6.2s cubic-bezier(0.4, 0.08, 0.2, 1) infinite;
  animation-play-state: paused;
}

.resume-section:hover .section-icon {
  border-color: color-mix(in oklab, var(--color-accent) 72%, var(--color-border));
  box-shadow: 0 0 0 3px color-mix(in oklab, var(--color-accent) 18%, transparent);
  transform: scale(1.08);
}

.resume-section:hover .section-icon,
.resume-section:hover .section-icon svg,
.resume-shell.is-view-shift .section-icon,
.resume-shell.is-view-shift .section-icon svg {
  animation-play-state: running;
}

@keyframes sectionIconHalo {
  0%,
  100% {
    box-shadow: 0 0 0 0 color-mix(in oklab, var(--color-accent) 0%, transparent);
  }
  45% {
    box-shadow: 0 0 0 2px color-mix(in oklab, var(--color-accent) 14%, transparent);
  }
}

@keyframes sectionGlyphDrift {
  0%,
  100% {
    transform: translateY(0) rotate(0deg);
    opacity: 0.94;
  }
  48% {
    transform: translateY(-0.8px) rotate(-2.2deg);
    opacity: 1;
  }
  72% {
    transform: translateY(-0.35px) rotate(1deg);
  }
}

.resume-section > p,
.resume-section li,
.resume-section dt,
.resume-section dd {
  font-size: calc(clamp(0.95rem, 0.22vw + 0.9rem, 1.05rem) * var(--detail-text-scale));
  line-height: 1.50;
}

.resume-section > p {
  max-width: none;
  margin: 0.88rem 0;
  width: 100%;
  text-wrap: pretty;
}

[data-section='summary'] {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: var(--summary-item-gap);
  align-content: start;
  --summary-item-gap: clamp(0.82rem, 0.44vw + 0.72rem, 1.02rem);
}

[data-section='summary'] > h2 {
  margin-bottom: clamp(0.88rem, 0.42vw + 0.78rem, 1.04rem);
}

[data-section='summary'] > :not(h2) {
  width: 100%;
  max-width: none;
  margin: 0 !important;
}

[data-section='summary'] > :not(h2):not([hidden]) ~ :not(h2):not([hidden]) {
  margin-top: 0 !important;
}

[data-section='summary'] > :is(p, .experience-item):last-child {
  margin-bottom: 0 !important;
}

.resume-grid {
  display: grid;
  gap: clamp(0.8rem, 0.5vw + 0.66rem, 1rem);
}

.resume-grid.two-col {
  grid-template-columns: 1fr;
}

.skill-group {
  margin: 0;
  padding: clamp(0.72rem, 0.45vw + 0.56rem, 1rem);
  border-radius: var(--radius-sm);
  border: 1px solid color-mix(in oklab, var(--color-border) 88%, var(--color-accent-soft));
  background: color-mix(in oklab, var(--color-surface) 84%, var(--color-accent-soft));
}

.skill-group h3 {
  margin: 0 0 0.55rem;
  font-family: var(--font-family-ui);
  font-size: calc(1.02rem * var(--detail-text-scale));
  font-weight: 700;
  color: var(--color-fg);
}

.skill-group ul,
.experience-list,
.contact-list,
.project-list {
  margin: 0;
  padding: 0;
  list-style: none;
}

.experience-list,
.project-list {
  display: grid;
  gap: clamp(0.8rem, 0.5vw + 0.66rem, 1rem);
}

.skill-group li,
.contact-list li,
.project-list li {
  margin: 0.34rem 0;
}

.project-list li {
  margin: 0;
}

.experience-item,
.project-item,
.education-item {
  display: grid;
  gap: 0.52rem;
  border-radius: var(--radius-sm);
  border: 1px solid color-mix(in oklab, var(--color-border) 86%, var(--color-accent-soft));
  background: color-mix(in oklab, var(--color-surface) 88%, transparent);
  padding: clamp(0.92rem, 0.6vw + 0.68rem, 1.26rem);
}

.experience-item + .experience-item,
.project-item + .project-item {
  margin-top: 0;
}

.education-item + .education-item {
  margin-top: clamp(0.8rem, 0.5vw + 0.66rem, 1rem);
}

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

.entry-title {
  margin: 0;
  font-family: var(--font-family-ui);
  font-size: calc(clamp(1.04rem, 0.2vw + 1rem, 1.16rem) * var(--detail-text-scale));
  font-weight: 760;
  line-height: 1.22;
  letter-spacing: 0.008em;
  text-shadow: var(--text-relief-subtle);
}

.helper-note {
  margin: 0;
  font-size: calc(clamp(0.95rem, 0.2vw + 0.9rem, 1.03rem) * var(--detail-text-scale));
  line-height: 1.46;
  color: var(--color-fg);
  text-wrap: pretty;
}

@media screen and (min-width: 42rem) {
  .resume-grid.two-col {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media screen and (min-width: 84rem) {
  .resume-grid.two-col {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: clamp(0.8rem, 1vw + 0.4rem, 1.6rem);
  }

  .resume-section > h2 {
    margin-bottom: 1.02rem;
  }
}

.entry-meta {
  margin: 0;
  color: var(--color-fg-muted);
  font-family: var(--font-family-ui);
  font-size: calc(0.82rem * var(--detail-text-scale));
  font-weight: 640;
}

.entry-bullets {
  margin: 0;
  padding-left: 0;
  list-style: none;
}

.entry-bullets li {
  position: relative;
  margin: 0.3rem 0;
  padding-left: 1.24rem;
  line-height: 1.46;
  text-wrap: pretty;
}

.entry-bullets li::before {
  content: '';
  position: absolute;
  left: 0.12rem;
  top: 0.63em;
  width: 0.38rem;
  height: 0.38rem;
  border-radius: 0.1rem;
  transform: translateY(-50%) rotate(45deg);
  background: color-mix(in oklab, var(--color-accent) 68%, transparent);
  box-shadow: 0 0 0 1px color-mix(in oklab, var(--color-accent) 42%, var(--color-border));
}

.project-item p,
.education-item p {
  margin: 0;
}

.contact-list a {
  font-weight: 620;
}

.contact-list li {
  border-radius: var(--radius-sm);
  border: 1px solid transparent;
  padding: 0.25rem 0.45rem;
  transition: border-color 180ms ease, background-color 180ms ease, box-shadow 180ms ease;
}

.contact-list li:hover {
  border-color: color-mix(in oklab, var(--color-accent) 42%, var(--color-border));
  background: color-mix(in oklab, var(--color-accent-soft) 38%, transparent);
  box-shadow: 0 1px 6px -2px color-mix(in oklab, var(--color-accent) 14%, transparent);
}

.resume-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.68rem;
  margin-top: 0.32rem;
}

.action-link,
.action-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 0.86rem;
  border: 1px solid var(--color-border);
  background: color-mix(in oklab, var(--color-accent-soft) 48%, var(--color-surface));
  color: var(--color-emphasis);
  text-decoration: none;
  font-family: var(--font-family-ui);
  font-weight: 700;
  font-size: calc(0.89rem * var(--detail-text-scale));
  line-height: 1;
  min-block-size: 2.42rem;
  padding: 0.72rem 0.94rem;
  box-shadow:
    0 6px 16px -12px color-mix(in oklab, var(--color-accent) 34%, transparent),
    inset 0 1px 0 color-mix(in oklab, white 84%, transparent),
    inset 0 -1px 0 color-mix(in oklab, var(--color-emphasis) 14%, transparent);
}

.action-button {
  cursor: pointer;
}

.action-link:hover,
.action-link:focus-visible,
.action-button:hover,
.action-button:focus-visible {
  border-color: color-mix(in oklab, var(--color-accent) 62%, var(--color-border));
  box-shadow: var(--focus-ring);
  outline: none;
}

.site-footer {
  margin-top: 0.3rem;
  border-top: 1px solid var(--color-border);
  padding: 2rem clamp(0.2rem, 0.9vw, 0.8rem) 0.5rem;
}

.footer-content {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 1.25rem;
  margin-bottom: 1rem;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
}

.footer-links a {
  color: var(--color-fg-muted);
  text-decoration: none;
  font-family: var(--font-family-ui);
  font-size: calc(clamp(0.875rem, 1.75vw, 1rem) * var(--detail-text-scale));
  font-weight: 550;
}

.footer-links a:hover,
.footer-links a:focus-visible {
  color: var(--color-emphasis);
}

.theme-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  position: relative;
  width: 2.625rem;
  height: 2.625rem;
  padding: 0;
  border-radius: 999px;
  border: 1px solid var(--color-border);
  background: color-mix(in oklab, var(--color-accent-soft) 28%, var(--color-surface));
  color: var(--color-fg-muted);
  font-size: 0.85rem;
  cursor: pointer;
  transition: color 0.2s ease, border-color 0.2s ease, background-color 0.2s ease, transform 0.2s ease;
}

.theme-toggle:hover,
.theme-toggle:focus-visible {
  color: var(--color-fg);
  border-color: color-mix(in oklab, var(--color-accent) 48%, var(--color-border));
  transform: translateY(-1px);
}

.theme-toggle-icon {
  display: inline-flex;
  position: relative;
  width: 1.125rem;
  height: 1.125rem;
}

.theme-toggle-icon svg {
  position: absolute;
  inset: 0;
  width: 1.125rem;
  height: 1.125rem;
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.theme-toggle-icon .icon-sun {
  opacity: 0;
  transform: rotate(-90deg);
}

html[data-theme='light'] .theme-toggle-icon .icon-sun {
  opacity: 1;
  transform: rotate(0deg);
}

html[data-theme='light'] .theme-toggle-icon .icon-moon {
  opacity: 0;
  transform: rotate(90deg);
}

.theme-toggle-label {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.footer-meta {
  text-align: center;
  display: grid;
  gap: 0.25rem;
  justify-items: center;
}

.footer-tagline {
  color: var(--color-fg-muted);
  font-family: var(--font-family-body);
  font-style: italic;
  font-size: calc(clamp(0.875rem, 1.75vw, 1rem) * var(--detail-text-scale));
  text-shadow: var(--text-relief-subtle);
  margin: 0;
}

.footer-copy {
  color: var(--color-fg-muted);
  font-family: var(--font-family-ui);
  font-size: calc(clamp(0.75rem, 1.5vw, 0.875rem) * var(--detail-text-scale));
  text-shadow: var(--text-relief-subtle);
  margin: 0;
}

.is-emphasis {
  --_hue: var(--el-accent-hue, var(--accent-hue));
  --_chroma: var(--el-accent-chroma, var(--accent-chroma));
  --_emph: oklch(var(--accent-l) var(--_chroma) var(--_hue));
  position: relative;
  overflow: hidden;
  padding: clamp(0.62rem, 0.28vw + 0.56rem, 0.84rem) clamp(0.8rem, 0.32vw + 0.72rem, 1rem);
  margin: 0;
  border-radius: var(--radius-sm);
  border-style: solid;
  border-width: 1px 1px 1px 2px;
  border-color: color-mix(in oklab, var(--_emph) 62%, var(--color-border));
  background:
    linear-gradient(
      108deg,
      color-mix(in oklab, var(--_emph) 14%, transparent) 0%,
      color-mix(in oklab, var(--_emph) 6%, transparent) 52%,
      transparent 100%
    ),
    color-mix(in oklab, var(--color-surface) 90%, transparent);
  box-shadow:
    0 0 0 1px color-mix(in oklab, var(--_emph) 22%, transparent) inset,
    0 3px 14px -7px color-mix(in oklab, var(--_emph) 22%, transparent);
}

.is-emphasis::after {
  content: '';
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(
    180deg,
    color-mix(in oklab, var(--_emph) 12%, transparent) 0%,
    transparent 34%
  );
  opacity: 0.8;
}

[data-section='summary'] > :is(p, .experience-item).is-emphasis {
  margin-inline: clamp(0.04rem, 0.32vw, 0.18rem);
  transition: border-color 200ms ease, box-shadow 250ms ease, background-color 250ms ease, color 200ms ease, transform 180ms ease;
}

[data-section='summary'] > :is(p, .experience-item).is-emphasis:hover {
  border-color: color-mix(in oklab, var(--_emph) 48%, var(--color-border));
  box-shadow:
    0 0 0 1px color-mix(in oklab, var(--_emph) 14%, transparent) inset;
  transform: translateY(-1px);
}

[data-section='summary'] > p.is-muted {
  margin-inline: clamp(0.04rem, 0.32vw, 0.18rem);
  padding: clamp(0.58rem, 0.24vw + 0.52rem, 0.78rem) clamp(0.8rem, 0.32vw + 0.72rem, 1rem);
  border-radius: var(--radius-sm);
  border: 1px solid color-mix(in oklab, var(--color-border) 90%, var(--color-accent-soft));
  background: color-mix(in oklab, var(--color-surface) 92%, transparent);
  opacity: 0.94;
  filter: none;
  transition: border-color 200ms ease, box-shadow 240ms ease, background-color 240ms ease, transform 180ms ease, opacity 180ms ease;
}

[data-section='summary'] > p.is-muted:hover {
  border-color: color-mix(in oklab, var(--color-accent) 42%, var(--color-border));
  box-shadow: 0 0 0 1px color-mix(in oklab, var(--color-accent) 12%, transparent) inset;
  transform: translateY(-1px);
  opacity: 1;
}

[data-section='summary'] > .experience-item.is-emphasis {
  gap: 0.32rem;
  padding-block: clamp(0.74rem, 0.28vw + 0.68rem, 0.9rem);
}


.is-muted {
  opacity: 0.72;
  filter: saturate(0.82);
  transition: opacity 250ms ease, filter 250ms ease, color 250ms ease;
}

.is-muted:hover {
  opacity: 0.86;
  filter: saturate(0.9);
}

[hidden] {
  display: none !important;
}

.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;
}

:focus-visible {
  outline: none;
  box-shadow: var(--focus-ring);
}


.resume-shell,
.resume-card,
.resume-section,
.experience-item,
.project-item,
.education-item,
.skill-group,
.action-link,
.action-button,
.theme-toggle {
  transition: border-color 200ms ease, box-shadow 250ms ease, background-color 250ms ease, color 200ms ease, transform 180ms ease;
}

.resume-section:hover {
  border-color: color-mix(in oklab, var(--color-accent) 52%, var(--color-border));
  box-shadow:
    0 0 0 1px color-mix(in oklab, var(--color-accent) 18%, transparent) inset,
    0 4px 16px -6px color-mix(in oklab, var(--color-accent) 16%, transparent);
  transform: translateY(-1px);
}

.experience-item:hover,
.project-item:hover,
.education-item:hover,
.skill-group:hover {
  border-color: color-mix(in oklab, var(--color-accent) 48%, var(--color-border));
  box-shadow: 0 0 0 1px color-mix(in oklab, var(--color-accent) 14%, transparent) inset;
  transform: translateY(-1px);
}

.action-link:hover,
.action-link:focus-visible,
.action-button:hover,
.action-button:focus-visible {
  transform: translateY(-1px);
}

.resume-shell.is-view-shift .resume-section {
  animation: sectionRefineIn 340ms cubic-bezier(0.22, 1, 0.36, 1) both;
}

.resume-shell.is-view-shift .resume-section:nth-child(1) { animation-delay: 0ms; }
.resume-shell.is-view-shift .resume-section:nth-child(2) { animation-delay: 50ms; }
.resume-shell.is-view-shift .resume-section:nth-child(3) { animation-delay: 100ms; }
.resume-shell.is-view-shift .resume-section:nth-child(4) { animation-delay: 140ms; }
.resume-shell.is-view-shift .resume-section:nth-child(5) { animation-delay: 170ms; }
.resume-shell.is-view-shift .resume-section:nth-child(6) { animation-delay: 195ms; }

.resume-shell.is-view-shift .experience-item,
.resume-shell.is-view-shift .project-item,
.resume-shell.is-view-shift .education-item,
.resume-shell.is-view-shift .skill-group {
  animation: sectionRefineIn 280ms cubic-bezier(0.22, 1, 0.36, 1) both;
}

@keyframes sectionRefineIn {
  from {
    opacity: 0.78;
    transform: translateY(4px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.resume-shell.is-view-shift .section-icon {
  animation: iconPop 380ms cubic-bezier(0.34, 1.56, 0.64, 1) both;
}

@keyframes iconPop {
  0% { transform: scale(0.85); opacity: 0.6; }
  60% { transform: scale(1.12); }
  100% { transform: scale(1); opacity: 1; }
}

@media screen and (min-width: 64rem) {
  .resume-shell {
    padding-top: 1.05rem;
  }

  .resume-header {
    padding: clamp(1.32rem, 0.94vw + 1.04rem, 2.08rem);
  }

  .resume-title-row {
    min-height: clamp(9.7rem, 8.8vw, 11.9rem);
    --viz-lane-width: clamp(10.1rem, 17.2vw, 17.6rem);
    --viz-max-height: clamp(9.7rem, 8.8vw, 11.9rem);
    --viz-inline-offset: clamp(3.15rem, 6.2vw, 6.85rem);
    --viz-block-offset: clamp(-0.1rem, 0.26vw, 0.24rem);
  }

  .resume-title-text {
    gap: clamp(0.36rem, 0.34vw, 0.6rem);
    padding-top: clamp(0.22rem, 0.24vw, 0.4rem);
    padding-bottom: clamp(0.06rem, 0.1vw, 0.14rem);
  }

  .resume-identity {
    gap: clamp(0.12rem, 0.18vw, 0.26rem);
  }

  .resume-tagline {
    margin-top: clamp(0.14rem, 0.16vw, 0.24rem);
  }

  .resume-main {
    padding: 1.55rem;
  }

  .resume-section {
    padding: clamp(1.05rem, 0.44vw + 0.92rem, 1.52rem);
  }

  .resume-section > p,
  .resume-section li {
    font-size: calc(clamp(0.98rem, 0.12vw + 0.94rem, 1.07rem) * var(--detail-text-scale));
  }

  .entry-title {
    font-size: calc(clamp(1.06rem, 0.14vw + 1.01rem, 1.2rem) * var(--detail-text-scale));
  }

  .perspective-viz {
    opacity: 0.24;
  }
}

@media screen and (min-width: 90rem) {
  .resume-title-row {
    min-height: clamp(11.4rem, 12.6vw, 13.6rem);
    --viz-lane-width: clamp(11.4rem, 14.8vw, 16.2rem);
    --viz-max-height: clamp(11.4rem, 12.6vw, 13.6rem);
    --viz-inline-offset: clamp(2.8rem, 5.4vw, 5.8rem);
  }

  .resume-title-text {
    gap: clamp(0.4rem, 0.28vw, 0.62rem);
    padding-top: clamp(0.16rem, 0.18vw, 0.34rem);
  }

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

  [data-section='summary'] {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    align-items: stretch;
  }

  html[data-view='general'] [data-section='summary'] {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  [data-section='summary'] > h2 {
    grid-column: 1 / -1;
  }

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

  .project-list > li:last-child:nth-child(odd) {
    max-width: 50%;
    justify-self: center;
    grid-column: 1 / -1;
  }

  [data-section='education'] {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: clamp(0.8rem, 1vw + 0.4rem, 1.6rem);
  }

  [data-section='education'] > h2 {
    grid-column: 1 / -1;
  }

  .education-item + .education-item {
    margin-top: 0;
  }
}

@media screen and (min-width: 120rem) {
  .resume-title-row {
    min-height: clamp(13.8rem, 11.6vw, 15.8rem);
    --viz-lane-width: clamp(13.8rem, 13.4vw, 18.6rem);
    --viz-max-height: clamp(13.8rem, 11.6vw, 15.8rem);
    --viz-inline-offset: clamp(5.2rem, 6vw, 9.4rem);
  }

  .resume-title {
    font-size: clamp(2.9rem, 0.95vw + 2.05rem, 4.1rem);
  }

  .resume-role {
    font-size: calc(clamp(0.98rem, 0.16vw + 0.92rem, 1.24rem) * var(--detail-text-scale));
  }

  .resume-tagline {
    font-size: calc(clamp(1.02rem, 0.18vw + 0.94rem, 1.32rem) * var(--detail-text-scale));
    max-width: 74ch;
  }

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

  .project-list > li:last-child:nth-child(odd) {
    max-width: none;
    justify-self: stretch;
    grid-column: auto;
  }
}

@media screen and (min-width: 160rem) {
  .resume-title-row {
    min-height: clamp(16.2rem, 10.4vw, 18.8rem);
    --viz-lane-width: clamp(16.2rem, 12.2vw, 21.4rem);
    --viz-max-height: clamp(16.2rem, 10.4vw, 18.8rem);
    --viz-inline-offset: clamp(7.8rem, 6.8vw, 13.2rem);
  }

  .resume-title {
    font-size: clamp(3.25rem, 0.75vw + 2.7rem, 4.7rem);
  }

  .resume-role {
    font-size: calc(clamp(1.08rem, 0.14vw + 1.02rem, 1.42rem) * var(--detail-text-scale));
  }
}

@media screen and (min-width: 40rem) and (max-width: 64rem) {
  .resume-shell {
    width: min(100% - clamp(1.4rem, 3.5vw, 2.2rem), var(--max-width));
    padding-top: clamp(0.55rem, 0.7vw + 0.3rem, 0.95rem);
  }

  .resume-header {
    padding: clamp(1.12rem, 1.18vw + 0.72rem, 1.85rem);
  }

  .resume-title-row {
    min-height: clamp(8rem, 13.2vw, 10.2rem);
    --viz-lane-width: clamp(7.9rem, 16.1vw, 11.2rem);
    --viz-max-height: clamp(8rem, 13.2vw, 10.2rem);
    --viz-inline-offset: clamp(1.2rem, 2.7vw, 2.1rem);
    --viz-block-offset: clamp(-0.24rem, 0.5vw, 0.14rem);
  }

  .resume-title {
    font-size: clamp(2.12rem, 1.9vw + 1.2rem, 2.68rem);
    line-height: 1.06;
  }

  .resume-role {
    font-size: clamp(0.88rem, 0.2vw + 0.84rem, 0.99rem);
    gap: 0 0.45rem;
  }

  .resume-tagline {
    font-size: clamp(0.94rem, 0.2vw + 0.87rem, 1.04rem);
    line-height: 1.46;
    max-width: 64ch;
  }

  .perspective-viz {
    opacity: 0.24;
  }

  .resume-main {
    padding: clamp(1.08rem, 0.92vw + 0.74rem, 1.5rem);
  }

  .resume-grid.two-col {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.75rem;
  }

  .perspective-link {
    font-size: 0.84rem;
    padding: 0.52rem 0.92rem;
  }

  .footer-content {
    gap: 1rem;
  }
}

@media screen and (min-width: 44rem) and (max-width: 50rem) {
  .resume-header {
    grid-template-columns: minmax(0, 1fr);
  }

  .resume-title-row {
    --viz-lane-width: clamp(6.8rem, 13.4vw, 8.1rem);
    --viz-inline-offset: clamp(0.88rem, 1.8vw, 1.3rem);
  }

  .resume-title-text {
    padding-right: calc(var(--viz-lane-width) + var(--viz-inline-offset) + 0.9rem);
  }
}

@media screen and (max-width: 40rem) {
  .resume-shell {
    width: min(100% - 1rem, var(--max-width));
  }

  .resume-header {
    padding: 1rem;
  }

  .resume-title-row {
    min-height: clamp(7.2rem, 32vw, 9.1rem);
    gap: 0.48rem;
    --viz-lane-width: clamp(6.5rem, 30vw, 8.9rem);
    --viz-max-height: clamp(7.2rem, 32vw, 9.1rem);
    --viz-inline-offset: clamp(0.56rem, 2.8vw, 1.15rem);
    --viz-block-offset: clamp(-0.2rem, 1vw, 0.34rem);
  }

  .resume-title-text {
    text-align: left;
    justify-items: start;
    display: grid;
    grid-template-areas:
      'identity'
      'tagline';
    padding-right: 0;
    gap: 0.18rem;
  }

  .resume-identity {
    grid-area: identity;
    max-inline-size: calc(100% - (var(--viz-lane-width) + var(--viz-inline-offset) + 0.35rem));
  }

  .resume-title {
    grid-area: auto;
    max-width: 7.15ch;
    font-size: clamp(2.25rem, 8.2vw, 2.8rem);
    line-height: 1.03;
  }

  .resume-role,
  .resume-tagline {
    max-width: none;
  }

  .resume-role {
    grid-area: auto;
    display: grid;
    grid-template-columns: 1fr;
    justify-content: start;
    gap: 0.05rem;
    font-size: clamp(0.96rem, 0.5vw + 0.88rem, 1.06rem);
    line-height: 1.16;
  }

  .resume-tagline {
    grid-area: tagline;
    max-inline-size: 100%;
    width: 100%;
    padding-right: 0;
    margin-top: 0.12rem;
  }

  .role-segment:not(:last-child)::after {
    content: none;
  }

  .resume-section > h2 {
    margin-bottom: 0.78rem;
    font-size: clamp(1.2rem, 1.8vw + 0.95rem, 1.48rem);
  }

  .section-icon {
    width: 1.88rem;
    height: 1.88rem;
  }

  .section-icon svg {
    width: 1.02rem;
    height: 1.02rem;
  }

  .resume-title {
    text-wrap: pretty;
  }

  .perspective-viz {
    opacity: 0.21;
  }

  .entry-header {
    align-items: flex-start;
  }

  .perspective-nav {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.45rem;
    width: 100%;
  }

  .perspective-link {
    font-size: 0.79rem;
    padding: 0.48rem 0.44rem;
    text-align: center;
  }

  .resume-actions {
    width: 100%;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.45rem;
    margin-top: 0.22rem;
  }

  .action-link,
  .action-button {
    width: 100%;
    padding-inline: 0.56rem;
  }

  .footer-content {
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 0.75rem;
  }

  .site-footer {
    padding-inline: clamp(0.7rem, 3.5vw, 1rem);
  }
}

/* Wider phones (Plus/Pro/Max): keep the SVG lane clear of tagline text. */
@media screen and (min-width: 25rem) and (max-width: 40rem) {
  .resume-title-row {
    --viz-inline-offset: clamp(0.68rem, 2.3vw, 1.28rem);
    --viz-block-offset: -0.25rem;
  }

  .resume-title-text {
    gap: 0.28rem;
  }

  .resume-identity {
    max-inline-size: calc(100% - (var(--viz-lane-width) + var(--viz-inline-offset) + 0.72rem));
    gap: 0.15rem;
  }

  .resume-title {
    max-width: none;
    font-size: clamp(2.18rem, 5.9vw, 2.72rem);
    line-height: 1.05;
  }

  .resume-role {
    gap: 0.08rem;
    line-height: 1.18;
  }

  .resume-tagline {
    max-inline-size: 100%;
    width: 100%;
    margin-top: 0.14rem;
  }

  .viz-frontend {
    --viz-shift-y: -0.46rem;
  }
}

/* ── Dark mode: boost watermark visibility ── */
@media screen and (prefers-color-scheme: dark) {
  :root:not([data-theme='light']) .perspective-viz {
    opacity: 0.25;
  }
}

html[data-theme='dark'] .perspective-viz {
  opacity: 0.25;
}

/* Mobile dark mode: slightly more visible */
@media screen and (max-width: 40rem) and (prefers-color-scheme: dark) {
  :root:not([data-theme='light']) .perspective-viz {
    opacity: 0.26;
  }
}

@media screen and (max-width: 40rem) {
  html[data-theme='dark'] .perspective-viz {
    opacity: 0.26;
  }
}
