/* ============================================================
   Py-Stack EDA — section & component styles
   ============================================================ */

/* shared section heads */
.sec-head { max-width: 760px; margin-bottom: clamp(44px, 6vw, 72px); }
.sec-head--center { margin-inline: auto; text-align: center; }
.sec-head__lead { margin-top: 22px; }
.sec-head--center .sec-head__lead { margin-inline: auto; }

/* tags */
.tags { display: flex; flex-wrap: wrap; gap: 7px; }
.tag { font-size: 11.5px; color: var(--ink-3); border: 1px solid var(--line-soft); border-radius: 6px; padding: 4px 9px; background: var(--bg); letter-spacing: 0.01em; white-space: nowrap; }

.hl { color: var(--ink); font-weight: 600; }
strong.hl { background: linear-gradient(transparent 62%, var(--accent-dim) 0); padding: 0 2px; }

.dot-run { width: 7px; height: 7px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 8px var(--accent); animation: pulse 1.4s ease-in-out infinite; }
@keyframes pulse { 0%,100%{opacity:1} 50%{opacity:.35} }
@media (prefers-reduced-motion: reduce){ .dot-run{ animation:none } }

/* ============================================================
   THESIS
   ============================================================ */
.thesis__head { max-width: 880px; margin-bottom: clamp(40px, 5vw, 64px); }
.thesis__title { max-width: 20ch; }
.thesis__grid { display: grid; grid-template-columns: 1.15fr 1fr; gap: clamp(34px, 5vw, 72px); align-items: start; }
@media (max-width: 900px){ .thesis__grid { grid-template-columns: 1fr; gap: 40px; } }

.compare { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.compare__col { border: 1px solid var(--line-soft); border-radius: 12px; padding: 22px 20px; background: var(--bg-1); }
.compare__col--new { border-color: var(--accent-line); background: linear-gradient(180deg, var(--accent-dim), transparent); }
.compare__cap { font-size: 12px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--ink-4); display: block; margin-bottom: 16px; }
.compare__col--new .compare__cap { color: var(--accent); }
.compare__col ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 11px; }
.compare__col li { font-size: 14.5px; color: var(--ink-2); padding-left: 20px; position: relative; line-height: 1.35; }
.compare__col--old li { color: var(--ink-3); }
.compare__col--old li::before { content: "\00d7"; position: absolute; left: 2px; color: var(--ink-4); }
.compare__col--new li::before { content: ""; position: absolute; left: 3px; top: 7px; width: 9px; height: 9px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 8px -1px var(--accent); }

/* ============================================================
   ARCHITECTURE
   ============================================================ */
.arch { position: relative; }
.arch__layers { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 12px; position: relative; }
.arch__layer {
  display: grid; grid-template-columns: 64px 1fr 230px; gap: 28px; align-items: center;
  background: var(--bg-1); border: 1px solid var(--line-soft); border-radius: 14px;
  padding: 26px 28px; position: relative; transition: border-color .25s, transform .25s, background .25s;
}
.arch__layer:hover { border-color: var(--accent-line); transform: translateX(4px); }
.arch__layer:hover .arch__n { color: var(--accent); }
.arch__n { font-size: 30px; font-weight: 600; color: var(--ink-4); letter-spacing: -0.02em; transition: color .25s; }
.arch__tier { font-size: 11px; letter-spacing: 0.18em; text-transform: uppercase; color: var(--accent); display: block; margin-bottom: 7px; }
.arch__title { margin-bottom: 8px; }
.arch__blurb { font-size: 14.5px; color: var(--ink-3); line-height: 1.5; margin: 0; max-width: 60ch; }
.arch__tags { justify-self: end; }
.arch__tags .tags { justify-content: flex-end; }
.arch__flow { position: absolute; left: -34px; top: 0; bottom: 0; width: 1px; display: none; }

@media (max-width: 860px){
  .arch__layer { grid-template-columns: 48px 1fr; gap: 16px 18px; padding: 22px; }
  .arch__tags { grid-column: 1 / -1; justify-self: start; margin-top: 2px; }
  .arch__tags .tags { justify-content: flex-start; }
}

/* ============================================================
   IDE
   ============================================================ */
.ide { max-width: 1080px; margin-inline: auto; }
.ide__grid { display: grid; grid-template-columns: 320px 1fr; min-height: 420px; }
@media (max-width: 880px){ .ide__grid { grid-template-columns: 1fr; } }

.ide__chat { border-right: 1px solid var(--line-soft); padding: 18px; background: var(--bg-1); }
@media (max-width: 880px){ .ide__chat { border-right: 0; border-bottom: 1px solid var(--line-soft); } }

