/*
  Luke McNamara portfolio
  Static, dependency-free interface with accessible motion and contrast defaults.
*/

:root {
  --background: #05070d;
  --background-secondary: #090d18;
  --panel: rgba(12, 19, 33, 0.82);
  --panel-strong: rgba(9, 15, 27, 0.96);
  --cyan: #32f5ff;
  --cyan-muted: #63cbd1;
  --magenta: #e548ff;
  --amber: #ffbf47;
  --green: #4dff9a;
  --text-primary: #e8f1f5;
  --text-secondary: #93aab6;
  --text-dim: #5e7582;
  --border: rgba(50, 245, 255, 0.18);
  --border-strong: rgba(50, 245, 255, 0.4);
  --grid: rgba(50, 245, 255, 0.035);
  --font-sans: Inter, Aptos, "Segoe UI", Helvetica, Arial, sans-serif;
  --font-mono: "Cascadia Code", "SFMono-Regular", Consolas, "Liberation Mono", monospace;
  --space-1: 0.5rem;
  --space-2: 0.75rem;
  --space-3: 1rem;
  --space-4: 1.5rem;
  --space-5: 2rem;
  --space-6: 3rem;
  --space-7: 4.5rem;
  --space-8: 7rem;
  --radius-sm: 0.3rem;
  --radius: 0.65rem;
  --max-width: 1380px;
  --header-height: 76px;
  --cursor-x: 50vw;
  --cursor-y: 50vh;
}

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-height) + 24px);
  background: var(--background);
}

body {
  margin: 0;
  min-width: 320px;
  color: var(--text-primary);
  background:
    radial-gradient(circle at 76% 12%, rgba(229, 72, 255, 0.07), transparent 27rem),
    radial-gradient(circle at 12% 42%, rgba(50, 245, 255, 0.055), transparent 34rem),
    var(--background);
  font-family: var(--font-sans);
  font-size: 1rem;
  line-height: 1.7;
  overflow-x: hidden;
}

body::before {
  position: fixed;
  inset: 0;
  z-index: -2;
  background-image:
    linear-gradient(var(--grid) 1px, transparent 1px),
    linear-gradient(90deg, var(--grid) 1px, transparent 1px);
  background-size: 64px 64px;
  content: "";
  mask-image: linear-gradient(to bottom, black, rgba(0, 0, 0, 0.4) 60%, transparent);
}

body::after {
  position: fixed;
  inset: 0;
  z-index: 20;
  pointer-events: none;
  background: repeating-linear-gradient(to bottom, transparent 0 3px, rgba(0, 0, 0, 0.08) 4px);
  content: "";
  opacity: 0.34;
}

::selection { color: var(--background); background: var(--cyan); }

img { display: block; max-width: 100%; height: auto; }
a { color: inherit; }
button, input { font: inherit; }
button { color: inherit; }

:focus-visible {
  outline: 2px solid var(--amber);
  outline-offset: 4px;
}

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

.skip-link {
  position: fixed;
  top: 1rem;
  left: 1rem;
  z-index: 1000;
  padding: 0.7rem 1rem;
  color: var(--background);
  background: var(--cyan);
  font-family: var(--font-mono);
  font-size: 0.8rem;
  font-weight: 700;
  text-decoration: none;
  transform: translateY(-180%);
}

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

.scroll-progress {
  position: fixed;
  inset: 0 0 auto;
  z-index: 101;
  height: 2px;
  background: rgba(50, 245, 255, 0.05);
}

.scroll-progress span {
  display: block;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, var(--cyan), var(--magenta));
  box-shadow: 0 0 12px var(--cyan);
  transform: scaleX(0);
  transform-origin: left;
}

.cursor-glow {
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background: radial-gradient(320px circle at var(--cursor-x) var(--cursor-y), rgba(50, 245, 255, 0.05), transparent 70%);
}

.section-shell {
  width: min(calc(100% - 48px), var(--max-width));
  margin-inline: auto;
}

.panel {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background:
    linear-gradient(135deg, rgba(50, 245, 255, 0.025), transparent 36%),
    var(--panel);
  box-shadow: inset 0 1px rgba(255, 255, 255, 0.025), 0 24px 70px rgba(0, 0, 0, 0.16);
  backdrop-filter: blur(14px);
}

.site-header {
  position: fixed;
  inset: 0 0 auto;
  z-index: 100;
  display: grid;
  grid-template-columns: minmax(225px, auto) 1fr auto;
  align-items: center;
  min-height: var(--header-height);
  padding: 0 2.5vw;
  border-bottom: 1px solid var(--border);
  background: rgba(5, 7, 13, 0.82);
  box-shadow: 0 8px 40px rgba(0, 0, 0, 0.22);
  backdrop-filter: blur(18px);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.8rem;
  width: fit-content;
  text-decoration: none;
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border: 1px solid var(--border-strong);
  color: var(--cyan);
  font-family: var(--font-mono);
  font-size: 0.78rem;
  font-weight: 800;
  box-shadow: inset 0 0 18px rgba(50, 245, 255, 0.06);
  clip-path: polygon(0 0, 78% 0, 100% 22%, 100% 100%, 22% 100%, 0 78%);
}

.brand-copy { display: grid; line-height: 1.1; }
.brand-copy strong { font-family: var(--font-mono); font-size: 0.73rem; letter-spacing: 0.1em; }
.brand-copy small { margin-top: 0.38rem; color: var(--text-dim); font-family: var(--font-mono); font-size: 0.55rem; letter-spacing: 0.13em; }

.site-nav {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: clamp(0.6rem, 1.45vw, 1.8rem);
}

