@import url("https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@400;500;600;700&display=swap");

@font-face {
  font-family: "Halfre";
  src: url("/fonts/halfre.ttf") format("truetype");
  font-display: swap;
  font-style: normal;
  font-weight: 400;
}

:root {
  --bg: #0b0c0a;
  --bg-elevated: #131411;
  --bg-subtle: #1a1b18;
  --fg: #eceae3;
  --muted: #9a9890;
  --subtle: #6e6d67;
  --accent: #c9c4b8;
  --signal: #8fa89a;
  --danger: #c17b6a;
  --border: rgba(236, 234, 227, 0.12);
  --border-strong: rgba(236, 234, 227, 0.22);
  --font-display: "Halfre", "Instrument Serif", Georgia, serif;
  --font-sans: "Plus Jakarta Sans", "Segoe UI", system-ui, sans-serif;
  --font-mono: "IBM Plex Mono", "SFMono-Regular", Consolas, monospace;
  --shell: 1152px;
  --gutter: 20px;
}

* { box-sizing: border-box; }
html { background: var(--bg); color-scheme: dark; scroll-behavior: smooth; }
body { min-width: 320px; min-height: 100dvh; margin: 0; background: var(--bg); color: var(--fg); font-family: var(--font-sans); line-height: 1.55; -webkit-font-smoothing: antialiased; }
a { color: inherit; }
button { color: inherit; font: inherit; }
button:not(:disabled), [role="button"]:not(:disabled) { cursor: pointer; }
button { border: 0; background: transparent; }
h1, h2, h3, h4 { text-wrap: balance; }
p { text-wrap: pretty; }
::selection { background: rgba(143, 168, 154, 0.35); color: var(--fg); }
a:focus-visible, button:focus-visible { outline: 2px solid var(--signal); outline-offset: 4px; }
.skip-link { position: fixed; z-index: 100; top: -60px; left: 12px; padding: 10px 14px; background: var(--signal); color: var(--bg); font: 11px var(--font-mono); letter-spacing: .14em; text-transform: uppercase; }
.skip-link:focus { top: 12px; }
.shell { width: min(var(--shell), 100%); margin-inline: auto; }
.kicker { margin: 0; color: var(--muted); font: 11px/1.5 var(--font-mono); letter-spacing: .22em; text-transform: uppercase; }
.display { margin: 0; color: var(--fg); font-family: var(--font-display); font-weight: 400; letter-spacing: -.03em; line-height: 1.05; }

.site-header { position: sticky; z-index: 40; top: 0; border-bottom: 1px solid var(--border); background: rgba(11, 12, 10, .85); backdrop-filter: blur(12px); }
.header-inner { display: flex; width: min(var(--shell), 100%); min-height: 56px; align-items: center; justify-content: space-between; gap: 16px; padding-inline: var(--gutter); }
.wordmark, .primary-nav, .site-footer, .button, .theme-button, .project-links, .stack-record { font-family: var(--font-mono); text-transform: uppercase; letter-spacing: .16em; }
.wordmark { color: var(--fg); font-size: 11px; text-decoration: none; white-space: nowrap; }
.primary-nav { display: flex; align-items: center; gap: 4px; color: var(--muted); font-size: 11px; }
.primary-nav a { display: inline-flex; min-height: 44px; align-items: center; padding-inline: 10px; text-decoration: none; transition: color 150ms ease; }
.primary-nav a:hover { color: var(--fg); }

.hero { width: min(var(--shell), 100%); margin-inline: auto; padding: 64px var(--gutter) 32px; }
.hero-title { margin-top: 20px; max-width: 780px; font-size: clamp(48px, 5vw, 58px); }
.hero-tagline { margin-top: 24px; max-width: 680px; color: var(--accent); font-size: clamp(23px, 2.4vw, 27px); font-style: italic; }
.hero-lede { max-width: 576px; margin: 24px 0 0; color: var(--muted); font-size: 18px; line-height: 1.6; }
.action-row { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 32px; }
.button { display: inline-flex; min-height: 44px; align-items: center; gap: 10px; padding: 11px 14px; border: 1px solid var(--border-strong); color: var(--muted); font-size: 11px; text-decoration: none; transition: border-color 150ms ease, color 150ms ease, background-color 150ms ease; }
.button:hover { border-color: var(--fg); color: var(--fg); }
.button-primary { border-color: var(--fg); background: var(--fg); color: var(--bg); }
.button-primary:hover { border-color: var(--signal); background: var(--signal); color: var(--bg); }

