/* =====================================================================
   José Júnior - Portfolio stylesheet
   Style: navy & gold, classic serif headings ("diplomatic" look)
   ---------------------------------------------------------------------
   1. Colours & tokens   2. Base   3. Navigation   4. Buttons
   5. Hero   6. Sections   7. Profile   8. Education cards
   9. Feature cards & role tiles   10. Contact   11. Footer
   12. Languages (EN/PT)   13. Animations
   ===================================================================== */

/* 1. COLOURS & TOKENS - change colours here */
:root {
  --navy:        #1B3354;   /* main brand colour */
  --navy-deep:   #10213A;   /* hero / footer */
  --gold:        #C9A04E;   /* decorative gold (lines, icons on navy) */
  --gold-strong: #8A6420;   /* gold for text on white (passes WCAG AA) */
  --gold-soft:   #F6EEDC;
  --bg:          #FFFFFF;
  --bg-tint:     #F4F6F9;   /* alternate section background */
  --text:        #1A2230;
  --text-muted:  #566173;
  --border:      #E1E6EE;
  --shadow: 0 1px 2px rgba(16, 33, 58, .06), 0 12px 30px rgba(16, 33, 58, .08);

  --font-body: "Source Sans 3", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-heading: "Libre Baskerville", Georgia, serif;

  --header-height: 66px;
  --radius: 12px;
}

/* 2. BASE */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: var(--header-height); }
body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 1.0625rem;
  line-height: 1.75;
  color: var(--text);
  background: var(--bg);
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}
h1, h2, h3 { margin: 0; line-height: 1.25; }
p { margin: 0; }
ul { margin: 0; padding: 0; list-style: none; }
a { color: var(--navy); }
:focus-visible { outline: 3px solid var(--gold); outline-offset: 3px; border-radius: 4px; }

.skip-link {
  position: absolute; left: 1rem; top: -100px; z-index: 100;
  padding: .6rem 1rem; background: var(--navy); color: #fff; border-radius: 8px;
}
.skip-link:focus { top: .75rem; }

.icon {
  width: 1.2em; height: 1.2em; flex-shrink: 0;
  fill: none; stroke: currentColor; stroke-width: 1.8;
  stroke-linecap: round; stroke-linejoin: round;
}
.icon--fill { fill: currentColor; stroke: none; }

.container { width: 100%; max-width: 1120px; margin-inline: auto; padding-inline: 1.25rem; }
.container--narrow { max-width: 780px; }
@media (min-width: 768px) { .container { padding-inline: 2rem; } }

/* 3. NAVIGATION */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(255, 255, 255, .92);
  backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
}
.nav { display: flex; align-items: center; justify-content: space-between; gap: 1rem; height: var(--header-height); }
.nav__brand {
  display: flex; align-items: center; gap: .65rem;
  color: var(--navy); text-decoration: none;
  font-family: var(--font-heading); font-weight: 700; font-size: 1.02rem;
}
.nav__logo {
  display: grid; place-items: center; width: 36px; height: 36px; border-radius: 50%;
  background: var(--navy); color: var(--gold);
  font-size: .8rem; letter-spacing: .05em;
}
.nav__actions { display: flex; align-items: center; gap: .4rem; }

.lang-toggle {
  min-width: 44px; height: 34px; padding: 0 .75rem;
  border: 1.5px solid var(--navy); border-radius: 6px;
  background: transparent; color: var(--navy);
  font: inherit; font-size: .8rem; font-weight: 700; letter-spacing: .08em; cursor: pointer;
}
.lang-toggle:hover { background: var(--navy); color: #fff; }

.nav__toggle {
  display: grid; align-content: center; justify-items: center; gap: 4px;
  width: 40px; height: 40px; padding: 0; border: 0; background: none; color: var(--navy); cursor: pointer;
}
.nav__toggle span { display: block; width: 20px; height: 2px; background: currentColor; border-radius: 2px; transition: transform .25s, opacity .25s; }
.nav__toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(6px) rotate(45deg); }
.nav__toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav__toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-6px) rotate(-45deg); }

.nav__menu {
  position: absolute; top: var(--header-height); left: 0; right: 0;
  display: none; flex-direction: column;
  padding: .5rem 1.25rem 1rem; background: #fff;
  border-bottom: 1px solid var(--border); box-shadow: var(--shadow);
}
.nav__menu.is-open { display: flex; }
.nav__menu a {
  display: block; padding: .75rem .25rem;
  color: var(--text); text-decoration: none; font-weight: 600;
  border-bottom: 1px solid var(--border);
}
.nav__menu li:last-child a { border-bottom: 0; }
.nav__menu a:hover, .nav__menu a.is-active { color: var(--gold-strong); }

