/* Minimal, build-free academic stylesheet for preet-sojitra.github.io */

:root {
  --bg: #fcfcfb;
  --surface: #f5f4f1;
  --surface-hover: #efede8;
  --ink-strong: #111318;
  --ink: #3f4650;
  --ink-muted: #66707d;
  --ink-faint: #8c95a2;
  --line: #e6e4df;
  --line-strong: #d5d2ca;
  --accent: #a91d22;
  --accent-hover: #881519;
  --accent-soft: #fbf2f2;
  --accent-border: #efcaca;
  --status-dot: #15803d;
  --font-serif: "Source Serif 4", Georgia, "Times New Roman", serif;
  --font-sans: "Inter", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-mono: "IBM Plex Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
  --max: 800px;
}

:root[data-theme="dark"] {
  --bg: #0f1115;
  --surface: #161920;
  --surface-hover: #1d212b;
  --ink-strong: #f2f4f8;
  --ink: #c5ccd6;
  --ink-muted: #8f98a6;
  --ink-faint: #67707e;
  --line: #232732;
  --line-strong: #323847;
  --accent: #f07178;
  --accent-hover: #ff8e94;
  --accent-soft: #261619;
  --accent-border: #4a242a;
  --status-dot: #4ade80;
}

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

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

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-sans);
  font-size: 15.5px;
  line-height: 1.68;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

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

a {
  color: var(--accent);
  text-decoration: none;
  text-underline-offset: 3px;
  transition: color 0.15s ease, background-color 0.15s ease, border-color 0.15s ease;
}
a:hover {
  color: var(--accent-hover);
  text-decoration: underline;
}
a:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
  border-radius: 3px;
}

p {
  margin: 0 0 14px;
}

strong {
  color: var(--ink-strong);
  font-weight: 600;
}
a strong {
  color: inherit;
}

code {
  font-family: var(--font-mono);
  font-size: 0.86em;
  background: var(--surface);
  color: var(--ink-strong);
  padding: 1px 5px;
  border-radius: 4px;
  border: 1px solid var(--line);
}

/* ---------- Header ---------- */
.site-header {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 10px 24px;
  padding-bottom: 18px;
  margin-bottom: 48px;
  border-bottom: 1px solid var(--line);
}
.site-name {
  font-family: var(--font-serif);
  font-size: 19px;
  font-weight: 600;
  color: var(--ink-strong);
  letter-spacing: -0.01em;
}
.site-name:hover {
  color: var(--accent);
  text-decoration: none;
}
.site-nav {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px 20px;
  font-size: 14.5px;
}
.site-nav a {
  color: var(--ink-muted);
  font-weight: 450;
}
.site-nav a:hover,
.site-nav a[aria-current="page"] {
  color: var(--ink-strong);
  text-decoration: none;
}
.site-nav a[aria-current="page"] {
  font-weight: 600;
}

.theme-toggle {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 6px;
  width: 30px;
  height: 30px;
  padding: 0;
  margin: 0;
  cursor: pointer;
  color: var(--ink-muted);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: color 0.15s ease, background-color 0.15s ease, border-color 0.15s ease;
}
.theme-toggle:hover {
  color: var(--ink-strong);
  background: var(--surface-hover);
  border-color: var(--line-strong);
}
.theme-toggle:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}
.theme-toggle svg {
  width: 15px;
  height: 15px;
}
.theme-toggle .icon-sun {
  display: none;
}
:root[data-theme="dark"] .theme-toggle .icon-sun {
  display: block;
}
:root[data-theme="dark"] .theme-toggle .icon-moon {
  display: none;
}

/* ---------- Intro ---------- */
.intro {
  display: flex;
  gap: 44px;
  align-items: flex-start;
  margin-bottom: 56px;
}
.intro-text {
  flex: 1;
  min-width: 0;
}
.intro h1 {
  font-family: var(--font-serif);
  font-size: 34px;
  line-height: 1.15;
  font-weight: 600;
  color: var(--ink-strong);
  letter-spacing: -0.02em;
  margin: 0 0 6px;
}
.tagline {
  color: var(--ink-muted);
  font-size: 15.5px;
  margin-bottom: 20px;
}
.tagline .sep {
  margin: 0 6px;
  color: var(--ink-faint);
}