.constellation { border-block: 1px solid var(--border); background: var(--bg); }
.constellation-inner { display: grid; width: min(var(--shell), 100%); margin-inline: auto; grid-template-columns: minmax(0, 1fr) 280px; }
.constellation-stage { position: relative; min-height: 360px; overflow: hidden; border-bottom: 1px solid var(--border); background: var(--bg); }
.constellation-stage::before, .constellation-stage::after { position: absolute; content: ""; pointer-events: none; }
.constellation-stage::before { inset: 14% 12%; border: 1px solid rgba(236, 234, 227, .08); transform: rotate(-8deg); }
.constellation-stage::after { top: 50%; left: 50%; width: 1px; height: 78%; background: var(--border); transform: translate(-50%, -50%) rotate(30deg); }
.constellation-lines { position: absolute; inset: 10% 8%; width: 84%; height: 80%; overflow: visible; }
.constellation-lines line { stroke: var(--border-strong); stroke-width: .7; opacity: .65; vector-effect: non-scaling-stroke; transition: stroke 150ms ease, opacity 150ms ease; }
.constellation-lines line.is-active { stroke: var(--signal); opacity: .9; }
.constellation-lines line.is-dimmed { opacity: .28; }
.relationship-node { position: absolute; z-index: 1; width: 88px; height: 88px; border: 1px solid var(--border-strong); background: rgba(11, 12, 10, .92); transform: translate(-50%, -50%); transition: border-color 150ms ease, color 150ms ease, opacity 150ms ease, transform 150ms ease; }
.relationship-node.is-dimmed { opacity: .58; }
.relationship-node:hover, .relationship-node:focus-within, .relationship-node.is-active { border-color: var(--signal); color: var(--signal); transform: translate(-50%, -50%) scale(1.05); }
.relationship-node a { display: grid; width: 100%; height: 100%; place-content: center; gap: 7px; padding: 10px; text-align: center; text-decoration: none; }
.relationship-node strong { font-size: 10px; letter-spacing: .08em; }
.relationship-node span { color: var(--muted); font: 9px var(--font-mono); letter-spacing: .1em; text-transform: uppercase; }
.node-yasp { top: 28%; left: 23%; } .node-deploy { top: 24%; left: 77%; } .node-reddit { top: 74%; left: 27%; } .node-pdf { top: 70%; left: 71%; }
.constellation-copy { padding: 20px; }
.constellation-copy h2 { margin-top: 12px; max-width: 260px; font-size: 26px; }
.constellation-copy > p:not(.kicker) { max-width: 400px; margin: 16px 0 0; color: var(--muted); font-size: 14px; }
.theme-controls { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 24px; }
.theme-button { min-height: 44px; padding: 9px 12px; border: 1px solid var(--border); color: var(--muted); font-size: 10px; transition: border-color 150ms ease, color 150ms ease, background-color 150ms ease; }
.theme-button:hover, .theme-button.is-selected { border-color: var(--signal); background: rgba(143, 168, 154, .12); color: var(--fg); }
.constellation-list { display: grid; gap: 0; margin: 24px 0 0; padding: 0; list-style: none; }
.constellation-list a { display: flex; min-height: 44px; align-items: center; justify-content: space-between; gap: 12px; border-bottom: 1px solid var(--border); color: var(--muted); font: 10px var(--font-mono); letter-spacing: .12em; text-decoration: none; text-transform: uppercase; }
.constellation-list li:first-child a { border-top: 1px solid var(--border); }
.constellation-list a:hover { color: var(--fg); }
.constellation-list small { color: var(--subtle); font-size: 9px; }

