/* ============ NAV ============ */
.nav {
  position: sticky;
  top: 0;
  z-index: 50;
  backdrop-filter: blur(16px) saturate(160%);
  -webkit-backdrop-filter: blur(16px) saturate(160%);
  background: rgba(255,255,255,.92);
  border-bottom: 1px solid var(--line);
  box-shadow: 0 1px 0 rgba(15,31,61,.04);
}
.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  height: 68px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  font-weight: 600;
  letter-spacing: -0.01em;
}
.brand-mark {
  width: 36px; height: 36px;
  border-radius: 8px;
  background: var(--c4);
  color: var(--c1);
  display: grid; place-items: center;
  font-family: var(--font-serif);
  font-size: 15px;
  letter-spacing: -0.02em;
}
.brand-name { font-size: 15px; color: var(--ink); }

.nav-links {
  display: flex;
  gap: 28px;
  font-size: 14px;
  color: var(--muted);
}
.nav-links a {
  position: relative;
  padding: 6px 2px;
  transition: color 180ms ease;
  font-weight: 500;
}
.nav-links a:hover { color: var(--primary); }
.nav-links a::after {
  content: "";
  position: absolute; left: 0; right: 0; bottom: -2px;
  height: 2px;
  background: var(--accent);
  border-radius: 2px;
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 220ms ease;
}
.nav-links a:hover::after { transform: scaleX(1); }

.nav-cta-wrap { display: flex; gap: 12px; align-items: center; }
.nav-toggle { display: none; font-weight: 600; font-size: 14px; color: var(--ink); padding: 8px 14px; border: 1.5px solid var(--line-2); border-radius: 8px; }

@media (max-width: 880px) {
  .nav-links { display: none; }
  .nav-toggle { display: block; }
}

/* ============ HERO ============ */
.hero {
  padding-block: clamp(72px, 9vw, 128px) clamp(48px, 6vw, 88px);
  background: linear-gradient(160deg, #F8FAFF 0%, #FFFFFF 60%);
  border-bottom: 1px solid var(--line);
  overflow: clip;
  position: relative;
}

/* Decorative background grid */
.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(var(--line) 1px, transparent 1px),
    linear-gradient(90deg, var(--line) 1px, transparent 1px);
  background-size: 64px 64px;
  opacity: 0.4;
  pointer-events: none;
}

.hero-inner {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: clamp(40px, 6vw, 96px);
  align-items: center;
  position: relative;
  z-index: 1;
}
@media (max-width: 1000px) {
  .hero-inner { grid-template-columns: 1fr; }
}

.hero-text { position: relative; }

.h-name {
  margin: 0 0 12px;
}

.hero-title {
  font-family: var(--font-mono);
  font-size: 13px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--primary);
  font-weight: 500;
  margin: 0 0 20px;
  display: flex;
  align-items: center;
  gap: 10px;
}
.hero-title::before {
  content: "";
  width: 32px; height: 2px;
  background: var(--accent);
  border-radius: 2px;
  flex-shrink: 0;
}

.hero-lede {
  max-width: 52ch;
  margin-bottom: 0;
}
.hero-meta {
  margin: 16px 0 0;
  font-size: 13.5px;
  color: var(--muted);
  font-family: var(--font-mono);
  letter-spacing: 0.04em;
}

.hero-ctas {
  display: flex; gap: 14px;
  margin-top: 32px;
  flex-wrap: wrap;
}

/* Stats row under CTA */
.hero-stats {
  display: flex;
  gap: 32px;
  margin-top: 44px;
  padding-top: 32px;
  border-top: 1px solid var(--line);
  flex-wrap: wrap;
}
.hero-stat .num {
  font-family: var(--font-serif);
  font-size: 36px;
  line-height: 1;
  color: var(--ink);
  letter-spacing: -0.02em;
  display: block;
}
.hero-stat .num em {
  font-style: normal;
  color: var(--accent);
  font-size: 0.65em;
}
.hero-stat .label {
  font-size: 12.5px;
  color: var(--muted);
  display: block;
  margin-top: 6px;
  line-height: 1.35;
}

/* Hero visual */
.hero-visual {
  position: relative;
}

