/* ==========================================================================
   Mario Azucena — Design D "Swarm"
   Bioluminescent defence network: near-black, teal (AI), amber (action), red (threat only)
   ========================================================================== */

:root {
  --bg: #05090a;
  --bg-2: #0a1213;
  --text: #e9f0ec;
  --muted: #8fa39b;
  --amber: #ffc83d;
  --teal: #3ee0c3;
  --teal-rgb: 62, 224, 195;
  --amber-rgb: 255, 200, 61;
  --red: #ff4d5e;
  --line: rgba(233, 240, 236, .12);
  --line-2: rgba(233, 240, 236, .2);
  --glass: rgba(14, 24, 24, .55);

  --display: 'Bricolage Grotesque', 'Instrument Sans', system-ui, sans-serif;
  --body: 'Instrument Sans', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --mono: 'JetBrains Mono', ui-monospace, 'Cascadia Code', Consolas, monospace;

  --gutter: clamp(16px, 4vw, 40px);
  --section-y: clamp(88px, 12vw, 152px);
  --radius: 22px;
  --ease: cubic-bezier(.16, 1, .3, 1);
  --nav-h: 72px;

  /* workflow module theme */
  --wf-accent: #3ee0c3; --wf-ok: #7ee2a8; --wf-bad: #ff4d5e; --wf-warn: #ffc83d;
  --wf-ink: #e9f0ec; --wf-mute: #8fa39b; --wf-surface: #0d1617; --wf-line: rgba(233,240,236,.14); --wf-icon: #22302f;
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: calc(var(--nav-h) + 12px); -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--text); font: 400 17px/1.6 var(--body); -webkit-font-smoothing: antialiased; overflow-x: hidden; }
img { max-width: 100%; display: block; }
a { color: var(--teal); text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: 3px; }
h1, h2, h3 { font-family: var(--display); font-weight: 600; letter-spacing: -.03em; line-height: 1; margin: 0; text-wrap: balance; }
p { margin: 0; }
ul, ol, dl, dd { margin: 0; padding: 0; list-style: none; }
code { font-family: var(--mono); font-size: .88em; color: var(--teal); background: rgba(var(--teal-rgb), .08); padding: .1em .4em; border-radius: 5px; }
::selection { background: rgba(var(--amber-rgb), .35); color: #fff; }
:focus-visible { outline: 2px solid var(--amber); outline-offset: 3px; border-radius: 6px; }
[hidden] { display: none !important; }
.container { width: 100%; max-width: 1240px; margin: 0 auto; padding: 0 var(--gutter); }
.mono { font-family: var(--mono); font-size: 11.5px; letter-spacing: .16em; text-transform: uppercase; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip-link { position: absolute; left: 16px; top: -60px; z-index: 300; background: var(--amber); color: #1a1300; padding: 10px 16px; border-radius: 10px; font-weight: 600; }
.skip-link:focus { top: 12px; }
.glass { background: var(--glass); border: 1px solid var(--line); border-radius: var(--radius); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); }

/* ---------- Pills ---------- */
.pill { display: inline-flex; align-items: center; gap: 8px; border-radius: 99px; padding: 12px 20px; font: 500 15px/1 var(--body); cursor: pointer; border: 1px solid transparent; text-decoration: none !important; transition: transform .25s var(--ease), background .25s, border-color .25s, box-shadow .25s; }
.pill:hover { transform: translateY(-1px); }
.pill--amber { background: var(--amber); color: #1a1300; box-shadow: 0 10px 30px -12px rgba(var(--amber-rgb), .7); }
.pill--ghost { background: rgba(5, 9, 10, .45); color: var(--text); border-color: var(--line-2); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); }
.pill--ghost:hover { border-color: rgba(var(--teal-rgb), .6); }

/* ---------- Nav ---------- */
.nav { position: fixed; inset: 0 0 auto; z-index: 100; height: var(--nav-h); transition: transform .45s var(--ease), background .3s, border-color .3s; border-bottom: 1px solid transparent; }
.nav.is-scrolled, .nav:focus-within { background: rgba(5, 9, 10, .72); backdrop-filter: blur(14px) saturate(140%); -webkit-backdrop-filter: blur(14px) saturate(140%); border-bottom-color: var(--line); }
.nav--hidden { transform: translateY(-100%); }
.nav__inner { height: 100%; display: flex; align-items: center; justify-content: space-between; gap: 24px; }
.nav__brand { display: flex; align-items: center; gap: 12px; color: var(--text); text-decoration: none !important; }
.brand__logo { height: 36px; width: auto; filter: drop-shadow(0 4px 12px rgba(var(--teal-rgb), .28)); }
.nav__name { font: 600 19px/1 var(--display); letter-spacing: -.02em; }
.nav__links { display: flex; gap: 26px; }
.nav__links a { color: var(--muted); text-decoration: none; transition: color .2s; }
.nav__links a:hover, .nav__links a.is-active { color: var(--text); }
.nav__links a.is-active::before { content: '● '; color: var(--teal); }
.nav__actions { display: flex; align-items: center; gap: 10px; }
.nav__actions .pill { padding: 10px 16px; font-size: 14px; }
.nav__toggle { display: none; width: 42px; height: 42px; border: 1px solid var(--line-2); background: transparent; border-radius: 12px; cursor: pointer; position: relative; }
.nav__toggle-bar, .nav__toggle-bar::before, .nav__toggle-bar::after { position: absolute; left: 12px; width: 16px; height: 1.5px; background: var(--text); content: ''; transition: transform .3s var(--ease), background .2s; }
.nav__toggle-bar { top: 20px; } .nav__toggle-bar::before { left: 0; top: -5px; } .nav__toggle-bar::after { left: 0; top: 5px; }
.nav__toggle[aria-expanded="true"] .nav__toggle-bar { background: transparent; }
.nav__toggle[aria-expanded="true"] .nav__toggle-bar::before { transform: translateY(5px) rotate(45deg); }
.nav__toggle[aria-expanded="true"] .nav__toggle-bar::after { transform: translateY(-5px) rotate(-45deg); }
.nav__progress { position: absolute; left: 0; bottom: -1px; height: 1px; width: 100%; transform-origin: 0 50%; transform: scaleX(0); background: linear-gradient(90deg, var(--teal), var(--amber)); }

/* ---------- Hero ---------- */
.hero { position: relative; min-height: 100vh; min-height: 100svh; display: flex; align-items: center; overflow: hidden; isolation: isolate; padding: calc(var(--nav-h) + 24px) 0 96px; }
.hero__swarm { position: absolute; inset: 0; width: 100%; height: 100%; z-index: -3; cursor: crosshair;
  background: radial-gradient(ellipse 50% 60% at 72% 46%, rgba(var(--teal-rgb), .16), transparent 65%), radial-gradient(ellipse at 70% 45%, #0b2a26, var(--bg) 70%); }
.hero__shade { position: absolute; inset: 0; z-index: -2; pointer-events: none;
  background: radial-gradient(ellipse 55% 75% at 10% 55%, rgba(5,9,10,.94), rgba(5,9,10,.55) 55%, transparent 80%), linear-gradient(180deg, rgba(5,9,10,.8), transparent 18%), linear-gradient(0deg, var(--bg), transparent 22%); }
.swarm-labels { position: absolute; inset: 0; z-index: -1; pointer-events: none; }
.lab { position: absolute; transform: translate(22px, -50%); color: rgba(233,240,236,.78); font-family: var(--mono); font-size: 10.5px; letter-spacing: .14em; text-transform: uppercase; white-space: nowrap; }
.lab b { color: var(--amber); font-weight: 500; margin-right: 6px; }
.lab--threat, .lab--threat b { color: var(--red); }
.hero__inner { position: relative; max-width: 1240px; }
.hero__inner > * { max-width: 760px; }
.eyebrow { display: flex; align-items: center; gap: 12px; color: var(--teal); margin-bottom: 22px; }
.eyebrow .num { color: var(--muted); }
.hero__eyebrow::before { content: ''; width: 28px; height: 1px; background: var(--teal); }
.hero__title { font-size: clamp(46px, 6.8vw, 108px); line-height: .98; letter-spacing: -.035em; }
.hero__who { display: block; font: 600 clamp(17px, 1.5vw, 21px)/1.3 var(--display); letter-spacing: -.01em; color: var(--text); margin-bottom: 18px; }
.hero__sep { color: var(--amber); margin: 0 4px; }
.hero__statement { display: block; }
.hero__typed { margin-top: 18px; color: var(--muted); letter-spacing: .08em; min-height: 1.6em; }
.hero__prompt { color: var(--teal); }
.caret { display: inline-block; width: .55em; height: 1.05em; vertical-align: -.18em; margin-left: 3px; background: var(--teal); animation: blink 1.05s steps(1) infinite; }
@keyframes blink { 50% { opacity: 0; } }
.hero__title em { font-style: normal; color: var(--amber); }
.hero__title .word { display: inline-block; }
.hero__lead { margin-top: 18px; font-size: clamp(17px, 1.4vw, 19px); color: #c9d6d0; max-width: 48ch; }
.hero__lead b { color: var(--text); font-weight: 600; }
.hero__cta { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 34px; }
.hero__tags { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 30px; }
.hero__tags li { border: 1px solid var(--line); border-radius: 99px; padding: 6px 12px; color: var(--muted); font-size: 10.5px; background: rgba(5,9,10,.4); }
.hero__tags li.ai { color: var(--teal); border-color: rgba(var(--teal-rgb), .35); }
.hero__bar { position: absolute; left: 0; right: 0; bottom: 0; display: flex; justify-content: space-between; gap: 16px; padding: 16px var(--gutter); border-top: 1px solid var(--line); color: var(--muted); font-size: 10.5px; }
.hero__bar b { color: var(--text); font-weight: 500; }

/* ---------- Credentials band ---------- */
.band { border-block: 1px solid var(--line); background: linear-gradient(90deg, rgba(var(--teal-rgb), .04), transparent 40%, rgba(var(--amber-rgb), .04)); }
.band__inner { display: flex; align-items: stretch; gap: 0; overflow-x: auto; scrollbar-width: none; }
.band__inner::-webkit-scrollbar { display: none; }
.band__label { align-self: center; color: var(--muted); padding-right: 28px; white-space: nowrap; }
.band__certs { display: flex; }
.band .card { background: none; border: 0; border-left: 1px solid var(--line); border-radius: 0; padding: 22px 26px; min-width: 170px; display: flex; flex-direction: column; justify-content: center; gap: 4px; backdrop-filter: none; -webkit-backdrop-filter: none; }
.band .icon, .band .eyebrow, .band .cert__issuer { display: none; }
.band .cert__code, .band .cert-featured__code { font: 600 21px/1.1 var(--display); letter-spacing: -.02em; color: #b9c7c1; }
.band .cert-featured__code { color: var(--amber); }
.band .cert__name, .band .cert-featured__name { font-size: 11.5px; line-height: 1.35; color: var(--muted); max-width: 22ch; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }

/* ---------- Sections ---------- */
.section { position: relative; padding: var(--section-y) 0; }
.section__head { max-width: 860px; margin-bottom: clamp(40px, 5vw, 64px); }
.section__title { font-size: clamp(34px, 4.6vw, 64px); letter-spacing: -.035em; line-height: 1.02; }
.section__title--sm { font-size: clamp(28px, 3.4vw, 44px); }
.section__lede { margin-top: 22px; color: #b9c7c1; font-size: 18px; max-width: 64ch; }

/* ---------- Profile ---------- */
.section--profile { padding-bottom: 0; }
.profile__summary { margin-top: 30px; font-size: clamp(19px, 1.7vw, 23px); line-height: 1.55; color: #c9d6d0; max-width: 62ch; }

/* ---------- Approach ---------- */
.approach { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); border-top: 1px solid var(--line); }
.approach__item { position: relative; padding: 34px 32px 8px 0; }
.approach__item + .approach__item { border-left: 1px solid var(--line); padding-left: 32px; }
.approach__item::before { content: ''; display: block; width: 120px; height: 72px; margin: 0 0 26px; background: no-repeat left center / contain; opacity: .9; }
.approach__item:nth-child(3n+1)::before { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 120 72' fill='none' stroke='%233ee0c3' stroke-width='1.4'%3E%3Ccircle cx='60' cy='36' r='26' stroke-dasharray='3 5'/%3E%3Ccircle cx='60' cy='36' r='12'/%3E%3Ccircle cx='60' cy='36' r='3' fill='%23ffc83d' stroke='none'/%3E%3Cpath d='M60 2v14M60 56v14M14 36h18M88 36h18'/%3E%3C/svg%3E"); }
.approach__item:nth-child(3n+2)::before { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 120 72' fill='none' stroke='%233ee0c3' stroke-width='1.4'%3E%3Crect x='6' y='14' width='108' height='46' rx='8'/%3E%3Cpath d='M18 46l14-12 12 8 18-18 14 10 16-14'/%3E%3Ccircle cx='92' cy='20' r='3.5' fill='%23ffc83d' stroke='none'/%3E%3C/svg%3E"); }
.approach__item:nth-child(3n)::before { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 120 72' fill='none' stroke='%233ee0c3' stroke-width='1.4'%3E%3Crect x='4' y='26' width='26' height='20' rx='5'/%3E%3Crect x='47' y='22' width='28' height='28' rx='7' stroke='%23ffc83d'/%3E%3Crect x='92' y='8' width='24' height='16' rx='4'/%3E%3Crect x='92' y='48' width='24' height='16' rx='4'/%3E%3Cpath d='M30 36h17M75 36c8 0 9-20 17-20M75 36c8 0 9 20 17 20' stroke-dasharray='3 4'/%3E%3C/svg%3E"); }
.approach__num { display: block; font-family: var(--mono); font-size: 12px; letter-spacing: .16em; color: var(--amber); margin-bottom: 14px; }
.approach__title { font-size: 34px; letter-spacing: -.03em; }
.approach__text { margin-top: 14px; color: var(--muted); font-size: 16.5px; max-width: 36ch; }

/* ---------- Numbers ---------- */
.numbers { border-block: 1px solid var(--line); background: var(--bg-2); }
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); }
.stat { padding: 40px 28px 38px; border-left: 1px solid var(--line); }
.stat:first-child { border-left: 0; padding-left: 0; }
.stat dt { color: var(--muted); font-family: var(--mono); font-size: 11px; letter-spacing: .16em; text-transform: uppercase; }
.stat dd { margin-top: 12px; font: 600 clamp(34px, 3.6vw, 52px)/1 var(--display); letter-spacing: -.035em; white-space: nowrap; }
.stat dd small { font-size: .55em; color: var(--amber); margin-left: 2px; }

/* ---------- Expertise cards ---------- */
.grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.card { --mx: 50%; --my: 50%; position: relative; isolation: isolate; overflow: hidden; background: var(--glass); border: 1px solid var(--line); border-radius: var(--radius); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); transition: border-color .3s, transform .4s var(--ease); }
.card::before { content: ''; position: absolute; inset: 0; z-index: -1; opacity: 0; transition: opacity .3s; background: radial-gradient(380px circle at var(--mx) var(--my), rgba(var(--teal-rgb), .12), transparent 45%); }
.card:hover { border-color: rgba(var(--teal-rgb), .35); }
.card:hover::before { opacity: 1; }
.card--skill { padding: 30px; }
.card--skill:hover { transform: translateY(-3px); }
.card[data-icon="ai"] { border-color: rgba(var(--teal-rgb), .4); background: linear-gradient(160deg, rgba(var(--teal-rgb), .12), var(--glass) 55%); }
.card[data-icon="ai"]::after { content: 'AI'; position: absolute; top: 22px; right: 22px; font: 500 10.5px/1 var(--mono); letter-spacing: .16em; color: var(--bg); background: var(--teal); padding: 5px 8px; border-radius: 99px; }
.icon { display: inline-grid; place-items: center; width: 46px; height: 46px; border-radius: 14px; color: var(--teal); background: rgba(var(--teal-rgb), .08); border: 1px solid rgba(var(--teal-rgb), .22); }
.icon svg { width: 22px; height: 22px; }
.card__title { font-size: 25px; letter-spacing: -.025em; margin: 24px 0 14px; }
.card__list li { position: relative; padding-left: 18px; color: var(--muted); font-size: 15.5px; line-height: 1.55; margin-top: 6px; }
.card__list li::before { content: ''; position: absolute; left: 0; top: .7em; width: 7px; height: 1px; background: var(--amber); }

/* ---------- AI work ---------- */
.section--ai { background: radial-gradient(ellipse 60% 50% at 30% 40%, rgba(var(--teal-rgb), .07), transparent 70%); }
.aiwork { display: grid; grid-template-columns: minmax(0, 1.55fr) minmax(0, 1fr); gap: clamp(24px, 4vw, 56px); align-items: start; }
.wf { background: #0b1314; border: 1px solid var(--line-2); border-radius: var(--radius); overflow: hidden; box-shadow: 0 40px 90px -40px rgba(0,0,0,.9), 0 0 0 1px rgba(var(--teal-rgb), .05); font-family: var(--body); }
.wf-top { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 12px 16px; border-bottom: 1px solid var(--line); font: 12.5px/1 var(--body); color: var(--muted); }
.wf-tabs { display: flex; gap: 6px; } .wf-tabs b, .wf-tabs span { padding: 6px 10px; border-radius: 8px; font-weight: 500; } .wf-tabs b { background: rgba(233,240,236,.07); color: var(--text); }
.wf-live { display: flex; align-items: center; gap: 8px; font-family: var(--mono); font-size: 10.5px; letter-spacing: .06em; }
.wf-live i { width: 7px; height: 7px; border-radius: 50%; background: var(--wf-ok); box-shadow: 0 0 0 3px rgba(126,226,168,.18); }
.wf-canvas { background-color: #0a1112; background-image: radial-gradient(rgba(233,240,236,.08) 1px, transparent 1px); background-size: 18px 18px; padding: 6px 4px; }
.wf-log { border-top: 1px solid var(--line); padding: 12px 16px; height: 136px; overflow: hidden; font: 11.5px/1.75 var(--mono); }
.wf-log > div { display: grid; grid-template-columns: 66px 112px 1fr; gap: 10px; color: #b9c7c1; animation: wf-in .35s ease; }
.wf-log time { color: #5f706a; } .wf-log .wf-k { color: var(--teal); } .wf-log .wf-ok { color: var(--wf-ok); } .wf-log .wf-bad { color: var(--red); }
@keyframes wf-in { from { opacity: 0; transform: translateY(6px); } }
.wf-foot { display: flex; justify-content: space-between; gap: 12px; padding: 10px 16px; border-top: 1px solid var(--line); font: 10.5px/1.4 var(--mono); letter-spacing: .06em; color: var(--muted); }
.wf-foot b { color: var(--text); font-weight: 500; }
.wf-contained { color: var(--wf-ok); opacity: 0; transition: opacity .4s; } .wf-contained.show { opacity: 1; }
.ai__side { display: grid; gap: 22px; }
.ai__intro { font-size: 19px; line-height: 1.55; color: #c9d6d0; }
.ai__training { padding: 24px; display: grid; gap: 8px; }
.ai__kicker { color: var(--teal); font-size: 10.5px; }
.ai__title { font: 600 26px/1.1 var(--display); letter-spacing: -.025em; }
.ai__meta { color: var(--muted); font-size: 10.5px; letter-spacing: .1em; }
.ai__status { color: var(--amber); }
.ai-bar { display: block; height: 4px; border-radius: 4px; background: rgba(233,240,236,.08); overflow: hidden; margin-top: 8px; }
.ai-bar i { display: block; height: 100%; background: linear-gradient(90deg, var(--teal), var(--amber)); border-radius: 4px; }
.ai__pct { color: var(--muted); font-size: 10.5px; }
.ai__tools { display: flex; flex-wrap: wrap; gap: 8px; }
.ai__tools li { border: 1px solid rgba(var(--teal-rgb), .35); color: var(--teal); border-radius: 99px; padding: 7px 12px; font-size: 10.5px; }

/* ---------- Timeline ---------- */
.timeline { position: relative; padding-left: 44px; }
.timeline::before, .timeline__line { content: ''; position: absolute; left: 8px; top: 10px; bottom: 10px; width: 1px; }
.timeline::before { background: var(--line-2); }
.timeline__line { background: linear-gradient(180deg, var(--teal), var(--amber)); transform-origin: top; box-shadow: 0 0 14px rgba(var(--teal-rgb), .5); }
.timeline__list { display: grid; gap: 18px; }
.tl-item { position: relative; }
.tl-item__dot { position: absolute; left: -44px; top: 30px; width: 17px; height: 17px; border-radius: 50%; background: var(--bg); border: 2px solid var(--amber); box-shadow: 0 0 0 6px rgba(var(--amber-rgb), .1), 0 0 18px rgba(var(--amber-rgb), .45); }
.tl-item--edu .tl-item__dot { border-color: var(--muted); box-shadow: none; }
.tl-item__body { padding: 30px 32px; }
.tl-item__period { font-family: var(--mono); font-size: 11px; letter-spacing: .16em; text-transform: uppercase; color: var(--teal); }
.tl-item--edu .tl-item__period { color: var(--muted); }
.tl-item__role { font-size: clamp(21px, 2.2vw, 28px); letter-spacing: -.025em; line-height: 1.15; margin-top: 12px; }
.tl-item__company { margin-top: 6px; color: var(--amber); font-weight: 500; }
.tl-item__points { margin-top: 18px; display: grid; gap: 8px; }
.tl-item__points li { position: relative; padding-left: 22px; color: var(--muted); font-size: 16px; }
.tl-item__points li::before { content: '▹'; position: absolute; left: 0; color: var(--teal); }
.tl-item__detail { margin-top: 10px; color: var(--muted); }

/* ---------- Trainings ---------- */
.trainings { display: grid; gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.training { display: grid; grid-template-columns: 210px minmax(0, 1fr); gap: 20px; align-items: baseline; padding: 24px 28px; background: var(--bg-2); transition: background .25s; }
.training:hover { background: #0e1819; }
.training__year { font-family: var(--mono); font-size: 11.5px; letter-spacing: .08em; color: var(--teal); }
.training__body { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 16px; }
.training__title { font: 600 20px/1.2 var(--display); letter-spacing: -.02em; }
.training__provider { color: var(--muted); font-size: 15px; }
.training__status { font-family: var(--mono); font-size: 10.5px; letter-spacing: .12em; text-transform: uppercase; color: var(--bg); background: var(--amber); padding: 4px 9px; border-radius: 99px; }
.training__bar { flex-basis: 100%; height: 3px; border-radius: 3px; background: rgba(233,240,236,.08); overflow: hidden; margin-top: 6px; }
.training__bar i { display: block; height: 100%; background: linear-gradient(90deg, var(--teal), var(--amber)); }

/* ---------- Agent console ---------- */
.agent { display: grid; grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr); gap: clamp(28px, 5vw, 72px); align-items: center; }
.agent__intro { display: grid; grid-template-columns: auto 1fr; gap: 22px; align-items: start; }
.agent__avatar { width: auto; height: 72px; filter: drop-shadow(0 8px 24px rgba(var(--teal-rgb), .35)); animation: bob 4s ease-in-out infinite; }
@keyframes bob { 50% { transform: translateY(-5px); } }
.term { border: 1px solid var(--line-2); border-radius: var(--radius); overflow: hidden; background: #071011; box-shadow: 0 40px 90px -40px rgba(0,0,0,.95); font: 400 14px/1.65 var(--mono); }
.term__bar { display: flex; align-items: center; gap: 8px; padding: 12px 16px; border-bottom: 1px solid var(--line); background: #0b1617; }
.term__bar i { width: 10px; height: 10px; border-radius: 50%; background: #23312f; }
.term__bar i:nth-child(1) { background: rgba(255,77,94,.7); } .term__bar i:nth-child(2) { background: rgba(255,200,61,.7); } .term__bar i:nth-child(3) { background: rgba(62,224,195,.7); }
.term__bar span { margin-left: 10px; color: var(--muted); font-size: 12px; }
.term__screen { height: 360px; overflow-y: auto; padding: 18px 20px; cursor: text; scrollbar-width: thin; scrollbar-color: #20302e transparent; }
.term__line { white-space: pre-wrap; word-break: break-word; color: #c9d6d0; min-height: 1.65em; }
.term__line--muted { color: var(--muted); } .term__line--accent { color: var(--teal); } .term__line--ok { color: #7ee2a8; }
.term__line--warn { color: var(--amber); } .term__line--alert { color: var(--red); } .term__line--cmd { color: var(--text); }
.term__line--cmd::before { content: 'mario@agent:~$ '; color: var(--amber); }
.term__form { display: flex; align-items: center; gap: 8px; }
.term__form label { color: var(--amber); white-space: nowrap; }
.term__input { flex: 1; min-width: 0; background: transparent; border: 0; outline: 0; color: var(--text); font: inherit; font-size: 16px; caret-color: var(--teal); padding: 0; }
.term__chips { display: flex; flex-wrap: wrap; gap: 8px; padding: 12px 16px; border-top: 1px solid var(--line); background: #0b1617; }
.term__chip { font: 500 12px/1 var(--mono); color: var(--muted); padding: 8px 12px; border: 1px solid var(--line-2); border-radius: 99px; background: transparent; cursor: pointer; transition: color .2s, border-color .2s; }
.term__chip:hover { color: var(--teal); border-color: rgba(var(--teal-rgb), .55); }
.term-dialog { width: min(860px, calc(100vw - 32px)); max-height: calc(100vh - 64px); padding: 0; border: 1px solid var(--line-2); border-radius: var(--radius); background: #0b1617; color: var(--text); }
.term-dialog::backdrop { background: rgba(2, 5, 6, .74); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); }
.term-dialog[open] { animation: pop .35s var(--ease); }
@keyframes pop { from { opacity: 0; transform: translateY(12px) scale(.98); } }
.term-dialog__head { display: flex; justify-content: space-between; align-items: center; padding: 10px 12px 10px 18px; color: var(--muted); font-size: 11px; }
.term-dialog__who { display: flex; align-items: center; gap: 10px; }
.term-dialog__who img { height: 22px; width: auto; }
.term-dialog__close { width: 36px; height: 36px; border-radius: 10px; border: 1px solid var(--line-2); background: transparent; color: var(--text); cursor: pointer; }
.term-dialog__close:hover { border-color: var(--teal); color: var(--teal); }
.term-dialog .term { border-radius: 0; border-inline: 0; border-bottom: 0; box-shadow: none; }
.term-dialog .term__screen { height: min(420px, 55vh); }

/* ---------- Contact ---------- */
.contact { position: relative; overflow: hidden; isolation: isolate; padding: clamp(110px, 16vw, 200px) 0; border-top: 1px solid var(--line); }
.contact__swarm { position: absolute; inset: 0; width: 100%; height: 100%; z-index: -2; background: radial-gradient(ellipse at 60% 50%, #0a2420, var(--bg) 70%); }
.contact__shade { position: absolute; inset: 0; z-index: -1; pointer-events: none; background: radial-gradient(ellipse 70% 70% at 50% 50%, rgba(5,9,10,.5), rgba(5,9,10,.85)); }
.contact__inner { text-align: center; display: grid; justify-items: center; }
.contact__inner .eyebrow { justify-content: center; }
.contact__title { font-size: clamp(42px, 7vw, 104px); letter-spacing: -.04em; line-height: .98; max-width: 14ch; }
.contact__title em { font-style: normal; color: var(--amber); }
.contact__roles { margin-top: 34px; display: grid; justify-items: center; gap: 14px; }
.contact__status { display: inline-flex; align-items: center; gap: 8px; color: var(--teal); }
.contact__status i { width: 7px; height: 7px; border-radius: 50%; background: var(--teal); box-shadow: 0 0 0 0 rgba(var(--teal-rgb), .6); animation: ping 2.2s infinite; }
@keyframes ping { 70% { box-shadow: 0 0 0 8px rgba(var(--teal-rgb), 0); } 100% { box-shadow: 0 0 0 0 rgba(var(--teal-rgb), 0); } }
.roles { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; }
.roles li { padding: 9px 16px; border: 1px solid var(--line-2); border-radius: 99px; background: rgba(5,9,10,.5); font-weight: 500; }
.contact__cta { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; margin-top: 40px; }

/* ---------- Footer ---------- */
.footer { border-top: 1px solid var(--line); padding: 26px 0; color: var(--muted); }
.footer__inner { display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap; font-size: 10.5px; }
.footer__credit { display: inline-flex; align-items: center; gap: 8px; color: var(--text); text-transform: none; letter-spacing: .04em; } /* exact credit text, not uppercased */
.footer__credit img { height: 22px; width: auto; }
.noscript { padding: 24px var(--gutter); color: var(--muted); }

/* ---------- Animation start states (only after GSAP is confirmed) ---------- */
.js-anim .reveal { opacity: 0; transform: translateY(34px); }
.js-anim .timeline__line { transform: scaleY(0); }

/* ---------- Responsive ---------- */
@media (max-width: 1080px) {
  .grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .aiwork, .agent { grid-template-columns: 1fr; }
}
@media (max-width: 1100px) {
  .nav__links { position: fixed; top: var(--nav-h); left: 0; right: 0; flex-direction: column; gap: 0; padding: 10px var(--gutter) 22px; background: rgba(5,9,10,.97); border-bottom: 1px solid var(--line); opacity: 0; visibility: hidden; transform: translateY(-8px); transition: opacity .25s, transform .25s var(--ease), visibility .25s; }
  .nav__links.is-open { opacity: 1; visibility: visible; transform: none; }
  .nav__links a { padding: 14px 0; border-bottom: 1px solid var(--line); font-size: 13px; }
  .nav__toggle { display: inline-block; }
  .nav__actions .pill { display: none; }
}
@media (max-width: 860px) {
  .approach__item, .approach__item + .approach__item { border-left: 0; padding-left: 0; border-top: 1px solid var(--line); }
  .approach { border-top: 0; }
}
@media (max-width: 640px) {
  :root { --nav-h: 62px; }
  body { font-size: 16px; }
  .grid { grid-template-columns: 1fr; }
  .hero__bar span:first-child { display: none; }
  .lab:nth-child(n+5) { display: none; }
  .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .stat { padding: 26px 16px 24px; min-width: 0; }
  .stat dd { font-size: clamp(24px, 7.4vw, 34px); white-space: normal; overflow-wrap: anywhere; }
  .stat:nth-child(odd) { border-left: 0; padding-left: 0; }
  .stat:nth-child(n+3) { border-top: 1px solid var(--line); }
  .training { grid-template-columns: 1fr; gap: 8px; }
  .tl-item__body, .card--skill { padding: 24px 20px; }
  .timeline { padding-left: 30px; } .tl-item__dot { left: -30px; }
  .wf-log > div { grid-template-columns: 56px 1fr; } .wf-log .wf-k { display: none; }
  .wf-canvas { overflow-x: auto; scrollbar-width: thin; } .wf-canvas .wf-svg { min-width: 600px; } /* keep node text readable; swipe inside the card */
  .wf-tabs span { display: none; } .wf-live { white-space: nowrap; font-size: 9.5px; }
  .term__screen { height: 320px; padding: 14px; } .term { font-size: 13px; } .term__form label { display: none; }
  .agent__intro { grid-template-columns: 1fr; }
  .footer__inner { justify-content: center; text-align: center; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}
