/* askverma.com: minimal, mobile-first, light/dark via system setting */

:root {
  --bg: #ffffff;
  --bg-alt: #f6f7f9;
  --surface: #ffffff;
  --text: #16181d;
  --muted: #555d6b;
  --border: #e3e6eb;
  --accent: #1d4ed8;
  --accent-contrast: #ffffff;
  --accent-soft: #e8eefc;
  --radius: 10px;
  --max: 1080px;
  --narrow: 720px;
  --font: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif;
  color-scheme: light dark;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0f1115;
    --bg-alt: #151820;
    --surface: #171a22;
    --text: #e8eaee;
    --muted: #a2a9b6;
    --border: #2a2f3a;
    --accent: #7aa2ff;
    --accent-contrast: #0f1115;
    --accent-soft: #1c2640;
  }
}

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

html { scroll-behavior: smooth; scroll-padding-top: 4.5rem; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  font-family: var(--font);
  font-size: 1.0625rem;
  line-height: 1.65;
  color: var(--text);
  background: var(--bg);
  -webkit-text-size-adjust: 100%;
  text-rendering: optimizeLegibility;
}

h1, h2, h3 { line-height: 1.2; margin: 0; letter-spacing: -0.01em; }
p { margin: 0 0 1rem; }
a { color: var(--accent); text-underline-offset: 3px; }
a:hover { text-decoration-thickness: 2px; }

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

.container { width: 100%; max-width: var(--max); margin: 0 auto; padding: 0 1.25rem; }
.container.narrow > * { max-width: var(--narrow); }

.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

.skip-link {
  position: absolute; left: 1rem; top: -3rem; z-index: 100;
  background: var(--accent); color: var(--accent-contrast);
  padding: 0.5rem 1rem; border-radius: var(--radius); text-decoration: none;
}
.skip-link:focus { top: 1rem; }

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 10;
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: saturate(180%) blur(8px);
  -webkit-backdrop-filter: saturate(180%) blur(8px);
  border-bottom: 1px solid var(--border);
}
.header-inner { display: flex; align-items: center; justify-content: space-between; gap: 1rem; height: 3.5rem; }
.brand {
  font-weight: 700; text-decoration: none; color: var(--text);
  border: 2px solid var(--text); border-radius: 8px; padding: 0.05rem 0.4rem; font-size: 0.95rem;
}
.nav-list {
  display: flex; gap: 0.25rem; list-style: none; margin: 0; padding: 0;
  overflow-x: auto; scrollbar-width: none;
}
.nav-list::-webkit-scrollbar { display: none; }
.nav-list a {
  display: block; padding: 0.4rem 0.55rem; font-size: 0.9rem;
  color: var(--muted); text-decoration: none; border-radius: 6px; white-space: nowrap;
}
.nav-list a:hover { color: var(--text); background: var(--bg-alt); }
@media (max-width: 420px) {
  .header-inner { gap: 0.5rem; }
  .nav-list { gap: 0; }
  .nav-list a { padding: 0.4rem 0.35rem; font-size: 0.82rem; }
}

/* ---------- Sections ---------- */
section { padding: 4rem 0; }
section + section { border-top: 1px solid var(--border); }
section h2 {
  font-size: 0.85rem; text-transform: uppercase; letter-spacing: 0.12em;
  color: var(--accent); margin-bottom: 1.75rem; font-weight: 700;
}

/* ---------- Hero ---------- */
.hero { padding: 5rem 0 4.5rem; }
.eyebrow { color: var(--muted); font-size: 0.95rem; margin-bottom: 0.75rem; }
.hero h1 { font-size: clamp(2.25rem, 8vw, 4rem); font-weight: 750; margin-bottom: 1rem; }
.headline { font-size: clamp(1.1rem, 2.6vw, 1.35rem); color: var(--muted); max-width: 40ch; margin-bottom: 2rem; }

.actions { display: flex; flex-wrap: wrap; gap: 0.75rem; }
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 44px; padding: 0.6rem 1.15rem;
  border: 1px solid var(--border); border-radius: var(--radius);
  color: var(--text); background: var(--surface);
  font-weight: 600; font-size: 0.95rem; text-decoration: none;
  transition: border-color .15s, background .15s;
}
.btn:hover { border-color: var(--accent); }
.btn-primary { background: var(--accent); border-color: var(--accent); color: var(--accent-contrast); }
.btn-primary:hover { filter: brightness(1.08); }

