/* ============================================================
   style.css — the design for EVERY page.

   selector { property: value; }
     body          → the <body> tag
     .hero         → anything with class="hero"
     .site-nav a   → <a> tags inside class="site-nav"
   ============================================================ */


/* ---------- 1. Colours & fonts (change here = changes everywhere) ---------- */
:root {
  --navy:        #0b2545;   /* dark blue: header, hero, footer   */
  --navy-2:      #13315c;   /* slightly lighter dark blue        */
  --blue:        #1d5fa8;   /* links and headings accents        */
  --light-blue:  #8ecae6;   /* light blue: highlights on dark bg */
  --pale-blue:   #e3f1fb;   /* very light blue: chips, badges    */
  --page-bg:     #f5f9fd;   /* page background                   */
  --card-bg:     #ffffff;
  --text:        #1b2a3a;
  --text-muted:  #5a6b7d;
  --border:      #d6e4f0;

  --heading-font: "Poppins", sans-serif;
  --body-font:    "Inter", sans-serif;
  --max-width:    1000px;
  --radius:       14px;
}


/* ---------- 2. Basics ---------- */
* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--body-font);
  font-size: 17px;
  line-height: 1.7;
  color: var(--text);
  background: var(--page-bg);
  /* keeps the footer at the bottom even on short pages */
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

body > main { flex: 1; width: 100%; }

a { color: var(--blue); text-decoration: none; }
a:hover { text-decoration: underline; }

h1, h2, h3 {
  font-family: var(--heading-font);
  line-height: 1.25;
  color: var(--navy);
}

img { max-width: 100%; }

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


/* ---------- 3. Header & navigation ---------- */
.site-header {
  position: sticky;                /* stays at top while scrolling */
  top: 0;
  z-index: 10;
  background: var(--navy);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.header-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 14px 20px;
  display: flex;                   /* title left, menu right */
  align-items: center;
  justify-content: space-between;
}

.site-title {
  font-family: var(--heading-font);
  font-weight: 600;
  font-size: 20px;
  color: #fff;
}
.site-title:hover { text-decoration: none; color: var(--light-blue); }

.site-nav ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  gap: 28px;
}

.site-nav a {
  color: #d6e6f5;
  font-weight: 500;
  padding: 4px 0;
  border-bottom: 2px solid transparent;
}

.site-nav a:hover,
.site-nav a.active {
  color: var(--light-blue);
  text-decoration: none;
  border-bottom-color: var(--light-blue);   /* light-blue underline on current page */
}

.menu-toggle {                     /* hamburger, only shown on phones */
  display: none;
  background: none;
  border: none;
  color: #fff;
  font-size: 26px;
  cursor: pointer;
}


/* ---------- 4. Hero (big dark-blue banner on Home) ---------- */
.hero {
  background: linear-gradient(135deg, var(--navy) 0%, var(--navy-2) 60%, #1b4d80 100%);
  color: #e8f1fa;
}

.hero-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 64px 20px;
  display: grid;
  grid-template-columns: 1.3fr 1fr;   /* text column wider than photo column */
  gap: 48px;
  align-items: center;
}

.eyebrow {
  margin: 0 0 8px;
  color: var(--light-blue);
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-size: 14px;
}

.hero h1 {
  margin: 0 0 16px;
  font-size: 52px;
  color: #fff;
}

.tagline {
  margin: 0 0 28px;
  font-size: 19px;
  color: #c9dbee;
  max-width: 34ch;                    /* keeps lines a comfortable length */
}

.hero-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 24px;
}

.btn {
  display: inline-block;
  padding: 11px 22px;
  border-radius: 999px;               /* pill shape */
  font-weight: 600;
  font-size: 15px;
  border: 2px solid var(--light-blue);
}
.btn:hover { text-decoration: none; transform: translateY(-1px); }

.btn-primary { background: var(--light-blue); color: var(--navy); }
.btn-outline { background: transparent;       color: var(--light-blue); }
.btn-outline:hover { background: rgba(142, 202, 230, 0.12); }

.social-links { display: flex; gap: 14px; }

.social-links a {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.08);
}
.social-links a:hover { background: rgba(142, 202, 230, 0.25); }

.social-links svg { width: 20px; height: 20px; fill: #e8f1fa; }

.hero-photo img {
  display: block;
  width: 100%;
  max-width: 380px;
  height: auto;                       /* keeps the photo's real proportions */
  margin-left: auto;
  border-radius: 20px;
  border: 4px solid var(--light-blue);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.35);
}


