/* ============================================================
   cancerriskmd.com  —  Ranjit Goudar, MD
   Editorial scholarly aesthetic. Deep teal, cream, gold accent.
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=EB+Garamond:ital,wght@0,400;0,500;0,600;1,400&family=Source+Sans+3:wght@300;400;500;600&display=swap');

:root {
  /* Palette */
  --bg: #FAF6EE;
  --bg-warm: #F4ECDB;
  --bg-deep: #0F4248;
  --bg-deep-soft: #163E43;
  --border: #D8CFB9;
  --border-strong: #C4B89C;
  --ink: #1A2520;
  --ink-muted: #3D4A47;
  --ink-quiet: #6B5F47;
  --accent: #B8884D;
  --accent-soft: #E8DDC4;
  --primary: #0F4248;
  --primary-hover: #163E43;
  --on-deep: #FAF6EE;

  /* Typography */
  --font-serif: 'EB Garamond', 'Hoefler Text', Georgia, serif;
  --font-sans: 'Source Sans 3', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;

  /* Layout */
  --max: 1180px;
  --measure: 660px;
  --gutter: clamp(24px, 5vw, 56px);
}

* { box-sizing: border-box; margin: 0; padding: 0; }

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

body {
  font-family: var(--font-sans);
  font-size: 17px;
  line-height: 1.65;
  color: var(--ink);
  background: var(--bg);
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

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

a { color: var(--primary); text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: 3px; text-decoration-thickness: 1px; }

/* Skip link ---------------------------------------------------- */
.skip { position: absolute; left: -9999px; top: 0; background: var(--primary); color: var(--on-deep); padding: 12px 18px; z-index: 100; }
.skip:focus { left: 12px; top: 12px; }

/* Typography --------------------------------------------------- */
.serif { font-family: var(--font-serif); font-weight: 400; }
.eyebrow {
  font-family: var(--font-sans);
  font-size: 12px;
  letter-spacing: 2.2px;
  text-transform: uppercase;
  color: var(--ink-quiet);
  font-weight: 500;
}
.eyebrow-light { color: var(--accent); }

h1, h2, h3, h4 { font-family: var(--font-serif); font-weight: 400; color: var(--primary); letter-spacing: -0.3px; }
h1 { font-size: clamp(36px, 5vw, 52px); line-height: 1.12; }
h2 { font-size: clamp(26px, 3.5vw, 36px); line-height: 1.2; }
h3 { font-size: clamp(20px, 2.4vw, 24px); line-height: 1.3; font-weight: 500; }
h4 { font-size: 18px; line-height: 1.3; font-weight: 500; }

p { margin: 0 0 1em; }

.lede { font-size: clamp(17px, 2.1vw, 20px); line-height: 1.6; color: var(--ink-muted); }

/* Layout primitives ------------------------------------------- */
.wrap { max-width: var(--max); margin: 0 auto; padding: 0 var(--gutter); }
.measure { max-width: var(--measure); }
.rule { width: 32px; height: 2px; background: var(--accent); margin: 0 0 22px; border: 0; }

section { padding: clamp(48px, 7vw, 88px) 0; }
section.tight { padding: clamp(32px, 4.5vw, 52px) 0; }

/* Header / nav ------------------------------------------------- */
.site-header {
  border-bottom: 1px solid var(--border);
  background: var(--bg);
  position: sticky;
  top: 0;
  z-index: 50;
  backdrop-filter: blur(6px);
  background: rgba(250, 246, 238, 0.92);
}
.site-header .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 18px;
  padding-bottom: 18px;
}
.brand { display: block; line-height: 1.1; }
.brand .name { font-family: var(--font-serif); font-size: 19px; color: var(--primary); letter-spacing: 0.2px; }
.brand .sub { display: block; font-size: 10px; letter-spacing: 2px; text-transform: uppercase; color: var(--ink-quiet); margin-top: 4px; font-weight: 500; }