.chat { display: flex; flex-direction: column; gap: 16px; }
.chat__msg { display: flex; flex-direction: column; gap: 7px; }
.chat__role { font-size: 11px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--ink-4); display: inline-flex; align-items: center; gap: 6px; }
.chat__dot { width: 6px; height: 6px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 7px var(--accent); }
.chat__msg p { margin: 0; font-size: 14px; line-height: 1.5; color: var(--ink-2); }
.chat__msg--user p { color: var(--ink); }
.chat__msg--agent { background: var(--bg-2); border: 1px solid var(--line-soft); border-radius: 11px; padding: 13px 14px; }
.chat__msg code { font-family: var(--mono); font-size: 12.5px; color: var(--accent); }
.chat__thinking { display: inline-flex; align-items: center; gap: 8px; color: var(--ink-3) !important; font-family: var(--mono); font-size: 12.5px; }
.chat__thinking i { width: 5px; height: 5px; border-radius: 50%; background: var(--accent); display: inline-block; animation: blink 1.2s infinite; }
.chat__thinking i:nth-child(2){ animation-delay:.2s } .chat__thinking i:nth-child(3){ animation-delay:.4s; margin-right: 4px; }
@keyframes blink { 0%,80%,100%{opacity:.25} 40%{opacity:1} }

.ide__editor { display: flex; flex-direction: column; min-width: 0; }
.code { margin: 0; padding: 18px 18px 14px; font-family: var(--mono); font-size: 13px; line-height: 1.62; overflow-x: auto; flex: 1; background: var(--bg); }
.code__ln { display: flex; gap: 16px; white-space: pre; }
.code__num { color: var(--ink-4); user-select: none; text-align: right; width: 20px; flex: none; opacity: .65; }
.code__txt { color: var(--ink-2); }
.t-kw { color: oklch(0.78 0.12 300); }
.t-str { color: oklch(0.82 0.12 150); }
.t-num { color: oklch(0.83 0.11 70); }
.t-cmt { color: var(--ink-4); font-style: italic; }
.t-dec { color: var(--accent); }

.ide__out { border-top: 1px solid var(--line-soft); background: var(--bg-1); padding: 14px 18px 18px; }
.ide__out-bar { display: flex; align-items: center; gap: 12px; font-size: 12px; margin-bottom: 12px; }

/* bode */
.bode { width: 100%; }
.bode__head { display: flex; align-items: center; gap: 16px; font-size: 11.5px; color: var(--ink-3); margin-bottom: 6px; }
.bode__head .spacer { flex: 1; }
.bode__sw { display: inline-block; width: 10px; height: 2px; vertical-align: middle; margin-right: 5px; }
.bode__sw--g { background: var(--accent); } .bode__sw--p { background: var(--ink-3); }
.bode__metric { color: var(--ink-3); } .bode__metric b { color: var(--ink); }
.bode__svg { width: 100%; height: auto; display: block; }
.bode__grid { stroke: var(--line-soft); stroke-width: 1; }
.bode__axis { font-family: var(--mono); font-size: 8.5px; fill: var(--ink-4); text-anchor: middle; }
.bode__line { fill: none; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; stroke-dasharray: 1; stroke-dashoffset: 1; }
.bode__line--g { stroke: var(--accent); }
.bode__line--p { stroke: var(--ink-3); stroke-width: 1.5; stroke-dasharray: 3 3; }
.bode__svg.is-in .bode__line--g { animation: dash 1.1s ease forwards .1s; }
.bode__svg.is-in .bode__line--p { animation: dashp 1.1s ease forwards .25s; }
@keyframes dashp { to { stroke-dashoffset: 0; } }
@media (prefers-reduced-motion: reduce){ .bode__line { stroke-dashoffset: 0 !important; animation: none !important; } }

/* ============================================================
   MULTI-PHYSICS
   ============================================================ */
.phys-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
@media (max-width: 860px){ .phys-grid { grid-template-columns: 1fr; max-width: 460px; margin-inline: auto; } }
.phys { display: flex; flex-direction: column; }
.phys__viz { height: 132px; border-radius: 9px; overflow: hidden; margin-bottom: 18px; background: var(--bg); border: 1px solid var(--line-soft); display: flex; align-items: center; justify-content: center; position: relative; }
.phys__blurb { font-size: 14px; color: var(--ink-3); line-height: 1.5; margin: 8px 0 16px; flex: 1; }

