/* =========================================================================
   Júlio Guerra Domingues — personal site
   ========================================================================= */

:root {
  --ink:        #14242b;   /* near-black teal, body text */
  --ink-soft:   #4a5b62;
  --bg:         #ffffff;
  --bg-alt:     #f4f7f8;
  --accent:     #0e5a6e;   /* deep teal, from the original brand */
  --accent-dk:  #0a4250;
  --line:       #e2e8ea;
  --maxw:       960px;
  --radius:     12px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  color: var(--ink);
  background: var(--bg);
  line-height: 1.65;
  font-size: 17px;
  -webkit-font-smoothing: antialiased;
}

@media (min-width: 700px) { body { font-size: 18px; } }

h1, h2, h3 { line-height: 1.2; font-weight: 700; letter-spacing: -0.01em; }
h1 { font-size: clamp(2rem, 5vw, 3rem); margin: 0 0 .4em; }
h2 { font-size: clamp(1.4rem, 3vw, 1.9rem); margin: 0 0 .8em; }
h3 { font-size: 1.15rem; margin: 0 0 .4em; }

p { margin: 0 0 1em; }

a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }

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

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

.skip-link {
  position: absolute; left: -9999px; top: 0;
  background: var(--accent); color: #fff; padding: .6em 1em; z-index: 100;
}
.skip-link:focus { left: 0; }

/* ---- Header / nav ---- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(255,255,255,.9);
  backdrop-filter: saturate(180%) blur(8px);
  border-bottom: 1px solid var(--line);
}
.header-inner {
  display: flex; align-items: center; justify-content: space-between;
  min-height: 60px;
}
.brand { font-weight: 700; color: var(--ink); font-size: 1.05rem; }
.brand:hover { text-decoration: none; color: var(--accent); }

.site-nav ul {
  display: flex; gap: 1.4rem; list-style: none; margin: 0; padding: 0;
}
.site-nav a { color: var(--ink-soft); font-size: .95rem; font-weight: 500; }
.site-nav a:hover { color: var(--accent); text-decoration: none; }

.nav-toggle {
  display: none; flex-direction: column; gap: 5px;
  background: none; border: 0; cursor: pointer; padding: 8px;
}
.nav-toggle span { width: 24px; height: 2px; background: var(--ink); display: block; }

@media (max-width: 640px) {
  .nav-toggle { display: flex; }
  .site-nav ul {
    display: none; position: absolute; top: 60px; right: 0; left: 0;
    flex-direction: column; gap: 0; background: #fff;
    border-bottom: 1px solid var(--line); padding: .5rem 0;
  }
  .site-nav ul.open { display: flex; }
  .site-nav li { padding: 0 1.25rem; }
  .site-nav a { display: block; padding: .6rem 0; }
}

/* ---- Hero ---- */
.hero { padding: clamp(3rem, 8vw, 6rem) 0 clamp(2rem, 5vw, 4rem); }
.hero-inner {
  display: grid; gap: 2.5rem; align-items: center;
  grid-template-columns: 1fr;
}
@media (min-width: 760px) {
  .hero-inner { grid-template-columns: 1.4fr 1fr; }
}
.eyebrow {
  text-transform: uppercase; letter-spacing: .12em; font-size: .8rem;
  font-weight: 600; color: var(--accent); margin: 0 0 .6em;
}
.lede { font-size: 1.2rem; color: var(--ink); max-width: 34ch; }
.affil { color: var(--ink-soft); font-size: .98rem; }
.affil span { color: var(--ink); }
.hero-actions { display: flex; gap: .8rem; flex-wrap: wrap; margin-top: 1.6rem; }

.hero-photo { margin: 0; justify-self: center; }
.hero-photo img {
  width: 260px; height: 260px; border-radius: 50%; object-fit: cover;
  box-shadow: 0 12px 30px rgba(14,90,110,.18);
}

