/*
Theme Name: Emerson Portfolio
Theme URI: https://example.com/
Author: Emerson
Author URI: https://example.com/
Description: Tema escuro com destaque vermelho para portfolio, blog e downloads.
Version: 1.0.0
Requires at least: 6.0
Tested up to: 6.8
Requires PHP: 7.4
Text Domain: emerson-portfolio
*/

:root {
  --bg: #08090c;
  --surface: #111318;
  --surface-2: #181b22;
  --line: #2a2f3a;
  --text: #f5f7fb;
  --muted: #a8b0bf;
  --red: #e11d2e;
  --red-dark: #9f1220;
  --red-soft: rgba(225, 29, 46, 0.18);
  --max: 1180px;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 16px;
  line-height: 1.65;
}

a {
  color: inherit;
  text-decoration-color: var(--red);
  text-underline-offset: 0.22em;
}

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  border-bottom: 1px solid var(--line);
  background: rgba(8, 9, 12, 0.92);
  backdrop-filter: blur(14px);
}

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

.header-inner {
  align-items: center;
  display: flex;
  gap: 24px;
  justify-content: space-between;
  min-height: 76px;
}

.brand {
  color: var(--text);
  font-size: 1.05rem;
  font-weight: 800;
  letter-spacing: 0;
  text-decoration: none;
}

.brand span {
  color: var(--red);
}

.main-menu,
.main-menu ul {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 18px;
  list-style: none;
  margin: 0;
  padding: 0;
}

.main-menu a {
  color: var(--muted);
  font-size: 0.94rem;
  font-weight: 650;
  text-decoration: none;
}

.main-menu a:hover,
.current-menu-item > a {
  color: var(--text);
}

.hero {
  border-bottom: 1px solid var(--line);
  min-height: 540px;
  overflow: hidden;
  position: relative;
}

.hero::before {
  background:
    linear-gradient(110deg, rgba(8, 9, 12, 0.98) 0%, rgba(8, 9, 12, 0.78) 50%, rgba(8, 9, 12, 0.34) 100%),
    radial-gradient(circle at 78% 35%, rgba(225, 29, 46, 0.28), transparent 34%);
  content: "";
  inset: 0;
  position: absolute;
}

.hero-inner {
  align-items: center;
  display: grid;
  gap: 46px;
  grid-template-columns: minmax(0, 1.06fr) minmax(280px, 0.94fr);
  min-height: 540px;
  position: relative;
}

.eyebrow {
  color: var(--red);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

h1,
h2,
h3 {
  line-height: 1.1;
  margin: 0 0 16px;
}

h1 {
  font-size: clamp(2.45rem, 5vw, 5rem);
  max-width: 760px;
}

h2 {
  font-size: clamp(1.85rem, 3vw, 3rem);
}

h3 {
  font-size: 1.28rem;
}

p {
  margin: 0 0 18px;
}

.lead {
  color: var(--muted);
  font-size: 1.15rem;
  max-width: 680px;
}

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 28px;
}

.button,
.wp-block-button__link,
button,
input[type="submit"] {
  align-items: center;
  background: var(--red);
  border: 1px solid var(--red);
  border-radius: 8px;
  color: #fff;
  cursor: pointer;
  display: inline-flex;
  font-weight: 800;
  justify-content: center;
  min-height: 44px;
  padding: 10px 16px;
  text-decoration: none;
}

.button.secondary {
  background: transparent;
  border-color: var(--line);
  color: var(--text);
}

.button:hover,
.wp-block-button__link:hover {
  background: var(--red-dark);
}

.hero-panel {
  background: linear-gradient(145deg, rgba(24, 27, 34, 0.92), rgba(15, 17, 22, 0.92));
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 28px;
}

.stat-grid {
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.stat {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 18px;
}

.stat strong {
  color: var(--red);
  display: block;
  font-size: 1.7rem;
  line-height: 1;
}

.stat span {
  color: var(--muted);
  display: block;
  font-size: 0.88rem;
  margin-top: 8px;
}

.section {
  padding: 72px 0;
}

.section.alt {
  background: var(--surface);
}

.section-head {
  align-items: end;
  display: flex;
  gap: 22px;
  justify-content: space-between;
  margin-bottom: 28px;
}

.section-head p {
  color: var(--muted);
  max-width: 560px;
}

.grid {
  display: grid;
  gap: 18px;
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.card {
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-radius: 8px;
  min-width: 0;
  overflow: hidden;
}

.card-body {
  padding: 22px;
}

.card-meta {
  color: var(--muted);
  font-size: 0.86rem;
  margin-bottom: 10px;
}

.card h3 a {
  text-decoration: none;
}

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

.project-thumb {
  aspect-ratio: 16 / 10;
  background: linear-gradient(135deg, var(--surface), var(--red-soft));
  object-fit: cover;
  width: 100%;
}

.download-row {
  align-items: center;
  display: flex;
  gap: 16px;
  justify-content: space-between;
}

.content-area {
  padding: 66px 0;
}

.entry {
  margin: 0 auto;
  max-width: 850px;
}

.entry-title {
  font-size: clamp(2rem, 4vw, 4rem);
}

.entry-content {
  color: #d8dde7;
}

.entry-content > * {
  max-width: 850px;
}

.archive-title {
  margin-bottom: 26px;
}

.site-footer {
  border-top: 1px solid var(--line);
  color: var(--muted);
  padding: 28px 0;
}

.footer-inner {
  align-items: center;
  display: flex;
  gap: 16px;
  justify-content: space-between;
}

input,
textarea,
select {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--text);
  max-width: 100%;
  padding: 12px;
}

@media (max-width: 860px) {
  .header-inner,
  .section-head,
  .footer-inner {
    align-items: flex-start;
    flex-direction: column;
  }

  .hero-inner,
  .grid {
    grid-template-columns: 1fr;
  }

  .hero {
    min-height: auto;
  }

  .hero-inner {
    min-height: auto;
    padding: 68px 22px;
  }
}

@media (max-width: 560px) {
  .wrap {
    padding: 0 16px;
  }

  .stat-grid {
    grid-template-columns: 1fr;
  }

  .download-row {
    align-items: flex-start;
    flex-direction: column;
  }
}