.content-section, .page-main { width: min(var(--shell), 100%); margin-inline: auto; padding: 80px var(--gutter); }
.section-intro { max-width: 620px; }
.section-intro h1, .section-intro h2 { margin-top: 16px; font-size: clamp(38px, 5vw, 54px); }
.section-intro > p:last-child { max-width: 600px; margin: 20px 0 0; color: var(--muted); }
.project-list, .work-list { margin: 48px 0 0; padding: 0; list-style: none; border-block: 1px solid var(--border); }
.project-row, .work-item { display: grid; grid-template-columns: 4.5rem minmax(0, 1fr) auto; gap: 24px; align-items: end; padding: 32px 0; border-bottom: 1px solid var(--border); transition: color 150ms ease, transform 150ms ease; }
.project-row:last-child, .work-item:last-child { border-bottom: 0; }
.project-row:hover, .work-item:hover { color: var(--signal); transform: translateX(8px); }
.project-index, .work-index, .work-meta { color: var(--subtle); font: 11px var(--font-mono); letter-spacing: .18em; text-transform: uppercase; }
.project-evidence, .work-copy { min-width: 0; }
.project-title, .work-copy strong { margin-top: 8px; font-size: clamp(32px, 5vw, 52px); }
.project-evidence > p:not(.kicker), .work-copy span { max-width: 620px; margin: 12px 0 0; color: var(--muted); font-size: 14px; line-height: 1.6; }
.stack-record { margin-top: 16px; color: var(--subtle); font-size: 10px; line-height: 1.6; }
.project-links { display: flex; flex-wrap: wrap; gap: 14px 20px; margin-top: 18px; font-size: 10px; }
.project-links a, .text-link, .contact-link { color: var(--signal); text-decoration: none; }
.project-links a:hover, .text-link:hover, .contact-link:hover { color: var(--fg); text-decoration: underline; text-underline-offset: 4px; }
.row-arrow, .work-arrow { display: inline-flex; min-height: 44px; align-items: center; color: var(--muted); font-size: 20px; text-decoration: none; }

.practice-section { border-block: 1px solid var(--border); }
.practice-inner { max-width: var(--shell); }
.practice-title { margin-top: 16px; max-width: 720px; font-size: clamp(38px, 5vw, 48px); }
.practice-copy { max-width: 672px; margin: 20px 0 0; color: var(--muted); font-size: 16px; line-height: 1.65; }
.practice-layers { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1px; margin: 48px 0 0; padding: 0; list-style: none; background: var(--border); }
.practice-layers li { min-height: 188px; padding: 24px; background: var(--bg); }
.practice-layers h3 { margin: 12px 0 0; font-size: 24px; }
.practice-layers li > p:last-child { margin: 12px 0 0; color: var(--muted); font-size: 14px; line-height: 1.65; }
.large-copy { max-width: 600px; margin: 0; color: var(--muted); font-size: 16px; line-height: 1.7; }
.text-link { display: inline-flex; min-height: 44px; align-items: center; gap: 10px; margin-top: 22px; font: 11px var(--font-mono); letter-spacing: .16em; text-transform: uppercase; }
.contact-section { border-top: 0; }
.contact-inner { padding-block: 80px; }
.contact-title { margin-top: 16px; max-width: 760px; font-size: clamp(54px, 9vw, 112px); }
.contact-copy { max-width: 560px; margin: 20px 0 0; color: var(--muted); }
.contact-link { display: inline-flex; min-height: 44px; align-items: center; gap: 10px; margin-top: 22px; font: 11px var(--font-mono); letter-spacing: .1em; text-transform: uppercase; }
.site-footer { margin-top: 0; border-top: 1px solid var(--border); color: var(--subtle); font-size: 9px; line-height: 1.6; }
.site-footer-inner { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: end; gap: 32px; padding: 16px var(--gutter) 20px; }
.site-footer p { margin: 0; }
.site-footer-identity { display: grid; gap: 8px; }
.site-footer nav { display: flex; flex-wrap: wrap; gap: 20px; }
.site-footer a, .site-footer button { color: inherit; text-decoration: none; }
.site-footer a:hover, .site-footer button:hover { color: var(--fg); }

