:root {
  --bg: #fcfaf7;
  --surface: #ffffff;
  --surface-alt: #fbf2e4;
  --primary: #2f3234;
  --primary-light: #43474a;
  --accent: #b86f18;
  --accent-soft: #fdecd2;
  --text: #1c2529;
  --text-muted: #52636a;
  --border: #eadbc6;
  --danger: #b42318;
  --radius: 10px;
  --shadow: 0 4px 20px rgba(20, 54, 66, 0.06);
  --max-w: 1120px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }

.container { max-width: var(--max-w); margin: 0 auto; padding: 0 24px; }

/* Header */
.site-header {
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 50;
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 92px;
  padding: 10px 0;
  gap: 16px;
  flex-wrap: wrap;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 18px;
  text-decoration: none;
}
.brand:hover { text-decoration: none; }
.brand-mark {
  width: 84px;
  height: 54px;
  color: var(--primary);
  flex-shrink: 0;
  display: block;
}
.brand-text {
  display: flex;
  flex-direction: column;
}
.brand-name {
  font-family: Georgia, "Times New Roman", serif;
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--primary);
  letter-spacing: 0.04em;
  text-transform: uppercase;
  line-height: 1.2;
}
.brand-divider {
  height: 1px;
  background: var(--primary);
  opacity: 0.35;
  margin: 4px 0 3px;
  width: 100%;
}
.brand-sub {
  font-size: 0.72rem;
  color: var(--text-muted);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  font-weight: 600;
}
.footer-brand {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 14px;
}
.footer-brand .brand-mark {
  width: 78px;
  height: 50px;
  color: #ffffff;
}
.footer-brand-title {
  font-family: Georgia, "Times New Roman", serif;
  font-size: 1.05rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #ffffff;
  line-height: 1.2;
}
.footer-brand-sub {
  font-size: 0.72rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: #b7c8ce;
  margin-top: 3px;
}
.nav-links {
  display: flex;
  align-items: center;
  gap: 24px;
  flex-wrap: wrap;
}
.nav-links a:not(.btn) {
  color: var(--text);
  font-size: 0.95rem;
  font-weight: 500;
}
.nav-links a:not(.btn):hover,
.nav-links a:not(.btn)[aria-current="page"] {
  color: var(--accent);
  text-decoration: none;
}
.nav-links a.btn-primary,
.nav-links a.btn-primary:hover,
.nav-links a.btn-primary[aria-current="page"] {
  color: #ffffff;
  font-size: 0.95rem;
  text-decoration: none;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 11px 22px;
  border-radius: var(--radius);
  font-weight: 600;
  font-size: 0.95rem;
  border: 1px solid transparent;
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s, opacity 0.15s;
}
.btn-primary {
  background: var(--primary);
  color: #ffffff;
}
.btn-primary:hover {
  background: var(--primary-light);
  text-decoration: none;
}
.btn-secondary {
  background: var(--surface);
  color: var(--primary);
  border-color: var(--border);
}
.btn-secondary:hover {
  border-color: var(--primary);
  text-decoration: none;
}
.btn:disabled { opacity: 0.6; cursor: not-allowed; }

