:root {
  color-scheme: light;
  --bg: #EFF7FA;
  --panel: rgba(255, 255, 255, 0.86);
  --panel-border: rgba(0, 0, 0, 0.08);
  --text: #222222;
  --muted: #444;
  /* Aditya light-mode accent */
  --accent: #FF4E50;
  --accent-strong: #FF4E50;
  --shadow: 0 18px 60px rgba(0, 0, 0, 0.12);
  --radius: 14px;
  --maxw: 1240px;
  --content-pad: 34px;
}

* { box-sizing: border-box; }

html, body { min-height: 100%; }

body {
  margin: 0;
  font-family: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, "Apple Color Emoji", "Segoe UI Emoji";
  line-height: 1.65;
  color: var(--text);
  background-color: var(--bg);
}

a {
  color: inherit;
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.18em;
  text-decoration-skip-ink: auto;
}

a:hover { text-decoration-thickness: 2px; }

/* Overlay container (the “card” in the screenshot) */
#overlay {
  width: 100%;
  max-width: var(--maxw);
  margin: 22px auto;
  padding: calc(var(--content-pad) + 6px) var(--content-pad);
  background: var(--panel);
  border: 1px solid var(--panel-border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  backdrop-filter: blur(10px);
}

header {
  text-align: center;
  margin-bottom: 22px;
}

header h1 {
  margin: 0;
  font-weight: 800;
  letter-spacing: -0.02em;
  font-size: clamp(40px, 5vw, 82px);
  line-height: 1.05;
  color: var(--accent-strong);
}

nav {
  margin-top: 12px;
  margin-bottom: 6px;
  display: flex;
  flex-wrap: wrap;
  gap: 10px 18px;
  justify-content: center;
}

.fancy-link {
  display: inline-block;
  padding: 0 4px;
  font-weight: 600;
  font-size: 1.1rem;
  text-decoration-thickness: 3px;
  text-underline-offset: 0.22em;
  text-decoration-color: var(--accent);
  text-decoration-skip-ink: auto;
  transition: background-color 0.18s ease, color 0.18s ease, text-decoration-color 0.18s ease;
  border-radius: 4px;
}

.fancy-link:hover {
  background: var(--accent);
  color: white;
  text-decoration-color: transparent;
}

main { margin-top: 12px; }

.main-container {
  display: flex;
  flex-wrap: wrap;
  gap: 22px;
  align-items: flex-start;
}

.left-column {
  flex: 1;
  min-width: 220px;
  padding: 10px;
}

.right-column {
  flex: 3;
  min-width: 320px;
  padding: 10px;
}

.profile-pic {
  width: 160px;
  height: 160px;
  border-radius: 999px;
  object-fit: cover;
  display: block;
  border: 2px solid var(--panel-border);
}

.contact-links {
  margin-top: 14px;
  text-align: left;
}

.contact-item { margin-bottom: 10px; }
.contact-item:last-child { margin-bottom: 0; }

.contact-button {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100%;
}

.contact-button svg {
  width: 1.15em;
  height: 1.15em;
  margin-right: 10px;
  vertical-align: -0.2em;
  flex-shrink: 0;
}

section {
  padding: 10px;
  margin-bottom: 18px;
}

/* Tighten spacing between About -> Research on the homepage */
#about {
  margin-bottom: 8px;
}

h2 {
  margin: 0 0 10px 0;
  font-size: 2rem;
  font-weight: 800;
  color: var(--accent);
  border-bottom: 3px solid var(--accent);
  padding-bottom: 8px;
}

.section-lede {
  margin-top: 0;
  color: var(--muted);
}

.research-item {
  display: flex;
  align-items: flex-start;
  gap: 18px;
  margin: 18px 0 26px;
}

.paper-image-container img {
  width: 240px;
  height: auto;
  border-radius: 10px;
  object-fit: contain;
  border: 2px solid var(--panel-border);
  background: rgba(255, 255, 255, 0.04);
}

.paper-details p {
  margin: 0 0 8px 0;
}
.paper-details p:last-child { margin-bottom: 0; }

.paper-title {
  font-size: 1.15rem;
  font-weight: 800;
}

.paper-publication {
  color: var(--muted);
  font-style: italic;
}

.paper-links a { margin-right: 10px; }

.site-footer {
  margin-top: 8px;
  padding-top: 14px;
  border-top: 1px solid var(--panel-border);
  color: var(--muted);
  font-size: 0.95rem;
  text-align: right;
}

/* Blog styles (used by blog.html) */
#content {
  font-size: 16px;
  line-height: 1.75;
}

#content img {
  display: block;
  max-width: min(720px, 100%);
  height: auto;
  margin: 16px auto;
      border-radius: 10px;
  border: 1px solid var(--panel-border);
}

pre, code {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
  font-size: 0.95em;
}

pre {
  overflow: auto;
  padding: 14px 16px;
  border-radius: 12px;
  border: 1px solid var(--panel-border);
  background: rgba(255, 255, 255, 0.06);
}

pre { background: rgba(0, 0, 0, 0.04); }

.post-card {
  display: block;
  text-decoration: none;
  color: inherit;
  border: 1px solid var(--panel-border);
  border-radius: 12px;
  padding: 16px;
  background: rgba(255, 255, 255, 0.04);
  transition: transform 0.12s ease, background-color 0.12s ease, border-color 0.12s ease;
}

.post-card + .post-card { margin-top: 16px; }

.post-card:hover {
  transform: translateY(-1px);
  border-color: rgba(187, 134, 252, 0.35);
  background: rgba(187, 134, 252, 0.08);
}

.post-title {
  font-weight: 800;
  font-size: 1.25em;
  margin: 0 0 8px 0;
}

.post-date {
  color: var(--muted);
  font-size: 0.95em;
  margin: -4px 0 10px 0;
}

.post-summary p { margin: 0 0 8px 0; }

/* Responsive */
@media (max-width: 900px) {
  #overlay { margin: 0; border-radius: 0; }
  .paper-image-container img { width: 210px; }
}

@media (max-width: 640px) {
  .main-container { gap: 10px; }
  .right-column, .left-column { min-width: 100%; }
  .left-column { display: flex; gap: 14px; align-items: flex-start; }
  .profile-pic { width: 120px; height: 120px; }
  .contact-links { margin-top: 0; }
  .research-item { flex-direction: column; }
  .paper-image-container img { width: 100%; max-width: 420px; }
  }