/* tejasvyas.com — base styles
   System-font stack by default; Google Fonts (if loaded) layer on top with
   graceful fallback baked into the font-family lists below. */

:root {
  --bg: #ffffff;
  --bg-alt: #f4f5f7;
  --text: #1b1e23;
  --text-muted: #4b5261;
  --border: #dde1e7;
  --accent: #1d4ed8;
  --accent-contrast: #ffffff;
  --focus: #1d4ed8;
  --max-width: 46rem;

  --font-body: "Source Sans 3", "Source Sans Pro", -apple-system, BlinkMacSystemFont,
    "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --font-heading: "Source Serif 4", "Source Serif Pro", Georgia, "Times New Roman", serif;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #14161a;
    --bg-alt: #1b1e24;
    --text: #e8eaed;
    --text-muted: #a7adba;
    --border: #2c3038;
    --accent: #7ba3ff;
    --accent-contrast: #0b1020;
    --focus: #7ba3ff;
  }
}

* {
  box-sizing: border-box;
}

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

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 1.0625rem;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3 {
  font-family: var(--font-heading);
  line-height: 1.25;
  color: var(--text);
}

h1 {
  font-size: clamp(1.9rem, 4vw, 2.6rem);
  margin: 0 0 0.5rem;
}

h2 {
  font-size: clamp(1.4rem, 3vw, 1.75rem);
  margin: 0 0 1.25rem;
  padding-top: 0.25rem;
}

h3 {
  font-size: 1.15rem;
  margin: 0 0 0.25rem;
}

p {
  margin: 0 0 1rem;
}

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

a:hover {
  text-decoration-thickness: 2px;
}

/* Consistent, visible focus styling everywhere (keyboard nav) */
a:focus-visible,
button:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 2px;
  border-radius: 2px;
}

/* Skip link: visually hidden until focused */
.skip-link {
  position: absolute;
  left: -999px;
  top: auto;
  width: 1px;
  height: 1px;
  overflow: hidden;
  background: var(--accent);
  color: var(--accent-contrast);
  padding: 0.75rem 1.25rem;
  z-index: 100;
  border-radius: 0 0 6px 0;
}

.skip-link:focus {
  left: 0;
  top: 0;
  width: auto;
  height: auto;
  overflow: visible;
}

/* Sticky top nav */
.site-nav {
  position: sticky;
  top: 0;
  z-index: 10;
  background: color-mix(in srgb, var(--bg) 92%, transparent);
  backdrop-filter: saturate(140%) blur(6px);
  border-bottom: 1px solid var(--border);
}

.site-nav .nav-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0.9rem 1.25rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}

.nav-brand {
  font-weight: 700;
  color: var(--text);
  text-decoration: none;
  font-family: var(--font-heading);
  font-size: 1.05rem;
}

.nav-links {
  list-style: none;
  display: flex;
  gap: 1.1rem;
  margin: 0;
  padding: 0;
  flex-wrap: wrap;
}

.nav-links a {
  color: var(--text-muted);
  text-decoration: none;
  font-size: 0.95rem;
}

.nav-links a:hover,
.nav-links a:focus-visible {
  color: var(--accent);
}

.nav-links a[aria-current="true"] {
  color: var(--accent);
  font-weight: 600;
}

main {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 1.25rem;
}

section {
  padding: 3rem 0;
  border-bottom: 1px solid var(--border);
}

section:last-of-type {
  border-bottom: none;
}

.hero {
  padding-top: 3.5rem;
}

.hero .tagline {
  font-size: 1.2rem;
  color: var(--text-muted);
  margin-bottom: 1.5rem;
  max-width: 38ch;
}

.hero .location {
  color: var(--text-muted);
  font-size: 0.95rem;
}

.button-row {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
  margin-top: 1.5rem;
}

.btn {
  display: inline-block;
  padding: 0.6rem 1.15rem;
  border-radius: 6px;
  text-decoration: none;
  font-weight: 600;
  font-size: 0.95rem;
  border: 1px solid var(--accent);
}

.btn-primary {
  background: var(--accent);
  color: var(--accent-contrast);
}

.btn-secondary {
  background: transparent;
  color: var(--accent);
}

/* Experience entries */
.entry {
  margin-bottom: 1.75rem;
}

.entry:last-child {
  margin-bottom: 0;
}

.entry-meta {
  color: var(--text-muted);
  font-size: 0.92rem;
  margin-bottom: 0.4rem;
}

.entry ul {
  margin: 0.5rem 0 0;
  padding-left: 1.2rem;
}

.entry li {
  margin-bottom: 0.3rem;
}

/* Research topics grid */
.topics {
  list-style: none;
  margin: 0 0 1.5rem;
  padding: 0;
  display: grid;
  gap: 0.75rem;
}

.topics li {
  background: var(--bg-alt);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 0.85rem 1rem;
}

/* Work-with-me service cards */
.services {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 1.25rem;
}

.service {
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 1.25rem 1.4rem;
  background: var(--bg-alt);
}

.service p {
  margin: 0;
  color: var(--text-muted);
}

/* Contact links */
.contact-links {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

.contact-links a {
  font-size: 1.05rem;
}

footer {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 2rem 1.25rem 3rem;
  color: var(--text-muted);
  font-size: 0.9rem;
}

@media (min-width: 600px) {
  .services {
    grid-template-columns: repeat(2, 1fr);
  }
}
