/* Front page. Based on the original site: paper, Playfair Display + DM Sans, offset frames. */
:root {
  --paper: #F5F3EE;
  --white: #FFFFFF;
  --ink: #1A1A1A;
  --grey: #6B6B6B;
  --line: rgba(26, 26, 26, 0.12);
  --dark: #2A2A2A;
  --accent: #C0522A;
  --serif: 'Playfair Display', Georgia, serif;
  --sans: 'DM Sans', system-ui, sans-serif;
  --mono: 'JetBrains Mono', ui-monospace, monospace;
  --pad: 4rem;
}
* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { background: var(--paper); color: var(--ink); font-family: var(--sans); font-weight: 400;
       -webkit-font-smoothing: antialiased; overflow-x: hidden; }
a { color: inherit; }
img { display: block; max-width: 100%; }
::selection { background: var(--ink); color: var(--paper); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }

.counter { font-family: var(--mono); font-size: .72rem; letter-spacing: .2em; color: var(--grey); }
.kicker { font-size: .78rem; letter-spacing: .16em; text-transform: uppercase; color: var(--grey); }

/* ---------------------------------------------------------------- nav */
.nav { position: fixed; inset: 0 0 auto 0; z-index: 100; display: flex; justify-content: space-between;
       align-items: center; padding: 2rem var(--pad); transition: padding .4s ease, background .4s ease; }
.nav-logo { display: block; line-height: 0;
            text-decoration: none; line-height: 1; transition: font-size .4s ease, letter-spacing .4s ease; }
.nav-links { display: flex; gap: 2.6rem; }
.nav-links a { text-decoration: none; font-size: .8rem; letter-spacing: .1em; text-transform: uppercase;
               display: inline-block; min-width: 4ch; position: relative; }
.nav-links a::after { content: ''; position: absolute; left: 0; right: 0; bottom: -4px; height: 1px;
                      background: currentColor; transform: scaleX(0); transform-origin: left; transition: transform .3s ease; }
.nav-links a:hover::after { transform: scaleX(1); }
.nav.scrolled { padding: 1.1rem var(--pad); background: rgba(245, 243, 238, .88);
                backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); }
.nav.scrolled .nav-logo svg { height: 34px; }
.nav.on-dark { background: rgba(42, 42, 42, .9); color: var(--paper); }

/* ---------------------------------------------------------------- hero */
.section-hero { position: relative; min-height: 100vh; overflow: hidden; display: grid;
                grid-template-columns: max-content minmax(0, 1fr); align-items: center;
                padding: 9rem var(--pad) 5rem; gap: 3rem; }
.section-hero::before { content: ''; position: absolute; inset: 0; z-index: -1;
  background-image: linear-gradient(rgba(26,26,26,.07) 1px, transparent 1px),
                    linear-gradient(90deg, rgba(26,26,26,.07) 1px, transparent 1px);
  background-size: 40px 40px; }
.section-hero::after { content: ''; position: absolute; left: 0; right: 0; bottom: 0; height: 22%; z-index: -1;
                       background: linear-gradient(to bottom, transparent, var(--paper)); }
.hero-title { font-family: var(--serif); font-weight: 700; font-size: clamp(4.5rem, 9vw, 9.6rem);
              line-height: .9; margin: 2.4rem 0 2.2rem; }
.hero-title > span { display: block; white-space: nowrap; }
.hero-title .l2 { padding-left: clamp(1.5rem, 5vw, 6rem); }
.hero-roles { font-size: 1rem; letter-spacing: .16em; text-transform: uppercase; color: var(--grey);
              display: flex; flex-wrap: wrap; gap: .2rem .9rem; align-items: baseline; }
.hero-roles span { white-space: nowrap; }
.hero-roles i { font-style: normal; color: var(--accent); }
.hero-areas { margin-top: 1.4rem; display: flex; flex-wrap: wrap; gap: .6rem; }
.hero-areas span { font-size: .74rem; letter-spacing: .1em; text-transform: uppercase; padding: .42rem .9rem;
                   border: 1px solid var(--ink); background: var(--paper); }

/* the robot and its spec sheet */
.hero-bot { display: grid; grid-template-columns: 220px 250px; gap: 1.5rem; align-items: center;
            justify-self: center; }