.site-nav a {
  position: relative;
  padding-block: 1rem;
  color: var(--text-secondary);
  font-family: var(--font-mono);
  font-size: clamp(0.6rem, 0.7vw, 0.72rem);
  letter-spacing: 0.07em;
  text-decoration: none;
  transition: color 180ms ease;
}

.site-nav a span { color: var(--text-dim); }
.site-nav a::after {
  position: absolute;
  right: 0;
  bottom: 0.55rem;
  left: 0;
  height: 1px;
  background: var(--cyan);
  box-shadow: 0 0 8px var(--cyan);
  content: "";
  transform: scaleX(0);
  transition: transform 180ms ease;
}
.site-nav a:hover, .site-nav a.is-active { color: var(--text-primary); }
.site-nav a.is-active span { color: var(--cyan); }
.site-nav a.is-active::after { transform: scaleX(1); }

.system-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 0.65rem;
  border: 1px solid rgba(77, 255, 154, 0.25);
  border-radius: var(--radius-sm);
  color: var(--green);
  background: rgba(77, 255, 154, 0.045);
  font-family: var(--font-mono);
  font-size: 0.62rem;
  letter-spacing: 0.06em;
  cursor: pointer;
}

kbd {
  padding: 0.14rem 0.3rem;
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 3px;
  color: var(--text-secondary);
  background: rgba(255, 255, 255, 0.04);
  font-family: var(--font-mono);
  font-size: 0.56rem;
}

.status-dot {
  display: inline-block;
  width: 6px;
  height: 6px;
  flex: 0 0 auto;
  border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 8px var(--green);
  animation: status-pulse 2.2s ease-in-out infinite;
}

.menu-toggle { display: none; }

.hero {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1.04fr) minmax(360px, 0.78fr);
  gap: clamp(3rem, 7vw, 7rem);
  align-items: center;
  min-height: 100svh;
  padding-top: calc(var(--header-height) + 5rem);
  padding-bottom: 5.5rem;
}

.hero::before {
  position: absolute;
  top: 18%;
  left: -20vw;
  width: 65vw;
  height: 65vw;
  border: 1px solid rgba(50, 245, 255, 0.045);
  border-radius: 50%;
  content: "";
  box-shadow: 0 0 0 80px rgba(50, 245, 255, 0.012), 0 0 0 160px rgba(50, 245, 255, 0.008);
  pointer-events: none;
}

.network-field { position: absolute; inset: var(--header-height) 0 0; z-index: -1; pointer-events: none; opacity: 0.55; }
.network-line { position: absolute; height: 1px; background: linear-gradient(90deg, transparent, rgba(50, 245, 255, 0.3), transparent); transform-origin: left; }
.line-a { top: 23%; left: 41%; width: 28%; transform: rotate(-18deg); }
.line-b { top: 38%; left: 30%; width: 34%; transform: rotate(12deg); }
.line-c { top: 63%; left: 49%; width: 37%; transform: rotate(-32deg); }
.line-d { top: 76%; left: 15%; width: 48%; transform: rotate(8deg); }
.network-node { position: absolute; width: 7px; height: 7px; border: 1px solid var(--cyan); border-radius: 50%; background: var(--background); box-shadow: 0 0 12px var(--cyan); animation: node-pulse 3.5s ease-in-out infinite; }
.node-a { top: 22%; left: 47%; }.node-b { top: 33%; left: 65%; animation-delay: -1s; }.node-c { top: 54%; left: 54%; animation-delay: -2s; }
.node-d { top: 69%; left: 80%; animation-delay: -0.5s; }.node-e { top: 73%; left: 23%; animation-delay: -2.5s; }.node-f { top: 82%; left: 62%; animation-delay: -1.5s; }

.eyebrow {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin: 0 0 1.35rem;
  color: var(--cyan-muted);
  font-family: var(--font-mono);
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.18em;
}
.eyebrow span { color: var(--magenta); }
.eyebrow i { display: block; width: 60px; height: 1px; background: linear-gradient(90deg, var(--cyan), transparent); }

.hero h1, .section-header h2, .contact-copy h2 {
  margin: 0;
  font-family: var(--font-mono);
  line-height: 0.9;
  letter-spacing: -0.07em;
}

.hero h1 { font-size: clamp(4.2rem, 8.3vw, 8.8rem); text-shadow: 0 0 50px rgba(50, 245, 255, 0.08); }
.hero-name-line { display: block; width: fit-content; }
.hero h1 .hero-name-solid { color: var(--text-primary); }
.hero h1 .hero-name-outline { color: transparent; -webkit-text-stroke: 1px var(--cyan-muted); text-shadow: 0 0 28px rgba(50, 245, 255, 0.12); }
.motion-char { display: inline-block; will-change: transform, opacity, filter; }

.role-line { display: flex; align-items: center; gap: 0.75rem; min-height: 2rem; margin-top: 1.65rem; font-family: var(--font-mono); font-size: clamp(0.83rem, 1.2vw, 1.02rem); }
.role-primary { color: var(--text-primary); font-weight: 700; }
.role-divider { color: var(--magenta); }
.role-rotator { position: relative; min-width: 13rem; color: var(--cyan); }
.role-rotator::after { display: inline-block; width: 0.5rem; height: 1em; margin-left: 0.25rem; background: var(--cyan); content: ""; vertical-align: -0.15em; animation: cursor-blink 1s steps(2, end) infinite; }

.hero-intro { max-width: 700px; margin: 1.6rem 0 0; color: var(--text-secondary); font-size: clamp(1rem, 1.35vw, 1.14rem); line-height: 1.8; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 0.8rem; margin-top: 2rem; }

