/* ==========================================================================
   vijayshankarsharma.com — Shared Site Theme
   One file, linked by every page. Change a value here, it changes everywhere.
   Colours and fonts verified directly from the live site's own existing CSS.
   ========================================================================== */

:root {
  --bg: #04060a;
  --text: #f5f7fa;              /* body text: always full white, never reduced opacity */
  --accent: #00e5ff;            /* cyan */
  --accent-hover: #66f0ff;      /* cyan, lighter, for hover/link states */
  --border: #2a3547;
  --bg-panel: #0f1520;          /* for cards, tables, code blocks, TOC boxes */

  --font-heading: 'Cormorant Garamond', serif;
  --font-label: 'DM Mono', monospace;
  --font-body: 'Nunito', -apple-system, sans-serif;

  --font-size-base: 18px;       /* floor: nothing on the page should render smaller than this without a deliberate, explicit reason */
}

* { box-sizing: border-box; }

body {
  margin: 0;
  padding-top: 64px;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: var(--font-size-base);
  line-height: 1.7;
}

h1, h2, h3 {
  font-family: var(--font-heading);
  color: var(--text);
  line-height: 1.3;
}

h1 { font-size: 2.1rem; }
h2 { font-size: 1.5rem; margin-top: 2.4rem; border-top: 1px solid var(--border); padding-top: 1.2rem; color: var(--accent); }
h3 { font-size: 1.2rem; margin-top: 1.6rem; }

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

/* DOI and citation links must look clickable: gold, underlined.
   This is the fix for the site-wide DOI-link defect found in the site review. */
.doi-link {
  color: var(--accent-hover);
  text-decoration: underline;
  font-family: var(--font-label);
}
.doi-link:hover { color: var(--accent); }

table { border-collapse: collapse; width: 100%; margin: 1.4rem 0; }
th, td { border: 1px solid var(--border); padding: 0.6rem 0.8rem; text-align: left; vertical-align: top; }
th { background: var(--bg-panel); color: var(--accent); font-family: var(--font-label); }
tr:nth-child(even) td { background: var(--bg-panel); }

figure { margin: 1.8rem 0; background: var(--bg-panel); border: 1px solid var(--border); padding: 1rem; border-radius: 6px; }
figcaption { font-size: 0.95rem; color: var(--text); opacity: 1; margin-top: 0.6rem; font-style: italic; }

.toc { background: var(--bg-panel); border: 1px solid var(--border); padding: 1.4rem 1.6rem; margin: 1.8rem 0; border-radius: 6px; font-family: var(--font-label); }
.toc a { text-decoration: none; color: var(--text); }
.toc a:hover { color: var(--accent); }

blockquote { border-left: 4px solid var(--accent); margin-left: 0; padding: 0.8rem 1.2rem; background: var(--bg-panel); color: var(--text); border-radius: 0 6px 6px 0; }

code, pre { font-family: 'Courier New', monospace; background: var(--bg-panel); }

/* Navigation and footer: shared structure, not yet a shared include file.
   Until the header/footer PHP-include architecture exists, this class
   naming is what every page's own copy of the nav/footer should use,
   so the eventual switch to includes is a clean cutover, not a rewrite. */
.site-nav a, .site-footer a { color: var(--text); text-decoration: none; }
.site-nav a:hover, .site-footer a:hover { color: var(--accent); }

.ad-slot {
  max-width: 780px;
  margin: 2.2rem auto;
  padding: 0.8rem;
  text-align: center;
  border: 1px dashed var(--border);
  border-radius: 6px;
}
.ad-slot span {
  color: var(--text);
  font-family: var(--font-label);
  font-size: 0.85rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

/* Site-wide navigation header and footer, used across all papers and articles */
.site-nav {
  position: fixed; top: 0; left: 0; right: 0; height: 64px; z-index: 300;
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 2rem; background: rgba(4,6,10,0.92); backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--border);
}
.site-nav .nav-logo {
  font-family: 'Cormorant Garamond', serif; font-weight: 600; font-size: 1.2rem;
  color: var(--text); text-decoration: none; display: flex; align-items: center; gap: 0.5rem;
}
.site-nav .nav-logo img { width: 26px; height: 26px; border-radius: 50%; }
.site-nav .nav-logo span { color: var(--accent); font-style: italic; }
.site-nav .nav-links {
  display: flex; gap: 1.4rem; font-family: 'DM Mono', monospace; font-size: 0.8rem;
  text-transform: uppercase; letter-spacing: 0.04em;
}
.site-nav .nav-links a { opacity: 0.85; }
.site-nav .nav-links a:hover { opacity: 1; }

.site-footer {
  border-top: 1px solid var(--border); padding: 3rem 1.5rem; text-align: center;
  font-size: 0.9rem; opacity: 0.8; margin-top: 3rem;
}
.site-footer .ft-inner { max-width: 900px; margin: 0 auto; }
.site-footer .ft-logo { font-family: 'Cormorant Garamond', serif; font-size: 1.1rem; margin-bottom: 1rem; }
.site-footer .ft-logo span { color: var(--accent); font-style: italic; }
.site-footer .ft-links {
  display: flex; gap: 1.4rem; justify-content: center; margin-bottom: 1rem;
  font-family: 'DM Mono', monospace; font-size: 0.78rem; flex-wrap: wrap;
}

/* Responsive hero image used at the top of articles - fixes images overflowing the page */
.article-hero {
  display: block; width: 100%; height: auto; max-height: 480px;
  object-fit: cover; border-radius: 6px; margin: 1.5rem 0;
}
