/* =========================================================================
   Personal academic homepage — Lato, light & airy.
   Mostly dark text on a soft gradient, with a restrained indigo accent.
   ========================================================================= */
:root {
  --ink:        #14161c;   /* main text */
  --ink-soft:   #3a3f4b;   /* secondary text */
  --muted:      #8a8f9c;   /* dates, captions */
  --line:       #e6e8ef;   /* hairline rules */
  --line-strong:#1b2440;
  --accent:     #0d9488;   /* teal accent */
  --accent-2:   #14b8a6;   /* lighter teal */
  --accent-ink: #0f766e;   /* readable accent for small text */
  --accent-soft:#d9f5ef;   /* tinted fill */
  --bg:         #ffffff;
  --maxw:       820px;
  --sans: "Lato", Verdana, Helvetica, Arial, sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  color: var(--ink);
  font-family: var(--sans);
  font-weight: 400;
  font-size: 15px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  background-color: #ffffff;
}

/* triangle-mesh background canvas — full-viewport, behind all content */
#particles-js {
  position: fixed; top: 0; left: 0; width: 100%; height: 100%;
  z-index: 0;
}
/* content rides above the canvas so text stays selectable and links clickable */
.wrap { position: relative; z-index: 1; }

.wrap { max-width: var(--maxw); margin: 0 auto; padding: 52px 28px 40px; }

/* links: indigo with an animated underline */
a {
  color: var(--accent-ink); text-decoration: none;
  background-image: linear-gradient(var(--accent), var(--accent));
  background-position: 0 100%; background-repeat: no-repeat;
  background-size: 100% 1px; padding-bottom: 1px;
  transition: background-size .2s ease, color .2s ease;
}
a:hover { color: var(--accent-2); background-size: 0 1px; }

