/* ==========================================================================
   Dr. Edgar Dusacre — personal site
   Design tokens read directly from the live site's computed styles
   (heading colour, button colour/radius, fonts) so the rebuild matches.
   ========================================================================== */

:root {
  --navy: #1c244b;
  --navy-dark: #12172f;
  --navy-soft: #3a4270;
  --ink: #333333;
  --ink-soft: #5b5f6b;
  --paper: #ffffff;
  --paper-alt: #f6f7fa;
  --line: #e4e6ee;
  --coral: #d97a4d;
  --coral-dark: #b85f37;
  --radius-pill: 100px;
  --radius-card: 14px;
  --max: 1140px;
  --shadow: 0 10px 30px rgba(28, 36, 75, 0.08);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif;
  color: var(--ink);
  background: var(--paper);
  line-height: 1.65;
  font-size: 17px;
}

h1, h2, h3, h4 {
  font-family: "Poppins", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--navy);
  font-weight: 600;
  line-height: 1.2;
  margin: 0 0 0.6em;
}

h1 { font-size: clamp(2.2rem, 4vw, 3rem); }
h2 { font-size: clamp(1.6rem, 3vw, 2.1rem); }
h3 { font-size: 1.25rem; }

p { margin: 0 0 1.1em; }
a { color: var(--navy); }
a:hover { color: var(--coral); }

img { max-width: 100%; display: block; }

.container {
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 24px;
}

.section { padding: 72px 0; }
.section--alt { background: var(--paper-alt); }
.section--photo-bg { background-size: cover; background-position: center; }
.section--photo-bg p, .section--photo-bg .lede { color: var(--ink); font-weight: 600; }
.section--tight { padding: 48px 0; }
.hero-photo-bg {
  min-height: 90vh;
  display: flex;
  align-items: flex-start;
  padding-top: 100px;
  background-position: center top;
}
.hero-photo-bg .container { max-width: 640px; margin-left: 0; padding-left: 64px; }

@media (max-width: 760px) {
  .hero-photo-bg { min-height: 60vh; padding-top: 56px; }
  .hero-photo-bg .container { padding-left: 24px; }
}

.research-subtitle {
  display: block;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--coral-dark);
  margin: -6px 0 16px;
}

.eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--coral-dark);
  margin: 0 0 0.6em;
}

.lede {
  font-size: 1.15rem;
  color: var(--ink-soft);
  max-width: 62ch;
}

/* ---- Buttons ---- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 14px 30px;
  border-radius: var(--radius-pill);
  background: var(--navy);
  color: #fff;
  text-decoration: none;
  font-weight: 600;
  font-size: 0.98rem;
  border: 2px solid var(--navy);
  transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}
.btn:hover { background: var(--navy-dark); border-color: var(--navy-dark); color: #fff; }
.btn--ghost { background: transparent; color: var(--navy); }
.btn--ghost:hover { background: var(--navy); color: #fff; }
.btn--sm { padding: 9px 20px; font-size: 0.88rem; }

/* ---- Header / nav ---- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: #ffffff;
  border-bottom: 1px solid var(--line);
}
.site-header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 14px 0;
}
.brand { display: flex; align-items: center; gap: 12px; text-decoration: none; }
.brand img { height: 48px; width: auto; }

.nav { display: flex; align-items: center; gap: 22px; }
.nav__links { display: flex; gap: 20px; list-style: none; margin: 0; padding: 0; }
.nav__links a {
  display: inline-block;
  white-space: nowrap;
  text-decoration: none;
  color: var(--ink);
  font-weight: 500;
  font-size: 0.95rem;
  padding: 6px 0;
  border-bottom: 2px solid transparent;
}
.nav__links a:hover, .nav__links a[aria-current="page"] { color: var(--navy); border-color: var(--coral); }

.social-row { display: flex; gap: 12px; align-items: center; }
.social-row a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px; height: 32px;
  border-radius: 50%;
  background: var(--navy);
  color: #fff !important;
  text-decoration: none;
  font-size: 0.85rem;
}
.social-row a:hover { background: var(--coral); }

.nav-toggle {
  display: none;
  background: none;
  border: none;
  font-size: 1.6rem;
  color: var(--navy);
  cursor: pointer;
}

@media (max-width: 900px) {
  .nav-toggle { display: block; }
  .nav { position: fixed; top: 68px; right: 0; bottom: 0; left: 0; background: #fff; flex-direction: column; align-items: stretch; padding: 24px; gap: 24px; transform: translateY(-20px); opacity: 0; visibility: hidden; pointer-events: none; transition: transform 0.2s ease, opacity 0.2s ease, visibility 0.2s; overflow-y: auto; }
  .nav.is-open { transform: translateY(0); opacity: 1; visibility: visible; pointer-events: auto; }
  .nav__links { flex-direction: column; gap: 18px; }
}

/* ---- Hero ---- */
.hero {
  display: grid;
  grid-template-columns: 1fr 1.8fr;
  gap: 40px;
  align-items: center;
  padding: 56px 0 72px;
}
.hero__photo { border-radius: var(--radius-card); overflow: hidden; box-shadow: var(--shadow); aspect-ratio: 4 / 3; }
.hero__photo img { width: 100%; height: 100%; object-fit: cover; }
.hero__rule { width: 64px; height: 3px; background: var(--coral); border: none; margin: 18px 0 22px; }
.hero__actions { display: flex; gap: 14px; flex-wrap: wrap; margin-top: 28px; }

