:root {
  --bg: #09090b;
  --bg-alt: #0d0d10;
  --surface: #111114;
  --surface-2: #18181c;
  --border: rgba(255, 255, 255, 0.085);
  --border-hover: rgba(255, 255, 255, 0.2);
  --text: #fafafa;
  --text-soft: #d4d4d8;
  --text-muted: #8b8b96;
  --primary-bg: #fafafa;
  --primary-text: #09090b;
  --link: #e4e4e7;
  --live: #10b981;
  --live-bg: rgba(16, 185, 129, 0.12);
  --shadow: 0 20px 50px rgba(0, 0, 0, 0.45);
  --radius: 14px;
  --mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  --sans: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

[data-theme="light"] {
  --bg: #ffffff;
  --bg-alt: #fafafa;
  --surface: #ffffff;
  --surface-2: #f4f4f5;
  --border: rgba(9, 9, 11, 0.1);
  --border-hover: rgba(9, 9, 11, 0.28);
  --text: #09090b;
  --text-soft: #3f3f46;
  --text-muted: #71717a;
  --primary-bg: #09090b;
  --primary-text: #fafafa;
  --link: #09090b;
  --live: #059669;
  --live-bg: rgba(5, 150, 105, 0.1);
  --shadow: 0 14px 36px rgba(9, 9, 11, 0.07);
}

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

html {
  scroll-behavior: smooth;
  background: var(--bg);
}

body {
  margin: 0;
  font-family: var(--sans);
  color: var(--text);
  background: var(--bg);
  line-height: 1.58;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

a {
  color: var(--link);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

.grid-backdrop {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: -1;
  background-image:
    linear-gradient(to right, rgba(255, 255, 255, 0.028) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(255, 255, 255, 0.028) 1px, transparent 1px);
  background-size: 64px 64px;
  mask-image: radial-gradient(ellipse 75% 50% at 50% 0%, #000 30%, transparent 100%);
}

[data-theme="light"] .grid-backdrop {
  background-image:
    linear-gradient(to right, rgba(9, 9, 11, 0.035) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(9, 9, 11, 0.035) 1px, transparent 1px);
}

.container {
  width: 100%;
  max-width: 1160px;
  margin: 0 auto;
  padding: 0 24px;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 40;
  backdrop-filter: blur(16px);
  background: rgba(9, 9, 11, 0.8);
  border-bottom: 1px solid var(--border);
}

[data-theme="light"] .topbar {
  background: rgba(255, 255, 255, 0.86);
}

.topbar-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  height: 60px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--text);
  font-weight: 600;
  font-size: 0.94rem;
  letter-spacing: -0.02em;
}

.brand:hover {
  text-decoration: none;
}

.brand-avatar {
  display: inline-grid;
  place-items: center;
  color: var(--text);
}

.nav {
  display: flex;
  align-items: center;
  gap: 26px;
}

.nav a {
  color: var(--text-muted);
  font-size: 0.87rem;
  font-weight: 500;
  transition: color 0.14s ease;
}

.nav a:hover {
  color: var(--text);
  text-decoration: none;
}

.topbar-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  min-height: 40px;
  padding: 0 15px;
  border-radius: 9px;
  font-family: var(--sans);
  font-size: 0.86rem;
  font-weight: 500;
  cursor: pointer;
  border: 1px solid transparent;
  transition: background 0.14s ease, border-color 0.14s ease, color 0.14s ease, transform 0.14s ease;
  white-space: nowrap;
}

.btn:hover {
  text-decoration: none;
  transform: translateY(-1px);
}

.btn:focus-visible,
.icon-btn:focus-visible,
.filter-pill:focus-visible,
.seg-btn:focus-visible,
.index-row:focus-visible,
.video-toggle:focus-visible {
  outline: 2px solid var(--text);
  outline-offset: 2px;
}

.btn-sm {
  min-height: 34px;
  padding: 0 12px;
  font-size: 0.81rem;
}

.btn-primary {
  background: var(--primary-bg);
  color: var(--primary-text);
  font-weight: 600;
}

.btn-primary:hover {
  opacity: 0.92;
}

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

.btn-secondary:hover {
  border-color: var(--border-hover);
  background: var(--surface-2);
}

.btn-ghost {
  background: transparent;
  color: var(--text-soft);
  border-color: var(--border);
}

.btn-ghost:hover {
  color: var(--text);
  border-color: var(--border-hover);
}

.icon-btn {
  display: inline-grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 9px;
  border: 1px solid var(--border);
  background: transparent;
  color: var(--text-muted);
  cursor: pointer;
  transition: border-color 0.14s ease, color 0.14s ease;
}

.icon-btn:hover {
  border-color: var(--border-hover);
  color: var(--text);
}

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

[data-theme="light"] .icon-sun {
  display: none;
}

.hero {
  padding: 58px 0 54px;
}

.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.18fr) minmax(0, 0.82fr);
  gap: 40px;
  align-items: center;
}

