/* ─────────────────────────────────────────────────────
   Leandro Bodo — Personal Site
   style.css  |  View layer: all presentation styles
   ───────────────────────────────────────────────────── */

/* ─── RESET ─── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; font-size: 16px; }
body { font-family: 'DM Sans', sans-serif; background: #f5f2eb; color: #1a1f2e; line-height: 1.6; }
a { text-decoration: none; color: inherit; }

/* ─── DESIGN TOKENS ─── */
:root {
  --green:       #1d9e75;
  --green-dark:  #0f6e56;
  --green-light: #e1f5ee;
  --green-mid:   #9fe1cb;
  --navy:        #1a1f2e;
  --navy-mid:    #2e3448;
  --cream:       #f5f2eb;
  --cream-dark:  #ede8dd;
  --warm-white:  #faf8f3;
  --muted:       #7a7f8e;
  --border:      rgba(26,31,46,0.10);
  --radius:      8px;
}

/* ─── CONTAINER ─── */
.container {
  max-width: 1120px;
  margin: 0 auto;
  width: 100%;
}
.nav-inner {
  max-width: 1120px;
  margin: 0 auto;
  width: 100%;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

/* ─── NAV ─── */
nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  display: flex; align-items: center;
  padding: 0 48px; height: 64px;
  background: rgba(245,242,235,0.92);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  transition: box-shadow 0.3s;
}
nav.scrolled { box-shadow: 0 2px 20px rgba(26,31,46,0.08); }

.nav-logo {
  font-family: 'Fraunces', serif;
  font-size: 18px; font-weight: 400; letter-spacing: -0.01em;
  color: var(--navy);
}
.nav-logo span { color: var(--green); }

.nav-links { display: flex; align-items: center; gap: 32px; list-style: none; }
.nav-links a {
  font-size: 13px; font-weight: 400; color: var(--muted);
  transition: color 0.2s; letter-spacing: 0.01em;
}
.nav-links a:hover,
.nav-links a.active-section { color: var(--navy); }

.lang-toggle {
  display: flex; background: var(--cream-dark); border-radius: 20px;
  padding: 3px; gap: 2px; border: 1px solid var(--border);
}
.lang-toggle button {
  font-family: 'DM Sans', sans-serif; font-size: 12px; font-weight: 500;
  padding: 4px 12px; border-radius: 16px; border: none; cursor: pointer;
  transition: all 0.2s; background: transparent; color: var(--muted);
  letter-spacing: 0.03em;
}
.lang-toggle button.active { background: var(--green); color: #fff; }

.nav-hamburger {
  display: none; flex-direction: column; gap: 5px; cursor: pointer;
  background: none; border: none; padding: 4px;
}
.nav-hamburger span {
  display: block; width: 22px; height: 2px;
  background: var(--navy); border-radius: 2px; transition: all 0.3s;
}

/* Mobile nav drawer */
.mobile-nav {
  display: none; position: fixed; top: 64px; left: 0; right: 0; z-index: 99;
  background: var(--warm-white); border-bottom: 1px solid var(--border);
  padding: 20px 24px 24px; flex-direction: column; gap: 16px;
  box-shadow: 0 8px 24px rgba(26,31,46,0.08);
}
.mobile-nav a { font-size: 15px; color: var(--navy); padding: 6px 0; border-bottom: 1px solid var(--border); }
.mobile-nav .lang-toggle { align-self: flex-start; margin-top: 4px; }

/* ─── SECTIONS ─── */
section { padding: 64px 48px; }

.section-label {
  font-size: 11px; letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--green); font-weight: 500; margin-bottom: 16px;
  display: flex; align-items: center; gap: 10px;
}
.section-label::before {
  content: ''; display: block; width: 28px; height: 1px; background: var(--green);
}