/* Hero */
.hero {
  background: linear-gradient(135deg, #0d1113 0%, #1c262b 100%);
  color: #ffffff;
  padding: 80px 0 88px;
}
.hero-grid {
  display: grid;
  grid-template-columns: 1.35fr 0.85fr;
  gap: 48px;
  align-items: center;
}
.eyebrow {
  display: inline-block;
  background: rgba(255, 255, 255, 0.14);
  color: #d8efed;
  padding: 5px 12px;
  border-radius: 999px;
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  margin-bottom: 18px;
}
.hero h1 {
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(2rem, 3.6vw, 2.85rem);
  line-height: 1.2;
  margin-bottom: 18px;
  font-weight: 700;
}
.hero p {
  font-size: 1.1rem;
  color: #e2ecee;
  margin-bottom: 28px;
  max-width: 600px;
}
.hero-actions { display: flex; gap: 14px; flex-wrap: wrap; }
.hero-actions .btn-primary { background: #ffffff; color: var(--primary); }
.hero-actions .btn-primary:hover { background: #edf3f5; }
.hero-actions .btn-secondary { background: transparent; color: #ffffff; border-color: rgba(255,255,255,0.45); }
.hero-actions .btn-secondary:hover { border-color: #ffffff; }

.hero-card {
  background: #2f3234;
  border: 1px solid rgba(47, 50, 52, 0.35);
  border-radius: 14px;
  padding: 28px;
  box-shadow: 0 12px 30px rgba(47, 50, 52, 0.22);
}
.hero-card h2 {
  font-size: 1.15rem;
  margin-bottom: 4px;
  color: #ffffff;
}
.credential-list { list-style: none; display: grid; gap: 12px; font-size: 0.93rem; color: #f5efe6; }
.credential-list li strong { color: #f5b867; display: block; font-size: 0.8rem; text-transform: uppercase; letter-spacing: 0.05em; margin-bottom: 2px; }

/* Sections */
.section { padding: 72px 0; }
.section-alt { background: var(--surface-alt); }
.section-header { max-width: 680px; margin-bottom: 40px; }
.section-kicker {
  color: var(--accent);
  font-weight: 700;
  font-size: 0.82rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 8px;
}
.section-header h2 {
  font-family: Georgia, "Times New Roman", serif;
  font-size: 1.95rem;
  color: var(--primary);
  line-height: 1.25;
  margin-bottom: 12px;
}
.section-header p { color: var(--text-muted); font-size: 1.02rem; }

/* Cards Grid */
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 24px; }

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px;
  box-shadow: var(--shadow);
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.card-tag {
  display: inline-block;
  align-self: flex-start;
  background: var(--accent-soft);
  color: var(--accent);
  font-size: 0.78rem;
  font-weight: 700;
  padding: 3px 10px;
  border-radius: 999px;
}
.card h3 {
  font-family: Georgia, "Times New Roman", serif;
  font-size: 1.22rem;
  color: var(--primary);
  line-height: 1.35;
}
.card p { color: var(--text-muted); font-size: 0.95rem; }
.card-meta { font-size: 0.82rem; color: var(--text-muted); margin-top: auto; padding-top: 8px; border-top: 1px solid var(--border); }

/* Pillars MAP */
.map-box {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 36px;
  box-shadow: var(--shadow);
}
.map-pillars { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; margin-top: 24px; }
.pillar { padding: 20px; background: var(--bg); border-radius: var(--radius); border-left: 4px solid var(--accent); }
.pillar h4 { color: var(--primary); margin-bottom: 6px; font-size: 1.05rem; }
.pillar p { color: var(--text-muted); font-size: 0.92rem; }

/* Page Header */
.page-banner {
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  padding: 48px 0;
}
.page-banner h1 {
  font-family: Georgia, "Times New Roman", serif;
  font-size: 2.15rem;
  color: var(--primary);
  margin-bottom: 10px;
}
.page-banner p { color: var(--text-muted); max-width: 680px; font-size: 1.05rem; }

/* Blog Filter Pills */
.filter-bar { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 28px; }
.pill {
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--text);
  padding: 7px 16px;
  border-radius: 999px;
  font-size: 0.88rem;
  font-weight: 500;
  cursor: pointer;
}
.pill:hover { border-color: var(--accent); }
.pill.active { background: var(--primary); color: #ffffff; border-color: var(--primary); }

/* Article View */
.article-wrap {
  max-width: 760px;
  margin: 0 auto;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 44px;
  box-shadow: var(--shadow);
}
.article-title {
  font-family: Georgia, "Times New Roman", serif;
  font-size: 2rem;
  color: var(--primary);
  line-height: 1.25;
  margin: 12px 0 16px;
}
.article-meta { font-size: 0.88rem; color: var(--text-muted); margin-bottom: 28px; padding-bottom: 18px; border-bottom: 1px solid var(--border); }
.article-body { font-size: 1.05rem; color: var(--text); }
.article-body p { margin-bottom: 18px; }
.article-body h2 { font-family: Georgia, serif; color: var(--primary); font-size: 1.45rem; margin: 28px 0 12px; }
.article-body ul, .article-body ol { margin: 0 0 20px 24px; }
.article-body li { margin-bottom: 8px; }
.article-body blockquote {
  border-left: 4px solid var(--accent);
  background: var(--accent-soft);
  padding: 16px 20px;
  margin: 22px 0;
  border-radius: 0 var(--radius) var(--radius) 0;
  font-style: italic;
  color: var(--primary);
}

/* Forms */
.form-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 36px;
  box-shadow: var(--shadow);
}
.field-group { margin-bottom: 20px; display: flex; flex-direction: column; gap: 6px; }
.field-group label { font-weight: 600; font-size: 0.92rem; color: var(--primary); }
.field-group input[type="text"],
.field-group input[type="email"],
.field-group input[type="tel"],
.field-group input[type="number"],
.field-group input[type="date"],
.field-group select,
.field-group textarea {
  width: 100%;
  padding: 11px 14px;
  border: 1px solid var(--border);
  border-radius: 8px;
  font-size: 0.98rem;
  font-family: inherit;
  background: #ffffff;
  color: var(--text);
}
.field-group input:focus, .field-group select:focus, .field-group textarea:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(42, 123, 118, 0.14);
}
.field-group input[aria-invalid="true"],
.field-group select[aria-invalid="true"],
.field-group textarea[aria-invalid="true"] {
  border-color: var(--danger);
}
.field-error { color: var(--danger); font-size: 0.84rem; font-weight: 500; }
.field-help { color: var(--text-muted); font-size: 0.84rem; }
.form-actions { display: flex; gap: 12px; margin-top: 24px; }
.status-box { padding: 18px; border-radius: var(--radius); background: var(--accent-soft); color: var(--primary); font-weight: 500; }
.error-box { padding: 16px; border-radius: var(--radius); background: #fef3f2; color: var(--danger); border: 1px solid #fecdca; }

/* Footer */
.site-footer {
  background: #2f3234;
  color: #e6dfd5;
  padding: 56px 0 32px;
  margin-top: 64px;
  border-top: 5px solid #f5b867;
}
.footer-grid {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr;
  gap: 36px;
  padding-bottom: 36px;
  border-bottom: 1px solid rgba(245, 184, 103, 0.25);
}
.footer-grid h3 { color: #f5b867; font-family: Georgia, serif; font-size: 1.15rem; margin-bottom: 12px; }
.footer-grid p, .footer-grid li { font-size: 0.92rem; line-height: 1.7; list-style: none; }
.footer-grid a { color: #f7e6ce; }
.footer-bottom { padding-top: 24px; font-size: 0.84rem; color: #c7bdb0; display: flex; justify-content: space-between; flex-wrap: wrap; gap: 12px; }

@media (max-width: 860px) {
  .hero-grid, .grid-3, .grid-2, .map-pillars, .footer-grid { grid-template-columns: 1fr; }
  .article-wrap, .form-card { padding: 24px; }
}

/* Portrait integration */
.doctor-profile-head {
  display: flex;
  align-items: center;
  gap: 18px;
  padding-bottom: 18px;
  margin-bottom: 18px;
  border-bottom: 1px solid rgba(245, 184, 103, 0.28);
}
.doctor-portrait-frame {
  width: 88px;
  height: auto;
  border-radius: 10px;
  overflow: hidden;
  border: 2px solid #f5b867;
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.28);
  flex-shrink: 0;
  background: #ffffff;
  display: block;
  line-height: 0;
}
.doctor-portrait-frame img {
  width: 100%;
  height: auto;
  object-fit: cover;
  object-position: center top;
  display: block;
}
.doctor-profile-title h2 {
  font-family: Georgia, "Times New Roman", serif;
  font-size: 1.18rem;
  color: #ffffff;
  margin-bottom: 4px;
  line-height: 1.25;
}
.doctor-profile-title span {
  display: block;
  font-size: 0.82rem;
  font-weight: 600;
  color: #f5b867;
}
.about-banner-grid {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 36px;
  align-items: center;
}
.about-portrait-card {
  flex-shrink: 0;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 10px;
  box-shadow: var(--shadow);
}
.about-portrait-card img {
  width: 164px;
  height: 218px;
  object-fit: contain;
  object-position: center;
  border-radius: 10px;
  border: 2px solid #f5b867;
  background: #ffffff;
  display: block;
}
@media (max-width: 860px) {
  .about-banner-grid { grid-template-columns: 1fr; }
  .about-portrait-card { width: 140px; height: 180px; }
}


/* Books & Publications Section */
.books-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}
.book-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  box-shadow: var(--shadow);
  display: flex;
  flex-direction: column;
  gap: 12px;
  transition: transform 0.18s ease, box-shadow 0.18s ease;
}
.book-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 10px 26px rgba(47, 50, 52, 0.1);
}
.book-cover-wrap {
  width: 100%;
  aspect-ratio: 3 / 4;
  background: var(--surface-alt);
  border: 1px solid var(--border);
  border-radius: 8px;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 10px;
}
.book-cover-wrap img {
  max-width: 100%;
  max-height: 100%;
  width: auto;
  height: auto;
  object-fit: contain;
  border-radius: 4px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.12);
}
.book-card h3 {
  font-family: Georgia, "Times New Roman", serif;
  font-size: 1.05rem;
  color: var(--primary);
  line-height: 1.35;
}
.book-role {
  font-size: 0.84rem;
  font-weight: 600;
  color: var(--accent);
}
.book-details {
  font-size: 0.85rem;
  color: var(--text-muted);
  line-height: 1.5;
  margin-top: auto;
  padding-top: 10px;
  border-top: 1px solid var(--border);
}
@media (max-width: 960px) {
  .books-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 560px) {
  .books-grid { grid-template-columns: 1fr; }
}


/* Sobre Mim Section */
.about-section-grid {
  display: grid;
  grid-template-columns: 240px 1fr;
  gap: 44px;
  align-items: start;
}
.about-photo-frame {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 12px;
  box-shadow: var(--shadow);
}
.about-photo-frame img {
  width: 100%;
  height: auto;
  max-height: none;
  aspect-ratio: auto;
  object-fit: contain;
  object-position: center top;
  border-radius: 10px;
  border: 2px solid #f5b867;
  background: #ffffff;
  display: block;
}
.about-content-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 36px;
  box-shadow: var(--shadow);
}
.about-content-card h2 {
  font-family: Georgia, "Times New Roman", serif;
  font-size: 1.9rem;
  color: var(--primary);
  margin-bottom: 16px;
  line-height: 1.25;
}
.about-content-card p {
  color: var(--text);
  font-size: 1.03rem;
  margin-bottom: 16px;
  line-height: 1.75;
}
.cv-placeholder-box {
  margin-top: 24px;
  padding: 20px 24px;
  background: var(--surface-alt);
  border: 1px dashed var(--accent);
  border-radius: var(--radius);
}
.cv-placeholder-box h3 {
  font-family: Georgia, "Times New Roman", serif;
  font-size: 1.1rem;
  color: var(--primary);
  margin-bottom: 6px;
}
.cv-placeholder-box p {
  font-size: 0.92rem;
  color: var(--text-muted);
  margin-bottom: 0;
}
@media (max-width: 860px) {
  .about-section-grid { grid-template-columns: 1fr; }
  .about-photo-frame { max-width: 300px; }
  .about-content-card { padding: 24px; }
}


/* Curriculum & Bio Enhancements */
.about-quote-box {
  background: var(--surface-alt);
  border-left: 4px solid var(--accent);
  padding: 20px 24px;
  border-radius: 0 10px 10px 0;
  margin-bottom: 26px;
}
.about-quote-box p {
  font-style: italic;
  color: var(--primary);
  margin-bottom: 10px;
}
.about-quote-box p:last-child {
  margin-bottom: 0;
}
.about-inline-photo {
  margin: 24px 0;
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
  background: var(--surface-alt);
}
.about-inline-photo img {
  width: 100%;
  height: auto;
  max-height: none;
  object-fit: contain;
  object-position: center;
  background: #ffffff;
  display: block;
}
.cv-timeline-box {
  margin-top: 32px;
  padding-top: 28px;
  border-top: 1px solid var(--border);
}
.cv-timeline-box h3 {
  font-family: Georgia, "Times New Roman", serif;
  font-size: 1.35rem;
  color: var(--primary);
  margin-bottom: 18px;
}
.cv-list {
  list-style: none;
  display: grid;
  gap: 12px;
}
.cv-list li {
  display: grid;
  grid-template-columns: 108px 1fr;
  gap: 16px;
  align-items: baseline;
  background: var(--surface-alt);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 12px 16px;
  font-size: 0.95rem;
  color: var(--text);
}
.cv-year {
  font-weight: 700;
  color: var(--primary);
  background: rgba(245, 184, 103, 0.28);
  border: 1px solid rgba(245, 184, 103, 0.65);
  border-radius: 6px;
  padding: 3px 8px;
  text-align: center;
  font-size: 0.85rem;
}
@media (max-width: 600px) {
  .cv-list li {
    grid-template-columns: 1fr;
    gap: 6px;
  }
  .cv-year {
    width: fit-content;
  }
}
