:root {
  --bg: #fbfaf7;
  --surface: #ffffff;
  --text: #1b1a17;
  --muted: #6b675f;
  --line: #e4e0d6;
  --accent: #c8401a;
  --serif: ui-serif, "New York", "Iowan Old Style", Georgia, "Times New Roman", serif;
  --sans: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  color-scheme: light dark;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #131210;
    --surface: #1b1a17;
    --text: #ece8df;
    --muted: #a09a8d;
    --line: #2c2a25;
    --accent: #f0733f;
  }
}

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: 5rem;
  -webkit-text-size-adjust: 100%;
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 1.0625rem/1.65 var(--sans);
  -webkit-font-smoothing: antialiased;
}

a {
  color: inherit;
  text-decoration-color: var(--accent);
  text-decoration-thickness: 1.5px;
  text-underline-offset: 0.2em;
}

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

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

h1,
h2,
h3,
p,
ul,
ol,
dl,
dd {
  margin: 0;
}

ul,
ol {
  padding: 0;
  list-style: none;
}

.top,
main,
footer {
  width: min(100% - 2.5rem, 60rem);
  margin-inline: auto;
}

/* Header */

.top {
  position: sticky;
  top: 0;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  padding-block: 1rem;
  background: var(--bg);
  border-bottom: 1px solid var(--line);
  font-size: 0.9375rem;
}

.brand {
  font-family: var(--serif);
  font-size: 1.125rem;
  font-weight: 600;
  text-decoration: none;
  white-space: nowrap;
}

.top nav {
  display: flex;
  align-items: center;
  gap: 1.25rem;
  overflow-x: auto;
  white-space: nowrap;
  scrollbar-width: none;
}

.top nav a {
  color: var(--muted);
  text-decoration: none;
}

.top nav a:hover {
  color: var(--text);
}

.top nav .lang {
  padding: 0.15rem 0.6rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--text);
}

/* Hero */

.hero {
  padding-block: clamp(3.5rem, 10vw, 7rem) clamp(3rem, 8vw, 5.5rem);
}

.eyebrow {
  margin-bottom: 1rem;
  color: var(--accent);
  font-size: 0.8125rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

h1 {
  font-family: var(--serif);
  font-size: clamp(2.75rem, 9vw, 5.5rem);
  font-weight: 600;
  line-height: 1.02;
  letter-spacing: -0.02em;
}

.lead {
  max-width: 38rem;
  margin-top: 1.5rem;
  color: var(--muted);
  font-size: clamp(1.125rem, 2.4vw, 1.375rem);
  line-height: 1.5;
}

.links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1.5rem;
  margin-top: 2rem;
  font-weight: 500;
}

/* Sections */

.section {
  display: grid;
  grid-template-columns: 11rem minmax(0, 1fr);
  gap: 1rem 2rem;
  padding-block: clamp(2.5rem, 6vw, 4rem);
  border-top: 1px solid var(--line);
}

.section > h2 {
  color: var(--muted);
  font-size: 0.8125rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  line-height: 1.9;
  text-transform: uppercase;
}

.section-body > * + * {
  margin-top: 1.1rem;
}

.section-body > p {
  max-width: 40rem;
}

h3 {
  font-size: 1.0625rem;
  font-weight: 600;
  line-height: 1.4;
}

.meta {
  color: var(--muted);
  font-size: 0.875rem;
}

/* Facts & skills */

.facts {
  margin-top: 2rem;
  border-top: 1px solid var(--line);
}

.facts > div {
  display: grid;
  grid-template-columns: 9rem minmax(0, 1fr);
  gap: 1rem;
  padding-block: 0.65rem;
  border-bottom: 1px solid var(--line);
}

.facts dt {
  color: var(--muted);
  font-size: 0.9375rem;
}

.section-body > .facts:first-child {
  margin-top: 0;
}

/* Apps & projects */

.cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(17rem, 1fr));
  gap: 1rem;
}

.cards li {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  padding: 1.1rem 1.2rem;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 0.75rem;
}

.cards li > p:not(.meta) {
  flex: 1;
  color: var(--muted);
  font-size: 0.9375rem;
  line-height: 1.55;
}

.cards .meta {
  margin-top: 0.3rem;
  font-size: 0.8125rem;
}

/* FAQ */

#faq h3:not(:first-child) {
  margin-top: 1.75rem;
}

#faq h3 + p {
  margin-top: 0.35rem;
  color: var(--muted);
}

/* Footer */

footer {
  padding-block: 2rem 3rem;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 0.875rem;
}

@media (max-width: 44rem) {
  .section {
    grid-template-columns: 1fr;
  }

  .facts > div {
    grid-template-columns: 7rem minmax(0, 1fr);
  }
}
