/* ==========================================================================
   custom.css — Karina Rojas
   Loaded AFTER css/styles.css (the Dev Portfolio template).
   Holds every fix and every new component so styles.css can stay untouched.
   ========================================================================== */

:root {
  --ink: #374054;
  --muted: #74808a;
  --plum: #6B4C6E;
  --lilac: #A37BA6;
  --dark: #1C1C24;
  --alt: #f2f2f5;
  --line: #dcd9d9;
  --card: #fff;
  --radius: 6px;
}

html { scroll-behavior: smooth; }
body { color: var(--ink); background: #fff; }
img { max-width: 100%; }
a { color: var(--plum); }
a:hover, a:focus { color: var(--lilac); }

/* ---------- Header / nav ---------- */
header a.active { color: var(--plum); font-weight: 700; }

/* ---------- Buttons (btn-rounded was used but never defined) ---------- */
.btn-rounded {
  display: inline-block;
  color: var(--plum);
  padding: 10px 24px;
  border: 2px solid var(--plum);
  border-radius: 30px;
  font-weight: 700;
  transition: .3s ease all;
}
.btn-rounded:hover, .btn-rounded:focus {
  color: #fff;
  background: var(--plum);
  text-decoration: none;
}
.btn-row { display: flex; flex-wrap: wrap; gap: 12px; justify-content: center; margin-top: 30px; }

/* ---------- Lead (moved from inline styles) ---------- */
#lead-content { width: 100%; padding: 0 15px; }
#lead-photo { margin: 1.5rem 0; }
#lead-photo img {
  width: 200px; height: 200px; border-radius: 50%; object-fit: cover;
  box-shadow: 0 4px 14px rgba(0,0,0,0.4);
}
#lead-content h2 span { color: #d9c3db; }

/* ---------- Generic section rhythm ---------- */
.section { padding: 70px 15px; text-align: center; border-bottom: 1px solid var(--line); }
.section h2.heading { color: var(--ink); margin-bottom: 20px; }
.section-intro { max-width: 680px; margin: 0 auto 40px auto; color: var(--muted); }

