/* Additions on top of the compiled theme: hero intro, code showcase, terminal,
   skill pills, collapsible timeline. Uses the theme's tokens (--bg, --fg, --accent*). */

:root { --term: #141414; --term-2: #1f1f1f; --term-dim: #8a8f86; --term-fg: #e8ebe4; }

/* ---------- hero intro ---------- */
/* Cap the giant name by height too, and lift it, so the intro below never collides. */
.hero .hero-header h1 { font-size: min(18vw, 26svh); }
.hero .hero-header-wrapper { transform: translateY(-11svh); }
.hero-intro {
  position: absolute; left: 50%; bottom: 6.5em; transform: translateX(-50%);
  width: min(52rem, calc(100% - 4em)); display: flex; flex-direction: column; align-items: center; gap: 1.25em;
  text-align: center; z-index: 2;
}
.hero-intro .hero-role { font-family: formula-narrow, sans-serif; font-weight: 600; font-size: 1.5rem; line-height: 1.15; }
.hero-ctas { display: flex; gap: .75em; flex-wrap: wrap; justify-content: center; }
.btn { font-family: supply-mono, monospace; text-transform: uppercase; font-size: .85rem; font-weight: 500;
  padding: .85em 1.3em; border: .15em solid var(--fg); border-radius: 999px; background: var(--bg); color: var(--fg);
  transition: transform .2s, background-color .2s, color .2s; cursor: pointer; }
.btn:hover { transform: translateY(-2px); background: var(--fg); color: var(--bg); }
.btn--solid { background: var(--fg); color: var(--bg); }
.btn--solid:hover { background: var(--accent1); color: var(--fg); }
.btn:focus-visible, .code-tab:focus-visible, .timeline-toggle:focus-visible { outline: 3px solid var(--accent1); outline-offset: 3px; }

/* ---------- section wrappers ---------- */
.section-header .ss { max-width: 44rem; }
.geek-section { padding: 0 2em 2em; display: flex; justify-content: center; }
.geek-wrap { width: min(72rem, 100%); }

/* ---------- terminal window chrome (shared) ---------- */
.win { background: var(--term); color: var(--term-fg); border: .2em solid var(--fg); border-radius: 1.5em;
  box-shadow: .6em .6em 0 var(--fg); overflow: hidden; }
.win-bar { display: flex; align-items: center; gap: .5em; padding: .8em 1.1em; background: var(--term-2); border-bottom: 1px solid #2b2b2b; }
.win-dot { width: .75em; height: .75em; border-radius: 50%; }
.win-dot:nth-child(1) { background: var(--accent1); } .win-dot:nth-child(2) { background: var(--accent2); } .win-dot:nth-child(3) { background: var(--accent3); }
.win-title { margin-left: .75em; font-family: supply-mono, monospace; font-size: .8rem; color: var(--term-dim); }

/* ---------- code showcase ---------- */
.code-tabs { display: flex; gap: .25em; margin-left: auto; flex-wrap: wrap; }
.code-tab { font-family: supply-mono, monospace; font-size: .75rem; padding: .4em .8em; border-radius: .5em;
  background: transparent; color: var(--term-dim); border: 1px solid #333; cursor: pointer; }
.code-tab[aria-selected="true"] { background: var(--accent2); color: var(--fg); border-color: var(--accent2); }
.code-panel { display: none; }
.code-panel.active { display: grid; grid-template-columns: minmax(0, 1fr) 18rem; }
.code-panel pre { margin: 0; padding: 1.5em 1.75em; overflow-x: auto; font-family: supply-mono, monospace;
  font-size: .9rem; line-height: 1.6; tab-size: 4; counter-reset: ln; }
.code-panel pre .ln { display: block; }
.code-panel pre .ln::before { counter-increment: ln; content: counter(ln); display: inline-block; width: 2.2em;
  margin-right: 1em; color: #444; text-align: right; user-select: none; }
.code-note { border-left: 1px solid #2b2b2b; padding: 1.5em; font-family: formula-narrow, sans-serif; font-weight: 600;
  font-size: 1.05rem; line-height: 1.3; color: var(--term-fg); display: flex; flex-direction: column; gap: 1em; }
.code-note .mn { color: var(--accent3); }
.tk-k { color: var(--accent1); } .tk-s { color: var(--accent2); } .tk-f { color: #b9d7f0; }
.tk-c { color: var(--term-dim); font-style: italic; } .tk-n { color: #f2a65a; } .tk-d { color: var(--accent3); }

/* ---------- interactive terminal ("Query My Résumé") ---------- */
.term-body { position: relative; height: 26rem; overflow-y: auto; padding: 1.25em 1.5em; font-family: supply-mono, monospace;
  font-size: .9rem; line-height: 1.55; cursor: text; overscroll-behavior: contain; -webkit-overflow-scrolling: touch; }
.term-body .out, .term-body .cmd { white-space: pre-wrap; overflow-wrap: anywhere; }
.term-body .cmd { margin-top: .6em; }
.term-body .cmd:first-child { margin-top: 0; }
.term-body .prompt { color: var(--accent3); }
.term-body .err { color: #FCA5A5; }
.term-body .hl { color: var(--accent2); }
.term-body .dim { color: var(--term-dim); }
.term-body a { color: var(--accent2); text-decoration: underline; text-underline-offset: .15em; }
.term-out .t-grid { display: grid; grid-template-columns: max-content minmax(0, 1fr); gap: .15em 1.25em; margin: .2em 0 .4em; white-space: normal; }
.term-out .t-chips { display: flex; flex-wrap: wrap; gap: .4em; margin: .35em 0 .45em; white-space: normal; }
/* tappable words inside the output */
.term-out .t-run { font: inherit; color: var(--accent2); background: rgba(249, 213, 140, .08); border: 1px solid rgba(249, 213, 140, .35);
  border-radius: .4em; padding: .05em .45em; cursor: pointer; text-align: left; touch-action: manipulation;
  transition: background-color .15s, border-color .15s; }
.term-out .t-run:hover { background: rgba(249, 213, 140, .2); border-color: var(--accent2); }
.term-out .t-run.is-ran { background: rgba(94, 234, 212, .2); border-color: var(--accent3); }
.term-line { display: flex; gap: .6em; align-items: center; margin-top: .6em; }
.term-line .prompt { flex: none; cursor: text; }
.term-line input { flex: 1; background: transparent; border: 0; outline: 0; color: var(--term-fg);
  font: inherit; caret-color: var(--accent1); min-width: 0; padding: .3em 0; }
.term-line input::placeholder { color: var(--term-dim); opacity: .8; }
.term-run, .term-clear { flex: none; font-family: supply-mono, monospace; font-size: .75rem; color: var(--term-fg); cursor: pointer;
  background: rgba(255, 255, 255, .06); border: 1px solid #24406E; border-radius: .5em; padding: .45em .8em; touch-action: manipulation;
  transition: background-color .15s, border-color .15s; }
.term-run:hover, .term-clear:hover { background: #2563EB; border-color: #2563EB; color: #fff; }
.term-clear { margin-left: auto; }
.term-out .t-run:focus-visible, .term-run:focus-visible, .term-clear:focus-visible { outline: 2px solid var(--accent3); outline-offset: 2px; }
.term-line:focus-within { box-shadow: inset 0 -1px 0 #24406E; }

/* query chips above the terminal */
.qr-chips { display: flex; flex-wrap: wrap; justify-content: center; gap: .6em; margin: 0 0 1.75em; }
.qr-label { width: 100%; text-align: center; margin: 0 0 .25em; font-size: .75rem; letter-spacing: .08em; text-transform: uppercase; color: var(--ink-3, #5B6B84); }
.qr-chip { display: inline-flex; align-items: center; gap: .6em; min-height: 44px; padding: .55em 1.05em; border-radius: 999px;
  font-family: var(--read, Inter, system-ui, sans-serif); font-size: .9rem; font-weight: 600; color: var(--fg);
  background: var(--surface, #fff); border: 1px solid var(--line-strong, #C5D0E0); box-shadow: var(--shadow-sm);
  cursor: pointer; touch-action: manipulation; -webkit-tap-highlight-color: transparent;
  transition: transform .15s, background-color .15s, border-color .15s, color .15s; }
.qr-chip code { font-family: supply-mono, monospace; font-size: .72rem; font-weight: 500; color: var(--accent1);
  background: var(--accent2); padding: .2em .5em; border-radius: .4em; }
.qr-chip:hover { border-color: var(--accent1); transform: translateY(-1px); }
.qr-chip:active, .qr-chip.is-ran { transform: translateY(0) scale(.97); background: var(--accent2); border-color: var(--accent1); }
.qr-chip:focus-visible { outline: 3px solid var(--accent1); outline-offset: 2px; }
.qr-chip--hire { background: var(--accent1); border-color: var(--accent1); color: #fff; }
.qr-chip--hire code { background: rgba(255, 255, 255, .18); color: #fff; }
.qr-chip--hire:hover, .qr-chip--hire.is-ran { background: var(--blue-700, #1D4ED8); border-color: var(--blue-700, #1D4ED8); color: #fff; }

/* ---------- skill pills (built by geek.js from comma lists) ---------- */
.pill-list.pills { display: flex; flex-wrap: wrap; gap: .45em; text-transform: none; }
.pill-list.pills span { padding: .35em .75em; border: .1em solid var(--fg); border-radius: 999px; font-size: .8rem;
  background: rgba(255,255,255,.35); }

/* ---------- removed featured-work carousel: inert stub kept for the compiled bundle ---------- */
.featured-stub, .featured-stub *,
.pin-spacer:has(> .featured-stub) { display: none !important; } /* ScrollTrigger pins the stub; drop its spacer too */

/* ---------- timeline context line + case-study list ---------- */
.timeline .timeline-context { margin: .35em 0 .9em; font-size: .98rem; line-height: 1.55; font-style: italic; color: var(--ink-2, #3A4A63); }
.case-study .cs-list { font-family: var(--read, Inter, system-ui, sans-serif); margin: 0; padding-left: 1.1em; display: flex; flex-direction: column; gap: .45em; font-size: 1rem; line-height: 1.5; }
.case-study .cs-list li::marker { color: var(--accent1); }

/* ---------- collapsible timeline bullets ---------- */
.timeline-list-items.collapsed p:nth-child(n + 6) { display: none; }
.timeline-toggle { margin-top: 1em; font-family: supply-mono, monospace; text-transform: uppercase; font-size: .8rem;
  background: none; border: 0; border-bottom: .12em solid var(--fg); padding: 0 0 .15em; cursor: pointer; color: var(--fg); }

/* ---------- responsive ---------- */
@media (max-width: 1000px) {
  .hero-intro { bottom: 5.5em; gap: 1em; }
  .hero-intro .hero-role { font-size: 1.15rem; }
  .code-panel.active { grid-template-columns: 1fr; }
  .code-note { border-left: 0; border-top: 1px solid #2b2b2b; }
  .code-panel pre { font-size: .78rem; padding: 1.25em 1em; }
  .code-tabs { margin-left: 0; width: 100%; }
  .win-bar { flex-wrap: wrap; }
  .term-body { height: min(24rem, 62svh); font-size: .8rem; padding: 1em; }
  .term-line input { font-size: 16px; } /* >=16px stops iOS zooming on focus */
  .term-run, .term-clear { min-height: 44px; min-width: 44px; padding: .45em .9em; }
  .term-clear { min-height: 36px; }
  .term-out .t-chips .t-run, .term-out .t-grid .t-run { padding: .3em .6em; min-height: 36px; }
  .term-out .t-grid { gap: .35em 1em; }
  .geek-section { padding: 0 1em 2em; }
  .win { box-shadow: .35em .35em 0 var(--fg); }
}
@media (max-width: 600px) {
  .qr-chips { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .5em; margin-bottom: 1.25em; }
  .qr-label { grid-column: 1 / -1; }
  .qr-chip { justify-content: center; min-height: 46px; padding: .4em .35em; border-radius: .8em; font-size: .84rem; text-align: center; line-height: 1.15; }
  .qr-chip code { display: none; }
  .qr-chip--hire { grid-column: 1 / -1; justify-content: center; }
  .qr-chip--hire code { display: inline; }
  .term-out .t-grid { grid-template-columns: 1fr; gap: 0; }
  .term-out .t-grid > :nth-child(odd) { margin-top: .45em; }
  .term-line .prompt { display: none; }
  .term-line { border: 1px solid #24406E; border-radius: .6em; padding: .15em .15em .15em .7em; background: rgba(255,255,255,.04); }
  .term-line:focus-within { box-shadow: none; border-color: var(--accent1); }
}
@media (prefers-reduced-motion: reduce) {
  .btn { transition: none; }
  .qr-chip, .term-out .t-run, .term-run, .term-clear { transition: none; }
  .qr-chip:hover, .qr-chip:active, .qr-chip.is-ran { transform: none; }
}

/* terminal: typing + output reveal */
.term-out .t-in { animation: t-in .28s ease-out both; }
@keyframes t-in { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { .term-out .t-in { animation: none; } }
@keyframes blink { 50% { opacity: 0; } }

/* ---------- real-terminal feel ---------- */
.term-line .t-input { position: relative; flex: 1; min-width: 0; display: flex; }
.term-line .t-input input { caret-color: transparent; width: 100%; }
.t-caret { position: absolute; left: 0; top: 50%; width: .62em; height: 1.2em; margin-top: -.6em; pointer-events: none;
  background: #7AA2FF; border-radius: 1px; box-shadow: 0 0 10px rgba(122, 162, 255, .55); animation: t-blink 1.05s steps(1) infinite; }
.term-line.is-typing .t-caret { animation: none; }
.t-input:not(.has-text) input::placeholder { padding-left: .9em; }
.term-line.is-enter { background: rgba(122, 162, 255, .08); border-radius: 4px; transition: background .12s; }
@keyframes t-blink { 50% { opacity: 0; } }
.term-out .t-row { opacity: 0; animation: t-row .2s ease-out forwards; }
@keyframes t-row { from { opacity: 0; transform: translateX(-3px); } to { opacity: 1; transform: none; } }
.term-out .t-spin { color: #7AA2FF; }
.term-body .ok { color: #34D399; }
.term-body { text-shadow: 0 0 1px rgba(230, 237, 247, .25); }
.term-body .hl, .term-body .prompt { text-shadow: 0 0 8px rgba(122, 162, 255, .25); }
.win#terminal-app { position: relative; }
.win#terminal-app .term-body::after { /* faint scanlines */
  content: ""; position: sticky; display: block; left: 0; right: 0; bottom: 0; height: 0; pointer-events: none; }
@media (prefers-reduced-motion: reduce) {
  .t-caret { animation: none; } .term-out .t-row { opacity: 1; animation: none; }
}

/* ---------- terminal discoverability cues ---------- */
/* shared ›_ glyph: navy key-cap with a blinking underscore */
.term-glyph { display: inline-flex; align-items: center; justify-content: center; flex: none; min-width: 2.1em; height: 1.75em;
  padding: 0 .4em; border-radius: .4em; background: var(--fg); color: #7AA2FF; font: 600 .78rem/1 supply-mono, monospace; }
.term-glyph i { font-style: normal; color: #E6EDF7; animation: t-blink 1.05s steps(1) infinite; }

/* hero: quiet text link under the CTAs */
.hero-term { display: inline-flex; align-items: center; gap: .6em; min-height: 44px; margin-top: -.35em; padding: .2em .6em;
  border-radius: .6em; font-family: var(--read, Inter, system-ui, sans-serif); font-size: .92rem; font-weight: 500;
  color: var(--ink-2, #3A4A63); }
.hero-term u { color: var(--accent1); font-weight: 600; text-decoration: underline; text-decoration-thickness: 1px;
  text-decoration-color: rgba(37, 99, 235, .35); text-underline-offset: .22em; transition: text-decoration-color .15s; }
.hero-term:hover u { text-decoration-color: currentColor; }
.hero-term:focus-visible { outline: 3px solid var(--accent1); outline-offset: 2px; }

/* floating pill, bottom-left (the phone back-to-top button owns bottom-right) */
.term-nudge { position: fixed; left: 24px; bottom: calc(24px + env(safe-area-inset-bottom, 0px)); z-index: 40;
  display: flex; align-items: center; padding: 3px 3px 3px 6px; border-radius: 999px; background: var(--fg);
  box-shadow: var(--shadow-lg); opacity: 0; transform: translateY(14px); pointer-events: none;
  transition: opacity .3s ease, transform .3s ease; }
.term-nudge.show { opacity: 1; transform: none; pointer-events: auto; }
.term-nudge-go { display: inline-flex; align-items: center; gap: .65em; min-height: 44px; padding: 0 .35em 0 .2em; border-radius: 999px;
  font: 500 .78rem/1 supply-mono, monospace; letter-spacing: .04em; text-transform: uppercase; color: #E6EDF7; }
.term-nudge .term-glyph { background: rgba(122, 162, 255, .16); }
.term-nudge-go:hover { color: #fff; }
.term-nudge-x { display: grid; place-items: center; width: 44px; height: 44px; padding: 0; border: 0; border-radius: 50%;
  background: transparent; color: #8597B3; cursor: pointer; transition: background-color .15s, color .15s; }
.term-nudge-x:hover { background: rgba(255, 255, 255, .08); color: #fff; }
.term-nudge-x svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; }
.term-nudge-go:focus-visible, .term-nudge-x:focus-visible { outline: 3px solid #7AA2FF; outline-offset: 2px; }
body:has(.menu-toggle-btn.menu-open) .term-nudge { opacity: 0; pointer-events: none; }

/* "live" badge in the terminal title bar */
.term-live { display: inline-flex; align-items: center; gap: .45em; margin-left: auto; padding: .3em .7em; border-radius: 999px;
  font: 500 .68rem/1 supply-mono, monospace; letter-spacing: .08em; text-transform: uppercase; color: #5EEAD4;
  background: rgba(94, 234, 212, .08); border: 1px solid rgba(94, 234, 212, .3); }
.term-live i { width: 6px; height: 6px; border-radius: 50%; background: #34D399; animation: t-live 2s ease-out infinite; }
@keyframes t-live { 0% { box-shadow: 0 0 0 0 rgba(52, 211, 153, .6); } 70%, 100% { box-shadow: 0 0 0 6px rgba(52, 211, 153, 0); } }
.term-live + .term-clear { margin-left: .5em; }

/* arriving from a #terminal link: brief focus ring around the window */
.win#terminal-app { transition: box-shadow .35s ease; }
.win#terminal-app.is-arrived { box-shadow: 0 0 0 3px rgba(37, 99, 235, .45), var(--shadow-lg); }

/* end of demo: the prompt invites input */
.term-out .t-invite { margin-top: .6em; padding: .45em .7em; border-left: 2px solid #7AA2FF; background: rgba(122, 162, 255, .08); border-radius: 0 .4em .4em 0; }
.term-line { border-radius: .5em; }
.term-line.is-invite { animation: t-invite 1.8s ease-out 2; }
.term-line.is-invite .term-run { background: #2563EB; border-color: #2563EB; color: #fff; }
@keyframes t-invite { 0% { box-shadow: 0 0 0 0 rgba(122, 162, 255, .45); } 100% { box-shadow: 0 0 0 8px rgba(122, 162, 255, 0); } }

/* one query chip glows gently to show the chips are clickable (background only: the phone chip row clips rings) */
.qr-chip.is-hint { border-color: var(--accent1); animation: chip-hint 1.6s ease-in-out 3; }
@keyframes chip-hint { 50% { background: var(--accent2); } }

@media (prefers-reduced-motion: reduce) {
  .term-glyph i, .term-live i, .term-line.is-invite, .qr-chip.is-hint { animation: none; }
  .term-nudge, .win#terminal-app, .hero-term u, .term-nudge-x { transition: none; }
  .term-nudge { transform: none; }
}