.button {
  --magnetic-x: 0px;
  --magnetic-y: 0px;
  --button-lift: 0px;
  display: inline-flex;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
  min-width: 192px;
  padding: 0.86rem 1.1rem;
  border: 1px solid transparent;
  border-radius: var(--radius-sm);
  font-family: var(--font-mono);
  font-size: 0.7rem;
  font-weight: 800;
  letter-spacing: 0.09em;
  text-decoration: none;
  text-transform: uppercase;
  transform: translate3d(var(--magnetic-x), calc(var(--magnetic-y) - var(--button-lift)), 0);
  transition: transform 320ms cubic-bezier(0.16, 1.4, 0.3, 1), box-shadow 180ms ease, background 180ms ease;
  will-change: transform;
}
.button:hover { --button-lift: 2px; }
.button-primary { color: var(--background); background: var(--cyan); box-shadow: 0 0 24px rgba(50, 245, 255, 0.12); }
.button-primary:hover { box-shadow: 0 0 35px rgba(50, 245, 255, 0.26); }
.button-secondary { border-color: var(--border-strong); color: var(--cyan); background: rgba(50, 245, 255, 0.035); }
.button-secondary:hover { background: rgba(50, 245, 255, 0.09); }

.status-readout { display: grid; gap: 0.38rem; width: min(100%, 620px); margin: 2rem 0 0; padding: 1.15rem 1.25rem; border-left: 2px solid var(--cyan); background: linear-gradient(90deg, rgba(50, 245, 255, 0.055), transparent); font-family: var(--font-mono); }
.status-readout div { display: grid; grid-template-columns: 95px 1fr; gap: 1rem; }
.status-readout dt { color: var(--text-dim); font-size: 0.59rem; letter-spacing: 0.08em; }
.status-readout dd { display: flex; align-items: center; gap: 0.5rem; margin: 0; color: var(--text-secondary); font-size: 0.62rem; letter-spacing: 0.05em; }

.hero-visual { position: relative; justify-self: end; width: min(100%, 480px); }
.portrait-frame { --tilt-x: 0deg; --tilt-y: 0deg; position: relative; padding: 10px; border: 1px solid var(--border-strong); border-radius: var(--radius); background: rgba(5, 7, 13, 0.84); box-shadow: 0 0 80px rgba(50, 245, 255, 0.07), 0 35px 85px rgba(0, 0, 0, 0.38); clip-path: polygon(0 0, calc(100% - 34px) 0, 100% 34px, 100% 100%, 34px 100%, 0 calc(100% - 34px)); transform: perspective(1100px) rotateX(var(--tilt-x)) rotateY(var(--tilt-y)); transform-style: preserve-3d; transition: transform 500ms cubic-bezier(0.16, 1.25, 0.3, 1); will-change: transform; }
.portrait-frame::before { position: absolute; inset: 10px; z-index: 1; border: 1px solid rgba(255, 255, 255, 0.06); content: ""; pointer-events: none; }
.portrait-frame img { width: 100%; aspect-ratio: 3 / 4; border-radius: calc(var(--radius) - 3px); object-fit: cover; object-position: center 42%; filter: saturate(0.82) contrast(1.04) brightness(0.82); }
.portrait-frame::after { position: absolute; inset: 10px; z-index: 1; background: linear-gradient(to top, rgba(5, 7, 13, 0.9), transparent 36%), linear-gradient(135deg, rgba(50, 245, 255, 0.06), transparent 42%, rgba(229, 72, 255, 0.055)); content: ""; pointer-events: none; }
.portrait-meta { position: absolute; z-index: 3; display: flex; justify-content: space-between; color: var(--cyan); font-family: var(--font-mono); font-size: 0.55rem; letter-spacing: 0.11em; }
.portrait-meta-top { top: 1.45rem; right: 1.5rem; left: 1.5rem; }
.portrait-scan { position: absolute; z-index: 2; right: 10px; left: 10px; height: 1px; background: linear-gradient(90deg, transparent, var(--cyan), transparent); box-shadow: 0 0 14px var(--cyan); animation: portrait-scan 7s ease-in-out infinite; opacity: 0.48; }
.portrait-corners::before, .portrait-corners::after { position: absolute; z-index: 4; width: 38px; height: 38px; border-color: var(--magenta); content: ""; }
.portrait-corners::before { top: 5px; right: 5px; border-top: 2px solid; border-right: 2px solid; }
.portrait-corners::after { bottom: 5px; left: 5px; border-bottom: 2px solid; border-left: 2px solid; }
.portrait-tag { position: absolute; z-index: 4; right: 1.5rem; bottom: 1.5rem; left: 1.5rem; display: flex; align-items: flex-end; justify-content: space-between; gap: 1rem; font-family: var(--font-mono); }
.portrait-tag span { color: var(--cyan); font-size: 0.65rem; font-weight: 700; letter-spacing: 0.08em; }
.portrait-tag strong { color: var(--text-secondary); font-size: 0.52rem; font-weight: 500; letter-spacing: 0.06em; }

.signal-panel { position: absolute; right: -2rem; bottom: 15%; z-index: 5; display: flex; align-items: flex-end; gap: 4px; height: 86px; padding: 0.65rem 0.75rem; border: 1px solid var(--border); border-radius: 4px; background: rgba(5, 7, 13, 0.93); box-shadow: 0 16px 30px rgba(0, 0, 0, 0.4); font-family: var(--font-mono); }
.signal-panel > span { position: absolute; top: 0.45rem; left: 0.7rem; color: var(--text-dim); font-size: 0.48rem; }
.signal-panel i { display: block; width: 4px; height: var(--h); background: linear-gradient(var(--cyan), rgba(50, 245, 255, 0.2)); }
.signal-panel b { margin-left: 0.45rem; color: var(--green); font-size: 0.48rem; font-weight: 600; }