.page-intro { padding-block: 64px 56px; border-bottom: 1px solid var(--border); }
.page-intro h1 { margin-top: 16px; max-width: 900px; font-size: clamp(38px, 5vw, 64px); }
.page-lede { max-width: 620px; margin: 22px 0 0; color: var(--muted); font-size: 16px; }
.error-page { padding-block: 120px 160px; }
.error-page h1 { margin-top: 16px; max-width: 760px; font-size: clamp(38px, 5vw, 64px); }
.error-page p:not(.kicker) { max-width: 520px; margin: 24px 0 0; color: var(--muted); }
.about-content { display: grid; gap: 64px; padding-top: 56px; }
.about-section { display: grid; gap: 20px; }
.case-body { display: grid; gap: 16px; max-width: 680px; color: var(--muted); font-size: 16px; line-height: 1.75; }
.case-body p { margin: 0; }
.section-heading { max-width: 720px; margin-top: 12px; font-size: clamp(34px, 5vw, 56px); }
.fact-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1px; background: var(--border); }
.fact { min-height: 120px; padding: 18px; background: var(--bg-elevated); }
.fact dd { margin: 10px 0 0; color: var(--fg); font-size: 14px; }
.fact a { text-underline-offset: 4px; }
.contact-panel { padding: 24px; border: 1px solid var(--border); background: var(--bg-elevated); }
.panel-copy { max-width: 520px; margin: 16px 0 24px; color: var(--muted); font-size: 14px; }
.proof-list { margin-top: 20px; }

.scene-frame { position: relative; overflow: hidden; border: 1px solid var(--border); background: var(--bg-elevated); }
.scene-visual { position: relative; min-height: 320px; overflow: hidden; background: var(--bg-elevated) url("/img/system-grid.svg") center / cover no-repeat; }
[aria-label*="YASP"] .scene-visual { background-image: url("/img/system-yasp.svg"); }
[aria-label*="WinService"] .scene-visual { background-image: url("/img/system-deploy.svg"); }
[aria-label*="Reddit"] .scene-visual { background-image: url("/img/system-retrieval.svg"); }
[aria-label*="PDF Read Aloud"] .scene-visual { background-image: url("/img/system-playback.svg"); }
.scene-visual::before { position: absolute; inset: 12% 8%; border: 1px solid rgba(236, 234, 227, .08); content: ""; transform: skewY(-8deg); }
.scene-visual::after { position: absolute; top: 12%; bottom: 12%; left: 50%; width: 1px; background: var(--border); content: ""; transform: rotate(34deg); }
.scene-label { position: absolute; z-index: 1; inset: 50% auto auto 50%; color: var(--subtle); font: 10px var(--font-mono); letter-spacing: .2em; text-align: center; text-transform: uppercase; transform: translate(-50%, -50%); }
.scene-line { position: absolute; z-index: 1; height: 1px; background: var(--border-strong); transform-origin: left center; }
.scene-line--a { top: 35%; left: 14%; width: 70%; transform: rotate(-12deg); }
.scene-line--b { top: 65%; left: 20%; width: 54%; transform: rotate(16deg); }
.scene-node { position: absolute; z-index: 2; display: grid; min-width: 92px; min-height: 56px; place-content: center; padding: 8px; border: 1px solid var(--border-strong); background: rgba(19, 20, 17, .9); color: var(--muted); font: 10px var(--font-mono); letter-spacing: .12em; text-align: center; text-transform: uppercase; }
.scene-node--one { top: 24%; left: 12%; } .scene-node--two { top: 22%; right: 12%; } .scene-node--three { bottom: 18%; left: 40%; }
.scene-caption { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px; padding: 16px; border-top: 1px solid var(--border); }
.scene-caption strong { font: 20px var(--font-display); font-weight: 400; }
.scene-caption span { color: var(--muted); font: 10px var(--font-mono); letter-spacing: .14em; text-transform: uppercase; }
.scene-stages { display: flex; gap: 8px; overflow-x: auto; padding-top: 14px; }
.scene-stage { min-height: 40px; padding: 8px 10px; border: 1px solid var(--border); background: transparent; color: var(--muted); cursor: pointer; font: 10px var(--font-mono); letter-spacing: .12em; white-space: nowrap; text-transform: uppercase; }
.scene-stage.is-current { border-color: var(--signal); color: var(--fg); }
.scene-stage:hover, .scene-stage:focus-visible { border-color: var(--fg); color: var(--fg); }
.scene-stage[aria-pressed="true"] { border-color: var(--signal); background: rgba(143, 168, 154, .12); color: var(--fg); }
.scene-modes { display: flex; flex-basis: 100%; flex-wrap: wrap; gap: 8px; padding-top: 4px; }
.scene-control { min-height: 40px; padding: 8px 10px; border: 1px solid var(--border); color: var(--muted); cursor: pointer; font: 10px var(--font-mono); letter-spacing: .12em; text-transform: uppercase; }
.scene-control:hover, .scene-control:focus-visible, .scene-control.is-selected { border-color: var(--signal); background: rgba(143, 168, 154, .12); color: var(--fg); }

