:root {
  --bg: #f4f2ec;
  --ink: #1d1c1a;
  --muted: #6f6b63;
  --line: rgba(29, 28, 26, 0.14);
  --accent: #c8643b;
  --open: #3f9a5a;
  /* drifting characters, read by waves.js: colour (r, g, b) and peak opacity */
  --glyph: 29, 28, 26;
  --glyph-alpha: 0.16;

  --serif: "Instrument Serif", "Iowan Old Style", Georgia, serif;
  --mono: "JetBrains Mono", ui-monospace, "SF Mono", Menlo, Consolas, monospace;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #161513;
    --ink: #ece9e1;
    --muted: #9a958b;
    --line: rgba(236, 233, 225, 0.16);
    --accent: #e08158;
    --open: #5cc27a;
    --glyph: 236, 233, 225;
    --glyph-alpha: 0.13;
  }
}

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

html,
body {
  height: 100%;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--mono);
  font-size: 15px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  min-height: 100dvh;
  overflow-x: hidden;
}

/* ---------- background ---------- */

#waves {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  pointer-events: none;
}

/* ---------- content ---------- */

.hero,
.footer {
  position: relative;
  z-index: 2;
}

.hero {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 96px 24px 48px;
}

.status {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin: 0 0 28px;
  padding: 6px 14px 6px 12px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: color-mix(in srgb, var(--bg) 80%, transparent);
  backdrop-filter: blur(4px);
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}

.dot {
  position: relative;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--open);
}

.dot::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background: var(--open);
  animation: pulse 2.8s ease-out infinite;
}

@keyframes pulse {
  0% { transform: scale(1); opacity: 0.55; }
  70%, 100% { transform: scale(3); opacity: 0; }
}

.wordmark {
  margin: 0;
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(3.25rem, 17vw, 8.5rem);
  line-height: 0.95;
  letter-spacing: -0.025em;
}

/* fixed 420px column (narrower on small screens); the project list fills it */
.showcase {
  width: 420px;
  max-width: 100%;
}

.lede {
  margin: 28px 0 16px;
  color: var(--muted);
  font-size: 14px;
  text-wrap: balance;
}

.concepts {
  display: flex;
  flex-direction: column;
  gap: 10px;
  /* take no part in sizing .showcase, then fill it */
  width: 0;
  min-width: 100%;
  margin: 0;
  padding: 0;
  list-style: none;
}

.concept {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 18px 22px 20px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: color-mix(in srgb, var(--bg) 82%, transparent);
  backdrop-filter: blur(4px);
  color: inherit;
  text-align: left;
  text-decoration: none;
  transition: border-color 0.25s ease;
}

.concept:hover {
  border-color: color-mix(in srgb, var(--accent) 65%, transparent);
}

.concept-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
}

.concept-name {
  font-size: 17px;
  font-weight: 500;
  line-height: 1.3;
  letter-spacing: 0.01em;
  color: var(--ink);
}

.concept-link {
  display: inline-flex;
  gap: 6px;
  font-size: 12px;
  color: var(--muted);
  white-space: nowrap;
  transition: color 0.25s ease;
}

.concept-link span {
  transition: transform 0.25s ease;
}

.concept:hover .concept-link {
  color: var(--accent);
}

.concept:hover .concept-link span {
  transform: translate(2px, -2px);
}

.concept-desc {
  font-size: 13px;
  line-height: 1.6;
  color: var(--muted);
  text-wrap: pretty;
}

.concept:focus-visible,
.footer a:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 4px;
}

.footer {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  padding: 24px 32px;
  font-size: 12px;
  color: var(--muted);
}

.footer a {
  color: inherit;
  text-decoration: none;
  border-bottom: 1px solid var(--line);
  transition: color 0.2s ease, border-color 0.2s ease;
}

.footer a:hover {
  color: var(--ink);
  border-color: currentColor;
}

@media (max-width: 560px) {
  .hero {
    padding: 72px 16px 32px;
  }

  /* keep the tagline on one line on small screens */
  .lede {
    font-size: 13px;
  }

  .footer {
    justify-content: center;
    text-align: center;
    padding: 20px 16px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .dot::after {
    animation: none;
  }

  .concept,
  .concept-link,
  .concept-link span {
    transition: none;
  }
}
