/*
 * The colors and fonts copy Bloch Sphere's tokens, and the buttons, chips and section labels copy its components
 * (bloch-sphere/web/src/styles.css), so the two sites look like one family. Change a color there, change it here.
 */

@font-face {
  font-family: Michroma;
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("fonts/michroma-latin-400-normal.woff2") format("woff2");
}

:root {
  color-scheme: dark;

  /* Surfaces */
  --bg-dark: oklch(0.1 0.025 264);
  --bg: oklch(0.15 0.025 264);
  --bg-light: oklch(0.2 0.025 264);

  /* Text */
  --text: oklch(0.96 0.015 264);
  --text-muted: oklch(0.76 0.05 264);

  /* Lines and interaction states */
  --highlight: oklch(0.5 0.05 264);
  --border: oklch(0.4 0.05 264);
  --border-muted: oklch(0.3 0.05 264);

  /* Accents: --primary for links, focus and the main action; the first two qubit colors mark the interests. */
  --primary: oklch(0.76 0.1 264);
  --qubit-1: oklch(0.82 0.15 75); /* amber */
  --qubit-2: oklch(0.6 0.15 295); /* violet */

  --font-ui: system-ui, -apple-system, "Segoe UI", sans-serif;
  /* The name: a wide face drawn for capitals, set in caps with extra tracking. */
  --font-display: Michroma, var(--font-ui);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

body {
  max-width: 720px;
  margin: 0 auto;
  padding: 72px 16px 40px;
  background: var(--bg);
  color: var(--text);
  font: 16px/1.6 var(--font-ui);
}

a {
  color: var(--primary);
  text-underline-offset: 3px;
}

a:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 2px;
}

ul {
  margin: 0;
  padding: 0;
  list-style: none;
}

/* Written in normal case in the HTML and capitalized here, so screen readers don't spell it out. */
h1 {
  margin: 0 0 12px;
  font: 400 clamp(22px, 6vw, 32px) / 1.2 var(--font-display);
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

/* Bloch Sphere's section headings (STATE, JOURNEY). */
h2 {
  margin: 56px 0 12px;
  color: var(--text-muted);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

h3 {
  margin: 0 0 6px;
  font-size: 20px;
}

h3 a {
  color: var(--text);
  text-decoration: none;
}

h3 a:hover {
  text-decoration: underline;
}

p {
  margin: 0 0 12px;
}

.lead {
  color: var(--text-muted);
  font-size: 18px;
}

.muted {
  color: var(--text-muted);
  font-size: 14px;
}

/* --- Interests: Bloch Sphere's qubit chips ------------------------------------------------- */

.interests {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-top: 20px;
}

.interests ul {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.chip {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 4px 12px;
  border: 1px solid var(--border-muted);
  border-radius: 999px;
  background: var(--bg-dark);
  font-size: 14px;
}

.chip::before {
  content: "";
  width: 10px;
  height: 10px;
  border-radius: 50%;
}

.chip-1::before {
  background: var(--qubit-1);
}

.chip-2::before {
  background: var(--qubit-2);
}

/* --- Links: Bloch Sphere's buttons ---------------------------------------------------------- */

.links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 28px;
}

.button {
  padding: 8px 16px;
  border: 1px solid var(--border-muted);
  border-radius: 8px;
  background: var(--bg-light);
  color: var(--text);
  text-decoration: none;
  transition:
    background-color 0.12s,
    border-color 0.12s;
}

.button:hover {
  border-color: var(--highlight);
  background: var(--border-muted);
}

.button:active {
  background: var(--border);
}

.button-accent {
  border-color: var(--primary);
  color: var(--primary);
}

.button .note {
  color: var(--text-muted);
  font-size: 14px;
}

/* --- Projects ------------------------------------------------------------------------------- */

/* Like Bloch Sphere's gate toolbar: a box on the page with a full border. */
.project {
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--bg-light);
}

.project img {
  display: block;
  width: 100%;
  height: auto;
  border-bottom: 1px solid var(--border-muted);
}

.project .body {
  padding: 20px 20px 8px;
}

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

footer {
  margin-top: 56px;
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    transition: none !important;
  }
}