@media (min-width: 980px) {
  .nav__toggle { display: none; }
  .nav__menu {
    position: static; display: flex; flex-direction: row; gap: .1rem;
    margin-left: auto; padding: 0; background: none; border: 0; box-shadow: none;
  }
  .nav__menu a { padding: .4rem .7rem; border: 0; font-size: .95rem; color: var(--text-muted); }
  .nav__menu a:hover, .nav__menu a.is-active { color: var(--navy); }
  .nav__menu a.is-active { box-shadow: inset 0 -2px 0 var(--gold); }
  .nav__actions { margin-left: .75rem; }
}

/* 4. BUTTONS */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .55rem;
  min-height: 48px; padding: .7rem 1.5rem;
  border: 1.5px solid transparent; border-radius: 6px;
  font: inherit; font-weight: 700; font-size: .98rem; text-decoration: none; cursor: pointer;
  transition: background-color .2s, color .2s, border-color .2s;
}
.btn--gold { background: var(--gold); color: var(--navy-deep); }
.btn--gold:hover { background: #fff; }
.btn--outline { border-color: rgba(255, 255, 255, .55); color: #fff; }
.btn--outline:hover { border-color: #fff; background: rgba(255, 255, 255, .08); }

/* 5. HERO - navy band with a subtle dotted "map" texture */
.hero {
  position: relative;
  padding: 5.5rem 0 6rem;
  background:
    radial-gradient(rgba(255, 255, 255, .09) 1.2px, transparent 1.2px) 0 0 / 22px 22px,
    radial-gradient(ellipse at top, #24446E, var(--navy-deep) 70%);
  color: #fff;
  text-align: center;
}
.hero__inner { display: flex; flex-direction: column; align-items: center; }
/* Round photo with a gold ring; the "JJ" monogram shows if the photo is missing */
.hero__photo {
  position: relative;
  width: 168px; height: 168px; border-radius: 50%;
  outline: 2px solid var(--gold); outline-offset: 6px;
  overflow: hidden;
}
.hero__photo img {
  position: absolute; inset: 0;
  width: 100%; height: 100%; object-fit: cover; object-position: center 20%;
}
.hero__monogram {
  display: grid; place-items: center;
  width: 100%; height: 100%;
  font-family: var(--font-heading); font-size: 2.6rem; color: var(--gold);
  letter-spacing: .06em;
}
@media (min-width: 768px) { .hero__photo { width: 190px; height: 190px; } }
.hero__name {
  margin-top: 1.75rem;
  font-family: var(--font-heading); font-weight: 400;
  font-size: clamp(2.5rem, 7vw, 4.2rem); letter-spacing: -.01em;
}
.hero__subtitle {
  margin-top: 1rem;
  font-size: clamp(1rem, 2.6vw, 1.25rem);
  color: #E4D3AE; letter-spacing: .02em;
}
.hero__buttons { display: flex; flex-wrap: wrap; justify-content: center; gap: .85rem; margin-top: 2.5rem; }

@media (min-width: 768px) { .hero { padding: 7.5rem 0 8rem; } }

/* 6. SECTIONS */
.section { padding: 5rem 0; }
.section--tint { background: var(--bg-tint); }
.section--navy { background: var(--navy); color: #fff; }
@media (min-width: 768px) { .section { padding: 6.5rem 0; } }

.section__title {
  margin-bottom: 3rem;
  text-align: center;
  font-family: var(--font-heading); font-weight: 400;
  font-size: clamp(1.7rem, 4vw, 2.3rem); color: var(--navy);
}
.section__title::after {
  content: ""; display: block;
  width: 44px; height: 2px; margin: 1rem auto 0;
  background: var(--gold);
}
.section__title--light { color: #fff; }

/* 7. PROFILE */
.profile__text {
  text-align: center;
  font-family: var(--font-heading);
  font-size: clamp(1.1rem, 2.4vw, 1.3rem);
  line-height: 1.9;
  color: var(--text);
}
.interests__label {
  margin-top: 3rem; text-align: center;
  font-size: .8rem; font-weight: 700; letter-spacing: .14em; text-transform: uppercase;
  color: var(--gold-strong);
}
.interests { display: flex; flex-wrap: wrap; justify-content: center; gap: .65rem; margin-top: 1rem; }
.interests li {
  padding: .45rem 1.05rem; border-radius: 999px;
  background: var(--gold-soft); color: var(--navy);
  font-weight: 600; font-size: .95rem;
}

/* 8. EDUCATION CARDS */
.edu-grid {
  display: grid; gap: 1.5rem;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 280px), 1fr));
}
.edu-card {
  position: relative;
  padding: 2rem 1.75rem;
  background: #fff; border: 1px solid var(--border); border-radius: var(--radius);
  box-shadow: var(--shadow);
}
.edu-card--current { border-top: 4px solid var(--gold); }
.edu-card__num {
  display: block;
  font-family: var(--font-heading); font-size: 2.2rem; line-height: 1;
  color: var(--gold);
}
.edu-card__title { margin-top: 1rem; font-size: 1.2rem; font-weight: 700; color: var(--navy); }
.edu-card__meta { margin-top: .35rem; color: var(--gold-strong); font-weight: 600; font-size: .95rem; }
.edu-card__text { margin-top: .85rem; color: var(--text-muted); }
.edu-card__text strong { color: var(--text); }
.badge {
  position: absolute; top: 1.6rem; right: 1.5rem;
  padding: .2rem .7rem; border-radius: 999px;
  background: var(--navy); color: #fff;
  font-size: .75rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase;
}

/* 9. FEATURE CARDS (Representation, Projects) & ROLE TILES (Experience) */
.feature-grid { display: grid; gap: 1.25rem; }
@media (min-width: 720px) {
  .feature-grid--two { grid-template-columns: repeat(2, 1fr); }
  .feature-grid--three { grid-template-columns: repeat(3, 1fr); }
}
.feature {
  display: flex; align-items: flex-start; gap: 1.1rem;
  padding: 1.6rem 1.5rem;
  background: #fff; border: 1px solid var(--border); border-radius: var(--radius);
}
.feature--centered { flex-direction: column; align-items: center; text-align: center; }
.feature__icon {
  display: grid; place-items: center; flex-shrink: 0;
  width: 48px; height: 48px; border-radius: 50%;
  background: var(--navy); color: var(--gold);
}
.feature__icon .icon { width: 22px; height: 22px; }
.feature p { padding-top: .6rem; }
.feature--centered p { padding-top: 0; }

.role-grid {
  display: grid; gap: 1.25rem;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 180px), 1fr));
}
.role {
  padding: 1.6rem 1.5rem;
  background: #fff; border: 1px solid var(--border); border-radius: var(--radius);
  border-left: 4px solid var(--navy);
}
.role__title { font-size: 1.12rem; font-weight: 700; color: var(--navy); }
.role__org { margin-top: .35rem; color: var(--text-muted); font-size: .96rem; }