#robot { width: 100%; aspect-ratio: 24 / 28; display: block; image-rendering: pixelated; cursor: pointer; }
.spec-wrap { font-family: var(--mono); font-size: .7rem; padding: 1rem 1.1rem 1.1rem;
             background: rgba(255, 255, 255, .55); border: 1px solid var(--ink);
             box-shadow: 6px 6px 0 rgba(26, 26, 26, .08);
             -webkit-backdrop-filter: blur(2px); backdrop-filter: blur(2px); }
.js .spec-wrap { animation: spec-in .7s cubic-bezier(.2, .8, .2, 1) 1.1s both; }
.js .spec .part { animation: part-in .4s ease both; }
.js .spec .part:nth-child(1) { animation-delay: 1.35s; } .js .spec .part:nth-child(2) { animation-delay: 1.4s; }
.js .spec .part:nth-child(3) { animation-delay: 1.45s; } .js .spec .part:nth-child(4) { animation-delay: 1.5s; }
.js .spec .part:nth-child(5) { animation-delay: 1.55s; } .js .spec .part:nth-child(6) { animation-delay: 1.6s; }
.js .spec .part:nth-child(7) { animation-delay: 1.65s; } .js .spec .part:nth-child(8) { animation-delay: 1.7s; }
.js .spec .part:nth-child(9) { animation-delay: 1.75s; } .js .spec .part:nth-child(10) { animation-delay: 1.8s; }
.js .spec.ready .part { animation: none; }
@keyframes spec-in { from { opacity: 0; transform: translateX(16px); clip-path: inset(0 0 100% 0); }
                     to { opacity: 1; transform: none; clip-path: inset(0 0 0 0); } }
@keyframes part-in { from { opacity: 0; transform: translateX(6px); } to { opacity: 1; transform: none; } }
.js .spec .part.flash { animation: flash .9s ease; }
@keyframes flash { 0%, 30% { background: rgba(192, 82, 42, .14); } 100% { background: transparent; } }
.spec-head { display: flex; justify-content: space-between; gap: .6rem; padding-bottom: .5rem;
             border-bottom: 1px solid var(--ink); color: var(--ink); letter-spacing: .04em; }
.spec-head span { white-space: nowrap; }
.spec-head span:last-child { color: var(--grey); }
.spec { display: grid; }
.part { display: flex; justify-content: space-between; align-items: center; gap: .6rem; width: 100%;
        background: none; border: 0; border-bottom: 1px dashed var(--line); padding: .32rem 0; cursor: pointer;
        font: inherit; color: inherit; text-align: left; }
.part span { color: var(--grey); text-transform: uppercase; letter-spacing: .1em; font-size: .62rem; }
.part b { font-weight: 500; color: var(--ink); }
.part b::after { content: ' ›'; color: var(--grey); opacity: 0; transition: opacity .2s ease; }
.part:hover b::after, .part:focus-visible b::after { opacity: 1; }
.part:hover b { color: var(--accent); }
.part i { display: inline-block; width: .8rem; height: .8rem; vertical-align: -1px; }
.spec-note { margin-top: .7rem; color: var(--grey); line-height: 1.5; font-size: .64rem; }
.spec-how { margin-top: .7rem; }
.spec-how summary { cursor: pointer; color: var(--ink); text-transform: uppercase; letter-spacing: .1em;
                    font-size: .62rem; list-style: none; }
