Menu

Foundations

Surfaces

Depth is a 1px edge and a graded fill, never a drop shadow. Every surface on the site is one of these materials, defined once in globals.css, so the specimen below and every page that uses it are the same definition.

The card ladder

Law 03 taken literally: if depth cannot be cast, it has to be inside the panel, which means a fill that grades and an edge that is brighter where the light lands. Two materials come out of that.

Card .aka-card

Raised. Sits on the page. Content, specimens, and anything that is also a control.

  • fill grades from --card-fill-top down to --card-fill-bottom
  • edge at --card-edge, top edge lifted to --card-edge-top
  • grain over the fill, blended soft-light

Well .aka-card-well

Recessed. Cut into the page. Callouts, closing notes, code, and media.

  • fill grades from --card-well-top up to --card-well-bottom
  • edge at --card-well-edge, top edge darkened to the lip of the cut
  • .aka-card-media flattens it to the ground: no grain, no grade, behind artwork

They used to be four: a card, a callout, a media well and a hover state, each written out by hand wherever it was needed, and they had drifted into several copies of each. There is one material lit from above and the same material with the light reversed, which is what a cut into the page looks like. Everything else is which one, and how much padding. Padding stays on the element on purpose: a surface says what the material is, and how much room the content needs is the content's.

The well as a callout

the closing-argument surface

One rule

Inertials emit signals. The Runciter dispatches them. Humans decide.

Head and rule

The band across the top of a card, for a label row. A step toward the mid-tone in either theme, so it darkens in light and lightens in dark from one definition.

.aka-card-head

a label row

The body of the card.

Divided by .aka-card-rule, a hairline tuned to the card rather than the page.

Media

Behind artwork the well flattens to the ground: no grain and no grade, so nothing of the material sits on top of the picture.

aka-card-well aka-card-media

16:10 media

Lift

A card that is also a control. Hover moves it 2px and sharpens the edge; it never brightens, per law 04.

Hover this card

It rises 2px and its edge sharpens.

  • translateY(-2px) over 320ms
  • edge to --card-edge-hover
  • no transform under prefers-reduced-motion

The material

The fill, the edge, the well, the grain and the inner hairlines, as tokens, and the rules that put them together.

TokenSampleLightDark
--card-fill-topoklch(1 0 0)oklch(0.178 0 0)
--card-fill-bottomoklch(0.986 0.001 106)oklch(0.128 0 0)
--card-edgeoklch(0.862 0.003 106)oklch(1 0 0 / 10%)
--card-edge-topoklch(0.905 0.003 106)oklch(1 0 0 / 18%)
--card-edge-hoveroklch(0.795 0.004 106)oklch(1 0 0 / 21%)
--card-well-topoklch(0.915 0.003 106)oklch(0.108 0 0)
--card-well-bottomoklch(0.942 0.003 106)oklch(0.152 0 0)
--card-well-edgeoklch(0.872 0.003 106)oklch(1 0 0 / 8%)
--card-well-edge-topoklch(0.838 0.003 106)oklch(0 0 0 / 45%)
--card-rulecolor-mix(in srgb, var(--foreground) 10%, transparent)as light
--card-headcolor-mix(in srgb, var(--foreground) 4.5%, transparent)as light
--card-grain-blendmultiplysoft-light
--card-grainurl(data:image/svg+xml), 349 charactersurl(data:image/svg+xml), 349 characters
--card-alphaoklch(0.19 0.01 95 / 3%)oklch(1 0 0 / 3%)
--card-borderoklch(0.19 0.01 95 / 8%)oklch(1 0 0 / 6%)
--card-border-hoveroklch(0.19 0.01 95 / 14%)oklch(1 0 0 / 10%)
--card-fill-top

The card material.

Law 03 asks for depth from a border and a fill instead of a drop shadow, and for a long time this site read that as one hairline and one flat colour. Against a near-black ground that is an empty outline: a rectangle whose inside is the same colour as the page behind it.

A panel that reads as an object is lit from somewhere, and every cue that sells it comes from that one fact. The fill is brightest where the light lands and falls away from it. The top edge catches a specular hairline the other three do not. The surface carries enough grain to be a material rather than a gradient, which also kills the banding a gradient this shallow would otherwise show.