.avatar {
  flex-shrink: 0;
  width: 210px;
  height: 210px;
  margin-top: 6px;
  border-radius: 50%;
  overflow: hidden;
  background: var(--surface);
  border: 1px solid var(--line);
  box-shadow: 0 6px 24px rgba(17, 19, 24, 0.06);
}
:root[data-theme="dark"] .avatar {
  box-shadow: 0 6px 24px rgba(0, 0, 0, 0.35);
}
.avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 50% 20%;
  transform: scale(1.18);
  display: block;
}

.open-to {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  background: var(--accent-soft);
  border: 1px solid var(--accent-border);
  border-left: 3px solid var(--accent);
  padding: 11px 14px;
  border-radius: 6px;
  font-size: 14.5px;
  line-height: 1.55;
  color: var(--ink);
  margin: 20px 0;
}
.status-dot {
  flex-shrink: 0;
  width: 8px;
  height: 8px;
  margin-top: 7px;
  border-radius: 50%;
  background: var(--status-dot);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--status-dot) 20%, transparent);
}

.links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 20px;
}
.links a {
  display: inline-flex;
  align-items: center;
  padding: 4px 11px;
  font-size: 13.5px;
  font-weight: 500;
  color: var(--ink-strong);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 6px;
}
.links a:hover {
  color: var(--accent);
  background: var(--accent-soft);
  border-color: var(--accent-border);
  text-decoration: none;
}

/* ---------- Page Header (subpages like projects.html) ---------- */
.page-intro {
  margin-bottom: 44px;
}
.page-intro h1 {
  font-family: var(--font-serif);
  font-size: 30px;
  line-height: 1.2;
  font-weight: 600;
  color: var(--ink-strong);
  letter-spacing: -0.02em;
  margin: 0 0 8px;
}
.page-intro p {
  color: var(--ink-muted);
  font-size: 15.5px;
  margin: 0;
}

/* ---------- Sections ---------- */
section {
  margin-bottom: 52px;
}
h2 {
  font-family: var(--font-serif);
  font-size: 21px;
  font-weight: 600;
  letter-spacing: -0.015em;
  color: var(--ink-strong);
  margin: 0 0 22px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--line);
  display: flex;
  align-items: baseline;
  justify-content: space-between;
}
h2 .section-count {
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 400;
  color: var(--ink-faint);
}

/* ---------- News ---------- */
.news {
  list-style: none;
  padding: 0;
  margin: 0;
}
.news li {
  display: flex;
  align-items: baseline;
  gap: 16px;
  padding: 8px 0;
  border-bottom: 1px dashed var(--line);
}
.news li:first-child {
  padding-top: 0;
}
.news li:last-child {
  border-bottom: 0;
  padding-bottom: 0;
}
.news time {
  flex-shrink: 0;
  width: 78px;
  font-family: var(--font-mono);
  color: var(--ink-faint);
  font-size: 12.5px;
  font-variant-numeric: tabular-nums;
}

/* ---------- Entries (Publications / Experience / Projects) ---------- */
.entry {
  padding: 18px 0;
  border-top: 1px solid var(--line);
}
.entry:first-of-type {
  border-top: 0;
  padding-top: 0;
}
.entry:last-of-type {
  padding-bottom: 0;
}

/* Featured publication highlight */
.entry.pub {
  padding: 18px 20px;
  margin-bottom: 16px;
  border: 1px solid var(--line);
  border-left: 3px solid var(--line-strong);
  border-radius: 8px;
  background: var(--bg);
  transition: border-color 0.15s ease, background-color 0.15s ease;
}
.entry.pub.featured {
  border-left-color: var(--accent);
  background: color-mix(in srgb, var(--surface) 55%, var(--bg));
}
.entry.pub:hover {
  border-color: var(--line-strong);
  border-left-color: var(--accent);
}
.entry.pub:last-of-type {
  margin-bottom: 0;
  padding-bottom: 18px;
}

/* Optional left teaser thumbnail for visual papers / projects */
.entry-media-row {
  display: flex;
  align-items: flex-start;
  gap: 20px;
}
.entry-thumb {
  flex-shrink: 0;
  width: 200px;
  display: block;
  border-radius: 6px;
  overflow: hidden;
  border: 1px solid var(--line);
  background: #ffffff;
  transition: border-color 0.15s ease, transform 0.15s ease;
}
.entry-thumb img {
  width: 100%;
  height: auto;
  display: block;
}
.entry-thumb:hover {
  border-color: var(--accent-border);
  transform: translateY(-1px);
  text-decoration: none;
}
.entry-body {
  flex: 1;
  min-width: 0;
}

.pub-meta-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
}

