:root {
  --bg: #f8fafc;
  --card: #ffffff;
  --text: #0f172a;
  --muted: #475569;
  --border: rgba(15, 23, 42, 0.12);
  --shadow: 0 12px 30px rgba(2, 6, 23, 0.08);

  --primary: #2563eb;
  --primary-hover: #1d4ed8;
  --primary-contrast: #ffffff;
}

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

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: "Noto Sans", "Noto Sans Devanagari", "Noto Sans Gujarati", Arial, sans-serif;
  color: var(--text);
  background: var(--bg);
  line-height: 1.6;
}

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

.container {
  width: min(1100px, calc(100% - 2rem));
  margin: 0 auto;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  border-bottom: 1px solid var(--border);
  background: rgba(248, 250, 252, 0.82);
  backdrop-filter: blur(10px);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.75rem 0;
}

.brand {
  display: flex;
  flex-direction: column;
  gap: 0.05rem;
  min-width: 220px;
}

.brand-name {
  font-weight: 700;
  letter-spacing: -0.01em;
}

.brand-role {
  font-size: 0.9rem;
  color: var(--muted);
}

.nav {
  display: flex;
  gap: 0.4rem;
  align-items: center;
  justify-content: center;
}

.nav a {
  padding: 0.45rem 0.7rem;
  border-radius: 0.7rem;
  color: var(--muted);
  transition: background 160ms ease, color 160ms ease;
}

.nav a:hover {
  background: rgba(37, 99, 235, 0.1);
  color: var(--text);
}

.nav a:focus-visible {
  outline: 3px solid rgba(37, 99, 235, 0.35);
  outline-offset: 2px;
}

.lang-switch {
  display: flex;
  gap: 0.25rem;
  padding: 0.25rem;
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.06);
  border: 1px solid rgba(15, 23, 42, 0.08);
}

.lang-btn {
  border: 0;
  background: transparent;
  padding: 0.35rem 0.65rem;
  border-radius: 999px;
  cursor: pointer;
  font-weight: 700;
  letter-spacing: 0.06em;
  font-size: 0.85rem;
  color: var(--muted);
  transition: background 160ms ease, color 160ms ease, transform 120ms ease;
}

.lang-btn:hover {
  transform: translateY(-1px);
}

.lang-btn.active {
  background: rgba(15, 23, 42, 0.9);
  color: #ffffff;
}

.lang-btn:focus-visible {
  outline: 3px solid rgba(37, 99, 235, 0.35);
  outline-offset: 2px;
}

.section {
  padding: 4rem 0;
}

.section-alt {
  background: rgba(15, 23, 42, 0.03);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

.hero {
  padding: 5rem 0;
  background: radial-gradient(1200px 600px at 20% 10%, rgba(37, 99, 235, 0.16), transparent),
    radial-gradient(900px 500px at 90% 20%, rgba(16, 185, 129, 0.12), transparent);
}

.hero-inner {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.hero-title {
  margin: 0;
  font-size: clamp(2.1rem, 4.8vw, 3.4rem);
  line-height: 1.1;
  letter-spacing: -0.03em;
}

.hero-subtitle {
  margin: 0;
  font-size: 1.15rem;
  font-weight: 600;
  color: var(--muted);
}

.hero-lead {
  margin: 0;
  color: var(--muted);
  max-width: 65ch;
}

.hero-actions {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.section-title {
  margin: 0 0 0.9rem;
  font-size: 1.8rem;
  letter-spacing: -0.02em;
}

.section-subtitle {
  margin: 1.6rem 0 0.8rem;
  font-size: 1.1rem;
  color: var(--text);
}

.section-text {
  margin: 0;
  color: var(--muted);
  max-width: 75ch;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.75rem 1.05rem;
  border-radius: 0.9rem;
  font-weight: 700;
  border: 1px solid transparent;
  transition: background 160ms ease, transform 120ms ease, box-shadow 160ms ease;
  user-select: none;
}

.btn.primary {
  background: var(--primary);
  color: var(--primary-contrast);
  box-shadow: 0 10px 18px rgba(37, 99, 235, 0.2);
}

.btn.primary:hover {
  background: var(--primary-hover);
  transform: translateY(-1px);
}

.btn.primary:active {
  transform: translateY(0);
}

.skills-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.65rem;
}

.skills-list li {
  padding: 0.7rem 0.85rem;
  border: 1px solid var(--border);
  background: var(--card);
  border-radius: 0.9rem;
  box-shadow: 0 8px 20px rgba(2, 6, 23, 0.04);
}

.projects-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
  margin-top: 1.2rem;
}

.project-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 1rem;
  padding: 1.1rem 1.1rem 1.2rem;
  box-shadow: 0 12px 26px rgba(2, 6, 23, 0.05);
  transition: transform 160ms ease, box-shadow 160ms ease;
}

.project-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow);
}

.project-title {
  margin: 0 0 0.5rem;
  font-size: 1.1rem;
  letter-spacing: -0.01em;
}

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

.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
  align-items: start;
  margin-top: 1.2rem;
}

.contact-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 1rem;
  padding: 1.1rem;
}

.contact-links {
  list-style: none;
  padding: 0;
  margin: 1rem 0 0;
  display: grid;
  gap: 0.4rem;
}

.contact-link {
  font-weight: 700;
  color: rgba(37, 99, 235, 0.95);
}

.contact-link:hover {
  text-decoration: underline;
}

.contact-meta {
  color: var(--muted);
}

.contact-form {
  display: grid;
  gap: 0.8rem;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 1rem;
  padding: 1.1rem;
}

input,
textarea {
  width: 100%;
  padding: 0.75rem 0.85rem;
  border-radius: 0.85rem;
  border: 1px solid rgba(15, 23, 42, 0.18);
  background: #ffffff;
  font: inherit;
  transition: border-color 160ms ease, box-shadow 160ms ease;
}

input:focus,
textarea:focus {
  outline: none;
  border-color: rgba(37, 99, 235, 0.6);
  box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.12);
}

textarea {
  resize: vertical;
}

.site-footer {
  padding: 2.2rem 0;
  border-top: 1px solid var(--border);
}

.footer-text {
  margin: 0;
  color: var(--muted);
  font-size: 0.95rem;
}

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

/* Smooth language-change transition */
#content {
  transition: opacity 180ms ease, transform 180ms ease;
}

body.is-lang-changing #content {
  opacity: 0.35;
  transform: translateY(1px);
}

@media (max-width: 768px) {
  .header-inner {
    flex-wrap: wrap;
  }

  .brand {
    min-width: unset;
    flex: 1 1 auto;
  }

  .nav {
    order: 3;
    width: 100%;
    justify-content: flex-start;
    flex-wrap: wrap;
  }

  .section {
    padding: 3.2rem 0;
  }

  .hero {
    padding: 4rem 0;
  }

  .skills-list {
    grid-template-columns: 1fr;
  }

  .projects-grid {
    grid-template-columns: 1fr;
  }

  .contact-grid {
    grid-template-columns: 1fr;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  #content,
  .btn,
  .nav a,
  .lang-btn,
  .project-card {
    transition: none !important;
  }
}
