/* ============================================================
   pedromassena.com — stylesheet
   Stack: static HTML/CSS, no frameworks
   Fonts: Cormorant Garamond (display) + DM Sans (body)
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Cormorant+Garamond:ital,wght@0,300;0,400;0,500;0,600;1,300;1,400&family=DM+Sans:ital,opsz,wght@0,9..40,300;0,9..40,400;0,9..40,500;1,9..40,300&display=swap');

/* ── Variables ─────────────────────────────────────────── */
:root {
  --bg:        #FAFAF8;
  --bg-alt:    #F3F3F0;
  --text:      #1A1A1A;
  --text-mute: #6B6B6B;
  --accent:    #1A3A5C;
  --accent-lt: #2D5F96;
  --rule:      #DDDDD8;
  --serif:     'Cormorant Garamond', Georgia, serif;
  --sans:      'DM Sans', system-ui, sans-serif;
  --max:       760px;
  --max-wide:  900px;
  --nav-h:     64px;
}

/* ── Reset ─────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html {
  font-size: 17px;
  -webkit-font-smoothing: antialiased;
  scroll-behavior: smooth;
}

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--sans);
  font-weight: 300;
  line-height: 1.75;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }

/* ── Navigation ────────────────────────────────────────── */
nav {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(250, 250, 248, 0.94);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--rule);
  height: var(--nav-h);
  display: flex;
  align-items: center;
}

.nav-inner {
  width: 100%;
  max-width: var(--max-wide);
  margin: 0 auto;
  padding: 0 2rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.nav-brand {
  font-family: var(--serif);
  font-weight: 500;
  font-size: 1.1rem;
  letter-spacing: 0.01em;
  color: var(--text);
  transition: color 0.2s;
}
.nav-brand:hover { color: var(--accent); }

.nav-links {
  display: flex;
  gap: 2rem;
  list-style: none;
}

.nav-links a {
  font-family: var(--sans);
  font-size: 0.78rem;
  font-weight: 400;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-mute);
  transition: color 0.2s;
  padding-bottom: 2px;
  border-bottom: 1px solid transparent;
}

.nav-links a:hover,
.nav-links a.active {
  color: var(--accent);
  border-bottom-color: var(--accent);
}

/* Mobile nav toggle */
.nav-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
  flex-direction: column;
  gap: 5px;
}
.nav-toggle span {
  display: block;
  width: 22px;
  height: 1.5px;
  background: var(--text);
  transition: all 0.25s;
}

/* ── Page wrapper ──────────────────────────────────────── */
main {
  flex: 1;
  width: 100%;
  max-width: var(--max);
  margin: 0 auto;
  padding: 5rem 2rem 7rem;
}

main.wide {
  max-width: var(--max-wide);
}

/* ── Typography ────────────────────────────────────────── */
h1 {
  font-family: var(--serif);
  font-size: clamp(2.6rem, 6vw, 4rem);
  font-weight: 400;
  line-height: 1.1;
  letter-spacing: -0.01em;
  color: var(--text);
}

h2 {
  font-family: var(--serif);
  font-size: clamp(1.5rem, 3vw, 2rem);
  font-weight: 400;
  line-height: 1.25;
  color: var(--text);
  margin-bottom: 0.5rem;
}

h3 {
  font-family: var(--sans);
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 1.5rem;
}

p {
  margin-bottom: 1.25rem;
  color: var(--text);
  font-size: 1rem;
}

p:last-child { margin-bottom: 0; }

/* ── Divider ───────────────────────────────────────────── */
.rule {
  border: none;
  border-top: 1px solid var(--rule);
  margin: 3.5rem 0;
}

/* ── HOME ──────────────────────────────────────────────── */
.home-hero {
  padding-top: 3rem;
}

.home-hero h1 {
  margin-bottom: 0.5rem;
}

.home-subtitle {
  font-family: var(--sans);
  font-size: 0.78rem;
  font-weight: 400;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-mute);
  margin-bottom: 3rem;
}

.home-intro {
  font-size: 1.08rem;
  line-height: 1.85;
  color: var(--text);
  margin-bottom: 1.5rem;
  max-width: 640px;
}