.nav { display: flex; gap: 26px; align-items: center; }
.nav a { font-size: 14px; color: var(--ink); font-weight: 400; }
.nav a.current { color: var(--primary); font-weight: 500; }
.nav a:hover { color: var(--primary); text-decoration: none; border-bottom: 1px solid var(--accent); }

.nav-toggle { display: none; background: none; border: 1px solid var(--border-strong); padding: 8px 12px; font-family: inherit; font-size: 13px; color: var(--primary); cursor: pointer; border-radius: 0; }

/* Buttons ------------------------------------------------------ */
.btn {
  display: inline-block;
  padding: 13px 24px;
  font-size: 14px;
  font-weight: 500;
  letter-spacing: 0.4px;
  font-family: var(--font-sans);
  border: 1px solid var(--primary);
  background: var(--primary);
  color: var(--on-deep);
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease;
  text-decoration: none;
}
.btn:hover { background: var(--primary-hover); color: var(--on-deep); text-decoration: none; }
.btn-ghost { background: transparent; color: var(--primary); }
.btn-ghost:hover { background: var(--primary); color: var(--on-deep); }

/* Hero --------------------------------------------------------- */
.hero { padding: clamp(56px, 8vw, 96px) 0 clamp(40px, 6vw, 64px); }
.hero-grid { display: grid; grid-template-columns: 1fr; gap: 32px; align-items: start; }
@media (min-width: 820px) {
  .hero-grid { grid-template-columns: 1fr 140px; gap: 48px; align-items: center; }
}
.hero h1 { margin-bottom: 18px; }
.hero .lede { margin-bottom: 32px; max-width: 36ch; }
.hero-cta { display: flex; gap: 12px; flex-wrap: wrap; }
.hero-mark {
  text-align: right;
  line-height: 0;
}
.hero-mark img {
  width: 100%;
  max-width: clamp(96px, 14vw, 140px);
  height: auto;
  display: inline-block;
}

/* Credentials band -------------------------------------------- */
.cred-band {
  background: var(--bg-deep);
  color: var(--accent-soft);
  padding: 22px 0;
  font-size: 13px;
  letter-spacing: 0.5px;
}
.cred-band .wrap { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 16px; }
.cred-item { display: inline-flex; align-items: center; gap: 8px; }
.cred-sep { color: var(--accent); opacity: 0.6; }
@media (max-width: 720px) {
  .cred-band .wrap { justify-content: flex-start; gap: 14px 22px; }
  .cred-sep { display: none; }
}

/* Areas of focus / card grid ---------------------------------- */
.section-head { margin-bottom: 36px; }
.section-head .eyebrow { margin-bottom: 12px; display: block; }
.section-head h2 { max-width: 22ch; }

.cards { display: grid; grid-template-columns: 1fr; gap: 28px; }
@media (min-width: 720px) { .cards { grid-template-columns: repeat(3, 1fr); gap: 32px; } }

.card {
  border-top: 1px solid var(--primary);
  padding: 22px 0 0;
}
.card h3 { color: var(--primary); margin-bottom: 10px; }
.card p { color: var(--ink-muted); font-size: 15px; margin: 0; }

/* Featured insight band --------------------------------------- */
.insight-band { background: var(--bg-warm); border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); padding: 32px 0; }
.insight-band .wrap { display: grid; grid-template-columns: auto 1fr auto; gap: 28px; align-items: center; }
.insight-band .label { font-size: 11px; letter-spacing: 2px; text-transform: uppercase; color: var(--ink-quiet); font-weight: 500; }
.insight-band .title { font-family: var(--font-serif); font-size: clamp(17px, 2vw, 21px); color: var(--primary); line-height: 1.4; }
.insight-band .more { font-size: 13px; color: var(--primary); letter-spacing: 0.4px; font-weight: 500; white-space: nowrap; }
@media (max-width: 720px) {
  .insight-band .wrap { grid-template-columns: 1fr; gap: 12px; }
  .insight-band .more { justify-self: start; }
}