@media (max-width: 860px) {
  .hero { grid-template-columns: 1fr; padding-top: 32px; }
}

/* ---- Research + video ---- */
.research-with-video { display: grid; grid-template-columns: 1.3fr 1fr; gap: 44px; align-items: center; }
.research-with-video__media video { width: 100%; border-radius: var(--radius-card); box-shadow: var(--shadow); background: #000; }
.research-with-video__media img { width: 100%; border-radius: var(--radius-card); box-shadow: var(--shadow); object-fit: cover; }
@media (max-width: 860px) { .research-with-video { grid-template-columns: 1fr; } }

/* ---- Responsive video embed (YouTube etc.) ---- */
.video-embed {
  position: relative;
  width: 100%;
  padding-top: 56.25%;
  border-radius: var(--radius-card);
  overflow: hidden;
  box-shadow: var(--shadow);
  background: #000;
}
.video-embed iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

/* ---- Values / cards grid ---- */
.values-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 28px;
  margin-top: 40px;
}
.value-card {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius-card);
  overflow: hidden;
  box-shadow: var(--shadow);
}
.value-card img { width: 100%; height: 210px; object-fit: contain; background: var(--paper-alt); }
.value-card__body { padding: 26px 28px 30px; }
.value-card blockquote {
  font-style: italic;
  color: var(--ink-soft);
  margin: 0 0 14px;
  border-left: 3px solid var(--coral);
  padding-left: 14px;
}
.value-card cite { display: block; margin-top: 8px; font-style: normal; font-weight: 600; color: var(--navy); font-size: 0.92rem; }

@media (max-width: 720px) { .values-grid { grid-template-columns: 1fr; } }

/* ---- Timeline (About page) ---- */
.timeline { position: relative; margin-top: 44px; }
.timeline::before {
  content: "";
  position: absolute;
  left: 120px;
  top: 6px;
  bottom: 6px;
  width: 2px;
  background: var(--line);
}
.timeline-item {
  display: grid;
  grid-template-columns: 120px 1fr;
  gap: 28px;
  position: relative;
  padding-bottom: 44px;
}
.timeline-item:last-child { padding-bottom: 0; }
.timeline-item__years {
  font-weight: 700;
  color: var(--navy);
  text-align: right;
  padding-right: 28px;
  position: relative;
}
.timeline-item__years::after {
  content: "";
  position: absolute;
  right: -7px;
  top: 4px;
  width: 14px; height: 14px;
  border-radius: 50%;
  background: var(--coral);
  border: 3px solid #fff;
  box-shadow: 0 0 0 2px var(--coral);
}
.timeline-item__card {
  background: var(--paper-alt);
  border-radius: var(--radius-card);
  padding: 22px 26px;
  display: grid;
  grid-template-columns: 96px 1fr;
  gap: 20px;
  align-items: center;
}
.timeline-item__photo {
  width: 96px; height: 96px;
  border-radius: 10px;
  overflow: hidden;
  background: var(--navy);
  display: flex;
  align-items: center;
  justify-content: center;
  color: rgba(255,255,255,0.85);
  font-size: 1.6rem;
}
.timeline-item__photo img { width: 100%; height: 100%; object-fit: cover; }
.timeline-item__card h3 { margin-bottom: 4px; }
.timeline-item__card p { margin: 0; color: var(--ink-soft); font-size: 0.96rem; }

@media (max-width: 720px) {
  .timeline::before { left: 18px; }
  .timeline-item { grid-template-columns: 1fr; gap: 12px; }
  .timeline-item__years { text-align: left; padding-right: 0; padding-left: 30px; }
  .timeline-item__years::after { left: 4px; right: auto; }
  .timeline-item__card { grid-template-columns: 72px 1fr; padding: 18px; }
  .timeline-item__photo { width: 72px; height: 72px; }
}