/* ---------- About ---------- */
#about p { line-height: 1.7; }
#about .skills-img { max-width: 100%; height: auto; }
@media (min-width: 768px) { #about .col-md-6 p { text-align: left; } }

/* ---------- Experience: remove background clash with projects ---------- */
.vtimeline-content p { line-height: 1.6; }

/* ---------- Project cards (new component, replaces .project) ---------- */
.pcard {
  display: flex;
  max-width: 960px;
  margin: 0 auto 30px auto;
  background: var(--card);
  border-radius: var(--radius);
  overflow: hidden;
  text-align: left;
}
.pcard:nth-child(even) { flex-direction: row-reverse; }
.pcard-img { flex: 0 0 40%; background: #0e0e14; display: flex; align-items: center; justify-content: center; }
.pcard-img img { width: 100%; height: 100%; min-height: 260px; object-fit: cover; display: block; }
.pcard-img.contain { background: #fff; padding: 12px; }
.pcard-img.contain img { object-fit: contain; min-height: 0; max-height: 280px; }
.pcard-body { flex: 1; padding: 30px 34px; display: flex; flex-direction: column; justify-content: center; }
.pcard-body h3 { font-size: 1.5em; font-weight: 300; color: var(--ink); margin: 0 0 12px 0; }
.pcard-body p { color: var(--muted); font-size: 0.95em; line-height: 1.65; margin: 0 0 16px 0; }
.pcard-body .more { font-weight: 700; }
.tags { display: flex; flex-wrap: wrap; gap: 6px; margin: 0 0 16px 0; padding: 0; list-style: none; }
.tags li { font-size: 0.78em; padding: 3px 10px; border-radius: 20px; background: #efe8f0; color: var(--plum); }

/* ---------- Publication highlights ---------- */
.pub-list { list-style: none; padding: 0; margin: 0 auto; max-width: 900px; text-align: left; }
.pub-list li {
  display: flex; gap: 18px; align-items: flex-start;
  background: var(--card); border: 1px solid #e6e6e6; border-radius: var(--radius);
  padding: 18px 22px; margin-bottom: 14px;
}
.pub-year {
  flex: 0 0 auto; font-weight: 700; color: #fff; background: var(--plum);
  border-radius: 4px; padding: 3px 9px; font-size: 0.85em; margin-top: 2px;
}
.pub-main { flex: 1; min-width: 0; }
.pub-title { display: block; font-size: 1.08em; color: var(--ink); font-weight: 700; margin-bottom: 4px; line-height: 1.4; }
.pub-authors { color: var(--muted); font-size: 0.88em; margin: 0 0 4px 0; line-height: 1.5; }
.pub-authors strong { color: var(--ink); }
.pub-venue { color: var(--muted); font-size: 0.88em; font-style: italic; margin: 0; }
.pub-badge { display: inline-block; font-size: 0.72em; font-style: normal; font-weight: 700; color: var(--plum);
  border: 1px solid var(--lilac); border-radius: 10px; padding: 0 7px; margin-left: 6px; vertical-align: 1px; }
.pub-link { flex: 0 0 auto; align-self: center; font-size: 0.9em; font-weight: 700; white-space: nowrap; }

/* ---------- Award cards ---------- */
.award-grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 18px;
  max-width: 1000px; margin: 0 auto; text-align: left;
}
.award {
  background: var(--card); border: 1px solid #e6e6e6; border-radius: var(--radius); padding: 22px;
  display: flex; flex-direction: column;
}
.award-icon {
  width: 44px; height: 44px; border-radius: 50%; background: var(--plum); color: #fff;
  display: flex; align-items: center; justify-content: center; font-size: 1.2em; margin-bottom: 14px;
}
.award .year { color: var(--lilac); font-weight: 700; font-size: 0.85em; letter-spacing: .04em; }
.award h3 { font-size: 1.15em; font-weight: 700; color: var(--ink); margin: 4px 0 8px 0; }
.award p { color: var(--muted); font-size: 0.9em; line-height: 1.55; margin: 0; }
.award p + p { margin-top: 8px; }

/* ---------- Outreach feature ---------- */
.feature {
  display: flex; gap: 40px; align-items: center; max-width: 960px; margin: 0 auto; text-align: left;
}
.feature-img { flex: 0 0 240px; }
.feature-img img { width: 240px; height: auto; border-radius: var(--radius); display: block; }
.feature-body p { color: var(--muted); line-height: 1.7; }
.checklist { list-style: none; padding: 0; margin: 0 0 10px 0; }
.checklist li { position: relative; padding-left: 24px; color: var(--muted); margin-bottom: 6px; line-height: 1.5; }
.checklist li:before { content: '\f005'; font-family: FontAwesome; position: absolute; left: 0; top: 1px; color: var(--lilac); font-size: 0.85em; }
.feature .btn-row { justify-content: flex-start; }

/* ---------- Contact ---------- */
#contact { padding: 70px 15px; }
#contact p { color: #c9ccd3; }
#contact a { color: #d9c3db; }
#contact a:hover { color: #fff; }
.contact-links { display: flex; justify-content: center; flex-wrap: wrap; gap: 12px; margin-top: 24px; padding: 0; list-style: none; }
.contact-links a {
  display: inline-flex; align-items: center; gap: 8px; padding: 10px 20px;
  border: 2px solid #d9c3db; border-radius: 30px; font-weight: 700;
}
.contact-links a:hover { background: #d9c3db; color: var(--dark); text-decoration: none; }

/* ---------- Footer ---------- */
footer { padding: 30px 0; }

/* ==========================================================================
   Sub-pages
   ========================================================================== */
.page-hero {
  position: relative; padding: 130px 15px 70px 15px; text-align: center; color: #fff;
  background: url(../images/Milky_way.jpeg) center / cover;
}
.page-hero:before { content: ''; position: absolute; inset: 0; background: rgba(28,28,36,0.6); }
.page-hero > * { position: relative; }
.page-hero h1 { font-weight: 900; text-transform: uppercase; letter-spacing: .05em; font-size: 2.8em; margin: 0 0 10px 0; }
.page-hero p { color: #d9c3db; font-size: 1.2em; margin: 0 auto; max-width: 700px; }

.page { padding: 60px 15px; }
.page-narrow { max-width: 900px; margin: 0 auto; }
.page h2 { font-weight: 300; color: var(--ink); font-size: 1.9em; margin: 50px 0 20px 0; }
.page h2:first-child { margin-top: 0; }
.page h3 { font-weight: 700; color: var(--ink); font-size: 1.25em; margin: 30px 0 10px 0; }
.page p, .page li { color: #5c6670; line-height: 1.75; }
.lede { font-size: 1.1em; color: var(--muted); }
.lede em { font-style: normal; }
.back-link { display: inline-block; margin-top: 30px; font-weight: 700; }
.back-link i { margin-right: 6px; }

/* In-page quick nav */
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin: 20px 0 10px 0; padding: 0; list-style: none; }
.chips a { display: inline-block; padding: 5px 14px; border-radius: 20px; background: var(--alt); color: var(--ink); font-size: 0.9em; }
.chips a:hover { background: var(--plum); color: #fff; text-decoration: none; }

/* Long-form research blocks */
.research-block { display: grid; grid-template-columns: 1fr 1fr; gap: 36px; align-items: start; padding: 40px 0; border-top: 1px solid var(--line); }
.research-block:first-of-type { border-top: 0; }
.research-block figure { margin: 0; }
.research-block figure img { width: 100%; border-radius: var(--radius); display: block; }
.research-block figcaption { font-size: 0.8em; color: var(--muted); margin-top: 6px; }
.research-block h2 { margin-top: 0; }
.research-block h3 { margin-top: 20px; }
.research-block.full { grid-template-columns: 1fr; }

.banner { width: 100%; max-height: 360px; object-fit: cover; border-radius: var(--radius); display: block; }
.credit { font-size: 0.8em; color: var(--muted); margin-top: 6px; }

/* Outreach page cards */
.o-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 20px; margin-top: 20px; }
.o-card { background: var(--card); border: 1px solid #e6e6e6; border-radius: var(--radius); overflow: hidden; display: flex; flex-direction: column; }
.o-card img { width: 100%; height: 190px; object-fit: cover; display: block; background: var(--alt); }
.o-card .o-body { padding: 18px 20px; }
.o-card .year { color: var(--lilac); font-weight: 700; font-size: 0.85em; }
.o-card h3 { margin: 2px 0 8px 0; font-size: 1.1em; }
.o-card p { font-size: 0.92em; margin: 0 0 8px 0; line-height: 1.6; }
.o-card ul { padding-left: 18px; margin: 0 0 8px 0; }
.o-card li { font-size: 0.92em; line-height: 1.5; }
.startres { display: flex; gap: 30px; align-items: center; }
.startres-logo { flex: 0 0 180px; }
.startres-logo img { width: 180px; height: auto; border-radius: var(--radius); display: block; }
.socials-inline { display: flex; flex-wrap: wrap; gap: 8px; list-style: none; padding: 0; margin: 12px 0 0 0; }
.socials-inline a { display: inline-flex; align-items: center; gap: 6px; padding: 4px 12px; border: 1px solid var(--line); border-radius: 20px; font-size: 0.88em; color: var(--ink); }
.socials-inline a:hover { border-color: var(--plum); color: var(--plum); text-decoration: none; }

/* Talks / CV list */
.doc-list { list-style: none; padding: 0; margin: 0; }
.doc-list li { display: flex; gap: 18px; align-items: center; background: var(--card); border: 1px solid #e6e6e6; border-radius: var(--radius); padding: 18px 22px; margin-bottom: 14px; }
.doc-list .doc-icon { flex: 0 0 44px; height: 44px; border-radius: 50%; background: var(--plum); color: #fff; display: flex; align-items: center; justify-content: center; font-size: 1.2em; }
.doc-list .doc-main { flex: 1; min-width: 0; }
.doc-list h3 { margin: 0 0 2px 0; font-size: 1.1em; }
.doc-list p { margin: 0; font-size: 0.9em; color: var(--muted); line-height: 1.5; }

/* ==========================================================================
   Responsive
   ========================================================================== */
@media only screen and (max-width: 992px) {
  #lead { padding: 110px 15px 60px 15px; }
}

@media only screen and (max-width: 768px) {
  .section { padding: 50px 15px; }
  .pcard, .pcard:nth-child(even) { flex-direction: column; }
  .pcard-img { flex-basis: auto; }
  .pcard-img img { min-height: 0; height: 200px; }
  .pcard-img.contain img { height: 200px; }
  .pcard-body { padding: 22px 20px; }
  .pub-list li { flex-wrap: wrap; gap: 8px 12px; padding: 16px; }
  .pub-link { align-self: flex-start; }
  .feature { flex-direction: column; gap: 20px; text-align: center; }
  .feature-img { flex-basis: auto; }
  .feature-img img { width: 160px; margin: 0 auto; }
  .checklist { text-align: left; display: inline-block; }
  .feature .btn-row { justify-content: center; }
  .page-hero { padding: 90px 15px 50px 15px; }
  .page-hero h1 { font-size: 1.9em; }
  .page-hero p { font-size: 1em; }
  .page { padding: 40px 15px; }
  .research-block { grid-template-columns: 1fr; gap: 20px; }
  .startres { flex-direction: column; align-items: flex-start; }
  .startres-logo { flex-basis: auto; }
  .startres-logo img { width: 140px; }
  .doc-list li { padding: 14px 16px; }
  #mobile-menu-open { box-shadow: 0 2px 6px rgba(0,0,0,0.3); }
}
