/* ==========================================================================
   home.css — homepage skin, TypeSafe-AI-inspired "RF lab" language.
   Deep blue-charcoal surfaces, hairline borders, grotesk display type,
   JetBrains Mono microcopy, numbered sections, terminal readouts.
   ========================================================================== */

html { zoom: 1; scroll-padding-top: 84px; }

:root {
  --ts-bg: #0a0f16;
  --ts-bg-deep: #070b11;
  --ts-panel: #0d141e;
  --ts-panel-2: #101a27;
  --ts-term: #060a10;
  --ts-ink: #e9eef5;
  --ts-body: #aeb9c7;
  --ts-muted: #8493a6;
  --ts-faint: #5c6b7f;
  --ts-accent: #4d9fff;
  --ts-accent-soft: rgba(77, 159, 255, .13);
  --ts-line: rgba(151, 176, 210, .14);
  --ts-line-strong: rgba(151, 176, 210, .3);
}

.ts-hero, .ts-section, .ts-ticker, .ts-contact { font-family: var(--sans); }
.ts-hero strong, .ts-section strong { color: var(--ts-ink); font-weight: 600; }

/* ---------- labels & headings ---------- */
.ts-label { display: flex; align-items: center; gap: 14px; margin: 0 0 26px; color: var(--ts-muted); font-family: var(--mono); font-size: 11px; font-weight: 500; letter-spacing: .18em; text-transform: uppercase; }
.ts-label b { color: var(--ts-accent); font-weight: 600; }
.ts-label::after { content: ""; flex: 1; height: 1px; background: var(--ts-line); }
.ts-h2 { margin: 0 0 clamp(40px, 5vw, 72px); font-family: var(--display); font-size: clamp(44px, 5.6vw, 84px); font-weight: 600; letter-spacing: -.035em; line-height: .96; color: var(--ts-ink); }
.ts-section-head { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(260px, .85fr); gap: 48px; align-items: end; margin-bottom: clamp(40px, 5vw, 72px); }
.ts-section-head .ts-h2 { margin-bottom: 0; }
.ts-section-note { margin: 0; color: var(--ts-body); font-size: 15px; line-height: 1.75; }
.ts-section-note a { color: var(--ts-accent); border-bottom: 1px solid rgba(77, 159, 255, .35); padding-bottom: 2px; transition: border-color .2s ease; }
.ts-section-note a:hover { border-color: var(--ts-accent); }