.hero-footer { position: absolute; right: 0; bottom: 1.3rem; left: 0; display: flex; justify-content: space-between; color: var(--text-dim); font-family: var(--font-mono); font-size: 0.52rem; letter-spacing: 0.1em; }
.hero-footer span:nth-child(2)::before { display: inline-block; width: 1px; height: 28px; margin-right: 0.8rem; background: linear-gradient(transparent, var(--cyan)); content: ""; vertical-align: middle; }

.section { position: relative; padding-block: var(--space-8); }
.section::before { position: absolute; top: 0; right: 0; left: 0; height: 1px; background: linear-gradient(90deg, transparent, var(--border), transparent); content: ""; }
.section-header { display: flex; align-items: flex-end; justify-content: space-between; gap: 2rem; margin-bottom: 3rem; }
.section-header .eyebrow { margin-bottom: 1rem; }
.section-header h2, .contact-copy h2 { font-size: clamp(2.7rem, 5.3vw, 5.6rem); }
.section-header h2 em, .contact-copy h2 em { color: transparent; font-style: normal; -webkit-text-stroke: 1px var(--cyan-muted); }
.section-header > p { max-width: 330px; margin: 0 0 0.45rem; padding-left: 1rem; border-left: 1px solid var(--magenta); color: var(--text-secondary); font-size: 0.9rem; }

.profile-grid { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(330px, 0.75fr); gap: 1rem; }
.profile-story { padding: clamp(1.5rem, 3vw, 3rem); }
.terminal-label { display: flex; justify-content: space-between; margin: 0 0 2rem; padding-bottom: 0.85rem; border-bottom: 1px solid var(--border); color: var(--cyan); font-family: var(--font-mono); font-size: 0.62rem; letter-spacing: 0.08em; }
.terminal-label span { color: var(--text-dim); }
.profile-story > p:not(.terminal-label) { max-width: 790px; color: var(--text-secondary); }
.profile-story .profile-lead { margin-top: 0; color: var(--text-primary); font-size: clamp(1.25rem, 2vw, 1.7rem); line-height: 1.45; }
.profile-lead strong { color: var(--cyan-muted); }

.terminal { overflow: hidden; }
.terminal-bar { display: flex; align-items: center; gap: 0.4rem; padding: 0.8rem 1rem; border-bottom: 1px solid var(--border); background: rgba(5, 7, 13, 0.7); }
.terminal-bar span { width: 8px; height: 8px; border-radius: 50%; background: var(--text-dim); }
.terminal-bar span:first-child { background: var(--magenta); }.terminal-bar span:nth-child(2) { background: var(--amber); }.terminal-bar span:nth-child(3) { background: var(--green); }
.terminal-bar b { margin-left: auto; color: var(--text-dim); font-family: var(--font-mono); font-size: 0.58rem; font-weight: 500; }
.terminal-body { padding: clamp(1.4rem, 3vw, 2.5rem); color: var(--text-secondary); font-family: var(--font-mono); font-size: 0.72rem; line-height: 1.85; }
.terminal-body p { margin: 0 0 1.3rem; }.terminal-body p > span { color: var(--magenta); }
.terminal-body .terminal-output { margin: -1rem 0 1.8rem; padding-left: 1rem; border-left: 1px solid var(--border); color: var(--cyan-muted); }
.terminal-body .terminal-success { color: var(--green); }
.terminal-success i { display: inline-block; width: 0.45rem; height: 0.85rem; margin-left: 0.4rem; background: var(--green); vertical-align: middle; animation: cursor-blink 1s steps(2, end) infinite; }

.stats-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1px; margin-top: 1rem; border: 1px solid var(--border); border-radius: var(--radius); background: var(--border); overflow: hidden; }
.stats-grid > div { min-width: 0; padding: 1.5rem; background: var(--panel-strong); }
.stats-grid strong { color: var(--text-primary); font-family: var(--font-mono); font-size: clamp(1.6rem, 3vw, 2.7rem); letter-spacing: -0.08em; }
.stats-grid span { margin-left: 0.4rem; color: var(--cyan); font-family: var(--font-mono); font-size: 0.58rem; }
.stats-grid p { margin: 0.4rem 0 0; color: var(--text-dim); font-family: var(--font-mono); font-size: 0.6rem; letter-spacing: 0.08em; }

.mission-log { max-width: 1100px; margin-inline: auto; }
.mission { display: grid; grid-template-columns: 54px 1fr; gap: 1rem; }
.mission + .mission { margin-top: 1.25rem; }
.mission-rail { position: relative; display: flex; flex-direction: column; align-items: center; }
.mission-rail span { display: grid; place-items: center; width: 38px; height: 38px; border: 1px solid var(--border-strong); border-radius: 50%; color: var(--cyan); background: var(--background); font-family: var(--font-mono); font-size: 0.62rem; box-shadow: 0 0 20px rgba(50, 245, 255, 0.08); }
.mission-rail i { width: 1px; flex: 1; margin-top: 0.75rem; background: linear-gradient(var(--border-strong), transparent); }
.mission-card { padding: clamp(1.5rem, 3.5vw, 3rem); }
.mission-card header { display: flex; justify-content: space-between; gap: 2rem; padding-bottom: 1.5rem; border-bottom: 1px solid var(--border); }
.mission-date { margin: 0 0 0.6rem; color: var(--cyan); font-family: var(--font-mono); font-size: 0.66rem; letter-spacing: 0.1em; }
.live-pill { display: inline-flex; align-items: center; margin-left: 0.5rem; padding: 0.15rem 0.4rem; border: 1px solid rgba(77, 255, 154, 0.25); border-radius: 99px; color: var(--green); font-size: 0.52rem; }
.mission-card h3 { margin: 0; font-family: var(--font-mono); font-size: clamp(1.35rem, 2.3vw, 2rem); letter-spacing: -0.04em; }
.company { margin: 0.4rem 0 0; color: var(--text-secondary); font-size: 0.85rem; }
.mission-location { flex: 0 0 auto; padding-left: 1.4rem; border-left: 1px solid var(--magenta); color: var(--text-dim); font-family: var(--font-mono); font-size: 0.59rem; line-height: 1.7; text-align: right; }
.mission-summary { max-width: 900px; margin: 1.5rem 0; color: var(--text-secondary); font-size: 0.98rem; }
.mission-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0.65rem 2rem; margin: 0; padding: 0; list-style: none; }
.mission-list li { position: relative; padding-left: 1.1rem; color: var(--text-secondary); font-size: 0.82rem; }
.mission-list li::before { position: absolute; top: 0.71rem; left: 0; width: 5px; height: 5px; border: 1px solid var(--cyan); content: ""; transform: rotate(45deg); }

