/* =========================================================
   Deepak Didwania — Public site stylesheet
   Design language: a finance leader's ledger — deep ink navy,
   brass accents, hairline rules, serif figures for numbers.
   ========================================================= */

:root {
  --ink:        #0E1E33;   /* primary dark navy */
  --ink-soft:   #16304F;   /* lighter navy panel */
  --paper:      #F6F4EC;   /* warm paper background */
  --paper-dim:  #ECE8DB;   /* slightly deeper paper for panels */
  --slate:      #2B3242;   /* body text on paper */
  --slate-soft: #5B6475;   /* secondary text on paper */
  --brass:      #AD8A4E;   /* accent — brass */
  --brass-deep: #8A6D39;   /* accent hover / deep */
  --rule-dark:  #2B4568;   /* hairline rule on navy */
  --rule-light: #D9D2BE;   /* hairline rule on paper */
  --cream-text: #EDE7D6;   /* text on navy */
  --radius: 3px;
  --max: 1120px;
}

@media (prefers-color-scheme: dark) {
  :root { }
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--slate);
  font-family: "Source Sans 3", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 17px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4, .display {
  font-family: "Fraunces", Georgia, serif;
  font-weight: 600;
  color: var(--ink);
  line-height: 1.15;
  margin: 0 0 0.5em;
  letter-spacing: -0.01em;
}

h1 { font-size: clamp(2.1rem, 4.2vw, 3.4rem); font-weight: 560; }
h2 { font-size: clamp(1.6rem, 2.6vw, 2.2rem); }
h3 { font-size: 1.25rem; }

p { margin: 0 0 1em; max-width: 68ch; }

a { color: var(--brass-deep); text-decoration: none; }
a:hover { color: var(--ink); }

:focus-visible {
  outline: 2px solid var(--brass);
  outline-offset: 2px;
}

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

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

.hairline {
  border: none;
  border-top: 1px solid var(--rule-light);
  margin: 0;
}

/* ---------- Header / Nav ---------- */
.site-header {
  background: var(--ink);
  position: sticky;
  top: 0;
  z-index: 50;
  border-bottom: 1px solid var(--rule-dark);
}
.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 78px;
}
.brand {
  font-family: "Fraunces", serif;
  font-size: 1.3rem;
  color: var(--cream-text);
  font-weight: 600;
  letter-spacing: -0.01em;
}
.brand span { color: var(--brass); }

.nav-links {
  display: flex;
  gap: 2rem;
  list-style: none;
  margin: 0;
  padding: 0;
}
.nav-links a {
  color: var(--cream-text);
  font-size: 0.95rem;
  opacity: 0.85;
  position: relative;
  padding: 6px 0;
}
.nav-links a:hover, .nav-links a.active { opacity: 1; color: #fff; }
.nav-links a.active:not(.nav-cta)::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: -2px;
  height: 2px;
  background: var(--brass);
}

