/* edimar-cardoso.me styles: mobile-first, light and dark (system preference
   plus a manual toggle that sets data-theme on <html>), no web fonts. */

:root {
  color-scheme: light;
  --bg: #f7f6f3;
  --surface: #ffffff;
  --ink: #1e2329;
  --muted: #59626d;
  --line: #dedbd4;
  --accent: #1d6470;
  --accent-ink: #17535d;
  --accent-soft: #e3eeef;
  --todo-bg: #fbf3dc;
  --todo-ink: #6b5310;
  --todo-line: #e7d69c;
  --focus: #1d6470;
  --radius: 14px;
  --max: 64rem;
  --font: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --serif: "Iowan Old Style", "Palatino Linotype", Palatino, "Book Antiqua", Georgia, ui-serif, serif;
  --mono: ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace;
}

/* Dark palette: applied by the system preference unless the visitor picked
   light, and always when the visitor picked dark. */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    color-scheme: dark;
    --bg: #111417;
    --surface: #181c21;
    --ink: #e6e8eb;
    --muted: #9ba4ae;
    --line: #2a3037;
    --accent: #6fb6c0;
    --accent-ink: #8ccbd3;
    --accent-soft: #17292d;
    --todo-bg: #2a2412;
    --todo-ink: #e6cf8a;
    --todo-line: #4a4020;
    --focus: #8ccbd3;
  }
}

:root[data-theme="dark"] {
  color-scheme: dark;
  --bg: #111417;
  --surface: #181c21;
  --ink: #e6e8eb;
  --muted: #9ba4ae;
  --line: #2a3037;
  --accent: #6fb6c0;
  --accent-ink: #8ccbd3;
  --accent-soft: #17292d;
  --todo-bg: #2a2412;
  --todo-ink: #e6cf8a;
  --todo-line: #4a4020;
  --focus: #8ccbd3;
}

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

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

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

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font);
  font-size: 1.0625rem;
  line-height: 1.65;
  overflow-wrap: break-word;
}

img,
svg {
  display: block;
  max-width: 100%;
}

a {
  color: var(--accent-ink);
  text-underline-offset: 0.18em;
  text-decoration-thickness: 1px;
}

a:hover {
  text-decoration-thickness: 2px;
}

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

.skip {
  position: absolute;
  left: 1rem;
  top: -4rem;
  padding: 0.5rem 0.875rem;
  background: var(--surface);
  color: var(--ink);
  border: 1px solid var(--line);
  border-radius: 8px;
  z-index: 10;
}

.skip:focus {
  top: 1rem;
}

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

@media (min-width: 40rem) {
  .wrap {
    padding-inline: 1.5rem;
  }
}

/* Header */

.site-header {
  padding-block: 1rem;
  border-bottom: 1px solid var(--line);
}

.site-header .wrap {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem 1rem;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  color: var(--ink);
  text-decoration: none;
  font-family: var(--serif);
  font-size: 1.15rem;
  letter-spacing: -0.01em;
}

.monogram {
  display: inline-grid;
  place-items: center;
  width: 2.25rem;
  height: 2.25rem;
  border-radius: 50%;
  background: var(--accent);
  color: var(--bg);
  font-family: var(--serif);
  font-size: 0.95rem;
  letter-spacing: 0.02em;
}

.brand-name {
  display: none;
}

@media (min-width: 30rem) {
  .brand-name {
    display: inline;
  }
}

.header-tools {
  display: flex;
  align-items: center;
  gap: 0.25rem 1rem;
  flex-wrap: wrap;
}

.nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem 1.1rem;
  font-size: 0.95rem;
}

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

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

.nav a[aria-current="page"] {
  color: var(--ink);
  text-decoration: underline;
  text-decoration-color: var(--accent);
  text-underline-offset: 0.35em;
}

.nav .nav-optional {
  display: none;
}

@media (min-width: 48rem) {
  .nav .nav-optional {
    display: inline;
  }
}

.lang {
  font-size: 0.9rem;
  font-family: var(--mono);
  color: var(--muted);
  text-decoration: none;
  padding: 0.2rem 0.5rem;
  border: 1px solid var(--line);
  border-radius: 999px;
}

.lang:hover {
  color: var(--ink);
  border-color: var(--muted);
}

.theme-toggle {
  display: inline-grid;
  place-items: center;
  width: 2.25rem;
  height: 2.25rem;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
}

.theme-toggle:hover {
  color: var(--ink);
  border-color: var(--muted);
}

.theme-toggle svg {
  width: 1.1rem;
  height: 1.1rem;
}

/* The toggle shows the sun in dark mode (switch to light) and the moon in
   light mode. Without JavaScript the button stays hidden. */
.theme-toggle .icon-sun {
  display: none;
}