/* ---------- Timeline ---------- */
.timeline { list-style: none; margin: 0; padding: 0; border-left: 2px solid var(--border); }
.timeline-item { position: relative; padding: 0 0 2.25rem 1.5rem; }
.timeline-item:last-child { padding-bottom: 0.5rem; }
.timeline-item::before {
  content: ""; position: absolute; left: -7px; top: 0.45rem;
  width: 12px; height: 12px; border-radius: 50%;
  background: var(--bg); border: 2px solid var(--accent);
}
.dates { font-size: 0.85rem; color: var(--muted); margin-bottom: 0.25rem; font-variant-numeric: tabular-nums; }
.timeline-item h3 { font-size: 1.15rem; }
.company { color: var(--muted); margin-bottom: 0.6rem; }

.bullets { margin: 0; padding-left: 1.1rem; }
.bullets li { margin-bottom: 0.35rem; }
.bullets li::marker { color: var(--accent); }
.bullets.small { font-size: 0.93rem; color: var(--muted); margin-bottom: 1rem; }

.education { margin-top: 2.5rem; }
.education h3 { font-size: 1rem; margin-bottom: 0.5rem; }
.plain-list { list-style: none; margin: 0; padding: 0; color: var(--muted); }

/* ---------- Projects ---------- */
.filters { display: flex; flex-wrap: wrap; gap: 0.5rem; margin-bottom: 1.75rem; }
.chip-btn {
  font: inherit; font-size: 0.9rem; cursor: pointer;
  min-height: 40px; padding: 0.4rem 0.95rem; border-radius: 999px;
  border: 1px solid var(--border); background: var(--surface); color: var(--text);
}
.chip-btn:hover { border-color: var(--accent); }
.chip-btn[aria-pressed="true"] { background: var(--accent); border-color: var(--accent); color: var(--accent-contrast); }

.project-grid {
  list-style: none; margin: 0; padding: 0;
  display: grid; gap: 1.25rem; grid-template-columns: 1fr;
}
@media (min-width: 680px) { .project-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1000px) { .project-grid { grid-template-columns: repeat(3, 1fr); } }

.card {
  display: flex; flex-direction: column;
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 1.35rem;
}
.card[hidden] { display: none; }
.card-context { font-size: 0.78rem; text-transform: uppercase; letter-spacing: 0.08em; color: var(--muted); margin-bottom: 0.4rem; }
.card h3 { font-size: 1.1rem; margin-bottom: 0.6rem; }
.problem { font-size: 0.97rem; }
.meta { margin: 0 0 1rem; font-size: 0.9rem; }
.meta dt { font-weight: 700; font-size: 0.78rem; text-transform: uppercase; letter-spacing: 0.06em; color: var(--muted); }
.meta dd { margin: 0.1rem 0 0.6rem; }
.card .tags { margin-top: auto; }
.card-links { margin: 1rem 0 0; display: flex; gap: 1rem; font-size: 0.92rem; font-weight: 600; }

.tags { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 0.4rem; }
.tags li {
  font-size: 0.8rem; padding: 0.2rem 0.6rem; border-radius: 999px;
  background: var(--accent-soft); color: var(--text);
}

/* ---------- Skills ---------- */
.skill-groups { display: grid; gap: 1.75rem; grid-template-columns: 1fr; }
@media (min-width: 680px) { .skill-groups { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1000px) { .skill-groups { grid-template-columns: repeat(3, 1fr); } }
.skill-group h3 { font-size: 1rem; margin-bottom: 0.75rem; }
.skill-group .tags li { background: var(--bg-alt); border: 1px solid var(--border); font-size: 0.85rem; padding: 0.25rem 0.7rem; }

/* ---------- Contact ---------- */
.contact-email { font-size: clamp(1.35rem, 4vw, 1.75rem); font-weight: 700; margin: 1.5rem 0; }
.contact-email a { text-decoration: none; border-bottom: 2px solid var(--accent); }
.contact-links { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: 1.5rem; font-weight: 600; }

/* ---------- Footer ---------- */
.site-footer { border-top: 1px solid var(--border); padding: 2rem 0; color: var(--muted); font-size: 0.9rem; }
.site-footer p { margin: 0; }

/* ---------- 404 ---------- */
.notfound { min-height: 70vh; display: flex; align-items: center; }
.notfound .code { font-size: clamp(4rem, 18vw, 8rem); font-weight: 800; color: var(--accent); line-height: 1; margin-bottom: 1rem; }
.notfound h1 { font-size: 1.75rem; margin-bottom: 0.75rem; }
.notfound p { color: var(--muted); margin-bottom: 2rem; }

@media print {
  .site-header, .filters, .actions, .skip-link { display: none; }
  section { padding: 1.5rem 0; }
}
