/* Anant Madhyasthata — standalone stylesheet
   Navy / ivory / muted-gold academic palette.
   Edit the tokens in :root below to restyle the whole site. */

:root {
  /* --- core palette --- */
  --color-navy:        #182338;   /* header, footer, primary headings          */
  --color-navy-light:  #232f49;   /* borders on navy surfaces                  */
  --color-navy-mid:    #16335e;   /* hero display headings (dark blue)         */
  --color-blue:        #1f4e8f;   /* supporting lines / secondary accent       */
  --color-ivory:       #f4efe1;   /* text on navy                              */
  --color-bg:          #faf6ea;   /* page background (cream)                   */
  --color-surface:     #faf8f2;   /* raised surfaces / picture-frame mats      */
  --color-text:        #262420;   /* body text                                */
  --color-divider:     #e4ddc9;   /* hairlines, card borders                   */
  --color-neutral-200: #efe9d8;
  --color-neutral-300: #ddd4b9;

  /* --- gold family --- */
  --color-accent:      #c19a4d;   /* buttons, rules, marks                     */
  --color-accent-100:  #e9d9b3;   /* tint / selection                         */
  --color-accent-700:  #8a6a2e;   /* eyebrows, small gold labels on cream      */
  --color-gold:        #d4a63c;   /* brand gold (on navy)                      */
  --color-gold-deep:   #9a7420;   /* deep gold display text on cream          */

  --shadow-md: 0 8px 24px rgba(24, 35, 56, 0.18);

  --font-heading: Georgia, "Times New Roman", Times, serif;
  --font-body:    Georgia, "Times New Roman", Times, serif;

  --measure: 68ch;                /* comfortable reading width                 */
}

* { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  scroll-padding-top: 96px;       /* keep anchor targets clear of sticky header */
}
html, body { margin: 0; padding: 0; }

body {
  background: var(--color-bg);
  color: var(--color-text);
  font-family: var(--font-body);
  line-height: 1.65;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading);
  color: var(--color-navy);       /* default; inline colours still override    */
  margin: 0;
  text-wrap: balance;             /* tidier heading line breaks where supported */
}

/* Body copy: soften justified text so it stops opening up rivers of space. */
p {
  hyphens: auto;
  -webkit-hyphens: auto;
  text-wrap: pretty;
}

a { color: var(--color-accent-700); transition: color .15s ease; }
a:hover { color: var(--color-accent); }

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

/* Header brand lock-up: emblem mark + name + tagline. */
.brand-lockup { display: flex; align-items: center; justify-content: center; gap: 15px; }
.brand-lockup .brand-mark { flex: 0 0 auto; display: block; line-height: 0; }
.brand-lockup .brand-mark img { display: block; height: 50px; width: auto; }
.brand-lockup .brand-text { text-align: left; }
.brand-name {
  font-family: var(--font-heading); font-weight: 600; font-size: 27.72px;
  color: var(--color-gold); text-decoration: none; display: block;
}
.brand-tagline {
  font-family: var(--font-heading); font-weight: 600; font-size: 20.79px;
  color: var(--color-gold); margin-top: 3px;
}
@media (max-width: 860px) {
  .brand-lockup { gap: 12px; }
  .brand-lockup .brand-mark img { height: 42px; }
  .brand-name { font-size: 21px; }
  .brand-tagline { font-size: 13px; margin-top: 2px; }
}
@media (max-width: 430px) {
  .brand-lockup .brand-mark img { height: 36px; }
  .brand-name { font-size: 17.5px; }
  .brand-tagline { font-size: 11.5px; }
}

/* Small emblem in the footer, before the copyright line. */
.footer-mark { display: block; height: 26px; width: auto; opacity: 0.9; margin-bottom: 8px; }

/* Author portrait that body text flows around (home page). */
.author-figure {
  float: left;
  width: 190px;
  margin: 6px 30px 14px 0;
}
.author-figure .frame {
  border: 6px solid var(--color-surface);
  outline: 1px solid var(--color-divider);
}
.author-figure figcaption {
  font-size: 12px;
  letter-spacing: 0.04em;
  text-align: center;
  margin-top: 8px;
  color: color-mix(in srgb, var(--color-text) 62%, transparent);
}
@media (max-width: 560px) {
  .author-figure { float: none; width: 200px; margin: 0 auto 18px; }
}