.capability-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1rem; }
.capability-card { padding: 1.5rem; transition: border-color 180ms ease, transform 180ms ease, background 180ms ease; }
.capability-card:hover { border-color: var(--border-strong); background-color: rgba(13, 23, 39, 0.9); transform: translateY(-3px); }
.capability-card header { display: flex; align-items: center; gap: 0.85rem; margin-bottom: 1.5rem; padding-bottom: 1.2rem; border-bottom: 1px solid var(--border); }
.capability-card header > span { display: grid; place-items: center; width: 42px; height: 42px; border: 1px solid var(--border-strong); color: var(--cyan); background: rgba(50, 245, 255, 0.04); font-family: var(--font-mono); font-size: 0.63rem; }
.capability-card h3 { margin: 0; font-family: var(--font-mono); font-size: 0.95rem; }
.capability-card header p { margin: 0.25rem 0 0; color: var(--green); font-family: var(--font-mono); font-size: 0.5rem; letter-spacing: 0.1em; }
.capability-card ul { display: flex; flex-wrap: wrap; gap: 0.5rem; margin: 0; padding: 0; list-style: none; }
.capability-card li, .tech-list li { padding: 0.38rem 0.52rem; border: 1px solid rgba(141, 165, 179, 0.13); border-radius: 3px; color: var(--text-secondary); background: rgba(255, 255, 255, 0.018); font-family: var(--font-mono); font-size: 0.58rem; line-height: 1.3; }
.capability-aws header > span { border-color: rgba(255, 191, 71, 0.4); color: var(--amber); background: rgba(255, 191, 71, 0.05); }
.capability-aws header p { color: var(--amber); }
.capability-ai { grid-column: span 2; }
.capability-ai header { max-width: 420px; }

.projects-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1rem; }
.project-card { position: relative; display: flex; flex-direction: column; min-height: 420px; padding: 1.5rem; overflow: hidden; transition: border-color 200ms ease, transform 200ms ease, box-shadow 200ms ease; }
.project-card::before { position: absolute; top: 0; left: 0; width: 0; height: 2px; background: linear-gradient(90deg, var(--cyan), var(--magenta)); content: ""; transition: width 240ms ease; }
.project-card:hover { border-color: var(--border-strong); box-shadow: 0 26px 60px rgba(0, 0, 0, 0.3), inset 0 0 60px rgba(50, 245, 255, 0.02); transform: translateY(-4px); }
.project-card:hover::before { width: 100%; }
.project-card > header { display: flex; justify-content: space-between; gap: 1rem; padding-bottom: 1rem; border-bottom: 1px solid var(--border); color: var(--text-dim); font-family: var(--font-mono); font-size: 0.55rem; letter-spacing: 0.08em; }
.project-status { display: inline-flex; align-items: center; gap: 0.4rem; }.project-status i { width: 5px; height: 5px; border-radius: 50%; background: currentColor; box-shadow: 0 0 6px currentColor; }
.status-live { color: var(--green); }.status-build { color: var(--cyan); }.status-plan { color: var(--amber); }.status-review { color: var(--magenta); }
.project-card > div { display: grid; grid-template-columns: auto 1fr; gap: 1.1rem; margin-top: 1.5rem; }
.project-index { margin: 0; color: rgba(50, 245, 255, 0.28); font-family: var(--font-mono); font-size: 2rem; line-height: 1; }
.project-card h3 { margin: 0 0 0.8rem; font-family: var(--font-mono); font-size: clamp(1.15rem, 2vw, 1.55rem); line-height: 1.25; letter-spacing: -0.035em; }
.project-card div > p:last-child { margin: 0; color: var(--text-secondary); font-size: 0.87rem; }
.tech-list { display: flex; flex-wrap: wrap; gap: 0.4rem; margin: auto 0 0; padding: 1.5rem 0 0 3.1rem; list-style: none; }
.project-card footer { display: flex; gap: 1.5rem; margin: 1.5rem 0 0 3.1rem; padding-top: 1rem; border-top: 1px solid var(--border); }
.project-card footer a { color: var(--text-secondary); font-family: var(--font-mono); font-size: 0.6rem; text-decoration-color: var(--border-strong); text-underline-offset: 4px; }.project-card footer a:hover { color: var(--cyan); }
.project-card footer a span { color: var(--amber); }
.project-wide { grid-column: 1 / -1; min-height: 330px; }

