/* Academic site — Angsuman Das.
   Olive on bone: a warm stone ground with one olive accent, Source Serif 4 for display,
   Libre Franklin for text. Hairlines, no shadows, no gradients. Motion: one hero entrance,
   one word-highlight on the research statement, and a quiet hover/press layer. */
:root {
  --bg: #efede6;
  --surface: #e7e4db;
  --ink: #1e2312;
  --muted: #565b4b;
  --line: #d5d1c4;
  --strong: #1e2312;
  --accent: #3d4a12;
  --accent-ink: #2b350b;
  --accent-soft: #dfe2cc;
  --dim: #b9b6aa;
  --focus: #b4532a;
  --serif: "Source Serif 4", "Source Serif Pro", Georgia, "Times New Roman", serif;
  --sans: "Libre Franklin", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --mono: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  --wrap: 74rem;
  --side: 15rem;
  --gap: clamp(4rem, 9vw, 7.5rem);
  --ease: cubic-bezier(.2, .8, .2, 1);
  --ease-enter: cubic-bezier(.22, 1, .36, 1);
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #14160f;
    --surface: #1c1f15;
    --ink: #e8e7df;
    --muted: #a9ab9c;
    --line: #2f3326;
    --strong: #e8e7df;
    --accent: #bccb7c;
    --accent-ink: #d3df9c;
    --accent-soft: #262c17;
    --dim: #4a4e40;
    --focus: #f0a46e;
  }
}
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 4.5rem; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 400 1.0625rem/1.65 var(--sans);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
::selection { background: var(--accent); color: var(--bg); }

/* Links: an underline that draws on hover */
a { color: var(--accent); text-decoration: none;
    background: linear-gradient(currentColor, currentColor) 0 100% / 100% 1px no-repeat;
    transition: background-size .15s var(--ease), color .15s var(--ease); }
a:hover { color: var(--accent-ink); background-size: 100% 2px; }
.ul-draw, .topnav a, .act a, .ids a, .ev a, .profiles a, footer a {
  background-size: 0 1px; background-position: 100% 100%;
}
.ul-draw:hover, .topnav a:hover, .act a:hover, .ids a:hover, .ev a:hover, .profiles a:hover, footer a:hover {
  background-size: 100% 1px; background-position: 0 100%;
}
:focus-visible { outline: 2px solid var(--focus); outline-offset: 3px; border-radius: 2px; }
.skip { position: absolute; left: -999px; top: 0; background: var(--bg); padding: .5rem 1rem; z-index: 20; }
.skip:focus { left: 1rem; top: 1rem; }
.wrap { width: min(var(--wrap), 100% - 2.5rem); margin-inline: auto; }
@media (min-width: 64rem) { .wrap { width: min(var(--wrap), 100% - 6rem); } }

/* Top bar */
.topbar { position: sticky; top: 0; z-index: 10; background: color-mix(in srgb, var(--bg) 92%, transparent);
  backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); border-bottom: 1px solid var(--line); }
.topbar .wrap { display: flex; align-items: center; gap: 1.5rem; min-height: 3.75rem; }
.brand { display: inline-flex; align-items: center; gap: .6rem; font: 500 1.0625rem/1 var(--serif);
  color: var(--ink); background: none; white-space: nowrap; flex: none; letter-spacing: -.01em; }
.brand::before { content: ""; width: .7rem; height: .7rem; border-radius: 50%; border: 2px solid var(--accent); flex: none; }
.brand:hover { color: var(--accent); }
.topnav { display: flex; gap: 1.6rem; overflow-x: auto; scrollbar-width: none; margin-left: auto; font-size: .875rem; }
.topnav::-webkit-scrollbar { display: none; }
.topnav a { color: var(--muted); white-space: nowrap; padding: .35rem 0; }
.topnav a:hover { color: var(--ink); }
.topnav a i { font: normal .6875rem var(--mono); color: var(--dim); margin-right: .35rem; }
.topbar .btn { min-height: 2.5rem; padding: .45rem 1rem; font-size: .875rem; }
@media (max-width: 60rem) { .topnav .opt { display: none; } }
@media (max-width: 40rem) { .topnav { display: none; } .topbar .btn { margin-left: auto; } }

/* Buttons: one pair, step on hover, press on click */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: .5rem; min-height: 2.875rem;
  padding: .65rem 1.25rem; border-radius: 999px; font: 500 .9375rem/1 var(--sans); border: 1px solid var(--accent);
  background: var(--accent); color: var(--bg); cursor: pointer;
  transition: transform .15s var(--ease), background-color .15s var(--ease), color .15s var(--ease), border-color .15s var(--ease); }