.spec-how summary::-webkit-details-marker { display: none; }
.spec-how summary::before { content: '+ '; color: var(--accent); }
.spec-how[open] summary::before { content: '– '; }
.spec-how p { margin-top: .5rem; font-family: var(--sans); font-size: .78rem; line-height: 1.6; color: #444; }
.scroll-hint { position: absolute; left: 50%; bottom: 2.2rem; transform: translateX(-50%); font-size: .75rem;
               letter-spacing: .2em; text-transform: uppercase; text-decoration: none; color: var(--grey); }
.js .scroll-hint { animation: bounce 2.2s ease-in-out infinite; }
@keyframes bounce { 50% { transform: translate(-50%, 6px); } }

/* letters rise */
.ltr { display: inline-block; opacity: 0; transform: translateY(.55em) rotate(4deg);
       animation: rise .8s cubic-bezier(.2, .8, .2, 1) forwards; }
@keyframes rise { to { opacity: 1; transform: none; } }

/* ---------------------------------------------------------------- shared section head */
.sec { position: relative; padding: 8rem var(--pad); }
.sec-title { font-family: var(--serif); font-weight: 700; font-size: clamp(3rem, 6vw, 6.5rem); line-height: .95; }
.sec-lead { font-size: .95rem; line-height: 1.8; color: var(--grey); max-width: 36ch; margin-top: 1.6rem; }

.rv { opacity: 1; transform: none; }
.js .rv { opacity: 0; transform: translateY(24px); transition: opacity .7s ease, transform .7s cubic-bezier(.2, .8, .2, 1); }
.js .rv.in { opacity: 1; transform: none; }

/* ---------------------------------------------------------------- about */
.section-about { background: var(--white); }
.about-in { display: grid; grid-template-columns: 380px minmax(0, 1fr); gap: 7rem; max-width: 1240px; margin-top: 4rem; }
.about-photo { position: relative; width: 380px; height: 480px; }
.about-photo img { position: relative; z-index: 1; width: 100%; height: 100%; object-fit: cover; object-position: top;
                   filter: grayscale(8%); }
.about-photo::after { content: ''; position: absolute; inset: 16px -16px -16px 16px; border: 1.5px solid var(--ink);
                      transition: inset .4s ease; }
.about-photo:hover::after { inset: 8px -8px -8px 8px; }
.about-name { font-family: var(--serif); font-weight: 700; font-size: clamp(2.4rem, 4.4vw, 3.8rem); line-height: 1; }
.about-meta { display: flex; flex-direction: column; gap: .3rem; margin: 1.6rem 0 2.4rem; }
.about-meta span { font-size: .78rem; letter-spacing: .15em; text-transform: uppercase; color: var(--grey); }
.about-bio { font-size: 1.02rem; font-weight: 300; line-height: 1.85; max-width: 600px; margin-bottom: 1.4rem; }
.edu { margin-top: 2.6rem; border-top: 1px solid var(--line); max-width: 600px; }
.edu div { display: grid; grid-template-columns: 1fr auto; gap: 1rem; padding: .9rem 0; border-bottom: 1px solid var(--line); }
.edu b { font-weight: 500; font-size: .92rem; }
.edu span { font-size: .78rem; color: var(--grey); letter-spacing: .06em; text-align: right; }

/* ---------------------------------------------------------------- work */
.section-work { position: relative; background: var(--paper); }
.work-sticky { padding: 7rem var(--pad) 5rem; }
.section-work.horizontal .work-sticky { position: sticky; top: 0; height: 100vh; overflow: hidden;
                                        display: flex; flex-direction: column; justify-content: center; padding-top: 5.5rem; padding-bottom: 3rem; }
.work-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 2rem; margin-bottom: 3rem; }
.work-progress { width: 180px; height: 2px; background: var(--line); flex-shrink: 0; margin-bottom: .8rem; }
.work-progress span { display: block; height: 100%; background: var(--ink); transform-origin: left; transform: scaleX(0); }
.work-track { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 460px), 1fr)); gap: 3rem; }
.section-work.horizontal .work-track { display: flex; gap: 3rem; will-change: transform; padding-right: 2rem; }
.card { position: relative; flex-shrink: 0; width: 100%; display: flex; flex-direction: column;
        text-decoration: none; background: var(--white); }
.section-work.horizontal .card { width: min(520px, 38vw); height: min(64vh, 600px); }
.card::after { content: ''; position: absolute; inset: 12px -12px -12px 12px; border: 1.5px solid var(--ink);
               z-index: -1; transition: inset .3s ease; }
.card:hover::after { inset: 6px -6px -6px 6px; }
.card-img { aspect-ratio: 16 / 9; overflow: hidden; background: var(--white); border-bottom: 1px solid var(--line); }
.section-work.horizontal .card-img { aspect-ratio: auto; flex: 0 0 55%; }
.card-img img { width: 100%; height: 100%; object-fit: cover; filter: grayscale(25%);
                transition: transform .7s ease, filter .7s ease; }