.roadmap-section { overflow: hidden; }
.roadmap-intro { max-width: 760px; margin: -1.2rem 0 3rem; color: var(--text-secondary); }
.roadmap-tree { position: relative; }
.roadmap-root { position: relative; z-index: 1; display: grid; place-items: center; width: min(100%, 430px); margin-inline: auto; padding: 1.5rem; border: 1px solid var(--border-strong); background: var(--panel-strong); box-shadow: 0 0 44px rgba(50, 245, 255, 0.05); text-align: center; }
.roadmap-root::after { position: absolute; top: 100%; left: 50%; width: 1px; height: 3rem; background: var(--border-strong); content: ""; }
.roadmap-root span, .roadmap-root small { color: var(--text-dim); font-family: var(--font-mono); font-size: 0.52rem; letter-spacing: 0.1em; }
.roadmap-root strong { margin: 0.35rem 0; color: var(--cyan); font-family: var(--font-mono); font-size: 0.92rem; }
.roadmap-branches { position: relative; display: grid; grid-template-columns: repeat(4, 1fr); gap: 0.75rem; padding-top: 3rem; }
.roadmap-branches::before { position: absolute; top: 3rem; right: 12.5%; left: 12.5%; height: 1px; background: var(--border-strong); content: ""; }
.roadmap-branches article { position: relative; min-height: 150px; padding: 1.2rem; border: 1px solid var(--border); background: var(--panel); }
.roadmap-branches article::before { position: absolute; bottom: 100%; left: 50%; width: 1px; height: 1.1rem; background: var(--border-strong); content: ""; }
.roadmap-branches article:nth-child(n+5) { grid-column: span 1; transform: translateX(50%); }
.roadmap-branches span { color: var(--text-dim); font-family: var(--font-mono); font-size: 0.5rem; letter-spacing: 0.07em; }
.roadmap-branches h3 { margin: 1rem 0 1.3rem; font-family: var(--font-mono); font-size: 0.83rem; line-height: 1.4; }
.roadmap-branches p { margin: 0; color: var(--green); font-family: var(--font-mono); font-size: 0.53rem; letter-spacing: 0.08em; }

.principles-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0; margin: 0; padding: 0; border: 1px solid var(--border); border-radius: var(--radius); list-style: none; overflow: hidden; }
.principles-grid li { min-height: 240px; padding: 1.8rem; border-right: 1px solid var(--border); border-bottom: 1px solid var(--border); background: rgba(9, 15, 27, 0.72); }
.principles-grid li:nth-child(3n) { border-right: 0; }.principles-grid li:nth-last-child(-n+3) { border-bottom: 0; }
.principles-grid span { color: var(--magenta); font-family: var(--font-mono); font-size: 0.58rem; }
.principles-grid h3 { margin: 2.2rem 0 0.7rem; font-family: var(--font-mono); font-size: 1rem; text-transform: uppercase; }
.principles-grid p { margin: 0; color: var(--text-secondary); font-size: 0.83rem; }

.contact-section { padding-bottom: var(--space-8); }
.contact-panel { display: grid; grid-template-columns: minmax(0, 1fr) minmax(360px, 0.78fr); overflow: hidden; }
.contact-copy { padding: clamp(2rem, 5vw, 5rem); background: radial-gradient(circle at 20% 85%, rgba(229, 72, 255, 0.07), transparent 40%); }
.contact-copy .eyebrow { margin-bottom: 1rem; }
.contact-copy > p:not(.eyebrow) { max-width: 600px; margin: 2rem 0; color: var(--text-secondary); font-size: 1.05rem; }
.contact-copy .button { margin: 0.4rem 0.5rem 0.4rem 0; }
.contact-directory { padding: clamp(2rem, 4vw, 3.5rem); border-left: 1px solid var(--border); background: rgba(5, 7, 13, 0.48); }
.contact-directory > a { display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 0.2rem 1rem; padding: 1.1rem 0; border-bottom: 1px solid var(--border); text-decoration: none; }
.contact-directory > a span { display: flex; align-items: center; gap: 0.5rem; color: var(--cyan); font-family: var(--font-mono); font-size: 0.58rem; letter-spacing: 0.08em; }
.contact-directory > a small { color: var(--amber); font-size: 0.44rem; }.contact-directory > a strong { overflow-wrap: anywhere; color: var(--text-secondary); font-family: var(--font-mono); font-size: 0.68rem; font-weight: 500; }.contact-directory > a i { grid-row: 1 / span 2; grid-column: 2; color: var(--text-dim); font-style: normal; }
.contact-directory > a:hover strong, .contact-directory > a:hover i { color: var(--text-primary); }
.contact-location { display: flex; align-items: center; gap: 0.8rem; margin-top: 2rem; padding: 1rem; border: 1px solid rgba(77, 255, 154, 0.15); background: rgba(77, 255, 154, 0.03); }
.contact-location div { display: grid; }.contact-location small { color: var(--text-dim); font-family: var(--font-mono); font-size: 0.48rem; }.contact-location strong { color: var(--text-secondary); font-size: 0.78rem; }

.site-footer { display: grid; grid-template-columns: 1fr auto 1fr; gap: 2rem; align-items: center; padding-block: 2rem; border-top: 1px solid var(--border); color: var(--text-dim); font-family: var(--font-mono); font-size: 0.56rem; }
.site-footer > div { display: grid; }.site-footer > div:first-child strong { color: var(--text-secondary); font-size: 0.62rem; }.site-footer > div:last-child { display: flex; align-items: center; justify-content: flex-end; gap: 1rem; }.site-footer p { margin: 0; text-align: center; }
.footer-command { padding: 0; border: 0; color: var(--cyan-muted); background: transparent; font-family: var(--font-mono); font-size: 0.55rem; cursor: pointer; }