:root[data-theme="dark"] .theme-toggle .icon-sun {
  display: block;
}

:root[data-theme="dark"] .theme-toggle .icon-moon {
  display: none;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .theme-toggle .icon-sun {
    display: block;
  }

  :root:not([data-theme="light"]) .theme-toggle .icon-moon {
    display: none;
  }
}

.no-js .theme-toggle {
  display: none;
}

/* Typography */

h1,
h2,
h3 {
  font-family: var(--serif);
  font-weight: 400;
  line-height: 1.2;
  letter-spacing: -0.015em;
  margin: 0;
}

h2 {
  font-size: clamp(1.6rem, 5vw, 2.1rem);
}

h3 {
  font-size: 1.3rem;
}

p {
  margin: 0.9rem 0 0;
}

.eyebrow {
  margin: 0 0 0.5rem;
  font-family: var(--mono);
  font-size: 0.78rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent-ink);
}

.lede {
  margin: 1.1rem 0 0;
  max-width: 36rem;
  font-size: 1.15rem;
  color: var(--muted);
}

/* Hero */

.hero {
  padding-block: 2.5rem 3rem;
}

.hero-grid {
  display: grid;
  gap: 1.75rem;
  align-items: center;
}

@media (min-width: 48rem) {
  .hero {
    padding-block: 4.5rem 4.5rem;
  }

  .hero-grid {
    grid-template-columns: 1fr auto;
    gap: 3rem;
  }

  .hero-photo {
    order: 2;
  }
}

.hero-photo {
  width: 8rem;
  height: 8rem;
  border-radius: 50%;
  border: 1px solid var(--line);
  background: var(--surface);
  object-fit: cover;
}

@media (min-width: 48rem) {
  .hero-photo {
    width: 13rem;
    height: 13rem;
  }
}

.hero h1 {
  font-size: clamp(2.6rem, 11vw, 4.5rem);
  letter-spacing: -0.03em;
  line-height: 1.05;
}

.role {
  margin: 0.75rem 0 0;
  font-size: 1.2rem;
  color: var(--ink);
}

.social {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  margin: 1.75rem 0 0;
  padding: 0;
  list-style: none;
}

.social a {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  min-height: 2.75rem;
  padding: 0.5rem 1rem;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--ink);
  text-decoration: none;
  font-size: 0.95rem;
}

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

.social svg {
  width: 1.05rem;
  height: 1.05rem;
  fill: currentColor;
}

/* Sections */

.section {
  padding-block: 3rem;
  border-top: 1px solid var(--line);
}

@media (min-width: 48rem) {
  .section {
    padding-block: 4rem;
  }
}

.section-head {
  max-width: 40rem;
  margin-bottom: 1.75rem;
}

.section-head p {
  color: var(--muted);
}

/* Project cards */

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

@media (min-width: 48rem) {
  .cards {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1.25rem;
  }
}

.card {
  display: flex;
  flex-direction: column;
  padding: 1.35rem 1.35rem 1.25rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
}

.card h3 a {
  color: var(--ink);
  text-decoration: none;
}

.card h3 a:hover {
  color: var(--accent-ink);
  text-decoration: underline;
}

.card .tag {
  display: inline-block;
  margin-top: 0.4rem;
  font-family: var(--mono);
  font-size: 0.75rem;
  color: var(--muted);
}

.card p {
  color: var(--muted);
  margin-top: 0.6rem;
}

.sublinks {
  margin: 1rem 0 0;
  padding: 0.9rem 0 0;
  list-style: none;
  border-top: 1px dashed var(--line);
  display: grid;
  gap: 0.6rem;
  font-size: 0.97rem;
}

.sublinks span {
  display: block;
  color: var(--muted);
  font-size: 0.92rem;
}

/* Now and contact */

/* Limit the line length of the children, so a .wrap.prose block keeps the
   page's left edge instead of being centered as a narrow column. */
.prose > * {
  max-width: 40rem;
}

.prose h2 {
  margin-top: 2.5rem;
}

.prose h2:first-of-type {
  margin-top: 1.75rem;
}

.contact-mail {
  display: inline-block;
  margin-top: 1rem;
  font-family: var(--serif);
  font-size: clamp(1.3rem, 5vw, 1.8rem);
}

/* Placeholders the owner still has to fill. Visible on purpose so they are
   not forgotten before publishing; search the HTML for "TODO". */
.todo {
  display: block;
  margin-top: 0.9rem;
  padding: 0.6rem 0.85rem;
  border: 1px dashed var(--todo-line);
  border-radius: 10px;
  background: var(--todo-bg);
  color: var(--todo-ink);
  font-family: var(--mono);
  font-size: 0.82rem;
  line-height: 1.5;
}