.home-pt {
  font-family: var(--serif);
  font-style: italic;
  font-size: 0.95rem;
  color: var(--text-mute);
  border-left: 2px solid var(--rule);
  padding-left: 1rem;
  margin-top: 2.5rem;
  margin-bottom: 3.5rem;
  max-width: 520px;
}

.quick-links {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.quick-link {
  display: inline-block;
  font-size: 0.78rem;
  font-weight: 400;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--accent);
  border: 1px solid var(--accent);
  padding: 0.55rem 1.1rem;
  transition: background 0.2s, color 0.2s;
}

.quick-link:hover {
  background: var(--accent);
  color: #fff;
}

/* ── WORK ──────────────────────────────────────────────── */
.work-section {
  margin-bottom: 4rem;
}

.work-section:last-child { margin-bottom: 0; }

.work-list {
  list-style: none;
  border-top: 1px solid var(--rule);
}

.work-item {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: start;
  gap: 1rem;
  padding: 1.25rem 0;
  border-bottom: 1px solid var(--rule);
  transition: background 0.15s;
}

.work-item-meta {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
}

.work-title {
  font-family: var(--serif);
  font-size: 1.08rem;
  font-weight: 400;
  color: var(--text);
  line-height: 1.35;
}

.work-source {
  font-size: 0.78rem;
  color: var(--text-mute);
  letter-spacing: 0.03em;
}

.work-action {
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  white-space: nowrap;
  margin-top: 0.1rem;
}

.work-action.download {
  color: var(--accent);
  border-bottom: 1px solid var(--accent);
  transition: opacity 0.2s;
}
.work-action.download:hover { opacity: 0.6; }

.work-action.request {
  color: var(--text-mute);
}

.work-action.doi {
  color: var(--accent);
  border-bottom: 1px solid currentColor;
  transition: opacity 0.2s;
}
.work-action.doi:hover { opacity: 0.6; }

.work-action.conf {
  color: var(--text-mute);
  font-style: italic;
  text-transform: none;
  letter-spacing: 0;
  font-size: 0.78rem;
}

.request-note {
  margin-top: 2.5rem;
  font-size: 0.85rem;
  color: var(--text-mute);
  border-left: 2px solid var(--rule);
  padding-left: 1rem;
  font-style: italic;
}

.request-note a {
  color: var(--accent);
  border-bottom: 1px solid var(--accent);
}

/* ── RESEARCH ──────────────────────────────────────────── */
.research-rq {
  background: var(--bg-alt);
  border-left: 3px solid var(--accent);
  padding: 2rem 2rem 2rem 2rem;
  margin: 2.5rem 0 3.5rem;
}

.research-rq p {
  font-family: var(--serif);
  font-size: 1.2rem;
  font-weight: 400;
  line-height: 1.65;
  color: var(--text);
  margin-bottom: 0;
}

.research-rq p + p {
  margin-top: 1.25rem;
  font-style: italic;
  color: var(--text-mute);
  font-size: 1.05rem;
}

.research-block {
  margin-bottom: 3rem;
}

.research-block p {
  font-size: 0.97rem;
  line-height: 1.8;
}

.emp-item {
  margin-bottom: 2.5rem;
  padding-bottom: 2.5rem;
  border-bottom: 1px solid var(--rule);
}

.emp-item:last-child {
  border-bottom: none;
  margin-bottom: 0;
  padding-bottom: 0;
}

.emp-title {
  font-family: var(--serif);
  font-size: 1.1rem;
  font-weight: 400;
  color: var(--text);
  margin-bottom: 0.3rem;
  line-height: 1.35;
}

.emp-venue {
  font-size: 0.78rem;
  color: var(--text-mute);
  letter-spacing: 0.03em;
  margin-bottom: 0.75rem;
}

.emp-desc {
  font-size: 0.93rem;
  line-height: 1.75;
  color: var(--text);
}

.featured-box {
  background: var(--bg-alt);
  border: 1px solid var(--rule);
  padding: 2rem;
  margin: 3rem 0 1.5rem;
}

.featured-tag {
  font-size: 0.68rem;
  font-weight: 500;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 0.75rem;
}

.featured-box h4 {
  font-family: var(--serif);
  font-size: 1.2rem;
  font-weight: 400;
  color: var(--text);
  line-height: 1.35;
  margin-bottom: 0.3rem;
}

