/* ===========================================================================
   ankurani.com
   Structure follows Jon Barron's academic template, rebuilt with CSS Grid.
   No framework, no build step — edit this file and reload.
   =========================================================================== */

/* ---------------------------------------------------------------------------
   Tokens. The COMPLETE light palette lives here on bare :root; the dark block
   below overrides only what changes. Never give a color its sole definition
   inside the media query, or light mode loses it.
   --------------------------------------------------------------------------- */
:root {
  --bg: #fdfdfc;
  --surface: #ffffff;
  --text: #1b1b1d;
  --text-muted: #56595f;
  --text-faint: #8b8f97;
  --border: #e5e5e2;
  --border-strong: #d3d3cf;

  --accent: #1772d0;        /* Barron's link blue */
  --accent-hover: #f09228;  /* Barron's hover orange */

  --award-bg: #fff8e4;
  --award-text: #8a6a1c;
  --award-border: #f0e2b6;

  --chip-bg: #f1f2f4;
  --chip-text: #4a4d53;

  --maxw: 820px;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #15161a;
    --surface: #1c1e23;
    --text: #e9eaec;
    --text-muted: #a2a6ad;
    --text-faint: #777c85;
    --border: #2b2e35;
    --border-strong: #3a3e46;

    --accent: #63a6f0;
    --accent-hover: #ffb45e;

    --award-bg: #2d2615;
    --award-text: #f2c866;
    --award-border: #4a3e1f;

    --chip-bg: #24262c;
    --chip-text: #aeb2b9;
  }
}

/* ---------------------------------------------------------------------------
   Base
   --------------------------------------------------------------------------- */
* { box-sizing: border-box; }

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

body {
  margin: 0;
  padding: 0 24px 72px;
  background: var(--bg);
  color: var(--text);
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Helvetica, Arial, sans-serif;
  font-size: 15px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

.wrap {
  max-width: var(--maxw);
  margin: 0 auto;
}

a {
  color: var(--accent);
  text-decoration: none;
}

a:hover,
a:focus-visible {
  color: var(--accent-hover);
}

a:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
  border-radius: 2px;
}

p { margin: 0 0 12px; }

/* Section headings carry the thin rule Barron's template uses. */
section { margin-top: 44px; }

h2 {
  margin: 0 0 18px;
  padding-bottom: 7px;
  border-bottom: 1px solid var(--border);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--text-muted);
}

/* ---------------------------------------------------------------------------
   Hero
   --------------------------------------------------------------------------- */
.hero {
  display: grid;
  grid-template-columns: 1fr 215px;
  gap: 40px;
  align-items: start;
  padding-top: 64px;
}

h1 {
  margin: 0 0 4px;
  font-size: 34px;
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 1.15;
}

.role {
  margin: 0 0 18px;
  color: var(--text-muted);
  font-size: 15px;
}

.bio { max-width: 80ch; }

.bio p:last-child { margin-bottom: 0; }

.profile img {
  width: 100%;
  height: auto;
  aspect-ratio: 1;
  object-fit: cover;
  border-radius: 50%;
  display: block;
}

/* Contact row */
.contact {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 20px;
  margin-top: 20px;
}

.contact a {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 14px;
}

.contact svg {
  width: 15px;
  height: 15px;
  flex: none;
  stroke: currentColor;
  fill: none;
  stroke-width: 1.6;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* ---------------------------------------------------------------------------
   News — date gutter + item
   --------------------------------------------------------------------------- */
.news { display: grid; gap: 9px; }

.news-item {
  display: grid;
  grid-template-columns: 96px 1fr;
  gap: 16px;
  align-items: baseline;
}

.news-item time {
  color: var(--text-faint);
  font-size: 13px;
  font-variant-numeric: tabular-nums;
}

/* Collapsible blocks (earlier news, additional publications) */
details.more { margin-top: 14px; }

details.more > summary {
  cursor: pointer;
  list-style: none;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--text-muted);
  font-size: 13px;
  user-select: none;
}

details.more > summary::-webkit-details-marker { display: none; }

/* Drawn with borders rather than a ▸ glyph — Inter has no such character,
   so a text marker falls back to a mismatched font. */
details.more > summary::before {
  content: '';
  width: 0;
  height: 0;
  border-left: 5px solid currentColor;
  border-top: 4px solid transparent;
  border-bottom: 4px solid transparent;
  transition: transform 0.15s ease;
}

details.more[open] > summary::before { transform: rotate(90deg); }