.identity-row {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 22px;
}

.hero-avatar {
  position: relative;
  width: 60px;
  height: 60px;
  flex-shrink: 0;
}

.avatar-status {
  position: absolute;
  right: -2px;
  bottom: -2px;
  width: 14px;
  height: 14px;
  border-radius: 999px;
  background: var(--live);
  border: 2.5px solid var(--bg);
}

.identity-name {
  font-size: 1rem;
  font-weight: 600;
  letter-spacing: -0.015em;
  color: var(--text);
}

.identity-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 2px 6px;
  font-family: var(--mono);
  font-size: 0.76rem;
  color: var(--text-muted);
  margin-top: 2px;
}

.dot-sep {
  opacity: 0.5;
}

h1 {
  margin: 0 0 16px;
  font-size: clamp(2.35rem, 4.5vw, 3.45rem);
  font-weight: 700;
  line-height: 1.06;
  letter-spacing: -0.04em;
}

.muted-heading {
  color: var(--text-muted);
}

.hero-lead {
  margin: 0 0 24px;
  font-size: 1.02rem;
  color: var(--text-muted);
  max-width: 56ch;
}

.hero-lead strong {
  color: var(--text);
  font-weight: 500;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 30px;
}

.metrics-bar {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
  padding-top: 22px;
  border-top: 1px solid var(--border);
}

.metric {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.metric-val {
  font-family: var(--mono);
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text);
}

.metric-lbl {
  font-size: 0.76rem;
  color: var(--text-muted);
}

.index-card {
  border-radius: var(--radius);
  background: var(--surface);
  border: 1px solid var(--border);
  overflow: hidden;
  box-shadow: var(--shadow);
}

.index-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px;
  border-bottom: 1px solid var(--border);
  background: var(--surface-2);
}

.index-title {
  font-family: var(--mono);
  font-size: 0.76rem;
  color: var(--text-muted);
}

.live-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: var(--mono);
  font-size: 0.7rem;
  color: var(--live);
  background: var(--live-bg);
  padding: 3px 8px;
  border-radius: 999px;
}

.live-dot {
  width: 6px;
  height: 6px;
  border-radius: 999px;
  background: var(--live);
}