.command-palette { width: min(calc(100% - 2rem), 650px); padding: 0; border: 1px solid var(--border-strong); border-radius: var(--radius); color: var(--text-primary); background: transparent; box-shadow: 0 30px 100px rgba(0, 0, 0, 0.75), 0 0 60px rgba(50, 245, 255, 0.08); }
.command-palette[open] { position: fixed; inset: 0; z-index: 400; display: block; max-height: min(760px, calc(100svh - 2rem)); margin: auto; }
.palette-open { overflow: hidden; }
.command-palette::backdrop { background: rgba(2, 4, 9, 0.82); backdrop-filter: blur(8px); }
.command-shell { padding: 1rem; background: var(--panel-strong); }
.command-shell > header { display: flex; justify-content: space-between; align-items: center; padding: 0.4rem 0.3rem 1rem; border-bottom: 1px solid var(--border); }
.command-shell > header div { display: flex; align-items: center; gap: 0.6rem; }.command-shell > header strong { font-family: var(--font-mono); font-size: 0.64rem; letter-spacing: 0.1em; }.command-shell > header button { padding: 0.3rem 0.45rem; border: 1px solid var(--border); color: var(--text-secondary); background: transparent; font-family: var(--font-mono); font-size: 0.55rem; cursor: pointer; }
.command-shell label { display: block; margin: 1rem 0 0.35rem; color: var(--text-dim); font-family: var(--font-mono); font-size: 0.5rem; letter-spacing: 0.1em; }
.command-shell input { width: 100%; padding: 0.9rem 1rem; border: 1px solid var(--border); border-radius: 3px; outline: 0; color: var(--text-primary); background: rgba(5, 7, 13, 0.8); font-family: var(--font-mono); font-size: 0.8rem; }
.command-shell input:focus { border-color: var(--cyan); box-shadow: 0 0 0 3px rgba(50, 245, 255, 0.08); }
.command-list { margin-top: 0.7rem; }
.command-list a { display: grid; grid-template-columns: 34px 1fr auto; align-items: center; padding: 0.75rem; border-radius: 3px; text-decoration: none; }.command-list a:hover, .command-list a:focus { color: var(--cyan); background: rgba(50, 245, 255, 0.07); outline: 0; }.command-list a > span { color: var(--text-dim); font-family: var(--font-mono); font-size: 0.58rem; }.command-list a > strong { font-family: var(--font-mono); font-size: 0.68rem; letter-spacing: 0.06em; }
.command-shell > footer { display: flex; gap: 1rem; margin-top: 0.7rem; padding: 0.8rem 0.3rem 0; border-top: 1px solid var(--border); color: var(--text-dim); font-family: var(--font-mono); font-size: 0.5rem; }

.js .reveal { opacity: 0; transform: translateY(22px) scale(0.985); transition: opacity 700ms ease, transform 760ms cubic-bezier(0.16, 1, 0.3, 1); transition-delay: var(--reveal-delay, 0ms); }
.js .reveal.is-visible { opacity: 1; transform: translateY(0); }
.js .hero-copy .motion-char { opacity: 0; filter: blur(7px); transform: translateY(0.65em) rotate(2deg); transition: opacity 420ms ease, filter 560ms ease, transform 720ms cubic-bezier(0.16, 1.45, 0.3, 1); transition-delay: calc(90ms + (var(--char-index) * 42ms)); }
.js .hero-copy.is-visible .motion-char { opacity: 1; filter: blur(0); transform: translateY(0) rotate(0); }
.js .capability-card li, .js .project-card .tech-list li { opacity: 0; transform: translateY(7px) scale(0.96); transition: opacity 360ms ease, transform 520ms cubic-bezier(0.16, 1.35, 0.3, 1), border-color 180ms ease; transition-delay: calc(190ms + (var(--item-index) * 42ms)); }
.js .capability-card.is-visible li, .js .project-card.is-visible .tech-list li { opacity: 1; transform: translateY(0) scale(1); }

@keyframes status-pulse { 0%, 100% { opacity: 0.55; } 50% { opacity: 1; box-shadow: 0 0 13px currentColor; } }
@keyframes node-pulse { 0%, 100% { opacity: 0.35; transform: scale(0.8); } 50% { opacity: 1; transform: scale(1.25); } }
@keyframes cursor-blink { 50% { opacity: 0; } }
@keyframes portrait-scan { 0%, 100% { top: 12%; opacity: 0; } 10%, 90% { opacity: 0.4; } 50% { top: 84%; opacity: 0.55; } }

@media (max-width: 1160px) {
  :root { --header-height: 70px; }
  .site-header { grid-template-columns: 1fr auto auto; gap: 1rem; padding-inline: 1.5rem; }
  .menu-toggle { display: grid; place-items: center; gap: 6px; width: 42px; height: 42px; border: 1px solid var(--border); border-radius: 4px; background: rgba(50, 245, 255, 0.035); cursor: pointer; }
  .menu-toggle span:not(.sr-only) { display: block; width: 18px; height: 1px; background: var(--cyan); transition: transform 180ms ease; }
  .menu-toggle[aria-expanded="true"] span:nth-last-child(2) { transform: translateY(3.5px) rotate(45deg); }.menu-toggle[aria-expanded="true"] span:last-child { transform: translateY(-3.5px) rotate(-45deg); }
  .site-nav { grid-column: 1 / -1; flex-wrap: wrap; gap: 0.4rem 1.5rem; justify-content: flex-start; width: 100%; padding: 0.4rem 0 1rem; }
  .js .site-nav { position: absolute; top: 100%; right: 0; left: 0; display: none; padding: 1.5rem; border-bottom: 1px solid var(--border); background: rgba(5, 7, 13, 0.97); box-shadow: 0 30px 50px rgba(0, 0, 0, 0.4); }
  .js .site-nav.is-open { display: flex; }
  .site-nav a { font-size: 0.68rem; }
  .hero { grid-template-columns: minmax(0, 1fr) minmax(320px, 0.7fr); gap: 3rem; }
  .capability-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .capability-ai { grid-column: span 1; }
  .roadmap-branches { grid-template-columns: repeat(3, 1fr); }.roadmap-branches::before { display: none; }.roadmap-branches article::before { display: none; }.roadmap-branches article:nth-child(n+5) { transform: none; }
}