@media (min-width: 900px) {
  :root { --gutter: 32px; }
  .constellation-inner { grid-template-columns: minmax(0, 1fr) 280px; }
  .constellation-stage { min-height: 440px; border-bottom: 0; }
  .constellation-copy { border-left: 1px solid var(--border); padding: 24px; }
  .hero { padding-top: 96px; }
  .hero { padding-bottom: 34px; }
  .hero-title { margin-top: 26px; }
  .hero-tagline { margin-top: 32px; }
  .hero .action-row { margin-top: 36px; }
  .constellation-stage::before { inset: 14% 12%; }
  .constellation-stage::after { top: 50%; height: 78%; }
  .constellation-lines { inset: 10% 8%; height: 80%; }
  .node-yasp { top: 64%; }
  .node-deploy { top: 60%; }
  .node-reddit { top: 88%; }
  .node-pdf { top: 84%; }
  .content-section, .page-main { padding-block: 112px; }
  .contact-inner { padding-block: 112px; }
  .page-intro { padding-block: 96px 80px; }
  .scene-visual { min-height: 400px; }
  .scene-caption { padding: 20px; }
}

@media (max-width: 760px) {
  .header-inner { min-height: 58px; }
  .wordmark { max-width: 88px; white-space: normal; line-height: 1.2; }
  .primary-nav { gap: 0; font-size: 9px; letter-spacing: .12em; }
  .primary-nav a { padding-inline: 5px; }
  .hero { padding-top: 64px; }
  .hero .kicker { max-width: 300px; }
  .hero-title { font-size: clamp(36px, 10vw, 46px); }
  .hero { padding-bottom: 36px; }
  .hero-tagline { max-width: 350px; margin-top: 34px; font-size: clamp(20px, 5.5vw, 23px); }
  .hero-lede { font-size: 16px; }
  .action-row { display: flex; flex-direction: column; align-items: flex-start; }
  .button { justify-content: initial; }
  .constellation-inner { display: block; }
  .constellation-stage::before { inset: 50% auto auto 50%; width: max-content; border: 0; color: var(--muted); content: "PREPARING SYSTEM VIEW"; font: 11px var(--font-mono); letter-spacing: .14em; text-transform: uppercase; transform: translate(-50%, -50%); }
  .constellation-stage::after, .constellation-lines, .relationship-node { display: none; }
  .constellation-copy { border-top: 1px solid var(--border); }
  .project-row, .work-item { grid-template-columns: 3rem minmax(0, 1fr) auto; gap: 12px; align-items: start; padding-block: 28px; }
  .project-title, .work-copy strong { font-size: clamp(31px, 9vw, 48px); }
  .project-row:hover, .work-item:hover { transform: none; }
  .practice-layers { grid-template-columns: 1fr; }
  .fact-grid { grid-template-columns: 1fr; }
  .site-footer-inner { grid-template-columns: 1fr; gap: 12px; }
  .error-page { padding-block: 96px 120px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}
