/*
Theme Name: Caio Web Dev
Theme URI: https://caiowebdev.com.br
Author: Caio de Moura Navas
Author URI: https://caiowebdev.com.br
Description: Tema institucional/portfólio dark para caiowebdev.com.br — projetos, blog e contato via WhatsApp.
Version: 1.0.0
Requires at least: 6.0
Requires PHP: 7.4
Text Domain: caiowebdev
*/

:root {
  --bg: #0b0e0d;
  --bg-alt: #0e1210;
  --card: #121614;
  --text: #e8ece9;
  --text-dim: #9aa39e;
  --text-mute: #5c635f;
  --border: rgba(232, 236, 233, .07);
  --border-card: rgba(232, 236, 233, .08);
  --border-card-hover: rgba(55, 217, 154, .4);
  --accent: #37d99a;
  --font-sans: 'Space Grotesk', 'Helvetica Neue', sans-serif;
  --font-mono: 'IBM Plex Mono', monospace;
  --maxw: 1160px;
}

* { box-sizing: border-box; }

html { overflow-x: hidden; background: var(--bg); }
html, body { margin: 0; padding: 0; }
body { background: transparent; }

body {
  font-family: var(--font-sans);
  color: var(--text);
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

#cwd-shader-bg {
  position: fixed;
  inset: 0;
  width: 100vw;
  height: 100vh;
  z-index: -1;
  pointer-events: none;
  display: block;
}

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

::selection { background: var(--accent); color: var(--bg); }

a { color: var(--accent); text-decoration: none; }
a:hover { color: color-mix(in srgb, var(--accent) 70%, white); }

h1, h2, h3, p { margin: 0; }

@keyframes pulseDot { 0%, 100% { opacity: 1; } 50% { opacity: .35; } }

/* ---------- layout helpers ---------- */
.wrap { max-width: var(--maxw); width: 100%; margin: 0 auto; padding-left: 48px; padding-right: 48px; box-sizing: border-box; }
.section-alt { background: var(--bg-alt); border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }
.eyebrow { font-family: var(--font-mono); font-size: 12px; color: var(--accent); }

/* ---------- nav ---------- */
.site-nav {
  position: sticky; top: 0; z-index: 50;
  display: flex; align-items: center; justify-content: space-between;
  padding: 20px 48px;
  background: rgba(11, 14, 13, .85);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}
.site-nav .brand { display: flex; align-items: baseline; gap: 10px; color: var(--text); }
.site-nav .brand strong { font-weight: 700; font-size: 18px; letter-spacing: -0.02em; color: var(--text); }
.site-nav .brand strong span { color: var(--accent); }
.site-nav .brand small { font-family: var(--font-mono); font-size: 11px; color: var(--text-dim); }
.nav-collapse { display: flex; align-items: center; gap: 32px; }
.site-nav .menu { display: flex; align-items: center; gap: 32px; list-style: none; margin: 0; padding: 0; }
.site-nav .menu a { color: var(--text); font-size: 14px; }
.site-nav .menu a:hover, .site-nav .menu .current-menu-item > a { color: var(--accent); }
.nav-toggle { display: none; flex-direction: column; justify-content: center; gap: 5px; width: 32px; height: 32px; background: none; border: none; padding: 0; cursor: pointer; }
.nav-toggle span { width: 100%; height: 2px; border-radius: 2px; background: var(--text); transition: transform .2s ease, opacity .2s ease; }
.nav-toggle.is-active span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle.is-active span:nth-child(2) { opacity: 0; }
.nav-toggle.is-active span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }
.btn-cta {
  display: inline-flex; align-items: center; gap: 8px;
  background: var(--accent); color: var(--bg) !important;
  font-weight: 600; font-size: 14px; padding: 9px 20px; border-radius: 100px;
}
.btn-cta:hover { filter: brightness(1.12); }
.btn-cta-lg { font-size: 16px; padding: 16px 34px; }

/* ---------- hero / headings ---------- */
.h1-xl { font-size: clamp(44px, 5.5vw, 68px); line-height: 1.05; letter-spacing: -0.035em; font-weight: 700; }
.h2-section { font-size: 40px; letter-spacing: -0.03em; font-weight: 700; }

/* ---------- cards ---------- */
.card {
  display: flex; flex-direction: column; background: var(--card);
  border: 1px solid var(--border-card); border-radius: 18px; overflow: hidden;
  transition: border-color .15s;
}
.card:hover { border-color: var(--border-card-hover); }
.card-shot { height: 280px; background-size: cover; background-position: center; background-color: var(--border-card); }
.card-shot.is-tall { height: 300px; }
.card-body { display: flex; flex-direction: column; gap: 8px; padding: 24px 28px 28px; }
.card-body h3 { font-size: 20px; font-weight: 600; letter-spacing: -0.02em; }
.card-tag { font-family: var(--font-mono); font-size: 11px; color: var(--accent); white-space: nowrap; }
.card-desc { font-size: 14px; line-height: 1.55; color: var(--text-dim); }

.grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 24px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.grid-hero { display: grid; grid-template-columns: 1.2fr .8fr; }
.grid-split { display: grid; grid-template-columns: 1fr 1fr; }
.avatar-hero { width: min(320px, 55vw); height: min(320px, 55vw); }
.avatar-sobre { width: min(180px, 40vw); height: min(180px, 40vw); }
.sobre-hero-row { display: flex; align-items: center; flex-wrap: wrap; }

/* ---------- timeline (experiência) ---------- */
.timeline-item { display: flex; flex-direction: column; gap: 6px; border-left: 2px solid var(--border-card-hover); padding-left: 24px; }
.timeline-item.is-muted { border-left-color: rgba(232, 236, 233, .15); }
.timeline-item .period { font-family: var(--font-mono); font-size: 12px; color: var(--text-dim); }
.timeline-item .role { font-size: 18px; font-weight: 600; }
.timeline-item .org { font-size: 14px; color: var(--text-dim); line-height: 1.6; }

/* ---------- certificados ---------- */
.cert-card { display: flex; flex-direction: column; gap: 4px; background: var(--card); border: 1px solid var(--border-card); border-radius: 14px; padding: 20px; }
.cert-card .name { font-size: 15px; font-weight: 600; }
.cert-card .org { font-size: 13px; color: var(--text-dim); }
.cert-card .date { font-family: var(--font-mono); font-size: 11px; color: var(--text-mute); }

/* ---------- projetos institucionais (timeline sobre) ---------- */
.gov-row { display: grid; grid-template-columns: 180px 1fr; gap: 32px; padding: 24px 0; border-bottom: 1px solid var(--border-card); }
.gov-row .period { font-family: var(--font-mono); font-size: 12px; color: var(--accent); padding-top: 4px; }
.gov-row .name { font-size: 18px; font-weight: 600; letter-spacing: -0.015em; }
.gov-row .desc { font-size: 14px; line-height: 1.6; color: var(--text-dim); }