/* ---------- buttons ---------- */
.ts-btn { display: inline-flex; min-height: 46px; align-items: center; justify-content: center; gap: 10px; padding: 12px 20px; border: 1px solid var(--ts-line-strong); border-radius: 10px; font-family: var(--mono); font-size: 11px; font-weight: 500; letter-spacing: .1em; text-transform: uppercase; color: var(--ts-ink); background: transparent; transition: transform .25s var(--ease), background .25s ease, border-color .25s ease, color .25s ease; }
.ts-btn:hover { transform: translateY(-2px); border-color: rgba(77, 159, 255, .55); background: var(--ts-accent-soft); }
.ts-btn-primary { border-color: transparent; background: var(--ts-accent); color: #06101c; }
.ts-btn-primary:hover { background: #6cb0ff; border-color: transparent; }

/* ---------- hero ---------- */
.ts-hero { position: relative; overflow: hidden; padding: clamp(150px, 18vh, 210px) 0 110px; background: var(--ts-bg); }
.ts-hero-grid-bg { position: absolute; inset: 0; content: ""; opacity: .5; background-image: linear-gradient(var(--ts-line) 1px, transparent 1px), linear-gradient(90deg, var(--ts-line) 1px, transparent 1px); background-size: 72px 72px; -webkit-mask-image: radial-gradient(ellipse 90% 80% at 28% 32%, #000 20%, transparent 72%); mask-image: radial-gradient(ellipse 90% 80% at 28% 32%, #000 20%, transparent 72%); }
.ts-hero::after { position: absolute; right: 0; bottom: 0; left: 0; height: 220px; content: ""; background: linear-gradient(180deg, transparent, var(--ts-bg)); pointer-events: none; }
.ts-hero-inner { position: relative; z-index: 2; display: grid; grid-template-columns: minmax(0, 1.06fr) minmax(360px, .82fr); gap: clamp(40px, 5vw, 90px); align-items: center; }
.ts-hero-copy { max-width: 720px; }
.ts-status { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin: 0 0 34px; color: var(--ts-muted); font-family: var(--mono); font-size: 11px; font-weight: 500; letter-spacing: .14em; text-transform: uppercase; }
.ts-status em { font-style: normal; color: var(--ts-faint); }
.ts-status [data-clock] { color: var(--ts-accent); }
.ts-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--ts-accent); box-shadow: 0 0 12px rgba(77, 159, 255, .8); animation: ts-pulse 2.4s infinite; }
@keyframes ts-pulse { 0%, 100% { opacity: 1; } 50% { opacity: .35; } }
.ts-hero-title { margin: 0 0 30px; font-family: var(--display); font-size: clamp(52px, 6.6vw, 104px); font-weight: 700; letter-spacing: -.042em; line-height: .98; color: var(--ts-ink); }
.ts-hero-title em { font-style: normal; color: var(--ts-accent); }
.ts-hero-lede { margin: 0 0 36px; max-width: 600px; color: var(--ts-body); font-size: clamp(15px, 1.35vw, 17px); line-height: 1.8; }
.ts-hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-bottom: 26px; }
.ts-hero-meta { margin: 0; color: var(--ts-faint); font-family: var(--mono); font-size: 11px; letter-spacing: .06em; }
.ts-hero-meta a { color: var(--ts-muted); border-bottom: 1px solid var(--ts-line-strong); transition: color .2s ease; }
.ts-hero-meta a:hover { color: var(--ts-accent); }
.ts-scroll-cue { position: absolute; z-index: 3; bottom: 34px; left: max(32px, calc((100vw - var(--shell)) / 2)); display: flex; align-items: center; gap: 14px; color: var(--ts-faint); font-family: var(--mono); font-size: 10px; letter-spacing: .16em; text-transform: uppercase; }
.ts-scroll-cue span { color: var(--ts-accent); }
.ts-scroll-cue i { position: relative; width: 52px; height: 1px; overflow: hidden; background: var(--ts-line-strong); }
.ts-scroll-cue i::after { position: absolute; inset: 0; content: ""; background: var(--ts-accent); transform: translateX(-100%); animation: ts-cue 2.2s infinite var(--ease); }
@keyframes ts-cue { 0% { transform: translateX(-100%); } 55%, 100% { transform: translateX(100%); } }

/* ---------- terminal ---------- */
.ts-term { overflow: hidden; border: 1px solid var(--ts-line-strong); border-radius: 14px; background: var(--ts-term); box-shadow: 0 30px 80px rgba(2, 6, 12, .55), inset 0 1px 0 rgba(151, 176, 210, .07); }
.ts-term-bar { display: flex; align-items: center; gap: 14px; padding: 11px 16px; border-bottom: 1px solid var(--ts-line); background: rgba(151, 176, 210, .045); }
.ts-term-dots { display: flex; gap: 6px; }
.ts-term-dots i { width: 9px; height: 9px; border-radius: 50%; background: rgba(151, 176, 210, .22); }
.ts-term-dots i:first-child { background: rgba(77, 159, 255, .65); }
.ts-term-title { overflow: hidden; color: var(--ts-muted); font-family: var(--mono); font-size: 11px; letter-spacing: .06em; text-overflow: ellipsis; white-space: nowrap; }
.ts-term-tag { margin-left: auto; padding: 3px 8px; border: 1px solid rgba(77, 159, 255, .3); border-radius: 6px; color: var(--ts-accent); font-family: var(--mono); font-size: 9px; letter-spacing: .1em; white-space: nowrap; }
.ts-term-body { padding: 20px 20px 24px; font-family: var(--mono); }
.ts-term-line { margin: 0 0 10px; color: var(--ts-body); font-size: 12.5px; letter-spacing: .02em; line-height: 1.65; }
.ts-term-line b { color: var(--ts-ink); font-weight: 600; }
.ts-term-line.ts-term-sys { color: var(--ts-faint); font-size: 11px; }
.ts-term-line.ts-term-cmd { color: var(--ts-ink); }
.ts-term-hit { color: var(--ts-accent) !important; }
.ts-caret { display: inline-block; width: 8px; height: 15px; margin-left: 8px; vertical-align: text-bottom; background: var(--ts-accent); animation: ts-blink 1.1s steps(1) infinite; }
@keyframes ts-blink { 50% { opacity: 0; } }
.ts-meters { display: inline-flex; gap: 3px; margin-left: 12px; vertical-align: 1px; }
.ts-meters i { width: 6px; height: 13px; border-radius: 2px; background: rgba(151, 176, 210, .13); transition: background .5s ease, box-shadow .5s ease; }
.ts-meters i.on { background: var(--ts-accent); box-shadow: 0 0 8px rgba(77, 159, 255, .45); }

/* ---------- ticker ---------- */
.ts-ticker { position: relative; z-index: 4; overflow: hidden; border-top: 1px solid var(--ts-line); border-bottom: 1px solid var(--ts-line); background: var(--ts-bg-deep); }
.ts-ticker-track { display: flex; width: max-content; align-items: center; padding: 15px 0; animation: ts-ticker 36s linear infinite; }
.ts-ticker span { padding-inline: 26px; color: var(--ts-muted); font-family: var(--mono); font-size: 11px; font-weight: 500; letter-spacing: .18em; white-space: nowrap; }
.ts-ticker i { color: var(--ts-accent); font-style: normal; font-size: 10px; }
@keyframes ts-ticker { to { transform: translateX(-50%); } }

/* ---------- sections ---------- */
.ts-section { position: relative; padding: clamp(88px, 10vw, 150px) 0; background: var(--ts-bg); }
.ts-section-lined { border-top: 1px solid var(--ts-line); }
#direction { background: radial-gradient(ellipse 70% 60% at 22% 30%, rgba(77, 159, 255, .06), transparent 70%), var(--ts-bg); }

/* manifesto */
.ts-manifesto { display: grid; grid-template-columns: minmax(0, .95fr) minmax(0, 1.05fr); gap: clamp(44px, 6vw, 100px); align-items: start; padding-top: 8px; border-top: 1px solid var(--ts-line); }
.ts-not { position: relative; margin: 0; font-family: var(--display); font-size: clamp(64px, 8vw, 138px); font-weight: 700; letter-spacing: -.045em; line-height: .92; color: var(--ts-ink); }
.ts-not s { text-decoration: none; position: relative; color: var(--ts-faint); }
.ts-not s::after { content: ""; position: absolute; top: 52%; left: -3%; width: 0; height: .075em; min-height: 5px; background: var(--ts-accent); transform: rotate(-3deg); transition: width .8s var(--ease) .35s; }
.reveal.visible .ts-not s::after, .ts-not.reveal.visible s::after { width: 106%; }
.ts-not small { position: absolute; right: 0; bottom: -8px; display: block; color: var(--ts-faint); font-family: var(--mono); font-size: 10.5px; font-weight: 400; letter-spacing: .08em; line-height: 1.75; text-align: right; text-transform: uppercase; }
.ts-manifesto-copy p { margin: 0 0 22px; color: var(--ts-body); font-size: 15.5px; line-height: 1.85; }
.ts-manifesto-copy p:first-child { color: var(--ts-muted); }
.ts-manifesto-copy em { font-style: italic; }
.ts-chips { display: flex; flex-wrap: wrap; gap: 10px; margin: 30px 0 0; padding: 0; list-style: none; }
.ts-chips li { padding: 9px 14px; border: 1px solid rgba(77, 159, 255, .32); border-radius: 8px; color: var(--ts-accent); background: var(--ts-accent-soft); font-family: var(--mono); font-size: 10.5px; font-weight: 500; letter-spacing: .1em; text-transform: uppercase; }

/* pillars */
.ts-pillars { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1px; border: 1px solid var(--ts-line); border-radius: 14px; overflow: hidden; background: var(--ts-line); }
.ts-pillar { position: relative; padding: clamp(28px, 3vw, 44px); background: var(--ts-panel); transition: background .3s ease; }
.ts-pillar:hover { background: var(--ts-panel-2); }
.ts-pillar-tag { margin: 0 0 58px; color: var(--ts-accent); font-family: var(--mono); font-size: 11px; font-weight: 600; letter-spacing: .12em; }
.ts-pillar h3 { margin: 0 0 14px; font-family: var(--display); font-size: clamp(22px, 1.9vw, 28px); font-weight: 600; letter-spacing: -.02em; line-height: 1.12; color: var(--ts-ink); }
.ts-pillar p { margin: 0; color: var(--ts-body); font-size: 14px; line-height: 1.78; }
.ts-pillar::after { content: ""; position: absolute; top: 0; left: 0; width: 100%; height: 2px; background: linear-gradient(90deg, var(--ts-accent), transparent 70%); opacity: 0; transition: opacity .3s ease; }
.ts-pillar:hover::after { opacity: 1; }

/* instrument */
.ts-term-instrument .ts-instrument-stage { position: relative; background: var(--ts-term); }
.ts-term-instrument canvas { display: block; width: 100%; height: clamp(380px, 46vw, 560px); cursor: crosshair; touch-action: pan-y; }
.ts-instrument-readout { position: absolute; top: 18px; left: 20px; display: grid; gap: 4px; margin: 0; max-width: min(58%, 420px); color: var(--ts-muted); font-family: var(--mono); font-size: 10px; letter-spacing: .12em; text-transform: uppercase; pointer-events: none; }
.ts-instrument-readout strong { color: var(--ts-ink); font-size: 12px; font-weight: 600; letter-spacing: .14em; }
.ts-instrument-readout > span:not(.semantic-legend) { color: var(--ts-faint); font-size: 9.5px; }
.semantic-legend { display: flex; flex-wrap: wrap; gap: 5px 10px; margin-top: 6px; color: var(--ts-muted); font-size: 9.5px; }
.semantic-legend[hidden] { display: none; }
.semantic-legend i { display: inline-block; width: 6px; height: 6px; margin-right: 4px; border-radius: 50%; vertical-align: 1px; }
.ts-instrument-modes { display: flex; flex-wrap: wrap; gap: 1px; padding: 12px; border-top: 1px solid var(--ts-line); background: rgba(151, 176, 210, .035); }
.ts-instrument-modes button { display: flex; flex: 1 1 auto; min-height: 42px; align-items: center; justify-content: center; gap: 9px; padding: 9px 14px; border: 1px solid transparent; border-radius: 8px; color: var(--ts-muted); background: transparent; font-family: var(--mono); font-size: 10.5px; font-weight: 500; letter-spacing: .1em; text-transform: uppercase; transition: color .25s ease, border-color .25s ease, background .25s ease; }
.ts-instrument-modes button i { color: var(--ts-faint); font-style: normal; font-size: 9px; }
.ts-instrument-modes button:hover { color: var(--ts-ink); background: rgba(151, 176, 210, .07); }
.ts-instrument-modes button.active { color: var(--ts-accent); border-color: rgba(77, 159, 255, .38); background: var(--ts-accent-soft); }
.ts-instrument-modes button.active i { color: var(--ts-accent); }

/* research rows */
.ts-rows { border-top: 1px solid var(--ts-line); }
.ts-row { display: grid; grid-template-columns: 64px minmax(0, 1fr) auto 40px; gap: clamp(16px, 3vw, 44px); align-items: center; padding: clamp(24px, 3vw, 38px) clamp(8px, 1.5vw, 20px); border-bottom: 1px solid var(--ts-line); transition: background .3s ease, padding-left .3s var(--ease); }
.ts-row:hover { background: rgba(77, 159, 255, .045); padding-left: clamp(16px, 2vw, 30px); }
.ts-row-num { color: var(--ts-accent); font-family: var(--mono); font-size: 13px; font-weight: 600; }
.ts-row-body { display: grid; gap: 6px; }
.ts-row-body strong { font-family: var(--display); font-size: clamp(21px, 2.2vw, 30px); font-weight: 600; letter-spacing: -.02em; line-height: 1.08; color: var(--ts-ink); }
.ts-row-body small { color: var(--ts-muted); font-size: 13.5px; line-height: 1.6; }
.ts-row-tag { color: var(--ts-faint); font-family: var(--mono); font-size: 10px; letter-spacing: .12em; text-transform: uppercase; white-space: nowrap; }
.ts-row-arrow { color: var(--ts-faint); font-size: 20px; text-align: right; transition: color .25s ease, transform .25s var(--ease); }
.ts-row:hover .ts-row-arrow { color: var(--ts-accent); transform: translateX(6px); }

/* publications */
.ts-pubs { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }
.ts-pub { display: flex; flex-direction: column; padding: clamp(26px, 2.6vw, 36px); border: 1px solid var(--ts-line); border-radius: 14px; background: var(--ts-panel); transition: border-color .3s ease, transform .35s var(--ease), box-shadow .35s ease; }
.ts-pub:hover { border-color: rgba(77, 159, 255, .42); transform: translateY(-4px); box-shadow: 0 24px 60px rgba(2, 8, 16, .5); }
.ts-pub-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 18px; margin-bottom: 22px; color: var(--ts-faint); font-family: var(--mono); font-size: 10px; letter-spacing: .14em; text-transform: uppercase; }
.ts-pub-status { padding: 4px 9px; border: 1px solid rgba(77, 159, 255, .32); border-radius: 6px; color: var(--ts-accent); background: var(--ts-accent-soft); }
.ts-pub h3 { margin: 0 0 16px; font-family: var(--display); font-size: clamp(21px, 1.9vw, 27px); font-weight: 600; letter-spacing: -.018em; line-height: 1.16; color: var(--ts-ink); }
.ts-pub h3 a { transition: color .2s ease; }
.ts-pub h3 a:hover { color: var(--ts-accent); }
.ts-pub > p:not(.ts-pub-meta) { margin: 0 0 26px; color: var(--ts-body); font-size: 14px; line-height: 1.78; }
.ts-pub-foot { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; margin-top: auto; padding-top: 20px; border-top: 1px solid var(--ts-line); }
.ts-pub-author { color: var(--ts-muted); font-family: var(--mono); font-size: 10.5px; letter-spacing: .1em; text-transform: uppercase; }
.ts-pub-links { display: flex; gap: 8px; }
.ts-pub-links a { padding: 7px 11px; border: 1px solid var(--ts-line-strong); border-radius: 7px; color: var(--ts-body); font-family: var(--mono); font-size: 9.5px; letter-spacing: .1em; text-transform: uppercase; transition: color .2s ease, border-color .2s ease, background .2s ease; }
.ts-pub-links a:hover { color: var(--ts-accent); border-color: rgba(77, 159, 255, .45); background: var(--ts-accent-soft); }
.ts-more { margin: 34px 0 0; }