.btn:hover { background: var(--accent-ink); border-color: var(--accent-ink); color: var(--bg); transform: translateY(-1px); background-size: auto; }
.btn:active { transform: translateY(0) scale(.98); transition-duration: .09s; }
.btn.ghost { background: transparent; color: var(--ink); border-color: var(--line); }
.btn.ghost:hover { border-color: var(--ink); color: var(--ink); background: transparent; }
.btn .arr { transition: transform .15s var(--ease); }
.btn:hover .arr { transform: translateX(3px); }

/* Hero */
.hero { padding: clamp(4rem, 12vw, 8.5rem) 0 clamp(3.5rem, 8vw, 6rem); border-bottom: 1px solid var(--strong); }
.hero .wrap { display: grid; gap: 3rem 4rem; }
@media (min-width: 64rem) { .hero .wrap { grid-template-columns: minmax(0, 1fr) 19rem; align-items: end; } }
.eyebrow { font: 500 .75rem/1.4 var(--mono); letter-spacing: .08em; text-transform: uppercase; color: var(--muted); margin: 0 0 1.5rem; }
.eyebrow b { color: var(--accent); font-weight: 500; }
.hero h1 { font: 400 clamp(3.25rem, 11vw, 7.5rem)/.94 var(--serif); letter-spacing: -.035em; margin: 0 0 1.75rem; }
.hero h1 span { display: block; }
.role { font: 400 clamp(1.25rem, 2.6vw, 1.75rem)/1.3 var(--serif); margin: 0 0 .5rem; max-width: 34rem; letter-spacing: -.01em; }
.affil { color: var(--muted); margin: 0 0 2.25rem; }
.cta { display: flex; flex-wrap: wrap; gap: .75rem; margin-bottom: 2rem; }
.profiles { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: .25rem 1.5rem; font-size: .9375rem; }
.profiles a { color: var(--muted); display: inline-block; padding: .5rem 0; }
.profiles a:hover { color: var(--ink); }
.facts { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--line); }
.facts li { display: grid; grid-template-columns: 5.5rem 1fr; gap: 1rem; align-items: baseline; padding: 1rem 0; border-bottom: 1px solid var(--line); }
.facts b { font: 400 2.25rem/1 var(--serif); letter-spacing: -.02em; color: var(--accent); }
.facts span { font-size: .875rem; color: var(--muted); line-height: 1.4; }

/* Hero entrance: once, on load */
@media (prefers-reduced-motion: no-preference) {
  .js [data-enter] .main > :not(h1), .js [data-enter] h1 span, .js [data-enter] .facts li { animation: rise .9s var(--ease-enter) both; }
  .js [data-enter] h1 span:nth-child(2) { animation-delay: .08s; }
  .js [data-enter] .role { animation-delay: .18s; }
  .js [data-enter] .affil { animation-delay: .24s; }
  .js [data-enter] .cta { animation-delay: .32s; }
  .js [data-enter] .profiles { animation-delay: .38s; }
  .js [data-enter] .facts li:nth-child(1) { animation-delay: .34s; }
  .js [data-enter] .facts li:nth-child(2) { animation-delay: .42s; }
  .js [data-enter] .facts li:nth-child(3) { animation-delay: .5s; }
  .js [data-enter] .facts li:nth-child(4) { animation-delay: .58s; }
}
@keyframes rise { from { opacity: 0; transform: translateY(18px); } to { opacity: 1; transform: none; } }

/* Sections: number and title in a side column, content beside it */
section { padding: var(--gap) 0; border-bottom: 1px solid var(--line); }
section:last-of-type { border-bottom: 0; }
.sec { display: grid; gap: 1.5rem 4rem; }
@media (min-width: 64rem) { .sec { grid-template-columns: var(--side) minmax(0, 1fr); } .sec > header { position: sticky; top: 6rem; align-self: start; } }
.sec > header .no { display: block; font: 400 .75rem/1 var(--mono); color: var(--muted); margin-bottom: .9rem; }
h2 { font: 400 clamp(1.9rem, 3.6vw, 2.6rem)/1.08 var(--serif); letter-spacing: -.025em; margin: 0; }
h3 { font: 600 1.0625rem/1.35 var(--sans); margin: 0 0 .35rem; }
.lead { font-size: 1.125rem; margin: 0; max-width: 40rem; }
.note { font-size: .875rem; color: var(--muted); }
.kicker { font: 500 .75rem/1 var(--mono); letter-spacing: .08em; text-transform: uppercase; color: var(--muted); margin: 3rem 0 .5rem; }
.kicker:first-child { margin-top: .5rem; }