/* ---- Generic content list (media / speaking) ---- */
.entry-list { list-style: none; margin: 40px 0 0; padding: 0; display: flex; flex-direction: column; gap: 0; }
.entry {
  display: grid;
  grid-template-columns: 190px 1fr;
  gap: 24px;
  padding: 22px 0;
  border-bottom: 1px solid var(--line);
  align-items: start;
}
.entry:first-child { padding-top: 0; }
.entry__meta { color: var(--ink-soft); font-size: 0.9rem; }
.entry__tag {
  display: inline-block;
  background: var(--paper-alt);
  color: var(--navy);
  border-radius: var(--radius-pill);
  padding: 4px 12px;
  font-size: 0.78rem;
  font-weight: 700;
  margin-bottom: 6px;
}
.entry h3 { margin-bottom: 6px; font-size: 1.1rem; }
.entry a.entry-link { font-weight: 600; text-decoration: none; }
.entry a.entry-link::after { content: " →"; }

@media (max-width: 640px) {
  .entry { grid-template-columns: 1fr; gap: 6px; }
}

/* ---- Publications ---- */
.pub-list { list-style: none; margin: 30px 0 0; padding: 0; counter-reset: pub; }
.pub-list li {
  counter-increment: pub;
  padding: 18px 0 18px 42px;
  border-bottom: 1px solid var(--line);
  position: relative;
}
.pub-list li::before {
  content: counter(pub);
  position: absolute;
  left: 0; top: 18px;
  width: 26px; height: 26px;
  border-radius: 50%;
  background: var(--navy);
  color: #fff;
  font-size: 0.78rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
}
.pub-list .pub-title { font-weight: 600; color: var(--navy); }
.pub-list .pub-meta { color: var(--ink-soft); font-size: 0.92rem; margin-top: 2px; }
.pub-list .pub-type {
  display: inline-block;
  margin-top: 6px;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--coral-dark);
}

