R RIDERS IN THE CITY
Final / HTML & CSS · Week 12

Html & css

Semantic structure & organized style

The project is built on semantic landmarks and a flat, predictable CSS system — custom properties first, then base, then layout, then components. Shown below is the real skeleton, not a paraphrase.

Semantic landmarks

<header>           brand + primary nav (research ⇄ game)
  <nav>            mode switch, chapter links
</header>
<main>             the experience
  <section>        intro / chapter / field notes
  <figure>         situation map & captions
  <dialog>         chapter reading, weather panel
  <canvas>         3D neighborhood / game world
</main>
<footer>           credits & research notes

Native elements — <dialog>, <kbd>, <figure>, <canvas> — are used where they are semantically correct, not recreated with divs.

Custom properties (the design tokens)

Research mode

--bg:     #f4efe6;  /* warm paper   */
--paper:  #fffaf2;  /* lighter card */
--text:   #253d3b;  /* ink          */
--muted:  #61716a;
--orange: #b95036;  /* terracotta   */
--teal:   #347d79;

Game mode

--paper:  #e1dbc3;
--green:  #344c3d;  /* night green  */
--rust:   #a45c3f;
--ink:    #293e32;
--pixel:  StreetPixel, Consolas, monospace;

CSS organization (one flat file)

Layer order
LayerContents
1 · Tokens@font-face, :root { --vars }
2 · Reset / base* { box-sizing }, body, links, buttons, focus rings
3 · Layoutheader, #experience, #world, vignette, intro
4 · Componentsmap, place labels, dialog, walk-help, weather, phone
5 · Motion@keyframes corner-arrive / subtitle-in / phone-buzz

Type system

StreetPixel — display / headings

Consolas · Courier New — body & meta labels

@font-face {
  font-family: StreetPixel;
  src: url('street-pixel.ttf') format('truetype');
}
/* display: var(--pixel) · meta: var(--mono) */
Open the live project →