/* ─── HERO ─── */
#hero {
  min-height: auto; display: flex; align-items: center;
  background-color: #0e1c2e;
  background-image: url('../assets/hero-bg.svg');
  background-size: cover;
  background-position: center right;
  padding-top: 100px; padding-bottom: 80px;
  position: relative; overflow: hidden;
}
.hero-inner { position: relative; z-index: 1; max-width: 760px; }
.hero-tag {
  display: inline-flex; align-items: center; gap: 8px;
  background: rgba(29,158,117,0.20); border: 1px solid rgba(159,225,203,0.35);
  border-radius: 20px; padding: 6px 16px; margin-bottom: 32px;
}
.hero-tag::before {
  content: ''; width: 7px; height: 7px; border-radius: 50%;
  background: var(--green-mid); flex-shrink: 0;
}
.hero-tag span { font-size: 12px; font-weight: 500; color: var(--green-mid); letter-spacing: 0.04em; }
.hero-h1 {
  font-family: 'Fraunces', serif;
  font-size: clamp(44px, 6vw, 72px);
  font-weight: 300; line-height: 1.06; letter-spacing: -0.025em;
  color: #fff; margin-bottom: 24px;
}
.hero-h1 em { font-style: italic; color: var(--green-mid); font-weight: 300; }
.hero-sub {
  font-size: 17px; color: rgba(250,248,243,0.65); line-height: 1.7;
  max-width: 520px; margin-bottom: 44px; font-weight: 300;
}
.hero-ctas { display: flex; gap: 14px; align-items: center; flex-wrap: wrap; }

.btn-primary {
  padding: 14px 30px; background: var(--green); color: #fff;
  font-size: 14px; font-weight: 500; border-radius: var(--radius);
  transition: background 0.2s, transform 0.15s; cursor: pointer; border: none;
  font-family: 'DM Sans', sans-serif; letter-spacing: 0.01em;
}
.btn-primary:hover { background: var(--green-dark); transform: translateY(-1px); }
.btn-ghost {
  padding: 14px 30px; background: transparent; color: #fff;
  font-size: 14px; font-weight: 400; border-radius: var(--radius);
  border: 1.5px solid rgba(250,248,243,0.25); transition: border-color 0.2s, transform 0.15s;
  cursor: pointer; font-family: 'DM Sans', sans-serif;
}
.btn-ghost:hover { border-color: rgba(250,248,243,0.7); transform: translateY(-1px); }

.hero-stats {
  display: flex; gap: 32px; margin-top: 40px; padding-top: 28px;
  border-top: 1px solid rgba(250,248,243,0.12); flex-wrap: wrap;
}
.stat-num {
  font-family: 'Fraunces', serif; font-size: 36px; font-weight: 400;
  color: #fff; line-height: 1;
}
.stat-num sup { font-size: 18px; color: var(--green-mid); vertical-align: top; }
.stat-label { font-size: 13px; color: rgba(250,248,243,0.5); margin-top: 5px; }

/* ─── ABOUT ─── */
#about { background: var(--warm-white); }
.about-grid {
  display: grid; grid-template-columns: 1fr 1fr;
  gap: 56px; align-items: start; max-width: 1100px;
}
.about-h2 {
  font-family: 'Fraunces', serif; font-size: 36px; font-weight: 300;
  line-height: 1.15; letter-spacing: -0.02em; color: var(--navy); margin-bottom: 18px;
}
.about-h2 em { font-style: italic; color: var(--green); }
.about-body p {
  font-size: 15px; color: #4a4f5e; line-height: 1.7;
  margin-bottom: 12px; font-weight: 300;
}

.cert-grid {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin-top: 8px;
}
.cert-img {
  aspect-ratio: 1 / 1;
  background: var(--cream); border: 1px solid var(--border);
  border-radius: var(--radius); overflow: hidden;
  display: flex; align-items: center; justify-content: center;
}
.cert-img img { width: 100%; height: 100%; object-fit: cover; display: block; }

