/* Palette taken from ramaprabhu.com */
:root {
  --accent: #d43076;        /* magenta: links, buttons, highlights */
  --accent-deep: #b0245f;   /* hover / pressed */
  --heading: #2c4964;       /* navy: headings, career band */
  --text: #5a656e;          /* slate body text */
  --mist: #f2f6f9;          /* light section background */
  --white: #ffffff;
  --line: #dde5ec;

  --serif: "Source Serif 4", Georgia, serif;
  --sans: "Public Sans", system-ui, -apple-system, "Segoe UI", sans-serif;

  --wrap: 1120px;
  --gutter: clamp(16px, 4vw, 40px);
}

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

html { scroll-behavior: smooth; scroll-padding-top: 72px; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  background: var(--white);
  color: var(--text);
  font: 400 17px/1.65 var(--sans);
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; height: auto; display: block; }

h1, h2, h3 {
  font-family: var(--serif);
  color: var(--heading);
  line-height: 1.2;
  margin: 0 0 .5em;
}
h2 { font-size: clamp(1.9rem, 3.5vw, 2.6rem); font-weight: 600; }
h3 { font-size: 1.25rem; font-weight: 600; }
p { margin: 0 0 1em; }

a { color: var(--accent); text-underline-offset: 3px; }
a:hover { color: var(--accent-deep); }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; border-radius: 2px; }

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

.skip {
  position: absolute; left: -999px; top: 8px;
  background: var(--heading); color: var(--white); padding: 8px 14px; z-index: 100;
}
.skip:focus { left: 8px; }

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(255, 255, 255, .94);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
}
.header-inner { display: flex; align-items: center; justify-content: space-between; height: 64px; }
.wordmark {
  font: 700 1.3rem/1 var(--serif);
  color: var(--heading);
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 10px;
}
.wordmark span::first-letter { color: var(--accent); }
.wordmark .logo { width: 48px; height: 48px; }

.nav { display: flex; gap: 28px; }
.nav a {
  color: var(--text);
  text-decoration: none;
  font-weight: 500;
  font-size: .95rem;
  padding: 6px 0;
  border-bottom: 2px solid transparent;
}
.nav a:hover, .nav a.active { color: var(--accent); border-bottom-color: var(--accent); }

.nav-toggle {
  display: none;
  font: 600 .9rem var(--sans);
  color: var(--heading);
  background: none;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 8px 14px;
  cursor: pointer;
}

@media (max-width: 760px) {
  .nav-toggle { display: block; }
  .nav {
    display: none;
    position: absolute; top: 64px; left: 0; right: 0;
    flex-direction: column; gap: 0;
    background: var(--white);
    border-bottom: 1px solid var(--line);
    padding: 8px var(--gutter) 16px;
  }
  .nav.open { display: flex; }
  .nav a { padding: 12px 0; border-bottom: 1px solid var(--line); }
  .nav a:hover, .nav a.active { border-bottom-color: var(--line); }
}