/* Page header for inner pages */

.page-head {
  padding-block: 2.5rem 1rem;
}

.page-head h1 {
  font-size: clamp(2.2rem, 9vw, 3.4rem);
  letter-spacing: -0.025em;
}

.page-body {
  padding-block: 0 3.5rem;
}

/* Footer */

.site-footer {
  border-top: 1px solid var(--line);
  padding-block: 2rem 2.5rem;
  font-size: 0.9rem;
  color: var(--muted);
}

.site-footer p {
  margin: 0.4rem 0 0;
}

.site-footer a {
  color: var(--muted);
}

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

/* 404 */

.notfound {
  padding-block: 4rem 5rem;
}

.notfound h1 {
  font-size: clamp(2.2rem, 9vw, 3.4rem);
}

.notfound-alt {
  margin-top: 3rem;
  padding-top: 2rem;
  border-top: 1px solid var(--line);
}

/* Buttons (series page and highlight card) */

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  margin-top: 1.5rem;
}

.button {
  display: inline-flex;
  align-items: center;
  min-height: 2.75rem;
  padding: 0.5rem 1.1rem;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--ink);
  text-decoration: none;
  font-size: 0.95rem;
}

.button:hover {
  border-color: var(--accent);
}

.button-primary {
  background: var(--accent);
  border-color: var(--accent);
  color: var(--bg);
}

.button-primary:hover {
  background: var(--accent-ink);
  border-color: var(--accent-ink);
}

/* Highlighted card for the series on the home page */

.feature {
  display: grid;
  gap: 1.25rem;
  padding: 1.35rem;
  border: 1px solid var(--accent);
  border-radius: var(--radius);
  background: var(--accent-soft);
}

@media (min-width: 48rem) {
  .feature {
    grid-template-columns: minmax(0, 1fr) 15rem;
    align-items: center;
    gap: 2rem;
    padding: 2rem;
  }
}

.feature h2 a {
  color: var(--ink);
  text-decoration: none;
}

.feature h2 a:hover {
  color: var(--accent-ink);
  text-decoration: underline;
}

.feature p {
  color: var(--muted);
}

.feature img {
  width: 100%;
  max-width: 15rem;
  height: auto;
  border-radius: 10px;
  border: 1px solid var(--line);
}

/* Group label inside a section (products by company) */

.group-label {
  margin: 2rem 0 1rem;
  color: var(--muted);
  max-width: 40rem;
}

/* Small print, such as the Quave ONE disclosure */

.note {
  margin-top: 0.9rem;
  font-size: 0.88rem;
  color: var(--muted);
}

/* Series page: hero diagram, steps, lessons */

.figure {
  margin: 2rem 0 0;
}

.figure img {
  width: 100%;
  max-width: 36rem;
  height: auto;
  border-radius: var(--radius);
  border: 1px solid var(--line);
}

.figure figcaption {
  margin-top: 0.6rem;
  font-size: 0.88rem;
  color: var(--muted);
}

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

.step {
  padding: 1.35rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
}

.step > * {
  max-width: 44rem;
}

.step-num {
  display: inline-grid;
  place-items: center;
  width: 2rem;
  height: 2rem;
  margin-bottom: 0.6rem;
  border-radius: 50%;
  background: var(--accent);
  color: var(--bg);
  font-family: var(--mono);
  font-size: 0.9rem;
}

.step h3 {
  font-size: 1.35rem;
}

.step .label {
  margin-top: 1rem;
  font-family: var(--mono);
  font-size: 0.75rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--accent-ink);
}

.step .label + p {
  margin-top: 0.3rem;
}

.badge {
  display: inline-block;
  margin-left: 0.4rem;
  padding: 0.1rem 0.55rem;
  border-radius: 999px;
  background: var(--todo-bg);
  color: var(--todo-ink);
  border: 1px solid var(--todo-line);
  font-family: var(--mono);
  font-size: 0.72rem;
  vertical-align: middle;
}

.lessons {
  margin: 1rem 0 0;
  padding-left: 1.25rem;
}

.lessons li + li {
  margin-top: 0.5rem;
}

/* "Hosted on Quave ONE" badge: white-text logo in a dark chip, readable on both themes
   (same treatment the owner approved for Prospia's footer). */
.hosted {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  margin-top: 1rem;
  font-size: 0.8rem;
  text-decoration: none;
  opacity: 0.8;
  transition: opacity 0.2s;
}
.hosted:hover {
  opacity: 1;
}
.hosted .chip {
  display: inline-flex;
  align-items: center;
  padding: 0.3rem 0.5rem;
  border-radius: 6px;
  background: #111827;
}
.hosted img {
  height: 14px;
  width: auto;
  display: block;
}