/* 10. CONTACT */
.contact__intro { text-align: center; color: #D5DDEA; font-size: 1.1rem; }
.contact-list {
  display: grid; gap: .75rem;
  max-width: 480px; margin: 2.25rem auto 2.25rem;
}
.contact-list li {
  display: flex; align-items: center; gap: .9rem;
  padding: 1rem 1.25rem; border-radius: 10px;
  background: rgba(255, 255, 255, .07); border: 1px solid rgba(255, 255, 255, .14);
  overflow-wrap: anywhere;
}
.contact-list .icon { color: var(--gold); }
.contact-list a { color: #fff; }
#contact .btn { display: flex; width: fit-content; margin-inline: auto; }

/* Placeholders to fill in: yellow highlight */
.placeholder {
  background: #FFF1B8; color: #5A4500;
  padding: .05em .4em; border-radius: 4px; outline: 1px dashed currentColor;
}

/* SUPPORTER LOGOS (white strip above the footer) */
.logos { padding: 2.5rem 0; background: #fff; border-top: 1px solid var(--border); }
.logos__inner { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 2rem 3.5rem; }
.logos img { display: block; height: auto; }
.logos__erasmus { width: min(100%, 300px); }
.logos__inedivim { width: 96px; }

/* 11. FOOTER */
.site-footer { padding: 1.75rem 0; background: var(--navy-deep); color: #AEB9CB; font-size: .9rem; }
.site-footer__inner { display: flex; flex-wrap: wrap; justify-content: space-between; gap: .5rem 1.5rem; }

/* 12. LANGUAGES - hide the language that is not selected */
html[lang="en"] [data-lang="pt"],
html[lang="pt"] [data-lang="en"] { display: none !important; }

/* 13. ANIMATIONS */
.js .reveal { opacity: 0; transform: translateY(16px); transition: opacity .6s ease, transform .6s ease; }
.js .reveal.is-visible { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition-duration: .01ms !important; }
  .js .reveal { opacity: 1; transform: none; }
}