/* ---------- depoimentos ---------- */
.quote-card { margin: 0; display: flex; flex-direction: column; gap: 20px; background: var(--card); border: 1px solid var(--border-card); border-radius: 18px; padding: 32px 28px; }
.quote-card .mark { font-size: 28px; color: var(--accent); line-height: 1; }
.quote-card blockquote { margin: 0; font-size: 15px; line-height: 1.65; color: #c9d1cc; }
.quote-card figcaption { margin-top: auto; display: flex; flex-direction: column; gap: 2px; }
.quote-card .who { font-size: 14px; font-weight: 600; }
.quote-card .role { font-size: 12px; color: var(--text-dim); }

/* ---------- blog cards ---------- */
.post-card { display: flex; flex-direction: column; gap: 14px; background: var(--card); border: 1px solid var(--border-card); border-radius: 18px; padding: 28px; color: var(--text); }
.post-card:hover { border-color: var(--border-card-hover); color: var(--text); }
.post-card .meta { display: flex; align-items: center; justify-content: space-between; }
.post-card .cat { font-family: var(--font-mono); font-size: 11px; color: var(--accent); }
.post-card .date { font-family: var(--font-mono); font-size: 11px; color: var(--text-mute); }
.post-card .title { font-size: 19px; font-weight: 600; line-height: 1.35; letter-spacing: -0.015em; }
.post-card .excerpt { font-size: 14px; line-height: 1.55; color: var(--text-dim); }
.post-card .more { margin-top: auto; font-size: 13px; color: var(--accent); }

/* ---------- footer ---------- */
.site-footer { margin-top: auto; border-top: 1px solid var(--border); }
.site-footer .row { display: flex; align-items: center; justify-content: space-between; gap: 24px; flex-wrap: wrap; padding-top: 32px; padding-bottom: 32px; }
.site-footer .links { display: flex; gap: 28px; font-size: 14px; }
.site-footer .socials { display: flex; gap: 20px; font-family: var(--font-mono); font-size: 12px; }
.site-footer .links a, .site-footer .socials a { color: var(--text-dim); }
.site-footer .links a:hover, .site-footer .socials a:hover { color: var(--accent); }
.site-footer .copy { font-family: var(--font-mono); font-size: 11px; color: var(--text-mute); }

.footer-cta { border-top: 1px solid var(--border); }
.footer-cta .inner { display: flex; flex-direction: column; gap: 40px; padding-top: 96px; padding-bottom: 56px; }
.footer-cta .top { display: flex; align-items: flex-end; justify-content: space-between; gap: 40px; flex-wrap: wrap; }
.footer-cta h2 { font-size: clamp(40px, 5vw, 64px); letter-spacing: -0.035em; font-weight: 700; line-height: 1.05; }
.footer-cta h2 span { color: var(--accent); }

/* ---------- contato form ---------- */
.contact-form { display: flex; flex-direction: column; gap: 16px; background: var(--card); border: 1px solid var(--border-card); border-radius: 18px; padding: 36px; align-self: start; }
.contact-form h2 { font-size: 22px; font-weight: 600; letter-spacing: -0.02em; margin-bottom: 4px; }
.contact-form input, .contact-form textarea {
  background: var(--bg); border: 1px solid rgba(232, 236, 233, .12); border-radius: 10px;
  padding: 14px 16px; font-size: 15px; color: var(--text); font-family: var(--font-sans); outline: none; width: 100%;
}
.contact-form input:focus, .contact-form textarea:focus { border-color: var(--accent); }
.contact-form input::placeholder, .contact-form textarea::placeholder { color: var(--text-mute); }
.contact-form button {
  background: var(--accent); color: var(--bg); font-weight: 600; font-size: 15px; font-family: var(--font-sans);
  padding: 15px; border: none; border-radius: 100px; cursor: pointer;
}
.contact-form button:hover { filter: brightness(1.12); }
.contact-form .hint { font-size: 12px; color: var(--text-mute); text-align: center; }
.contact-form .notice { font-size: 13px; padding: 12px 16px; border-radius: 10px; }
.contact-form .notice.success { background: rgba(55, 217, 154, .12); color: var(--accent); }
.contact-form .notice.error { background: rgba(232, 93, 93, .12); color: #e85d5d; }

.contact-link {
  display: flex; align-items: center; justify-content: space-between;
  background: var(--card); border: 1px solid var(--border-card); border-radius: 14px;
  padding: 18px 24px; color: var(--text);
}
.contact-link:hover { border-color: var(--border-card-hover); color: var(--text); }
.contact-link .label { font-family: var(--font-mono); font-size: 11px; color: var(--text-dim); }
.contact-link .value { font-size: 16px; font-weight: 600; }
.contact-link .arrow { color: var(--accent); }

/* ---------- entry content (single post / page content) ---------- */
.entry-content > * + * { margin-top: 1.4em; }
.entry-content h2 { font-size: 28px; font-weight: 700; letter-spacing: -0.02em; color: var(--text); }
.entry-content h3 { font-size: 22px; font-weight: 600; letter-spacing: -0.015em; color: var(--text); }
.entry-content img { border-radius: 12px; }
.entry-content ul, .entry-content ol { padding-left: 1.4em; }
.entry-content blockquote { border-left: 2px solid var(--accent); padding-left: 20px; color: var(--text-dim); font-style: italic; }
.entry-content code { background: var(--card); padding: 2px 6px; border-radius: 4px; font-family: var(--font-mono); font-size: .9em; }
.entry-content pre { background: var(--card); padding: 20px; border-radius: 12px; overflow-x: auto; }

/* ---------- comments ---------- */
.comment-list { list-style: none; margin: 0; padding: 0; }
.comment-list li { margin-bottom: 24px; }
#respond input[type="text"], #respond input[type="email"], #respond input[type="url"], #respond textarea {
  background: var(--bg); border: 1px solid rgba(232, 236, 233, .12); border-radius: 10px;
  padding: 12px 14px; font-size: 15px; color: var(--text); font-family: var(--font-sans); width: 100%;
}
#respond .form-submit input[type="submit"] {
  background: var(--accent); color: var(--bg); font-weight: 600; font-size: 15px;
  padding: 12px 26px; border: none; border-radius: 100px; cursor: pointer; margin-top: 8px;
}

/* ---------- responsive ---------- */
@media (max-width: 900px) {
  .wrap, .site-nav { padding-left: 24px; padding-right: 24px; }
  .grid-2, .grid-3, .grid-hero, .grid-split { grid-template-columns: 1fr; }
  .site-nav .menu { gap: 16px; flex-wrap: wrap; }
  .gov-row { grid-template-columns: 1fr; gap: 8px; }
}

@media (max-width: 640px) {
  .wrap, .site-nav { padding-left: 20px; padding-right: 20px; }
  .site-nav { position: relative; }
  .nav-toggle { display: flex; }
  .nav-collapse {
    position: absolute; top: 100%; left: 0; right: 0;
    flex-direction: column; align-items: flex-start; gap: 16px;
    background: var(--bg-alt); border-bottom: 1px solid var(--border);
    padding: 0 20px; max-height: 0; overflow: hidden;
    transition: max-height .25s ease, padding .25s ease;
  }
  .nav-collapse.is-open { max-height: 360px; padding: 20px; }
  .site-nav .menu { flex-direction: column; align-items: flex-start; gap: 16px; width: 100%; }
  .site-nav .btn-cta { width: 100%; justify-content: center; }
  .h1-xl { font-size: clamp(32px, 9vw, 44px); }
  .h2-section { font-size: 28px; }
  .grid-hero, .grid-split { gap: 40px !important; }
}

@media (max-width: 480px) {
  .wrap, .site-nav { padding-left: 16px; padding-right: 16px; }
}
