/* Cyber Shinobi: shared materials, typography, and mode tokens. */
:root {
  --bg: #090b0f;
  --surface: #11151b;
  --surface-2: #191e26;
  --text: #f2f3f6;
  --muted: #bcc2cd;
  --faint: #9da5b3;
  --line: #303844;
  --accent: #b9c6d7;
  --accent-strong: #d6e0ef;
  --ember: #7d8da3;
  --ink: #11151b;
  --steel-top: #4b535f;
  --steel-low: #15191f;
  --metal-highlight: #c3cbd7;
  --edge: #9aadc635;
  --halo: #718baa14;
  --glow: #9eb0c619;
  --header-surface: #0d1016f4;
  --art-surface: #151920;
  --art-ground: #0d1016;
  --art-line: #4b586a;
  --scene-line: #91a3bc3c;
  --ease-cut: cubic-bezier(.16, .8, .21, 1);
}
body { font-size: 16px; }
h1, h2, h3, h4 { letter-spacing: -.05em; }
h1, h2 { font-weight: 650; }
.eyebrow { font-size: 11px; letter-spacing: .105em; }
.lead { max-width: 66ch; }
.site-header { background: var(--header-surface); border-color: var(--line); }
.site-footer { background: var(--surface); border-color: var(--line); }
.brand-name { white-space: nowrap; }
.page-intro, .case-intro { position: relative; isolation: isolate; }
.page-intro::before, .case-intro::before {
  content: ""; position: absolute; pointer-events: none; z-index: -1;
  inset: 0 0 0 24%;
  background: radial-gradient(ellipse at 72% 12%, var(--halo), transparent 66%);
}
.page-intro h1, .case-intro h1 { max-width: 19ch; text-wrap: balance; }
.prose, .case-prose { overflow-wrap: break-word; }
.technical-art {
  background: linear-gradient(147deg, var(--art-surface), var(--art-ground));
  border-color: var(--art-line);
  box-shadow: 0 18px 40px #0004;
}
.evidence-strip, .approach-section { background: var(--surface); }
.contact-band { position: relative; isolation: isolate; }
.contact-band::before {
  content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none;
  background: radial-gradient(ellipse at 95% 48%, var(--halo), transparent 59%);
}
:focus-visible { outline-color: var(--accent-strong); outline-offset: 4px; }
@media (max-width:760px) {
  body { font-size: 15px; }
  .js .navigation { background: var(--surface); }
  .page-intro .eyebrow, .case-intro > .eyebrow, .section-heading .eyebrow, .contact-band .eyebrow { font-size: 10px; }
  .section-heading > p, .project-summary > p, .about-teaser p:not(.large-copy):not(.eyebrow),
  .contact-band p:not(.eyebrow), .timeline p:not(.eyebrow), .resume-info p,
  .skill-section p:not(.eyebrow), .case-summary p:not(.eyebrow) { font-size: 14px; }
  .prose { font-size: 15px; }
}