/* plan */
.ts-plan { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(300px, 1fr); gap: clamp(32px, 4vw, 64px); align-items: start; }
.ts-phases { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1px; border: 1px solid var(--ts-line); border-radius: 14px; overflow: hidden; background: var(--ts-line); }
.ts-phase { position: relative; padding: clamp(24px, 2.4vw, 34px); background: var(--ts-panel); }
.ts-phase-tag { margin: 0 0 46px; color: var(--ts-accent); font-family: var(--mono); font-size: 10.5px; font-weight: 600; letter-spacing: .16em; }
.ts-phase h3 { margin: 0 0 12px; font-family: var(--display); font-size: 21px; font-weight: 600; letter-spacing: -.015em; color: var(--ts-ink); }
.ts-phase p { margin: 0; color: var(--ts-body); font-size: 13.5px; line-height: 1.75; }
.ts-log { padding: clamp(24px, 2.4vw, 32px); border: 1px solid var(--ts-line); border-radius: 14px; background: var(--ts-term); font-family: var(--mono); }
.ts-log-title { display: flex; align-items: center; gap: 12px; margin: 0 0 20px; color: var(--ts-muted); font-size: 10.5px; font-weight: 600; letter-spacing: .18em; }
.ts-log-title::after { content: ""; flex: 1; height: 1px; background: var(--ts-line); }
.ts-log ul { margin: 0; padding: 0; list-style: none; }
.ts-log li { display: grid; grid-template-columns: 74px 1fr; gap: 16px; padding: 13px 0; border-top: 1px solid var(--ts-line); color: var(--ts-body); font-size: 11.5px; line-height: 1.7; }
.ts-log li:first-child { border-top: 0; }
.ts-log time { color: var(--ts-faint); font-size: 10.5px; letter-spacing: .06em; }
.ts-log strong { color: var(--ts-ink); font-weight: 600; }
.ts-log-more { display: inline-block; margin-top: 18px; color: var(--ts-accent); font-size: 10.5px; letter-spacing: .12em; text-transform: uppercase; }
.ts-log-more span { display: inline-block; transition: transform .25s var(--ease); }
.ts-log-more:hover span { transform: translate(3px, -3px); }