.card-img.contain img { object-fit: contain; padding: .6rem; filter: none; }
.card:hover .card-img img { transform: scale(1.04); filter: none; }
.card-body { flex: 1 1 auto; padding: 1.5rem 2rem 1.7rem; display: flex; flex-direction: column; gap: .6rem; min-height: 0; overflow: hidden; }
.card-num { font-family: var(--mono); font-size: .68rem; letter-spacing: .16em; color: var(--grey); }
.card h3 { font-family: var(--serif); font-size: 1.7rem; line-height: 1.05; }
.card p { font-size: .9rem; font-weight: 300; line-height: 1.65; color: #444; }
.card-more { margin-top: auto; font-size: .74rem; letter-spacing: .12em; text-transform: uppercase;
             align-self: flex-start; border-bottom: 1px solid var(--ink); padding-bottom: 2px; }
.card.text { background: var(--ink); color: var(--paper); }
.card.text::after { border-color: var(--grey); }
.card.text p { color: rgba(245, 243, 238, .75); }
.card.text .card-num { color: rgba(245, 243, 238, .55); }
.card.text .card-body { padding-top: 2.2rem; }
.card.text .card-result { font-family: var(--mono); font-size: .72rem; line-height: 1.6; color: var(--paper);
                          border-left: 2px solid var(--accent); padding-left: .8rem; }

/* ---------------------------------------------------------------- list sections (coursework, skills) */
.split { display: grid; grid-template-columns: 38% minmax(0, 1fr); gap: 4rem; align-items: start; }
.split-left { position: sticky; top: 7rem; }
.rows { border-top: 1px solid var(--line); }
.row { display: grid; grid-template-columns: 3rem minmax(0, 1fr) auto; gap: 1.2rem; align-items: baseline;
       padding: 1.6rem 0; border-bottom: 1px solid var(--line); text-decoration: none; }
.js .row { opacity: 0; transform: translateY(20px); transition: opacity .5s ease, transform .5s ease, background .3s ease; }
.js .row.in { opacity: 1; transform: none; }
.row-i { font-family: var(--mono); font-size: .7rem; color: var(--grey); letter-spacing: .1em; }
.row-name { font-family: var(--serif); font-weight: 700; font-size: clamp(1.25rem, 2.1vw, 1.9rem); line-height: 1.1; }
.row-desc { grid-column: 2 / 3; font-size: .9rem; font-weight: 300; line-height: 1.7; color: #444; max-width: 62ch; }
.row-res { grid-column: 2 / 3; font-family: var(--mono); font-size: .72rem; color: var(--ink); line-height: 1.6; }
.row-side { font-size: .7rem; letter-spacing: .14em; text-transform: uppercase; color: var(--grey); text-align: right; }
a.row:hover .row-name { text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 4px; }
a.row .row-side { color: var(--ink); }
.section-course { background: var(--white); }
.section-skills { background: var(--paper); }
.sub-head { margin: 4rem 0 0; padding-bottom: 1rem; font-size: .78rem; letter-spacing: .16em; text-transform: uppercase; color: var(--grey); }

/* ---------------------------------------------------------------- contact */
.section-contact { position: relative; min-height: 100vh; background: var(--dark); color: var(--white);
                   display: flex; flex-direction: column; align-items: center; justify-content: center;
                   text-align: center; gap: 3rem; padding: 8rem var(--pad); }
.section-contact .counter { position: absolute; top: 4rem; left: var(--pad); color: rgba(255,255,255,.35); }
.contact-label { font-size: .85rem; letter-spacing: .2em; text-transform: uppercase; color: rgba(255,255,255,.5); }
.contact-email { font-family: var(--serif); font-weight: 700; font-size: clamp(2rem, 5vw, 5.2rem); line-height: 1;
                 text-decoration: none; border-bottom: 2px solid rgba(255,255,255,.2); padding-bottom: .5rem;
                 transition: border-color .3s ease, color .3s ease; }
.contact-email:hover { border-color: var(--white); color: rgba(255,255,255,.75); }
.contact-links { display: flex; gap: 3rem; }
.contact-links a { font-size: .8rem; letter-spacing: .15em; text-transform: uppercase; text-decoration: none;
                   color: rgba(255,255,255,.55); transition: color .3s ease; }
.contact-links a:hover { color: var(--white); }
.contact-foot { position: absolute; left: var(--pad); right: var(--pad); bottom: 3rem; display: flex;
                justify-content: space-between; font-size: .7rem; letter-spacing: .12em; text-transform: uppercase;
                color: rgba(255,255,255,.3); }

/* ---------------------------------------------------------------- walker */
#walker { position: fixed; left: 0; top: 0; z-index: 90; cursor: pointer; image-rendering: pixelated; }
.no-walker #walker { display: none; }

/* ---------------------------------------------------------------- reduced motion */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .js .rv, .js .row { opacity: 1; transform: none; }
  #walker { display: none; }
}

/* ---------------------------------------------------------------- narrower screens (full pass comes later) */
@media (max-width: 1380px) {
  .hero-title { font-size: clamp(4.5rem, 8.2vw, 9.6rem); }
  .hero-bot { grid-template-columns: 190px 240px; gap: 1.2rem; }
}
@media (max-width: 1100px) {
  :root { --pad: 2.5rem; }
  .about-in { grid-template-columns: 300px minmax(0, 1fr); gap: 4rem; }
  .about-photo { width: 300px; height: 380px; }
}
@media (max-width: 820px) {
  :root { --pad: 1.25rem; }
  .nav-logo { font-size: 2.6rem; }
  .nav-links { gap: 1.1rem; }
  .nav-links .opt { display: none; }
  .section-hero { grid-template-columns: 1fr; padding-top: 8rem; }
  .hero-bot { grid-template-columns: 150px minmax(0, 220px); }
  .about-in, .split { grid-template-columns: 1fr; gap: 3rem; }
  .split-left { position: static; }
  .about-photo { width: min(100%, 320px); height: 400px; }
  .row { grid-template-columns: 2rem minmax(0, 1fr); }
  .row-side { grid-column: 2; text-align: left; }
  .contact-links { gap: 1.6rem; }
  .contact-foot { flex-direction: column; gap: .4rem; }
}

/* rope for the hanging robot (skills) */
#rope { position: fixed; left: 0; top: 0; width: 2px; height: 0; background: var(--ink); transform-origin: top center;
        z-index: 89; opacity: 0; pointer-events: none; }