.featured-venue {
  font-size: 0.78rem;
  color: var(--text-mute);
  margin-bottom: 1rem;
}

.featured-box p {
  font-size: 0.93rem;
  line-height: 1.78;
}

/* ── CV ────────────────────────────────────────────────── */
.cv-intro {
  font-size: 1.05rem;
  line-height: 1.8;
  margin-bottom: 2.5rem;
}

.btn-download {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: var(--accent);
  color: #fff;
  font-size: 0.8rem;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 0.85rem 1.8rem;
  transition: background 0.2s;
}

.btn-download:hover { background: var(--accent-lt); }

.btn-download svg {
  width: 14px;
  height: 14px;
  flex-shrink: 0;
}

.cv-note {
  margin-top: 1.5rem;
  font-size: 0.85rem;
  color: var(--text-mute);
  font-style: italic;
}

/* ── CONTACT ───────────────────────────────────────────── */
.contact-intro {
  font-size: 1.05rem;
  margin-bottom: 3rem;
  max-width: 500px;
}

.contact-list {
  list-style: none;
  border-top: 1px solid var(--rule);
}

.contact-item {
  display: grid;
  grid-template-columns: 80px 1fr;
  align-items: center;
  padding: 1.1rem 0;
  border-bottom: 1px solid var(--rule);
  gap: 1.5rem;
}

.contact-label {
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-mute);
}

.contact-val {
  font-size: 0.97rem;
}

.contact-val a {
  color: var(--accent);
  border-bottom: 1px solid transparent;
  transition: border-color 0.2s;
}
.contact-val a:hover { border-bottom-color: var(--accent); }

/* ── Footer ────────────────────────────────────────────── */
footer {
  border-top: 1px solid var(--rule);
  padding: 1.5rem 2rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
}

.footer-inner {
  width: 100%;
  max-width: var(--max-wide);
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
}

footer p {
  font-size: 0.75rem;
  color: var(--text-mute);
  margin: 0;
}

footer a {
  color: var(--text-mute);
  border-bottom: 1px solid var(--rule);
  transition: color 0.2s;
}
footer a:hover { color: var(--accent); }

/* ── Utilities ─────────────────────────────────────────── */
.eyebrow {
  font-family: var(--sans);
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 1.2rem;
  display: block;
}

.tag-concepts {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 1.25rem;
}

.tag {
  font-size: 0.72rem;
  font-weight: 400;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-mute);
  border: 1px solid var(--rule);
  padding: 0.25rem 0.6rem;
}

/* ── Responsive ────────────────────────────────────────── */
@media (max-width: 640px) {
  :root { --nav-h: 56px; }

  .nav-links {
    display: none;
    position: absolute;
    top: var(--nav-h);
    left: 0;
    right: 0;
    background: var(--bg);
    flex-direction: column;
    gap: 0;
    border-bottom: 1px solid var(--rule);
    padding: 0.5rem 0 1rem;
  }

  .nav-links.open { display: flex; }

  .nav-links a {
    display: block;
    padding: 0.75rem 2rem;
    border-bottom: none;
    font-size: 0.82rem;
  }

  .nav-toggle { display: flex; }

  main { padding: 3rem 1.25rem 5rem; }

  .work-item {
    grid-template-columns: 1fr;
    gap: 0.5rem;
  }

  .contact-item {
    grid-template-columns: 1fr;
    gap: 0.25rem;
  }

  .quick-links { flex-direction: column; align-items: flex-start; }

  .research-rq { padding: 1.5rem; }

  footer { padding: 1.25rem; }

  .footer-inner { flex-direction: column; align-items: flex-start; gap: 0.4rem; }
}

/* ── Fade-in on load ───────────────────────────────────── */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(16px); }
  to   { opacity: 1; transform: translateY(0); }
}

.fade-up {
  animation: fadeUp 0.55s cubic-bezier(0.22, 1, 0.36, 1) both;
}

.fade-up-1 { animation-delay: 0.05s; }
.fade-up-2 { animation-delay: 0.13s; }
.fade-up-3 { animation-delay: 0.21s; }
.fade-up-4 { animation-delay: 0.30s; }
.fade-up-5 { animation-delay: 0.40s; }
