/* =========================================================
   Shipra Yadav — Academic Website
   Design system: quiet, editorial, scholarly.
   Palette: warm ivory paper, ink text, muted forest accent.
   ========================================================= */

:root {
  --paper:        #f6f3ec;
  --paper-2:      #efeae0;
  --card:         #fffdf8;
  --ink:          #1f2722;
  --ink-soft:     #45504a;
  --ink-faint:    #6f786f;
  --line:         #ddd6c8;
  --accent:       #34564a;   /* muted forest green */
  --accent-deep:  #233a32;
  --accent-soft:  #6f8c80;
  --gold:         #9a7a3f;   /* restrained brass */
  --max:          1140px;
  --radius:       2px;
  --shadow:       0 1px 2px rgba(31,39,34,.05), 0 10px 30px rgba(31,39,34,.06);
  --serif: "Cormorant Garamond", "Iowan Old Style", Georgia, "Times New Roman", serif;
  --sans:  "Inter", "Helvetica Neue", Arial, system-ui, sans-serif;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.7;
  color: var(--ink);
  background: var(--paper);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

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

a { color: var(--accent); text-decoration: none; transition: color .2s ease; }
a:hover { color: var(--accent-deep); }

h1, h2, h3, h4 {
  font-family: var(--serif);
  font-weight: 600;
  line-height: 1.15;
  color: var(--ink);
  margin: 0 0 .4em;
}

.container { width: 100%; max-width: var(--max); margin: 0 auto; padding: 0 28px; }

.eyebrow {
  font-family: var(--sans);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: .22em;
  text-transform: uppercase;
  color: var(--accent-soft);
  margin: 0 0 14px;
}

.rule {
  width: 54px; height: 2px;
  background: var(--gold);
  margin: 0 0 28px;
  border: 0;
}

/* ---------- Navigation ---------- */
.nav {
  position: sticky; top: 0; z-index: 50;
  background: rgba(246,243,236,.88);
  backdrop-filter: saturate(140%) blur(8px);
  border-bottom: 1px solid var(--line);
}
.nav-inner {
  max-width: var(--max); margin: 0 auto;
  padding: 14px 28px;
  display: flex; align-items: center; justify-content: space-between;
}
.brand { display: flex; align-items: center; gap: 12px; font-family: var(--serif); }
.brand .mono {
  width: 38px; height: 38px; border-radius: 50%;
  display: grid; place-items: center;
  background: var(--accent); color: var(--paper);
  font-size: 16px; font-weight: 600; letter-spacing: .04em;
}
.brand .who { line-height: 1.1; }
.brand .who b { font-size: 18px; font-weight: 600; color: var(--ink); }
.brand .who span { display: block; font-family: var(--sans); font-size: 11px; letter-spacing: .12em; text-transform: uppercase; color: var(--ink-faint); }
.nav-links { display: flex; gap: 26px; align-items: center; }
.nav-links a {
  font-family: var(--sans); font-size: 14px; font-weight: 500;
  color: var(--ink-soft); letter-spacing: .01em;
}
.nav-links a:hover { color: var(--accent); }
.nav-toggle { display: none; background: none; border: 0; cursor: pointer; padding: 6px; }
.nav-toggle span { display: block; width: 24px; height: 2px; background: var(--ink); margin: 5px 0; transition: .3s; }

/* ---------- Hero ---------- */
.hero {
  background:
    radial-gradient(1200px 480px at 78% -8%, rgba(52,86,74,.10), transparent 60%),
    linear-gradient(180deg, var(--paper) 0%, var(--paper-2) 100%);
  border-bottom: 1px solid var(--line);
}
.hero-grid {
  display: grid;
  grid-template-columns: 1.35fr .9fr;
  gap: 56px; align-items: center;
  padding: 84px 0 78px;
}
.hero h1 { font-size: clamp(44px, 6vw, 74px); letter-spacing: -.01em; }
.hero .title-role {
  font-family: var(--sans); font-size: 15px; font-weight: 600;
  letter-spacing: .16em; text-transform: uppercase; color: var(--accent);
  margin-bottom: 22px;
}
.hero .lede { font-size: 20px; color: var(--ink-soft); max-width: 46ch; margin: 0 0 30px; }
.hero-meta { display: flex; flex-wrap: wrap; gap: 10px 14px; margin-bottom: 32px; }
.chip {
  font-family: var(--sans); font-size: 13px; font-weight: 500;
  color: var(--accent-deep); background: rgba(52,86,74,.08);
  border: 1px solid rgba(52,86,74,.18);
  padding: 6px 14px; border-radius: 100px;
}
.btn-row { display: flex; flex-wrap: wrap; gap: 14px; }
.btn {
  font-family: var(--sans); font-size: 14px; font-weight: 600; letter-spacing: .02em;
  padding: 13px 26px; border-radius: var(--radius);
  display: inline-flex; align-items: center; gap: 8px;
  border: 1px solid var(--accent);
  transition: all .2s ease;
}
.btn-solid { background: var(--accent); color: var(--paper); }
.btn-solid:hover { background: var(--accent-deep); color: var(--paper); }
.btn-ghost { background: transparent; color: var(--accent-deep); }
.btn-ghost:hover { background: rgba(52,86,74,.08); color: var(--accent-deep); }

/* Portrait / monogram plate */
.portrait {
  position: relative; aspect-ratio: 4/5; border-radius: var(--radius);
  background:
    linear-gradient(150deg, var(--accent-deep), var(--accent) 60%, var(--accent-soft));
  box-shadow: var(--shadow);
  overflow: hidden;
  border: 1px solid rgba(31,39,34,.12);
}
.portrait::after {
  content: ""; position: absolute; inset: 12px;
  border: 1px solid rgba(246,243,236,.35);
  pointer-events: none;
}
.portrait img { width: 100%; height: 100%; object-fit: cover; }
.portrait .mono-xl {
  position: absolute; inset: 0; display: grid; place-items: center;
  font-family: var(--serif); font-size: 120px; font-weight: 600;
  color: rgba(246,243,236,.92); letter-spacing: .02em;
}
.portrait .cap {
  position: absolute; left: 0; right: 0; bottom: 0;
  background: linear-gradient(180deg, transparent, rgba(35,58,50,.85));
  color: var(--paper); font-family: var(--sans); font-size: 12px;
  letter-spacing: .14em; text-transform: uppercase; text-align: center;
  padding: 34px 16px 16px;
}

/* ---------- Sections ---------- */
section { padding: 84px 0; }
.section-alt { background: var(--paper-2); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.section-head { max-width: 60ch; margin-bottom: 48px; }
.section-head h2 { font-size: clamp(30px, 4vw, 42px); }
.section-head p { color: var(--ink-soft); font-size: 18px; margin: 10px 0 0; }

/* About */
.about-grid { display: grid; grid-template-columns: 1.5fr 1fr; gap: 56px; align-items: start; }
.about-grid p { color: var(--ink-soft); margin: 0 0 18px; }
.about-grid p:first-of-type::first-letter {
  font-family: var(--serif); font-size: 3.4em; line-height: .8; float: left;
  padding: 6px 12px 0 0; color: var(--accent); font-weight: 600;
}
.factsheet {
  background: var(--card); border: 1px solid var(--line);
  border-radius: var(--radius); box-shadow: var(--shadow);
  padding: 28px 30px;
}
.factsheet h3 { font-size: 22px; margin-bottom: 18px; }
.factsheet dl { margin: 0; display: grid; grid-template-columns: 1fr; gap: 14px; }
.factsheet .row { display: grid; grid-template-columns: 120px 1fr; gap: 10px; align-items: baseline; }
.factsheet dt { font-family: var(--sans); font-size: 12px; font-weight: 600; letter-spacing: .1em; text-transform: uppercase; color: var(--ink-faint); }
.factsheet dd { margin: 0; color: var(--ink); font-size: 15px; }
.factsheet dd a { word-break: break-word; }

/* Research interests */
.interest-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 22px; }
.interest {
  background: var(--card); border: 1px solid var(--line);
  border-left: 3px solid var(--accent);
  border-radius: var(--radius); padding: 26px 28px;
  transition: transform .2s ease, box-shadow .2s ease;
}
.interest:hover { transform: translateY(-3px); box-shadow: var(--shadow); }
.interest .num { font-family: var(--serif); font-size: 22px; color: var(--gold); }
.interest h3 { font-size: 23px; margin: 6px 0 8px; }
.interest p { color: var(--ink-soft); font-size: 15.5px; margin: 0; }

/* Courses / subjects taught */
.course-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 26px; }
.course-card {
  background: var(--card); border: 1px solid var(--line);
  border-radius: var(--radius); box-shadow: var(--shadow);
  padding: 0; overflow: hidden; display: flex; flex-direction: column;
  transition: transform .2s ease, box-shadow .25s ease;
}
.course-card:hover { transform: translateY(-4px); box-shadow: 0 18px 40px rgba(31,39,34,.12); }
.course-card .cc-top { padding: 28px 30px 0; }
.course-card .cc-tag {
  display: inline-block; font-family: var(--sans); font-size: 11px; font-weight: 600;
  letter-spacing: .12em; text-transform: uppercase;
  color: var(--accent); background: rgba(52,86,74,.08);
  padding: 5px 12px; border-radius: 100px; margin-bottom: 16px;
}
.course-card h3 { font-size: 27px; margin-bottom: 8px; }
.course-card .cc-meta { font-family: var(--sans); font-size: 13px; color: var(--ink-faint); margin-bottom: 16px; }
.course-card .cc-body { padding: 0 30px 8px; color: var(--ink-soft); font-size: 15.5px; flex: 1; }
.course-card .cc-foot {
  padding: 18px 30px 26px; margin-top: 8px;
  display: flex; align-items: center; justify-content: space-between;
  border-top: 1px solid var(--line);
}
.course-card .cc-foot .open { font-family: var(--sans); font-weight: 600; font-size: 14px; color: var(--accent); display: inline-flex; align-items: center; gap: 7px; }
.course-card:hover .cc-foot .open { gap: 11px; }
.course-card .credits { font-family: var(--serif); font-size: 15px; color: var(--ink-faint); }