/* About hero --------------------------------------------------- */
.about-hero { padding-top: 28px; padding-bottom: clamp(40px, 6vw, 64px); }
.about-grid { display: grid; grid-template-columns: 1fr; gap: 32px; align-items: start; }
@media (min-width: 820px) { .about-grid { grid-template-columns: 220px 1fr; gap: 44px; } }
.portrait {
  background: var(--accent-soft);
  border: 1px solid var(--border);
  aspect-ratio: 2 / 3;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-serif);
  font-size: 96px;
  color: var(--accent);
  font-style: italic;
  overflow: hidden;
  position: relative;
}
.portrait img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 18%;
  display: block;
}
.cv-links { display: flex; gap: 22px; flex-wrap: wrap; font-size: 14px; padding-top: 8px; }
.cv-links a { color: var(--primary); font-weight: 500; display: inline-flex; align-items: center; gap: 6px; }
.cv-links a::before { content: "↓"; font-weight: 400; }

/* Prose band (cream) ------------------------------------------ */
.prose-band {
  background: var(--bg-warm);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  padding: clamp(40px, 5vw, 64px) 0;
}
.prose-grid { display: grid; grid-template-columns: 1fr; gap: 16px; align-items: start; }
@media (min-width: 820px) { .prose-grid { grid-template-columns: 160px 1fr; gap: 36px; } }
.prose-band p {
  font-size: 17px;
  line-height: 1.8;
  color: var(--ink);
  margin-bottom: 1em;
}
.prose-band p:last-child { margin-bottom: 0; }

/* Training grid ----------------------------------------------- */
.train-grid { display: grid; grid-template-columns: 1fr; gap: 28px 36px; }
@media (min-width: 720px) { .train-grid { grid-template-columns: 1fr 1fr; } }
.train-item .label { font-family: var(--font-serif); font-size: 17px; color: var(--primary); margin-bottom: 4px; }
.train-item .value { font-size: 14px; color: var(--ink-muted); line-height: 1.55; }

/* Publications band (teal) ------------------------------------ */
.pub-band {
  background: var(--bg-deep);
  color: var(--on-deep);
  padding: clamp(40px, 5vw, 64px) 0;
}
.pub-band .eyebrow { color: var(--accent); }
.pub-band h2 { color: var(--on-deep); margin-top: 12px; }
.pub-list { list-style: none; margin-top: 28px; }
.pub-list li {
  padding: 18px 0;
  border-top: 1px solid rgba(232, 221, 196, 0.18);
  font-family: var(--font-serif);
  font-size: 17px;
  line-height: 1.55;
  color: var(--on-deep);
}
.pub-list li:first-child { border-top: 1px solid rgba(232, 221, 196, 0.3); }
.pub-list .meta { display: block; font-family: var(--font-sans); font-size: 12px; letter-spacing: 0.5px; color: var(--accent); margin-top: 6px; text-transform: uppercase; }
.pub-band .more { display: inline-block; margin-top: 24px; color: var(--accent); font-size: 13px; letter-spacing: 0.5px; }

/* Steps / numbered process ------------------------------------ */
.steps { display: grid; grid-template-columns: 1fr; gap: 32px; }
@media (min-width: 720px) { .steps { grid-template-columns: repeat(4, 1fr); gap: 28px; } }
.step .num { font-family: var(--font-serif); font-style: italic; font-size: 32px; color: var(--accent); margin-bottom: 8px; }
.step h3 { font-size: 18px; margin-bottom: 8px; }
.step p { font-size: 15px; color: var(--ink-muted); margin: 0; }

/* Two-column generic ------------------------------------------ */
.two-col { display: grid; grid-template-columns: 1fr; gap: 36px; }
@media (min-width: 820px) { .two-col { grid-template-columns: 1fr 1fr; gap: 56px; } }
.two-col h3 { margin-bottom: 12px; }
.two-col ul { list-style: none; padding: 0; }
.two-col li { padding: 12px 0; border-bottom: 1px solid var(--border); font-size: 15px; color: var(--ink-muted); }
.two-col li:last-child { border-bottom: none; }

