/* 64Logic — landing and site-wide pages
   Copyright (c) 2026 64Logic. SPDX-License-Identifier: MIT */

@font-face {
  font-family: "Archivo";
  src: url("/fonts/archivo-variable.woff2") format("woff2-variations"),
       url("/fonts/archivo-variable.woff2") format("woff2");
  font-weight: 100 900;
  font-stretch: 62% 125%;
  font-style: normal;
  font-display: swap;
}

:root {
  --black: #000000;
  --white: #FFFFFF;
  --paper: #F4F4F4;
  --line: #E2E2E2;
  --ink-2: #3D3D3D;
  --dim: #A3A3A3;

  /* micro-Max accent, used only on its project card */
  --mm-yellow: #FFE53B;
  --mm-gold: #FFD21F;
  --mm-amber: #FFAA1C;
  --mm-orange: #F7861E;
  --mm-red: #B00000;

  --sans: "Archivo", "Helvetica Neue", Arial, sans-serif;
  --gutter: 16px;
  --maxw: 1180px;

  color-scheme: light;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--white);
  color: var(--black);
  font-family: var(--sans);
  font-size: 1.0625rem;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

a { color: inherit; }

.wrap {
  width: 100%;
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 var(--gutter);
}

:focus-visible { outline: 3px solid currentColor; outline-offset: 3px; }

.skip {
  position: absolute; left: -9999px; top: 8px; z-index: 10;
  background: var(--white); color: var(--black);
  padding: 8px 14px; border-radius: 999px;
}
.skip:focus { left: 16px; }

/* Read by screen readers only (e.g. "opens in a new tab", hidden headings) */
.visually-hidden {
  position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

/* ---------------------------------------------------------------- Top bar */

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding-top: 18px;
  padding-bottom: 18px;
}
.brand {
  font-weight: 900;
  font-stretch: 112%;
  font-size: 1.15rem;
  letter-spacing: -0.01em;
  text-decoration: none;
}
.topnav { display: flex; gap: 22px; font-weight: 600; font-size: 0.95rem; }
.topnav a { text-decoration: none; }
.topnav a:hover { text-decoration: underline; text-underline-offset: 4px; text-decoration-thickness: 2px; }

/* ---------------------------------------------------------------- Hero */

.hero {
  background: var(--black);
  color: var(--white);
}

.hero-body {
  padding-top: clamp(48px, 10vh, 120px);
  padding-bottom: clamp(56px, 12vh, 136px);
}

.wordmark {
  margin: 0;
  font-weight: 900;
  font-stretch: 112%;
  letter-spacing: -0.04em;
  line-height: 0.88;
  font-size: clamp(4.2rem, 17vw, 13.5rem);
  margin-left: -0.04em;   /* optical alignment of the 6 with the text below */
}

.tagline {
  margin: clamp(22px, 3.2vw, 36px) 0 0;
  font-size: clamp(1.45rem, 3.2vw, 2.35rem);
  font-weight: 700;
  font-stretch: 104%;
  letter-spacing: -0.015em;
  line-height: 1.2;
}

.about {
  margin: 14px 0 0;
  max-width: 46ch;
  color: var(--dim);
  font-size: clamp(1.02rem, 1.5vw, 1.15rem);
  line-height: 1.5;
}

