/* =========================================================
   Cláudio Correia — Personal site
   Modern theme (v2)
   ========================================================= */

:root {
  --bg: #0b0e14;
  --bg-alt: #10131c;
  --surface: #151926;
  --surface-hover: #1b2030;
  --border: rgba(255, 255, 255, 0.08);
  --text: #e7e9ee;
  --text-muted: #9aa3b2;
  --text-faint: #6b7385;
  --accent: #5eead4;
  --accent-2: #818cf8;
  --accent-3: #f472b6;
  --gradient: linear-gradient(120deg, var(--accent), var(--accent-2));
  --radius: 14px;
  --shadow: 0 10px 40px -10px rgba(0, 0, 0, 0.5);
  --max-width: 1100px;
  --font-body: "Inter", "Open Sans", -apple-system, BlinkMacSystemFont, sans-serif;
  --font-head: "Space Grotesk", "Raleway", sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: var(--font-body);
  background: var(--bg);
  color: var(--text);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

body.no-scroll {
  overflow: hidden;
}

a {
  color: var(--accent);
  text-decoration: none;
  transition: color 0.2s ease;
}

a:hover {
  color: var(--accent-2);
}

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-head);
  color: var(--text);
  font-weight: 600;
  margin: 0;
}

p {
  margin: 0 0 1rem;
}

ul {
  margin: 0;
  padding: 0;
}

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

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

/* Background glow */
.bg-glow {
  position: fixed;
  inset: 0;
  z-index: -1;
  background:
    radial-gradient(600px circle at 15% 10%, rgba(94, 234, 212, 0.10), transparent 60%),
    radial-gradient(500px circle at 85% 30%, rgba(129, 140, 248, 0.12), transparent 60%),
    radial-gradient(700px circle at 50% 90%, rgba(244, 114, 182, 0.06), transparent 60%),
    var(--bg);
}

/* =========================================================
   Top navigation
   ========================================================= */
#header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 999;
  padding: 14px 0;
  background: rgba(11, 14, 20, 0.55);
  backdrop-filter: blur(14px) saturate(140%);
  -webkit-backdrop-filter: blur(14px) saturate(140%);
  border-bottom: 1px solid transparent;
  transition: border-color 0.3s ease, background 0.3s ease;
}

#header.scrolled {
  border-bottom-color: var(--border);
  background: rgba(11, 14, 20, 0.82);
}

#header .header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  flex-wrap: nowrap;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
  flex-shrink: 0;
}

.brand img {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid var(--border);
}

.brand-name {
  font-family: var(--font-head);
  font-weight: 600;
  font-size: 1.05rem;
  color: var(--text);
  white-space: nowrap;
}

nav#navbar {
  display: flex;
  min-width: 0;
}

nav#navbar ul {
  display: flex;
  gap: 2px;
  list-style: none;
  flex-wrap: nowrap;
}

nav#navbar a {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px 12px;
  border-radius: 999px;
  color: var(--text-muted);
  font-size: 0.86rem;
  font-weight: 500;
  white-space: nowrap;
  transition: all 0.2s ease;
  overflow: hidden;
}

nav#navbar a:hover,
nav#navbar a.active {
  color: var(--text);
  background: var(--surface-hover);
}

nav#navbar i {
  font-size: 1rem;
  line-height: 0;
}

.header-social {
  display: flex;
  align-items: center;
  gap: 10px;
}

.header-social a {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--text-muted);
  font-size: 1rem;
}

.header-social a:hover {
  color: var(--bg);
  background: var(--gradient);
  border-color: transparent;
}

.mobile-nav-toggle {
  display: none;
  font-size: 1.6rem;
  color: var(--text);
  cursor: pointer;
  background: none;
  border: none;
  padding: 6px;
}

/* =========================================================
   Hero
   ========================================================= */
.hero {
  min-height: 92vh;
  display: flex;
  align-items: center;
  padding: 140px 0 80px;
  position: relative;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.3fr 0.9fr;
  gap: 56px;
  align-items: center;
}

.hero-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.82rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--accent);
  background: rgba(94, 234, 212, 0.08);
  border: 1px solid rgba(94, 234, 212, 0.25);
  border-radius: 999px;
  padding: 6px 14px;
  margin-bottom: 22px;
}

.hero-eyebrow .dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 3px rgba(94, 234, 212, 0.2);
}

.hero h1 {
  font-size: clamp(2.4rem, 5vw, 3.6rem);
  line-height: 1.08;
  letter-spacing: -0.02em;
  margin-bottom: 18px;
}

