/* ============================================================
   Garg Forensic Engineering — site styles
   Plain CSS, no framework. Design tokens mirror the original.
   Breakpoints: md = 768px, lg = 1024px
   ============================================================ */

:root {
  --background: #FFFFFF;
  --foreground: #333333;
  --primary: #0F172A;            /* navy */
  --primary-foreground: #FFFFFF;
  --secondary: #F8FAFC;          /* light slate panel */
  --muted-foreground: #64748B;   /* slate gray text */
  --border: #E2E8F0;

  --font-serif: 'Playfair Display', Georgia, serif;
  --font-sans: 'Inter', system-ui, -apple-system, Segoe UI, Roboto, sans-serif;
}

/* ---------- reset ---------- */
*,
*::before,
*::after { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--font-sans);
  color: var(--foreground);
  background: var(--background);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

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

a { color: inherit; text-decoration: none; }

h1, h2, h3 { margin: 0; font-weight: 400; }

.serif { font-family: var(--font-serif); }

/* ---------- layout containers ---------- */
.wrap,
.wrap-5,
.wrap-4,
.wrap-read {
  margin-inline: auto;
  padding-inline: 1.5rem;
  width: 100%;
}
.wrap      { max-width: 72rem; }  /* max-w-6xl */
.wrap-5    { max-width: 64rem; }  /* max-w-5xl */
.wrap-4    { max-width: 56rem; }  /* max-w-4xl */
.wrap-read { max-width: 56rem; }  /* max-w-4xl, wider gutters on lg */

@media (min-width: 768px) {
  .wrap, .wrap-5, .wrap-4, .wrap-read { padding-inline: 3rem; }
}
@media (min-width: 1024px) {
  .wrap-read { padding-inline: 6rem; }
}

/* ---------- shared section pieces ---------- */
.section        { padding-block: 6rem; }            /* py-24 */
.section--light { background: var(--secondary); }
.section--tall  { padding-block: 6rem; }
@media (min-width: 768px) {
  .section, .section--tall { padding-block: 8rem; } /* md:py-32 */
}
.section--mid   { padding-block: 4rem; }            /* py-16 */
.section--mid.section--light,
.section--mid { padding-block: 4rem; }

.eyebrow {
  font-size: 0.875rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--muted-foreground);
  margin: 0;
}

.rule {
  width: 4rem;
  height: 1px;
  background: var(--primary);
  border: 0;
  margin: 1rem 0;
}
.rule--center { margin-inline: auto; }
.rule--light  { background: rgba(255, 255, 255, 0.3); }

.muted { color: var(--muted-foreground); }
.lede  { font-size: 1.125rem; line-height: 1.7; }

/* vertical rhythm helpers */
.stack > * + * { margin-top: 1rem; }
.stack-6 > * + * { margin-top: 1.5rem; }
.stack-8 > * + * { margin-top: 2rem; }
.stack-12 > * + * { margin-top: 3rem; }

/* ---------- header ---------- */
.site-header {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 50;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  border-bottom: 1px solid var(--border);
}
.site-header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 4rem;
}
.brand {
  font-family: var(--font-serif);
  font-size: 1.25rem;
  letter-spacing: 0.05em;
  color: var(--foreground);
}
.nav-desktop { display: none; gap: 2rem; align-items: center; }
.nav-desktop a {
  font-size: 0.875rem;
  letter-spacing: 0.025em;
  color: var(--muted-foreground);
  transition: color 0.15s ease;
}
.nav-desktop a:hover { color: var(--foreground); }

.nav-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.25rem; height: 2.25rem;
  background: none; border: 0; padding: 0;
  color: var(--foreground); cursor: pointer;
}
.nav-toggle .icon-close { display: none; }
.nav-toggle[aria-expanded="true"] .icon-open  { display: none; }
.nav-toggle[aria-expanded="true"] .icon-close { display: block; }

.nav-mobile { display: none; border-top: 1px solid var(--border); background: var(--background); }
.nav-mobile.open { display: block; }
.nav-mobile nav { display: flex; flex-direction: column; padding: 0.5rem 1.5rem 1rem; }
.nav-mobile a {
  font-size: 0.875rem;
  letter-spacing: 0.025em;
  color: var(--muted-foreground);
  padding: 0.75rem 0;
  border-bottom: 1px solid var(--border);
  transition: color 0.15s ease;
}
.nav-mobile a:last-child { border-bottom: 0; }
.nav-mobile a:hover { color: var(--foreground); }

@media (min-width: 768px) {
  .nav-desktop { display: flex; }
  .nav-toggle  { display: none; }
  .nav-mobile  { display: none !important; }
}

/* push fixed-header content down on interior pages */
.page-main { padding-top: 4rem; }