/* The document, components, and decorative layers share a single palette. */
:root[data-chakra="on"] {
  --bg: #0e0b0b;
  --surface: #171110;
  --surface-2: #211614;
  --text: #fff4e8;
  --muted: #ddc3b1;
  --faint: #c2a48e;
  --line: #4e2d22;
  --accent: #ffad72;
  --accent-strong: #ffd29d;
  --ember: #ff7138;
  --steel-top: #765039;
  --steel-low: #2e1b15;
  --metal-highlight: #ffe4bf;
  --edge: #ff9b575e;
  --halo: #f8742b1b;
  --glow: #ff6a2c1e;
  --header-surface: #110d0df7;
  --art-surface: #251914;
  --art-ground: #140e0d;
  --art-line: #b06439;
  --scene-line: #ffab686f;
}
body {
  background-image: radial-gradient(ellipse at 88% 2%, var(--halo), transparent 36rem);
  background-repeat: no-repeat;
}
.chakra-toggle {
  display: none; align-items: center; justify-content: center; gap: 8px;
  flex: none; min-height: 42px; padding: 8px 11px;
  border: 1px solid var(--art-line); border-radius: 6px;
  background: linear-gradient(145deg, var(--surface-2), var(--surface));
  box-shadow: inset 0 1px 0 var(--edge);
  color: var(--text); font: 650 12px/1 var(--sans); white-space: nowrap;
}
[data-chakra-ready] .chakra-toggle { display: inline-flex; }
.chakra-toggle:hover, .chakra-toggle:focus-visible { border-color: var(--accent); }
.chakra-indicator {
  width: 12px; height: 12px; border: 1px solid var(--accent); border-radius: 50%;
  background: var(--steel-low);
  box-shadow: inset 0 0 0 2px var(--surface), 0 0 10px var(--glow);
}
.chakra-state {
  min-width: 3.25ch; text-align: center; color: var(--accent-strong);
  font: 10px/1 var(--mono); text-transform: uppercase;
}
.chakra-toggle[aria-pressed="true"] {
  border-color: var(--accent);
  background: linear-gradient(135deg, #402114, #1d120f 78%);
  box-shadow: inset 0 1px 0 #ffc49266, 0 0 20px #ff74333e;
}
.chakra-toggle[aria-pressed="true"] .chakra-indicator {
  background: var(--accent-strong);
  box-shadow: inset 0 0 0 2px #592b1a, 0 0 11px #ff8b43;
}
.header-tools { gap: 10px; }
.navigation { gap: clamp(14px, 2.1vw, 34px); }
.navigation > a:hover, .navigation > a[aria-current] { color: var(--accent-strong); }
.reading-progress { background: linear-gradient(90deg, var(--ember), var(--accent-strong)); }
.button-primary {
  background: linear-gradient(120deg, #d4dde9, #99a7b9); color: #11151b;
  border-color: #c4cfdc; box-shadow: 0 5px 22px var(--glow);
}
.button-primary:hover { background: linear-gradient(120deg, #edf2fa, #b4c3d8); color: #11151b; }
.button-secondary { background: var(--surface); border-color: var(--art-line); }
.sunrise-text {
  background-image: linear-gradient(107deg, #e2e9f5, #b8c4d4 44%, #8f9daf 85%);
}
.title-stop { color: var(--accent-strong); }
.status-dot, .tiny-dot { box-shadow: 0 0 0 4px var(--halo); }
.evidence-strip, .approach-section, .personal-note, .resume-card, .contact-aside {
  background: linear-gradient(140deg, var(--surface-2), var(--surface) 67%);
}
.contact-aside { border-color: var(--art-line); }
.art-head, .art-foot, .section-label, .timeline .eyebrow, .project-kicker { color: var(--accent-strong); }
.art-head, .art-foot { font-size: clamp(8px, .76vw, 10px); }
.data-layer, .runtime-box { background: var(--surface-2); border-color: var(--art-line); }
.chart-bar { fill: #836350; }
.chart-bar.selected-bar { fill: var(--accent); }
.chart-label { fill: var(--text); }
.chart-value { fill: var(--accent-strong); }
[data-chakra="on"] .button-primary {
  background: linear-gradient(118deg, #ffd19a, #ff9b51 52%, #fa7837);
  color: #21120b; border-color: #ffb17b;
  box-shadow: 0 3px 22px #ff6f3c44, inset 0 1px #ffe9d08a;
}
[data-chakra="on"] .button-primary:hover { background: linear-gradient(118deg, #ffe0ae, #ffad6d 65%, #ff8a4b); }
[data-chakra="on"] .sunrise-text {
  background-image: linear-gradient(107deg, #ffdea6, #ff9d54 41%, #f2753a 88%);
}
[data-chakra="on"] .site-header { box-shadow: 0 7px 20px #0004; }
[data-chakra="on"] .timeline article::before { box-shadow: 0 0 16px var(--ember); }
@media (max-width:960px) { .chakra-boost-word { display: none; } }
@media (max-width:760px) {
  .chakra-toggle, .motion-toggle, .js .menu-toggle { min-height: 44px; }
  .header-tools { gap: 6px; }
  .motion-toggle { min-width: 40px; justify-content: center; }
}
@media (max-width:410px) {
  .chakra-toggle { gap: 5px; padding-inline: 7px; font-size: 11px; }
  .chakra-indicator { width: 9px; height: 9px; }
  .chakra-state { font-size: 9px; }
  .brand-name { font-size: 11px; }
  .brand-name > span, .motion-label { display: none; }
  .header-inner { gap: 7px; }
  .header-tools { gap: 4px; }
  .js .menu-toggle { padding-left: 5px; gap: 5px; }
}
@media (max-width:350px) {
  .chakra-toggle { font-size: 10px; }
  .brand-name { display: none; }
}

/* Profile layout and project evidence. */
.hero-stage {
  background: linear-gradient(112deg, var(--bg) 22%, transparent 67%);
  border-color: var(--line);
}
.hero {
  grid-template-columns: minmax(0, 1.03fr) minmax(0, 1fr);
  min-height: min(700px, 91svh); gap: clamp(24px, 4vw, 68px);
  padding-block: clamp(36px, 6.3vw, 90px);
}
.hero-copy { min-width: 0; }
.hero-title { font-size: clamp(56px, 7.2vw, 105px); font-weight: 700; line-height: .94; }
.hero-title > span { display: block; }
.hero-intro { color: var(--muted); font-size: 15px; }
.hero-discipline { color: var(--accent-strong); font-size: clamp(11px, 1.08vw, 15px); letter-spacing: .19em; }
.hero-description { font-size: clamp(15px, 1.18vw, 18px); max-width: 43ch; line-height: 1.75; }
.hero-actions { display: flex; flex-wrap: wrap; }
.hero-role { color: var(--muted); }
.hero-bottom { font-size: 10px; }
@media (max-width:960px) and (min-width:761px) {
  .hero { gap: 22px; }
  .hero-title { font-size: clamp(53px, 7.2vw, 72px); }
}
@media (max-width:760px) {
  .hero { grid-template-columns: minmax(0,1fr); min-height: 0; gap: 29px; padding-block: 38px 27px; }
  .hero-title { font-size: clamp(47px, 13.3vw, 86px); }
  .hero-intro { margin-top: 22px; }
  .hero .eyebrow { font-size: 10px; }
  .hero-discipline { margin-top: 20px; }
  .hero-description { margin-top: 14px; }
  .hero-actions { gap: 9px; margin-top: 20px; }
  .hero .button { min-height: 47px; }
  .hero-bottom { gap: 14px; font-size: 8px; }
  .hero-bottom a { font-size: 9px; }
}
@media print {
  .profile-panel, .shinobi-horizon, .chakra-toggle { display: none !important; }
  .hero { display: block; min-height: auto; }
  .sunrise-text { background: none; color: #111; }
}

.forge-mark {
  --size: 37px; --relief: 4px;
  display: inline-grid; place-items: center; flex: none; position: relative;
  width: var(--size); height: var(--size); color: var(--metal-highlight);
  border-radius: calc(var(--size) * .22);
  transform-style: preserve-3d;
}
.forge-mark::before, .forge-face {
  content: ""; position: absolute; inset: 0; border-radius: inherit; pointer-events: none;
}
.forge-mark::before {
  background: linear-gradient(130deg, var(--steel-low), #08090b 82%);
  border: 1px solid var(--art-line);
  box-shadow: 0 6px 10px #0007;
  transform: translate3d(0, 3px, -4px);
}
.forge-face {
  background: linear-gradient(122deg, var(--steel-top), var(--steel-low) 53%, var(--art-surface));
  border: 1px solid var(--art-line);
  box-shadow: inset 0 1px 0 var(--edge), inset 0 -2px 0 #0007;
  transform: translateZ(1px);
}
.forge-mark svg {
  grid-area: 1 / 1; position: relative; width: 64%; height: 64%;
}
.forge-mark .forge-depth {
  color: #06070b; transform: translate3d(0, 1.3px, 2px);
}
.forge-mark .forge-glyph {
  transform: translateZ(var(--relief)); filter: drop-shadow(0 1px 1px #0008);
}
.brand-mark { --size: 40px; }
.nav-mark { --size: 21px; margin-right: 7px; }
.navigation > a { display: inline-flex; align-items: center; white-space: nowrap; }
.navigation > a[aria-current] .nav-mark { border-color: var(--accent); color: var(--accent-strong); }
.project-kicker, .case-badge { display: flex; align-items: center; gap: 12px; }
.project-kicker > div { display: grid; gap: 4px; }
.project-kicker > div > span:first-child { font-size: 11px; letter-spacing: .1em; }
.project-kind { font-size: 9px; color: var(--muted); }
.project-mark { --size: 40px; }
.section-notch {
  display: inline-block; flex: none; width: 11px; height: 11px;
  background: linear-gradient(145deg, var(--metal-highlight), var(--steel-top) 65%);
  border: 1px solid var(--accent); transform: rotate(45deg) scale(.8);
  box-shadow: inset 0 0 0 2px var(--steel-low), 0 0 15px var(--glow);
}
.approach-number { display: flex; align-items: center; gap: 14px; }
.approach-mark { --size: 40px; }
.skill-marker { display: flex; gap: 13px; align-items: center; flex-direction: column; align-self: start; }
.skill-mark { --size: clamp(48px, 6.7vw, 88px); --relief: 7px; }
.skill-number { font: 11px/1.25 var(--mono); letter-spacing: .16em; }
.skill-section { grid-template-columns: minmax(65px, .22fr) minmax(0, 1fr); }
.footer-signature { display: flex; align-items: center; gap: 18px; }
.footer-seal { --size: 63px; }
.footer-seal::after {
  content: ""; position: absolute; inset: 4px; border-radius: 50%;
  border: 1px dashed var(--accent); opacity: .44; pointer-events: none; z-index: 2;
}
.layer-icon, .node-icon {
  background: linear-gradient(140deg, var(--steel-top), var(--steel-low) 64%);
  border-color: var(--art-line); color: var(--accent-strong);
  box-shadow: inset 0 1px 0 var(--edge), inset 0 -3px 0 #0004, 0 3px 0 #080709;
}
[data-chakra="on"] .forge-face, [data-chakra="on"] .layer-icon, [data-chakra="on"] .node-icon {
  box-shadow: inset 0 1px 0 #ffe0b879, inset 0 -3px 0 #0008, 0 3px 0 #160a06, 0 0 17px var(--glow);
}
[data-chakra="on"] .section-notch { box-shadow: inset 0 0 0 2px var(--steel-low), 0 0 16px #ff7b3880; }
.technical-art { min-width: 0; }
.technical-art::before {
  content: ""; position: absolute; inset: 0; border-radius: inherit; z-index: -1; pointer-events: none;
  background: repeating-linear-gradient(0deg, transparent 0 8px, #ffffff03 8px 9px);
}
.project-art { perspective: 950px; min-width: 0; }
.project-summary { min-width: 0; }
@media (max-width:960px) and (min-width:761px) {
  .nav-mark { --size: 18px; margin-right: 5px; }
  .brand-mark { --size: 34px; }
  .brand-name { font-size: 12px; }
}
@media (max-width:760px) {
  .navigation > a { gap: 5px; }
  .navigation > a .nav-mark { --size: 26px; }
  .brand-mark { --size: 33px; }
  .skill-section { grid-template-columns: 48px minmax(0,1fr); gap: 17px; }
  .skill-mark { --size: 44px; }
  .approach-grid article { grid-template-columns: 40px minmax(0,1fr); }
  .approach-number { align-items: center; flex-direction: column; gap: 10px; }
  .footer-seal { --size: 48px; }
}
@media (max-width:380px) {
  .brand-mark { --size: 29px; }
  .skill-section { grid-template-columns: 34px minmax(0,1fr); gap: 14px; }
  .skill-mark { --size: 34px; }
}

/* Motion accents follow the cut, the charge, and the settle. */
.hero-title > span, .hero-discipline, .hero-tagline, .hero-description, .hero-actions, .hero-role { animation: none; }
[data-motion="on"] .navigation > a::after {
  height: 2px; bottom: 3px; width: 100%;
  background: linear-gradient(90deg, transparent, var(--accent) 52%, var(--accent-strong) 96%);
  transform-origin: right; transform: scaleX(0) skewX(-25deg);
  transition: transform .24s var(--ease-cut);
}
[data-motion="on"] .navigation > a:hover::after, [data-motion="on"] .navigation > a:focus-visible::after,
[data-motion="on"] .navigation > a[aria-current]::after { transform: scaleX(1) skewX(-25deg); transform-origin: left; }
[data-motion="on"] .nav-mark { transition: transform .25s var(--ease-cut), color .35s ease; }
[data-motion="on"] .navigation > a:hover .nav-mark,
[data-motion="on"] .navigation > a:focus-visible .nav-mark { transform: perspective(80px) rotateY(-14deg) translateY(-2px); color: var(--accent-strong); }
[data-motion="on"] .button > .icon { transform: translate(var(--pull-x,0),var(--pull-y,0)); transition: transform .18s var(--ease-cut); }

.project-art { position: relative; isolation: isolate; }
[data-motion="on"] .project-art .technical-art {
  transform: rotateX(var(--art-x,0deg)) rotateY(var(--art-y,0deg));
  transition: transform .25s var(--ease-cut);
}
[data-motion="on"] .ink-reveal.project-row .project-art { animation: frame-cut 540ms var(--ease-cut) both; }
[data-motion="on"] .ink-reveal.project-row .project-summary { animation: copy-settle 450ms 40ms var(--ease-cut) both; }
[data-motion="on"] .ink-reveal.section-heading .section-notch,
[data-motion="on"] .ink-reveal.skill-section .skill-mark { animation: mark-strike 460ms var(--ease-cut) both; }
[data-motion="on"] .ink-reveal.contact-band::before { animation: banner-warm 630ms var(--ease-cut) both; }
[data-motion="on"] .mark-live.skill-mark { animation: metal-float 8s ease-in-out infinite; }
[data-motion="on"][data-chakra="on"] .mark-live.skill-mark { animation: metal-awake 5.3s ease-in-out infinite; }
[data-motion="on"] .skill-section:nth-child(2) .mark-live.skill-mark { animation-delay: -2.8s; }
[data-motion="on"] .skill-section:nth-child(3) .mark-live.skill-mark { animation-delay: -1.6s; }
@keyframes frame-cut { from { transform: translateX(-12px) skewX(-1.8deg); } to { transform: none; } }
@keyframes copy-settle { from { transform: translateX(9px); } to { transform: none; } }
@keyframes mark-strike { 0% { filter: brightness(1); } 27% { filter: brightness(1.38); } 100% { filter: none; } }
@keyframes banner-warm { from { opacity: .1; transform: translateX(12px); } to { opacity: 1; transform: none; } }
@keyframes metal-float { 0%,100% { transform: perspective(300px) rotateX(5deg) translateY(0); } 50% { transform: perspective(300px) rotateX(-7deg) rotateY(5deg) translateY(-4px); } }
@keyframes metal-awake { 0%,100% { transform: perspective(310px) rotateX(8deg) rotateY(-7deg); } 52% { transform: perspective(310px) rotateX(-12deg) rotateY(11deg) translateY(-6px); } }
@media (prefers-reduced-motion: reduce) {
  .ink-wipe { display: none; }
  .seal-poster, .project-art .technical-art, .button > .icon { transform: none !important; }
}
@media print {
  :root, :root[data-chakra="on"] {
    --bg: #fff; --surface: #fff; --surface-2: #f5f3ef; --text: #111; --muted: #333;
    --faint: #444; --line: #bbb; --accent: #763016; --accent-strong: #763016; --art-surface: #f4eee8;
    --art-ground: #fff; --art-line: #af9b8a; --edge: transparent; --halo: transparent; --glow: transparent;
  }
  .ink-wipe, .forge-mark, .section-notch { display: none !important; }
  .technical-art { box-shadow: none !important; color: var(--text); }
}

/* Keep measurement labels and reading text legible on smaller screens. */
.project-summary > p, .case-summary p:not(.eyebrow) { font-size: 15px; }
.case-stats span, .evidence-inner div { font-size: 12px; }
.evidence-inner div > span { font-size: 10px; }
.technical-art .chart-label { font-weight: 600; }
.project-filter button { min-height: 40px; }
.case-prose p { max-width: 76ch; }
.case-prose section { scroll-margin-block-start: 12px; }
.contact-aside dd { line-height: 1.7; }
.email-link { overflow-wrap: anywhere; }
.art-foot { flex-wrap: wrap; gap: 6px; }
@media (max-width:580px) {
  .evidence-inner { grid-template-columns: 1fr; }
  .evidence-inner > a {
    display: grid; grid-template-columns: 112px minmax(0,1fr); gap: 12px; align-items: center;
    padding: 16px 3px; border-left: 0; border-right: 0;
  }
  .evidence-inner > a + a { border-top: 1px solid var(--line); }
  .evidence-inner strong { margin: 0; font-size: 30px; line-height: 1; }
  .evidence-inner strong > span { font-size: 10px; }
  .evidence-inner div { font-size: 11px; }
  .evidence-inner div > span { font-size: 10px; }
  .project-summary > p, .case-summary p:not(.eyebrow) { font-size: 14px; }
}

/* Persistent energy field. The empty center leaves the reading column quiet. */
body { isolation: isolate; }
.chakra-atmosphere {
  position: fixed; inset: 0; z-index: -1; overflow: hidden; pointer-events: none;
  color: #a7b6cc;
  background: radial-gradient(ellipse at 100% 52%, #6a7d9a17, transparent 46%),
    radial-gradient(ellipse at 0% 86%, #52617715, transparent 37%);
}
.chakra-atmosphere svg { width: 100%; height: 100%; max-width: none; opacity: .11; }
.chakra-atmosphere .current-sparks { opacity: .12; }
[data-chakra="on"] .chakra-atmosphere {
  color: #ffb07a;
  background: radial-gradient(ellipse at 106% 58%, #a5442927, transparent 50%),
    radial-gradient(ellipse at -7% 90%, #9b3d2120, transparent 41%);
}
[data-chakra="on"] .chakra-atmosphere svg { opacity: .19; }
[data-chakra="on"] .chakra-atmosphere .current-sparks { opacity: .66; }
[data-chakra="off"] .chart-bar { fill: #5e6b7e; }
[data-chakra="off"] .technical-art .chart-bar.selected-bar { fill: var(--accent); }
[data-chakra="off"] .layer-icon, [data-chakra="off"] .node-icon { color: #c5cfde; border-color: var(--art-line); }

[data-chakra="on"] .forge-face {
  background: linear-gradient(132deg, #93684d, #4c2d21 34%, #2b1812 66%, #72422a);
  border-color: #eea16a;
  box-shadow: inset 0 1px 0 #fff0cc9e, inset 0 -2px 0 #1c0e08, 0 0 14px #ff823d48;
}
[data-chakra="on"] .forge-glyph {
  color: #ffe1b5; filter: drop-shadow(0 1px 1px #2b130b) drop-shadow(0 0 5px #f7854594);
}
[data-chakra="on"] .skill-mark .forge-face, [data-chakra="on"] .footer-seal .forge-face {
  box-shadow: inset 0 1px 0 #fff0cda6, inset 0 -3px 0 #2c140b, 0 0 26px #ff733651;
}
[data-chakra="on"] .case-stats, [data-chakra="on"] .evidence-strip {
  background: linear-gradient(109deg, #251713, #15100f 52%, #231612);
}
[data-chakra="on"] .contact-band::before {
  background: radial-gradient(ellipse at 94% 60%, #b953292b, transparent 61%);
}
[data-chakra="on"] .site-footer {
  background: radial-gradient(ellipse at 8% 0%, #a84b2627, transparent 55%), var(--surface);
}
@media print {
  .chakra-atmosphere { display: none !important; }
}

/* One small pool of light follows a mouse; the native cursor stays visible. */
.cursor-light {
  display: none; position: fixed; inset: 0; overflow: hidden;
  z-index: 51; pointer-events: none;
}
.cursor-aura {
  --aura-size: 154px;
  position: absolute; top: 0; left: 0; width: var(--aura-size); height: var(--aura-size);
  border-radius: 50%; opacity: 0;
  transform: translate3d(var(--cursor-x,-200px), var(--cursor-y,-200px), 0) translate(-50%, -50%);
  background: radial-gradient(circle closest-side, #bfcee63d, #9db4d224 20%, #7d96bb11 45%, transparent 82%);
  transition: opacity 140ms ease;
}
.cursor-aura[data-active] { opacity: 1; will-change: transform, opacity; }
[data-chakra="on"] .cursor-aura {
  --aura-size: clamp(180px, 16vw, 230px);
  background:
    radial-gradient(circle closest-side, #ffe0ad43, #ffb2732a 13%, transparent 36%),
    radial-gradient(circle closest-side, #ff994438, #ff793023 32%, #fa632210 58%, transparent 91%);
}
@media (any-hover: hover) and (any-pointer: fine) and (prefers-reduced-motion: no-preference) {
  [data-motion="on"] .cursor-light { display: block; }
}
@media print { .cursor-light { display: none !important; } }
