/* romangorin.xyz — one small stylesheet for the site's own pages (not the uploaded project pages). */
:root {
  color-scheme: light dark;
  --bg: #fbfaf7;
  --fg: #1d1c1a;
  --muted: #5f5c56;
  --line: #e3e0d9;
  --accent: #b4441f;
  --font: ui-monospace, "SF Mono", SFMono-Regular, Menlo, Consolas, monospace;
  --step-0: clamp(0.94rem, 0.9rem + 0.2vw, 1rem);
  --step-3: clamp(1.6rem, 1.3rem + 1.4vw, 2.25rem);
  --space-1: 0.5rem;
  --space-2: 1rem;
  --space-3: 1.75rem;
  --space-4: clamp(3rem, 2rem + 8vh, 7rem);
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #151412;
    --fg: #ece9e3;
    --muted: #a39f97;
    --line: #2e2c28;
    --accent: #f08a62;
  }
}

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

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

body {
  margin: 0;
  min-height: 100dvh;
  background: var(--bg);
  color: var(--fg);
  font: var(--step-0) / 1.6 var(--font);
  -webkit-font-smoothing: antialiased;
}

main {
  max-width: 40rem;
  margin: 0 auto;
  padding: var(--space-4) max(1.25rem, env(safe-area-inset-right)) var(--space-4) max(1.25rem, env(safe-area-inset-left));
}

h1 {
  margin: 0 0 var(--space-1);
  font-size: var(--step-3);
  line-height: 1.15;
  letter-spacing: -0.02em;
  text-wrap: balance;
}

p { margin: 0 0 var(--space-2); max-width: 65ch; }

.lede { color: var(--muted); margin-bottom: var(--space-3); }

a {
  color: inherit;
  text-decoration-line: underline;
  text-decoration-color: color-mix(in srgb, currentColor 40%, transparent);
  text-decoration-thickness: 1px;
  text-underline-offset: 0.22em;
  transition: text-decoration-color 0.2s ease-out, color 0.2s ease-out;
}
a:hover { color: var(--accent); text-decoration-color: currentColor; }

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

::selection { background: color-mix(in srgb, var(--accent) 28%, transparent); color: inherit; }

code { font: inherit; color: var(--muted); }

/* project list: whole row is the tap target */
.links { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--line); }
.links li { border-bottom: 1px solid var(--line); }
.links a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 3rem;
  padding: var(--space-1) 0;
  text-decoration: none;
}
.links a::after {
  content: "";
  flex: none;
  width: 0.45rem;
  height: 0.45rem;
  margin-right: 0.3rem;
  border-top: 1.5px solid var(--muted);
  border-right: 1.5px solid var(--muted);
  transform: rotate(45deg);
  transition: transform 0.2s ease-out, border-color 0.2s ease-out;
}
.links a:hover::after { border-color: var(--accent); transform: translateX(0.25rem) rotate(45deg); }

.note { color: var(--muted); font-size: 0.875em; margin-top: var(--space-3); }

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