All three of those are the fill and the edge, which is what law 03 was always asking for. Nothing casts: no drop shadow, no blur, no second element floating behind. The depth is inside the card.

Raised and recessed are the same material with the light reversed. A card grades light-to-dark downward and lifts its top edge; a well grades dark-to-light downward and darkens it. That inversion is the whole difference between something sitting on the page and something cut into it, and it costs two token values.

--card-rule

Hairlines and header bands inside a card, tuned to it rather than the page.

--card-grain-blend

The grain. Monochrome fractal noise, blended into the fill rather than laid on top of it.

Both the alpha and the blend mode are per theme, because soft-light is nearly inert against near-white: it pulls toward the base, and the base is already at the ceiling. Light multiplies instead, which darkens into the white and reads as paper. The alpha drops to match, since multiply is much the stronger operator of the two.

app/globals.css, line 713
@layer components {
  /*
   * The house surfaces, as three named materials.
   *
   * These used to be class strings copied from page to page: `rounded-xl
   * border border-border bg-card/40 p-5` for a card, a different one for a
   * callout, a third for a media well. Three strings repeated across two dozen
   * files is not a system, it is a convention nobody can check, and it drifted
   * exactly as far as you would expect it to.
   *
   *   .aka-card       raised. Sits on the page. Content, specimens, link tiles.
   *   .aka-card-well  recessed. Cut into the page. Callouts, media, code.
   *   .aka-card-head  the band across the top of a card, for its label row.
   *
   * Padding stays on the element. A surface says what the material is; how
   * much room the content needs is the content's business.
   *
   * The plain-summary panel is one of these now rather than its own thing. It
   * was a tinted panel with its own tokens, which is one more surface than the
   * site has a reason to own.
   */
  .aka-card,
  .aka-card-well {
    border-radius: var(--radius-xl);
    border-width: 1px;
    border-style: solid;
    background-repeat: repeat, no-repeat;
    background-size: 140px 140px, auto;
    background-blend-mode: var(--card-grain-blend), normal;
  }

  .aka-card {
    border-color: var(--card-edge);
    border-top-color: var(--card-edge-top);
    background-color: var(--card-fill-bottom);
    background-image: var(--card-grain),
      linear-gradient(180deg, var(--card-fill-top) 0%, var(--card-fill-bottom) 100%);
  }

  /*
   * The same material with the light reversed: dark at the top edge, lifting
   * toward the bottom, and a top border that reads as the lip of the cut
   * rather than a highlight on it.
   */
  .aka-card-well {
    border-color: var(--card-well-edge);
    border-top-color: var(--card-well-edge-top);
    background-color: var(--card-well-bottom);
    background-image: var(--card-grain),
      linear-gradient(180deg, var(--card-well-top) 0%, var(--card-well-bottom) 100%);
  }

  /*
   * A well that holds artwork drops both layers and keeps the flat ground.
   * Grain over a photograph is grain over the photograph, and a grade behind a
   * letterboxed image reads as a lighting error in the image rather than in
   * the frame. The edge stays; that is what makes it a frame.
   */
  .aka-card-media {
    background-image: none;
  }

  .aka-card-head {
    background-color: var(--card-head);
    border-bottom: 1px solid var(--card-rule);
  }

  /* Hairlines inside a surface, tuned to it rather than to the page. */
  .aka-card-rule {
    border-color: var(--card-rule);
  }

  /*
   * A card that is also a control.
   *
   * Law 04: the hover moves the card, it does not brighten it. The edge does
   * change, but an edge is the affordance rather than the motion. It is how
   * the card says it is the thing under the cursor, and it is a state that
   * holds rather than something that pulses.
   */
  .aka-card-lift {
    transition:
      transform var(--dur-lift) var(--ease-lift),
      border-color var(--dur-edge) ease;
  }
  .aka-card-lift:hover,
  .group:hover .aka-card-lift {
    transform: translateY(-2px);
    border-color: var(--card-edge-hover);
  }
  @media (prefers-reduced-motion: reduce) {
    .aka-card-lift:hover,
    .group:hover .aka-card-lift {
      transform: none;
    }
  }
}