/* The research statement, set large; words light up as it scrolls through (moment) */
.statement { font: 400 clamp(1.4rem, 2.5vw, 1.95rem)/1.42 var(--serif); letter-spacing: -.012em; margin: 0; max-width: 46rem; }
.statement em { font-style: italic; color: var(--accent); }
.statement .w { transition: color .35s var(--ease); }
.statement.lit .w { color: var(--dim); }
.statement.lit .w.on { color: var(--ink); }
.statement.lit em .w.on { color: var(--accent); }

/* Projects: a hairline index, no boxes */
.plist { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--strong); }
.proj { display: grid; gap: .5rem 2.5rem; padding: 2rem 0; border-bottom: 1px solid var(--line); }
@media (min-width: 48rem) { .proj { grid-template-columns: minmax(0, 1fr) 13rem; } }
.proj .n { font: 400 .8125rem/1.9 var(--mono); color: var(--muted); }
.proj h3 { font: 400 1.6rem/1.2 var(--serif); letter-spacing: -.015em; margin: 0 0 .5rem; display: flex; flex-wrap: wrap; align-items: baseline; gap: .4rem .9rem; }
.status { font: 500 .6875rem/1 var(--mono); letter-spacing: .06em; text-transform: uppercase; color: var(--accent);
  border: 1px solid currentColor; border-radius: 999px; padding: .3rem .55rem; }
.proj p { margin: 0; color: var(--muted); }
.proj .body > p:first-of-type { color: var(--ink); max-width: 38rem; }
.proj .meta { font-size: .875rem; margin-top: .6rem; }
.tags { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: .3rem .9rem; align-content: start; font: 400 .8125rem/1.6 var(--mono); color: var(--muted); }
.tags li::before { content: "·"; margin-right: .4rem; color: var(--dim); }
.act { display: flex; flex-wrap: wrap; gap: .25rem 1.4rem; margin-top: .9rem; font-size: .9375rem; font-weight: 500; }
.act a { display: inline-flex; align-items: center; gap: .3rem; padding: .45rem 0; }
.act a::after { content: "→"; transition: transform .15s var(--ease); }
.act a:hover::after { transform: translateX(3px); }

/* Publications */
.pubs { list-style: none; padding: 0; margin: 0; counter-reset: pub; border-top: 1px solid var(--strong); }
.pubs li { padding: 1.25rem 0 1.25rem 3rem; border-bottom: 1px solid var(--line); position: relative; }
.pubs li::before { counter-increment: pub; content: counter(pub, decimal-leading-zero); position: absolute; left: 0; top: 1.45rem; font: 400 .8125rem/1 var(--mono); color: var(--muted); }
.pubs .t { display: block; font: 400 1.25rem/1.35 var(--serif); letter-spacing: -.01em; color: var(--ink); margin: .2rem 0 .3rem; }
.pubs li { color: var(--muted); font-size: .9688rem; }
.pubs .me { color: var(--ink); font-weight: 600; }
.pubs .v { font-style: italic; }
.pubs .ids { display: flex; flex-wrap: wrap; gap: .1rem 1.25rem; font-size: .875rem; font-weight: 500; margin-top: .35rem; }
.pubs .ids a { display: inline-block; padding: .4rem 0; }
.pubs + .note { margin-top: 1.5rem; }

/* Rows (skills, experience, awards, full CV) */
.rows { display: grid; margin: 0; border-top: 1px solid var(--strong); }
.row { display: grid; grid-template-columns: 1fr; gap: .25rem 2rem; padding: 1.4rem 0; border-bottom: 1px solid var(--line); }
@media (min-width: 44rem) { .row { grid-template-columns: 12rem 1fr; } }
.row dt { font: 400 1.15rem/1.35 var(--serif); color: var(--ink); }
.row dt.when { font: 400 .875rem/1.8 var(--mono); color: var(--muted); }
.row dd { margin: 0; }
.row dd strong { font-weight: 600; }
.row p { margin: .2rem 0 0; color: var(--muted); }
.row .ev { font-size: .875rem; font-weight: 500; margin-top: .4rem; display: flex; flex-wrap: wrap; gap: .1rem 1.25rem; }
.row .ev a { display: inline-block; padding: .4rem 0; }

/* Contact: the closing */
#contact { background: var(--accent); color: var(--bg); border-bottom: 0; }
#contact .no, #contact .contact span { color: color-mix(in srgb, var(--bg) 70%, var(--accent)); }
#contact h2 { color: var(--bg); }
#contact a { color: var(--bg); }
.mail { display: inline-block; font: 400 clamp(1.75rem, 5vw, 3.75rem)/1.1 var(--serif); letter-spacing: -.03em; margin: 0 0 2.5rem; word-break: break-word;
  background-size: 0 2px !important; background-position: 100% 100%; }