/* contact */
.ts-contact { position: relative; padding: clamp(100px, 12vw, 170px) 0 0; border-top: 1px solid var(--ts-line); background: radial-gradient(ellipse 60% 55% at 50% 0%, rgba(77, 159, 255, .07), transparent 70%), var(--ts-bg-deep); text-align: center; }
.ts-contact .ts-label { justify-content: center; }
.ts-contact .ts-label::after { display: none; }
.ts-contact-title { margin: 0 0 20px; font-family: var(--display); font-size: clamp(48px, 7vw, 110px); font-weight: 700; letter-spacing: -.04em; line-height: .96; color: var(--ts-ink); }
.ts-contact-sub { max-width: 520px; margin: 0 auto 36px; color: var(--ts-body); font-size: 15px; line-height: 1.8; }
.ts-email { display: inline-flex; align-items: center; gap: 14px; padding-bottom: 8px; border-bottom: 1px solid var(--ts-line-strong); color: var(--ts-ink); font-family: var(--mono); font-size: clamp(14px, 1.8vw, 20px); font-weight: 500; letter-spacing: .04em; transition: color .25s ease, border-color .25s ease; }
.ts-email span { color: var(--ts-accent); transition: transform .25s var(--ease); }
.ts-email:hover { color: var(--ts-accent); border-color: rgba(77, 159, 255, .5); }
.ts-email:hover span { transform: translate(4px, -4px); }
.ts-contact .site-footer { margin-top: clamp(80px, 9vw, 130px); text-align: left; }