details.more > summary:hover { color: var(--accent); }

details.more > *:not(summary) { margin-top: 14px; }

/* ---------------------------------------------------------------------------
   Publication entries
   --------------------------------------------------------------------------- */
.entry { margin-bottom: 26px; }

.entry:last-child { margin-bottom: 0; }

.entry h3 {
  margin: 0 0 3px;
  font-size: 15px;
  font-weight: 600;
  line-height: 1.4;
}

.authors {
  margin: 0 0 3px;
  font-size: 14px;
  color: var(--text-muted);
}

.authors strong { color: var(--text); font-weight: 600; }

.meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px 10px;
  margin-bottom: 7px;
  font-size: 13.5px;
}

.venue { color: var(--text-muted); font-style: italic; }

.award {
  display: inline-block;
  padding: 1px 7px;
  border: 1px solid var(--award-border);
  border-radius: 10px;
  background: var(--award-bg);
  color: var(--award-text);
  font-size: 11.5px;
  font-weight: 600;
  letter-spacing: 0.02em;
}

.chip {
  display: inline-block;
  padding: 1px 7px;
  border-radius: 10px;
  background: var(--chip-bg);
  color: var(--chip-text);
  font-size: 11.5px;
}

.summary {
  margin: 0 0 7px;
  color: var(--text-muted);
  font-size: 14px;
  max-width: 72ch;
}

/* Entries with no .meta row (no venue shown) would otherwise run the summary
   straight into the author list. */
.authors + .summary { margin-top: 7px; }

.links { font-size: 13.5px; }

.links a + a::before {
  content: '/';
  margin: 0 7px;
  color: var(--text-faint);
}

/* The Hugging Face mark sits slightly large next to 13.5px text. */
.links .hf {
  margin-right: 4px;
  font-size: 12px;
  line-height: 1;
}

/* Compact rows for the collapsed "additional publications" list */
.compact { display: grid; gap: 11px; }

.compact-item { font-size: 14px; }

.compact-item .t { font-weight: 600; }

.compact-item .m {
  color: var(--text-muted);
  font-size: 13.5px;
}

/* ---------------------------------------------------------------------------
   Talks, press, awards, service — shared list shapes
   --------------------------------------------------------------------------- */
.stack { display: grid; gap: 13px; }

.talk .where { font-weight: 600; font-size: 14.5px; }

.talk .what {
  color: var(--text-muted);
  font-size: 14px;
  font-style: italic;
}

.talk .when {
  color: var(--text-faint);
  font-size: 13px;
}

.press { display: grid; gap: 7px; }

/* Three columns keep the dates in a tidy right-hand rail instead of letting
   them wrap onto a line of their own after a long headline. */
.press-item {
  display: grid;
  grid-template-columns: 124px 1fr auto;
  gap: 4px 16px;
  align-items: baseline;
  font-size: 14px;
}

.press-item .outlet {
  color: var(--text-muted);
  font-weight: 500;
  font-size: 13.5px;
}

.press-item .when {
  color: var(--text-faint);
  font-size: 13px;
  white-space: nowrap;
}


/* ---------------------------------------------------------------------------
   Footer
   --------------------------------------------------------------------------- */
footer {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 4px 16px;
  margin-top: 56px;
  padding-top: 18px;
  border-top: 1px solid var(--border);
  color: var(--text-faint);
  font-size: 13px;
}

/* ---------------------------------------------------------------------------
   Responsive — everything collapses to one column
   --------------------------------------------------------------------------- */
@media (max-width: 720px) {
  body { padding: 0 18px 56px; }

  .hero {
    grid-template-columns: 1fr;
    gap: 24px;
    padding-top: 40px;
  }

  /* Photo above the text, and not full-bleed on a phone. */
  .profile {
    order: -1;
    width: 132px;
  }

  h1 { font-size: 29px; }

  .news-item,
  .press-item {
    grid-template-columns: 1fr;
    gap: 2px;
  }

  /* Outlet and date read as one caption line above the headline on a phone. */
  .press-item .outlet { order: -1; }
  .press-item .when { order: 1; }

  .news-item time { font-size: 12.5px; }
}

/* ---------------------------------------------------------------------------
   Motion
   --------------------------------------------------------------------------- */
@keyframes rise {
  from { opacity: 0; transform: translateY(6px); }
  to   { opacity: 1; transform: none; }
}

.wrap > * { animation: rise 0.4s ease both; }

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
  }
}