.hero-photo {
  aspect-ratio: 4/5;
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: var(--bg-soft);
  border: 1px solid var(--line);
  box-shadow: var(--shadow-3);
  position: relative;
}
.hero-photo img {
  width: 100%; height: 100%;
  object-fit: cover;
  object-position: top center;
}
.portrait-fallback {
  width: 100%; height: 100%;
  display: grid; place-items: center;
  font-family: var(--font-serif);
  font-size: 64px;
  color: var(--muted);
  background: linear-gradient(135deg, #EBF0FA 0%, #D8E3F5 100%);
}

/* Floating badge on photo */
.hero-badge {
  position: absolute;
  bottom: 20px; left: 20px; right: 20px;
  background: rgba(255,255,255,.95);
  backdrop-filter: blur(12px);
  border: 1px solid rgba(255,255,255,.8);
  border-radius: var(--radius);
  padding: 14px 18px;
  box-shadow: var(--shadow-2);
  display: flex;
  align-items: center;
  gap: 14px;
}
.hero-badge-icon {
  width: 40px; height: 40px;
  border-radius: 50%;
  background: var(--c4);
  display: grid; place-items: center;
  color: var(--accent);
  flex-shrink: 0;
  font-size: 18px;
}
.hero-badge-text { font-size: 13px; color: var(--ink); line-height: 1.4; }
.hero-badge-text b { display: block; font-weight: 600; font-size: 14px; }

/* Credential pill */
.hero-credential {
  position: absolute;
  top: 18px; right: 18px;
  background: var(--c4);
  color: rgba(255,255,255,.9);
  font-family: var(--font-mono);
  font-size: 10.5px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  padding: 7px 14px;
  border-radius: 999px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.hero-credential .pulse {
  width: 6px; height: 6px;
  border-radius: 50%;
  background: #22C55E;
  box-shadow: 0 0 0 4px rgba(34,197,94,.25);
  animation: pulse 2.4s ease-in-out infinite;
}
@keyframes pulse {
  0%,100% { opacity: 1; }
  50% { opacity: .3; }
}

/* ============ SECTION HEAD ============ */
.section-head {
  margin-bottom: clamp(40px, 5vw, 64px);
  max-width: 56ch;
}
.section-head .lede {
  margin-top: 14px;
}

/* ============ EXPERIENCE / PROCESS ============ */
.process {
  display: grid;
  gap: 0;
  border-top: 1px solid var(--line);
}
.proc-step {
  display: grid;
  grid-template-columns: 1fr;
  padding: 32px 0;
  border-bottom: 1px solid var(--line);
  position: relative;
  transition: background 200ms ease;
}
.proc-step:hover {
  background: var(--bg-soft);
  margin-inline: -24px;
  padding-inline: 24px;
  border-radius: var(--radius);
}
.proc-body {}
.proc-meta {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--accent);
  margin: 0 0 10px;
}
.proc-step h3 {
  font-size: clamp(18px, 1.6vw, 22px);
  font-weight: 600;
  margin: 0 0 10px;
  color: var(--ink);
  letter-spacing: -0.005em;
}
.proc-desc {
  color: var(--ink-2);
  font-size: 15px;
  line-height: 1.65;
  margin: 0;
  max-width: 72ch;
}

/* Badge for special achievement */
.proc-step .achievement {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: 14px;
  padding: 8px 14px;
  background: rgba(232,160,32,.1);
  border: 1px solid rgba(232,160,32,.3);
  border-radius: 999px;
  font-size: 12.5px;
  font-weight: 600;
  color: var(--accent-hover);
}

/* ============ BAND (alternating bg) ============ */
.band {
  background: var(--bg-soft);
  border-block: 1px solid var(--line);
}

/* ============ PROJECTS ============ */
.project-list {
  display: grid;
  gap: 0;
  border-top: 1px solid var(--line);
}
.project-row {
  padding: 32px 0;
  border-bottom: 1px solid var(--line);
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 24px;
  align-items: start;
  transition: background 200ms ease;
}
.project-row:hover {
  background: rgba(45,95,166,.03);
  margin-inline: -24px;
  padding-inline: 24px;
  border-radius: var(--radius);
}
.project-row h3 {
  font-size: clamp(18px, 1.6vw, 22px);
  font-weight: 600;
  margin: 0 0 10px;
  color: var(--ink);
  letter-spacing: -0.005em;
}
.project-row p {
  color: var(--ink-2);
  font-size: 15px;
  margin: 0;
  line-height: 1.65;
  max-width: 68ch;
}
.project-row .note {
  font-size: 13px;
  color: var(--muted);
  margin-top: 10px;
}

/* ============ STUDIES ============ */
.studies {
  display: grid;
  gap: 0;
  border-top: 1px solid var(--line);
  margin-bottom: 48px;
}
.study {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 24px;
  padding: 28px 0;
  border-bottom: 1px solid var(--line);
}
.study h3 {
  font-size: 16px;
  font-weight: 600;
  margin: 0 0 6px;
  color: var(--ink);
}
.study p {
  font-size: 14px;
  color: var(--muted);
  margin: 0;
}
.status {
  flex-shrink: 0;
  font-size: 12px;
  font-family: var(--font-mono);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 5px 12px;
  border-radius: 999px;
  background: rgba(34,197,94,.1);
  color: #16A34A;
  font-weight: 600;
  white-space: nowrap;
}
/* "Concluído" items */
.studies article:nth-last-child(-n+2) .status {
  background: rgba(45,95,166,.08);
  color: var(--primary);
}

/* ============ QUALIFICATIONS ============ */
.qualifications {
  margin-top: 0;
  padding: 32px;
  background: var(--bg-soft);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  margin-bottom: 32px;
}
.qualifications-title {
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
  margin: 0 0 20px;
  font-family: var(--font-mono);
}
.qual-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 12px;
}
.qual-list li {
  font-size: 14.5px;
  color: var(--ink-2);
  padding-left: 20px;
  position: relative;
  line-height: 1.5;
}
.qual-list li::before {
  content: "";
  position: absolute;
  left: 0; top: 8px;
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--accent);
}

