@import url('https://fonts.googleapis.com/css2?family=DM+Sans:wght@400;500;600;700&family=Space+Grotesk:wght@400;500;600;700&display=swap');

:root {
  color-scheme: light;
  --paper: #f3f4f4; --surface: #fcfcfb; --ink: #090f12; --muted: #626b71; --line: #cbd0d3;
  --accent: #b9f42e; --accent-ink: #476800; --brand: #97ce12; --live: #79a631; --restricted: #b48a3b;
  --playtest: #9573b4; --upcoming: #90999e; --internal: #b9f42e;
  --stage: #e7eaeb; --shadow: 0 18px 40px -28px #172a3850;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 2rem; }
body { margin: 0; background: var(--paper); color: var(--ink); font: 1rem/1.6 'DM Sans', sans-serif; -webkit-font-smoothing: antialiased; }
a { color: inherit; text-decoration: none; -webkit-tap-highlight-color: transparent; }
a:focus-visible { outline: 3px solid var(--accent-ink); outline-offset: 5px; }
::selection { background: var(--accent); color: #161914; }
.wrap { width: min(1360px, calc(100% - 96px)); margin-inline: auto; }
.site-header { display: flex; align-items: center; gap: 32px; min-height: 112px; }
.site-header::after { content: ''; flex: 1; height: 1px; background: var(--line); order: 1; }
.wordmark { display: inline-flex; align-items: center; gap: 12px; font: 700 2.5rem/1 'Space Grotesk', sans-serif; letter-spacing: -.07em; }
.wordmark svg { width: 33px; height: 33px; color: var(--brand); transition: transform .4s ease; }
.wordmark:hover svg { transform: rotate(90deg); }
.header-label { order: 2; font-size: .875rem; line-height: 1.45; color: var(--muted); }
.page-heading { display: flex; justify-content: space-between; align-items: flex-end; gap: 40px; padding-block: 38px 54px; }
h1 { display: flex; align-items: baseline; margin: 0; font: 700 clamp(4rem, 9.6vw, 9rem)/.94 'DM Sans', sans-serif; letter-spacing: -.075em; }
.heading-period { color: var(--ink); }
.project-count { align-self: flex-start; margin: 10px 0 0 20px; color: var(--ink); font: 400 1.5rem/1.3 'Space Grotesk', sans-serif; letter-spacing: -.05em; }
.legend { display: flex; flex-wrap: wrap; justify-content: flex-start; gap: 9px 18px; max-width: 360px; list-style: none; padding: 0 0 4px; margin: 0; color: var(--muted); font-size: .875rem; }
.legend li { display: inline-flex; align-items: center; gap: 8px; }
.legend-swatch { width: 22px; height: 16px; border-radius: 2px; display: inline-block; }
.project-section + .project-section { margin-top: 64px; }
.section-heading { display: flex; align-items: center; gap: 12px; margin-bottom: 20px; }
.section-heading h2 { margin: 0; font: 600 1.25rem/1.4 'Space Grotesk', sans-serif; letter-spacing: -.04em; }
.section-number { color: var(--ink); font: 500 1.25rem/1.4 'Space Grotesk', sans-serif; }
.section-number::after { content: ' /'; color: var(--muted); }
.section-count { color: var(--muted); font: .875rem/1.5 ui-monospace, monospace; }
.section-rule { height: 1px; background: var(--line); flex: 1; margin-inline: 8px; }
.project-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; }
.internal-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.project-card { position: relative; display: flex; flex-direction: column; min-width: 0; background: var(--surface); border-radius: 8px; overflow: hidden; transition: transform .25s ease, box-shadow .25s ease; }
.border-live { border: 1px solid var(--live); }
.border-restricted { border: 3px double var(--restricted); }
.border-playtest { border: 2px dotted var(--playtest); }
.border-coming-soon { border: 1px dashed var(--project-edge, var(--upcoming)); }
.border-internal { border: 1px solid var(--line); border-left: 4px solid var(--internal); }
.card-meta { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 18px 22px; }
.category { color: var(--muted); font-size: .75rem; font-weight: 500; letter-spacing: .09em; text-transform: uppercase; }
.card-index { color: var(--muted); font: .75rem/1.5 ui-monospace, monospace; flex-shrink: 0; }
.project-preview { position: relative; margin: 0 12px; aspect-ratio: 3 / 2; overflow: hidden; border-radius: 4px; background: var(--stage); }
.project-preview > img { display: block; width: 100%; height: 100%; object-fit: contain; object-position: center; transition: transform .5s ease; }
.project-preview figcaption { position: absolute; bottom: 12px; left: 16px; max-width: calc(100% - 32px); font-size: .75rem; color: var(--muted); }
.card-body { display: flex; flex-direction: column; flex: 1; padding: 24px; }
.card-title { display: flex; align-items: center; gap: 13px; min-height: 44px; }
.project-icon { width: 40px; height: 40px; flex-shrink: 0; display: grid; place-items: center; border-radius: 10px; overflow: hidden; background: var(--stage); }
.project-icon img { width: 100%; height: 100%; object-fit: contain; }
.card-title h3 { margin: 0; font: 700 1.75rem/1.15 'DM Sans', sans-serif; letter-spacing: -.055em; overflow-wrap: anywhere; }
.mobile-grid .card-title h3 { font-size: 2.15rem; }
.description { margin: 14px 0 24px; color: var(--muted); font-size: 1rem; line-height: 1.55; max-width: 48ch; }
.card-bottom { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: auto; padding-top: 16px; border-top: 1px solid var(--line); min-height: 61px; }
.status { color: var(--muted); font-size: .875rem; }
.border-live .status { color: var(--accent-ink); }
.border-live .status::before { content: ''; display: inline-block; width: 7px; height: 7px; margin-right: 8px; border-radius: 50%; background: currentColor; }
.project-link { display: inline-flex; align-items: center; justify-content: center; gap: 18px; min-height: 44px; padding: 8px 4px 8px 12px; border-radius: 4px; font-size: .875rem; font-weight: 500; color: var(--ink); transition: color .2s; }
.project-link span { font-size: 1.7rem; line-height: 1; transition: transform .2s; }
.project-link:hover { color: var(--accent-ink); }
.project-link:hover span { transform: translate(2px,-2px); }
.release-mark { color: var(--upcoming); font: 1.4rem/1 ui-monospace, monospace; }
.compact-card .card-body { padding-top: 10px; }
.compact-card .description { min-height: 3.1em; }

/* The opening project is an editorial feature with the real app alongside its title. */
#atlas { grid-column: 1 / -1; display: grid; grid-template-columns: minmax(0, .8fr) minmax(0, 1.6fr); grid-template-rows: auto 1fr; border-color: #78a5b1; background: linear-gradient(120deg, var(--surface), #dce8ed); }
#atlas .card-meta { grid-column: 1; grid-row: 1; padding: 28px 30px; flex-wrap: wrap; }
#atlas .project-preview { grid-column: 2; grid-row: 1 / 3; margin: 8px 8px 8px 0; aspect-ratio: 3 / 2; background: #081924; border-left: 1px solid #78a5b144; }
#atlas .card-body { grid-column: 1; grid-row: 2; padding: 32px 30px 28px; justify-content: flex-end; }
#atlas .card-title { align-items: center; flex-wrap: wrap; }
#atlas .card-title h3 { font-size: clamp(2.5rem, 4.5vw, 4.5rem); line-height: 1; }
#atlas .description { max-width: 25ch; margin-block: 20px 32px; }
#atlas .card-bottom { margin-top: 0; }

/* Original paired phone renders stay intact on individual softly lit stages. */
.device-preview { aspect-ratio: 8 / 7; margin-inline: 8px; padding: 4px 6px 34px; background: radial-gradient(ellipse at 50% 48%, var(--device-light, #90a4bf38), transparent 73%), var(--device-base, #0d171b); }
.device-preview figcaption { color: #b9c3c8; }
.device-preview > img { object-fit: contain; filter: drop-shadow(0 14px 15px #00000024); }
#todo { --device-light: #6ea35c70; --device-base: #0c1813; --project-edge: #8cac38; }
#sterk { --device-light: #b8751670; --device-base: #1a1206; --project-edge: #bd880b; }
#myk { --device-light: #729c7060; --device-base: #101a15; --project-edge: #7b9f77; }
#receipt { --device-light: #408b7860; --device-base: #0b1917; --project-edge: #5f9986; }
#meal { --device-light: #b1875060; --device-base: #1b160e; --project-edge: #ac8650; }
#maptest { --device-light: #638b9860; --device-base: #0b151c; --project-edge: #698b99; }
footer { display: flex; align-items: center; gap: 24px; padding-block: 36px; margin-top: 72px; border-top: 1px solid var(--line); color: var(--muted); font-size: .875rem; }
.footer-brand { display: flex; align-items: center; gap: 9px; margin-right: auto; color: var(--ink); font: 700 1.8rem/1 'Space Grotesk', sans-serif; letter-spacing: -.06em; }
.footer-brand svg { width: 23px; height: 23px; color: var(--brand); }
footer > a:last-child { min-height: 44px; display: flex; align-items: center; }
footer > a:last-child:hover { color: var(--ink); text-decoration: underline; text-underline-offset: 5px; }
.skip-link { position: fixed; top: -100px; left: 15px; padding: 12px 20px; background: var(--accent); color: #161914; z-index: 10; }
.skip-link:focus { top: 15px; }
@media (hover: hover) and (prefers-reduced-motion: no-preference) {
  .project-card:hover { transform: translateY(-3px); box-shadow: var(--shadow); }
  .project-card:hover .device-preview > img { transform: translateY(-4px); }
}
@media (max-width: 1100px) {
  .wrap { width: calc(100% - 48px); }
  .page-heading { align-items: flex-start; flex-direction: column; gap: 28px; padding-bottom: 40px; }
  .legend { max-width: none; }
  .showcase-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .internal-grid { grid-template-columns: 1fr; }
  .compact-card .description { min-height: 0; max-width: none; }
  #atlas .card-meta { padding: 20px; }
  #atlas .card-body { padding: 20px; }
}
@media (max-width: 700px) {
  .wrap { width: calc(100% - 32px); }
  .site-header { min-height: 92px; gap: 20px; }
  .wordmark { font-size: 2rem; }
  .wordmark svg { width: 28px; height: 28px; }
  .header-label { font-size: .875rem; }
  .page-heading { padding-block: 28px 34px; gap: 24px; }
  h1 { font-size: clamp(3rem, 13.5vw, 5.8rem); }
  .project-count { margin: 4px 0 0 12px; font-size: 1rem; }
  .legend { gap: 10px 14px; }
  .project-grid, .showcase-grid { grid-template-columns: 1fr; gap: 18px; }
  .project-section + .project-section { margin-top: 40px; }
  .card-body { padding: 22px; }
  .card-meta { padding: 16px 22px; }
  .card-title h3, .mobile-grid .card-title h3 { font-size: 1.85rem; }
  #atlas { display: flex; }
  #atlas .project-preview { margin: 0 12px; aspect-ratio: 3 / 2; }
  #atlas .card-body { padding: 24px; }
  #atlas .card-title h3 { font-size: 2.5rem; }
  #atlas .description { max-width: none; margin-block: 14px 24px; }
  footer { margin-top: 44px; gap: 16px; flex-wrap: wrap; }
}
@media (prefers-color-scheme: dark) {
  :root {
    color-scheme: dark;
    --paper: #0b1216; --surface: #0e171c; --ink: #f7f8f5; --muted: #b2b9bd; --line: #445058;
    --accent-ink: #b9f42e; --brand: #b9f42e; --live: #a9de3c; --restricted: #d2a451; --playtest: #b391d2;
    --upcoming: #929ba0; --stage: #101c24; --shadow: 0 20px 44px -22px #000a;
  }
  #atlas { background: radial-gradient(ellipse at 65% 0%, #25445799, transparent 70%), #09151d; }
  .mobile-grid .project-card { background: radial-gradient(ellipse at 50% 30%, var(--device-light), transparent 70%), var(--device-base); }
  .mobile-grid .device-preview { background: transparent; }
  .mobile-grid .card-bottom { border-top-color: #ffffff1f; }
  #todo { --project-edge: #b9f42e; }
  #sterk { --project-edge: #efb20b; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition: none !important; animation: none !important; }
}