.thermal { display: grid; width: 100%; height: 100%; gap: 0; position: relative; }
.thermal i { display: block; width: 100%; aspect-ratio: 1; }
.thermal__tag { position: absolute; top: 8px; right: 9px; font-size: 10.5px; color: var(--bg); background: var(--warm); padding: 2px 7px; border-radius: 5px; font-weight: 600; }

.emviz { width: 100%; height: 100%; }
.emviz__ring { fill: none; stroke: var(--accent); stroke-width: 1; opacity: 0; transform-origin: 64px 65px; animation: ring 2.6s ease-out infinite; }
@keyframes ring { 0%{opacity:.5; transform:scale(.4)} 70%{opacity:0} 100%{opacity:0; transform:scale(1)} }
@media (prefers-reduced-motion: reduce){ .emviz__ring{ animation:none; opacity:.3 } }
.emviz__trace { stroke: var(--ink-2); stroke-width: 2; stroke-linecap: round; }
.emviz__trace--victim { stroke: var(--accent); }
.emviz__couple { fill: none; stroke: var(--ink-4); stroke-width: 1.2; stroke-dasharray: 3 3; }
.emviz__lbl { font-family: var(--mono); font-size: 8px; fill: var(--ink-4); text-anchor: middle; }

.noiseviz { width: 100%; height: 100%; }
.noiseviz__axis { stroke: var(--line); stroke-width: 1; }
.noiseviz__wave { fill: none; stroke: var(--accent); stroke-width: 1.4; stroke-linejoin: round; }

/* ============================================================
   AI CORE
   ============================================================ */
.ai-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
@media (max-width: 820px){ .ai-grid { grid-template-columns: 1fr; max-width: 520px; margin-inline: auto; } }
.ai { display: flex; flex-direction: column; }

.pr { margin-bottom: 18px; }
.pr__svg { width: 100%; height: auto; display: block; background: var(--bg); border: 1px solid var(--line-soft); border-radius: 9px; }
.pr__die { fill: none; stroke: var(--line); stroke-width: 1; stroke-dasharray: 3 3; }
.pr__blk { fill: var(--bg-3); stroke: var(--accent-line); stroke-width: 1; transition: x .8s cubic-bezier(.4,.7,.3,1), y .8s cubic-bezier(.4,.7,.3,1), width .8s, height .8s; }
.pr__svg.opt .pr__blk { fill: var(--accent-dim); stroke: var(--accent); }
@media (prefers-reduced-motion: reduce){ .pr__blk { transition: none; } }
.pr__metric { display: flex; align-items: center; justify-content: space-between; font-size: 12px; color: var(--ink-3); padding: 0 2px; }
.pr__metric b { color: var(--ink-4); font-size: 15px; transition: color .4s; }
.pr__metric b.drop { color: var(--accent); }

