@layer tokens, base, components, layout;
@layer tokens {
  :root {
    color-scheme: light;
    --paper: #fff; --ink: #171717; --muted: #606060; --surface: #f5f5f5; --line: #dedede; --heart: #ce303f;
    --font: 'Arial Rounded MT Bold', 'Trebuchet MS', Arial, sans-serif;
    --body-font: 'Trebuchet MS', Arial, sans-serif;
    --space-1: .5rem; --space-2: 1rem; --space-3: 1.5rem; --space-4: 2rem; --space-6: 3rem; --space-10: 5rem;
    --radius-small: .75rem; --radius: 1.5rem; --radius-pill: 999px; --stroke: 2px;
    --page-width: 1160px; --duration: 160ms;
  }
}
@layer base {
  *, *::before, *::after { box-sizing: border-box; }
  html { scroll-behavior: smooth; scroll-padding-top: 2rem; }
  body { margin: 0; background: var(--paper); color: var(--ink); font-family: var(--body-font); font-size: 1rem; line-height: 1.6; -webkit-font-smoothing: antialiased; }
  a { color: inherit; text-decoration: none; }
  button { font: inherit; }
  img { display: block; max-width: 100%; height: auto; }
  h1, h2, h3, p, figure { margin: 0; }
  h1, h2, h3 { font-family: var(--font); font-weight: 800; letter-spacing: -.055em; line-height: 1.08; text-wrap: balance; }
  h1 { font-size: clamp(3.75rem, 6.7vw, 6rem); }
  h2 { font-size: clamp(2.4rem, 4vw, 3.75rem); }
  h3 { font-size: clamp(2.2rem, 3.5vw, 3.3rem); }
  :focus-visible { outline: 3px solid var(--ink); outline-offset: 5px; }
  ::selection { background: var(--ink); color: var(--paper); }
  @media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } *, *::before, *::after { transition: none !important; animation: none !important; } }
}
@layer components {
  .wrap { width: min(var(--page-width), calc(100% - 5rem)); margin-inline: auto; }
  .wordmark { display: inline-flex; align-items: baseline; font-size: 1.65rem; font-weight: 900; line-height: 1; letter-spacing: -.09em; white-space: nowrap; }
  .wordmark span:not(.brand-period) { font-weight: 400; }
  .brand-period { margin-left: .07em; }
  .button { display: inline-flex; justify-content: center; align-items: center; gap: 1.6rem; min-height: 54px; padding: .8rem 1.4rem; border: var(--stroke) solid var(--ink); border-radius: var(--radius-pill); font-size: 1rem; font-weight: 700; line-height: 1.4; transition: background var(--duration), color var(--duration), transform var(--duration); }
  .button:hover { background: var(--ink); color: var(--paper); }
  .button:active { transform: translateY(2px); }
  .button-primary { background: var(--ink); color: var(--paper); }
  .button-primary:hover { background: var(--paper); color: var(--ink); }
  .button-small { min-height: 46px; padding: .6rem 1.2rem; gap: 1rem; font-size: .875rem; }
  .button-inverse { color: var(--paper); background: transparent; border-color: var(--paper); cursor: pointer; }
  .button-inverse:hover { color: var(--ink); background: var(--paper); }
  [hidden] { display: none !important; }
  .button span[aria-hidden] { font-size: 1.4rem; font-weight: 400; }
  .text-link { display: inline-flex; align-items: center; gap: .65rem; min-height: 44px; font-weight: 700; text-underline-offset: 5px; }
  .text-link:hover { text-decoration: underline; }
  .eyebrow { margin-bottom: 1.35rem; font-size: .8rem; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; }
  .actions { display: flex; align-items: center; flex-wrap: wrap; gap: 1rem 1.8rem; margin-top: 2rem; }
  .section { padding-block: 5rem; }
  .section-heading { display: flex; align-items: flex-end; justify-content: space-between; gap: 2rem; margin-bottom: 2.5rem; }
  .section-heading > p { color: var(--muted); font-size: .95rem; padding-bottom: .15rem; }
  .tags { display: flex; flex-wrap: wrap; gap: .5rem; padding: 0; margin: 1.7rem 0 2rem; list-style: none; }
  .tags li { padding: .3rem .8rem; border: 1px solid var(--ink); border-radius: var(--radius-pill); font-size: .875rem; }
  /* Crop the supplied reference’s white margins in presentation; preserve the original asset. */
  .effect-definitions { position: absolute; pointer-events: none; }
  .rootlet-bullet { position: relative; display: inline-block; flex: 0 0 auto; width: 1.5rem; height: 1.5rem; vertical-align: middle; }
  .sprout-art { position: relative; display: block; width: 100%; height: 100%; overflow: hidden; transform-origin: 50% 86%; pointer-events: none; }
  .sprout-art img { position: absolute; width: 169.375%; max-width: none; height: auto; left: -37.5%; top: -41.875%; }
  .sprout-green { opacity: 0; filter: url(#sprout-green-ink); }
  .rootlet-bullet.is-growing .sprout-art { animation: sprout-sway 1350ms ease-in-out; }
  .rootlet-bullet.is-growing .sprout-green { animation: sprout-flush 1350ms ease-in-out; }
  .rootlet-bullet-large { width: 2.5rem; height: 2.5rem; }
  .sprout-cluster { display: inline-flex; align-items: flex-end; gap: .4rem; }
  .sprout-cluster .rootlet-bullet:first-child { width: 1.2rem; height: 1.2rem; }
  .sprout-cluster .rootlet-bullet:last-child { width: 1.75rem; height: 1.75rem; }
  @keyframes sprout-sway {
    0%, 100% { transform: rotate(0) scale(1); }
    16% { transform: rotate(-11deg) scale(.96, 1.13); }
    38% { transform: rotate(9deg) scale(1.08, 1.16); }
    62% { transform: rotate(-5deg) scale(1.04, 1.09); }
    82% { transform: rotate(3deg) scale(1.02, 1.04); }
  }
  @keyframes sprout-flush { 0%, 100% { opacity: 0; } 14%, 76% { opacity: 1; } }
  @media (prefers-reduced-motion: reduce) { .rootlet-bullet.is-growing .sprout-green { opacity: 1; } }
  .sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; border: 0; }
  .skip-link { position: fixed; top: -100px; left: 1rem; z-index: 10; padding: .8rem; color: var(--paper); background: var(--ink); }
  .skip-link:focus { top: 1rem; }
}
@layer layout {
  .site-header { display: flex; align-items: center; justify-content: space-between; gap: 1rem; min-height: 110px; border-bottom: 1px solid var(--line); }
  .site-header nav { display: flex; align-items: center; gap: 2.3rem; font-size: .875rem; font-weight: 700; }
  .site-header nav > a:not(.button) { display: flex; align-items: center; min-height: 44px; }
  .site-header nav > a:not(.button):hover { text-decoration: underline; text-underline-offset: 5px; }
  .hero { display: grid; grid-template-columns: 1.35fr 1fr; gap: 2.5rem; align-items: center; padding-block: 5rem 4.5rem; }
  .hero .eyebrow { margin-bottom: 1.8rem; }
  .outlined-word { color: var(--paper); -webkit-text-stroke: 2px var(--ink); }
  .hero-description { max-width: 390px; margin-top: 1.8rem; color: var(--muted); font-size: 1.125rem; line-height: 1.7; }
  .hero-portrait { padding: .5rem 1rem 0; text-align: center; }
  .portrait-stage { width: 100%; max-width: 390px; aspect-ratio: 1; margin-inline: auto; }
  .portrait-static, .portrait-live { display: block; width: 100%; height: auto; }
  .portrait-toggle { display: block; width: 100%; padding: 0; border: 0; background: transparent; cursor: pointer; border-radius: var(--radius); -webkit-tap-highlight-color: transparent; }
  .portrait-head { transform: translate(var(--head-x, 0px), var(--head-y, 0px)) rotate(var(--head-z, 0deg)); transform-origin: 627px 930px; transition: transform 200ms ease-out; }
  .portrait-eyes { transform: translate(var(--gaze-x, 0px), var(--gaze-y, 0px)); transition: transform 120ms ease-out; }
  .portrait-brows { transform: translateY(var(--brow-y, 0px)); transition: transform 150ms ease-out; }
  .portrait-haired { transition: opacity 160ms ease-out; }
  .portrait-toggle[aria-pressed="true"] .portrait-haired { opacity: 0; }
  .discipline-strip { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 1rem; padding: 1.5rem 0; margin-block: 0; border-block: 1px solid var(--ink); font-size: .875rem; font-weight: 700; list-style: none; }
  .discipline-strip li { display: flex; align-items: center; gap: .75rem; }
  .project-card { display: grid; grid-template-columns: 1fr 1fr; border: var(--stroke) solid var(--ink); border-radius: var(--radius); overflow: hidden; }
  .project-copy { padding: 3rem; align-self: center; }
  .project-identity { display: flex; gap: .75rem; align-items: center; margin-bottom: 2.1rem; font-size: 1.25rem; font-weight: 800; letter-spacing: -.03em; }
  .project-identity img { width: 40px; }
  .project-copy > p { margin-top: 1.3rem; max-width: 340px; color: var(--muted); }
  .project-preview { position: relative; display: flex; justify-content: center; align-items: flex-start; min-height: 580px; padding-top: 3rem; background: var(--surface); border-left: var(--stroke) solid var(--ink); overflow: hidden; }
  .app-screenshot { width: 250px; border: 5px solid var(--ink); border-radius: 38px; transform: rotate(7deg); margin-bottom: -55px; filter: grayscale(1); transition: filter 450ms ease; }
  .project-card:focus-within .app-screenshot, .project-preview.is-color .app-screenshot { filter: grayscale(0); }
  @media (hover: hover) { .project-preview:hover .app-screenshot { filter: grayscale(0); } }
  .preview-caption { position: absolute; left: 0; right: 0; bottom: 0; padding: .65rem; background: var(--surface); text-align: center; font-size: .8rem; color: var(--muted); border-top: 1px solid var(--line); }
  .about-intro { display: grid; grid-template-columns: 1fr 1fr; gap: 4rem; align-items: start; }
  .about-copy { color: var(--muted); padding-top: 2.5rem; }
  .about-copy p + p { margin-top: 1rem; }
  .principles { display: grid; grid-template-columns: repeat(3, 1fr); gap: 2rem; margin-top: 3.5rem; }
  .principle { border-top: var(--stroke) solid var(--ink); padding-top: 1.3rem; }

  .principle h3 { font-size: 1.35rem; line-height: 1.25; letter-spacing: -.035em; margin-block: 1.2rem .75rem; }
  .principle p { color: var(--muted); font-size: .95rem; }
  .contact-section { display: grid; grid-template-columns: 1fr 1fr; gap: 3rem; padding: 4rem; margin-block: 2rem 5rem; background: var(--ink); color: var(--paper); border-radius: var(--radius); }
  .contact-description { margin-top: 1.5rem; max-width: 380px; }
  .contact-actions { align-self: center; min-width: 0; }
  .contact-email { display: inline-block; padding-block: .5rem; border-bottom: 1px solid var(--paper); font-size: clamp(1.1rem, 2vw, 1.65rem); font-weight: 700; letter-spacing: -.04em; overflow-wrap: anywhere; text-underline-offset: .3rem; }
  .contact-email:hover { text-decoration: underline; }
  .contact-actions > p { margin-block: 1rem 1.5rem; font-size: .95rem; }
  .contact-actions .copy-status { font-size: .875rem; margin: .6rem 0 0; min-height: 1.5em; }
  .contact-section :focus-visible { outline-color: var(--paper); }
  .site-footer { display: flex; align-items: center; justify-content: space-between; gap: 1.5rem; padding-block: 2rem; border-top: 1px solid var(--line); }
  .site-footer p { color: var(--muted); font-size: .875rem; }
  .footer-heart { color: var(--heart); font-size: 1.15em; }
  @media (max-width: 850px) {
    .wrap { width: calc(100% - 3rem); }
    .hero { gap: 1rem; grid-template-columns: 1.3fr 1fr; padding-block: 4rem; }
    h1 { font-size: clamp(3.2rem, 7vw, 5rem); }
    .hero-portrait { padding-inline: 0; }
    .project-copy { padding: 2rem; }
    .project-preview { min-height: 550px; }
    .app-screenshot { width: 220px; }
    .about-intro { gap: 2rem; }
    .contact-section { padding: 2.5rem; gap: 2rem; }
  }
  @media (max-width: 620px) {
    .wrap { width: calc(100% - 2.5rem); }
    .site-header { min-height: 90px; }
    .wordmark { font-size: 1.4rem; }
    .site-header nav { gap: 1rem; }
    .site-header .button-small { min-height: 44px; padding: .45rem .8rem; gap: .5rem; }
    .site-header nav > a[href='#about'] { display: none; }
    .hero { grid-template-columns: 1fr; gap: 2.5rem; padding-block: 3.5rem 2.5rem; }
    h1 { font-size: clamp(3.35rem, 12vw, 4.7rem); }
    .hero .eyebrow { font-size: .75rem; }
    .portrait-stage { max-width: 265px; }
    .discipline-strip { gap: 1.1rem; flex-direction: column; align-items: center; }
    .discipline-strip li { gap: 1.2rem; }
    .discipline-strip li > span:last-child { width: 9rem; }
    .section { padding-block: 3rem; }
    .section-heading { display: block; }
    .section-heading > p { margin-top: 1rem; }
    .project-card { grid-template-columns: 1fr; }
    .project-copy { padding: 2rem 1.5rem; }
    .project-preview { border-left: 0; border-top: var(--stroke) solid var(--ink); min-height: 450px; max-height: 450px; }
    .app-screenshot { width: 235px; }
    .about-intro, .principles, .contact-section { grid-template-columns: 1fr; }
    .about-copy { padding-top: 0; }
    .principles { gap: 1.8rem; margin-top: 2.5rem; }
    .contact-section { padding: 2rem 1.5rem; margin-block: 1rem 3rem; }
    .site-footer { flex-wrap: wrap; justify-content: space-between; }
    .site-footer p { order: 3; flex-basis: 100%; }
  }
  @media (forced-colors: active) { .outlined-word { color: CanvasText; -webkit-text-stroke: 0; } }
}