.hero h1 .accent {
  background: var(--gradient);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.hero-role {
  font-size: 1.15rem;
  color: var(--text-muted);
  margin-bottom: 22px;
  max-width: 560px;
}

.hero-role b {
  color: var(--text);
  font-weight: 600;
}

.hero-lede {
  color: var(--text-muted);
  max-width: 620px;
  margin-bottom: 30px;
  font-size: 1rem;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 22px;
  border-radius: 999px;
  font-weight: 600;
  font-size: 0.92rem;
  border: 1px solid var(--border);
  transition: all 0.2s ease;
  cursor: pointer;
}

.btn-primary {
  background: var(--gradient);
  color: #0b0e14;
  border: none;
}

.btn-primary:hover {
  color: #0b0e14;
  transform: translateY(-2px);
  box-shadow: 0 8px 24px -6px rgba(94, 234, 212, 0.4);
}

.btn-ghost {
  color: var(--text);
  background: var(--surface);
}

.btn-ghost:hover {
  color: var(--text);
  border-color: var(--accent);
  transform: translateY(-2px);
}

.hero-portrait {
  position: relative;
  display: flex;
  justify-content: center;
}

.hero-portrait .ring {
  position: relative;
  width: 320px;
  height: 320px;
  border-radius: 50%;
  padding: 6px;
  background: var(--gradient);
}

.hero-portrait img {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
  border: 6px solid var(--bg);
}

.hero-portrait .badge {
  position: absolute;
  bottom: 14px;
  right: -6px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 8px 16px;
  font-size: 0.82rem;
  font-weight: 600;
  box-shadow: var(--shadow);
  display: flex;
  align-items: center;
  gap: 6px;
}

.hero-portrait .badge i {
  color: var(--accent);
}

/* =========================================================
   Section shell
   ========================================================= */
.section {
  padding: 96px 0;
  border-top: 1px solid var(--border);
  scroll-margin-top: 90px;
}

.section-alt {
  background: linear-gradient(180deg, transparent, rgba(255, 255, 255, 0.015), transparent);
}

.section-title {
  margin-bottom: 48px;
  max-width: 700px;
}

.section-title .kicker {
  display: block;
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 10px;
}

.section-title h2 {
  font-size: clamp(1.7rem, 3vw, 2.2rem);
  margin-bottom: 10px;
}

.section-title p {
  color: var(--text-muted);
  margin-bottom: 0;
}

.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.reveal.in-view {
  opacity: 1;
  transform: translateY(0);
}

/* =========================================================
   About
   ========================================================= */
.about-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 32px;
}

.about-card h3 {
  font-size: 1.2rem;
  margin-bottom: 14px;
}

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

.about-card p:last-child {
  margin-bottom: 0;
}

.about-card em {
  color: var(--text-muted);
}

/* =========================================================
   Publication filters + cards
   ========================================================= */
.pub-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 32px;
}

.pub-filter {
  padding: 8px 16px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text-muted);
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
}

.pub-filter:hover {
  color: var(--text);
  border-color: var(--accent);
}

.pub-filter.active {
  color: #0b0e14;
  background: var(--gradient);
  border-color: transparent;
}

.pub-group {
  margin-bottom: 36px;
}

.pub-group:last-child {
  margin-bottom: 0;
}

.pub-group-title {
  font-size: 0.95rem;
  color: var(--text-faint);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  font-weight: 700;
  margin-bottom: 16px;
}

.pub-card {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 16px;
  align-items: start;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px 22px;
  margin-bottom: 12px;
  transition: border-color 0.2s ease, transform 0.2s ease;
}

.pub-card:hover {
  border-color: rgba(94, 234, 212, 0.35);
  transform: translateY(-2px);
}

.pub-card .pub-icon {
  width: 38px;
  height: 38px;
  border-radius: 10px;
  background: rgba(94, 234, 212, 0.08);
  color: var(--accent);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  flex-shrink: 0;
}

.pub-title {
  font-weight: 600;
  color: var(--text);
  margin-bottom: 4px;
  font-size: 0.98rem;
}

.pub-meta {
  font-size: 0.82rem;
  color: var(--accent-2);
  font-weight: 600;
  margin-bottom: 6px;
}

.pub-authors {
  font-size: 0.86rem;
  color: var(--text-muted);
}

.pub-authors u {
  color: var(--text);
  text-decoration: none;
  border-bottom: 1px dotted var(--text-faint);
}

.pub-links {
  display: flex;
  gap: 8px;
  align-items: center;
}

.pub-links a {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border-radius: 8px;
  background: var(--bg-alt);
  border: 1px solid var(--border);
  color: var(--text-muted);
  font-size: 0.95rem;
}

.pub-links a:hover {
  color: var(--accent);
  border-color: var(--accent);
}

/* =========================================================
   Experience timeline
   ========================================================= */
.timeline {
  position: relative;
}

.tl-item {
  position: relative;
  padding-left: 56px;
  padding-bottom: 44px;
  border-left: 2px solid var(--border);
  margin-left: 20px;
}

.tl-item:last-child {
  padding-bottom: 0;
}

.tl-dot {
  position: absolute;
  left: -21px;
  top: 0;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--surface);
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.tl-dot img {
  width: 24px;
  height: 24px;
  object-fit: contain;
}

.tl-dot i {
  color: var(--accent);
  font-size: 1.1rem;
}

.tl-org {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 1.15rem;
  margin-bottom: 18px;
}

.tl-role {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px 24px;
  margin-bottom: 14px;
}

.tl-role:last-child {
  margin-bottom: 0;
}

.tl-role-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 10px;
}

.tl-role-head h5 {
  font-size: 1rem;
  color: var(--text);
}