/* ─── EXPERIENCE ─── */
#experience { background: var(--cream); }
.exp-h2 {
  font-family: 'Fraunces', serif; font-size: 36px; font-weight: 300;
  letter-spacing: -0.02em; color: var(--navy); margin-bottom: 32px; max-width: 600px;
}
.exp-h2 em { font-style: italic; color: var(--green); }
.exp-timeline { position: relative; max-width: 900px; }
.exp-timeline::before {
  content: ''; position: absolute; left: 160px; top: 0; bottom: 0;
  width: 1px; background: var(--border);
}
.exp-item { display: grid; grid-template-columns: 160px 1fr; gap: 0; margin-bottom: 24px; }
.exp-item:last-child { margin-bottom: 0; }
.exp-date {
  font-size: 12px; color: var(--muted); padding-top: 4px; padding-right: 32px;
  text-align: right; font-weight: 400; letter-spacing: 0.02em; line-height: 1.4;
}
.exp-content { padding-left: 32px; position: relative; }
.exp-content::before {
  content: ''; position: absolute; left: -4px; top: 8px;
  width: 9px; height: 9px; border-radius: 50%;
  background: var(--green); border: 2px solid var(--cream);
  box-shadow: 0 0 0 1px var(--green);
}
.exp-role { font-size: 16px; font-weight: 500; color: var(--navy); margin-bottom: 2px; }
.exp-company { font-size: 13px; color: var(--green-dark); font-weight: 500; }
.exp-company a { color: var(--green-dark); text-decoration: none; border-bottom: 1px solid transparent; transition: border-color 0.2s; }
.exp-company a:hover { border-bottom-color: var(--green-dark); }

/* ─── EDUCATION ─── */
#education { background: var(--warm-white); }
.edu-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 64px; align-items: start; }
.edu-h2 {
  font-family: 'Fraunces', serif; font-size: 36px; font-weight: 300;
  letter-spacing: -0.02em; color: var(--navy); margin-bottom: 32px; max-width: 600px;
}
.edu-h2 em { font-style: italic; color: var(--green); }
.edu-col-label {
  font-size: 11px; letter-spacing: 0.12em; text-transform: uppercase;
  color: var(--green); font-weight: 500; margin-bottom: 16px;
  display: flex; align-items: center; gap: 10px;
}
.edu-col-label::before { content: ''; display: block; width: 20px; height: 1px; background: var(--green); }
.edu-item { margin-bottom: 20px; padding-bottom: 20px; border-bottom: 1px solid var(--border); }
.edu-item:last-child { border-bottom: none; margin-bottom: 0; padding-bottom: 0; }
.edu-degree { font-size: 16px; font-weight: 500; color: var(--navy); margin-bottom: 3px; }
.edu-institution { font-size: 13px; color: var(--green-dark); font-weight: 500; margin-bottom: 3px; }
.edu-year { font-size: 13px; color: var(--muted); }
.pub-item { margin-bottom: 16px; padding-bottom: 16px; border-bottom: 1px solid var(--border); }
.pub-item:last-child { border-bottom: none; margin-bottom: 0; padding-bottom: 0; }
.pub-title { font-size: 16px; font-weight: 500; color: var(--navy); line-height: 1.5; margin-bottom: 4px; }
.pub-venue { font-size: 13px; color: var(--muted); line-height: 1.5; }
.pub-year { font-size: 13px; color: var(--green-dark); font-weight: 500; margin-top: 4px; }
.pub-link {
  display: inline-flex; align-items: center; gap: 5px;
  font-size: 12px; color: var(--green); font-weight: 500;
  margin-top: 6px; transition: color 0.2s;
}
.pub-link:hover { color: var(--green-dark); }
.pub-link::after { content: '↗'; font-size: 11px; }

