/* dharmaramasamy.com — system fonts only, no external requests. */

:root {
  --bg: #fafaf9;
  --fg: #1b1d1f;
  --muted: #4a4f55;
  --rule: #d9dcdf;
  --surface: #f0f1f2;
  --accent: #1f3a4d;
  --accent-fg: #ffffff;
  --focus: #1f3a4d;

  --sans: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace;

  --measure: 42rem;
  color-scheme: light dark;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #111315;
    --fg: #e4e6e8;
    --muted: #a3a9b0;
    --rule: #2c3035;
    --surface: #1a1d20;
    --accent: #a9bfd1;
    --accent-fg: #111315;
    --focus: #a9bfd1;
  }
}

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

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

body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font-family: var(--sans);
  font-size: 1.0625rem;
  line-height: 1.6;
}

.wrap {
  max-width: var(--measure);
  margin-inline: auto;
  padding-inline: 1.25rem;
}

/* Typography */

h1, h2 { line-height: 1.25; font-weight: 600; letter-spacing: -0.01em; }
h1 { font-size: clamp(1.75rem, 1.2rem + 2.4vw, 2.5rem); margin: 0 0 1rem; }
h2 {
  font-size: 1.125rem;
  margin: 0 0 1rem;
  padding-top: 1.25rem;
  border-top: 1px solid var(--rule);
}

p, ul { margin: 0 0 1rem; }
ul { padding-left: 1.25rem; }
li + li { margin-top: 0.5rem; }

a { color: var(--accent); text-underline-offset: 0.15em; }
a:hover { text-decoration-thickness: 2px; }

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

code, pre { font-family: var(--mono); font-size: 0.875rem; }
p code {
  background: var(--surface);
  padding: 0.1em 0.35em;
  border-radius: 3px;
}

.visually-hidden {
  position: absolute !important;
  width: 1px; height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  white-space: nowrap;
}

.skip-link {
  position: absolute;
  left: 1rem;
  top: -3rem;
  background: var(--bg);
  padding: 0.5rem 0.75rem;
  z-index: 1;
}
.skip-link:focus { top: 1rem; }

/* Layout */

.site-header { padding-block: 1.25rem; border-bottom: 1px solid var(--rule); }
.site-name { color: var(--fg); font-weight: 600; text-decoration: none; }

main > section { margin-block: 3rem; }

.hero { margin-top: 3.5rem; }
.lede { font-size: 1.1875rem; color: var(--muted); }
.terms { color: var(--muted); font-size: 0.9375rem; }

.button {
  display: inline-block;
  margin-top: 0.5rem;
  padding: 0.7rem 1.1rem;
  background: var(--accent);
  color: var(--accent-fg);
  font-weight: 600;
  text-decoration: none;
  border-radius: 4px;
}
.button:hover { text-decoration: underline; }

/* Code sample */

.code { border: 1px solid var(--rule); border-radius: 4px; background: var(--surface); }
.code-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  padding: 0.4rem 0.5rem 0.4rem 1.1rem;
  border-bottom: 1px solid var(--rule);
  font-size: 0.8125rem;
  color: var(--muted);
  min-height: 2.5rem;
}
.code pre {
  margin: 0;
  padding: 1rem 1.1rem;
  overflow-x: auto;
  line-height: 1.5;
}
.copy {
  font: 600 0.8125rem/1 var(--sans);
  padding: 0.45rem 0.7rem;
  color: var(--fg);
  background: var(--bg);
  border: 1px solid var(--rule);
  border-radius: 3px;
  cursor: pointer;
}
.copy:hover { border-color: var(--muted); }

/* Dimension weights */

.table-scroll { overflow-x: auto; }
.weights { width: 100%; border-collapse: collapse; font-size: 0.9375rem; }
.weights th, .weights td {
  text-align: left;
  font-weight: normal;
  padding: 0.55rem 0.75rem 0.55rem 0;
  border-bottom: 1px solid var(--rule);
  vertical-align: middle;
}
.weights thead th { font-weight: 600; color: var(--muted); font-size: 0.8125rem; }
.weights .num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.weights .bar-col { width: 40%; padding-right: 0; }
.bar { display: block; height: 0.5rem; background: var(--accent); }
/* Bars are scaled so the largest weight (20%) fills the column. */
.bar.w5  { width: 25%; }
.bar.w10 { width: 50%; }
.bar.w15 { width: 75%; }
.bar.w20 { width: 100%; }

/* Example finding */

.finding {
  margin: 0;
  padding: 1rem 1.1rem;
  border-left: 3px solid var(--accent);
  background: var(--surface);
}
.finding figcaption {
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--muted);
  margin-bottom: 0.5rem;
}
.finding p { margin: 0; }

/* Footer */

.site-footer {
  margin-top: 4rem;
  padding-block: 2rem 3rem;
  border-top: 1px solid var(--rule);
  color: var(--muted);
  font-size: 0.9375rem;
}
.site-footer p { margin: 0 0 0.35rem; }

/* Privacy page */

.prose h1 { font-size: 1.75rem; margin-top: 3rem; }
.updated { color: var(--muted); font-size: 0.9375rem; }

@media (min-width: 48rem) {
  body { font-size: 1.125rem; }
  main > section { margin-block: 4rem; }
  .hero { margin-top: 5rem; }
}

@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; animation: none !important; }
}