.index-list {
  list-style: none;
  margin: 0;
  padding: 10px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.index-row {
  width: 100%;
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: 9px;
  border: 1px solid transparent;
  background: transparent;
  color: var(--text);
  font-family: var(--mono);
  font-size: 0.76rem;
  text-align: left;
  cursor: pointer;
  transition: background 0.14s ease, border-color 0.14s ease;
}

.index-row:hover {
  background: var(--surface-2);
  border-color: var(--border);
}

.index-name {
  font-weight: 600;
  color: var(--text);
  white-space: nowrap;
}

.index-tech {
  color: var(--text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.index-state {
  font-size: 0.66rem;
  font-weight: 600;
  padding: 2px 7px;
  border-radius: 5px;
  border: 1px solid var(--border);
  color: var(--text-muted);
}

.index-state.is-live {
  color: var(--live);
  border-color: rgba(16, 185, 129, 0.3);
  background: var(--live-bg);
}

.index-foot {
  padding: 10px 16px 12px;
  border-top: 1px solid var(--border);
  font-size: 0.76rem;
  color: var(--text-muted);
}

.section {
  padding: 64px 0;
}

.section-alt {
  background: var(--bg-alt);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

.section-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 18px;
  margin-bottom: 28px;
}

.eyebrow {
  display: inline-block;
  font-family: var(--mono);
  font-size: 0.73rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-muted);
  margin-bottom: 6px;
}

h2 {
  margin: 0;
  font-size: clamp(1.55rem, 2.8vw, 2.1rem);
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.15;
}

.section-sub {
  margin: 6px 0 0;
  color: var(--text-muted);
  font-size: 0.94rem;
  max-width: 58ch;
}

.filter-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.filter-pill {
  min-height: 34px;
  padding: 0 13px;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: transparent;
  color: var(--text-muted);
  font-family: var(--sans);
  font-size: 0.82rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.14s ease;
}

.filter-pill:hover {
  border-color: var(--border-hover);
  color: var(--text);
}

.filter-pill.active {
  background: var(--primary-bg);
  color: var(--primary-text);
  border-color: var(--primary-bg);
  font-weight: 600;
}

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

.project-card {
  display: flex;
  flex-direction: column;
  border-radius: var(--radius);
  background: var(--surface);
  border: 1px solid var(--border);
  overflow: hidden;
  transition: border-color 0.16s ease, transform 0.16s ease;
}

.project-card:hover {
  border-color: var(--border-hover);
  transform: translateY(-2px);
}

.project-card[hidden] {
  display: none;
}

.card-media {
  position: relative;
  aspect-ratio: 16 / 10;
  background: #0c0c0f;
  border-bottom: 1px solid var(--border);
  overflow: hidden;
}

.card-media img,
.card-media video,
.media-link-fill {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.media-badge {
  position: absolute;
  top: 12px;
  right: 12px;
  padding: 4px 9px;
  border-radius: 6px;
  font-family: var(--mono);
  font-size: 0.68rem;
  font-weight: 600;
  background: rgba(9, 9, 11, 0.82);
  color: #e4e4e7;
  backdrop-filter: blur(8px);
  border: 1px solid rgba(255, 255, 255, 0.12);
}

.media-badge.is-live {
  color: #6ee7b7;
  border-color: rgba(16, 185, 129, 0.32);
}

.video-toggle {
  position: absolute;
  right: 12px;
  bottom: 12px;
  padding: 4px 10px;
  border-radius: 6px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  background: rgba(9, 9, 11, 0.78);
  color: #fafafa;
  font-family: var(--mono);
  font-size: 0.7rem;
  cursor: pointer;
  backdrop-filter: blur(8px);
}

.video-toggle:hover {
  background: rgba(9, 9, 11, 0.95);
}

.live-sim-media {
  padding: 14px;
  display: flex;
  background: #09090b;
}

.live-sim-media .media-badge {
  top: auto;
  bottom: 14px;
  left: 14px;
  display: none;
}

.sim-terminal,
.fleet-sim {
  width: 100%;
  height: 100%;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: #0d0d11;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  font-family: var(--mono);
}

.sim-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 9px 12px;
  background: #141419;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.sim-dots {
  display: flex;
  gap: 5px;
}

.sim-dots span {
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.22);
}

.sim-bar-title {
  font-size: 0.7rem;
  color: #a1a1aa;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.sim-chip {
  font-size: 0.63rem;
  font-weight: 600;
  padding: 2px 6px;
  border-radius: 4px;
  background: rgba(16, 185, 129, 0.14);
  color: #6ee7b7;
}

.sim-body {
  flex: 1;
  padding: 14px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 8px;
  font-size: 0.74rem;
}

.sim-line {
  opacity: 0.28;
  transform: translateX(0);
  transition: opacity 0.28s ease, transform 0.28s ease;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.sim-line.is-visible {
  opacity: 0.92;
}

.sim-line.is-active {
  opacity: 1;
  transform: translateX(3px);
}

.c-prompt { color: #60a5fa; font-weight: 600; }
.c-cmd { color: #fafafa; }
.c-muted { color: #71717a; }
.c-val { color: #a5b4fc; }
.c-ok { color: #34d399; font-weight: 600; }
.c-text { color: #d4d4d8; }

.sim-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 12px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  font-size: 0.68rem;
  color: #71717a;
}

.sim-status {
  color: #d4d4d8;
}

.pipeline-ribbon {
  position: absolute;
  left: 12px;
  right: 12px;
  bottom: 12px;
  display: flex;
  flex-wrap: nowrap;
  gap: 5px;
  padding: 6px;
  border-radius: 8px;
  background: rgba(9, 9, 11, 0.86);
  border: 1px solid rgba(255, 255, 255, 0.12);
  backdrop-filter: blur(10px);
  overflow: hidden;
}

.pipe-step {
  flex: 1;
  text-align: center;
  padding: 4px 5px;
  border-radius: 5px;
  font-family: var(--mono);
  font-size: 0.64rem;
  color: #a1a1aa;
  white-space: nowrap;
  transition: background 0.24s ease, color 0.24s ease;
}

.pipe-step.active {
  background: rgba(16, 185, 129, 0.18);
  color: #6ee7b7;
  font-weight: 600;
}

.aim-reticle {
  position: absolute;
  width: 34px;
  height: 34px;
  border-radius: 999px;
  border: 1.5px solid rgba(248, 113, 113, 0.9);
  box-shadow: 0 0 0 6px rgba(248, 113, 113, 0.14);
  left: 63%;
  top: 46%;
  transform: translate(-50%, -50%);
  pointer-events: none;
  animation: reticleMove 5.6s ease-in-out infinite;
}

.aim-reticle::before,
.aim-reticle::after {
  content: "";
  position: absolute;
  background: rgba(248, 113, 113, 0.9);
}

.aim-reticle::before {
  width: 12px;
  height: 1.5px;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
}

.aim-reticle::after {
  width: 1.5px;
  height: 12px;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
}

@keyframes reticleMove {
  0%, 100% { left: 63%; top: 46%; transform: translate(-50%, -50%) scale(1); }
  30% { left: 76%; top: 20%; transform: translate(-50%, -50%) scale(0.92); }
  55% { left: 50%; top: 61%; transform: translate(-50%, -50%) scale(1.06); }
  80% { left: 65%; top: 44%; transform: translate(-50%, -50%) scale(0.95); }
}

.fleet-nodes {
  flex: 1;
  padding: 14px;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  align-content: center;
}

.fleet-node {
  display: flex;
  flex-direction: column;
  gap: 3px;
  padding: 12px;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: #131318;
  transition: border-color 0.25s ease, background 0.25s ease;
}

.fleet-node.active {
  border-color: rgba(16, 185, 129, 0.5);
  background: rgba(16, 185, 129, 0.07);
}

.fn-tag {
  font-size: 0.62rem;
  color: #71717a;
}

.fleet-node.active .fn-tag {
  color: #6ee7b7;
}

.fleet-node strong {
  font-family: var(--sans);
  font-size: 0.84rem;
  color: #fafafa;
}

.fleet-node span:last-child {
  font-size: 0.68rem;
  color: #a1a1aa;
}

.card-body {
  display: flex;
  flex-direction: column;
  flex: 1;
  padding: 20px 22px 22px;
}

.card-top {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 8px;
}

.card-top h3 {
  margin: 0;
  font-size: 1.08rem;
  font-weight: 600;
  letter-spacing: -0.02em;
}

.card-year {
  font-family: var(--mono);
  font-size: 0.74rem;
  color: var(--text-muted);
}

.card-body p {
  margin: 0 0 14px;
  font-size: 0.9rem;
  color: var(--text-muted);
  flex: 1;
}

.tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 16px;
}

.tag-row span,
.chip-wrap span {
  font-family: var(--mono);
  font-size: 0.71rem;
  padding: 3px 8px;
  border-radius: 6px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  color: var(--text-soft);
}

.card-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 16px;
  padding-top: 12px;
  border-top: 1px solid var(--border);
}

.card-link {
  background: none;
  border: 0;
  padding: 4px 0;
  font-family: var(--sans);
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--text-muted);
  cursor: pointer;
}

.card-link:hover {
  color: var(--text);
  text-decoration: underline;
}

.primary-link {
  color: var(--text);
  font-weight: 600;
}

.pillars-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}

.pillar-card {
  padding: 24px;
  border-radius: var(--radius);
  background: var(--surface);
  border: 1px solid var(--border);
}

.pillar-num {
  display: inline-block;
  font-family: var(--mono);
  font-size: 0.76rem;
  color: var(--text-muted);
  margin-bottom: 10px;
}

.pillar-card h3 {
  margin: 0 0 8px;
  font-size: 1.04rem;
  font-weight: 600;
  letter-spacing: -0.02em;
}

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

.resume-controls {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

.segmented {
  display: inline-flex;
  padding: 3px;
  border-radius: 9px;
  background: var(--surface-2);
  border: 1px solid var(--border);
}

.seg-btn {
  min-height: 28px;
  padding: 0 11px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: var(--text-muted);
  font-family: var(--sans);
  font-size: 0.8rem;
  font-weight: 500;
  cursor: pointer;
}

.seg-btn.active {
  background: var(--surface);
  color: var(--text);
  font-weight: 600;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
}

.resume-sheet {
  display: grid;
  grid-template-columns: minmax(0, 1.65fr) minmax(0, 0.85fr);
  gap: 24px;
  align-items: start;
}

.timeline {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.role-card {
  padding: 20px 22px;
  border-radius: var(--radius);
  background: var(--surface);
  border: 1px solid var(--border);
}

.role-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
}

.role-head h3 {
  margin: 0;
  font-size: 1.02rem;
  font-weight: 600;
  letter-spacing: -0.015em;
}

.role-org {
  font-size: 0.88rem;
  color: var(--text-muted);
  margin-top: 2px;
}

.role-dates {
  font-family: var(--mono);
  font-size: 0.75rem;
  color: var(--text-muted);
  white-space: nowrap;
}

.role-card ul {
  margin: 0;
  padding-left: 18px;
  color: var(--text-soft);
  font-size: 0.89rem;
}

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

.role-card li:last-child {
  margin-bottom: 0;
}

.resume-col-side {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.side-block {
  padding: 18px 20px;
  border-radius: var(--radius);
  background: var(--surface);
  border: 1px solid var(--border);
}

.side-block h4 {
  margin: 0 0 10px;
  font-family: var(--mono);
  font-size: 0.74rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-muted);
}

.chip-wrap {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.side-text {
  margin: 0 0 8px;
  font-size: 0.87rem;
  color: var(--text-soft);
}

.side-text.muted {
  color: var(--text-muted);
  margin-bottom: 0;
}

.side-list {
  margin: 0;
  padding-left: 16px;
  font-size: 0.86rem;
  color: var(--text-soft);
}

.side-list li {
  margin-bottom: 6px;
}

.side-list li:last-child {
  margin-bottom: 0;
}

.contact-section {
  padding-top: 12px;
}

.contact-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 24px;
  padding: 32px;
  border-radius: 16px;
  background: var(--surface);
  border: 1px solid var(--border);
}

.contact-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.footer {
  border-top: 1px solid var(--border);
  padding: 24px 0 36px;
  font-size: 0.82rem;
  color: var(--text-muted);
}

.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 14px;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 18px;
}

.footer-links a {
  color: var(--text-muted);
}

.footer-links a:hover {
  color: var(--text);
}

.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: grid;
  place-items: center;
  padding: 20px;
  background: rgba(0, 0, 0, 0.72);
  backdrop-filter: blur(8px);
}

.modal-backdrop[hidden] {
  display: none;
}

.modal-panel {
  width: 100%;
  max-width: 640px;
  max-height: 88vh;
  overflow-y: auto;
  border-radius: 16px;
  background: var(--surface);
  border: 1px solid var(--border-hover);
  box-shadow: var(--shadow);
}

.modal-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  padding: 20px 24px 16px;
  border-bottom: 1px solid var(--border);
}

.modal-head h3 {
  margin: 0;
  font-size: 1.24rem;
  letter-spacing: -0.02em;
}

.modal-body {
  padding: 20px 24px;
  font-size: 0.91rem;
  color: var(--text-soft);
}

.modal-body h4 {
  margin: 16px 0 6px;
  font-family: var(--mono);
  font-size: 0.73rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-muted);
}