.entry-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 4px 16px;
  flex-wrap: wrap;
}
.entry h3 {
  font-size: 16.5px;
  font-weight: 600;
  line-height: 1.4;
  color: var(--ink-strong);
  margin: 0;
  letter-spacing: -0.01em;
}
.entry .org {
  font-weight: 450;
  color: var(--ink-muted);
}
.entry .org::before {
  content: "·";
  margin: 0 7px;
  color: var(--ink-faint);
}
.entry .date {
  font-family: var(--font-mono);
  color: var(--ink-faint);
  font-size: 12.5px;
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}

.meta {
  color: var(--ink-muted);
  font-size: 14px;
  margin: 4px 0 0;
}
.meta em {
  font-style: italic;
}

.authors {
  color: var(--ink-muted);
  font-size: 14px;
  line-height: 1.55;
  margin: 6px 0 0;
}
.authors .me {
  color: var(--ink-strong);
  font-weight: 600;
  text-decoration: underline;
  text-decoration-color: var(--accent-border);
  text-underline-offset: 3px;
}
.note {
  color: var(--ink-faint);
  font-size: 12.5px;
  margin: 4px 0 0;
}

.entry p.desc {
  margin: 9px 0 0;
  font-size: 14.5px;
  color: var(--ink);
  line-height: 1.62;
}
.entry ul {
  margin: 10px 0 0;
  padding-left: 18px;
  font-size: 14.5px;
  line-height: 1.62;
}
.entry li {
  margin-bottom: 6px;
}
.entry li:last-child {
  margin-bottom: 0;
}
.entry li::marker {
  color: var(--ink-faint);
}

/* Badges & Tags */
.badge {
  display: inline-flex;
  align-items: center;
  font-family: var(--font-mono);
  font-size: 11.5px;
  font-weight: 500;
  letter-spacing: 0.01em;
  color: var(--accent);
  background: var(--accent-soft);
  border: 1px solid var(--accent-border);
  padding: 1px 8px;
  border-radius: 999px;
  line-height: 1.6;
}
.badge.neutral {
  color: var(--ink-muted);
  background: var(--surface);
  border-color: var(--line);
}
.entry h3 .badge {
  vertical-align: 1px;
  margin-left: 8px;
}

.tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 10px;
}
.tag {
  font-family: var(--font-mono);
  font-size: 11.5px;
  color: var(--ink-muted);
  background: var(--surface);
  border: 1px solid var(--line);
  padding: 1px 7px;
  border-radius: 4px;
}

/* Action links (arXiv, GitHub, Demo, etc.) */
.entry-links {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 7px;
  margin-top: 12px;
}
.entry-links a {
  display: inline-flex;
  align-items: center;
  font-family: var(--font-mono);
  font-size: 12.5px;
  font-weight: 500;
  color: var(--accent);
  background: var(--bg);
  border: 1px solid var(--line);
  padding: 2px 9px;
  border-radius: 5px;
  line-height: 1.55;
}
.entry-links a:hover {
  background: var(--accent-soft);
  border-color: var(--accent-border);
  color: var(--accent-hover);
  text-decoration: none;
}
.entry-links .soon {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--ink-faint);
  margin-left: 2px;
}

.more {
  margin-top: 22px;
  padding-top: 16px;
  border-top: 1px solid var(--line);
  font-size: 14.5px;
  font-weight: 500;
}

/* ---------- Footer ---------- */
.site-footer {
  border-top: 1px solid var(--line);
  padding-top: 20px;
  color: var(--ink-faint);
  font-size: 13px;
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px;
}

/* ---------- Responsive ---------- */
@media (max-width: 760px) {
  .avatar {
    width: 170px;
    height: 170px;
  }
}

@media (max-width: 600px) {
  .wrap {
    padding: 24px 18px 48px;
  }
  .site-header {
    margin-bottom: 34px;
  }
  .intro {
    flex-direction: column-reverse;
    gap: 20px;
    margin-bottom: 44px;
  }
  .intro h1 {
    font-size: 29px;
  }
  .avatar {
    width: 124px;
    height: 124px;
  }
  .entry.pub {
    padding: 15px 16px;
  }
  .entry-media-row {
    flex-direction: column;
    gap: 14px;
  }
  .entry-thumb {
    width: 100%;
    max-width: 320px;
  }
  .entry .org::before {
    display: none;
  }
  .entry .org {
    display: block;
    font-size: 14.5px;
    margin-top: 1px;
  }
  .news li {
    flex-direction: column;
    gap: 2px;
  }
}