Flat

The second surface style, from akaOSS: no edge and no fill at rest, and a 3 percent wash of the ink under the pointer or the keyboard. For a feed of many cards, where an edge on each one would read as a grid of boxes.

The corner is --radius-flat, larger than the ladder's because the wash reaches past the content. A cover inside one zooms with the plate's timing and, under reduced motion, not at all. The classes, the feed and the rules are on Flat card.

Plate

A project plate is one colour: the plate ground with a percentage of the project's own hue mixed into it. Both halves are tokens, and both differ per theme for reasons that are not symmetry.

--accent-green
--accent-blue
--accent-violet

Three plates tinted from the accent ramp through --plate-tint. Hover one.

TokenSampleLightDark
--stamp-groundoklch(0.92 0 0)oklch(0.2 0 0)
--plate-mix10%7%
--mark-groundoklch(0.15 0.0021 286.14)as light
--stamp-ground

The ground under a mark: a step off the page, in whichever direction the page leaves room. Light used to sit at 0.985 against a 0.97 background, so the plate was fifteen thousandths *lighter* than the page it sat on and effectively invisible. Dark steps up from 0.09 to 0.2; light steps down.

Neutral, not warm, and that is load-bearing. The mix below happens in sRGB, so the ground's own hue is mixed in along with the project's: a ground carrying the page's warmth pushed every green toward olive and left akaOSS, akaCOVART, Hologram and Wrdef reading as four shades of sage.

--plate-mix

How much of a project's hue reaches its plate.

Dark is the reference: a near-black tile with a whisper of the project in it, quiet enough that a wall of twenty-one reads as one material. Light is kept to the same character rather than the same number, because a hue laid over a light ground shows up more readily than the same hue over a dark one. The visibility problem light had was the ground, not the tint.

Dark is the reference. Light is not the same number: a hue over a light ground shows up more readily than the same hue over a dark one, so light takes more mix to read as the same character. And --stamp-ground steps down from the page in light while it steps up in dark. It used to sit lighter than the background, which made every plate in light mode effectively invisible.

The mix is sRGB, not OKLCH. The ground is achromatic but carries an explicit hue, and an OKLCH mix interpolates that channel: a green, a blue and a violet all came out pink. It is also why the plate ground is neutral rather than warm.

app/globals.css, line 679
@layer components {
  /*
   * The plate: the mark at the size where it is the thing you see rather than a
   * bullet beside the words.
   *
   * The tint mixes in srgb, not oklch. Mixing a hue toward a neutral in oklch
   * interpolates through its hue channel, and against a zero-chroma ground that
   * sends every accent toward red, which is what once turned all of these pink.
   */
  /*
   * Landscape, not square. A square plate at this width is a lot of height per
   * project, and a wall of twenty-one of them made a very long page for a grid
   * of logos. Four-by-three also crops far less off the projects whose art is
   * a 16:10 screenshot.
   */
  .aka-plate {
    @apply grid aspect-[4/3] w-full place-items-center overflow-hidden rounded-xl;
    @apply transition-transform duration-500 ease-out;
    background-color: color-mix(
      in srgb,
      var(--plate-tint, transparent) var(--plate-mix, 7%),
      var(--stamp-ground)
    );
  }
  .group:hover .aka-plate {
    transform: translateY(-3px);
  }
}

Glass

The accent as a surface, and the only one that carries colour. Law 02 spends the accent once per screen, so the test is subject rather than count: the deck’s progress pill and the control that selects the deck are the same subject and may share it. A second, unrelated glass on a screen is the law being broken.

aka-glass, and aka-glass-rose beside it

no type on it: a saturated accent cannot carry text

  • a white specular along the top, blended soft-light
  • a soft inner light at the leading edge, blended overlay
  • the accent ramp beneath both at less than full strength, so the backdrop reads through: it resolves from --glass-a, --glass-b and --glass-c, which default to blue, violet and rose
  • aka-glass-rose leads the same ramp from the rose end, for a second glass control sitting beside the first
  • backdrop-filter: blur(14px) saturate(1.9)