/* ---- CTA banner ---- */
.cta-banner {
  background: var(--navy);
  color: #fff;
  border-radius: var(--radius-card);
  padding: 48px;
  text-align: center;
}
.cta-banner h2, .cta-banner p { color: #fff; }
.cta-banner p { color: rgba(255,255,255,0.8); max-width: 56ch; margin-left: auto; margin-right: auto; }
.cta-banner .btn { background: #fff; color: var(--navy); border-color: #fff; }
.cta-banner .btn:hover { background: var(--coral); border-color: var(--coral); color: #fff; }

/* ---- Article ---- */
.article-card {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius-card);
  padding: 36px 40px;
  box-shadow: var(--shadow);
}
.article-card h2 { margin-bottom: 6px; }
.article-meta { color: var(--ink-soft); font-size: 0.9rem; margin-bottom: 24px; }
.article-body p { color: var(--ink); }
.references { margin-top: 28px; padding-top: 20px; border-top: 1px solid var(--line); font-size: 0.88rem; color: var(--ink-soft); }
.references li { margin-bottom: 8px; }

/* ---- Contact ---- */
.contact-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 44px; margin-top: 40px; }
.contact-card {
  background: var(--paper-alt);
  border-radius: var(--radius-card);
  padding: 30px;
}
.contact-card h3 { font-size: 1rem; margin-bottom: 10px; }
.contact-card a { font-weight: 600; text-decoration: none; }
@media (max-width: 760px) { .contact-grid { grid-template-columns: 1fr; } }

/* ---- Footer ---- */
.site-footer { background: var(--navy); color: rgba(255,255,255,0.85); padding: 56px 0 28px; margin-top: 40px; }
.site-footer a { color: rgba(255,255,255,0.85); text-decoration: none; }
.site-footer a:hover { color: var(--coral); }
.footer-grid { display: grid; grid-template-columns: 1.3fr 1fr 1fr; gap: 36px; }
.footer-brand img { height: 48px; background: #fff; padding: 6px 12px; border-radius: 8px; margin-bottom: 14px; }
.footer-brand p { color: rgba(255,255,255,0.6); font-size: 0.9rem; max-width: 32ch; }
.footer-col h4 { color: #fff; font-family: "Poppins", sans-serif; font-size: 0.92rem; text-transform: uppercase; letter-spacing: 0.05em; margin-bottom: 14px; }
.footer-col ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.footer-social { display: flex; gap: 12px; margin-top: 16px; }
.footer-social a { width: 34px; height: 34px; border-radius: 50%; background: rgba(255,255,255,0.12); display: flex; align-items: center; justify-content: center; }
.footer-social a:hover { background: var(--coral); }
.footer-bottom { border-top: 1px solid rgba(255,255,255,0.15); margin-top: 40px; padding-top: 22px; font-size: 0.85rem; color: rgba(255,255,255,0.55); display: flex; justify-content: space-between; flex-wrap: wrap; gap: 10px; }

@media (max-width: 760px) { .footer-grid { grid-template-columns: 1fr; } }

/* ---- Page hero band (Research / Public speaking / Media / Opinion / Contact) ---- */
.page-hero {
  background: linear-gradient(135deg, var(--navy) 0%, var(--navy-soft) 100%);
  color: #fff;
}
.page-hero .eyebrow { color: #ffcda3; }
.page-hero h1 { color: #fff; }
.page-hero .lede { color: rgba(255, 255, 255, 0.86); }
.page-hero__icon {
  width: 56px; height: 56px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.12);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  color: #fff;
  margin-bottom: 22px;
}

/* ---- Note box (e.g. speaker availability) ---- */
.note-box {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  background: var(--paper-alt);
  border-left: 4px solid var(--coral);
  border-radius: 10px;
  padding: 20px 24px;
  margin-top: 26px;
  max-width: 62ch;
}
.note-box i { color: var(--coral-dark); font-size: 1.3rem; margin-top: 3px; flex: none; }
.note-box p { margin: 0; color: var(--ink); }
.note-box a { font-weight: 600; }
.page-hero .note-box { background: rgba(255, 255, 255, 0.1); border-left-color: #ffcda3; }
.page-hero .note-box p { color: rgba(255, 255, 255, 0.92); }
.page-hero .note-box i { color: #ffcda3; }
.page-hero .note-box a { color: #fff; text-decoration: underline; }

/* ---- Media / speaking grouped cards ---- */
.media-group { margin-top: 48px; }
.media-group:first-child { margin-top: 0; }
.media-group__heading {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 1.15rem;
  margin-bottom: 22px;
}
.media-group__heading i {
  width: 38px; height: 38px;
  border-radius: 10px;
  background: var(--paper-alt);
  color: var(--coral-dark);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
}
.media-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(270px, 1fr)); gap: 24px; }
.media-card {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius-card);
  overflow: hidden;
  box-shadow: var(--shadow);
  display: flex;
  flex-direction: column;
}
.media-card__thumb { aspect-ratio: 16 / 9; background: var(--navy); overflow: hidden; }
.media-card__thumb img { width: 100%; height: 100%; object-fit: cover; }
.media-card__thumb--icon { display: flex; align-items: center; justify-content: center; color: rgba(255, 255, 255, 0.85); font-size: 1.8rem; background: linear-gradient(135deg, var(--navy), var(--navy-soft)); }
.media-card__body { padding: 20px 22px 24px; flex: 1; display: flex; flex-direction: column; }
.media-card__body h3 { font-size: 1.02rem; margin-bottom: 6px; }
.media-card__body .entry__tag { margin-bottom: 10px; }
.media-card__body .entry__tag i { margin-right: 5px; }
.media-card__body p:last-child { margin-top: auto; margin-bottom: 0; }

/* ---- Opinion article cards ---- */
.opinion-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 24px; margin-top: 40px; }
.opinion-card {
  display: block;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius-card);
  padding: 26px 28px;
  text-decoration: none;
  color: inherit;
  box-shadow: var(--shadow);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.opinion-card:hover { transform: translateY(-3px); box-shadow: 0 16px 34px rgba(28, 36, 75, 0.14); }
.opinion-card__date {
  display: inline-block;
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--coral-dark);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 10px;
}
.opinion-card h3 { margin-bottom: 6px; color: var(--navy); }
.opinion-card__authors { color: var(--ink-soft); font-size: 0.88rem; margin-bottom: 12px; }
.opinion-card__summary { color: var(--ink); font-size: 0.95rem; margin-bottom: 0; }
.opinion-card__cta { display: inline-block; margin-top: 14px; font-weight: 600; color: var(--navy); }
.opinion-card:hover .opinion-card__cta { color: var(--coral); }

/* ---- Publications with graphical abstract thumbnails ---- */
.pub-list li.has-abstract {
  display: grid;
  grid-template-columns: 96px 1fr;
  gap: 20px;
  align-items: start;
  padding-left: 0;
}
.pub-list li.has-abstract::before { display: none; }
.pub-abstract-thumb { width: 96px; height: 96px; object-fit: cover; border-radius: 8px; box-shadow: var(--shadow); }

/* ---- Utility ---- */
.mt-0 { margin-top: 0; }
.text-center { text-align: center; }
.skip-link { position: absolute; left: -9999px; top: 0; background: var(--navy); color: #fff; padding: 10px 16px; z-index: 100; }
.skip-link:focus { left: 12px; top: 12px; }
