/* Adwait Jog — site styles */

:root {
  --navy: #232d4b;
  --orange: #e57200;
  --bg: #ffffff;
  --surface: #f6f7f9;
  --text: #1c2130;
  --muted: #5c6475;
  --border: #e3e6ec;
  --link: #1f4e96;
  --link-hover: #c25e00;
  --header-bg: var(--navy);
  --header-text: #ffffff;
  --badge-bg: #e9edf5;
  --badge-text: #232d4b;
  --award: #a34700;
  --radius: 8px;
  --maxw: 1080px;
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #12151d;
    --surface: #1a1e29;
    --text: #e6e8ee;
    --muted: #9aa2b3;
    --border: #2a3040;
    --link: #8cb4ff;
    --link-hover: #ffa24d;
    --header-bg: #0c0f16;
    --badge-bg: #252c3e;
    --badge-text: #d6ddf0;
    --award: #ffab5e;
  }
}

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 16px/1.6 var(--font);
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

a { color: var(--link); text-decoration: none; }
a:hover { color: var(--link-hover); text-decoration: underline; }
a:focus-visible, button:focus-visible, input:focus-visible {
  outline: 2px solid var(--orange);
  outline-offset: 2px;
}

h1, h2, h3 { line-height: 1.25; margin: 0 0 .6em; font-weight: 650; letter-spacing: -.01em; }
h2 { font-size: 1.3rem; }
p { margin: 0 0 1em; }
.muted { color: var(--muted); }

.container { width: 100%; max-width: var(--maxw); margin: 0 auto; padding-left: 20px; padding-right: 20px; }

.skip-link { position: absolute; left: -999px; }
.skip-link:focus { left: 12px; top: 12px; z-index: 10; background: var(--bg); padding: 6px 10px; }

