/* ---------------------------------------------------------------
   Talysson Oliveira — portfolio site
   Plain CSS, no build step. Custom properties drive light/dark.
   --------------------------------------------------------------- */

:root {
  --bg: #ffffff;
  --bg-raised: #f5f5f4;
  --bg-inset: #eeeeec;
  --text: #17181a;
  --text-muted: #52565c;
  --border: #dcdcda;
  --accent: #0f6f5c;
  --accent-contrast: #ffffff;
  --status-live-bg: #e4f4ee;
  --status-live-text: #0f6f5c;
  --status-active-bg: #eef1fb;
  --status-active-text: #33409a;
  --status-shipped-bg: #f5eee0;
  --status-shipped-text: #8a6417;
  --focus-ring: #0f6f5c;

  --font-body: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --font-mono: "SFMono-Regular", Consolas, "Liberation Mono", Menlo, monospace;
  --max-width: 72rem;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #121314;
    --bg-raised: #1b1c1e;
    --bg-inset: #202124;
    --text: #f2f2f0;
    --text-muted: #b3b6bb;
    --border: #33353a;
    --accent: #4fd8b9;
    --accent-contrast: #0a0f0d;
    --status-live-bg: #12332b;
    --status-live-text: #7fe7cd;
    --status-active-bg: #1f2440;
    --status-active-text: #b3bdf7;
    --status-shipped-bg: #33290f;
    --status-shipped-text: #e9c471;
    --focus-ring: #4fd8b9;
  }
}

* { box-sizing: border-box; }

html { color-scheme: light dark; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

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

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

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

.sr-only {
  position: absolute;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0,0,0,0);
  white-space: nowrap;
  border: 0;
}

.skip-link {
  position: absolute;
  left: -999px;
  top: auto;
  background: var(--accent);
  color: var(--accent-contrast);
  padding: 0.75rem 1rem;
  z-index: 100;
  border-radius: 0 0 0.4rem 0;
}
.skip-link:focus {
  left: 0;
  top: 0;
}

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

/* ---------- header ---------- */

.site-header {
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  background: var(--bg);
  z-index: 10;
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 1rem;
  padding-bottom: 1rem;
  flex-wrap: wrap;
}

.brand {
  font-weight: 700;
  font-size: 1.1rem;
  text-decoration: none;
  color: var(--text);
}

.nav-toggle {
  display: none;
  background: none;
  border: 1px solid var(--border);
  border-radius: 0.4rem;
  padding: 0.5rem 0.75rem;
  cursor: pointer;
}

.nav-toggle-bar,
.nav-toggle-bar::before,
.nav-toggle-bar::after {
  display: block;
  width: 1.25rem;
  height: 2px;
  background: var(--text);
  position: relative;
}
.nav-toggle-bar::before { content: ""; top: -6px; }
.nav-toggle-bar::after { content: ""; top: 4px; }

.site-nav ul {
  list-style: none;
  display: flex;
  gap: 1.5rem;
  margin: 0;
  padding: 0;
}

.site-nav a {
  text-decoration: none;
  color: var(--text-muted);
  font-weight: 500;
}
.site-nav a:hover,
.site-nav a[aria-current="page"] {
  color: var(--text);
}

@media (max-width: 40rem) {
  .nav-toggle { display: inline-flex; align-items: center; }

  .site-nav {
    display: none;
    width: 100%;
    order: 3;
    padding-top: 1rem;
  }
  .site-nav.is-open { display: block; }
  .site-nav ul {
    flex-direction: column;
    gap: 0.75rem;
  }
}

/* ---------- hero ---------- */

.hero {
  padding: 4rem 1.5rem 3rem;
  max-width: 46rem;
}

.eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--accent);
  margin: 0 0 0.75rem;
}

.hero h1 {
  font-size: clamp(2rem, 4.5vw, 3rem);
  line-height: 1.1;
  margin: 0 0 1rem;
}

.hero-lede {
  font-size: 1.15rem;
  color: var(--text-muted);
  margin: 0 0 2rem;
  max-width: 40ch;
}

.cta-row {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}

.btn {
  display: inline-block;
  padding: 0.75rem 1.5rem;
  border-radius: 0.5rem;
  text-decoration: none;
  font-weight: 600;
  border: 1px solid transparent;
}

.btn-primary {
  background: var(--accent);
  color: var(--accent-contrast);
}
.btn-primary:hover { opacity: 0.9; }

.btn-secondary {
  background: transparent;
  color: var(--text);
  border-color: var(--border);
}
.btn-secondary:hover { border-color: var(--accent); }

/* ---------- proof strip ---------- */

.proof {
  background: var(--bg-raised);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  padding: 2.5rem 0;
}

.proof-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.5rem;
}

@media (max-width: 48rem) {
  .proof-grid { grid-template-columns: repeat(2, 1fr); }
}

.proof-figure {
  font-size: 1.75rem;
  font-weight: 800;
  color: var(--accent);
  margin: 0 0 0.35rem;
  font-family: var(--font-mono);
}

.proof-label {
  margin: 0;
  color: var(--text-muted);
  font-size: 0.9rem;
}

/* ---------- generic section ---------- */

.section {
  padding: 4rem 0;
}

.section h2 {
  font-size: clamp(1.5rem, 3vw, 2rem);
  margin: 0 0 0.5rem;
}

.section-lede {
  color: var(--text-muted);
  margin: 0 0 2.5rem;
  max-width: 60ch;
}

/* ---------- projects ---------- */

.project-grid {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(19rem, 1fr));
  gap: 1.5rem;
}