@media (max-width: 820px) { #walker, #rope { display: none; } }
/* skills: the lead stays short so nothing sits under the last letter, where the robot hangs */
.skills-lead { max-width: none; }
/* contact: a small stage above the label for the robot */
.contact-label { position: relative; }
.contact-label::before { content: ''; position: absolute; left: 50%; top: -16px; width: 64px; height: 2px;
                         transform: translateX(-50%); background: rgba(255, 255, 255, .25); }
.section-contact { gap: 3.4rem; }

/* effects layer for the small robot: dust, rocket trail, the lamp's light */
#fx { position: fixed; inset: 0; width: 100vw; height: 100vh; z-index: 88; pointer-events: none; }
#walker { transform-origin: 50% 50%; }
.section-course .row { transition: opacity .5s ease, transform .5s ease, background .35s ease; }
.section-course .row.lit { background: rgba(255, 214, 107, .16); }
@media (max-width: 820px) { #fx { display: none; } }

/* coursework intro: justified block */
.section-course .sec-lead { text-align: justify; text-align-last: left; hyphens: auto; -webkit-hyphens: auto; max-width: 32ch; }

/* about: justified paragraphs */
.about-bio { text-align: justify; text-align-last: left; hyphens: auto; -webkit-hyphens: auto; }

/* the scroll hint is a small box standing on the edge where About starts (a step for the robot) */
.scroll-hint { bottom: 1.5rem; padding: 0; line-height: 1; z-index: 2; word-spacing: .35em; }
.js .scroll-hint { animation: none; }
.scroll-hint .arr { display: inline-block; }
.js .scroll-hint .arr { animation: arrow 2.2s ease-in-out infinite; }
@keyframes arrow { 50% { transform: translateY(3px); } }

#fxtop { position: fixed; inset: 0; width: 100vw; height: 100vh; z-index: 91; pointer-events: none; }
@media (max-width: 820px) { #fxtop { display: none; } }

/* a row number hit by the robot's tennis ball */
.row-i { display: inline-block; transition: color .25s ease, transform .25s ease; }
.row-i.hit { transform: translate(4px, -2px) rotate(-6deg); transition: none; }

/* About: three labelled blocks and the competitions */
.about-tag { display: block; font-family: var(--mono); font-size: .68rem; letter-spacing: .16em; text-transform: uppercase;
             color: var(--accent); margin-bottom: .35rem; }
.comp-head { margin-top: 2.4rem; font-size: .78rem; letter-spacing: .16em; text-transform: uppercase; color: var(--grey); }
.edu.comps { margin-top: .8rem; }
.edu.comps div { grid-template-columns: 11rem minmax(0, 1fr); align-items: baseline; }
.edu.comps b { font-family: var(--mono); font-size: .8rem; }
.edu.comps span { text-align: left; font-size: .85rem; color: #444; letter-spacing: 0; }

/* the logo: an M and a T in a pencil-drawn frame; it draws itself, and sheds its guides when the menu shrinks */
.nav-logo svg { height: 74px; width: auto; display: block; transition: height .4s ease; overflow: visible; }
.nav-logo .guides, .nav-logo .hatch { transition: opacity .4s ease; }
.nav.scrolled .nav-logo .guides, .nav.scrolled .nav-logo .hatch { opacity: 0; }
.nav.scrolled .nav-logo .strokes { stroke-width: 3.4; }
.js .nav-logo line, .js .nav-logo path, .js .nav-logo rect {
  stroke-dasharray: var(--len, 400); stroke-dashoffset: var(--len, 400); animation: logo-draw 1.4s cubic-bezier(.4, .1, .2, 1) .2s forwards; }
.js .nav-logo .guides line { animation-duration: .8s; animation-delay: 0s; }
.js .nav-logo .hatch path { animation-delay: .9s; animation-duration: .7s; }
@keyframes logo-draw { to { stroke-dashoffset: 0; } }
@media (prefers-reduced-motion: reduce) { .nav-logo line, .nav-logo path, .nav-logo rect { stroke-dasharray: none; stroke-dashoffset: 0; } }
@media (max-width: 820px) { .nav-logo svg { height: 48px; } }

/* the name drawn in pencil over the real (now transparent) text */
.hero-title { position: relative; }
.hero-title.pencil-on > span { color: transparent; }
/* hidden from the first paint while the pencil drawing loads; back if it fails or takes too long */
.js .hero-title > span { color: transparent; }
.js .hero-title.pencil-fail > span { color: inherit; }
/* the roles under the name decode in one by one: hidden from the first paint, not after it */
.js:not(.roles-ready) .hero-roles span { visibility: hidden; }
.pencil-layer { position: absolute; left: -40px; top: -40px; pointer-events: none; }
.pencil-layer canvas, .pencil-layer svg { position: absolute; left: 0; top: 0; }

/* the capsule before BUILD: a pencil sketch with a button; after it, pixels */
.capsule { position: relative; }
.capsule-sketch { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; transition: opacity .55s ease; pointer-events: none; }
.js .capsule-sketch line, .js .capsule-sketch path, .build-btn rect, .build-btn path {
  stroke-dasharray: var(--len, 50); stroke-dashoffset: var(--len, 50); animation: logo-draw 1.3s cubic-bezier(.4, .1, .2, 1) .4s forwards; }
.capsule-sketch .cs-notes { opacity: 0; animation: fade-in .6s ease 1.4s forwards; }
@keyframes fade-in { to { opacity: 1; } }
.booting .capsule-sketch, .built .capsule-sketch { opacity: 0; }
.build-btn { position: absolute; left: 50%; top: 44%; transform: translate(-50%, -50%); width: 132px; height: 48px; padding: 0;
             border: 0; background: rgba(245, 243, 238, .85); cursor: pointer; font-family: var(--mono); font-size: .8rem;
             letter-spacing: .22em; color: var(--ink); }
.build-btn svg { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }
.build-btn span { position: relative; }
.build-btn i { font-style: normal; color: var(--accent); margin-right: .25em; display: inline-block; transition: transform .2s ease; }
.build-btn:hover rect { stroke-width: 2.4; }
.build-btn:hover i { transform: translateX(3px); }
.build-btn:focus-visible { outline: 2px solid var(--accent); outline-offset: 4px; }
.booting .build-btn, .built .build-btn { animation: btn-out .35s steps(5) forwards; pointer-events: none; }
@keyframes btn-out { 0% { opacity: 1; clip-path: inset(0 0 0 0); } 100% { opacity: 0; clip-path: inset(40% 0 60% 0); } }
.part.empty b { color: var(--grey); opacity: .6; }
.part.empty { cursor: default; }
@media (prefers-reduced-motion: reduce) { .capsule-sketch line, .capsule-sketch path, .build-btn rect, .build-btn path { stroke-dasharray: none; stroke-dashoffset: 0; } }
/* phones: no capsule, no spec sheet, no robot */
@media (max-width: 820px) { .hero-bot { display: none; } }

/* first paint, clean: what is not drawn yet does not show (the rest arrives with its own animation) */
@keyframes appear { from { opacity: 0; } to { opacity: 1; } }
.js:not(.roles-ready) .hero-roles i { visibility: hidden; }
.js .build-btn span { animation: appear .5s ease 1.3s both; }
.js .hero-areas { animation: appear .7s ease 1.5s both; }
@media (prefers-reduced-motion: reduce) { .js .build-btn span, .js .hero-areas { animation: none; } }
