/* ============================================================
   base.css — reset, document defaults, and shared components.
   Load order: tokens.css → base.css → <page>.css
   ============================================================ */

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html,
body {
  height: 100%;
}

body {
  background: var(--bg);
  color: var(--primary-type);
  font-family: var(--font-sans);
  min-height: 100vh;
  min-height: 100dvh;
}

/* ---- Header (shared across pages) ---- */
.header {
  position: absolute;
  top: 18px;
  left: 19px;
  right: 19px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  z-index: 3;
}

.logo-mark {
  display: block;
  width: 19px;
  height: auto;
}

.nav-about {
  /* P Emphasized — Medium 14/22.4 (was H6 Emphasized 20/32) */
  font-weight: var(--fw-medium);
  font-size: var(--fs-p);
  line-height: var(--lh-p);
  color: var(--primary-type);
  text-decoration: none;
}

/* ---- Work item (shared across the menu page and project-page footer) ----
   The standard "Title – Descriptor" link. Markup contract:
       <a class="work-item"><span class="wi-name">…</span>
        <span class="wi-sep">–</span><span class="wi-desc">…</span></a>
   This block owns the type weights + the animated strikethrough hover.
   Per-page styles (font-size, alignment, layout) live in that page's
   stylesheet; the hover behaviour is defined ONCE here so it stays
   identical everywhere a .work-item appears. */
.work-item {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--primary-type);
  text-decoration: none;
  white-space: nowrap;
}
.wi-name { font-weight: var(--fw-medium); }
.wi-sep,
.wi-desc { font-weight: var(--fw-light); }

/* Strikethrough draws across the name and descriptor on hover, but NOT the
   dash — it sits on a different optical line, so striking it looks wrong.
   Each segment gets its own line through its own text, drawn left-to-right. */
.wi-name,
.wi-desc { position: relative; }

.wi-name::after,
.wi-desc::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: 50%;
  height: 2px;
  background: var(--primary-type);
  transform: scaleX(0);
  transform-origin: left center;
  transition: transform var(--strike-dur) var(--ease);
  pointer-events: none;
}

.work-item:hover .wi-name::after,
.work-item:hover .wi-desc::after,
.work-item:focus-visible .wi-name::after,
.work-item:focus-visible .wi-desc::after {
  transform: scaleX(1);
}

/* Sweep left-to-right: descriptor strikes just after the name. */
.work-item:hover .wi-desc::after,
.work-item:focus-visible .wi-desc::after {
  transition-delay: 0.12s;
}

@media (prefers-reduced-motion: reduce) {
  .wi-name::after,
  .wi-desc::after { transition-duration: 0.01s; }
}