/* Screen-reader-only: keeps semantic headings when a hero is set in an image. */
.visually-hidden {
  position: absolute !important;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

::selection { background: var(--color-accent-100); color: var(--color-navy); }

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

/* Buttons (used by the "Contact" nav pill and CTA links) */
.btn {
  display: inline-block;
  padding: 11px 24px;
  border-radius: 3px;
  font-size: 14px;
  font-weight: 600;
  text-decoration: none !important;
  border: 1px solid transparent;
  cursor: pointer;
  transition: background .15s ease, color .15s ease;
}
.btn-primary {
  background: var(--color-accent);
  color: var(--color-navy) !important;
}
.btn-primary:hover {
  background: var(--color-accent-700);
  color: var(--color-ivory) !important;
}
.btn-block { width: 100%; text-align: center; }

/* Header hover dropdowns ("The Work", "Institute") — pure CSS,
   reproduces the original mouseenter/mouseleave behaviour. */
.nav-dropdown { position: relative; }
.dc-dropdown-panel { display: none; }
.nav-dropdown:hover .dc-dropdown-panel,
.nav-dropdown:focus-within .dc-dropdown-panel { display: block; }

/* Within-section navigation strip for "The Work" — sits directly under the
   main header and stays with it. Every piece of the body of work is visible
   without a hover menu; on narrow screens it becomes a horizontal swipe strip. */
.work-subnav { background: var(--color-navy-light); border-top: 1px solid rgba(212, 166, 60, 0.4); }
.work-subnav > div {
  max-width: 1180px;
  margin: 0 auto;
  padding: 10px 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  overflow-x: auto;
  white-space: nowrap;
  font-family: var(--font-heading);
  font-size: 13.5px;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}
.work-subnav > div::-webkit-scrollbar { display: none; }
.work-subnav a { color: var(--color-ivory); text-decoration: none; flex: 0 0 auto; padding-bottom: 2px; }
.work-subnav a:hover { color: var(--color-accent); }
.work-subnav a.is-current { color: var(--color-accent); border-bottom: 2px solid var(--color-accent); }
.work-subnav .swb-label {
  color: var(--color-accent-700);
  letter-spacing: 0.13em;
  text-transform: uppercase;
  font-size: 11px;
  font-weight: 700;
  flex: 0 0 auto;
}
.work-subnav .swb-sep { color: rgba(244, 239, 225, 0.28); flex: 0 0 auto; }
@media (max-width: 860px) {
  .work-subnav > div { justify-content: flex-start; padding: 9px 20px; gap: 13px; font-size: 13px; }
}

/* HEART section device — the diamond from the model's wordmark, used as a
   quiet break between major sections on the framework pages. */
.heart-rule { display: flex; align-items: center; gap: 18px; margin: 62px 0 20px; }
.heart-rule::before,
.heart-rule::after { content: ""; flex: 1; height: 1px; background: var(--color-divider); }
.heart-rule i { flex: 0 0 auto; width: 11px; height: 11px; background: var(--color-accent); transform: rotate(45deg); }

/* Basic form styling (kept in case a contact form is wired up later) */
.field { display: flex; flex-direction: column; gap: 6px; font-size: 14px; }
.input {
  font: inherit;
  padding: 10px 12px;
  border: 1px solid var(--color-divider);
  border-radius: 3px;
  background: #fff;
  color: var(--color-text);
}

@media (max-width: 640px) {
  h1 { font-size: 32px !important; }
  body { line-height: 1.6; }
}

/* Print: drop the chrome, keep the scholarship legible on paper. */
@media print {
  header, footer, .btn, .work-subnav, .heart-rule { display: none !important; }
  body { background: #fff; color: #000; }
  main section { max-width: none !important; padding: 0 !important; }
  a { color: #000; text-decoration: underline; }
  a[href^="http"]::after { content: " (" attr(href) ")"; font-size: 0.85em; word-break: break-all; }
  h1, h2, h3 { color: #000; page-break-after: avoid; }
  p, blockquote { page-break-inside: avoid; }
}