/* ---------- responsive ---------- */
@media (max-width: 1120px) {
  .ts-hero-inner { grid-template-columns: 1fr; }
  .ts-hero-term { max-width: 620px; }
  .ts-not small { position: static; display: block; margin-top: 18px; text-align: left; }
}
@media (max-width: 900px) {
  .ts-section-head { grid-template-columns: 1fr; gap: 26px; align-items: start; }
  .ts-manifesto { grid-template-columns: 1fr; }
  .ts-pillars { grid-template-columns: 1fr; }
  .ts-pubs { grid-template-columns: 1fr; }
  .ts-plan { grid-template-columns: 1fr; }
  .ts-phases { grid-template-columns: 1fr; }
  .ts-row { grid-template-columns: 44px minmax(0, 1fr) 32px; }
  .ts-row-tag { display: none; }
}
@media (max-width: 560px) {
  .ts-hero { padding-top: 128px; }
  .ts-hero-actions .ts-btn { flex: 1 1 auto; }
  .ts-scroll-cue { display: none; }
  .ts-term-body { padding: 16px; }
  .ts-meters { display: none; }
  .ts-instrument-readout { position: static; max-width: none; padding: 16px 18px 0; }
  .ts-instrument-modes button span { font-size: 9.5px; }
}
@media (prefers-reduced-motion: reduce) {
  .ts-ticker-track { animation: none; }
  .ts-dot, .ts-caret { animation: none; }
  .ts-not s::after { width: 106%; }
}