/* ---------- hero (home) ---------- */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--primary);
  overflow: hidden;
}
.hero__texture,
.hero__grid {
  position: absolute;
  inset: 0;
  pointer-events: none;
}
.hero__texture {
  opacity: 0.03;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 400 400' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noiseFilter'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noiseFilter)'/%3E%3C/svg%3E");
}
.hero__grid {
  opacity: 0.04;
  background-image:
    linear-gradient(rgba(255,255,255,0.1) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.1) 1px, transparent 1px);
  background-size: 60px 60px;
}
.hero__inner {
  position: relative;
  z-index: 10;
  max-width: 56rem;
  margin-inline: auto;
  padding-inline: 1.5rem;
  text-align: center;
}
.hero__eyebrow {
  color: rgba(255, 255, 255, 0.6);
  font-size: 0.875rem;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  margin: 0 0 1rem;
}
.hero__title {
  font-family: var(--font-serif);
  color: var(--primary-foreground);
  font-size: 2.25rem;
  line-height: 1.1;
  letter-spacing: -0.025em;
}
.hero__sub {
  color: rgba(255, 255, 255, 0.8);
  font-size: 1.125rem;
  line-height: 1.7;
  max-width: 42rem;
  margin: 2rem auto;
}
.hero__fade {
  position: absolute;
  left: 0; right: 0; bottom: 0;
  height: 8rem;
  background: linear-gradient(to top, var(--background), transparent);
}
@media (min-width: 768px) {
  .hero__inner { padding-inline: 3rem; }
  .hero__title { font-size: 3rem; }
  .hero__sub   { font-size: 1.25rem; }
}
@media (min-width: 1024px) {
  .hero__title { font-size: 3.75rem; }
}

/* ---------- buttons / links ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.875rem;
  letter-spacing: 0.025em;
  padding: 0.75rem 1.5rem;
  border: 1px solid transparent;
  cursor: pointer;
  transition: background-color 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}
.btn--hero {
  border-color: rgba(255, 255, 255, 0.4);
  color: var(--primary-foreground);
  background: transparent;
  padding: 0.9rem 2rem;
}
.btn--hero:hover { background: var(--primary-foreground); color: var(--primary); }

.btn--outline {
  border-color: var(--primary);
  color: var(--foreground);
}
.btn--outline:hover { background: var(--primary); color: var(--primary-foreground); }

.btn--ghost {
  border-color: var(--border);
  color: var(--muted-foreground);
}
.btn--ghost:hover { color: var(--foreground); border-color: var(--foreground); }

.btn--solid {
  background: var(--primary);
  color: var(--primary-foreground);
  padding: 1rem 2rem;
}
.btn--solid:hover { background: rgba(15, 23, 42, 0.9); }

/* underline text link with arrow */
.link-arrow {
  display: inline-flex;
  align-items: center;
  font-size: 0.875rem;
  letter-spacing: 0.025em;
  color: var(--muted-foreground);
  border-bottom: 1px solid rgba(100, 116, 139, 0.4);
  padding-bottom: 1px;
  transition: color 0.15s ease, border-color 0.15s ease;
}
.link-arrow:hover { color: var(--foreground); border-bottom-color: var(--foreground); }

/* ---------- bio / profile ---------- */
.profile { display: flex; flex-direction: column; gap: 3rem; align-items: flex-start; }
.profile__photo {
  flex-shrink: 0;
  width: 12rem; height: 15rem;
  border: 1px solid var(--border);
  overflow: hidden;
  margin-inline: auto;
}
.profile__photo img { width: 100%; height: 100%; object-fit: cover; object-position: top; }
.profile__body { flex: 1; }
.profile__body p { font-size: 1.125rem; line-height: 1.7; }
@media (min-width: 768px) {
  .profile { flex-direction: row; gap: 4rem; }
  .profile__photo { width: 13rem; height: 16rem; margin-inline: 0; }
}

/* ---------- credentials grid ---------- */
.cred-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5rem;
}
.cred-card {
  background: var(--background);
  border: 1px solid var(--border);
  padding: 1.5rem;
  display: flex;
  align-items: flex-start;
  gap: 1rem;
}
.cred-card__title { font-family: var(--font-serif); font-size: 1.125rem; color: var(--foreground); }
.cred-card__sub   { font-size: 0.875rem; color: var(--muted-foreground); margin: 0.25rem 0 0; }
.cred-card .icon  { color: var(--primary); flex-shrink: 0; }
@media (min-width: 768px) {
  .cred-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (min-width: 1024px) {
  .cred-grid { grid-template-columns: repeat(3, 1fr); }
}

/* ---------- services / entry list (border-left items) ---------- */
.services-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2rem;
}
@media (min-width: 768px) {
  .services-grid { grid-template-columns: repeat(2, 1fr); }
}
.entry {
  border-left: 2px solid var(--primary);
  padding: 0.5rem 0 0.5rem 1.5rem;
}
.entry__title { font-family: var(--font-serif); font-size: 1.25rem; color: var(--foreground); margin-bottom: 0.75rem; }
.entry__title--sm { font-size: 1.125rem; line-height: 1.35; }
.entry p { color: var(--muted-foreground); line-height: 1.7; margin: 0; }
.entry .meta { font-size: 0.875rem; color: var(--muted-foreground); margin: 0.25rem 0 0; }
.entry .phase { font-size: 0.75rem; letter-spacing: 0.2em; text-transform: uppercase; color: var(--primary); font-weight: 500; margin: 0 0 0.5rem; }