.nav-links a.nav-cta {
  background: var(--brass);
  color: var(--ink) !important;
  padding: 10px 20px;
  border-radius: var(--radius);
  font-weight: 600;
  font-size: 0.92rem;
}
.nav-cta:hover { background: #c7a263; }

.nav-toggle {
  display: none;
  background: none;
  border: none;
  color: var(--cream-text);
  font-size: 1.6rem;
  cursor: pointer;
}

@media (max-width: 860px) {
  .nav-toggle { display: block; }
  .nav-links {
    position: absolute;
    top: 78px; left: 0; right: 0;
    background: var(--ink);
    flex-direction: column;
    gap: 0;
    border-bottom: 1px solid var(--rule-dark);
    max-height: 0;
    overflow: hidden;
    transition: max-height .25s ease;
  }
  .nav-links.open { max-height: 420px; }
  .nav-links li { width: 100%; }
  .nav-links a { display: block; padding: 16px 24px; }
  .nav-cta { margin: 12px 24px; display: inline-block; }
}

/* ---------- Hero ---------- */
.hero {
  background: var(--ink);
  color: var(--cream-text);
  padding: 92px 0 72px;
  position: relative;
  overflow: hidden;
}
.hero::after {
  content: "";
  position: absolute;
  right: -120px; top: -120px;
  width: 420px; height: 420px;
  border: 1px solid var(--rule-dark);
  border-radius: 50%;
}
.hero-grid {
  display: grid;
  grid-template-columns: 1.3fr 1fr;
  gap: 56px;
  align-items: end;
  position: relative;
  z-index: 1;
}
.eyebrow {
  font-family: "Fraunces", serif;
  font-style: italic;
  color: var(--brass);
  font-size: 1.05rem;
  margin: 0 0 1rem;
  padding-left: 14px;
  border-left: 2px solid var(--brass);
}
.hero h1 { color: #fff; margin-bottom: 0.6em; }
.hero-sub { color: #C9CFDA; font-size: 1.12rem; max-width: 46ch; }
.hero-actions { margin-top: 2rem; display: flex; gap: 14px; flex-wrap: wrap; }

.btn {
  display: inline-block;
  padding: 13px 26px;
  border-radius: var(--radius);
  font-weight: 600;
  font-size: 0.95rem;
  border: 1px solid transparent;
  cursor: pointer;
}
.btn-brass { background: var(--brass); color: var(--ink); }
.btn-brass:hover { background: #c7a263; color: var(--ink); }
.btn-outline { border-color: var(--rule-dark); color: var(--cream-text); background: transparent; }
.btn-outline:hover { border-color: var(--brass); color: var(--brass); }
.btn-ink { background: var(--ink); color: #fff; }
.btn-ink:hover { background: var(--ink-soft); color: #fff; }

.hero-stats {
  display: flex;
  flex-direction: column;
  gap: 22px;
  border-left: 1px solid var(--rule-dark);
  padding-left: 32px;
}
.stat-value {
  font-family: "Fraunces", serif;
  font-size: 2.1rem;
  color: var(--brass);
  line-height: 1;
}
.stat-label { color: #AEB6C4; font-size: 0.88rem; margin-top: 4px; max-width: 26ch; }

@media (max-width: 860px) {
  .hero-grid { grid-template-columns: 1fr; gap: 36px; }
  .hero-stats { border-left: none; padding-left: 0; flex-direction: row; flex-wrap: wrap; gap: 28px; }
}

/* ---------- Generic section rhythm ---------- */
.section { padding: 76px 0; }
.section-dim { background: var(--paper-dim); }
.section-ink { background: var(--ink); color: var(--cream-text); }
.section-ink h2, .section-ink h3 { color: #fff; }
.section-head { max-width: 62ch; margin-bottom: 2.6rem; }
.section-head .eyebrow { border-left-color: var(--brass); color: var(--brass-deep); }
.section-ink .section-head .eyebrow { color: var(--brass); }

/* ---------- About intro / rich text ---------- */
.lede { font-size: 1.18rem; color: var(--slate); max-width: 64ch; }
.rich-text p { font-size: 1.05rem; }

/* ---------- Achievements grid ---------- */
.stat-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1px;
  background: var(--rule-light);
  border: 1px solid var(--rule-light);
}
.stat-cell {
  background: var(--paper);
  padding: 32px 26px;
}
.stat-cell .stat-value { color: var(--brass-deep); font-size: 2rem; }
.stat-cell .stat-label { color: var(--slate-soft); }
@media (max-width: 860px) { .stat-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 520px) { .stat-grid { grid-template-columns: 1fr; } }

/* ---------- Education grid ---------- */
.edu-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 28px; }
.edu-item { border-top: 2px solid var(--brass); padding-top: 14px; }
.edu-year { color: var(--brass-deep); font-weight: 600; font-size: 0.88rem; }
.edu-item h3 { margin: 6px 0 2px; font-size: 1.08rem; }
.edu-org { color: var(--slate-soft); font-size: 0.95rem; }
@media (max-width: 700px) { .edu-grid { grid-template-columns: 1fr; } }

/* ---------- Ventures ---------- */
.venture-list { display: grid; gap: 22px; }
.venture-item {
  display: grid;
  grid-template-columns: 200px 1fr;
  gap: 22px;
  padding: 24px 0;
  border-bottom: 1px solid var(--rule-light);
}
.venture-item:last-child { border-bottom: none; }
.venture-item h3 { margin-bottom: 4px; }
.venture-item h3 a { color: var(--ink); }
.venture-item h3 a:hover { color: var(--brass-deep); }
@media (max-width: 700px) { .venture-item { grid-template-columns: 1fr; } }

/* ---------- Skills grid / tags ---------- */
.skills-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px 32px;
}
.skills-grid li {
  list-style: none;
  padding: 14px 0 14px 18px;
  border-left: 2px solid var(--rule-light);
  font-weight: 600;
  color: var(--ink);
}
@media (max-width: 860px) { .skills-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px) { .skills-grid { grid-template-columns: 1fr; } }

.tag-row { display: flex; flex-wrap: wrap; gap: 10px; list-style: none; padding: 0; margin: 0; }
.tag-row li {
  border: 1px solid var(--rule-light);
  padding: 8px 16px;
  border-radius: 999px;
  font-size: 0.92rem;
  color: var(--slate);
}

/* ---------- Timeline ---------- */
.timeline { display: grid; gap: 0; }
.timeline-item {
  display: grid;
  grid-template-columns: 230px 1fr;
  gap: 32px;
  padding: 32px 0;
  border-top: 1px solid var(--rule-light);
}
.timeline-item:first-child { border-top: none; }
.timeline-period {
  font-family: "Fraunces", serif;
  color: var(--brass-deep);
  font-size: 1.05rem;
}
.timeline-role h3 { margin-bottom: 2px; }
.timeline-org { color: var(--slate-soft); font-style: italic; margin-bottom: 10px; }
.timeline-bullets { margin: 10px 0 0; padding-left: 20px; }
.timeline-bullets li { margin-bottom: 6px; }
@media (max-width: 760px) {
  .timeline-item { grid-template-columns: 1fr; gap: 8px; }
}

/* ---------- Services grid ---------- */
.services-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  background: var(--rule-light);
  border: 1px solid var(--rule-light);
}
.service-cell { background: var(--paper); padding: 28px 24px; }
.service-cell h3 { font-size: 1.08rem; margin-bottom: 8px; }
.service-cell p { font-size: 0.96rem; color: var(--slate-soft); margin: 0; }
@media (max-width: 860px) { .services-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px) { .services-grid { grid-template-columns: 1fr; } }

/* ---------- CTA banner ---------- */
.cta-banner {
  background: var(--ink);
  color: var(--cream-text);
  padding: 56px 0;
}
.cta-banner-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 28px;
  flex-wrap: wrap;
}
.cta-banner h2 { color: #fff; margin-bottom: 6px; }
.cta-banner p { color: #C9CFDA; margin: 0; max-width: 50ch; }

/* ---------- Blog ---------- */
.post-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 36px; }
.post-card { border-top: 2px solid var(--brass); padding-top: 16px; }
.post-date { color: var(--slate-soft); font-size: 0.85rem; }
.post-card h3 { margin: 6px 0 8px; }
.post-card h3 a { color: var(--ink); }
.post-card h3 a:hover { color: var(--brass-deep); }
.post-excerpt { color: var(--slate-soft); }
@media (max-width: 760px) { .post-grid { grid-template-columns: 1fr; } }

.post-body { max-width: 72ch; font-size: 1.07rem; }
.post-body p { margin-bottom: 1.3em; }
.post-body h2, .post-body h3 { margin-top: 1.6em; }
.post-hero-title { max-width: 48ch; }

/* ---------- Forms (enquiry / contact) ---------- */
.form-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 18px;
}
.form-grid .full { grid-column: 1 / -1; }
.field label {
  display: block;
  font-size: 0.86rem;
  font-weight: 600;
  color: var(--slate);
  margin-bottom: 6px;
}
.field input, .field textarea {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid var(--rule-light);
  border-radius: var(--radius);
  background: #fff;
  font-family: inherit;
  font-size: 0.98rem;
  color: var(--slate);
}
.field input:focus, .field textarea:focus {
  outline: none;
  border-color: var(--brass);
  box-shadow: 0 0 0 3px rgba(173,138,78,0.15);
}
.field textarea { resize: vertical; min-height: 120px; }
@media (max-width: 640px) { .form-grid { grid-template-columns: 1fr; } }

.alert {
  padding: 14px 18px;
  border-radius: var(--radius);
  margin-bottom: 22px;
  font-size: 0.95rem;
}
.alert-success { background: #E7EFE9; color: #2F5240; border: 1px solid #BFD8C8; }
.alert-error { background: #F7E9E6; color: #7A3426; border: 1px solid #E2B8AE; }

/* ---------- Footer ---------- */
.site-footer {
  background: var(--ink);
  color: #AEB6C4;
  padding: 48px 0 28px;
  margin-top: 0;
}
.footer-grid {
  display: flex;
  justify-content: space-between;
  gap: 24px;
  flex-wrap: wrap;
  border-bottom: 1px solid var(--rule-dark);
  padding-bottom: 28px;
  margin-bottom: 20px;
}
.footer-brand { color: var(--cream-text); font-family: "Fraunces", serif; font-size: 1.1rem; }
.footer-contact a { color: #AEB6C4; }
.footer-contact a:hover { color: var(--brass); }
.footer-bottom { font-size: 0.85rem; display: flex; justify-content: space-between; flex-wrap: wrap; gap: 10px; }

/* ---------- Utility ---------- */
.text-center { text-align: center; }
.mt-0 { margin-top: 0; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { transition: none !important; animation: none !important; }
}

/* ---------- Tenure bar chart ---------- */
.tenure-chart { display: flex; flex-direction: column; gap: 18px; margin-top: 12px; }
.tenure-row { display: flex; align-items: center; gap: 18px; }
.tenure-label { width: 220px; flex-shrink: 0; font-weight: 600; color: var(--ink); font-size: 0.95rem; }
.tenure-track { flex: 1; background: var(--paper-dim); border-radius: 4px; height: 24px; overflow: hidden; }
.tenure-bar { height: 24px; background: var(--brass); border-radius: 4px; }
.tenure-value { width: 80px; flex-shrink: 0; text-align: right; color: var(--slate-soft); font-size: 0.9rem; }
.tenure-note { font-size: 0.85rem; color: var(--slate-soft); margin-top: 16px; }
@media (max-width: 640px) {
  .tenure-label { width: 110px; font-size: 0.82rem; }
  .tenure-value { width: 56px; font-size: 0.82rem; }
}

/* ---------- Venture logos ---------- */
.venture-logo {
  display: block;
  max-width: 140px;
  max-height: 48px;
  width: auto;
  height: auto;
  object-fit: contain;
  margin-bottom: 14px;
}
