/* Programming page only. */
.p-center { text-align: center; }
.p-page .s-head { margin-bottom: 18px; }
.p-bar { display: flex; align-items: center; gap: 6px; height: 32px; padding: 0 12px; }
.p-bar i, .p-address i { flex: none; width: 10px; height: 10px; border-radius: 50%; background: #ff6b81; }
.p-bar i:nth-child(2), .p-address i:nth-child(2) { background: #ffd166; }
.p-bar i:nth-child(3), .p-address i:nth-child(3) { background: #4ade80; }
.p-bar span { margin-left: 10px; font: 11px Consolas, monospace; color: #b89ad4; }

/* ===== 1. Opening scene ===== */
.p-hero { height: 800px; background: radial-gradient(ellipse at 18% 62%, rgba(134, 40, 210, .65), transparent 48%), linear-gradient(160deg, #1b0a2c, #240c3f 55%, #16071f); }
.p-hero::before { content: ""; position: absolute; inset: 0; background-image: radial-gradient(rgba(210, 160, 255, .16) 1.2px, transparent 1.6px); background-size: 26px 26px; -webkit-mask-image: linear-gradient(100deg, #000, transparent 75%); mask-image: linear-gradient(100deg, #000, transparent 75%); }
.p-hero .hero-copy { top: 186px; width: 480px; }
.p-hero .eyebrow { font-size: 22px; }
.p-hero .hero-copy h1 { font-size: 48px; }
.p-hero .lead { width: 440px; margin-bottom: 28px; }
.p-actions { display: flex; align-items: center; gap: 16px; }
.p-actions .btn { height: 56px; }
.p-ghost { display: grid; place-items: center; height: 56px; padding: 0 26px; border-radius: 99px; font-size: 15px; border: 1.5px solid rgba(220, 180, 255, .5); transition: background .25s; }
.p-ghost:hover { background: rgba(170, 100, 235, .25); }

.p-lab.hero-art { top: 138px; }
.p-editor { position: absolute; z-index: 2; left: 40px; top: 0; width: 470px; overflow: hidden; border-radius: 18px; background: rgba(15, 4, 26, .96); border: 1px solid rgba(190, 130, 240, .35); box-shadow: 0 30px 60px rgba(0, 0, 0, .55), 0 0 40px rgba(150, 60, 230, .35); text-align: left; }
.p-editor .p-bar, .p-preview .p-bar { border-bottom: 1px solid rgba(190, 130, 240, .22); }
.p-code { padding: 14px 0 16px; list-style: none; counter-reset: line; font: 13.5px/2 Consolas, Alexandria, monospace; }
.p-code li { position: relative; min-height: 27px; margin-left: 46px; counter-increment: line; white-space: pre; }
.p-code li::before { content: counter(line); position: absolute; left: -32px; top: 0; color: #5e4477; }
.p-code li.typing span:last-child::after, .p-code li.typing::after { content: ""; }
.p-code li.typing::after { display: inline-block; width: 8px; height: 15px; margin-left: 2px; vertical-align: middle; background: #d9a8ff; animation: p-blink .8s steps(1) infinite; }
@keyframes p-blink { 50% { opacity: 0; } }
.p-code .k { color: #ff8ad1; } .p-code .v { color: #8fd3ff; } .p-code .f { color: #c9a0ff; } .p-code .s { color: #9ee6a8; } .p-code .n { color: #ffc66d; } .p-code .p { color: #d8cbe6; }

.p-preview { position: absolute; z-index: 3; left: 310px; top: 196px; width: 330px; overflow: hidden; border-radius: 18px; background: #fbf8ff; box-shadow: 0 30px 60px rgba(0, 0, 0, .55), 0 0 0 5px rgba(180, 100, 250, .28); }
.p-preview .p-bar { background: #1c0830; }
.p-canvas { display: flex; flex-direction: column; gap: 8px; padding: 10px 12px; }
.p-canvas [data-part] { opacity: 0; translate: 0 14px; transition: opacity .45s, translate .45s cubic-bezier(.2, .9, .3, 1.4); }
.p-canvas [data-part].built { opacity: 1; translate: 0 0; }
.b-bar { display: flex; align-items: center; gap: 8px; color: #3b0f4f; }
.b-bar b { margin-left: auto; font: 700 14px Poppins, Alexandria, sans-serif; }
.b-bar i { width: 28px; height: 6px; border-radius: 3px; background: #d9c3ee; }
.b-banner { display: grid; place-items: center; height: 60px; border-radius: 12px; font-size: 18px; font-weight: 700; color: #fff; background: linear-gradient(120deg, #a52fd0, #4d1285); }
.b-items { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.b-items i { height: 42px; border-radius: 10px; background: linear-gradient(#e9d9f8 62%, #fff 62%); border: 1px solid #e3d2f3; }
.b-chart { display: flex; align-items: flex-end; gap: 7px; height: 44px; padding: 6px 8px; border-radius: 10px; background: #f1e6fb; }
.b-chart i { flex: 1; height: 35%; border-radius: 3px; background: #8b35d6; }
.b-chart i:nth-child(2n) { height: 62%; } .b-chart i:nth-child(3n) { height: 94%; }
.b-button { display: grid; place-items: center; height: 32px; border-radius: 99px; font-size: 12px; font-weight: 600; color: #fff; background: #3b0f4f; }
.p-toast { position: absolute; z-index: 4; left: 70px; top: 376px; display: flex; align-items: center; gap: 10px; padding: 12px 18px; border-radius: 14px; font: 600 13px Consolas, monospace; color: #fff; background: #14291f; border: 1px solid #36c275; box-shadow: 0 16px 30px rgba(0, 0, 0, .4); opacity: 0; translate: 0 18px; transition: opacity .4s, translate .4s; }
.p-toast b { display: grid; place-items: center; width: 24px; height: 24px; border-radius: 50%; color: #08210f; background: #4ade80; }
.p-toast.show { opacity: 1; translate: 0 0; }
.anim .p-editor { animation: p-in-left 1s cubic-bezier(.2, .9, .25, 1) .3s backwards, float 7s ease-in-out 1.4s infinite; }
.anim .p-preview { animation: p-in-up 1s cubic-bezier(.2, .9, .25, 1) .6s backwards, float 6s ease-in-out 2s infinite; }
@keyframes p-in-left { from { opacity: 0; translate: -90px 0; } }
@keyframes p-in-up { from { opacity: 0; translate: 0 90px; } }
.p-page { padding-top: 1px; }

/* ===== 2. Device preview ===== */
.p-devices { padding: 60px 0 56px; }
.p-switches { display: flex; flex-direction: column; align-items: center; gap: 12px; margin-bottom: 26px; }
.p-switch { display: flex; gap: 6px; padding: 6px; border-radius: 99px; background: #fff; box-shadow: 0 10px 24px rgba(90, 30, 145, .13); }
.p-switch button { height: 40px; padding: 0 22px; border: 0; border-radius: 99px; cursor: pointer; font: 600 13px Alexandria, sans-serif; color: var(--ink); background: transparent; transition: background .25s, color .25s; }
.p-switch button[aria-pressed="true"] { color: #fff; background: linear-gradient(90deg, #a52fd0, #641aa6); }
.p-switch.dark { background: #26083f; }
.p-switch.dark button { color: #e6d3f8; }
.p-switch.dark button[aria-pressed="true"] { color: #fff; }
.p-stage { display: flex; align-items: center; justify-content: center; height: 560px; margin: 0 40px; border-radius: 30px; background: radial-gradient(circle at 50% 40%, #6a1b9a, #26083f 70%); }
.p-device { --app: #2f7d5b; width: 880px; max-width: calc(100% - 40px); height: 490px; display: flex; flex-direction: column; overflow: hidden; background: #fff; border: 8px solid #12031f; border-radius: 18px; box-shadow: 0 30px 55px rgba(0, 0, 0, .5); transition: width .6s cubic-bezier(.4, 0, .2, 1), height .6s cubic-bezier(.4, 0, .2, 1), border-radius .6s, border-width .6s; }
.p-device[data-device="tablet"] { width: 500px; height: 520px; border-width: 14px; border-radius: 34px; }
.p-device[data-device="phone"] { width: 280px; height: 530px; border-width: 10px; border-radius: 42px; }
.p-address { display: flex; flex: none; align-items: center; gap: 6px; height: 34px; padding: 0 14px; background: #efe9f5; }
.p-address span { flex: 1; margin: 0 8px; padding: 2px 12px; overflow: hidden; border-radius: 99px; font: 11px Consolas, monospace; white-space: nowrap; text-align: center; color: #6d4f88; background: #fff; }
.p-screen { flex: 1; overflow: hidden; container: app / inline-size; color: #1f1f28; }
.a-nav { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 22px; border-bottom: 1px solid #eee; }
.a-nav b { font-size: 15px; color: var(--app); }
.a-nav ul { display: flex; gap: 22px; list-style: none; font-size: 12px; }
.a-menu { display: none; width: 20px; height: 14px; border-top: 2px solid #333; border-bottom: 2px solid #333; position: relative; }
.a-menu::after { content: ""; position: absolute; inset: 4px 0 auto; height: 2px; background: #333; }
.a-body { padding: 18px 22px; animation: p-fade .45s ease; }
@keyframes p-fade { from { opacity: 0; translate: 0 10px; } }
.a-banner { display: flex; flex-direction: column; align-items: flex-start; justify-content: center; gap: 14px; height: 168px; padding: 0 34px; border-radius: 16px; color: #fff; background: linear-gradient(120deg, var(--app), #1d1330); transition: background .4s; }
.a-banner h4 { font-size: 24px; line-height: 1.7; }
.a-banner span { padding: 8px 22px; border-radius: 99px; font-size: 12px; font-weight: 600; color: #1d1330; background: #fff; }
.a-cards { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin-top: 16px; }
.a-cards > div { padding: 9px; border-radius: 14px; border: 1px solid #ececf2; }
.a-cards i { display: block; height: 82px; border-radius: 10px; background: var(--app); opacity: .18; }
.a-cards b { display: block; margin-top: 8px; font-size: 12.5px; }
.a-cards small { font-size: 12px; font-weight: 600; color: var(--app); }
@container app (max-width: 560px) {
  .a-cards { grid-template-columns: 1fr 1fr; }
  .a-nav ul { gap: 12px; font-size: 11px; }
  .a-banner h4 { font-size: 19px; }
}
@container app (max-width: 340px) {
  .a-nav { padding: 12px 14px; }
  .a-nav ul { display: none; }
  .a-menu { display: block; }
  .a-body { padding: 12px; }
  .a-banner { align-items: center; height: 150px; padding: 0 14px; text-align: center; }
  .a-banner h4 { font-size: 16px; }
  .a-cards { gap: 8px; margin-top: 10px; }
  .a-cards i { height: 62px; }
  .a-cards b { font-size: 11px; }
}

/* ===== 3. File explorer ===== */
.p-builds { padding: 56px 0 66px; color: #fff; background: #1a0829; }
.p-builds .section-tag { color: #c687f5; }
.p-builds .s-head { margin-bottom: 34px; }
.p-ide { display: grid; grid-template-columns: 1fr 290px; margin: 0 63px; overflow: hidden; border-radius: 24px; border: 1px solid rgba(190, 130, 240, .3); background: #230b39; box-shadow: 0 30px 60px rgba(0, 0, 0, .4); }
.p-tree { grid-column: 2; grid-row: 1; padding: 20px 12px; text-align: left; background: #14051f; }
.p-tree p { margin-bottom: 10px; font: 12px Consolas, monospace; color: #8d6fa8; }
.p-tree button { display: flex; align-items: center; gap: 12px; width: 100%; height: 52px; padding: 0 14px; border: 0; border-left: 3px solid transparent; cursor: pointer; font: 13.5px Consolas, monospace; color: #cbb4e2; background: transparent; transition: background .25s, border-color .25s; }
.p-tree button:hover { background: rgba(150, 70, 220, .14); }
.p-tree button[aria-selected="true"] { color: #fff; border-left-color: #c97bff; background: rgba(150, 70, 220, .3); }
.p-tree svg { width: 20px; height: 20px; color: #c97bff; }
.p-docs { grid-column: 1; grid-row: 1; min-height: 360px; padding: 30px 40px; }
.p-docs article[hidden] { display: none; }
.anim .p-docs article { animation: p-fade .4s ease; }
.p-comment { font: 12.5px Consolas, monospace; color: #6fcf8e; text-align: right; }
.p-doc-icon { display: grid; place-items: center; width: 72px; height: 72px; margin: 14px 0 12px; border-radius: 20px; background: linear-gradient(135deg, #a52fd0, #4d1285); box-shadow: 0 0 28px rgba(180, 90, 255, .5); }
.p-doc-icon svg { width: 40px; height: 40px; }
.p-docs h3 { font-size: 26px; line-height: 1.7; }
.p-docs article > p:not(.p-comment) { font-size: 14.5px; line-height: 2.1; color: #ddcaf0; }
.p-docs ul { display: flex; flex-wrap: wrap; gap: 10px; margin: 18px 0 22px; list-style: none; }
.p-docs li { padding: 8px 14px; border-radius: 10px; font-size: 12.5px; background: rgba(255, 255, 255, .07); border: 1px solid rgba(210, 165, 255, .28); }
.p-docs a { display: inline-flex; align-items: center; gap: 8px; font-size: 13.5px; font-weight: 600; color: #d9a8ff; }
.p-docs a svg { width: 17px; height: 17px; }

/* ===== 4. Timeline ===== */
.p-timeline { padding: 62px 0 30px; }
.p-track { --fill: 1; position: relative; max-width: 980px; margin: 0 auto; list-style: none; }
.p-track::before, .p-track::after { content: ""; position: absolute; top: 0; bottom: 0; left: 50%; width: 4px; margin-left: -2px; border-radius: 4px; background: #dcc8ef; }
.p-track::after { background: linear-gradient(#c04be0, #5a1596); transform: scaleY(var(--fill)); transform-origin: top; }
.p-track > li { position: relative; display: flex; justify-content: flex-start; padding-bottom: 28px; }
.p-track > li:nth-child(even) { justify-content: flex-end; }
.p-node { position: absolute; z-index: 1; top: 24px; left: 50%; display: grid; place-items: center; width: 46px; height: 46px; margin-left: -23px; border-radius: 50%; font-weight: 700; color: #7c5a99; background: #fff; border: 3px solid #dcc8ef; transition: background .35s, color .35s, border-color .35s, box-shadow .35s; }
.reached .p-node { color: #fff; border-color: #fff; background: linear-gradient(135deg, #a52fd0, #5a1596); box-shadow: 0 0 0 6px rgba(165, 47, 208, .2); }
.p-phase { width: 430px; padding: 20px 24px; border-radius: 22px; background: #fff; box-shadow: 0 16px 34px rgba(80, 25, 135, .14); }
.p-phase > small { display: inline-block; padding: 3px 12px; border-radius: 99px; font-size: 11px; font-weight: 600; color: var(--violet); background: #f1e6fb; }
.p-phase h3 { margin-top: 8px; font-size: 19px; line-height: 1.7; }
.p-phase p { font-size: 13px; line-height: 2; color: #4a2c66; }
.p-phase ul { display: flex; gap: 8px; margin: 10px 0 12px; list-style: none; }
.p-phase ul li { padding: 4px 11px; border-radius: 8px; font-size: 11.5px; border: 1px solid #e0d1ef; }
.p-phase code { display: block; padding: 8px 12px; overflow: hidden; border-radius: 10px; font: 11.5px Consolas, monospace; white-space: nowrap; text-overflow: ellipsis; text-align: left; color: #d8cbe6; background: #17061f; }
.p-phase code b { color: #4ade80; }

/* ===== 5. Technology strips ===== */
.p-tech { padding: 40px 0 46px; overflow: hidden; }
.p-marquee { overflow: hidden; padding: 8px 0; }
.p-marquee ul { display: flex; width: max-content; list-style: none; }
.p-marquee li { margin-right: 16px; padding: 13px 26px; border-radius: 16px; font: 600 15px Poppins, sans-serif; white-space: nowrap; color: #3b0f4f; background: #fff; box-shadow: 0 8px 18px rgba(90, 30, 145, .12); }
.anim .p-marquee ul { animation: p-run 32s linear infinite; }
.anim .p-marquee:nth-child(2) ul { animation-direction: reverse; }
.anim .p-marquee:hover ul { animation-play-state: paused; }
@keyframes p-run { to { translate: -50% 0; } }
html:not(.anim) .p-marquee ul { flex-wrap: wrap; justify-content: center; width: auto; row-gap: 12px; }
html:not(.anim) .p-marquee li[aria-hidden] { display: none; }

/* ===== 6. Projects ===== */
.p-projects { padding: 36px 0 54px; }
.p-cards { display: grid; grid-template-columns: repeat(3, 336px); justify-content: center; gap: 25px; }
.p-card { overflow: hidden; border-radius: 24px; background: #fff; box-shadow: 0 18px 38px rgba(80, 25, 135, .16); transition: transform .3s, box-shadow .3s; }
.p-card:hover { transform: translateY(-8px); box-shadow: 0 28px 46px rgba(80, 25, 135, .26); }
.p-shot { height: 190px; background: linear-gradient(140deg, #3b0f4f, #1d0731); }
.k-bars { display: flex; align-items: flex-end; gap: 9px; height: 140px; margin: 0 22px; }
.k-bars i { flex: 1; height: 30%; border-radius: 6px 6px 0 0; background: linear-gradient(#d58cff, #6a1b9a); transition: height .5s; }
.k-bars i:nth-child(2n) { height: 58%; } .k-bars i:nth-child(3n) { height: 88%; }
.p-card:hover .k-bars i:nth-child(odd) { height: 76%; }
.k-list { display: grid; gap: 8px; margin: 4px 30px; }
.k-list i { display: flex; align-items: center; gap: 12px; height: 31px; padding: 0 10px; border-radius: 9px; background: rgba(255, 255, 255, .1); transition: translate .4s; }
.k-list b { width: 20px; height: 20px; border-radius: 6px; background: #c97bff; }
.k-list span { width: 60%; height: 6px; border-radius: 3px; background: rgba(255, 255, 255, .5); }
.p-card:hover .k-list i:nth-child(even) { translate: -10px 0; }
.k-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 9px; margin: 6px 24px; }
.k-grid i { height: 38px; border-radius: 9px; background: rgba(255, 255, 255, .12); transition: background .4s; }
.k-grid i:nth-child(4n+1) { background: #8b35d6; }
.p-card:hover .k-grid i:nth-child(3n+2) { background: #d58cff; }
.p-card-text { padding: 18px 22px 22px; }
.p-card-text > small { font-size: 11.5px; font-weight: 600; color: var(--violet); }
.p-card-text h3 { font-size: 19px; line-height: 1.8; }
.p-card-text p { font-size: 13px; line-height: 2; color: #4a2c66; }
.p-card-text ul { display: flex; gap: 8px; margin-top: 12px; list-style: none; }
.p-card-text li { padding: 4px 12px; border-radius: 99px; font-size: 11.5px; background: #f1e6fb; }

/* ===== 7. Quality scores ===== */
.p-scores { padding: 56px 0 54px; color: #fff; background: radial-gradient(ellipse at 88% 30%, rgba(142, 48, 214, .65), transparent 45%), linear-gradient(110deg, #2a0846, #1f0834 55%, #3a0f63); }
.p-scores .section-tag { color: #c687f5; }
.p-scores ul { display: grid; grid-template-columns: repeat(4, 1fr); padding: 0 80px; list-style: none; text-align: center; }
.p-ring { position: relative; display: grid; place-items: center; width: 140px; height: 140px; margin: 0 auto 12px; }
.p-ring svg { position: absolute; inset: 0; rotate: -90deg; fill: none; stroke-width: 9; }
.p-ring circle { stroke: rgba(255, 255, 255, .12); }
.p-ring .value { stroke: #4ade80; stroke-linecap: round; stroke-dasharray: 100; stroke-dashoffset: calc(100 - var(--score)); transition: stroke-dashoffset 1.8s cubic-bezier(.2, .8, .2, 1) .2s; }
.anim .p-scores li.rv .value { stroke-dashoffset: 100; }
.anim .p-scores li.rv.in .value { stroke-dashoffset: calc(100 - var(--score)); }
.p-ring b { font-size: 36px; font-weight: 800; }
.p-scores li > span { font-size: 13.5px; color: #e6d8f6; }

@media (max-width: 899px) {
  .p-hero { height: auto; padding-bottom: 30px; }
  .p-hero .hero-copy { top: auto; width: auto; padding-top: 6px; }
  .p-hero .eyebrow { font-size: 16px; }
  .p-hero .hero-copy h1 { font-size: clamp(28px, 8.6vw, 46px); }
  .p-hero .lead { width: auto; margin-bottom: 20px; }
  .p-actions { flex-wrap: wrap; justify-content: center; gap: 10px; }
  .p-actions .btn, .p-ghost { height: 48px; font-size: 13.5px; }
  /* Same specificity as .p-lab.hero-art so the shared mobile scaling applies */
  .p-lab.hero-art { top: 0; margin-top: 26px; }

  .p-devices { padding: 42px 0 34px; }
  .p-switch { gap: 3px; padding: 4px; }
  .p-switch button { height: 36px; padding: 0 12px; font-size: 11.5px; }
  .p-stage { height: 500px; margin: 0 12px; }
  .p-device { height: 330px; max-width: calc(100% - 20px); }
  .p-device[data-device="tablet"] { width: 290px; height: 420px; border-width: 11px; }
  .p-device[data-device="phone"] { width: 226px; height: 462px; border-width: 8px; }
  .a-nav b { font-size: 13px; white-space: nowrap; }
  .p-address { gap: 4px; padding: 0 12px; }
  .p-address i { width: 7px; height: 7px; }
  .p-address span { margin: 0 2px; padding: 2px 4px; font-size: 9.5px; }

  .p-builds { padding: 42px 0; }
  .p-ide { grid-template-columns: minmax(0, 1fr); margin: 0 14px; }
  .p-tree { grid-column: 1; grid-row: 1; display: grid; grid-template-columns: 1fr 1fr; gap: 6px; padding: 12px; }
  .p-tree p { grid-column: 1 / -1; margin: 0; }
  .p-tree button { height: 42px; padding: 0 8px; gap: 8px; font-size: 12px; }
  .p-docs { grid-column: 1; grid-row: 2; min-height: 420px; padding: 20px 18px; }
  .p-docs h3 { font-size: 21px; }

  .p-timeline { padding: 44px 16px 14px; }
  .p-track::before, .p-track::after { left: auto; right: 18px; }
  .p-track > li, .p-track > li:nth-child(even) { justify-content: flex-start; padding: 0 50px 22px 0; }
  .p-node { left: auto; right: 1px; width: 38px; height: 38px; margin: 0; }
  .p-phase { width: 100%; min-width: 0; padding: 16px; }
  .p-phase ul { flex-wrap: wrap; }
  .p-phase code { font-size: 10px; }

  .p-projects { padding: 26px 16px 40px; }
  .p-cards { grid-template-columns: minmax(0, 420px); gap: 18px; }
  .p-scores { padding: 42px 0; }
  .p-scores ul { grid-template-columns: 1fr 1fr; row-gap: 26px; padding: 0 16px; }
  .p-ring { width: 116px; height: 116px; }
  .p-ring b { font-size: 28px; }
}

.p-page .s-head { margin-bottom: 32px; }