.mail:hover { background-size: 100% 2px !important; background-position: 0 100%; }
.contact { list-style: none; padding: 0; margin: 0; display: grid; gap: 0; border-top: 1px solid color-mix(in srgb, var(--bg) 35%, var(--accent)); }
.contact li { display: grid; grid-template-columns: 1fr; padding: .9rem 0; border-bottom: 1px solid color-mix(in srgb, var(--bg) 35%, var(--accent)); }
@media (min-width: 44rem) { .contact li { grid-template-columns: 12rem 1fr; gap: 2rem; } }
.contact span { font: 400 .8125rem/1.9 var(--mono); }
.contact a { justify-self: start; padding: .2rem 0; background-size: 0 1px; background-position: 100% 100%; }
.contact a:hover { background-size: 100% 1px; background-position: 0 100%; }

footer { padding: 2.25rem 0 3rem; color: var(--muted); font-size: .875rem; }
footer .wrap { display: flex; flex-wrap: wrap; justify-content: space-between; gap: .5rem 2rem; }
footer p { margin: 0; }

/* Full CV page */
.cv main section { padding: 2rem 0; border-bottom: 0; }
.cvhead { padding: 3.5rem 0 2rem; border-bottom: 1px solid var(--strong); }
.cvhead h1 { font: 400 clamp(2.6rem, 7vw, 4rem)/1 var(--serif); letter-spacing: -.03em; margin: 0 0 .9rem; }
.cvhead p { margin: .2rem 0; color: var(--muted); }
.cv h2 { font-size: 1.6rem; padding-bottom: .9rem; }
.cv .rows, .cv .pubs { border-top-color: var(--line); }
.printbtn { font: 500 .9375rem/1 var(--sans); min-height: 2.875rem; padding: .65rem 1.25rem; border-radius: 999px; border: 1px solid var(--accent);
  background: var(--accent); color: var(--bg); cursor: pointer; transition: transform .15s var(--ease), background-color .15s var(--ease); }
.printbtn:hover { background: var(--accent-ink); transform: translateY(-1px); }
.printbtn:active { transform: scale(.98); }

@media print {
  :root { --bg: #fff; --surface: #fff; --ink: #000; --muted: #333; --line: #bbb; --strong: #000; --accent: #000; }
  body { font-size: 10.5pt; line-height: 1.45; }
  .topbar, .noprint, .skip { display: none !important; }
  section, .cv main section { padding: .8rem 0; break-inside: auto; }
  .sec { display: block; }
  .row { break-inside: avoid; grid-template-columns: 9rem 1fr; padding: .4rem 0; }
  .pubs li { break-inside: avoid; padding: .35rem 0 .35rem 2rem; }
  .pubs li::before { top: .45rem; }
  .pubs .t { font-size: 11pt; }
  a { color: #000; background: none; }
  .wrap { width: 100%; }
}

/* Footer button */
footer .footbtn { display: inline-flex; align-items: center; gap: .5rem; min-height: 2.5rem; padding: .5rem 1rem; border: 1px solid var(--accent); border-radius: 999px;
  font: 500 .8125rem/1 var(--sans); color: var(--accent); background: none; transition: transform .15s var(--ease), background-color .15s var(--ease), color .15s var(--ease); }
footer .footbtn:hover { background: var(--accent); color: var(--bg); transform: translateY(-1px); }
footer .footbtn:active { transform: scale(.98); }

/* Profile links: brand icons in their own colours */
.profiles a { display: inline-flex; align-items: center; gap: .45rem; }
.profiles .i { width: 1.15em; height: 1.15em; flex: none; transition: transform .15s var(--ease); }
.profiles a:hover .i { transform: translateY(-1px); }
.profiles .cv .i { color: var(--accent); }
.profiles .orcid .i { color: #a6ce39; }
.profiles .rg .i { color: #00ccbb; }
.profiles .li .i { color: #0a66c2; }
.profiles .gh .i { color: #181717; }
.profiles .x .i { color: #000; }
@media (prefers-color-scheme: dark) {
  .profiles .li .i { color: #4c9be8; }
  .profiles .gh .i, .profiles .x .i { color: #f0f0ea; }
}
/* Profile links: small, one row */
.profiles { flex-wrap: nowrap; gap: 1.1rem; overflow-x: auto; scrollbar-width: none; font-size: .8125rem; }
.profiles::-webkit-scrollbar { display: none; }
.profiles li { flex: none; }
.profiles a { gap: .35rem; white-space: nowrap; }
.profiles .i { width: 14px; height: 14px; }