/* ---------- Hero ---------- */
.hero {
  background: linear-gradient(180deg, #fbeff5 0%, var(--white) 70%);
  padding: clamp(40px, 7vw, 88px) 0 0;
  overflow-x: clip;
}
.hero-grid {
  display: grid;
  grid-template-columns: 1.15fr .85fr;
  gap: clamp(24px, 5vw, 64px);
  align-items: center;
}
.hero h1 {
  font-size: clamp(2.6rem, 6.4vw, 4.6rem);
  font-weight: 700;
  letter-spacing: -.01em;
  line-height: 1.04;
  margin-bottom: .35em;
}
.hero h1 .pink { color: var(--accent); }  /* RAM·A·P·RABHU split, as on the original site */
.hero-role {
  font: 600 1.1rem/1.5 var(--sans);
  color: var(--heading);
  padding-left: 14px;
  border-left: 3px solid var(--accent);
}
.hero-lede { font-size: 1.12rem; max-width: 34em; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 28px; }

.btn {
  display: inline-block;
  font: 600 .98rem/1 var(--sans);
  padding: 14px 22px;
  border-radius: 6px;
  text-decoration: none;
  border: 2px solid var(--accent);
}
.btn-primary { background: var(--accent); color: var(--white); }
.btn-primary:hover { background: var(--accent-deep); border-color: var(--accent-deep); color: var(--white); }
.btn-ghost { color: var(--accent); background: transparent; }
.btn-ghost:hover { background: var(--accent); color: var(--white); }

/* Portrait as a graphene cell: hexagon photo, offset plates, lattice, orbit, seal */
.hero-figure {
  --hex: polygon(50% 0, 100% 25%, 100% 75%, 50% 100%, 0 75%, 0 25%);
  position: relative;
  margin: 0;
  justify-self: center;
  width: 100%;
  max-width: 380px;
  aspect-ratio: 100 / 115.47;          /* regular pointy-top hexagon */
}
.hero-figure > * { position: absolute; }

.lattice { inset: -22% -30%; width: 160%; height: 144%; }
.lattice path { fill: none; stroke: var(--accent); stroke-width: 1.2; opacity: .45; }
.lattice .atoms { fill: var(--accent); opacity: .55; }

.hex-plate {
  inset: 0;
  background: var(--accent);
  clip-path: var(--hex);
  transform: translate(7%, 5%);
}

/* White hexagon behind a slightly smaller photo hexagon gives an even frame */
.hex-frame {
  inset: 0;
  background: var(--white);
  clip-path: var(--hex);
  display: grid;
  place-items: center;
}
.hex-frame img {
  width: 96%; height: 96%;
  object-fit: cover;
  object-position: 50% 12%;
  clip-path: var(--hex);
}


.orbit { inset: 0; width: 100%; height: 100%; overflow: visible; pointer-events: none; }
.orbit path { fill: none; stroke: var(--heading); stroke-width: .6; opacity: .7; stroke-dasharray: 1.5 1.5; }
.electron { fill: var(--accent); stroke: var(--white); stroke-width: .9; }

.seal {
  width: 34%;
  left: -12%;
  bottom: 4%;
  filter: drop-shadow(0 8px 16px rgba(44, 73, 100, .25));
}
.seal-bg { fill: var(--white); }
.seal-inner { fill: none; stroke: var(--accent); stroke-width: 1.5; }
.seal-ring { font: 600 8.6px var(--sans); fill: var(--heading); letter-spacing: .1em; }
.seal-main { font: 700 20px var(--serif); fill: var(--accent); text-anchor: middle; }
.seal-year { font: 500 9px var(--sans); fill: var(--heading); text-anchor: middle; }

.facts {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  margin: clamp(40px, 6vw, 72px) 0 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}
.facts div { padding: 22px 16px; border-left: 1px solid var(--line); }
.facts div:first-child { border-left: 0; padding-left: 0; }
.facts dt { font-size: .88rem; }
.facts dd {
  margin: 0;
  font: 700 2rem/1.1 var(--serif);
  color: var(--heading);
}
.facts div { display: flex; flex-direction: column-reverse; gap: 4px; }

@media (max-width: 860px) {
  .hero-grid { grid-template-columns: 1fr; }
  .hero-figure { max-width: 290px; margin: 24px 0 8px; }
  .facts { grid-template-columns: repeat(2, 1fr); }
  .facts div, .facts div:first-child { border-left: 0; padding-left: 0; border-top: 1px solid var(--line); }
  .facts div:nth-child(-n+2) { border-top: 0; }
}

/* ---------- Sections ---------- */
.section { padding: clamp(56px, 9vw, 104px) 0; }
.section-mist { background: var(--mist); }
.big { font-size: 1.2rem; line-height: 1.6; color: var(--heading); }
.intro { max-width: 46em; font-size: 1.08rem; }
#research .intro { max-width: none; }  /* spans the full width of the area columns below */

/* About */
.about-grid { display: grid; grid-template-columns: 1.6fr 1fr; gap: clamp(32px, 6vw, 80px); }
.about-main { max-width: 40em; }
.about-main h3 { margin-top: 1.6em; }
/* Justified on wider screens; phone lines are too short to justify without large word gaps */
@media (min-width: 600px) {
  .about-main p, .about-main li,
  #research .intro, .area p { text-align: justify; hyphens: auto; }
}
.about-side {
  background: var(--mist);
  border-top: 4px solid var(--accent);
  padding: 28px 28px 20px;
  align-self: start;
}
.ticks, .plain { list-style: none; margin: 0; padding: 0; }
.ticks li { position: relative; padding-left: 26px; margin-bottom: .55em; }
.ticks li::before {
  /* small hexagon marker, echoing the lattice */
  content: "";
  position: absolute; left: 2px; top: .5em;
  width: 11px; height: 12px;
  background: var(--accent);
  clip-path: polygon(50% 0, 100% 25%, 100% 75%, 50% 100%, 0 75%, 0 25%);
}
.plain li { padding: 9px 0; border-bottom: 1px solid var(--line); font-size: .96rem; }
.plain li:last-child { border-bottom: 0; }

@media (max-width: 860px) { .about-grid { grid-template-columns: 1fr; } }

/* Research */
.areas {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  margin: 40px 0;
}
.area {
  background: var(--white);
  padding: 28px 26px 12px;
  border-left: 4px solid var(--accent);
}
.gallery { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.gallery figure { margin: 0; }
.gallery img { width: 100%; aspect-ratio: 16 / 10; object-fit: cover; border-radius: 6px; background: #f6e3ec; }
.gallery figcaption { font-size: .9rem; margin-top: 10px; }

@media (max-width: 860px) {
  .areas, .gallery { grid-template-columns: 1fr; }
}

/* Career */
.section-navy { background: var(--heading); color: #c9d5e0; }
.section-navy h2, .section-navy h3 { color: var(--white); }

.timeline { list-style: none; margin: 40px 0 0; padding: 0; position: relative; }
.timeline::before {
  content: "";
  position: absolute; top: 8px; bottom: 8px; left: 168px;
  width: 2px; background: rgba(255, 255, 255, .18);
}
.timeline li {
  position: relative;
  display: grid;
  grid-template-columns: 168px 1fr;
  column-gap: 40px;
  padding-bottom: 34px;
}
.timeline li > :not(.when) { grid-column: 2; }
.timeline li::before {
  content: "";
  position: absolute; left: 162px; top: 7px;
  width: 14px; height: 14px; border-radius: 50%;
  background: var(--heading);
  border: 3px solid var(--accent);
}
.timeline li:first-child::before { background: var(--accent); }
.timeline .when {
  grid-row: 1 / span 3;
  font: 600 1rem/1.5 var(--serif);
  color: #f3b7d0;
  white-space: nowrap;
}
.timeline h3 { margin: 0 0 2px; font-size: 1.2rem; }
.timeline .where { color: var(--white); opacity: .8; margin-bottom: .4em; font-size: .95rem; }
.timeline p { max-width: 42em; margin-bottom: 0; }

.edu-title { margin-top: 32px; font-size: 1.5rem; }
.edu { list-style: none; padding: 0; margin: 16px 0 0; max-width: 52em; }
.edu li { padding: 12px 0; border-top: 1px solid rgba(255, 255, 255, .14); }
.edu strong { color: var(--white); font-weight: 600; }
.edu .when { display: inline-block; min-width: 64px; font: 600 1rem var(--serif); color: #f3b7d0; }

@media (max-width: 640px) {
  .timeline::before { left: 6px; }
  .timeline li { grid-template-columns: 1fr; padding-left: 32px; }
  .timeline li > :not(.when) { grid-column: 1; }
  .timeline li::before { left: 0; }
  .timeline .when { grid-row: auto; }
}

/* Recognition */
.awards {
  display: grid;
  grid-template-columns: 2fr 1fr;
  grid-template-rows: auto auto;
  gap: 24px;
  margin-top: 32px;
}
.award { margin: 0; }
.award img { border: 1px solid var(--line); border-radius: 4px; }
.award figcaption, .award-text p { font-size: .95rem; margin-top: 12px; }
.award strong { color: var(--heading); }
.award-wide { grid-row: 1 / span 2; }
.award-text { background: var(--mist); padding: 22px; border-radius: 4px; }
.award-text p { margin: 12px 0 0; }
.whos-who { padding-top: 12px; border-top: 1px solid var(--line); }
.award:not(.award-wide) img { max-height: 320px; width: auto; }

@media (max-width: 760px) {
  .awards { grid-template-columns: 1fr; }
  .award-wide { grid-row: auto; }
}

/* Contact */
.contact-grid { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(32px, 6vw, 80px); align-items: start; }
.contact-list { margin: 0; }
.contact-list div { padding: 18px 0; border-bottom: 1px solid var(--line); }
.contact-list div:first-child { padding-top: 0; }
.contact-list dt { font-size: .88rem; margin-bottom: 2px; }
.contact-list dd { margin: 0; color: var(--heading); font-size: 1.1rem; overflow-wrap: anywhere; }

@media (max-width: 760px) { .contact-grid { grid-template-columns: 1fr; } }

/* Footer */
.site-footer { background: var(--heading); color: #c9d5e0; font-size: .9rem; }
.footer-inner { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px; padding-top: 24px; padding-bottom: 24px; }
.site-footer p { margin: 0; }
