/* Paudex Labs: one small stylesheet, system fonts, light and dark. */

:root {
  --bg: #ffffff;
  --surface: #f4f6f9;
  --text: #16191f;
  --muted: #4b5262;
  --border: #dde1e8;
  --accent: #0b5fcc;
  --focus: #0b5fcc;
  --radius: 10px;
  --max: 64rem;
  color-scheme: light dark;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0f1216;
    --surface: #181c22;
    --text: #e7e9ed;
    --muted: #a8afbc;
    --border: #2a3039;
    --accent: #7cb0ff;
    --focus: #7cb0ff;
  }
}

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

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

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

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  font-size: 1.0625rem;
  line-height: 1.6;
}

a { color: var(--accent); text-underline-offset: 0.15em; }
a:hover { text-decoration-thickness: 2px; }

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

main:focus { outline: none; }

h1, h2, h3 { line-height: 1.2; margin: 0 0 0.5rem; }
p { margin: 0 0 0.75rem; }

.wrap {
  width: 100%;
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 1.25rem;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

/* Skip link: hidden until focused */
.skip-link {
  position: absolute;
  left: 1rem;
  top: -3rem;
  z-index: 10;
  padding: 0.5rem 0.75rem;
  background: var(--text);
  color: var(--bg);
  border-radius: var(--radius);
}
.skip-link:focus { top: 1rem; }

/* Header and nav (mobile first: brand above links) */
.site-header {
  border-bottom: 1px solid var(--border);
  background: var(--bg);
}

.nav {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem 1.5rem;
  padding-top: 0.875rem;
  padding-bottom: 0.875rem;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--text);
  font-weight: 700;
  font-size: 1.125rem;
  text-decoration: none;
}

.nav-links {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.25rem 1.25rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.nav-links a {
  color: var(--text);
  text-decoration: none;
  padding: 0.25rem 0;
}
.nav-links a:hover { color: var(--accent); }

/* "Our projects": anchor link plus a CSS-only dropdown (details/summary) */
.has-menu {
  position: relative;
  display: flex;
  align-items: center;
  gap: 0.125rem;
}

.menu summary {
  display: grid;
  place-items: center;
  width: 1.75rem;
  height: 1.75rem;
  cursor: pointer;
  list-style: none;
  border-radius: 6px;
  color: var(--text);
}
.menu summary::-webkit-details-marker { display: none; }
.menu summary:hover { background: var(--surface); }

.caret {
  width: 0.5rem;
  height: 0.5rem;
  border-right: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  transform: translateY(-2px) rotate(45deg);
}
.menu[open] .caret { transform: translateY(2px) rotate(-135deg); }

.menu-list {
  position: absolute;
  right: 0;
  top: calc(100% + 0.375rem);
  z-index: 5;
  min-width: 13rem;
  margin: 0;
  padding: 0.375rem;
  list-style: none;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: 0 8px 24px rgb(0 0 0 / 0.12);
}

.menu-list a {
  display: block;
  padding: 0.5rem 0.75rem;
  border-radius: 6px;
}
.menu-list a:hover { background: var(--surface); }

/* Hero */
.hero { padding-top: 3.5rem; padding-bottom: 2.5rem; }
.hero h1 { font-size: clamp(2.25rem, 8vw, 3.5rem); letter-spacing: -0.02em; }
.tagline { font-size: 1.25rem; font-weight: 600; color: var(--accent); }
.intro { max-width: 38rem; color: var(--muted); font-size: 1.125rem; }

/* Sections */
.section { padding-top: 2rem; padding-bottom: 2.5rem; }
.section h2 { font-size: 1.625rem; margin-bottom: 1.25rem; }

.points,
.cards {
  display: grid;
  gap: 1rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.points h3,
.card h3 { font-size: 1.125rem; }
.points p,
.card p { color: var(--muted); }

.points li { padding-left: 1rem; border-left: 3px solid var(--accent); }

.card {
  padding: 1.25rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}
.card p:last-child { margin-bottom: 0; }
.card-url { font-size: 0.9375rem; }

/* Footer */
.site-footer {
  margin-top: 2rem;
  padding: 1.5rem 0;
  border-top: 1px solid var(--border);
  color: var(--muted);
  font-size: 0.9375rem;
}
.site-footer p { margin: 0; }

/* Wider screens */
@media (min-width: 40rem) {
  .points { grid-template-columns: repeat(3, 1fr); gap: 1.5rem; }
  .cards { grid-template-columns: repeat(2, 1fr); gap: 1.25rem; }
  .hero { padding-top: 5rem; padding-bottom: 3rem; }
}