/* Header */
.site-header { background: var(--header-bg); border-bottom: 3px solid var(--orange); }
.header-inner {
  display: flex; align-items: center; justify-content: space-between;
  flex-wrap: wrap; gap: 8px 24px; padding-top: 14px; padding-bottom: 14px;
}
.site-title { color: var(--header-text); font-weight: 700; font-size: 1.15rem; letter-spacing: .01em; }
.site-title:hover { color: var(--header-text); text-decoration: none; }
.site-nav { display: flex; flex-wrap: wrap; gap: 4px 22px; }
.site-nav a { color: rgba(255,255,255,.82); font-size: .95rem; padding: 2px 0; border-bottom: 2px solid transparent; }
.site-nav a:hover { color: #fff; text-decoration: none; border-bottom-color: rgba(255,255,255,.5); }
.site-nav a[aria-current="page"] { color: #fff; border-bottom-color: var(--orange); }
.site-nav .ext { font-size: .75em; margin-left: 2px; opacity: .7; }

main { flex: 1; padding-top: 40px; padding-bottom: 56px; }

/* Footer */
.site-footer { border-top: 1px solid var(--border); background: var(--surface); color: var(--muted); font-size: .875rem; }
.footer-inner { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 6px 20px; padding-top: 18px; padding-bottom: 18px; }
.site-footer a { color: var(--muted); }

/* Home */
.home { display: grid; grid-template-columns: 280px minmax(0, 1fr); gap: 48px; align-items: start; }
.profile { position: sticky; top: 24px; }
.profile-photo { width: 100%; height: auto; aspect-ratio: 1 / 1; object-fit: cover; object-position: 50% 30%; border-radius: var(--radius); display: block; margin-bottom: 18px; }
.profile-name { font-size: 1.6rem; margin-bottom: .3em; }
.profile-role { font-weight: 550; margin-bottom: .8em; }
.profile-role .muted { font-weight: 400; }
.profile-affil { color: var(--muted); font-size: .95rem; }
.profile-email a { font-weight: 550; }
.profile-links { list-style: none; padding: 16px 0 0; margin: 0; border-top: 1px solid var(--border); display: flex; flex-wrap: wrap; gap: 8px; }
.profile-links a {
  display: inline-block; font-size: .85rem; padding: 4px 10px; border: 1px solid var(--border);
  border-radius: 999px; color: var(--text);
}
.profile-links a:hover { border-color: var(--orange); color: var(--link-hover); text-decoration: none; }

.home-main section { margin-bottom: 40px; }
.home-main section:last-child { margin-bottom: 0; }
.home-main h2 { padding-bottom: 8px; border-bottom: 1px solid var(--border); }
.section-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; border-bottom: 1px solid var(--border); margin-bottom: .6em; }
.section-head h2 { border: 0; padding-bottom: 8px; margin: 0; }
.more { font-size: .9rem; white-space: nowrap; }

.highlights { list-style: none; padding: 0; margin: 0; display: grid; gap: 12px; }
.highlights li { background: var(--surface); border-left: 3px solid var(--orange); border-radius: 0 var(--radius) var(--radius) 0; padding: 12px 16px; }
.hl-tag { display: inline-block; font-size: .72rem; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: var(--award); margin-right: 6px; }

.course-list { list-style: none; padding: 0; margin: 0; }
.course-list li { padding: 6px 0; }
.course-term { display: inline-block; min-width: 110px; color: var(--muted); font-size: .9rem; font-variant-numeric: tabular-nums; }
.course-code { font-weight: 650; }

/* Page headers */
.page-header { margin-bottom: 28px; }
.page-header h1 { font-size: 2rem; margin-bottom: .3em; }
.page-links { color: var(--muted); }

/* Publications */
.pub-list { list-style: none; padding: 0; margin: 0; }
.pub { display: grid; grid-template-columns: 150px minmax(0, 1fr); gap: 16px; padding: 16px 0; border-bottom: 1px solid var(--border); }
.pub:last-child { border-bottom: 0; }
.pub-meta { display: flex; flex-direction: column; align-items: flex-start; gap: 6px; }
.badge {
  display: inline-block; font-size: .75rem; font-weight: 650; line-height: 1.3; padding: 3px 8px;
  border-radius: 4px; background: var(--badge-bg); color: var(--badge-text); white-space: nowrap;
}
.badge-conference { background: var(--navy); color: #fff; }
.badge-note { background: transparent; border: 1px solid var(--border); color: var(--muted); font-weight: 500; }
@media (prefers-color-scheme: dark) {
  .badge-conference { background: #3a4a78; }
}
.pub-title { font-weight: 600; line-height: 1.4; margin-bottom: 2px; }
.pub-title a { color: var(--text); }
.pub-title a:hover { color: var(--link-hover); }
.pub-authors { font-size: .93rem; }
.pub-authors strong { font-weight: 650; }
.pub-venue { font-size: .9rem; color: var(--muted); font-style: italic; }
.pub-acc { font-style: normal; }
.pub-awards { margin-top: 4px; }
.award { display: inline-block; font-size: .85rem; font-weight: 600; color: var(--award); margin-right: 12px; }
.pub-links { margin-top: 6px; display: flex; flex-wrap: wrap; gap: 6px; }
.pub-links a {
  font-size: .78rem; font-weight: 550; padding: 1px 8px; border: 1px solid var(--border);
  border-radius: 4px; color: var(--link);
}
.pub-links a:hover { border-color: var(--orange); text-decoration: none; }

.pub-list.compact .pub { grid-template-columns: 120px minmax(0, 1fr); padding: 12px 0; }
.pub-list.compact .pub-venue { display: none; }

.pub-tools { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 12px; position: sticky; top: 0; background: var(--bg); padding: 10px 0; z-index: 2; border-bottom: 1px solid var(--border); }
.pub-tools[hidden] { display: none; }
.filters { display: flex; flex-wrap: wrap; gap: 6px; }
.filters button {
  font: inherit; font-size: .85rem; padding: 4px 12px; border-radius: 999px; cursor: pointer;
  border: 1px solid var(--border); background: var(--bg); color: var(--text);
}
.filters button:hover { border-color: var(--orange); }
.filters button[aria-pressed="true"] { background: var(--navy); border-color: var(--navy); color: #fff; }
.pub-search {
  font: inherit; font-size: .9rem; padding: 6px 12px; min-width: 240px; flex: 0 1 300px;
  border: 1px solid var(--border); border-radius: 6px; background: var(--bg); color: var(--text);
}
.year-group { margin-top: 24px; }
.year-group[hidden] { display: none; }
.year { font-size: 1.1rem; color: var(--muted); font-variant-numeric: tabular-nums; margin-bottom: 0; padding-bottom: 6px; border-bottom: 2px solid var(--border); }
.pub[hidden] { display: none; }
.empty-note { color: var(--muted); padding: 24px 0; }

.disclaimer { margin-top: 48px; padding: 16px 18px; background: var(--surface); border-radius: var(--radius); font-size: .8rem; color: var(--muted); }
.disclaimer p { margin: 0; }

/* Teaching */
.teach-group { margin-bottom: 36px; }
.teach-group h2 { padding-bottom: 8px; border-bottom: 1px solid var(--border); }
.course-table { list-style: none; padding: 0; margin: 0; }
.course-table li { display: grid; grid-template-columns: 130px minmax(0, 1fr); gap: 16px; padding: 8px 0; border-bottom: 1px solid var(--border); }
.course-table li:last-child { border-bottom: 0; }
.course-table .course-term { min-width: 0; padding-top: 1px; }
.course-detail { display: block; font-size: .9rem; color: var(--muted); margin-top: 2px; }

/* Responsive */
@media (max-width: 820px) {
  .home { grid-template-columns: 1fr; gap: 32px; }
  .profile { position: static; display: grid; grid-template-columns: 140px minmax(0, 1fr); column-gap: 20px; align-items: start; }
  .profile-photo { grid-row: span 4; margin: 0; }
  .profile-links { grid-column: 1 / -1; margin-top: 12px; }
}
@media (max-width: 560px) {
  .container { padding-left: 16px; padding-right: 16px; }
  main { padding-top: 28px; }
  .profile { grid-template-columns: 96px minmax(0, 1fr); column-gap: 14px; }
  .profile-name { font-size: 1.35rem; }
  .pub, .pub-list.compact .pub { grid-template-columns: 1fr; gap: 6px; }
  .pub-meta { flex-direction: row; flex-wrap: wrap; }
  .course-table li { grid-template-columns: 1fr; gap: 0; }
  .pub-search { min-width: 0; flex: 1 1 100%; }
  .pub-tools { position: static; }
}

/* News */
.news-list { list-style: none; padding: 0; margin: 0; }
.news-list li { display: grid; grid-template-columns: 110px minmax(0, 1fr); gap: 16px; padding: 7px 0; border-bottom: 1px solid var(--border); }
.news-list li:last-child { border-bottom: 0; }
.news-date { color: var(--muted); font-size: .9rem; font-variant-numeric: tabular-nums; padding-top: 1px; }

/* Research group */
.lede { font-size: 1.1rem; color: var(--muted); max-width: 46em; }
.group-section { margin-bottom: 44px; }
.group-section > h2 { padding-bottom: 8px; border-bottom: 1px solid var(--border); }
.group-section h3 { font-size: 1rem; margin: 20px 0 10px; color: var(--muted); text-transform: uppercase; letter-spacing: .05em; font-size: .8rem; }
.member { background: var(--surface); border-radius: var(--radius); padding: 14px 16px; border-top: 3px solid var(--navy); }
.member-name { display: block; font-weight: 650; font-size: 1.05rem; color: var(--text); }
.member-role { display: block; font-size: .9rem; color: var(--muted); margin-top: 2px; }
.member { position: relative; }
.member-collab { background: transparent; border: 1px dashed var(--border); border-top: 3px solid var(--orange); }
.member-co { display: block; font-size: .85rem; color: var(--muted); margin-top: 4px; font-style: italic; }
.alumni-cols { display: grid; grid-template-columns: 1fr 1fr; gap: 8px 40px; }
.plain { list-style: none; padding: 0; margin: 0; }
.plain li { padding: 3px 0; font-size: .95rem; }
@media (prefers-color-scheme: dark) {
  .member { border-top-color: #5a6c9e; }
}
@media (max-width: 560px) {
  .news-list li { grid-template-columns: 1fr; gap: 0; }
  .alumni-cols { grid-template-columns: 1fr; }
}

/* Touch devices (phones, iPad): larger tap targets */
@media (pointer: coarse) {
  .site-nav a { padding: 8px 0; }
  .pub-links { gap: 8px; }
  .pub-links a { padding: 6px 12px; font-size: .82rem; }
  .filters button { padding: 8px 14px; }
  .profile-links a { padding: 8px 14px; }
  .pub-search { padding: 10px 12px; font-size: 1rem; }
}

/* Don't pin the sidebar when it could be taller than the screen */
@media (max-height: 800px) {
  .profile { position: static; }
}
.diss-link { font-size: .85rem; font-weight: 500; }

/* People: current members and Ph.D. alumni side by side */
.people-cols { display: grid; grid-template-columns: 1fr 1fr; gap: 0 32px; align-items: start; }
.people-col > h3:first-child { margin-top: 8px; }
.member-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; }
.member-alum { border-top-color: var(--muted); }
.member-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
.member-head .member-name { display: inline; }
.member-year { font-size: .8rem; font-weight: 600; color: var(--muted); white-space: nowrap; font-variant-numeric: tabular-nums; }
@media (max-width: 720px) {
  .people-cols { grid-template-columns: 1fr; }
  .people-col + .people-col { margin-top: 12px; }
}
