/* ══════════════════════════════════════════
   ANDREIA VALENTE — Personal Website Styles
   ══════════════════════════════════════════ */

/* ── PALETTE ── */
:root {
  --charcoal: #252323;
  --yellow: #F9CB40;
  --yellow-soft: rgba(249,203,64,0.12);
  --gray: #898980;
  --blue: #5BC3EB;
  --blue-on-white: #1B8AB8;
  --blue-bg: rgba(91,195,235,0.08);
  --orange: #FF5714;
  --orange-soft: rgba(255,87,20,0.08);
  --white: #FFFFFF;
  --off-white: #FAFAF8;
  --warm-bg: #F0EDE8;
  --light-gray: #EAEAE6;
  --border: #DDDDD8;
  --text-primary: #252323;
  --text-secondary: #4A4A45;
  --text-muted: #7A7A72;
  --font-body: 'Poppins', sans-serif;
  --font-mono: 'JetBrains Mono', monospace;
  --radius: 12px;
  --radius-sm: 8px;
  --radius-xs: 5px;
  --transition: 0.2s ease;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: var(--font-body); background: var(--white);
  color: var(--text-primary); line-height: 1.7; font-size: 15px;
  overflow-x: hidden;
}

/* ── NAV ── */
nav {
  position: sticky; top: 0; z-index: 100;
  background: rgba(255,255,255,0.95); backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border); padding: 0 2rem;
}
.nav-inner {
  max-width: 1200px; margin: 0 auto;
  display: flex; align-items: center; justify-content: space-between;
  height: 50px;
}
.nav-name { font-weight: 700; font-size: 1rem; color: var(--charcoal); text-decoration: none; }
.nav-name span { color: var(--text-primary); }
.nav-links { display: flex; gap: 0.1rem; }
.nav-links a {
  font-size: 0.8rem; font-weight: 500; color: var(--text-secondary);
  text-decoration: none; padding: 0.3rem 0.6rem; border-radius: var(--radius-xs);
  transition: var(--transition);
}
.nav-links a:hover { color: var(--orange); background: var(--orange-soft); }

/* ── FULL-WIDTH BANDS ── */
.band { width: 100%; padding: 3rem 2rem; }
.band-white { background: var(--white); }
.band-off { background: var(--off-white); }
.band-warm { background: var(--warm-bg); }
.band-inner { max-width: 1200px; margin: 0 auto; }

/* ── HERO GRID: CARD + ABOUT + CV ── */
.hero-grid {
  display: grid; grid-template-columns: 300px 1fr 340px; gap: 2rem;
  align-items: stretch;
}
@media (max-width: 1060px) {
  .hero-grid { grid-template-columns: 300px 1fr; }
  .hero-grid .cv-col { grid-column: 1 / -1; }
}
@media (max-width: 700px) {
  .hero-grid { grid-template-columns: 1fr; gap: 1.5rem; }
}

/* ── CONTACT CARD ── */
.card {
  background: var(--white); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 1.75rem;
  position: relative; overflow: hidden;
}
.card::before {
  content: ''; position: absolute; top: 0; left: 0; right: 0; height: 3px;
  background: var(--orange);
}
.card-photo {
  width: 110px; height: 110px; border-radius: 50%; margin: 0 auto 1rem;
  background: var(--charcoal);
  display: flex; align-items: center; justify-content: center;
  font-size: 2rem; color: var(--yellow); font-weight: 700;
  overflow: hidden;
}
.card-photo img { width: 100%; height: 100%; object-fit: cover; }
.card h1 { font-size: 1.4rem; font-weight: 700; text-align: center; line-height: 1.2; margin-bottom: 0.1rem; }
.card .title-line { font-size: 0.85rem; color: var(--blue-on-white); font-weight: 600; text-align: center; margin-bottom: 0.75rem; }

/* Profile icon links */
.profile-links { display: flex; flex-wrap: wrap; gap: 0.4rem; justify-content: center; margin-bottom: 1.3rem; margin-top: 1rem; }
.profile-links a {
  display: inline-flex; align-items: center; justify-content: center;
  width: 32px; height: 32px; border-radius: 50%; border: 1px solid var(--border);
  background: var(--off-white); transition: var(--transition); position: relative;
}
.profile-links a:hover { border-color: var(--orange); background: var(--orange-soft); transform: translateY(-1px); }
.profile-links a svg { width: 15px; height: 15px; fill: var(--text-secondary); }
.profile-links a:hover svg { fill: var(--orange); }
.profile-links a::after {
  content: attr(aria-label); position: absolute; bottom: calc(100% + 5px);
  left: 50%; transform: translateX(-50%); font-size: 0.65rem; font-weight: 500;
  color: #fff; background: var(--charcoal); padding: 0.15rem 0.4rem;
  border-radius: 3px; white-space: nowrap; opacity: 0; pointer-events: none; transition: opacity 0.15s;
}
.profile-links a:hover::after { opacity: 1; }