/* ---------------------------------------------------------------- Buttons */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 10px 20px;
  border: 0;
  border-radius: 999px;
  font: inherit;
  font-weight: 700;
  font-size: 0.98rem;
  text-decoration: none;
  cursor: pointer;
  transition: background-color 120ms ease, color 120ms ease;
}
.btn-dark { background: var(--black); color: var(--white); }
.btn-dark:hover { background: #2B2B2B; }
.btn-outline { background: transparent; color: var(--black); box-shadow: inset 0 0 0 2px var(--black); }
.btn-outline:hover { background: var(--black); color: var(--white); }
.btn-light { background: var(--white); color: var(--black); }
.btn-light:hover { background: #E6E6E6; }
.btn-ghost { background: transparent; color: var(--white); box-shadow: inset 0 0 0 2px var(--white); }
.btn-ghost:hover { background: var(--white); color: var(--black); }

/* ---------------------------------------------------------------- Sections */

.section { padding: 80px 0; }
.section + .section { border-top: 1px solid var(--line); }

h2 {
  margin: 0 0 28px;
  font-size: clamp(1.9rem, 3.6vw, 2.6rem);
  line-height: 1.08;
  font-weight: 900;
  font-stretch: 112%;
  letter-spacing: -0.025em;
}

/* ---------------------------------------------------------------- Project card */

.project {
  display: grid;
  grid-template-columns: minmax(0, 0.95fr) minmax(0, 1.05fr);
  border: 2px solid var(--black);
  border-radius: 14px;
  overflow: hidden;
}

/* micro-Max brings its own color onto the neutral page */
.project-art {
  display: grid;
  place-items: center;
  min-height: 260px;
  padding: 32px;
  background: linear-gradient(118deg, var(--mm-yellow) 0%, var(--mm-gold) 38%, var(--mm-amber) 78%, var(--mm-orange) 100%);
  text-decoration: none;
  color: var(--black);
  overflow: hidden;
  container-type: inline-size;
}

/* "micro-Max 4.8" over a rule with a black "UCI" pill, the same mark as the
   micro-Max page title and the GitHub banners. */
.mm-mark {
  display: inline-grid;
  justify-items: stretch;
  font-weight: 900;
  font-stretch: 116%;
  letter-spacing: -0.035em;
  line-height: 1;
  font-size: 2.4rem;
  font-size: clamp(1.6rem, 10.5cqi, 4.2rem);   /* the mark is about 8em wide: fit the panel */
  white-space: nowrap;
}
.mm-mark .mm-line { display: block; transform: skewX(-12deg); transform-origin: center; }
.mm-mark .ver { color: var(--mm-red); margin-left: 0.2em; }
.mm-rule {
  display: flex;
  align-items: center;
  gap: 0.38em;
  margin-top: 0.42em;
  font-size: 0.36em;
}
.mm-rule::before,
.mm-rule::after {
  content: "";
  flex: 1;
  height: max(2px, 0.08em);
  background: var(--black);
}
.mm-pill {
  display: inline-block;
  padding: 0.14em 0.8em 0.18em;
  border-radius: 999px;
  background: var(--black);
  color: var(--white);
  font-weight: 800;
  font-stretch: 110%;
  letter-spacing: 0;
  transform: skewX(-12deg);
}

.project-body {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 32px 34px 34px;
}
.project-body h3 {
  margin: 0 0 10px;
  font-size: clamp(1.4rem, 2.4vw, 1.8rem);
  font-weight: 900;
  font-stretch: 112%;
  letter-spacing: -0.02em;
  line-height: 1.15;
}
.project-body p { margin: 0 0 24px; max-width: 48ch; color: var(--ink-2); }
.actions { display: flex; flex-wrap: wrap; gap: 10px; }

/* ---------------------------------------------------------------- GitHub */

.github {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 18px 40px;
}
.github h2 { margin-bottom: 8px; }
.github p { margin: 0; color: var(--ink-2); max-width: 52ch; }

/* ---------------------------------------------------------------- Footer */

.footer {
  background: var(--black);
  color: var(--dim);
  padding: 36px 0 40px;
  font-size: 0.92rem;
}
.footer p { margin: 0; }

/* ---------------------------------------------------------------- Not found */

.notfound {
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  background: var(--black);
  color: var(--white);
}
.notfound-body {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding-top: 40px;
  padding-bottom: 96px;
}
.notfound h1 {
  margin: 0 0 28px;
  font-size: clamp(2.6rem, 8vw, 5.2rem);
  font-weight: 900;
  font-stretch: 112%;
  letter-spacing: -0.035em;
  line-height: 1;
}

/* ---------------------------------------------------------------- Responsive */

@media (max-width: 760px) {
  .project { grid-template-columns: 1fr; }
  .project-art { min-height: 180px; }
  .project-body { padding: 26px 22px 28px; }
  .section { padding: 60px 0; }
}

@media (prefers-reduced-motion: reduce) {
  .btn { transition: none; }
}