/* ---- Buttons ---- */
.btn {
  display: inline-block; background: var(--accent); color: #fff;
  padding: .65em 1.3em; border-radius: 999px; font-weight: 600; font-size: .95rem;
  transition: background .15s ease;
}
.btn:hover { background: var(--accent-dk); text-decoration: none; }
.btn-ghost { background: transparent; color: var(--accent); box-shadow: inset 0 0 0 1.5px var(--accent); }
.btn-ghost:hover { background: var(--accent); color: #fff; }

/* ---- Sections ---- */
.section { padding: clamp(2.5rem, 6vw, 4.5rem) 0; }
.section-alt { background: var(--bg-alt); }
.section-intro { color: var(--ink-soft); max-width: 60ch; }

.cols {
  list-style: none; padding: 0; margin: 0;
  display: grid; gap: .5rem 2rem; grid-template-columns: 1fr;
}
@media (min-width: 620px) { .cols { grid-template-columns: 1fr 1fr; } }
.cols li { position: relative; padding-left: 1.3em; }
.cols li::before { content: "▸"; color: var(--accent); position: absolute; left: 0; }

/* ---- Publications ---- */
.pubs { padding-left: 1.2em; }
.pubs li { margin-bottom: 1.1em; }
.pubs em { font-style: normal; font-weight: 600; color: var(--ink); }
.muted { color: var(--ink-soft); }
.small { font-size: .9rem; }

/* ---- Cards ---- */
.cards { display: grid; gap: 1.2rem; grid-template-columns: 1fr; }
@media (min-width: 620px) { .cards { grid-template-columns: 1fr 1fr; } }
.card {
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
  padding: 1.4rem;
}
.card h3 { color: var(--accent-dk); }
.card p { color: var(--ink-soft); font-size: .98rem; }
.card a { font-weight: 600; font-size: .92rem; }

/* ---- Timeline (education, awards) ---- */
.subhead { margin: 2rem 0 .8rem; color: var(--accent-dk); }
.timeline { list-style: none; margin: 0; padding: 0; }
.timeline li {
  display: grid; grid-template-columns: 1fr; gap: .1rem;
  padding: .7rem 0; border-bottom: 1px solid var(--line);
}
@media (min-width: 620px) {
  .timeline li { grid-template-columns: 160px 1fr; gap: 1.2rem; align-items: baseline; }
}
.tl-when { color: var(--accent); font-weight: 600; font-size: .9rem; }
.tl-what { display: flex; flex-direction: column; }
.tl-org { color: var(--ink-soft); font-size: .95rem; }

/* ---- Language switch ---- */
.lang-item { margin-left: .4rem; }
.lang-switch {
  font-weight: 600; color: var(--accent) !important;
  box-shadow: inset 0 0 0 1.5px var(--line);
  padding: .3em .8em !important; border-radius: 999px;
}
.lang-switch:hover { box-shadow: inset 0 0 0 1.5px var(--accent); text-decoration: none; }
@media (max-width: 640px) {
  .lang-switch { display: inline-block; box-shadow: none; padding: .6rem 0 !important; }
}

/* ---- Contact ---- */
.contact-list { list-style: none; padding: 0; margin: 1.2rem 0 0; }
.contact-list li { display: flex; gap: 1rem; padding: .45rem 0; border-bottom: 1px solid var(--line); }
.contact-list span { flex: 0 0 110px; color: var(--ink-soft); font-weight: 500; }

/* ---- Prose pages (RADsmart, 404) ---- */
.prose { max-width: 64ch; }
.prose.center { text-align: center; margin: 0 auto; }
.notice {
  background: var(--bg-alt); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 1rem 1.2rem; color: var(--ink-soft);
}

/* ---- Footer ---- */
.site-footer { border-top: 1px solid var(--line); padding: 2.5rem 0; margin-top: 1rem; }
.footer-inner { display: flex; flex-direction: column; gap: .6rem; align-items: center; text-align: center; }
.footer-name { font-weight: 600; margin: 0; }
.footer-links { display: flex; gap: 1.2rem; flex-wrap: wrap; justify-content: center; }
.footer-links a { color: var(--ink-soft); font-size: .92rem; }
.footer-meta { color: var(--ink-soft); font-size: .85rem; margin: 0; }

/* =========================================================================
   RADsmart section
   ========================================================================= */
.prose-wide { max-width: 820px; }

.rs-subnav {
  display: flex; flex-wrap: wrap; gap: .4rem .5rem; margin-bottom: 2rem;
  padding-bottom: 1rem; border-bottom: 1px solid var(--line);
}
.rs-subnav a {
  font-size: .9rem; font-weight: 600; color: var(--ink-soft);
  padding: .35em .9em; border-radius: 999px; box-shadow: inset 0 0 0 1.5px var(--line);
}
.rs-subnav a:hover { color: var(--accent); box-shadow: inset 0 0 0 1.5px var(--accent); text-decoration: none; }

.rs-cards { margin-top: 2rem; }
.rs-card { display: flex; flex-direction: column; transition: box-shadow .15s, transform .15s; }
.rs-card:hover { text-decoration: none; box-shadow: 0 8px 24px rgba(14,90,110,.12); transform: translateY(-2px); }
.card-cta { margin-top: auto; color: var(--accent); font-weight: 600; font-size: .92rem; padding-top: .6rem; }

.rs-disclaimer {
  margin-top: 2.5rem; font-size: .85rem; color: var(--ink-soft);
  background: var(--bg-alt); border: 1px solid var(--line); border-radius: var(--radius);
  padding: .8rem 1rem;
}

/* ---- Protocols ---- */
.rs-region-h { font-size: 1.15rem; margin: 2rem 0 .6rem; color: var(--accent-dk); }
.rs-sub { font-size: 1.05rem; margin: 1.8rem 0 .5rem; color: var(--accent-dk); }
.rs-list { list-style: none; padding: 0; margin: 0; }
.rs-list li { border-bottom: 1px solid var(--line); }
.rs-list a { display: flex; align-items: center; gap: .8rem; padding: .7rem 0; color: var(--ink); }
.rs-list a:hover { color: var(--accent); text-decoration: none; }
.rs-badge {
  display: inline-block; font-size: .72rem; font-weight: 700; letter-spacing: .04em;
  color: #fff; background: var(--accent); border-radius: 5px; padding: .15em .5em; min-width: 2.6em; text-align: center;
}
.rs-list-name { font-weight: 500; }

.rs-table { width: 100%; border-collapse: collapse; margin: .4rem 0; }
.rs-table th, .rs-table td { text-align: left; padding: .5rem .6rem; border-bottom: 1px solid var(--line); vertical-align: top; }
.rs-table th { font-size: .78rem; text-transform: uppercase; letter-spacing: .05em; color: var(--ink-soft); }
.rs-note { color: var(--ink-soft); font-size: .92rem; }
.rs-refs { padding-left: 1.2em; }
.rs-refs li { margin-bottom: .4rem; }

/* ---- Reports ---- */
.rs-report { border-top: 2px solid var(--line); padding-top: 1.5rem; margin-top: 2.5rem; }
.rs-report-h { display: flex; align-items: center; gap: .6rem; font-size: 1.3rem; }
.rs-lexicon { margin: .5rem 0 1rem; }
.rs-lexicon dt { font-weight: 600; color: var(--accent-dk); margin-top: .6rem; }
.rs-lexicon dd { margin: 0 0 .2rem; color: var(--ink); }
.rs-model-head { display: flex; align-items: center; justify-content: space-between; gap: 1rem; }
.rs-copy {
  font-size: .82rem; font-weight: 600; cursor: pointer; color: var(--accent);
  background: #fff; border: 1.5px solid var(--accent); border-radius: 999px; padding: .3em 1em;
}
.rs-copy:hover { background: var(--accent); color: #fff; }
.rs-copy.is-copied { background: #2f8f5b; border-color: #2f8f5b; color: #fff; }
.rs-model {
  white-space: pre-wrap; font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: .9rem; line-height: 1.5; background: var(--bg-alt); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 1rem 1.1rem; overflow-x: auto;
}
.rs-refs-inline { font-size: .85rem; color: var(--ink-soft); margin-top: .8rem; }

/* ---- Classes ---- */
.rs-classes { display: grid; gap: 2rem; grid-template-columns: 1fr; margin-top: 1.5rem; }
@media (min-width: 720px) { .rs-classes { grid-template-columns: 1fr 1fr; } }
.rs-embed { position: relative; padding-top: 56.25%; border-radius: var(--radius); overflow: hidden; background: #000; }
.rs-embed iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.rs-class-h { font-size: 1.1rem; margin: .8rem 0 .3rem; }
.rs-watch { font-weight: 600; font-size: .9rem; }