/* Contact items */
.contact-items { display: flex; flex-direction: column; gap: 0.3rem; margin-bottom: 0rem; margin-top: 1.5rem;}
.contact-items a {
  font-size: 0.8rem; color: var(--text-secondary); text-decoration: none;
  display: flex; align-items: center; gap: 0.35rem; transition: var(--transition);
}
.contact-items a:hover { color: var(--orange); }

/* Affiliations */
.affil-section { margin-top: 0.5rem; }
.affil-label { font-size: 0.65rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.05em; color: var(--text-muted); margin-bottom: 0.3rem; margin-top: 1.8rem;}
.affil-list { display: flex; flex-wrap: wrap; gap: 0.3rem; }
.affil-item {
  display: inline-flex; align-items: center; gap: 0.35rem; text-decoration: none;
  font-size: 0.72rem; font-weight: 500; color: var(--text-primary);
  transition: var(--transition); padding: 0.2rem 0.45rem;
  border-radius: 100px; border: 1px solid var(--border); background: var(--off-white);
}
.affil-item:hover { border-color: var(--yellow); background: var(--yellow-soft); }
.affil-item .affil-logo {
  width: 18px; height: 18px; border-radius: 3px; flex-shrink: 0;
  background: transparent; display: flex; align-items: center; justify-content: center;
  overflow: hidden; font-size: 0.45rem; font-weight: 800; color: var(--text-muted); line-height: 1;
}
.affil-item .affil-logo img { width: 100%; height: 100%; object-fit: contain; }
.affil-item .affil-logo svg { width: 12px; height: 12px; }

/* ── ABOUT PANEL ── */
.about-panel { display: flex; flex-direction: column; }
.about-panel h2 { font-size: 1.2rem; font-weight: 700; margin-bottom: 0.75rem; }
.about-panel p { font-size: 0.9rem; color: var(--text-secondary); margin-bottom: 0.75rem; }
.about-panel p strong { color: var(--text-primary); font-weight: 600; }
.about-panel .interests { margin-top: auto; }

.interests { display: flex; flex-wrap: wrap; gap: 0.35rem; padding-top: 0.5rem; }
.interests span {
  font-size: 0.75rem; font-weight: 500; color: var(--text-primary);
  background: var(--white); padding: 0.25rem 0.65rem; border-radius: 100px;
  border: 1px solid var(--border);
}

/* ── CV COLUMN ── */
.cv-col { overflow-y: auto; }

/* ── SECTION HEADINGS ── */
.sec-title {
  font-size: 1.15rem; font-weight: 700; margin-bottom: 1.25rem;
  display: flex; align-items: center; gap: 0.5rem;
}
.sec-title::before {
  content: ''; width: 4px; height: 1em; border-radius: 2px;
  background: var(--orange); flex-shrink: 0;
}

/* ── TIMELINE ── */
.cv-col .sec-title { margin-bottom: 0.85rem; }
.timeline { display: flex; flex-direction: column; gap: 0; padding-left: 0; position: relative; }
.tl-item {
  display: flex; align-items: flex-start; gap: 0.6rem;
  padding: 0.35rem 0.5rem; border-radius: var(--radius-xs);
  transition: var(--transition); position: relative;
}
.tl-item:hover { background: rgba(0,0,0,0.02); }
.tl-item:not(:last-child)::after {
  content: ''; position: absolute;
  left: calc(0.5rem + 14px - 1px);
  top: calc(0.1rem + 28px + 0.35rem);
  width: 2px;
  height: calc(100% - 28px - 0.35rem);
  background: var(--border);
}
.tl-logo {
  width: 28px; height: 28px; border-radius: 5px; flex-shrink: 0;
  background: transparent; display: flex; align-items: center; justify-content: center;
  overflow: hidden; margin-top: 0.1rem; position: relative; z-index: 1;
  font-size: 0.5rem; font-weight: 800; color: var(--text-muted); line-height: 1;
  border: 2px solid var(--off-white);
}
.tl-logo img { width: 100%; height: 100%; object-fit: contain; }
.tl-text { flex: 1; min-width: 0; }
.tl-item .role { font-weight: 600; font-size: 0.82rem; line-height: 1.3; }
.tl-item .inst { font-size: 0.78rem; color: var(--blue-on-white); line-height: 1.3; }
.tl-item .yrs { font-size: 0.7rem; font-family: var(--font-mono); color: var(--text-muted); }