.drc { list-style: none; margin: 0 0 18px; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.drc__row { display: flex; align-items: center; gap: 11px; padding: 9px 12px; border-radius: 8px; background: var(--bg); border: 1px solid var(--line-soft); opacity: 0; transform: translateX(-8px); transition: opacity .4s, transform .4s; }
.drc__row.is-in { opacity: 1; transform: none; }
.drc__ic { width: 19px; height: 19px; border-radius: 5px; display: grid; place-items: center; font-family: var(--mono); font-size: 12px; flex: none; color: var(--bg); }
.drc__row--pass .drc__ic { background: var(--accent); }
.drc__row--flag .drc__ic { background: var(--warm); font-weight: 700; }
.drc__name { font-size: 13px; color: var(--ink-2); flex: 1; }
.drc__st { font-size: 11px; color: var(--ink-4); }
.drc__row--flag .drc__st { color: var(--warm); }

/* ============================================================
   CLOUD
   ============================================================ */
.cloud__panel { max-width: 920px; margin-inline: auto; }
.cloud__jobs { padding: 22px 24px; display: flex; flex-direction: column; gap: 16px; }
.job { display: grid; grid-template-columns: 1fr auto 200px 44px; gap: 14px; align-items: center; }
@media (max-width: 700px){ .job { grid-template-columns: 1fr 50px; } .job__st { display: none; } .job__bar { grid-column: 1 / -1; } }
.job__name { font-size: 13px; color: var(--ink); }
.job__st { font-size: 11.5px; color: var(--ink-4); }
.job__bar { height: 6px; background: var(--bg-3); border-radius: 999px; overflow: hidden; }
.job__fill { display: block; height: 100%; background: linear-gradient(90deg, var(--accent-2), var(--accent)); border-radius: 999px; width: 0; transition: width 1.1s cubic-bezier(.3,.7,.3,1); }
.job__pct { font-size: 11.5px; color: var(--ink-3); text-align: right; }
.cloud__stats { display: grid; grid-template-columns: repeat(3, 1fr); border-top: 1px solid var(--line-soft); }
.cstat { padding: 18px 24px; border-right: 1px solid var(--line-soft); display: flex; flex-direction: column; gap: 3px; }
.cstat:last-child { border-right: 0; }
.cstat__v { font-family: var(--serif); font-size: 24px; color: var(--ink); letter-spacing: -0.01em; }
.cstat__k { font-size: 11px; letter-spacing: 0.08em; color: var(--ink-4); text-transform: uppercase; }

/* ============================================================
   TEAM
   ============================================================ */
.team__top { display: grid; grid-template-columns: 1.2fr 1fr; gap: clamp(28px, 4vw, 56px); align-items: end; margin-bottom: clamp(36px, 5vw, 56px); }
@media (max-width: 880px){ .team__top { grid-template-columns: 1fr; gap: 28px; } .team__top .sec-head { margin-bottom: 0; } }
.team__org { display: flex; gap: 18px; align-items: flex-start; padding: 22px; }
.team__org-mark { width: 46px; height: 46px; object-fit: contain; flex: none; }
.team__org-word { height: 22px; width: auto; margin-bottom: 10px; }
.team__org-blurb { font-size: 13.5px; color: var(--ink-3); line-height: 1.5; margin: 0; }

.team__grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
@media (max-width: 860px){ .team__grid { grid-template-columns: 1fr; max-width: 460px; margin-inline: auto; } }
.member { display: flex; flex-direction: column; }
.avatar { width: 52px; height: 52px; border-radius: 50%; display: grid; place-items: center; background: var(--accent-dim); border: 1px solid var(--accent-line); margin-bottom: 18px; }
.avatar__txt { font-size: 16px; font-weight: 600; color: var(--accent); letter-spacing: 0.02em; }
.member__name { margin-bottom: 5px; }
.member__role { font-size: 12px; color: var(--accent); margin: 0 0 16px; letter-spacing: 0.01em; }
.member__points { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 9px; }
.member__points li { font-size: 13.5px; color: var(--ink-3); line-height: 1.4; padding-left: 16px; position: relative; }
.member__points li::before { content: ""; position: absolute; left: 0; top: 8px; width: 5px; height: 5px; border-radius: 50%; background: var(--ink-4); }

/* ============================================================
   CTA + FOOTER
   ============================================================ */
.cta { text-align: center; }
.cta__inner { max-width: 720px; }
.cta__title { margin-bottom: 22px; }
.cta__lead { margin: 0 auto 30px; }
.cta__form { display: flex; gap: 10px; max-width: 460px; margin: 0 auto; }
.cta__input { flex: 1; background: var(--bg-1); border: 1px solid var(--line); border-radius: 10px; padding: 13px 16px; color: var(--ink); font-size: 14px; outline: none; transition: border-color .2s; }
.cta__input::placeholder { color: var(--ink-4); }
.cta__input:focus { border-color: var(--accent); }
.cta__note { font-size: 12px; color: var(--ink-4); margin-top: 16px; }
@media (max-width: 480px){ .cta__form { flex-direction: column; } }

.footer { border-top: 1px solid var(--line-soft); padding-block: 56px 30px; position: relative; z-index: 1; }
.footer__inner { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 32px; padding-bottom: 40px; }
@media (max-width: 760px){ .footer__inner { grid-template-columns: 1fr 1fr; } .footer__brand { grid-column: 1 / -1; } }
.footer__tag { font-size: 13.5px; margin: 16px 0 0; max-width: 30ch; }
.footer__cols { display: contents; }
.footer__col { display: flex; flex-direction: column; gap: 10px; }
.footer__h { font-size: 11px; letter-spacing: 0.16em; text-transform: uppercase; color: var(--ink-4); margin-bottom: 4px; }
.footer__col a { font-size: 14px; color: var(--ink-3); transition: color .2s; }
.footer__col a:hover { color: var(--accent); }
.footer__built { display: flex; flex-direction: column; gap: 10px; }
.footer__logo { height: 24px; width: auto; align-self: flex-start; opacity: .9; }
.footer__base { display: flex; justify-content: space-between; padding-top: 24px; border-top: 1px solid var(--line-soft); font-size: 12px; color: var(--ink-4); flex-wrap: wrap; gap: 8px; }
.footer__base .mono { font-size: 12px; }