/* Meet block (home page) ------------------------------------- */
.meet-grid { display: grid; grid-template-columns: 1fr; gap: 28px; align-items: center; }
@media (min-width: 720px) { .meet-grid { grid-template-columns: 200px 1fr; gap: 48px; } }
.meet-grid .portrait { width: 100%; }

/* Contact ----------------------------------------------------- */
.contact-grid { display: grid; grid-template-columns: 1fr; gap: 32px; }
@media (min-width: 820px) { .contact-grid { grid-template-columns: 1fr 1fr; gap: 56px; } }
.contact-card {
  border: 1px solid var(--border);
  padding: clamp(24px, 3.5vw, 36px);
  background: var(--bg);
}
.contact-card h3 { margin-bottom: 12px; }
.contact-card p { color: var(--ink-muted); font-size: 15px; margin-bottom: 18px; }
.contact-card .email {
  display: inline-block;
  font-family: var(--font-serif);
  font-size: 20px;
  color: var(--primary);
  border-bottom: 1px solid var(--accent);
  padding-bottom: 2px;
}
.contact-meta { font-size: 14px; color: var(--ink-muted); line-height: 1.7; }
.contact-meta strong { font-weight: 500; color: var(--ink); display: block; margin-top: 14px; }

/* Form -------------------------------------------------------- */
form { display: grid; gap: 18px; }
.field { display: grid; gap: 6px; }
.field label { font-size: 12px; letter-spacing: 1.2px; text-transform: uppercase; color: var(--ink-quiet); font-weight: 500; }
.field input, .field textarea, .field select {
  font-family: var(--font-sans);
  font-size: 16px;
  padding: 12px 14px;
  border: 1px solid var(--border-strong);
  background: var(--bg);
  color: var(--ink);
  border-radius: 0;
  width: 100%;
}
.field input:focus, .field textarea:focus, .field select:focus {
  outline: 2px solid var(--accent);
  outline-offset: 1px;
  border-color: var(--primary);
}
.field textarea { min-height: 140px; resize: vertical; }

/* Insights stub ----------------------------------------------- */
.coming-soon { text-align: center; padding: clamp(64px, 10vw, 112px) 0; }
.coming-soon .rule { margin-left: auto; margin-right: auto; }
.coming-soon h1 { margin-bottom: 20px; }
.coming-soon .lede { max-width: 50ch; margin: 0 auto 32px; }
.topics-pre { color: var(--ink-quiet); font-size: 13px; letter-spacing: 1.6px; text-transform: uppercase; margin-bottom: 14px; font-weight: 500; }
.topics { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; max-width: 580px; margin: 0 auto; }
.topic-chip { font-family: var(--font-serif); font-style: italic; font-size: 17px; color: var(--primary); padding: 8px 16px; border: 1px solid var(--border-strong); }

/* Footer ------------------------------------------------------ */
.site-footer { background: var(--bg-deep); color: var(--accent-soft); padding: 56px 0 36px; margin-top: clamp(48px, 6vw, 80px); }
.footer-grid { display: grid; grid-template-columns: 1fr; gap: 32px; }
@media (min-width: 720px) { .footer-grid { grid-template-columns: 2fr 1fr 1fr; gap: 48px; } }
.site-footer .brand .name { color: var(--on-deep); }
.site-footer .brand .sub { color: var(--accent); }
.site-footer h4 { color: var(--on-deep); font-family: var(--font-sans); font-size: 12px; letter-spacing: 2px; text-transform: uppercase; font-weight: 500; margin-bottom: 16px; }
.site-footer a { color: var(--accent-soft); font-size: 14px; display: block; padding: 4px 0; }
.site-footer a:hover { color: var(--accent); text-decoration: none; }
.site-footer .disclaimer { font-size: 12px; color: rgba(232, 221, 196, 0.55); margin-top: 36px; padding-top: 24px; border-top: 1px solid rgba(232, 221, 196, 0.18); line-height: 1.6; max-width: 70ch; }