/* ── PUB CONTROLS ── */
.pub-controls {
  display: flex; align-items: center; justify-content: space-between;
  flex-wrap: wrap; gap: 0.5rem; margin-bottom: 1.25rem;
}
.pub-filters { display: flex; flex-wrap: wrap; gap: 0.3rem; }
.pub-filters button {
  font-family: var(--font-body); font-size: 0.76rem; font-weight: 500;
  padding: 0.25rem 0.65rem; border-radius: 100px;
  border: 1px solid var(--border); background: var(--white);
  color: var(--text-secondary); cursor: pointer; transition: var(--transition);
}
.pub-filters button:hover { border-color: var(--orange); color: var(--orange); }
.pub-filters button.active { background: var(--charcoal); color: #fff; border-color: var(--charcoal); }
.sort-btn {
  font-family: var(--font-body); font-size: 0.74rem; font-weight: 500;
  padding: 0.25rem 0.65rem; border-radius: 100px;
  border: 1px solid var(--border); background: var(--white);
  color: var(--text-secondary); cursor: pointer; transition: var(--transition);
  display: inline-flex; align-items: center; gap: 0.25rem;
}
.sort-btn:hover { border-color: var(--orange); color: var(--orange); }
.sort-btn .arrow { font-size: 0.65rem; }

/* ── PUB CARDS ── */
.pub-grid { display: flex; flex-direction: column; gap: 0.85rem; }
.pub-card {
  background: var(--off-white); border: 1px solid var(--border);
  border-radius: var(--radius-sm); overflow: hidden;
  display: flex; transition: var(--transition);
  cursor: pointer; text-decoration: none; color: inherit; position: relative;
}
.pub-card:hover { border-color: #bbb; box-shadow: 0 2px 10px rgba(0,0,0,0.05); }
.pub-card[hidden] { display: none; }

.pub-thumb {
  width: 150px; min-height: 110px; flex-shrink: 0;
  background: var(--light-gray); display: flex; align-items: center; justify-content: center;
  overflow: hidden;
}
.pub-thumb img { width: 100%; height: 100%; object-fit: cover; }
.pub-thumb .ph { font-size: 0.6rem; color: var(--text-muted); text-align: center; padding: 0.5rem; }

.pub-body {
  padding: 0.85rem 1.1rem;
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
}

.venue-row { display: flex; align-items: center; gap: 0.35rem; flex-wrap: wrap; margin-bottom: 0.15rem; }
.conf-logo {
  position: absolute;
  right: 0.9rem;
  bottom: 0.9rem;
  width: 40px; 
  height: auto;
  pointer-events: none;
}
.venue-name { font-size: 0.7rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.03em; color: var(--orange); }
.rank-badge {
  font-size: 0.58rem; font-weight: 700; color: #fff; background: var(--charcoal);
  padding: 0.08rem 0.35rem; border-radius: 3px; line-height: 1;
}
.pub-year-badge {
  position: absolute; top: 0.6rem; right: 0.6rem;
  font-family: var(--font-mono); font-size: 0.7rem; font-weight: 700;
  color: var(--text-secondary); background: var(--white);
  padding: 0.15rem 0.5rem; border-radius: 4px; white-space: nowrap;
  border: 1px solid var(--border); z-index: 1;
}
.pub-award { font-size: 0.7rem; font-weight: 600; color: #C49000; margin-bottom: 0.1rem; }
.pub-title { font-size: 0.92rem; font-weight: 600; line-height: 1.3; margin-bottom: 0.15rem; }
.pub-authors { font-size: 0.78rem; color: var(--text-muted); margin-bottom: 0.3rem; }
.pub-authors .me { color: var(--text-primary); font-weight: 600; }
.pub-tags { display: flex; flex-wrap: wrap; gap: 0.2rem; margin-bottom: 0.4rem; }
.pub-tags span { font-size: 0.65rem; font-weight: 500; color: var(--gray); background: var(--off-white); padding: 0.1rem 0.4rem; border-radius: 100px; }
.pub-btns {
  display: flex;
  flex-wrap: wrap;
  gap: 0.3rem;
}
.pub-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.3rem;
  align-items: center;
}
.pub-btns a, .pub-btns button {
  font-family: var(--font-mono); font-size: 0.7rem; font-weight: 500;
  padding: 0.2rem 0.55rem; border-radius: var(--radius-xs);
  text-decoration: none; border: 1px solid var(--border); background: var(--white);
  color: var(--text-secondary); cursor: pointer; transition: var(--transition);
}
.pub-btns a:hover, .pub-btns button:hover { background: var(--off-white); color: var(--text-primary); }
.pub-btns .pdf-btn { border-color: var(--orange); color: var(--orange); }
.pub-btns .doi-btn { border-color: var(--blue-on-white); color: var(--blue-on-white); }

@media (max-width: 600px) {
  .pub-card { flex-direction: column; }
  .pub-thumb { width: 100%; min-height: 130px; }
}

/* ── PUB DETAIL PAGE OVERLAY ── */
.page-overlay {
  display: none; position: fixed; inset: 0; z-index: 300;
  background: var(--white); overflow-y: auto;
}
.page-overlay.open { display: block; animation: slideIn 0.25s ease-out; }
@keyframes slideIn { from { transform: translateY(20px); opacity: 0; } to { transform: translateY(0); opacity: 1; } }

.page-top-bar {
  position: sticky; top: 0; z-index: 10;
  background: rgba(255,255,255,0.95); backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border); padding: 0 2rem; height: 48px;
  display: flex; align-items: center;
}
.page-top-bar .back-btn {
  font-family: var(--font-body); font-size: 0.82rem; font-weight: 500;
  color: var(--text-secondary); background: none; border: none;
  cursor: pointer; display: flex; align-items: center; gap: 0.3rem;
  transition: var(--transition);
}
.page-top-bar .back-btn:hover { color: var(--orange); }

.page-content { max-width: 780px; margin: 0 auto; padding: 2.5rem 2rem 4rem; }
.page-content .page-venue { font-size: 0.82rem; font-weight: 600; color: var(--orange); margin-bottom: 0.25rem; }
.page-content h1 { font-size: 1.5rem; font-weight: 700; line-height: 1.3; margin-bottom: 0.5rem; }
.page-content .page-authors { font-size: 0.88rem; color: var(--text-secondary); margin-bottom: 0.3rem; }
.page-content .page-authors .me { font-weight: 600; color: var(--text-primary); }
.page-content .page-award { font-size: 0.85rem; font-weight: 600; color: #C49000; margin-bottom: 0.75rem; }

.page-actions { display: flex; flex-wrap: wrap; gap: 0.5rem; margin-bottom: 2rem; }
.page-actions a {
  font-family: var(--font-mono); font-size: 0.8rem; font-weight: 500;
  padding: 0.4rem 0.9rem; border-radius: var(--radius-xs);
  text-decoration: none; border: 1px solid var(--border); color: var(--text-secondary); transition: var(--transition);
}
.page-actions a:hover { background: var(--off-white); color: var(--text-primary); }
.page-actions .pdf-a { border-color: var(--orange); color: var(--orange); }
.page-actions .doi-a { border-color: var(--blue-on-white); color: var(--blue-on-white); }

.page-hero-img {
  width: 100%; border-radius: var(--radius); background: var(--light-gray);
  min-height: 200px; margin-bottom: 2rem; overflow: hidden;
  display: flex; align-items: center; justify-content: center;
  font-size: 0.8rem; color: var(--text-muted);
}
.page-hero-img img { width: 100%; display: block; }

.page-section { margin-bottom: 1.75rem; }
.page-section h2 { font-size: 1.05rem; font-weight: 700; margin-bottom: 0.5rem; }
.page-section p { font-size: 0.9rem; color: var(--text-secondary); margin-bottom: 0.5rem; line-height: 1.75; }

.page-cite {
  background: var(--off-white); border: 1px solid var(--border);
  border-radius: var(--radius-sm); padding: 1rem; position: relative;
}
.page-cite pre {
  font-family: var(--font-mono); font-size: 0.72rem; color: var(--text-secondary);
  white-space: pre-wrap; word-break: break-word; line-height: 1.6;
}
.page-cite .cp-btn {
  position: absolute; top: 0.5rem; right: 0.5rem;
  font-family: var(--font-mono); font-size: 0.65rem;
  padding: 0.15rem 0.4rem; border-radius: 3px;
  border: 1px solid var(--border); background: var(--white);
  color: var(--text-muted); cursor: pointer; transition: var(--transition);
}
.page-cite .cp-btn:hover { color: var(--orange); border-color: var(--orange); }

.page-tags { display: flex; flex-wrap: wrap; gap: 0.3rem; margin-top: 1.5rem; }
.page-tags span {
  font-size: 0.72rem; font-weight: 500; padding: 0.2rem 0.55rem;
  border-radius: 100px; background: var(--yellow-soft); color: var(--charcoal);
  border: 1px solid rgba(249,203,64,0.25);
}

/* ── FOOTER ── */
footer {
  padding: 1.5rem 2rem; border-top: 1px solid var(--border);
  text-align: center; font-size: 0.73rem; color: var(--text-muted);
}

/* ── PRINT ── */
@media print {
  nav, .pub-filters, .pub-btns, .profile-links, .page-overlay { display: none !important; }
}