.modal-body h4:first-child {
  margin-top: 0;
}

.modal-body ul {
  margin: 6px 0 0;
  padding-left: 18px;
}

.modal-body li {
  margin-bottom: 6px;
}

.modal-foot {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 16px 24px 20px;
  border-top: 1px solid var(--border);
}

.toast {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 90;
  padding: 10px 14px;
  border-radius: 9px;
  background: var(--primary-bg);
  color: var(--primary-text);
  font-family: var(--mono);
  font-size: 0.79rem;
  font-weight: 600;
  box-shadow: var(--shadow);
}

@media (max-width: 1024px) {
  .hero-grid {
    grid-template-columns: 1fr;
  }
  .pillars-grid {
    grid-template-columns: 1fr;
  }
  .resume-sheet {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 780px) {
  .projects-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 680px) {
  .container {
    padding: 0 16px;
  }
  .nav {
    display: none;
  }
  .hero {
    padding: 36px 0 32px;
  }
  .metrics-bar {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .section {
    padding: 48px 0;
  }
  .role-head {
    flex-direction: column;
    gap: 4px;
  }
  .contact-card {
    padding: 24px 20px;
  }
  .index-row {
    grid-template-columns: minmax(0, 1fr) auto;
  }
  .index-tech {
    display: none;
  }
  .pipe-step {
    font-size: 0.56rem;
    padding: 3px 2px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .aim-reticle {
    animation: none;
  }
}

@media print {
  .topbar, .hero, #projects, #approach, #contact, .footer, .resume-controls, .grid-backdrop {
    display: none !important;
  }
  body {
    background: #ffffff;
    color: #09090b;
  }
  .resume-sheet {
    grid-template-columns: 1fr;
  }
  .role-card, .side-block {
    border: 1px solid #d4d4d8;
    break-inside: avoid;
  }
}