/* Mobile nav -------------------------------------------------- */
@media (max-width: 760px) {
  .nav { display: none; position: absolute; top: 100%; left: 0; right: 0; background: var(--bg); border-bottom: 1px solid var(--border); flex-direction: column; gap: 0; padding: 8px 0; }
  .nav.open { display: flex; }
  .nav a { display: block; padding: 14px var(--gutter); border-bottom: 1px solid var(--border); width: 100%; }
  .nav a:last-child { border-bottom: none; }
  .nav-toggle { display: inline-block; }
}

/* Print styles ------------------------------------------------ */
@media print {
  .site-header, .site-footer, .hero-cta, .nav-toggle { display: none; }
  body { background: white; color: black; }
  a { color: black; text-decoration: underline; }
  .pub-band, .cred-band { background: white; color: black; }
  .pub-band h2, .pub-band .eyebrow, .pub-list li { color: black; }
}

/* ============================================================
   Blog list & single post (added with admin portal v1)
   ============================================================ */

.post-list {
  list-style: none;
  padding: 0;
  margin: 0;
  border-top: 1px solid var(--border);
}

.post-item {
  border-bottom: 1px solid var(--border);
}

.post-link {
  display: block;
  padding: 32px 0;
  color: var(--ink);
  text-decoration: none;
  transition: padding-left 0.18s ease;
}

.post-link:hover {
  padding-left: 12px;
  text-decoration: none;
}

.post-link:hover .post-title {
  color: var(--primary);
}

.post-date {
  display: block;
  font-size: 13px;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--ink-quiet);
  margin-bottom: 10px;
}

.post-title {
  font-size: clamp(24px, 3vw, 32px);
  line-height: 1.25;
  margin: 0 0 12px;
  color: var(--ink);
  font-weight: 500;
  transition: color 0.18s ease;
  max-width: 32ch;
}

.post-summary {
  font-size: 16px;
  line-height: 1.55;
  color: var(--ink-muted);
  max-width: 60ch;
  margin: 0 0 16px;
}

.post-more {
  font-size: 14px;
  color: var(--primary);
  font-weight: 500;
}

.post-hero {
  width: 100%;
  height: auto;
  border-radius: 2px;
  border: 1px solid var(--border);
}

.post-body {
  font-size: 18px;
  line-height: 1.75;
  color: var(--ink);
}

.post-body p {
  margin: 0 0 22px;
}

.post-body h2 {
  font-family: var(--font-serif);
  font-size: 26px;
  font-weight: 500;
  margin: 36px 0 14px;
  color: var(--ink);
  line-height: 1.3;
}

.post-body h3 {
  font-family: var(--font-sans);
  font-size: 18px;
  font-weight: 600;
  margin: 28px 0 10px;
  color: var(--ink);
  letter-spacing: 0.2px;
}

.post-body ul,
.post-body ol {
  margin: 0 0 22px 22px;
  padding: 0;
}

.post-body li {
  margin: 0 0 8px;
}

.post-body blockquote {
  font-family: var(--font-serif);
  font-size: 22px;
  line-height: 1.5;
  font-style: italic;
  color: var(--primary);
  border-left: 3px solid var(--accent);
  padding: 6px 0 6px 22px;
  margin: 28px 0;
}

.post-body img {
  margin: 24px 0;
  border-radius: 2px;
  border: 1px solid var(--border);
}

.post-body a {
  color: var(--primary);
  text-decoration: underline;
  text-underline-offset: 3px;
  text-decoration-thickness: 1px;
}

.post-body strong { color: var(--ink); }

.post-body code {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 0.92em;
  background: var(--bg-warm);
  padding: 1px 5px;
  border-radius: 2px;
}