.project-card {
  border: 1px solid var(--border);
  border-radius: 0.75rem;
  padding: 1.5rem;
  background: var(--bg-raised);
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.project-card-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.project-card h3 {
  margin: 0;
  font-size: 1.1rem;
}

.project-status {
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  padding: 0.2rem 0.55rem;
  border-radius: 999px;
  white-space: nowrap;
}
.status-live { background: var(--status-live-bg); color: var(--status-live-text); }
.status-active { background: var(--status-active-bg); color: var(--status-active-text); }
.status-shipped { background: var(--status-shipped-bg); color: var(--status-shipped-text); }

.project-card p {
  margin: 0;
  color: var(--text-muted);
  font-size: 0.95rem;
}

.tag-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}

.tag-list li {
  font-size: 0.75rem;
  background: var(--bg-inset);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 0.15rem 0.6rem;
  color: var(--text-muted);
}

.project-link {
  margin-top: auto;
  font-weight: 600;
  text-decoration: none;
  font-size: 0.9rem;
}
.project-link:hover { text-decoration: underline; }

.project-link-muted {
  color: var(--text-muted);
  font-weight: 500;
  font-style: italic;
}

/* ---------- CTA band ---------- */

.cta-band {
  background: var(--bg-inset);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

.cta-band-inner {
  text-align: center;
  max-width: 34rem;
}

.cta-band h2 { margin-bottom: 0.75rem; }
.cta-band p {
  color: var(--text-muted);
  margin: 0 0 1.75rem;
}

/* ---------- contact ---------- */

.contact-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  max-width: 30rem;
}

.contact-list li {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 1rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--border);
  flex-wrap: wrap;
}

.contact-label {
  font-weight: 700;
  color: var(--text-muted);
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

/* ---------- footer ---------- */

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

.footer-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
}

.footer-inner nav a {
  color: var(--text-muted);
  text-decoration: none;
  margin-left: 1rem;
}
.footer-inner nav a:hover { color: var(--text); }

/* ---------- about page ---------- */

.timeline {
  list-style: none;
  margin: 0;
  padding: 0;
  border-left: 2px solid var(--border);
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

.timeline li {
  padding-left: 1.5rem;
  position: relative;
}

.timeline li::before {
  content: "";
  position: absolute;
  left: -0.4375rem;
  top: 0.3rem;
  width: 0.75rem;
  height: 0.75rem;
  border-radius: 50%;
  background: var(--accent);
}

.timeline h3 {
  margin: 0 0 0.35rem;
  font-size: 1.05rem;
}

.timeline p {
  margin: 0;
  color: var(--text-muted);
}

.skill-groups {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(15rem, 1fr));
  gap: 1.5rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.skill-group {
  border: 1px solid var(--border);
  border-radius: 0.75rem;
  padding: 1.25rem 1.5rem;
  background: var(--bg-raised);
}

.skill-group h3 {
  margin: 0 0 0.75rem;
  font-size: 0.95rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--text-muted);
}

.skill-group ul {
  margin: 0;
  padding: 0;
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}

.skill-group li {
  font-size: 0.85rem;
  background: var(--bg-inset);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 0.2rem 0.7rem;
}

/* ---------- case studies ---------- */

.case-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1.5rem;
  margin: 0 0 1.5rem;
  font-size: 0.85rem;
  color: var(--text-muted);
}

.case-meta strong { color: var(--text); }

.case-block {
  max-width: 62ch;
  margin: 0 0 1.25rem;
  color: var(--text-muted);
}

.case-block:last-child { margin-bottom: 0; }

.callout {
  border: 1px solid var(--border);
  border-left: 4px solid var(--accent);
  border-radius: 0.5rem;
  padding: 1rem 1.25rem;
  background: var(--bg-raised);
  max-width: 62ch;
  margin: 0 0 1.5rem;
}

.callout p { margin: 0 0 0.5rem; color: var(--text-muted); }
.callout p:last-child { margin-bottom: 0; }
.callout-label {
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  font-size: 0.75rem;
  color: var(--text);
  display: block;
  margin-bottom: 0.4rem;
}

.stat-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(10rem, 1fr));
  gap: 1rem;
  max-width: 40rem;
  margin: 0 0 1.5rem;
}

.stat-box {
  border: 1px solid var(--border);
  border-radius: 0.5rem;
  padding: 0.85rem 1rem;
  background: var(--bg-inset);
}

.stat-box .figure {
  font-family: var(--font-mono);
  font-weight: 800;
  font-size: 1.15rem;
  color: var(--accent);
}

.stat-box .label {
  display: block;
  font-size: 0.78rem;
  color: var(--text-muted);
  margin-top: 0.15rem;
}

/* ---------- contact form ---------- */

.contact-form {
  max-width: 30rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.form-field { display: flex; flex-direction: column; gap: 0.35rem; }

.form-field label {
  font-weight: 600;
  font-size: 0.9rem;
}

.form-field input,
.form-field textarea {
  font: inherit;
  padding: 0.6rem 0.75rem;
  border: 1px solid var(--border);
  border-radius: 0.5rem;
  background: var(--bg);
  color: var(--text);
}

.form-field input:focus,
.form-field textarea:focus {
  outline: 3px solid var(--focus-ring);
  outline-offset: 1px;
}

/* Honeypot: hidden from sighted users and kept out of the tab order,
   but still present in the DOM and readable by non-JS bots that
   fill in every field indiscriminately. */
.hp-field {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.form-status {
  font-size: 0.85rem;
  min-height: 1.2em;
}
.form-status[data-state="ok"] { color: var(--status-live-text); }
.form-status[data-state="error"] { color: #b0453a; }

.btn[disabled] {
  opacity: 0.6;
  cursor: not-allowed;
}
