/*
 * neusinger.com — the whole stylesheet.
 *
 * Tokens and motifs follow anyplot.ai (~/anyplot/app/src/styles/tokens.css,
 * docs/reference/style-guide.md): warm paper, warm-tinted inks, hairline
 * rules, lowercase, green used sparingly. The typeface is Victor Mono (OFL)
 * rather than anyplot's MonoLisa, whose webfont licence covers anyplot.ai
 * only; Victor Mono's italic is cursive and takes the role of MonoLisa's
 * italic + ss02 "script" look.
 */

@font-face {
  font-family: 'Victor Mono';
  font-style: normal;
  font-weight: 100 700;
  font-display: swap;
  src: url('/fonts/victor-mono-latin-wght-normal.woff2') format('woff2');
}

@font-face {
  font-family: 'Victor Mono';
  font-style: italic;
  font-weight: 100 700;
  font-display: swap;
  src: url('/fonts/victor-mono-latin-wght-italic.woff2') format('woff2');
}

:root {
  color-scheme: light dark;
  --bg-page: #f5f3ec;
  --ink: #1a1a17;
  --ink-soft: #4a4a44;
  --ink-muted: #6b6a63;
  --rule: rgba(26, 26, 23, 0.15);
  --accent: #009e73; /* anyplot brand green: dots, headline accents, hover lines */
  --accent-text: #007a59; /* darker green for small text, passes AA on paper */
  --mono: 'Victor Mono', ui-monospace, 'SF Mono', Menlo, Consolas, 'DejaVu Sans Mono', monospace;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg-page: #121210;
    --ink: #f0efe8;
    --ink-soft: #b8b7b0;
    --ink-muted: #a8a79f;
    --rule: rgba(240, 239, 232, 0.15);
    --accent-text: #009e73;
  }
}

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

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

html,
body {
  overflow-x: clip;
}

body {
  margin: 0;
  background: var(--bg-page);
  color: var(--ink);
  font-family: var(--mono);
  font-size: 15px;
  font-weight: 300;
  line-height: 1.8;
  /* Monospace ligatures turn "://" and "->" into glyphs nobody asked for. */
  font-variant-ligatures: none;
  -webkit-font-smoothing: antialiased;
}

p {
  margin: 0;
}

a:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 2px;
}

/* Width instead of padding, so the hairline rules end exactly at the text edge. */
.wrap {
  width: min(696px, 100% - 32px);
  margin-left: auto;
  margin-right: auto;
}

@media (min-width: 600px) {
  .wrap {
    width: min(696px, 100% - 64px);
  }
}

/* ── masthead ─────────────────────────────────────────────── */

.masthead {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 16px;
  padding-top: 14px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--rule);
  font-size: 11px;
  letter-spacing: 0.04em;
  color: var(--ink-muted);
}

.lang {
  display: flex;
  gap: 6px;
}

.lang a {
  padding: 6px 4px;
  margin: -6px -4px;
  color: var(--ink-muted);
  text-decoration: none;
  transition: color 0.2s;
}

.lang a:hover {
  color: var(--accent-text);
}

.lang a[aria-current='page'] {
  color: var(--ink);
  font-weight: 500;
}

/* ── hero ─────────────────────────────────────────────────── */

.hero {
  padding-top: 56px;
}

@media (min-width: 600px) {
  .hero {
    padding-top: 88px;
  }
}

.name {
  margin: 0;
  font-size: clamp(1.75rem, 8.4vw, 3.75rem);
  font-weight: 700;
  line-height: 0.95;
  letter-spacing: -0.02em;
  color: var(--ink);
}

.dot {
  display: inline-block;
  color: var(--accent);
  transform: scale(1.3);
}

.tagline {
  margin-top: 0.7em;
  font-size: clamp(1rem, 3.2vw, 1.35rem);
  font-style: italic;
  font-weight: 400;
  line-height: 1.4;
  color: var(--ink-soft);
}

/* ── about (photo + facts, as on anyplot's legal page) ─────── */

.about {
  display: flex;
  align-items: center;
  gap: 48px;
  padding-top: 48px;
}

.portrait {
  display: block;
  flex-shrink: 0;
  width: 120px;
  height: auto;
}

.facts {
  flex: 1;
  min-width: 0;
  color: var(--ink-soft);
}

.label {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 2px;
  font-size: 11px;
  letter-spacing: 0.08em;
  color: var(--ink-muted);
}

.label::before {
  content: '';
  width: 18px;
  height: 1px;
  background: var(--ink-muted);
  opacity: 0.6;
}

.facts p + .label {
  margin-top: 20px;
}

@media (max-width: 599px) {
  .about {
    flex-direction: column;
    align-items: flex-start;
    gap: 28px;
  }
}

a.prose {
  color: var(--ink-soft);
  text-decoration: underline;
  text-decoration-color: var(--rule);
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
  transition:
    color 0.2s,
    text-decoration-color 0.2s;
}

a.prose:hover {
  color: var(--accent-text);
  text-decoration-color: var(--accent);
}

/* ── sections ─────────────────────────────────────────────── */

.section-title {
  display: flex;
  align-items: baseline;
  gap: 0.45em;
  margin: 56px 0 28px;
  padding: 20px 0 12px;
  border-bottom: 1px solid var(--rule);
  font-size: clamp(1.5rem, 5vw, 2.25rem);
  font-weight: 400;
  line-height: 1.15;
  letter-spacing: -0.02em;
}

.prompt {
  font-size: 0.7em;
  font-weight: 500;
  color: var(--ink-muted);
}

.section-title em {
  font-weight: 300;
  color: var(--accent);
}

.projects {
  display: grid;
  gap: 28px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.project {
  font-size: 1.25rem;
  font-weight: 600;
  letter-spacing: -0.01em;
  color: var(--ink);
  text-decoration: none;
  /* anyplot's footer motif: a 1px green line grows in from the left */
  background-image: linear-gradient(var(--accent), var(--accent));
  background-position: 0 100%;
  background-repeat: no-repeat;
  background-size: 0 1px;
  transition: background-size 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.project:hover {
  background-size: 100% 1px;
}

.project .dot {
  transform: scale(1.2);
}

.projects p {
  margin-top: 2px;
  color: var(--ink-soft);
}

/* ── footer ───────────────────────────────────────────────── */

.footer {
  margin-top: 72px;
  padding-top: 20px;
  padding-bottom: 40px;
  border-top: 1px solid var(--rule);
  font-size: 12px;
  line-height: 1.7;
  color: var(--ink-muted);
}

.footer p + p {
  margin-top: 6px;
}

/* ── motion ───────────────────────────────────────────────── */

@keyframes rise {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

.rise {
  animation: rise 0.8s cubic-bezier(0.2, 0.8, 0.2, 1) both;
}

.rise:nth-child(2) {
  animation-delay: 0.08s;
}

.rise:nth-child(3) {
  animation-delay: 0.16s;
}

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

  .lang a,
  a.prose,
  .project {
    transition: none;
  }
}