app/globals.css, line 1034
@layer components {
  /*
   * The glass, named as a surface rather than left inside one element.
   *
   * Three layers over a blurred backdrop: a specular along the top, a soft
   * inner light at the leading edge, and the colour underneath them at less
   * than full strength so the blur reads through it.
   *
   * The white is a literal on purpose. A specular highlight is white light,
   * not a surface, so tokenising it would make the theme switch dim the shine
   * in one mode — the same reason .aka-mark-ground carries its own colour
   * rather than the page's.
   *
   * It belonged to the deck's progress pill and nothing else, until the view
   * toggle needed to mark the deck in the deck's own terms. Two users make it
   * vocabulary, so it is defined once here and the pill keeps only what is
   * actually the pill's: its geometry and its hue.
   *
   * The backdrop-filter stays, having been measured rather than assumed.
   * Dropping it looked like free money: it blurs the page's own flat
   * background, and a blur of a flat colour is that colour. But the filter
   * also saturates what it reads, and the glass is translucent, so removing it
   * moved 2,650 bytes of the pill's own pixels. Not free after all, and it
   * never showed a frame-time difference worth the change.
   */
  .aka-glass {
    background-image:
      linear-gradient(180deg, #ffffff 0%, #ffffff00 46%),
      radial-gradient(120% 190% at 12% -30%, #ffffff 0%, #ffffff00 55%),
      linear-gradient(100deg, var(--glass-a, var(--accent-blue)), var(--glass-b, var(--accent-violet)) 42%, var(--glass-c, var(--accent-rose)));
    background-blend-mode: soft-light, overlay, normal;
    background-clip: padding-box;
    border: 1px solid color-mix(in srgb, var(--foreground) 12%, transparent);
    border-top-color: #ffffff5c;
    backdrop-filter: blur(14px) saturate(1.9);
  }

  /*
   * The same glass, with the ramp led from the rose end instead of the blue
   * one. Two glass controls sitting beside each other otherwise read as the
   * same control printed twice; reversing the ramp keeps them one material and
   * gives each its own end of it.
   */
  .aka-glass-rose {
    --glass-a: var(--accent-rose);
    --glass-b: var(--accent-violet);
    --glass-c: var(--accent-blue);
  }
}

Overlay

The page's own ground at 62 percent over a blur, edged like a card: for a panel that floats over content and must still let it read through.

aka-overlay

over a strip of the accent ramp

A panel over the page.

app/globals.css, line 1084
@layer components {
  /*
   * A surface that floats over the page: a menu, a popover, anything that has
   * to stay readable with content moving underneath it.
   *
   * The page's own ground at 62% with a blur behind it, rather than an opaque
   * panel. The site header already does this when it detaches, so a menu
   * opening over the page reads as the same material arriving rather than as a
   * second one nobody has seen before.
   *
   * The number was 82, and at 82 the fill buries the blur: the menu is just a
   * lighter panel, and nothing is visibly behind it. At 62 what is behind the
   * menu moves through it while the text still has enough ground under it to
   * stay legible. The header sits at 55 and can afford to, because its type is
   * larger than a menu row's.
   *
   * Written as a class rather than as `bg-background/62` on the element: the
   * ground, the blur and the edge are one material, and they travel together.
   */
  .aka-overlay {
    background: color-mix(in srgb, var(--background) 62%, transparent);
    backdrop-filter: blur(12px) saturate(1.4);
    border: 1px solid var(--card-edge);
    border-top-color: var(--card-edge-top);
  }
}

Inherited

Inherited surfaces: 4 tokensShow

The flat surface step that preceded the card ladder.

TokenSampleLightDark
--surfaceoklch(0.945 0.004 106)oklch(0.145 0 0)
--surface-hoveroklch(0.925 0.005 106)oklch(0.185 0 0)
--surface-borderoklch(0.895 0.004 106)oklch(1 0 0 / 9%)
--surface-border-hoveroklch(0.84 0.004 106)oklch(1 0 0 / 18%)
--surface

Card surfaces — a filled secondary step off the page, not a bordered box.