/* === Font: Congenial Ultra Light from /fonts === */
@font-face {
  font-family: 'Congenial UltraLight';
  src: url('fonts/congenial-ultra-light.otf') format('opentype');
  font-weight: 200;
  font-style: normal;
  font-display: swap;
}

/* Italic */
@font-face {
  font-family: 'Congenial UltraLight Italic';
  src: url('/fonts/congenial-ultra-light-italic.otf') format('opentype');
  font-weight: 200;
  font-style: italic;
  font-display: swap;
}

/* Italic */
@font-face {
  font-family: 'Congenial Bold';
  src: url('/fonts/congenial-bold.otf') format('opentype');
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

/* === Theme tokens === */
:root{
  --accent: #d9822b;           /* single accent used for nav-active + links */
  --text:   #111;
  --muted:  #666;
  --bg:     #ffffff;
  --hair:   #dcdcdc;
  --rule:   #f0f0f0;
}

/* reset */
* { box-sizing: border-box; }
html, body { height: 100%; }
body {
  margin: 0;
  font-family: 'Congenial UltraLight', system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
  font-weight: 200;
  color: var(--text);
  background: var(--bg);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* links share the same accent everywhere */
a { color: var(--accent); }
a:hover { opacity: 0.9; }

/* headings – keep light so font change is obvious */
h1, h2, h3, h4, h5, h6 { font-weight: 300; }

/* grid: left sidebar + main content */
.layout { display: grid; grid-template-columns: 160px 1fr; min-height: 100vh; }

/* sidebar (no box) */
.side {
  position: sticky;
  top: 0;
  background: #ffffff;
  align-self: start; 
  height: 100vh;
  overflow: auto;
  border-right: 1px solid var(--rule);
  padding: 24px 28px;
}

/* inner hairline near the right edge */
.side::after {
  content: "";
  position: absolute;
  top: 24px; bottom: 24px;
  right: 10px;
  width: 1px;
  background: var(--hair);
  border-radius: 1px;
}

/* nav */
.side-nav { display: flex; flex-direction: column; gap: 14px; padding-right: 12px; }
.side-nav .brand {
  font-weight: 300; text-decoration: none; color: var(--accent);
  padding: 6px 8px; border-radius: 8px; background: transparent;
}
.side-nav ul {
  list-style: none;
  margin: 210px 0 0;
  padding: 0;
  display: flex; flex-direction: column; gap: 10px;
  align-self: flex-end;
  text-align: right;
}
.side-nav a {
  color: #6b6b6b;
  text-decoration: none;
  text-transform: lowercase;
  padding: 6px 8px;
  border-radius: 8px;
  background: transparent;
  display: block;
}
.side-nav a:hover { background: #f4f4f4; }
.side-nav a.active { color: var(--accent); background: transparent; }

/* main content */
.content {
  position: relative;
  max-width: clamp(1000px, 85vw, 1150px);
  margin: 24px auto 48px 32px;
  padding: 0;
}

h1 { font-size: 44px; margin: 0 0 8px; }
.muted { color: var(--muted); }

/* ===== Profile block (photo + logos) ===== */
.profile-block{ position: absolute; left: 0; top: 165px; width: 220px; }
.profile-pic{ box-sizing: border-box; display: block; width: 100%; height: 220px; object-fit: cover; border-radius: 0; border: 1px solid #e5e5e5; }
.socials{ margin-top: 14px; display: flex; justify-content: space-between; align-items: center; gap: 6px; }
.socials .soc img{ width: 26px; height: 26px; display: block; }
.content-inner{ margin-top: 30px; margin-left: 260px; }
.content-inner p { margin: 0 0 12px; color: var(--text); }
.content-inner .lead{
  font-family: 'Congenial UltraLight Italic', 'Congenial UltraLight', system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
  font-style: italic;
  margin-bottom: 32px;  /* space only after the first line */
}
.muted { color: var(--muted); }

/* Custom institutional link colors */
.link-ist { color: #009FE4; }
.link-dtu { color: #9A0000; }
.link-isr { color: #AA261A; }
.link-jhu { color: #092C72; }
.link-fctuc { color: #00713D; }
.link-i3s { color: #0081C2; }

.link-ist:hover, .link-dtu:hover, .link-isr:hover, .link-jhu:hover, .link-fctuc:hover, .link-i3s:hover { opacity: 0.85; }

/* small screens */
@media (max-width: 720px) {
  .layout { grid-template-columns: 1fr; }
  .side { position: static; height: auto; overflow: visible; border-right: none; border-bottom: 1px solid #eee; padding: 12px 16px; }
  .side::after { display: none; }
  .side-nav { flex-direction: row; align-items: center; gap: 12px; padding-right: 0; }
  .side-nav ul { flex-direction: row; margin: 0 0 0 auto; gap: 8px; align-self: auto; text-align: left; }
  .content { margin: 24px 16px; padding: 0; }
  .profile-block{ position: static; width: 140px; }
  .profile-pic{ height: 140px; }
  .socials{
    display: grid;
    grid-template-columns: repeat(4, 28px); /* 4 per row */
    gap: 6px;                                /* 4*28 + 3*6 = 130px < 140px */
    width: 140px;                            /* keep your current width */
    justify-content: start;                  /* align left */
  }
  .socials .soc img{ width: 28px; height: 28px; }
  .content-inner { margin-left: 0; }
}

/* =============================================================== */
/* ========================= Work / Timeline ===================== */
/* =============================================================== */

/* category colors */
:root{
  --cat-academic:   #1b6ed6; /* blue */
  --cat-conference: #00a383; /* teal */
  --cat-journal:    #9A0000; /* red */
}

/* sticky filter bar */
.work-toolbar{
  position: sticky; top: 0; z-index: 5;
  background: var(--bg);
  padding: .6rem 0 .75rem;
  border-bottom: 1px solid var(--rule);
  display: flex; flex-wrap: wrap; gap: .6rem 0.5rem; align-items: center;
}
.chips{ display:flex; flex-wrap:wrap; gap:.4rem; }
.chip{
  --chip-color: var(--hair);
  border: 1px solid var(--chip-color);
  background: var(--bg);
  padding: .25rem .5rem;
  border-radius: 999px;
  font: inherit; line-height: 1.2;
  cursor: pointer;
  user-select: none;
}
.chip:is(:hover,:focus-visible){ box-shadow: 0 0 0 2px color-mix(in srgb, var(--chip-color) 30%, transparent); outline: none; }
.chip.is-on{ color: var(--text); background: color-mix(in srgb, var(--chip-color) 12%, var(--bg)); border-color: var(--chip-color); }

/* tint chips by category */
.chip[data-cat="academic"]  { --chip-color: var(--cat-academic); }
.chip[data-cat="conference"]{ --chip-color: var(--cat-conference); }
.chip[data-cat="journal"]   { --chip-color: var(--cat-journal); }

/* timeline spine (parametric, dot centered on spine) */
.timeline{
  --gutter: 1.5rem;   /* distance from item content to the spine */
  --dot: .9rem;       /* dot diameter */
  --spine: 2px;       /* spine thickness */
  list-style: none;
  margin: 1rem 0 4rem var(--gutter);
  padding-left: var(--gutter);
  position: relative;
}
.timeline::before{
  content:"";
  position:absolute; left: 0; top: 0; bottom: 0;
  width: var(--spine);
  background: var(--hair);
}

/* each entry */
.tl-item{ position: relative; margin: 1.25rem 0 2rem; }
.tl-item::before{
  content:"";
  position: absolute;
  top: 40%;
  left: calc(-1 * var(--gutter) + var(--spine) / 2);   /* anchor at the spine */
  transform: translateX(-50%);     /* shift half the dot width left */
  width: var(--dot); height: var(--dot);
  border-radius: 45%;
  background: var(--bg);
  box-shadow: 0 0 0 2px var(--hair), inset 0 0 0 2px var(--cat);
}

/* color by category (sets --cat for dot + card border) */
.tl-item[data-cat~="academic"]  { --cat: var(--cat-academic); }
.tl-item[data-cat~="conference"]{ --cat: var(--cat-conference); }
.tl-item[data-cat~="journal"]   { --cat: var(--cat-journal); }

.tl-card{
  background: var(--bg);
  border: 2px solid var(--rule);
  border-left: 6px solid var(--cat, var(--accent));
  border-radius: 12px;
  padding: 1rem 1.25rem;
  box-shadow: 0 1px 0 rgba(0,0,0,.02);
}
.tl-card h3{ margin: 0 0 .35rem; font-size: 1.05rem; font-weight: 600; }
.tl-card .authors, .tl-card .venue{ display:flex;  align-items:center;  gap:.35rem;  flex-wrap:wrap; margin: .25rem 0; color: var(--muted); font-size: .92rem; }
.tl-card .label{ font-weight: 600; color: var(--text); }

.tl-card .venue .tags{
  margin-left:0;            /* pushes tags to the right */
  display:inline-flex;
  gap:.5rem;
  white-space:nowrap;
}

/* contribution extras */
.venue .sep{ opacity:.45; margin: 0 .35rem; }
.venue a.soon{ opacity:.55; pointer-events:none; cursor: default; }

/* hide filtered items cleanly */
.tl-item[hidden]{ display:none !important; }

/* Work card titles: black text, fade on hover (no underline) */
.tl-card h3 a,
.tl-card h3 a:visited{
  color: var(--text);
  text-decoration: none;
}
.tl-card h3 a:hover{ opacity: .9; }
.tl-card h3 a:focus-visible{
  outline: 2px solid color-mix(in srgb, var(--text) 30%, transparent);
  outline-offset: 2px;
}


.tags{
  display:flex;
  flex-wrap:wrap;
  gap:.5rem;
  margin:.35rem 0 .2rem;
}

.tag{
  display:inline-block;
  padding:.25rem .6rem;
  border:1px solid var(--hair);
  border-radius:999px;
  background: color-mix(in srgb, var(--hair) 12%, var(--bg));
  color: var(--muted);
  font-size:.88rem;
  line-height:1.1;
  text-decoration:none;      /* remove underline */
  white-space:nowrap;
}

.tag:hover{
  border-color: var(--accent);
  color: var(--text);
}

/* optional tints by type (work timeline) */
.tag[data-type="poster"]{ border-color:#5bb5f0; }
.tag[data-type="oral"]  { border-color:#f0a95b; }
.tag[data-type="award"] { border-color:#c24a4a; }


/* Optional: nicer long-page scrolling */
html{ scroll-behavior: smooth; }