/* ─── CONTACT ─── */
#contact { background: var(--navy); color: var(--warm-white); }
#contact .section-label { color: var(--green-mid); }
#contact .section-label::before { background: var(--green-mid); }
.contact-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 56px; align-items: start; max-width: 1100px; }
.contact-h2 {
  font-family: 'Fraunces', serif; font-size: 40px; font-weight: 300;
  line-height: 1.1; letter-spacing: -0.02em; color: #fff; margin-bottom: 16px;
}
.contact-h2 em { font-style: italic; color: var(--green-mid); }
.contact-sub { font-size: 15px; color: rgba(250,248,243,0.55); line-height: 1.65; font-weight: 300; margin-bottom: 28px; }
.contact-email {
  font-family: 'Fraunces', serif; font-size: 22px; font-weight: 300;
  color: #fff; letter-spacing: -0.01em; display: flex; align-items: center; gap: 10px;
}
.contact-email::before { content: '→'; color: var(--green); font-family: 'DM Sans', sans-serif; }

.social-grid { display: flex; flex-direction: column; gap: 4px; }
.social-link {
  display: flex; align-items: center; justify-content: space-between;
  padding: 16px 20px; border-radius: var(--radius);
  border: 1px solid rgba(250,248,243,0.08);
  transition: background 0.2s, border-color 0.2s; cursor: pointer;
}
.social-link:hover { background: rgba(29,158,117,0.12); border-color: rgba(29,158,117,0.3); }
.social-link-left { display: flex; align-items: center; gap: 14px; }
.social-icon {
  width: 44px; height: 44px; border-radius: 10px;
  background: rgba(250,248,243,0.06);
  border: 1px dashed rgba(250,248,243,0.18);
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0; overflow: hidden;
}
.social-icon img { width: 100%; height: 100%; object-fit: cover; display: block; }
.social-name { font-size: 15px; font-weight: 400; color: #fff; }
.social-handle { font-size: 12px; color: rgba(250,248,243,0.4); margin-top: 1px; }
.social-arrow { color: rgba(250,248,243,0.2); font-size: 16px; transition: color 0.2s; }
.social-link:hover .social-arrow { color: var(--green); }

/* ─── FOOTER ─── */
footer { background: #111520; padding: 24px 48px; }
footer p { font-size: 12px; color: rgba(250,248,243,0.25); }
footer a { font-size: 12px; color: rgba(250,248,243,0.25); transition: color 0.2s; }
footer a:hover { color: var(--green); }
.back-to-top {
  font-size: 22px; line-height: 1;
  color: rgba(250,248,243,0.25) !important;
  transition: color 0.2s, transform 0.2s !important;
  display: inline-block;
}
.back-to-top:hover {
  color: var(--green) !important;
  transform: translateY(-3px);
}

/* ─── SCROLL REVEAL ─── */
.reveal { opacity: 0; transform: translateY(28px); transition: opacity 0.65s ease, transform 0.65s ease; }
.reveal.visible { opacity: 1; transform: none; }

/* ─── RESPONSIVE ─── */
@media (max-width: 900px) {
  section { padding: 48px 24px; }
  #hero { padding-top: 88px; padding-bottom: 60px; }
  nav { padding: 0 24px; }
  .nav-links { display: none; }
  .nav-hamburger { display: flex; }
  .mobile-nav.open { display: flex; }
  .about-grid, .contact-grid, .edu-grid { grid-template-columns: 1fr; gap: 40px; }
  .about-grid > div:last-child { order: -1; }
  .exp-timeline::before { left: 0; }
  .exp-item { grid-template-columns: 1fr; gap: 4px; }
  .exp-date { text-align: left; padding-right: 0; padding-left: 20px; }
  .exp-content { padding-left: 20px; }
  .exp-content::before { left: -4px; }
  .hero-bg-word { font-size: 160px; right: -20px; bottom: -30px; }
  .hero-stats { gap: 28px; }
}
@media (max-width: 540px) {
  .hero-h1 { font-size: 38px; }
  .cert-grid { grid-template-columns: repeat(4, 1fr); }
  footer .container { justify-content: center; text-align: center; }
}

/* ─── NAV ACTIVE STATE ─── */
.nav-links a.active-section { color: var(--green); font-weight: 500; }
