  /* the surface. black because the signal shows best against nothing. */
  :root {
    --bg: #000;
    --fg: #ececec;
    --dim: #8a8a8a;
    --faint: #444;
    --line: #1c1c1c;
  }
  * { box-sizing: border-box; }
  html { height: 100%; }
  body {
    margin: 0;
    background: var(--bg);
    color: var(--fg);
    font-family: 'SF Mono', Menlo, Monaco, Consolas, 'Liberation Mono', 'Courier New', monospace;
    font-size: 14px;
    line-height: 1.55;
    -webkit-font-smoothing: antialiased;
    text-rendering: geometricPrecision;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    min-height: 100svh;
  }
  a { color: inherit; text-decoration: none; }
  a:hover { color: #fff; }

  .frame {
    flex: 1;
    display: grid;
    grid-template-rows: auto 1fr auto;
    padding: 28px clamp(24px, 5vw, 64px);
    max-width: 1280px;
    width: 100%;
    margin: 0 auto;
    position: relative;
    z-index: 2;
  }

  .ambient {
    position: fixed;
    inset: 0;
    pointer-events: none;
    background: radial-gradient(circle at center, transparent 30%, rgba(120, 120, 140, 0.045) 100%);
    opacity: 0;
    transition: opacity 1.5s ease-out;
    animation: breath 5s ease-in-out infinite;
    z-index: 1;
  }
  .ambient.tier1 { opacity: 0.3; }
  .ambient.tier2 { opacity: 0.65; }
  .ambient.tier3 { opacity: 1; }
  @keyframes breath {
    0%, 100% { transform: scale(1); }
    50%      { transform: scale(1.06); }
  }

  /* the sea horizon — a single flat line for the sun to rise over; dissolves upward */
  .architecture {
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 0;
    opacity: 0.07;
    transition: opacity 1.6s ease-out;
    -webkit-mask-image: linear-gradient(to top, #000 0%, #000 28%, transparent 72%);
            mask-image: linear-gradient(to top, #000 0%, #000 28%, transparent 72%);
  }
  .architecture svg {
    position: absolute;
    right: 0;
    bottom: 0;
    width: min(125vw, 1500px);
    height: auto;
  }
  .architecture [stroke] { fill: none; stroke: var(--arch-stroke, #fff); vector-effect: non-scaling-stroke; }
  /* "the better you look, the more you see" — it surfaces as you engage */
  body.eng1 .architecture { opacity: 0.11; }
  body.eng2 .architecture { opacity: 0.16; }
  /* loop the whole thing twice and the face blooms full for one held beat */
  body.revealed .architecture { opacity: 0.3; }
  body.revealed header .mark {
    color: #fff;
    text-shadow: 0 0 16px rgba(140, 180, 255, 0.55), 0 0 40px rgba(74, 163, 255, 0.25);
  }

  /* the light. it moves on california time — the sun comes up over the water
     at dawn, crosses, and lies back down. atmosphere, not illustration. */
  @property --glow-op { syntax: '<number>';     inherits: false; initial-value: 0; }
  @property --glow-x  { syntax: '<percentage>'; inherits: false; initial-value: 72%; }
  @property --glow-y  { syntax: '<percentage>'; inherits: false; initial-value: 100%; }
  .horizon-glow {
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 0;
    --glow-col: 18, 22, 38;
    transition: --glow-op 2.4s linear;
    background: radial-gradient(150% 80% at var(--glow-x) var(--glow-y),
      rgba(var(--glow-col), var(--glow-op)) 0%,
      rgba(var(--glow-col), calc(var(--glow-op) * 0.42)) 24%,
      transparent 60%);
  }
  /* a held breath of film grain so the black reads as depth, not flatness */
  .grain {
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 1;
    opacity: 0.035;
    mix-blend-mode: soft-light;
  }
  .grain svg { width: 100%; height: 100%; display: block; }

  /* the night sky. stars surface only when the glow has lain down — night's own signal. */
  .stars {
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 0;
    opacity: var(--star-op, 0);
    transition: opacity 2.4s linear;
    -webkit-mask-image: linear-gradient(to bottom, #000 0%, #000 36%, transparent 62%);
            mask-image: linear-gradient(to bottom, #000 0%, #000 36%, transparent 62%);
  }
  .stars b {
    position: absolute;
    border-radius: 50%;
    background: #dfe4ee;
    opacity: var(--o, 0.6);
  }
  @keyframes twinkle { 0%, 100% { opacity: var(--o); } 50% { opacity: calc(var(--o) * 0.4); } }

  /* the source. a soft sun disc that rises over the sea, arcs over, and sets.
     kept edgeless on purpose — a glow with a center, not a literal ball. */
  .celestial { position: fixed; inset: 0; pointer-events: none; z-index: 0; }
  .celestial .disc {
    position: absolute;
    left: 50%; top: 100%;
    width: 56px; height: 56px;
    margin: -28px 0 0 -28px;
    border-radius: 50%;
    opacity: var(--sun-op, 0);
    background: radial-gradient(circle,
      rgba(var(--sun-col, 252,196,132), 0.92) 0%,
      rgba(var(--sun-col, 252,196,132), 0.34) 36%,
      transparent 70%);
    transition: opacity 2.4s linear;
    will-change: opacity;
  }
  /* the mark answers back. each click casts a ring; mash it and the rings grow,
     brighten, and warm toward electric blue — the chain rewards impatience. */
  .pulse-ring {
    position: fixed;
    border-radius: 50%;
    pointer-events: none;
    z-index: 5;
    border: 1px solid rgba(var(--pr-col, 236,236,236), var(--pr-op, 0.5));
    box-shadow: 0 0 14px rgba(var(--pr-col, 236,236,236), calc(var(--pr-op, 0.5) * 0.55));
    transform: translate(-50%, -50%) scale(0.25);
    animation: pulse-ring var(--pr-dur, 560ms) cubic-bezier(0.2, 0.7, 0.3, 1) forwards;
  }
  @keyframes pulse-ring {
    to { transform: translate(-50%, -50%) scale(1); opacity: 0; }
  }
  @media (prefers-reduced-motion: reduce) {
    .horizon-glow, .stars, .celestial .disc { transition: none; }
    .stars b { animation: none !important; }
    .pulse-ring { display: none; }
  }

  footer {
    padding-top: 24px;
    border-top: 1px solid var(--line);
    color: var(--dim);
    font-size: 11px;
    letter-spacing: 0.06em;
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    gap: 16px;
    /* own compositing layer so the dormant opacity:0 fades cleanly on iOS Safari */
    transform: translateZ(0);
    will-change: opacity;
  }
  footer .signals {
    text-align: right;
    color: var(--faint);
    font-size: 10px;
    line-height: 1.6;
    font-variant-numeric: tabular-nums;
  }
  footer .signals .signal { color: var(--dim); }
  footer .signals .clock { color: var(--dim); }
  footer .signals .clock-hex { color: var(--dim); display: none; }
  footer .linkedin {
    display: inline-flex;
    align-items: center;
    margin-left: 6px;
    vertical-align: -1px;
    opacity: 0.85;
    transition: opacity .15s ease;
  }
  footer .linkedin:hover { opacity: 1; color: #fff; }
  footer .linkedin svg {
    width: 11px;
    height: 11px;
    fill: currentColor;
  }

  .live-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--fg);
    display: inline-block;
    margin-right: 8px;
    vertical-align: middle;
    animation: pulse 2.4s ease-in-out infinite;
  }
  @keyframes pulse {
    0%, 100% { opacity: 0.25; }
    50%      { opacity: 1; }
  }

  header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    padding-bottom: 24px;
    border-bottom: 1px solid var(--line);
    font-size: 12px;
    letter-spacing: 0.06em;
  }
  header .brandlock {
    display: flex;
    align-items: center;
    gap: 11px;
    cursor: pointer;
    user-select: none;
  }
  header .logo-mark {
    height: 15px;
    width: auto;
    display: block;
    opacity: 0.92;
    transition: opacity 1.4s ease-out;
  }
  header .mark {
    color: var(--fg);
    font-weight: 600;
    cursor: pointer;
    user-select: none;
    white-space: nowrap;
    transition: opacity .12s ease, color 1.2s ease-out, text-shadow 1.2s ease-out;
  }
  header .mark:active { opacity: 0.6; }
  .frame.dormant header .logo-mark { opacity: 0.18; }

  main {
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: clamp(40px, 8vh, 96px) 0;
    gap: clamp(28px, 5vh, 56px);
  }

  .statement {
    margin: 0;
    font-size: clamp(21.6px, 3.24vw, 34.2px);
    font-weight: 400;
    line-height: 1.25;
    letter-spacing: -0.01em;
    max-width: 25ch;
  }
  .statement .muted { color: var(--dim); }

  .loc {
    margin-top: clamp(10px, 1.4vh, 15px);
    font-size: clamp(13px, 1.7vw, 16px);
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: var(--dim);
  }

  .rule {
    width: 56px;
    height: 1px;
    background: var(--faint);
  }

  .contact {
    display: flex;
    align-items: center;
    gap: 14px;
    font-size: 13px;
  }
  .contact a {
    color: var(--fg);
    border-bottom: 1px solid var(--faint);
    padding-bottom: 2px;
    transition: border-color .15s ease;
  }
  .contact a:hover {
    border-bottom-color: var(--fg);
  }
  .contact .copied {
    color: var(--dim);
    font-size: 11px;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    opacity: 0;
    transition: opacity .2s ease;
  }
  .contact .copied.show { opacity: 1; }

  .statement, .loc {
    transition: opacity 1.4s ease-out, filter 1.4s ease-out, transform 1.4s ease-out;
  }
  .rule, .contact a, .contact .copied {
    transition: opacity 1.4s ease-out;
  }
  footer {
    transition: opacity 1.4s ease-out, transform 1.4s ease-out;
  }
  .frame.dormant .statement,
  .frame.dormant .loc {
    opacity: 0;
    filter: blur(7px);
    transform: translateY(-12px);
    pointer-events: none;
  }
  .frame.dormant .rule,
  .frame.dormant .contact a,
  .frame.dormant .contact .copied {
    opacity: 0;
    pointer-events: none;
  }
  /* translate3d keeps footer on its GPU layer through the fade — kills the iOS ghost */
  .frame.dormant footer {
    opacity: 0;
    pointer-events: none;
    transform: translate3d(0, 10px, 0);
  }
  .frame.dormant header .mark {
    animation: beacon 2.4s ease-in-out infinite;
  }
  @keyframes beacon {
    0%, 100% { opacity: 0.45; }
    50%      { opacity: 1; }
  }

  @media (max-width: 540px) {
    .frame { padding: 20px clamp(20px, 5vw, 32px); }
    header { font-size: 11px; padding-bottom: 16px; }
    main {
      padding: clamp(16px, 3vh, 32px) 0;
      gap: clamp(16px, 3vh, 28px);
    }
    footer {
      font-size: 10px;
      padding-top: 16px;
    }
    footer .signals .clock-iso { display: none; }
    footer .signals .clock-hex { display: block; }
    /* calm the background layers on small screens — less busy, same soul */
    .architecture { opacity: 0.05; }
    body.eng1 .architecture { opacity: 0.07; }
    body.eng2 .architecture { opacity: 0.09; }
    .grain { opacity: 0.025; }
  }