/* Contact */
.contact-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 40px; align-items: center; }
.contact-card {
  background: var(--accent-deep); color: var(--paper);
  border-radius: var(--radius); padding: 40px;
}
.contact-card h3 { color: var(--paper); font-size: 28px; }
.contact-card a { color: #d9e6df; }
.contact-card a:hover { color: #fff; }
.contact-list { list-style: none; padding: 0; margin: 22px 0 0; }
.contact-list li { display: flex; gap: 14px; padding: 12px 0; border-top: 1px solid rgba(246,243,236,.15); font-size: 15px; }
.contact-list li:first-child { border-top: 0; }
.contact-list .lab { font-family: var(--sans); font-size: 12px; letter-spacing: .1em; text-transform: uppercase; color: var(--accent-soft); width: 96px; flex: none; }

/* ---------- Footer ---------- */
.footer { background: var(--ink); color: #cdd3cd; padding: 46px 0 38px; font-size: 14px; }
.footer-inner { display: flex; flex-wrap: wrap; gap: 20px; justify-content: space-between; align-items: center; }
.footer a { color: #cdd3cd; }
.footer a:hover { color: #fff; }
.footer .fnote { color: #8b948c; font-size: 12.5px; max-width: 52ch; }

/* =========================================================
   Course (inner) pages
   ========================================================= */
.subhero {
  background: linear-gradient(180deg, var(--accent-deep), var(--accent));
  color: var(--paper); padding: 56px 0 50px;
  border-bottom: 4px solid var(--gold);
}
.subhero .crumbs { font-family: var(--sans); font-size: 13px; color: rgba(246,243,236,.75); margin-bottom: 18px; letter-spacing: .04em; }
.subhero .crumbs a { color: rgba(246,243,236,.92); }
.subhero .crumbs a:hover { color: #fff; }
.subhero h1 { color: var(--paper); font-size: clamp(34px, 5vw, 56px); }
.subhero .sh-tag { font-family: var(--sans); font-size: 12px; font-weight: 600; letter-spacing: .18em; text-transform: uppercase; color: #cfe0d7; margin-bottom: 14px; }
.subhero .sh-meta { display: flex; flex-wrap: wrap; gap: 10px 22px; margin-top: 22px; font-family: var(--sans); font-size: 14px; color: rgba(246,243,236,.9); }
.subhero .sh-meta b { color: #fff; font-weight: 600; }

.course-layout { display: grid; grid-template-columns: 220px 1fr; gap: 50px; padding: 60px 0 80px; align-items: start; }
.toc {
  position: sticky; top: 86px;
  font-family: var(--sans); font-size: 14px;
}
.toc h4 { font-family: var(--sans); font-size: 11px; letter-spacing: .14em; text-transform: uppercase; color: var(--ink-faint); margin-bottom: 14px; }
.toc a { display: block; color: var(--ink-soft); padding: 7px 0 7px 14px; border-left: 2px solid var(--line); }
.toc a:hover { color: var(--accent); border-left-color: var(--accent); }

.course-main h2 { font-size: 30px; margin: 0 0 4px; }
.course-main .block { margin-bottom: 52px; scroll-margin-top: 86px; }
.course-main p { color: var(--ink-soft); }
.course-main ul { color: var(--ink-soft); padding-left: 20px; }
.course-main ul li { margin: 8px 0; }

.callout {
  background: var(--card); border: 1px solid var(--line);
  border-left: 3px solid var(--gold); border-radius: var(--radius);
  padding: 22px 26px; margin: 0 0 12px;
}

/* Units */
.unit {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 24px 26px; margin-bottom: 16px;
}
.unit .uhead { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; margin-bottom: 8px; }
.unit .uhead h3 { font-size: 21px; margin: 0; }
.unit .hours { font-family: var(--sans); font-size: 12px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--accent); white-space: nowrap; }
.unit ul { margin: 6px 0 0; }

/* Readings */
.readings { list-style: none; padding: 0; margin: 0; counter-reset: r; }
.readings li {
  position: relative; padding: 12px 0 12px 40px;
  border-bottom: 1px dashed var(--line); font-size: 15px; color: var(--ink-soft);
}
.readings li::before {
  counter-increment: r; content: counter(r);
  position: absolute; left: 0; top: 12px;
  font-family: var(--serif); font-size: 14px; color: var(--paper);
  background: var(--accent-soft); width: 24px; height: 24px;
  border-radius: 50%; display: grid; place-items: center;
}
.readings li i { color: var(--ink); }
.reading-group { font-family: var(--sans); font-size: 12px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--gold); margin: 26px 0 6px; }

/* Exam table */
.table-wrap { overflow-x: auto; }
table.scheme { width: 100%; border-collapse: collapse; background: var(--card); border: 1px solid var(--line); }
table.scheme th, table.scheme td { text-align: left; padding: 13px 18px; border-bottom: 1px solid var(--line); font-size: 15px; }
table.scheme th { font-family: var(--sans); font-size: 12px; letter-spacing: .08em; text-transform: uppercase; color: var(--ink-faint); background: var(--paper-2); }
table.scheme td.num { font-family: var(--serif); font-size: 18px; color: var(--accent-deep); font-weight: 600; }
table.scheme tr:last-child td { border-bottom: 0; }
.scheme-total td { background: rgba(52,86,74,.06); font-weight: 600; color: var(--ink); }

/* Guidelines list */
.guide { list-style: none; padding: 0; margin: 0; }
.guide li { position: relative; padding: 10px 0 10px 30px; color: var(--ink-soft); border-bottom: 1px solid var(--line); }
.guide li::before { content: "—"; position: absolute; left: 0; color: var(--gold); font-weight: 700; }

.backlink { display: inline-flex; align-items: center; gap: 8px; font-family: var(--sans); font-weight: 600; font-size: 14px; margin-top: 10px; }

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
  .hero-grid { grid-template-columns: 1fr; gap: 40px; }
  .portrait { max-width: 360px; }
  .about-grid, .contact-grid { grid-template-columns: 1fr; gap: 32px; }
  .interest-grid, .course-grid { grid-template-columns: 1fr; }
  .course-layout { grid-template-columns: 1fr; }
  .toc { position: static; display: none; }
  .nav-links {
    position: absolute; top: 100%; left: 0; right: 0;
    flex-direction: column; gap: 0; align-items: stretch;
    background: var(--paper); border-bottom: 1px solid var(--line);
    max-height: 0; overflow: hidden; transition: max-height .3s ease;
  }
  .nav-links.open { max-height: 380px; }
  .nav-links a { padding: 14px 28px; border-top: 1px solid var(--line); }
  .nav-toggle { display: block; }
}
@media (max-width: 540px) {
  body { font-size: 16px; }
  section { padding: 60px 0; }
  .container { padding: 0 20px; }
  .hero-grid { padding: 56px 0 50px; }
  .factsheet .row { grid-template-columns: 1fr; gap: 2px; }
}