/* ---------- 5. Page banner (smaller dark banner on inner pages) ---------- */
.page-banner {
  background: linear-gradient(135deg, var(--navy) 0%, var(--navy-2) 100%);
  padding: 48px 0 40px;
}
.page-banner h1 { margin: 0; color: #fff; font-size: 44px; }
.page-banner p  { margin: 4px 0 0; color: var(--light-blue); }


/* ---------- 6. Sections ---------- */
.section { padding: 56px 0 8px; }

.section h2 {
  font-size: 30px;
  margin: 0 0 24px;
  display: flex;
  align-items: center;
  gap: 14px;
}

/* the short light-blue line before every section title */
.section h2::before {
  content: "";
  width: 32px;
  height: 4px;
  border-radius: 2px;
  background: var(--light-blue);
}

.section h3 { font-size: 19px; margin: 28px 0 12px; }


/* Chips (research interests) */
.chips {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}
.chips li {
  background: var(--pale-blue);
  color: var(--navy-2);
  border: 1px solid #c5e1f4;
  padding: 6px 16px;
  border-radius: 999px;
  font-size: 15px;
  font-weight: 500;
}

/* Small label, e.g. "First-class Honours", "Accepted" */
.badge {
  display: inline-block;
  background: var(--pale-blue);
  color: var(--blue);
  font-family: var(--body-font);
  font-size: 12px;
  font-weight: 600;
  padding: 2px 10px;
  border-radius: 999px;
  vertical-align: middle;
}


/* News list */
.news-list {
  list-style: none;
  padding: 0;
  margin: 0;
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}
.news-list li {
  display: grid;
  grid-template-columns: 100px 1fr;   /* date column + text column */
  gap: 16px;
  padding: 16px 20px;
}
.news-list li + li { border-top: 1px solid var(--border); }   /* line between items */

.news-date {
  font-weight: 600;
  color: var(--blue);
  white-space: nowrap;
}


/* Timeline (education & experience) */
.timeline {
  list-style: none;
  margin: 0;
  padding: 0 0 0 28px;
  border-left: 3px solid var(--pale-blue);   /* the vertical line */
}

.timeline-item {
  position: relative;
  padding-bottom: 28px;
}
.timeline-item:last-child { padding-bottom: 0; }

/* the dot on the line */
.timeline-item::before {
  content: "";
  position: absolute;
  left: -37px;
  top: 6px;
  width: 15px;
  height: 15px;
  border-radius: 50%;
  background: var(--light-blue);
  border: 3px solid var(--navy-2);
}

.timeline-item h3 { margin: 2px 0 2px; }
.timeline-item p  { margin: 2px 0; }

.timeline-date {
  font-size: 14px;
  font-weight: 600;
  color: var(--blue);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.timeline-place { color: var(--text-muted); }


/* Cards (talks page) */
.card-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 12px;                         /* space between talks */
}

/* Compact talk card: small padding and fonts so many talks fit on screen */
.card {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-left: 4px solid var(--light-blue);
  border-radius: 10px;
  padding: 12px 18px;
  font-size: 15px;
  line-height: 1.55;
}

.card-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: var(--text-muted);
}

.card h3 { margin: 4px 0 2px; font-size: 16px; line-height: 1.4; }
.card p  { margin: 0; }
.card .venue { font-style: italic; color: var(--text-muted); }


/* ---------- 7. Footer ---------- */
.site-footer {
  margin-top: 72px;
  background: var(--navy);
  color: #c9dbee;
  font-size: 15px;
}
.footer-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 24px 20px;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 8px;
}
.footer-inner p { margin: 0; }
.site-footer a  { color: var(--light-blue); }


/* ---------- 8. Phones & small screens ----------
   Rules inside here only apply when the screen is 760px wide or less. */
@media (max-width: 760px) {
  .menu-toggle { display: block; }

  .site-nav {
    display: none;                  /* hidden until hamburger is tapped */
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--navy);
    border-top: 1px solid rgba(255, 255, 255, 0.08);
  }
  .site-nav.open { display: block; } /* js/main.js adds "open" */

  .site-nav ul {
    flex-direction: column;
    gap: 0;
    padding: 8px 20px 16px;
  }
  .site-nav li { padding: 8px 0; }

  .hero-inner {
    grid-template-columns: 1fr;      /* one column: photo on top, text below */
    padding: 40px 20px 48px;
    gap: 28px;
  }
  .hero-photo { order: -1; }         /* move photo above the text */
  .hero-photo img { max-width: 260px; margin: 0 auto; }
  .hero h1 { font-size: 38px; }
  .tagline { font-size: 17px; }

  .news-list li { grid-template-columns: 1fr; gap: 2px; }

  .section { padding-top: 44px; }
  .section h2 { font-size: 26px; }
  .page-banner h1 { font-size: 36px; }
}