b, strong { font-weight: 700; }
/* highlighted research keywords */
.hl { font-weight: 700; color: var(--accent-ink); }
/* attention-grabbing note (e.g. PhD application status) */
.callout { font-weight: 700; color: #1e3a8a; }
p { margin: 0 0 12px; }

/* ------------------------------- intro ------------------------------- */
.intro {
  display: grid;
  grid-template-columns: 1fr 188px;
  column-gap: 38px;
  align-items: start;
  padding-bottom: 30px;
  position: relative;
}
/* soft teal divider that fades out, instead of a hard dark rule */
.intro::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 2px;
  border-radius: 2px;
  background: linear-gradient(90deg, var(--accent) 0%, var(--accent-2) 18%, rgba(20,184,166,.25) 55%, transparent 100%);
}
.intro__text p { color: var(--ink-soft); }
/* name + first paragraph sit beside the photo; the rest spans the full width */
.intro__head p:last-child { margin-bottom: 0; }
.intro__more { grid-column: 1 / -1; margin-top: 14px; }
.intro__text .plain { margin-bottom: 12px; }
.intro__text .callout { color: #1e3a8a; }
.name {
  font-weight: 900; font-size: 2.15rem; line-height: 1.05; margin: 0 0 16px;
  letter-spacing: -.015em;
  background: linear-gradient(100deg, var(--ink) 30%, var(--accent) 130%);
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent; color: var(--ink);
}
.name .pronouns {
  font-weight: 400; font-size: 1rem; letter-spacing: 0;
  background: none; -webkit-text-fill-color: var(--ink-soft); color: var(--ink-soft);
  margin-left: 4px; white-space: nowrap;
}
.links {
  margin-top: 14px; padding-top: 12px; border-top: 1px solid var(--line);
  display: flex; gap: 18px; align-items: center;
}
.links a {
  display: inline-flex; color: var(--ink-soft);
  background: none; padding: 0;
  transition: color .2s ease, transform .2s ease;
}
.links a:hover { color: var(--accent); transform: translateY(-2px); }
.links svg { width: 22px; height: 22px; fill: currentColor; }
.intro__photo img {
  display: block; margin-top: 6px; /* top edge lines up with the name's cap height */
  width: 188px; height: 188px; object-fit: cover;
  border-radius: 8px; border: 1px solid var(--line);
  box-shadow: 0 10px 30px rgba(13,148,136,.14);
  filter: grayscale(70%); transition: filter .35s ease, transform .35s ease;
}
.intro__photo img:hover { filter: grayscale(0%); transform: translateY(-2px); }

/* ------------------------------ sections ----------------------------- */
.block { margin-top: 30px; }
.block h2 {
  font-weight: 900; font-size: 1.2rem; margin: 0 0 12px;
  display: flex; align-items: baseline; gap: 10px;
}
.block h2::before {
  content: ""; flex: 0 0 auto;
  width: 10px; height: 10px; border-radius: 3px;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  transform: translateY(-1px);
}
.block h2::after {
  content: ""; flex: 1 1 auto; height: 1px;
  background: linear-gradient(90deg, var(--line) 0%, transparent 90%);
}
.note { color: var(--muted); font-size: .82rem; margin: -4px 0 14px; }

/* news */
.news { list-style: none; margin: 0; padding: 0; }
.news li {
  display: flex; align-items: baseline; gap: 12px;
  padding: 4px 0; color: var(--ink-soft);
}
.news .date {
  flex: 0 0 auto;
  background: var(--accent-soft); color: var(--accent-ink); font-weight: 700;
  font-size: .76rem; letter-spacing: .03em;
  padding: 2px 9px; border-radius: 999px;
}

/* plain bullet list with custom marker */
.plain { list-style: none; margin: 0; padding: 0; }
.plain li {
  position: relative; padding-left: 20px; margin-bottom: 8px; color: var(--ink-soft);
}
.plain li::before {
  content: ""; position: absolute; left: 2px; top: .58em;
  width: 7px; height: 7px; border-radius: 50%;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
}

/* publications */
.pub {
  display: grid; grid-template-columns: 132px 1fr; gap: 22px;
  align-items: start; padding: 12px; margin: 0 -12px 6px;
  border-radius: 10px; border: 1px solid transparent;
  transition: background .2s ease, border-color .2s ease, box-shadow .2s ease;
}
.pub:hover {
  background: rgba(255,255,255,.7);
  border-color: var(--line);
  box-shadow: 0 8px 24px rgba(13,148,136,.10);
}
.pub__thumb {
  width: 132px; height: 90px; border: 1px solid var(--line); border-radius: 6px;
  display: flex; align-items: center; justify-content: center;
  background: #fff;
  color: var(--muted); font-size: .78rem; letter-spacing: .06em;
  overflow: hidden; transition: transform .2s ease, border-color .2s ease;
}
.pub:hover .pub__thumb { transform: translateY(-2px); border-color: var(--accent-2); }
.pub__thumb img { width: 100%; height: 100%; object-fit: cover; }
.pub__body { display: flex; flex-direction: column; gap: 1px; }
.pub__title { font-weight: 700; font-size: 1rem; color: var(--ink); }
.pub__authors { color: var(--ink-soft); }
.pub__authors b { color: var(--accent-ink); }
.pub__venue { color: var(--ink-soft); }
.pub__award { color: #c0392b; font-weight: 700; }
.pub__links { color: var(--muted); font-weight: 700; font-size: .9rem; margin-top: 3px; }

/* cv */
.cv {
  display: grid; grid-template-columns: 118px 1fr; gap: 18px;
  padding: 7px 0; border-bottom: 1px dashed var(--line);
}
.cv:last-of-type { border-bottom: none; }
.cv__when { color: var(--accent-ink); font-weight: 700; font-size: .88rem; }
.cv__what { color: var(--ink-soft); }

/* education: card text layout without a logo column */
.edu { padding: 10px 0; border-bottom: 1px dashed var(--line); }
.edu:last-of-type { border-bottom: none; }
.edu p { margin: 0; color: var(--ink-soft); }

/* internships: logo card per company */
.exp {
  display: grid; grid-template-columns: 132px 1fr; gap: 22px;
  align-items: center; padding: 12px; margin: 0 -12px 6px;
  border-radius: 10px; border: 1px solid transparent;
  transition: background .2s ease, border-color .2s ease, box-shadow .2s ease;
}
.exp:hover {
  background: rgba(255,255,255,.7);
  border-color: var(--line);
  box-shadow: 0 8px 24px rgba(13,148,136,.10);
}
.exp__logo {
  width: 132px; height: 90px; padding: 14px;
  border: 1px solid var(--line); border-radius: 6px; background: #fff;
  display: flex; align-items: center; justify-content: center;
}
.exp__logo img { max-width: 100%; max-height: 100%; object-fit: contain; }
.exp__name { font-weight: 700; font-size: 1rem; margin: 0; }
.exp__name a { color: var(--ink); }
.exp__meta { display: flex; justify-content: space-between; gap: 12px;
  color: var(--muted); font-size: .85rem; font-weight: 700; margin-bottom: 4px; }
.exp__body p { margin: 0 0 2px; color: var(--ink-soft); }
/* placeholder that keeps alignment when a card repeats the previous logo */
.exp__logo--empty { border-color: transparent; background: transparent; }
.cvlink { margin-top: 14px; font-weight: 700; }

/* footer */
.foot { margin-top: 46px; padding-top: 16px; border-top: 2px solid var(--line-strong); }
.foot p { color: var(--muted); font-size: .8rem; margin: 0; }

/* ------------------------------ responsive --------------------------- */
@media (max-width: 640px) {
  .wrap { padding: 34px 18px; }
  .intro { grid-template-columns: 1fr; row-gap: 18px; text-align: left; }
  .intro__more { margin-top: 0; }
  .intro__photo { order: -1; }
  .intro__photo img { width: 132px; height: 132px; }
  .name { font-size: 1.85rem; }
  .pub { grid-template-columns: 1fr; gap: 8px; }
  .pub__thumb { width: 100%; height: 150px; }
  .cv { grid-template-columns: 1fr; gap: 2px; }
  .exp { grid-template-columns: 1fr; gap: 8px; }
  .exp__meta { flex-direction: column; gap: 0; }
  .exp__logo--empty { display: none; }
  .news li { flex-wrap: wrap; gap: 6px; }
}