.tl-date {
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.03em;
  color: var(--accent);
  background: rgba(94, 234, 212, 0.08);
  border: 1px solid rgba(94, 234, 212, 0.2);
  padding: 4px 12px;
  border-radius: 999px;
  white-space: nowrap;
}

.tl-role ul {
  list-style: none;
  color: var(--text-muted);
  font-size: 0.92rem;
}

.tl-role ul li {
  position: relative;
  padding-left: 20px;
  margin-bottom: 10px;
}

.tl-role ul li:last-child {
  margin-bottom: 0;
}

.tl-role ul li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 9px;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent-2);
}

.tl-role ul li b {
  color: var(--text);
}

/* =========================================================
   Accomplishments
   ========================================================= */
.acc-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

.acc-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 26px;
}

.acc-card-head {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 16px;
}

.acc-card-head img {
  height: 22px;
  width: auto;
}

.acc-card-head h5 {
  font-size: 1rem;
}

.acc-card ul {
  list-style: none;
  color: var(--text-muted);
  font-size: 0.9rem;
}

.acc-card ul li {
  position: relative;
  padding-left: 18px;
  margin-bottom: 12px;
}

.acc-card ul li:last-child {
  margin-bottom: 0;
}

.acc-card ul li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 8px;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent-3);
}

/* =========================================================
   Education
   ========================================================= */
.edu-item {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 26px 28px;
  margin-bottom: 18px;
}

.edu-item:last-child {
  margin-bottom: 0;
}

.edu-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 14px;
}

.edu-head h5 {
  font-size: 1.05rem;
}

.edu-item ul {
  list-style: none;
  color: var(--text-muted);
  font-size: 0.92rem;
}

.edu-item ul li {
  position: relative;
  padding-left: 20px;
  margin-bottom: 10px;
}

.edu-item ul li:last-child {
  margin-bottom: 0;
}

.edu-item ul li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 9px;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent);
}

.edu-item ul li b {
  color: var(--text);
}

/* =========================================================
   Contact
   ========================================================= */
.contact-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
  max-width: 700px;
}

.contact-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 26px;
  display: flex;
  align-items: flex-start;
  gap: 16px;
}

.contact-card i {
  font-size: 1.4rem;
  color: var(--accent);
  background: rgba(94, 234, 212, 0.08);
  width: 46px;
  height: 46px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.contact-card h4 {
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--text-faint);
  margin-bottom: 6px;
}

.contact-card p {
  color: var(--text);
  margin-bottom: 0;
  font-size: 0.98rem;
  word-break: break-word;
}

/* =========================================================
   Footer
   ========================================================= */
footer#footer {
  border-top: 1px solid var(--border);
  padding: 28px 0;
  text-align: center;
  color: var(--text-faint);
  font-size: 0.82rem;
}

/* =========================================================
   Back to top
   ========================================================= */
.back-to-top {
  position: fixed;
  right: 24px;
  bottom: 24px;
  width: 46px;
  height: 46px;
  border-radius: 50%;
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--text);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.3rem;
  z-index: 900;
  opacity: 0;
  visibility: hidden;
  transform: translateY(10px);
  transition: all 0.3s ease;
}

.back-to-top.active {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.back-to-top:hover {
  background: var(--gradient);
  color: #0b0e14;
  border-color: transparent;
}

/* =========================================================
   Responsive
   ========================================================= */
@media (max-width: 992px) {
  .hero-grid {
    grid-template-columns: 1fr;
    text-align: center;
  }

  .hero-role, .hero-lede {
    margin-left: auto;
    margin-right: auto;
  }

  .hero-actions {
    justify-content: center;
  }

  .hero-portrait {
    order: -1;
  }

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

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

@media (max-width: 1320px) and (min-width: 861px) {
  nav#navbar a span {
    display: none;
  }

  nav#navbar a {
    padding: 10px;
  }

  nav#navbar i {
    font-size: 1.15rem;
  }

  .brand-name {
    display: none;
  }
}

@media (max-width: 860px) {
  .mobile-nav-toggle {
    display: block;
  }

  nav#navbar {
    position: fixed;
    top: 0;
    right: -300px;
    height: 100vh;
    width: 280px;
    background: var(--bg-alt);
    border-left: 1px solid var(--border);
    flex-direction: column;
    padding: 90px 20px 20px;
    transition: right 0.35s ease;
    z-index: 998;
    overflow: visible;
  }

  nav#navbar.open {
    right: 0;
  }

  nav#navbar ul {
    flex-direction: column;
    width: 100%;
  }

  nav#navbar a {
    width: 100%;
    padding: 12px 14px;
  }

  nav#navbar a span {
    display: inline;
  }

  .header-social {
    display: none;
  }
}

@media (max-width: 640px) {
  .hero {
    padding-top: 120px;
  }

  .hero-portrait .ring {
    width: 220px;
    height: 220px;
  }

  .pub-card {
    grid-template-columns: auto 1fr;
  }

  .pub-links {
    grid-column: 1 / -1;
  }

  .section {
    padding: 64px 0;
    scroll-margin-top: 76px;
  }
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  .reveal {
    opacity: 1;
    transform: none;
    transition: none;
  }
}