@media (max-width: 860px) {
  :root { --space-8: 5rem; }
  .section-shell { width: min(calc(100% - 32px), var(--max-width)); }
  .hero { grid-template-columns: 1fr; padding-top: calc(var(--header-height) + 4rem); }
  .hero-copy { max-width: 720px; }
  .hero-visual { justify-self: center; width: min(100%, 520px); }
  .hero-footer { display: none; }
  .profile-grid, .contact-panel { grid-template-columns: 1fr; }
  .contact-directory { border-top: 1px solid var(--border); border-left: 0; }
  .stats-grid { grid-template-columns: repeat(2, 1fr); }
  .mission-list { grid-template-columns: 1fr; }
  .principles-grid { grid-template-columns: repeat(2, 1fr); }
  .principles-grid li:nth-child(3n) { border-right: 1px solid var(--border); }.principles-grid li:nth-child(2n) { border-right: 0; }.principles-grid li:nth-last-child(-n+3) { border-bottom: 1px solid var(--border); }.principles-grid li:nth-last-child(-n+2) { border-bottom: 0; }
  .site-footer { grid-template-columns: 1fr; text-align: center; }.site-footer > div { justify-items: center; }.site-footer > div:last-child { justify-content: center; }
}

@media (max-width: 640px) {
  :root { --space-8: 4rem; }
  body { font-size: 0.94rem; }
  .site-header { padding-inline: 1rem; }
  .brand-copy { display: none; }
  .system-badge { padding-inline: 0.55rem; font-size: 0; }.system-badge::after { color: var(--green); font-size: 0.58rem; content: "ONLINE"; }.system-badge kbd { display: none; }
  .site-nav { flex-direction: column; align-items: stretch; }.site-nav a { padding: 0.75rem 0; font-size: 0.73rem; }
  .section-header { display: block; }.section-header > p { margin-top: 1.3rem; }
  .hero h1 { font-size: clamp(3.4rem, 19vw, 5.2rem); }
  .role-line { flex-wrap: wrap; gap: 0.35rem 0.6rem; }.role-rotator { min-width: 100%; }
  .hero-actions { display: grid; grid-template-columns: 1fr; }.button { width: 100%; }
  .status-readout { padding: 1rem; }.status-readout div { grid-template-columns: 78px 1fr; gap: 0.5rem; }.status-readout dt, .status-readout dd { font-size: 0.53rem; }
  .signal-panel { right: -0.5rem; }
  .stats-grid, .capability-grid, .projects-grid, .roadmap-branches, .principles-grid { grid-template-columns: 1fr; }
  .stats-grid > div { padding: 1.2rem; }
  .mission { grid-template-columns: 34px 1fr; gap: 0.6rem; }.mission-rail span { width: 30px; height: 30px; }.mission-card { padding: 1.2rem; }.mission-card header { display: block; }.mission-location { margin-top: 1rem; padding: 0.6rem 0 0; border-top: 1px solid var(--border); border-left: 0; text-align: left; }
  .project-card, .project-wide { grid-column: auto; min-height: 0; }.project-card > div { grid-template-columns: 1fr; }.project-index { font-size: 1.3rem; }.tech-list, .project-card footer { margin-left: 0; padding-left: 0; }
  .roadmap-root::after { display: none; }.roadmap-branches { padding-top: 1rem; }
  .principles-grid li, .principles-grid li:nth-child(3n), .principles-grid li:nth-child(2n), .principles-grid li:nth-last-child(-n+3) { min-height: 0; border-right: 0; border-bottom: 1px solid var(--border); }.principles-grid li:last-child { border-bottom: 0; }
  .principles-grid h3 { margin-top: 1.2rem; }
  .contact-copy, .contact-directory { padding: 1.5rem; }
  .contact-directory > a { grid-template-columns: 1fr auto; }
  .site-footer > div:last-child { flex-direction: column; }
  .command-shell > footer { justify-content: space-between; gap: 0.3rem; }.command-shell > footer span { font-size: 0.44rem; }
}

@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-duration: 0.01ms !important; }
  .cursor-glow, .portrait-scan { display: none; }
  .js .reveal { opacity: 1; transform: none; }
  .js .hero-copy .motion-char, .js .capability-card li, .js .project-card .tech-list li { opacity: 1; filter: none; transform: none; }
  .button, .portrait-frame { transform: none; }
}

@media (forced-colors: active) {
  .status-dot, .network-node { border: 1px solid currentColor; }
  .hero h1 span, .section-header h2 em, .contact-copy h2 em { color: inherit; -webkit-text-stroke: 0; }
}

@media print {
  .site-header, .network-field, .cursor-glow, .scroll-progress, .command-palette, .hero-footer, .signal-panel { display: none !important; }
  body { color: #111; background: #fff; }
  .section, .hero { min-height: auto; padding: 2rem 0; break-inside: avoid; }
  .panel, .stats-grid { border-color: #aaa; color: #111; background: #fff; box-shadow: none; }
}