/* ---------- bordered panel (summary boxes, contact card) ---------- */
.panel {
  background: var(--background);
  border: 1px solid var(--border);
  padding: 2rem;
}
.panel--on-light { background: var(--background); }
.panel--secondary { background: var(--secondary); }
.panel p { color: var(--muted-foreground); line-height: 1.7; }
@media (min-width: 768px) {
  .panel--lg { padding: 3rem; }
}

/* affiliations two-column list */
.affil-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.75rem 3rem;
  color: var(--muted-foreground);
}
.affil-grid .item { display: flex; align-items: flex-start; gap: 0.75rem; }
.affil-grid .bullet { width: 0.375rem; height: 0.375rem; background: var(--primary); flex-shrink: 0; margin-top: 0.55rem; }
@media (min-width: 768px) {
  .affil-grid { grid-template-columns: repeat(2, 1fr); }
}

/* contact card rows */
.contact-row { display: flex; align-items: flex-start; gap: 1.25rem; }
.contact-row .icon { color: var(--primary); flex-shrink: 0; margin-top: 0.25rem; }
.contact-row .label { font-size: 0.875rem; color: var(--muted-foreground); margin: 0 0 0.25rem; }
.contact-row .value { font-family: var(--font-serif); font-size: 1.5rem; color: var(--foreground); transition: color 0.15s ease; }
a.value:hover { color: var(--primary); }
.contact-row .value--sm { font-size: 1.25rem; }
.contact-row .note { font-size: 0.875rem; color: var(--muted-foreground); margin: 0.25rem 0 0; }

/* page header (interior) */
.page-head h1 {
  font-family: var(--font-serif);
  font-size: 2.25rem;
  color: var(--foreground);
  line-height: 1.15;
}
@media (min-width: 768px) {
  .page-head h1 { font-size: 3rem; }
}
.page-head .lede { max-width: 42rem; color: var(--muted-foreground); }

.button-row { display: flex; flex-direction: column; gap: 1rem; }
@media (min-width: 640px) {
  .button-row { flex-direction: row; }
}

.center { text-align: center; }
.col-grow { flex: 1; }
.max-42 { max-width: 42rem; }

/* interior page H1 */
.h1-serif {
  font-family: var(--font-serif);
  font-size: 2.25rem;
  line-height: 1.15;
  color: var(--foreground);
}
@media (min-width: 768px) { .h1-serif { font-size: 3rem; } }

/* ---------- footer ---------- */
.site-footer {
  background: var(--primary);
  padding-block: 5rem;
  text-align: center;
}
@media (min-width: 768px) { .site-footer { padding-block: 6rem; } }
.site-footer .eyebrow { color: rgba(255, 255, 255, 0.6); }
.site-footer__lead { color: rgba(255, 255, 255, 0.8); max-width: 36rem; margin-inline: auto; line-height: 1.7; }
.footer-contact { display: flex; flex-direction: column; align-items: center; gap: 1rem; }
.footer-contact a, .footer-contact .place {
  display: inline-flex; align-items: center; gap: 0.75rem;
  color: var(--primary-foreground);
  transition: color 0.15s ease;
}
.footer-contact a:hover { color: rgba(255, 255, 255, 0.8); }
.footer-contact .place { color: rgba(255, 255, 255, 0.7); }
.footer-contact .icon { color: currentColor; }
.footer-contact span.text { font-size: 1.125rem; }
.footer-note {
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  padding-top: 2rem;
  max-width: 32rem;
  margin-inline: auto;
}
.footer-note p { font-size: 0.875rem; color: rgba(255, 255, 255, 0.5); line-height: 1.7; margin: 0; }
.footer-note strong { color: rgba(255, 255, 255, 0.6); }
.footer-copy { font-size: 0.875rem; color: rgba(255, 255, 255, 0.4); margin: 1rem 0 0; }

.italic { font-style: italic; }
.note-fine { font-size: 0.75rem; color: var(--muted-foreground); font-style: italic; }