/* ============ SKILLS ============ */
.skills-block {
  padding: 32px;
  background: var(--bg-soft);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
}
.skill-tags {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}
.skill-tags li {
  display: inline-flex;
  align-items: center;
  padding: 8px 16px;
  border-radius: 999px;
  background: var(--bg);
  border: 1.5px solid var(--line-2);
  font-size: 13.5px;
  font-weight: 500;
  color: var(--ink-2);
  transition: all 200ms ease;
}
.skill-tags li:hover {
  border-color: var(--primary);
  color: var(--primary);
  background: rgba(45,95,166,.05);
}

/* ============ PUBLICATION ============ */
.pub-layout {
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: clamp(32px, 5vw, 64px);
  align-items: start;
}
@media (max-width: 760px) {
  .pub-layout { grid-template-columns: 1fr; }
}
.book-slot {
  aspect-ratio: 3/4;
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--bg-soft);
  border: 1px solid var(--line);
  box-shadow: var(--shadow-2);
}
.pub-meta p {
  margin: 0 0 14px;
  font-size: 15px;
  color: var(--ink-2);
  line-height: 1.6;
}
.pub-meta p:last-child { margin-bottom: 0; }
.pub-links {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
}
.pub-links a {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 14px;
  font-weight: 600;
  color: var(--primary);
  border-bottom: 1.5px solid rgba(45,95,166,.3);
  padding-bottom: 2px;
  transition: border-color 180ms ease, color 180ms ease;
}
.pub-links a:hover {
  color: var(--accent-hover);
  border-color: var(--accent);
}

/* ============ CONTACT ============ */
.contact-block {
  max-width: 720px;
}
.contact-row {
  margin-top: 40px;
}
.channels {
  list-style: none;
  padding: 0;
  margin: 0 0 32px;
  display: grid;
  gap: 14px;
}
.channels li a,
.channels li span {
  display: flex;
  align-items: center;
  gap: 14px;
  font-size: 16px;
  color: var(--ink-2);
  transition: color 180ms ease;
}
.channels li a:hover { color: var(--primary); }
.channels li .ch-icon {
  width: 44px; height: 44px;
  border-radius: 10px;
  background: var(--bg-soft);
  border: 1px solid var(--line);
  display: grid; place-items: center;
  font-size: 20px;
  flex-shrink: 0;
  transition: background 180ms ease, border-color 180ms ease;
}
.channels li a:hover .ch-icon {
  background: rgba(45,95,166,.08);
  border-color: var(--primary);
}
.contact-pending {
  font-size: 14px;
  color: var(--muted);
}
.ctas {
  margin-top: 16px;
}

/* ============ FOOTER ============ */
.footer {
  padding-block: 32px;
  border-top: 1px solid var(--line);
  background: var(--bg);
}
.footer-simple {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 13.5px;
  color: var(--muted);
}
@media (max-width: 600px) {
  .footer-simple { flex-direction: column; gap: 8px; text-align: center; }
}

/* ============ MEDIA slots ============ */
.media {
  margin-top: 20px;
  border-radius: var(--radius);
  overflow: hidden;
}
.media img {
  width: 100%;
  border-radius: var(--radius);
  box-shadow: var(--shadow-2);
}

/* Lightbox */
#lightbox {
  border: none;
  border-radius: var(--radius-lg);
  padding: 0;
  max-width: min(90vw, 900px);
  background: var(--c4);
  box-shadow: var(--shadow-3);
}
#lightbox form {
  display: flex;
  justify-content: flex-end;
  padding: 12px 16px 0;
}
#lightbox button {
  color: rgba(255,255,255,.7);
  font-size: 14px;
  padding: 6px 12px;
  border-radius: 6px;
  transition: color 180ms ease;
}
#lightbox button:hover { color: #fff; }
#lightbox p { margin: 0; padding: 8px 16px 16px; }
#lightbox img { border-radius: var(--radius); }
#lightbox::backdrop { background: rgba(0,0,0,.7); backdrop-filter: blur(4px); }
